projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed some function declarations
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index c7589cf005057b7a46c2fd1ec22ad7ba36d59a08..79fb4518f4c5f685e4d01f6b8c32d61617c87e7f 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-3354,7
+3354,7
@@
void InitGame(void)
SetGameStatus(GAME_MODE_PLAYING);
if (level_editor_test_game)
SetGameStatus(GAME_MODE_PLAYING);
if (level_editor_test_game)
- FadeSkipNextFade
In
();
+ FadeSkipNextFade
Out
();
else
FadeSetEnterScreen();
else
FadeSetEnterScreen();
@@
-3365,8
+3365,10
@@
void InitGame(void)
ExpireSoundLoops(TRUE);
ExpireSoundLoops(TRUE);
- if (!level_editor_test_game)
- FadeOut(fade_mask);
+ FadeOut(fade_mask);
+
+ if (level_editor_test_game)
+ FadeSkipNextFadeIn();
// needed if different viewport properties defined for playing
ChangeViewportPropertiesIfNeeded();
// needed if different viewport properties defined for playing
ChangeViewportPropertiesIfNeeded();
@@
-12532,10
+12534,11
@@
boolean MovePlayer(struct PlayerInfo *player, int dx, int dy)
}
else
{
}
else
{
- int offset = game.scroll_delay_value;
+ int offset
_raw
= game.scroll_delay_value;
if (jx != old_jx) // player has moved horizontally
{
if (jx != old_jx) // player has moved horizontally
{
+ int offset = MIN(offset_raw, (SCR_FIELDX - 2) / 2);
int offset_x = offset * (player->MovDir == MV_LEFT ? +1 : -1);
int new_scroll_x = jx - MIDPOSX + offset_x;
int offset_x = offset * (player->MovDir == MV_LEFT ? +1 : -1);
int new_scroll_x = jx - MIDPOSX + offset_x;
@@
-12556,6
+12559,7
@@
boolean MovePlayer(struct PlayerInfo *player, int dx, int dy)
}
else // player has moved vertically
{
}
else // player has moved vertically
{
+ int offset = MIN(offset_raw, (SCR_FIELDY - 2) / 2);
int offset_y = offset * (player->MovDir == MV_UP ? +1 : -1);
int new_scroll_y = jy - MIDPOSY + offset_y;
int offset_y = offset * (player->MovDir == MV_UP ? +1 : -1);
int new_scroll_y = jy - MIDPOSY + offset_y;
@@
-15753,9
+15757,6
@@
static void RedrawGameButtonsExt(boolean on_tape)
for (i = 0; i < NUM_GAME_BUTTONS; i++)
if (!on_tape || gamebutton_info[i].allowed_on_tape)
RedrawGadget(game_gadget[i]);
for (i = 0; i < NUM_GAME_BUTTONS; i++)
if (!on_tape || gamebutton_info[i].allowed_on_tape)
RedrawGadget(game_gadget[i]);
-
- // RedrawGadget() may have set REDRAW_ALL if buttons are defined off-area
- redraw_mask &= ~REDRAW_ALL;
}
static void SetGadgetState(struct GadgetInfo *gi, boolean state)
}
static void SetGadgetState(struct GadgetInfo *gi, boolean state)