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/SetCollisionHeader.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/SetCollisionHeader.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetCollisionHeader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp b/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp index 7141abf..7f03708 100644 --- a/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp +++ b/ZAPD/ZRoom/Commands/SetCollisionHeader.cpp @@ -8,7 +8,7 @@ using namespace std; SetCollisionHeader::SetCollisionHeader(ZRoom* nZRoom, std::vector<uint8_t> rawData, int rawDataIndex) : ZRoomCommand(nZRoom, rawData, rawDataIndex) { - segmentOffset = SEG2FILESPACE(BitConverter::ToInt32BE(rawData, rawDataIndex + 4)); + segmentOffset = GETSEGOFFSET(BitConverter::ToInt32BE(rawData, rawDataIndex + 4)); collisionHeader = ZCollisionHeader(nZRoom->parent, StringHelper::Sprintf("%sCollisionHeader0x%06X", nZRoom->GetName().c_str(), segmentOffset), rawData, segmentOffset); } |
