aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-03-11 15:14:16 -0400
committeriamcheeseman <[email protected]>2026-03-11 15:14:16 -0400
commitb941dc08244dfe62a6fb0f951c234b0eff736c74 (patch)
treee973d87ed0fb2e2d810ba1f5f657fc702d404742 /src
parent8121de73db8acfe5264fd6e0218dc5413ffac95d (diff)
Define `lg` and co as global
Convenience is nice.
Diffstat (limited to 'src')
-rw-r--r--src/ecs.lua1
-rw-r--r--src/init.lua5
-rw-r--r--src/phys.lua2
-rw-r--r--src/textures.lua1
4 files changed, 4 insertions, 5 deletions
diff --git a/src/ecs.lua b/src/ecs.lua
index 9f995b6..24603c0 100644
--- a/src/ecs.lua
+++ b/src/ecs.lua
@@ -1,4 +1,3 @@
-
local current_scene = nil
local comp_inits = {}
local comp_deinits = {}
diff --git a/src/init.lua b/src/init.lua
index 4764a2a..c284b71 100644
--- a/src/init.lua
+++ b/src/init.lua
@@ -17,8 +17,9 @@ register_input("Up", {{"key", "up"}, {"key", "w"}})
register_input("Right_Click", {{"mouse", 1}})
register_input("Left_Click", {{"mouse", 2}})
-local lg = love.graphics
-local lf = love.filesystem
+lg = love.graphics
+lf = love.filesystem
+lmath = love.math
local function load_dir(path)
local files = lf.getDirectoryItems(path)
diff --git a/src/phys.lua b/src/phys.lua
index a57bccd..8c4455c 100644
--- a/src/phys.lua
+++ b/src/phys.lua
@@ -159,5 +159,5 @@ end
function phys.Box:draw()
local x, y, w, h = self:get_rect()
- love.graphics.rectangle("line", x, y, w, h)
+ lg.rectangle("line", x, y, w, h)
end
diff --git a/src/textures.lua b/src/textures.lua
index 5a3a4f9..a263052 100644
--- a/src/textures.lua
+++ b/src/textures.lua
@@ -1,7 +1,6 @@
require "string"
local img_bank = {}
-local lf = love.filesystem
function load_textures_from(path)
path = path or "assets/images"
local files = lf.getDirectoryItems(path)