rnd-20020324-1-src
[rocksndiamonds.git] / src / libgame / system.h
index 0cf978df10d41cf7f983fa049d288338cbb6dd9a..6800aeaf153f4f414b3d883c7229677aff0aac46 100644 (file)
@@ -28,8 +28,6 @@
 #endif
 
 
-/* contant definitions */
-
 /* the additional 'b' is needed for Win32 to open files in binary mode */
 #define MODE_READ              "rb"
 #define MODE_WRITE             "wb"
 #define DOOR_GFX_PAGEY1                (0)
 #define DOOR_GFX_PAGEY2                (gfx.dysize)
 
+/* functions for version handling */
+#define VERSION_IDENT(x,y,z)   ((x) * 10000 + (y) * 100 + (z))
+#define VERSION_MAJOR(x)       ((x) / 10000)
+#define VERSION_MINOR(x)       (((x) % 10000) / 100)
+#define VERSION_PATCH(x)       ((x) % 100)
 
-/* type definitions */
 
+/* type definitions */
 typedef int (*EventFilter)(const Event *);
 
 
@@ -163,10 +166,17 @@ struct ProgramInfo
   char *program_title;
   char *window_title;
   char *icon_title;
+
   char *x11_icon_filename;
   char *x11_iconmask_filename;
   char *msdos_pointer_filename;
 
+  char *cookie_prefix;
+
+  int version_major;
+  int version_minor;
+  int version_patch;
+
   void (*exit_function)(int);
 };
 
@@ -356,7 +366,8 @@ void InitExitFunction(void (*exit_function)(int));
 void InitPlatformDependantStuff(void);
 void ClosePlatformDependantStuff(void);
 
-void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *);
+void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
+                    char *, int);
 
 void InitGfxFieldInfo(int, int, int, int, int, int, int, int);
 void InitGfxDoor1Info(int, int, int, int);
@@ -400,4 +411,7 @@ inline void NextEvent(Event *event);
 inline Key GetEventKey(KeyEvent *, boolean);
 inline boolean CheckCloseWindowEvent(ClientMessageEvent *);
 
+inline void InitJoysticks();
+inline boolean ReadJoystick(int, int *, int *, boolean *, boolean *);
+
 #endif /* SYSTEM_H */