mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-23 07:19:53 -04:00
fix mirrored shops / projection
This commit is contained in:
@@ -1572,10 +1572,22 @@ BOOL dShopSystem_c::checkShopOpen() {
|
||||
}
|
||||
|
||||
bool dShopSystem_c::checkLeftTrigger(STControl* i_stick) {
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
return i_stick->checkRightTrigger();
|
||||
}
|
||||
#endif
|
||||
|
||||
return i_stick->checkLeftTrigger();
|
||||
}
|
||||
|
||||
bool dShopSystem_c::checkRightTrigger(STControl* i_stick) {
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
return i_stick->checkLeftTrigger();
|
||||
}
|
||||
#endif
|
||||
|
||||
return i_stick->checkRightTrigger();
|
||||
}
|
||||
|
||||
|
||||
@@ -108,6 +108,12 @@ void mDoLib_project(Vec* src, Vec* dst) {
|
||||
}
|
||||
|
||||
dst->x = ((0.5f + (multVec.x * calcFloat)) * xSize) + xOffset;
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
dst->x = ((0.5f + (-multVec.x * calcFloat)) * xSize) + xOffset;
|
||||
}
|
||||
#endif
|
||||
|
||||
dst->y = ((0.5f + (multVec.y * (-calcFloat))) * ySize) + yOffset;
|
||||
}
|
||||
|
||||
@@ -171,6 +177,12 @@ void mDoLib_project(Vec* src, Vec* dst, JGeometry::TBox2<f32> viewport) {
|
||||
}
|
||||
|
||||
dst->x = ((0.5f + (multVec.x * calcFloat)) * xSize) + xOffset;
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.enableMirrorMode) {
|
||||
dst->x = ((0.5f + (-multVec.x * calcFloat)) * xSize) + xOffset;
|
||||
}
|
||||
#endif
|
||||
|
||||
dst->y = ((0.5f + (multVec.y * (-calcFloat))) * ySize) + yOffset;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user