From 727c0b81adcd9fc1812c48cc16a027356cb69235 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 23 Jun 2019 19:43:33 +0200 Subject: [PATCH] HDB: More debug output for entity drawing --- engines/hdb/ai-funcs.cpp | 4 +- engines/hdb/ai-init.cpp | 94 ++++++++++++++++++++++++++++++++++++++++ engines/hdb/ai.h | 1 + 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index a04af9a677c..cfbe16670da 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -1081,7 +1081,7 @@ void AI::animEntFrames(AIEntity *e) { max = e->special1Frames; break; default: - warning("AI-FUNCS: animEntFrames: Unintended State"); + warning("AI-FUNCS: animEntFrames: Unintended State for entity %s", AIType2Str(e->type)); break; } @@ -1130,7 +1130,7 @@ void AI::drawEnts(int x, int y, int w, int h) { for (Common::Array::iterator it = _ents->begin(); it != _ents->end(); it++) { AIEntity *e = (*it); - debugN(5, "AI::drawEnts: enity %s(%d)...", AIType2Str(e->type), e->type); + debugN(5, "AI::drawEnts: enity %s(%d) state %s(%d)...", AIType2Str(e->type), e->type, AIState2Str(e->state), e->state); if (e->type == AI_LASER || e->type == AI_DIVERTER) { if (e->aiDraw) { diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp index 201c8fa05ae..8f4ed860ec4 100644 --- a/engines/hdb/ai-init.cpp +++ b/engines/hdb/ai-init.cpp @@ -1088,4 +1088,98 @@ const char *AIType2Str(AIType v) { return AITypeStr[v]; } +const char *AIStateStr[] = { + "STATE_NONE", + "STATE_STANDDOWN", + "STATE_STANDUP", + "STATE_STANDLEFT", + "STATE_STANDRIGHT", + "STATE_BLINK", + "STATE_MOVEUP", + "STATE_MOVEDOWN", + "STATE_MOVELEFT", + "STATE_MOVERIGHT", + "STATE_DYING", + "STATE_DEAD", + "STATE_HORRIBLE1", + "STATE_HORRIBLE2", + "STATE_HORRIBLE3", + "STATE_HORRIBLE4", + "STATE_GOODJOB", + "STATE_PLUMMET", + + "STATE_PUSHUP", + "STATE_PUSHDOWN", + "STATE_PUSHLEFT", + "STATE_PUSHRIGHT", + "STATE_GRABUP", + "STATE_GRABDOWN", + "STATE_GRABLEFT", + "STATE_GRABRIGHT", + "STATE_ATK_CLUB_UP", + "STATE_ATK_CLUB_DOWN", + "STATE_ATK_CLUB_LEFT", + "STATE_ATK_CLUB_RIGHT", + "STATE_ATK_STUN_DOWN", + "STATE_ATK_STUN_UP", + "STATE_ATK_STUN_LEFT", + "STATE_ATK_STUN_RIGHT", + "STATE_ATK_SLUG_DOWN", + "STATE_ATK_SLUG_UP", + "STATE_ATK_SLUG_LEFT", + "STATE_ATK_SLUG_RIGHT", + + "STATE_FLOATING", + "STATE_FLOATDOWN", + "STATE_FLOATUP", + "STATE_FLOATLEFT", + "STATE_FLOATRIGHT", + "STATE_MELTED", + "STATE_SLIDING", + "STATE_SHOCKING", + "STATE_EXPLODING", + + "STATE_USEDOWN", + "STATE_USEUP", + "STATE_USELEFT", + "STATE_USERIGHT", + + "STATE_MEER_MOVE", + "STATE_MEER_APPEAR", + "STATE_MEER_BITE", + "STATE_MEER_DISAPPEAR", + "STATE_MEER_LOOK", + + "STATE_ICEP_PEEK", + "STATE_ICEP_APPEAR", + "STATE_ICEP_THROWDOWN", + "STATE_ICEP_THROWRIGHT", + "STATE_ICEP_THROWLEFT", + "STATE_ICEP_DISAPPEAR", + + "STATE_LICKDOWN", + "STATE_LICKLEFT", + "STATE_LICKRIGHT", + + "STATE_DIVERTER_BL", + "STATE_DIVERTER_BR", + "STATE_DIVERTER_TL", + "STATE_DIVERTER_TR", + + "STATE_KISSRIGHT", + "STATE_KISSLEFT", + "STATE_ANGRY", + "STATE_PANIC", + "STATE_LAUGH", + "STATE_DOLLYUSERIGHT", + + "STATE_YELL", + + "STATE_ENDSTATES" +}; + +const char *AIState2Str(AIState v) { + return AIStateStr[v]; +} + } // End of Namespace diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index db0869f0fde..03d0b5ea30e 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -953,6 +953,7 @@ private: }; const char *AIType2Str(AIType v); +const char *AIState2Str(AIState v); } // End of Namespace