Compare commits

..

1 Commits

Author SHA1 Message Date
DeaTh-G 92ccc1f298 Make advertise logo overlay aspect ratio aware 2026-02-01 18:24:25 +01:00
3 changed files with 18 additions and 8 deletions
@@ -1686,3 +1686,13 @@ void EndingTextPositionMidAsmHook(PPCRegister& r31, PPCRegister& f13)
else if (align == ALIGN_LEFT)
f13.f64 += 133.0 * (1.0 - g_aspectRatioNarrowScale);
}
// Offsets calculated by converting the 4:3 values to 16:9 space and then substracting the differences from the original 16:9 position.
// Afterward fact checked by overlaying a capture from the original hardware at 4:3 and a capture from recomp at 4:3.
void AdvertiseLogoPlacementMidAsmHook(PPCRegister& f0, PPCRegister& f13, PPCRegister& f12, PPCRegister& f11)
{
f0.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
f13.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
f12.f64 += -133.0f / 1280.0f * (1.0 - g_aspectRatioNarrowScale);
f11.f64 += 3.5f / 720.0f * (1.0 - g_aspectRatioNarrowScale);
}
+3 -8
View File
@@ -1255,14 +1255,9 @@ static void DrawConfigOptions()
case 3: // VIDEO
{
auto displayModeCount = (int32_t)GameWindow::GetDisplayModes().size();
auto canChangeWindowSize = !Config::Fullscreen && displayModeCount > 1;
auto windowSizeReason = &Localise("Options_Desc_NotAvailableFullscreen");
if (!Config::Fullscreen && displayModeCount <= 1)
windowSizeReason = &Localise("Options_Desc_NotAvailableHardware");
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize, canChangeWindowSize, windowSizeReason, 0, 0, displayModeCount - 1, false);
DrawConfigOption(rowCount++, yOffset, &Config::WindowSize,
!Config::Fullscreen, &Localise("Options_Desc_NotAvailableFullscreen"),
0, 0, (int32_t)GameWindow::GetDisplayModes().size() - 1, false);
auto displayCount = GameWindow::GetDisplayCount();
auto canChangeMonitor = Config::Fullscreen && displayCount > 1;
+5
View File
@@ -1153,3 +1153,8 @@ registers = ["f1"]
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
address = 0x82406774
registers = ["f1"]
[[midasm_hook]]
name = "AdvertiseLogoPlacementMidAsmHook"
address = 0x82B729A0
registers = ["f0", "f13", "f12", "f11"]