pokecrystal/mobile/mobile_5c.asm

946 lines
14 KiB
NASM
Raw Normal View History

2015-11-04 12:35:41 +00:00
Function170000: ; 170000
ld a, [$c62b]
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonSpecies], a
2015-11-04 12:35:41 +00:00
ld hl, $c62e
2016-01-12 17:46:18 +00:00
ld de, wPlayerTrademonSenderName
2015-11-04 12:35:41 +00:00
ld bc, $0005
call CopyBytes
ld a, $50
ld [de], a
ld hl, $c663
2016-01-12 17:46:18 +00:00
ld de, wPlayerTrademonOTName
2015-11-04 12:35:41 +00:00
ld bc, $0005
call CopyBytes
ld a, $50
ld [de], a
ld hl, $c648
ld a, [hli]
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonDVs], a
2015-11-04 12:35:41 +00:00
ld a, [hl]
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonDVs + 1], a
2015-11-04 12:35:41 +00:00
ld hl, $c639
ld a, [hli]
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonID], a
2015-11-04 12:35:41 +00:00
ld a, [hl]
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonID + 1], a
2015-11-04 12:35:41 +00:00
ld bc, $c633
2017-12-24 17:47:30 +00:00
farcall GetCaughtGender
2015-11-04 12:35:41 +00:00
ld a, c
2016-01-12 17:46:18 +00:00
ld [wPlayerTrademonCaughtData], a
2015-11-04 12:35:41 +00:00
ld a, [wcd81]
ld [wc74e], a
ld hl, $c608
ld de, $d800
ld bc, $008f
call CopyBytes
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 17005a
Function17005a: ; 17005a
ld a, $5
call GetSRAMBank
ld a, [$a824]
2016-01-12 17:46:18 +00:00
ld [wOTTrademonSpecies], a
2015-11-04 12:35:41 +00:00
ld hl, $a827
2016-01-12 17:46:18 +00:00
ld de, wOTTrademonSenderName
2017-12-21 16:56:33 +00:00
ld bc, NAME_LENGTH_JAPANESE - 1
2015-11-04 12:35:41 +00:00
call CopyBytes
2016-01-12 17:46:18 +00:00
ld a, "@"
2015-11-04 12:35:41 +00:00
ld [de], a
ld hl, $a85c
2016-01-12 17:46:18 +00:00
ld de, wOTTrademonOTName
2017-12-21 16:56:33 +00:00
ld bc, NAME_LENGTH_JAPANESE - 1
2015-11-04 12:35:41 +00:00
call CopyBytes
2016-01-12 17:46:18 +00:00
ld a, "@"
2015-11-04 12:35:41 +00:00
ld [de], a
ld hl, $a841
ld a, [hli]
2016-01-12 17:46:18 +00:00
ld [wOTTrademonDVs], a
2015-11-04 12:35:41 +00:00
ld a, [hl]
2016-01-12 17:46:18 +00:00
ld [wOTTrademonDVs + 1], a
2015-11-04 12:35:41 +00:00
ld hl, $a832
ld a, [hli]
2016-01-12 17:46:18 +00:00
ld [wOTTrademonID], a
2015-11-04 12:35:41 +00:00
ld a, [hl]
2016-01-12 17:46:18 +00:00
ld [wOTTrademonID + 1], a
2015-11-04 12:35:41 +00:00
ld bc, $a82c
2017-12-24 17:47:30 +00:00
farcall GetCaughtGender
2015-11-04 12:35:41 +00:00
ld a, c
2016-01-12 17:46:18 +00:00
ld [wOTTrademonCaughtData], a
2015-11-04 12:35:41 +00:00
ld a, [wcd81]
ld [wc74e], a
call CloseSRAM
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 1700b0
INCLUDE "engine/events/battle_tower/battle_tower.asm"
2015-11-04 12:35:41 +00:00
Function170be4: ; 170be4
ld a, $5
call GetSRAMBank
xor a
ld hl, $a894
ld bc, $0008
call ByteFill
call CloseSRAM
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170bf7
2015-11-07 19:38:52 +00:00
Clears5_a89a: ; 170bf7
2015-11-04 12:35:41 +00:00
ld a, $5
call GetSRAMBank
ld hl, $a89a
xor a
ld [hli], a
ld [hl], a
call CloseSRAM
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170c06
Function170c06: ; 170c06
ld a, $5
call GetSRAMBank
ld hl, $a894
ld a, [wBattleResult]
and a
jr nz, .asm_170c15
inc [hl]
.asm_170c15
inc hl
inc hl
2015-11-04 12:35:41 +00:00
ld a, [$a89b]
add [hl]
ld [hld], a
ld a, [$a89a]
adc [hl]
ld [hli], a
jr nc, .asm_170c27
ld a, $ff
ld [hld], a
ld [hli], a
.asm_170c27
inc hl
push hl
ld de, 0
xor a
ld [wd265], a
.asm_170c30
ld hl, PartyMon1HP
ld a, [wd265]
call GetPartyLocation
ld a, [hli]
ld b, a
ld c, [hl]
inc hl
inc hl
2015-11-04 12:35:41 +00:00
ld a, [hld]
sub c
ld c, a
ld a, [hl]
sbc b
ld b, a
push de
pop hl
add hl, bc
push hl
pop de
jr c, .asm_170c58
ld a, [wd265]
inc a
ld [wd265], a
cp $3
jr c, .asm_170c30
jr .asm_170c5b
.asm_170c58
ld de, -1
.asm_170c5b
pop hl
inc hl
ld a, e
add [hl]
ld [hld], a
ld a, d
adc [hl]
ld [hli], a
jr nc, .asm_170c69
ld a, $ff
ld [hld], a
ld [hli], a
.asm_170c69
inc hl
push hl
ld b, $0
ld c, $0
.asm_170c6f
ld hl, PartyMon1HP
ld a, b
push bc
call GetPartyLocation
pop bc
ld a, [hli]
or [hl]
jr nz, .asm_170c7d
inc c
.asm_170c7d
inc b
ld a, b
cp $3
jr c, .asm_170c6f
pop hl
ld a, [hl]
add c
ld [hl], a
call CloseSRAM
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170c8b
Function170c8b: ; 170c8b
ld hl, LastEnemyCounterMove
2015-11-04 12:35:41 +00:00
ld b, $5
.asm_170c90
ld a, [hl]
xor $ff
ld [hli], a
dec b
jr nz, .asm_170c90
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170c98
2015-11-07 19:38:52 +00:00
CheckBTMonMovesForErrors: ; 170c98
2018-01-20 17:25:55 +00:00
ld c, BATTLETOWER_PARTY_LENGTH
2015-11-07 19:38:52 +00:00
ld hl, wBT_OTTempPkmn1Moves
.loop
2015-11-04 12:35:41 +00:00
push hl
ld a, [hl]
2015-11-07 19:38:52 +00:00
cp NUM_ATTACKS + 1
jr c, .okay
ld a, POUND
2015-11-04 12:35:41 +00:00
ld [hl], a
2015-11-07 19:38:52 +00:00
.okay
2015-11-04 12:35:41 +00:00
inc hl
2015-11-07 19:38:52 +00:00
ld b, NUM_MOVES - 1
.loop2
2015-11-04 12:35:41 +00:00
ld a, [hl]
and a
2015-11-07 19:38:52 +00:00
jr z, .loop3
cp NUM_ATTACKS + 1
jr c, .next
2015-11-04 12:35:41 +00:00
2015-11-07 19:38:52 +00:00
.loop3
2015-11-04 12:35:41 +00:00
xor a
ld [hl], a
inc hl
dec b
2015-11-07 19:38:52 +00:00
jr nz, .loop3
jr .done
2015-11-04 12:35:41 +00:00
2015-11-07 19:38:52 +00:00
.next
2015-11-04 12:35:41 +00:00
inc hl
dec b
2015-11-07 19:38:52 +00:00
jr nz, .loop2
2015-11-04 12:35:41 +00:00
2015-11-07 19:38:52 +00:00
.done
2015-11-04 12:35:41 +00:00
pop hl
2018-01-20 17:25:55 +00:00
ld de, PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH
2015-11-04 12:35:41 +00:00
add hl, de
dec c
2015-11-07 19:38:52 +00:00
jr nz, .loop
2015-11-04 12:35:41 +00:00
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170cc6
Function170cc6: ; 170cc6
ld a, [rSVBK]
push af
2018-01-22 01:10:38 +00:00
ld a, BANK(wDecompressScratch)
2015-11-04 12:35:41 +00:00
ld [rSVBK], a
2018-01-22 01:10:38 +00:00
ld hl, PichuAnimatedMobileGFX
ld de, wDecompressScratch
2015-11-04 12:35:41 +00:00
call Decompress
2018-01-22 01:10:38 +00:00
ld a, 1
2015-11-04 12:35:41 +00:00
ld [rVBK], a
2018-01-22 01:10:38 +00:00
ld de, wDecompressScratch
2017-12-28 12:32:33 +00:00
ld hl, vTiles0
2018-01-22 01:10:38 +00:00
lb bc, BANK(wDecompressScratch), 193
2015-11-04 12:35:41 +00:00
call Get2bpp
xor a
ld [rVBK], a
2018-01-22 01:10:38 +00:00
ld hl, ElectroBallMobileGFX
ld de, wDecompressScratch
2015-11-04 12:35:41 +00:00
call Decompress
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2017-12-28 12:32:33 +00:00
ld hl, vTiles0
2018-01-22 01:10:38 +00:00
lb bc, BANK(wDecompressScratch), 83
2015-11-04 12:35:41 +00:00
call Get2bpp
pop af
ld [rSVBK], a
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170d02
Function170d02: ; 170d02
ld a, $1
ld [rVBK], a
ld de, GFX_171848
2017-12-28 12:32:33 +00:00
ld hl, vTiles1 tile $41
2018-01-15 00:43:35 +00:00
lb bc, BANK(GFX_171848), 24
2015-11-04 12:35:41 +00:00
call Get2bpp
xor a
ld [rVBK], a
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 170d16
2018-01-22 01:10:38 +00:00
PichuAnimatedMobileGFX:
INCBIN "gfx/mobile/pichu_animated.2bpp.lz"
2015-11-04 12:35:41 +00:00
2018-01-22 01:10:38 +00:00
ElectroBallMobileGFX:
INCBIN "gfx/mobile/electro_ball.2bpp.lz"
2015-11-04 12:35:41 +00:00
GFX_171848:
INCBIN "gfx/unknown/171848.2bpp"
Function1719c8: ; 1719c8 (5c:59c8)
ld a, [hInMenu]
push af
ld a, $1
ld [hInMenu], a
call Function1719d6
pop af
ld [hInMenu], a
ret
Function1719d6: ; 1719d6 (5c:59d6)
2017-12-24 17:47:30 +00:00
farcall BattleTowerRoomMenu_InitRAM
2015-11-04 12:35:41 +00:00
call Function1719ed
ld a, [rSVBK]
2015-11-04 12:35:41 +00:00
push af
ld a, $5
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
call Function171a11
pop af
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ret
Function1719ed: ; 1719ed (5c:59ed)
xor a
ld [wcd49], a
ld [wcd4a], a
dec a
ld [wcd4b], a
2015-11-12 04:38:57 +00:00
call ClearBGPalettes
2015-11-04 12:35:41 +00:00
call ClearSprites
2017-12-24 17:47:30 +00:00
farcall Function171d2b
farcall ReloadMapPart
farcall ClearSpriteAnims
2015-11-04 12:35:41 +00:00
ret
Function171a11: ; 171a11 (5c:5a11)
2015-12-08 21:06:13 +00:00
.loop
2015-11-04 12:35:41 +00:00
call JoyTextDelay
ld a, [wcd49]
bit 7, a
2015-12-08 21:06:13 +00:00
jr nz, .done
2015-11-04 12:35:41 +00:00
call Function171a36
2017-12-24 17:47:30 +00:00
farcall PlaySpriteAnimations
farcall ReloadMapPart
2015-12-08 21:06:13 +00:00
jr .loop
.done
2017-12-24 17:47:30 +00:00
farcall ClearSpriteAnims
2015-11-04 12:35:41 +00:00
call ClearSprites
ret
Function171a36: ; 171a36 (5c:5a36)
ld a, [wcd49]
ld e, a
ld d, 0
ld hl, Jumptable_171a45
add hl, de
add hl, de
2015-11-04 12:35:41 +00:00
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
2015-11-04 12:35:41 +00:00
Jumptable_171a45: ; 171a45 (5c:5a45)
dw Function171a95
dw Function171ac9
dw Function171a5d
dw Function171ad7
dw Function171a5d
dw Function171aec
dw Function171b4b
dw Function171b85
dw Function171bcc
dw Function171c2c
dw Function171c39
dw Function171c41
Function171a5d: ; 171a5d (5c:5a5d)
ld a, [wc821]
bit 1, a
jr nz, .asm_171a6a
bit 0, a
ret nz
jp Function171c66
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
.asm_171a6a
ld a, $0
call Function3e32
ld [wc300], a
ld a, l
ld [wc301], a
ld a, h
ld [wc302], a
ld a, $a
call Function3e32
ld a, [rSVBK]
2015-11-04 12:35:41 +00:00
push af
ld a, $1
ld [rSVBK], a
2017-12-24 17:47:30 +00:00
farcall BattleTowerRoomMenu_Cleanup
2015-11-04 12:35:41 +00:00
pop af
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ld a, $a
ld [wcd49], a
ret
Function171a95: ; 171a95 (5c:5a95)
2017-12-24 17:47:30 +00:00
farcall Function171ccd
2015-11-04 12:35:41 +00:00
hlcoord 2, 8
ld de, String_171aa7
call PlaceString
jp Function171c66
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 171aa7 (5c:5aa7)
String_171aa7: ; 171aa7
db "モバイルアダプタに"
next "せつぞく しています"
next "しばらく おまちください"
2015-11-04 12:35:41 +00:00
db "@"
; 171ac9
Function171ac9: ; 171ac9 (5c:5ac9)
ld de, wcd81
ld hl, $5c
ld a, $2
call Function3e32
jp Function171c66
Function171ad7: ; 171ad7 (5c:5ad7)
xor a
ld hl, $c608
ld bc, $66
call ByteFill
ld de, $c608
ld a, $c
call Function3e32
jp Function171c66
Function171aec: ; 171aec (5c:5aec)
ld a, [rSVBK]
2015-11-04 12:35:41 +00:00
push af
ld a, $1
ld [rSVBK], a
2017-12-24 17:47:30 +00:00
farcall BattleTowerRoomMenu_Cleanup
2015-11-04 12:35:41 +00:00
pop af
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
hlcoord 2, 6
ld a, $8
.asm_171b01
push af
push hl
xor a
ld bc, $10
call ByteFill
pop hl
ld de, $14
add hl, de
pop af
dec a
jr nz, .asm_171b01
hlcoord 2, 7
ld a, $3
ld de, $c608
.asm_171b1b
push af
push hl
ld a, [de]
and a
jr z, .asm_171b34
ld a, [wcd4b]
inc a
ld [wcd4b], a
push hl
call Function171b42
pop hl
ld bc, $ffec
add hl, bc
call Function171b42
.asm_171b34
pop hl
ld bc, $14
add hl, bc
add hl, bc
add hl, bc
2015-11-04 12:35:41 +00:00
pop af
dec a
jr nz, .asm_171b1b
jp Function171c66
Function171b42: ; 171b42 (5c:5b42)
ld a, [de]
inc de
and a
ret z
sub $20
ld [hli], a
jr Function171b42
Function171b4b: ; 171b4b (5c:5b4b)
2015-11-18 18:01:55 +00:00
depixel 8, 2
2018-01-02 17:25:13 +00:00
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
2015-11-13 15:48:49 +00:00
call _InitSpriteAnimStruct
2016-05-14 05:11:01 +00:00
ld hl, SPRITEANIMSTRUCT_0C
2015-11-04 12:35:41 +00:00
add hl, bc
ld a, $8
ld [hl], a
2016-05-14 05:11:01 +00:00
2015-11-18 18:01:55 +00:00
depixel 8, 19
2018-01-02 17:25:13 +00:00
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
2015-11-13 15:48:49 +00:00
call _InitSpriteAnimStruct
2016-05-14 05:11:01 +00:00
ld hl, SPRITEANIMSTRUCT_0C
2015-11-04 12:35:41 +00:00
add hl, bc
ld a, $9
ld [hl], a
2016-05-14 05:11:01 +00:00
2015-11-18 18:01:55 +00:00
depixel 17, 14, 2, 0
2018-01-02 17:25:13 +00:00
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
2015-11-13 15:48:49 +00:00
call _InitSpriteAnimStruct
2016-05-14 05:11:01 +00:00
ld hl, SPRITEANIMSTRUCT_0C
2015-11-04 12:35:41 +00:00
add hl, bc
ld a, $a
ld [hl], a
2016-05-14 05:11:01 +00:00
2015-11-04 12:35:41 +00:00
ld a, $4
ld [wcd23], a
ld a, $8
ld [wcd24], a
jp Function171c66
Function171b85: ; 171b85 (5c:5b85)
ld hl, hJoyPressed ; $ffa7
ld a, [hl]
and $2
jp nz, Function171b9f
ld a, [hl]
and $1
jp nz, Function171bbd
ld a, [hl]
and $40
jr nz, asm_171ba5
ld a, [hl]
and $80
jr nz, asm_171baf
ret
Function171b9f: ; 171b9f (5c:5b9f)
ld a, $80
ld [wcd49], a
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
asm_171ba5: ; 171ba5 (5c:5ba5)
ld a, [wcd4a]
and a
ret z
dec a
ld [wcd4a], a
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
asm_171baf: ; 171baf (5c:5baf)
ld a, [wcd4b]
ld c, a
ld a, [wcd4a]
cp c
ret z
inc a
ld [wcd4a], a
ret
Function171bbd: ; 171bbd (5c:5bbd)
call PlayClickSFX
ld a, $8
ld [wcd23], a
xor a
ld [wcd24], a
jp Function171c66
Function171bcc: ; 171bcc (5c:5bcc)
ld hl, hJoyPressed ; $ffa7
ld a, [hl]
and $2
jp nz, Function171bdc
ld a, [hl]
and $1
jp nz, Function171beb
ret
Function171bdc: ; 171bdc (5c:5bdc)
ld a, $4
ld [wcd23], a
ld a, $8
ld [wcd24], a
ld hl, wcd49
dec [hl]
ret
Function171beb: ; 171beb (5c:5beb)
ld a, $5
call GetSRAMBank
ld a, [wcd4a]
ld [$aa4a], a
call CloseSRAM
ld hl, MenuDataHeader_171c6b
call LoadMenuDataHeader
2015-11-04 19:02:11 +00:00
call MenuBox
call MenuBoxCoord2Tile
2017-12-24 17:47:30 +00:00
farcall ReloadMapPart
2015-11-04 12:35:41 +00:00
hlcoord 1, 14
ld de, String_171c73
call PlaceString
ld a, [wcd4a]
cp $2
jr z, .asm_171c1f
ld a, $8
jr .asm_171c21
.asm_171c1f
ld a, $c
.asm_171c21
ld [wcd24], a
ld a, $1e
ld [wcd4c], a
call Function171c66
Function171c2c: ; 171c2c (5c:5c2c)
ld hl, wcd4c
dec [hl]
ret nz
call ExitMenu
2015-11-12 04:38:57 +00:00
call ClearBGPalettes
2015-11-04 12:35:41 +00:00
jr asm_171c60
Function171c39: ; 171c39 (5c:5c39)
ld a, $28
ld [wcd4c], a
call Function171c66
Function171c41: ; 171c41 (5c:5c41)
ld hl, wcd4c
dec [hl]
ret nz
2015-11-12 04:38:57 +00:00
call ClearBGPalettes
farcall Stubbed_Function106462
2017-12-24 17:47:30 +00:00
farcall Function106464
2015-11-04 12:35:41 +00:00
ld a, $2
ld [wc303], a
2017-12-24 17:47:30 +00:00
farcall DisplayMobileError
2015-11-04 12:35:41 +00:00
asm_171c60: ; 171c60 (5c:5c60)
ld a, $80
ld [wcd49], a
ret
Function171c66: ; 171c66 (5c:5c66)
ld hl, wcd49
inc [hl]
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 171c6b (5c:5c6b)
MenuDataHeader_171c6b: ; 171c6b
db MENU_BACKUP_TILES ; flags
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
2015-11-04 12:35:41 +00:00
dw NULL
db 0 ; default option
; 171c73
String_171c73: ; 171c73
db "モバイルセンターを けってい"
2015-11-04 12:35:41 +00:00
next "しました@"
; 171c87
Function171c87: ; 171c87 (5c:5c87)
call DisableLCD
ld hl, GFX_171db1
2017-12-28 12:32:33 +00:00
ld de, vTiles2 tile $00
2015-11-04 12:35:41 +00:00
ld bc, $6e0
call CopyBytes
ld hl, LZ_172abd
2017-12-28 12:32:33 +00:00
ld de, vTiles0 tile $00
2015-11-04 12:35:41 +00:00
call Decompress
call EnableLCD
ld hl, Tilemap_172491
decoord 0, 0
ld bc, $168
call CopyBytes
ld hl, Attrmap_1727ed
decoord 0, 0, AttrMap
ld bc, $168
call CopyBytes
hlcoord 3, 2
ld de, String_172e31
call PlaceString
hlcoord 3, 16
ld de, String_172e3f
call PlaceString
ret
Function171ccd: ; 171ccd (5c:5ccd)
ld a, [rSVBK]
2015-11-04 12:35:41 +00:00
push af
ld a, $5
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ld hl, Palette_171d71
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-01 13:47:16 +00:00
ld bc, 8 palettes
2015-11-04 12:35:41 +00:00
call CopyBytes
ld hl, EngineBuffer5
2015-11-04 12:35:41 +00:00
ld a, $ff
ld [hli], a
ld a, $7f
ld [hl], a
call SetPalettes
pop af
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ret
Function171cf0: ; 171cf0 (5c:5cf0)
xor a
hlcoord 4, 15
ld [hli], a
ld [hli], a
2015-11-04 12:35:41 +00:00
ld a, [wcd4b]
xor $1
ld [wcd4b], a
and a
jr nz, .asm_171d16
ld hl, Tilemap_17251d
decoord 0, 7
ld bc, $8c
call CopyBytes
hlcoord 3, 16
ld de, String_172e3f
jp PlaceString
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
.asm_171d16
ld hl, Tilemap_1725f9
decoord 0, 7
ld bc, $8c
call CopyBytes
hlcoord 3, 16
ld de, String_172e4e
jp PlaceString
Function171d2b: ; 171d2b (5c:5d2b)
call DisableLCD
ld hl, GFX_171db1
2017-12-28 12:32:33 +00:00
ld de, vTiles2 tile $00
2015-11-04 12:35:41 +00:00
ld bc, $6e0
call CopyBytes
ld hl, LZ_172abd
2017-12-28 12:32:33 +00:00
ld de, vTiles0 tile $00
2015-11-04 12:35:41 +00:00
call Decompress
call EnableLCD
ld hl, Tilemap_172685
decoord 0, 0
ld bc, $168
call CopyBytes
ld hl, Attrmap_172955
decoord 0, 0, AttrMap
ld bc, $168
call CopyBytes
hlcoord 2, 2
ld de, String_172e5d
call PlaceString
hlcoord 14, 16
ld de, String_172e58
call PlaceString
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 171d71 (5c:5d71)
Palette_171d71:
RGB 0, 0, 0
RGB 3, 0, 0
RGB 5, 0, 0
RGB 31, 31, 29
RGB 0, 2, 10
RGB 2, 10, 21
RGB 0, 0, 0
RGB 10, 26, 31
RGB 0, 0, 0
RGB 0, 7, 8
RGB 31, 8, 0
RGB 1, 17, 15
RGB 31, 16, 0
RGB 31, 22, 0
RGB 31, 27, 0
RGB 31, 31, 0
RGB 31, 18, 6
RGB 0, 3, 0
RGB 0, 9, 0
RGB 0, 12, 0
RGB 0, 16, 0
RGB 0, 22, 0
RGB 0, 25, 0
RGB 0, 27, 0
RGB 5, 5, 16
RGB 8, 19, 28
RGB 0, 0, 0
RGB 31, 31, 31
RGB 31, 31, 29
RGB 21, 21, 20
RGB 11, 11, 10
RGB 0, 0, 0
2017-12-11 23:04:23 +00:00
2015-11-04 12:35:41 +00:00
GFX_171db1:
INCBIN "gfx/mobile/ascii_font.2bpp"
2015-11-04 12:35:41 +00:00
Tilemap_172491:
INCBIN "gfx/unknown/172491.tilemap"
Tilemap_17251d:
INCBIN "gfx/unknown/17251d.tilemap"
Tilemap_1725f9:
INCBIN "gfx/unknown/1725f9.tilemap"
Tilemap_172685:
INCBIN "gfx/unknown/172685.tilemap"
Attrmap_1727ed:
INCBIN "gfx/unknown/1727ed.attrmap"
Attrmap_172955:
INCBIN "gfx/unknown/172955.attrmap"
2015-11-04 12:35:41 +00:00
LZ_172abd:
INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
String_172e31: ; 172e31
db "パスワード<WO>いれてください@"
2015-11-04 12:35:41 +00:00
String_172e3f: ; 172e3f
db "きりかえ やめる  けってい@"
2015-11-04 12:35:41 +00:00
String_172e4e: ; 172e4e
db "きりかえ やめる  "
2015-11-04 12:35:41 +00:00
String_172e58:
db "けってい@"
String_172e5d: ; 172e5d
db "せつぞくする モバイルセンターを"
next "えらんで ください@"
2015-11-04 12:35:41 +00:00
; 172e78
Function172e78: ; 172e78 (5c:6e78)
ld a, $7f
hlcoord 0, 0
ld bc, $168
call ByteFill
ld a, $7
hlcoord 0, 0, AttrMap
ld bc, $168
call ByteFill
call DisableLCD
ld hl, GameBoyN64GFX
2017-12-28 12:32:33 +00:00
ld de, vTiles2 tile $00
2015-11-04 12:35:41 +00:00
ld bc, $610
call CopyBytes
call EnableLCD
ld hl, Tilemap_1733af
decoord 0, 0
ld bc, $168
call CopyBytes
ld hl, Attrmap_173517
decoord 0, 0, AttrMap
ld bc, $168
call CopyBytes
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 172eb9 (5c:6eb9)
Function172eb9:
ld a, [rSVBK]
2015-11-04 12:35:41 +00:00
push af
ld a, $5
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ld hl, Palette_172edf
2018-01-01 14:08:21 +00:00
ld de, wBGPals1
2018-01-01 13:47:16 +00:00
ld bc, 8 palettes
2015-11-04 12:35:41 +00:00
call CopyBytes
ld hl, Palette_172edf
2018-01-01 14:08:21 +00:00
ld de, wBGPals2
2018-01-01 13:47:16 +00:00
ld bc, 8 palettes
2015-11-04 12:35:41 +00:00
call CopyBytes
call SetPalettes
pop af
ld [rSVBK], a
2015-11-04 12:35:41 +00:00
ret
2015-12-08 21:06:13 +00:00
2015-11-04 12:35:41 +00:00
; 172edf (5c:6edf)
Palette_172edf:
RGB 5, 12, 17
RGB 31, 31, 31
RGB 18, 25, 28
RGB 10, 17, 21
RGB 6, 13, 18
RGB 31, 31, 31
RGB 20, 26, 28
RGB 12, 19, 23
RGB 3, 10, 16
RGB 31, 31, 31
RGB 6, 13, 18
RGB 20, 26, 28
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 0, 0, 0
RGB 0, 0, 0
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 0, 0, 0
RGB 0, 0, 0
RGB 0, 0, 0
GameBoyN64GFX:
INCBIN "gfx/trade/game_boy_n64.2bpp"
2015-11-04 12:35:41 +00:00
Tilemap_1733af:
2018-01-09 22:26:40 +00:00
if DEF(_CRYSTAL11)
2015-11-04 12:35:41 +00:00
INCBIN "gfx/unknown/1733af_corrupt.tilemap"
else
2015-11-04 12:35:41 +00:00
INCBIN "gfx/unknown/1733af.tilemap"
endc
2015-11-04 12:35:41 +00:00
Attrmap_173517:
INCBIN "gfx/unknown/173517.attrmap"