You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-12-11 05:02:16 -08:00
Level cleared transition: placeholder screen, update wCoins with wCurLevelCoins, advance time of day (#35)
This commit is contained in:
@@ -1883,7 +1883,9 @@ GetCoinsAccount:
|
||||
LoadCoinsAmountToMem:
|
||||
ld bc, hCoinsTemp
|
||||
call GetScriptByte
|
||||
cp HIGH(BLUE_RED_SPACE_COINS)
|
||||
cp COINS_FROM_RAM >> 16
|
||||
jr z, .coins_from_ram
|
||||
cp BLUE_RED_SPACE_COINS >> 16
|
||||
jr z, .blue_red_space_coins
|
||||
push bc
|
||||
ld [bc], a
|
||||
@@ -1896,6 +1898,26 @@ LoadCoinsAmountToMem:
|
||||
pop bc
|
||||
ret
|
||||
|
||||
.coins_from_ram
|
||||
; if the highest byte was COINS_FROM_RAM, the lowest two bytes are a RAM address.
|
||||
; but the script argument is dt, which is big endian rather than little endian like dw.
|
||||
call GetScriptByte
|
||||
ld h, a
|
||||
call GetScriptByte
|
||||
ld l, a
|
||||
push bc
|
||||
ld a, [hli]
|
||||
ld [bc], a
|
||||
inc bc
|
||||
ld a, [hli]
|
||||
ld [bc], a
|
||||
inc bc
|
||||
ld a, [hl]
|
||||
ld [bc], a
|
||||
pop bc
|
||||
ret
|
||||
|
||||
|
||||
.blue_red_space_coins
|
||||
push de
|
||||
call GetScriptByte
|
||||
@@ -2435,6 +2457,7 @@ ReturnFromCredits:
|
||||
|
||||
Script_exitoverworld:
|
||||
call GetScriptByte
|
||||
ld [wExitOverworldReason], a
|
||||
call Script_endall
|
||||
ld a, MAPSTATUS_DONE
|
||||
call LoadMapStatus
|
||||
|
||||
Reference in New Issue
Block a user