rnd-20061230-1-src
[rocksndiamonds.git] / src / libgame / system.h
index 081471abf6c3cfad0830596668c2398fe56fa818..2d10c7b16b8d483718c1735883076c4a85c0e1f6 100644 (file)
 /* values for special (non game element) animation modes */
 #define ANIM_HORIZONTAL                (1 << 10)
 #define ANIM_VERTICAL          (1 << 11)
-#define ANIM_STATIC_PANEL      (1 << 12)
+#define ANIM_CENTERED          (1 << 12)
+#define ANIM_STATIC_PANEL      (1 << 13)
+#define ANIM_FADE              (1 << 14)
+#define ANIM_CROSSFADE         (1 << 15)
 
 #define ANIM_DEFAULT           ANIM_LOOP
 
+/* values for text alignment */
+#define ALIGN_LEFT             (1 << 0)
+#define ALIGN_RIGHT            (1 << 1)
+#define ALIGN_CENTER           (1 << 2)
+
+#define ALIGN_DEFAULT          ALIGN_LEFT
+
+#define ALIGNED_XPOS(x,w,a)    ((a) == ALIGN_CENTER ? (x) - (w) / 2 :  \
+                                (a) == ALIGN_RIGHT  ? (x) - (w) : (x))
+
 /* values for redraw_mask */
 #define REDRAW_NONE            (0)
 #define REDRAW_ALL             (1 << 0)
 #define TAPES_DIRECTORY                "tapes"
 #define SCORES_DIRECTORY       "scores"
 #define DOCS_DIRECTORY         "docs"
+#define CACHE_DIRECTORY                "cache"
 
 #if !defined(PLATFORM_MSDOS)
 #define GFX_CLASSIC_SUBDIR     "gfx_classic"
 #define GRAPHICSINFO_FILENAME  "graphicsinfo.conf"
 #define SOUNDSINFO_FILENAME    "soundsinfo.conf"
 #define MUSICINFO_FILENAME     "musicinfo.conf"
+#define ARTWORKINFO_CACHE_FILE "artworkinfo.cache"
 #define LEVELFILE_EXTENSION    "level"
 #define TAPEFILE_EXTENSION     "tape"
 #define SCOREFILE_EXTENSION    "score"
 #define GRAPHICSINFO_FILENAME  "gfxinfo.cnf"
 #define SOUNDSINFO_FILENAME    "sndinfo.cnf"
 #define MUSICINFO_FILENAME     "musinfo.cnf"
+#define ARTWORKINFO_CACHE_FILE "artinfo.cac"
 #define LEVELFILE_EXTENSION    "lvl"
 #define TAPEFILE_EXTENSION     "tap"
 #define SCOREFILE_EXTENSION    "sco"
@@ -984,6 +1000,12 @@ struct XY
   int x, y;
 };
 
+struct Rect
+{
+  int x, y;
+  int width, height;
+};
+
 
 /* ========================================================================= */
 /* exported variables                                                        */
@@ -1037,12 +1059,13 @@ void InitGfxDoor2Info(int, int, int, int);
 void InitGfxScrollbufferInfo(int, int);
 void SetDrawDeactivationMask(int);
 void SetDrawBackgroundMask(int);
+void SetWindowBackgroundBitmap(Bitmap *);
 void SetMainBackgroundBitmap(Bitmap *);
 void SetDoorBackgroundBitmap(Bitmap *);
 
 void InitVideoDisplay(void);
 void CloseVideoDisplay(void);
-void InitVideoBuffer(DrawBuffer **,DrawWindow **, int,int,int, boolean);
+void InitVideoBuffer(int, int, int, boolean);
 Bitmap *CreateBitmapStruct(void);
 Bitmap *CreateBitmap(int, int, int);
 void FreeBitmap(Bitmap *);