Wrap map draw in camera.begin/finish so world-space transforms apply

Without the camera scope, maps.draw_map() rendered the map at
screen coords starting at (0,0) regardless of camera.set_target,
and screen_to_world's inverse produced bogus cell coords (mouse
in screen-center mapped to top-left tile). Spine-prototype's
render() shows the right pattern: world-space draws inside
camera.begin/finish, screen-space overlays after.
This commit is contained in:
Calic
2026-05-24 03:17:16 +02:00
parent 2e25833a93
commit e87948a3ca

View File

@@ -595,6 +595,8 @@ function update(ctx, dt)
end
function render(ctx)
camera.begin()
maps.draw_map()
ui.draw()
camera.finish()
ui.draw() -- screen-space overlays after camera ends
end