summaryrefslogtreecommitdiff
path: root/ZAPD/ZRoom/Commands/SetLightingSettings.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>2021-03-07 15:01:48 -0300
committerGitHub <noreply@github.com>2021-03-07 13:01:48 -0500
commit1e67767cf988af08e79d8cea4ee1e4d47658fe29 (patch)
tree57b904cb43325ce1e91515384ac6e9283b659dd6 /ZAPD/ZRoom/Commands/SetLightingSettings.cpp
parentd9ba72302b1105d79a06c7da8d9c1bbb8ba2fceb (diff)
Fix collision extraction from actor's data (#85)
* Fix collision extraction if it is in actor's data Signed-off-by: Angie <angheloalf95@gmail.com> * Seg2Filespace to avoid duplicated code and rename the macro SEG2FILESPACE to GETSEGOFFSET Also, try to use the macros GETSEGOFFSET and GETSEGNUM as much as possible. Signed-off-by: angie <angheloalf95@gmail.com> * Reverse variables names Signed-off-by: angie <angheloalf95@gmail.com>
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetLightingSettings.cpp')
-rw-r--r--ZAPD/ZRoom/Commands/SetLightingSettings.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ZAPD/ZRoom/Commands/SetLightingSettings.cpp b/ZAPD/ZRoom/Commands/SetLightingSettings.cpp
index d7be8c9..5f8d4d4 100644
--- a/ZAPD/ZRoom/Commands/SetLightingSettings.cpp
+++ b/ZAPD/ZRoom/Commands/SetLightingSettings.cpp
@@ -9,7 +9,7 @@ using namespace std;
SetLightingSettings::SetLightingSettings(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDataIndex) : ZRoomCommand(nZRoom, rawData, rawDataIndex)
{
uint8_t numLights = rawData[rawDataIndex + 1];
- segmentOffset = SEG2FILESPACE(BitConverter::ToInt32BE(rawData, rawDataIndex + 4));
+ segmentOffset = GETSEGOFFSET(BitConverter::ToInt32BE(rawData, rawDataIndex + 4));
for (int i = 0; i < numLights; i++)
settings.push_back(new LightingSettings(rawData, segmentOffset + (i * 22)));