Skip to content

Commit 52d5536

Browse files
authored
Merge pull request #3570 from SuperFromND/stage-fix
fix: account for gameWidthFloat in 4:3 stages
2 parents 617155f + badcf51 commit 52d5536

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/stage.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,11 +639,11 @@ func (bg backGround) draw(pos [2]float32, drawscl, bgscl, stglscl float32,
639639
rect := bg.startrect
640640

641641
startrect0 := float32(rect[0]) - (pos[0])/stgscl[0]*bg.windowdelta[0] +
642-
(float32(sys.gameWidth)/2/sclx - float32(bg.notmaskwindow)*(float32(sys.gameWidth)/2)*(1/lscl[0]))
642+
(sys.gameWidthFloat/2/sclx - float32(bg.notmaskwindow)*(sys.gameWidthFloat/2)*(1/lscl[0]))
643643
startrect0 *= sys.widthScale * wscl[0]
644644
if !isStage && wscl[0] == 1 {
645645
// Screenpacks X coordinates start from left edge of screen
646-
startrect0 += float32(sys.gameWidth-320) / 2 * sys.widthScale
646+
startrect0 += float32(sys.gameWidthFloat-320) / 2 * sys.widthScale
647647
}
648648

649649
startrect1 := float32(rect[1]) - pos[1]/drawscl/stgscl[1]*bg.windowdelta[1]
@@ -1112,7 +1112,7 @@ func loadStage(def string, maindef bool) (*Stage, error) {
11121112
} else if s.hires {
11131113
s.scale[1] *= 2
11141114
}
1115-
s.localscl = float32(sys.gameWidth) / float32(s.stageCamera.localcoord[0])
1115+
s.localscl = sys.gameWidthFloat / float32(s.stageCamera.localcoord[0])
11161116
s.stageCamera.localscl = s.localscl
11171117
if s.stageCamera.localcoord[0] != 320 {
11181118
// Update default values to new localcoord. Like characters do

0 commit comments

Comments
 (0)