Consolidate assets into src/assets/

This commit is contained in:
Sage Vaillancourt 2025-02-24 19:58:47 -05:00
parent 30aa5bd6c6
commit b4ac028cd9
61 changed files with 57 additions and 57 deletions

View File

@ -1,6 +1,6 @@
local gfx = playdate.graphics local gfx = playdate.graphics
local AnnouncementFont <const> = playdate.graphics.font.new("fonts/Roobert-20-Medium.pft") local AnnouncementFont <const> = playdate.graphics.font.new("assets/fonts/Roobert-20-Medium.pft")
local AnnouncementTransitionMs <const> = 300 local AnnouncementTransitionMs <const> = 300
local AnnouncerMarginX <const> = 26 local AnnouncerMarginX <const> = 26

View File

@ -3,169 +3,169 @@
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
BallBackground = playdate.graphics.image.new("images/game/BallBackground.png") BallBackground = playdate.graphics.image.new("assets/images/game/BallBackground.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
BigBat = playdate.graphics.image.new("images/game/BigBat.png") BigBat = playdate.graphics.image.new("assets/images/game/BigBat.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerAwayBack = playdate.graphics.image.new("images/game/DarkPlayerAwayBack.png") DarkPlayerAwayBack = playdate.graphics.image.new("assets/images/game/DarkPlayerAwayBack.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerAwayBase = playdate.graphics.image.new("images/game/DarkPlayerAwayBase.png") DarkPlayerAwayBase = playdate.graphics.image.new("assets/images/game/DarkPlayerAwayBase.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerFrown = playdate.graphics.image.new("images/game/DarkPlayerFrown.png") DarkPlayerFrown = playdate.graphics.image.new("assets/images/game/DarkPlayerFrown.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerHomeBack = playdate.graphics.image.new("images/game/DarkPlayerHomeBack.png") DarkPlayerHomeBack = playdate.graphics.image.new("assets/images/game/DarkPlayerHomeBack.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerHomeBase = playdate.graphics.image.new("images/game/DarkPlayerHomeBase.png") DarkPlayerHomeBase = playdate.graphics.image.new("assets/images/game/DarkPlayerHomeBase.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkPlayerSmile = playdate.graphics.image.new("images/game/DarkPlayerSmile.png") DarkPlayerSmile = playdate.graphics.image.new("assets/images/game/DarkPlayerSmile.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
DarkSkinFan = playdate.graphics.image.new("images/game/DarkSkinFan.png") DarkSkinFan = playdate.graphics.image.new("assets/images/game/DarkSkinFan.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
GameLogo = playdate.graphics.image.new("images/game/GameLogo.png") GameLogo = playdate.graphics.image.new("assets/images/game/GameLogo.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
GloveHoldingBall = playdate.graphics.image.new("images/game/GloveHoldingBall.png") GloveHoldingBall = playdate.graphics.image.new("assets/images/game/GloveHoldingBall.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
Glove = playdate.graphics.image.new("images/game/Glove.png") Glove = playdate.graphics.image.new("assets/images/game/Glove.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
GrassBackground = playdate.graphics.image.new("images/game/GrassBackground.png") GrassBackground = playdate.graphics.image.new("assets/images/game/GrassBackground.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
GrassBackgroundSmall = playdate.graphics.image.new("images/game/GrassBackgroundSmall.png") GrassBackgroundSmall = playdate.graphics.image.new("assets/images/game/GrassBackgroundSmall.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
Hat = playdate.graphics.image.new("images/game/Hat.png") Hat = playdate.graphics.image.new("assets/images/game/Hat.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerAwayBack = playdate.graphics.image.new("images/game/LightPlayerAwayBack.png") LightPlayerAwayBack = playdate.graphics.image.new("assets/images/game/LightPlayerAwayBack.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerAwayBase = playdate.graphics.image.new("images/game/LightPlayerAwayBase.png") LightPlayerAwayBase = playdate.graphics.image.new("assets/images/game/LightPlayerAwayBase.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerFrown = playdate.graphics.image.new("images/game/LightPlayerFrown.png") LightPlayerFrown = playdate.graphics.image.new("assets/images/game/LightPlayerFrown.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerHomeBack = playdate.graphics.image.new("images/game/LightPlayerHomeBack.png") LightPlayerHomeBack = playdate.graphics.image.new("assets/images/game/LightPlayerHomeBack.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerHomeBase = playdate.graphics.image.new("images/game/LightPlayerHomeBase.png") LightPlayerHomeBase = playdate.graphics.image.new("assets/images/game/LightPlayerHomeBase.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightPlayerSmile = playdate.graphics.image.new("images/game/LightPlayerSmile.png") LightPlayerSmile = playdate.graphics.image.new("assets/images/game/LightPlayerSmile.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
LightSkinFan = playdate.graphics.image.new("images/game/LightSkinFan.png") LightSkinFan = playdate.graphics.image.new("assets/images/game/LightSkinFan.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
MenuImage = playdate.graphics.image.new("images/game/MenuImage.png") MenuImage = playdate.graphics.image.new("assets/images/game/MenuImage.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
Minimap = playdate.graphics.image.new("images/game/Minimap.png") Minimap = playdate.graphics.image.new("assets/images/game/Minimap.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
PerfectPowerBg = playdate.graphics.image.new("images/game/PerfectPowerBg.png") PerfectPowerBg = playdate.graphics.image.new("assets/images/game/PerfectPowerBg.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
PerfectPowerFlickerLeft = playdate.graphics.image.new("images/game/PerfectPowerFlickerLeft.png") PerfectPowerFlickerLeft = playdate.graphics.image.new("assets/images/game/PerfectPowerFlickerLeft.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
PerfectPowerFlickerRight = playdate.graphics.image.new("images/game/PerfectPowerFlickerRight.png") PerfectPowerFlickerRight = playdate.graphics.image.new("assets/images/game/PerfectPowerFlickerRight.png")
-- luacheck: ignore -- luacheck: ignore
---@type pd_sampleplayer ---@type pd_sampleplayer
BatCrackReverb = playdate.sound.sampleplayer.new("sounds/BatCrackReverb.wav") BatCrackReverb = playdate.sound.sampleplayer.new("assets/sounds/BatCrackReverb.wav")
-- luacheck: ignore -- luacheck: ignore
---@type pd_sampleplayer ---@type pd_sampleplayer
BootTuneOrgany = playdate.sound.sampleplayer.new("music/BootTuneOrgany.wav") BootTuneOrgany = playdate.sound.sampleplayer.new("assets/music/BootTuneOrgany.wav")
-- luacheck: ignore -- luacheck: ignore
---@type pd_sampleplayer ---@type pd_sampleplayer
BootTune = playdate.sound.sampleplayer.new("music/BootTune.wav") BootTune = playdate.sound.sampleplayer.new("assets/music/BootTune.wav")
-- luacheck: ignore -- luacheck: ignore
---@type pd_sampleplayer ---@type pd_sampleplayer
MenuMusic = playdate.sound.sampleplayer.new("music/MenuMusic.wav") MenuMusic = playdate.sound.sampleplayer.new("assets/music/MenuMusic.wav")
-- luacheck: ignore -- luacheck: ignore
---@type pd_sampleplayer ---@type pd_sampleplayer
TinnyBackground = playdate.sound.sampleplayer.new("music/TinnyBackground.wav") TinnyBackground = playdate.sound.sampleplayer.new("assets/music/TinnyBackground.wav")
Logos = { Logos = {
{ name = "Base", image = playdate.graphics.image.new("images/game/logos/Base.png") }, { name = "Base", image = playdate.graphics.image.new("assets/images/game/logos/Base.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Arrows", image = playdate.graphics.image.new("images/game/logos/Arrows.png") }, { name = "Arrows", image = playdate.graphics.image.new("assets/images/game/logos/Arrows.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Cats", image = playdate.graphics.image.new("images/game/logos/Cats.png") }, { name = "Cats", image = playdate.graphics.image.new("assets/images/game/logos/Cats.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Checkmarks", image = playdate.graphics.image.new("images/game/logos/Checkmarks.png") }, { name = "Checkmarks", image = playdate.graphics.image.new("assets/images/game/logos/Checkmarks.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "FingerGuns", image = playdate.graphics.image.new("images/game/logos/FingerGuns.png") }, { name = "FingerGuns", image = playdate.graphics.image.new("assets/images/game/logos/FingerGuns.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Frown", image = playdate.graphics.image.new("images/game/logos/Frown.png") }, { name = "Frown", image = playdate.graphics.image.new("assets/images/game/logos/Frown.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Hearts", image = playdate.graphics.image.new("images/game/logos/Hearts.png") }, { name = "Hearts", image = playdate.graphics.image.new("assets/images/game/logos/Hearts.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Smiles", image = playdate.graphics.image.new("images/game/logos/Smiles.png") }, { name = "Smiles", image = playdate.graphics.image.new("assets/images/game/logos/Smiles.png") },
-- luacheck: ignore -- luacheck: ignore
---@type pd_image ---@type pd_image
{ name = "Turds", image = playdate.graphics.image.new("images/game/logos/Turds.png") }, { name = "Turds", image = playdate.graphics.image.new("assets/images/game/logos/Turds.png") },
} }

View File

@ -25,13 +25,13 @@ function generatedFileWarning()
return "-- GENERATED FILE - DO NOT EDIT\n-- Instead, edit the source file directly: assets.lua2p." return "-- GENERATED FILE - DO NOT EDIT\n-- Instead, edit the source file directly: assets.lua2p."
end)!!(generatedFileWarning()) end)!!(generatedFileWarning())
!!(dirLookup('images/game', 'png', 'playdate.graphics.image.new', 'pd_image')) !!(dirLookup('assets/images/game', 'png', 'playdate.graphics.image.new', 'pd_image'))
!!(dirLookup('sounds', 'wav', 'playdate.sound.sampleplayer.new', 'pd_sampleplayer')) !!(dirLookup('assets/sounds', 'wav', 'playdate.sound.sampleplayer.new', 'pd_sampleplayer'))
!!(dirLookup('music', 'wav', 'playdate.sound.sampleplayer.new', 'pd_sampleplayer')) !!(dirLookup('assets/music', 'wav', 'playdate.sound.sampleplayer.new', 'pd_sampleplayer'))
Logos = { Logos = {
{ name = "Base", image = playdate.graphics.image.new("images/game/logos/Base.png") }, { name = "Base", image = playdate.graphics.image.new("assets/images/game/logos/Base.png") },
!!(dirLookup('images/game/logos -not -name "Base.png"', 'png', 'playdate.graphics.image.new', 'pd_image', ",\n\n", " ", function(varName, value) !!(dirLookup('assets/images/game/logos -not -name "Base.png"', 'png', 'playdate.graphics.image.new', 'pd_image', ",\n\n", " ", function(varName, value)
return '{ name = "' .. varName .. '", image = ' .. value .. ' }' return '{ name = "' .. varName .. '", image = ' .. value .. ' }'
end)) end))
} }

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 626 B

After

Width:  |  Height:  |  Size: 626 B

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 738 B

After

Width:  |  Height:  |  Size: 738 B

View File

Before

Width:  |  Height:  |  Size: 601 B

After

Width:  |  Height:  |  Size: 601 B

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 654 B

After

Width:  |  Height:  |  Size: 654 B

View File

Before

Width:  |  Height:  |  Size: 611 B

After

Width:  |  Height:  |  Size: 611 B

View File

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 614 B

View File

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

View File

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View File

Before

Width:  |  Height:  |  Size: 600 B

After

Width:  |  Height:  |  Size: 600 B

View File

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 579 B

View File

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View File

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

View File

Before

Width:  |  Height:  |  Size: 596 B

After

Width:  |  Height:  |  Size: 596 B

View File

Before

Width:  |  Height:  |  Size: 587 B

After

Width:  |  Height:  |  Size: 587 B

View File

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 598 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,7 +1,7 @@
local gfx = playdate.graphics local gfx = playdate.graphics
local HeaderFont <const> = playdate.graphics.font.new("fonts/Roobert-11-Medium.pft") local HeaderFont <const> = playdate.graphics.font.new("assets/fonts/Roobert-11-Medium.pft")
local DetailFont <const> = playdate.graphics.font.new("fonts/font-full-circle.pft") local DetailFont <const> = playdate.graphics.font.new("assets/fonts/font-full-circle.pft")
---@alias TextObject { text: string, font: pd_font } ---@alias TextObject { text: string, font: pd_font }

View File

@ -1,7 +1,7 @@
local MarginY <const> = 70 local MarginY <const> = 70
local SmallFont <const> = playdate.graphics.font.new("fonts/font-full-circle.pft") local SmallFont <const> = playdate.graphics.font.new("assets/fonts/font-full-circle.pft")
local ScoreFont <const> = playdate.graphics.font.new("fonts/Asheville-Sans-14-Bold.pft") local ScoreFont <const> = playdate.graphics.font.new("assets/fonts/Asheville-Sans-14-Bold.pft")
local NumWidth <const> = ScoreFont:getTextWidth("0") local NumWidth <const> = ScoreFont:getTextWidth("0")
local NumHeight <const> = ScoreFont:getHeight() local NumHeight <const> = ScoreFont:getHeight()
local AwayWidth <const> = ScoreFont:getTextWidth("AWAY") local AwayWidth <const> = ScoreFont:getTextWidth("AWAY")

View File

@ -1,7 +1,7 @@
-- selene: allow(shadowing) -- selene: allow(shadowing)
local gfx = playdate.graphics local gfx = playdate.graphics
local ScoreFont <const> = playdate.graphics.font.new("fonts/font-full-circle.pft") local ScoreFont <const> = playdate.graphics.font.new("assets/fonts/font-full-circle.pft")
local MinimapSizeX, MinimapSizeY <const> = Minimap:getSize() local MinimapSizeX, MinimapSizeY <const> = Minimap:getSize()
local MinimapPosX, MinimapPosY = C.Screen.W - MinimapSizeX, C.Screen.H - MinimapSizeY local MinimapPosX, MinimapPosY = C.Screen.W - MinimapSizeX, C.Screen.H - MinimapSizeY

View File

@ -1,6 +1,6 @@
local gfx <const> = playdate.graphics local gfx <const> = playdate.graphics
local ButtonFont <const> = gfx.font.new("fonts/font-full-circle.pft") local ButtonFont <const> = gfx.font.new("assets/fonts/font-full-circle.pft")
--- Assumes that background image is of size: --- Assumes that background image is of size:
--- ---

View File

@ -9,8 +9,8 @@ MainMenu = {
} }
local gfx = playdate.graphics local gfx = playdate.graphics
local ScoreFont <const> = playdate.graphics.font.new("fonts/font-full-circle.pft") local ScoreFont <const> = playdate.graphics.font.new("assets/fonts/font-full-circle.pft")
local TinyFont <const> = gfx.font.new("fonts/Nano Sans.pft") local TinyFont <const> = gfx.font.new("assets/fonts/Nano Sans.pft")
--- Take control of playdate.update --- Take control of playdate.update
--- Will replace playdate.update when the menu is done. --- Will replace playdate.update when the menu is done.

View File

@ -124,7 +124,7 @@ Game = {}
function Game.new(settings, announcer, fielding, baserunning, npc, state) function Game.new(settings, announcer, fielding, baserunning, npc, state)
announcer = announcer or Announcer.new() announcer = announcer or Announcer.new()
fielding = fielding or Fielding.new() fielding = fielding or Fielding.new()
settings.userTeam = "away" settings.userTeam = nil -- "away"
local homeTeamBlipper = blipper.new(100, settings.homeTeamSpriteGroup) local homeTeamBlipper = blipper.new(100, settings.homeTeamSpriteGroup)
local awayTeamBlipper = blipper.new(100, settings.awayTeamSpriteGroup) local awayTeamBlipper = blipper.new(100, settings.awayTeamSpriteGroup)

View File

@ -2,6 +2,6 @@ name=Batter Up!
author=Sage Vaillancourt author=Sage Vaillancourt
description=Crush dingers and hustle around the bases! description=Crush dingers and hustle around the bases!
bundleID=space.sagev.batterup bundleID=space.sagev.batterup
imagePath=images/launcher imagePath=assets/images/launcher
version=0.1 version=0.1
buildNumber=1 buildNumber=1