[Scummvm-git-logs] scummvm master -> 74e5684257b632cdf56565dc86b3dd3d11584170
aquadran
noreply at scummvm.org
Sun Jun 5 20:14:47 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:
74e5684257 GRIM: Added Lua V1 'GetCameraPosition' opcode
Commit: 74e5684257b632cdf56565dc86b3dd3d11584170
https://github.com/scummvm/scummvm/commit/74e5684257b632cdf56565dc86b3dd3d11584170
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2022-06-05T22:14:43+02:00
Commit Message:
GRIM: Added Lua V1 'GetCameraPosition' opcode
Changed paths:
engines/grim/emi/lua_v2.cpp
engines/grim/emi/lua_v2.h
engines/grim/lua_v1.cpp
engines/grim/lua_v1_set.cpp
diff --git a/engines/grim/emi/lua_v2.cpp b/engines/grim/emi/lua_v2.cpp
index d7d118c3072..97ce8f14122 100644
--- a/engines/grim/emi/lua_v2.cpp
+++ b/engines/grim/emi/lua_v2.cpp
@@ -301,13 +301,6 @@ void Lua_V2::Display() {
// dummy
}
-void Lua_V2::GetCameraPosition() {
- Set::Setup *setup = g_grim->getCurrSet()->getCurrSetup();
- lua_pushnumber(setup->_pos.x());
- lua_pushnumber(setup->_pos.y());
- lua_pushnumber(setup->_pos.z());
-}
-
void Lua_V2::GetCameraPitch() {
Set *set = g_grim->getCurrSet();
if (set == nullptr) {
diff --git a/engines/grim/emi/lua_v2.h b/engines/grim/emi/lua_v2.h
index c3802c535ef..b151de4728a 100644
--- a/engines/grim/emi/lua_v2.h
+++ b/engines/grim/emi/lua_v2.h
@@ -135,7 +135,7 @@ protected:
DECLARE_LUA_OPCODE(ImPause) override;
DECLARE_LUA_OPCODE(ImResume) override;
DECLARE_LUA_OPCODE(GetSectorName);
- DECLARE_LUA_OPCODE(GetCameraPosition) override;
+ DECLARE_LUA_OPCODE(GetCameraPosition);
DECLARE_LUA_OPCODE(GetCameraYaw);
DECLARE_LUA_OPCODE(YawCamera);
DECLARE_LUA_OPCODE(GetCameraPitch);
diff --git a/engines/grim/lua_v1.cpp b/engines/grim/lua_v1.cpp
index f8ddac30018..8b696715093 100644
--- a/engines/grim/lua_v1.cpp
+++ b/engines/grim/lua_v1.cpp
@@ -790,10 +790,6 @@ void Lua_V1::GetCameraLookVector() {
warning("Stub function: GetCameraLookVector");
}
-void Lua_V1::GetCameraPosition() {
- warning("Stub function: GetCameraPosition");
-}
-
#define STUB_FUNC(name) void name() {}
// Stub functions not used in games
diff --git a/engines/grim/lua_v1_set.cpp b/engines/grim/lua_v1_set.cpp
index fbc748e5638..d18797fe302 100644
--- a/engines/grim/lua_v1_set.cpp
+++ b/engines/grim/lua_v1_set.cpp
@@ -471,4 +471,11 @@ void Lua_V1::TurnLightOn() {
}
}
+void Lua_V1::GetCameraPosition() {
+ Set::Setup *setup = g_grim->getCurrSet()->getCurrSetup();
+ lua_pushnumber(setup->_pos.x());
+ lua_pushnumber(setup->_pos.y());
+ lua_pushnumber(setup->_pos.z());
+}
+
} // end of namespace Grim
More information about the Scummvm-git-logs
mailing list