projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11bd782
)
fixed drawing wrong masked global border when using envelope requests
author
Holger Schemel
<info@artsoft.org>
Thu, 13 Aug 2015 13:39:04 +0000
(15:39 +0200)
committer
Holger Schemel
<info@artsoft.org>
Thu, 13 Aug 2015 13:39:04 +0000
(15:39 +0200)
src/tools.c
patch
|
blob
|
history
diff --git
a/src/tools.c
b/src/tools.c
index 0370b1d3ca49c76e01e248b280fc1a1ec4aa6700..6597768de6f08e6a9451eef6c81a62b46659ff92 100644
(file)
--- a/
src/tools.c
+++ b/
src/tools.c
@@
-2264,6
+2264,7
@@
static void setRequestPosition(int *x, int *y, boolean add_border_size)
void DrawEnvelopeRequest(char *text)
{
void DrawEnvelopeRequest(char *text)
{
+ int last_game_status = game_status; /* save current game status */
char *text_final = text;
char *text_door_style = NULL;
int graphic = IMG_BACKGROUND_REQUEST;
char *text_final = text;
char *text_door_style = NULL;
int graphic = IMG_BACKGROUND_REQUEST;
@@
-2324,10
+2325,15
@@
void DrawEnvelopeRequest(char *text)
x, y, x_steps, y_steps,
tile_size, tile_size);
x, y, x_steps, y_steps,
tile_size, tile_size);
+ /* force DOOR font inside door area */
+ game_status = GAME_MODE_PSEUDO_DOOR;
+
DrawTextBuffer(sx + border_size, sy + border_size, text_final, font_nr,
line_length, -1, max_lines, line_spacing, mask_mode,
request.autowrap, request.centered, FALSE);
DrawTextBuffer(sx + border_size, sy + border_size, text_final, font_nr,
line_length, -1, max_lines, line_spacing, mask_mode,
request.autowrap, request.centered, FALSE);
+ game_status = last_game_status; /* restore current game status */
+
for (i = 0; i < NUM_TOOL_BUTTONS; i++)
RedrawGadget(tool_gadget[i]);
for (i = 0; i < NUM_TOOL_BUTTONS; i++)
RedrawGadget(tool_gadget[i]);
@@
-2433,7
+2439,6
@@
void AnimateEnvelopeRequest(int anim_mode, int action)
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
{
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
{
- int last_game_status = game_status; /* save current game status */
int graphic = IMG_BACKGROUND_REQUEST;
int sound_opening = SND_REQUEST_OPENING;
int sound_closing = SND_REQUEST_CLOSING;
int graphic = IMG_BACKGROUND_REQUEST;
int sound_opening = SND_REQUEST_OPENING;
int sound_closing = SND_REQUEST_CLOSING;
@@
-2477,9
+2482,6
@@
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
InitAnimation();
}
InitAnimation();
}
- /* force DOOR font inside door area */
- game_status = GAME_MODE_PSEUDO_DOOR;
-
game.envelope_active = TRUE; /* needed for RedrawPlayfield() events */
if (action == ACTION_OPENING)
game.envelope_active = TRUE; /* needed for RedrawPlayfield() events */
if (action == ACTION_OPENING)
@@
-2504,8
+2506,6
@@
void ShowEnvelopeRequest(char *text, unsigned int req_state, int action)
game.envelope_active = FALSE;
game.envelope_active = FALSE;
- game_status = last_game_status; /* restore current game status */
-
if (action == ACTION_CLOSING)
{
if (game_status != GAME_MODE_MAIN)
if (action == ACTION_CLOSING)
{
if (game_status != GAME_MODE_MAIN)