X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fplatform.h;h=438e8de1c9a2a3029800038a7110b2e2e1bbbef9;hb=d8edd05c7bc6f88a893fc52e3dd7008cf6e866c5;hp=2fe3be79d5e0a76320ac52e9e991ffb5f5a3fadc;hpb=abe44529b439ad39b4d8dbf19cbd67c9b9844279;p=rocksndiamonds.git diff --git a/src/libgame/platform.h b/src/libgame/platform.h index 2fe3be79..438e8de1 100644 --- a/src/libgame/platform.h +++ b/src/libgame/platform.h @@ -4,7 +4,7 @@ // (c) 1995-2014 by Artsoft Entertainment // Holger Schemel // info@artsoft.org -// http://www.artsoft.org/ +// https://www.artsoft.org/ // ---------------------------------------------------------------------------- // platform.h // ============================================================================ @@ -12,9 +12,9 @@ #ifndef PLATFORM_H #define PLATFORM_H -/* ========================================================================= */ -/* define main platform keywords */ -/* ========================================================================= */ +// ============================================================================ +// define main platform keywords +// ============================================================================ #if defined(WIN32) || defined(_WIN32) #define PLATFORM_WIN32 @@ -25,9 +25,9 @@ #endif -/* ========================================================================= */ -/* define additional platform keywords */ -/* ========================================================================= */ +// ============================================================================ +// define additional platform keywords +// ============================================================================ #if defined(_AIX) #define PLATFORM_AIX @@ -153,10 +153,29 @@ #define PLATFORM_STRING "Android" #endif +#if defined(__EMSCRIPTEN__) +#define PLATFORM_EMSCRIPTEN +#undef PLATFORM_STRING +#define PLATFORM_STRING "Emscripten" +#endif + -/* ========================================================================= */ -/* define additional target keywords */ -/* ========================================================================= */ +// ============================================================================ +// define additional platform keywords for CPU architecture +// ============================================================================ + +#if defined(__x86_64__) || defined(__LP64__) || defined(_LP64) +#define PLATFORM_64_BIT +#define PLATFORM_XX_BIT_STRING "64-bit" +#else +#define PLATFORM_32_BIT +#define PLATFORM_XX_BIT_STRING "32-bit" +#endif + + +// ============================================================================ +// define additional target keywords +// ============================================================================ #if defined(TARGET_SDL2) #ifndef TARGET_SDL @@ -165,12 +184,4 @@ #endif -/* ========================================================================= */ -/* this should better go into "system.h" or "features.h" (yet to be created) */ -/* ========================================================================= */ - -#if defined(PLATFORM_UNIX) || defined(TARGET_SDL) -#define NETWORK_AVALIABLE -#endif - -#endif /* PLATFORM_H */ +#endif // PLATFORM_H