app is now live, can communicate with driver
[?]
Nov 27, 2022, 10:27 PM
TBWAE64A6IIDDXKB6LXDI6WQYAAUYP2QRH3KLM3PUILMVL2BFTTACDependencies
- [2]
LRDM35CEapp running again - [3]
RXNR3U5EMerge text.love - [4]
KKMFQDR4editing source code from within the app - [5]
36Z442IVback to commit 8123959e52f without code editing - [6]
AVTNUQYRbasic test-enabled framework - [7]
DJSIRUMDa more radical attempt at ignoring nil y's - [8]
3QNOKBFMbeginnings of a test harness - [9]
AGJXIDOFhardcode some assumptions about how this app uses love - [10]
JOPVPUSAediting source code from within the app - [11]
2CTN2IEFMerge lines.love - [*]
OTIBCAUJlove2d scaffold
Change contents
- edit in main.lua at line 76
Text.redraw_all(Editor_state)Editor_state.selection1 = {} -- no support for shift drag while we're resizingEditor_state.right = App.screen.width-Margin_rightEditor_state.width = Editor_state.right-Editor_state.leftText.tweak_screen_top_and_cursor(Editor_state, Editor_state.left, Editor_state.right) - edit in main.lua at line 95
live.update(dt) - edit in live.lua at line 38
Live.Previous_read = 0 - replacement in live.lua at line 152
local f = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_app')local f = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_driver_app') - replacement in live.lua at line 161
local clear = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_app', 'w')local clear = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_driver_app', 'w') - replacement in live.lua at line 167
local f = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_driver', 'w')local f = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_app_driver', 'w') - edit in live.lua at line 176
function live.send_run_time_error(msg)local f = io.open(love.filesystem.getUserDirectory()..'/_love_akkartik_app_driver_run_time_error', 'w')if f == nil then return endf:write(msg)f:close()print('=>'..app.color(0, --[[red]]1))print(msg)print(app.reset_terminal())end - edit in live.lua at line 276
function live.run()love.load(love.arg.parseGameArguments(arg), arg)love.timer.step()local dt = 0 - edit in live.lua at line 277
return function()local status, result = xpcall(live.try_run, live.handle_error)return resultendend-- one iteration of the event loop - edit in live.lua at line 278
-- from https://love2d.org/wiki/love.runfunction live.try_run()if love.event thenlove.event.pump()for name, a,b,c,d,e,f in love.event.poll() doif name == 'quit' thenif not love.quit() thenreturn a or 0endendlove.handlers[name](a,b,c,d,e,f)endend-- updatedt = love.timer.step()love.update(dt)-- draw before update to give it a chance to mutate statelove.graphics.origin()love.graphics.clear(love.graphics.getBackgroundColor())love.draw()love.graphics.present()love.timer.sleep(0.001)-- returning nil continues the loopend-- return nil to continue the event loop, non-nil to quit - replacement in live.lua at line 291
live.send('ERROR '..stack_trace)live.send_run_time_error(stack_trace) - replacement in app.lua at line 3
-- Most apps can just use the default, but we need to override it to-- install a test harness.-- Most apps can just use the default (https://love2d.org/wiki/love.run), but-- we need to override it to install a test harness. - replacement in app.lua at line 26
return function()-- one iteration of the event loop-- return nil to continue the event loop, non-nil to quitApp.run_frame = function() - edit in app.lua at line 50
-- returning nil continues the loopend-- protect against runtime errorsreturn function()local status, result = xpcall(App.run_frame, live.handle_error)return result