mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Fix scene stack and bump ver
This commit is contained in:
21
main.lua
21
main.lua
@@ -20,9 +20,6 @@ MOBILE = CURRENT_OS == "Android" or CURRENT_OS == "iOS"
|
|||||||
|
|
||||||
LILY = require "libs.lily"
|
LILY = require "libs.lily"
|
||||||
|
|
||||||
---@type table
|
|
||||||
local sceneStack -- Only use for checking scene stack, not
|
|
||||||
|
|
||||||
function love.load()
|
function love.load()
|
||||||
require 'funcs'
|
require 'funcs'
|
||||||
math.randomseed(os.time())
|
math.randomseed(os.time())
|
||||||
@@ -309,23 +306,12 @@ function love.run()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
love.handlers[name](a,b,c,d,e,f)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if SCENE and SCENE.update and love.timer then
|
if SCENE and SCENE.update and love.timer then
|
||||||
SCENE:update()
|
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
|
local frame_duration = 1.0 / TARGET_FPS
|
||||||
if time_accumulator < frame_duration then
|
if time_accumulator < frame_duration then
|
||||||
@@ -346,12 +332,6 @@ function love.run()
|
|||||||
time_accumulator = time_accumulator - frame_duration
|
time_accumulator = time_accumulator - frame_duration
|
||||||
end
|
end
|
||||||
last_time = love.timer.getTime()
|
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
|
||||||
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
|
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
|
main_bg_cur_mino = 1
|
||||||
end
|
end
|
||||||
main_bg_placed = false
|
|
||||||
main_bg_draw_frame = main_bg_draw_frame + 1
|
main_bg_draw_frame = main_bg_draw_frame + 1
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ function Title2Scene:render()
|
|||||||
love.graphics.rectangle("fill", 30, 165, 580, 225, 10, 10) -- Menu
|
love.graphics.rectangle("fill", 30, 165, 580, 225, 10, 10) -- Menu
|
||||||
|
|
||||||
drawBigText("Tromi", 40, 65, 100, "left")
|
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")
|
drawText("https://mycophobia.org\nhttps://github.com/SweetSea-ButImNotSweet/", 40, 100, 300, "left")
|
||||||
|
|
||||||
if PENTO_MODE then
|
if PENTO_MODE then
|
||||||
|
|||||||
Reference in New Issue
Block a user