- static int pos_x = 0, pos_y = 0;
- static int delta_x = 0, delta_y = 0;
- static int frame = 0, frame_step = 1;
- static boolean horiz_move, vert_move;
- static unsigned long anim_delay = 0;
- static unsigned long anim_delay_value = 0;
- static int width,height;
- static int pad_x,pad_y;
- static int cut_x,cut_y;
- static int src_x, src_y;
- static int dest_x, dest_y;
- static struct AnimInfo toon[NUM_TOONS] =
- {
- {
- 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
- },
- {
- 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_RIGHT,
- ANIMPOS_ANY
- },
- };
- struct AnimInfo *anim = &toon[toon_nr];
- Pixmap anim_pixmap = (toon_nr < 6 ? pix[PIX_TOONS] : pix[PIX_HEROES]);
- GC anim_clip_gc = (toon_nr < 6 ? clip_gc[PIX_TOONS] : clip_gc[PIX_HEROES]);
-
- if (restart)