more cleanup

This commit is contained in:
2023-08-02 00:09:54 +03:00
parent 4c0117b6a7
commit 5613744d6e
3 changed files with 17 additions and 18 deletions

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)