X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.h;h=986b53a0ce6c59a89c03b240762b307c8320a15a;hb=1f877ca17e3eee9b2ea66fe2d7378be88fec3501;hp=061fa15e566275d5cbf96201a14bee3eb0ca3644;hpb=838825e11f7e4af0947bf9d40061defd4e499017;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index 061fa15e..986b53a0 100644 --- a/src/main.h +++ b/src/main.h @@ -158,20 +158,21 @@ /* Bitmaps with graphic file */ #define PIX_BACK 0 -#define PIX_DOOR 1 -#define PIX_HEROES 2 -#define PIX_TOONS 3 -#define PIX_SP 4 -#define PIX_DC 5 -#define PIX_MORE 6 -#define PIX_BIGFONT 7 -#define PIX_SMALLFONT 8 -#define PIX_MEDIUMFONT 9 +#define PIX_ELEMENTS 1 +#define PIX_DOOR 2 +#define PIX_HEROES 3 +#define PIX_TOONS 4 +#define PIX_SP 5 +#define PIX_DC 6 +#define PIX_MORE 7 +#define PIX_BIGFONT 8 +#define PIX_SMALLFONT 9 +#define PIX_MEDIUMFONT 10 /* Bitmaps without graphic file */ -#define PIX_DB_DOOR 10 -#define PIX_DB_FIELD 11 +#define PIX_DB_DOOR 11 +#define PIX_DB_FIELD 12 -#define NUM_PICTURES 10 +#define NUM_PICTURES 11 #define NUM_BITMAPS 12 /* boundaries of arrays etc. */ @@ -180,6 +181,7 @@ #define MAX_TAPELEN (1000 * 50) /* max. time * framerate */ #define MAX_SCORE_ENTRIES 100 #define MAX_ELEMENTS 700 /* 500 static + 200 runtime */ +#define MAX_GRAPHICS 1536 /* see below: NUM_TILES */ #define MAX_NUM_AMOEBA 100 /* values for elements with content */ @@ -340,8 +342,19 @@ struct GlobalInfo struct ElementInfo { - char *sound_class_name; - char *editor_description; + char *sound_class_name; /* classification for custom sound effects */ + char *editor_description; /* short description for level editor */ + + int graphic; +}; + +struct GraphicInfo +{ + Bitmap *bitmap; + int src_x, src_y; + int anim_frames; + int anim_delay; + int anim_mode; }; extern GC tile_clip_gc; @@ -402,7 +415,10 @@ extern struct TapeInfo tape; extern struct GameInfo game; extern struct GlobalInfo global; extern struct ElementInfo element_info[]; -extern struct SoundEffectInfo sound_effects[]; +extern struct GraphicInfo graphic_info[]; +extern struct ConfigInfo image_config[], sound_config[]; +extern struct ConfigInfo image_config_suffix[], sound_config_suffix[]; +extern struct FileInfo *image_files, *sound_files; /* often used screen positions */ #define SX 8 @@ -441,12 +457,10 @@ extern struct SoundEffectInfo sound_effects[]; #define MICROLEV_YPOS (SX + 12 * TILEY - MICRO_TILEY) #define MICROLABEL_YPOS (MICROLEV_YPOS + MICROLEV_YSIZE + 7) -#define GFX_STARTX SX -#define GFX_STARTY SY -#define MINI_GFX_STARTX SX -#define MINI_GFX_STARTY 424 -#define MICRO_GFX_STARTX SX -#define MICRO_GFX_STARTY 536 +#define MINI_GFX_STARTX 0 +#define MINI_GFX_STARTY 416 +#define MICRO_GFX_STARTX 0 +#define MICRO_GFX_STARTY 528 #define GFX_PER_LINE 16 #define MINI_GFX_PER_LINE 32 #define MICRO_GFX_PER_LINE 128 @@ -879,7 +893,7 @@ extern struct SoundEffectInfo sound_effects[]; #define EL_MAGIC_WALL_BD_FILLING 612 /* game graphics: -** 0 - 255: graphics from "RocksScreen" +** 0 - 255: graphics from "RocksElements" ** 256 - 511: graphics from "RocksFont" ** 512 - 767: graphics from "RocksHeroes" ** 768 - 1023: graphics from "RocksSP" @@ -887,8 +901,8 @@ extern struct SoundEffectInfo sound_effects[]; ** 1280 - 1535: graphics from "RocksMore" */ -#define GFX_START_ROCKSSCREEN 0 -#define GFX_END_ROCKSSCREEN 255 +#define GFX_START_ROCKSELEMENTS 0 +#define GFX_END_ROCKSELEMENTS 255 #define GFX_START_ROCKSFONT 256 #define GFX_END_ROCKSFONT 511 #define GFX_START_ROCKSHEROES 512 @@ -900,7 +914,7 @@ extern struct SoundEffectInfo sound_effects[]; #define GFX_START_ROCKSMORE 1280 #define GFX_END_ROCKSMORE 1535 -#define NUM_TILES 1536 +#define NUM_TILES 1536 /* see above: MAX_GRAPHICS */ /* graphics from "RocksScreen" */ /* Zeile 0 (0) */ @@ -1445,7 +1459,14 @@ extern struct SoundEffectInfo sound_effects[]; #define NUM_SOUNDS 55 -/* values for sound effects */ +/* values for image configuration */ +#define GFX_BD_DIAMOND 0 +#define GFX_ROBOT_WHEEL 1 + +#define NUM_IMAGE_FILES 2 + + +/* values for sound configuration */ #define SND_BD_EMPTY_SPACE_DIGGING 0 #define SND_BD_SAND_DIGGING 1 #define SND_BD_DIAMOND_COLLECTING 2 @@ -1616,7 +1637,7 @@ extern struct SoundEffectInfo sound_effects[]; #define SND_MENU_HALL_OF_FAME 167 #define SND_MENU_INFO_SCREEN 168 -#define NUM_SOUND_EFFECTS 169 +#define NUM_SOUND_FILES 169 /* values for game_status */