mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
HDB: Add animGrabbing()
This commit is contained in:
parent
d5dca7ea7c
commit
db838a656e
@ -1185,6 +1185,41 @@ void AI::drawEnts(int x, int y, int w, int h) {
|
||||
}
|
||||
}
|
||||
|
||||
void AI::animGrabbing() {
|
||||
if (_player->state == STATE_GRABUP ||
|
||||
_player->state == STATE_GRABDOWN ||
|
||||
_player->state == STATE_GRABLEFT ||
|
||||
_player->state == STATE_GRABRIGHT)
|
||||
return;
|
||||
|
||||
AIState s;
|
||||
|
||||
switch (_player->dir) {
|
||||
case DIR_UP:
|
||||
s = STATE_GRABUP;
|
||||
_player->draw = _getGfx[DIR_UP];
|
||||
break;
|
||||
case DIR_DOWN:
|
||||
s = STATE_GRABDOWN;
|
||||
_player->draw = _getGfx[DIR_DOWN];
|
||||
break;
|
||||
case DIR_LEFT:
|
||||
s = STATE_GRABLEFT;
|
||||
_player->draw = _getGfx[DIR_LEFT];
|
||||
break;
|
||||
case DIR_RIGHT:
|
||||
s = STATE_GRABRIGHT;
|
||||
_player->draw = _getGfx[DIR_RIGHT];
|
||||
break;
|
||||
default:
|
||||
warning("AI-FUNCS: animGrabbing: DIR_NONE found");
|
||||
break;
|
||||
}
|
||||
|
||||
_player->state = s;
|
||||
_player->animFrame = 5;
|
||||
}
|
||||
|
||||
bool AI::checkFloating(int x, int y) {
|
||||
for (Common::Array<AIEntity *>::iterator it = _floats->begin(); it != _floats->end(); it++) {
|
||||
if ((*it)->tileX == x && (*it)->tileY == y)
|
||||
|
@ -578,6 +578,7 @@ public:
|
||||
void animEntFrames(AIEntity *e);
|
||||
void animLuaEntity(const char *initName, AIState st);
|
||||
void drawEnts(int x, int y, int w, int h);
|
||||
void animGrabbing();
|
||||
|
||||
bool checkFloating(int x, int y);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user