Camera fix

This commit is contained in:
MaddoScientisto 2024-04-27 17:41:11 +02:00
commit 93f95683c5
4 changed files with 654 additions and 72 deletions

View file

@ -108,18 +108,30 @@ particles = {}
function _draw()
cls(0)
camera(cirnoInstance.x - 240, cirnoInstance.y - 135)
foreach(LAYERS, render_layer)
mouse_debug.draw(4, tile_width, tile_height)
local mx,my = mouse()
camera()
mouse_debug.draw(mx,my,4, tile_width, tile_height)
-- Draw UI
draw_ui()
weapons_manager.debug_draw()
end
function draw_ui()
print(string.format("Actors: %d", count(actors)),0,32+8)
print(string.format("%.4f %dfps",stat(1),stat(7)),2,16,5)
end
include(make_path("error_explorer") .. ".lua")
function spawn_objects()
local width = 32
@ -149,7 +161,6 @@ function spawn_objects()
end
end
function get_actor_from_sprite(sprite)