Files
pokegold-spaceworld/engine/unknown_boxes.asm
T
DrippingYellow 9e05bc90a3 Finish labelling Bank 0D (#113)
* Labelling Bank 0D, part 1

* Untangled math HRAM variables

* Bank 10's out of the bag, I guess

* Label Bank 0D, part 2, decompiled related Bank 0E functions

* Fix data outside section

* Finished labeling Bank 0D and connected variables and functions

---------

Co-authored-by: vulcandth <vulcandth@gmail.com>
2025-02-15 17:48:47 -06:00

84 lines
1.4 KiB
NASM

INCLUDE "constants.asm"
SECTION "engine/unknown_boxes.asm", ROMX
Function1130a:
ret
Function1130b:
ld a, [wPartyCount]
cp PARTY_LENGTH
jr c, .bigjump
ld a, [wBoxListLength]
cp MONS_PER_BOX
jr nc, .fullbox
xor a
ld [wEnemySubStatus5], a
ld a, [wCurPartySpecies]
ld [wTempEnemyMonSpecies], a
callfar LoadEnemyMon
call RecievePokemon
predef Functiondd5c
and $7F
add a, $F7
ld hl, wStringBuffer2
ld [hli], a
ld [hl], "@"
ld hl, BoxCantHoldText
call PrintText
scf
ret
.fullbox
ld hl, BoxFullText
call PrintText
and a
ret
.bigjump
call RecievePokemon
predef Functiond886
scf
ret
RecievePokemon:
ld a, [wCurPartySpecies]
push af
ld [wNamedObjectIndexBuffer], a
dec a
ld c, a
ld hl, wPokedexCaught
ld b, 01 ;SET_FLAG
predef SmallFarFlagAction
pop af
ld [wNamedObjectIndexBuffer], a
call GetPokemonName
ld hl, RecievePokemonText
jp PrintText
RecievePokemonText:
text "<PLAYER>は"
line "@"
db $01, $26, $CD
text "を てにいれた!@"
db $0B, "@"
BoxCantHoldText:
text "#を もちきれないので"
line "<PC>の ボックス@"
db $01, $31, $CD
text " に"
cont "@"
db $01, $17, $DF
text "を てんそうした!"
done
BoxFullText:
text "#を もちきれません!"
para "ボックスも いっぱいで"
line "てんそうできません!"
para "#センターなどで"
line "ボックスを かえてきて ください"
done