Skip to content

Remove unused code and honor effect rendering flags - #78

Merged
kivutar merged 3 commits into
mainfrom
cleanup/test-only-helpers
Oct 19, 2026
Merged

kivutar merged 3 commits into
mainfrom
cleanup/test-only-helpers

Conversation

@kivutar

@kivutar kivutar commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Remove production helpers kept alive only by tests, unused fields and arguments, and redundant window drawing wrappers. Tests now exercise the packet builders, resource loaders, and combat/render helpers used by the game; windows publish through their existing widget path.

Two effect fields represented missing rendering behavior rather than dead code. Sprite effects marked to render before entities now use an earlier pass, and moving effect shadows follow terrain height. Converted effect specifications are cached by ID so the two passes do not rebuild them every frame. The effect ID catalogue is preserved.

Validation: the full CGO_ENABLED=0 go test -tags nofakecgo ./... suite, go vet, and staticcheck pass. New tests cover effect ordering, moving-shadow height, and allocation-free warmed sprite-effect draws. A synthetic 200-tile effect benchmark reduced allocations from 515 KB to 54 KB per frame after caching. Tests requiring an explicitly configured client-data directory retain their existing skips; the effect changes have not yet been checked visually in game.

@kivutar kivutar changed the title Remove test-only production helpers and unused UI option Remove unused code and honor effect rendering flags Oct 18, 2026
@kivutar
kivutar merged commit 5a9e01a into main Oct 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant