projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ce369a
)
fixed displaying envelope request after solved game
author
Holger Schemel
<info@artsoft.org>
Sun, 17 May 2015 11:51:48 +0000
(13:51 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sun, 17 May 2015 11:51:48 +0000
(13:51 +0200)
src/tools.c
patch
|
blob
|
history
diff --git
a/src/tools.c
b/src/tools.c
index b4449392b0ff789287898b0e40ed5f8422e765ea..61b4c4cb420347554d384de6c1687b92ea40162d 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-3290,9
+3290,15
@@
void WaitForEventToContinue()
static int RequestHandleEvents(unsigned int req_state)
{
static int RequestHandleEvents(unsigned int req_state)
{
+ boolean level_solved = (game_status == GAME_MODE_PLAYING &&
+ local_player->LevelSolved_GameEnd);
int last_game_status = game_status; /* save current game status */
int last_game_status = game_status; /* save current game status */
+ int width = request.width;
+ int height = request.height;
+ int sx, sy;
int result;
int result;
- int mx, my;
+
+ setRequestPosition(&sx, &sy, FALSE);
button_status = MB_RELEASED;
button_status = MB_RELEASED;
@@
-3301,6
+3307,21
@@
static int RequestHandleEvents(unsigned int req_state)
while (result < 0)
{
while (result < 0)
{
+ if (level_solved)
+ {
+ SetDrawtoField(DRAW_FIELDBUFFER);
+
+ HandleGameActions();
+
+ SetDrawtoField(DRAW_BACKBUFFER);
+
+ if (global.use_envelope_request)
+ {
+ /* copy current state of request area to middle of playfield area */
+ BlitBitmap(bitmap_db_cross, drawto, sx, sy, width, height, sx, sy);
+ }
+ }
+
if (PendingEvent())
{
Event event;
if (PendingEvent())
{
Event event;
@@
-3313,6
+3334,8
@@
static int RequestHandleEvents(unsigned int req_state)
case EVENT_BUTTONRELEASE:
case EVENT_MOTIONNOTIFY:
{
case EVENT_BUTTONRELEASE:
case EVENT_MOTIONNOTIFY:
{
+ int mx, my;
+
if (event.type == EVENT_MOTIONNOTIFY)
{
if (!button_status)
if (event.type == EVENT_MOTIONNOTIFY)
{
if (!button_status)
@@
-3418,9
+3441,13
@@
static int RequestHandleEvents(unsigned int req_state)
result = 0;
}
result = 0;
}
- if (
game_status == GAME_MODE_PLAYING && local_player->LevelSolved_GameEn
d)
+ if (
level_solve
d)
{
{
- HandleGameActions();
+ if (global.use_envelope_request)
+ {
+ /* copy back current state of pressed buttons inside request area */
+ BlitBitmap(drawto, bitmap_db_cross, sx, sy, width, height, sx, sy);
+ }
}
else
{
}
else
{