X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fcartoons.c;h=6b145d6d253097237e234b38723eb9718234704a;hp=4857e06fcc8a59cbb7e78499e5a8b0a76c3b2910;hb=e5c5bf5c4a76a04f9bf64e92227bf2ef969fd25c;hpb=f45528c08776cd2c87a83bf3ec7e1f7fe7b18765 diff --git a/src/cartoons.c b/src/cartoons.c index 4857e06f..6b145d6d 100644 --- a/src/cartoons.c +++ b/src/cartoons.c @@ -1,13 +1,12 @@ /*********************************************************** * Rocks'n'Diamonds -- McDuffin Strikes Back! * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1995-98 Artsoft Entertainment * +* Holger Schemel * +* Oststrasse 11a * +* 33604 Bielefeld * +* phone: ++49 +521 290471 * +* email: aeglos@valinor.owl.de * *----------------------------------------------------------* * cartoons.c * ***********************************************************/ @@ -18,7 +17,7 @@ #include "tools.h" static void HandleAnimation(int); -static BOOL AnimateToon(int, BOOL); +static boolean AnimateToon(int, boolean); static void DrawAnim(Pixmap, GC, int, int, int, int, int, int, int, int); struct AnimInfo @@ -28,7 +27,7 @@ struct AnimInfo int frames; int frames_per_second; int stepsize; - BOOL pingpong; + boolean pingpong; int direction; int position; }; @@ -110,12 +109,12 @@ void HandleAnimation(int mode) { static long animstart_delay = -1; static long animstart_delay_value = 0; - static BOOL anim_restart = TRUE; - static BOOL reset_delay = TRUE; + static boolean anim_restart = TRUE; + static boolean reset_delay = TRUE; static int toon_nr = 0; int draw_mode; - if (!toons_on) + if (!setup.toons_on) return; switch(mode) @@ -125,7 +124,7 @@ void HandleAnimation(int mode) reset_delay = TRUE; /* Fill empty backbuffer for animation functions */ - if (direct_draw_on && game_status == PLAYING) + if (setup.direct_draw_on && game_status == PLAYING) { int xx,yy; @@ -139,12 +138,12 @@ void HandleAnimation(int mode) SetDrawtoField(DRAW_DIRECT); } - if (soft_scrolling_on && game_status == PLAYING) + if (setup.soft_scrolling_on && game_status == PLAYING) { int fx = FX, fy = FY; - fx += (local_player->MovDir & (MV_LEFT|MV_RIGHT) ? ScreenMovPos : 0); - fy += (local_player->MovDir & (MV_UP|MV_DOWN) ? ScreenMovPos : 0); + fx += (ScreenMovDir & (MV_LEFT|MV_RIGHT) ? ScreenGfxPos : 0); + fy += (ScreenMovDir & (MV_UP|MV_DOWN) ? ScreenGfxPos : 0); XCopyArea(display,fieldbuffer,backbuffer,gc, fx,fy, SXSIZE,SYSIZE, @@ -159,12 +158,12 @@ void HandleAnimation(int mode) redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER); /* Redraw background even when in direct drawing mode */ - draw_mode = direct_draw_on; - direct_draw_on = FALSE; + draw_mode = setup.direct_draw_on; + setup.direct_draw_on = FALSE; BackToFront(); - direct_draw_on = draw_mode; + setup.direct_draw_on = draw_mode; return; break; @@ -190,12 +189,12 @@ void HandleAnimation(int mode) anim_restart = reset_delay = AnimateToon(toon_nr,anim_restart); } -BOOL AnimateToon(int toon_nr, BOOL restart) +boolean AnimateToon(int toon_nr, boolean restart) { static pos_x = 0, pos_y = 0; static delta_x = 0, delta_y = 0; static int frame = 0, frame_step = 1; - static BOOL horiz_move, vert_move; + static boolean horiz_move, vert_move; static long anim_delay = 0; static int anim_delay_value = 0; static int width,height;