docs: screen-space overlays and activity distance
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
52c67f51c6
commit
2760b35829
1 file changed
+29
-6
+29
-6
@@ -115,16 +115,39 @@ only grows horizontally. `[widescreen] Height=0` renders natively 1:1
|
||||
game logic (camera follow `0x44d9f0`) converts world -> screen -> view with
|
||||
the device's current projection; unpatched it sent the camera off-world
|
||||
|
||||
## Screen-space overlays
|
||||
|
||||
- Alt object labels (`0x627260`) and floating texts / damage numbers (32
|
||||
slots, drawn from the render loop at `0x60e940` via `0x41e460`) are packed
|
||||
without overlap into a screen-sized area (`0x662300`, `push 300h / 400h`):
|
||||
widened to the render size (`kLabelAreaPushes`).
|
||||
- More world -> screen conversions with integer centre immediates
|
||||
(`x - camera + 200h`): the light/effect list at `+0xce14` (`0x41b1xx`)
|
||||
and the floating texts (`0x41e560`, inverse `0x41eaf0`). Unpatched, lights
|
||||
were offset from the player.
|
||||
- Left alone: `push 300h / 400h` at `0x4cc7d3`, `0x5d7bb7` (1024x768 textures),
|
||||
`0x60e869` (GDI BitBlt), `0x613859..` (screenshot pixel conversion), and
|
||||
200h/180h pairs at `0x52bab7`, `0x52c6c0`, `0x6c...-0x72...` (UI windows,
|
||||
1024 layout).
|
||||
|
||||
## Activity (simulation) distance
|
||||
|
||||
The world is split into sectors of 64x64 tiles (`cSector`, manager
|
||||
`**0xad3bc0`, sector pointers at `+0x240`, flags `+0x30`: `0x10000` loaded,
|
||||
`0x800` active, tile origin `+0x44 / +0x48`). The 3x3 sectors around the
|
||||
player's sector are active (`Sector[%4d] Active (3x3 sectors)`, test
|
||||
`0x638ff0`); about 80 are loaded. Measured in game: 9 active sectors, origins
|
||||
64 tiles apart.
|
||||
|
||||
With 96x48 px tiles, a sector spans 6144 px horizontally and 3072 px
|
||||
vertically, so the active block reaches at least that far beyond the player's
|
||||
sector in every direction. The widened view needs at most +-1835 x +-768 px
|
||||
(1835x768 at zoom 2), so everything visible is simulated; nothing to change.
|
||||
|
||||
## Open questions
|
||||
|
||||
- Above ~2300 px render width (between 2304 and 2816) the player is not drawn
|
||||
although monsters are (`cCreature::vf14` still called). Not hit at the
|
||||
default size; some per-view limit of ~40 tile columns, not found yet.
|
||||
- HUD: drawn in the top-left 1024x768 of the render target; 3D belt items
|
||||
use the scaled HUD projection and sit off their slots.
|
||||
|
||||
- Activity radius: which creatures/objects are updated and animated
|
||||
(`cWorld` / `cSector`, `0x00603e90` = player?, `0x005fe060` = object by id).
|
||||
- Fixed-size per-view buffers (e.g. `+0x80e40`, 5 vectors at `+0x96ad0` with
|
||||
capacity 0x200) - do they overflow at 3440x1440 (47 columns x 54 rows)?
|
||||
- Mouse picking (screen -> world).
|
||||
Reference in new issue
Block a user