mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07: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
|
||||
|
||||
; return from overworld loop
|
||||
call ClearObjectStructs
|
||||
call ClearBGPalettes
|
||||
call ClearSprites
|
||||
farcall AutoSaveGameOutsideOverworld
|
||||
|
22
home/map.asm
22
home/map.asm
@ -551,7 +551,7 @@ ReadBGEvents::
|
||||
|
||||
ReadObjectEvents::
|
||||
push hl
|
||||
call ClearObjectStructs
|
||||
call ClearNonPlayerObjectStructs
|
||||
pop de
|
||||
ld hl, wMap1Object
|
||||
ld a, [de]
|
||||
@ -618,22 +618,16 @@ CopyMapObjectEvents::
|
||||
ret
|
||||
|
||||
ClearObjectStructs::
|
||||
ld hl, wObjectStructs
|
||||
ld bc, OBJECT_LENGTH * NUM_OBJECT_STRUCTS
|
||||
xor a
|
||||
jp ByteFill
|
||||
|
||||
ClearNonPlayerObjectStructs::
|
||||
ld hl, wObject1Struct
|
||||
ld bc, OBJECT_LENGTH * (NUM_OBJECT_STRUCTS - 1)
|
||||
xor a
|
||||
call 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
|
||||
jp ByteFill
|
||||
|
||||
GetWarpDestCoords::
|
||||
call GetMapScriptsBank
|
||||
|
Loading…
Reference in New Issue
Block a user