mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-04 11:19:58 -04:00
fixed dungeon map offset in mirror mode
This commit is contained in:
@@ -359,7 +359,14 @@ f32 dMenu_StageMapCtrl_c::getPixelStageSizeZ() const {
|
||||
|
||||
f32 dMenu_StageMapCtrl_c::getPixelCenterX() const {
|
||||
f32 var_f31 = dMpath_c::getCenterX();
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
return (1.0f / field_0xbc) * (field_0x9c + var_f31);
|
||||
}
|
||||
else return (1.0f / field_0xbc) * (field_0x9c - var_f31);
|
||||
#else
|
||||
return (1.0f / field_0xbc) * (field_0x9c - var_f31);
|
||||
#endif
|
||||
}
|
||||
|
||||
f32 dMenu_StageMapCtrl_c::getPixelCenterZ() const {
|
||||
@@ -418,7 +425,18 @@ inline static f32 rightModeCnvPos(f32 param_0) {
|
||||
void dMenu_StageMapCtrl_c::cnvPosTo2Dpos(f32 param_0, f32 param_1, f32* param_2,
|
||||
f32* param_3) const {
|
||||
if (param_2 != NULL) {
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
*param_2 =
|
||||
(0.5f * field_0x94) + rightModeCnvPos((1.0f / field_0xbc) * (field_0x9c + param_0));
|
||||
} else {
|
||||
*param_2 =
|
||||
(0.5f * field_0x94) + rightModeCnvPos((1.0f / field_0xbc) * (param_0 - field_0x9c));
|
||||
}
|
||||
#else
|
||||
*param_2 = (0.5f * field_0x94) + rightModeCnvPos((1.0f / field_0xbc) * (param_0 - field_0x9c));
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
if (param_3 != NULL) {
|
||||
@@ -915,7 +933,9 @@ void dMenu_StageMapCtrl_c::move() {
|
||||
|
||||
void dMenu_DmapMapCtrl_c::draw() {
|
||||
if (field_0xef != 0) {
|
||||
setPos(field_0xeb, field_0xec, field_0x9c, field_0xa0, field_0xbc, true, field_0xd8);
|
||||
setPos(field_0xeb, field_0xec,
|
||||
IF_DUSK(dusk::getSettings().game.enableMirrorMode ? -field_0x9c :) field_0x9c,
|
||||
field_0xa0, field_0xbc, true, field_0xd8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user