widescreen: cinematic letterbox bars span the render width
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d5e3da549a
commit
4ebcac713a
2 files changed
+15
No files matched your search
@@ -236,6 +236,16 @@ void PatchLabelArea(int width, int height) {
|
||||
static_cast<int>(std::size(game::addr::kLabelAreaPushes)) * 2);
|
||||
}
|
||||
|
||||
// Cinematic bars span the screen width.
|
||||
void PatchLetterbox(int width) {
|
||||
int patched = 0;
|
||||
for (uint32_t site : game::addr::kLetterboxRightImmediates) {
|
||||
patched += re::PatchInstructionDword(site, FloatBits(1024.0f), FloatBits(static_cast<float>(width)));
|
||||
}
|
||||
re::Log("widescreen: %d/%d letterbox immediates patched", patched,
|
||||
static_cast<int>(std::size(game::addr::kLetterboxRightImmediates)));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void ApplyRenderSize(game::DxDisplayMode& mode, HWND window) {
|
||||
@@ -287,6 +297,7 @@ void ApplyRenderSize(game::DxDisplayMode& mode, HWND window) {
|
||||
PatchCenterImmediates(width, height);
|
||||
PatchGrannyOrthoPushes(width, height);
|
||||
PatchLabelArea(width, height);
|
||||
PatchLetterbox(width);
|
||||
}
|
||||
const double scaleX = width / kOriginalWidth;
|
||||
const double scaleY = height / kOriginalHeight;
|
||||
|
||||
Reference in new issue
Block a user