mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-04 18:28:45 -04:00
Fix map offset when toggling mirror mode (#938)
Co-authored-by: Nathan Mena <natemena153+git@gmail.com>
This commit is contained in:
@@ -223,6 +223,9 @@ private:
|
||||
/* 0x8F */ u8 field_0x8f;
|
||||
/* 0x90 */ u8 field_0x90;
|
||||
/* 0x91 */ u8 field_0x91;
|
||||
#if TARGET_PC
|
||||
bool previousMirror;
|
||||
#endif
|
||||
}; // Size: 0x94
|
||||
|
||||
class dMap_HIO_list_c : public dMpath_HIO_n::hioList_c {
|
||||
|
||||
@@ -1141,6 +1141,9 @@ dMap_c::dMap_c(int width, int height, int param_2, int param_3) {
|
||||
field_0x91 = 0;
|
||||
m_mySelfPointer = this;
|
||||
#endif
|
||||
#if TARGET_PC
|
||||
previousMirror = dusk::getSettings().game.enableMirrorMode;
|
||||
#endif
|
||||
|
||||
m_res = JKR_NEW_ARGS (0x20) dMap_prm_res_s;
|
||||
JUT_ASSERT(2559, m_res != NULL);
|
||||
@@ -1579,6 +1582,17 @@ bool dMap_c::isDrawRoomIcon(int param_0, int param_1) const {
|
||||
}
|
||||
|
||||
void dMap_c::_move(f32 i_centerX, f32 i_centerZ, int i_roomNo, f32 param_3) {
|
||||
#if TARGET_PC
|
||||
bool currentMirror = dusk::getSettings().game.enableMirrorMode;
|
||||
if (currentMirror != previousMirror) {
|
||||
previousMirror = currentMirror;
|
||||
if (currentMirror) {
|
||||
mCenterX -= 2.0f * mPackX;
|
||||
} else {
|
||||
mCenterX += 2.0f * mPackX;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (mStayRoomNo == -1) {
|
||||
mStayRoomNo = i_roomNo;
|
||||
field_0x80 = mStayRoomNo;
|
||||
|
||||
Reference in New Issue
Block a user