projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed "level_nr" style global animations on level selection screen
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index 6d761f43b296ce0783c5889aa24472d1844d81e6..82cb8dd248fc461b09ed6d081119c984ebced894 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-315,7
+315,7
@@
int getAnimationFrame(int num_frames, int delay, int mode, int start_frame,
}
else if (mode & ANIM_LEVEL_NR) // play frames by level number
{
}
else if (mode & ANIM_LEVEL_NR) // play frames by level number
{
- int level_pos = level_nr -
leveldir_current->
first_level;
+ int level_pos = level_nr -
gfx.anim_
first_level;
frame = level_pos % num_frames;
}
frame = level_pos % num_frames;
}
@@
-398,8
+398,8
@@
static boolean isPausedOnPlayfieldOrDoor(struct GlobalAnimPartControlInfo *part)
if (!part->class_playfield_or_door)
return FALSE;
if (!part->class_playfield_or_door)
return FALSE;
- // only pause animations when engine is paused or request dialog is
open(ing)
- if (!tape.pausing && !game.request_active
_or_moving
)
+ // only pause animations when engine is paused or request dialog is
active
+ if (!tape.pausing && !game.request_active)
return FALSE;
return TRUE;
return FALSE;
return TRUE;
@@
-2122,8
+2122,7
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
int mode_nr;
int i;
int mode_nr;
int i;
- // check game modes in reverse draw order (to stop when clicked)
- for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--)
+ for (mode_nr = 0; mode_nr < NUM_GAME_MODES; mode_nr++)
{
struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr];
int anim_nr;
{
struct GlobalAnimControlInfo *ctrl = &global_anim_ctrl[mode_nr];
int anim_nr;
@@
-2139,6
+2138,11
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event)
{
struct GlobalAnimPartControlInfo *part = &anim->part[part_nr];
{
struct GlobalAnimPartControlInfo *part = &anim->part[part_nr];
+ // if request dialog is active, only handle pointer-style animations
+ if (game.request_active &&
+ part->control_info.class != get_hash_from_key("pointer"))
+ continue;
+
if (clicked_event == ANIM_CLICKED_RESET)
{
part->clicked = FALSE;
if (clicked_event == ANIM_CLICKED_RESET)
{
part->clicked = FALSE;