2018-06-24 14:09:41 +00:00
|
|
|
Function170000:
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, [wOfferSpecies]
|
2016-01-12 17:46:18 +00:00
|
|
|
ld [wPlayerTrademonSpecies], a
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wOfferMonSender
|
2016-01-12 17:46:18 +00:00
|
|
|
ld de, wPlayerTrademonSenderName
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, "@"
|
2015-11-04 12:35:41 +00:00
|
|
|
ld [de], a
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wOfferMonOT
|
2016-01-12 17:46:18 +00:00
|
|
|
ld de, wPlayerTrademonOTName
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, "@"
|
2015-11-04 12:35:41 +00:00
|
|
|
ld [de], a
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wOfferMonDVs
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wOfferMonID
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, wOfferMon
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wc608
|
2015-11-04 12:35:41 +00:00
|
|
|
ld de, $d800
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, TRADE_CORNER_REQUEST_LENGTH
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function17005a:
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, BANK(sOfferMon)
|
2020-06-17 21:03:38 +00:00
|
|
|
call OpenSRAM
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, [sOfferSpecies]
|
2016-01-12 17:46:18 +00:00
|
|
|
ld [wOTTrademonSpecies], a
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, sOfferMonSender
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, sOfferMonOT
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, sOfferMonDVs
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, sOfferMonID
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, sOfferMon
|
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
|
|
|
|
2018-01-06 23:53:30 +00:00
|
|
|
INCLUDE "engine/events/battle_tower/battle_tower.asm"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function170be4:
|
2021-02-05 17:44:21 +00:00
|
|
|
ld a, BANK(s5_a894)
|
2020-06-17 21:03:38 +00:00
|
|
|
call OpenSRAM
|
2015-11-04 12:35:41 +00:00
|
|
|
xor a
|
2021-02-05 17:44:21 +00:00
|
|
|
ld hl, s5_a894
|
|
|
|
ld bc, 6 + 2
|
2015-11-04 12:35:41 +00:00
|
|
|
call ByteFill
|
|
|
|
call CloseSRAM
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Clears5_a89a:
|
2021-02-05 17:44:21 +00:00
|
|
|
ld a, BANK(s5_a89a)
|
2020-06-17 21:03:38 +00:00
|
|
|
call OpenSRAM
|
2021-02-05 17:44:21 +00:00
|
|
|
ld hl, s5_a89a
|
2015-11-04 12:35:41 +00:00
|
|
|
xor a
|
|
|
|
ld [hli], a
|
|
|
|
ld [hl], a
|
|
|
|
call CloseSRAM
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2020-10-26 19:45:57 +00:00
|
|
|
Function170c06: ; unreferenced
|
2021-02-05 17:44:21 +00:00
|
|
|
ld a, BANK(s5_a894)
|
2020-06-17 21:03:38 +00:00
|
|
|
call OpenSRAM
|
2021-02-05 17:44:21 +00:00
|
|
|
ld hl, s5_a894
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [wBattleResult]
|
2018-04-05 15:44:02 +00:00
|
|
|
and a ; WIN?
|
2015-11-04 12:35:41 +00:00
|
|
|
jr nz, .asm_170c15
|
|
|
|
inc [hl]
|
|
|
|
|
|
|
|
.asm_170c15
|
|
|
|
inc hl
|
2016-05-04 15:46:23 +00:00
|
|
|
inc hl
|
2021-02-05 17:44:21 +00:00
|
|
|
ld a, [s5_a89a + 1]
|
2015-11-04 12:35:41 +00:00
|
|
|
add [hl]
|
|
|
|
ld [hld], a
|
2021-02-05 17:44:21 +00:00
|
|
|
ld a, [s5_a89a]
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wTempByteValue], a
|
2015-11-04 12:35:41 +00:00
|
|
|
.asm_170c30
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMon1HP
|
2018-07-28 23:27:34 +00:00
|
|
|
ld a, [wTempByteValue]
|
2015-11-04 12:35:41 +00:00
|
|
|
call GetPartyLocation
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld c, [hl]
|
|
|
|
inc hl
|
2016-05-04 15:46:23 +00:00
|
|
|
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
|
2018-07-28 23:27:34 +00:00
|
|
|
ld a, [wTempByteValue]
|
2015-11-04 12:35:41 +00:00
|
|
|
inc a
|
2018-07-28 23:27:34 +00:00
|
|
|
ld [wTempByteValue], a
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wPartyMon1HP
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function170c8b:
|
2018-01-23 22:39:09 +00:00
|
|
|
ld hl, wLastEnemyCounterMove
|
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
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
CheckBTMonMovesForErrors:
|
2018-01-20 17:25:55 +00:00
|
|
|
ld c, BATTLETOWER_PARTY_LENGTH
|
2018-02-22 16:13:29 +00:00
|
|
|
ld hl, wBT_OTTempMon1Moves
|
2015-11-07 19:38:52 +00:00
|
|
|
.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
|
2019-01-03 00:04:50 +00:00
|
|
|
ld de, NICKNAMED_MON_STRUCT_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
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function170cc6:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
2018-01-22 01:10:38 +00:00
|
|
|
ld a, BANK(wDecompressScratch)
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2018-01-22 01:10:38 +00:00
|
|
|
ld hl, PichuAnimatedMobileGFX
|
2015-12-19 19:48:30 +00:00
|
|
|
ld de, wDecompressScratch
|
2015-11-04 12:35:41 +00:00
|
|
|
call Decompress
|
2018-01-22 01:10:38 +00:00
|
|
|
ld a, 1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [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
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [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
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function170d02:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rVBK], a
|
2020-02-27 19:33:30 +00:00
|
|
|
ld de, PichuBorderMobileGFX
|
2018-07-15 15:58:01 +00:00
|
|
|
ld hl, vTiles0 tile $c1
|
2020-02-27 19:33:30 +00:00
|
|
|
lb bc, BANK(PichuBorderMobileGFX), 24
|
2015-11-04 12:35:41 +00:00
|
|
|
call Get2bpp
|
|
|
|
xor a
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-01-22 01:10:38 +00:00
|
|
|
PichuAnimatedMobileGFX:
|
2017-12-15 22:50:45 +00:00
|
|
|
INCBIN "gfx/mobile/pichu_animated.2bpp.lz"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2018-01-22 01:10:38 +00:00
|
|
|
ElectroBallMobileGFX:
|
2017-12-15 22:50:45 +00:00
|
|
|
INCBIN "gfx/mobile/electro_ball.2bpp.lz"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
PichuBorderMobileGFX:
|
|
|
|
INCBIN "gfx/mobile/pichu_border.2bpp"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function1719c8:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [hInMenu]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hInMenu], a
|
2015-11-04 12:35:41 +00:00
|
|
|
call Function1719d6
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [hInMenu], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function1719d6:
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall BattleTowerRoomMenu_InitRAM
|
2015-11-04 12:35:41 +00:00
|
|
|
call Function1719ed
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
call Function171a11
|
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function1719ed:
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2024-01-07 11:38:00 +00:00
|
|
|
farcall HDMATransferTilemapAndAttrmap_Overworld
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall ClearSpriteAnims
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171a11:
|
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
|
2024-01-07 11:38:00 +00:00
|
|
|
farcall HDMATransferTilemapAndAttrmap_Overworld
|
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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171a36:
|
2020-07-01 17:13:49 +00:00
|
|
|
jumptable Jumptable_171a45, wcd49
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Jumptable_171a45:
|
2015-11-04 12:35:41 +00:00
|
|
|
dw Function171a95
|
|
|
|
dw Function171ac9
|
|
|
|
dw Function171a5d
|
|
|
|
dw Function171ad7
|
|
|
|
dw Function171a5d
|
|
|
|
dw Function171aec
|
|
|
|
dw Function171b4b
|
|
|
|
dw Function171b85
|
|
|
|
dw Function171bcc
|
|
|
|
dw Function171c2c
|
|
|
|
dw Function171c39
|
|
|
|
dw Function171c41
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171a5d:
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
2022-01-16 22:50:50 +00:00
|
|
|
ld a, MOBILEAPI_00
|
|
|
|
call MobileAPI
|
2019-08-22 12:41:17 +00:00
|
|
|
ld [wMobileErrorCodeBuffer], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, l
|
2019-08-22 12:41:17 +00:00
|
|
|
ld [wMobileErrorCodeBuffer + 1], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, h
|
2019-08-22 12:41:17 +00:00
|
|
|
ld [wMobileErrorCodeBuffer + 2], a
|
2022-01-16 22:50:50 +00:00
|
|
|
ld a, MOBILEAPI_05
|
|
|
|
call MobileAPI
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall BattleTowerRoomMenu_Cleanup
|
2015-11-04 12:35:41 +00:00
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $a
|
|
|
|
ld [wcd49], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171a95:
|
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
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
String_171aa7:
|
2015-11-04 12:35:41 +00:00
|
|
|
db "モバイルアダプタに"
|
2018-01-20 02:49:16 +00:00
|
|
|
next "せつぞく しています"
|
|
|
|
next "しばらく おまちください"
|
2015-11-04 12:35:41 +00:00
|
|
|
db "@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171ac9:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld de, wcd81
|
|
|
|
ld hl, $5c
|
2022-01-16 22:50:50 +00:00
|
|
|
ld a, MOBILEAPI_01
|
|
|
|
call MobileAPI
|
2015-11-04 12:35:41 +00:00
|
|
|
jp Function171c66
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171ad7:
|
2015-11-04 12:35:41 +00:00
|
|
|
xor a
|
2022-09-15 00:49:58 +00:00
|
|
|
ld hl, wc608
|
2015-11-04 12:35:41 +00:00
|
|
|
ld bc, $66
|
|
|
|
call ByteFill
|
2022-09-15 00:49:58 +00:00
|
|
|
ld de, wc608
|
2022-01-16 22:50:50 +00:00
|
|
|
ld a, MOBILEAPI_06
|
|
|
|
call MobileAPI
|
2015-11-04 12:35:41 +00:00
|
|
|
jp Function171c66
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171aec:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $1
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall BattleTowerRoomMenu_Cleanup
|
2015-11-04 12:35:41 +00:00
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [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
|
2022-09-15 00:49:58 +00:00
|
|
|
ld de, wc608
|
2015-11-04 12:35:41 +00:00
|
|
|
.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
|
2016-05-10 16:31:49 +00:00
|
|
|
add hl, bc
|
|
|
|
add hl, bc
|
2015-11-04 12:35:41 +00:00
|
|
|
pop af
|
|
|
|
dec a
|
|
|
|
jr nz, .asm_171b1b
|
|
|
|
jp Function171c66
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171b42:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
sub $20
|
|
|
|
ld [hli], a
|
|
|
|
jr Function171b42
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171b4b:
|
2015-11-18 18:01:55 +00:00
|
|
|
depixel 8, 2
|
2023-09-17 18:09:28 +00:00
|
|
|
ld a, SPRITE_ANIM_OBJ_EZCHAT_CURSOR
|
2020-02-11 12:42:36 +00:00
|
|
|
call InitSpriteAnimStruct
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
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
|
2023-09-17 18:09:28 +00:00
|
|
|
ld a, SPRITE_ANIM_OBJ_EZCHAT_CURSOR
|
2020-02-11 12:42:36 +00:00
|
|
|
call InitSpriteAnimStruct
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
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
|
2023-09-17 18:09:28 +00:00
|
|
|
ld a, SPRITE_ANIM_OBJ_EZCHAT_CURSOR
|
2020-02-11 12:42:36 +00:00
|
|
|
call InitSpriteAnimStruct
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171b85:
|
2018-08-25 18:39:24 +00:00
|
|
|
ld hl, hJoyPressed
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and B_BUTTON
|
2015-11-04 12:35:41 +00:00
|
|
|
jp nz, Function171b9f
|
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and A_BUTTON
|
2015-11-04 12:35:41 +00:00
|
|
|
jp nz, Function171bbd
|
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and D_UP
|
2015-11-04 12:35:41 +00:00
|
|
|
jr nz, asm_171ba5
|
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and D_DOWN
|
2015-11-04 12:35:41 +00:00
|
|
|
jr nz, asm_171baf
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171b9f:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $80
|
|
|
|
ld [wcd49], a
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
asm_171ba5:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [wcd4a]
|
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
dec a
|
|
|
|
ld [wcd4a], a
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
asm_171baf:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [wcd4b]
|
|
|
|
ld c, a
|
|
|
|
ld a, [wcd4a]
|
|
|
|
cp c
|
|
|
|
ret z
|
|
|
|
inc a
|
|
|
|
ld [wcd4a], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171bbd:
|
2015-11-04 12:35:41 +00:00
|
|
|
call PlayClickSFX
|
|
|
|
ld a, $8
|
|
|
|
ld [wcd23], a
|
|
|
|
xor a
|
|
|
|
ld [wcd24], a
|
|
|
|
jp Function171c66
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171bcc:
|
2018-08-25 18:39:24 +00:00
|
|
|
ld hl, hJoyPressed
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and B_BUTTON
|
2015-11-04 12:35:41 +00:00
|
|
|
jp nz, Function171bdc
|
|
|
|
ld a, [hl]
|
2022-09-15 00:49:58 +00:00
|
|
|
and A_BUTTON
|
2015-11-04 12:35:41 +00:00
|
|
|
jp nz, Function171beb
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171bdc:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $4
|
|
|
|
ld [wcd23], a
|
|
|
|
ld a, $8
|
|
|
|
ld [wcd24], a
|
|
|
|
ld hl, wcd49
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171beb:
|
2022-09-15 00:49:58 +00:00
|
|
|
ld a, BANK(s5_aa4a)
|
2020-06-17 21:03:38 +00:00
|
|
|
call OpenSRAM
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [wcd4a]
|
2022-09-15 00:49:58 +00:00
|
|
|
ld [s5_aa4a], a
|
2015-11-04 12:35:41 +00:00
|
|
|
call CloseSRAM
|
2018-01-23 21:08:43 +00:00
|
|
|
ld hl, MenuHeader_171c6b
|
|
|
|
call LoadMenuHeader
|
2015-11-04 19:02:11 +00:00
|
|
|
call MenuBox
|
2015-11-10 21:53:37 +00:00
|
|
|
call MenuBoxCoord2Tile
|
2024-01-07 11:38:00 +00:00
|
|
|
farcall HDMATransferTilemapAndAttrmap_Overworld
|
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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171c2c:
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171c39:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $28
|
|
|
|
ld [wcd4c], a
|
|
|
|
call Function171c66
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171c41:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld hl, wcd4c
|
|
|
|
dec [hl]
|
|
|
|
ret nz
|
2015-11-12 04:38:57 +00:00
|
|
|
call ClearBGPalettes
|
2018-01-02 19:00:14 +00:00
|
|
|
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
|
2018-06-24 14:09:41 +00:00
|
|
|
asm_171c60:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $80
|
|
|
|
ld [wcd49], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171c66:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld hl, wcd49
|
|
|
|
inc [hl]
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
MenuHeader_171c6b:
|
2018-01-14 10:59:56 +00:00
|
|
|
db MENU_BACKUP_TILES ; flags
|
2018-01-13 21:38:14 +00:00
|
|
|
menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1
|
2015-11-04 12:35:41 +00:00
|
|
|
dw NULL
|
|
|
|
db 0 ; default option
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
String_171c73:
|
2018-01-20 02:49:16 +00:00
|
|
|
db "モバイルセンターを けってい"
|
2015-11-04 12:35:41 +00:00
|
|
|
next "しました@"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171c87:
|
2015-11-04 12:35:41 +00:00
|
|
|
call DisableLCD
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, AsciiFontGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, $6e tiles
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, PasswordSlowpokeLZ
|
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
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, PasswordTopTilemap
|
2015-11-04 12:35:41 +00:00
|
|
|
decoord 0, 0
|
|
|
|
ld bc, $168
|
|
|
|
call CopyBytes
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, MobilePasswordAttrmap
|
2020-02-13 17:30:13 +00:00
|
|
|
decoord 0, 0, wAttrmap
|
2015-11-04 12:35:41 +00:00
|
|
|
ld bc, $168
|
|
|
|
call CopyBytes
|
|
|
|
hlcoord 3, 2
|
|
|
|
ld de, String_172e31
|
|
|
|
call PlaceString
|
|
|
|
hlcoord 3, 16
|
|
|
|
ld de, String_172e3f
|
|
|
|
call PlaceString
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171ccd:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, MobilePasswordPalettes
|
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
|
2019-04-08 22:50:10 +00:00
|
|
|
ld hl, wOBPals1 palette 0 color 1
|
|
|
|
ld a, LOW(PALRGB_WHITE)
|
2015-11-04 12:35:41 +00:00
|
|
|
ld [hli], a
|
2019-04-08 22:50:10 +00:00
|
|
|
ld a, HIGH(PALRGB_WHITE)
|
2015-11-04 12:35:41 +00:00
|
|
|
ld [hl], a
|
2024-01-07 11:38:00 +00:00
|
|
|
call SetDefaultBGPAndOBP
|
2015-11-04 12:35:41 +00:00
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [rSVBK], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171cf0:
|
2015-11-04 12:35:41 +00:00
|
|
|
xor a
|
|
|
|
hlcoord 4, 15
|
|
|
|
ld [hli], a
|
2016-05-04 15:46:23 +00:00
|
|
|
ld [hli], a
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, [wcd4b]
|
|
|
|
xor $1
|
|
|
|
ld [wcd4b], a
|
|
|
|
and a
|
2020-02-27 19:33:30 +00:00
|
|
|
jr nz, .shifted
|
|
|
|
ld hl, PasswordBottomTilemap
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
.shifted
|
|
|
|
ld hl, PasswordShiftTilemap
|
2015-11-04 12:35:41 +00:00
|
|
|
decoord 0, 7
|
|
|
|
ld bc, $8c
|
|
|
|
call CopyBytes
|
|
|
|
hlcoord 3, 16
|
|
|
|
ld de, String_172e4e
|
|
|
|
jp PlaceString
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function171d2b:
|
2015-11-04 12:35:41 +00:00
|
|
|
call DisableLCD
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, AsciiFontGFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, $6e tiles
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, PasswordSlowpokeLZ
|
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
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, ChooseMobileCenterTilemap
|
2015-11-04 12:35:41 +00:00
|
|
|
decoord 0, 0
|
|
|
|
ld bc, $168
|
|
|
|
call CopyBytes
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, ChooseMobileCenterAttrmap
|
2020-02-13 17:30:13 +00:00
|
|
|
decoord 0, 0, wAttrmap
|
2015-11-04 12:35:41 +00:00
|
|
|
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
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
MobilePasswordPalettes:
|
|
|
|
INCLUDE "gfx/mobile/mobile_password.pal"
|
2017-12-11 23:04:23 +00:00
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
AsciiFontGFX:
|
2017-12-15 22:50:45 +00:00
|
|
|
INCBIN "gfx/mobile/ascii_font.2bpp"
|
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
PasswordTopTilemap:
|
|
|
|
INCBIN "gfx/mobile/password_top.tilemap"
|
|
|
|
|
|
|
|
PasswordBottomTilemap:
|
|
|
|
INCBIN "gfx/mobile/password_bottom.tilemap"
|
|
|
|
|
|
|
|
PasswordShiftTilemap:
|
|
|
|
INCBIN "gfx/mobile/password_shift.tilemap"
|
|
|
|
|
|
|
|
ChooseMobileCenterTilemap:
|
|
|
|
INCBIN "gfx/mobile/mobile_center.tilemap"
|
|
|
|
|
|
|
|
MobilePasswordAttrmap:
|
|
|
|
INCBIN "gfx/mobile/password.attrmap"
|
|
|
|
|
|
|
|
ChooseMobileCenterAttrmap:
|
|
|
|
INCBIN "gfx/mobile/mobile_center.attrmap"
|
|
|
|
|
|
|
|
PasswordSlowpokeLZ:
|
2015-11-04 12:35:41 +00:00
|
|
|
INCBIN "gfx/pokedex/slowpoke.2bpp.lz"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
String_172e31:
|
2018-01-19 01:40:32 +00:00
|
|
|
db "パスワード<WO>いれてください@"
|
2018-06-24 14:09:41 +00:00
|
|
|
String_172e3f:
|
2018-01-20 02:49:16 +00:00
|
|
|
db "きりかえ やめる けってい@"
|
2018-06-24 14:09:41 +00:00
|
|
|
String_172e4e:
|
2018-01-20 02:49:16 +00:00
|
|
|
db "きりかえ やめる "
|
2015-11-04 12:35:41 +00:00
|
|
|
String_172e58:
|
|
|
|
db "けってい@"
|
2018-06-24 14:09:41 +00:00
|
|
|
String_172e5d:
|
2018-01-20 02:49:16 +00:00
|
|
|
db "せつぞくする モバイルセンターを"
|
|
|
|
next "えらんで ください@"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Function172e78:
|
2015-11-04 12:35:41 +00:00
|
|
|
ld a, $7f
|
|
|
|
hlcoord 0, 0
|
|
|
|
ld bc, $168
|
|
|
|
call ByteFill
|
|
|
|
ld a, $7
|
2020-02-13 17:30:13 +00:00
|
|
|
hlcoord 0, 0, wAttrmap
|
2015-11-04 12:35:41 +00:00
|
|
|
ld bc, $168
|
|
|
|
call ByteFill
|
|
|
|
call DisableLCD
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, Stadium2N64GFX
|
2017-12-28 12:32:33 +00:00
|
|
|
ld de, vTiles2 tile $00
|
2022-09-15 00:49:58 +00:00
|
|
|
ld bc, $61 tiles
|
2015-11-04 12:35:41 +00:00
|
|
|
call CopyBytes
|
|
|
|
call EnableLCD
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, Stadium2N64Tilemap
|
2015-11-04 12:35:41 +00:00
|
|
|
decoord 0, 0
|
|
|
|
ld bc, $168
|
|
|
|
call CopyBytes
|
2020-02-27 19:33:30 +00:00
|
|
|
ld hl, Stadium2N64Attrmap
|
2020-02-13 17:30:13 +00:00
|
|
|
decoord 0, 0, wAttrmap
|
2015-11-04 12:35:41 +00:00
|
|
|
ld bc, $168
|
|
|
|
call CopyBytes
|
|
|
|
ret
|
2015-12-08 21:06:13 +00:00
|
|
|
|
2015-11-04 12:35:41 +00:00
|
|
|
Function172eb9:
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh a, [rSVBK]
|
2015-11-04 12:35:41 +00:00
|
|
|
push af
|
|
|
|
ld a, $5
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [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
|
2024-01-07 11:38:00 +00:00
|
|
|
call SetDefaultBGPAndOBP
|
2015-11-04 12:35:41 +00:00
|
|
|
pop af
|
2018-08-25 18:28:22 +00:00
|
|
|
ldh [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
|
|
|
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
|
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
Stadium2N64GFX:
|
|
|
|
INCBIN "gfx/mobile/stadium2_n64.2bpp"
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
Stadium2N64Tilemap:
|
2018-01-09 22:26:40 +00:00
|
|
|
if DEF(_CRYSTAL11)
|
2022-12-15 03:30:20 +00:00
|
|
|
; BUG: Crystal 1.1 corrupted this tilemap by treating $0a bytes as
|
|
|
|
; Unix newlines, and converting them to $0d $0a Windows newlines.
|
2020-02-27 19:33:30 +00:00
|
|
|
INCBIN "gfx/mobile/stadium2_n64_corrupt.tilemap"
|
2017-12-29 02:22:35 +00:00
|
|
|
else
|
2020-02-27 19:33:30 +00:00
|
|
|
INCBIN "gfx/mobile/stadium2_n64.tilemap"
|
2017-12-29 02:22:35 +00:00
|
|
|
endc
|
2015-11-04 12:35:41 +00:00
|
|
|
|
2020-02-27 19:33:30 +00:00
|
|
|
Stadium2N64Attrmap:
|
|
|
|
INCBIN "gfx/mobile/stadium2_n64.attrmap"
|