diff --git a/src/assets.lua b/src/assets.lua index b921f7e..4ff3650 100644 --- a/src/assets.lua +++ b/src/assets.lua @@ -12,9 +12,6 @@ Glove = playdate.graphics.image.new("images/game/Glove.png") PlayerFrown = playdate.graphics.image.new("images/game/PlayerFrown.png") --selene: allow(unused_variable) --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") --selene: allow(unused_variable) --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") --selene: allow(unused_variable) --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") --selene: allow(unused_variable) --selene: allow(unscoped_variables) @@ -58,3 +52,35 @@ BootTuneOrgany = playdate.sound.sampleplayer.new("music/BootTuneOrgany.wav") --selene: allow(unscoped_variables) 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"), + +} diff --git a/src/assets.lua2p b/src/assets.lua2p index 37459b3..431b745 100644 --- a/src/assets.lua2p +++ b/src/assets.lua2p @@ -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. - local p = io.popen('find src/' .. dir .. ' -type f') + local p = io.popen('find src/' .. dir .. ' -type f -maxdepth 1') local assetCode = "" --Loop through all files @@ -10,7 +11,7 @@ file = file:gsub("src/", "") assetCode = assetCode .. '--selene: allow(unused_variable)\n' assetCode = assetCode .. '--selene: allow(unscoped_variables)\n' - assetCode = assetCode .. varName .. ' = ' .. newFunc .. '("' .. file .. '")\n' + assetCode = assetCode .. varName .. ' = ' .. newFunc .. '("' .. file .. '")' .. sep end end return assetCode @@ -23,3 +24,8 @@ end)!!(generatedFileWarning()) !!(dirLookup('images/game', 'png', 'playdate.graphics.image.new')) !!(dirLookup('sounds', '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")) +} diff --git a/src/draw/player.lua b/src/draw/player.lua index 4ded261..bde0fdc 100644 --- a/src/draw/player.lua +++ b/src/draw/player.lua @@ -52,7 +52,7 @@ function buildCollection(base, back, logo, isDark) end --selene: allow(unscoped_variables) -AwayTeamSprites = buildCollection(DarkPlayerBase, DarkPlayerBack, BaseLogo, true) +AwayTeamSprites = buildCollection(DarkPlayerBase, DarkPlayerBack, Logos.Base, true) --selene: allow(unscoped_variables) -HomeTeamSprites = buildCollection(LightPlayerBase, LightPlayerBack, FrownLogo, false) +HomeTeamSprites = buildCollection(LightPlayerBase, LightPlayerBack, Logos.Frown, false) diff --git a/src/images/game/logos/Arrows.png b/src/images/game/logos/Arrows.png new file mode 100644 index 0000000..d21d3a0 Binary files /dev/null and b/src/images/game/logos/Arrows.png differ diff --git a/src/images/game/BaseLogo.png b/src/images/game/logos/Base.png similarity index 100% rename from src/images/game/BaseLogo.png rename to src/images/game/logos/Base.png diff --git a/src/images/game/logos/Cats.png b/src/images/game/logos/Cats.png new file mode 100644 index 0000000..6412e51 Binary files /dev/null and b/src/images/game/logos/Cats.png differ diff --git a/src/images/game/logos/Checkmarks.png b/src/images/game/logos/Checkmarks.png new file mode 100644 index 0000000..515dd68 Binary files /dev/null and b/src/images/game/logos/Checkmarks.png differ diff --git a/src/images/game/logos/FingerGuns.png b/src/images/game/logos/FingerGuns.png new file mode 100644 index 0000000..4f3c275 Binary files /dev/null and b/src/images/game/logos/FingerGuns.png differ diff --git a/src/images/game/FrownLogo.png b/src/images/game/logos/Frown.png similarity index 100% rename from src/images/game/FrownLogo.png rename to src/images/game/logos/Frown.png diff --git a/src/images/game/logos/Hearts.png b/src/images/game/logos/Hearts.png new file mode 100644 index 0000000..0662d71 Binary files /dev/null and b/src/images/game/logos/Hearts.png differ diff --git a/src/images/game/logos/Smiles.png b/src/images/game/logos/Smiles.png new file mode 100644 index 0000000..2ba4c54 Binary files /dev/null and b/src/images/game/logos/Smiles.png differ diff --git a/src/images/game/logos/Turds.png b/src/images/game/logos/Turds.png new file mode 100644 index 0000000..7493de0 Binary files /dev/null and b/src/images/game/logos/Turds.png differ