mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
PINK: add proper implementation of Actor init function
This commit is contained in:
parent
44efa90377
commit
f7693d3971
@ -58,7 +58,7 @@ void Actor::saveState(Archive &archive) {
|
||||
archive.writeString(actionName);
|
||||
}
|
||||
|
||||
void Actor::init(bool unk) {
|
||||
void Actor::init(bool paused) {
|
||||
if (!_action)
|
||||
_action = findAction(kIdleAction);
|
||||
|
||||
@ -66,7 +66,8 @@ void Actor::init(bool unk) {
|
||||
_isActionEnded = 1;
|
||||
} else {
|
||||
_isActionEnded = 0;
|
||||
_action->start(unk);
|
||||
_action->start();
|
||||
_action->pause(paused);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +169,7 @@ void Actor::setAction(Action *newAction) {
|
||||
_action = newAction;
|
||||
if (newAction) {
|
||||
_isActionEnded = 0;
|
||||
_action->start(0);
|
||||
_action->start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
void loadState(Archive &archive);
|
||||
void saveState(Archive &archive);
|
||||
|
||||
virtual void init(bool unk);
|
||||
virtual void init(bool paused);
|
||||
bool initPallete(Director *director);
|
||||
|
||||
void toConsole() override ;
|
||||
|
@ -65,7 +65,7 @@ void HandlerTimerActions::handle(Actor *actor) {
|
||||
uint index = rnd.getRandomNumber(_actions.size() - 1);
|
||||
Action *action = actor->findAction(_actions[index]);
|
||||
assert(action);
|
||||
actor->setAction(action, 0);
|
||||
actor->setAction(action);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ void WalkMgr::start(WalkLocation *destination) {
|
||||
WalkShortestPath path(this);
|
||||
WalkLocation *nextLocation = path.next(currentLocation, _destination);
|
||||
initNextWayPoint(nextLocation);
|
||||
_leadActor->setAction(getWalkAction(), 0);
|
||||
_leadActor->setAction(getWalkAction());
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ WalkMgr::Coordinates WalkMgr::getLocationCoordinates(const Common::String &locat
|
||||
Coordinates coords;
|
||||
ActionCEL *action = static_cast<ActionCEL*>(_leadActor->findAction(locationName));
|
||||
|
||||
action->start(0);
|
||||
action->start();
|
||||
CelDecoder *decoder = action->getDecoder();
|
||||
|
||||
coords.x = decoder->getX() + decoder->getWidth() / 2;
|
||||
@ -132,7 +132,7 @@ void WalkMgr::update() {
|
||||
WalkLocation *next = path.next(findLocation(_current.name), _destination);
|
||||
if (next) {
|
||||
initNextWayPoint(next);
|
||||
_leadActor->setAction(getWalkAction(), 0);
|
||||
_leadActor->setAction(getWalkAction());
|
||||
} else
|
||||
end();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user