-
refactor: split render.rs, move game logic to core, type command structs
paavohtl +1: Claude Opus 4.6 (1M context) Major restructuring of the render subsystem:
Module split — DLL render.rs (1463 lines) split into:
- render/render_queue.rs: enqueue hook trampolines + install
- render/display_vtable.rs: vtable patch stubs + install
- render/mod.rs: thin re-export
Game logic moved to openwa-core (~1140 lines):
- bitgrid/blit.rs: blit routing (8bpp, 1-bit, generic fallback)
- render/display/blit_sprite.rs: BlitSprite + DrawScaledSprite
- render/bungee_trail.rs: bungee trail rendering
- render/crosshair_line.rs: crosshair line rendering
- render/display/destructor.rs: headless_destructor
- trig.rs: interpolated trig table lookup (sin_lookup, cos_lookup)
Render command struct type improvements:
- Position fields: u32 → Fixed (repr-transparent, layout-compatible)
- Sprite fields: u32 → SpriteOp in DrawSpriteOffsetCmd
- Pointer fields: u32 → *mut DisplayBitGrid / *const TiledBitmapSource
- Named all param_N/_reserved fields from dispatcher semantics
(ref_z, src_x/y/w/h, color, mode, flags, etc.)
Also…