You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Rename _UpdateSprites to _UpdateActiveSprites and create UpdateActiveSprites in home back (along with the existing UpdateSprites)
This commit is contained in:
@@ -240,7 +240,7 @@ HandleMapObjects:
|
||||
ret
|
||||
|
||||
HandleMapBackground:
|
||||
farcall _UpdateSprites
|
||||
call UpdateActiveSprites
|
||||
farcall ScrollScreen
|
||||
ret
|
||||
|
||||
|
||||
@@ -2201,14 +2201,14 @@ RespawnPlayerAndOpponent:
|
||||
jr z, .skip_opponent
|
||||
call RespawnObject
|
||||
.skip_opponent
|
||||
call _UpdateSprites
|
||||
call _UpdateActiveSprites
|
||||
ret
|
||||
|
||||
RespawnPlayer:
|
||||
call HideAllObjects
|
||||
ld a, PLAYER
|
||||
call RespawnObject
|
||||
call _UpdateSprites
|
||||
call _UpdateActiveSprites
|
||||
ret
|
||||
|
||||
RespawnObject:
|
||||
@@ -2754,13 +2754,13 @@ ResetObject:
|
||||
db SPRITEMOVEDATA_STANDING_LEFT
|
||||
db SPRITEMOVEDATA_STANDING_RIGHT
|
||||
|
||||
_UpdateSpritesAfterOffset::
|
||||
_UpdateActiveSpritesAfterOffset::
|
||||
ld a, [wVramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
jr _UpdateSprites.go
|
||||
jr _UpdateActiveSprites.go
|
||||
|
||||
_UpdateSprites::
|
||||
_UpdateActiveSprites::
|
||||
ld a, [wVramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
@@ -3079,10 +3079,11 @@ InitSprites:
|
||||
dw wObject12Struct
|
||||
|
||||
_UpdateSecondarySprites::
|
||||
; this is a shorter _UpdateSprites for when only secondary sprites have changed since the last sprites update,
|
||||
; but NOT expanded or shrinked, which would require to displace primary (NPC) sprites in OAM.
|
||||
; this is a shorter _UpdateActiveSprites for when only secondary sprites
|
||||
; have changed since the last sprites update, but NOT expanded or shrinked,
|
||||
; which would require to displace primary (NPC) sprites in OAM.
|
||||
; if it is detected that the size of secondary sprites has increased in the end,
|
||||
; fall back to calling _UpdateSprites to avoid corruption.
|
||||
; fall back to calling _UpdateActiveSprites to avoid corruption.
|
||||
ld a, [wVramState]
|
||||
bit 0, a
|
||||
ret z
|
||||
@@ -3105,7 +3106,7 @@ _UpdateSecondarySprites::
|
||||
pop af
|
||||
cp c
|
||||
ret nc
|
||||
jp _UpdateSprites
|
||||
jp _UpdateActiveSprites
|
||||
|
||||
InitSecondarySprites:
|
||||
ld a, [wDisplaySecondarySprites]
|
||||
|
||||
@@ -984,7 +984,7 @@ Script_disappear:
|
||||
ldh a, [hMapObjectIndex]
|
||||
ld b, 1 ; set
|
||||
call ApplyEventActionAppearDisappear
|
||||
farcall _UpdateSprites
|
||||
call UpdateActiveSprites
|
||||
ret
|
||||
|
||||
ApplyEventActionAppearDisappear:
|
||||
|
||||
Reference in New Issue
Block a user