projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reverted order of processing game modes for global animations clicks
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index 6d761f43b296ce0783c5889aa24472d1844d81e6..dcd66e330f2862decf9856ccabd6c3ba97860a8b 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;
}
@@
-360,10
+360,8
@@
static int compareGlobalAnimPartControlInfo(const void *obj1, const void *obj2)
(struct GlobalAnimPartControlInfo *)obj2;
int compare_result;
(struct GlobalAnimPartControlInfo *)obj2;
int compare_result;
- if (o1->control_info.draw_order != o2->control_info.draw_order)
- compare_result = o1->control_info.draw_order - o2->control_info.draw_order;
- else
- compare_result = o1->nr - o2->nr;
+ // do not sort animations parts by draw order (as it would be confusing)
+ compare_result = o1->nr - o2->nr;
return compare_result;
}
return compare_result;
}
@@
-398,8
+396,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;
@@
-2139,6
+2137,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;