aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/hdb/ai.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h
index a2f59e9bea..d8a831c10d 100644
--- a/engines/hdb/ai.h
+++ b/engines/hdb/ai.h
@@ -694,6 +694,16 @@ struct CineBlit {
#define onEvenTile(x, y) ( !(x & 31) && !(y & 31) )
#define hitPlayer(x, y) ( e->onScreen && g_hdb->_ai->checkPlayerCollision( x, y, 4 ) && !g_hdb->_ai->playerDead() )
+#define cycleFrames( e, max ) \
+ { \
+ if ( e->animDelay-- < 1 ) \
+ { \
+ e->animDelay = e->animCycle; \
+ e->animFrame++; \
+ if ( e->animFrame >= max ) \
+ e->animFrame = 0; \
+ } \
+ }
#define spawnBlocking(x, y, level) g_hdb->_ai->spawn(AI_NONE, DIR_NONE, x, y, NULL, NULL, NULL, DIR_NONE, level, 0, 0, 0)
class AI {