mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Renaming and moving some modules
This commit is contained in:
108
load.lua
Normal file
108
load.lua
Normal file
@@ -0,0 +1,108 @@
|
||||
-- Bigint library
|
||||
bigint = require "libs.bigint.bigint"
|
||||
number_names = require "libs.bigint.named-powers-of-ten"
|
||||
|
||||
-- Fonts
|
||||
FONT_tromi = love.graphics.newFont('res/fonts/monofonto rg.otf', 28)
|
||||
FONT_big = love.graphics.newFont('res/fonts/monofonto rg.otf', 56)
|
||||
|
||||
-- GRAPHICS
|
||||
BACKGROUNDS = {
|
||||
[0] = love.graphics.newVideo("res/backgrounds/green_waterfall.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/water.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/green_streams.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/streams.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/red_forest_waterfall.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/flowers_rain.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/moonlight_tree.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/lisa_frank.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/snowy_trees.ogv", {audio=false}),
|
||||
love.graphics.newVideo("res/backgrounds/snowy_cabin.ogv", {audio=false}),
|
||||
}
|
||||
|
||||
|
||||
BLOCKS = {
|
||||
["2tie"] = {
|
||||
R = love.graphics.newImage("res/img/r.png"),
|
||||
O = love.graphics.newImage("res/img/o.png"),
|
||||
Y = love.graphics.newImage("res/img/y.png"),
|
||||
G = love.graphics.newImage("res/img/g.png"),
|
||||
C = love.graphics.newImage("res/img/b.png"),
|
||||
B = love.graphics.newImage("res/img/i.png"),
|
||||
M = love.graphics.newImage("res/img/v.png"),
|
||||
F = love.graphics.newImage("res/img/bl.png"),
|
||||
A = love.graphics.newImage("res/img/bl.png"),
|
||||
X = love.graphics.newImage("res/img/t.png"),
|
||||
W = love.graphics.newImage("res/img/w.png"),
|
||||
R_d = love.graphics.newImage("res/img/r_d.png"),
|
||||
O_d = love.graphics.newImage("res/img/o_d.png"),
|
||||
Y_d = love.graphics.newImage("res/img/y_d.png"),
|
||||
G_d = love.graphics.newImage("res/img/g_d.png"),
|
||||
C_d = love.graphics.newImage("res/img/b_d.png"),
|
||||
B_d = love.graphics.newImage("res/img/i_d.png"),
|
||||
M_d = love.graphics.newImage("res/img/v_d.png"),
|
||||
}
|
||||
}
|
||||
|
||||
COLOUR_SCHEMES = {
|
||||
Arika = {
|
||||
I = "R",
|
||||
L = "O",
|
||||
J = "B",
|
||||
S = "M",
|
||||
Z = "G",
|
||||
O = "Y",
|
||||
T = "C",
|
||||
}
|
||||
}
|
||||
|
||||
-- BGMs and SFXs
|
||||
SOUNDS = {
|
||||
bottom = love.audio.newSource("res/se/bottom.wav", "static"),
|
||||
lock = love.audio.newSource("res/se/lock.wav", "static"),
|
||||
erase = love.audio.newSource("res/se/erase.wav", "static"),
|
||||
fall = love.audio.newSource("res/se/fall.wav", "static"),
|
||||
ready = love.audio.newSource("res/se/ready.wav", "static"),
|
||||
promote = love.audio.newSource("res/se/promote.wav", "static"),
|
||||
demote = love.audio.newSource("res/se/demote.wav", "static"),
|
||||
autopromote = love.audio.newSource("res/se/autopromote.wav", "static"),
|
||||
bgm_firsthalf = love.audio.newSource("res/bgm/firsthalf.flac", "static"),
|
||||
bgm_secondhalf = love.audio.newSource("res/bgm/secondhalf.flac", "static"),
|
||||
bgm_title = love.audio.newSource("res/bgm/title.flac", "static")
|
||||
}
|
||||
|
||||
function PlaySE(sound, subsound)
|
||||
if sound ~= nil then
|
||||
if subsound ~= nil then
|
||||
SOUNDS[sound][subsound]:setVolume(0.4)
|
||||
if SOUNDS[sound][subsound]:isPlaying() then
|
||||
SOUNDS[sound][subsound]:stop()
|
||||
end
|
||||
SOUNDS[sound][subsound]:play()
|
||||
else
|
||||
SOUNDS[sound]:setVolume(0.4)
|
||||
if SOUNDS[sound]:isPlaying() then
|
||||
SOUNDS[sound]:stop()
|
||||
end
|
||||
SOUNDS[sound]:play()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function PlaySEOnce(sound, subsound)
|
||||
if sound ~= nil then
|
||||
if subsound ~= nil then
|
||||
SOUNDS[sound][subsound]:setVolume(0.4)
|
||||
if SOUNDS[sound][subsound]:isPlaying() then
|
||||
return
|
||||
end
|
||||
SOUNDS[sound][subsound]:play()
|
||||
else
|
||||
SOUNDS[sound]:setVolume(0.4)
|
||||
if SOUNDS[sound]:isPlaying() then
|
||||
return
|
||||
end
|
||||
SOUNDS[sound]:play()
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user