projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added some debug output for triggered global animations (deactivated)
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index cb415db928da6663342e55362da38db7ead0caf5..cb2dc8816789d722f60e419e35dc54fd784d7bb5 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-19,6
+19,9
@@
#include "screens.h"
#include "screens.h"
+#define DEBUG_ANIM_EVENTS 0
+
+
// values for global toon animation definition
#define NUM_GLOBAL_TOON_ANIMS 1
#define NUM_GLOBAL_TOON_PARTS MAX_NUM_TOONS
// values for global toon animation definition
#define NUM_GLOBAL_TOON_ANIMS 1
#define NUM_GLOBAL_TOON_PARTS MAX_NUM_TOONS
@@
-113,6
+116,7
@@
struct GlobalAnimPartControlInfo
boolean init_event_state;
boolean anim_event_state;
boolean init_event_state;
boolean anim_event_state;
+ boolean triggered;
boolean clickable;
boolean clicked;
boolean clickable;
boolean clicked;
@@
-1095,9
+1099,14
@@
static void InitGlobalAnim_Triggered(struct GlobalAnimPartControlInfo *part,
if (isClickablePart(part2, mask))
{
if (isClickablePart(part2, mask))
{
- part2->
click
ed = TRUE;
+ part2->
trigger
ed = TRUE;
*anything_clicked = clickConsumed(part); // click was on "part"!
*anything_clicked = clickConsumed(part); // click was on "part"!
+#if DEBUG_ANIM_EVENTS
+ printf("::: => %d.%d TRIGGERED BY %d.%d\n",
+ part2->old_anim_nr + 1, part2->old_nr + 1,
+ part->old_anim_nr + 1, part->old_nr + 1);
+#endif
#if 0
printf("::: %d.%d TRIGGER CLICKED [%d]\n", anim2_nr, part2_nr,
part2->control_info.anim_event_action);
#if 0
printf("::: %d.%d TRIGGER CLICKED [%d]\n", anim2_nr, part2_nr,
part2->control_info.anim_event_action);
@@
-1600,6
+1609,10
@@
static void InitGlobalAnim_Clickable(void)
{
struct GlobalAnimPartControlInfo *part = &anim->part[part_nr];
{
struct GlobalAnimPartControlInfo *part = &anim->part[part_nr];
+ if (part->triggered)
+ part->clicked = TRUE;
+
+ part->triggered = FALSE;
part->clickable = FALSE;
}
}
part->clickable = FALSE;
}
}
@@
-1646,6
+1659,11
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked)
// always handle "any" click events (clicking anywhere on screen) ...
if (isClickablePart(part, ANIM_EVENT_ANY))
{
// always handle "any" click events (clicking anywhere on screen) ...
if (isClickablePart(part, ANIM_EVENT_ANY))
{
+#if DEBUG_ANIM_EVENTS
+ printf("::: => %d.%d TRIGGERED BY ANY\n",
+ part->old_anim_nr + 1, part->old_nr + 1);
+#endif
+
part->clicked = TRUE;
anything_clicked = clickConsumed(part);
}
part->clicked = TRUE;
anything_clicked = clickConsumed(part);
}
@@
-1670,6
+1688,11
@@
static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked)
if (isClickablePart(part, ANIM_EVENT_SELF))
{
if (isClickablePart(part, ANIM_EVENT_SELF))
{
+#if DEBUG_ANIM_EVENTS
+ printf("::: => %d.%d TRIGGERED BY SELF\n",
+ part->old_anim_nr + 1, part->old_nr + 1);
+#endif
+
part->clicked = TRUE;
anything_clicked = clickConsumed(part);
}
part->clicked = TRUE;
anything_clicked = clickConsumed(part);
}