projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-19980917
[rocksndiamonds.git]
/
src
/
cartoons.c
diff --git
a/src/cartoons.c
b/src/cartoons.c
index 1c193f6f689ae3b334210ee8ed3c04b27530df27..b1b31921c03f0f1cc01131a9160a9fe4a77f447d 100644
(file)
--- a/
src/cartoons.c
+++ b/
src/cartoons.c
@@
-125,7
+125,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 (direct_draw_on && game_status
==
PLAYING)
{
int xx,yy;
{
int xx,yy;
@@
-139,10
+139,17
@@
void HandleAnimation(int mode)
SetDrawtoField(DRAW_DIRECT);
}
SetDrawtoField(DRAW_DIRECT);
}
- if (soft_scrolling_on && game_status==PLAYING)
+ if (soft_scrolling_on && game_status == PLAYING)
+ {
+ int fx = FX, fy = FY;
+
+ fx += (PlayerMovDir & (MV_LEFT|MV_RIGHT) ? ScreenMovPos : 0);
+ fy += (PlayerMovDir & (MV_UP|MV_DOWN) ? ScreenMovPos : 0);
+
XCopyArea(display,fieldbuffer,backbuffer,gc,
XCopyArea(display,fieldbuffer,backbuffer,gc,
-
FX,FY
, SXSIZE,SYSIZE,
+
fx,fy
, SXSIZE,SYSIZE,
SX,SY);
SX,SY);
+ }
return;
break;
return;
break;
@@
-168,7
+175,7
@@
void HandleAnimation(int mode)
if (reset_delay)
{
animstart_delay = Counter();
if (reset_delay)
{
animstart_delay = Counter();
- animstart_delay_value = SimpleRND(
5
00);
+ animstart_delay_value = SimpleRND(
30
00);
reset_delay = FALSE;
}
reset_delay = FALSE;
}
@@
-399,7
+406,7
@@
BOOL AnimateToon(int toon_nr, BOOL restart)
{
horiz_move = (anim->direction & (ANIMDIR_LEFT | ANIMDIR_RIGHT));
vert_move = (anim->direction & (ANIMDIR_UP | ANIMDIR_DOWN));
{
horiz_move = (anim->direction & (ANIMDIR_LEFT | ANIMDIR_RIGHT));
vert_move = (anim->direction & (ANIMDIR_UP | ANIMDIR_DOWN));
- anim_delay_value = 100/anim->frames_per_second;
+ anim_delay_value = 100
0
/anim->frames_per_second;
frame = 0;
if (horiz_move)
frame = 0;
if (horiz_move)