added setup option to force showing local scores only
[rocksndiamonds.git] / src / libgame / system.h
index 9b3dfe752f127bb1b41ace4bd0005cbba18823bf..77c6c367601a1d6b8e304e374be19cd8ef7fba04 100644 (file)
@@ -22,6 +22,8 @@
 #include "windows.h"
 #elif defined(PLATFORM_ANDROID)
 #include "android.h"
+#elif defined(PLATFORM_EMSCRIPTEN)
+#include "emscripten.h"
 #endif
 
 #include "sdl.h"
 #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"
@@ -1030,6 +1039,8 @@ struct NetworkInfo
 struct RuntimeInfo
 {
   boolean uses_touch_device;
+
+  boolean api_server;
 };
 
 struct OptionInfo
@@ -1459,6 +1470,8 @@ struct SetupInfo
   boolean ask_on_escape;
   boolean ask_on_escape_editor;
   boolean ask_on_game_over;
+  boolean ask_on_quit_game;
+  boolean ask_on_quit_program;
   boolean quick_switch;
   boolean input_on_focus;
   boolean prefer_aga_graphics;
@@ -1469,6 +1482,7 @@ struct SetupInfo
   boolean sp_show_border_elements;
   boolean small_game_graphics;
   boolean show_snapshot_buttons;
+  boolean only_show_local_scores;
 
   char *graphics_set;
   char *sounds_set;
@@ -1485,6 +1499,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;
 
@@ -1561,6 +1578,7 @@ struct TreeInfo
 
   boolean level_group; // directory contains more level series directories
   boolean parent_link; // entry links back to parent directory
+  boolean is_copy;     // this entry is a copy of another entry in the tree
   boolean in_user_dir; // user defined levels are stored in home directory
   boolean user_defined;        // levels in user directory and marked as "private"
   boolean readonly;    // readonly levels can not be changed with editor
@@ -1979,4 +1997,7 @@ boolean ReadJoystick(int, int *, int *, boolean *, boolean *);
 boolean CheckJoystickOpened(int);
 void ClearJoystickState(void);
 
+void InitEmscriptenFilesystem(void);
+void SyncEmscriptenFilesystem(void);
+
 #endif // SYSTEM_H