mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Make sure overworld sprites don't appear after returning from overworld [bugfix] (#17)
This commit is contained in:
parent
e9ad1f5612
commit
89a17c3a05
@ -130,6 +130,7 @@ GameMenu_WorldMap:
|
|||||||
farcall OverworldLoop
|
farcall OverworldLoop
|
||||||
|
|
||||||
; return from overworld loop
|
; return from overworld loop
|
||||||
|
call ClearObjectStructs
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
farcall AutoSaveGameOutsideOverworld
|
farcall AutoSaveGameOutsideOverworld
|
||||||
|
22
home/map.asm
22
home/map.asm
@ -551,7 +551,7 @@ ReadBGEvents::
|
|||||||
|
|
||||||
ReadObjectEvents::
|
ReadObjectEvents::
|
||||||
push hl
|
push hl
|
||||||
call ClearObjectStructs
|
call ClearNonPlayerObjectStructs
|
||||||
pop de
|
pop de
|
||||||
ld hl, wMap1Object
|
ld hl, wMap1Object
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -618,22 +618,16 @@ CopyMapObjectEvents::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
ClearObjectStructs::
|
ClearObjectStructs::
|
||||||
|
ld hl, wObjectStructs
|
||||||
|
ld bc, OBJECT_LENGTH * NUM_OBJECT_STRUCTS
|
||||||
|
xor a
|
||||||
|
jp ByteFill
|
||||||
|
|
||||||
|
ClearNonPlayerObjectStructs::
|
||||||
ld hl, wObject1Struct
|
ld hl, wObject1Struct
|
||||||
ld bc, OBJECT_LENGTH * (NUM_OBJECT_STRUCTS - 1)
|
ld bc, OBJECT_LENGTH * (NUM_OBJECT_STRUCTS - 1)
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
jp ByteFill
|
||||||
|
|
||||||
; Just to make sure (this is rather pointless)
|
|
||||||
ld hl, wObject1Struct
|
|
||||||
ld de, OBJECT_LENGTH
|
|
||||||
ld c, NUM_OBJECT_STRUCTS - 1
|
|
||||||
xor a
|
|
||||||
.loop
|
|
||||||
ld [hl], a
|
|
||||||
add hl, de
|
|
||||||
dec c
|
|
||||||
jr nz, .loop
|
|
||||||
ret
|
|
||||||
|
|
||||||
GetWarpDestCoords::
|
GetWarpDestCoords::
|
||||||
call GetMapScriptsBank
|
call GetMapScriptsBank
|
||||||
|
Loading…
Reference in New Issue
Block a user