changed global animation events to use more practical bit range
[rocksndiamonds.git] / src / libgame / system.h
index acc20894f52e3610538d1f6c88b50ca70d9133d7..44ac3e3448626e95065285ae524203ae6ab0a396 100644 (file)
 
 #define ANIM_DEFAULT           ANIM_LOOP
 
-// values for special drawing styles and event handling
-#define STYLE_NONE             0
-
-// values used for crumbled graphics
-#define STYLE_ACCURATE_BORDERS (1 << 0)
-#define STYLE_INNER_CORNERS    (1 << 1)
+// values for special global animation events
+#define ANIM_EVENT_UNDEFINED   -1
+#define ANIM_EVENT_NONE                0
+#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)
+
+// event mask:  bits 0-7
+// anim number: bits 8-15
+// part number: bits 16-23
+#define ANIM_EVENT_ANIM_BIT    8
+#define ANIM_EVENT_PART_BIT    16
 
-// values used for game panel graphics
-#define STYLE_REVERSE          (1 << 2)
-#define STYLE_LEFTMOST_POSITION        (1 << 3)
+#define ANIM_EVENT_ANIM_MASK   (0xff << ANIM_EVENT_ANIM_BIT)
+#define ANIM_EVENT_PART_MASK   (0xff << ANIM_EVENT_PART_BIT)
 
-// values used for global animations
-#define STYLE_BLOCK            (1 << 4)
-#define STYLE_PASSTHROUGH      (1 << 5)
-#define STYLE_MULTIPLE_ACTIONS (1 << 6)
+#define ANIM_EVENT_DEFAULT     ANIM_EVENT_NONE
 
-#define STYLE_DEFAULT          STYLE_NONE
+// values for special global animation event actions
+#define ANIM_EVENT_ACTION_NONE -1
 
 // values for special global animation delay types
 #define ANIM_DELAY_UNDEFINED   -1
 // values for special global animation delay actions
 #define ANIM_DELAY_ACTION_NONE -1
 
-// 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
+// values for special drawing styles and event handling
+#define STYLE_NONE             0
 
-#define ANIM_EVENT_ANIM_MASK   (0xff << ANIM_EVENT_ANIM_BIT)
-#define ANIM_EVENT_PART_MASK   (0xff << ANIM_EVENT_PART_BIT)
+// values used for crumbled graphics
+#define STYLE_ACCURATE_BORDERS (1 << 0)
+#define STYLE_INNER_CORNERS    (1 << 1)
 
-#define ANIM_EVENT_DEFAULT     ANIM_EVENT_NONE
+// values used for game panel graphics
+#define STYLE_REVERSE          (1 << 2)
+#define STYLE_LEFTMOST_POSITION        (1 << 3)
 
-// values for special global animation event actions
-#define ANIM_EVENT_ACTION_NONE -1
+// values used for global animations
+#define STYLE_BLOCK            (1 << 4)
+#define STYLE_PASSTHROUGH      (1 << 5)
+#define STYLE_MULTIPLE_ACTIONS (1 << 6)
+
+#define STYLE_DEFAULT          STYLE_NONE
 
 // values for fade mode
 #define FADE_TYPE_NONE         0