summaryrefslogtreecommitdiff
path: root/engine/unknown_boxes.asm
diff options
context:
space:
mode:
authorobskyr <powpowd@gmail.com>2019-02-26 01:58:23 +0100
committerobskyr <powpowd@gmail.com>2019-02-26 01:58:23 +0100
commit9608dcfb97c31c44c7fbf1d0ca267ad7736389f7 (patch)
tree9808dbd1bd18776d96d84c97caa6607af47736d5 /engine/unknown_boxes.asm
parent5c9ee00c82b9140c1e818f68d4f37ab59c631197 (diff)
parent0e77e1aaa7f27e44cb8cbc4afdb75305bd2944df (diff)
Merge branch '2Tie-master'
Diffstat (limited to 'engine/unknown_boxes.asm')
-rw-r--r--engine/unknown_boxes.asm83
1 files changed, 83 insertions, 0 deletions
diff --git a/engine/unknown_boxes.asm b/engine/unknown_boxes.asm
new file mode 100644
index 0000000..648d5cb
--- /dev/null
+++ b/engine/unknown_boxes.asm
@@ -0,0 +1,83 @@
+INCLUDE "constants.asm"
+
+SECTION "engine/unknown_boxes.asm", ROMX
+
+Function1130a: ; 04:530A
+ ret
+
+Function1130b: ; 04:530B
+ ld a, [wPartyCount]
+ cp PARTY_LENGTH
+ jr c, .bigjump
+ ld a, [wBoxListLength]
+ cp $1E
+ jr nc, .fullbox
+ xor a
+ ld [wca44], a
+ ld a, [wMonDexIndex]
+ ld [wcdd7], a
+ callab AddPokemonToBox
+ 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: ; 04:5357
+ ld a, [wMonDexIndex]
+ push af
+ ld [wNamedObjectIndexBuffer], a
+ dec a
+ ld c, a
+ ld hl, wPokedexOwned
+ ld b, 01 ;SET_FLAG
+ predef SmallFarFlagAction
+ pop af
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ ld hl, RecievePokemonText
+ jp PrintText
+
+RecievePokemonText: ; 04:5377
+ text "<PLAYER>は"
+ line "@"
+
+ db $01, $26, $CD
+
+ text "を てにいれた!@"
+
+ db $0B, "@"
+
+BoxCantHoldText: ; 04:538B
+ text "#を もちきれないので"
+ line "<PC>の ボックス@"
+ db $01, $31, $CD
+ text " に"
+ cont "@"
+ db $01, $17, $DF
+ text "を てんそうした!"
+ done
+
+BoxFullText: ; 04:53B6
+ text "#を もちきれません!"
+ para "ボックスも いっぱいで"
+ line "てんそうできません!"
+ para "#センターなどで"
+ line "ボックスを かえてきて ください"
+ done \ No newline at end of file