added runtime flag to store if high score server is available
[rocksndiamonds.git] / src / libgame / system.h
index 2db4961c53cbedd3c9d939c9e13339b8c7558025..94ebe7a561a628136ae85ec34da76a028763ef55 100644 (file)
 #define STR_NETWORK_AUTO_DETECT                "auto_detect_network_server"
 #define STR_NETWORK_AUTO_DETECT_SETUP  "(auto detect network server)"
 
+// values for API server settings
+#define API_SERVER_HOSTNAME            "api.artsoft.org"
+#define API_SERVER_PORT                        80
+#define API_SERVER_METHOD              "POST"
+#define API_SERVER_URI_ADD             "/api/scores/add"
+#define API_SERVER_URI_GET             "/api/scores/get"
+
 // values for touch control
 #define TOUCH_CONTROL_OFF              "off"
 #define TOUCH_CONTROL_VIRTUAL_BUTTONS  "virtual_buttons"
@@ -1032,6 +1039,8 @@ struct NetworkInfo
 struct RuntimeInfo
 {
   boolean uses_touch_device;
+
+  boolean api_server;
 };
 
 struct OptionInfo
@@ -1489,6 +1498,9 @@ struct SetupInfo
   int network_player_nr;
   char *network_server_hostname;
 
+  boolean api_server;
+  char *api_server_hostname;
+
   struct SetupAutoSetupInfo auto_setup;
   struct SetupLevelSetupInfo level_setup;
 
@@ -1984,4 +1996,7 @@ boolean ReadJoystick(int, int *, int *, boolean *, boolean *);
 boolean CheckJoystickOpened(int);
 void ClearJoystickState(void);
 
+void InitEmscriptenFilesystem(void);
+void SyncEmscriptenFilesystem(void);
+
 #endif // SYSTEM_H