rnd-20020329-2-src
[rocksndiamonds.git] / src / libgame / system.h
index 0cf978df10d41cf7f983fa049d288338cbb6dd9a..184af955db30eccc303162ced43fa2d23fb6af4c 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,18 @@ 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;
+  char *filename_prefix;       /* prefix to cut off from DOS filenames */
+
+  int version_major;
+  int version_minor;
+  int version_patch;
+
   void (*exit_function)(int);
 };
 
@@ -228,6 +239,14 @@ struct GfxInfo
   int vxsize, vysize;
 };
 
+struct ArtworkInfo
+{
+  char *custom_artwork;
+  char *custom_graphics;
+  char *custom_sounds;
+  char *custom_music;
+};
+
 struct JoystickInfo
 {
   int status;
@@ -324,6 +343,7 @@ extern struct OptionInfo    options;
 extern struct VideoSystemInfo  video;
 extern struct AudioSystemInfo  audio;
 extern struct GfxInfo          gfx;
+extern struct ArtworkInfo      artwork;
 extern struct JoystickInfo     joystick;
 extern struct SetupInfo                setup;
 
@@ -356,7 +376,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 *, char *, int);
 
 void InitGfxFieldInfo(int, int, int, int, int, int, int, int);
 void InitGfxDoor1Info(int, int, int, int);
@@ -389,6 +410,7 @@ inline boolean SetVideoMode(boolean);
 inline boolean ChangeVideoModeIfNeeded(boolean);
 
 Bitmap *LoadImage(char *);
+Bitmap *LoadCustomImage(char *);
 
 inline void OpenAudio(void);
 inline void CloseAudio(void);
@@ -400,4 +422,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 */