Tramway SDK
platform.h
Go to the documentation of this file.
1// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2// All rights reserved.
3
4#ifndef TRAM_SDK_PLATFORM_PLATFORM_H
5#define TRAM_SDK_PLATFORM_PLATFORM_H
6
7namespace tram {
8
10 PLATFORM_WINDOWS, //< Windows 7 platform
11 PLATFORM_LINUX, //< Linux Debian platform
12 PLATFORM_WEB //< Emscripten Firefox platform
13};
14
15#if defined(__EMSCRIPTEN__)
16 #define TRAM_SDK_PLATFORM_WEB
17 const static PlatformType CURRENT_PLATFORM = PLATFORM_WEB;
18#elif defined(_WIN32)
19 #define TRAM_SDK_PLATFORM_WINDOWS
20 const static PlatformType CURRENT_PLATFORM = PLATFORM_WINDOWS;
21#elif defined(__unix__)
22 #define TRAM_SDK_PLATFORM_LINUX
23 const static PlatformType CURRENT_PLATFORM = PLATFORM_LINUX;
24#else
25 #error Undetectable platform. Please make your platform detectable.
26#endif
27
28}
29
30#endif // PLATFORM_PLATFORM_H
Definition: api.h:9
PlatformType
Definition: platform.h:9
@ PLATFORM_WEB
Definition: platform.h:12
@ PLATFORM_LINUX
Definition: platform.h:11
@ PLATFORM_WINDOWS
Definition: platform.h:10