improved forced restart of global animations when restarting game
[rocksndiamonds.git] / src / libgame / system.h
index bec94cf5add793eac97cd9ad2b00c27506293e90..44745de9c32c7143fc5300fda3701f25db550024 100644 (file)
 #define DRAW_GLOBAL_ANIM_STAGE_1       1
 #define DRAW_GLOBAL_ANIM_STAGE_2       2
 #define DRAW_GLOBAL_ANIM_STAGE_3       3
+#define DRAW_GLOBAL_ANIM_STAGE_RESTART 4
 
 // values for drawing target (various functions)
 #define DRAW_TO_BACKBUFFER             0
 // values for special global animation events
 #define ANIM_EVENT_UNDEFINED   -1
 #define ANIM_EVENT_NONE                0
-#define ANIM_EVENT_SELF                (1 << 16)
-#define ANIM_EVENT_ANY         (1 << 17)
-#define ANIM_EVENT_CLICK       (1 << 18)
-#define ANIM_EVENT_INIT                (1 << 19)
-#define ANIM_EVENT_START       (1 << 20)
-#define ANIM_EVENT_END         (1 << 21)
-#define ANIM_EVENT_POST                (1 << 22)
-#define ANIM_EVENT_UNCLICK_ANY (1 << 23)
-
-// anim number: bits 0-7
-// part number: bits 8-15
-#define ANIM_EVENT_ANIM_BIT    0
-#define ANIM_EVENT_PART_BIT    8
-
+#define ANIM_EVENT_SELF                (1 << 0)
+#define ANIM_EVENT_ANY         (1 << 1)
+#define ANIM_EVENT_CLICK       (1 << 2)
+#define ANIM_EVENT_INIT                (1 << 3)
+#define ANIM_EVENT_START       (1 << 4)
+#define ANIM_EVENT_END         (1 << 5)
+#define ANIM_EVENT_POST                (1 << 6)
+#define ANIM_EVENT_UNCLICK_ANY (1 << 7)
+#define ANIM_EVENT_CE_CHANGE   (1 << 8)
+
+// event mask:  bits 0-15
+// CE number:   bits 16-23
+// anim number: bits 16-23
+// page number: bits 24-31
+// part number: bits 24-31
+#define ANIM_EVENT_CE_BIT      16
+#define ANIM_EVENT_ANIM_BIT    16
+#define ANIM_EVENT_PAGE_BIT    24
+#define ANIM_EVENT_PART_BIT    24
+
+#define ANIM_EVENT_CE_MASK     (0xff << ANIM_EVENT_CE_BIT)
 #define ANIM_EVENT_ANIM_MASK   (0xff << ANIM_EVENT_ANIM_BIT)
+#define ANIM_EVENT_PAGE_MASK   (0xff << ANIM_EVENT_PAGE_BIT)
 #define ANIM_EVENT_PART_MASK   (0xff << ANIM_EVENT_PART_BIT)
 
 #define ANIM_EVENT_DEFAULT     ANIM_EVENT_NONE
 #define STYLE_BLOCK            (1 << 4)
 #define STYLE_PASSTHROUGH      (1 << 5)
 #define STYLE_MULTIPLE_ACTIONS (1 << 6)
+#define STYLE_CONSUME_CE_EVENT (1 << 7)
 
 #define STYLE_DEFAULT          STYLE_NONE
 
 #define POS_LOWER              5
 #define POS_BOTTOM             6
 #define POS_ANY                        7
-#define POS_LAST               8
+#define POS_CE                 8
+#define POS_LAST               9
 
 // values for text alignment
 #define ALIGN_LEFT             (1 << 0)