9eb78ec2
combat: thread ship through shield/evasion readouts
drawShieldsIndicator and drawEvasionReadout took no Ship and were calling NewPlayerShip() per frame to locate the Shields/Engines room. That allocates a 5-room slice each draw call and hides the coupling. Pass g.ship through instead — explicit interface (GPC1), zero alloc, and the renderer follows whatever layout main.go owns.
Eugene Blikh <bigbes@gmail.com> — 2026-04-28 01:26:10 UTC
Commit 9eb78ec264ebebe7636efb26e90876b9a67a24cb —
view raw patch
Parent(s):
5eed43f0
| File | Status | + | − |
|---|---|---|---|
main.go
|
M | +2 | -2 |
render.go
|
M | +4 | -6 |