2018-06-24 07:09:41 -07:00
|
|
|
|
Function17c000:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
|
|
|
|
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $31 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call ByteFill
|
|
|
|
|
|
2015-11-04 13:14:27 -08:00
|
|
|
|
call LoadStandardFont
|
|
|
|
|
call LoadFontsExtra
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantMap
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0
|
2020-02-13 09:30:13 -08:00
|
|
|
|
bccoord 0, 0, wAttrmap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld a, SCREEN_HEIGHT
|
|
|
|
|
.y
|
|
|
|
|
push af
|
|
|
|
|
ld a, SCREEN_WIDTH
|
|
|
|
|
|
|
|
|
|
push hl
|
|
|
|
|
.x
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [bc], a
|
|
|
|
|
inc bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .x
|
|
|
|
|
pop hl
|
|
|
|
|
|
|
|
|
|
push bc
|
|
|
|
|
ld bc, BG_MAP_WIDTH * 2
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .y
|
|
|
|
|
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
|
2018-01-02 13:46:40 -08:00
|
|
|
|
ld a, BANK(wBGPals1)
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantPals
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2018-01-01 05:47:16 -08:00
|
|
|
|
ld bc, 16 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld hl, MobileSelectGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $30
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $20 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
ld a, 1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $80 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
2020-03-01 14:00:57 -08:00
|
|
|
|
ld hl, HaveWantGFX + $80 tiles
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $10 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
call EnableLCD
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
HaveWantGFX:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
INCBIN "gfx/mobile/havewant.2bpp"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileSelectGFX:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
INCBIN "gfx/mobile/select.2bpp"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
HaveWantMap:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; Interleaved tile/palette map.
|
2015-03-11 21:15:15 -07:00
|
|
|
|
INCBIN "gfx/mobile/havewant_map.bin"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
HaveWantPals:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; BG and OBJ palettes.
|
2015-03-11 21:15:15 -07:00
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 21, 21, 21
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 4, 17, 29
|
|
|
|
|
RGB 6, 19, 31
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 2, 13, 18
|
|
|
|
|
RGB 6, 19, 31
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 5, 5
|
|
|
|
|
RGB 29, 21, 21
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 4, 17, 29
|
|
|
|
|
RGB 6, 19, 31
|
|
|
|
|
RGB 2, 15, 27
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 28, 19, 18
|
|
|
|
|
RGB 25, 9, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 27, 27
|
|
|
|
|
RGB 31, 10, 4
|
|
|
|
|
RGB 29, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 26, 8, 23
|
|
|
|
|
RGB 22, 0, 16
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 20, 8, 31
|
|
|
|
|
RGB 15, 1, 26
|
|
|
|
|
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 17, 12, 31
|
|
|
|
|
RGB 12, 6, 31
|
|
|
|
|
|
|
|
|
|
RGB 0, 16, 0
|
|
|
|
|
RGB 11, 11, 14
|
|
|
|
|
RGB 5, 5, 7
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
|
|
|
|
RGB 0, 31, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
RGB 16, 31, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 0, 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
CheckStringForErrors:
|
2015-11-07 11:38:52 -08:00
|
|
|
|
; Valid character ranges:
|
2016-05-14 13:37:12 -07:00
|
|
|
|
; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
|
2015-11-07 11:38:52 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2018-11-17 10:33:03 -08:00
|
|
|
|
and a ; "<NULL>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr z, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp FIRST_REGULAR_TEXT_CHAR
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr nc, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<NEXT>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr z, .NextChar
|
|
|
|
|
cp "@"
|
|
|
|
|
jr z, .Done
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "ガ"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
|
|
|
|
cp "<PLAY_G>"
|
|
|
|
|
jr c, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<JP_18>" + 1
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<NI>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<NO>" + 1
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<ROUTE>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<GREEN>" + 1
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<ENEMY>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<ENEMY>" + 1
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2018-11-17 10:33:03 -08:00
|
|
|
|
cp "<MOM>"
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Fail:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.NextChar:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Done:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
CheckStringForErrors_IgnoreTerminator:
|
2015-11-24 12:18:44 -08:00
|
|
|
|
; Find control chars
|
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr z, .next
|
|
|
|
|
cp "<DEXEND>" + 1
|
|
|
|
|
jr nc, .next
|
|
|
|
|
cp "<NEXT>"
|
|
|
|
|
jr z, .next
|
|
|
|
|
cp "@"
|
|
|
|
|
jr z, .next
|
|
|
|
|
|
2018-01-18 19:30:30 -08:00
|
|
|
|
cp "ガ"
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .end
|
|
|
|
|
cp "<PLAY_G>"
|
|
|
|
|
jr c, .next
|
2018-01-19 17:48:33 -08:00
|
|
|
|
cp "<JP_18>" + 1
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .end
|
2018-01-18 19:30:30 -08:00
|
|
|
|
cp "<NI>"
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .next
|
2018-01-18 19:30:30 -08:00
|
|
|
|
cp "<NO>" + 1
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .end
|
2018-01-18 19:30:30 -08:00
|
|
|
|
cp "<ROUTE>"
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .next
|
|
|
|
|
cp "<GREEN>" + 1
|
|
|
|
|
jr c, .end
|
|
|
|
|
cp "<ENEMY>"
|
|
|
|
|
jr c, .next
|
|
|
|
|
cp "<ENEMY>" + 1
|
|
|
|
|
jr c, .end
|
|
|
|
|
cp "<MOM>"
|
|
|
|
|
jr c, .next
|
|
|
|
|
|
|
|
|
|
.end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-24 12:18:44 -08:00
|
|
|
|
.next
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d0f3:
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc608 + 5]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonSpecies], a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd81]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc74e], a
|
|
|
|
|
ld hl, wc608 + 53
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld de, wOTTrademonOTName
|
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld a, "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [de], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc608 + 11]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonID], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc608 + 12]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonID + 1], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608 + 26
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonDVs], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hl]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonDVs + 1], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld bc, wc608 + 5
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall GetCaughtGender
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, c
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonCaughtData], a
|
2019-04-08 05:15:10 -07:00
|
|
|
|
call SpeechTextbox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call FadeToMenu
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function10804d
|
|
|
|
|
farcall Function17d1f1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2015-11-28 12:13:40 -08:00
|
|
|
|
ld [wForceEvolution], a
|
2019-11-08 13:03:08 -08:00
|
|
|
|
ld a, LINK_TRADECENTER
|
2015-10-19 07:23:58 -07:00
|
|
|
|
ld [wLinkMode], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall EvolvePokemon
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-10-19 07:23:58 -07:00
|
|
|
|
ld [wLinkMode], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall SaveAfterLinkTrade
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
|
|
|
|
ld [$a800], a
|
|
|
|
|
call CloseSRAM
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wMapGroup]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wMapNumber]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2017-12-24 10:46:34 -08:00
|
|
|
|
call GetMapSceneID
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, d
|
|
|
|
|
or e
|
|
|
|
|
jr z, .asm_17d180
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [de], a
|
|
|
|
|
|
|
|
|
|
.asm_17d180
|
2015-12-01 18:54:11 -08:00
|
|
|
|
call CloseSubmenu
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call RestartMapMusic
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Mobile_CopyDefaultOTName:
|
2018-01-22 16:10:09 -08:00
|
|
|
|
ld hl, Mobile5F_PlayersName
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc63d
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-22 16:10:09 -08:00
|
|
|
|
Mobile5F_PlayersName:
|
2015-03-11 21:15:15 -07:00
|
|
|
|
db "クりス@@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Mobile_CopyDefaultNickname:
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld hl, .DefaultNickname
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc642
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.DefaultNickname:
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "?????"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Mobile_CopyDefaultMail:
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld a, "@"
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc647
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, MAIL_MSG_LENGTH + 1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld hl, .DefaultMessage
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc647
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.DefaultMessage:
|
2015-03-11 21:15:15 -07:00
|
|
|
|
db "こんにちは@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Mobile_CopyDefaultMailAuthor:
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld a, "@"
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc668
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2018-01-22 16:10:09 -08:00
|
|
|
|
ld hl, Mobile5F_PlayersName
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc668
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
CheckStringContainsLessThanBNextCharacters:
|
2015-11-24 12:18:44 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2015-11-24 12:18:44 -08:00
|
|
|
|
cp "<NEXT>"
|
|
|
|
|
jr nz, .next_char
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec b
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr z, .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-11-24 12:18:44 -08:00
|
|
|
|
.next_char
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-24 12:18:44 -08:00
|
|
|
|
.done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d1f1:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wCurPartySpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
|
|
|
|
call SetSeenAndCaughtMon
|
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wCurPartySpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp UNOWN
|
|
|
|
|
jr nz, .asm_17d223
|
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1DVs
|
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2015-11-04 08:19:58 -08:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call AddNTimes
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef GetUnownLetter
|
2017-12-24 09:47:30 -08:00
|
|
|
|
callfar UpdateUnownDex
|
2015-11-29 18:34:59 -08:00
|
|
|
|
ld a, [wFirstUnownSeen]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d223
|
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wUnownLetter]
|
2015-11-29 18:34:59 -08:00
|
|
|
|
ld [wFirstUnownSeen], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17d223
|
|
|
|
|
ret
|
|
|
|
|
|
2015-08-24 10:35:05 -07:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2018-01-23 14:39:09 -08:00
|
|
|
|
; Parameter: [wScriptVar] = 0..1
|
2015-08-24 10:35:05 -07:00
|
|
|
|
;
|
2018-01-23 14:39:09 -08:00
|
|
|
|
; if [wScriptVar] == FALSE
|
2015-08-24 10:35:05 -07:00
|
|
|
|
; Show japanese menu options
|
|
|
|
|
; - News - News - ??? - Cancel
|
2018-01-23 14:39:09 -08:00
|
|
|
|
; if [wScriptVar] == TRUE
|
2015-08-24 10:35:05 -07:00
|
|
|
|
; Show BattleTower-Menu with 3 options in english language
|
|
|
|
|
; - Challenge - Explanation - Cancel
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Menu_ChallengeExplanationCancel:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wScriptVar]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr nz, .English
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2018-01-23 13:08:43 -08:00
|
|
|
|
ld hl, MenuHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr .Load_Interpret
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.English:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2018-01-23 13:08:43 -08:00
|
|
|
|
ld hl, MenuHeader_ChallengeExplanationCancel ; English Menu
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Load_Interpret:
|
2018-01-23 13:08:43 -08:00
|
|
|
|
call LoadMenuHeader
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17d246
|
2015-12-24 19:58:42 -08:00
|
|
|
|
call CloseWindow
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d246:
|
2015-12-15 15:59:49 -08:00
|
|
|
|
call VerticalMenu
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .Exit
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wScriptVar]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $5
|
2015-12-15 15:59:49 -08:00
|
|
|
|
jr nz, .UsewMenuCursorY
|
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $3
|
|
|
|
|
ret z
|
2015-12-15 15:59:49 -08:00
|
|
|
|
jr c, .UsewMenuCursorY
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr .LoadToScriptVar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.UsewMenuCursorY:
|
2015-12-15 15:59:49 -08:00
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.LoadToScriptVar:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Exit:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MenuHeader_17d26a:
|
2018-01-14 02:59:56 -08:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 13:38:14 -08:00
|
|
|
|
menu_coords 0, 0, 14, 9
|
2018-01-23 13:08:43 -08:00
|
|
|
|
dw MenuData_17d272
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MenuData_17d272:
|
2018-01-14 02:59:56 -08:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 4
|
2015-11-24 12:18:44 -08:00
|
|
|
|
db "ニュース¯よみこむ@"
|
|
|
|
|
db "ニュース¯みる@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "せつめい@"
|
|
|
|
|
db "やめる@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MenuHeader_ChallengeExplanationCancel:
|
2018-01-14 02:59:56 -08:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 13:38:14 -08:00
|
|
|
|
menu_coords 0, 0, 14, 7
|
2018-01-23 13:08:43 -08:00
|
|
|
|
dw MenuData_ChallengeExplanationCancel
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MenuData_ChallengeExplanationCancel:
|
2018-01-14 02:59:56 -08:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 3
|
|
|
|
|
db "Challenge@"
|
|
|
|
|
db "Explanation@"
|
|
|
|
|
db "Cancel@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d2b6:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17d2c0
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function1181da
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d2c0:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld [wJumptableIndex], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld [wcf65], a
|
|
|
|
|
ld [wcf66], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d2ce:
|
2020-03-31 18:26:59 -07:00
|
|
|
|
ld a, BANK(s5_aa72)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2020-03-31 18:26:59 -07:00
|
|
|
|
ld a, [s5_aa72]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d2e2
|
|
|
|
|
ld a, $1
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d2e2
|
|
|
|
|
call Function17d314
|
|
|
|
|
ret c
|
2019-04-08 05:15:10 -07:00
|
|
|
|
call SpeechTextbox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call FadeToMenu
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17d370
|
|
|
|
|
call Function17d45a
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, MUSIC_MOBILE_CENTER
|
|
|
|
|
ld a, e
|
|
|
|
|
ld [wMapMusic], a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, d
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlayMusic
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ReturnToMapFromSubmenu
|
2015-12-01 18:54:11 -08:00
|
|
|
|
call CloseSubmenu
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d314:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [$b1b1]
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
cp $21
|
|
|
|
|
jr nc, .asm_17d354
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, $0
|
|
|
|
|
ld h, l
|
|
|
|
|
ld de, $a006
|
|
|
|
|
ld a, [$a004]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [$a005]
|
|
|
|
|
ld b, a
|
|
|
|
|
.asm_17d336
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
dec bc
|
|
|
|
|
ld a, b
|
|
|
|
|
or c
|
|
|
|
|
jr nz, .asm_17d336
|
|
|
|
|
ld a, [$a002]
|
|
|
|
|
cp l
|
|
|
|
|
jr nz, .asm_17d354
|
|
|
|
|
ld a, [$a003]
|
|
|
|
|
cp h
|
|
|
|
|
jr nz, .asm_17d354
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d354
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
ld hl, $aa73
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $c
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $2
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d370:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
|
|
|
|
ld [wcd6c], a
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
|
|
|
|
call ClearScreen
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2018-07-15 08:58:01 -07:00
|
|
|
|
ld hl, vTiles0 tile $ee
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, PokemonNewsGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $48 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2 tile $7f
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2018-07-15 08:58:01 -07:00
|
|
|
|
ld de, vTiles0 tile $ee
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, PostalMarkGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2 tile $60
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call EnableLCD
|
|
|
|
|
call Function17d60b
|
|
|
|
|
ld a, $0
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wBGMapBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $d0
|
|
|
|
|
ld [wcd21], a
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $a006
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld bc, $1000
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d3f6:
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
|
|
|
|
call ClearScreen
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
Function17d405:
|
|
|
|
|
call DisableLCD
|
2018-07-15 08:58:01 -07:00
|
|
|
|
ld hl, vTiles0 tile $ee
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, PokemonNewsGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, $48 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2 tile $7f
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2018-07-15 08:58:01 -07:00
|
|
|
|
ld de, vTiles0 tile $ee
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call EnableLCD
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, PokemonNewsPalettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d45a:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17d45a
|
2015-10-17 09:58:26 -07:00
|
|
|
|
call JoyTextDelay
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd77]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17d46f
|
|
|
|
|
call Function17d474
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17d45a
|
|
|
|
|
|
|
|
|
|
.asm_17d46f
|
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d474:
|
2015-12-26 18:59:03 -08:00
|
|
|
|
jumptable Jumptable_17d483, wcd77
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Jumptable_17d483:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dw Function17d48d
|
|
|
|
|
dw Function17d5be
|
|
|
|
|
dw Function17d5c4
|
|
|
|
|
dw Function17d6fd
|
|
|
|
|
dw Function17e427
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d48d:
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, PokemonNewsPalettes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2019-11-03 10:55:29 -08:00
|
|
|
|
ld hl, PokemonNewsTileAttrmap
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0
|
2020-02-13 09:30:13 -08:00
|
|
|
|
bccoord 0, 0, wAttrmap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $12
|
|
|
|
|
.asm_17d4a4
|
|
|
|
|
push af
|
|
|
|
|
ld a, $14
|
|
|
|
|
push hl
|
|
|
|
|
.asm_17d4a8
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
cp $7f
|
|
|
|
|
jr z, .asm_17d4b0
|
|
|
|
|
add $80
|
|
|
|
|
|
|
|
|
|
.asm_17d4b0
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [bc], a
|
|
|
|
|
inc bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d4a8
|
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d4a4
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd6c]
|
|
|
|
|
cp e
|
|
|
|
|
jr z, .asm_17d4e0
|
|
|
|
|
ld a, e
|
|
|
|
|
ld [wcd6c], a
|
2015-12-07 08:28:58 -08:00
|
|
|
|
ld [wMapMusic], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, $0
|
|
|
|
|
call PlayMusic2
|
|
|
|
|
|
|
|
|
|
.asm_17d4e0
|
|
|
|
|
ld a, [hli]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, $8
|
|
|
|
|
.asm_17d4e6
|
|
|
|
|
srl a
|
|
|
|
|
jr nc, .asm_17d4f6
|
|
|
|
|
ld b, $8
|
|
|
|
|
push af
|
|
|
|
|
.asm_17d4ed
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec b
|
|
|
|
|
jr nz, .asm_17d4ed
|
|
|
|
|
pop af
|
|
|
|
|
jr .asm_17d4fc
|
|
|
|
|
|
|
|
|
|
.asm_17d4f6
|
|
|
|
|
push af
|
|
|
|
|
ld a, e
|
|
|
|
|
add $8
|
|
|
|
|
ld e, a
|
|
|
|
|
pop af
|
|
|
|
|
|
|
|
|
|
.asm_17d4fc
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17d4e6
|
|
|
|
|
push hl
|
|
|
|
|
call Function17d5f6
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d539
|
|
|
|
|
.asm_17d508
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4f], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd50], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd51], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
add $98
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e613
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e691
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d508
|
|
|
|
|
|
|
|
|
|
.asm_17d539
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
.asm_17d53a
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
push de
|
|
|
|
|
pop hl
|
|
|
|
|
inc hl
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d53a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld de, wCreditsTimer
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $c
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld de, wcd32
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $10
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd42], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd43], a
|
|
|
|
|
ld a, [hli]
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld [wMobileInactivityTimerMinutes], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld [wMobileInactivityTimerSeconds], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld [wMobileInactivityTimerFrames], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d58a
|
|
|
|
|
call Function17d6a1
|
|
|
|
|
|
|
|
|
|
.asm_17d58a
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd49], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd4a], a
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd4b], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd4c], a
|
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd4d], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd4e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jp Function17e438
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d5be:
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e438
|
|
|
|
|
|
|
|
|
|
Function17d5c4:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hJoyPressed]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld c, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, c
|
|
|
|
|
ld hl, wcd32
|
2015-12-26 08:31:56 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
srl a
|
2015-12-26 08:31:56 -08:00
|
|
|
|
jr c, .got_button
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc c
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc c
|
2015-12-26 08:31:56 -08:00
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-26 08:31:56 -08:00
|
|
|
|
.got_button
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
and c
|
|
|
|
|
cp $ff
|
|
|
|
|
ret z
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld a, [wcd20]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, l
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, h
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $3
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d5f6:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d60b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $b1d3
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $20
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [$b1b1]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [$b1b2]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [$b1b3]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [$b1b4]
|
|
|
|
|
ld h, a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, c
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d684
|
|
|
|
|
.asm_17d63b
|
|
|
|
|
push bc
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4a], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd49], a
|
|
|
|
|
push hl
|
|
|
|
|
push de
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, b
|
|
|
|
|
ld d, $0
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4b], a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [wcd4c], a
|
|
|
|
|
pop de
|
|
|
|
|
pop hl
|
|
|
|
|
inc b
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
|
|
|
|
jr z, .asm_17d684
|
|
|
|
|
push bc
|
|
|
|
|
push de
|
|
|
|
|
ld a, [wcd49]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd4a]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd4b]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd4c]
|
|
|
|
|
ld d, a
|
|
|
|
|
.asm_17d67a
|
|
|
|
|
add hl, de
|
|
|
|
|
dec bc
|
|
|
|
|
ld a, c
|
|
|
|
|
or b
|
|
|
|
|
jr nz, .asm_17d67a
|
|
|
|
|
pop de
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17d63b
|
|
|
|
|
|
|
|
|
|
.asm_17d684
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $b1b3
|
|
|
|
|
ld a, [$b1b1]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [$b1b2]
|
|
|
|
|
ld b, a
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d6a1:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd6e]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $b1d3
|
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd47], a
|
|
|
|
|
ld a, [hl]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wBGMapPalBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $b1b3
|
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, c
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd5e], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd5f], a
|
|
|
|
|
ld de, wcd60
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, wcd64
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd69], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd68], a
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd6a], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd6b], a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d6fd:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd77]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, asm_17d721
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, asm_17d721
|
|
|
|
|
|
|
|
|
|
Function17d711:
|
2015-12-26 08:31:56 -08:00
|
|
|
|
.crash_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $31
|
2015-12-26 08:31:56 -08:00
|
|
|
|
jr nc, .crash_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld hl, Jumptable17d72a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2017-06-17 16:14:55 -07:00
|
|
|
|
jp hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-10-24 12:33:18 -07:00
|
|
|
|
asm_17d721:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e5af
|
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Jumptable17d72a:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dw Function17d78c
|
|
|
|
|
dw Function17d78d
|
|
|
|
|
dw Function17d7b4
|
|
|
|
|
dw Function17d7c2
|
|
|
|
|
dw Function17d7d3
|
|
|
|
|
dw Function17d7e5
|
|
|
|
|
dw Function17d818
|
|
|
|
|
dw Function17d833
|
|
|
|
|
dw Function17d85d
|
|
|
|
|
dw Function17d902
|
|
|
|
|
dw Function17d93a
|
|
|
|
|
dw Function17d98b
|
|
|
|
|
dw Function17d9e3
|
|
|
|
|
dw Function17da31
|
|
|
|
|
dw Function17da9c
|
|
|
|
|
dw Function17dadc
|
|
|
|
|
dw Function17db2d
|
|
|
|
|
dw Function17db56
|
|
|
|
|
dw Function17db77
|
|
|
|
|
dw Function17dbe9
|
|
|
|
|
dw Function17dc1f
|
|
|
|
|
dw Function17dc9f
|
|
|
|
|
dw Function17dca9
|
|
|
|
|
dw Function17dccf
|
|
|
|
|
dw Function17dd13
|
|
|
|
|
dw Function17dd30
|
|
|
|
|
dw Function17dd49
|
|
|
|
|
dw Function17ddcd
|
|
|
|
|
dw Function17de32
|
|
|
|
|
dw Function17de91
|
|
|
|
|
dw Function17ded9
|
|
|
|
|
dw Function17e0fd
|
|
|
|
|
dw Function17e133
|
|
|
|
|
dw Function17e165
|
|
|
|
|
dw Function17e1a1
|
|
|
|
|
dw Function17e254
|
|
|
|
|
dw Function17e261
|
|
|
|
|
dw Function17e270
|
|
|
|
|
dw Function17e27f
|
|
|
|
|
dw Function17e293
|
|
|
|
|
dw Function17e2a7
|
2018-01-02 20:16:56 -08:00
|
|
|
|
dw IncCrashCheckPointer_SaveGameData
|
|
|
|
|
dw IncCrashCheckPointer_SaveAfterLinkTrade
|
|
|
|
|
dw IncCrashCheckPointer_SaveBox
|
|
|
|
|
dw IncCrashCheckPointer_SaveChecksum
|
|
|
|
|
dw IncCrashCheckPointer_SaveTrainerRankingsChecksum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dw Function17e3e0
|
|
|
|
|
dw Function17e3f0
|
|
|
|
|
dw Function17e409
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d78c:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d78d:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $a006
|
|
|
|
|
add hl, bc
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld bc, $1000
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d7b4:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlayMusic2
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d7c2:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaySFX
|
|
|
|
|
call WaitSFX
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d7d3:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
dec a
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2018-01-16 20:47:45 -08:00
|
|
|
|
call PlayCry
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitSFX
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d7e5:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4f], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd50], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd51], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
add $98
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e613
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e691
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d818:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e447
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d833:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push de
|
|
|
|
|
push bc
|
|
|
|
|
call Function17e32b
|
|
|
|
|
pop bc
|
|
|
|
|
pop de
|
|
|
|
|
call Function17e43d
|
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function11c08f
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d85d:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
push hl
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld de, wcc60
|
|
|
|
|
.asm_17d86c
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d86c
|
|
|
|
|
pop hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, $0
|
|
|
|
|
.asm_17d878
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, .asm_17d8c7
|
|
|
|
|
ld [wcd4f], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd50], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd51], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, [wcd51]
|
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17d89b
|
|
|
|
|
ld a, [wcd4f]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17d8a1
|
|
|
|
|
|
|
|
|
|
.asm_17d89b
|
|
|
|
|
ld a, [wcd4f]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17d8a1
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd50]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd51]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd52]
|
|
|
|
|
.asm_17d8ad
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
inc c
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d8ad
|
|
|
|
|
pop hl
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17d8c2
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17d878
|
|
|
|
|
|
|
|
|
|
.asm_17d8c2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
jr .asm_17d878
|
|
|
|
|
|
|
|
|
|
.asm_17d8c7
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push bc
|
|
|
|
|
ld a, $3
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e32b
|
|
|
|
|
pop bc
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd3b], a
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcf66], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function118329
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d8fe
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d902:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
push de
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e32b
|
|
|
|
|
pop de
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld de, wcc60
|
|
|
|
|
.asm_17d918
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d918
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcf66], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function11837a
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d936
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d93a:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e32b
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e6de
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall LoadMonPaletteAsNthBGPal
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-01-16 11:30:10 -08:00
|
|
|
|
farcall HOF_AnimateFrontpic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d98b:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e32b
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e6de
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTrainerClass], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall LoadTrainerClassPaletteAsNthBGPal
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
push de
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2018-01-16 11:30:10 -08:00
|
|
|
|
farcall GetTrainerPic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $707
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef PlaceGraphic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17d9e3:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da01
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17da07
|
|
|
|
|
|
|
|
|
|
.asm_17da01
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17da07
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, a
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da2d
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17da30
|
|
|
|
|
|
|
|
|
|
.asm_17da2d
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da30
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17da31:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da4f
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17da55
|
|
|
|
|
|
|
|
|
|
.asm_17da4f
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17da55
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
bit 7, c
|
|
|
|
|
jr nz, .asm_17da70
|
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
or [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
jr .asm_17da7d
|
|
|
|
|
|
|
|
|
|
.asm_17da70
|
|
|
|
|
ld hl, Unknown_17da94
|
|
|
|
|
ld a, c
|
|
|
|
|
and $7f
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
and [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
|
|
|
|
|
.asm_17da7d
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da88
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17da8b
|
|
|
|
|
|
|
|
|
|
.asm_17da88
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da8b
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
Unknown_17da8c:
|
|
|
|
|
x = 0
|
2018-05-06 09:16:57 -07:00
|
|
|
|
rept 8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 1 << x
|
|
|
|
|
x = x + 1
|
2018-05-06 09:16:57 -07:00
|
|
|
|
endr
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
Unknown_17da94:
|
|
|
|
|
x = 0
|
2018-05-06 09:16:57 -07:00
|
|
|
|
rept 8
|
2019-02-16 10:52:19 -08:00
|
|
|
|
db $ff ^ (1 << x)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
x = x + 1
|
2018-05-06 09:16:57 -07:00
|
|
|
|
endr
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17da9c:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
dec a
|
|
|
|
|
jr z, .asm_17dabd
|
|
|
|
|
push af
|
|
|
|
|
call Function17e566
|
|
|
|
|
pop af
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
.asm_17daba
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17dabd
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17daba
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
jr .asm_17daba
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dadc:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db0e
|
|
|
|
|
jr nc, .asm_17db0e
|
|
|
|
|
ld hl, wcd31
|
|
|
|
|
ld a, [wcd2b]
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db11
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db0e
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17db11
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
jr .asm_17db0e
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17db2d:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db53
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
inc a
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db53
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db53
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17db56:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
cp $1
|
|
|
|
|
jr z, .asm_17db74
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
dec a
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
dec a
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db74
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17db77:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17dbae
|
|
|
|
|
jr nc, .asm_17dbae
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr c, .asm_17db9f
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
dec a
|
|
|
|
|
|
|
|
|
|
.asm_17db9f
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17dbb1
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17dbae
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dbb1:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
cp [hl]
|
|
|
|
|
ret nc
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
sub [hl]
|
|
|
|
|
.asm_17dbd4
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
push af
|
|
|
|
|
ld hl, wcd30
|
|
|
|
|
ld a, b
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr nz, .asm_17dbe4
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ld hl, wcd31
|
|
|
|
|
|
|
|
|
|
.asm_17dbe4
|
|
|
|
|
inc [hl]
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17dbd4
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dbe9:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
sub [hl]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr z, .asm_17dbf5
|
|
|
|
|
xor a
|
|
|
|
|
|
|
|
|
|
.asm_17dbf5
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
dec a
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
ld b, a
|
|
|
|
|
xor a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
.asm_17dc05
|
|
|
|
|
dec b
|
|
|
|
|
jr z, .asm_17dc0b
|
|
|
|
|
add [hl]
|
|
|
|
|
jr .asm_17dc05
|
|
|
|
|
|
|
|
|
|
.asm_17dc0b
|
|
|
|
|
add c
|
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dc1f:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc688
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc688
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $40
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc708], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70a], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add $5
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70c], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc709], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add $4
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70b], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $96
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70d], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5c
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70e], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc70f], a
|
|
|
|
|
ld hl, wc708
|
2018-01-23 13:08:43 -08:00
|
|
|
|
call LoadMenuHeader
|
2015-12-15 15:59:49 -08:00
|
|
|
|
call VerticalMenu
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr nc, .asm_17dc6e
|
|
|
|
|
ld a, $2
|
2015-12-15 15:59:49 -08:00
|
|
|
|
ld [wMenuCursorY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17dc6e
|
2015-12-24 19:58:42 -08:00
|
|
|
|
call CloseWindow
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-12-15 15:59:49 -08:00
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $1
|
|
|
|
|
jr nz, .asm_17dc85
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc68a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc68a + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17dc8d
|
|
|
|
|
|
|
|
|
|
.asm_17dc85
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc68a + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc68a + 3]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17dc8d
|
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2020-10-26 12:45:57 -07:00
|
|
|
|
MenuData_17dc96: ; unreferenced
|
2018-01-14 02:59:56 -08:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db 2
|
|
|
|
|
db "はい@"
|
|
|
|
|
db "いいえ@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dc9f:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-11-20 08:47:52 -08:00
|
|
|
|
call RotateFourPalettesLeft
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dca9:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
Function17dcaf:
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals1
|
2018-01-01 05:47:16 -08:00
|
|
|
|
ld de, 1 palettes
|
|
|
|
|
ld c, 8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17dcbb
|
|
|
|
|
push hl
|
|
|
|
|
ld a, $ff
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, $7f
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
add hl, de
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17dcbb
|
2015-11-20 08:47:52 -08:00
|
|
|
|
call RotateThreePalettesRight
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dccf:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd4b]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd4c]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld b, a
|
|
|
|
|
call Function17e43d
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17dced
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, .asm_17dd0d
|
2015-12-26 08:31:56 -08:00
|
|
|
|
.crash_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $31
|
2015-12-26 08:31:56 -08:00
|
|
|
|
jr nc, .crash_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17d711
|
|
|
|
|
ld a, [wcd77]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17dd0d
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17dd11
|
|
|
|
|
jr .asm_17dced
|
|
|
|
|
|
|
|
|
|
.asm_17dd0d
|
|
|
|
|
pop hl
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jp HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17dd11
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dd13:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e447
|
|
|
|
|
push hl
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
push hl
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
2016-05-08 11:11:24 -07:00
|
|
|
|
call PlaceHLTextAtBC
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dd30:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
push af
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
call Function17e600
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17dd49:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr c, .sram
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr .got_bank
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.sram
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.got_bank
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc688
|
|
|
|
|
ld a, [wc711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr c, .close_sram
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr .exited_bank
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.close_sram
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.exited_bank
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc712
|
|
|
|
|
ld de, wc688
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr z, .next
|
|
|
|
|
jr c, .load
|
|
|
|
|
jr .load2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.next
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr nz, .loop
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.load2
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.load
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17ddcd:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17dde7
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17dded
|
|
|
|
|
|
|
|
|
|
.asm_17dde7
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17dded
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld [wc710], a
|
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17de0c
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17de0f
|
|
|
|
|
|
|
|
|
|
.asm_17de0c
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17de0f
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc710
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and [hl]
|
|
|
|
|
pop hl
|
|
|
|
|
jr nz, .asm_17de26
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de2e
|
|
|
|
|
|
|
|
|
|
.asm_17de26
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de2e
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17de32:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $9
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17f4f6
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc711
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17de61
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
|
|
|
|
jr z, .asm_17de6b
|
|
|
|
|
jr c, .asm_17de82
|
|
|
|
|
jr .asm_17de78
|
|
|
|
|
|
|
|
|
|
.asm_17de6b
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17de61
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de78
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de82
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de8a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17de91:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17f4f6
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld l, e
|
|
|
|
|
ld h, d
|
|
|
|
|
and [hl]
|
|
|
|
|
jr nz, .asm_17deca
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17ded2
|
|
|
|
|
|
|
|
|
|
.asm_17deca
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17ded2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17ded9:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $1f
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
|
|
|
|
ld [wTempEnemyMonSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartyLevel], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $6
|
|
|
|
|
jp nc, Function17e026
|
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMonType], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
push bc
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef TryAddMonToParty
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall SetCaughtData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
bit 1, b
|
|
|
|
|
jr z, .asm_17df33
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMonNicknames
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call SkipNames
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df37
|
|
|
|
|
|
|
|
|
|
.asm_17df33
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17df37
|
|
|
|
|
bit 2, b
|
|
|
|
|
jr z, .asm_17df5a
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2021-03-17 13:16:02 -07:00
|
|
|
|
ld hl, wPartyMonOTs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call SkipNames
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall SetGiftPartyMonCaughtData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df5e
|
|
|
|
|
|
|
|
|
|
.asm_17df5a
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17df5e
|
|
|
|
|
bit 3, b
|
|
|
|
|
jr z, .asm_17df79
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1ID
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df7b
|
|
|
|
|
|
|
|
|
|
.asm_17df79
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17df7b
|
|
|
|
|
bit 4, b
|
|
|
|
|
jr z, .asm_17dfd0
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1DVs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1Species
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld a, [hl]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetBaseData
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1MaxHP
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
push hl
|
2018-02-22 09:12:43 -08:00
|
|
|
|
ld b, FALSE
|
2018-02-22 08:13:29 -08:00
|
|
|
|
farcall CalcMonStats
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1HP
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17dfd2
|
|
|
|
|
|
|
|
|
|
.asm_17dfd0
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17dfd2
|
|
|
|
|
bit 5, b
|
|
|
|
|
jr z, .asm_17dfea
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1Item
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17dfeb
|
|
|
|
|
|
|
|
|
|
.asm_17dfea
|
|
|
|
|
inc hl
|
|
|
|
|
|
|
|
|
|
.asm_17dfeb
|
|
|
|
|
bit 6, b
|
|
|
|
|
jr z, .asm_17e01f
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1Moves
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
push de
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop de
|
|
|
|
|
push hl
|
|
|
|
|
push de
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPartyMon1PP
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef FillPP
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jp asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e01f
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
jp asm_17e0ee
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e026:
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, BANK(sBoxCount)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [sBoxCount]
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
cp $14
|
|
|
|
|
jp nc, .asm_17e0ea
|
|
|
|
|
bit 0, b
|
|
|
|
|
jp z, .asm_17e0ea
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall LoadEnemyMon
|
2018-02-22 08:13:29 -08:00
|
|
|
|
farcall SendMonIntoBox
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall SetBoxMonCaughtData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, BANK(sBoxMonNicknames)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
bit 1, b
|
|
|
|
|
jr z, .asm_17e067
|
|
|
|
|
push bc
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $b
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, sBoxMonNicknames
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e06b
|
|
|
|
|
|
|
|
|
|
.asm_17e067
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17e06b
|
|
|
|
|
bit 2, b
|
|
|
|
|
jr z, .asm_17e08e
|
|
|
|
|
push bc
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2021-03-17 13:16:02 -07:00
|
|
|
|
ld de, sBoxMonOTs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
|
|
|
|
call CloseSRAM
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall SetGiftBoxMonCaughtData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e092
|
|
|
|
|
|
|
|
|
|
.asm_17e08e
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17e092
|
|
|
|
|
bit 3, b
|
|
|
|
|
jr z, .asm_17e0a2
|
|
|
|
|
push bc
|
|
|
|
|
ld de, sBoxMon1ID
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e0a4
|
|
|
|
|
|
|
|
|
|
.asm_17e0a2
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e0a4
|
|
|
|
|
bit 4, b
|
|
|
|
|
jr z, .asm_17e0b4
|
|
|
|
|
push bc
|
|
|
|
|
ld de, sBoxMon1DVs
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e0b6
|
|
|
|
|
|
|
|
|
|
.asm_17e0b4
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e0b6
|
|
|
|
|
bit 5, b
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
jr z, .asm_17e0be
|
|
|
|
|
ld [sBoxMon1Item], a
|
|
|
|
|
|
|
|
|
|
.asm_17e0be
|
|
|
|
|
bit 6, b
|
|
|
|
|
jr z, .asm_17e0e1
|
|
|
|
|
push bc
|
|
|
|
|
ld de, sBoxMon1Moves
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, sBoxMon1Moves
|
|
|
|
|
ld de, sBoxMon1PP
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef FillPP
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e0e1
|
|
|
|
|
call CloseSRAM
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
jr asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e0ea
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $1a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
|
2018-10-24 12:33:18 -07:00
|
|
|
|
asm_17e0ee:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e0fd:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurItem], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2020-12-23 13:29:30 -08:00
|
|
|
|
ld [wItemQuantityChange], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wNumItems
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ReceiveItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e127
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e127
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e133:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall MobileCheckOwnMonAnywhere
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e159
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e159
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e165:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurItem], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wNumItems
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e195
|
|
|
|
|
push hl
|
2019-03-18 08:43:58 -07:00
|
|
|
|
ld hl, wNumPCItems
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e195
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e195
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e1a1:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $d
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1bb
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17e1c1
|
|
|
|
|
|
|
|
|
|
.asm_17e1bb
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e1c1
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1e2
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17e1e5
|
|
|
|
|
|
|
|
|
|
.asm_17e1e2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e1e5
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1f3
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17e1f9
|
|
|
|
|
|
|
|
|
|
.asm_17e1f3
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70c]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17e1f9
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc688
|
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e21a
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17e21d
|
|
|
|
|
|
|
|
|
|
.asm_17e21a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e21d
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc688
|
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17e227
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
|
|
|
|
jr z, .asm_17e231
|
|
|
|
|
jr c, .asm_17e23e
|
|
|
|
|
jr .asm_17e248
|
|
|
|
|
|
|
|
|
|
.asm_17e231
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e227
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc712]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e23e
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e248
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc712 + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc712 + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17e250
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e254:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e261:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc hl
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e270:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc hl
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e27f:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [de]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e293:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [de]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e2a7:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e32b
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcf66], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function118233
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld de, PostalMarkGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2 tile $60
|
2020-02-27 11:33:30 -08:00
|
|
|
|
lb bc, BANK(PostalMarkGFX), 1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Get2bpp
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17e2d8
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17e2f7
|
|
|
|
|
cp $b
|
|
|
|
|
jr z, .asm_17e300
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17e2d8
|
|
|
|
|
call Function17d60b
|
|
|
|
|
call Function17e349
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd7a], a
|
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $aa73
|
|
|
|
|
ld de, $aa7f
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $c
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17e2f7
|
|
|
|
|
call Function17e349
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcd7a], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17e300
|
|
|
|
|
call Function17e349
|
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wcd7a], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e309:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
call Function17dcaf
|
|
|
|
|
call ClearScreen
|
|
|
|
|
call Function17e349
|
|
|
|
|
call Function17d5f6
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DisplayMobileError
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e349
|
|
|
|
|
call Function17dcaf
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e32b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $b0b1
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wBGMapBuffer
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5b
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e349:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $b0b1
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld de, wBGMapBuffer
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5b
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall: MACRO
|
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer ; redundant
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-03 08:57:34 -08:00
|
|
|
|
rept _NARG
|
2018-01-02 20:16:56 -08:00
|
|
|
|
farcall \1
|
2018-01-03 08:57:34 -08:00
|
|
|
|
shift
|
|
|
|
|
endr
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ENDM
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
IncCrashCheckPointer_SaveGameData:
|
2018-07-22 21:13:43 -07:00
|
|
|
|
inc_crash_check_pointer_farcall _SaveGameData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
IncCrashCheckPointer_SaveAfterLinkTrade:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall SaveAfterLinkTrade
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
IncCrashCheckPointer_SaveBox:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall SaveBox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
IncCrashCheckPointer_SaveChecksum:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall SaveChecksum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
IncCrashCheckPointer_SaveTrainerRankingsChecksum:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall UpdateTrainerRankingsChecksum2, BackupMobileEventIndex
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e3e0:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e3f0:
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17e3f6
|
2015-10-17 09:58:26 -07:00
|
|
|
|
call JoyTextDelay
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, hJoyPressed
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $1
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $2
|
|
|
|
|
ret nz
|
|
|
|
|
call WaitBGMap
|
|
|
|
|
jr .asm_17e3f6
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e409:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wcd77
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e40f:
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
2018-01-02 20:16:56 -08:00
|
|
|
|
jr HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
IncCrashCheckPointer:
|
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
inc hl
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
HlToCrashCheckPointer:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, h
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e427:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, hJoyPressed
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $1
|
|
|
|
|
jr nz, .asm_17e432
|
|
|
|
|
and $2
|
|
|
|
|
ret z
|
|
|
|
|
|
|
|
|
|
.asm_17e432
|
|
|
|
|
ld a, $3
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e438:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wcd77
|
|
|
|
|
inc [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e43d:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e447:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e451:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
call Function17e51b
|
|
|
|
|
call Function17e4dd
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
push af
|
|
|
|
|
ld a, [wcd49]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd4a]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
call AddNTimes
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
2016-05-05 12:07:37 -07:00
|
|
|
|
ld a, [wMobileCommsJumptableIndex]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17e48b
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
.asm_17e490
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [bc]
|
|
|
|
|
inc bc
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [bc]
|
|
|
|
|
inc bc
|
|
|
|
|
ld d, a
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd26]
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
cp e
|
|
|
|
|
jr z, .asm_17e4d5
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e490
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd27]
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17e4cb
|
|
|
|
|
add hl, de
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e4cb
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e48b
|
|
|
|
|
jr .asm_17e4d8
|
|
|
|
|
|
|
|
|
|
.asm_17e4d5
|
|
|
|
|
pop af
|
|
|
|
|
pop hl
|
|
|
|
|
pop af
|
|
|
|
|
|
|
|
|
|
.asm_17e4d8
|
|
|
|
|
pop af
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e4dd:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd2c]
|
|
|
|
|
and $1
|
|
|
|
|
ret z
|
|
|
|
|
ld a, [wcd29]
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [wcd28]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17e4ff
|
|
|
|
|
ld a, $61
|
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
|
|
.asm_17e4ff
|
|
|
|
|
ld a, [wcd2a]
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
add b
|
|
|
|
|
cp c
|
|
|
|
|
ret z
|
|
|
|
|
ret nc
|
|
|
|
|
ld a, $ee
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e51b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd28]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wCreditsTimer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub [hl]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd4f], a
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
dec a
|
|
|
|
|
call AddNTimes
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2016-05-05 12:07:37 -07:00
|
|
|
|
ld a, [wMobileCommsJumptableIndex]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd27]
|
|
|
|
|
call SimpleMultiply
|
|
|
|
|
.asm_17e544
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd4f]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7f
|
|
|
|
|
call ByteFill
|
|
|
|
|
pop hl
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e544
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e55b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $ed
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e566:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $7f
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e571:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
call AddNTimes
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
dec hl
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
dec a
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd27]
|
|
|
|
|
call SimpleMultiply
|
|
|
|
|
ld l, $0
|
|
|
|
|
ld h, l
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
dec a
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd26]
|
|
|
|
|
call SimpleMultiply
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e5af:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd2c]
|
|
|
|
|
and $2
|
|
|
|
|
ret z
|
|
|
|
|
ld a, [wcd43]
|
|
|
|
|
ld l, a
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld a, [wMobileInactivityTimerMinutes]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2015-07-22 12:57:02 -07:00
|
|
|
|
bccoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2019-03-03 12:07:00 -08:00
|
|
|
|
ld bc, $ffec
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld a, [wMobileInactivityTimerSeconds]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld a, [wMobileInactivityTimerFrames]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e600
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd4d]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd4e]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
|
|
|
|
ld a, [wcd43]
|
|
|
|
|
ld l, a
|
2016-05-08 11:11:24 -07:00
|
|
|
|
ld a, [wMobileInactivityTimerMinutes]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2015-07-22 12:57:02 -07:00
|
|
|
|
bccoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e600:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_17e600
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, $7f
|
|
|
|
|
call ByteFill
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e600
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e613:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
push af
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
|
|
|
|
.asm_17e620
|
|
|
|
|
jr z, .asm_17e626
|
|
|
|
|
add hl, bc
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17e620
|
|
|
|
|
|
|
|
|
|
.asm_17e626
|
|
|
|
|
pop af
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
dec a
|
2015-12-26 18:59:03 -08:00
|
|
|
|
dec a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17e63f
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
inc a
|
|
|
|
|
.asm_17e63b
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e63b
|
|
|
|
|
|
|
|
|
|
.asm_17e63f
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $2
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
dec a
|
2015-12-26 18:59:03 -08:00
|
|
|
|
dec a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17e674
|
|
|
|
|
ld b, a
|
|
|
|
|
.asm_17e651
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $3
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec a
|
2015-12-26 18:59:03 -08:00
|
|
|
|
dec a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17e664
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, $7f
|
|
|
|
|
.asm_17e660
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e660
|
|
|
|
|
|
|
|
|
|
.asm_17e664
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $4
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
dec b
|
|
|
|
|
jr nz, .asm_17e651
|
|
|
|
|
|
|
|
|
|
.asm_17e674
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $5
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec a
|
2015-12-26 18:59:03 -08:00
|
|
|
|
dec a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17e689
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $6
|
|
|
|
|
.asm_17e685
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e685
|
|
|
|
|
|
|
|
|
|
.asm_17e689
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $7
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e691:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
ld hl, NULL
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
push af
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
.asm_17e69f
|
|
|
|
|
jr z, .asm_17e6a5
|
|
|
|
|
add hl, bc
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17e69f
|
|
|
|
|
|
|
|
|
|
.asm_17e6a5
|
|
|
|
|
pop af
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
.asm_17e6ac
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [de]
|
|
|
|
|
.asm_17e6af
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
push hl
|
2015-07-22 12:57:02 -07:00
|
|
|
|
bccoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp $7f
|
|
|
|
|
jr z, .asm_17e6c2
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $8
|
|
|
|
|
jr .asm_17e6c7
|
|
|
|
|
|
|
|
|
|
.asm_17e6c2
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
jr .asm_17e6c7
|
|
|
|
|
|
|
|
|
|
.asm_17e6c7
|
|
|
|
|
pop hl
|
2020-02-13 09:30:13 -08:00
|
|
|
|
bccoord 0, 0, wAttrmap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
inc hl
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e6af
|
|
|
|
|
pop hl
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e6ac
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17e6de:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, [wc709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2020-02-13 09:30:13 -08:00
|
|
|
|
decoord 0, 0, wAttrmap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
pop af
|
|
|
|
|
ld b, $7
|
|
|
|
|
.asm_17e6ee
|
|
|
|
|
push hl
|
|
|
|
|
ld c, $7
|
|
|
|
|
.asm_17e6f1
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e6f1
|
|
|
|
|
pop hl
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $14
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
dec b
|
|
|
|
|
jr nz, .asm_17e6ee
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
PokemonNewsGFX:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
INCBIN "gfx/mobile/pokemon_news.2bpp"
|
|
|
|
|
|
2020-02-27 11:33:30 -08:00
|
|
|
|
PostalMarkGFX:
|
|
|
|
|
INCBIN "gfx/font/postal_mark.2bpp"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2019-11-03 10:55:29 -08:00
|
|
|
|
PokemonNewsTileAttrmap:
|
|
|
|
|
INCBIN "gfx/mobile/pokemon_news.bin"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2020-02-27 11:33:30 -08:00
|
|
|
|
PokemonNewsPalettes:
|
|
|
|
|
INCLUDE "gfx/mobile/pokemon_news.pal"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-07-17 14:08:04 -07:00
|
|
|
|
RunMobileScript::
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc de
|
2018-07-17 14:08:04 -07:00
|
|
|
|
.loop
|
|
|
|
|
call _RunMobileScript
|
|
|
|
|
jr c, .finished
|
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-07-17 14:08:04 -07:00
|
|
|
|
.finished
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-07-17 14:08:04 -07:00
|
|
|
|
_RunMobileScript:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2016-05-14 13:37:12 -07:00
|
|
|
|
jr z, .finished
|
2018-07-17 14:08:04 -07:00
|
|
|
|
cp $10 ; jumptable size
|
2016-05-14 13:37:12 -07:00
|
|
|
|
jr nc, .finished
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
|
|
|
|
push de
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld hl, .Jumptable
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2017-06-17 16:14:55 -07:00
|
|
|
|
jp hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-05-14 13:37:12 -07:00
|
|
|
|
.finished
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.Jumptable:
|
2016-05-14 13:37:12 -07:00
|
|
|
|
dw Function17f081 ; 0
|
|
|
|
|
dw Function17f0f8 ; 1
|
|
|
|
|
dw Function17f154 ; 2
|
|
|
|
|
dw Function17f181 ; 3
|
|
|
|
|
dw Function17f1d0 ; 4
|
|
|
|
|
dw Function17f220 ; 5
|
|
|
|
|
dw Function17f27b ; 6
|
|
|
|
|
dw Function17f2cb ; 7
|
2019-09-23 06:09:49 -07:00
|
|
|
|
dw MobileScript_PlayerName ; 8
|
|
|
|
|
dw MobileScript_Prefecture ; 9
|
2016-05-14 13:37:12 -07:00
|
|
|
|
dw Function17f382 ; a
|
|
|
|
|
dw Function17f3c9 ; b
|
|
|
|
|
dw Function17f3f0 ; c
|
|
|
|
|
dw Function17f41d ; d
|
|
|
|
|
dw Function17f44f ; e
|
|
|
|
|
dw Function17f44f ; f
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f081:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f09f
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, 4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f09d
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f09d
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f09f
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, 7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
pop bc
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld c, a
|
2015-11-05 11:06:03 -08:00
|
|
|
|
call MobilePrintNum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd59]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f0ee
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
inc a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
dec de
|
|
|
|
|
.asm_17f0e0
|
|
|
|
|
ld a, c
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f0ea
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
ld [hld], a
|
|
|
|
|
dec b
|
|
|
|
|
jr .asm_17f0e0
|
|
|
|
|
|
|
|
|
|
.asm_17f0ea
|
|
|
|
|
ld a, [wcd5a]
|
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
|
|
.asm_17f0ee
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f0f8:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f114
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $3
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f112
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f112
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f114
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld a, "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [de], a
|
|
|
|
|
pop hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f154:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f167
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f165
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f165
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f167
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
|
|
|
|
pop de
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function11c08f
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f181:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f19d
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f19b
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f19b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f19d
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld c, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function48c63
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f1d0:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f1ec
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f1ea
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f1ea
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f1ec
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-12-23 13:29:30 -08:00
|
|
|
|
ld [wNamedObjectIndex], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPokemonName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f220:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f23c
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f23a
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f23a
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f23c
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
ld hl, .Genders
|
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld d, a
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.Genders: dw .Boy, .Girl
|
|
|
|
|
.Boy: db "Boy@"
|
|
|
|
|
.Girl: db "Girl@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f27b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f297
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f295
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f295
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f297
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-12-23 13:29:30 -08:00
|
|
|
|
ld [wNamedObjectIndex], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetItemName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f2cb:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd56], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
push hl
|
|
|
|
|
ld de, wcd56
|
|
|
|
|
ld b, $1
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
ld c, a
|
2015-11-05 11:06:03 -08:00
|
|
|
|
call MobilePrintNum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2019-09-23 06:09:49 -07:00
|
|
|
|
MobileScript_PlayerName:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wPlayerName
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld bc, NAME_LENGTH_JAPANESE
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2019-09-23 06:09:49 -07:00
|
|
|
|
MobileScript_Prefecture:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
and $f
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17f355
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, BANK(sCrystalData)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, [sCrystalData + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17f35d
|
|
|
|
|
|
|
|
|
|
.asm_17f355
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld a, BANK(s5_b2f3)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld a, [s5_b2f3]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17f35d
|
|
|
|
|
ld c, a
|
|
|
|
|
call CloseSRAM
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function48c63
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f382:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
and $f
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17f3a3
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, BANK(sCrystalData)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld de, sCrystalData + 3
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17f3ab
|
|
|
|
|
|
|
|
|
|
.asm_17f3a3
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld a, BANK(s5_b2f4)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld de, s5_b2f4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17f3ab
|
2015-10-11 09:15:03 -07:00
|
|
|
|
ld a, PRINTNUM_LEADINGZEROS | 2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, a
|
2015-10-11 09:15:03 -07:00
|
|
|
|
ld a, 3
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
call PrintNum
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f3c9:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push bc
|
|
|
|
|
ld hl, wcd36
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop de
|
|
|
|
|
ld c, $0
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function11c075
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld hl, wc708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, wcd36
|
2019-09-23 06:09:49 -07:00
|
|
|
|
ld bc, 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f3f0:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
push af
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, bc
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop af
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc hl
|
2016-05-10 09:31:49 -07:00
|
|
|
|
inc hl
|
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f41d:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
push hl
|
|
|
|
|
push af
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
2020-02-13 09:30:13 -08:00
|
|
|
|
ld bc, -wTilemap + $10000
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld de, -SCREEN_WIDTH
|
|
|
|
|
ld c, $1
|
|
|
|
|
.asm_17f42c
|
|
|
|
|
ld a, h
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17f435
|
|
|
|
|
ld a, l
|
|
|
|
|
cp SCREEN_WIDTH
|
|
|
|
|
jr c, .asm_17f439
|
|
|
|
|
|
|
|
|
|
.asm_17f435
|
|
|
|
|
add hl, de
|
|
|
|
|
inc c
|
|
|
|
|
jr .asm_17f42c
|
|
|
|
|
|
|
|
|
|
.asm_17f439
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
|
ld a, c
|
|
|
|
|
.asm_17f440
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f447
|
|
|
|
|
add hl, de
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17f440
|
|
|
|
|
|
|
|
|
|
.asm_17f447
|
|
|
|
|
pop af
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
add hl, de
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f44f:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f46d
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld de, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 14:17:18 -07:00
|
|
|
|
cp "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr z, .asm_17f46b
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f46b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f46d
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17f488
|
|
|
|
|
ld a, [wcd54]
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17f48e
|
|
|
|
|
|
|
|
|
|
.asm_17f488
|
|
|
|
|
ld a, [wcd54]
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17f48e
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld h, a
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17f4af
|
|
|
|
|
ld a, $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_17f4b7
|
|
|
|
|
|
|
|
|
|
.asm_17f4af
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $6
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17f4b7
|
2018-07-17 14:17:18 -07:00
|
|
|
|
ld de, wc608
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
ld c, a
|
2015-11-05 11:06:03 -08:00
|
|
|
|
call MobilePrintNum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd5a]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f4ec
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
inc a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
dec de
|
|
|
|
|
.asm_17f4de
|
|
|
|
|
ld a, c
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f4e8
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
ld [hld], a
|
|
|
|
|
dec b
|
|
|
|
|
jr .asm_17f4de
|
|
|
|
|
|
|
|
|
|
.asm_17f4e8
|
|
|
|
|
ld a, [wcd5b]
|
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
|
|
.asm_17f4ec
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd59]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f4f6:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcd6a]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd6b]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd47]
|
|
|
|
|
ld c, a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld a, [wBGMapPalBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
.asm_17f509
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
dec a
|
|
|
|
|
add hl, bc
|
|
|
|
|
jr .asm_17f509
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f50f:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f519
|
|
|
|
|
ld c, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld b, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f519
|
|
|
|
|
ld a, [wcd52]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld h, a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f524:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
push de
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
dec a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f53a
|
|
|
|
|
ld hl, wcd68
|
|
|
|
|
cp [hl]
|
|
|
|
|
.asm_17f536
|
|
|
|
|
pop de
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f53a
|
|
|
|
|
scf
|
|
|
|
|
jr .asm_17f536
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
BattleTowerMobileError:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call FadeToMenu
|
|
|
|
|
xor a
|
|
|
|
|
ld [wc303], a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-12-28 14:09:53 -08:00
|
|
|
|
|
2017-11-26 02:35:13 -08:00
|
|
|
|
call DisplayMobileError
|
2015-12-28 14:09:53 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-11-17 14:56:49 -08:00
|
|
|
|
call ExitAllMenus
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
DisplayMobileError:
|
2015-12-28 14:09:53 -08:00
|
|
|
|
.loop
|
2015-10-17 09:58:26 -07:00
|
|
|
|
call JoyTextDelay
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .RunJumptable
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc303]
|
|
|
|
|
bit 7, a
|
2015-12-28 14:09:53 -08:00
|
|
|
|
jr nz, .quit
|
2020-02-13 09:30:13 -08:00
|
|
|
|
farcall HDMATransferAttrmapAndTilemapToWRAMBank3
|
2015-12-28 14:09:53 -08:00
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-28 14:09:53 -08:00
|
|
|
|
.quit
|
|
|
|
|
call .deinit
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2015-12-28 14:09:53 -08:00
|
|
|
|
.deinit
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $22
|
|
|
|
|
jr z, .asm_17f597
|
|
|
|
|
cp $31
|
|
|
|
|
jr z, .asm_17f58a
|
|
|
|
|
cp $33
|
|
|
|
|
ret nz
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $1
|
|
|
|
|
ret nz
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $2
|
|
|
|
|
ret nz
|
|
|
|
|
jr .asm_17f5a1
|
|
|
|
|
|
|
|
|
|
.asm_17f58a
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $3
|
|
|
|
|
ret nz
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
jr .asm_17f5a1
|
|
|
|
|
|
|
|
|
|
.asm_17f597
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret nz
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
|
|
|
|
|
.asm_17f5a1
|
2017-11-20 10:50:54 -08:00
|
|
|
|
ld a, BANK(sMobileLoginPassword)
|
2020-06-17 14:03:38 -07:00
|
|
|
|
call OpenSRAM
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld [sMobileLoginPassword], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.RunJumptable:
|
2015-12-28 14:09:53 -08:00
|
|
|
|
jumptable .Jumptable, wc303
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.Jumptable:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dw Function17f5c3
|
|
|
|
|
dw Function17ff23
|
|
|
|
|
dw Function17f5d2
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f5c3:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17f5e4
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall FinishExitMenu
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f5d2:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17f5e4
|
2020-02-13 09:30:13 -08:00
|
|
|
|
farcall HDMATransferAttrmapAndTilemapToWRAMBank3
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f5e4:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $8
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFade], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, MUSIC_NONE
|
|
|
|
|
ld a, e
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, d
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, " "
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
|
|
|
|
ld a, $6
|
2020-02-13 09:30:13 -08:00
|
|
|
|
hlcoord 0, 0, wAttrmap
|
2015-07-22 12:57:02 -07:00
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
|
|
|
|
hlcoord 2, 1
|
|
|
|
|
ld b, $1
|
|
|
|
|
ld c, $e
|
|
|
|
|
call Function3eea
|
|
|
|
|
hlcoord 1, 4
|
|
|
|
|
ld b, $c
|
|
|
|
|
ld c, $10
|
|
|
|
|
call Function3eea
|
|
|
|
|
hlcoord 3, 2
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld de, MobileCommunicationErrorText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
call Function17ff3c
|
|
|
|
|
jr nc, .asm_17f632
|
|
|
|
|
hlcoord 11, 2
|
|
|
|
|
call Function17f6b7
|
|
|
|
|
|
|
|
|
|
.asm_17f632
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $d0
|
|
|
|
|
jr nc, .asm_17f684
|
|
|
|
|
cp $10
|
|
|
|
|
jr c, .asm_17f679
|
|
|
|
|
sub $10
|
|
|
|
|
cp $24
|
|
|
|
|
jr nc, .asm_17f679
|
|
|
|
|
ld e, a
|
2020-11-09 12:17:03 -08:00
|
|
|
|
ld d, 0
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld hl, MobileErrorCodeTable
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, c
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f679
|
|
|
|
|
ld c, a
|
|
|
|
|
.asm_17f65d
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr nz, .asm_17f667
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f66e
|
|
|
|
|
|
|
|
|
|
.asm_17f667
|
|
|
|
|
xor d
|
|
|
|
|
jr nz, .asm_17f674
|
|
|
|
|
ld a, b
|
|
|
|
|
xor e
|
|
|
|
|
jr nz, .asm_17f674
|
|
|
|
|
|
|
|
|
|
.asm_17f66e
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld d, a
|
|
|
|
|
jr .asm_17f67d
|
|
|
|
|
|
|
|
|
|
.asm_17f674
|
|
|
|
|
inc hl
|
2015-12-26 18:59:03 -08:00
|
|
|
|
inc hl
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17f65d
|
|
|
|
|
|
|
|
|
|
.asm_17f679
|
|
|
|
|
ld a, $d9
|
|
|
|
|
jr .asm_17f684
|
|
|
|
|
|
|
|
|
|
.asm_17f67d
|
|
|
|
|
hlcoord 2, 6
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f684
|
|
|
|
|
sub $d0
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
ld hl, Table_17f699
|
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld d, a
|
|
|
|
|
hlcoord 2, 6
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Table_17f699:
|
2019-08-22 05:41:17 -07:00
|
|
|
|
dw MobileErrorCode_101_000_Text
|
|
|
|
|
dw MobileErrorCode_101_001_Text
|
|
|
|
|
dw MobileErrorCode_101_002_Text
|
|
|
|
|
dw MobileErrorCode_101_003_Text
|
|
|
|
|
dw MobileErrorCode_101_004_Text
|
|
|
|
|
dw MobileErrorCode_101_005_Text
|
|
|
|
|
dw MobileErrorCode_101_006_Text
|
|
|
|
|
dw MobileErrorCode_101_007_Text
|
|
|
|
|
dw MobileErrorCode_101_008_Text
|
|
|
|
|
dw MobileErrorCode_101_009_Text
|
|
|
|
|
dw MobileErrorCode_101_009_Text
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2020-10-26 12:45:57 -07:00
|
|
|
|
Palette_17f6af: ; unreferenced
|
2015-02-10 19:15:15 -08:00
|
|
|
|
RGB 5, 5, 16
|
|
|
|
|
RGB 8, 19, 28
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17f6b7:
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_two_digits
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc hl
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and $f
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_digit
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer + 1]
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_two_digits
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.bcd_two_digits
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
and $f0
|
|
|
|
|
swap a
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_digit
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, c
|
|
|
|
|
and $f
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.bcd_digit
|
2015-12-28 14:09:53 -08:00
|
|
|
|
add "0"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hli], a
|
|
|
|
|
ret
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileCommunicationErrorText:
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "つうしんエラー ー@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2020-10-26 12:45:57 -07:00
|
|
|
|
String_17f6e8: ; unreferenced
|
2018-01-18 17:40:32 -08:00
|
|
|
|
db "みていぎ<NO>エラーです"
|
|
|
|
|
next "プログラム<WO>"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かくにん してください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCodeTable:
|
|
|
|
|
dw MobileErrorCodes_10
|
|
|
|
|
dw MobileErrorCodes_11
|
|
|
|
|
dw MobileErrorCodes_12
|
|
|
|
|
dw MobileErrorCodes_13
|
|
|
|
|
dw MobileErrorCodes_14
|
|
|
|
|
dw MobileErrorCodes_15
|
|
|
|
|
dw MobileErrorCodes_16
|
|
|
|
|
dw MobileErrorCodes_17
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_20
|
|
|
|
|
dw MobileErrorCodes_21
|
|
|
|
|
dw MobileErrorCodes_22
|
|
|
|
|
dw MobileErrorCodes_23
|
|
|
|
|
dw MobileErrorCodes_24
|
|
|
|
|
dw MobileErrorCodes_25
|
|
|
|
|
dw MobileErrorCodes_26
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_30
|
|
|
|
|
dw MobileErrorCodes_31
|
|
|
|
|
dw MobileErrorCodes_32
|
|
|
|
|
dw MobileErrorCodes_33
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_10: db 1
|
|
|
|
|
dw $000, MobileErrorCode_10_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_11: db 1
|
|
|
|
|
dw $000, MobileErrorCode_11_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_12: db 1
|
|
|
|
|
dw $000, MobileErrorCode_12_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_13: db 1
|
|
|
|
|
dw $000, MobileErrorCode_13_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_14: db 1
|
|
|
|
|
dw $000, MobileErrorCode_14_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_15: db 4
|
|
|
|
|
dw $000, MobileErrorCode_15_000_Text
|
|
|
|
|
dw $001, MobileErrorCode_15_001_Text
|
|
|
|
|
dw $002, MobileErrorCode_15_002_Text
|
|
|
|
|
dw $003, MobileErrorCode_15_003_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_16: db 1
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_17: db 1
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_20: db 1
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_21: db 1
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_22: db 1
|
|
|
|
|
dw $000, MobileErrorCode_22_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_23: db 1
|
|
|
|
|
dw $000, MobileErrorCode_23_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_24: db 1
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw $000, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
|
|
|
|
|
MobileErrorCodes_25: db 1
|
|
|
|
|
dw $000, MobileErrorCode_25_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_26: db 1
|
|
|
|
|
dw $000, MobileErrorCode_26_000_Text
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_30: db 17
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw $221, MobileErrorCode_ServerConnectionFailedText
|
|
|
|
|
dw $421, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
dw $450, MobileErrorCode_30_450_Text
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw $451, MobileErrorCode_ServerConnectionFailedText
|
|
|
|
|
dw $452, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
dw $500, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $501, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $502, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $503, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $504, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $550, MobileErrorCode_30_550_Text
|
|
|
|
|
dw $551, MobileErrorCode_30_551_Text
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw $552, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
dw $553, MobileErrorCode_30_553_Text
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw $554, MobileErrorCode_ServerConnectionFailedText
|
|
|
|
|
dw -1, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
|
|
|
|
|
MobileErrorCodes_31: db 5
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $002, MobileErrorCode_31_002_Text
|
|
|
|
|
dw $003, MobileErrorCode_31_003_Text
|
|
|
|
|
dw $004, MobileErrorCode_CommuncationErrorText
|
2019-08-22 19:10:58 -07:00
|
|
|
|
dw -1, MobileErrorCode_ServerConnectionFailedText
|
2019-08-22 05:41:17 -07:00
|
|
|
|
|
|
|
|
|
MobileErrorCodes_32: db 17
|
|
|
|
|
dw $000, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $301, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $302, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $400, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $401, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $403, MobileErrorCode_32_403_Text
|
|
|
|
|
dw $404, MobileErrorCode_32_404_Text
|
|
|
|
|
dw $405, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $406, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $407, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $408, MobileErrorCode_32_408_Text
|
|
|
|
|
dw $500, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $501, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $502, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $503, MobileErrorCode_32_503_Text
|
|
|
|
|
dw $504, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw -1, MobileErrorCode_ServerErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCodes_33: db 19
|
|
|
|
|
dw $101, MobileErrorCode_33_101_Text
|
|
|
|
|
dw $102, MobileErrorCode_33_102_Text
|
|
|
|
|
dw $103, MobileErrorCode_33_103_Text
|
|
|
|
|
dw $104, MobileErrorCode_33_104_Text
|
|
|
|
|
dw $105, MobileErrorCode_33_105_Text
|
|
|
|
|
dw $106, MobileErrorCode_33_106_Text
|
|
|
|
|
dw $201, MobileErrorCode_33_201_Text
|
|
|
|
|
dw $202, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $203, MobileErrorCode_33_203_Text
|
|
|
|
|
dw $204, MobileErrorCode_CommuncationErrorText
|
|
|
|
|
dw $205, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $206, MobileErrorCode_33_206_Text
|
|
|
|
|
dw $299, MobileErrorCode_33_299_Text
|
|
|
|
|
dw $301, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $401, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $402, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $403, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw $404, MobileErrorCode_ServerErrorText
|
|
|
|
|
dw -1, MobileErrorCode_ServerErrorText
|
|
|
|
|
|
|
|
|
|
MobileErrorCode_10_000_Text:
|
|
|
|
|
; The Mobile Adapter is not properly plugged in.
|
|
|
|
|
; Ensure you have taken a good look at and properly followed the instructions.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "モバイルアダプタが ただしく"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "さしこまれていません"
|
|
|
|
|
next "とりあつかいせつめいしょを"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "ごらんのうえ しっかりと"
|
|
|
|
|
next "さしこんで ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_11_000_Text:
|
|
|
|
|
MobileErrorCode_13_000_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Could not connect because either the phone cannot make the call, or the telephone line is busy.
|
|
|
|
|
; Please wait for a while and call again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわが うまく かけられないか"
|
|
|
|
|
next "でんわかいせんが こんでいるので"
|
|
|
|
|
next "つうしん できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_12_000_Text:
|
|
|
|
|
; As the telephone line is busy, the phone was not able to gather enough information (?)
|
|
|
|
|
; Please wait for a while and call again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわかいせんが こんでいるため"
|
|
|
|
|
next "でんわが かけられません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_15_000_Text:
|
|
|
|
|
MobileErrorCode_15_001_Text:
|
|
|
|
|
MobileErrorCode_15_002_Text:
|
|
|
|
|
MobileErrorCode_15_003_Text:
|
|
|
|
|
; There is an error with the Mobile Adapter.
|
|
|
|
|
; Please wait for a little while before calling again.
|
|
|
|
|
; If the problem persists, please contact the Mobile Support Center.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "モバイルアダプタの エラーです"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_CommuncationErrorText:
|
|
|
|
|
; Communication error.
|
|
|
|
|
; Please wait a moment, and then try again.
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; If the issue persists, please contact the Mobile Support Center.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "つうしんエラーです"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_22_000_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; There is a mistake either with the login password, or the login ID.
|
|
|
|
|
; Please confirm the password, wait for a while, and try again.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "ログインパスワードか"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "ログイン アイディーに"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "まちがいがあります"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "パスワードを かくにんして"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_23_000_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; The call was ended.
|
|
|
|
|
; Please see the instruction manual, wait a moment, and try again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわが きれました"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "とりあつかいせつめいしょを"
|
|
|
|
|
next "ごらんのうえ"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_ServerErrorText:
|
|
|
|
|
; There was a communication error with the mobile center.
|
|
|
|
|
; Please wait a moment and then try again.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "モバイルセンターの"
|
|
|
|
|
next "つうしんエラーです"
|
|
|
|
|
next "しばらくまって"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_14_000_Text:
|
|
|
|
|
MobileErrorCode_25_000_Text:
|
|
|
|
|
; The Mobile Adapter's details have expired and the information is not correct.
|
|
|
|
|
; Please use the Mobile Trainer to repeat the initial registration (process).
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "モバイルアダプタに"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "とうろくされた じょうほうが"
|
|
|
|
|
next "ただしく ありません"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルトレーナーで"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "しょきとうろくを してください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_32_503_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Could not connect because the Mobile Center is busy.
|
|
|
|
|
; Please wait a moment and try again.
|
|
|
|
|
; For details, please see the instruction manual.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "モバイルセンターが"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "こんでいて つながりません"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "しばらくまって"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_30_450_Text:
|
|
|
|
|
MobileErrorCode_30_550_Text:
|
|
|
|
|
MobileErrorCode_30_551_Text:
|
|
|
|
|
MobileErrorCode_30_553_Text:
|
|
|
|
|
; There is a mistake with the email address of the addressee.
|
|
|
|
|
; Please replace with a / the correct email address.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "あてさき メールアドレスに"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "まちがいがあります"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "ただしい メールアドレスを"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "いれなおしてください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_31_002_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; There is a mistake with the email address.
|
|
|
|
|
; Please see the instruction manual, and use the Mobile Trainer to repeat the initial registration (process).
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "メールアドレスに"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "まちがいが あります"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "とりあつかいせつめいしょを"
|
|
|
|
|
next "ごらんのうえ"
|
|
|
|
|
next "モバイルトレーナーで"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "しょきとうろくを してください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_31_003_Text:
|
|
|
|
|
MobileErrorCode_33_201_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; There is either an error with the login password, or an error with the Mobile Center.
|
|
|
|
|
; Please confirm the password, wait a moment, and then try again.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "ログインパスワードに"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "まちがいが あるか"
|
|
|
|
|
next "モバイルセンターの エラーです"
|
|
|
|
|
next "パスワードを かくにんして"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_32_403_Text:
|
|
|
|
|
MobileErrorCode_32_404_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Cannot read data.
|
|
|
|
|
; Please wait a moment, and then try again.
|
|
|
|
|
; If the issue persists, please contact the Mobile Support Center.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "データの よみこみが できません"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "しばらくまって"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_26_000_Text:
|
|
|
|
|
MobileErrorCode_32_408_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Out of time.
|
|
|
|
|
; The call was ended.
|
|
|
|
|
; Please try again.
|
|
|
|
|
; For details, please see the instruction manual.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "じかんぎれです"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "でんわが きれました"
|
|
|
|
|
next "でんわを かけなおしてください"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_33_101_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; The service cannot be used if payments for usage fees are late.
|
|
|
|
|
; For details, please see the instruction manual.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "ごりよう りょうきんの "
|
|
|
|
|
next "おしはらいが おくれたばあいには"
|
|
|
|
|
next "ごりようが できなくなります"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_33_102_Text:
|
|
|
|
|
MobileErrorCode_33_299_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Your access to this service has been restricted. Service cannot be used.
|
|
|
|
|
; For details, please see the instruction manual.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "おきゃくさまの ごつごうにより"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "ごりようできません"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 19:10:58 -07:00
|
|
|
|
MobileErrorCode_ServerConnectionFailedText:
|
2019-08-22 05:41:17 -07:00
|
|
|
|
; The telephone line is busy. Due to this error, the Mobile Center cannot communicate.
|
|
|
|
|
; Please wait for a little while and call again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわかいせんが こんでいるか"
|
|
|
|
|
next "モバイルセンターの エラーで"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_33_103_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Service cannot be used this month because usage fees have exceeded conditions.
|
|
|
|
|
; For details, please see the instruction manual.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "ごりよう りょうきんが"
|
|
|
|
|
next "じょうげんを こえているため"
|
|
|
|
|
next "こんげつは ごりようできません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_33_106_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Cannot communicate because the Mobile Center is currently undergoing maintenance.
|
|
|
|
|
; Please wait a moment, then try again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "げんざい モバイルセンターの"
|
|
|
|
|
next "てんけんを しているので"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_33_104_Text:
|
|
|
|
|
MobileErrorCode_33_105_Text:
|
|
|
|
|
MobileErrorCode_33_203_Text:
|
|
|
|
|
MobileErrorCode_33_206_Text:
|
|
|
|
|
MobileErrorCode_101_004_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Cannot read data.
|
|
|
|
|
; For details, please see the instruction manual.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "データの よみこみが できません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_006_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Call ended because more than 3 minutes elapsed with no input.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "3ぷん いじょう なにも"
|
|
|
|
|
next "にゅうりょく しなかったので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_001_Text:
|
|
|
|
|
MobileErrorCode_101_002_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Could not connect properly.
|
|
|
|
|
; Please try again from the beginning (of the process).
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "つうしんが うまく"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "できませんでした"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "もういちど はじめから"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "やりなおしてください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_003_Text:
|
|
|
|
|
MobileErrorCode_101_008_Text:
|
|
|
|
|
MobileErrorCode_101_009_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Cannot read data.
|
|
|
|
|
; Please wait a moment, then try again.
|
|
|
|
|
; If the issue persists, please contact the Mobile Support Center.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "データの よみこみが できません"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "しばらくまって"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_007_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Call ended due to long waiting time.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "まちじかんが ながいので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_005_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; (Your adapter's) type differs from the other user’s Mobile Adapter.
|
|
|
|
|
; For details, please see the instruction manual.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "あいての モバイルアダプタと"
|
|
|
|
|
next "タイプが ちがいます"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2020-10-26 12:45:57 -07:00
|
|
|
|
String_17fe9a: ; unreferenced
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Cannot send your save data because Pokémon News is being updated.
|
|
|
|
|
; Please send your save data after loading new Pokémon News.
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "ポケモンニュースが"
|
|
|
|
|
next "あたらしくなっているので"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "レポートを おくれません"
|
|
|
|
|
next "あたらしい ポケモンニュースの"
|
|
|
|
|
next "よみこみを さきに してください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2019-08-22 05:41:17 -07:00
|
|
|
|
MobileErrorCode_101_000_Text:
|
2019-08-22 08:31:45 -07:00
|
|
|
|
; Either bad communication status, or the other user called was the incorrect user.
|
|
|
|
|
; Please confirm and try again.
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "つうしんの じょうきょうが"
|
|
|
|
|
next "よくないか かけるあいてが"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "まちがっています"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "もういちど かくにんをして"
|
|
|
|
|
next "でんわを かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17ff23:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hJoyPressed]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $8
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFade], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wMapMusic]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wc303
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function17ff3c:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
nop
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $d0
|
|
|
|
|
ret c
|
|
|
|
|
hlcoord 10, 2
|
|
|
|
|
ld de, String_17ff68
|
|
|
|
|
call PlaceString
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld a, [wMobileErrorCodeBuffer]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
sub $d0
|
|
|
|
|
inc a
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld [wMobileErrorCodeBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 14, 2
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld de, wMobileErrorCodeBuffer
|
2015-10-10 14:03:04 -07:00
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintNum
|
|
|
|
|
pop af
|
2019-08-22 05:41:17 -07:00
|
|
|
|
ld [wMobileErrorCodeBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
String_17ff68:
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "101@"
|