2015-02-10 19:15:15 -08:00
|
|
|
|
Function17c000: ; 17c000
|
|
|
|
|
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
|
|
|
|
|
bccoord 0, 0, AttrMap
|
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
|
|
|
|
|
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
|
2018-01-02 13:46:40 -08:00
|
|
|
|
ld a, BANK(wBGPals1)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
ld hl, HaveWantGFX + $800
|
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
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
|
|
|
|
|
call EnableLCD
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
; 17c083
|
|
|
|
|
|
|
|
|
|
HaveWantGFX: ; 17c083
|
|
|
|
|
INCBIN "gfx/mobile/havewant.2bpp"
|
|
|
|
|
|
|
|
|
|
MobileSelectGFX: ; 17c983
|
|
|
|
|
INCBIN "gfx/mobile/select.2bpp"
|
|
|
|
|
|
|
|
|
|
HaveWantMap: ; 17cb83
|
|
|
|
|
; 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
|
|
|
|
|
|
|
|
|
HaveWantPals: ; 17cff3
|
|
|
|
|
; 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
|
|
|
|
|
|
|
|
|
|
2015-11-07 11:38:52 -08:00
|
|
|
|
CheckStringForErrors: ; 17d073
|
|
|
|
|
; 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
|
|
|
|
|
and a
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr z, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $60
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr nc, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $4e
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr z, .NextChar
|
|
|
|
|
cp "@"
|
|
|
|
|
jr z, .Done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $5
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
|
|
|
|
cp "<PLAY_G>"
|
|
|
|
|
jr c, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $19
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $1d
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $26
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $35
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $3a
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $3f
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .NextChar
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $40
|
2015-11-07 11:38:52 -08:00
|
|
|
|
jr c, .Fail
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $49
|
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
|
|
|
|
|
; 17d0b3
|
|
|
|
|
|
2015-11-24 12:18:44 -08:00
|
|
|
|
CheckStringForErrors_IgnoreTerminator: ; 17d0b3
|
|
|
|
|
; 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
|
|
|
|
|
; 17d0f3
|
|
|
|
|
|
|
|
|
|
Function17d0f3: ; 17d0f3
|
|
|
|
|
ld a, [$c608 + 5]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [CurPartySpecies], a
|
|
|
|
|
ld a, [wcd81]
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c74e], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $c63d
|
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
|
|
|
|
|
ld a, [$c608 + 11]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [$c608 + 12]
|
2015-12-22 15:03:00 -08:00
|
|
|
|
ld [wOTTrademonID + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $c608 + 26
|
|
|
|
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld bc, $c608 + 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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call SpeechTextBox
|
|
|
|
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $2
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, $5
|
|
|
|
|
ld [$a800], a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, [MapGroup]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [MapNumber]
|
|
|
|
|
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
|
|
|
|
|
; 17d187
|
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
Mobile_CopyDefaultOTName: ; 17d187
|
2018-01-22 16:10:09 -08:00
|
|
|
|
ld hl, Mobile5F_PlayersName
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c63d
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
; 17d194
|
|
|
|
|
|
2018-01-22 16:10:09 -08:00
|
|
|
|
Mobile5F_PlayersName:
|
2015-03-11 21:15:15 -07:00
|
|
|
|
db "クりス@@"
|
|
|
|
|
; 17d198
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
Mobile_CopyDefaultNickname: ; 17d199
|
|
|
|
|
ld hl, .DefaultNickname
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c642
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
; 17d1a6
|
|
|
|
|
|
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
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
Mobile_CopyDefaultMail: ; 17d1ab
|
|
|
|
|
ld a, "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, $c647
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c647
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
; 17d1c3
|
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.DefaultMessage:
|
2015-03-11 21:15:15 -07:00
|
|
|
|
db "こんにちは@"
|
|
|
|
|
; 17d1c9
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
Mobile_CopyDefaultMailAuthor: ; 17d1c9
|
|
|
|
|
ld a, "@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c668
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c668
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld bc, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
; 17d1e1
|
|
|
|
|
|
2015-11-24 12:18:44 -08:00
|
|
|
|
CheckStringContainsLessThanBNextCharacters: ; 17d1e1
|
|
|
|
|
.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
|
|
|
|
|
; 17d1f1
|
|
|
|
|
|
|
|
|
|
Function17d1f1: ; 17d1f1
|
|
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
|
dec a
|
|
|
|
|
call SetSeenAndCaughtMon
|
|
|
|
|
|
|
|
|
|
ld a, [CurPartySpecies]
|
|
|
|
|
cp UNOWN
|
|
|
|
|
jr nz, .asm_17d223
|
|
|
|
|
|
|
|
|
|
ld hl, PartyMon1DVs
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
ld a, [UnownLetter]
|
2015-11-29 18:34:59 -08:00
|
|
|
|
ld [wFirstUnownSeen], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
.asm_17d223
|
|
|
|
|
ret
|
|
|
|
|
; 17d224
|
|
|
|
|
|
2015-08-24 10:35:05 -07:00
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
; Parameter: [ScriptVar] = 0..1
|
|
|
|
|
;
|
2018-01-14 16:26:55 -08:00
|
|
|
|
; if [ScriptVar] == FALSE
|
2015-08-24 10:35:05 -07:00
|
|
|
|
; Show japanese menu options
|
|
|
|
|
; - News - News - ??? - Cancel
|
2018-01-14 16:26:55 -08:00
|
|
|
|
; if [ScriptVar] == TRUE
|
2015-08-24 10:35:05 -07:00
|
|
|
|
; Show BattleTower-Menu with 3 options in english language
|
|
|
|
|
; - Challenge - Explanation - Cancel
|
2015-08-24 08:04:13 -07:00
|
|
|
|
Special_Menu_ChallengeExplanationCancel: ; 17d224
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [ScriptVar]
|
|
|
|
|
and a
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr nz, .English
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
|
|
|
|
ld [ScriptVar], 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
|
|
|
|
|
ld [ScriptVar], 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
|
|
|
|
|
; 17d246
|
|
|
|
|
|
|
|
|
|
Function17d246: ; 17d246
|
2015-12-15 15:59:49 -08:00
|
|
|
|
call VerticalMenu
|
2015-11-24 12:18:44 -08:00
|
|
|
|
jr c, .Exit
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [ScriptVar]
|
|
|
|
|
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:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Exit:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $4
|
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
ret
|
|
|
|
|
; 17d26a
|
|
|
|
|
|
2018-01-23 13:08:43 -08:00
|
|
|
|
MenuHeader_17d26a: ; 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-01-23 13:08:43 -08:00
|
|
|
|
MenuData_17d272: ; 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 "やめる@"
|
|
|
|
|
; 17d28f
|
|
|
|
|
|
2018-01-23 13:08:43 -08:00
|
|
|
|
MenuHeader_ChallengeExplanationCancel: ; 17d28f
|
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-01-23 13:08:43 -08:00
|
|
|
|
MenuData_ChallengeExplanationCancel: ; 17d297
|
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@"
|
|
|
|
|
; 17d2b6
|
|
|
|
|
|
2018-01-02 08:47:58 -08:00
|
|
|
|
Special_Function17d2b6: ; 17d2b6
|
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
|
|
|
|
|
; 17d2c0
|
|
|
|
|
|
|
|
|
|
Function17d2c0: ; 17d2c0
|
|
|
|
|
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
|
|
|
|
|
; 17d2ce
|
|
|
|
|
|
2018-01-02 08:47:58 -08:00
|
|
|
|
Special_Function17d2ce: ; 17d2ce
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, [$aa72]
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d2e2
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d2e2
|
|
|
|
|
call Function17d314
|
|
|
|
|
ret c
|
|
|
|
|
call SpeechTextBox
|
|
|
|
|
call FadeToMenu
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17d370
|
|
|
|
|
call Function17d45a
|
|
|
|
|
pop af
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld de, MUSIC_MOBILE_CENTER
|
|
|
|
|
ld a, e
|
|
|
|
|
ld [wMapMusic], a
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, d
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID + 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
|
|
|
|
|
; 17d314
|
|
|
|
|
|
|
|
|
|
Function17d314: ; 17d314
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, [$b1b1]
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
cp $21
|
|
|
|
|
jr nc, .asm_17d354
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
; 17d370
|
|
|
|
|
|
|
|
|
|
Function17d370: ; 17d370
|
|
|
|
|
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
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles1 tile $6e
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c608
|
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
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
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
|
|
|
|
|
ld hl, $c608
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles1 tile $6e
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
ld hl, GFX_17eb7e
|
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
|
|
|
|
|
ld [BGMapBuffer], a
|
|
|
|
|
ld a, $d0
|
|
|
|
|
ld [wcd21], a
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
; 17d3f6
|
|
|
|
|
|
|
|
|
|
Function17d3f6: ; 17d3f6
|
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
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles1 tile $6e
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c608
|
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
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
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
|
|
|
|
|
ld hl, $c608
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles1 tile $6e
|
2015-11-24 12:18:44 -08:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
|
|
|
|
ld [rVBK], a
|
|
|
|
|
call EnableLCD
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld hl, Palette_17eff6
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ret
|
|
|
|
|
; 17d45a
|
|
|
|
|
|
|
|
|
|
Function17d45a: ; 17d45a
|
|
|
|
|
.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
|
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
ret
|
|
|
|
|
; 17d474
|
|
|
|
|
|
|
|
|
|
Function17d474: ; 17d474
|
2015-12-26 18:59:03 -08:00
|
|
|
|
jumptable Jumptable_17d483, wcd77
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17d483
|
|
|
|
|
|
|
|
|
|
Jumptable_17d483: ; 17d483
|
|
|
|
|
dw Function17d48d
|
|
|
|
|
dw Function17d5be
|
|
|
|
|
dw Function17d5c4
|
|
|
|
|
dw Function17d6fd
|
|
|
|
|
dw Function17e427
|
|
|
|
|
; 17d48d
|
|
|
|
|
|
|
|
|
|
Function17d48d: ; 17d48d
|
|
|
|
|
ld hl, Palette_17eff6
|
|
|
|
|
ld de, $c608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld hl, TileAttrmap_17eb8e
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0
|
|
|
|
|
bccoord 0, 0, AttrMap
|
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
|
|
|
|
|
ld a, [BGMapBuffer]
|
|
|
|
|
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]
|
|
|
|
|
ld de, $c608
|
|
|
|
|
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
|
|
|
|
|
ld de, CreditsTimer
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17d5be
|
|
|
|
|
|
|
|
|
|
Function17d5be: ; 17d5be
|
2015-09-09 16:27:07 -07:00
|
|
|
|
call SetPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e438
|
|
|
|
|
|
|
|
|
|
Function17d5c4:
|
|
|
|
|
ld a, [hJoyPressed]
|
|
|
|
|
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
|
|
|
|
|
; 17d5f6
|
|
|
|
|
|
|
|
|
|
Function17d5f6: ; 17d5f6
|
|
|
|
|
ld a, $5
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld hl, $c608
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ret
|
|
|
|
|
; 17d60b
|
|
|
|
|
|
|
|
|
|
Function17d60b: ; 17d60b
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $b1d3
|
|
|
|
|
ld de, $c608
|
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
|
|
|
|
|
call GetSRAMBank
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
|
|
|
|
ld hl, $c608
|
|
|
|
|
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
|
|
|
|
|
call GetSRAMBank
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
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
|
|
|
|
|
; 17d6a1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Function17d6a1: ; 17d6a1
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd6e]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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]
|
|
|
|
|
ld [BGMapPalBuffer], a
|
|
|
|
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
; 17d6fd
|
|
|
|
|
|
|
|
|
|
Function17d6fd: ; 17d6fd
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
asm_17d721
|
|
|
|
|
call Function17e5af
|
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
; 17d72a
|
|
|
|
|
|
2015-12-26 08:31:56 -08:00
|
|
|
|
Jumptable17d72a: ; 17d72a
|
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
|
|
|
|
|
; 17d78c
|
|
|
|
|
|
|
|
|
|
Function17d78c: ; 17d78c
|
|
|
|
|
ret
|
|
|
|
|
; 17d78d
|
|
|
|
|
|
|
|
|
|
Function17d78d: ; 17d78d
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
; 17d7b4
|
|
|
|
|
|
|
|
|
|
Function17d7b4: ; 17d7b4
|
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 d, $0
|
|
|
|
|
call PlayMusic2
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
; 17d7c2
|
|
|
|
|
|
|
|
|
|
Function17d7c2: ; 17d7c2
|
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 d, $0
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call WaitSFX
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
; 17d7d3
|
|
|
|
|
|
|
|
|
|
Function17d7d3: ; 17d7d3
|
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
|
|
|
|
|
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
|
|
|
|
|
; 17d7e5
|
|
|
|
|
|
|
|
|
|
Function17d7e5: ; 17d7e5
|
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
|
|
|
|
|
; 17d818
|
|
|
|
|
|
|
|
|
|
Function17d818: ; 17d818
|
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
|
|
|
|
|
; 17d833
|
|
|
|
|
|
|
|
|
|
Function17d833: ; 17d833
|
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
|
|
|
|
|
; 17d85d
|
|
|
|
|
|
|
|
|
|
Function17d85d: ; 17d85d
|
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
|
|
|
|
|
ld de, $c608
|
|
|
|
|
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]
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17d8a1
|
|
|
|
|
|
|
|
|
|
.asm_17d89b
|
|
|
|
|
ld a, [wcd4f]
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld hl, $c608
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc300]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d8fe
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
; 17d902
|
|
|
|
|
|
|
|
|
|
Function17d902: ; 17d902
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc300]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d936
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
; 17d93a
|
|
|
|
|
|
|
|
|
|
Function17d93a: ; 17d93a
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e6de
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [CurPartySpecies], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
; 17d98b
|
|
|
|
|
|
|
|
|
|
Function17d98b: ; 17d98b
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function17e6de
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [TrainerClass], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
; 17d9e3
|
|
|
|
|
|
|
|
|
|
Function17d9e3: ; 17d9e3
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da01
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17da07
|
|
|
|
|
|
|
|
|
|
.asm_17da01
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17da07
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld b, a
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da2d
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17da30
|
|
|
|
|
|
|
|
|
|
.asm_17da2d
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da30
|
|
|
|
|
ret
|
|
|
|
|
; 17da31
|
|
|
|
|
|
|
|
|
|
Function17da31: ; 17da31
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da4f
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17da55
|
|
|
|
|
|
|
|
|
|
.asm_17da4f
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17da55
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
and [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
|
|
|
|
|
.asm_17da7d
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da88
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17da8b
|
|
|
|
|
|
|
|
|
|
.asm_17da88
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da8b
|
|
|
|
|
ret
|
|
|
|
|
; 17da8c
|
|
|
|
|
|
|
|
|
|
Unknown_17da8c:
|
|
|
|
|
x = 0
|
|
|
|
|
rept 8
|
|
|
|
|
db 1 << x
|
|
|
|
|
x = x + 1
|
|
|
|
|
endr
|
|
|
|
|
|
|
|
|
|
Unknown_17da94:
|
|
|
|
|
x = 0
|
|
|
|
|
rept 8
|
|
|
|
|
db (1 << x) ^ $ff
|
|
|
|
|
x = x + 1
|
|
|
|
|
endr
|
|
|
|
|
; 17da9c
|
|
|
|
|
|
|
|
|
|
Function17da9c: ; 17da9c
|
|
|
|
|
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
|
|
|
|
|
; 17dadc
|
|
|
|
|
|
|
|
|
|
Function17dadc: ; 17dadc
|
|
|
|
|
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
|
|
|
|
|
; 17db2d
|
|
|
|
|
|
|
|
|
|
Function17db2d: ; 17db2d
|
|
|
|
|
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
|
|
|
|
; 17db56
|
|
|
|
|
|
|
|
|
|
Function17db56: ; 17db56
|
|
|
|
|
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
|
|
|
|
; 17db77
|
|
|
|
|
|
|
|
|
|
Function17db77: ; 17db77
|
|
|
|
|
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
|
|
|
|
; 17dbb1
|
|
|
|
|
|
|
|
|
|
Function17dbb1: ; 17dbb1
|
|
|
|
|
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
|
|
|
|
|
; 17dbe9
|
|
|
|
|
|
|
|
|
|
Function17dbe9: ; 17dbe9
|
|
|
|
|
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
|
|
|
|
; 17dc1f
|
|
|
|
|
|
|
|
|
|
Function17dc1f: ; 17dc1f
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c688
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld hl, $c688
|
|
|
|
|
ld a, $40
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c708], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70a], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add $5
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70c], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c709], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add $4
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70b], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $96
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70d], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $5c
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70e], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c70f], a
|
|
|
|
|
ld hl, $c708
|
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
|
|
|
|
|
ld [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
|
|
|
|
|
ld a, [$c68a]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [$c68a + 1]
|
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17dc8d
|
|
|
|
|
|
|
|
|
|
.asm_17dc85
|
|
|
|
|
ld a, [$c68a + 2]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [$c68a + 3]
|
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17dc8d
|
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17dc96
|
|
|
|
|
|
2018-01-23 13:08:43 -08:00
|
|
|
|
MenuData_17dc96:
|
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 "いいえ@"
|
|
|
|
|
; 17dc9f
|
|
|
|
|
|
|
|
|
|
Function17dc9f: ; 17dc9f
|
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
|
|
|
|
|
; 17dca9
|
|
|
|
|
|
|
|
|
|
Function17dca9: ; 17dca9
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
Function17dcaf:
|
|
|
|
|
ld a, $5
|
|
|
|
|
ld [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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ret
|
|
|
|
|
; 17dccf
|
|
|
|
|
|
|
|
|
|
Function17dccf: ; 17dccf
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17dd13
|
|
|
|
|
|
|
|
|
|
Function17dd13: ; 17dd13
|
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
|
|
|
|
|
; 17dd30
|
|
|
|
|
|
|
|
|
|
Function17dd30: ; 17dd30
|
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 b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17dd49
|
|
|
|
|
|
|
|
|
|
Function17dd49: ; 17dd49
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
2016-01-12 09:46:18 -08:00
|
|
|
|
jr c, .sram
|
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [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
|
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
2016-01-12 09:46:18 -08:00
|
|
|
|
.got_bank
|
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
ld de, $c688
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
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
|
|
|
|
|
ld [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
|
|
|
|
|
ld a, [$c711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c712
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, $c688
|
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
|
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
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
|
|
|
|
|
ld a, [$c70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c710]
|
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
|
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
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
|
|
|
|
|
; 17ddcd
|
|
|
|
|
|
|
|
|
|
Function17ddcd: ; 17ddcd
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17dde7
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17dded
|
|
|
|
|
|
|
|
|
|
.asm_17dde7
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17dded
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld [$c710], a
|
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17de0c
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17de0f
|
|
|
|
|
|
|
|
|
|
.asm_17de0c
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17de0f
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c710
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and [hl]
|
|
|
|
|
pop hl
|
|
|
|
|
jr nz, .asm_17de26
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de2e
|
|
|
|
|
|
|
|
|
|
.asm_17de26
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de2e
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17de32
|
|
|
|
|
|
|
|
|
|
Function17de32: ; 17de32
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $9
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
call Function17f4f6
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c711
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de78
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de82
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de8a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17de91
|
|
|
|
|
|
|
|
|
|
Function17de91: ; 17de91
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $7
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
call Function17f4f6
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld l, e
|
|
|
|
|
ld h, d
|
|
|
|
|
and [hl]
|
|
|
|
|
jr nz, .asm_17deca
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17ded2
|
|
|
|
|
|
|
|
|
|
.asm_17deca
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17ded2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17ded9
|
|
|
|
|
|
|
|
|
|
Function17ded9: ; 17ded9
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $1f
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [CurPartySpecies], a
|
|
|
|
|
ld [TempEnemyMonSpecies], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [CurPartyLevel], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
cp $6
|
|
|
|
|
jp nc, Function17e026
|
|
|
|
|
xor a
|
|
|
|
|
ld [MonType], a
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMonNicknames
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMonOT
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1ID
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1DVs
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1Species
|
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [CurSpecies], a
|
|
|
|
|
call GetBaseData
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1MaxHP
|
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
push hl
|
|
|
|
|
ld b, $0
|
2018-01-16 11:30:10 -08:00
|
|
|
|
farcall CalcPkmnStats
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1HP
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1Item
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1Moves
|
|
|
|
|
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
|
|
|
|
|
ld a, [PartyCount]
|
|
|
|
|
dec a
|
|
|
|
|
ld hl, PartyMon1PP
|
|
|
|
|
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
|
|
|
|
|
; 17e026
|
|
|
|
|
|
|
|
|
|
Function17e026: ; 17e026
|
2015-08-25 16:40:34 -07:00
|
|
|
|
ld a, BANK(sBoxCount)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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-01-16 11:30:10 -08:00
|
|
|
|
farcall SendPkmnIntoBox
|
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)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, sBoxMonOT
|
|
|
|
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
asm_17e0ee
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
|
|
|
|
pop af
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17e0fd
|
|
|
|
|
|
|
|
|
|
Function17e0fd: ; 17e0fd
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [CurItem], a
|
|
|
|
|
ld a, [hli]
|
2015-11-01 15:13:31 -08:00
|
|
|
|
ld [wItemQuantityChangeBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push hl
|
|
|
|
|
ld hl, NumItems
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17e133
|
|
|
|
|
|
|
|
|
|
Function17e133: ; 17e133
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [ScriptVar], a
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17e165
|
|
|
|
|
|
|
|
|
|
Function17e165: ; 17e165
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [CurItem], a
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, NumItems
|
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e195
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, PCItems
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17e1a1
|
|
|
|
|
|
|
|
|
|
Function17e1a1: ; 17e1a1
|
2018-01-02 20:16:56 -08:00
|
|
|
|
call IncCrashCheckPointer
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $d
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1bb
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17e1c1
|
|
|
|
|
|
|
|
|
|
.asm_17e1bb
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17e1c1
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
ld de, $c608
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70a]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1e2
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17e1e5
|
|
|
|
|
|
|
|
|
|
.asm_17e1e2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e1e5
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1f3
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17e1f9
|
|
|
|
|
|
|
|
|
|
.asm_17e1f3
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70c]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17e1f9
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70d]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
ld de, $c688
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70e]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e21a
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17e21d
|
|
|
|
|
|
|
|
|
|
.asm_17e21a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e21d
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70b]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, a
|
|
|
|
|
ld hl, $c688
|
|
|
|
|
ld de, $c608
|
|
|
|
|
.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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c711]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c712]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e23e
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c70f]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c710]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e248
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c712 + 1]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c712 + 2]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17e250
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
; 17e254
|
|
|
|
|
|
|
|
|
|
Function17e254: ; 17e254
|
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
|
|
|
|
|
; 17e261
|
|
|
|
|
|
|
|
|
|
Function17e261: ; 17e261
|
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
|
|
|
|
|
; 17e270
|
|
|
|
|
|
|
|
|
|
Function17e270: ; 17e270
|
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
|
|
|
|
|
; 17e27f
|
|
|
|
|
|
|
|
|
|
Function17e27f: ; 17e27f
|
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
|
|
|
|
|
; 17e293
|
|
|
|
|
|
|
|
|
|
Function17e293: ; 17e293
|
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
|
|
|
|
|
; 17e2a7
|
|
|
|
|
|
|
|
|
|
Function17e2a7: ; 17e2a7
|
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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, GFX_17eb7e
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2 tile $60
|
2015-02-10 19:15:15 -08:00
|
|
|
|
lb bc, BANK(GFX_17eb7e), 1
|
|
|
|
|
call Get2bpp
|
|
|
|
|
ld a, [wc300]
|
|
|
|
|
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
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
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
|
|
|
|
|
; 17e309
|
|
|
|
|
|
|
|
|
|
Function17e309: ; 17e309
|
|
|
|
|
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
|
|
|
|
|
; 17e32b
|
|
|
|
|
|
|
|
|
|
Function17e32b: ; 17e32b
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $c608
|
|
|
|
|
ld de, $b0b1
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld hl, BGMapBuffer
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5b
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
; 17e349
|
|
|
|
|
|
|
|
|
|
Function17e349: ; 17e349
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $b0b1
|
|
|
|
|
ld de, $c608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $40
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld de, BGMapBuffer
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $5b
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
; 17e367
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
inc_crash_check_pointer_farcall: MACRO
|
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer ; redundant
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ret
|
2018-01-02 20:16:56 -08:00
|
|
|
|
ENDM
|
|
|
|
|
|
|
|
|
|
IncCrashCheckPointer_SaveGameData: ; 17e367
|
|
|
|
|
inc_crash_check_pointer_farcall SaveGameData_
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17e37e
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
IncCrashCheckPointer_SaveAfterLinkTrade: ; 17e37e
|
|
|
|
|
inc_crash_check_pointer_farcall SaveAfterLinkTrade
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
IncCrashCheckPointer_SaveBox: ; 17e395
|
|
|
|
|
inc_crash_check_pointer_farcall SaveBox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17e3ac
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
IncCrashCheckPointer_SaveChecksum: ; 17e3ac
|
|
|
|
|
inc_crash_check_pointer_farcall SaveChecksum
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17e3c3
|
|
|
|
|
|
2018-01-02 20:16:56 -08:00
|
|
|
|
IncCrashCheckPointer_SaveTrainerRankingsChecksum: ; 17e3c3
|
|
|
|
|
inc_crash_check_pointer_farcall UpdateTrainerRankingsChecksum2, BackupMobileEventIndex
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17e3e0
|
|
|
|
|
|
|
|
|
|
Function17e3e0: ; 17e3e0
|
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
|
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
; 17e3f0
|
|
|
|
|
|
|
|
|
|
Function17e3f0: ; 17e3f0
|
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
|
|
|
|
|
; 17e409
|
|
|
|
|
|
|
|
|
|
Function17e409: ; 17e409
|
|
|
|
|
ld hl, wcd77
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
; 17e40f
|
|
|
|
|
|
|
|
|
|
Function17e40f: ; 17e40f
|
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
|
|
|
|
|
; 17e427
|
|
|
|
|
|
|
|
|
|
Function17e427: ; 17e427
|
|
|
|
|
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
|
|
|
|
|
; 17e438
|
|
|
|
|
|
|
|
|
|
Function17e438: ; 17e438
|
|
|
|
|
ld hl, wcd77
|
|
|
|
|
inc [hl]
|
|
|
|
|
ret
|
|
|
|
|
; 17e43d
|
|
|
|
|
|
|
|
|
|
Function17e43d: ; 17e43d
|
|
|
|
|
ld a, [BGMapBuffer]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
|
|
|
|
ret
|
|
|
|
|
; 17e447
|
|
|
|
|
|
|
|
|
|
Function17e447: ; 17e447
|
|
|
|
|
ld a, [BGMapBuffer]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ret
|
|
|
|
|
; 17e451
|
|
|
|
|
|
|
|
|
|
Function17e451: ; 17e451
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld a, [CreditsTimer]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld a, [BGMapBuffer]
|
|
|
|
|
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
|
|
|
|
|
ld d, $0
|
|
|
|
|
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
|
|
|
|
|
; 17e4dd
|
|
|
|
|
|
|
|
|
|
Function17e4dd: ; 17e4dd
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17e51b
|
|
|
|
|
|
|
|
|
|
Function17e51b: ; 17e51b
|
|
|
|
|
ld a, [wcd28]
|
|
|
|
|
ld hl, CreditsTimer
|
|
|
|
|
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
|
|
|
|
|
ld a, [CreditsTimer]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17e55b
|
|
|
|
|
|
|
|
|
|
Function17e55b: ; 17e55b
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $ed
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
; 17e566
|
|
|
|
|
|
|
|
|
|
Function17e566: ; 17e566
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $7f
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
; 17e571
|
|
|
|
|
|
|
|
|
|
Function17e571: ; 17e571
|
|
|
|
|
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
|
|
|
|
|
ld a, [CreditsTimer]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
|
|
|
|
; 17e5af
|
|
|
|
|
|
|
|
|
|
Function17e5af: ; 17e5af
|
|
|
|
|
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
|
|
|
|
|
ld bc, $ffec
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld a, [BGMapBuffer]
|
|
|
|
|
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
|
|
|
|
|
; 17e600
|
|
|
|
|
|
|
|
|
|
Function17e600: ; 17e600
|
|
|
|
|
.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
|
|
|
|
|
; 17e613
|
|
|
|
|
|
|
|
|
|
Function17e613: ; 17e613
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17e691
|
|
|
|
|
|
|
|
|
|
Function17e691: ; 17e691
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
2015-07-22 12:57:02 -07:00
|
|
|
|
bccoord 0, 0, AttrMap
|
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
|
|
|
|
|
; 17e6de
|
|
|
|
|
|
|
|
|
|
Function17e6de: ; 17e6de
|
|
|
|
|
push af
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c708]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld l, a
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld a, [$c709]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld h, a
|
2015-07-22 12:57:02 -07:00
|
|
|
|
decoord 0, 0, AttrMap
|
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
|
|
|
|
|
; 17e6fe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PokemonNewsGFX: ; 17e6fe
|
|
|
|
|
INCBIN "gfx/mobile/pokemon_news.2bpp"
|
|
|
|
|
|
|
|
|
|
GFX_17eb7e:
|
|
|
|
|
INCBIN "gfx/unknown/17eb7e.2bpp"
|
|
|
|
|
|
|
|
|
|
TileAttrmap_17eb8e:
|
|
|
|
|
INCBIN "gfx/unknown/17eb8e.attrmap"
|
|
|
|
|
|
|
|
|
|
Palette_17eff6:
|
|
|
|
|
RGB 24, 9, 8
|
|
|
|
|
RGB 4, 9, 18
|
|
|
|
|
RGB 18, 18, 12
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 24, 24, 18
|
|
|
|
|
RGB 18, 18, 12
|
|
|
|
|
RGB 4, 9, 18
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 23, 11, 10
|
|
|
|
|
RGB 13, 6, 5
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 15, 25, 5
|
|
|
|
|
RGB 10, 20, 0
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 20, 28, 20
|
|
|
|
|
RGB 10, 18, 15
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 22, 22, 12
|
|
|
|
|
RGB 17, 12, 5
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 5, 5, 16
|
|
|
|
|
RGB 8, 19, 28
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
RGB 27, 24, 0
|
|
|
|
|
RGB 24, 16, 3
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Function17f036:: ; 17f036
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
inc de
|
|
|
|
|
.asm_17f03c
|
|
|
|
|
call Function17f047
|
|
|
|
|
jr c, .asm_17f043
|
|
|
|
|
jr .asm_17f03c
|
|
|
|
|
|
|
|
|
|
.asm_17f043
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
; 17f047
|
|
|
|
|
|
|
|
|
|
Function17f047: ; 17f047
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp $50
|
2016-05-14 13:37:12 -07:00
|
|
|
|
jr z, .finished
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $10
|
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
|
|
|
|
|
; 17f061
|
|
|
|
|
|
2016-05-14 13:37:12 -07:00
|
|
|
|
.Jumptable: ; 17f061
|
|
|
|
|
dw Function17f081 ; 0
|
|
|
|
|
dw Function17f0f8 ; 1
|
|
|
|
|
dw Function17f154 ; 2
|
|
|
|
|
dw Function17f181 ; 3
|
|
|
|
|
dw Function17f1d0 ; 4
|
|
|
|
|
dw Function17f220 ; 5
|
|
|
|
|
dw Function17f27b ; 6
|
|
|
|
|
dw Function17f2cb ; 7
|
|
|
|
|
dw Function17f2ff ; 8
|
|
|
|
|
dw Function17f334 ; 9
|
|
|
|
|
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
|
|
|
|
; 17f081
|
|
|
|
|
|
|
|
|
|
Function17f081: ; 17f081
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
; 17f0f8
|
|
|
|
|
|
|
|
|
|
Function17f0f8: ; 17f0f8
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
ld de, $c608
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $50
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop hl
|
|
|
|
|
ld de, $c608
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f154
|
|
|
|
|
|
|
|
|
|
Function17f154: ; 17f154
|
|
|
|
|
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]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
; 17f181
|
|
|
|
|
|
|
|
|
|
Function17f181: ; 17f181
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
ld de, $c608
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function48c63
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
ld de, $c608
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f1d0
|
|
|
|
|
|
|
|
|
|
Function17f1d0: ; 17f1d0
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld [wd265], a
|
|
|
|
|
call GetPokemonName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f220
|
|
|
|
|
|
|
|
|
|
Function17f220: ; 17f220
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
; 17f26e
|
|
|
|
|
|
|
|
|
|
.Genders: dw .Boy, .Girl
|
|
|
|
|
.Boy: db "Boy@"
|
|
|
|
|
.Girl: db "Girl@"
|
|
|
|
|
|
|
|
|
|
Function17f27b: ; 17f27b
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
cp $50
|
|
|
|
|
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
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld [wd265], a
|
|
|
|
|
call GetItemName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f2cb
|
|
|
|
|
|
|
|
|
|
Function17f2cb: ; 17f2cb
|
|
|
|
|
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
|
|
|
|
|
; 17f2ff
|
|
|
|
|
|
|
|
|
|
Function17f2ff: ; 17f2ff
|
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
ld hl, PlayerName
|
|
|
|
|
ld de, $c608
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
pop hl
|
|
|
|
|
ld de, $c608
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f334
|
|
|
|
|
|
|
|
|
|
Function17f334: ; 17f334
|
|
|
|
|
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)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
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
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, [$b2f3]
|
|
|
|
|
|
|
|
|
|
.asm_17f35d
|
|
|
|
|
ld c, a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld de, $c608
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function48c63
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop hl
|
|
|
|
|
ld de, $c608
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f382
|
|
|
|
|
|
|
|
|
|
Function17f382: ; 17f382
|
|
|
|
|
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)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
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
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld de, $b2f4
|
|
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
; 17f3c9
|
|
|
|
|
|
|
|
|
|
Function17f3c9: ; 17f3c9
|
|
|
|
|
push bc
|
|
|
|
|
ld hl, wcd36
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld de, $c708
|
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
|
2016-01-12 09:46:18 -08:00
|
|
|
|
ld hl, $c708
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, wcd36
|
2016-05-14 13:37:12 -07:00
|
|
|
|
ld bc, $c
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17f3f0
|
|
|
|
|
|
|
|
|
|
Function17f3f0: ; 17f3f0
|
|
|
|
|
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
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
ld d, $0
|
|
|
|
|
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
|
|
|
|
|
; 17f41d
|
|
|
|
|
|
|
|
|
|
Function17f41d: ; 17f41d
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
push hl
|
|
|
|
|
push af
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld bc, -TileMap + $10000
|
|
|
|
|
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
|
|
|
|
|
; 17f44f
|
|
|
|
|
|
|
|
|
|
Function17f44f: ; 17f44f
|
|
|
|
|
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]
|
|
|
|
|
cp $50
|
|
|
|
|
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]
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17f48e
|
|
|
|
|
|
|
|
|
|
.asm_17f488
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17f48e
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld de, $c608
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17f4af
|
|
|
|
|
ld a, $4
|
|
|
|
|
ld [rSVBK], a
|
|
|
|
|
jr .asm_17f4b7
|
|
|
|
|
|
|
|
|
|
.asm_17f4af
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17f4b7
|
|
|
|
|
ld de, $c608
|
|
|
|
|
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
|
|
|
|
|
; 17f4f6
|
|
|
|
|
|
|
|
|
|
Function17f4f6: ; 17f4f6
|
|
|
|
|
ld a, [wcd6a]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd6b]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd47]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [BGMapPalBuffer]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
.asm_17f509
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
dec a
|
|
|
|
|
add hl, bc
|
|
|
|
|
jr .asm_17f509
|
|
|
|
|
; 17f50f
|
|
|
|
|
|
|
|
|
|
Function17f50f: ; 17f50f
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f519
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
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
|
|
|
|
|
; 17f524
|
|
|
|
|
|
|
|
|
|
Function17f524: ; 17f524
|
|
|
|
|
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
|
|
|
|
|
; 17f53d
|
|
|
|
|
|
2018-01-02 08:47:58 -08:00
|
|
|
|
Special_BattleTowerMobileError: ; 17f53d
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call FadeToMenu
|
|
|
|
|
xor a
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
ld a, [rSVBK]
|
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [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
|
|
|
|
|
ld [rSVBK], a
|
2015-11-17 14:56:49 -08:00
|
|
|
|
call ExitAllMenus
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
; 17f555
|
|
|
|
|
|
2017-11-26 02:35:13 -08:00
|
|
|
|
DisplayMobileError: ; 17f555
|
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
|
2017-12-24 09:47:30 -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
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc300]
|
|
|
|
|
cp $22
|
|
|
|
|
jr z, .asm_17f597
|
|
|
|
|
cp $31
|
|
|
|
|
jr z, .asm_17f58a
|
|
|
|
|
cp $33
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [wc301]
|
|
|
|
|
cp $1
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
cp $2
|
|
|
|
|
ret nz
|
|
|
|
|
jr .asm_17f5a1
|
|
|
|
|
|
|
|
|
|
.asm_17f58a
|
|
|
|
|
ld a, [wc301]
|
|
|
|
|
cp $3
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
jr .asm_17f5a1
|
|
|
|
|
|
|
|
|
|
.asm_17f597
|
|
|
|
|
ld a, [wc301]
|
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
and a
|
|
|
|
|
ret nz
|
|
|
|
|
|
|
|
|
|
.asm_17f5a1
|
2017-11-20 10:50:54 -08:00
|
|
|
|
ld a, BANK(sMobileLoginPassword)
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
xor a
|
2015-12-26 08:31:56 -08:00
|
|
|
|
ld [sMobileLoginPassword], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
; 17f5ae
|
|
|
|
|
|
2015-12-28 14:09:53 -08:00
|
|
|
|
.RunJumptable: ; 17f5ae
|
|
|
|
|
jumptable .Jumptable, wc303
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17f5bd
|
|
|
|
|
|
2015-12-28 14:09:53 -08:00
|
|
|
|
.Jumptable: ; 17f5bd
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dw Function17f5c3
|
|
|
|
|
dw Function17ff23
|
|
|
|
|
dw Function17f5d2
|
|
|
|
|
; 17f5c3
|
|
|
|
|
|
|
|
|
|
Function17f5c3: ; 17f5c3
|
|
|
|
|
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
|
|
|
|
|
; 17f5d2
|
|
|
|
|
|
|
|
|
|
Function17f5d2: ; 17f5d2
|
|
|
|
|
call Function17f5e4
|
2017-12-24 09:47:30 -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
|
|
|
|
|
; 17f5e4
|
|
|
|
|
|
|
|
|
|
Function17f5e4: ; 17f5e4
|
|
|
|
|
ld a, $8
|
|
|
|
|
ld [MusicFade], a
|
|
|
|
|
ld de, MUSIC_NONE
|
|
|
|
|
ld a, e
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, d
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID + 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
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0, AttrMap
|
|
|
|
|
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
|
|
|
|
|
ld de, String_17f6dc
|
|
|
|
|
call PlaceString
|
|
|
|
|
call Function17ff3c
|
|
|
|
|
jr nc, .asm_17f632
|
|
|
|
|
hlcoord 11, 2
|
|
|
|
|
call Function17f6b7
|
|
|
|
|
|
|
|
|
|
.asm_17f632
|
|
|
|
|
ld a, [wc300]
|
|
|
|
|
cp $d0
|
|
|
|
|
jr nc, .asm_17f684
|
|
|
|
|
cp $10
|
|
|
|
|
jr c, .asm_17f679
|
|
|
|
|
sub $10
|
|
|
|
|
cp $24
|
|
|
|
|
jr nc, .asm_17f679
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
|
|
|
|
ld hl, Table_17f706
|
|
|
|
|
add hl, de
|
2015-12-26 18:59:03 -08:00
|
|
|
|
add hl, de
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc301]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
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
|
|
|
|
|
; 17f699
|
|
|
|
|
|
|
|
|
|
Table_17f699: ; 17f699
|
|
|
|
|
dw String_17fedf
|
|
|
|
|
dw String_17fdd9
|
|
|
|
|
dw String_17fdd9
|
|
|
|
|
dw String_17fe03
|
|
|
|
|
dw String_17fd84
|
|
|
|
|
dw String_17fe63
|
|
|
|
|
dw String_17fdb2
|
|
|
|
|
dw String_17fe4b
|
|
|
|
|
dw String_17fe03
|
|
|
|
|
dw String_17fe03
|
|
|
|
|
dw String_17fe03
|
|
|
|
|
; 17f6af
|
|
|
|
|
|
|
|
|
|
Palette_17f6af: ; 17f6af
|
|
|
|
|
RGB 5, 5, 16
|
|
|
|
|
RGB 8, 19, 28
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
; 17f6b7
|
|
|
|
|
|
|
|
|
|
Function17f6b7: ; 17f6b7
|
|
|
|
|
ld a, [wc300]
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_two_digits
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc hl
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
and $f
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_digit
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc301]
|
2015-12-28 14:09:53 -08:00
|
|
|
|
call .bcd_two_digits
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
; 17f6cd
|
|
|
|
|
|
2016-04-10 12:01:49 -07:00
|
|
|
|
.bcd_two_digits ; 17f6cd
|
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
|
|
|
|
|
|
2016-04-10 12:01:49 -07:00
|
|
|
|
.bcd_digit ; 17f6d8
|
2015-12-28 14:09:53 -08:00
|
|
|
|
add "0"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hli], a
|
|
|
|
|
ret
|
|
|
|
|
; 17f6dc
|
|
|
|
|
|
|
|
|
|
String_17f6dc: ; 17f6dc
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "つうしんエラー ー@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17f6e8
|
|
|
|
|
|
|
|
|
|
String_17f6e8: ; 17f6e8
|
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 "@"
|
|
|
|
|
; 17f706
|
|
|
|
|
|
|
|
|
|
Table_17f706:
|
|
|
|
|
dw Unknown_17f74e
|
|
|
|
|
dw Unknown_17f753
|
|
|
|
|
dw Unknown_17f758
|
|
|
|
|
dw Unknown_17f75d
|
|
|
|
|
dw Unknown_17f762
|
|
|
|
|
dw Unknown_17f767
|
|
|
|
|
dw Unknown_17f778
|
|
|
|
|
dw Unknown_17f77d
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f782
|
|
|
|
|
dw Unknown_17f787
|
|
|
|
|
dw Unknown_17f78c
|
|
|
|
|
dw Unknown_17f791
|
|
|
|
|
dw Unknown_17f796
|
|
|
|
|
dw Unknown_17f79b
|
|
|
|
|
dw Unknown_17f7a0
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7a5
|
|
|
|
|
dw Unknown_17f7ea
|
|
|
|
|
dw Unknown_17f7ff
|
|
|
|
|
dw Unknown_17f844
|
|
|
|
|
|
|
|
|
|
Unknown_17f74e: db 1
|
|
|
|
|
dbbw $0, $0, String_17f891
|
|
|
|
|
|
|
|
|
|
Unknown_17f753: db 1
|
|
|
|
|
dbbw $0, $0, String_17f8d1
|
|
|
|
|
|
|
|
|
|
Unknown_17f758: db 1
|
|
|
|
|
dbbw $0, $0, String_17f913
|
|
|
|
|
|
|
|
|
|
Unknown_17f75d: db 1
|
|
|
|
|
dbbw $0, $0, String_17f8d1
|
|
|
|
|
|
|
|
|
|
Unknown_17f762: db 1
|
|
|
|
|
dbbw $0, $0, String_17fa71
|
|
|
|
|
|
|
|
|
|
Unknown_17f767: db 4
|
|
|
|
|
dbbw $0, $0, String_17f946
|
|
|
|
|
dbbw $1, $0, String_17f946
|
|
|
|
|
dbbw $2, $0, String_17f946
|
|
|
|
|
dbbw $3, $0, String_17f946
|
|
|
|
|
|
|
|
|
|
Unknown_17f778: db 1
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
|
|
|
|
|
Unknown_17f77d: db 1
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
|
|
|
|
|
Unknown_17f782: db 1
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
|
|
|
|
|
Unknown_17f787: db 1
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
|
|
|
|
|
Unknown_17f78c: db 1
|
|
|
|
|
dbbw $0, $0, String_17f9d0
|
|
|
|
|
|
|
|
|
|
Unknown_17f791: db 1
|
|
|
|
|
dbbw $0, $0, String_17fa14
|
|
|
|
|
|
|
|
|
|
Unknown_17f796: db 1
|
|
|
|
|
dbbw $0, $0, String_17fcbf
|
|
|
|
|
|
|
|
|
|
Unknown_17f79b: db 1
|
|
|
|
|
dbbw $0, $0, String_17fa71
|
|
|
|
|
|
|
|
|
|
Unknown_17f7a0: db 1
|
|
|
|
|
dbbw $0, $0, String_17fbfe
|
|
|
|
|
|
|
|
|
|
Unknown_17f7a5: db 17
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
dbbw $21, $2, String_17fcbf
|
|
|
|
|
dbbw $21, $4, String_17fcbf
|
|
|
|
|
dbbw $50, $4, String_17faf9
|
|
|
|
|
dbbw $51, $4, String_17fcbf
|
|
|
|
|
dbbw $52, $4, String_17fcbf
|
|
|
|
|
dbbw $0, $5, String_17f98e
|
|
|
|
|
dbbw $1, $5, String_17f98e
|
|
|
|
|
dbbw $2, $5, String_17f98e
|
|
|
|
|
dbbw $3, $5, String_17f98e
|
|
|
|
|
dbbw $4, $5, String_17f98e
|
|
|
|
|
dbbw $50, $5, String_17faf9
|
|
|
|
|
dbbw $51, $5, String_17faf9
|
|
|
|
|
dbbw $52, $5, String_17fcbf
|
|
|
|
|
dbbw $53, $5, String_17faf9
|
|
|
|
|
dbbw $54, $5, String_17fcbf
|
|
|
|
|
dbbw $ff, $ff, String_17fcbf
|
|
|
|
|
|
|
|
|
|
Unknown_17f7ea: db 5
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
dbbw $2, $0, String_17fb2a
|
|
|
|
|
dbbw $3, $0, String_17fb6e
|
|
|
|
|
dbbw $4, $0, String_17f98e
|
|
|
|
|
dbbw $ff, $ff, String_17fcbf
|
|
|
|
|
|
|
|
|
|
Unknown_17f7ff: db 17
|
|
|
|
|
dbbw $0, $0, String_17f98e
|
|
|
|
|
dbbw $1, $3, String_17f98e
|
|
|
|
|
dbbw $2, $3, String_17f98e
|
|
|
|
|
dbbw $0, $4, String_17f98e
|
|
|
|
|
dbbw $1, $4, String_17f98e
|
|
|
|
|
dbbw $3, $4, String_17fbb6
|
|
|
|
|
dbbw $4, $4, String_17fbb6
|
|
|
|
|
dbbw $5, $4, String_17f98e
|
|
|
|
|
dbbw $6, $4, String_17f98e
|
|
|
|
|
dbbw $7, $4, String_17f98e
|
|
|
|
|
dbbw $8, $4, String_17fbfe
|
|
|
|
|
dbbw $0, $5, String_17fa49
|
|
|
|
|
dbbw $1, $5, String_17f98e
|
|
|
|
|
dbbw $2, $5, String_17fa49
|
|
|
|
|
dbbw $3, $5, String_17fab0
|
|
|
|
|
dbbw $4, $5, String_17fa49
|
|
|
|
|
dbbw $ff, $ff, String_17fa49
|
|
|
|
|
|
|
|
|
|
Unknown_17f844: db 19
|
|
|
|
|
dbbw $1, $1, String_17fc3e
|
|
|
|
|
dbbw $2, $1, String_17fc88
|
|
|
|
|
dbbw $3, $1, String_17fcff
|
|
|
|
|
dbbw $4, $1, String_17fd84
|
|
|
|
|
dbbw $5, $1, String_17fd84
|
|
|
|
|
dbbw $6, $1, String_17fd47
|
|
|
|
|
dbbw $1, $2, String_17fb6e
|
|
|
|
|
dbbw $2, $2, String_17f98e
|
|
|
|
|
dbbw $3, $2, String_17fd84
|
|
|
|
|
dbbw $4, $2, String_17f98e
|
|
|
|
|
dbbw $5, $2, String_17fa49
|
|
|
|
|
dbbw $6, $2, String_17fd84
|
|
|
|
|
dbbw $99, $2, String_17fc88
|
|
|
|
|
dbbw $1, $3, String_17fa49
|
|
|
|
|
dbbw $1, $4, String_17fa49
|
|
|
|
|
dbbw $2, $4, String_17fa49
|
|
|
|
|
dbbw $3, $4, String_17fa49
|
|
|
|
|
dbbw $4, $4, String_17fa49
|
|
|
|
|
dbbw $ff, $ff, String_17fa49
|
|
|
|
|
|
|
|
|
|
String_17f891: ; 17f891
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17f8d1: ; 17f8d1
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわが うまく かけられないか"
|
|
|
|
|
next "でんわかいせんが こんでいるので"
|
|
|
|
|
next "つうしん できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17f913: ; 17f913
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわかいせんが こんでいるため"
|
|
|
|
|
next "でんわが かけられません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17f946: ; 17f946
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "モバイルアダプタの エラーです"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17f98e: ; 17f98e
|
|
|
|
|
db "つうしんエラーです"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17f9d0: ; 17f9d0
|
|
|
|
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fa14: ; 17fa14
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fa49: ; 17fa49
|
|
|
|
|
db "モバイルセンターの"
|
|
|
|
|
next "つうしんエラーです"
|
|
|
|
|
next "しばらくまって"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fa71: ; 17fa71
|
|
|
|
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fab0: ; 17fab0
|
|
|
|
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17faf9: ; 17faf9
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fb2a: ; 17fb2a
|
|
|
|
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fb6e: ; 17fb6e
|
|
|
|
|
db "ログインパスワードに"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "まちがいが あるか"
|
|
|
|
|
next "モバイルセンターの エラーです"
|
|
|
|
|
next "パスワードを かくにんして"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fbb6: ; 17fbb6
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fbfe: ; 17fbfe
|
|
|
|
|
db "じかんぎれです"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "でんわが きれました"
|
|
|
|
|
next "でんわを かけなおしてください"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fc3e: ; 17fc3e
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "ごりよう りょうきんの "
|
|
|
|
|
next "おしはらいが おくれたばあいには"
|
|
|
|
|
next "ごりようが できなくなります"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fc88: ; 17fc88
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fcbf: ; 17fcbf
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "でんわかいせんが こんでいるか"
|
|
|
|
|
next "モバイルセンターの エラーで"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fcff: ; 17fcff
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "ごりよう りょうきんが"
|
|
|
|
|
next "じょうげんを こえているため"
|
|
|
|
|
next "こんげつは ごりようできません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fd47: ; 17fd47
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "げんざい モバイルセンターの"
|
|
|
|
|
next "てんけんを しているので"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fd84: ; 17fd84
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "データの よみこみが できません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String_17fdb2: ; 17fdb2
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "3ぷん いじょう なにも"
|
|
|
|
|
next "にゅうりょく しなかったので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fdd9: ; 17fdd9
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fe03: ; 17fe03
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fe4b: ; 17fe4b
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "まちじかんが ながいので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
String_17fe63: ; 17fe63
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "あいての モバイルアダプタと"
|
|
|
|
|
next "タイプが ちがいます"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-01-02 07:04:21 -08:00
|
|
|
|
String_17fe9a: ; 17fe9a ; unused
|
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 "@"
|
|
|
|
|
|
|
|
|
|
String_17fedf: ; 17fedf
|
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 "@"
|
|
|
|
|
; 17ff23
|
|
|
|
|
|
|
|
|
|
Function17ff23: ; 17ff23
|
|
|
|
|
ld a, [hJoyPressed]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $8
|
|
|
|
|
ld [MusicFade], a
|
|
|
|
|
ld a, [wMapMusic]
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2017-12-09 10:52:14 -08:00
|
|
|
|
ld [MusicFadeID + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld hl, wc303
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
; 17ff3c
|
|
|
|
|
|
|
|
|
|
Function17ff3c: ; 17ff3c
|
|
|
|
|
nop
|
|
|
|
|
ld a, [wc300]
|
|
|
|
|
cp $d0
|
|
|
|
|
ret c
|
|
|
|
|
hlcoord 10, 2
|
|
|
|
|
ld de, String_17ff68
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, [wc300]
|
|
|
|
|
push af
|
|
|
|
|
sub $d0
|
|
|
|
|
inc a
|
|
|
|
|
ld [wc300], a
|
|
|
|
|
hlcoord 14, 2
|
|
|
|
|
ld de, wc300
|
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
|
|
|
|
|
ld [wc300], a
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
; 17ff68
|
|
|
|
|
|
|
|
|
|
String_17ff68: ; 17ff68
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "101@"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
; 17ff6c
|