mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
improved fix for border block glitch
This commit is contained in:
parent
fab1364343
commit
00ad0119b1
|
@ -2082,17 +2082,12 @@ LoadMapHeader::
|
||||||
ld a, [wCurMap]
|
ld a, [wCurMap]
|
||||||
call SwitchToMapRomBank
|
call SwitchToMapRomBank
|
||||||
ld a, [wCurMapTileset]
|
ld a, [wCurMapTileset]
|
||||||
ld b, a
|
bit 7, a
|
||||||
res 7, a
|
res 7, a
|
||||||
ld [wCurMapTileset], a
|
ld [wCurMapTileset], a
|
||||||
ldh [hPreviousTileset], a
|
ldh [hPreviousTileset], a
|
||||||
bit 7, b
|
; ret nz ;comment this out so that the header data always loads
|
||||||
|
push af ;preserve the bit check for later to tell if CONTINUE is being selected
|
||||||
;replace the conditional return with a nop in order to always load the map header data...
|
|
||||||
;...even when selecting CONTINUE from the main menu
|
|
||||||
; ret nz
|
|
||||||
nop
|
|
||||||
|
|
||||||
ld hl, MapHeaderPointers
|
ld hl, MapHeaderPointers
|
||||||
ld a, [wCurMap]
|
ld a, [wCurMap]
|
||||||
sla a
|
sla a
|
||||||
|
@ -2150,7 +2145,7 @@ LoadMapHeader::
|
||||||
ld [wObjectDataPointerTemp], a
|
ld [wObjectDataPointerTemp], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wObjectDataPointerTemp + 1], a
|
ld [wObjectDataPointerTemp + 1], a
|
||||||
push hl
|
; push hl ; save hl before going to the warp/sign/sprite data (this value is saved for seemingly no purpose)
|
||||||
ld a, [wObjectDataPointerTemp]
|
ld a, [wObjectDataPointerTemp]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wObjectDataPointerTemp + 1]
|
ld a, [wObjectDataPointerTemp + 1]
|
||||||
|
@ -2158,6 +2153,9 @@ LoadMapHeader::
|
||||||
ld de, wMapBackgroundTile
|
ld de, wMapBackgroundTile
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
pop af ;we're done if loading from the CONTINUE option of the main menu
|
||||||
|
ret nz
|
||||||
|
nop ;padding
|
||||||
.loadWarpData
|
.loadWarpData
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wNumberOfWarps], a
|
ld [wNumberOfWarps], a
|
||||||
|
@ -2330,7 +2328,7 @@ LoadMapHeader::
|
||||||
.finishUp
|
.finishUp
|
||||||
predef LoadTilesetHeader
|
predef LoadTilesetHeader
|
||||||
callfar LoadWildData
|
callfar LoadWildData
|
||||||
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
|
; pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
|
||||||
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
|
ld a, [wCurMapHeight] ; map height in 4x4 tile blocks
|
||||||
add a ; double it
|
add a ; double it
|
||||||
ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks
|
ld [wCurrentMapHeight2], a ; store map height in 2x2 tile blocks
|
||||||
|
|
Loading…
Reference in a new issue