mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Compare commits
3 Commits
v.1.3.1.v.
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c6857bca9 | ||
|
|
0e8d3ceacc | ||
|
|
b73c82c765 |
@@ -41,7 +41,7 @@ local virtual_quad=setmetatable((function()
|
||||
empty_quad=gc_newQuad(0,0,1,1,5*w,2*w)
|
||||
for i,name in next,{
|
||||
'left','right','up','down','restart',
|
||||
'rotate_right','rotate_left','rotate_right2','rotate_left2'
|
||||
'rotate_left','rotate_right','rotate_left2','rotate_right2'
|
||||
} do if #name>0 then t[name]=gc_newQuad((i-1)%5*w,math.floor((i-1)/5)*w,w,w,5*w,2*w) end end
|
||||
return t
|
||||
end)(),{
|
||||
|
||||
21
main.lua
21
main.lua
@@ -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
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
local Object = require "libs.classic"
|
||||
|
||||
SCENE = Object:extend()
|
||||
|
||||
function SCENE:new() end
|
||||
function SCENE:update() end
|
||||
function SCENE:render() end
|
||||
|
||||
-- You can use the class SCENE_onInput to show suggestions for `e` table
|
||||
|
||||
---@class SCENE_onInput
|
||||
---@field type "key"|"joystick"|"virtual"|"touch"|"mouse"|"wheel"
|
||||
---
|
||||
---@field input? string # Action triggered<br>Only visible via keyboard and gamepad
|
||||
---@field key? love.KeyConstant Key pressed? Only visible via keyboard and gamepad
|
||||
---@field scancode? love.Scancode Key pressed but on the US layout? Only visible via keyboard and gamepad
|
||||
---
|
||||
---@field x? number Only visible via touch and mouse
|
||||
---@field y? number Only visible via touch and mouse
|
||||
---@field dx? number # Delta X<br> Only visible via touch, mouse and wheel
|
||||
---@field dy? number # Delta Y<br> Only visible via touch, mouse and wheel
|
||||
---@field id? lightuserdata # Only visible via touch
|
||||
---@field presses? number # Only visible via mouse
|
||||
|
||||
-- e in 4 below functions will contain different things based on it's type:
|
||||
-- key - input, key, scancode
|
||||
-- joystick - input, button, name
|
||||
-- virtual - input
|
||||
-- touch - x, y, dx, dy, id
|
||||
-- mouse - x, y, dx, dy, presses
|
||||
-- wheel - dx, dy
|
||||
|
||||
function SCENE:onInputMove(e) end
|
||||
function SCENE:onInputPress(e) end
|
||||
function SCENE:onInputRelease(e) end
|
||||
|
||||
GameScene = require "scene.game"
|
||||
TrainingScene = require "scene.training"
|
||||
NameEntryScene = require "scene.name_entry"
|
||||
|
||||
KeyConfigScene = require "scene.key_config"
|
||||
StickConfigScene = require "scene.stick_config"
|
||||
TouchConfigScene = require "scene.touch_config"
|
||||
TouchConfigPreviewScene = require "scene.touch_config_preview"
|
||||
InputConfigScene = require "scene.input_config"
|
||||
|
||||
ReplaySelectScene = require "scene.replay"
|
||||
ReplayTestScene = require"scene.replay_test"
|
||||
|
||||
FullscreenScene = require "scene.fullscreen"
|
||||
MusicToggleScene = require "scene.music_toggle"
|
||||
LinesToggleScene = require "scene.lines_toggle"
|
||||
|
||||
ExitScene = require "scene.exit"
|
||||
TitleScene = require "scene.title"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user