projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8336f54
)
changed delays in MM engine from clock delay to deterministic frame delay
author
Holger Schemel
<info@artsoft.org>
Fri, 7 Apr 2017 06:39:40 +0000
(08:39 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 23 Mar 2018 22:21:12 +0000
(23:21 +0100)
src/game_mm/mm_game.c
patch
|
blob
|
history
diff --git
a/src/game_mm/mm_game.c
b/src/game_mm/mm_game.c
index ced5a021d60ada7e1d75a1a69fb1dcf1a6b2bd2b..3a0c60d1254c37a61be0950e9c33b40c83ea7069 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-738,7
+738,7
@@
void ScanLaser()
if (rf)
DrawLaser(rf - 1, DL_LASER_ENABLED);
if (rf)
DrawLaser(rf - 1, DL_LASER_ENABLED);
- Ct = CT =
Counter()
;
+ Ct = CT =
FrameCounter
;
#if 0
if (!IN_LEV_FIELD(ELX, ELY))
#if 0
if (!IN_LEV_FIELD(ELX, ELY))
@@
-2736,9
+2736,9
@@
void ColorCycling(void)
if (color_status == STATIC_COLORS)
return;
if (color_status == STATIC_COLORS)
return;
- CC =
Counter()
;
+ CC =
FrameCounter
;
- if (CC < Cc || CC > Cc +
50
)
+ if (CC < Cc || CC > Cc +
2
)
{
Cc = CC;
{
Cc = CC;
@@
-2814,7
+2814,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
laser.redraw = FALSE;
#endif
laser.redraw = FALSE;
#endif
- CT =
Counter()
;
+ CT =
FrameCounter
;
if (game_mm.num_pacman && FrameReached(&pacman_delay, PACMAN_MOVE_DELAY))
{
if (game_mm.num_pacman && FrameReached(&pacman_delay, PACMAN_MOVE_DELAY))
{
@@
-3018,7
+3018,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
CT -= Ct;
CT -= Ct;
- if (element == EL_BOMB && CT >
1500
)
+ if (element == EL_BOMB && CT >
75
)
{
if (game_mm.cheat_no_explosion)
return;
{
if (game_mm.cheat_no_explosion)
return;
@@
-3056,7
+3056,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
return;
}
return;
}
- if (element == EL_FUSE_ON && CT >
500
)
+ if (element == EL_FUSE_ON && CT >
25
)
{
laser.fuse_off = TRUE;
laser.fuse_x = ELX;
{
laser.fuse_off = TRUE;
laser.fuse_x = ELX;
@@
-3066,7
+3066,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
DrawGraphic_MM(ELX, ELY, IMG_MM_FUSE);
}
DrawGraphic_MM(ELX, ELY, IMG_MM_FUSE);
}
- if (element == EL_BALL_GRAY && CT >
1500
)
+ if (element == EL_BALL_GRAY && CT >
75
)
{
static int new_elements[] =
{
{
static int new_elements[] =
{
@@
-3185,7
+3185,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
return;
}
return;
}
- if (IS_WALL_ICE(element) && CT >
100
0)
+ if (IS_WALL_ICE(element) && CT >
5
0)
{
PlayLevelSound_MM(ELX, ELY, element, MM_ACTION_SHRINKING);
{
PlayLevelSound_MM(ELX, ELY, element, MM_ACTION_SHRINKING);
@@
-3237,7
+3237,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
return;
}
return;
}
- if (IS_WALL_AMOEBA(element) && CT >
120
0)
+ if (IS_WALL_AMOEBA(element) && CT >
6
0)
{
int k1, k2, k3, dx, dy, de, dm;
int element2 = Feld[ELX][ELY];
{
int k1, k2, k3, dx, dy, de, dm;
int element2 = Feld[ELX][ELY];
@@
-3355,7
+3355,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
}
if ((element == EL_BLOCK_WOOD || element == EL_BLOCK_STONE) &&
}
if ((element == EL_BLOCK_WOOD || element == EL_BLOCK_STONE) &&
- laser.stops_inside_element && CT >
1500
)
+ laser.stops_inside_element && CT >
75
)
{
int x, y;
int k;
{
int x, y;
int k;
@@
-3412,7
+3412,7
@@
static void GameActions_MM_Ext(struct MouseActionInfo action, boolean warp_mode)
return;
}
return;
}
- if (element == EL_FUEL_FULL && CT >
20
0)
+ if (element == EL_FUEL_FULL && CT >
1
0)
{
for (i = game_mm.energy_left; i <= MAX_LASER_ENERGY; i+=2)
{
{
for (i = game_mm.energy_left; i <= MAX_LASER_ENERGY; i+=2)
{
@@
-3514,7
+3514,7
@@
void MovePacMen()
getGraphicSource(graphic, 0, &bitmap, &src_x, &src_y);
getGraphicSource(graphic, 0, &bitmap, &src_x, &src_y);
- CT =
Counter()
;
+ CT =
FrameCounter
;
ox = SX + ox * TILEX;
oy = SY + oy * TILEY;
ox = SX + ox * TILEX;
oy = SY + oy * TILEY;
@@
-3522,7
+3522,7
@@
void MovePacMen()
BlitBitmap(bitmap, window,
src_x, src_y, TILEX, TILEY,
ox + i * mx, oy + i * my);
BlitBitmap(bitmap, window,
src_x, src_y, TILEX, TILEY,
ox + i * mx, oy + i * my);
- Ct = Ct +
Counter()
- CT;
+ Ct = Ct +
FrameCounter
- CT;
}
DrawField_MM(nx, ny);
}
DrawField_MM(nx, ny);