From 3ae128d4c37b18786e77e16bbd53ecf22ebfb454 Mon Sep 17 00:00:00 2001 From: Trebor-Huang <2300936257@qq.com> Date: Mon, 1 Nov 2021 10:00:39 +0800 Subject: [PATCH] Revert `init.lua` --- Zframework/init.lua | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index e4468094..665334e1 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -1,17 +1,8 @@ NONE={}function NULL()end EDITING="" LOADED=false -TEST_MODE=false ERRDATA={} ---Test script ---[[ - Yield a number to sleep for that many frames, otherwise just do it! - We will set the script after we load stuff. ---]] -TESTS = nil -TEST_SLEEP = 0 - --Pure lua modules (basic) COLOR= require'Zframework.color' TABLE= require'Zframework.tableExtend' @@ -409,12 +400,6 @@ function love.errorhandler(msg) love.audio.stop() gc.reset() - --In test mode, we fail early - if TEST_MODE then - print("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nWe are in test mode, so we error out. The error message is:\n"..msg.."\27[91m\nAborting\27[0m") - love.event.quit(1) - end - if LOADED and #ERRDATA<3 then BG.set('none') local scn=SCN and SCN.cur or"NULL" @@ -548,14 +533,6 @@ function love.run() love.resize(gc.getWidth(),gc.getHeight()) - -- Argument parsing - -- TODO: currently very simple, only support one argument - for i, c in ipairs(arg) do - if c=='--test' then - TEST_MODE = true - end - end - --Scene Launch while #SCN.stack>0 do SCN.pop()end SCN.push('quit','slowFade') @@ -715,18 +692,6 @@ function love.run() end end - --Execute testing tasks - if TEST_MODE then - if TEST_SLEEP > 0 then - TEST_SLEEP = TEST_SLEEP - 1 - else - TEST_SLEEP = TESTS() - if TEST_SLEEP == nil then - love.event.quit(0) - end - end - end - --Keep 60fps _=timer()-lastFrame if _<.0162 then WAIT(.0162-_)end