projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
10a3059
)
removed parameter from function (which always had the same value)
author
Holger Schemel
<info@artsoft.org>
Tue, 30 Oct 2018 20:40:56 +0000
(21:40 +0100)
committer
Holger Schemel
<info@artsoft.org>
Tue, 30 Oct 2018 20:52:45 +0000
(21:52 +0100)
src/game.c
patch
|
blob
|
history
diff --git
a/src/game.c
b/src/game.c
index 5ec37c4f4267573c280f49efe33329eccab493f4..f0e9e20c792a4706e5ecd5f2a06c5c73181a88c7 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-4457,7
+4457,7
@@
void InitAmoebaNr(int x, int y)
AmoebaCnt2[group_nr]++;
}
AmoebaCnt2[group_nr]++;
}
-static void PlayerWins(
struct PlayerInfo *player
)
+static void PlayerWins(
void
)
{
if (level.game_engine_type == GAME_ENGINE_TYPE_RND &&
local_player->players_still_needed > 0)
{
if (level.game_engine_type == GAME_ENGINE_TYPE_RND &&
local_player->players_still_needed > 0)
@@
-4465,20
+4465,20
@@
static void PlayerWins(struct PlayerInfo *player)
game.LevelSolved = TRUE;
game.LevelSolved = TRUE;
- player->GameOver = TRUE;
+
local_
player->GameOver = TRUE;
- player->score_final = (level.game_engine_type == GAME_ENGINE_TYPE_EM ?
- level.native_em_level->lev->score :
- level.game_engine_type == GAME_ENGINE_TYPE_MM ?
- game_mm.score :
- player->score);
- player->health_final = (level.game_engine_type == GAME_ENGINE_TYPE_MM ?
- MM_HEALTH(game_mm.laser_overload_value) :
- player->health);
+
local_
player->score_final = (level.game_engine_type == GAME_ENGINE_TYPE_EM ?
+
level.native_em_level->lev->score :
+
level.game_engine_type == GAME_ENGINE_TYPE_MM ?
+
game_mm.score :
+
local_
player->score);
+
local_
player->health_final = (level.game_engine_type == GAME_ENGINE_TYPE_MM ?
+
MM_HEALTH(game_mm.laser_overload_value) :
+
local_
player->health);
game.LevelSolved_CountingTime = (game.no_time_limit ? TimePlayed : TimeLeft);
game.LevelSolved_CountingTime = (game.no_time_limit ? TimePlayed : TimeLeft);
- game.LevelSolved_CountingScore = player->score_final;
- game.LevelSolved_CountingHealth = player->health_final;
+ game.LevelSolved_CountingScore =
local_
player->score_final;
+ game.LevelSolved_CountingHealth =
local_
player->health_final;
}
void GameWon(void)
}
void GameWon(void)
@@
-7952,7
+7952,7
@@
static void StartMoving(int x, int y)
local_player->friends_still_needed--;
if (!local_player->friends_still_needed &&
!local_player->GameOver && AllPlayersGone)
local_player->friends_still_needed--;
if (!local_player->friends_still_needed &&
!local_player->GameOver && AllPlayersGone)
- PlayerWins(
local_player
);
+ PlayerWins();
return;
}
return;
}
@@
-9849,7
+9849,7
@@
static void ExecuteCustomElementAction(int x, int y, int element, int page)
ExitPlayer(&stored_player[i]);
if (AllPlayersGone)
ExitPlayer(&stored_player[i]);
if (AllPlayersGone)
- PlayerWins(
local_player
);
+ PlayerWins();
break;
}
break;
}
@@
-11121,7
+11121,7
@@
static void CheckLevelSolved(void)
if (game_em.level_solved &&
!game_em.game_over) // game won
{
if (game_em.level_solved &&
!game_em.game_over) // game won
{
- PlayerWins(
local_player
);
+ PlayerWins();
game_em.game_over = TRUE;
game_em.game_over = TRUE;
@@
-11136,7
+11136,7
@@
static void CheckLevelSolved(void)
if (game_sp.level_solved &&
!game_sp.game_over) // game won
{
if (game_sp.level_solved &&
!game_sp.game_over) // game won
{
- PlayerWins(
local_player
);
+ PlayerWins();
game_sp.game_over = TRUE;
game_sp.game_over = TRUE;
@@
-11151,7
+11151,7
@@
static void CheckLevelSolved(void)
if (game_mm.level_solved &&
!game_mm.game_over) // game won
{
if (game_mm.level_solved &&
!game_mm.game_over) // game won
{
- PlayerWins(
local_player
);
+ PlayerWins();
game_mm.game_over = TRUE;
game_mm.game_over = TRUE;
@@
-12678,7
+12678,7
@@
void ScrollPlayer(struct PlayerInfo *player, int mode)
if ((local_player->friends_still_needed == 0 ||
IS_SP_ELEMENT(Feld[jx][jy])) &&
AllPlayersGone)
if ((local_player->friends_still_needed == 0 ||
IS_SP_ELEMENT(Feld[jx][jy])) &&
AllPlayersGone)
- PlayerWins(
local_player
);
+ PlayerWins();
}
// this breaks one level: "machine", level 000
}
// this breaks one level: "machine", level 000
@@
-14006,7
+14006,7
@@
static int DigField(struct PlayerInfo *player,
{
local_player->players_still_needed = 0;
{
local_player->players_still_needed = 0;
- PlayerWins(
local_player
);
+ PlayerWins();
PlayLevelSound(x, y, SND_GAME_SOKOBAN_SOLVING);
}
PlayLevelSound(x, y, SND_GAME_SOKOBAN_SOLVING);
}