mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-22 21:46:51 +02:00
screen position fixes for gen 2
This commit is contained in:
@@ -838,8 +838,7 @@ function BoxMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -972,8 +972,7 @@ function CardFlip:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -313,8 +313,7 @@ function CenterPcMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -180,8 +180,7 @@ function ContestMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -108,8 +108,7 @@ function CopyrightSplash:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -845,8 +845,7 @@ function Credits:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -267,8 +267,7 @@ function DecorationMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -43,8 +43,6 @@ local EggHatchAnim = {}
|
||||
EggHatchAnim.__index = EggHatchAnim
|
||||
EggHatchAnim.isOpaque = true
|
||||
|
||||
local SCREEN_W, SCREEN_H = 160, 144
|
||||
|
||||
-- Hatch_UpdateFrontpicBGMapCenter is called twice with different hlcoords:
|
||||
-- the egg sits at (7,4) and the hatchling at (6,3). Both are `lb bc, 7, 7`
|
||||
-- PlaceGraphic boxes, and the pic inside that box has already been padded to
|
||||
@@ -446,8 +444,7 @@ function EggHatchAnim:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -40,8 +40,6 @@ local EvolutionAnim = {}
|
||||
EvolutionAnim.__index = EvolutionAnim
|
||||
EvolutionAnim.isOpaque = true
|
||||
|
||||
local SCREEN_W, SCREEN_H = 160, 144
|
||||
|
||||
-- PrepMonFrontpic's box: hlcoord 7, 2, `lb bc, 7, 7`.
|
||||
local PIC_TILE_X, PIC_TILE_Y, PIC_TILES = 7, 2, 7
|
||||
|
||||
@@ -573,8 +571,7 @@ function EvolutionAnim:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -372,8 +372,7 @@ function GameFreakPresents:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -1033,8 +1033,7 @@ function GoldSilverIntro:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -657,8 +657,7 @@ function HallOfFame:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -592,8 +592,7 @@ function ItemPcMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -341,8 +341,7 @@ function MailCompose:drawWidescreen(winW, winH)
|
||||
G.setColor(1, 1, 1, 1)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -94,8 +94,7 @@ function MailRead:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -218,8 +218,7 @@ function MainMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -225,8 +225,7 @@ function NamePick:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -466,8 +466,7 @@ function OptionsMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -1027,8 +1027,7 @@ function PackMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -849,8 +849,7 @@ function PartyMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -453,8 +453,7 @@ function PcMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -1462,8 +1462,7 @@ function PokedexMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -560,8 +560,7 @@ function PrizeMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -228,8 +228,7 @@ function SaveMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -1535,8 +1535,7 @@ function SlotMachine:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -1175,8 +1175,7 @@ function SummaryMenu:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -58,8 +58,6 @@ local TradeAnimView = {}
|
||||
TradeAnimView.__index = TradeAnimView
|
||||
TradeAnimView.isOpaque = true
|
||||
|
||||
local SCREEN_W, SCREEN_H = 160, 144
|
||||
|
||||
-- PlaceGraphic's box and the stats panel's Textbox, in tiles.
|
||||
local PIC_TILE_X, PIC_TILE_Y, PIC_TILES = 7, 2, 7
|
||||
local PANEL_X, PANEL_Y = 3, 0
|
||||
@@ -876,8 +874,7 @@ function TradeAnimView:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - SCREEN_W * scale) / 2),
|
||||
math.floor((winH - SCREEN_H * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -437,8 +437,7 @@ function TrainerCard:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
@@ -580,8 +580,7 @@ function UnownPuzzle:drawWidescreen(winW, winH)
|
||||
G.rectangle("fill", 0, 0, winW, winH)
|
||||
local scale = Chrome.fitScale(winW, winH)
|
||||
G.push()
|
||||
G.translate(math.floor((winW - 160 * scale) / 2),
|
||||
math.floor((winH - 144 * scale) / 2))
|
||||
G.translate(Chrome.fitOrigin(winW, winH, scale))
|
||||
G.scale(scale, scale)
|
||||
self:drawPanel()
|
||||
G.pop()
|
||||
|
||||
Reference in New Issue
Block a user