mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-17 15:33:23 +00:00
HDB: Add entityFace()
This commit is contained in:
parent
f2150cd89a
commit
016e0baca8
@ -1619,16 +1619,6 @@ void AI::animEntFrames(AIEntity *e) {
|
||||
}
|
||||
}
|
||||
|
||||
void AI::animLuaEntity(const char *initName, AIState st) {
|
||||
for (Common::Array<AIEntity *>::iterator it = _ents->begin(); it != _ents->end(); it++) {
|
||||
if (Common::matchString((*it)->entityName, initName)) {
|
||||
(*it)->state = st;
|
||||
(*it)->animFrame = 0;
|
||||
(*it)->animDelay = (*it)->animCycle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AI::drawEnts(int x, int y, int w, int h) {
|
||||
|
||||
static int stunAnim = 0;
|
||||
@ -1814,6 +1804,19 @@ void AI::animGrabbing() {
|
||||
_player->animFrame = 5;
|
||||
}
|
||||
|
||||
void AI::entityFace(const char *luaName, int dir) {
|
||||
AIEntity *e = locateEntity(luaName);
|
||||
e->dir = (AIDir)dir;
|
||||
|
||||
switch (e->dir) {
|
||||
case DIR_UP: e->state = STATE_STANDUP; break;
|
||||
case DIR_DOWN: e->state = STATE_STANDDOWN; break;
|
||||
case DIR_LEFT: e->state = STATE_STANDLEFT; break;
|
||||
case DIR_RIGHT: e->state = STATE_STANDRIGHT; break;
|
||||
case DIR_NONE: break;
|
||||
}
|
||||
}
|
||||
|
||||
void AI::moveEnts() {
|
||||
static int frameDelay = kAnimFrameDelay;
|
||||
AIEntity *e;
|
||||
|
@ -760,6 +760,7 @@ public:
|
||||
void drawEnts(int x, int y, int w, int h);
|
||||
void drawLevel2Ents();
|
||||
void animGrabbing();
|
||||
void entityFace(const char *luaName, int dir);
|
||||
|
||||
void moveEnts();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user