[Scummvm-git-logs] scummvm master -> 58e2ca14810b9f7a81a7ef84932e3a073a4f83d3
aquadran
noreply at scummvm.org
Tue Jun 7 21:01:10 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
58e2ca1481 GRIM: Implemented opcode SetActorRoll
Commit: 58e2ca14810b9f7a81a7ef84932e3a073a4f83d3
https://github.com/scummvm/scummvm/commit/58e2ca14810b9f7a81a7ef84932e3a073a4f83d3
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-06-07T23:01:06+02:00
Commit Message:
GRIM: Implemented opcode SetActorRoll
Changed paths:
engines/grim/lua_v1_actor.cpp
diff --git a/engines/grim/lua_v1_actor.cpp b/engines/grim/lua_v1_actor.cpp
index 3412517d772..b3ced73b2e1 100644
--- a/engines/grim/lua_v1_actor.cpp
+++ b/engines/grim/lua_v1_actor.cpp
@@ -1278,6 +1278,18 @@ void Lua_V1::SetActorPitch() {
actor->setRot(pitch, actor->getYaw(), actor->getRoll());
}
+void Lua_V1::SetActorRoll() {
+ lua_Object actorObj = lua_getparam(1);
+ lua_Object rollObj = lua_getparam(2);
+
+ if (!lua_isuserdata(actorObj) || lua_tag(actorObj) != MKTAG('A','C','T','R'))
+ return;
+
+ Actor *actor = getactor(actorObj);
+ float roll = lua_getnumber(rollObj);
+ actor->setRot(actor->getPitch(), actor->getYaw(), roll);
+}
+
void Lua_V1::SetActorLookRate() {
lua_Object actorObj = lua_getparam(1);
lua_Object rateObj = lua_getparam(2);
@@ -1572,10 +1584,6 @@ void Lua_V1::SetActorClipActive() {
warning("Stub function: SetActorClipActive");
}
-void Lua_V1::SetActorRoll() {
- warning("Stub function: SetActorRoll");
-}
-
void Lua_V1::SetActorFrustrumCull() {
warning("Stub function: SetActorFrustrumCull");
}
More information about the Scummvm-git-logs
mailing list