X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=b4589dcca77e45f8e3594e5f77c7e515493ba685;hb=9ec014a4e4a6a2332bb45c6cea8cccc46c64c6ae;hp=468f910d533f933555ba697fed41356c9cb1702d;hpb=c8acee298eb56783813578bf38cabddfee9976c4;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 468f910d..b4589dcc 100644 --- a/src/main.h +++ b/src/main.h @@ -420,10 +420,10 @@ #define EL_MOLE 110 #define EL_PENGUIN 111 #define EL_SATELLITE 112 -#define EL_ARROW_BLUE_LEFT 113 -#define EL_ARROW_BLUE_RIGHT 114 -#define EL_ARROW_BLUE_UP 115 -#define EL_ARROW_BLUE_DOWN 116 +#define EL_ARROW_LEFT 113 +#define EL_ARROW_RIGHT 114 +#define EL_ARROW_UP 115 +#define EL_ARROW_DOWN 116 #define EL_PIG 117 #define EL_DRAGON 118 @@ -721,12 +721,8 @@ #define EL_DYNABOMB_ACTIVE (EL_FIRST_DUMMY + 13) #define EL_SHIELD_NORMAL_ACTIVE (EL_FIRST_DUMMY + 14) #define EL_SHIELD_DEADLY_ACTIVE (EL_FIRST_DUMMY + 15) -#define EL_ARROW_RED_LEFT (EL_FIRST_DUMMY + 16) -#define EL_ARROW_RED_RIGHT (EL_FIRST_DUMMY + 17) -#define EL_ARROW_RED_UP (EL_FIRST_DUMMY + 18) -#define EL_ARROW_RED_DOWN (EL_FIRST_DUMMY + 19) -#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 20) +#define MAX_NUM_ELEMENTS (EL_FIRST_DUMMY + 16) /* values for graphics/sounds action types */ @@ -786,9 +782,11 @@ #define GFX_ARG_STEP_DELAY 21 #define GFX_ARG_DIRECTION 22 #define GFX_ARG_POSITION 23 -#define GFX_ARG_NAME 24 +#define GFX_ARG_DRAW_XOFFSET 24 +#define GFX_ARG_DRAW_YOFFSET 25 +#define GFX_ARG_NAME 26 -#define NUM_GFX_ARGS 25 +#define NUM_GFX_ARGS 27 /* values for sound configuration suffixes */ @@ -797,6 +795,38 @@ #define NUM_SND_ARGS 1 +/* values for font configuration */ + +#define FONT_INITIAL_1 0 +#define FONT_INITIAL_2 1 +#define FONT_INITIAL_3 2 +#define FONT_INITIAL_4 3 +#define FONT_BIG_1 4 +#define FONT_BIG_2 5 +#define FONT_BIG_3 6 +#define FONT_BIG_4 7 +#define FONT_MEDIUM_1 8 +#define FONT_MEDIUM_2 9 +#define FONT_MEDIUM_3 10 +#define FONT_MEDIUM_4 11 +#define FONT_SMALL_1 12 +#define FONT_SMALL_2 13 +#define FONT_SMALL_3 14 +#define FONT_SMALL_4 15 +#define FONT_TAPE 16 +#define FONT_GAME 17 +#define FONT_NARROW 18 + +#define NUM_FONTS 19 +#define NUM_INITIAL_FONTS 4 + +#define FIRST_IMG_FONT IMG_FONT_INITIAL_1 +#define LAST_IMG_FONT IMG_FONT_NARROW + +#define NUM_IMG_FONTS (LAST_IMG_FONT - \ + FIRST_IMG_FONT + 1) + + /* values for game_status */ #define EXITGAME 0 #define MAINMENU 1 @@ -886,13 +916,20 @@ struct PlayerInfo int MovDir, MovPos, GfxPos; int Frame; + int GfxAction; + + boolean use_murphy_graphic; + boolean Pushing; boolean Switching; boolean LevelSolved, GameOver; boolean snapped; int last_move_dir; - int is_moving; + boolean is_moving; + + boolean is_digging; + boolean is_waiting; unsigned long move_delay; int move_delay_value; @@ -900,8 +937,6 @@ struct PlayerInfo unsigned long push_delay; unsigned long push_delay_value; - int frame_reset_delay; - unsigned long actual_frame_counter; int score; @@ -1014,21 +1049,31 @@ struct GlobalInfo struct ElementInfo { - char *token_name; /* element token prefix used in config files */ + char *token_name; /* element token used in config files */ char *sound_class_name; /* classification for custom sound effects */ char *editor_description; /* short description for level editor */ char *custom_description; /* custom description for level editor */ int graphic[NUM_ACTIONS]; /* default graphics for several actions */ - /* special graphics for left/right/up/down */ int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS]; - - int editor_graphic; /* graphic displayed in level editor */ - int preview_graphic; /* graphic displayed in level preview */ + /* special graphics for left/right/up/down */ + int special_graphic[NUM_SPECIAL_GFX_ARGS]; + /* special graphics for certain screens */ int sound[NUM_ACTIONS]; /* default sounds for several actions */ }; +struct FontInfo +{ + char *token_name; /* font token used in config files */ + + int graphic; /* default graphic for this font */ + int special_graphic[NUM_SPECIAL_GFX_ARGS]; + /* special graphics for certain screens */ + int special_bitmap_id[NUM_SPECIAL_GFX_ARGS]; + /* internal bitmap ID for special graphics */ +}; + struct GraphicInfo { Bitmap *bitmap; @@ -1040,9 +1085,12 @@ struct GraphicInfo int anim_delay; /* important: delay of 1 means "no delay"! */ int anim_mode; boolean anim_global_sync; + int step_offset; /* optional step offset of toon animations */ int step_delay; /* optional step delay of toon animations */ + int draw_x, draw_y; /* optional offset for drawing fonts chars */ + #if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND) Pixmap clip_mask; /* single-graphic-only clip mask for X11 */ GC clip_gc; /* single-graphic-only clip gc for X11 */ @@ -1150,6 +1198,7 @@ extern struct ElementInfo element_info[]; extern struct ElementActionInfo element_action_info[]; extern struct ElementDirectionInfo element_direction_info[]; extern struct SpecialSuffixInfo special_suffix_info[]; +extern struct FontInfo font_info[]; extern struct GraphicInfo *graphic_info; extern struct SoundInfo *sound_info; extern struct ConfigInfo image_config[], sound_config[];