HDB: More debug output for entity drawing

This commit is contained in:
Eugene Sandulenko 2019-06-23 19:43:33 +02:00
parent f3bfdf4295
commit 727c0b81ad
3 changed files with 97 additions and 2 deletions

View File

@ -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<AIEntity *>::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) {

View File

@ -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

View File

@ -953,6 +953,7 @@ private:
};
const char *AIType2Str(AIType v);
const char *AIState2Str(AIState v);
} // End of Namespace