projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f2136a
)
removed code for condition that is always true
author
Holger Schemel
<info@artsoft.org>
Sat, 2 Dec 2023 12:53:51 +0000
(13:53 +0100)
committer
Holger Schemel
<info@artsoft.org>
Sat, 2 Dec 2023 12:54:08 +0000
(13:54 +0100)
src/tools.c
patch
|
blob
|
history
src/tools.h
patch
|
blob
|
history
diff --git
a/src/tools.c
b/src/tools.c
index c730e8510e89648d87e5540d2b466c319c857d11..76122ed945fb2638caec5d3fe03a1414ffeda4dd 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-4791,7
+4791,7
@@
static int RequestHandleEvents(unsigned int req_state, int draw_buffer_game)
return result;
}
return result;
}
-static void DoRequestBefore(
unsigned int req_state
)
+static void DoRequestBefore(
void
)
{
if (game_status == GAME_MODE_PLAYING)
BlitScreenToBitmap(backbuffer);
{
if (game_status == GAME_MODE_PLAYING)
BlitScreenToBitmap(backbuffer);
@@
-4805,8
+4805,7
@@
static void DoRequestBefore(unsigned int req_state)
// pause network game while waiting for request to answer
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
// pause network game while waiting for request to answer
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !game.all_players_gone &&
- req_state & REQUEST_WAIT_FOR_INPUT)
+ !game.all_players_gone)
SendToServer_PausePlaying();
// simulate releasing mouse button over last gadget, if still pressed
SendToServer_PausePlaying();
// simulate releasing mouse button over last gadget, if still pressed
@@
-4816,7
+4815,7
@@
static void DoRequestBefore(unsigned int req_state)
UnmapAllGadgets();
}
UnmapAllGadgets();
}
-static void DoRequestAfter(
unsigned int req_state
)
+static void DoRequestAfter(
void
)
{
RemapAllGadgets();
{
RemapAllGadgets();
@@
-4833,8
+4832,7
@@
static void DoRequestAfter(unsigned int req_state)
// continue network game after request
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
// continue network game after request
if (network.enabled &&
game_status == GAME_MODE_PLAYING &&
- !game.all_players_gone &&
- req_state & REQUEST_WAIT_FOR_INPUT)
+ !game.all_players_gone)
SendToServer_ContinuePlaying();
// restore deactivated drawing when quick-loading level tape recording
SendToServer_ContinuePlaying();
// restore deactivated drawing when quick-loading level tape recording
@@
-4858,7
+4856,7
@@
static boolean RequestDoor(char *text, unsigned int req_state)
font_nr = FONT_TEXT_1;
}
font_nr = FONT_TEXT_1;
}
- DoRequestBefore(
req_state
);
+ DoRequestBefore();
// draw released gadget before proceeding
// BackToFront();
// draw released gadget before proceeding
// BackToFront();
@@
-4928,21
+4926,6
@@
static boolean RequestDoor(char *text, unsigned int req_state)
OpenDoor(DOOR_OPEN_1);
OpenDoor(DOOR_OPEN_1);
- if (!(req_state & REQUEST_WAIT_FOR_INPUT))
- {
- if (game_status == GAME_MODE_PLAYING)
- {
- SetPanelBackground();
- SetDrawBackgroundMask(REDRAW_DOOR_1);
- }
- else
- {
- SetDrawBackgroundMask(REDRAW_FIELD);
- }
-
- return FALSE;
- }
-
SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
// ---------- handle request buttons ----------
SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
// ---------- handle request buttons ----------
@@
-4959,7
+4942,7
@@
static boolean RequestDoor(char *text, unsigned int req_state)
OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
}
OpenDoor(DOOR_OPEN_1 | DOOR_COPY_BACK);
}
- DoRequestAfter(
req_state
);
+ DoRequestAfter();
return result;
}
return result;
}
@@
-4969,26
+4952,11
@@
static boolean RequestEnvelope(char *text, unsigned int req_state)
int draw_buffer_last = GetDrawtoField();
int result;
int draw_buffer_last = GetDrawtoField();
int result;
- DoRequestBefore(
req_state
);
+ DoRequestBefore();
DrawEnvelopeRequest(text, req_state);
ShowEnvelopeRequest(text, req_state, ACTION_OPENING);
DrawEnvelopeRequest(text, req_state);
ShowEnvelopeRequest(text, req_state, ACTION_OPENING);
- if (!(req_state & REQUEST_WAIT_FOR_INPUT))
- {
- if (game_status == GAME_MODE_PLAYING)
- {
- SetPanelBackground();
- SetDrawBackgroundMask(REDRAW_DOOR_1);
- }
- else
- {
- SetDrawBackgroundMask(REDRAW_FIELD);
- }
-
- return FALSE;
- }
-
SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
// ---------- handle request buttons ----------
SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
// ---------- handle request buttons ----------
@@
-4998,7
+4966,7
@@
static boolean RequestEnvelope(char *text, unsigned int req_state)
ShowEnvelopeRequest(text, req_state, ACTION_CLOSING);
ShowEnvelopeRequest(text, req_state, ACTION_CLOSING);
- DoRequestAfter(
req_state
);
+ DoRequestAfter();
return result;
}
return result;
}
diff --git
a/src/tools.h
b/src/tools.h
index 562d0937d3971ea4d0a6ffbf2015c7fff0aaa220..08eb907250e3158924b92e152977c02cc273dafa 100644
(file)
--- a/
src/tools.h
+++ b/
src/tools.h
@@
-63,8
+63,6
@@
#define REQ_STAY_CLOSED (1 << 4)
#define REQ_REOPEN (1 << 5)
#define REQ_STAY_CLOSED (1 << 4)
#define REQ_REOPEN (1 << 5)
-#define REQUEST_WAIT_FOR_INPUT (REQ_ASK | REQ_CONFIRM | REQ_PLAYER)
-
int getFieldbufferOffsetX_RND(int, int);
int getFieldbufferOffsetY_RND(int, int);
int getFieldbufferOffsetX_RND(int, int);
int getFieldbufferOffsetY_RND(int, int);