build system revision
[carveJwlIkooP6JGAAIwe30JlM.git] / steam.h
diff --git a/steam.h b/steam.h
index e0569a7a8046d50c23e451342c2e0d656843a27b..977f77d47844fa9b2294158cc3e178f6334cfb86 100644 (file)
--- a/steam.h
+++ b/steam.h
@@ -1,12 +1,8 @@
 /*
- * Copyright (C) 2021-2023 Mt.ZERO Software, Harry Godden - All Rights Reserved
+ * Copyright (C) 2021-2024 Mt.ZERO Software, Harry Godden - All Rights Reserved
  * All trademarks are property of their respective owners
  */
-
-#ifndef STEAM_H
-#define STEAM_H
-
-#define VG_GAME
+#pragma once
 #include "vg/vg_steam.h"
 #include "vg/vg_steam_utils.h"
 #include "vg/vg_steam_networking.h"
@@ -63,6 +59,9 @@ static void steam_store_achievements(void)
 
 static void update_ach_models(void);
 static void steam_set_achievement( const char *name ){
+   if( skaterift.demo_mode )
+      return;
+
    /* hack lol */
    if( !strcmp(name,"MARC") ) skaterift.achievements |= 0x1;
    if( !strcmp(name,"ALBERT") ) skaterift.achievements |= 0x2;
@@ -243,7 +242,6 @@ static u32 str_utf8_collapse( const char *str, char *buf, u32 length ){
 static int steam_init(void){
    const char *username = "offline player";
 
-#ifdef SR_NETWORKED
    vg_info( "Initializing steamworks\n" );
 
    if( !SteamAPI_Init() ){
@@ -284,8 +282,6 @@ static int steam_init(void){
 
    vg_console_reg_cmd( "ach", steam_achievement_ccmd, NULL );
 
-#endif
-
    /* TODO: On username update callback */
    str_utf8_collapse( username, steam_username_at_startup, 
                         vg_list_size(steam_username_at_startup) );
@@ -307,5 +303,3 @@ static void steam_end(void)
       SteamAPI_Shutdown();
    }
 }
-
-#endif /* STEAM_H */