projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added quickly toggling team mode by clicking on main menu "name/team" text
[rocksndiamonds.git]
/
src
/
tools.c
diff --git
a/src/tools.c
b/src/tools.c
index 6522b8e741382bc55352fb961f2e4fc5149fdd03..6763d611a6d9ac384dc0228337f934afe45fcc39 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-2274,7
+2274,9
@@
static void DrawLevelFieldCrumbledExt(int x, int y, int graphic, int frame)
!IN_SCR_FIELD(sxx, syy))
continue;
!IN_SCR_FIELD(sxx, syy))
continue;
- if (Feld[xx][yy] == EL_ELEMENT_SNAPPING)
+ // do not crumble fields that are being digged or snapped
+ if (Feld[xx][yy] == EL_EMPTY ||
+ Feld[xx][yy] == EL_ELEMENT_SNAPPING)
continue;
element = TILE_GFX_ELEMENT(xx, yy);
continue;
element = TILE_GFX_ELEMENT(xx, yy);
@@
-3514,14
+3516,11
@@
static void DrawPreviewLevelExt(boolean restart)
}
}
}
}
-
static
void DrawPreviewPlayers(void)
+void DrawPreviewPlayers(void)
{
if (game_status != GAME_MODE_MAIN)
return;
{
if (game_status != GAME_MODE_MAIN)
return;
- if (!network.enabled && !setup.team_mode)
- return;
-
boolean player_found[MAX_PLAYERS];
int num_players = 0;
int i, x, y;
boolean player_found[MAX_PLAYERS];
int num_players = 0;
int i, x, y;
@@
-3570,6
+3569,9
@@
static void DrawPreviewPlayers(void)
ClearRectangleOnBackground(drawto, max_xpos, max_ypos,
max_players_width, max_players_height);
ClearRectangleOnBackground(drawto, max_xpos, max_ypos,
max_players_width, max_players_height);
+ if (!network.enabled && !setup.team_mode)
+ return;
+
// only draw players if level is suited for team mode
if (num_players < 2)
return;
// only draw players if level is suited for team mode
if (num_players < 2)
return;
@@
-4811,17
+4813,17
@@
static boolean RequestEnvelope(char *text, unsigned int req_state)
boolean Request(char *text, unsigned int req_state)
{
boolean Request(char *text, unsigned int req_state)
{
- boolean overlay_
active = GetOverlayActive
();
+ boolean overlay_
enabled = GetOverlayEnabled
();
boolean result;
boolean result;
- SetOverlay
Active
(FALSE);
+ SetOverlay
Enabled
(FALSE);
if (global.use_envelope_request)
result = RequestEnvelope(text, req_state);
else
result = RequestDoor(text, req_state);
if (global.use_envelope_request)
result = RequestEnvelope(text, req_state);
else
result = RequestDoor(text, req_state);
- SetOverlay
Active(overlay_active
);
+ SetOverlay
Enabled(overlay_enabled
);
return result;
}
return result;
}