2018-06-24 14:09:41 +00:00
|
|
|
|
Function17c000:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call DisableLCD
|
|
|
|
|
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld hl, vTiles2
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $31 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
xor a
|
|
|
|
|
call ByteFill
|
|
|
|
|
|
2015-11-04 21:14:27 +00:00
|
|
|
|
call LoadStandardFont
|
|
|
|
|
call LoadFontsExtra
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantMap
|
2015-07-22 19:57:02 +00:00
|
|
|
|
decoord 0, 0
|
2018-01-23 22:39:09 +00:00
|
|
|
|
bccoord 0, 0, wAttrMap
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
ld a, SCREEN_HEIGHT
|
|
|
|
|
.y
|
|
|
|
|
push af
|
|
|
|
|
ld a, SCREEN_WIDTH
|
|
|
|
|
|
|
|
|
|
push hl
|
|
|
|
|
.x
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [bc], a
|
|
|
|
|
inc bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .x
|
|
|
|
|
pop hl
|
|
|
|
|
|
|
|
|
|
push bc
|
|
|
|
|
ld bc, BG_MAP_WIDTH * 2
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .y
|
|
|
|
|
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
|
2018-01-02 21:46:40 +00:00
|
|
|
|
ld a, BANK(wBGPals1)
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantPals
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2018-01-01 13:47:16 +00:00
|
|
|
|
ld bc, 16 palettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
ld hl, MobileSelectGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles0 tile $30
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $20 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
ld a, 1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
ld hl, HaveWantGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles2
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $80 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
ld hl, HaveWantGFX + $800
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $10 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
call EnableLCD
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
HaveWantGFX:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
INCBIN "gfx/mobile/havewant.2bpp"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
MobileSelectGFX:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
INCBIN "gfx/mobile/select.2bpp"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
HaveWantMap:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
; Interleaved tile/palette map.
|
2015-03-12 04:15:15 +00:00
|
|
|
|
INCBIN "gfx/mobile/havewant_map.bin"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
HaveWantPals:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
; BG and OBJ palettes.
|
2015-03-12 04:15:15 +00: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-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
CheckStringForErrors:
|
2015-11-07 19:38:52 +00:00
|
|
|
|
; Valid character ranges:
|
2016-05-14 20:37:12 +00:00
|
|
|
|
; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff
|
2015-11-07 19:38:52 +00:00
|
|
|
|
.loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr z, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $60
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr nc, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $4e
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr z, .NextChar
|
|
|
|
|
cp "@"
|
|
|
|
|
jr z, .Done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $5
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .Fail
|
|
|
|
|
cp "<PLAY_G>"
|
|
|
|
|
jr c, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $19
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .Fail
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $1d
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $26
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .Fail
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $35
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $3a
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .Fail
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $3f
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $40
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .Fail
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $49
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr c, .NextChar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.Fail:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.NextChar:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec c
|
2015-11-07 19:38:52 +00:00
|
|
|
|
jr nz, .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.Done:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
CheckStringForErrors_IgnoreTerminator:
|
2015-11-24 20:18:44 +00:00
|
|
|
|
; Find control chars
|
|
|
|
|
.loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr z, .next
|
|
|
|
|
cp "<DEXEND>" + 1
|
|
|
|
|
jr nc, .next
|
|
|
|
|
cp "<NEXT>"
|
|
|
|
|
jr z, .next
|
|
|
|
|
cp "@"
|
|
|
|
|
jr z, .next
|
|
|
|
|
|
2018-01-19 03:30:30 +00:00
|
|
|
|
cp "ガ"
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr c, .end
|
|
|
|
|
cp "<PLAY_G>"
|
|
|
|
|
jr c, .next
|
2018-01-20 01:48:33 +00:00
|
|
|
|
cp "<JP_18>" + 1
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr c, .end
|
2018-01-19 03:30:30 +00:00
|
|
|
|
cp "<NI>"
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr c, .next
|
2018-01-19 03:30:30 +00:00
|
|
|
|
cp "<NO>" + 1
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr c, .end
|
2018-01-19 03:30:30 +00:00
|
|
|
|
cp "<ROUTE>"
|
2015-11-24 20:18:44 +00: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-11 03:15:15 +00:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-24 20:18:44 +00:00
|
|
|
|
.next
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec c
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr nz, .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d0f3:
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc608 + 5]
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonSpecies], a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd81]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc74e], a
|
|
|
|
|
ld hl, wc608 + 53
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld de, wOTTrademonOTName
|
|
|
|
|
ld bc, 5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld a, "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld [de], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc608 + 11]
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonID], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc608 + 12]
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonID + 1], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608 + 26
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonDVs], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hl]
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonDVs + 1], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld bc, wc608 + 5
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall GetCaughtGender
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, c
|
2015-12-22 23:03:00 +00:00
|
|
|
|
ld [wOTTrademonCaughtData], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call SpeechTextBox
|
|
|
|
|
call FadeToMenu
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function10804d
|
|
|
|
|
farcall Function17d1f1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
2015-11-28 20:13:40 +00:00
|
|
|
|
ld [wForceEvolution], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $2
|
2015-10-19 14:23:58 +00:00
|
|
|
|
ld [wLinkMode], a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall EvolvePokemon
|
2015-02-11 03:15:15 +00:00
|
|
|
|
xor a
|
2015-10-19 14:23:58 +00:00
|
|
|
|
ld [wLinkMode], a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall SaveAfterLinkTrade
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, $5
|
|
|
|
|
ld [$a800], a
|
|
|
|
|
call CloseSRAM
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wMapGroup]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wMapNumber]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2017-12-24 18:46:34 +00:00
|
|
|
|
call GetMapSceneID
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, d
|
|
|
|
|
or e
|
|
|
|
|
jr z, .asm_17d180
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [de], a
|
|
|
|
|
|
|
|
|
|
.asm_17d180
|
2015-12-02 02:54:11 +00:00
|
|
|
|
call CloseSubmenu
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call RestartMapMusic
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Mobile_CopyDefaultOTName:
|
2018-01-23 00:10:09 +00:00
|
|
|
|
ld hl, Mobile5F_PlayersName
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc63d
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, 5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-23 00:10:09 +00:00
|
|
|
|
Mobile5F_PlayersName:
|
2015-03-12 04:15:15 +00:00
|
|
|
|
db "クりス@@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Mobile_CopyDefaultNickname:
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld hl, .DefaultNickname
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc642
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, 5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2015-12-26 04:34:33 +00:00
|
|
|
|
.DefaultNickname:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "?????"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Mobile_CopyDefaultMail:
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld a, "@"
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc647
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, MAIL_MSG_LENGTH + 1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld hl, .DefaultMessage
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc647
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, 6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2015-12-26 04:34:33 +00:00
|
|
|
|
.DefaultMessage:
|
2015-03-12 04:15:15 +00:00
|
|
|
|
db "こんにちは@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Mobile_CopyDefaultMailAuthor:
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld a, "@"
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc668
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, 5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
2018-01-23 00:10:09 +00:00
|
|
|
|
ld hl, Mobile5F_PlayersName
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc668
|
2015-12-26 04:34:33 +00:00
|
|
|
|
ld bc, 5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
CheckStringContainsLessThanBNextCharacters:
|
2015-11-24 20:18:44 +00:00
|
|
|
|
.loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2015-11-24 20:18:44 +00:00
|
|
|
|
cp "<NEXT>"
|
|
|
|
|
jr nz, .next_char
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec b
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr z, .done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2015-11-24 20:18:44 +00:00
|
|
|
|
.next_char
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec c
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr nz, .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2015-11-24 20:18:44 +00:00
|
|
|
|
.done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d1f1:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCurPartySpecies]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
|
|
|
|
call SetSeenAndCaughtMon
|
|
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCurPartySpecies]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp UNOWN
|
|
|
|
|
jr nz, .asm_17d223
|
|
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1DVs
|
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2015-11-04 16:19:58 +00:00
|
|
|
|
ld bc, PARTYMON_STRUCT_LENGTH
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call AddNTimes
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef GetUnownLetter
|
2017-12-24 17:47:30 +00:00
|
|
|
|
callfar UpdateUnownDex
|
2015-11-30 02:34:59 +00:00
|
|
|
|
ld a, [wFirstUnownSeen]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d223
|
|
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wUnownLetter]
|
2015-11-30 02:34:59 +00:00
|
|
|
|
ld [wFirstUnownSeen], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17d223
|
|
|
|
|
ret
|
|
|
|
|
|
2015-08-24 17:35:05 +00:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2018-01-23 22:39:09 +00:00
|
|
|
|
; Parameter: [wScriptVar] = 0..1
|
2015-08-24 17:35:05 +00:00
|
|
|
|
;
|
2018-01-23 22:39:09 +00:00
|
|
|
|
; if [wScriptVar] == FALSE
|
2015-08-24 17:35:05 +00:00
|
|
|
|
; Show japanese menu options
|
|
|
|
|
; - News - News - ??? - Cancel
|
2018-01-23 22:39:09 +00:00
|
|
|
|
; if [wScriptVar] == TRUE
|
2015-08-24 17:35:05 +00:00
|
|
|
|
; Show BattleTower-Menu with 3 options in english language
|
|
|
|
|
; - Challenge - Explanation - Cancel
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Menu_ChallengeExplanationCancel:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wScriptVar]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr nz, .English
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $4
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2018-01-23 21:08:43 +00:00
|
|
|
|
ld hl, MenuHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr .Load_Interpret
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.English:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $4
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2018-01-23 21:08:43 +00:00
|
|
|
|
ld hl, MenuHeader_ChallengeExplanationCancel ; English Menu
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.Load_Interpret:
|
2018-01-23 21:08:43 +00:00
|
|
|
|
call LoadMenuHeader
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17d246
|
2015-12-25 03:58:42 +00:00
|
|
|
|
call CloseWindow
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d246:
|
2015-12-15 23:59:49 +00:00
|
|
|
|
call VerticalMenu
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr c, .Exit
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wScriptVar]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $5
|
2015-12-15 23:59:49 +00:00
|
|
|
|
jr nz, .UsewMenuCursorY
|
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $3
|
|
|
|
|
ret z
|
2015-12-15 23:59:49 +00:00
|
|
|
|
jr c, .UsewMenuCursorY
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2015-11-24 20:18:44 +00:00
|
|
|
|
jr .LoadToScriptVar
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.UsewMenuCursorY:
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.LoadToScriptVar:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
|
.Exit:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $4
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
MenuHeader_17d26a:
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
|
menu_coords 0, 0, 14, 9
|
2018-01-23 21:08:43 +00:00
|
|
|
|
dw MenuData_17d272
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
MenuData_17d272:
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 4
|
2015-11-24 20:18:44 +00:00
|
|
|
|
db "ニュース¯よみこむ@"
|
|
|
|
|
db "ニュース¯みる@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "せつめい@"
|
|
|
|
|
db "やめる@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
MenuHeader_ChallengeExplanationCancel:
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
|
menu_coords 0, 0, 14, 7
|
2018-01-23 21:08:43 +00:00
|
|
|
|
dw MenuData_ChallengeExplanationCancel
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 1 ; default option
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
MenuData_ChallengeExplanationCancel:
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_WRAP ; flags
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 3
|
|
|
|
|
db "Challenge@"
|
|
|
|
|
db "Explanation@"
|
|
|
|
|
db "Cancel@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d2b6:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17d2c0
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function1181da
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d2c0:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
xor a
|
2015-10-24 23:49:19 +00:00
|
|
|
|
ld [wJumptableIndex], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld [wcf65], a
|
|
|
|
|
ld [wcf66], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d2ce:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, [$aa72]
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d2e2
|
|
|
|
|
ld a, $1
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d2e2
|
|
|
|
|
call Function17d314
|
|
|
|
|
ret c
|
|
|
|
|
call SpeechTextBox
|
|
|
|
|
call FadeToMenu
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17d370
|
|
|
|
|
call Function17d45a
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, MUSIC_MOBILE_CENTER
|
|
|
|
|
ld a, e
|
|
|
|
|
ld [wMapMusic], a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, d
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PlayMusic
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ReturnToMapFromSubmenu
|
2015-12-02 02:54:11 +00:00
|
|
|
|
call CloseSubmenu
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d314:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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 20:37:12 +00:00
|
|
|
|
ld bc, $c
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $2
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d370:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
|
|
|
|
ld [wcd6c], a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ClearBGPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ClearSprites
|
|
|
|
|
call ClearScreen
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call DisableLCD
|
2018-07-15 15:58:01 +00:00
|
|
|
|
ld hl, vTiles0 tile $ee
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, PokemonNewsGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $48 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld hl, vTiles2 tile $7f
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2018-07-15 15:58:01 +00:00
|
|
|
|
ld de, vTiles0 tile $ee
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, GFX_17eb7e
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles2 tile $60
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call EnableLCD
|
|
|
|
|
call Function17d60b
|
|
|
|
|
ld a, $0
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wBGMapBuffer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $d0
|
|
|
|
|
ld [wcd21], a
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $a006
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld bc, $1000
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d3f6:
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ClearBGPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ClearSprites
|
|
|
|
|
call ClearScreen
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
Function17d405:
|
|
|
|
|
call DisableLCD
|
2018-07-15 15:58:01 +00:00
|
|
|
|
ld hl, vTiles0 tile $ee
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, PokemonNewsGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles1
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, $48 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld hl, vTiles2 tile $7f
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2018-07-15 15:58:01 +00:00
|
|
|
|
ld de, vTiles0 tile $ee
|
2015-11-24 20:18:44 +00:00
|
|
|
|
ld bc, 1 tiles
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call EnableLCD
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, Palette_17eff6
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-12-26 16:31:56 +00:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2015-09-09 23:27:07 +00:00
|
|
|
|
call SetPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d45a:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17d45a
|
2015-10-17 16:58:26 +00:00
|
|
|
|
call JoyTextDelay
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd77]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17d46f
|
|
|
|
|
call Function17d474
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17d45a
|
|
|
|
|
|
|
|
|
|
.asm_17d46f
|
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d474:
|
2015-12-27 02:59:03 +00:00
|
|
|
|
jumptable Jumptable_17d483, wcd77
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Jumptable_17d483:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dw Function17d48d
|
|
|
|
|
dw Function17d5be
|
|
|
|
|
dw Function17d5c4
|
|
|
|
|
dw Function17d6fd
|
|
|
|
|
dw Function17e427
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d48d:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, Palette_17eff6
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $40
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld hl, TileAttrmap_17eb8e
|
2015-07-22 19:57:02 +00:00
|
|
|
|
decoord 0, 0
|
2018-01-23 22:39:09 +00:00
|
|
|
|
bccoord 0, 0, wAttrMap
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $40
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d4a4
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd6c]
|
|
|
|
|
cp e
|
|
|
|
|
jr z, .asm_17d4e0
|
|
|
|
|
ld a, e
|
|
|
|
|
ld [wcd6c], a
|
2015-12-07 16:28:58 +00:00
|
|
|
|
ld [wMapMusic], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, $0
|
|
|
|
|
call PlayMusic2
|
|
|
|
|
|
|
|
|
|
.asm_17d4e0
|
|
|
|
|
ld a, [hli]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, $8
|
|
|
|
|
.asm_17d4e6
|
|
|
|
|
srl a
|
|
|
|
|
jr nc, .asm_17d4f6
|
|
|
|
|
ld b, $8
|
|
|
|
|
push af
|
|
|
|
|
.asm_17d4ed
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec b
|
|
|
|
|
jr nz, .asm_17d4ed
|
|
|
|
|
pop af
|
|
|
|
|
jr .asm_17d4fc
|
|
|
|
|
|
|
|
|
|
.asm_17d4f6
|
|
|
|
|
push af
|
|
|
|
|
ld a, e
|
|
|
|
|
add $8
|
|
|
|
|
ld e, a
|
|
|
|
|
pop af
|
|
|
|
|
|
|
|
|
|
.asm_17d4fc
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17d4e6
|
|
|
|
|
push hl
|
|
|
|
|
call Function17d5f6
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d539
|
|
|
|
|
.asm_17d508
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4f], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd50], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd51], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
add $98
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e613
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld de, wcd4f
|
|
|
|
|
call Function17e691
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d508
|
|
|
|
|
|
|
|
|
|
.asm_17d539
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
.asm_17d53a
|
|
|
|
|
push af
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
push de
|
|
|
|
|
pop hl
|
|
|
|
|
inc hl
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17d53a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld de, wCreditsTimer
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $c
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $10
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd42], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd43], a
|
|
|
|
|
ld a, [hli]
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld [wMobileInactivityTimerMinutes], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld [wMobileInactivityTimerSeconds], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld [wMobileInactivityTimerFrames], a
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd4b], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd4c], a
|
|
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd4d], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd4e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall ReloadMapPart
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jp Function17e438
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d5be:
|
2015-09-09 23:27:07 +00:00
|
|
|
|
call SetPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e438
|
|
|
|
|
|
|
|
|
|
Function17d5c4:
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [hJoyPressed]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
2015-12-26 16:31:56 +00:00
|
|
|
|
ld c, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, c
|
|
|
|
|
ld hl, wcd32
|
2015-12-26 16:31:56 +00:00
|
|
|
|
.loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
srl a
|
2015-12-26 16:31:56 +00:00
|
|
|
|
jr c, .got_button
|
2015-02-11 03:15:15 +00:00
|
|
|
|
inc c
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc c
|
2015-12-26 16:31:56 +00:00
|
|
|
|
jr .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2015-12-26 16:31:56 +00:00
|
|
|
|
.got_button
|
2015-02-11 03:15:15 +00: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 16:31:56 +00:00
|
|
|
|
ld a, [wcd20]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, l
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, h
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $3
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d5f6:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-12-26 16:31:56 +00:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d60b:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $b1d3
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $20
|
2015-02-11 03:15:15 +00: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
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4a], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd49], a
|
|
|
|
|
push hl
|
|
|
|
|
push de
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, b
|
|
|
|
|
ld d, $0
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd4b], a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [wcd4c], a
|
|
|
|
|
pop de
|
|
|
|
|
pop hl
|
|
|
|
|
inc b
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc b
|
|
|
|
|
dec c
|
2015-02-11 03:15:15 +00: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
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, $b1b3
|
|
|
|
|
ld a, [$b1b1]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [$b1b2]
|
|
|
|
|
ld b, a
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d6a1:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd6e]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $b1d3
|
|
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd47], a
|
|
|
|
|
ld a, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wBGMapPalBuffer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, $b1b3
|
|
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, wcd64
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd69], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd68], a
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd6a], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd6b], a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d6fd:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd77]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, asm_17d721
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, asm_17d721
|
|
|
|
|
|
|
|
|
|
Function17d711:
|
2015-12-26 16:31:56 +00:00
|
|
|
|
.crash_loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $31
|
2015-12-26 16:31:56 +00:00
|
|
|
|
jr nc, .crash_loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
2015-12-26 16:31:56 +00:00
|
|
|
|
ld hl, Jumptable17d72a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2017-06-17 23:14:55 +00:00
|
|
|
|
jp hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-10-24 19:33:18 +00:00
|
|
|
|
asm_17d721:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e5af
|
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Jumptable17d72a:
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
dw IncCrashCheckPointer_SaveGameData
|
|
|
|
|
dw IncCrashCheckPointer_SaveAfterLinkTrade
|
|
|
|
|
dw IncCrashCheckPointer_SaveBox
|
|
|
|
|
dw IncCrashCheckPointer_SaveChecksum
|
|
|
|
|
dw IncCrashCheckPointer_SaveTrainerRankingsChecksum
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dw Function17e3e0
|
|
|
|
|
dw Function17e3f0
|
|
|
|
|
dw Function17e409
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d78c:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d78d:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $a006
|
|
|
|
|
add hl, bc
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld bc, $1000
|
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
2015-11-12 04:38:57 +00:00
|
|
|
|
call ClearBGPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d7b4:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
|
|
|
|
call PlayMusic2
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d7c2:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call WaitSFX
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d7d3:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
dec a
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, $0
|
2018-01-17 04:47:45 +00:00
|
|
|
|
call PlayCry
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call WaitSFX
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d7e5:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d818:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e447
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d833:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push de
|
|
|
|
|
push bc
|
|
|
|
|
call Function17e32b
|
|
|
|
|
pop bc
|
|
|
|
|
pop de
|
|
|
|
|
call Function17e43d
|
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function11c08f
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d85d:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
push hl
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
ld de, wcc60
|
|
|
|
|
.asm_17d86c
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17d86c
|
|
|
|
|
pop hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, $0
|
|
|
|
|
.asm_17d878
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, .asm_17d8c7
|
|
|
|
|
ld [wcd4f], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd50], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd51], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, [wcd51]
|
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17d89b
|
|
|
|
|
ld a, [wcd4f]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17d878
|
|
|
|
|
|
|
|
|
|
.asm_17d8c2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
jr .asm_17d878
|
|
|
|
|
|
|
|
|
|
.asm_17d8c7
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push bc
|
|
|
|
|
ld a, $3
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e32b
|
|
|
|
|
pop bc
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd3b], a
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcf66], a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function118329
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wc300]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d8fe
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d8fe
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d902:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
push de
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e32b
|
|
|
|
|
pop de
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-11 03:15:15 +00: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 17:47:30 +00:00
|
|
|
|
farcall Function11837a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wc300]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
cp $a
|
|
|
|
|
jr z, .asm_17d936
|
|
|
|
|
call Function17e309
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17d936
|
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d93a:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e32b
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e6de
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall LoadMonPaletteAsNthBGPal
|
2015-09-09 23:27:07 +00:00
|
|
|
|
call SetPalettes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2015-07-22 19:57:02 +00:00
|
|
|
|
decoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-01-16 19:30:10 +00:00
|
|
|
|
farcall HOF_AnimateFrontpic
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d98b:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e32b
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e6de
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wTrainerClass], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall LoadTrainerClassPaletteAsNthBGPal
|
2015-09-09 23:27:07 +00:00
|
|
|
|
call SetPalettes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
|
|
|
|
push de
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld de, vTiles2
|
2018-01-16 19:30:10 +00:00
|
|
|
|
farcall GetTrainerPic
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
2015-07-22 19:57:02 +00:00
|
|
|
|
decoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $707
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef PlaceGraphic
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e349
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17d9e3:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $7
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da01
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17da07
|
|
|
|
|
|
|
|
|
|
.asm_17da01
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17da07
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, a
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da2d
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17da30
|
|
|
|
|
|
|
|
|
|
.asm_17da2d
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da30
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17da31:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17da4f
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17da55
|
|
|
|
|
|
|
|
|
|
.asm_17da4f
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17da55
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00: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
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17da8b
|
|
|
|
|
|
|
|
|
|
.asm_17da88
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17da8b
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
Unknown_17da8c:
|
|
|
|
|
x = 0
|
2018-05-06 16:16:57 +00:00
|
|
|
|
rept 8
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 1 << x
|
|
|
|
|
x = x + 1
|
2018-05-06 16:16:57 +00:00
|
|
|
|
endr
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
Unknown_17da94:
|
|
|
|
|
x = 0
|
2018-05-06 16:16:57 +00:00
|
|
|
|
rept 8
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db (1 << x) ^ $ff
|
|
|
|
|
x = x + 1
|
2018-05-06 16:16:57 +00:00
|
|
|
|
endr
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17da9c:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
dec a
|
|
|
|
|
jr z, .asm_17dabd
|
|
|
|
|
push af
|
|
|
|
|
call Function17e566
|
|
|
|
|
pop af
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
.asm_17daba
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17dabd
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17daba
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
jr .asm_17daba
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dadc:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db0e
|
|
|
|
|
jr nc, .asm_17db0e
|
|
|
|
|
ld hl, wcd31
|
|
|
|
|
ld a, [wcd2b]
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db11
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db0e
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17db11
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
jr .asm_17db0e
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17db2d:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db53
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
inc a
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17db53
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db53
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17db56:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
cp $1
|
|
|
|
|
jr z, .asm_17db74
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
dec a
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
dec a
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17db74
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17db77:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr z, .asm_17dbae
|
|
|
|
|
jr nc, .asm_17dbae
|
|
|
|
|
call Function17e566
|
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld hl, wcd42
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr c, .asm_17db9f
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
dec a
|
|
|
|
|
|
|
|
|
|
.asm_17db9f
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17dbb1
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
|
|
|
|
|
|
|
|
|
.asm_17dbae
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dbb1:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
cp [hl]
|
|
|
|
|
ret nc
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcd30], a
|
|
|
|
|
ld [wcd31], a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
sub [hl]
|
|
|
|
|
.asm_17dbd4
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
push af
|
|
|
|
|
ld hl, wcd30
|
|
|
|
|
ld a, b
|
|
|
|
|
cp [hl]
|
|
|
|
|
jr nz, .asm_17dbe4
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ld hl, wcd31
|
|
|
|
|
|
|
|
|
|
.asm_17dbe4
|
|
|
|
|
inc [hl]
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17dbd4
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dbe9:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wcd2d
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
sub [hl]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr z, .asm_17dbf5
|
|
|
|
|
xor a
|
|
|
|
|
|
|
|
|
|
.asm_17dbf5
|
|
|
|
|
ld [wcd2f], a
|
|
|
|
|
ld a, [wcd30]
|
|
|
|
|
dec a
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd31]
|
|
|
|
|
ld b, a
|
|
|
|
|
xor a
|
|
|
|
|
ld hl, wcd24
|
|
|
|
|
.asm_17dc05
|
|
|
|
|
dec b
|
|
|
|
|
jr z, .asm_17dc0b
|
|
|
|
|
add [hl]
|
|
|
|
|
jr .asm_17dc05
|
|
|
|
|
|
|
|
|
|
.asm_17dc0b
|
|
|
|
|
add c
|
|
|
|
|
ld hl, wcd2f
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
call Function17e451
|
|
|
|
|
call Function17e55b
|
|
|
|
|
call Function17e5af
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jp IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dc1f:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc688
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc688
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $40
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc708], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70a], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add $5
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70c], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc709], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add $4
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70b], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $96
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70d], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5c
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70e], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc70f], a
|
|
|
|
|
ld hl, wc708
|
2018-01-23 21:08:43 +00:00
|
|
|
|
call LoadMenuHeader
|
2015-12-15 23:59:49 +00:00
|
|
|
|
call VerticalMenu
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr nc, .asm_17dc6e
|
|
|
|
|
ld a, $2
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld [wMenuCursorY], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17dc6e
|
2015-12-25 03:58:42 +00:00
|
|
|
|
call CloseWindow
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-12-15 23:59:49 +00:00
|
|
|
|
ld a, [wMenuCursorY]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $1
|
|
|
|
|
jr nz, .asm_17dc85
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc68a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc68a + 1]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17dc8d
|
|
|
|
|
|
|
|
|
|
.asm_17dc85
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc68a + 2]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc68a + 3]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17dc8d
|
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-23 21:08:43 +00:00
|
|
|
|
MenuData_17dc96:
|
2018-01-14 10:59:56 +00:00
|
|
|
|
db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db 2
|
|
|
|
|
db "はい@"
|
|
|
|
|
db "いいえ@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dc9f:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-11-20 16:47:52 +00:00
|
|
|
|
call RotateFourPalettesLeft
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dca9:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
Function17dcaf:
|
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld hl, wBGPals1
|
2018-01-01 13:47:16 +00:00
|
|
|
|
ld de, 1 palettes
|
|
|
|
|
ld c, 8
|
2015-02-11 03:15:15 +00: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 16:47:52 +00:00
|
|
|
|
call RotateThreePalettesRight
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dccf:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld b, a
|
|
|
|
|
call Function17e43d
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17dced
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
cp $ff
|
|
|
|
|
jr z, .asm_17dd0d
|
2015-12-26 16:31:56 +00:00
|
|
|
|
.crash_loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $31
|
2015-12-26 16:31:56 +00:00
|
|
|
|
jr nc, .crash_loop
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
jp HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17dd11
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dd13:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e447
|
|
|
|
|
push hl
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
push hl
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
2016-05-08 18:11:24 +00:00
|
|
|
|
call PlaceHLTextAtBC
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dd30:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
call Function17e600
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17dd49:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc711]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr c, .sram
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr .got_bank
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.sram
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.got_bank
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc688
|
|
|
|
|
ld a, [wc711]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr c, .close_sram
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr .exited_bank
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.close_sram
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.exited_bank
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc711]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc712
|
|
|
|
|
ld de, wc688
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr z, .next
|
|
|
|
|
jr c, .load
|
|
|
|
|
jr .load2
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.next
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec c
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr nz, .loop
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr .done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.load2
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70f]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc710]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2016-01-12 17:46:18 +00:00
|
|
|
|
jr .done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.load
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
2016-01-12 17:46:18 +00:00
|
|
|
|
.done
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17ddcd:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $8
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17dde7
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17dded
|
|
|
|
|
|
|
|
|
|
.asm_17dde7
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17dded
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld [wc710], a
|
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17de0c
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17de0f
|
|
|
|
|
|
|
|
|
|
.asm_17de0c
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17de0f
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, Unknown_17da8c
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc710
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and [hl]
|
|
|
|
|
pop hl
|
|
|
|
|
jr nz, .asm_17de26
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70f]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de2e
|
|
|
|
|
|
|
|
|
|
.asm_17de26
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de2e
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17de32:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $9
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc710]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
call Function17f4f6
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc710]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc711
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17de61
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
|
|
|
|
jr z, .asm_17de6b
|
|
|
|
|
jr c, .asm_17de82
|
|
|
|
|
jr .asm_17de78
|
|
|
|
|
|
|
|
|
|
.asm_17de6b
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17de61
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de78
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70f]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17de8a
|
|
|
|
|
|
|
|
|
|
.asm_17de82
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17de8a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17de91:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $7
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
call Function17f4f6
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00: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
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17ded2
|
|
|
|
|
|
|
|
|
|
.asm_17deca
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17ded2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17ded9:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $1f
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call Function17e32b
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartySpecies], a
|
|
|
|
|
ld [wTempEnemyMonSpecies], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurPartyLevel], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $6
|
|
|
|
|
jp nc, Function17e026
|
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMonType], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
|
|
|
|
push bc
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef TryAddMonToParty
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall SetCaughtData
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
bit 1, b
|
|
|
|
|
jr z, .asm_17df33
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMonNicknames
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call SkipNames
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df37
|
|
|
|
|
|
|
|
|
|
.asm_17df33
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17df37
|
|
|
|
|
bit 2, b
|
|
|
|
|
jr z, .asm_17df5a
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMonOT
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call SkipNames
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall SetGiftPartyMonCaughtData
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df5e
|
|
|
|
|
|
|
|
|
|
.asm_17df5a
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $7
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17df5e
|
|
|
|
|
bit 3, b
|
|
|
|
|
jr z, .asm_17df79
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1ID
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17df7b
|
|
|
|
|
|
|
|
|
|
.asm_17df79
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17df7b
|
|
|
|
|
bit 4, b
|
|
|
|
|
jr z, .asm_17dfd0
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1DVs
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Species
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld a, [hl]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurSpecies], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetBaseData
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1MaxHP
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
push hl
|
2018-02-22 17:12:43 +00:00
|
|
|
|
ld b, FALSE
|
2018-02-22 16:13:29 +00:00
|
|
|
|
farcall CalcMonStats
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1HP
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17dfd2
|
|
|
|
|
|
|
|
|
|
.asm_17dfd0
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17dfd2
|
|
|
|
|
bit 5, b
|
|
|
|
|
jr z, .asm_17dfea
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Item
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17dfeb
|
|
|
|
|
|
|
|
|
|
.asm_17dfea
|
|
|
|
|
inc hl
|
|
|
|
|
|
|
|
|
|
.asm_17dfeb
|
|
|
|
|
bit 6, b
|
|
|
|
|
jr z, .asm_17e01f
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1Moves
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
|
|
|
|
push de
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop de
|
|
|
|
|
push hl
|
|
|
|
|
push de
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wPartyCount]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPartyMon1PP
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPartyLocation
|
|
|
|
|
ld d, h
|
|
|
|
|
ld e, l
|
|
|
|
|
pop hl
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef FillPP
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jp asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e01f
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
jp asm_17e0ee
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e026:
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld a, BANK(sBoxCount)
|
2015-02-11 03:15:15 +00: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 17:47:30 +00:00
|
|
|
|
farcall LoadEnemyMon
|
2018-02-22 16:13:29 +00:00
|
|
|
|
farcall SendMonIntoBox
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall SetBoxMonCaughtData
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld a, BANK(sBoxMonNicknames)
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
bit 1, b
|
|
|
|
|
jr z, .asm_17e067
|
|
|
|
|
push bc
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $b
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, sBoxMonNicknames
|
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e06b
|
|
|
|
|
|
|
|
|
|
.asm_17e067
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
|
|
|
|
|
.asm_17e06b
|
|
|
|
|
bit 2, b
|
|
|
|
|
jr z, .asm_17e08e
|
|
|
|
|
push bc
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, sBoxMonOT
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
push hl
|
|
|
|
|
call CloseSRAM
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall SetGiftBoxMonCaughtData
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
jr .asm_17e092
|
|
|
|
|
|
|
|
|
|
.asm_17e08e
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $7
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
push hl
|
|
|
|
|
ld hl, sBoxMon1Moves
|
|
|
|
|
ld de, sBoxMon1PP
|
2018-01-16 19:30:10 +00:00
|
|
|
|
predef FillPP
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
pop hl
|
|
|
|
|
pop bc
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e0e1
|
|
|
|
|
call CloseSRAM
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
jr asm_17e0ee
|
|
|
|
|
|
|
|
|
|
.asm_17e0ea
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $1a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
|
2018-10-24 19:33:18 +00:00
|
|
|
|
asm_17e0ee:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
|
|
|
|
call Function17e349
|
|
|
|
|
pop hl
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e0fd:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurItem], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2015-11-01 23:13:31 +00:00
|
|
|
|
ld [wItemQuantityChangeBuffer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wNumItems
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ReceiveItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e127
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17e127
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e133:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wScriptVar], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall MobileCheckOwnMonAnywhere
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e159
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17e159
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e165:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wCurItem], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wNumItems
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e195
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPCItems
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CheckItem
|
|
|
|
|
pop hl
|
|
|
|
|
jr c, .asm_17e195
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
|
|
|
|
.asm_17e195
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld l, b
|
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e1a1:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $d
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1bb
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17e1c1
|
|
|
|
|
|
|
|
|
|
.asm_17e1bb
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17e1c1
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70a]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1e2
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17e1e5
|
|
|
|
|
|
|
|
|
|
.asm_17e1e2
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e1e5
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e1f3
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17e1f9
|
|
|
|
|
|
|
|
|
|
.asm_17e1f3
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70c]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17e1f9
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70d]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc688
|
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70e]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17e21a
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17e21d
|
|
|
|
|
|
|
|
|
|
.asm_17e21a
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
|
|
|
|
|
.asm_17e21d
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70b]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc688
|
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17e227
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
cp [hl]
|
|
|
|
|
inc hl
|
|
|
|
|
jr z, .asm_17e231
|
|
|
|
|
jr c, .asm_17e23e
|
|
|
|
|
jr .asm_17e248
|
|
|
|
|
|
|
|
|
|
.asm_17e231
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e227
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc711]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc712]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e23e
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc70f]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc710]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
jr .asm_17e250
|
|
|
|
|
|
|
|
|
|
.asm_17e248
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc712 + 1]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc712 + 2]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
|
|
|
|
|
.asm_17e250
|
|
|
|
|
call Function17e40f
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e254:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e261:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e270:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e27f:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [de]
|
|
|
|
|
add [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e293:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00: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-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [de]
|
|
|
|
|
sub [hl]
|
|
|
|
|
ld [de], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e2a7:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e32b
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcf66], a
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function118233
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, GFX_17eb7e
|
2017-12-28 12:32:33 +00:00
|
|
|
|
ld hl, vTiles2 tile $60
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $c
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17e2f7
|
|
|
|
|
call Function17e349
|
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcd7a], a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17e300
|
|
|
|
|
call Function17e349
|
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wcd7a], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e309:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $2
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
call Function17dcaf
|
|
|
|
|
call ClearScreen
|
|
|
|
|
call Function17e349
|
|
|
|
|
call Function17d5f6
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall DisplayMobileError
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17e349
|
|
|
|
|
call Function17dcaf
|
|
|
|
|
xor a
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e32b:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, $b0b1
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $40
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wBGMapBuffer
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $5b
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e349:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld hl, $b0b1
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $40
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld de, wBGMapBuffer
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $5b
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-01-03 04:16:56 +00:00
|
|
|
|
inc_crash_check_pointer_farcall: MACRO
|
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer ; redundant
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-03 16:57:34 +00:00
|
|
|
|
rept _NARG
|
2018-01-03 04:16:56 +00:00
|
|
|
|
farcall \1
|
2018-01-03 16:57:34 +00:00
|
|
|
|
shift
|
|
|
|
|
endr
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ENDM
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
IncCrashCheckPointer_SaveGameData:
|
2018-07-23 04:13:43 +00:00
|
|
|
|
inc_crash_check_pointer_farcall _SaveGameData
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
IncCrashCheckPointer_SaveAfterLinkTrade:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
inc_crash_check_pointer_farcall SaveAfterLinkTrade
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
IncCrashCheckPointer_SaveBox:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
inc_crash_check_pointer_farcall SaveBox
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
IncCrashCheckPointer_SaveChecksum:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
inc_crash_check_pointer_farcall SaveChecksum
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
IncCrashCheckPointer_SaveTrainerRankingsChecksum:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
inc_crash_check_pointer_farcall UpdateTrainerRankingsChecksum2, BackupMobileEventIndex
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e3e0:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld c, a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e3f0:
|
2018-01-03 04:16:56 +00:00
|
|
|
|
call IncCrashCheckPointer
|
|
|
|
|
call HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17e3f6
|
2015-10-17 16:58:26 +00:00
|
|
|
|
call JoyTextDelay
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, hJoyPressed
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $1
|
|
|
|
|
ret nz
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $2
|
|
|
|
|
ret nz
|
|
|
|
|
call WaitBGMap
|
|
|
|
|
jr .asm_17e3f6
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e409:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wcd77
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e40f:
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld de, wBGPals1
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
2018-01-03 04:16:56 +00:00
|
|
|
|
jr HlToCrashCheckPointer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-01-03 04:16:56 +00:00
|
|
|
|
IncCrashCheckPointer:
|
|
|
|
|
ld a, [wMobileCrashCheckPointer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld a, [wMobileCrashCheckPointer + 1]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
|
|
|
|
inc hl
|
|
|
|
|
|
2018-01-03 04:16:56 +00:00
|
|
|
|
HlToCrashCheckPointer:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, l
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld [wMobileCrashCheckPointer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, h
|
2018-01-03 04:16:56 +00:00
|
|
|
|
ld [wMobileCrashCheckPointer + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e427:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, hJoyPressed
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
and $1
|
|
|
|
|
jr nz, .asm_17e432
|
|
|
|
|
and $2
|
|
|
|
|
ret z
|
|
|
|
|
|
|
|
|
|
.asm_17e432
|
|
|
|
|
ld a, $3
|
|
|
|
|
ld [wcd77], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e438:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wcd77
|
|
|
|
|
inc [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e43d:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, bc
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e447:
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e451:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
call Function17e51b
|
|
|
|
|
call Function17e4dd
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
push af
|
|
|
|
|
ld a, [wcd49]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd4a]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd2f]
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
call AddNTimes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
pop bc
|
2016-05-05 19:07:37 +00:00
|
|
|
|
ld a, [wMobileCommsJumptableIndex]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17e48b
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
.asm_17e490
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [bc]
|
|
|
|
|
inc bc
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [bc]
|
|
|
|
|
inc bc
|
|
|
|
|
ld d, a
|
|
|
|
|
push bc
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd26]
|
|
|
|
|
ld e, a
|
|
|
|
|
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 20:37:12 +00:00
|
|
|
|
ld de, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17e4cb
|
|
|
|
|
add hl, de
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e4cb
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e48b
|
|
|
|
|
jr .asm_17e4d8
|
|
|
|
|
|
|
|
|
|
.asm_17e4d5
|
|
|
|
|
pop af
|
|
|
|
|
pop hl
|
|
|
|
|
pop af
|
|
|
|
|
|
|
|
|
|
.asm_17e4d8
|
|
|
|
|
pop af
|
|
|
|
|
ld [wcd2e], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e4dd:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd2c]
|
|
|
|
|
and $1
|
|
|
|
|
ret z
|
|
|
|
|
ld a, [wcd29]
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call AddNTimes
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd24]
|
|
|
|
|
add b
|
|
|
|
|
cp c
|
|
|
|
|
ret z
|
|
|
|
|
ret nc
|
|
|
|
|
ld a, $ee
|
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e51b:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd28]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wCreditsTimer
|
2015-02-11 03:15:15 +00:00
|
|
|
|
sub [hl]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd4f], a
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
dec a
|
|
|
|
|
call AddNTimes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
2016-05-05 19:07:37 +00:00
|
|
|
|
ld a, [wMobileCommsJumptableIndex]
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e544
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e55b:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $ed
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e566:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $7f
|
|
|
|
|
call Function17e571
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e571:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd23]
|
|
|
|
|
call AddNTimes
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wCreditsTimer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00: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
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e5af:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd2c]
|
|
|
|
|
and $2
|
|
|
|
|
ret z
|
|
|
|
|
ld a, [wcd43]
|
|
|
|
|
ld l, a
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld a, [wMobileInactivityTimerMinutes]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2015-07-22 19:57:02 +00:00
|
|
|
|
bccoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld bc, hFFEC
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld a, [wMobileInactivityTimerSeconds]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld a, [wMobileInactivityTimerFrames]
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd21]
|
|
|
|
|
ld h, a
|
|
|
|
|
add hl, de
|
|
|
|
|
push hl
|
|
|
|
|
pop de
|
|
|
|
|
ld a, [wcd43]
|
|
|
|
|
ld l, a
|
2016-05-08 18:11:24 +00:00
|
|
|
|
ld a, [wMobileInactivityTimerMinutes]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2015-07-22 19:57:02 +00:00
|
|
|
|
bccoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e600:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
.asm_17e600
|
|
|
|
|
push af
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, $7f
|
|
|
|
|
call ByteFill
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e600
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e613:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
dec a
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
dec a
|
2015-12-27 02:59:03 +00:00
|
|
|
|
dec a
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
dec a
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
dec a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17e689
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $6
|
|
|
|
|
.asm_17e685
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
|
|
|
|
jr nz, .asm_17e685
|
|
|
|
|
|
|
|
|
|
.asm_17e689
|
|
|
|
|
ld a, [wcd53]
|
|
|
|
|
add $7
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e691:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
|
|
|
|
ld hl, NULL
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
|
|
|
|
push af
|
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc de
|
2015-02-11 03:15:15 +00: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 19:57:02 +00:00
|
|
|
|
bccoord 0, 0
|
2015-02-11 03:15:15 +00: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
|
2018-01-23 22:39:09 +00:00
|
|
|
|
bccoord 0, 0, wAttrMap
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld [hl], a
|
|
|
|
|
pop hl
|
|
|
|
|
inc hl
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e6af
|
|
|
|
|
pop hl
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
pop af
|
|
|
|
|
dec a
|
|
|
|
|
jr nz, .asm_17e6ac
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17e6de:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc708]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld l, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, [wc709]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld h, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
decoord 0, 0, wAttrMap
|
2015-02-11 03:15:15 +00: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 20:37:12 +00:00
|
|
|
|
ld de, $14
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
dec b
|
|
|
|
|
jr nz, .asm_17e6ee
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
PokemonNewsGFX:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-07-17 21:08:04 +00:00
|
|
|
|
RunMobileScript::
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
inc de
|
2018-07-17 21:08:04 +00:00
|
|
|
|
.loop
|
|
|
|
|
call _RunMobileScript
|
|
|
|
|
jr c, .finished
|
|
|
|
|
jr .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-07-17 21:08:04 +00:00
|
|
|
|
.finished
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-07-17 21:08:04 +00:00
|
|
|
|
_RunMobileScript:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [de]
|
|
|
|
|
inc de
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2016-05-14 20:37:12 +00:00
|
|
|
|
jr z, .finished
|
2018-07-17 21:08:04 +00:00
|
|
|
|
cp $10 ; jumptable size
|
2016-05-14 20:37:12 +00:00
|
|
|
|
jr nc, .finished
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dec a
|
|
|
|
|
push de
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld hl, .Jumptable
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld h, [hl]
|
|
|
|
|
ld l, a
|
2017-06-17 23:14:55 +00:00
|
|
|
|
jp hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2016-05-14 20:37:12 +00:00
|
|
|
|
.finished
|
2015-02-11 03:15:15 +00:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.Jumptable:
|
2016-05-14 20:37:12 +00:00
|
|
|
|
dw Function17f081 ; 0
|
|
|
|
|
dw Function17f0f8 ; 1
|
|
|
|
|
dw Function17f154 ; 2
|
|
|
|
|
dw Function17f181 ; 3
|
|
|
|
|
dw Function17f1d0 ; 4
|
|
|
|
|
dw Function17f220 ; 5
|
|
|
|
|
dw Function17f27b ; 6
|
|
|
|
|
dw Function17f2cb ; 7
|
|
|
|
|
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-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f081:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f09f
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, 4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f09d
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f09d
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f09f
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, 7
|
2015-02-11 03:15:15 +00: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 19:06:03 +00:00
|
|
|
|
call MobilePrintNum
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd59]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f0ee
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
inc a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
dec de
|
|
|
|
|
.asm_17f0e0
|
|
|
|
|
ld a, c
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f0ea
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
ld [hld], a
|
|
|
|
|
dec b
|
|
|
|
|
jr .asm_17f0e0
|
|
|
|
|
|
|
|
|
|
.asm_17f0ea
|
|
|
|
|
ld a, [wcd5a]
|
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
|
|
.asm_17f0ee
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f0f8:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f114
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $3
|
2015-02-11 03:15:15 +00: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]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f112
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f112
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f114
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $4
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld d, a
|
|
|
|
|
add hl, de
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld a, "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld [de], a
|
|
|
|
|
pop hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f154:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f167
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld a, [de]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f165
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f165
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f167
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
|
|
|
|
pop de
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function11c08f
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, l
|
|
|
|
|
ld b, h
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f181:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f19d
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $2
|
2015-02-11 03:15:15 +00: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]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f19b
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f19b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f19d
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld c, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function48c63
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f1d0:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f1ec
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $2
|
2015-02-11 03:15:15 +00: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]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f1ea
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f1ea
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f1ec
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-28 23:27:34 +00:00
|
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetPokemonName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f220:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f23c
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $2
|
2015-02-11 03:15:15 +00: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]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f23a
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f23a
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f23c
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
ld hl, .Genders
|
|
|
|
|
add hl, de
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld d, a
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.Genders: dw .Boy, .Girl
|
|
|
|
|
.Boy: db "Boy@"
|
|
|
|
|
.Girl: db "Girl@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f27b:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f297
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $2
|
2015-02-11 03:15:15 +00: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]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f295
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f295
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f297
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
call Function17f4f6
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-07-28 23:27:34 +00:00
|
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetItemName
|
|
|
|
|
pop hl
|
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f2cb:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
inc a
|
|
|
|
|
ld [wcd56], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
push hl
|
|
|
|
|
ld de, wcd56
|
|
|
|
|
ld b, $1
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
ld c, a
|
2015-11-05 19:06:03 +00:00
|
|
|
|
call MobilePrintNum
|
2015-02-11 03:15:15 +00: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
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f2ff:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld hl, wPlayerName
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $6
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f334:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
and $f
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17f355
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld a, BANK(sCrystalData)
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld a, [sCrystalData + 2]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17f35d
|
|
|
|
|
|
|
|
|
|
.asm_17f355
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld a, [$b2f3]
|
|
|
|
|
|
|
|
|
|
.asm_17f35d
|
|
|
|
|
ld c, a
|
|
|
|
|
call CloseSRAM
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function48c63
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PlaceString
|
|
|
|
|
ld a, c
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, b
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f382:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [wcd55], a
|
|
|
|
|
and $f
|
|
|
|
|
ld [wcd54], a
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
bit 7, a
|
|
|
|
|
jr nz, .asm_17f3a3
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld a, BANK(sCrystalData)
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
2015-08-25 23:40:34 +00:00
|
|
|
|
ld de, sCrystalData + 3
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17f3ab
|
|
|
|
|
|
|
|
|
|
.asm_17f3a3
|
|
|
|
|
ld a, $5
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
ld de, $b2f4
|
|
|
|
|
|
|
|
|
|
.asm_17f3ab
|
2015-10-11 16:15:03 +00:00
|
|
|
|
ld a, PRINTNUM_LEADINGZEROS | 2
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, a
|
2015-10-11 16:15:03 +00:00
|
|
|
|
ld a, 3
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
call PrintNum
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f3c9:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push bc
|
|
|
|
|
ld hl, wcd36
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc708
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, 12
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop de
|
|
|
|
|
ld c, $0
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall Function11c075
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld hl, wc708
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, wcd36
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $c
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f3f0:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
push af
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
|
|
|
|
ld a, [de]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
add hl, bc
|
2015-12-27 02:59:03 +00:00
|
|
|
|
add hl, bc
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld d, a
|
2018-01-01 14:08:21 +00:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00:00
|
|
|
|
inc hl
|
2016-05-10 16:31:49 +00:00
|
|
|
|
inc hl
|
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f41d:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
push hl
|
|
|
|
|
push af
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld bc, -wTileMap + $10000
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld de, -SCREEN_WIDTH
|
|
|
|
|
ld c, $1
|
|
|
|
|
.asm_17f42c
|
|
|
|
|
ld a, h
|
|
|
|
|
and a
|
|
|
|
|
jr nz, .asm_17f435
|
|
|
|
|
ld a, l
|
|
|
|
|
cp SCREEN_WIDTH
|
|
|
|
|
jr c, .asm_17f439
|
|
|
|
|
|
|
|
|
|
.asm_17f435
|
|
|
|
|
add hl, de
|
|
|
|
|
inc c
|
|
|
|
|
jr .asm_17f42c
|
|
|
|
|
|
|
|
|
|
.asm_17f439
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, SCREEN_WIDTH
|
|
|
|
|
ld a, c
|
|
|
|
|
.asm_17f440
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f447
|
|
|
|
|
add hl, de
|
|
|
|
|
dec a
|
|
|
|
|
jr .asm_17f440
|
|
|
|
|
|
|
|
|
|
.asm_17f447
|
|
|
|
|
pop af
|
|
|
|
|
ld e, a
|
|
|
|
|
ld d, 0
|
|
|
|
|
add hl, de
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f44f:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
call Function17f524
|
|
|
|
|
jr c, .asm_17f46d
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld de, $5
|
2015-02-11 03:15:15 +00:00
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hli]
|
|
|
|
|
inc hl
|
2015-12-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
ld l, c
|
|
|
|
|
ld h, b
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, 0
|
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [de]
|
2018-07-17 21:17:18 +00:00
|
|
|
|
cp "@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr z, .asm_17f46b
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f46b
|
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f46d
|
|
|
|
|
push bc
|
|
|
|
|
ld de, wcd54
|
2016-05-14 20:37:12 +00:00
|
|
|
|
ld bc, $8
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop bc
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17f488
|
|
|
|
|
ld a, [wcd54]
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17f48e
|
|
|
|
|
|
|
|
|
|
.asm_17f488
|
|
|
|
|
ld a, [wcd54]
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17f48e
|
|
|
|
|
ld a, [wcd55]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
ld h, a
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld c, a
|
|
|
|
|
ld b, $0
|
|
|
|
|
call CopyBytes
|
|
|
|
|
ld a, [wcd56]
|
|
|
|
|
cp $c0
|
|
|
|
|
jr c, .asm_17f4af
|
|
|
|
|
ld a, $4
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
jr .asm_17f4b7
|
|
|
|
|
|
|
|
|
|
.asm_17f4af
|
|
|
|
|
call CloseSRAM
|
|
|
|
|
ld a, $6
|
|
|
|
|
call GetSRAMBank
|
|
|
|
|
|
|
|
|
|
.asm_17f4b7
|
2018-07-17 21:17:18 +00:00
|
|
|
|
ld de, wc608
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop hl
|
|
|
|
|
push hl
|
|
|
|
|
ld a, [wcd57]
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
ld c, a
|
2015-11-05 19:06:03 +00:00
|
|
|
|
call MobilePrintNum
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, l
|
|
|
|
|
ld [wcd52], a
|
|
|
|
|
ld a, h
|
|
|
|
|
ld [wcd53], a
|
|
|
|
|
ld a, [wcd5a]
|
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_17f4ec
|
|
|
|
|
ld c, a
|
|
|
|
|
ld a, [wcd58]
|
|
|
|
|
inc a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld e, l
|
|
|
|
|
ld d, h
|
|
|
|
|
dec de
|
|
|
|
|
.asm_17f4de
|
|
|
|
|
ld a, c
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f4e8
|
|
|
|
|
ld a, [de]
|
|
|
|
|
dec de
|
|
|
|
|
ld [hld], a
|
|
|
|
|
dec b
|
|
|
|
|
jr .asm_17f4de
|
|
|
|
|
|
|
|
|
|
.asm_17f4e8
|
|
|
|
|
ld a, [wcd5b]
|
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
|
|
.asm_17f4ec
|
|
|
|
|
pop hl
|
|
|
|
|
ld a, [wcd59]
|
|
|
|
|
call Function17f50f
|
|
|
|
|
pop de
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f4f6:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wcd6a]
|
|
|
|
|
ld l, a
|
|
|
|
|
ld a, [wcd6b]
|
|
|
|
|
ld h, a
|
|
|
|
|
ld a, [wcd47]
|
|
|
|
|
ld c, a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld a, [wBGMapPalBuffer]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
.asm_17f509
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
dec a
|
|
|
|
|
add hl, bc
|
|
|
|
|
jr .asm_17f509
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f50f:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f524:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push hl
|
|
|
|
|
push bc
|
|
|
|
|
push de
|
|
|
|
|
ld a, [wcd42]
|
|
|
|
|
dec a
|
|
|
|
|
ld b, a
|
|
|
|
|
ld a, [wcd2e]
|
|
|
|
|
cp b
|
|
|
|
|
jr z, .asm_17f53a
|
|
|
|
|
ld hl, wcd68
|
|
|
|
|
cp [hl]
|
|
|
|
|
.asm_17f536
|
|
|
|
|
pop de
|
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.asm_17f53a
|
|
|
|
|
scf
|
|
|
|
|
jr .asm_17f536
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
BattleTowerMobileError:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call FadeToMenu
|
|
|
|
|
xor a
|
|
|
|
|
ld [wc303], a
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
push af
|
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-12-28 22:09:53 +00:00
|
|
|
|
|
2017-11-26 10:35:13 +00:00
|
|
|
|
call DisplayMobileError
|
2015-12-28 22:09:53 +00:00
|
|
|
|
|
2015-02-11 03:15:15 +00:00
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh [rSVBK], a
|
2015-11-17 22:56:49 +00:00
|
|
|
|
call ExitAllMenus
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
DisplayMobileError:
|
2015-12-28 22:09:53 +00:00
|
|
|
|
.loop
|
2015-10-17 16:58:26 +00:00
|
|
|
|
call JoyTextDelay
|
2015-12-28 22:09:53 +00:00
|
|
|
|
call .RunJumptable
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wc303]
|
|
|
|
|
bit 7, a
|
2015-12-28 22:09:53 +00:00
|
|
|
|
jr nz, .quit
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall HDMATransferAttrMapAndTileMapToWRAMBank3
|
2015-12-28 22:09:53 +00:00
|
|
|
|
jr .loop
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2015-12-28 22:09:53 +00:00
|
|
|
|
.quit
|
|
|
|
|
call .deinit
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2015-12-28 22:09:53 +00:00
|
|
|
|
.deinit
|
2015-02-11 03:15:15 +00: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 18:50:54 +00:00
|
|
|
|
ld a, BANK(sMobileLoginPassword)
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call GetSRAMBank
|
|
|
|
|
xor a
|
2015-12-26 16:31:56 +00:00
|
|
|
|
ld [sMobileLoginPassword], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call CloseSRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.RunJumptable:
|
2015-12-28 22:09:53 +00:00
|
|
|
|
jumptable .Jumptable, wc303
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.Jumptable:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
dw Function17f5c3
|
|
|
|
|
dw Function17ff23
|
|
|
|
|
dw Function17f5d2
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f5c3:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17f5e4
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall FinishExitMenu
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f5d2:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call Function17f5e4
|
2017-12-24 17:47:30 +00:00
|
|
|
|
farcall HDMATransferAttrMapAndTileMapToWRAMBank3
|
2015-09-09 23:27:07 +00:00
|
|
|
|
call SetPalettes
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wc303], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f5e4:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, $8
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFade], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld de, MUSIC_NONE
|
|
|
|
|
ld a, e
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, d
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, " "
|
2015-07-22 19:57:02 +00:00
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call ByteFill
|
|
|
|
|
ld a, $6
|
2018-01-23 22:39:09 +00:00
|
|
|
|
hlcoord 0, 0, wAttrMap
|
2015-07-22 19:57:02 +00:00
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
inc hl
|
2015-02-11 03:15:15 +00: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-27 02:59:03 +00:00
|
|
|
|
add hl, de
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld e, a
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld d, a
|
|
|
|
|
hlcoord 2, 6
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Table_17f699:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Palette_17f6af:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
RGB 5, 5, 16
|
|
|
|
|
RGB 8, 19, 28
|
|
|
|
|
RGB 0, 0, 0
|
|
|
|
|
RGB 31, 31, 31
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17f6b7:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wc300]
|
2015-12-28 22:09:53 +00:00
|
|
|
|
call .bcd_two_digits
|
2015-02-11 03:15:15 +00:00
|
|
|
|
inc hl
|
|
|
|
|
ld a, [wc302]
|
|
|
|
|
and $f
|
2015-12-28 22:09:53 +00:00
|
|
|
|
call .bcd_digit
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wc301]
|
2015-12-28 22:09:53 +00:00
|
|
|
|
call .bcd_two_digits
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.bcd_two_digits
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld c, a
|
|
|
|
|
and $f0
|
|
|
|
|
swap a
|
2015-12-28 22:09:53 +00:00
|
|
|
|
call .bcd_digit
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, c
|
|
|
|
|
and $f
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
.bcd_digit
|
2015-12-28 22:09:53 +00:00
|
|
|
|
add "0"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld [hli], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f6dc:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "つうしんエラー ー@"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f6e8:
|
2018-01-19 01:40:32 +00:00
|
|
|
|
db "みていぎ<NO>エラーです"
|
|
|
|
|
next "プログラム<WO>"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "かくにん してください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f891:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "モバイルアダプタが ただしく"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "さしこまれていません"
|
|
|
|
|
next "とりあつかいせつめいしょを"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "ごらんのうえ しっかりと"
|
|
|
|
|
next "さしこんで ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f8d1:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "でんわが うまく かけられないか"
|
|
|
|
|
next "でんわかいせんが こんでいるので"
|
|
|
|
|
next "つうしん できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f913:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "でんわかいせんが こんでいるため"
|
|
|
|
|
next "でんわが かけられません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f946:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "モバイルアダプタの エラーです"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f98e:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "つうしんエラーです"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17f9d0:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "ログインパスワードか"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "ログイン アイディーに"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "まちがいがあります"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "パスワードを かくにんして"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fa14:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "でんわが きれました"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "とりあつかいせつめいしょを"
|
|
|
|
|
next "ごらんのうえ"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fa49:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "モバイルセンターの"
|
|
|
|
|
next "つうしんエラーです"
|
|
|
|
|
next "しばらくまって"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fa71:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "モバイルアダプタに"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "とうろくされた じょうほうが"
|
|
|
|
|
next "ただしく ありません"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "モバイルトレーナーで"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "しょきとうろくを してください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fab0:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "モバイルセンターが"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "こんでいて つながりません"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "しばらくまって"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17faf9:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "あてさき メールアドレスに"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "まちがいがあります"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "ただしい メールアドレスを"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "いれなおしてください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fb2a:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "メールアドレスに"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "まちがいが あります"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "とりあつかいせつめいしょを"
|
|
|
|
|
next "ごらんのうえ"
|
|
|
|
|
next "モバイルトレーナーで"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "しょきとうろくを してください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fb6e:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "ログインパスワードに"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "まちがいが あるか"
|
|
|
|
|
next "モバイルセンターの エラーです"
|
|
|
|
|
next "パスワードを かくにんして"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fbb6:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "データの よみこみが できません"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "しばらくまって"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fbfe:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "じかんぎれです"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "でんわが きれました"
|
|
|
|
|
next "でんわを かけなおしてください"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fc3e:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "ごりよう りょうきんの "
|
|
|
|
|
next "おしはらいが おくれたばあいには"
|
|
|
|
|
next "ごりようが できなくなります"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fc88:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "おきゃくさまの ごつごうにより"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "ごりようできません"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fcbf:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "でんわかいせんが こんでいるか"
|
|
|
|
|
next "モバイルセンターの エラーで"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fcff:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "ごりよう りょうきんが"
|
|
|
|
|
next "じょうげんを こえているため"
|
|
|
|
|
next "こんげつは ごりようできません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fd47:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "げんざい モバイルセンターの"
|
|
|
|
|
next "てんけんを しているので"
|
|
|
|
|
next "つうしんが できません"
|
|
|
|
|
next "しばらく まって"
|
|
|
|
|
next "かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fd84:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "データの よみこみが できません"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fdb2:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "3ぷん いじょう なにも"
|
|
|
|
|
next "にゅうりょく しなかったので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fdd9:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "つうしんが うまく"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "できませんでした"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "もういちど はじめから"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "やりなおしてください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fe03:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "データの よみこみが できません"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "しばらくまって"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "かけなおして ください"
|
|
|
|
|
next "なおらない ときは"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "モバイルサポートセンターへ"
|
|
|
|
|
next "おといあわせください"
|
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fe4b:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "まちじかんが ながいので"
|
|
|
|
|
next "でんわが きれました"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fe63:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "あいての モバイルアダプタと"
|
|
|
|
|
next "タイプが ちがいます"
|
|
|
|
|
next "くわしくは とりあつかい"
|
|
|
|
|
next "せつめいしょを ごらんください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-25 01:39:23 +00:00
|
|
|
|
String_17fe9a: ; unused
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "ポケモンニュースが"
|
|
|
|
|
next "あたらしくなっているので"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "レポートを おくれません"
|
|
|
|
|
next "あたらしい ポケモンニュースの"
|
|
|
|
|
next "よみこみを さきに してください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17fedf:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "つうしんの じょうきょうが"
|
|
|
|
|
next "よくないか かけるあいてが"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
next "まちがっています"
|
2018-01-20 02:49:16 +00:00
|
|
|
|
next "もういちど かくにんをして"
|
|
|
|
|
next "でんわを かけなおして ください"
|
2015-02-11 03:15:15 +00:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17ff23:
|
2018-08-25 18:28:22 +00:00
|
|
|
|
ldh a, [hJoyPressed]
|
2015-02-11 03:15:15 +00:00
|
|
|
|
and a
|
|
|
|
|
ret z
|
|
|
|
|
ld a, $8
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFade], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld a, [wMapMusic]
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
xor a
|
2018-01-23 22:39:09 +00:00
|
|
|
|
ld [wMusicFadeID + 1], a
|
2015-02-11 03:15:15 +00:00
|
|
|
|
ld hl, wc303
|
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
Function17ff3c:
|
2015-02-11 03:15:15 +00:00
|
|
|
|
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 21:03:04 +00:00
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
2015-02-11 03:15:15 +00:00
|
|
|
|
call PrintNum
|
|
|
|
|
pop af
|
|
|
|
|
ld [wc300], a
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
|
String_17ff68:
|
2018-01-20 02:49:16 +00:00
|
|
|
|
db "101@"
|