added event action parameter for global animations (no functionality yet)
[rocksndiamonds.git] / src / libgame / system.h
index 6ed27de2c5a01fe529940329553dd2751eda7dcb..ab8f43b0a85172467403a575bedb67b599c4938d 100644 (file)
 
 #define ANIM_EVENT_DEFAULT     ANIM_EVENT_NONE
 
+/* values for special global animation event actions */
+#define ANIM_EVENT_ACTION_NONE -1
+
 /* values for fade mode */
 #define FADE_TYPE_NONE         0
 #define FADE_TYPE_FADE_IN      (1 << 0)
 #define CHAR_GRID_BUTTON_SNAP          '1'
 #define CHAR_GRID_BUTTON_DROP          '2'
 
+#define GET_ACTION_FROM_GRID_BUTTON(c) ((c) == CHAR_GRID_BUTTON_LEFT ?  \
+                                        JOY_LEFT :                      \
+                                        (c) == CHAR_GRID_BUTTON_RIGHT ? \
+                                        JOY_RIGHT :                     \
+                                        (c) == CHAR_GRID_BUTTON_UP ?    \
+                                        JOY_UP :                        \
+                                        (c) == CHAR_GRID_BUTTON_DOWN ?  \
+                                        JOY_DOWN :                      \
+                                        (c) == CHAR_GRID_BUTTON_SNAP ?  \
+                                        JOY_BUTTON_1 :                  \
+                                        (c) == CHAR_GRID_BUTTON_DROP ?  \
+                                        JOY_BUTTON_2 :                  \
+                                        JOY_NO_ACTION)
+
 /* default name for empty highscore entry */
 #define EMPTY_PLAYER_NAME      "no name"
 
@@ -1025,6 +1042,8 @@ struct OverlayInfo
 
   char grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
   char grid_button_highlight;
+
+  int grid_button_action;
 };
 
 struct JoystickInfo
@@ -1060,6 +1079,8 @@ struct SetupTouchInfo
   char grid_button[2][MAX_GRID_XSIZE][MAX_GRID_YSIZE];
 
   int transparency;            /* in percent (0 == opaque, 100 == invisible) */
+  boolean draw_outlined;
+  boolean draw_pressed;
 
   boolean grid_initialized;
 };