rnd-20031129-1-src
[rocksndiamonds.git] / src / main.h
index ebcfb39d5958df074aab0b037b0df0477e0746a8..ed85f13f2f6c4ba9c85849c1dd1a45d0773d9c32 100644 (file)
 #define EL_BD_DEFAULT                          (EL_FIRST_DUMMY + 22)
 #define EL_SP_DEFAULT                          (EL_FIRST_DUMMY + 23)
 #define EL_SB_DEFAULT                          (EL_FIRST_DUMMY + 24)
+#define EL_DUMMY                               (EL_FIRST_DUMMY + 25)
 
-#define MAX_NUM_ELEMENTS                       (EL_FIRST_DUMMY + 25)
+#define MAX_NUM_ELEMENTS                       (EL_FIRST_DUMMY + 26)
 
 
 /* values for graphics/sounds action types */
 #define ACTION_CHANGING                                23
 #define ACTION_EXPLODING                       24
 #define ACTION_BORING                          25
-#define ACTION_SLEEPING                                26
-#define ACTION_DYING                           27
-#define ACTION_TURNING                         28
-#define ACTION_TURNING_FROM_LEFT               29
-#define ACTION_TURNING_FROM_RIGHT              30
-#define ACTION_TURNING_FROM_UP                 31
-#define ACTION_TURNING_FROM_DOWN               32
-#define ACTION_OTHER                           33
+#define ACTION_BORING_1                                26
+#define ACTION_BORING_2                                27
+#define ACTION_BORING_3                                28
+#define ACTION_BORING_4                                29
+#define ACTION_BORING_5                                30
+#define ACTION_BORING_6                                31
+#define ACTION_BORING_7                                32
+#define ACTION_BORING_8                                33
+#define ACTION_BORING_9                                34
+#define ACTION_BORING_10                       35
+#define ACTION_SLEEPING                                36
+#define ACTION_SLEEPING_1                      37
+#define ACTION_SLEEPING_2                      38
+#define ACTION_SLEEPING_3                      39
+#define ACTION_AWAKENING                       40
+#define ACTION_DYING                           41
+#define ACTION_TURNING                         42
+#define ACTION_TURNING_FROM_LEFT               43
+#define ACTION_TURNING_FROM_RIGHT              44
+#define ACTION_TURNING_FROM_UP                 45
+#define ACTION_TURNING_FROM_DOWN               46
+#define ACTION_OTHER                           47
+
+#define NUM_ACTIONS                            48
+
+#define ACTION_BORING_LAST                     ACTION_BORING_10
+#define ACTION_SLEEPING_LAST                   ACTION_SLEEPING_3
 
-#define NUM_ACTIONS                            34
 
 /* values for special image configuration suffixes (must match game mode) */
 #define GFX_SPECIAL_ARG_DEFAULT                        0
 #define GFX_ARG_DRAW_XOFFSET                   23
 #define GFX_ARG_DRAW_YOFFSET                   24
 #define GFX_ARG_DRAW_MASKED                    25
-#define GFX_ARG_NAME                           26
+#define GFX_ARG_ANIM_DELAY_FIXED               26
+#define GFX_ARG_ANIM_DELAY_RANDOM              27
+#define GFX_ARG_POST_DELAY_FIXED               28
+#define GFX_ARG_POST_DELAY_RANDOM              29
+#define GFX_ARG_NAME                           30
 
-#define NUM_GFX_ARGS                           27
+#define NUM_GFX_ARGS                           31
 
 
 /* values for sound configuration suffixes */
@@ -1157,7 +1180,7 @@ struct PlayerInfo
   byte programmed_action;      /* action forced by game itself (like moving
                                   through doors); overrides other actions */
 
-  int jx,jy, last_jx,last_jy;
+  int jx, jy, last_jx, last_jy;
   int MovDir, MovPos, GfxDir, GfxPos;
   int Frame, StepFrame;
 
@@ -1177,6 +1200,21 @@ struct PlayerInfo
   boolean is_pushing;
   boolean is_switching;
 
+  boolean is_bored;
+  boolean is_sleeping;
+
+  int frame_counter_bored;
+  int frame_counter_sleeping;
+
+  int anim_delay_counter;
+  int post_delay_counter;
+
+  int special_action_bored;
+  int special_action_sleeping;
+
+  int num_special_action_bored;
+  int num_special_action_sleeping;
+
   int switch_x, switch_y;
 
   int show_envelope;
@@ -1303,6 +1341,12 @@ struct GameInfo
   boolean gravity;
   boolean explosions_delayed;
   boolean envelope_active;
+
+  /* values for player idle animation (no effect on engine) */
+  int player_boring_delay_fixed;
+  int player_boring_delay_random;
+  int player_sleeping_delay_fixed;
+  int player_sleeping_delay_random;
 };
 
 struct GlobalInfo
@@ -1455,6 +1499,11 @@ struct GraphicInfo
   int diggable_like;           /* element for cloning digging graphics */
   int border_size;             /* border size for "crumbled" graphics */
 
+  int anim_delay_fixed;                /* optional delay values for bored and   */
+  int anim_delay_random;       /* sleeping player animations (animation */
+  int post_delay_fixed;                /* intervall and following pause before  */
+  int post_delay_random;       /* next intervall (bored animation only) */
+
   int step_offset;             /* optional step offset of toon animations */
   int step_delay;              /* optional step delay of toon animations */
 
@@ -1515,7 +1564,7 @@ struct SpecialSuffixInfo
   int value;
 };
 
-struct InfoAnimationInfo
+struct DemoAnimInfo
 {
   int element;
   int action;
@@ -1618,12 +1667,15 @@ extern struct GraphicInfo      *graphic_info;
 extern struct SoundInfo               *sound_info;
 extern struct MusicInfo               *music_info;
 extern struct MusicFileInfo    *music_file_info;
-extern struct InfoAnimationInfo *info_animation_info;
+extern struct DemoAnimInfo     *demo_anim_info;
+extern SetupFileHash           *demo_anim_text;
 extern struct ConfigInfo       image_config[];
 extern struct ConfigInfo       sound_config[];
 extern struct ConfigInfo       music_config[];
 extern struct ConfigInfo       image_config_suffix[];
 extern struct ConfigInfo       sound_config_suffix[];
 extern struct ConfigInfo       music_config_suffix[];
+extern struct ConfigInfo       demo_anim_info_config[];
+extern struct ConfigInfo       demo_anim_text_config[];
 
 #endif /* MAIN_H */