diff --git a/src/battle/BattleState.lua b/src/battle/BattleState.lua index fb9456c3..e2f01d28 100644 --- a/src/battle/BattleState.lua +++ b/src/battle/BattleState.lua @@ -4511,7 +4511,7 @@ end local ballQuads function BattleState:drawBallRow(party, x, y, dx) if ballQuads == nil then - local ok, img = pcall(love.graphics.newImage, "assets/generated/battle/balls.png") + local ok, img = pcall(love.graphics.newImage, require("src.render.Assets").resolve("assets/generated/battle/balls.png")) if ok then ballQuads = { img = img } for i = 0, 3 do @@ -4587,7 +4587,8 @@ local substDoll function BattleState:drawSubstituteDoll(battler) if substDoll == nil then local ok, img = pcall(love.graphics.newImage, - "assets/generated/sprites/monster.png") + require("src.render.Assets").resolve( + "assets/generated/sprites/monster.png")) if ok then local w, h = img:getDimensions() substDoll = { img = img, diff --git a/src/ui/SurfingMinigame.lua b/src/ui/SurfingMinigame.lua index 96659568..c596c540 100644 --- a/src/ui/SurfingMinigame.lua +++ b/src/ui/SurfingMinigame.lua @@ -92,7 +92,7 @@ function SurfingMinigame.new(game, onDone) self.banner = nil -- {quad, frames}: GOOD!/YEAH-/Oh no.. local function sheet(path) - local ok, img = pcall(love.graphics.newImage, path) + local ok, img = pcall(love.graphics.newImage, require("src.render.Assets").resolve(path)) return ok and img or nil end self.bg = sheet("assets/generated/minigame/surf_1a.png") diff --git a/src/ui/TownMap.lua b/src/ui/TownMap.lua index 59048c56..324dfabf 100644 --- a/src/ui/TownMap.lua +++ b/src/ui/TownMap.lua @@ -104,7 +104,7 @@ local function loadBackground(game) local tm = (game.data.field or {}).townMap or {} local bg = tm.background if not (bg and bg.map and bg.tiles) then return nil end - local ok, img = pcall(love.graphics.newImage, bg.tiles.path) + local ok, img = pcall(love.graphics.newImage, require("src.render.Assets").resolve(bg.tiles.path)) if not ok then return nil end local quads = {} local iw, ih = img:getDimensions() @@ -115,7 +115,7 @@ local function loadBackground(game) end local cursor if bg.cursor then - local okc, c = pcall(love.graphics.newImage, bg.cursor.path) + local okc, c = pcall(love.graphics.newImage, require("src.render.Assets").resolve(bg.cursor.path)) cursor = okc and c or nil end return { img = img, quads = quads, map = bg.map, cursor = cursor } @@ -192,8 +192,9 @@ function TownMap.new(game, opts) -- field.townMap.nest lifts the icon path out of the engine local nest = ((game.data.field or {}).townMap or {}).nest local ok, img = pcall(love.graphics.newImage, - (nest and nest.path) - or "assets/generated/townmap/nest.png") + require("src.render.Assets").resolve( + (nest and nest.path) + or "assets/generated/townmap/nest.png")) self.nestIcon = ok and img or nil end if opts.fly then diff --git a/src/ui/TradeAnim.lua b/src/ui/TradeAnim.lua index 423c2d0f..db96f049 100644 --- a/src/ui/TradeAnim.lua +++ b/src/ui/TradeAnim.lua @@ -29,7 +29,7 @@ local DEFAULT_ART = { local function tryImage(path) if not path then return nil end - local ok, img = pcall(love.graphics.newImage, path) + local ok, img = pcall(love.graphics.newImage, require("src.render.Assets").resolve(path)) return ok and img or nil end