sync fwk
parent
433d741838
commit
9e31348378
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
steam_init(0); // steam_appid: 0 to use SpaceWar vanilla project from Valve
|
steam_init(0); // steam_appid: 0 to use SpaceWar vanilla project from Valve
|
||||||
|
|
||||||
window_create(0.75, 0);
|
window_create(0.75, 0);
|
||||||
|
|
||||||
while( window_swap() ) {
|
while( window_swap() ) {
|
||||||
|
|
|
@ -24041,7 +24041,8 @@ bool steam_init(unsigned app_id) {
|
||||||
return !strcpy(steam.status, "Err: steam not running");
|
return !strcpy(steam.status, "Err: steam not running");
|
||||||
}
|
}
|
||||||
|
|
||||||
SteamAPI_RestartAppIfNecessary(app_id);
|
if( SteamAPI_RestartAppIfNecessary(app_id) )
|
||||||
|
exit(0); // restarting app thru Steam client if needed
|
||||||
|
|
||||||
// Create interfaces
|
// Create interfaces
|
||||||
steam.iclient = (intptr_t)SteamInternal_CreateInterface("SteamClient020");
|
steam.iclient = (intptr_t)SteamInternal_CreateInterface("SteamClient020");
|
||||||
|
|
|
@ -299,7 +299,10 @@ extern "C" {
|
||||||
#define ASSERT(expr, ...) do { int fool_msvc[] = {0,}; if(!(expr)) { fool_msvc[0]++; alert(va("!Expression failed: " #expr " " FILELINE "\n" __VA_ARGS__)), breakpoint(); } } while(0)
|
#define ASSERT(expr, ...) do { int fool_msvc[] = {0,}; if(!(expr)) { fool_msvc[0]++; alert(va("!Expression failed: " #expr " " FILELINE "\n" __VA_ARGS__)), breakpoint(); } } while(0)
|
||||||
#define ASSERT_ONCE(expr, ...) do { int fool_msvc[] = {0,}; if(!(expr)) { fool_msvc[0]++; static int seen = 0; if(!seen) seen = 1, alert(va("!Expression failed: " #expr " " FILELINE "\n" __VA_ARGS__)), breakpoint(); } } while(0)
|
#define ASSERT_ONCE(expr, ...) do { int fool_msvc[] = {0,}; if(!(expr)) { fool_msvc[0]++; static int seen = 0; if(!seen) seen = 1, alert(va("!Expression failed: " #expr " " FILELINE "\n" __VA_ARGS__)), breakpoint(); } } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef STATIC_ASSERT
|
||||||
#define STATIC_ASSERT(EXPR) typedef struct { unsigned macro(static_assert_on_L) : !!(EXPR); } unique(static_assert_on_L)
|
#define STATIC_ASSERT(EXPR) typedef struct { unsigned macro(static_assert_on_L) : !!(EXPR); } unique(static_assert_on_L)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FILELINE __FILE__ ":" STRINGIZE(__LINE__)
|
#define FILELINE __FILE__ ":" STRINGIZE(__LINE__)
|
||||||
#define STRINGIZE(x) STRINGIZ3(x)
|
#define STRINGIZE(x) STRINGIZ3(x)
|
||||||
|
@ -1286,8 +1289,10 @@ API bool id_valid(uintptr_t id);
|
||||||
array(struct obj*) objchildren; \
|
array(struct obj*) objchildren; \
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef OBJ
|
||||||
#define OBJ \
|
#define OBJ \
|
||||||
OBJHEADER
|
OBJHEADER
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// syntax sugars
|
// syntax sugars
|
||||||
|
@ -1324,8 +1329,10 @@ API bool id_valid(uintptr_t id);
|
||||||
#define OBJCOMPONENTS_ALL_FLAGGED 0x5555555555555555ULL
|
#define OBJCOMPONENTS_ALL_FLAGGED 0x5555555555555555ULL
|
||||||
#define COMPONENTS_ONLY(x) ((x) & ~OBJCOMPONENTS_ALL_FLAGGED)
|
#define COMPONENTS_ONLY(x) ((x) & ~OBJCOMPONENTS_ALL_FLAGGED)
|
||||||
|
|
||||||
|
#ifndef ENTITY
|
||||||
#define ENTITY \
|
#define ENTITY \
|
||||||
struct { OBJHEADER union { struct { uintptr_t objenabled:OBJCOMPONENTS_MAX, objflagged:OBJCOMPONENTS_MAX; }; uintptr_t cflags; }; void *c[OBJCOMPONENTS_MAX]; };
|
struct { OBJHEADER union { struct { uintptr_t objenabled:OBJCOMPONENTS_MAX, objflagged:OBJCOMPONENTS_MAX; }; uintptr_t cflags; }; void *c[OBJCOMPONENTS_MAX]; };
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TYPEDEF_ENTITY(NAME,N,...) \
|
#define TYPEDEF_ENTITY(NAME,N,...) \
|
||||||
typedef struct NAME { ENTITY \
|
typedef struct NAME { ENTITY \
|
||||||
|
|
Loading…
Reference in New Issue