X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcartoons.c;h=eb43b98d309b5643c6c647f58ae73e5fd9d2db97;hb=7119b5d2e756b1ab23818ea39d19aece0563bab0;hp=0278ed6d946ea366d3916bf2d1f2bc1f29042f43;hpb=3fd727f8ab7628eaab0be7de31658d7d468d6c8d;p=rocksndiamonds.git diff --git a/src/cartoons.c b/src/cartoons.c index 0278ed6d..eb43b98d 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -17,7 +17,11 @@ /* values for toon definition */ +#if 0 #define NUM_TOONS 18 +#else +#define NUM_TOONS 6 +#endif #define DWARF_XSIZE 40 #define DWARF_YSIZE 48 @@ -53,8 +57,9 @@ struct ToonInfo toons[NUM_TOONS] = { +#if 0 { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, DWARF_XSIZE, DWARF_YSIZE, DWARF_X, DWARF_Y, DWARF_FRAMES, @@ -65,7 +70,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, DWARF_XSIZE, DWARF_YSIZE, DWARF_X, DWARF2_Y, DWARF_FRAMES, @@ -76,7 +81,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, JUMPER_XSIZE, JUMPER_YSIZE, JUMPER_X, JUMPER_Y, JUMPER_FRAMES, @@ -87,7 +92,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, CLOWN_XSIZE, CLOWN_YSIZE, CLOWN_X, CLOWN_Y, CLOWN_FRAMES, @@ -98,7 +103,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_ANY }, { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, BIRD_XSIZE, BIRD_YSIZE, BIRD1_X, BIRD1_Y, BIRD_FRAMES, @@ -109,7 +114,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_UPPER }, { - IMG_MENU_TOONS, + IMG_GLOBAL_TOONS, BIRD_XSIZE, BIRD_YSIZE, BIRD2_X, BIRD2_Y, BIRD_FRAMES, @@ -119,8 +124,20 @@ struct ToonInfo toons[NUM_TOONS] = ANIMDIR_LEFT, ANIMPOS_UPPER }, +#else { - IMG_PLAYER1_LEFT_MOVING, + IMG_TOON_1, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_RIGHT, + ANIMPOS_DOWN + }, + { + IMG_TOON_2, -1, -1, -1, -1, -1, @@ -131,7 +148,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_PLAYER1_RIGHT_MOVING, + IMG_TOON_3, -1, -1, -1, -1, -1, @@ -142,7 +159,43 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_PENGUIN_LEFT_MOVING, + IMG_TOON_4, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_UP, + ANIMPOS_ANY + }, + { + IMG_TOON_5, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_RIGHT, + ANIMPOS_UPPER + }, + { + IMG_TOON_6, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_LEFT, + ANIMPOS_UPPER + }, +#endif + +#if 0 + { + IMG_PLAYER1_MOVING_LEFT, -1, -1, -1, -1, -1, @@ -153,7 +206,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_PENGUIN_RIGHT_MOVING, + IMG_PLAYER1_MOVING_RIGHT, -1, -1, -1, -1, -1, @@ -164,7 +217,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_MOLE_LEFT_MOVING, + IMG_PENGUIN_MOVING_LEFT, -1, -1, -1, -1, -1, @@ -175,7 +228,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_MOLE_RIGHT_MOVING, + IMG_PENGUIN_MOVING_RIGHT, -1, -1, -1, -1, -1, @@ -186,7 +239,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_PIG_LEFT_MOVING, + IMG_MOLE_MOVING_LEFT, -1, -1, -1, -1, -1, @@ -197,7 +250,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_PIG_RIGHT_MOVING, + IMG_MOLE_MOVING_RIGHT, -1, -1, -1, -1, -1, @@ -208,7 +261,7 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_DRAGON_LEFT_MOVING, + IMG_PIG_MOVING_LEFT, -1, -1, -1, -1, -1, @@ -219,7 +272,29 @@ struct ToonInfo toons[NUM_TOONS] = ANIMPOS_DOWN }, { - IMG_DRAGON_RIGHT_MOVING, + IMG_PIG_MOVING_RIGHT, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_RIGHT, + ANIMPOS_DOWN + }, + { + IMG_DRAGON_MOVING_LEFT, + -1, -1, + -1, -1, + -1, + -1, + -1, + -1, + ANIMDIR_LEFT, + ANIMPOS_DOWN + }, + { + IMG_DRAGON_MOVING_RIGHT, -1, -1, -1, -1, -1, @@ -251,6 +326,8 @@ struct ToonInfo toons[NUM_TOONS] = ANIMDIR_RIGHT, ANIMPOS_ANY }, +#endif + }; static void PrepareBackbuffer() @@ -297,34 +374,21 @@ void InitToons() { int graphic = toons[i].graphic; - toons[i].bitmap = new_graphic_info[graphic].bitmap; - - if (toons[i].src_x == -1 && toons[i].src_y == -1) - { - int anim_frames = new_graphic_info[graphic].anim_frames; - int anim_delay = new_graphic_info[graphic].anim_delay; - int anim_mode = new_graphic_info[graphic].anim_mode; - int start_frame = new_graphic_info[graphic].anim_start_frame; + toons[i].bitmap = graphic_info[graphic].bitmap; - toons[i].src_x = new_graphic_info[graphic].src_x; - toons[i].src_y = new_graphic_info[graphic].src_y; + toons[i].src_x = graphic_info[graphic].src_x; + toons[i].src_y = graphic_info[graphic].src_y; - toons[i].width = TILEX; - toons[i].height = TILEY; + toons[i].width = graphic_info[graphic].width; + toons[i].height = graphic_info[graphic].height; - toons[i].anim_frames = anim_frames; - toons[i].anim_delay = anim_delay; - toons[i].anim_mode = anim_mode; - toons[i].start_frame = start_frame; + toons[i].anim_frames = graphic_info[graphic].anim_frames; + toons[i].anim_delay = graphic_info[graphic].anim_delay; + toons[i].anim_mode = graphic_info[graphic].anim_mode; + toons[i].anim_start_frame = graphic_info[graphic].anim_start_frame; - toons[i].move_delay = 1; - toons[i].stepsize = TILEX / 8; - } - else - { - toons[i].anim_delay = 1; /* no delay between frames */ - toons[i].start_frame = 0; /* always start with first */ - } + toons[i].step_offset = graphic_info[graphic].step_offset; + toons[i].step_delay = graphic_info[graphic].step_delay; } InitToonScreen(bitmap_db_door,