rnd-20001210-1-src
[rocksndiamonds.git] / src / cartoons.c
index 3290331e5a74fcc1a46705cbc2829365e8f1d42a..2ede557a82c7fba4017843f3f6a5e78cde464994 100644 (file)
@@ -1,24 +1,24 @@
 /***********************************************************
-*  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-*  (c) 1995-98 Artsoft Entertainment                       *
-*              Holger Schemel                              *
-*              Oststrasse 11a                              *
-*              33604 Bielefeld                             *
-*              phone: ++49 +521 290471                     *
-*              email: aeglos@valinor.owl.de                *
+* (c) 1995-2000 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
 *----------------------------------------------------------*
-*  cartoons.c                                              *
+* cartoons.c                                               *
 ***********************************************************/
 
 #include "cartoons.h"
 #include "main.h"
-#include "misc.h"
 #include "tools.h"
 
+
 static void HandleAnimation(int);
 static boolean AnimateToon(int, boolean);
-static void DrawAnim(Bitmap, GC, int, int, int, int, int, int, int, int);
+static void DrawAnim(Bitmap *, GC, int, int, int, int, int, int, int, int);
 
 struct AnimInfo
 {
@@ -397,8 +397,8 @@ boolean AnimateToon(int toon_nr, boolean restart)
   };
   struct AnimInfo *anim = &toon[toon_nr];
   int anim_bitmap_nr = (toon_nr < 6 ? PIX_TOONS : PIX_HEROES);
-  Bitmap anim_bitmap = pix_masked[anim_bitmap_nr];
-  GC anim_clip_gc = clip_gc[anim_bitmap_nr];
+  Bitmap *anim_bitmap = pix[anim_bitmap_nr];
+  GC anim_clip_gc = pix[anim_bitmap_nr]->stored_clip_gc;
 
   if (restart)
   {
@@ -530,7 +530,7 @@ boolean AnimateToon(int toon_nr, boolean restart)
   return(FALSE);
 }
 
-void DrawAnim(Bitmap toon_bitmap, GC toon_clip_gc,
+void DrawAnim(Bitmap *toon_bitmap, GC toon_clip_gc,
              int src_x, int src_y, int width, int height,
              int dest_x, int dest_y, int pad_x, int pad_y)
 {
@@ -540,7 +540,7 @@ void DrawAnim(Bitmap toon_bitmap, GC toon_clip_gc,
   /* special method to avoid flickering interference with BackToFront() */
   BlitBitmap(backbuffer, pix[PIX_DB_DOOR], dest_x-pad_x, dest_y-pad_y,
             width+2*pad_x, height+2*pad_y, buf_x, buf_y);
-  SetClipOrigin(toon_clip_gc, dest_x-src_x, dest_y-src_y);
+  SetClipOrigin(toon_bitmap, toon_clip_gc, dest_x-src_x, dest_y-src_y);
   BlitBitmapMasked(toon_bitmap, backbuffer,
                   src_x, src_y, width, height, dest_x, dest_y);
   BlitBitmap(backbuffer, window, dest_x-pad_x, dest_y-pad_y,
@@ -552,7 +552,7 @@ void DrawAnim(Bitmap toon_bitmap, GC toon_clip_gc,
   /* normal method, causing flickering interference with BackToFront() */
   BlitBitmap(backbuffer, pix[PIX_DB_DOOR], dest_x-pad_x, dest_y-pad_y,
             width+2*pad_x, height+2*pad_y, buf_x, buf_y);
-  SetClipOrigin(toon_clip_gc, buf_x-src_x+pad_x, buf_y-src_y+pad_y);
+  SetClipOrigin(toon_bitmap,toon_clip_gc, buf_x-src_x+pad_x,buf_y-src_y+pad_y);
   BlitBitmapMasked(toon_bitmap, pix[PIX_DB_DOOR],
                   src_x, src_y, width, height, buf_x+pad_x, buf_y+pad_y);
   BlitBitmap(pix[PIX_DB_DOOR], window, buf_x, buf_y,