1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-2006 Artsoft Entertainment *
6 * Detmolder Strasse 189 *
9 * e-mail: info@artsoft.org *
10 *----------------------------------------------------------*
12 ***********************************************************/
19 /* values for toon definition */
20 #define MAX_NUM_TOONS 20
22 static struct ToonInfo toons[MAX_NUM_TOONS];
24 static void PrepareBackbuffer()
26 if (game_status == GAME_MODE_PLAYING &&
27 level.game_engine_type == GAME_ENGINE_TYPE_EM)
29 BlitScreenToBitmap_EM(backbuffer);
34 if (setup.soft_scrolling && game_status == GAME_MODE_PLAYING)
38 fx += (ScreenMovDir & (MV_LEFT|MV_RIGHT) ? ScreenGfxPos : 0);
39 fy += (ScreenMovDir & (MV_UP|MV_DOWN) ? ScreenGfxPos : 0);
41 BlitBitmap(fieldbuffer, backbuffer, fx, fy, SXSIZE, SYSIZE, SX, SY);
45 boolean ToonNeedsRedraw()
52 int num_toons = MAX_NUM_TOONS;
55 if (global.num_toons >= 0 && global.num_toons < MAX_NUM_TOONS)
56 num_toons = global.num_toons;
58 for (i = 0; i < num_toons; i++)
60 int graphic = IMG_TOON_1 + i;
61 struct FileInfo *image = getImageListEntryFromImageID(graphic);
63 toons[i].bitmap = graphic_info[graphic].bitmap;
65 toons[i].src_x = graphic_info[graphic].src_x;
66 toons[i].src_y = graphic_info[graphic].src_y;
68 toons[i].width = graphic_info[graphic].width;
69 toons[i].height = graphic_info[graphic].height;
71 toons[i].anim_frames = graphic_info[graphic].anim_frames;
72 toons[i].anim_delay = graphic_info[graphic].anim_delay;
73 toons[i].anim_mode = graphic_info[graphic].anim_mode;
74 toons[i].anim_start_frame = graphic_info[graphic].anim_start_frame;
76 toons[i].step_offset = graphic_info[graphic].step_offset;
77 toons[i].step_delay = graphic_info[graphic].step_delay;
79 toons[i].direction = image->parameter[GFX_ARG_DIRECTION];
80 toons[i].position = image->parameter[GFX_ARG_POSITION];
84 InitToonScreen(bitmap_db_toons,
86 InitToonScreen(bitmap_db_door,
88 BackToFront, PrepareBackbuffer, ToonNeedsRedraw,
90 REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE,