Widescreen experiment: native render size via dxwrapper, classic menus
- mods/widescreen: redirect the world view's reads of the 1024.0/768.0
constants and the 3D ortho extents to our variables; render size =
monitor; relocate the world view's tile draw list (1750 entries, no
bounds check) into an enlarged object (16384 entries).
- mods/dxwrapper: route DirectDraw through dxwrapper (Dd7to9, D3D9) since
Windows' D3D7 cannot render to targets larger than 2048; fix the game's
device info GUID pointer that dxwrapper's enumeration leaves invalid.
Pinned release fetched by CMake (hash-checked), installed next to the DLL.
- Main menu (UI thread) and loading screen render in a 1024x768 viewport
and are presented scaled ("classic" layout); in-game uses the full size.
- re/patch: verified code patches (operand redirect, push immediates,
displacements) and startup hooks; build.ps1/CMake download fixes.
In-game view untested yet; HUD still at the top-left.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c8dc689bc6
commit
795fe8f087
19 files changed
+860
-28
No files matched your search
@@ -59,6 +59,27 @@ Elsewhere (unknown / UI, leave alone for now): `0x40694a`, `0x4ec036`,
|
||||
|
||||
`0x60c1f7`, `0x60da54`, `0x625039`, `0x6283b3`, `0x62858d`, `0x628d3b`.
|
||||
|
||||
## Other frame producers (laid out for 1024x768: "classic" frames)
|
||||
|
||||
| Address | What | Thread |
|
||||
|---|---|---|
|
||||
| `0x00756940` | `cUI_Manager` thread loop: main menu (clear, update, BeginScene `0x646f50`, UI render `0x7587b0` incl. the menu's 3D scene, EndScene `0x646fd0`, Flip) | own UI thread |
|
||||
| `0x006469d0` | loading screen: GDI BitBlt of bitmap + progress bar + text into the back buffer (fixed 1024x768) | render thread |
|
||||
| `0x006a0c60` | video/intro playback (unexamined) | |
|
||||
|
||||
The widescreen mod gives these frames a 1024x768 D3D viewport (set at
|
||||
`BeginScene` when the scene depth `+0x1d8` is 0) and the borderless mod
|
||||
presents only that area, scaled to the monitor.
|
||||
|
||||
## Direct3D 7 render target limit
|
||||
|
||||
Windows' D3D7 runtime refuses `IDirect3D7::CreateDevice` on any render
|
||||
target wider or taller than 2048 (`DDERR_INVALIDOBJECT`, 0x88760082),
|
||||
measured with a standalone test: 2048x1440 works, 2049x1440 / 2560x1080 /
|
||||
3440x1440 fail. Native ultrawide therefore needs dxwrapper (`Dd7to9`,
|
||||
D3D7 -> D3D9), see `src/mods/dxwrapper.cpp`; without it the render size is
|
||||
clamped to 2048.
|
||||
|
||||
## Renderer
|
||||
|
||||
`DxDriver7::SetDisplayMode` (`0x00645390`) creates back buffer, z-buffer and
|
||||
|
||||
Reference in new issue
Block a user