widescreen: label areas and remaining world->screen centres

- Alt object labels and floating texts are packed into a 1024x768 area
  (push 300h/400h at 0x6272f8 and 0x60e940): widened to the render size.
- Screen centre immediates in the light/effect position list (0x41b1xx..)
  and the floating text (damage number) projection 0x41e460/0x41eaf0 now use
  the render centre; lights were offset from the player before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-14 04:16:16 +02:00
1 parent 6f10ccdfad
commit 52c67f51c6
2 files changed
+22

No files matched your search

+12
View File
@@ -225,6 +225,17 @@ void PatchGrannyOrthoPushes(int width, int height) {
static_cast<int>(std::size(game::addr::kGrannyOrthoPushSequences)) * 4);
}
// Labels are laid out within the screen; widen their area.
void PatchLabelArea(int width, int height) {
int patched = 0;
for (uint32_t site : game::addr::kLabelAreaPushes) {
patched += re::PatchPushImm32(site + 0, 0x300, static_cast<uint32_t>(height));
patched += re::PatchPushImm32(site + 5, 0x400, static_cast<uint32_t>(width));
}
re::Log("widescreen: %d/%d label area immediates patched", patched,
static_cast<int>(std::size(game::addr::kLabelAreaPushes)) * 2);
}
} // namespace
void ApplyRenderSize(game::DxDisplayMode& mode, HWND window) {
@@ -275,6 +286,7 @@ void ApplyRenderSize(game::DxDisplayMode& mode, HWND window) {
if (!g_pushesPatched) {
PatchCenterImmediates(width, height);
PatchGrannyOrthoPushes(width, height);
PatchLabelArea(width, height);
}
const double scaleX = width / kOriginalWidth;
const double scaleY = height / kOriginalHeight;