Fix scene stack and bump ver

This commit is contained in:
SweetSea
2024-10-27 05:56:40 +07:00
parent c0089fc4a5
commit b73c82c765
2 changed files with 4 additions and 25 deletions

View File

@@ -20,9 +20,6 @@ MOBILE = CURRENT_OS == "Android" or CURRENT_OS == "iOS"
LILY = require "libs.lily"
---@type table
local sceneStack -- Only use for checking scene stack, not
function love.load()
require 'funcs'
math.randomseed(os.time())
@@ -309,23 +306,12 @@ function love.run()
end
end
love.handlers[name](a,b,c,d,e,f)
-- Checking for new scene and add it to the end of scene stack
if SCENE ~= sceneStack[1] then
table.insert(sceneStack, SCENE)
SCENE = sceneStack[1]
end
end
end
if SCENE and SCENE.update and love.timer then
SCENE:update()
-- Checking for new scene and add it to the end of scene stack
if SCENE ~= sceneStack[1] then
table.insert(sceneStack, SCENE)
SCENE = sceneStack[1]
end
local frame_duration = 1.0 / TARGET_FPS
if time_accumulator < frame_duration then
@@ -346,12 +332,6 @@ function love.run()
time_accumulator = time_accumulator - frame_duration
end
last_time = love.timer.getTime()
-- Finally, changing to the latest scene in scene stack
if #sceneStack > 1 then
SCENE = sceneStack[#sceneStack]
sceneStack = {SCENE}
end
end
end
@@ -590,6 +570,5 @@ function MainBackground()
while main_bg_cur_color == main_bg_last_color do main_bg_cur_color = minos[love.math.random(1,7)] end
main_bg_cur_mino = 1
end
main_bg_placed = false
main_bg_draw_frame = main_bg_draw_frame + 1
end

View File

@@ -69,7 +69,7 @@ function Title2Scene:render()
love.graphics.rectangle("fill", 30, 165, 580, 225, 10, 10) -- Menu
drawBigText("Tromi", 40, 65, 100, "left")
drawText("Mobile 1.1 - PC 2.3", 150, 78, 200, "left")
drawText("Mobile 1.4 - PC 2.3", 150, 78, 200, "left")
drawText("https://mycophobia.org\nhttps://github.com/SweetSea-ButImNotSweet/", 40, 100, 300, "left")
if PENTO_MODE then