- DWARF_XSIZE, DWARF_YSIZE,
- DWARF_X, DWARF_Y,
- DWARF_FRAMES,
- DWARF_FPS,
- DWARF_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- DWARF_XSIZE, DWARF_YSIZE,
- DWARF_X, DWARF2_Y,
- DWARF_FRAMES,
- DWARF_FPS,
- DWARF_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- JUMPER_XSIZE, JUMPER_YSIZE,
- JUMPER_X, JUMPER_Y,
- JUMPER_FRAMES,
- JUMPER_FPS,
- JUMPER_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- CLOWN_XSIZE, CLOWN_YSIZE,
- CLOWN_X, CLOWN_Y,
- CLOWN_FRAMES,
- CLOWN_FPS,
- CLOWN_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_UP,
- ANIMPOS_ANY
- },
- {
- BIRD_XSIZE, BIRD_YSIZE,
- BIRD1_X, BIRD1_Y,
- BIRD_FRAMES,
- BIRD_FPS,
- BIRD_STEPSIZE,
- ANIM_OSCILLATE,
- ANIMDIR_RIGHT,
- ANIMPOS_UPPER
- },
- {
- BIRD_XSIZE, BIRD_YSIZE,
- BIRD2_X, BIRD2_Y,
- BIRD_FRAMES,
- BIRD_FPS,
- BIRD_STEPSIZE,
- ANIM_OSCILLATE,
- ANIMDIR_LEFT,
- ANIMPOS_UPPER
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_SPIELER1_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_SPIELER1_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_SPIELER1_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_SPIELER1_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_PINGUIN_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_PINGUIN_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_PINGUIN_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_PINGUIN_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_MAULWURF_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_MAULWURF_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_MAULWURF_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_MAULWURF_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_SCHWEIN_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_SCHWEIN_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_SCHWEIN_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_SCHWEIN_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_DRACHE_LEFT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_DRACHE_LEFT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_DRACHE_RIGHT - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_DRACHE_RIGHT - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_4,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_RIGHT,
- ANIMPOS_DOWN
- },
- {
- GAMETOON_XSIZE, GAMETOON_YSIZE,
- ((GFX_SONDE - GFX_START_ROCKSHEROES) % HEROES_PER_LINE)*TILEX,
- ((GFX_SONDE - GFX_START_ROCKSHEROES) / HEROES_PER_LINE)*TILEY,
- GAMETOON_FRAMES_8,
- GAMETOON_FPS,
- GAMETOON_STEPSIZE,
- ANIM_NORMAL,
- ANIMDIR_LEFT,
- ANIMPOS_ANY
- },
+ int anim_class_check = (1 << i);
+ int anim_class_game_mode = anim_class_game_modes[i];
+ int anim_class_last = anim_classes_last & anim_class_check;
+ int anim_class_next = anim_classes_next & anim_class_check;
+
+ // stop animations for changed screen class before fading to new screen
+ if (before_fading && anim_class_last && !anim_class_next)
+ HandleGlobalAnim(ANIM_STOP, anim_class_game_mode);
+
+ // start animations for changed screen class after fading to new screen
+ if (after_fading && !anim_class_last && anim_class_next)
+ HandleGlobalAnim(ANIM_START, anim_class_game_mode);
+ }
+
+ if (after_fading)
+ anim_classes_last = anim_classes_next;
+
+ anim_status_last = global.anim_status;
+ }
+
+ if (!setup.toons || global.anim_status == GAME_MODE_LOADING)
+ return;
+
+ if (drawing_stage == DRAW_GLOBAL_ANIM_STAGE_1)
+ DoAnimationExt();
+
+ for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++)
+ {
+ struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr];
+ int anim_nr;
+
+#if 0
+ if (mode_nr != GFX_SPECIAL_ARG_DEFAULT &&
+ mode_nr != game_status)
+ continue;
+#endif
+
+ for (anim_nr = 0; anim_nr < ctrl->num_anims; anim_nr++)