projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c45f952
)
moved flag for active/inactive game panel from player to game structure
author
Holger Schemel
<info@artsoft.org>
Fri, 12 Oct 2018 15:51:04 +0000
(17:51 +0200)
committer
Holger Schemel
<info@artsoft.org>
Fri, 12 Oct 2018 15:51:04 +0000
(17:51 +0200)
src/game.c
patch
|
blob
|
history
src/game.h
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index 572bd209fc06fb15067f771af201052e6ee4408a..b80d8585b9fc63889a907efb28bc5163715ea823 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-81,7
+81,7
@@
#define EX_TYPE_DYNA (1 << 4)
#define EX_TYPE_SINGLE_TILE (EX_TYPE_CENTER | EX_TYPE_BORDER)
#define EX_TYPE_DYNA (1 << 4)
#define EX_TYPE_SINGLE_TILE (EX_TYPE_CENTER | EX_TYPE_BORDER)
-#define PANEL_OFF() (
local_player->LevelSolved_PanelOff
)
+#define PANEL_OFF() (
game.panel.active == FALSE
)
#define PANEL_DEACTIVATED(p) ((p)->x < 0 || (p)->y < 0 || PANEL_OFF())
#define PANEL_XPOS(p) (DX + ALIGNED_TEXT_XPOS(p))
#define PANEL_YPOS(p) (DY + ALIGNED_TEXT_YPOS(p))
#define PANEL_DEACTIVATED(p) ((p)->x < 0 || (p)->y < 0 || PANEL_OFF())
#define PANEL_XPOS(p) (DX + ALIGNED_TEXT_XPOS(p))
#define PANEL_YPOS(p) (DY + ALIGNED_TEXT_YPOS(p))
@@
-3525,7
+3525,6
@@
void InitGame(void)
player->LevelSolved_GameWon = FALSE;
player->LevelSolved_GameEnd = FALSE;
player->LevelSolved_GameWon = FALSE;
player->LevelSolved_GameEnd = FALSE;
- player->LevelSolved_PanelOff = FALSE;
player->LevelSolved_SaveTape = FALSE;
player->LevelSolved_SaveScore = FALSE;
player->LevelSolved_SaveTape = FALSE;
player->LevelSolved_SaveScore = FALSE;
@@
-3559,6
+3558,8
@@
void InitGame(void)
AllPlayersGone = FALSE;
AllPlayersGone = FALSE;
+ game.panel.active = TRUE;
+
game.no_time_limit = (level.time == 0);
game.yamyam_content_nr = 0;
game.no_time_limit = (level.time == 0);
game.yamyam_content_nr = 0;
@@
-4653,7
+4654,7
@@
void GameWon(void)
return;
}
return;
}
-
local_player->LevelSolved_PanelOff = TRU
E;
+
game.panel.active = FALS
E;
if (game_over_delay_3 > 0)
{
if (game_over_delay_3 > 0)
{
diff --git
a/src/game.h
b/src/game.h
index b6e9f5b0ee629dd90784d768a0a139f4c477e3f6..947d4662653923e0ea14e8ad15a06a9e72979c2e 100644
(file)
--- a/
src/game.h
+++ b/
src/game.h
@@
-100,6
+100,9
@@
struct GamePanelInfo
struct TextPosInfo player_name;
struct TextPosInfo level_name;
struct TextPosInfo level_author;
struct TextPosInfo player_name;
struct TextPosInfo level_name;
struct TextPosInfo level_author;
+
+ /* value to determine if panel will be updated or not */
+ boolean active;
};
struct GameButtonInfo
};
struct GameButtonInfo
@@
-266,7
+269,6
@@
struct PlayerInfo
boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
boolean LevelSolved_GameWon;
boolean LevelSolved_GameEnd;
- boolean LevelSolved_PanelOff;
boolean LevelSolved_SaveTape;
boolean LevelSolved_SaveScore;
boolean LevelSolved_SaveTape;
boolean LevelSolved_SaveScore;