2020-07-17 13:43:41 -07:00
|
|
|
|
add_mobiletradeanim: MACRO
|
|
|
|
|
\1_MobileTradeCmd:
|
|
|
|
|
dw \1
|
|
|
|
|
ENDM
|
|
|
|
|
|
|
|
|
|
mobiletradeanim: MACRO
|
|
|
|
|
db (\1_MobileTradeCmd - MobileTradeAnim_JumptableLoop.Jumptable) / 2
|
|
|
|
|
ENDM
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnimation_SendGivemonToGTS:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $80
|
|
|
|
|
ld [wcf65], a
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld de, .TradeAnimScript
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jp RunMobileTradeAnim_NoFrontpics
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.TradeAnimScript:
|
2020-07-17 13:43:41 -07:00
|
|
|
|
mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS
|
|
|
|
|
mobiletradeanim MobileTradeAnim_FadeToBlack
|
|
|
|
|
mobiletradeanim MobileTradeAnim_10
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GiveTrademon1
|
|
|
|
|
mobiletradeanim MobileTradeAnim_06
|
|
|
|
|
mobiletradeanim MobileTradeAnim_0f
|
|
|
|
|
mobiletradeanim EndMobileTradeAnim
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
MobileTradeAnimation_RetrieveGivemonFromGTS:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $80
|
|
|
|
|
jr asm_108018
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnimation_ReceiveGetmonFromGTS:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
|
|
|
|
asm_108018:
|
|
|
|
|
ld [wcf65], a
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld de, .TradeAnimScript
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jp RunMobileTradeAnim_NoFrontpics
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.TradeAnimScript:
|
2020-07-17 13:43:41 -07:00
|
|
|
|
mobiletradeanim MobileTradeAnim_11
|
|
|
|
|
mobiletradeanim MobileTradeAnim_07
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GetTrademon1
|
|
|
|
|
mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS
|
|
|
|
|
mobiletradeanim EndMobileTradeAnim
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108026:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
|
|
|
|
jr asm_10802c
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function10802a:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
|
|
|
|
|
asm_10802c:
|
|
|
|
|
ld [wcf65], a
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld de, .TradeAnimScript
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jp RunMobileTradeAnim_Frontpics
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.TradeAnimScript: ; trade
|
2020-07-17 13:43:41 -07:00
|
|
|
|
mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent
|
|
|
|
|
mobiletradeanim MobileTradeAnim_FadeToBlack
|
|
|
|
|
mobiletradeanim MobileTradeAnim_02
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GiveTrademon1
|
|
|
|
|
mobiletradeanim MobileTradeAnim_05
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GetTrademon1
|
|
|
|
|
mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade
|
|
|
|
|
mobiletradeanim EndMobileTradeAnim
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function10803d:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
|
|
|
|
ld [wcf65], a
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld de, .TradeAnimScript
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jp RunMobileTradeAnim_NoFrontpics
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.TradeAnimScript:
|
2020-07-17 13:43:41 -07:00
|
|
|
|
mobiletradeanim MobileTradeAnim_11
|
|
|
|
|
mobiletradeanim MobileTradeAnim_07
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GetTrademon1
|
|
|
|
|
mobiletradeanim MobileTradeAnim_GetOddEgg
|
|
|
|
|
mobiletradeanim EndMobileTradeAnim
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function10804d:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
|
|
|
|
ld [wcf65], a
|
2015-12-25 20:34:33 -08:00
|
|
|
|
ld de, .TradeAnimScript
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jp RunMobileTradeAnim_NoFrontpics
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-25 20:34:33 -08:00
|
|
|
|
.TradeAnimScript:
|
2020-07-17 13:43:41 -07:00
|
|
|
|
mobiletradeanim MobileTradeAnim_11
|
|
|
|
|
mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS
|
|
|
|
|
mobiletradeanim EndMobileTradeAnim
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
RunMobileTradeAnim_Frontpics:
|
2017-12-09 11:22:58 -08:00
|
|
|
|
ld hl, wTradeAnimAddress
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hl], e
|
|
|
|
|
inc hl
|
|
|
|
|
ld [hl], d
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hMapAnims]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hMapAnims], a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wVramState
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
|
|
|
|
res 0, [hl]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wOptions
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
2015-12-17 10:49:26 -08:00
|
|
|
|
set NO_TEXT_SCROLL, [hl]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1080b7
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
|
|
|
|
call MobileTradeAnim_JumptableLoop
|
|
|
|
|
jr nc, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wOptions], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wVramState], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hMapAnims], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
RunMobileTradeAnim_NoFrontpics:
|
2017-12-09 11:22:58 -08:00
|
|
|
|
ld hl, wTradeAnimAddress
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hl], e
|
|
|
|
|
inc hl
|
|
|
|
|
ld [hl], d
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hMapAnims]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hMapAnims], a
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wVramState
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
|
|
|
|
res 0, [hl]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wOptions
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hl]
|
|
|
|
|
push af
|
2015-12-17 10:49:26 -08:00
|
|
|
|
set NO_TEXT_SCROLL, [hl]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108157
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
|
|
|
|
call MobileTradeAnim_JumptableLoop
|
|
|
|
|
jr nc, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wOptions], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wVramState], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hMapAnims], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function1080b7:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld [wJumptableIndex], a
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2017-12-28 04:32:33 -08:00
|
|
|
|
call MobileTradeAnim_ClearTiles
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
2015-11-04 13:14:27 -08:00
|
|
|
|
call LoadStandardFont
|
2015-10-21 07:43:42 -07:00
|
|
|
|
call LoadFontsBattleExtra
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeSpritesGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $20
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call EnableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ClearSpriteAnims
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, TradeBallGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradeBallGFX), 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, TradePoofGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0 tile $06
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradePoofGFX), 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wSpriteAnimDict
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hli], a
|
|
|
|
|
ld [hl], $0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
|
|
|
|
ld hl, wPlayerTrademonDVs
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $30
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_GetFrontpic
|
|
|
|
|
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
|
|
|
|
ld hl, wOTTrademonDVs
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2 tile $31
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_GetFrontpic
|
|
|
|
|
|
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
|
|
|
|
ld de, wPlayerTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_InitSpeciesName
|
|
|
|
|
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
|
|
|
|
ld de, wOTTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_InitSpeciesName
|
|
|
|
|
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call Function108b98
|
|
|
|
|
call Function108af4
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108157:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld [wJumptableIndex], a
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2017-12-28 04:32:33 -08:00
|
|
|
|
call MobileTradeAnim_ClearTiles
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
2015-11-04 13:14:27 -08:00
|
|
|
|
call LoadStandardFont
|
2015-10-21 07:43:42 -07:00
|
|
|
|
call LoadFontsBattleExtra
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call EnableLCD
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall ClearSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wSpriteAnimDict
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hli], a
|
|
|
|
|
ld [hl], $0
|
|
|
|
|
call DelayFrame
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
|
|
|
|
ld de, wPlayerTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_InitSpeciesName
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
|
|
|
|
ld de, wOTTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_InitSpeciesName
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call Function108b98
|
|
|
|
|
call Function108af4
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ClearTiles:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 3 * $80 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call ByteFill
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 3 * $80 tiles
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call ByteFill
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ClearBGMap:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-11-20 08:47:52 -08:00
|
|
|
|
hlbgcoord 0, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $0
|
|
|
|
|
call ByteFill
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-11-20 08:47:52 -08:00
|
|
|
|
hlbgcoord 0, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7f
|
|
|
|
|
call ByteFill
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GetFrontpic:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push de
|
|
|
|
|
push af
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef GetUnownLetter
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
|
|
|
|
ld [wCurSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetBaseData
|
|
|
|
|
pop de
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef GetMonFrontpic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108201:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push de
|
|
|
|
|
push af
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef GetUnownLetter
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
|
|
|
|
ld [wCurSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetBaseData
|
|
|
|
|
pop de
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef GetAnimatedFrontpic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108219:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 7, 2
|
|
|
|
|
ld d, $0
|
2015-11-07 06:48:32 -08:00
|
|
|
|
ld e, ANIM_MON_TRADE
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef AnimateFrontpic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108229:
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 7, 2
|
|
|
|
|
ld d, $0
|
2015-11-07 06:48:32 -08:00
|
|
|
|
ld e, ANIM_MON_TRADE
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef LoadMonAnimation
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_InitSpeciesName:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push de
|
2018-07-28 16:27:34 -07:00
|
|
|
|
ld [wNamedObjectIndexBuffer], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetPokemonName
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld hl, wStringBuffer1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop de
|
2018-01-20 09:25:55 -08:00
|
|
|
|
ld bc, MON_NAME_LENGTH
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_JumptableLoop:
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld a, [wJumptableIndex]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
bit 7, a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .StopAnim
|
|
|
|
|
call .ExecuteMobileTradeAnimCommand
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
|
|
|
|
and a
|
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.StopAnim:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-11-04 13:14:27 -08:00
|
|
|
|
call LoadStandardFont
|
2015-10-21 07:43:42 -07:00
|
|
|
|
call LoadFontsBattleExtra
|
2018-01-02 11:00:14 -08:00
|
|
|
|
farcall Stubbed_Function106462
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall Function106464
|
2015-02-10 19:15:15 -08:00
|
|
|
|
scf
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.ExecuteMobileTradeAnimCommand:
|
2020-07-01 10:13:49 -07:00
|
|
|
|
jumptable .Jumptable, wJumptableIndex
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.Jumptable:
|
2020-07-17 13:43:41 -07:00
|
|
|
|
add_mobiletradeanim GetMobileTradeAnimByte ; 00
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent ; 01
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_02 ; 02
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GiveTrademon1 ; 03
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GiveTrademon2 ; 04
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_05 ; 05
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_06 ; 06
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_07 ; 07
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GetTrademon1 ; 08
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GetTrademon2 ; 09
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GetTrademon3 ; 0a
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade ; 0b
|
|
|
|
|
add_mobiletradeanim EndMobileTradeAnim ; 0c
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS ; 0d
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS ; 0e
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_0f ; 0f
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_10 ; 10
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_11 ; 11
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_FadeToBlack ; 12
|
|
|
|
|
add_mobiletradeanim MobileTradeAnim_GetOddEgg ; 13 get odd egg
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_Next:
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld hl, wJumptableIndex
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
GetMobileTradeAnimByte:
|
2017-12-09 11:22:58 -08:00
|
|
|
|
ld hl, wTradeAnimAddress
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, [hl]
|
|
|
|
|
inc hl
|
|
|
|
|
ld d, [hl]
|
|
|
|
|
ld a, [de]
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld [wJumptableIndex], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
inc de
|
|
|
|
|
ld [hl], d
|
|
|
|
|
dec hl
|
|
|
|
|
ld [hl], e
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
EndMobileTradeAnim:
|
2015-10-24 16:49:19 -07:00
|
|
|
|
ld hl, wJumptableIndex
|
2015-02-10 19:15:15 -08:00
|
|
|
|
set 7, [hl]
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
WaitMobileTradeSpriteAnims:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push bc
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall PlaySpriteAnimations
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop bc
|
|
|
|
|
call DelayFrame
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function1082db:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall PlaySpriteAnimations
|
|
|
|
|
farcall SetUpPokeAnim
|
2020-02-13 09:30:13 -08:00
|
|
|
|
farcall HDMATransferTilemapToWRAMBank3
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nc, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function1082f0:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108b78
|
|
|
|
|
call DelayFrame
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function1082fa:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108b78
|
|
|
|
|
push hl
|
|
|
|
|
push bc
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall PlaySpriteAnimations
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop bc
|
|
|
|
|
pop hl
|
|
|
|
|
call DelayFrame
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ShowPlayerMonToBeSent:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, MUSIC_EVOLUTION
|
|
|
|
|
call PlayMusic2
|
|
|
|
|
ld a, $80
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $87
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $50
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DisplayMonToBeSent
|
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function10895e
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonDVs]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonDVs + 1]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs + 1], a
|
2016-05-13 19:46:32 -07:00
|
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSGBLayout
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
|
|
|
|
call WaitBGMap
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hWX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $7
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .okay
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
|
|
|
|
ldh a, [hSCX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.okay
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetCryIndex
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr c, .skip_cry
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, c
|
|
|
|
|
ld d, b
|
2018-01-16 20:47:45 -08:00
|
|
|
|
call PlayCry
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.skip_cry
|
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
call Function108bec
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2017-12-12 09:18:11 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_BALL_POOF
|
|
|
|
|
call PlaySFX
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 12 * SCREEN_WIDTH
|
2015-11-13 07:48:49 -08:00
|
|
|
|
ld a, " "
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ShowOTMonFromTrade:
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wOTTrademonDVs
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108201
|
|
|
|
|
call EnableLCD
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2017-12-12 09:18:11 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108b45
|
|
|
|
|
ld a, $1
|
|
|
|
|
call Function108b98
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 48
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_BALL_POOF
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DisplayReceivedMon
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $50
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs + 1]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs + 1], a
|
2016-05-13 19:46:32 -07:00
|
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSGBLayout
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
|
|
|
|
call Function108963
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108229
|
|
|
|
|
call Function1082db
|
|
|
|
|
call Function108c16
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ShowPlayerMonForGTS:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, MUSIC_EVOLUTION
|
|
|
|
|
call PlayMusic2
|
|
|
|
|
ld a, $80
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $87
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $50
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DisplayMonToBeSent
|
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wPlayerTrademonDVs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function10898a
|
|
|
|
|
call DelayFrame
|
|
|
|
|
ld de, TradeBallGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradeBallGFX), 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
ld de, TradePoofGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0 tile $06
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradePoofGFX), 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonDVs]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonDVs + 1]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs + 1], a
|
2016-05-13 19:46:32 -07:00
|
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSGBLayout
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
|
|
|
|
call WaitBGMap
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hWX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $7
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
|
|
|
|
ldh a, [hSCX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub $4
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wPlayerTrademonSpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetCryIndex
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr c, .skip_cry
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld e, c
|
|
|
|
|
ld d, b
|
2018-01-16 20:47:45 -08:00
|
|
|
|
call PlayCry
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.skip_cry
|
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
call Function108c2b
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2017-12-12 09:18:11 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_BALL_POOF
|
|
|
|
|
call PlaySFX
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 12 * SCREEN_WIDTH
|
2015-11-13 07:48:49 -08:00
|
|
|
|
ld a, " "
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ShowOTMonFromGTS:
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wOTTrademonDVs
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108201
|
|
|
|
|
call EnableLCD
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
|
|
|
|
ld de, TradeBallGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradeBallGFX), 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
ld de, TradePoofGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0 tile $06
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradePoofGFX), 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2017-12-12 09:18:11 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108b45
|
|
|
|
|
ld a, $1
|
|
|
|
|
call Function108b98
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 48
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_BALL_POOF
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DisplayReceivedMon
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $50
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs + 1]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs + 1], a
|
2016-05-13 19:46:32 -07:00
|
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSGBLayout
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
|
|
|
|
ld hl, wOTTrademonDVs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function10898a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108229
|
|
|
|
|
call Function1082db
|
|
|
|
|
call Function108c40
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GetOddEgg:
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, wOTTrademonDVs
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108201
|
|
|
|
|
call EnableLCD
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
|
|
|
|
ld de, TradeBallGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradeBallGFX), 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
ld de, TradePoofGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles0 tile $06
|
2018-01-14 16:43:35 -08:00
|
|
|
|
lb bc, BANK(TradePoofGFX), 12
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2017-12-12 09:18:11 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108b45
|
|
|
|
|
ld a, $1
|
|
|
|
|
call Function108b98
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 48
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_BALL_POOF
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call Function108a33
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $50
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wCurPartySpecies], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonDVs + 1]
|
2018-01-23 14:39:09 -08:00
|
|
|
|
ld [wTempMonDVs + 1], a
|
2016-05-13 19:46:32 -07:00
|
|
|
|
ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call GetSGBLayout
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
|
|
|
|
ld hl, wOTTrademonDVs
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function10898a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, [wOTTrademonSpecies]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108229
|
|
|
|
|
call Function1082db
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_02:
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108c80
|
|
|
|
|
call Function108c6d
|
|
|
|
|
call EnableLCD
|
|
|
|
|
ld a, $c
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $78
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeBGPalettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2019-09-02 17:04:23 -07:00
|
|
|
|
call LoadMobileAdapterPalette
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_10:
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeSpritesGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $20
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
call Function108c80
|
|
|
|
|
call Function108c6d
|
|
|
|
|
call EnableLCD
|
|
|
|
|
ld a, $c
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $78
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeBGPalettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2019-09-02 17:04:23 -07:00
|
|
|
|
call LoadMobileAdapterPalette
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_11:
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapMode], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeSpritesGFX
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $20
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
call Function108c80
|
|
|
|
|
call Function108c6d
|
|
|
|
|
call EnableLCD
|
|
|
|
|
ld a, $80
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $7
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeBGPalettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2019-09-02 17:04:23 -07:00
|
|
|
|
call LoadMobileAdapterPalette
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function108af4
|
|
|
|
|
call Function108b5a
|
|
|
|
|
ld a, $e0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, MUSIC_EVOLUTION
|
|
|
|
|
call PlayMusic2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GiveTrademon1:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_GIVE_TRADEMON
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 palette 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1082f0
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $e0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .loop2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2016-05-04 08:46:23 -07:00
|
|
|
|
dec a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $f8
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .next
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.next
|
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop2
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $f8
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
dec a
|
2016-05-04 08:46:23 -07:00
|
|
|
|
dec a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $40
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .init
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $30
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .delete
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $68
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .replace
|
|
|
|
|
jr .next2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.init
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call Function108ad4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .next2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.delete
|
|
|
|
|
call MobileTradeAnim_DeleteSprites
|
|
|
|
|
jr .next2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.replace
|
|
|
|
|
call MobileTradeAnim_DeleteSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
call Function108ad4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.next2
|
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
jr .loop2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.done
|
|
|
|
|
call MobileTradeAnim_Next
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GiveTrademon2:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 + 1 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1082f0
|
|
|
|
|
call Function108af4
|
|
|
|
|
call Function108b5a
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 9, 10, 2, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_FORESIGHT
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 10
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
ld [wcf64], a
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 9, 10, 2, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $90
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sub $8
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.done
|
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_05:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld de, SFX_SHARPEN
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 60
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 30, 10, 2, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_THROW_BALL
|
|
|
|
|
call PlaySFX
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_06:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
ld [wcf64], a
|
|
|
|
|
ld de, SFX_SHARPEN
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_07:
|
2015-11-13 07:48:49 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 30, 10, 2, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_THROW_BALL
|
|
|
|
|
call PlaySFX
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GetTrademon1:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $f8
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .done
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add $8
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.done
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 9, 10, 2, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld de, SFX_GLASS_TING_2
|
|
|
|
|
call PlaySFX
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_Next
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GetTrademon2:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 20
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 + 1 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1082fa
|
|
|
|
|
ld de, SFX_GIVE_TRADEMON
|
|
|
|
|
call PlaySFX
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 20
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 + 1 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1082fa
|
|
|
|
|
call Function108af4
|
|
|
|
|
.asm_1088ad
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCY]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $78
|
|
|
|
|
jr z, .asm_1088ee
|
|
|
|
|
inc a
|
2016-05-04 08:46:23 -07:00
|
|
|
|
inc a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $30
|
|
|
|
|
jr z, .asm_1088c5
|
|
|
|
|
cp $40
|
|
|
|
|
jr z, .asm_1088dd
|
|
|
|
|
cp $68
|
|
|
|
|
jr z, .asm_1088cf
|
|
|
|
|
jr .asm_1088e7
|
|
|
|
|
|
|
|
|
|
.asm_1088c5
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_1088e7
|
|
|
|
|
|
|
|
|
|
.asm_1088cf
|
2015-11-18 10:01:55 -08:00
|
|
|
|
depixel 10, 11, 4, 0
|
2018-01-02 09:25:13 -08:00
|
|
|
|
ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE
|
2020-02-11 04:42:36 -08:00
|
|
|
|
call InitSpriteAnimStruct
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call Function108ad4
|
|
|
|
|
jr .asm_1088e7
|
|
|
|
|
|
|
|
|
|
.asm_1088dd
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DeleteSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
|
|
|
|
call Function108ad4
|
|
|
|
|
jr .asm_1088e7
|
|
|
|
|
|
|
|
|
|
.asm_1088e7
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_1088ad
|
|
|
|
|
|
|
|
|
|
.asm_1088ee
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [hSCX]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $c
|
|
|
|
|
jr z, .asm_108906
|
|
|
|
|
inc a
|
2016-05-04 08:46:23 -07:00
|
|
|
|
inc a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hSCX], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
cp -8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr nz, .asm_1088e7
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_DeleteSprites
|
|
|
|
|
ld c, 1
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_1088ee
|
|
|
|
|
|
|
|
|
|
.asm_108906
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_Next
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_GetTrademon3:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 palette 6
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Function1082f0
|
|
|
|
|
call Function108af4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_0f:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 40
|
|
|
|
|
call WaitMobileTradeSpriteAnims
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-11-11 20:38:57 -08:00
|
|
|
|
call ClearBGPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
2020-02-13 09:30:13 -08:00
|
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DisableLCD
|
2017-12-28 04:32:33 -08:00
|
|
|
|
call MobileTradeAnim_ClearTiles
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearBGMap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call EnableLCD
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_FadeToBlack:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rBGP]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .blank
|
2015-02-10 19:15:15 -08:00
|
|
|
|
sla a
|
|
|
|
|
sla a
|
|
|
|
|
call DmgToCgbBGPals
|
2015-12-09 08:38:40 -08:00
|
|
|
|
call DmgToCgbObjPal0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 4
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.blank
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
|
|
|
|
call DmgToCgbBGPals
|
2015-12-09 08:38:40 -08:00
|
|
|
|
call DmgToCgbObjPal0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call GetMobileTradeAnimByte
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function10895e:
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles0 tile $30
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr asm_108966
|
|
|
|
|
|
|
|
|
|
Function108963:
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2 tile $31
|
2018-10-24 12:33:18 -07:00
|
|
|
|
asm_108966:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2
|
2020-06-13 15:48:26 -07:00
|
|
|
|
lb bc, BANK(TradeGameBoyLZ), $31
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Request2bpp
|
|
|
|
|
call WaitTop
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 7, 2
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hGraphicStartTile], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
lb bc, 7, 7
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef PlaceGraphic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitBGMap
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function10898a:
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld de, vTiles2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_GetFrontpic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitTop
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 7, 2
|
|
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hGraphicStartTile], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
lb bc, 7, 7
|
2018-01-16 11:30:10 -08:00
|
|
|
|
predef PlaceGraphic
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitBGMap
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_DisplayMonToBeSent:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wPlayerTrademonSpecies
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
cp EGG
|
|
|
|
|
jr z, MobileTradeAnim_DisplayEggData
|
|
|
|
|
call MobileTradeAnim_LoadMonTemplate
|
|
|
|
|
ld de, wPlayerTrademonSpecies
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
|
|
|
|
|
ld de, wPlayerTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintSpeciesName
|
|
|
|
|
ld a, [wPlayerTrademonCaughtData]
|
|
|
|
|
ld de, wPlayerTrademonOTName
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
|
|
|
|
|
ld de, wPlayerTrademonID
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintIDNumber
|
|
|
|
|
call MobileTradeAnim_MonDisplay_UpdateBGMap
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
MobileTradeAnim_DisplayReceivedMon:
|
|
|
|
|
ld de, wOTTrademonSpecies
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [de]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
cp EGG
|
|
|
|
|
jr z, MobileTradeAnim_DisplayEggData
|
|
|
|
|
call MobileTradeAnim_LoadMonTemplate
|
|
|
|
|
ld de, wOTTrademonSpecies
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintSpeciesNumber
|
|
|
|
|
ld de, wOTTrademonSpeciesName
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintSpeciesName
|
|
|
|
|
ld a, [wOTTrademonCaughtData]
|
|
|
|
|
ld de, wOTTrademonOTName
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintOTNameAndGender
|
|
|
|
|
ld de, wOTTrademonID
|
|
|
|
|
call MobileTradeAnim_MonDisplay_PrintIDNumber
|
|
|
|
|
call MobileTradeAnim_MonDisplay_UpdateBGMap
|
|
|
|
|
ret
|
|
|
|
|
|
2018-05-05 00:19:04 -07:00
|
|
|
|
MobileTradeAnim_DisplayEggData:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitTop
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearTilemap
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld a, HIGH(vBGMap1)
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapAddress + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 5, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld b, 6
|
|
|
|
|
ld c, 9
|
2019-04-08 05:15:10 -07:00
|
|
|
|
call Textbox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 6, 2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, .EggTemplate
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_MonDisplay_UpdateBGMap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.EggTemplate:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "タマゴ"
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "おや/?????"
|
|
|
|
|
next "<ID>№<DOT>?????"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108a33:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitTop
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearTilemap
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld a, HIGH(vBGMap1)
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapAddress + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 5, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld b, 6
|
|
|
|
|
ld c, 9
|
2019-04-08 05:15:10 -07:00
|
|
|
|
call Textbox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 7, 4
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, .OddEgg
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_MonDisplay_UpdateBGMap
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.OddEgg:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "なぞのタマゴ@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_LoadMonTemplate:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitTop
|
2015-12-17 10:49:26 -08:00
|
|
|
|
call MobileTradeAnim_ClearTilemap
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld a, HIGH(vBGMap1)
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapAddress + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 4, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld b, 6
|
|
|
|
|
ld c, 10
|
2019-04-08 05:15:10 -07:00
|
|
|
|
call Textbox
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 5, 0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, .MonTemplate
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.MonTemplate:
|
2018-01-19 18:49:16 -08:00
|
|
|
|
db "─ №<DOT>"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
next ""
|
2018-01-19 18:49:16 -08:00
|
|
|
|
next "おや/"
|
2017-12-09 16:41:03 -08:00
|
|
|
|
next "<ID>№<DOT>"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "@"
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_MonDisplay_UpdateBGMap:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call WaitBGMap
|
|
|
|
|
call WaitTop
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld a, HIGH(vBGMap0)
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hBGMapAddress + 1], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_MonDisplay_PrintSpeciesNumber:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 9, 0
|
2015-10-10 14:03:04 -07:00
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintNum
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_MonDisplay_PrintSpeciesName:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 5, 2
|
|
|
|
|
call PlaceString
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_MonDisplay_PrintOTNameAndGender:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
cp $3
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr c, .got_gender
|
2015-02-10 19:15:15 -08:00
|
|
|
|
xor a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.got_gender
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
hlcoord 8, 4
|
|
|
|
|
call PlaceString
|
|
|
|
|
inc bc
|
|
|
|
|
pop af
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, .GenderChars
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, 0
|
|
|
|
|
ld e, a
|
|
|
|
|
add hl, de
|
|
|
|
|
ld a, [hl]
|
|
|
|
|
ld [bc], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
.GenderChars:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
db " "
|
|
|
|
|
db "♂"
|
|
|
|
|
db "♀"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_MonDisplay_PrintIDNumber:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
hlcoord 8, 6
|
2015-10-10 14:03:04 -07:00
|
|
|
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintNum
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_ClearTilemap:
|
2015-07-22 12:57:02 -07:00
|
|
|
|
hlcoord 0, 0
|
|
|
|
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, " "
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ByteFill
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108ad4:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
and a
|
|
|
|
|
jr z, .asm_108adc
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld de, MobileCable2GFX
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_108adf
|
|
|
|
|
|
|
|
|
|
.asm_108adc
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld de, MobileCable1GFX
|
2015-02-10 19:15:15 -08:00
|
|
|
|
.asm_108adf
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2017-12-28 04:32:33 -08:00
|
|
|
|
ld hl, vTiles2 tile $4a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
lb bc, BANK(MobileCable1GFX), 16 ; aka BANK(MobileCable2GFX)
|
2020-05-18 08:59:48 -07:00
|
|
|
|
call Get2bppViaHDMA
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrame
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108af4:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcf65]
|
|
|
|
|
and $1
|
2020-02-27 11:33:30 -08:00
|
|
|
|
jr z, .copy_MobileTradeOB1Palettes
|
|
|
|
|
ld hl, MobileTradeOB2Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wOBPals1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeOB2Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wOBPals2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .done_copy
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2020-02-27 11:33:30 -08:00
|
|
|
|
.copy_MobileTradeOB1Palettes
|
|
|
|
|
ld hl, MobileTradeOB1Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wOBPals1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeOB1Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wOBPals2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.done_copy
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-12-09 08:38:40 -08:00
|
|
|
|
call DmgToCgbObjPal0
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld a, %11100100 ; 3,2,1,0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DmgToCgbBGPals
|
|
|
|
|
call DelayFrame
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108b45:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-18 08:16:24 -08:00
|
|
|
|
ld de, PALRGB_WHITE
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, e
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld d, a
|
|
|
|
|
ld [hli], a
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108b5a:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2018-01-01 12:05:00 -08:00
|
|
|
|
ld de, palred 18 + palgreen 31 + palblue 15
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld hl, wBGPals2 + 4 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld c, $10
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, e
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, d
|
|
|
|
|
ld [hli], a
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-08-03 14:41:01 -07:00
|
|
|
|
ld a, TRUE
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hCGBPalUpdate], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108b78:
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, c
|
|
|
|
|
and $2
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr z, .Orange
|
2018-01-18 08:16:24 -08:00
|
|
|
|
ld de, PALRGB_WHITE
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr .load_pal
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Orange:
|
2018-01-01 12:05:00 -08:00
|
|
|
|
ld de, palred 31 + palgreen 15 + palblue 1
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.load_pal
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, e
|
|
|
|
|
ld [hli], a
|
|
|
|
|
ld a, d
|
|
|
|
|
ld [hld], a
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2020-08-03 14:41:01 -07:00
|
|
|
|
ld a, TRUE
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hCGBPalUpdate], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
Palette_108b98:
|
|
|
|
|
; removed
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108b98:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld d, a
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
|
push af
|
|
|
|
|
ld a, $5
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcf65]
|
|
|
|
|
and $1
|
|
|
|
|
xor d
|
|
|
|
|
jr z, .asm_108bad
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, Palette_108b98 + 1 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr .asm_108bb0
|
|
|
|
|
|
|
|
|
|
.asm_108bad
|
|
|
|
|
ld hl, Palette_108b98
|
|
|
|
|
.asm_108bb0
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1 + 7 palettes
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call CopyBytes
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
MobileTradeAnim_DeleteSprites:
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeAllSprites
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call ClearSprites
|
|
|
|
|
ret
|
|
|
|
|
|
2020-10-22 09:55:46 -07:00
|
|
|
|
MobileTradeAnim_AnimateSentPulse:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcf64]
|
|
|
|
|
and a
|
|
|
|
|
ret z
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
cp -1 * 8 - 6
|
|
|
|
|
jr z, .delete
|
|
|
|
|
sub 1 * 8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
2015-12-17 10:49:26 -08:00
|
|
|
|
|
|
|
|
|
.delete
|
2017-12-24 09:47:30 -08:00
|
|
|
|
farcall DeinitializeSprite
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2020-10-22 09:55:46 -07:00
|
|
|
|
MobileTradeAnim_AnimateOTPulse:
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-02-10 19:15:15 -08:00
|
|
|
|
add hl, bc
|
|
|
|
|
ld a, [hl]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
cp 9 * 8 + 2
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret z
|
2015-12-17 10:49:26 -08:00
|
|
|
|
add 1 * 8
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld [hl], a
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108bec:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobilePlayerWillTradeMonText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobileForPartnersMonText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobilePlayerWillTradeMonText:
|
|
|
|
|
text_far _MobilePlayerWillTradeMonText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobileForPartnersMonText:
|
|
|
|
|
text_far _MobileForPartnersMonText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobilePlayersMonTradeText:
|
|
|
|
|
text_far _MobilePlayersMonTradeText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108c16:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobileTakeGoodCareOfMonText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobileTakeGoodCareOfMonText:
|
|
|
|
|
text_far _MobileTakeGoodCareOfMonText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108c2b:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobilePlayersMonTrade2Text
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobilePlayersMonTrade2Text:
|
|
|
|
|
text_far _MobilePlayersMonTrade2Text
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108c40:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $90
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [hWY], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wcf65]
|
2015-12-25 20:34:33 -08:00
|
|
|
|
and %10000000
|
|
|
|
|
jr z, .Getmon
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobileTradeCameBackText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2016-04-10 11:42:14 -07:00
|
|
|
|
.Getmon:
|
2019-10-20 15:24:17 -07:00
|
|
|
|
ld hl, .MobileTakeGoodCareOfText
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call PrintText
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld c, 80
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call DelayFrames
|
|
|
|
|
ret
|
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobileTakeGoodCareOfText:
|
|
|
|
|
text_far _MobileTakeGoodCareOfText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2019-10-20 15:24:17 -07:00
|
|
|
|
.MobileTradeCameBackText:
|
|
|
|
|
text_far _MobileTradeCameBackText
|
2018-11-17 10:33:03 -08:00
|
|
|
|
text_end
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108c6d:
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeTilemapLZ
|
2015-11-20 08:47:52 -08:00
|
|
|
|
debgcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeTilemapLZ
|
2017-12-28 04:32:33 -08:00
|
|
|
|
debgcoord 0, 0, vBGMap1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
Function108c80:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeAttrmapLZ
|
2015-11-20 08:47:52 -08:00
|
|
|
|
debgcoord 0, 0
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
2020-02-27 11:33:30 -08:00
|
|
|
|
ld hl, MobileTradeAttrmapLZ
|
2017-12-28 04:32:33 -08:00
|
|
|
|
debgcoord 0, 0, vBGMap1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call Decompress
|
|
|
|
|
ld a, $0
|
2018-08-25 11:28:22 -07:00
|
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ret
|
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
|
DebugMobileTrade:
|
2017-12-21 08:56:33 -08:00
|
|
|
|
; localization error: NAME_LENGTH (11) should be NAME_LENGTH_JAPANESE (6) here
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld hl, .DebugTradeData
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld [wPlayerTrademonSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wPlayerTrademonSenderName
|
|
|
|
|
ld c, NAME_LENGTH
|
|
|
|
|
.your_name_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .your_name_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wPlayerTrademonID
|
|
|
|
|
ld c, 2
|
|
|
|
|
.your_id_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .your_id_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wPlayerTrademonOTName
|
|
|
|
|
ld c, NAME_LENGTH
|
|
|
|
|
.your_ot_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .your_ot_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ld a, [hli]
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld [wOTTrademonSpecies], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wOTTrademonSenderName
|
|
|
|
|
ld c, NAME_LENGTH
|
|
|
|
|
.their_name_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .their_name_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wOTTrademonID
|
|
|
|
|
ld c, 2
|
|
|
|
|
.their_id_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .their_id_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld de, wOTTrademonOTName
|
|
|
|
|
ld c, NAME_LENGTH
|
|
|
|
|
.their_ot_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [hli]
|
|
|
|
|
ld [de], a
|
|
|
|
|
inc de
|
|
|
|
|
dec c
|
2015-12-17 10:49:26 -08:00
|
|
|
|
jr nz, .their_ot_loop
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
|
2015-12-17 10:49:26 -08:00
|
|
|
|
.DebugTradeData:
|
|
|
|
|
db VENUSAUR
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "ゲーフり@@"
|
2015-12-17 10:49:26 -08:00
|
|
|
|
dw $0123
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "かびーん@@"
|
2015-12-17 10:49:26 -08:00
|
|
|
|
db CHARIZARD
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "クりーチャ@"
|
2015-12-17 10:49:26 -08:00
|
|
|
|
dw $0456
|
2015-02-10 19:15:15 -08:00
|
|
|
|
db "マツミヤ@@"
|
|
|
|
|
|
2019-09-02 17:04:23 -07:00
|
|
|
|
LoadMobileAdapterPalette:
|
2015-02-10 19:15:15 -08:00
|
|
|
|
ld a, [wc74e]
|
|
|
|
|
and $7f
|
2019-09-02 17:04:23 -07:00
|
|
|
|
cp $8 ; CONST: Amount of mobile adapters
|
2015-02-10 19:15:15 -08:00
|
|
|
|
jr c, .asm_108d12
|
|
|
|
|
ld a, $7
|
|
|
|
|
|
|
|
|
|
.asm_108d12
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 1 palettes
|
2019-09-02 17:04:23 -07:00
|
|
|
|
ld hl, MobileAdapterPalettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call AddNTimes
|
2019-09-02 17:04:23 -07:00
|
|
|
|
ld a, BANK(wBGPals1)
|
2018-01-01 06:08:21 -08:00
|
|
|
|
ld de, wBGPals1 + 4 palettes
|
2015-12-17 10:49:26 -08:00
|
|
|
|
ld bc, 1 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
|
call FarCopyWRAM
|
|
|
|
|
ret
|
|
|
|
|
|
2020-02-27 11:33:30 -08:00
|
|
|
|
MobileTradeSpritesGFX:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_trade_sprites.2bpp.lz"
|
|
|
|
|
|
|
|
|
|
MobileTradeGFX:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_trade.2bpp.lz"
|
|
|
|
|
|
|
|
|
|
MobileTradeTilemapLZ:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_trade.tilemap.lz"
|
|
|
|
|
|
|
|
|
|
MobileTradeAttrmapLZ:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_trade.attrmap.lz"
|
|
|
|
|
|
|
|
|
|
UnusedMobilePulsePalettes:
|
|
|
|
|
INCLUDE "gfx/mobile/unused_mobile_pulses.pal"
|
|
|
|
|
|
|
|
|
|
MobileTradeBGPalettes:
|
|
|
|
|
INCLUDE "gfx/mobile/mobile_trade_bg.pal"
|
|
|
|
|
|
|
|
|
|
MobileTradeOB1Palettes:
|
|
|
|
|
INCLUDE "gfx/mobile/mobile_trade_ob1.pal"
|
|
|
|
|
|
|
|
|
|
MobileTradeOB2Palettes:
|
|
|
|
|
INCLUDE "gfx/mobile/mobile_trade_ob2.pal"
|
|
|
|
|
|
|
|
|
|
MobileCable1GFX:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_cable_1.2bpp"
|
|
|
|
|
|
|
|
|
|
MobileCable2GFX:
|
|
|
|
|
INCBIN "gfx/mobile/mobile_cable_2.2bpp"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
2019-09-02 17:04:23 -07:00
|
|
|
|
MobileAdapterPalettes:
|
2020-02-27 11:33:30 -08:00
|
|
|
|
INCLUDE "gfx/mobile/mobile_adapters.pal"
|