added optional button to restart game (door, panel and touch variants)
[rocksndiamonds.git] / src / libgame / platform.h
index d5d939a6d1c75d70933ea208ff159927394293a7..b9c8a411090f80b5a91a3776d3732d9f2dfe8082 100644 (file)
@@ -1,28 +1,23 @@
-/***********************************************************
-* Artsoft Retro-Game Library                               *
-*----------------------------------------------------------*
-* (c) 1994-2006 Artsoft Entertainment                      *
-*               Holger Schemel                             *
-*               Detmolder Strasse 189                      *
-*               33604 Bielefeld                            *
-*               Germany                                    *
-*               e-mail: info@artsoft.org                   *
-*----------------------------------------------------------*
-* platform.h                                               *
-***********************************************************/
+// ============================================================================
+// Artsoft Retro-Game Library
+// ----------------------------------------------------------------------------
+// (c) 1995-2014 by Artsoft Entertainment
+//                         Holger Schemel
+//                 info@artsoft.org
+//                 https://www.artsoft.org/
+// ----------------------------------------------------------------------------
+// platform.h
+// ============================================================================
 
 #ifndef PLATFORM_H
 #define PLATFORM_H
 
-/* ========================================================================= */
-/* define main platform keywords                                             */
-/* ========================================================================= */
+// ============================================================================
+// define main platform keywords
+// ============================================================================
 
-#if defined(MSDOS)
-#define PLATFORM_MSDOS
-#define PLATFORM_STRING "DOS"
-#elif defined(WIN32) || defined(_WIN32)
-#define PLATFORM_WIN32
+#if defined(WIN32) || defined(_WIN32) || defined(_WIN64)
+#define PLATFORM_WINDOWS
 #define PLATFORM_STRING "Windows"
 #else
 #define PLATFORM_UNIX
@@ -30,9 +25,9 @@
 #endif
 
 
-/* ========================================================================= */
-/* define additional platform keywords                                       */
-/* ========================================================================= */
+// ============================================================================
+// define additional platform keywords
+// ============================================================================
 
 #if defined(_AIX)
 #define PLATFORM_AIX
@@ -43,7 +38,7 @@
 #if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
 #define PLATFORM_AMIGA
 #undef  PLATFORM_STRING
-#define PLATFORM_STRING "AmigaOS"
+#define PLATFORM_STRING "Amiga"
 #endif
 
 #if defined(__BEOS__)
@@ -91,9 +86,9 @@
 #endif
 
 #if defined(__APPLE__) && defined(__MACH__)
-#define PLATFORM_MACOSX
+#define PLATFORM_MAC
 #undef  PLATFORM_STRING
-#define PLATFORM_STRING "Mac OS X"
+#define PLATFORM_STRING "Mac"
 #endif
 
 #if defined(__NetBSD__)
 #define PLATFORM_STRING "Windows CE"
 #endif
 
-
-/* ========================================================================= */
-/* define additional target keywords                                         */
-/* ========================================================================= */
-
-#if defined(PLATFORM_MSDOS)
-#ifndef TARGET_ALLEGRO
-#define TARGET_ALLEGRO
-#endif
-#ifndef TARGET_X11
-#define TARGET_X11
+#if defined(__ANDROID__)
+#define PLATFORM_ANDROID
+#undef  PLATFORM_STRING
+#define PLATFORM_STRING "Android"
 #endif
+
+#if defined(__EMSCRIPTEN__)
+#define PLATFORM_EMSCRIPTEN
+#undef  PLATFORM_STRING
+#define PLATFORM_STRING "Emscripten"
 #endif
 
-#if defined(PLATFORM_UNIX) && defined(TARGET_X11)
-#define TARGET_X11_NATIVE
+
+// ============================================================================
+// 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
 #define TARGET_SDL
 #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