Skip to content

Commit

Permalink
refactor debug: got rid of globals, remod unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
D0NM committed Jun 6, 2021
1 parent 2435c62 commit 5daeb46
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/debug/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ function dp(str1, str2)
end

-- Print delta x and delta time
__x = 0
__anim = 0
__time = 0
local __x = 0
local __anim = 0
local __time = 0
function dpdi(self, text) -- reset delta
__x = self.x
__anim = self.sprite.curAnim
Expand All @@ -79,7 +79,7 @@ function dpd(self, text) -- print current delta on animation change
end
end

dboc = {}
local dboc = {}
dboc[0] = { x = 0, y = 0, z = 0, time = 0 }
function dpoInit(o)
if not isDebug() then
Expand Down Expand Up @@ -292,11 +292,6 @@ function clearDebugBoxes()
end
end

function watchDebugVariables()
if isDebug() then
end
end

function drawDebugUnitHurtBoxUnder(sprite, x, y, frame, scale)
if isDebug(SHOW_DEBUG_BOXES) then
local scale = scale or 1
Expand Down

0 comments on commit 5daeb46

Please sign in to comment.