1 // ============================================================================
2 // Rocks'n'Diamonds - McDuffin Strikes Back!
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
17 /* values for toon definition */
18 #define MAX_NUM_TOONS 20
20 static struct ToonInfo toons[MAX_NUM_TOONS];
22 static void PrepareBackbuffer()
24 if (game_status != GAME_MODE_PLAYING)
27 BlitScreenToBitmap(backbuffer);
30 boolean ToonNeedsRedraw()
37 int num_toons = MAX_NUM_TOONS;
40 if (global.num_toons >= 0 && global.num_toons < MAX_NUM_TOONS)
41 num_toons = global.num_toons;
43 for (i = 0; i < num_toons; i++)
45 int graphic = IMG_TOON_1 + i;
46 struct FileInfo *image = getImageListEntryFromImageID(graphic);
48 toons[i].bitmap = graphic_info[graphic].bitmap;
50 toons[i].src_x = graphic_info[graphic].src_x;
51 toons[i].src_y = graphic_info[graphic].src_y;
53 toons[i].width = graphic_info[graphic].width;
54 toons[i].height = graphic_info[graphic].height;
56 toons[i].anim_frames = graphic_info[graphic].anim_frames;
57 toons[i].anim_delay = graphic_info[graphic].anim_delay;
58 toons[i].anim_mode = graphic_info[graphic].anim_mode;
59 toons[i].anim_start_frame = graphic_info[graphic].anim_start_frame;
61 toons[i].step_offset = graphic_info[graphic].step_offset;
62 toons[i].step_delay = graphic_info[graphic].step_delay;
64 toons[i].direction = image->parameter[GFX_ARG_DIRECTION];
65 toons[i].position = image->parameter[GFX_ARG_POSITION];
68 InitToonScreen(bitmap_db_toons,
69 BackToFront, PrepareBackbuffer, ToonNeedsRedraw,
71 REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE,
81 HandleAnimation(ANIM_START);
86 HandleAnimation(ANIM_STOP);
91 HandleAnimation(ANIM_CONTINUE);