From 1fa1b64984312844a34c742ea5a1cc3304736878 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 14 Sep 2007 12:49:09 +0000 Subject: [PATCH] Some more opcode simplifications svn-id: r28902 --- engines/saga/sfuncs.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 356121001c5..62ae2e45cc4 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1299,10 +1299,9 @@ void Script::sfResumeBgdAnim(SCRIPTFUNC_PARAMS) { // Param6: flags void Script::sfThrowActor(SCRIPTFUNC_PARAMS) { ActorData *actor = _vm->_actor->getActor(thread->pop()); - Location location; - location.x = thread->pop(); - location.y = thread->pop(); - location.z = actor->_location.z; + actor->_finalTarget.x = thread->pop(); + actor->_finalTarget.y = thread->pop(); + actor->_finalTarget.z = actor->_location.z; thread->pop(); // not used int32 actionCycle = thread->pop(); int16 flags = thread->pop(); @@ -1313,7 +1312,6 @@ void Script::sfThrowActor(SCRIPTFUNC_PARAMS) { actor->_fallVelocity = - (actor->_fallAcceleration * actor->_actionCycle) / 2; actor->_fallPosition = actor->_location.z << 4; - actor->_finalTarget = location; actor->_actionCycle--; if (!(flags & kWalkAsync)) { thread->waitWalk(actor); @@ -1343,9 +1341,7 @@ void Script::sfScriptSceneID(SCRIPTFUNC_PARAMS) { // Param2: scene number void Script::sfChangeActorScene(SCRIPTFUNC_PARAMS) { ActorData *actor = _vm->_actor->getActor(thread->pop()); - int32 sceneNumber = thread->pop(); - - actor->_sceneNumber = sceneNumber; + actor->_sceneNumber = thread->pop(); } // Script function #56 (0x38)