diff options
| author | Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl> | 2021-03-07 15:01:48 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-07 13:01:48 -0500 |
| commit | 1e67767cf988af08e79d8cea4ee1e4d47658fe29 (patch) | |
| tree | 57b904cb43325ce1e91515384ac6e9283b659dd6 /ZAPD/ZRoom/Commands/SetPathways.cpp | |
| parent | d9ba72302b1105d79a06c7da8d9c1bbb8ba2fceb (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/SetPathways.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetPathways.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ZAPD/ZRoom/Commands/SetPathways.cpp b/ZAPD/ZRoom/Commands/SetPathways.cpp index 08f745d..6795d99 100644 --- a/ZAPD/ZRoom/Commands/SetPathways.cpp +++ b/ZAPD/ZRoom/Commands/SetPathways.cpp @@ -14,7 +14,7 @@ SetPathways::SetPathways(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDat segmentOffset = 0; listSegmentOffset = 0; - InitList(SEG2FILESPACE(BitConverter::ToInt32BE(rawData, rawDataIndex + 4))); + InitList(GETSEGOFFSET(BitConverter::ToInt32BE(rawData, rawDataIndex + 4))); uint32_t currentPtr = listSegmentOffset; @@ -31,7 +31,7 @@ SetPathways::~SetPathways() void SetPathways::InitList(uint32_t address) { segmentOffset = address; - listSegmentOffset = SEG2FILESPACE(BitConverter::ToInt32BE(_rawData, address + 4)); + listSegmentOffset = GETSEGOFFSET(BitConverter::ToInt32BE(_rawData, address + 4)); numPoints = _rawData[address + 0]; } |
