Commit baf8a5f57d593627996853b4139f38a9f73533a2
1 parent
2e75b9d4
Kiosk ready
Showing
2 changed files
with
18 additions
and
7 deletions
Show diff stats
game/main.lua
@@ -26,7 +26,6 @@ function love.load() | @@ -26,7 +26,6 @@ function love.load() | ||
26 | require "socket.http" | 26 | require "socket.http" |
27 | require "socket.url" | 27 | require "socket.url" |
28 | 28 | ||
29 | - love.graphics.setIcon( love.graphics.newImage("graphics/icon.png") ) | ||
30 | changegamestate("menu") | 29 | changegamestate("menu") |
31 | end | 30 | end |
32 | 31 |
game/menu.lua
@@ -55,15 +55,26 @@ function menu_load() | @@ -55,15 +55,26 @@ function menu_load() | ||
55 | 55 | ||
56 | birdquad = {love.graphics.newQuad(0, 0, 29, 16, 29, 32), love.graphics.newQuad(0, 16, 29, 16, 29, 32)} | 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 | love.graphics.setIcon( love.graphics.newImage("graphics/icon.png") ) | 73 | love.graphics.setIcon( love.graphics.newImage("graphics/icon.png") ) |
64 | 74 | ||
65 | bgmusic = love.audio.newSource("audio/trosong.ogg") | 75 | bgmusic = love.audio.newSource("audio/trosong.ogg") |
66 | bgmusic:setLooping(true) | 76 | bgmusic:setLooping(true) |
77 | + bgmusic:setVolume(0) | ||
67 | lasersound = love.audio.newSource("audio/laser.wav") | 78 | lasersound = love.audio.newSource("audio/laser.wav") |
68 | bigexplosionsound = love.audio.newSource("audio/bigexplosion.ogg") | 79 | bigexplosionsound = love.audio.newSource("audio/bigexplosion.ogg") |
69 | explosionsound = love.audio.newSource("audio/explosion.wav") | 80 | explosionsound = love.audio.newSource("audio/explosion.wav") |
@@ -76,6 +87,7 @@ function menu_load() | @@ -76,6 +87,7 @@ function menu_load() | ||
76 | credits = love.audio.newSource("audio/credits.ogg") | 87 | credits = love.audio.newSource("audio/credits.ogg") |
77 | approach = love.audio.newSource("audio/approach.ogg") | 88 | approach = love.audio.newSource("audio/approach.ogg") |
78 | credits:setLooping(true) | 89 | credits:setLooping(true) |
90 | + credits:setVolume(0) | ||
79 | 91 | ||
80 | skipupdate = true | 92 | skipupdate = true |
81 | shakeamount = 0 | 93 | shakeamount = 0 |
@@ -113,7 +125,7 @@ function menu_load() | @@ -113,7 +125,7 @@ function menu_load() | ||
113 | love.graphics.setBackgroundColor(153, 217, 234) | 125 | love.graphics.setBackgroundColor(153, 217, 234) |
114 | clouds = {} | 126 | clouds = {} |
115 | bushes = {} | 127 | bushes = {} |
116 | - -- love.audio.play(bgmusic) | 128 | + love.audio.play(bgmusic) |
117 | for i = 1, 5 do | 129 | for i = 1, 5 do |
118 | table.insert(clouds, cloud:new(true)) | 130 | table.insert(clouds, cloud:new(true)) |
119 | end | 131 | end |