mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-26 07:21:22 +02:00
skin studio updates, save sync CLOSES #1533
This commit is contained in:
@@ -9,7 +9,6 @@ local Collision = require("src.world.Collision")
|
||||
local Encounter = require("src.world.Encounter")
|
||||
local FieldDefaults = require("src.world.FieldDefaults")
|
||||
local GameVersion = require("src.core.GameVersion")
|
||||
local GameViewport = require("src.render.GameViewport")
|
||||
local Logger = require("src.core.Logger")
|
||||
local Map = require("src.world.Map")
|
||||
local MapLoader = require("src.world.MapLoader")
|
||||
@@ -5196,7 +5195,7 @@ function OverworldState:drawWorld()
|
||||
-- point projects under the pipeline's own camera. That is the direct
|
||||
-- analogue of what :billboard does for tilt, and it keeps exactly one
|
||||
-- copy of every effect: the closures above are the ones that run.
|
||||
local pw, ph = GameViewport.dimensions()
|
||||
local _, _, pw, ph = Game.renderer:playfieldRect()
|
||||
local pscale = Zoom.scale(Game.renderer:fitScale())
|
||||
local ctx = {
|
||||
state = self, cam = cam, vw = vw, vh = vh, bgY = bgY,
|
||||
|
||||
@@ -34,7 +34,7 @@ local Font = require("src.render.Font")
|
||||
-- a mod has taken a facade (src/mods/Gen2Compat.lua).
|
||||
local Gen1Facade = require("src.mods.Gen2Compat")
|
||||
local GbcPalette = require("src.render.GbcPalette")
|
||||
local GameViewport = require("src.render.GameViewport")
|
||||
local Playfield = require("src.render.Playfield")
|
||||
local Gen2Save = require("src.core.gen2.Save")
|
||||
local HallOfFame = require("src.core.gen2.HallOfFame")
|
||||
local HiddenItems = require("src.world.gen2.HiddenItems")
|
||||
@@ -7499,7 +7499,7 @@ function World:interactBody()
|
||||
end
|
||||
|
||||
function World:fitScale()
|
||||
local w, h = GameViewport.dimensions()
|
||||
local w, h = Playfield.dimensions()
|
||||
return math.max(1, math.floor(math.min(w / 160, h / 144)))
|
||||
end
|
||||
|
||||
@@ -8336,7 +8336,7 @@ function World:rebuildNeighbors()
|
||||
self.neighbors = {}
|
||||
if not self.map then return end
|
||||
local s = self:zoomScale()
|
||||
local ww, wh = GameViewport.dimensions()
|
||||
local ww, wh = Playfield.dimensions()
|
||||
local vw = math.ceil(ww / s)
|
||||
local vh = math.ceil(wh / s)
|
||||
if vw % 2 ~= 0 then vw = vw + 1 end
|
||||
@@ -9748,7 +9748,7 @@ function World:drawGround(s)
|
||||
if canvas then
|
||||
bw, bh = canvas:getDimensions()
|
||||
else
|
||||
bw, bh = GameViewport.dimensions()
|
||||
bw, bh = Playfield.dimensions()
|
||||
end
|
||||
if BorderFill.fillBlock(self.map.def) == false then
|
||||
-- BLACK: World:draw clears to a brown letterbox, so the void itself
|
||||
@@ -10017,7 +10017,7 @@ end
|
||||
|
||||
function World:draw()
|
||||
local G = love.graphics
|
||||
local w, h = GameViewport.dimensions()
|
||||
local w, h = Playfield.dimensions()
|
||||
self:refreshColorMode()
|
||||
G.clear(0.07, 0.05, 0.02, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user