Commit baf8a5f57d593627996853b4139f38a9f73533a2
1 parent
2e75b9d4
Kiosk ready
Showing
2 changed files
with
18 additions
and
7 deletions
Show diff stats
game/main.lua
game/menu.lua
... | ... | @@ -55,15 +55,26 @@ function menu_load() |
55 | 55 | |
56 | 56 | birdquad = {love.graphics.newQuad(0, 0, 29, 16, 29, 32), love.graphics.newQuad(0, 16, 29, 16, 29, 32)} |
57 | 57 | |
58 | - scale = 8 | |
59 | - local w, h = love.graphics.getMode() | |
60 | - if w ~= 100*scale or h ~= 80*scale then | |
61 | - love.graphics.setMode(100*scale, 80*scale, false, true, 0) | |
62 | - end | |
58 | + if arg[3] then | |
59 | + scale = arg[3] | |
60 | + else | |
61 | + scale = 8 | |
62 | + end | |
63 | + if arg[4] then | |
64 | + fullscreen = true | |
65 | + else | |
66 | + fullscreen = false | |
67 | + end | |
68 | + | |
69 | + if not windowSet then | |
70 | + love.graphics.setMode(100*scale, 80*scale, fullscreen, true, 0) | |
71 | + windowSet = true | |
72 | + end | |
63 | 73 | love.graphics.setIcon( love.graphics.newImage("graphics/icon.png") ) |
64 | 74 | |
65 | 75 | bgmusic = love.audio.newSource("audio/trosong.ogg") |
66 | 76 | bgmusic:setLooping(true) |
77 | + bgmusic:setVolume(0) | |
67 | 78 | lasersound = love.audio.newSource("audio/laser.wav") |
68 | 79 | bigexplosionsound = love.audio.newSource("audio/bigexplosion.ogg") |
69 | 80 | explosionsound = love.audio.newSource("audio/explosion.wav") |
... | ... | @@ -76,6 +87,7 @@ function menu_load() |
76 | 87 | credits = love.audio.newSource("audio/credits.ogg") |
77 | 88 | approach = love.audio.newSource("audio/approach.ogg") |
78 | 89 | credits:setLooping(true) |
90 | + credits:setVolume(0) | |
79 | 91 | |
80 | 92 | skipupdate = true |
81 | 93 | shakeamount = 0 |
... | ... | @@ -113,7 +125,7 @@ function menu_load() |
113 | 125 | love.graphics.setBackgroundColor(153, 217, 234) |
114 | 126 | clouds = {} |
115 | 127 | bushes = {} |
116 | - -- love.audio.play(bgmusic) | |
128 | + love.audio.play(bgmusic) | |
117 | 129 | for i = 1, 5 do |
118 | 130 | table.insert(clouds, cloud:new(true)) |
119 | 131 | end | ... | ... |