Add alternate logos.
Tweak assets.lua2p to put them in their own table.
|
@ -12,9 +12,6 @@ Glove = playdate.graphics.image.new("images/game/Glove.png")
|
||||||
PlayerFrown = playdate.graphics.image.new("images/game/PlayerFrown.png")
|
PlayerFrown = playdate.graphics.image.new("images/game/PlayerFrown.png")
|
||||||
--selene: allow(unused_variable)
|
--selene: allow(unused_variable)
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
BaseLogo = playdate.graphics.image.new("images/game/BaseLogo.png")
|
|
||||||
--selene: allow(unused_variable)
|
|
||||||
--selene: allow(unscoped_variables)
|
|
||||||
GloveHoldingBall = playdate.graphics.image.new("images/game/GloveHoldingBall.png")
|
GloveHoldingBall = playdate.graphics.image.new("images/game/GloveHoldingBall.png")
|
||||||
--selene: allow(unused_variable)
|
--selene: allow(unused_variable)
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
|
@ -33,9 +30,6 @@ PlayerSmile = playdate.graphics.image.new("images/game/PlayerSmile.png")
|
||||||
Minimap = playdate.graphics.image.new("images/game/Minimap.png")
|
Minimap = playdate.graphics.image.new("images/game/Minimap.png")
|
||||||
--selene: allow(unused_variable)
|
--selene: allow(unused_variable)
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
FrownLogo = playdate.graphics.image.new("images/game/FrownLogo.png")
|
|
||||||
--selene: allow(unused_variable)
|
|
||||||
--selene: allow(unscoped_variables)
|
|
||||||
GrassBackground = playdate.graphics.image.new("images/game/GrassBackground.png")
|
GrassBackground = playdate.graphics.image.new("images/game/GrassBackground.png")
|
||||||
--selene: allow(unused_variable)
|
--selene: allow(unused_variable)
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
|
@ -58,3 +52,35 @@ BootTuneOrgany = playdate.sound.sampleplayer.new("music/BootTuneOrgany.wav")
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
TinnyBackground = playdate.sound.sampleplayer.new("music/TinnyBackground.wav")
|
TinnyBackground = playdate.sound.sampleplayer.new("music/TinnyBackground.wav")
|
||||||
|
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Logos = {
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Cats = playdate.graphics.image.new("images/game/logos/Cats.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Hearts = playdate.graphics.image.new("images/game/logos/Hearts.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Checkmarks = playdate.graphics.image.new("images/game/logos/Checkmarks.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Smiles = playdate.graphics.image.new("images/game/logos/Smiles.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
FingerGuns = playdate.graphics.image.new("images/game/logos/FingerGuns.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Base = playdate.graphics.image.new("images/game/logos/Base.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Frown = playdate.graphics.image.new("images/game/logos/Frown.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Arrows = playdate.graphics.image.new("images/game/logos/Arrows.png"),
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Turds = playdate.graphics.image.new("images/game/logos/Turds.png"),
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
!(function dirLookup(dir, extension, newFunc)
|
!(function dirLookup(dir, extension, newFunc, sep)
|
||||||
|
sep = sep or "\n"
|
||||||
--Open directory look for files, save data in p. By giving '-type f' as parameter, it returns all files.
|
--Open directory look for files, save data in p. By giving '-type f' as parameter, it returns all files.
|
||||||
local p = io.popen('find src/' .. dir .. ' -type f')
|
local p = io.popen('find src/' .. dir .. ' -type f -maxdepth 1')
|
||||||
|
|
||||||
local assetCode = ""
|
local assetCode = ""
|
||||||
--Loop through all files
|
--Loop through all files
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
file = file:gsub("src/", "")
|
file = file:gsub("src/", "")
|
||||||
assetCode = assetCode .. '--selene: allow(unused_variable)\n'
|
assetCode = assetCode .. '--selene: allow(unused_variable)\n'
|
||||||
assetCode = assetCode .. '--selene: allow(unscoped_variables)\n'
|
assetCode = assetCode .. '--selene: allow(unscoped_variables)\n'
|
||||||
assetCode = assetCode .. varName .. ' = ' .. newFunc .. '("' .. file .. '")\n'
|
assetCode = assetCode .. varName .. ' = ' .. newFunc .. '("' .. file .. '")' .. sep
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return assetCode
|
return assetCode
|
||||||
|
@ -23,3 +24,8 @@ end)!!(generatedFileWarning())
|
||||||
!!(dirLookup('images/game', 'png', 'playdate.graphics.image.new'))
|
!!(dirLookup('images/game', 'png', 'playdate.graphics.image.new'))
|
||||||
!!(dirLookup('sounds', 'wav', 'playdate.sound.sampleplayer.new'))
|
!!(dirLookup('sounds', 'wav', 'playdate.sound.sampleplayer.new'))
|
||||||
!!(dirLookup('music', 'wav', 'playdate.sound.sampleplayer.new'))
|
!!(dirLookup('music', 'wav', 'playdate.sound.sampleplayer.new'))
|
||||||
|
--selene: allow(unused_variable)
|
||||||
|
--selene: allow(unscoped_variables)
|
||||||
|
Logos = {
|
||||||
|
!!(dirLookup('images/game/logos', 'png', 'playdate.graphics.image.new', ",\n"))
|
||||||
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ function buildCollection(base, back, logo, isDark)
|
||||||
end
|
end
|
||||||
|
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
AwayTeamSprites = buildCollection(DarkPlayerBase, DarkPlayerBack, BaseLogo, true)
|
AwayTeamSprites = buildCollection(DarkPlayerBase, DarkPlayerBack, Logos.Base, true)
|
||||||
|
|
||||||
--selene: allow(unscoped_variables)
|
--selene: allow(unscoped_variables)
|
||||||
HomeTeamSprites = buildCollection(LightPlayerBase, LightPlayerBack, FrownLogo, false)
|
HomeTeamSprites = buildCollection(LightPlayerBase, LightPlayerBack, Logos.Frown, false)
|
||||||
|
|
After Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
After Width: | Height: | Size: 596 B |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 598 B |