about summary refs log tree commit diff stats
path: root/main.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-23 23:00:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-23 23:00:07 -0700
commite581a2b7d1175d0365aed2399537a2f2c4271099 (patch)
treebd88e31fabf4a9e24638e9b6bebd421a85279d3f /main.lua
parent8d5ac5da75b853e833c7ad5f18ce468eebc2aa0b (diff)
downloadtext.love-e581a2b7d1175d0365aed2399537a2f2c4271099.tar.gz
get rid of debug variables
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/main.lua b/main.lua
index d313da9..e2a0e95 100644
--- a/main.lua
+++ b/main.lua
@@ -85,8 +85,6 @@ Zoom = 1.5
 
 Filename = love.filesystem.getUserDirectory()..'/lines.txt'
 
-Debug_main = false
-
   -- still in App.initialize
   if #arg > 0 then
     Filename = arg[1]
@@ -125,10 +123,9 @@ function App.draw()
     line.y = nil
   end
   local y = 15
-  if Debug_main then print('== draw') end
+--?   print('== draw')
   for line_index,line in ipairs(Lines) do
---?     print(y, line_index, line)
-    if Debug_main then print('draw:', line_index, y) end
+--?     print('draw:', y, line_index, line)
     if y + math.floor(15*Zoom) > App.screen.height then break end
 --?     print('a')
     if line_index >= Screen_top1.line then
@@ -153,15 +150,14 @@ function App.draw()
         Drawing.draw(line)
         y = y + Drawing.pixels(line.h) + 10 -- padding
       else
-        if Debug_main then print('text') end
+--?         print('text')
         line.y = y
         y, Screen_bottom1.pos = Text.draw(line, Line_width, line_index)
         y = y + math.floor(15*Zoom)  -- text height
-        if Debug_main then print('aa', y) end
+--?         print('=> y', y)
       end
     end
   end
-  Debug_main = false
 --?   print('screen bottom: '..tostring(Screen_bottom1.pos)..' in '..tostring(Lines[Screen_bottom1.line].data))
 --?   os.exit(1)
 end
@@ -202,7 +198,6 @@ function App.textinput(t)
 end
 
 function App.keychord_pressed(chord)
---?   Debug_main = true
   if love.mouse.isDown('1') or chord:sub(1,2) == 'C-' then
     Drawing.keychord_pressed(chord)
   elseif chord == 'escape' and love.mouse.isDown('1') then