more cleanup

This commit is contained in:
thefish committed 2023-08-02 00:09:54 +03:00
1 parent 4c0117b6a7
commit 5613744d6e
3 files changed
+17 -18

No files matched your search

+2 -2
View File
@@ -46,7 +46,7 @@ func NewLevelRenderSystem(
return trs
}
//fixme add to screens/game Exit()
// fixme add to screens/game Exit()
func (trs LevelRenderSystem) Close() {
trs.animateTiles.Stop()
trs.animateTiles = nil //zero pointer to ticker
@@ -93,7 +93,7 @@ func (trs LevelRenderSystem) Process() {
//terrain
for y := 0; y < trs.Viewport.H; y++ {
for x := 0; x < trs.Viewport.W; x++ {
mapCoords := types.Coords{trs.Viewport.CameraCoords.X + x, trs.Viewport.CameraCoords.Y + y}
mapCoords := types.Coords{X: trs.Viewport.CameraCoords.X + x, Y: trs.Viewport.CameraCoords.Y + y}
if trs.state.Level.InBounds(mapCoords) {
tile := trs.state.Level.GetTile(mapCoords)