mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-14 16:07:39 +00:00
TWINE: cleanup in move script
This commit is contained in:
parent
8340c196e5
commit
bd4fa2e708
@ -704,6 +704,7 @@ void Animations::processAnimActions(int32 actorIdx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: convert to boolean
|
||||||
int32 Animations::initAnim(AnimationTypes newAnim, int16 animType, uint8 animExtra, int32 actorIdx) {
|
int32 Animations::initAnim(AnimationTypes newAnim, int16 animType, uint8 animExtra, int32 actorIdx) {
|
||||||
ActorStruct *actor = _engine->_scene->getActor(actorIdx);
|
ActorStruct *actor = _engine->_scene->getActor(actorIdx);
|
||||||
if (actor->entity == -1) {
|
if (actor->entity == -1) {
|
||||||
|
@ -81,11 +81,10 @@ static int32 mANIM(TwinEEngine *engine, ScriptContext& ctx) {
|
|||||||
AnimationTypes animIdx = (AnimationTypes) * (scriptPtr++);
|
AnimationTypes animIdx = (AnimationTypes) * (scriptPtr++);
|
||||||
if (engine->_animations->initAnim(animIdx, 0, 0, ctx.actorIdx)) {
|
if (engine->_animations->initAnim(animIdx, 0, 0, ctx.actorIdx)) {
|
||||||
ctx.actor->positionInMoveScript++;
|
ctx.actor->positionInMoveScript++;
|
||||||
} else {
|
return 0;
|
||||||
ctx.actor->positionInMoveScript = scriptPosition;
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
return 0;
|
ctx.actor->positionInMoveScript = scriptPosition;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*0x04*/
|
/*0x04*/
|
||||||
@ -138,7 +137,7 @@ static int32 mANGLE(TwinEEngine *engine, ScriptContext& ctx) {
|
|||||||
}
|
}
|
||||||
engine->_scene->currentScriptValue = *((int16 *)scriptPtr);
|
engine->_scene->currentScriptValue = *((int16 *)scriptPtr);
|
||||||
if (ctx.actor->move.numOfStep == 0) {
|
if (ctx.actor->move.numOfStep == 0) {
|
||||||
engine->_movements->moveActor(ctx.actor->angle, engine->_scene->currentScriptValue, ctx.actor->speed, move);
|
engine->_movements->moveActor(ctx.actor->angle, engine->_scene->currentScriptValue, ctx.actor->speed, &ctx.actor->move);
|
||||||
}
|
}
|
||||||
if (ctx.actor->angle == engine->_scene->currentScriptValue) {
|
if (ctx.actor->angle == engine->_scene->currentScriptValue) {
|
||||||
engine->_movements->clearRealAngle(ctx.actor);
|
engine->_movements->clearRealAngle(ctx.actor);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user