From: Holger Schemel Date: Sat, 14 Sep 2002 00:45:41 +0000 (+0200) Subject: rnd-20020914-1-src X-Git-Tag: 3.0.0^2~242 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8afc6199767a6fcb7451efd2b3d5b070f6c99efb;p=rocksndiamonds.git rnd-20020914-1-src --- diff --git a/src/cartoons.c b/src/cartoons.c index e97005dd..100ad150 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -111,7 +111,7 @@ struct ToonInfo toons[NUM_TOONS] = BIRD_FRAMES, BIRD_FPS, BIRD_STEPSIZE, - ANIM_OSCILLATE, + ANIM_PINGPONG, ANIMDIR_RIGHT, ANIMPOS_UPPER }, @@ -122,7 +122,7 @@ struct ToonInfo toons[NUM_TOONS] = BIRD_FRAMES, BIRD_FPS, BIRD_STEPSIZE, - ANIM_OSCILLATE, + ANIM_PINGPONG, ANIMDIR_LEFT, ANIMPOS_UPPER }, diff --git a/src/conftime.h b/src/conftime.h index e9f59dab..1e3b9b82 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-09-12 01:07]" +#define COMPILE_DATE_STRING "[2002-09-14 02:41]" diff --git a/src/game.c b/src/game.c index 5ac7b6c2..a5620a01 100644 --- a/src/game.c +++ b/src/game.c @@ -3136,7 +3136,11 @@ void StartMoving(int x, int y) else if (element == EL_BUTTERFLY || element == EL_FIREFLY) DrawGraphicAnimation(x, y, el2gfx(element), 2, 4, ANIM_NORMAL); else if (element == EL_SONDE) +#if 0 DrawGraphicAnimation(x, y, GFX_SONDE_START, 8, 2, ANIM_NORMAL); +#else + DrawNewGraphicAnimation(x, y, IMG_SATELLITE_MOVING); +#endif else if (element == EL_SP_ELECTRON) DrawGraphicAnimation(x, y, GFX2_SP_ELECTRON, 8, 2, ANIM_NORMAL); @@ -3936,7 +3940,7 @@ void AusgangstuerOeffnen(int x, int y) void AusgangstuerBlinken(int x, int y) { - DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_OSCILLATE); + DrawGraphicAnimation(x, y, GFX_AUSGANG_AUF, 4, 4, ANIM_PINGPONG); } void OpenSwitchgate(int x, int y) diff --git a/src/init.c b/src/init.c index 67e8a6fc..9b553f1e 100644 --- a/src/init.c +++ b/src/init.c @@ -36,9 +36,10 @@ static char *image_filename[NUM_PICTURES] = "RocksSP.pcx", "RocksDC.pcx", "RocksMore.pcx", - "RocksFont.pcx", - "RocksFont2.pcx", - "RocksFont3.pcx" + "RocksFontBig.pcx", + "RocksFontSmall.pcx", + "RocksFontMedium.pcx", + "RocksFontEM.pcx" }; static void InitSetup(void); @@ -382,9 +383,9 @@ void InitGfx() pix[PIX_DB_DOOR] = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH); pix[PIX_DB_FIELD] = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH); - pix[PIX_SMALLFONT] = LoadCustomImage(image_filename[PIX_SMALLFONT]); + pix[PIX_FONT_SMALL] = LoadCustomImage(image_filename[PIX_FONT_SMALL]); - InitFontInfo(NULL, NULL, pix[PIX_SMALLFONT]); + InitFontInfo(NULL, NULL, pix[PIX_FONT_SMALL], NULL); DrawInitText(WINDOW_TITLE_STRING, 20, FC_YELLOW); DrawInitText(WINDOW_SUBTITLE_STRING, 50, FC_RED); @@ -393,7 +394,7 @@ void InitGfx() for(i=0; i %d\n", image_files[GFX_BD_DIAMOND].parameter[GFXARG_NUM_FRAMES]); printf("W> %d\n", image_files[GFX_ROBOT_WHEEL].parameter[GFXARG_NUM_FRAMES]); diff --git a/src/libgame/setup.c b/src/libgame/setup.c index 943c063a..614bb613 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -408,7 +408,7 @@ char *getSetupFilename() static char *getCorrectedImageBasename(char *basename) { - char *result = basename; + char *basename_corrected = basename; #if defined(PLATFORM_MSDOS) if (program.filename_prefix != NULL) @@ -416,11 +416,25 @@ static char *getCorrectedImageBasename(char *basename) int prefix_len = strlen(program.filename_prefix); if (strncmp(basename, program.filename_prefix, prefix_len) == 0) - result = &basename[prefix_len]; + basename_corrected = &basename[prefix_len]; + + /* if corrected filename is still longer than standard MS-DOS filename + size (8 characters + 1 dot + 3 characters file extension), shorten + filename by writing file extension after 8th basename character */ + if (strlen(basename_corrected) > 8+1+3) + { + static char *msdos_filename = NULL; + + if (filename != NULL) + free(filename); + + filename = getStringCopy(basename_corrected); + strncpy(&filename[8], &basename[strlen(basename) - 1+3], 1+3 + 1); + } } #endif - return result; + return basename_corrected; } static boolean fileExists(char *filename) diff --git a/src/libgame/text.c b/src/libgame/text.c index 16381e49..a31c80f2 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -29,11 +29,12 @@ struct FontInfo font; /* ========================================================================= */ void InitFontInfo(Bitmap *bitmap_big, Bitmap *bitmap_medium, - Bitmap *bitmap_small) + Bitmap *bitmap_small, Bitmap *bitmap_tile) { font.bitmap_big = bitmap_big; font.bitmap_medium = bitmap_medium; font.bitmap_small = bitmap_small; + font.bitmap_tile = bitmap_tile; } int getFontWidth(int font_size, int font_type) @@ -118,16 +119,22 @@ void DrawTextExt(DrawBuffer *bitmap, int x, int y, font_width = getFontWidth(font_size, font_type); font_height = getFontHeight(font_size, font_type); - font_bitmap = (font_size == FS_BIG ? font.bitmap_big : - font_size == FS_MEDIUM ? font.bitmap_medium : + font_bitmap = (font_type == FC_SPECIAL2 ? font.bitmap_tile : + font_size == FS_BIG ? font.bitmap_big : + font_size == FS_MEDIUM ? font.bitmap_medium : + font_size == FS_SMALL ? font.bitmap_small : font.bitmap_small); - font_start = (font_type * (font_size == FS_BIG ? FONT1_YSIZE : - font_size == FS_MEDIUM ? FONT6_YSIZE : - FONT2_YSIZE) * - FONT_LINES_PER_FONT); + + if (font_type == FC_SPECIAL2) + font_start = (font_size == FS_BIG ? 0 : FONT1_YSIZE) * FONT_LINES_PER_FONT; + else + font_start = (font_type * (font_size == FS_BIG ? FONT1_YSIZE : + font_size == FS_MEDIUM ? FONT6_YSIZE : + FONT2_YSIZE) * + FONT_LINES_PER_FONT); if (font_type == FC_SPECIAL3) - font_start += (FONT4_YSIZE - FONT2_YSIZE) * FONT_LINES_PER_FONT; + font_start -= FONT2_YSIZE * FONT_LINES_PER_FONT; while (*text) { diff --git a/src/libgame/text.h b/src/libgame/text.h index f459e3fd..cd2f04d5 100644 --- a/src/libgame/text.h +++ b/src/libgame/text.h @@ -21,6 +21,7 @@ #define FS_SMALL 0 #define FS_BIG 1 #define FS_MEDIUM 2 +#define FS_TILE 3 /* font colors */ #define FC_RED 0 @@ -58,10 +59,11 @@ struct FontInfo Bitmap *bitmap_big; Bitmap *bitmap_medium; Bitmap *bitmap_small; + Bitmap *bitmap_tile; }; -void InitFontInfo(Bitmap *, Bitmap *, Bitmap *); +void InitFontInfo(Bitmap *, Bitmap *, Bitmap *, Bitmap *); int getFontWidth(int, int); int getFontHeight(int, int); void DrawInitText(char *, int, int); diff --git a/src/main.c b/src/main.c index 477ff242..1a9cf362 100644 --- a/src/main.c +++ b/src/main.c @@ -141,7 +141,7 @@ struct ConfigInfo image_config_suffix[] = { ".xpos", "0" }, { ".ypos", "0" }, { ".frames", "1" }, - { ".delay", "0" }, + { ".delay", "1" }, { ".pingpong", "0" }, { ".pingpong2", "0" }, { ".reverse", "0" }, @@ -338,53 +338,53 @@ struct ConfigInfo image_config[] = { "spaceship_right", "RocksElements.pcx" }, { "spaceship_right.xpos", "8" }, { "spaceship_right.ypos", "3" }, - { "spaceship_right.frames", "1" }, + { "spaceship_right.frames", "2" }, { "spaceship_up", "RocksElements.pcx" }, - { "spaceship_up.xpos", "9" }, + { "spaceship_up.xpos", "10" }, { "spaceship_up.ypos", "3" }, - { "spaceship_up.frames", "1" }, + { "spaceship_up.frames", "2" }, { "spaceship_left", "RocksElements.pcx" }, - { "spaceship_left.xpos", "10" }, + { "spaceship_left.xpos", "12" }, { "spaceship_left.ypos", "3" }, - { "spaceship_left.frames", "1" }, + { "spaceship_left.frames", "2" }, { "spaceship_down", "RocksElements.pcx" }, - { "spaceship_down.xpos", "11" }, + { "spaceship_down.xpos", "14" }, { "spaceship_down.ypos", "3" }, - { "spaceship_down.frames", "1" }, + { "spaceship_down.frames", "2" }, { "bug_right", "RocksElements.pcx" }, { "bug_right.xpos", "8" }, { "bug_right.ypos", "4" }, - { "bug_right.frames", "1" }, + { "bug_right.frames", "2" }, { "bug_up", "RocksElements.pcx" }, - { "bug_up.xpos", "9" }, + { "bug_up.xpos", "10" }, { "bug_up.ypos", "4" }, - { "bug_up.frames", "1" }, + { "bug_up.frames", "2" }, { "bug_left", "RocksElements.pcx" }, - { "bug_left.xpos", "10" }, + { "bug_left.xpos", "12" }, { "bug_left.ypos", "4" }, - { "bug_left.frames", "1" }, + { "bug_left.frames", "2" }, { "bug_down", "RocksElements.pcx" }, - { "bug_down.xpos", "11" }, + { "bug_down.xpos", "14" }, { "bug_down.ypos", "4" }, - { "bug_down.frames", "1" }, + { "bug_down.frames", "2" }, { "pacman_right", "RocksElements.pcx" }, { "pacman_right.xpos", "8" }, { "pacman_right.ypos", "5" }, - { "pacman_right.frames", "1" }, + { "pacman_right.frames", "2" }, { "pacman_up", "RocksElements.pcx" }, - { "pacman_up.xpos", "9" }, + { "pacman_up.xpos", "10" }, { "pacman_up.ypos", "5" }, - { "pacman_up.frames", "1" }, + { "pacman_up.frames", "2" }, { "pacman_left", "RocksElements.pcx" }, - { "pacman_left.xpos", "10" }, + { "pacman_left.xpos", "12" }, { "pacman_left.ypos", "5" }, - { "pacman_left.frames", "1" }, + { "pacman_left.frames", "2" }, { "pacman_down", "RocksElements.pcx" }, - { "pacman_down.xpos", "11" }, + { "pacman_down.xpos", "14" }, { "pacman_down.ypos", "5" }, - { "pacman_down.frames", "1" }, + { "pacman_down.frames", "2" }, { "explosion", "RocksElements.pcx" }, { "explosion.xpos", "0" }, @@ -1147,6 +1147,7 @@ struct ConfigInfo image_config[] = { "satellite.moving.xpos", "8" }, { "satellite.moving.ypos", "9" }, { "satellite.moving.frames", "8" }, + { "satellite.moving.delay", "2" }, { "acid.splashing_left", "RocksHeroes.pcx" }, { "acid.splashing_left.xpos", "8" }, @@ -2757,6 +2758,7 @@ struct ElementInfo element_info[MAX_ELEMENTS] = }; struct GraphicInfo graphic_info[MAX_GRAPHICS]; +struct NewGraphicInfo new_graphic_info[NUM_IMAGE_FILES]; /* ========================================================================= */ diff --git a/src/main.h b/src/main.h index d4ab4235..4cc24174 100644 --- a/src/main.h +++ b/src/main.h @@ -165,15 +165,16 @@ #define PIX_SP 5 #define PIX_DC 6 #define PIX_MORE 7 -#define PIX_BIGFONT 8 -#define PIX_SMALLFONT 9 -#define PIX_MEDIUMFONT 10 +#define PIX_FONT_BIG 8 +#define PIX_FONT_SMALL 9 +#define PIX_FONT_MEDIUM 10 +#define PIX_FONT_EM 11 /* Bitmaps without graphic file */ -#define PIX_DB_DOOR 11 -#define PIX_DB_FIELD 12 +#define PIX_DB_DOOR 12 +#define PIX_DB_FIELD 13 -#define NUM_PICTURES 11 -#define NUM_BITMAPS 12 +#define NUM_PICTURES 12 +#define NUM_BITMAPS 14 /* boundaries of arrays etc. */ #define MAX_LEVEL_NAME_LEN 32 @@ -349,12 +350,19 @@ struct ElementInfo }; struct GraphicInfo +{ + Bitmap *bitmap; + int src_x, src_y; +}; + +struct NewGraphicInfo { Bitmap *bitmap; int src_x, src_y; int anim_frames; int anim_delay; int anim_mode; + boolean anim_vertical; }; extern GC tile_clip_gc; @@ -416,6 +424,7 @@ extern struct GameInfo game; extern struct GlobalInfo global; extern struct ElementInfo element_info[]; extern struct GraphicInfo graphic_info[]; +extern struct NewGraphicInfo new_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; @@ -465,6 +474,11 @@ extern struct FileInfo *image_files, *sound_files; #define MINI_GFX_PER_LINE 16 #define MICRO_GFX_PER_LINE 16 +#define MINI_FONT_STARTX 0 +#define MINI_FONT_STARTY 128 +#define MICRO_FONT_STARTX 408 +#define MICRO_FONT_STARTY 128 + #define HEROES_PER_LINE 16 #define MINI_SP_STARTX 0 @@ -966,24 +980,24 @@ extern struct FileInfo *image_files, *sound_files; #define GFX_DYNAMIT 49 #define GFX_FLIEGER 56 #define GFX_FLIEGER_RIGHT 56 -#define GFX_FLIEGER_UP 57 -#define GFX_FLIEGER_LEFT 58 -#define GFX_FLIEGER_DOWN 59 +#define GFX_FLIEGER_UP 58 +#define GFX_FLIEGER_LEFT 60 +#define GFX_FLIEGER_DOWN 62 /* Zeile 4 (64) */ #define GFX_EXPLOSION 64 #define GFX_KAEFER 72 #define GFX_KAEFER_RIGHT 72 -#define GFX_KAEFER_UP 73 -#define GFX_KAEFER_LEFT 74 -#define GFX_KAEFER_DOWN 75 +#define GFX_KAEFER_UP 74 +#define GFX_KAEFER_LEFT 76 +#define GFX_KAEFER_DOWN 78 /* Zeile 5 (80) */ #define GFX_MAMPFER 80 #define GFX_ROBOT 84 #define GFX_PACMAN 88 #define GFX_PACMAN_RIGHT 88 -#define GFX_PACMAN_UP 89 -#define GFX_PACMAN_LEFT 90 -#define GFX_PACMAN_DOWN 91 +#define GFX_PACMAN_UP 90 +#define GFX_PACMAN_LEFT 92 +#define GFX_PACMAN_DOWN 94 /* Zeile 6 (96) */ #define GFX_ABLENK 96 #define GFX_ABLENK_EIN GFX_ABLENK @@ -1470,465 +1484,463 @@ extern struct FileInfo *image_files, *sound_files; #define GFXARG_VERTICAL 7 /* values for image configuration */ -#if 0 -#define GFX_EMPTY_SPACE 0 -#define GFX_SAND 1 -#define GFX_SAND_CRUMBLED 2 -#define GFX_QUICKSAND_EMPTY 3 -#define GFX_QUICKSAND_FULL 4 -#define GFX_STEELWALL 5 -#define GFX_WALL 6 -#define GFX_WALL_CRUMBLED 7 -#define GFX_EMERALD 8 -#define GFX_EMERALD_FALLING 9 -#define GFX_DIAMOND 10 -#define GFX_DIAMOND_FALLING 11 -#define GFX_ROCK 12 -#define GFX_ROCK_FALLING 13 -#define GFX_ROCK_PUSHING 14 -#define GFX_ACIDPOOL_TOPLEFT 15 -#define GFX_ACIDPOOL_TOPRIGHT 16 -#define GFX_ACIDPOOL_BOTTOMLEFT 17 -#define GFX_ACIDPOOL_BOTTOM 18 -#define GFX_ACIDPOOL_BOTTOMRIGHT 19 -#define GFX_ACID 20 -#define GFX_KEY1 21 -#define GFX_KEY2 22 -#define GFX_KEY3 23 -#define GFX_KEY4 24 -#define GFX_GAMEOFLIFE 25 -#define GFX_BIOMAZE 26 -#define GFX_BOMB 27 -#define GFX_NUT 28 -#define GFX_NUT_CRACKING 29 -#define GFX_GATE1 30 -#define GFX_GATE2 31 -#define GFX_GATE3 32 -#define GFX_GATE4 33 -#define GFX_GATE1_GRAY 34 -#define GFX_GATE2_GRAY 35 -#define GFX_GATE3_GRAY 36 -#define GFX_GATE4_GRAY 37 -#define GFX_DYNAMITE 38 -#define GFX_DYNAMITE_BURNING 39 -#define GFX_SPACESHIP_RIGHT 40 -#define GFX_SPACESHIP_UP 41 -#define GFX_SPACESHIP_LEFT 42 -#define GFX_SPACESHIP_DOWN 43 -#define GFX_BUG_RIGHT 44 -#define GFX_BUG_UP 45 -#define GFX_BUG_LEFT 46 -#define GFX_BUG_DOWN 47 -#define GFX_PACMAN_RIGHT 48 -#define GFX_PACMAN_UP 49 -#define GFX_PACMAN_LEFT 50 -#define GFX_PACMAN_DOWN 51 -#define GFX_EXPLOSION 52 -#define GFX_YAMYAM 53 -#define GFX_ROBOT 54 -#define GFX_ROBOT_WHEEL 55 -#define GFX_AMOEBA_DROP 56 -#define GFX_AMOEBA_GROWING 57 -#define GFX_AMOEBA 58 -#define GFX_AMOEBA_DEAD 59 -#define GFX_LAMP_OFF 60 -#define GFX_LAMP_ON 61 -#define GFX_TIME_ORB_FULL 62 -#define GFX_TIME_ORB_EMPTY 63 -#define GFX_BD_AMOEBA 64 -#define GFX_SOKOBAN_OBJECT 65 -#define GFX_SOKOBAN_FIELD_EMPTY 66 -#define GFX_SOKOBAN_FIELD_FULL 67 -#define GFX_MAGIC_WALL 68 -#define GFX_MAGIC_WALL_RUNNING 69 -#define GFX_BD_MAGIC_WALL 70 -#define GFX_BD_MAGIC_WALL_RUNNING 71 -#define GFX_WALL_EMERALD 72 -#define GFX_WALL_DIAMOND 73 -#define GFX_WALL_EMERALD_RED 74 -#define GFX_WALL_EMERALD_PURPLE 75 -#define GFX_WALL_EMERALD_YELLOW 76 -#define GFX_WALL_BD_DIAMOND 77 -#define GFX_EMERALD_RED 78 -#define GFX_EMERALD_RED_FALLING 79 -#define GFX_EMERALD_PURPLE 80 -#define GFX_EMERALD_PURPLE_FALLING 81 -#define GFX_EMERALD_YELLOW 82 -#define GFX_EMERALD_YELLOW_FALLING 83 -#define GFX_WALL_GROWING_XY 84 -#define GFX_WALL_GROWING_X 85 -#define GFX_WALL_GROWING_Y 86 -#define GFX_DYNABOMB_XL 87 -#define GFX_BLACK_ORB 88 -#define GFX_SPEED_PILL 89 -#define GFX_BD_DIAMOND 90 -#define GFX_BD_DIAMOND_FALLING 91 -#define GFX_WALL_GROWING_RIGHT 92 -#define GFX_WALL_GROWING_LEFT 93 -#define GFX_EXIT_CLOSED 94 -#define GFX_EXIT_OPENING 95 -#define GFX_EXIT_OPEN 96 -#define GFX_DARK_YAMYAM 97 -#define GFX_DYNABOMB_BURNING 98 -#define GFX_DYNABOMB_NR 99 -#define GFX_DYNABOMB_SZ 100 -#define GFX_ARROW_LEFT 101 -#define GFX_ARROW_RIGHT 102 -#define GFX_ARROW_UP 103 -#define GFX_ARROW_DOWN 104 -#define GFX_BD_BUTTERFLY_RIGHT 105 -#define GFX_BD_BUTTERFLY_UP 106 -#define GFX_BD_BUTTERFLY_LEFT 107 -#define GFX_BD_BUTTERFLY_DOWN 108 -#define GFX_BD_BUTTERFLY_MOVING 109 -#define GFX_BD_FIREFLY_RIGHT 110 -#define GFX_BD_FIREFLY_UP 111 -#define GFX_BD_FIREFLY_LEFT 112 -#define GFX_BD_FIREFLY_DOWN 113 -#define GFX_BD_FIREFLY_MOVING 114 -#define GFX_STEELWALL_TOPLEFT 115 -#define GFX_STEELWALL_TOPRIGHT 116 -#define GFX_STEELWALL_BOTTOMLEFT 117 -#define GFX_STEELWALL_BOTTOMRIGHT 118 -#define GFX_STEELWALL_HORIZONTAL 119 -#define GFX_INVISIBLE_STEELWALL_TOPLEFT 120 -#define GFX_INVISIBLE_STEELWALL_TOPRIGHT 121 -#define GFX_INVISIBLE_STEELWALL_BOTTOMLEFT 122 -#define GFX_INVISIBLE_STEELWALL_BOTTOMRIGHT 123 -#define GFX_INVISIBLE_STEELWALL_HORIZONTAL 124 -#define GFX_PLAYER1_DOWN 125 -#define GFX_PLAYER1_DOWN_MOVING 126 -#define GFX_PLAYER1_DOWN_DIGGING 127 -#define GFX_PLAYER1_UP 128 -#define GFX_PLAYER1_UP_MOVING 129 -#define GFX_PLAYER1_UP_DIGGING 130 -#define GFX_PLAYER1_LEFT 131 -#define GFX_PLAYER1_LEFT_MOVING 132 -#define GFX_PLAYER1_LEFT_DIGGING 133 -#define GFX_PLAYER1_LEFT_PUSHING 134 -#define GFX_PLAYER1_RIGHT 135 -#define GFX_PLAYER1_RIGHT_MOVING 136 -#define GFX_PLAYER1_RIGHT_DIGGING 137 -#define GFX_PLAYER1_RIGHT_PUSHING 138 -#define GFX_PLAYER2_DOWN 139 -#define GFX_PLAYER2_DOWN_MOVING 140 -#define GFX_PLAYER2_DOWN_DIGGING 141 -#define GFX_PLAYER2_UP 142 -#define GFX_PLAYER2_UP_MOVING 143 -#define GFX_PLAYER2_UP_DIGGING 144 -#define GFX_PLAYER2_LEFT 145 -#define GFX_PLAYER2_LEFT_MOVING 146 -#define GFX_PLAYER2_LEFT_DIGGING 147 -#define GFX_PLAYER2_LEFT_PUSHING 148 -#define GFX_PLAYER2_RIGHT 149 -#define GFX_PLAYER2_RIGHT_MOVING 150 -#define GFX_PLAYER2_RIGHT_DIGGING 151 -#define GFX_PLAYER2_RIGHT_PUSHING 152 -#define GFX_PLAYER3_DOWN 153 -#define GFX_PLAYER3_DOWN_MOVING 154 -#define GFX_PLAYER3_DOWN_DIGGING 155 -#define GFX_PLAYER3_UP 156 -#define GFX_PLAYER3_UP_MOVING 157 -#define GFX_PLAYER3_UP_DIGGING 158 -#define GFX_PLAYER3_LEFT 159 -#define GFX_PLAYER3_LEFT_MOVING 160 -#define GFX_PLAYER3_LEFT_DIGGING 161 -#define GFX_PLAYER3_LEFT_PUSHING 162 -#define GFX_PLAYER3_RIGHT 163 -#define GFX_PLAYER3_RIGHT_MOVING 164 -#define GFX_PLAYER3_RIGHT_DIGGING 165 -#define GFX_PLAYER3_RIGHT_PUSHING 166 -#define GFX_PLAYER4_DOWN 167 -#define GFX_PLAYER4_DOWN_MOVING 168 -#define GFX_PLAYER4_DOWN_DIGGING 169 -#define GFX_PLAYER4_UP 170 -#define GFX_PLAYER4_UP_MOVING 171 -#define GFX_PLAYER4_UP_DIGGING 172 -#define GFX_PLAYER4_LEFT 173 -#define GFX_PLAYER4_LEFT_MOVING 174 -#define GFX_PLAYER4_LEFT_DIGGING 175 -#define GFX_PLAYER4_LEFT_PUSHING 176 -#define GFX_PLAYER4_RIGHT 177 -#define GFX_PLAYER4_RIGHT_MOVING 178 -#define GFX_PLAYER4_RIGHT_DIGGING 179 -#define GFX_PLAYER4_RIGHT_PUSHING 180 -#define GFX_WALL_GROWING_DOWN 181 -#define GFX_WALL_GROWING_UP 182 -#define GFX_SHIELD_PASSIVE_ACTIVATED 183 -#define GFX_SHIELD_ACTIVE_ACTIVATED 184 -#define GFX_PIG_DOWN 185 -#define GFX_PIG_DOWN_MOVING 186 -#define GFX_PIG_DOWN_EATING 187 -#define GFX_PIG_UP 188 -#define GFX_PIG_UP_MOVING 189 -#define GFX_PIG_UP_EATING 190 -#define GFX_PIG_LEFT 191 -#define GFX_PIG_LEFT_MOVING 192 -#define GFX_PIG_LEFT_EATING 193 -#define GFX_PIG_RIGHT 194 -#define GFX_PIG_RIGHT_MOVING 195 -#define GFX_PIG_RIGHT_EATING 196 -#define GFX_DRAGON_DOWN 197 -#define GFX_DRAGON_DOWN_MOVING 198 -#define GFX_DRAGON_DOWN_ATTACKING 199 -#define GFX_DRAGON_UP 200 -#define GFX_DRAGON_UP_MOVING 201 -#define GFX_DRAGON_UP_ATTACKING 202 -#define GFX_DRAGON_LEFT 203 -#define GFX_DRAGON_LEFT_MOVING 204 -#define GFX_DRAGON_LEFT_ATTACKING 205 -#define GFX_DRAGON_RIGHT 206 -#define GFX_DRAGON_RIGHT_MOVING 207 -#define GFX_DRAGON_RIGHT_ATTACKING 208 -#define GFX_MOLE_DOWN 209 -#define GFX_MOLE_DOWN_MOVING 210 -#define GFX_MOLE_DOWN_DIGGING 211 -#define GFX_MOLE_UP 212 -#define GFX_MOLE_UP_MOVING 213 -#define GFX_MOLE_UP_DIGGING 214 -#define GFX_MOLE_LEFT 215 -#define GFX_MOLE_LEFT_MOVING 216 -#define GFX_MOLE_LEFT_DIGGING 217 -#define GFX_MOLE_RIGHT 218 -#define GFX_MOLE_RIGHT_MOVING 219 -#define GFX_MOLE_RIGHT_DIGGING 220 -#define GFX_PENGUIN_DOWN 221 -#define GFX_PENGUIN_DOWN_MOVING 222 -#define GFX_PENGUIN_UP 223 -#define GFX_PENGUIN_UP_MOVING 224 -#define GFX_PENGUIN_LEFT 225 -#define GFX_PENGUIN_LEFT_MOVING 226 -#define GFX_PENGUIN_RIGHT 227 -#define GFX_PENGUIN_RIGHT_MOVING 228 -#define GFX_SATELLITE 229 -#define GFX_SATELLITE_MOVING 230 -#define GFX_ACID_SPLASHING_LEFT 231 -#define GFX_ACID_SPLASHING_RIGHT 232 -#define GFX_SPARKLING_BLUE 233 -#define GFX_SPARKLING_WHITE 234 -#define GFX_FLAMES_LEFT1 235 -#define GFX_FLAMES_LEFT2 236 -#define GFX_FLAMES_LEFT3 237 -#define GFX_FLAMES_RIGHT1 238 -#define GFX_FLAMES_RIGHT2 239 -#define GFX_FLAMES_RIGHT3 240 -#define GFX_FLAMES_UP1 241 -#define GFX_FLAMES_UP2 242 -#define GFX_FLAMES_UP3 243 -#define GFX_FLAMES_DOWN1 244 -#define GFX_FLAMES_DOWN2 245 -#define GFX_FLAMES_DOWN3 246 -#define GFX_SP_EMPTY_SPACE 247 -#define GFX_SP_ZONK 248 -#define GFX_SP_ZONK_FALLING 249 -#define GFX_SP_ZONK_PUSHING 250 -#define GFX_SP_BASE 251 -#define GFX_SP_MURPHY 252 -#define GFX_SP_MURPHY_LEFT 253 -#define GFX_SP_MURPHY_LEFT_MOVING 254 -#define GFX_SP_MURPHY_LEFT_DIGGING 255 -#define GFX_SP_MURPHY_LEFT_PUSHING 256 -#define GFX_SP_MURPHY_LEFT_SNAPPING 257 -#define GFX_SP_MURPHY_RIGHT 258 -#define GFX_SP_MURPHY_RIGHT_MOVING 259 -#define GFX_SP_MURPHY_RIGHT_DIGGING 260 -#define GFX_SP_MURPHY_RIGHT_PUSHING 261 -#define GFX_SP_MURPHY_RIGHT_SNAPPING 262 -#define GFX_SP_MURPHY_UP 263 -#define GFX_SP_MURPHY_UP_SNAPPING 264 -#define GFX_SP_MURPHY_DOWN 265 -#define GFX_SP_MURPHY_DOWN_SNAPPING 266 -#define GFX_SP_MURPHY_CLONE 267 -#define GFX_SP_INFOTRON 268 -#define GFX_SP_INFOTRON_FALLING 269 -#define GFX_SP_CHIP_SINGLE 270 -#define GFX_SP_CHIP_LEFT 271 -#define GFX_SP_CHIP_RIGHT 272 -#define GFX_SP_CHIP_UPPER 273 -#define GFX_SP_CHIP_LOWER 274 -#define GFX_SP_HARD_GRAY 275 -#define GFX_SP_HARD_GREEN 276 -#define GFX_SP_HARD_BLUE 277 -#define GFX_SP_HARD_RED 278 -#define GFX_SP_HARD_YELLOW 279 -#define GFX_SP_EXIT_CLOSED 280 -#define GFX_SP_EXIT_OPEN 281 -#define GFX_SP_DISK_ORANGE 282 -#define GFX_SP_DISK_ORANGE_FALLING 283 -#define GFX_SP_DISK_ORANGE_PUSHING 284 -#define GFX_SP_DISK_YELLOW 285 -#define GFX_SP_DISK_YELLOW_PUSHING 286 -#define GFX_SP_DISK_RED 287 -#define GFX_SP_DISK_RED_COLLECTING 288 -#define GFX_SP_PORT1_RIGHT 289 -#define GFX_SP_PORT1_DOWN 290 -#define GFX_SP_PORT1_LEFT 291 -#define GFX_SP_PORT1_UP 292 -#define GFX_SP_PORT2_RIGHT 293 -#define GFX_SP_PORT2_DOWN 294 -#define GFX_SP_PORT2_LEFT 295 -#define GFX_SP_PORT2_UP 296 -#define GFX_SP_PORT_X 297 -#define GFX_SP_PORT_Y 298 -#define GFX_SP_PORT_XY 299 -#define GFX_SP_SNIKSNAK 300 -#define GFX_SP_SNIKSNAK_LEFT 301 -#define GFX_SP_SNIKSNAK_LEFT_MOVING 302 -#define GFX_SP_SNIKSNAK_RIGHT 303 -#define GFX_SP_SNIKSNAK_RIGHT_MOVING 304 -#define GFX_SP_SNIKSNAK_UP 305 -#define GFX_SP_SNIKSNAK_UP_MOVING 306 -#define GFX_SP_SNIKSNAK_DOWN 307 -#define GFX_SP_SNIKSNAK_DOWN_MOVING 308 -#define GFX_SP_ELECTRON 309 -#define GFX_SP_ELECTRON_MOVING 310 -#define GFX_SP_TERMINAL 311 -#define GFX_SP_TERMINAL_RUNNING 312 -#define GFX_SP_TERMINAL_ACTIVE 313 -#define GFX_SP_TERMINAL_ACTIVE_RUNNING 314 -#define GFX_SP_BUGGY_BASE 315 -#define GFX_SP_BUGGY_BASE_ACTIVATING 316 -#define GFX_SP_HARD_BASE1 317 -#define GFX_SP_HARD_BASE2 318 -#define GFX_SP_HARD_BASE3 319 -#define GFX_SP_HARD_BASE4 320 -#define GFX_SP_HARD_BASE5 321 -#define GFX_SP_HARD_BASE6 322 -#define GFX_INVISIBLE_STEELWALL 323 -#define GFX_INVISIBLE_STEELWALL_ON 324 -#define GFX_INVISIBLE_SAND 325 -#define GFX_INVISIBLE_SAND_ON 326 -#define GFX_INVISIBLE_WALL 327 -#define GFX_INVISIBLE_WALL_ON 328 -#define GFX_EM_KEY1 329 -#define GFX_EM_KEY2 330 -#define GFX_EM_KEY3 331 -#define GFX_EM_KEY4 332 -#define GFX_EM_GATE1 333 -#define GFX_EM_GATE2 334 -#define GFX_EM_GATE3 335 -#define GFX_EM_GATE4 336 -#define GFX_EM_GATE1_GRAY 337 -#define GFX_EM_GATE2_GRAY 338 -#define GFX_EM_GATE3_GRAY 339 -#define GFX_EM_GATE4_GRAY 340 -#define GFX_SP_EXPLOSION 341 -#define GFX_SP_EXPLOSION_INFOTRON 342 -#define GFX_CONVEYOR_BELT1_MIDDLE 343 -#define GFX_CONVEYOR_BELT1_MIDDLE_RUNNING 344 -#define GFX_CONVEYOR_BELT1_LEFT 345 -#define GFX_CONVEYOR_BELT1_LEFT_RUNNING 346 -#define GFX_CONVEYOR_BELT1_RIGHT 347 -#define GFX_CONVEYOR_BELT1_RIGHT_RUNNING 348 -#define GFX_CONVEYOR_BELT1_SWITCH_LEFT 349 -#define GFX_CONVEYOR_BELT1_SWITCH_MIDDLE 350 -#define GFX_CONVEYOR_BELT1_SWITCH_RIGHT 351 -#define GFX_CONVEYOR_BELT2_MIDDLE 352 -#define GFX_CONVEYOR_BELT2_MIDDLE_RUNNING 353 -#define GFX_CONVEYOR_BELT2_LEFT 354 -#define GFX_CONVEYOR_BELT2_LEFT_RUNNING 355 -#define GFX_CONVEYOR_BELT2_RIGHT 356 -#define GFX_CONVEYOR_BELT2_RIGHT_RUNNING 357 -#define GFX_CONVEYOR_BELT2_SWITCH_LEFT 358 -#define GFX_CONVEYOR_BELT2_SWITCH_MIDDLE 359 -#define GFX_CONVEYOR_BELT2_SWITCH_RIGHT 360 -#define GFX_CONVEYOR_BELT3_MIDDLE 361 -#define GFX_CONVEYOR_BELT3_MIDDLE_RUNNING 362 -#define GFX_CONVEYOR_BELT3_LEFT 363 -#define GFX_CONVEYOR_BELT3_LEFT_RUNNING 364 -#define GFX_CONVEYOR_BELT3_RIGHT 365 -#define GFX_CONVEYOR_BELT3_RIGHT_RUNNING 366 -#define GFX_CONVEYOR_BELT3_SWITCH_LEFT 367 -#define GFX_CONVEYOR_BELT3_SWITCH_MIDDLE 368 -#define GFX_CONVEYOR_BELT3_SWITCH_RIGHT 369 -#define GFX_CONVEYOR_BELT4_MIDDLE 370 -#define GFX_CONVEYOR_BELT4_MIDDLE_RUNNING 371 -#define GFX_CONVEYOR_BELT4_LEFT 372 -#define GFX_CONVEYOR_BELT4_LEFT_RUNNING 373 -#define GFX_CONVEYOR_BELT4_RIGHT 374 -#define GFX_CONVEYOR_BELT4_RIGHT_RUNNING 375 -#define GFX_CONVEYOR_BELT4_SWITCH_LEFT 376 -#define GFX_CONVEYOR_BELT4_SWITCH_MIDDLE 377 -#define GFX_CONVEYOR_BELT4_SWITCH_RIGHT 378 -#define GFX_SWITCHGATE_SWITCH_UP 379 -#define GFX_SWITCHGATE_SWITCH_DOWN 380 -#define GFX_LIGHT_SWITCH_OFF 381 -#define GFX_LIGHT_SWITCH_ON 382 -#define GFX_TIMEGATE_WHEEL 383 -#define GFX_TIMEGATE_WHEEL_RUNNING 384 -#define GFX_ENVELOPE 385 -#define GFX_SIGN_EXCLAMATION 386 -#define GFX_SIGN_STOP 387 -#define GFX_LANDMINE 388 -#define GFX_STEELWALL_SLANTED 389 -#define GFX_EXTRA_TIME 390 -#define GFX_SHIELD_ACTIVE 391 -#define GFX_SHIELD_PASSIVE 392 -#define GFX_SWITCHGATE_CLOSED 393 -#define GFX_SWITCHGATE_OPENING 394 -#define GFX_SWITCHGATE_OPEN 395 -#define GFX_SWITCHGATE_CLOSING 396 -#define GFX_TIMEGATE_CLOSED 397 -#define GFX_TIMEGATE_OPENING 398 -#define GFX_TIMEGATE_OPEN 399 -#define GFX_TIMEGATE_CLOSING 400 -#define GFX_BALLOON 401 -#define GFX_BALLOON_MOVING 402 -#define GFX_BALLOON_WINDROSE_LEFT 403 -#define GFX_BALLOON_WINDROSE_RIGHT 404 -#define GFX_BALLOON_WINDROSE_UP 405 -#define GFX_BALLOON_WINDROSE_DOWN 406 -#define GFX_BALLOON_WINDROSE_ALL 407 -#define GFX_EMC_STEELWALL1 408 -#define GFX_EMC_STEELWALL2 409 -#define GFX_EMC_STEELWALL3 410 -#define GFX_EMC_STEELWALL4 411 -#define GFX_EMC_WALL_PILLAR_UPPER 412 -#define GFX_EMC_WALL_PILLAR_MIDDLE 413 -#define GFX_EMC_WALL_PILLAR_LOWER 414 -#define GFX_EMC_WALL4 415 -#define GFX_EMC_WALL5 416 -#define GFX_EMC_WALL6 417 -#define GFX_EMC_WALL7 418 -#define GFX_EMC_WALL8 419 -#define GFX_ARROW_BLUE_LEFT 420 -#define GFX_ARROW_BLUE_RIGHT 421 -#define GFX_ARROW_BLUE_UP 422 -#define GFX_ARROW_BLUE_DOWN 423 -#define GFX_ARROW_RED_LEFT 424 -#define GFX_ARROW_RED_RIGHT 425 -#define GFX_ARROW_RED_UP 426 -#define GFX_ARROW_RED_DOWN 427 -#define GFX_SCROLLBAR_BLUE 428 -#define GFX_SCROLLBAR_RED 429 -#define GFX_SCROLLBAR_GREEN 430 -#define GFX_SCROLLBAR_YELLOW 431 -#define GFX_PEARL 432 -#define GFX_PEARL_BREAKING 433 -#define GFX_CRYSTAL 434 -#define GFX_WALL_PEARL 435 -#define GFX_WALL_CRYSTAL 436 -#define GFX_SPRING 437 -#define GFX_TUBE_RIGHT_DOWN 438 -#define GFX_TUBE_HORIZONTAL_DOWN 439 -#define GFX_TUBE_LEFT_DOWN 440 -#define GFX_TUBE_HORIZONTAL 441 -#define GFX_TUBE_VERTICAL_RIGHT 442 -#define GFX_TUBE_ALL 443 -#define GFX_TUBE_VERTICAL_LEFT 444 -#define GFX_TUBE_VERTICAL 445 -#define GFX_TUBE_RIGHT_UP 446 -#define GFX_TUBE_HORIZONTAL_UP 447 -#define GFX_TUBE_LEFT_UP 448 -#define GFX_TRAP_INACTIVE 449 -#define GFX_TRAP_ACTIVE 450 -#define GFX_TRAP_ACTIVATING 451 -#define GFX_BD_WALL 452 -#define GFX_BD_ROCK 453 -#define GFX_BD_ROCK_FALLING 454 -#define GFX_BD_ROCK_PUSHING 455 -#define GFX_DX_BOMB 456 -#endif +#define IMG_EMPTY_SPACE 0 +#define IMG_SAND 1 +#define IMG_SAND_CRUMBLED 2 +#define IMG_QUICKSAND_EMPTY 3 +#define IMG_QUICKSAND_FULL 4 +#define IMG_STEELWALL 5 +#define IMG_WALL 6 +#define IMG_WALL_CRUMBLED 7 +#define IMG_EMERALD 8 +#define IMG_EMERALD_FALLING 9 +#define IMG_DIAMOND 10 +#define IMG_DIAMOND_FALLING 11 +#define IMG_ROCK 12 +#define IMG_ROCK_FALLING 13 +#define IMG_ROCK_PUSHING 14 +#define IMG_ACIDPOOL_TOPLEFT 15 +#define IMG_ACIDPOOL_TOPRIGHT 16 +#define IMG_ACIDPOOL_BOTTOMLEFT 17 +#define IMG_ACIDPOOL_BOTTOM 18 +#define IMG_ACIDPOOL_BOTTOMRIGHT 19 +#define IMG_ACID 20 +#define IMG_KEY1 21 +#define IMG_KEY2 22 +#define IMG_KEY3 23 +#define IMG_KEY4 24 +#define IMG_GAMEOFLIFE 25 +#define IMG_BIOMAZE 26 +#define IMG_BOMB 27 +#define IMG_NUT 28 +#define IMG_NUT_CRACKING 29 +#define IMG_GATE1 30 +#define IMG_GATE2 31 +#define IMG_GATE3 32 +#define IMG_GATE4 33 +#define IMG_GATE1_GRAY 34 +#define IMG_GATE2_GRAY 35 +#define IMG_GATE3_GRAY 36 +#define IMG_GATE4_GRAY 37 +#define IMG_DYNAMITE 38 +#define IMG_DYNAMITE_BURNING 39 +#define IMG_SPACESHIP_RIGHT 40 +#define IMG_SPACESHIP_UP 41 +#define IMG_SPACESHIP_LEFT 42 +#define IMG_SPACESHIP_DOWN 43 +#define IMG_BUG_RIGHT 44 +#define IMG_BUG_UP 45 +#define IMG_BUG_LEFT 46 +#define IMG_BUG_DOWN 47 +#define IMG_PACMAN_RIGHT 48 +#define IMG_PACMAN_UP 49 +#define IMG_PACMAN_LEFT 50 +#define IMG_PACMAN_DOWN 51 +#define IMG_EXPLOSION 52 +#define IMG_YAMYAM 53 +#define IMG_ROBOT 54 +#define IMG_ROBOT_WHEEL 55 +#define IMG_AMOEBA_DROP 56 +#define IMG_AMOEBA_GROWING 57 +#define IMG_AMOEBA 58 +#define IMG_AMOEBA_DEAD 59 +#define IMG_LAMP_OFF 60 +#define IMG_LAMP_ON 61 +#define IMG_TIME_ORB_FULL 62 +#define IMG_TIME_ORB_EMPTY 63 +#define IMG_BD_AMOEBA 64 +#define IMG_SOKOBAN_OBJECT 65 +#define IMG_SOKOBAN_FIELD_EMPTY 66 +#define IMG_SOKOBAN_FIELD_FULL 67 +#define IMG_MAGIC_WALL 68 +#define IMG_MAGIC_WALL_RUNNING 69 +#define IMG_BD_MAGIC_WALL 70 +#define IMG_BD_MAGIC_WALL_RUNNING 71 +#define IMG_WALL_EMERALD 72 +#define IMG_WALL_DIAMOND 73 +#define IMG_WALL_EMERALD_RED 74 +#define IMG_WALL_EMERALD_PURPLE 75 +#define IMG_WALL_EMERALD_YELLOW 76 +#define IMG_WALL_BD_DIAMOND 77 +#define IMG_EMERALD_RED 78 +#define IMG_EMERALD_RED_FALLING 79 +#define IMG_EMERALD_PURPLE 80 +#define IMG_EMERALD_PURPLE_FALLING 81 +#define IMG_EMERALD_YELLOW 82 +#define IMG_EMERALD_YELLOW_FALLING 83 +#define IMG_WALL_GROWING_XY 84 +#define IMG_WALL_GROWING_X 85 +#define IMG_WALL_GROWING_Y 86 +#define IMG_DYNABOMB_XL 87 +#define IMG_BLACK_ORB 88 +#define IMG_SPEED_PILL 89 +#define IMG_BD_DIAMOND 90 +#define IMG_BD_DIAMOND_FALLING 91 +#define IMG_WALL_GROWING_RIGHT 92 +#define IMG_WALL_GROWING_LEFT 93 +#define IMG_EXIT_CLOSED 94 +#define IMG_EXIT_OPENING 95 +#define IMG_EXIT_OPEN 96 +#define IMG_DARK_YAMYAM 97 +#define IMG_DYNABOMB_BURNING 98 +#define IMG_DYNABOMB_NR 99 +#define IMG_DYNABOMB_SZ 100 +#define IMG_ARROW_LEFT 101 +#define IMG_ARROW_RIGHT 102 +#define IMG_ARROW_UP 103 +#define IMG_ARROW_DOWN 104 +#define IMG_BD_BUTTERFLY_RIGHT 105 +#define IMG_BD_BUTTERFLY_UP 106 +#define IMG_BD_BUTTERFLY_LEFT 107 +#define IMG_BD_BUTTERFLY_DOWN 108 +#define IMG_BD_BUTTERFLY_MOVING 109 +#define IMG_BD_FIREFLY_RIGHT 110 +#define IMG_BD_FIREFLY_UP 111 +#define IMG_BD_FIREFLY_LEFT 112 +#define IMG_BD_FIREFLY_DOWN 113 +#define IMG_BD_FIREFLY_MOVING 114 +#define IMG_STEELWALL_TOPLEFT 115 +#define IMG_STEELWALL_TOPRIGHT 116 +#define IMG_STEELWALL_BOTTOMLEFT 117 +#define IMG_STEELWALL_BOTTOMRIGHT 118 +#define IMG_STEELWALL_HORIZONTAL 119 +#define IMG_INVISIBLE_STEELWALL_TOPLEFT 120 +#define IMG_INVISIBLE_STEELWALL_TOPRIGHT 121 +#define IMG_INVISIBLE_STEELWALL_BOTTOMLEFT 122 +#define IMG_INVISIBLE_STEELWALL_BOTTOMRIGHT 123 +#define IMG_INVISIBLE_STEELWALL_HORIZONTAL 124 +#define IMG_PLAYER1_DOWN 125 +#define IMG_PLAYER1_DOWN_MOVING 126 +#define IMG_PLAYER1_DOWN_DIGGING 127 +#define IMG_PLAYER1_UP 128 +#define IMG_PLAYER1_UP_MOVING 129 +#define IMG_PLAYER1_UP_DIGGING 130 +#define IMG_PLAYER1_LEFT 131 +#define IMG_PLAYER1_LEFT_MOVING 132 +#define IMG_PLAYER1_LEFT_DIGGING 133 +#define IMG_PLAYER1_LEFT_PUSHING 134 +#define IMG_PLAYER1_RIGHT 135 +#define IMG_PLAYER1_RIGHT_MOVING 136 +#define IMG_PLAYER1_RIGHT_DIGGING 137 +#define IMG_PLAYER1_RIGHT_PUSHING 138 +#define IMG_PLAYER2_DOWN 139 +#define IMG_PLAYER2_DOWN_MOVING 140 +#define IMG_PLAYER2_DOWN_DIGGING 141 +#define IMG_PLAYER2_UP 142 +#define IMG_PLAYER2_UP_MOVING 143 +#define IMG_PLAYER2_UP_DIGGING 144 +#define IMG_PLAYER2_LEFT 145 +#define IMG_PLAYER2_LEFT_MOVING 146 +#define IMG_PLAYER2_LEFT_DIGGING 147 +#define IMG_PLAYER2_LEFT_PUSHING 148 +#define IMG_PLAYER2_RIGHT 149 +#define IMG_PLAYER2_RIGHT_MOVING 150 +#define IMG_PLAYER2_RIGHT_DIGGING 151 +#define IMG_PLAYER2_RIGHT_PUSHING 152 +#define IMG_PLAYER3_DOWN 153 +#define IMG_PLAYER3_DOWN_MOVING 154 +#define IMG_PLAYER3_DOWN_DIGGING 155 +#define IMG_PLAYER3_UP 156 +#define IMG_PLAYER3_UP_MOVING 157 +#define IMG_PLAYER3_UP_DIGGING 158 +#define IMG_PLAYER3_LEFT 159 +#define IMG_PLAYER3_LEFT_MOVING 160 +#define IMG_PLAYER3_LEFT_DIGGING 161 +#define IMG_PLAYER3_LEFT_PUSHING 162 +#define IMG_PLAYER3_RIGHT 163 +#define IMG_PLAYER3_RIGHT_MOVING 164 +#define IMG_PLAYER3_RIGHT_DIGGING 165 +#define IMG_PLAYER3_RIGHT_PUSHING 166 +#define IMG_PLAYER4_DOWN 167 +#define IMG_PLAYER4_DOWN_MOVING 168 +#define IMG_PLAYER4_DOWN_DIGGING 169 +#define IMG_PLAYER4_UP 170 +#define IMG_PLAYER4_UP_MOVING 171 +#define IMG_PLAYER4_UP_DIGGING 172 +#define IMG_PLAYER4_LEFT 173 +#define IMG_PLAYER4_LEFT_MOVING 174 +#define IMG_PLAYER4_LEFT_DIGGING 175 +#define IMG_PLAYER4_LEFT_PUSHING 176 +#define IMG_PLAYER4_RIGHT 177 +#define IMG_PLAYER4_RIGHT_MOVING 178 +#define IMG_PLAYER4_RIGHT_DIGGING 179 +#define IMG_PLAYER4_RIGHT_PUSHING 180 +#define IMG_WALL_GROWING_DOWN 181 +#define IMG_WALL_GROWING_UP 182 +#define IMG_SHIELD_PASSIVE_ACTIVATED 183 +#define IMG_SHIELD_ACTIVE_ACTIVATED 184 +#define IMG_PIG_DOWN 185 +#define IMG_PIG_DOWN_MOVING 186 +#define IMG_PIG_DOWN_EATING 187 +#define IMG_PIG_UP 188 +#define IMG_PIG_UP_MOVING 189 +#define IMG_PIG_UP_EATING 190 +#define IMG_PIG_LEFT 191 +#define IMG_PIG_LEFT_MOVING 192 +#define IMG_PIG_LEFT_EATING 193 +#define IMG_PIG_RIGHT 194 +#define IMG_PIG_RIGHT_MOVING 195 +#define IMG_PIG_RIGHT_EATING 196 +#define IMG_DRAGON_DOWN 197 +#define IMG_DRAGON_DOWN_MOVING 198 +#define IMG_DRAGON_DOWN_ATTACKING 199 +#define IMG_DRAGON_UP 200 +#define IMG_DRAGON_UP_MOVING 201 +#define IMG_DRAGON_UP_ATTACKING 202 +#define IMG_DRAGON_LEFT 203 +#define IMG_DRAGON_LEFT_MOVING 204 +#define IMG_DRAGON_LEFT_ATTACKING 205 +#define IMG_DRAGON_RIGHT 206 +#define IMG_DRAGON_RIGHT_MOVING 207 +#define IMG_DRAGON_RIGHT_ATTACKING 208 +#define IMG_MOLE_DOWN 209 +#define IMG_MOLE_DOWN_MOVING 210 +#define IMG_MOLE_DOWN_DIGGING 211 +#define IMG_MOLE_UP 212 +#define IMG_MOLE_UP_MOVING 213 +#define IMG_MOLE_UP_DIGGING 214 +#define IMG_MOLE_LEFT 215 +#define IMG_MOLE_LEFT_MOVING 216 +#define IMG_MOLE_LEFT_DIGGING 217 +#define IMG_MOLE_RIGHT 218 +#define IMG_MOLE_RIGHT_MOVING 219 +#define IMG_MOLE_RIGHT_DIGGING 220 +#define IMG_PENGUIN_DOWN 221 +#define IMG_PENGUIN_DOWN_MOVING 222 +#define IMG_PENGUIN_UP 223 +#define IMG_PENGUIN_UP_MOVING 224 +#define IMG_PENGUIN_LEFT 225 +#define IMG_PENGUIN_LEFT_MOVING 226 +#define IMG_PENGUIN_RIGHT 227 +#define IMG_PENGUIN_RIGHT_MOVING 228 +#define IMG_SATELLITE 229 +#define IMG_SATELLITE_MOVING 230 +#define IMG_ACID_SPLASHING_LEFT 231 +#define IMG_ACID_SPLASHING_RIGHT 232 +#define IMG_SPARKLING_BLUE 233 +#define IMG_SPARKLING_WHITE 234 +#define IMG_FLAMES_LEFT1 235 +#define IMG_FLAMES_LEFT2 236 +#define IMG_FLAMES_LEFT3 237 +#define IMG_FLAMES_RIGHT1 238 +#define IMG_FLAMES_RIGHT2 239 +#define IMG_FLAMES_RIGHT3 240 +#define IMG_FLAMES_UP1 241 +#define IMG_FLAMES_UP2 242 +#define IMG_FLAMES_UP3 243 +#define IMG_FLAMES_DOWN1 244 +#define IMG_FLAMES_DOWN2 245 +#define IMG_FLAMES_DOWN3 246 +#define IMG_SP_EMPTY_SPACE 247 +#define IMG_SP_ZONK 248 +#define IMG_SP_ZONK_FALLING 249 +#define IMG_SP_ZONK_PUSHING 250 +#define IMG_SP_BASE 251 +#define IMG_SP_MURPHY 252 +#define IMG_SP_MURPHY_LEFT 253 +#define IMG_SP_MURPHY_LEFT_MOVING 254 +#define IMG_SP_MURPHY_LEFT_DIGGING 255 +#define IMG_SP_MURPHY_LEFT_PUSHING 256 +#define IMG_SP_MURPHY_LEFT_SNAPPING 257 +#define IMG_SP_MURPHY_RIGHT 258 +#define IMG_SP_MURPHY_RIGHT_MOVING 259 +#define IMG_SP_MURPHY_RIGHT_DIGGING 260 +#define IMG_SP_MURPHY_RIGHT_PUSHING 261 +#define IMG_SP_MURPHY_RIGHT_SNAPPING 262 +#define IMG_SP_MURPHY_UP 263 +#define IMG_SP_MURPHY_UP_SNAPPING 264 +#define IMG_SP_MURPHY_DOWN 265 +#define IMG_SP_MURPHY_DOWN_SNAPPING 266 +#define IMG_SP_MURPHY_CLONE 267 +#define IMG_SP_INFOTRON 268 +#define IMG_SP_INFOTRON_FALLING 269 +#define IMG_SP_CHIP_SINGLE 270 +#define IMG_SP_CHIP_LEFT 271 +#define IMG_SP_CHIP_RIGHT 272 +#define IMG_SP_CHIP_UPPER 273 +#define IMG_SP_CHIP_LOWER 274 +#define IMG_SP_HARD_GRAY 275 +#define IMG_SP_HARD_GREEN 276 +#define IMG_SP_HARD_BLUE 277 +#define IMG_SP_HARD_RED 278 +#define IMG_SP_HARD_YELLOW 279 +#define IMG_SP_EXIT_CLOSED 280 +#define IMG_SP_EXIT_OPEN 281 +#define IMG_SP_DISK_ORANGE 282 +#define IMG_SP_DISK_ORANGE_FALLING 283 +#define IMG_SP_DISK_ORANGE_PUSHING 284 +#define IMG_SP_DISK_YELLOW 285 +#define IMG_SP_DISK_YELLOW_PUSHING 286 +#define IMG_SP_DISK_RED 287 +#define IMG_SP_DISK_RED_COLLECTING 288 +#define IMG_SP_PORT1_RIGHT 289 +#define IMG_SP_PORT1_DOWN 290 +#define IMG_SP_PORT1_LEFT 291 +#define IMG_SP_PORT1_UP 292 +#define IMG_SP_PORT2_RIGHT 293 +#define IMG_SP_PORT2_DOWN 294 +#define IMG_SP_PORT2_LEFT 295 +#define IMG_SP_PORT2_UP 296 +#define IMG_SP_PORT_X 297 +#define IMG_SP_PORT_Y 298 +#define IMG_SP_PORT_XY 299 +#define IMG_SP_SNIKSNAK 300 +#define IMG_SP_SNIKSNAK_LEFT 301 +#define IMG_SP_SNIKSNAK_LEFT_MOVING 302 +#define IMG_SP_SNIKSNAK_RIGHT 303 +#define IMG_SP_SNIKSNAK_RIGHT_MOVING 304 +#define IMG_SP_SNIKSNAK_UP 305 +#define IMG_SP_SNIKSNAK_UP_MOVING 306 +#define IMG_SP_SNIKSNAK_DOWN 307 +#define IMG_SP_SNIKSNAK_DOWN_MOVING 308 +#define IMG_SP_ELECTRON 309 +#define IMG_SP_ELECTRON_MOVING 310 +#define IMG_SP_TERMINAL 311 +#define IMG_SP_TERMINAL_RUNNING 312 +#define IMG_SP_TERMINAL_ACTIVE 313 +#define IMG_SP_TERMINAL_ACTIVE_RUNNING 314 +#define IMG_SP_BUGGY_BASE 315 +#define IMG_SP_BUGGY_BASE_ACTIVATING 316 +#define IMG_SP_HARD_BASE1 317 +#define IMG_SP_HARD_BASE2 318 +#define IMG_SP_HARD_BASE3 319 +#define IMG_SP_HARD_BASE4 320 +#define IMG_SP_HARD_BASE5 321 +#define IMG_SP_HARD_BASE6 322 +#define IMG_INVISIBLE_STEELWALL 323 +#define IMG_INVISIBLE_STEELWALL_ON 324 +#define IMG_INVISIBLE_SAND 325 +#define IMG_INVISIBLE_SAND_ON 326 +#define IMG_INVISIBLE_WALL 327 +#define IMG_INVISIBLE_WALL_ON 328 +#define IMG_EM_KEY1 329 +#define IMG_EM_KEY2 330 +#define IMG_EM_KEY3 331 +#define IMG_EM_KEY4 332 +#define IMG_EM_GATE1 333 +#define IMG_EM_GATE2 334 +#define IMG_EM_GATE3 335 +#define IMG_EM_GATE4 336 +#define IMG_EM_GATE1_GRAY 337 +#define IMG_EM_GATE2_GRAY 338 +#define IMG_EM_GATE3_GRAY 339 +#define IMG_EM_GATE4_GRAY 340 +#define IMG_SP_EXPLOSION 341 +#define IMG_SP_EXPLOSION_INFOTRON 342 +#define IMG_CONVEYOR_BELT1_MIDDLE 343 +#define IMG_CONVEYOR_BELT1_MIDDLE_RUNNING 344 +#define IMG_CONVEYOR_BELT1_LEFT 345 +#define IMG_CONVEYOR_BELT1_LEFT_RUNNING 346 +#define IMG_CONVEYOR_BELT1_RIGHT 347 +#define IMG_CONVEYOR_BELT1_RIGHT_RUNNING 348 +#define IMG_CONVEYOR_BELT1_SWITCH_LEFT 349 +#define IMG_CONVEYOR_BELT1_SWITCH_MIDDLE 350 +#define IMG_CONVEYOR_BELT1_SWITCH_RIGHT 351 +#define IMG_CONVEYOR_BELT2_MIDDLE 352 +#define IMG_CONVEYOR_BELT2_MIDDLE_RUNNING 353 +#define IMG_CONVEYOR_BELT2_LEFT 354 +#define IMG_CONVEYOR_BELT2_LEFT_RUNNING 355 +#define IMG_CONVEYOR_BELT2_RIGHT 356 +#define IMG_CONVEYOR_BELT2_RIGHT_RUNNING 357 +#define IMG_CONVEYOR_BELT2_SWITCH_LEFT 358 +#define IMG_CONVEYOR_BELT2_SWITCH_MIDDLE 359 +#define IMG_CONVEYOR_BELT2_SWITCH_RIGHT 360 +#define IMG_CONVEYOR_BELT3_MIDDLE 361 +#define IMG_CONVEYOR_BELT3_MIDDLE_RUNNING 362 +#define IMG_CONVEYOR_BELT3_LEFT 363 +#define IMG_CONVEYOR_BELT3_LEFT_RUNNING 364 +#define IMG_CONVEYOR_BELT3_RIGHT 365 +#define IMG_CONVEYOR_BELT3_RIGHT_RUNNING 366 +#define IMG_CONVEYOR_BELT3_SWITCH_LEFT 367 +#define IMG_CONVEYOR_BELT3_SWITCH_MIDDLE 368 +#define IMG_CONVEYOR_BELT3_SWITCH_RIGHT 369 +#define IMG_CONVEYOR_BELT4_MIDDLE 370 +#define IMG_CONVEYOR_BELT4_MIDDLE_RUNNING 371 +#define IMG_CONVEYOR_BELT4_LEFT 372 +#define IMG_CONVEYOR_BELT4_LEFT_RUNNING 373 +#define IMG_CONVEYOR_BELT4_RIGHT 374 +#define IMG_CONVEYOR_BELT4_RIGHT_RUNNING 375 +#define IMG_CONVEYOR_BELT4_SWITCH_LEFT 376 +#define IMG_CONVEYOR_BELT4_SWITCH_MIDDLE 377 +#define IMG_CONVEYOR_BELT4_SWITCH_RIGHT 378 +#define IMG_SWITCHGATE_SWITCH_UP 379 +#define IMG_SWITCHGATE_SWITCH_DOWN 380 +#define IMG_LIGHT_SWITCH_OFF 381 +#define IMG_LIGHT_SWITCH_ON 382 +#define IMG_TIMEGATE_WHEEL 383 +#define IMG_TIMEGATE_WHEEL_RUNNING 384 +#define IMG_ENVELOPE 385 +#define IMG_SIGN_EXCLAMATION 386 +#define IMG_SIGN_STOP 387 +#define IMG_LANDMINE 388 +#define IMG_STEELWALL_SLANTED 389 +#define IMG_EXTRA_TIME 390 +#define IMG_SHIELD_ACTIVE 391 +#define IMG_SHIELD_PASSIVE 392 +#define IMG_SWITCHGATE_CLOSED 393 +#define IMG_SWITCHGATE_OPENING 394 +#define IMG_SWITCHGATE_OPEN 395 +#define IMG_SWITCHGATE_CLOSING 396 +#define IMG_TIMEGATE_CLOSED 397 +#define IMG_TIMEGATE_OPENING 398 +#define IMG_TIMEGATE_OPEN 399 +#define IMG_TIMEGATE_CLOSING 400 +#define IMG_BALLOON 401 +#define IMG_BALLOON_MOVING 402 +#define IMG_BALLOON_WINDROSE_LEFT 403 +#define IMG_BALLOON_WINDROSE_RIGHT 404 +#define IMG_BALLOON_WINDROSE_UP 405 +#define IMG_BALLOON_WINDROSE_DOWN 406 +#define IMG_BALLOON_WINDROSE_ALL 407 +#define IMG_EMC_STEELWALL1 408 +#define IMG_EMC_STEELWALL2 409 +#define IMG_EMC_STEELWALL3 410 +#define IMG_EMC_STEELWALL4 411 +#define IMG_EMC_WALL_PILLAR_UPPER 412 +#define IMG_EMC_WALL_PILLAR_MIDDLE 413 +#define IMG_EMC_WALL_PILLAR_LOWER 414 +#define IMG_EMC_WALL4 415 +#define IMG_EMC_WALL5 416 +#define IMG_EMC_WALL6 417 +#define IMG_EMC_WALL7 418 +#define IMG_EMC_WALL8 419 +#define IMG_ARROW_BLUE_LEFT 420 +#define IMG_ARROW_BLUE_RIGHT 421 +#define IMG_ARROW_BLUE_UP 422 +#define IMG_ARROW_BLUE_DOWN 423 +#define IMG_ARROW_RED_LEFT 424 +#define IMG_ARROW_RED_RIGHT 425 +#define IMG_ARROW_RED_UP 426 +#define IMG_ARROW_RED_DOWN 427 +#define IMG_SCROLLBAR_BLUE 428 +#define IMG_SCROLLBAR_RED 429 +#define IMG_SCROLLBAR_GREEN 430 +#define IMG_SCROLLBAR_YELLOW 431 +#define IMG_PEARL 432 +#define IMG_PEARL_BREAKING 433 +#define IMG_CRYSTAL 434 +#define IMG_WALL_PEARL 435 +#define IMG_WALL_CRYSTAL 436 +#define IMG_SPRING 437 +#define IMG_TUBE_RIGHT_DOWN 438 +#define IMG_TUBE_HORIZONTAL_DOWN 439 +#define IMG_TUBE_LEFT_DOWN 440 +#define IMG_TUBE_HORIZONTAL 441 +#define IMG_TUBE_VERTICAL_RIGHT 442 +#define IMG_TUBE_ALL 443 +#define IMG_TUBE_VERTICAL_LEFT 444 +#define IMG_TUBE_VERTICAL 445 +#define IMG_TUBE_RIGHT_UP 446 +#define IMG_TUBE_HORIZONTAL_UP 447 +#define IMG_TUBE_LEFT_UP 448 +#define IMG_TRAP_INACTIVE 449 +#define IMG_TRAP_ACTIVE 450 +#define IMG_TRAP_ACTIVATING 451 +#define IMG_BD_WALL 452 +#define IMG_BD_ROCK 453 +#define IMG_BD_ROCK_FALLING 454 +#define IMG_BD_ROCK_PUSHING 455 +#define IMG_DX_BOMB 456 #define NUM_IMAGE_FILES 457 @@ -2169,7 +2181,7 @@ extern struct FileInfo *image_files, *sound_files; /* for DrawGraphicAnimation() [tools.c] and AnimateToon() [cartoons.c] */ #define ANIM_NORMAL 0 -#define ANIM_OSCILLATE 1 +#define ANIM_PINGPONG 1 #define ANIM_REVERSE 2 /* values for game_emulation */ diff --git a/src/tools.c b/src/tools.c index 267668bc..0552e4af 100644 --- a/src/tools.c +++ b/src/tools.c @@ -556,7 +556,7 @@ void DrawPlayer(struct PlayerInfo *player) else graphic = GFX_MURPHY_GO_LEFT; - graphic += getGraphicAnimationPhase(3, 2, ANIM_OSCILLATE); + graphic += getGraphicAnimationPhase(3, 2, ANIM_PINGPONG); } if (player->MovDir == MV_LEFT || player->MovDir == MV_RIGHT) @@ -598,7 +598,7 @@ void DrawPlayer(struct PlayerInfo *player) GFX2_SHIELD_PASSIVE); DrawGraphicAnimationShiftedThruMask(sx, sy, sxx, syy, graphic, - 3, 8, ANIM_OSCILLATE); + 3, 8, ANIM_PINGPONG); } if (player->Pushing && player->GfxPos) @@ -690,7 +690,7 @@ static int getGraphicAnimationPhase(int frames, int delay, int mode) { int phase; - if (mode == ANIM_OSCILLATE) + if (mode == ANIM_PINGPONG) { int max_anim_frames = 2 * frames - 2; @@ -703,7 +703,30 @@ static int getGraphicAnimationPhase(int frames, int delay, int mode) if (mode == ANIM_REVERSE) phase = -phase; - return(phase); + return phase; +} + +static int getNewGraphicAnimationFrame(int graphic) +{ + int frames = new_graphic_info[graphic].anim_frames; + int delay = new_graphic_info[graphic].anim_delay; + int mode = new_graphic_info[graphic].anim_mode; + int phase; + + if (mode == ANIM_PINGPONG) + { + int max_anim_frames = 2 * frames - 2; + + phase = (FrameCounter % (delay * max_anim_frames)) / delay; + phase = (phase < frames ? phase : max_anim_frames - phase); + } + else + phase = (FrameCounter % (delay * frames)) / delay; + + if (mode == ANIM_REVERSE) + phase = (frames - 1) - phase; + + return phase; } void DrawGraphicAnimationExt(int x, int y, int graphic, @@ -720,12 +743,32 @@ void DrawGraphicAnimationExt(int x, int y, int graphic, } } +void DrawNewGraphicAnimationExt(int x, int y, int graphic, int mask_mode) +{ + int delay = new_graphic_info[graphic].anim_delay; + + if (!(FrameCounter % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getNewGraphicAnimationFrame(graphic); + + if (mask_mode == USE_MASKING) + DrawNewGraphicThruMask(SCREENX(x), SCREENY(y), graphic, frame); + else + DrawNewGraphic(SCREENX(x), SCREENY(y), graphic, frame); + } +} + void DrawGraphicAnimation(int x, int y, int graphic, int frames, int delay, int mode) { DrawGraphicAnimationExt(x, y, graphic, frames, delay, mode, NO_MASKING); } +void DrawNewGraphicAnimation(int x, int y, int graphic) +{ + DrawNewGraphicAnimationExt(x, y, graphic, NO_MASKING); +} + void DrawGraphicAnimationThruMask(int x, int y, int graphic, int frames, int delay, int mode) { @@ -790,10 +833,9 @@ void getGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) else if (graphic >= GFX_START_ROCKSFONT && graphic <= GFX_END_ROCKSFONT) { graphic -= GFX_START_ROCKSFONT; - *bitmap = pix[PIX_BIGFONT]; + *bitmap = pix[PIX_FONT_EM]; *x = (graphic % FONT_CHARS_PER_LINE) * TILEX; - *y = ((graphic / FONT_CHARS_PER_LINE) * TILEY + - FC_SPECIAL1 * FONT_LINES_PER_FONT * TILEY); + *y = (graphic / FONT_CHARS_PER_LINE) * TILEY; } else { @@ -806,16 +848,32 @@ void getGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) void DrawGraphic(int x, int y, int graphic) { #if DEBUG - if (!IN_SCR_FIELD(x,y)) + if (!IN_SCR_FIELD(x, y)) { - printf("DrawGraphic(): x = %d, y = %d, graphic = %d\n",x,y,graphic); + printf("DrawGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic); printf("DrawGraphic(): This should never happen!\n"); return; } #endif - DrawGraphicExt(drawto_field, FX + x*TILEX, FY + y*TILEY, graphic); - MarkTileDirty(x,y); + DrawGraphicExt(drawto_field, FX + x * TILEX, FY + y * TILEY, graphic); + MarkTileDirty(x, y); +} + +void DrawNewGraphic(int x, int y, int graphic, int frame) +{ +#if DEBUG + if (!IN_SCR_FIELD(x, y)) + { + printf("DrawNewGraphic(): x = %d, y = %d, graphic = %d\n", x, y, graphic); + printf("DrawNewGraphic(): This should never happen!\n"); + return; + } +#endif + + DrawNewGraphicExt(drawto_field, FX + x * TILEX, FY + y * TILEY, + graphic, frame); + MarkTileDirty(x, y); } void DrawGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic) @@ -827,10 +885,25 @@ void DrawGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic) BlitBitmap(src_bitmap, dst_bitmap, src_x, src_y, TILEX, TILEY, x, y); } +void DrawNewGraphicExt(DrawBuffer *dst_bitmap, int x, int y, int graphic, + int frame) +{ + Bitmap *src_bitmap = new_graphic_info[graphic].bitmap; + int src_x = new_graphic_info[graphic].src_x; + int src_y = new_graphic_info[graphic].src_y; + + if (new_graphic_info[graphic].anim_vertical) + src_y += frame * TILEY; + else + src_x += frame * TILEX; + + BlitBitmap(src_bitmap, dst_bitmap, src_x, src_y, TILEX, TILEY, x, y); +} + void DrawGraphicThruMask(int x, int y, int graphic) { #if DEBUG - if (!IN_SCR_FIELD(x,y)) + if (!IN_SCR_FIELD(x, y)) { printf("DrawGraphicThruMask(): x = %d,y = %d, graphic = %d\n",x,y,graphic); printf("DrawGraphicThruMask(): This should never happen!\n"); @@ -838,8 +911,24 @@ void DrawGraphicThruMask(int x, int y, int graphic) } #endif - DrawGraphicThruMaskExt(drawto_field, FX + x*TILEX, FY + y*TILEY, graphic); - MarkTileDirty(x,y); + DrawGraphicThruMaskExt(drawto_field, FX + x * TILEX, FY + y *TILEY, graphic); + MarkTileDirty(x, y); +} + +void DrawNewGraphicThruMask(int x, int y, int graphic, int frame) +{ +#if DEBUG + if (!IN_SCR_FIELD(x, y)) + { + printf("DrawGraphicThruMask(): x = %d,y = %d, graphic = %d\n",x,y,graphic); + printf("DrawGraphicThruMask(): This should never happen!\n"); + return; + } +#endif + + DrawNewGraphicThruMaskExt(drawto_field, FX + x * TILEX, FY + y *TILEY, + graphic, frame); + MarkTileDirty(x, y); } void DrawGraphicThruMaskExt(DrawBuffer *d, int dest_x, int dest_y, int graphic) @@ -870,12 +959,29 @@ void DrawGraphicThruMaskExt(DrawBuffer *d, int dest_x, int dest_y, int graphic) #endif #endif - SetClipOrigin(src_bitmap, drawing_gc, dest_x-src_x, dest_y-src_y); + SetClipOrigin(src_bitmap, drawing_gc, dest_x - src_x, dest_y - src_y); BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dest_x, dest_y); } } +void DrawNewGraphicThruMaskExt(DrawBuffer *d, int dest_x, int dest_y, + int graphic, int frame) +{ + Bitmap *src_bitmap = new_graphic_info[graphic].bitmap; + GC drawing_gc = src_bitmap->stored_clip_gc; + int src_x = new_graphic_info[graphic].src_x; + int src_y = new_graphic_info[graphic].src_y; + + if (new_graphic_info[graphic].anim_vertical) + src_y += frame * TILEY; + else + src_x += frame * TILEX; + + SetClipOrigin(src_bitmap, drawing_gc, dest_x - src_x, dest_y - src_y); + BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dest_x, dest_y); +} + void DrawMiniGraphic(int x, int y, int graphic) { DrawMiniGraphicExt(drawto, SX + x*MINI_TILEX, SY + y*MINI_TILEY, graphic); @@ -915,10 +1021,9 @@ void getMiniGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y) else if (graphic >= GFX_START_ROCKSFONT && graphic <= GFX_END_ROCKSFONT) { graphic -= GFX_START_ROCKSFONT; - *bitmap = pix[PIX_SMALLFONT]; - *x = (graphic % FONT_CHARS_PER_LINE) * FONT4_XSIZE; - *y = ((graphic / FONT_CHARS_PER_LINE) * FONT4_YSIZE + - FC_SPECIAL2 * FONT2_YSIZE * FONT_LINES_PER_FONT); + *bitmap = pix[PIX_FONT_EM]; + *x = MINI_FONT_STARTX + (graphic % FONT_CHARS_PER_LINE) * FONT4_XSIZE; + *y = MINI_FONT_STARTY + (graphic / FONT_CHARS_PER_LINE) * FONT4_YSIZE; } else { @@ -1082,14 +1187,14 @@ void DrawScreenElementExt(int x, int y, int dx, int dy, int element, if (element == EL_PACMAN || element == EL_KAEFER || element == EL_FLIEGER) { - graphic += 4 * !phase2; + graphic += 1 * !phase2; if (dir == MV_UP) - graphic += 1; + graphic += 1 * 2; else if (dir == MV_LEFT) - graphic += 2; + graphic += 2 * 2; else if (dir == MV_DOWN) - graphic += 3; + graphic += 3 * 2; } else if (element == EL_SP_SNIKSNAK) { @@ -1574,6 +1679,14 @@ void DrawMicroElement(int xpos, int ypos, int element) MICRO_MORE_STARTY + (graphic / MICRO_MORE_PER_LINE)*MICRO_TILEY, MICRO_TILEX, MICRO_TILEY, xpos, ypos); } + else if (graphic >= GFX_CHAR_START && graphic <= GFX_CHAR_END) + { + graphic -= GFX_CHAR_START; + BlitBitmap(pix[PIX_FONT_EM], drawto, + MICRO_FONT_STARTX + (graphic % MICRO_GFX_PER_LINE)* MICRO_TILEX, + MICRO_FONT_STARTY + (graphic / MICRO_GFX_PER_LINE)* MICRO_TILEY, + MICRO_TILEX, MICRO_TILEY, xpos, ypos); + } else BlitBitmap(pix[PIX_ELEMENTS], drawto, MICRO_GFX_STARTX + (graphic % MICRO_GFX_PER_LINE) * MICRO_TILEX, diff --git a/src/tools.h b/src/tools.h index 82372ce9..2769015c 100644 --- a/src/tools.h +++ b/src/tools.h @@ -72,12 +72,17 @@ void DrawPlayerField(int, int); void DrawPlayer(struct PlayerInfo *); void DrawGraphicAnimationExt(int, int, int, int, int, int, int); void DrawGraphicAnimation(int, int, int, int, int, int); +void DrawNewGraphicAnimation(int, int, int); void DrawGraphicAnimationThruMask(int, int, int, int, int, int); void getGraphicSource(int, Bitmap **, int *, int *); void DrawGraphic(int, int, int); +void DrawNewGraphic(int, int, int, int); void DrawGraphicExt(DrawBuffer *, int, int, int); +void DrawNewGraphicExt(DrawBuffer *, int, int, int, int); void DrawGraphicThruMask(int, int, int); +void DrawNewGraphicThruMask(int, int, int, int); void DrawGraphicThruMaskExt(DrawBuffer *, int, int, int); +void DrawNewGraphicThruMaskExt(DrawBuffer *, int, int, int, int); void DrawMiniGraphic(int, int, int); void getMiniGraphicSource(int, Bitmap **, int *, int *); void DrawMiniGraphicExt(DrawBuffer *, int, int, int);