docs: document layer BitGrid objects in DisplayGfx
Browse filesDescribe the 0x4C-byte allocation, external_buffer pattern, and how
the acquire-render-lock helper populates these from the locked surface.
All observed access is within standard BitGrid offsets (0x00-0x28).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
crates/openwa-core/src/display/gfx.rs
CHANGED
|
@@ -97,12 +97,17 @@ pub struct DisplayGfx {
|
|
| 97 |
// =========================================================================
|
| 98 |
/// 0x3D98: Render lock flag. Set during rendering, cleared by FlushRender.
|
| 99 |
pub render_lock: u32,
|
| 100 |
-
/// 0x3D9C: Layer 0 —
|
| 101 |
-
///
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
pub layer_0: *mut DisplayBitGrid,
|
| 103 |
-
/// 0x3DA0: Layer 1 —
|
| 104 |
pub layer_1: *mut DisplayBitGrid,
|
| 105 |
-
/// 0x3DA4: Layer 2 —
|
| 106 |
pub layer_2: *mut DisplayBitGrid,
|
| 107 |
/// 0x3DA8: BitGrid vtable pointer (0x664144). Set in constructor.
|
| 108 |
pub bitgrid_vtable: *const c_void,
|
|
|
|
| 97 |
// =========================================================================
|
| 98 |
/// 0x3D98: Render lock flag. Set during rendering, cleared by FlushRender.
|
| 99 |
pub render_lock: u32,
|
| 100 |
+
/// 0x3D9C: Layer 0 — rendering context BitGrid (vtable 0x664144).
|
| 101 |
+
///
|
| 102 |
+
/// Allocated as 0x4C bytes (0x2C BitGrid + 0x20 unknown tail), but all observed
|
| 103 |
+
/// access is within BitGrid offsets (0x00-0x28). Initialized with `external_buffer=1`
|
| 104 |
+
/// and `cells_per_unit=8`; the acquire-render-lock helper (0x56A370) populates
|
| 105 |
+
/// `data`/`width`/`height`/`row_stride` from the locked DDDisplayWrapper surface.
|
| 106 |
+
/// `set_clip_rect` mirrors DisplayBase's clip rect into this BitGrid's clip fields.
|
| 107 |
pub layer_0: *mut DisplayBitGrid,
|
| 108 |
+
/// 0x3DA0: Layer 1 — same layout as layer_0.
|
| 109 |
pub layer_1: *mut DisplayBitGrid,
|
| 110 |
+
/// 0x3DA4: Layer 2 — same layout, but also initialized via BitGrid::Init(8, 128, 128).
|
| 111 |
pub layer_2: *mut DisplayBitGrid,
|
| 112 |
/// 0x3DA8: BitGrid vtable pointer (0x664144). Set in constructor.
|
| 113 |
pub bitgrid_vtable: *const c_void,
|