projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19981216-1
[rocksndiamonds.git]
/
src
/
cartoons.c
diff --git
a/src/cartoons.c
b/src/cartoons.c
index 9eef8e1e075a148b4aae99c6889af6ba0a09c61b..834996b73c53ff4a49d594226fc40ee6de9f5dcb 100644
(file)
--- a/
src/cartoons.c
+++ b/
src/cartoons.c
@@
-17,7
+17,7
@@
#include "tools.h"
static void HandleAnimation(int);
#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
static void DrawAnim(Pixmap, GC, int, int, int, int, int, int, int, int);
struct AnimInfo
@@
-27,7
+27,7
@@
struct AnimInfo
int frames;
int frames_per_second;
int stepsize;
int frames;
int frames_per_second;
int stepsize;
-
BOOL
pingpong;
+
boolean
pingpong;
int direction;
int position;
};
int direction;
int position;
};
@@
-107,14
+107,14
@@
void DoAnimation()
void HandleAnimation(int mode)
{
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
unsigned
long animstart_delay = -1;
+ static
unsigned
long animstart_delay_value = 0;
+ static
boolean
anim_restart = TRUE;
+ static
boolean
reset_delay = TRUE;
static int toon_nr = 0;
int draw_mode;
static int toon_nr = 0;
int draw_mode;
- if (!
toons_on
)
+ if (!
setup.toons
)
return;
switch(mode)
return;
switch(mode)
@@
-124,7
+124,7
@@
void HandleAnimation(int mode)
reset_delay = TRUE;
/* Fill empty backbuffer for animation functions */
reset_delay = TRUE;
/* Fill empty backbuffer for animation functions */
- if (
direct_draw_on
&& game_status == PLAYING)
+ if (
setup.direct_draw
&& game_status == PLAYING)
{
int xx,yy;
{
int xx,yy;
@@
-138,7
+138,7
@@
void HandleAnimation(int mode)
SetDrawtoField(DRAW_DIRECT);
}
SetDrawtoField(DRAW_DIRECT);
}
- if (s
oft_scrolling_on
&& game_status == PLAYING)
+ if (s
etup.soft_scrolling
&& game_status == PLAYING)
{
int fx = FX, fy = FY;
{
int fx = FX, fy = FY;
@@
-158,12
+158,12
@@
void HandleAnimation(int mode)
redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER);
/* Redraw background even when in direct drawing 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
;
+
setup.direct_draw
= FALSE;
BackToFront();
BackToFront();
-
direct_draw_on
= draw_mode;
+
setup.direct_draw
= draw_mode;
return;
break;
return;
break;
@@
-189,14
+189,14
@@
void HandleAnimation(int mode)
anim_restart = reset_delay = AnimateToon(toon_nr,anim_restart);
}
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
pos_x = 0, pos_y = 0;
+ static
int
delta_x = 0, delta_y = 0;
static int frame = 0, frame_step = 1;
static int frame = 0, frame_step = 1;
- static
BOOL
horiz_move, vert_move;
- static long anim_delay = 0;
- static
int
anim_delay_value = 0;
+ 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 width,height;
static int pad_x,pad_y;
static int cut_x,cut_y;