mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Some Mobile code labeling and removed magic numbers (#993)
* Macro loop for EmptyAllSRAMBanks * Many things labeled and magic numbers removed * Conform to the style guide * Rename URLs in mobile_46 * MOBILEAPI_19 -> MOBILEAPI_TELEPHONESTATUS * Update engine/menus/empty_sram.asm Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> * Update ram/wram.asm Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> * Update mobile/mobile_46.asm Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> * Update mobile/mobile_46.asm Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> * Remove underscore from Set*DownloadURL symbols * Begin Labeling TradeCornerHoldMon routines * Add wMobileMon party_struct * Add TRADE_CORNER_REQUEST_LENGTH constant * Name battle tower action functions * Label trade corner send/receive buffer * Label the saved copy of the trade corner pokemon also fix mailmsg_jp * So many copies of decodeBase64Character * Label another buffer * Fix Alignment and use MOBILE_EMAIL_LENGTH * `Function11ad8a` -> `MobileIncJumptableIndex` * Apply Rangi Suggestions pass 1 Co-Authored-By: Rangi <35663410+Rangi42@users.noreply.github.com> * Apply Suggestions 2 Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com> Co-authored-by: vulcandth <vulcandth@gmail.com>
This commit is contained in:
parent
41d5ea0482
commit
0f5540740b
@ -53,10 +53,11 @@ DEF MAX_PC_ITEMS EQU 50
|
|||||||
DEF MAX_ITEM_STACK EQU 99
|
DEF MAX_ITEM_STACK EQU 99
|
||||||
|
|
||||||
; mail
|
; mail
|
||||||
DEF MAIL_LINE_LENGTH EQU $10
|
DEF MAIL_LINE_LENGTH EQU $10
|
||||||
DEF MAIL_MSG_LENGTH EQU $20
|
DEF MAIL_MSG_LENGTH EQU $20
|
||||||
DEF MAILBOX_CAPACITY EQU 10
|
DEF MAILBOX_CAPACITY EQU 10
|
||||||
DEF MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
|
DEF MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
|
||||||
|
DEF MAIL_STRUCT_LENGTH_JP EQU $2a ; mailmsg_jp struct
|
||||||
|
|
||||||
; held item effects
|
; held item effects
|
||||||
const_def
|
const_def
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
const MOBILEAPI_16
|
const MOBILEAPI_16
|
||||||
const MOBILEAPI_17
|
const MOBILEAPI_17
|
||||||
const MOBILEAPI_SETTIMER
|
const MOBILEAPI_SETTIMER
|
||||||
const MOBILEAPI_19
|
const MOBILEAPI_TELEPHONESTATUS
|
||||||
const MOBILEAPI_1A
|
const MOBILEAPI_1A
|
||||||
const MOBILEAPI_1B
|
const MOBILEAPI_1B
|
||||||
const MOBILEAPI_1C
|
const MOBILEAPI_1C
|
||||||
@ -61,3 +61,10 @@ DEF MOBILE_PHONE_NUMBER_LENGTH EQU 20
|
|||||||
; Maximum amount of time allowed for mobile battles each day
|
; Maximum amount of time allowed for mobile battles each day
|
||||||
DEF MOBILE_BATTLE_ALLOWED_SECONDS EQU 0
|
DEF MOBILE_BATTLE_ALLOWED_SECONDS EQU 0
|
||||||
DEF MOBILE_BATTLE_ALLOWED_MINUTES EQU 10
|
DEF MOBILE_BATTLE_ALLOWED_MINUTES EQU 10
|
||||||
|
|
||||||
|
; Trade corner request size
|
||||||
|
; DION addr $1e + request $8 + Name $5
|
||||||
|
; + party struct $30 + OT $5 + NICK $5
|
||||||
|
; + JP Mail struct $2a
|
||||||
|
DEF MOBILE_EMAIL_LENGTH EQU $1e
|
||||||
|
DEF TRADE_CORNER_REQUEST_LENGTH EQU $8f
|
||||||
|
@ -123,7 +123,7 @@ SpecialsPointers::
|
|||||||
|
|
||||||
; Crystal only
|
; Crystal only
|
||||||
add_special Function11ac3e
|
add_special Function11ac3e
|
||||||
add_special Function11b444
|
add_special TradeCornerHoldMon
|
||||||
add_special Function11b5e8
|
add_special Function11b5e8
|
||||||
add_special Function11b7e5
|
add_special Function11b7e5
|
||||||
add_special Function11b879
|
add_special Function11b879
|
||||||
|
@ -858,31 +858,31 @@ BattleTowerAction:
|
|||||||
dw BattleTowerAction_GetChallengeState
|
dw BattleTowerAction_GetChallengeState
|
||||||
dw BattleTowerAction_SetByteToQuickSaveChallenge
|
dw BattleTowerAction_SetByteToQuickSaveChallenge
|
||||||
dw BattleTowerAction_SetByteToCancelChallenge
|
dw BattleTowerAction_SetByteToCancelChallenge
|
||||||
dw Function1707ac
|
dw BattleTowerAction_05
|
||||||
dw Function1707f4
|
dw BattleTowerAction_06
|
||||||
dw SaveBattleTowerLevelGroup
|
dw SaveBattleTowerLevelGroup
|
||||||
dw LoadBattleTowerLevelGroup
|
dw LoadBattleTowerLevelGroup
|
||||||
dw BattleTower_CheckSaveFileExistsAndIsYours
|
dw BattleTower_CheckSaveFileExistsAndIsYours
|
||||||
dw Function1708b1
|
dw BattleTowerAction_0A
|
||||||
dw CheckMobileEventIndex
|
dw CheckMobileEventIndex
|
||||||
dw Function1708c8
|
dw BattleTowerAction_0C
|
||||||
dw Function1708f0
|
dw BattleTowerAction_0D
|
||||||
dw BattleTowerAction_EggTicket
|
dw BattleTowerAction_EggTicket
|
||||||
dw Function1709aa
|
dw BattleTowerAction_0F
|
||||||
dw Function1709bb
|
dw BattleTowerAction_10
|
||||||
dw Function170a9c
|
dw BattleTowerAction_11
|
||||||
dw Function170aa0
|
dw BattleTowerAction_12
|
||||||
dw Function170aaf
|
dw BattleTowerAction_13
|
||||||
dw Function170abe
|
dw BattleTowerAction_14
|
||||||
dw Function170ad7
|
dw BattleTowerAction_15
|
||||||
dw Function170807
|
dw BattleTowerAction_16
|
||||||
dw Function17081d
|
dw BattleTowerAction_17
|
||||||
dw BattleTowerAction_LevelCheck
|
dw BattleTowerAction_LevelCheck
|
||||||
dw BattleTowerAction_UbersCheck
|
dw BattleTowerAction_UbersCheck
|
||||||
dw ResetBattleTowerTrainersSRAM
|
dw ResetBattleTowerTrainersSRAM
|
||||||
dw BattleTower_GiveReward
|
dw BattleTower_GiveReward
|
||||||
dw Function17071b
|
dw BattleTowerAction_1C
|
||||||
dw Function170729
|
dw BattleTowerAction_1D
|
||||||
dw BattleTower_RandomlyChooseReward
|
dw BattleTower_RandomlyChooseReward
|
||||||
dw BattleTower_SaveOptions
|
dw BattleTower_SaveOptions
|
||||||
|
|
||||||
@ -932,7 +932,7 @@ BattleTower_GiveReward:
|
|||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17071b:
|
BattleTowerAction_1C:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, BATTLETOWER_WON_CHALLENGE
|
ld a, BATTLETOWER_WON_CHALLENGE
|
||||||
@ -940,7 +940,7 @@ Function17071b:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170729:
|
BattleTowerAction_1D:
|
||||||
ld a, BANK(sBattleTowerChallengeState)
|
ld a, BANK(sBattleTowerChallengeState)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, BATTLETOWER_RECEIVED_REWARD
|
ld a, BATTLETOWER_RECEIVED_REWARD
|
||||||
@ -1019,7 +1019,7 @@ SetBattleTowerChallengeState:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1707ac:
|
BattleTowerAction_05:
|
||||||
ld a, BANK(s5_aa8c) ; aka BANK(s5_be46)
|
ld a, BANK(s5_aa8c) ; aka BANK(s5_be46)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [s5_aa8c]
|
ld a, [s5_aa8c]
|
||||||
@ -1060,7 +1060,7 @@ Function1707ac:
|
|||||||
ld a, 8
|
ld a, 8
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
|
|
||||||
Function1707f4:
|
BattleTowerAction_06:
|
||||||
ld a, BANK(s5_be46) ; aka BANK(s5_aa8b) and BANK(s5_aa8c)
|
ld a, BANK(s5_be46) ; aka BANK(s5_aa8b) and BANK(s5_aa8c)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
@ -1070,7 +1070,7 @@ Function1707f4:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170807:
|
BattleTowerAction_16:
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
@ -1081,7 +1081,7 @@ Function170807:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17081d:
|
BattleTowerAction_17:
|
||||||
xor a
|
xor a
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa)
|
||||||
@ -1168,13 +1168,13 @@ BattleTower_CheckSaveFileExistsAndIsYours:
|
|||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1708b1: ; BattleTowerAction $0a
|
BattleTowerAction_0A:
|
||||||
xor a
|
xor a
|
||||||
ld [wMusicFade], a
|
ld [wMusicFade], a
|
||||||
call MaxVolume
|
call MaxVolume
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
CheckMobileEventIndex: ; something to do with GS Ball
|
||||||
ld a, BANK(sMobileEventIndex)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [sMobileEventIndex]
|
ld a, [sMobileEventIndex]
|
||||||
@ -1182,7 +1182,7 @@ CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1708c8: ; BattleTowerAction $0c
|
BattleTowerAction_0C:
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, BANK(s5_aa8b) ; aka BANK(s5_aa8c), BANK(s5_aa5d), BANK(s5_aa48), and BANK(s5_aa47)
|
ld a, BANK(s5_aa8b) ; aka BANK(s5_aa8c), BANK(s5_aa5d), BANK(s5_aa48), and BANK(s5_aa47)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
@ -1201,7 +1201,7 @@ Function1708c8: ; BattleTowerAction $0c
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1708f0: ; BattleTowerAction $0d
|
BattleTowerAction_0D:
|
||||||
xor a ; FALSE
|
xor a ; FALSE
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
@ -1239,7 +1239,7 @@ Function170923:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleTowerAction_EggTicket: ; BattleTowerAction $0e
|
BattleTowerAction_EggTicket:
|
||||||
xor a ; FALSE
|
xor a ; FALSE
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, EGG_TICKET
|
ld a, EGG_TICKET
|
||||||
@ -1309,7 +1309,7 @@ endr
|
|||||||
String_MysteryJP:
|
String_MysteryJP:
|
||||||
db "なぞナゾ@@" ; MYSTERY
|
db "なぞナゾ@@" ; MYSTERY
|
||||||
|
|
||||||
Function1709aa: ; BattleTowerAction $0f
|
BattleTowerAction_0F:
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(w3_d090)
|
ld a, BANK(w3_d090)
|
||||||
@ -1320,7 +1320,7 @@ Function1709aa: ; BattleTowerAction $0f
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1709bb: ; BattleTowerAction $10
|
BattleTowerAction_10:
|
||||||
xor a ; FALSE
|
xor a ; FALSE
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, BANK(s5_a800)
|
ld a, BANK(s5_a800)
|
||||||
@ -1366,15 +1366,15 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.Action4:
|
.Action4:
|
||||||
ld a, BANK(s5_b023) ; aka BANK(s5_a825) and BANK(s5_a826)
|
ld a, BANK(s5_b023) ; aka BANK(sOfferReqGender) and BANK(sOfferReqSpecies)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, s5_b023
|
ld hl, s5_b023
|
||||||
ld de, wc608
|
ld de, wc608
|
||||||
ld bc, 105
|
ld bc, 105
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [s5_a825]
|
ld a, [sOfferReqGender]
|
||||||
ld [wcd30], a
|
ld [wcd30], a
|
||||||
ld a, [s5_a826]
|
ld a, [sOfferReqSpecies]
|
||||||
ld [wcd31], a
|
ld [wcd31], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
farcall Function11b6b4
|
farcall Function11b6b4
|
||||||
@ -1444,11 +1444,11 @@ Function1709bb: ; BattleTowerAction $10
|
|||||||
.no_scene_2
|
.no_scene_2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170a9c:
|
BattleTowerAction_11:
|
||||||
ld c, FALSE
|
ld c, FALSE
|
||||||
jr Set_s5_aa8d
|
jr Set_s5_aa8d
|
||||||
|
|
||||||
Function170aa0:
|
BattleTowerAction_12:
|
||||||
ld c, TRUE
|
ld c, TRUE
|
||||||
Set_s5_aa8d:
|
Set_s5_aa8d:
|
||||||
ld a, BANK(s5_aa8d)
|
ld a, BANK(s5_aa8d)
|
||||||
@ -1458,7 +1458,7 @@ Set_s5_aa8d:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170aaf:
|
BattleTowerAction_13:
|
||||||
ld a, BANK(s5_aa8d)
|
ld a, BANK(s5_aa8d)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [s5_aa8d]
|
ld a, [s5_aa8d]
|
||||||
@ -1466,7 +1466,7 @@ Function170aaf:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170abe:
|
BattleTowerAction_14:
|
||||||
call BattleTower_CheckSaveFileExistsAndIsYours
|
call BattleTower_CheckSaveFileExistsAndIsYours
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
and a
|
and a
|
||||||
@ -1480,7 +1480,7 @@ Function170abe:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170ad7:
|
BattleTowerAction_15:
|
||||||
ld a, BANK(sBattleTowerSaveFileFlags)
|
ld a, BANK(sBattleTowerSaveFileFlags)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [sBattleTowerSaveFileFlags]
|
ld a, [sBattleTowerSaveFileFlags]
|
||||||
|
@ -58,12 +58,12 @@ _GiveOddEgg:
|
|||||||
|
|
||||||
; load species in wMobileMonSpecies
|
; load species in wMobileMonSpecies
|
||||||
ld a, EGG
|
ld a, EGG
|
||||||
ld [wMobileMonSpecies], a
|
ld [wMobileMonMiscSpecies], a
|
||||||
|
|
||||||
; load pointer to (wMobileMonSpecies - 1) in wMobileMonSpeciesPointer
|
; load pointer to (wMobileMonSpecies - 1) in wMobileMonSpeciesPointer
|
||||||
ld a, LOW(wMobileMonSpecies - 1)
|
ld a, LOW(wMobileMonMiscSpecies - 1)
|
||||||
ld [wMobileMonSpeciesPointer], a
|
ld [wMobileMonSpeciesPointer], a
|
||||||
ld a, HIGH(wMobileMonSpecies - 1)
|
ld a, HIGH(wMobileMonMiscSpecies - 1)
|
||||||
ld [wMobileMonSpeciesPointer + 1], a
|
ld [wMobileMonSpeciesPointer + 1], a
|
||||||
; load pointer to wOddEgg in wMobileMonStructPointer
|
; load pointer to wOddEgg in wMobileMonStructPointer
|
||||||
ld a, LOW(wOddEgg)
|
ld a, LOW(wOddEgg)
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
EmptyAllSRAMBanks:
|
EmptyAllSRAMBanks:
|
||||||
ld a, 0
|
for x, NUM_SRAM_BANKS
|
||||||
call .EmptyBank
|
ld a, x
|
||||||
ld a, 1
|
|
||||||
call .EmptyBank
|
|
||||||
ld a, 2
|
|
||||||
call .EmptyBank
|
|
||||||
ld a, 3
|
|
||||||
call .EmptyBank
|
call .EmptyBank
|
||||||
|
endr
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.EmptyBank:
|
.EmptyBank:
|
||||||
|
@ -342,6 +342,8 @@ WRAMX 2
|
|||||||
"Pic Animations"
|
"Pic Animations"
|
||||||
WRAMX 3
|
WRAMX 3
|
||||||
"Battle Tower RAM"
|
"Battle Tower RAM"
|
||||||
|
WRAMX 4
|
||||||
|
"News Script RAM"
|
||||||
WRAMX 5
|
WRAMX 5
|
||||||
align 8
|
align 8
|
||||||
"GBC Video"
|
"GBC Video"
|
||||||
|
@ -163,7 +163,7 @@ _MobileAPI::
|
|||||||
dw Function1111fe
|
dw Function1111fe
|
||||||
dw Function1113fe
|
dw Function1113fe
|
||||||
dw MobileAPI_SetTimer
|
dw MobileAPI_SetTimer
|
||||||
dw Function111541
|
dw MobileAPI_TelephoneStatus
|
||||||
dw Function111596
|
dw Function111596
|
||||||
dw Function11162d
|
dw Function11162d
|
||||||
dw Function11032c
|
dw Function11032c
|
||||||
@ -507,9 +507,9 @@ Function110291:
|
|||||||
ld c, a
|
ld c, a
|
||||||
call MobileAPI_SetTimer
|
call MobileAPI_SetTimer
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $72
|
ld a, LOW(wc872)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc872)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld de, wMobileSDK_PacketBuffer
|
ld de, wMobileSDK_PacketBuffer
|
||||||
ld b, MobilePacket_WriteConfigurationData.End - MobilePacket_WriteConfigurationData
|
ld b, MobilePacket_WriteConfigurationData.End - MobilePacket_WriteConfigurationData
|
||||||
@ -550,7 +550,7 @@ Function110291:
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wc880], a
|
ld [wc880], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wc881], a
|
ld [wc880 + 1], a
|
||||||
ld b, c
|
ld b, c
|
||||||
inc b
|
inc b
|
||||||
call Function111f63
|
call Function111f63
|
||||||
@ -663,13 +663,13 @@ Function1103ac:
|
|||||||
jr c, .asm_1103d2
|
jr c, .asm_1103d2
|
||||||
ld c, $12
|
ld c, $12
|
||||||
call Function11039a
|
call Function11039a
|
||||||
jr nc, .asm_1103d6
|
jr nc, .isp_login
|
||||||
|
|
||||||
.asm_1103d2
|
.asm_1103d2
|
||||||
pop hl
|
pop hl
|
||||||
jp Function110231
|
jp Function110231
|
||||||
|
|
||||||
.asm_1103d6
|
.isp_login
|
||||||
xor a
|
xor a
|
||||||
ldh [rTAC], a
|
ldh [rTAC], a
|
||||||
ld [wc86d], a
|
ld [wc86d], a
|
||||||
@ -678,11 +678,11 @@ Function1103ac:
|
|||||||
ld c, a
|
ld c, a
|
||||||
call MobileAPI_SetTimer
|
call MobileAPI_SetTimer
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Function110485
|
call Mobile_DialTelephone
|
||||||
push hl
|
push hl
|
||||||
ld b, a
|
ld b, a
|
||||||
call Function111f63
|
call Function111f63
|
||||||
@ -743,9 +743,9 @@ Function110438:
|
|||||||
ld c, a
|
ld c, a
|
||||||
call MobileAPI_SetTimer
|
call MobileAPI_SetTimer
|
||||||
ld hl, wc98f
|
ld hl, wc98f
|
||||||
ld a, $81
|
ld a, LOW(wc880 + 1)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880 + 1)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -754,7 +754,7 @@ Function110438:
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
call Function110485
|
call Mobile_DialTelephone
|
||||||
ld b, a
|
ld b, a
|
||||||
call Function111f63
|
call Function111f63
|
||||||
call Function1104b0
|
call Function1104b0
|
||||||
@ -762,7 +762,7 @@ Function110438:
|
|||||||
ld [wc86a], a
|
ld [wc86a], a
|
||||||
jr Function110432
|
jr Function110432
|
||||||
|
|
||||||
Function110485:
|
Mobile_DialTelephone:
|
||||||
ld de, wMobileSDK_PacketBuffer
|
ld de, wMobileSDK_PacketBuffer
|
||||||
ld hl, MobilePacket_DialTelephone
|
ld hl, MobilePacket_DialTelephone
|
||||||
ld b, MobilePacket_DialTelephone.End - MobilePacket_DialTelephone
|
ld b, MobilePacket_DialTelephone.End - MobilePacket_DialTelephone
|
||||||
@ -924,16 +924,16 @@ Function110596:
|
|||||||
ld a, e
|
ld a, e
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wc819], a
|
ld [wc819], a
|
||||||
ld a, [wc870]
|
ld a, [wc870]
|
||||||
ld c, a
|
ld c, a
|
||||||
call MobileAPI_SetTimer
|
call MobileAPI_SetTimer
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call Function1104b0
|
call Function1104b0
|
||||||
ld a, [wcb36]
|
ld a, [wcb36]
|
||||||
@ -958,9 +958,9 @@ Function1105dd:
|
|||||||
ld c, a
|
ld c, a
|
||||||
call MobileAPI_SetTimer
|
call MobileAPI_SetTimer
|
||||||
ld hl, wc98f
|
ld hl, wc98f
|
||||||
ld a, $81
|
ld a, LOW(wc880 + 1)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880 + 1)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -999,9 +999,9 @@ Function110615:
|
|||||||
push bc
|
push bc
|
||||||
ld [wMobileSDK_PacketBuffer + 91], a
|
ld [wMobileSDK_PacketBuffer + 91], a
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $9d
|
ld a, LOW(wMobileSDK_PacketBuffer + 86)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $cb
|
ld a, HIGH(wMobileSDK_PacketBuffer + 86)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
xor a
|
xor a
|
||||||
ld [wMobileSDK_PacketBuffer + 90], a
|
ld [wMobileSDK_PacketBuffer + 90], a
|
||||||
@ -1258,7 +1258,7 @@ Function1107ff:
|
|||||||
ld a, b
|
ld a, b
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
call Function112724
|
call Function112724
|
||||||
ld hl, wc98a
|
ld hl, wc98a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1448,7 +1448,7 @@ Function1109a4:
|
|||||||
ld a, e
|
ld a, e
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
xor a
|
xor a
|
||||||
ld [wc86b], a
|
ld [wc86b], a
|
||||||
call Function112729
|
call Function112729
|
||||||
@ -1488,7 +1488,7 @@ Function1109f9:
|
|||||||
ld a, e
|
ld a, e
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
ld a, l
|
ld a, l
|
||||||
or h
|
or h
|
||||||
jp z, Function110231
|
jp z, Function110231
|
||||||
@ -1542,7 +1542,7 @@ Function110a5b:
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
ld hl, wc827
|
ld hl, wc827
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1562,9 +1562,9 @@ Function110a5b:
|
|||||||
ld a, b
|
ld a, b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1621,7 +1621,7 @@ Function110af4:
|
|||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
jr z, .asm_110b5c
|
jr z, .asm_110b5c
|
||||||
dec bc
|
dec bc
|
||||||
dec bc
|
dec bc
|
||||||
@ -1664,7 +1664,7 @@ Function110af4:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
pop bc
|
pop bc
|
||||||
@ -1710,7 +1710,7 @@ Function110af4:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
@ -1769,7 +1769,7 @@ Function110af4:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
ld hl, wc827
|
ld hl, wc827
|
||||||
@ -1795,13 +1795,13 @@ Function110af4:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wc829], a
|
ld [wc829], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc82a], a
|
ld [wc829 + 1], a
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [wc993]
|
ld a, [wc993]
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -1829,7 +1829,7 @@ Function110c3c:
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
call Function112729
|
call Function112729
|
||||||
ld de, wMobileSDK_PacketBuffer
|
ld de, wMobileSDK_PacketBuffer
|
||||||
ld hl, MobilePacket_TransferData
|
ld hl, MobilePacket_TransferData
|
||||||
@ -1882,7 +1882,7 @@ Function110c9e:
|
|||||||
ld a, l
|
ld a, l
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
ld hl, wc827
|
ld hl, wc827
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1902,9 +1902,9 @@ Function110c9e:
|
|||||||
ld a, b
|
ld a, b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -2136,10 +2136,10 @@ Function110ddd:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
cp l
|
cp l
|
||||||
jr nz, .asm_110e4a
|
jr nz, .asm_110e4a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
cp h
|
cp h
|
||||||
jr z, .asm_110dfd
|
jr z, .asm_110dfd
|
||||||
|
|
||||||
@ -2403,7 +2403,7 @@ Function111044:
|
|||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
dec bc
|
dec bc
|
||||||
dec bc
|
dec bc
|
||||||
jp z, Function1111ca
|
jp z, Function1111ca
|
||||||
@ -2438,7 +2438,7 @@ Function111044:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
pop bc
|
pop bc
|
||||||
@ -2492,7 +2492,7 @@ Function111044:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
@ -2508,7 +2508,7 @@ Function111044:
|
|||||||
ld hl, wc821
|
ld hl, wc821
|
||||||
res 2, [hl]
|
res 2, [hl]
|
||||||
ld a, [wMobileSDK_ReceivePacketBuffer]
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
||||||
cp $9f
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
||||||
jr z, .asm_111144
|
jr z, .asm_111144
|
||||||
ld de, $000b
|
ld de, $000b
|
||||||
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
ld a, MOBILE_COMMAND_TRANSFER_DATA | $80
|
||||||
@ -2582,7 +2582,7 @@ Function11115f:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
@ -2621,7 +2621,7 @@ Function11115f:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld b, c
|
ld b, c
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
@ -2715,10 +2715,10 @@ endr
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
cp l
|
cp l
|
||||||
jr nz, .asm_111251
|
jr nz, .asm_111251
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
cp h
|
cp h
|
||||||
jp z, Function1113f7
|
jp z, Function1113f7
|
||||||
|
|
||||||
@ -3231,7 +3231,7 @@ Function11148c:
|
|||||||
Function111540:
|
Function111540:
|
||||||
nop
|
nop
|
||||||
|
|
||||||
Function111541:
|
MobileAPI_TelephoneStatus:
|
||||||
ld hl, wc821
|
ld hl, wc821
|
||||||
bit 0, [hl]
|
bit 0, [hl]
|
||||||
jp nz, Function110226
|
jp nz, Function110226
|
||||||
@ -3242,7 +3242,7 @@ Function111541:
|
|||||||
ld a, e
|
ld a, e
|
||||||
ld [wc86e], a
|
ld [wc86e], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wc86f], a
|
ld [wc86e + 1], a
|
||||||
ld a, [wc807]
|
ld a, [wc807]
|
||||||
cp $2
|
cp $2
|
||||||
jr c, .asm_111582
|
jr c, .asm_111582
|
||||||
@ -3331,9 +3331,9 @@ Function1115e4:
|
|||||||
or a
|
or a
|
||||||
ld a, [wMobileSDK_ReceivePacketBuffer]
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
||||||
jr z, .asm_111609
|
jr z, .asm_111609
|
||||||
cp $9f
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
||||||
jr z, .asm_11160d
|
jr z, .asm_11160d
|
||||||
cp $a4
|
cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION | $80
|
||||||
jr z, .asm_11160d
|
jr z, .asm_11160d
|
||||||
.asm_111601
|
.asm_111601
|
||||||
call Function112430
|
call Function112430
|
||||||
@ -3862,7 +3862,7 @@ _Timer::
|
|||||||
jr nz, .asm_11199c
|
jr nz, .asm_11199c
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $1
|
cp $1
|
||||||
jp z, Function1119f0
|
jp z, Function1119f0_BeginSession
|
||||||
cp $a
|
cp $a
|
||||||
jr z, .asm_111984
|
jr z, .asm_111984
|
||||||
cp $8
|
cp $8
|
||||||
@ -3936,7 +3936,7 @@ _Timer::
|
|||||||
ld [wc80f], a
|
ld [wc80f], a
|
||||||
jr .asm_1119a9
|
jr .asm_1119a9
|
||||||
|
|
||||||
Function1119f0:
|
Function1119f0_BeginSession:
|
||||||
ld a, MOBILE_COMMAND_BEGIN_SESSION | $80
|
ld a, MOBILE_COMMAND_BEGIN_SESSION | $80
|
||||||
ld [wMobileSDK_SendCommandID], a
|
ld [wMobileSDK_SendCommandID], a
|
||||||
ld [wc808], a
|
ld [wc808], a
|
||||||
@ -4100,7 +4100,7 @@ Function111abd:
|
|||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wc810], a
|
ld [wc810], a
|
||||||
xor a
|
xor a
|
||||||
ld [wc811], a
|
ld [wc810 + 1], a
|
||||||
.asm_111b1c
|
.asm_111b1c
|
||||||
ld a, $f1
|
ld a, $f1
|
||||||
jp Function111a42
|
jp Function111a42
|
||||||
@ -4250,7 +4250,7 @@ Function111c17:
|
|||||||
ld a, [wMobileSDK_ReceivePacketBuffer]
|
ld a, [wMobileSDK_ReceivePacketBuffer]
|
||||||
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
cp MOBILE_COMMAND_TRANSFER_DATA_END | $80
|
||||||
jp z, Function111d07
|
jp z, Function111d07
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
or b
|
or b
|
||||||
@ -4374,7 +4374,7 @@ Function111cc2:
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
ld hl, wMobileSDK_ReceivePacketBuffer + 5
|
||||||
ld a, c
|
ld a, c
|
||||||
@ -4412,7 +4412,7 @@ Function111d07:
|
|||||||
Function111d23:
|
Function111d23:
|
||||||
ld a, [wc829]
|
ld a, [wc829]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc82a]
|
ld a, [wc829 + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
ld hl, wMobileSDK_ReceivePacketBuffer + 4
|
||||||
ld b, $4
|
ld b, $4
|
||||||
@ -4817,35 +4817,35 @@ Function111f97:
|
|||||||
ret nz
|
ret nz
|
||||||
ld a, [wc807]
|
ld a, [wc807]
|
||||||
cp $2
|
cp $2
|
||||||
jr c, .asm_111fcb
|
jr c, .done
|
||||||
cp $5
|
cp $5
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
cp $6
|
cp $6
|
||||||
jr nz, .asm_111fcd
|
jr nz, .hang_up
|
||||||
ld a, [wc80f]
|
ld a, [wc80f]
|
||||||
cp $22
|
cp $22
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
cp $23
|
cp $23
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
cp $26
|
cp $26
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
cp $0
|
cp $0
|
||||||
jr z, .asm_111fcb
|
jr z, .done
|
||||||
cp $8
|
cp $8
|
||||||
jr nz, .asm_111fcd
|
jr nz, .hang_up
|
||||||
.asm_111fcb
|
.done
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
.asm_111fcd
|
.hang_up
|
||||||
ld b, $5
|
ld b, $5
|
||||||
ld hl, wMobileSDK_SendCommandID
|
ld hl, wMobileSDK_SendCommandID
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .asm_111fe9
|
jr z, .begin_session
|
||||||
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, MobilePacket_TelephoneStatus
|
ld hl, MobilePacket_TelephoneStatus
|
||||||
@ -4854,7 +4854,7 @@ Function111f97:
|
|||||||
ld hl, wc822
|
ld hl, wc822
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ret
|
ret
|
||||||
.asm_111fe9
|
.begin_session
|
||||||
ld hl, MobilePacket_BeginSession
|
ld hl, MobilePacket_BeginSession
|
||||||
ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession
|
ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession
|
||||||
jp PacketSendBytes
|
jp PacketSendBytes
|
||||||
@ -5077,7 +5077,7 @@ Function1121f6:
|
|||||||
ld a, [wMobileSDK_AdapterType]
|
ld a, [wMobileSDK_AdapterType]
|
||||||
or a
|
or a
|
||||||
jr z, .asm_112206
|
jr z, .asm_112206
|
||||||
jr Function112269
|
jr Mobile_EndSession
|
||||||
|
|
||||||
.asm_112206
|
.asm_112206
|
||||||
ld a, $10
|
ld a, $10
|
||||||
@ -5151,7 +5151,7 @@ Function11225d:
|
|||||||
ld hl, wc821
|
ld hl, wc821
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function112269:
|
Mobile_EndSession:
|
||||||
ld a, MOBILE_COMMAND_END_SESSION | $80
|
ld a, MOBILE_COMMAND_END_SESSION | $80
|
||||||
ld hl, MobilePacket_EndSession
|
ld hl, MobilePacket_EndSession
|
||||||
jp PacketSendEmptyBody
|
jp PacketSendEmptyBody
|
||||||
@ -5180,9 +5180,9 @@ Function112271:
|
|||||||
|
|
||||||
.asm_112292
|
.asm_112292
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $e0
|
ld a, LOW(wc8ca + 22)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc8ca + 22)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld hl, MobilePacket_ReadConfigurationDataPart2
|
ld hl, MobilePacket_ReadConfigurationDataPart2
|
||||||
jp Function11236b
|
jp Function11236b
|
||||||
@ -5190,10 +5190,10 @@ Function112271:
|
|||||||
.asm_1122a1
|
.asm_1122a1
|
||||||
ld hl, wc880
|
ld hl, wc880
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $4d
|
cp "M"
|
||||||
jr nz, .asm_1122f5
|
jr nz, .asm_1122f5
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp $41
|
cp "A"
|
||||||
jr nz, .asm_1122f5
|
jr nz, .asm_1122f5
|
||||||
ld b, $be
|
ld b, $be
|
||||||
ld de, 0
|
ld de, 0
|
||||||
@ -5247,7 +5247,7 @@ Function112271:
|
|||||||
.asm_112301
|
.asm_112301
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wc86b], a
|
ld [wc86b], a
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_112309
|
.asm_112309
|
||||||
ld a, [wc821]
|
ld a, [wc821]
|
||||||
@ -5266,7 +5266,7 @@ Function112271:
|
|||||||
ld [wc872], a
|
ld [wc872], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wc86b], a
|
ld [wc86b], a
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_112326
|
.asm_112326
|
||||||
ld d, a
|
ld d, a
|
||||||
@ -5301,9 +5301,9 @@ Function11234b:
|
|||||||
|
|
||||||
Function11235a:
|
Function11235a:
|
||||||
ld hl, wc86e
|
ld hl, wc86e
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80
|
||||||
ld hl, MobilePacket_TelephoneStatus
|
ld hl, MobilePacket_TelephoneStatus
|
||||||
@ -5342,7 +5342,7 @@ Function112373:
|
|||||||
.asm_112393
|
.asm_112393
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wc86b], a
|
ld [wc86b], a
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_11239b
|
.asm_11239b
|
||||||
ld hl, wc822
|
ld hl, wc822
|
||||||
@ -5361,7 +5361,7 @@ Function112373:
|
|||||||
|
|
||||||
Function1123b6:
|
Function1123b6:
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_1123be
|
jr z, .wait_for_call
|
||||||
dec a
|
dec a
|
||||||
jr z, .asm_1123c6
|
jr z, .asm_1123c6
|
||||||
ret
|
ret
|
||||||
@ -5369,7 +5369,7 @@ Function1123b6:
|
|||||||
.asm_1123bd
|
.asm_1123bd
|
||||||
dec [hl]
|
dec [hl]
|
||||||
|
|
||||||
.asm_1123be
|
.wait_for_call
|
||||||
ld a, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80
|
ld a, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80
|
||||||
ld hl, MobilePacket_WaitForTelephoneCall
|
ld hl, MobilePacket_WaitForTelephoneCall
|
||||||
jp PacketSendEmptyBody
|
jp PacketSendEmptyBody
|
||||||
@ -5429,7 +5429,7 @@ Function1123e1:
|
|||||||
jp PacketSendEmptyBody
|
jp PacketSendEmptyBody
|
||||||
|
|
||||||
.asm_11241e
|
.asm_11241e
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_112421
|
.asm_112421
|
||||||
ld hl, wc822
|
ld hl, wc822
|
||||||
@ -5688,9 +5688,9 @@ Function1125c7:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
inc de
|
inc de
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec bc
|
dec bc
|
||||||
dec bc
|
dec bc
|
||||||
@ -5883,9 +5883,9 @@ Function112729:
|
|||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc880)
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, $80
|
ld a, LOW(wc880)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop hl
|
pop hl
|
||||||
ret
|
ret
|
||||||
@ -6158,7 +6158,7 @@ Function1128db:
|
|||||||
cp $9f
|
cp $9f
|
||||||
jp z, Function1127cd
|
jp z, Function1127cd
|
||||||
call Function113482
|
call Function113482
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
or a
|
or a
|
||||||
jr nz, .asm_112901
|
jr nz, .asm_112901
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -6390,7 +6390,7 @@ Function112a56:
|
|||||||
call Function112aac
|
call Function112aac
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
@ -6497,15 +6497,15 @@ Function112b11:
|
|||||||
push af
|
push af
|
||||||
ld bc, $0300
|
ld bc, $0300
|
||||||
ld de, wc872
|
ld de, wc872
|
||||||
call Function112b60
|
call .asm_112b60
|
||||||
call nc, Function112b60
|
call nc, .asm_112b60
|
||||||
call nc, Function112b60
|
call nc, .asm_112b60
|
||||||
dec hl
|
dec hl
|
||||||
.asm_112b2d
|
.asm_112b2d
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $d
|
cp "\r"
|
||||||
jr z, .asm_112b36
|
jr z, .asm_112b36
|
||||||
cp $20
|
cp " "
|
||||||
jr nz, .asm_112b2d
|
jr nz, .asm_112b2d
|
||||||
|
|
||||||
.asm_112b36
|
.asm_112b36
|
||||||
@ -6545,11 +6545,11 @@ Function112b11:
|
|||||||
ld [wc872], a
|
ld [wc872], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function112b60:
|
.asm_112b60:
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $30
|
cp "0"
|
||||||
jr c, .asm_112b6f
|
jr c, .asm_112b6f
|
||||||
cp $3a
|
cp "9" + 1
|
||||||
jr nc, .asm_112b6f
|
jr nc, .asm_112b6f
|
||||||
and $f
|
and $f
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -6820,7 +6820,7 @@ Function112bec:
|
|||||||
.asm_112d09
|
.asm_112d09
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
or l
|
or l
|
||||||
ret z
|
ret z
|
||||||
ld hl, wc827
|
ld hl, wc827
|
||||||
@ -6962,7 +6962,7 @@ Function112d33:
|
|||||||
.asm_112df2
|
.asm_112df2
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
or l
|
or l
|
||||||
ret z
|
ret z
|
||||||
ld a, [wc86a]
|
ld a, [wc86a]
|
||||||
@ -7097,7 +7097,7 @@ Function112d33:
|
|||||||
jr nz, .asm_112efb
|
jr nz, .asm_112efb
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
or l
|
or l
|
||||||
jr nz, .asm_112efb
|
jr nz, .asm_112efb
|
||||||
ld a, $2
|
ld a, $2
|
||||||
@ -7880,25 +7880,25 @@ Function1133de:
|
|||||||
Function1133fe:
|
Function1133fe:
|
||||||
ld hl, wMobileSDK_PacketBuffer + 17
|
ld hl, wMobileSDK_PacketBuffer + 17
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $68
|
cp "h"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $74
|
cp "t"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $74
|
cp "t"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $70
|
cp "p"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $3a
|
cp ":"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $2f
|
cp "/"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $2f
|
cp "/"
|
||||||
jr nz, .asm_113432
|
jr nz, .asm_113432
|
||||||
ld hl, wMobileSDK_PacketBuffer + 16
|
ld hl, wMobileSDK_PacketBuffer + 16
|
||||||
ld de, wc880
|
ld de, wc880
|
||||||
@ -7911,7 +7911,7 @@ Function1133fe:
|
|||||||
|
|
||||||
.asm_113432
|
.asm_113432
|
||||||
ld a, [wMobileSDK_PacketBuffer + 17]
|
ld a, [wMobileSDK_PacketBuffer + 17]
|
||||||
cp $2f
|
cp "/"
|
||||||
jr z, .asm_113460
|
jr z, .asm_113460
|
||||||
ld de, wc880
|
ld de, wc880
|
||||||
ld hl, wc9b5
|
ld hl, wc9b5
|
||||||
@ -7928,7 +7928,7 @@ Function1133fe:
|
|||||||
ld h, d
|
ld h, d
|
||||||
.asm_11344c
|
.asm_11344c
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp $2f
|
cp "/"
|
||||||
jr nz, .asm_11344c
|
jr nz, .asm_11344c
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
@ -7955,7 +7955,7 @@ Function1133fe:
|
|||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $2f
|
cp "/"
|
||||||
jr z, .asm_113478
|
jr z, .asm_113478
|
||||||
ld b, $7
|
ld b, $7
|
||||||
call MobileSDK_CopyBytes
|
call MobileSDK_CopyBytes
|
||||||
@ -7964,7 +7964,7 @@ Function1133fe:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
cp $2f
|
cp "/"
|
||||||
jr nz, .asm_113478
|
jr nz, .asm_113478
|
||||||
dec de
|
dec de
|
||||||
jr .asm_113455
|
jr .asm_113455
|
||||||
@ -8065,7 +8065,7 @@ Function1134cb:
|
|||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
|
|
||||||
.asm_11350b
|
.asm_11350b
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_11350e
|
.asm_11350e
|
||||||
ld a, [wc86a]
|
ld a, [wc86a]
|
||||||
@ -8091,23 +8091,23 @@ Function113519:
|
|||||||
|
|
||||||
.asm_11352d
|
.asm_11352d
|
||||||
ld hl, wc829
|
ld hl, wc829
|
||||||
ld a, $e0
|
ld a, LOW(wc8ca + 22)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c8
|
ld a, HIGH(wc8ca + 22)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld hl, MobilePacket_ReadConfigurationDataPart2
|
ld hl, MobilePacket_ReadConfigurationDataPart2
|
||||||
jp Function11236b
|
jp Function11236b
|
||||||
|
|
||||||
.asm_11353c
|
.asm_11353c
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_11353f
|
.asm_11353f
|
||||||
ld hl, wc880
|
ld hl, wc880
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $4d
|
cp "M"
|
||||||
jr nz, .asm_113586
|
jr nz, .asm_113586
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
cp $41
|
cp "A"
|
||||||
jr nz, .asm_113586
|
jr nz, .asm_113586
|
||||||
ld b, $be
|
ld b, $be
|
||||||
ld de, 0
|
ld de, 0
|
||||||
@ -8128,7 +8128,7 @@ Function113519:
|
|||||||
jr nz, .asm_11358a
|
jr nz, .asm_11358a
|
||||||
ld a, [wc86e]
|
ld a, [wc86e]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wc86f]
|
ld a, [wc86e + 1]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, .asm_11357e
|
ld hl, .asm_11357e
|
||||||
push hl
|
push hl
|
||||||
@ -8297,7 +8297,7 @@ Function113626:
|
|||||||
jp Function111f02
|
jp Function111f02
|
||||||
|
|
||||||
.asm_11366c
|
.asm_11366c
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_11366f
|
.asm_11366f
|
||||||
jp Function1116a0
|
jp Function1116a0
|
||||||
@ -8351,7 +8351,7 @@ Function113672:
|
|||||||
jp Function11236b
|
jp Function11236b
|
||||||
|
|
||||||
.asm_1136bb
|
.asm_1136bb
|
||||||
jp Function112269
|
jp Mobile_EndSession
|
||||||
|
|
||||||
.asm_1136be
|
.asm_1136be
|
||||||
jp Function1116a0
|
jp Function1116a0
|
||||||
@ -9188,7 +9188,7 @@ Function113d66:
|
|||||||
.asm_113d88
|
.asm_113d88
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
call .Function113dfa
|
call .decodeBase64Character
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_113d88
|
jr nz, .asm_113d88
|
||||||
@ -9273,27 +9273,27 @@ endr
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.Function113dfa:
|
.decodeBase64Character:
|
||||||
cp $2b
|
cp "+"
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
jr z, .asm_113e31
|
jr z, .asm_113e31
|
||||||
cp $2f
|
cp "/"
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
jr z, .asm_113e34
|
jr z, .asm_113e34
|
||||||
cp $30
|
cp "0"
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
cp $3a
|
cp "9" + 1
|
||||||
jr c, .asm_113e37
|
jr c, .asm_113e37
|
||||||
cp $3d
|
cp "="
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
jr z, .asm_113e3a
|
jr z, .asm_113e3a
|
||||||
cp $41
|
cp "A"
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
cp $5b
|
cp "Z" + 1
|
||||||
jr c, .asm_113e3c
|
jr c, .asm_113e3c
|
||||||
cp $61
|
cp "a"
|
||||||
jr c, .asm_113e24
|
jr c, .asm_113e24
|
||||||
cp $7b
|
cp "z" + 1
|
||||||
jr c, .asm_113e3f
|
jr c, .asm_113e3f
|
||||||
|
|
||||||
.asm_113e24
|
.asm_113e24
|
||||||
|
@ -201,6 +201,16 @@ MACRO mailmsg
|
|||||||
\1End::
|
\1End::
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
MACRO mailmsg_jp
|
||||||
|
\1Message:: ds MAIL_MSG_LENGTH
|
||||||
|
\1MessageEnd:: db
|
||||||
|
\1Author:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
\1AuthorID:: dw
|
||||||
|
\1Species:: db
|
||||||
|
\1Type:: db
|
||||||
|
\1End::
|
||||||
|
ENDM
|
||||||
|
|
||||||
MACRO roam_struct
|
MACRO roam_struct
|
||||||
\1Species:: db
|
\1Species:: db
|
||||||
\1Level:: db
|
\1Level:: db
|
||||||
|
@ -2453,10 +2453,10 @@ endr
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld a, $07
|
ld a, BANK(s7_a001)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, wc608
|
ld hl, wc608
|
||||||
ld de, $a001
|
ld de, s7_a001
|
||||||
ld bc, wc7bd - wc608
|
ld bc, wc7bd - wc608
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -2485,7 +2485,7 @@ Function10107d:
|
|||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
call .CopyAllFromOT
|
call .CopyAllFromOT
|
||||||
ld hl, wOTPartyMon1Species
|
ld hl, wOTPartyMon1Species
|
||||||
ld de, $c699
|
ld de, wc699
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
call .CopyAllFromOT
|
call .CopyAllFromOT
|
||||||
ld a, $50
|
ld a, $50
|
||||||
@ -3111,7 +3111,7 @@ Function1014a6:
|
|||||||
Function1014b7:
|
Function1014b7:
|
||||||
call GetJoypad
|
call GetJoypad
|
||||||
ldh a, [hJoyPressed]
|
ldh a, [hJoyPressed]
|
||||||
and $03
|
and A_BUTTON | B_BUTTON
|
||||||
jr nz, .asm_1014c5
|
jr nz, .asm_1014c5
|
||||||
ld hl, wcd42
|
ld hl, wcd42
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -3831,7 +3831,7 @@ _StartMobileBattle:
|
|||||||
.CopyOTDetails:
|
.CopyOTDetails:
|
||||||
ldh a, [rSVBK]
|
ldh a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, 5
|
ld a, BANK(w5_dc0d)
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
ld bc, w5_dc0d
|
ld bc, w5_dc0d
|
||||||
@ -4723,13 +4723,13 @@ Function1020ea:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function102112:
|
Function102112:
|
||||||
ld a, $04
|
ld a, BANK(s4_a03b)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, $a041
|
ld hl, s4_a03b + 6
|
||||||
ld c, 40
|
ld c, 40
|
||||||
.outer_loop
|
.outer_loop
|
||||||
push hl
|
push hl
|
||||||
ld de, $c60f
|
ld de, wc60f
|
||||||
ld b, 31
|
ld b, 31
|
||||||
.inner_loop
|
.inner_loop
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
|
@ -943,7 +943,7 @@ Function1063e5:
|
|||||||
|
|
||||||
Function1063f3:
|
Function1063f3:
|
||||||
ld de, wcd31
|
ld de, wcd31
|
||||||
ld a, MOBILEAPI_19
|
ld a, MOBILEAPI_TELEPHONESTATUS
|
||||||
call MobileAPI
|
call MobileAPI
|
||||||
ld a, [wMobileCommsJumptableIndex]
|
ld a, [wMobileCommsJumptableIndex]
|
||||||
inc a
|
inc a
|
||||||
|
@ -239,7 +239,7 @@ Function1166d6:
|
|||||||
cp $ff
|
cp $ff
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [$c319], a
|
ld [wc319], a
|
||||||
xor a
|
xor a
|
||||||
ld [wc314], a
|
ld [wc314], a
|
||||||
ret
|
ret
|
||||||
|
@ -666,7 +666,7 @@ Function1163c0:
|
|||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
ld hl, $c320
|
ld hl, wc320
|
||||||
ld de, wd030
|
ld de, wd030
|
||||||
ld bc, $0010
|
ld bc, $0010
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
@ -25,7 +25,7 @@ Function11766b:
|
|||||||
ld de, wcd49
|
ld de, wcd49
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld de, $c708
|
ld de, wc708
|
||||||
ld bc, $11
|
ld bc, $11
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -40,7 +40,7 @@ Function117699:
|
|||||||
ld de, $b1f3
|
ld de, $b1f3
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, $c708
|
ld hl, wc708
|
||||||
ld bc, $11
|
ld bc, $11
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -52,7 +52,7 @@ Function117699:
|
|||||||
ld [wcd4d], a
|
ld [wcd4d], a
|
||||||
ld [wcd4e], a
|
ld [wcd4e], a
|
||||||
ld [wcd4f], a
|
ld [wcd4f], a
|
||||||
ld hl, $c708
|
ld hl, wc708
|
||||||
ld bc, $11
|
ld bc, $11
|
||||||
call ByteFill
|
call ByteFill
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
@ -191,7 +191,7 @@ Function117764_b_button:
|
|||||||
ld [wcd4a], a
|
ld [wcd4a], a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, $c708
|
ld hl, wc708
|
||||||
add hl, de
|
add hl, de
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -303,7 +303,7 @@ Function117764_a_button:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld hl, $c708
|
ld hl, wc708
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop de
|
pop de
|
||||||
@ -402,7 +402,7 @@ Function117942:
|
|||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
ld [sMobileLoginPassword], a
|
ld [sMobileLoginPassword], a
|
||||||
ld hl, $c708
|
ld hl, wc708
|
||||||
ld de, sMobileLoginPassword + 1
|
ld de, sMobileLoginPassword + 1
|
||||||
ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
|
ld bc, MOBILE_LOGIN_PASSWORD_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
@ -559,7 +559,7 @@ Function1184a5:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118a8f
|
dw SetExchangeDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118d80
|
dw Function118d80
|
||||||
dw Function118d9b
|
dw Function118d9b
|
||||||
@ -659,7 +659,7 @@ Function11857c:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118a7a
|
dw SetBattleDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function11891c
|
dw Function11891c
|
||||||
dw Function1198ee
|
dw Function1198ee
|
||||||
@ -692,7 +692,7 @@ Function1185c3:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118aa4
|
dw SetNewsDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118e92
|
dw Function118e92
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
@ -738,7 +738,7 @@ Function118624:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118aa4
|
dw SetNewsDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118e92
|
dw Function118e92
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
@ -835,7 +835,7 @@ Function1186f5:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118abc
|
dw SetStadiumDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function119451
|
dw Function119451
|
||||||
dw Function1195f8
|
dw Function1195f8
|
||||||
@ -873,7 +873,7 @@ Function118746:
|
|||||||
dw Function1188c8
|
dw Function1188c8
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function118903
|
dw Function118903
|
||||||
dw Function118ad0
|
dw SetOddEggDownloadURL
|
||||||
dw Function11878d
|
dw Function11878d
|
||||||
dw Function1196f2
|
dw Function1196f2
|
||||||
dw Function1197c9
|
dw Function1197c9
|
||||||
@ -1067,7 +1067,7 @@ Function1188b8:
|
|||||||
jp Function119e2b
|
jp Function119e2b
|
||||||
|
|
||||||
Function1188c0:
|
Function1188c0:
|
||||||
ld de, wc3cd
|
ld de, wEmailAddress
|
||||||
ld a, MOBILEAPI_08
|
ld a, MOBILEAPI_08
|
||||||
jp Function119e2b
|
jp Function119e2b
|
||||||
|
|
||||||
@ -1320,7 +1320,7 @@ Function118a65: ; unreferenced
|
|||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
jp Function118b10
|
jp Function118b10
|
||||||
|
|
||||||
Function118a7a:
|
SetBattleDownloadURL:
|
||||||
ld hl, BattleDownloadURL
|
ld hl, BattleDownloadURL
|
||||||
ld de, wcc60
|
ld de, wcc60
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
@ -1329,7 +1329,7 @@ Function118a7a:
|
|||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
jp Function118b10
|
jp Function118b10
|
||||||
|
|
||||||
Function118a8f:
|
SetExchangeDownloadURL:
|
||||||
ld hl, ExchangeDownloadURL
|
ld hl, ExchangeDownloadURL
|
||||||
ld de, wcc60
|
ld de, wcc60
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
@ -1338,7 +1338,7 @@ Function118a8f:
|
|||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
jp Function118b10
|
jp Function118b10
|
||||||
|
|
||||||
Function118aa4:
|
SetNewsDownloadURL:
|
||||||
ld hl, NewsDownloadURL
|
ld hl, NewsDownloadURL
|
||||||
ld de, wcc60
|
ld de, wcc60
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
@ -1349,8 +1349,8 @@ Function118aa4:
|
|||||||
ld bc, $e00
|
ld bc, $e00
|
||||||
jr Function118b10
|
jr Function118b10
|
||||||
|
|
||||||
Function118abc:
|
SetStadiumDownloadURL:
|
||||||
ld hl, MenuDownloadURL
|
ld hl, StadiumDownloadURL
|
||||||
ld de, wcc60
|
ld de, wcc60
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -1358,8 +1358,8 @@ Function118abc:
|
|||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
jr Function118b10
|
jr Function118b10
|
||||||
|
|
||||||
Function118ad0:
|
SetOddEggDownloadURL:
|
||||||
ld hl, IndexDownloadURL
|
ld hl, OddEggDownloadURL
|
||||||
ld de, wcc60
|
ld de, wcc60
|
||||||
ld bc, $80
|
ld bc, $80
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -1411,13 +1411,13 @@ Function118b10:
|
|||||||
|
|
||||||
Function118b24:
|
Function118b24:
|
||||||
ld hl, wc346
|
ld hl, wc346
|
||||||
ld a, $8
|
ld a, LOW(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c7
|
ld a, HIGH(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $60
|
ld a, LOW(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $cc
|
ld a, HIGH(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
call Function119eb4
|
call Function119eb4
|
||||||
call Function119ec2
|
call Function119ec2
|
||||||
@ -1494,10 +1494,10 @@ BattleDownloadURL:
|
|||||||
NewsDownloadURL:
|
NewsDownloadURL:
|
||||||
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/news/index.txt", 0
|
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/news/index.txt", 0
|
||||||
|
|
||||||
MenuDownloadURL:
|
StadiumDownloadURL:
|
||||||
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/POKESTA/menu.cgb", 0
|
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/POKESTA/menu.cgb", 0
|
||||||
|
|
||||||
IndexDownloadURL:
|
OddEggDownloadURL:
|
||||||
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
|
db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0
|
||||||
|
|
||||||
popc
|
popc
|
||||||
@ -1569,7 +1569,7 @@ asm_118d9f:
|
|||||||
ld a, [wcd38]
|
ld a, [wcd38]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_118db2
|
jr nz, .asm_118db2
|
||||||
ld a, $8f
|
ld a, TRADE_CORNER_REQUEST_LENGTH
|
||||||
ld [wcd3b], a
|
ld [wcd3b], a
|
||||||
jr .asm_118db7
|
jr .asm_118db7
|
||||||
|
|
||||||
@ -1579,17 +1579,17 @@ asm_118d9f:
|
|||||||
|
|
||||||
.asm_118db7
|
.asm_118db7
|
||||||
ld hl, w3_d800
|
ld hl, w3_d800
|
||||||
ld a, $8
|
ld a, LOW(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c6
|
ld a, HIGH(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd3b]
|
ld a, [wcd3b]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $8
|
ld a, LOW(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c7
|
ld a, HIGH(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd39]
|
ld a, [wcd39]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1752,9 +1752,9 @@ Function118ec6:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
xor a
|
xor a
|
||||||
ld [wc31f], a
|
ld [wc31f], a
|
||||||
ld a, $20
|
ld a, LOW(wc320)
|
||||||
ld [wc31b], a
|
ld [wc31b], a
|
||||||
ld a, $c3
|
ld a, HIGH(wc320)
|
||||||
ld [wc31c], a
|
ld [wc31c], a
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
ld a, l
|
ld a, l
|
||||||
@ -1834,21 +1834,21 @@ Function118f68:
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_118fba
|
jr z, .asm_118fba
|
||||||
ld hl, wc346
|
ld hl, wc346
|
||||||
ld a, LOW($c608)
|
ld a, LOW(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, HIGH($c608)
|
ld a, HIGH(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd4b]
|
ld a, [wcd4b]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd4c]
|
ld a, [wcd4c]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, LOW($c708)
|
ld a, LOW(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, HIGH($c708)
|
ld a, HIGH(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $60
|
ld a, LOW(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $cc
|
ld a, HIGH(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
call Function119eb4
|
call Function119eb4
|
||||||
call Function119ec2
|
call Function119ec2
|
||||||
@ -1914,21 +1914,21 @@ Function119009:
|
|||||||
call Function1191ad
|
call Function1191ad
|
||||||
ret c
|
ret c
|
||||||
ld hl, wc346
|
ld hl, wc346
|
||||||
ld a, $8
|
ld a, LOW(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c6
|
ld a, HIGH(wc608)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd4b]
|
ld a, [wcd4b]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wcd4c]
|
ld a, [wcd4c]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $8
|
ld a, LOW(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $c7
|
ld a, HIGH(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $60
|
ld a, LOW(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $cc
|
ld a, HIGH(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
call Function119eb4
|
call Function119eb4
|
||||||
call Function119ec2
|
call Function119ec2
|
||||||
@ -2202,7 +2202,7 @@ Function119223:
|
|||||||
ld [wcd4c], a
|
ld [wcd4c], a
|
||||||
ld a, BANK(s5_b092) ; aka BANK(s5_b1b1) and BANK(s5_b1b2) and BANK(s5_b1d3)
|
ld a, BANK(s5_b092) ; aka BANK(s5_b1b1) and BANK(s5_b1b2) and BANK(s5_b1d3)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, wc3cd
|
ld hl, wEmailAddress
|
||||||
ld de, s5_b092
|
ld de, s5_b092
|
||||||
ld bc, 31
|
ld bc, 31
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -2460,9 +2460,9 @@ Function1193a0:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, HIGH(wc708)
|
ld a, HIGH(wc708)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $60
|
ld a, LOW(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $cc
|
ld a, HIGH(wcc60)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
call Function119eb4
|
call Function119eb4
|
||||||
call Function119ec2
|
call Function119ec2
|
||||||
@ -2833,9 +2833,9 @@ Function119612:
|
|||||||
Function119629:
|
Function119629:
|
||||||
call BattleTowerRoomMenu2
|
call BattleTowerRoomMenu2
|
||||||
ret c
|
ret c
|
||||||
ld a, $60
|
ld a, LOW(wcc60)
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, $cc
|
ld a, HIGH(wcc60)
|
||||||
ld h, a
|
ld h, a
|
||||||
call Function118e39
|
call Function118e39
|
||||||
ld a, $9
|
ld a, $9
|
||||||
@ -3291,12 +3291,12 @@ Function1198f7:
|
|||||||
jp Function119e2b
|
jp Function119e2b
|
||||||
|
|
||||||
Function119937:
|
Function119937:
|
||||||
farcall Function1707f4
|
farcall BattleTowerAction_06
|
||||||
jp BattleTowerRoomMenu_IncrementJumptable
|
jp BattleTowerRoomMenu_IncrementJumptable
|
||||||
|
|
||||||
Function119940:
|
Function119940:
|
||||||
ld de, wc3cd
|
ld de, wEmailAddress
|
||||||
ld c, $1e
|
ld c, MOBILE_EMAIL_LENGTH
|
||||||
.asm_119945
|
.asm_119945
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
@ -3319,7 +3319,7 @@ Function119954:
|
|||||||
ld [wBattleTowerRoomMenu2JumptableIndex], a
|
ld [wBattleTowerRoomMenu2JumptableIndex], a
|
||||||
call BattleTowerRoomMenu2
|
call BattleTowerRoomMenu2
|
||||||
ld hl, wc608
|
ld hl, wc608
|
||||||
ld de, wc3cd
|
ld de, wEmailAddress
|
||||||
.asm_119962
|
.asm_119962
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
@ -5673,7 +5673,7 @@ Jumptable_11ad78:
|
|||||||
dw Function11af04
|
dw Function11af04
|
||||||
dw Function11af4e
|
dw Function11af4e
|
||||||
|
|
||||||
Function11ad8a:
|
MobileIncJumptableIndex:
|
||||||
ld hl, wJumptableIndex
|
ld hl, wJumptableIndex
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
@ -5694,7 +5694,7 @@ Function11ad95:
|
|||||||
lb bc, 8, 8
|
lb bc, 8, 8
|
||||||
call Function11afd6
|
call Function11afd6
|
||||||
farcall ReloadMapPart
|
farcall ReloadMapPart
|
||||||
call Function11ad8a
|
call MobileIncJumptableIndex
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld hl, Unknown_11afcc
|
ld hl, Unknown_11afcc
|
||||||
@ -5768,7 +5768,7 @@ Function11adc4:
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
.asm_11ae2b
|
.asm_11ae2b
|
||||||
call Function11ad8a
|
call MobileIncJumptableIndex
|
||||||
|
|
||||||
.asm_11ae2e
|
.asm_11ae2e
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -5807,7 +5807,7 @@ Function11ae4e:
|
|||||||
lb bc, 6, 11
|
lb bc, 6, 11
|
||||||
call Function11afd6
|
call Function11afd6
|
||||||
farcall ReloadMapPart
|
farcall ReloadMapPart
|
||||||
call Function11ad8a
|
call MobileIncJumptableIndex
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld hl, Unknown_11afd2
|
ld hl, Unknown_11afd2
|
||||||
@ -5869,7 +5869,7 @@ Function11ae98:
|
|||||||
ld a, [wcd4b]
|
ld a, [wcd4b]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call Function11b022
|
call Function11b022
|
||||||
call Function11ad8a
|
call MobileIncJumptableIndex
|
||||||
|
|
||||||
.asm_11aef7
|
.asm_11aef7
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -5897,7 +5897,7 @@ Function11af04:
|
|||||||
lb bc, 6, 11
|
lb bc, 6, 11
|
||||||
call Function11afd6
|
call Function11afd6
|
||||||
farcall ReloadMapPart
|
farcall ReloadMapPart
|
||||||
call Function11ad8a
|
call MobileIncJumptableIndex
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
ld hl, Unknown_11afd2
|
ld hl, Unknown_11afd2
|
||||||
@ -6116,7 +6116,7 @@ Function11b082:
|
|||||||
call Function11b295
|
call Function11b295
|
||||||
call Function11b275
|
call Function11b275
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
Function11b099:
|
Function11b099:
|
||||||
ld c, $6
|
ld c, $6
|
||||||
@ -6249,7 +6249,7 @@ Function11b0ff:
|
|||||||
jr z, .asm_11b167
|
jr z, .asm_11b167
|
||||||
cp $ff
|
cp $ff
|
||||||
jr z, .asm_11b16b
|
jr z, .asm_11b16b
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
.asm_11b163
|
.asm_11b163
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -6395,7 +6395,7 @@ Function11b20b:
|
|||||||
add [hl]
|
add [hl]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, $c6d0
|
ld hl, wc6d0
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wTempSpecies], a
|
ld [wTempSpecies], a
|
||||||
@ -6500,9 +6500,9 @@ Function11b295:
|
|||||||
call Function11b20b
|
call Function11b20b
|
||||||
call CheckSeenMemMon
|
call CheckSeenMemMon
|
||||||
jr z, .asm_11b2d1
|
jr z, .asm_11b2d1
|
||||||
ld a, [$c608]
|
ld a, [wc608]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [$c608 + 1]
|
ld a, [wc608 + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld hl, $0007
|
ld hl, $0007
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -6518,9 +6518,9 @@ Function11b295:
|
|||||||
jr .asm_11b2e7
|
jr .asm_11b2e7
|
||||||
|
|
||||||
.asm_11b2d1
|
.asm_11b2d1
|
||||||
ld a, [$c608]
|
ld a, [wc608]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [$c608 + 1]
|
ld a, [wc608 + 1]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld hl, $0007
|
ld hl, $0007
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -6531,7 +6531,7 @@ Function11b295:
|
|||||||
ld de, String_11b30e
|
ld de, String_11b30e
|
||||||
|
|
||||||
.asm_11b2e7
|
.asm_11b2e7
|
||||||
ld a, $6
|
ld a, NAME_LENGTH_JAPANESE
|
||||||
ld bc, wStringBuffer4
|
ld bc, wStringBuffer4
|
||||||
.asm_11b2ec
|
.asm_11b2ec
|
||||||
push af
|
push af
|
||||||
@ -6791,10 +6791,10 @@ Function11b3d9:
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b444:
|
TradeCornerHoldMon:
|
||||||
; special
|
; special
|
||||||
call Mobile46_InitJumptable
|
call Mobile46_InitJumptable
|
||||||
call Mobile46_RunJumptable
|
call TradeCornerHoldMon_RunJumptable
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Mobile46_InitJumptable:
|
Mobile46_InitJumptable:
|
||||||
@ -6806,7 +6806,7 @@ Mobile46_InitJumptable:
|
|||||||
call UpdateTime
|
call UpdateTime
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Mobile46_RunJumptable:
|
TradeCornerHoldMon_RunJumptable:
|
||||||
.loop
|
.loop
|
||||||
call .IterateJumptable
|
call .IterateJumptable
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
@ -6819,17 +6819,17 @@ Mobile46_RunJumptable:
|
|||||||
jumptable .Jumptable, wJumptableIndex
|
jumptable .Jumptable, wJumptableIndex
|
||||||
|
|
||||||
.Jumptable:
|
.Jumptable:
|
||||||
dw Function11b483
|
dw TradeCornerHoldMon_PrepareForUpload
|
||||||
dw Function11b570
|
dw Function11b570
|
||||||
dw Function11b5c0
|
dw TradeCornerHoldMon_RemoveFromParty
|
||||||
dw Function11b5e0
|
dw TradeCornerHoldMon_Success
|
||||||
dw Function11b5e7 ; unused
|
dw TradeCornerHoldMon_Noop ; unused
|
||||||
|
|
||||||
Function11b483:
|
TradeCornerHoldMon_PrepareForUpload:
|
||||||
call .InitRAM
|
call .InitRAM
|
||||||
ld hl, wPlayerName
|
ld hl, wPlayerName
|
||||||
ld a, NAME_LENGTH_JAPANESE - 1
|
ld a, NAME_LENGTH_JAPANESE - 1
|
||||||
.loop1
|
.get_char
|
||||||
push af
|
push af
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
@ -6837,24 +6837,26 @@ Function11b483:
|
|||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
and a
|
and a
|
||||||
jr nz, .loop1
|
jr nz, .get_char
|
||||||
|
|
||||||
ld de, PARTYMON_STRUCT_LENGTH
|
ld de, PARTYMON_STRUCT_LENGTH
|
||||||
ld hl, wPartyMon1Species
|
ld hl, wPartyMon1Species
|
||||||
ld a, [wcd82]
|
ld a, [wcd82]
|
||||||
dec a
|
dec a
|
||||||
push af
|
push af
|
||||||
.loop2
|
|
||||||
|
.get_next_party_mon
|
||||||
and a
|
and a
|
||||||
jr z, .okay
|
jr z, .got_selected_mon
|
||||||
add hl, de
|
add hl, de
|
||||||
dec a
|
dec a
|
||||||
jr .loop2
|
jr .get_next_party_mon
|
||||||
|
|
||||||
.okay
|
.got_selected_mon
|
||||||
push bc
|
push bc
|
||||||
ld a, PARTYMON_STRUCT_LENGTH
|
ld a, PARTYMON_STRUCT_LENGTH
|
||||||
.loop3
|
.copy_mon_byte
|
||||||
|
; copies wPartyMon to bc.
|
||||||
push af
|
push af
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
@ -6862,9 +6864,9 @@ Function11b483:
|
|||||||
pop af
|
pop af
|
||||||
dec a
|
dec a
|
||||||
and a
|
and a
|
||||||
jr nz, .loop3
|
jr nz, .copy_mon_byte
|
||||||
|
|
||||||
pop de
|
pop de ; pushed from bc
|
||||||
push bc
|
push bc
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
@ -6961,10 +6963,10 @@ Function11b483:
|
|||||||
and a
|
and a
|
||||||
jr nz, .loop9
|
jr nz, .loop9
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
.InitRAM:
|
.InitRAM:
|
||||||
ld bc, $c626
|
ld bc, wOfferTrainerID
|
||||||
ld a, [wPlayerID]
|
ld a, [wPlayerID]
|
||||||
ld [wcd2a], a
|
ld [wcd2a], a
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
@ -6985,19 +6987,19 @@ Function11b483:
|
|||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
|
|
||||||
ld a, [wcd2e]
|
ld a, [wcd2e] ; offer gender
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
|
|
||||||
ld a, [wcd2f]
|
ld a, [wcd2f] ; offer species
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
|
|
||||||
ld a, [wcd30]
|
ld a, [wcd30] ; req gender
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
|
|
||||||
ld a, [wd265]
|
ld a, [wd265] ; req species
|
||||||
ld [bc], a
|
ld [bc], a
|
||||||
inc bc
|
inc bc
|
||||||
ret
|
ret
|
||||||
@ -7008,7 +7010,7 @@ Function11b570:
|
|||||||
and a
|
and a
|
||||||
jr nz, .exit
|
jr nz, .exit
|
||||||
call .SaveData
|
call .SaveData
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
.exit
|
.exit
|
||||||
ld a, $4
|
ld a, $4
|
||||||
@ -7020,7 +7022,7 @@ Function11b570:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
ld hl, w3_d800
|
ld hl, w3_d800
|
||||||
ld de, $c608
|
ld de, wc608
|
||||||
ld bc, w3_d88f - w3_d800
|
ld bc, w3_d88f - w3_d800
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
@ -7033,7 +7035,7 @@ Function11b570:
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld hl, $c608
|
ld hl, wc608
|
||||||
ld bc, w3_d88f - w3_d800
|
ld bc, w3_d88f - w3_d800
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
@ -7052,36 +7054,36 @@ Function11b570:
|
|||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b5c0:
|
TradeCornerHoldMon_RemoveFromParty:
|
||||||
ld a, [wcd82]
|
ld a, [wcd82]
|
||||||
dec a
|
dec a
|
||||||
ld [wCurPartyMon], a
|
ld [wCurPartyMon], a
|
||||||
xor a ; REMOVE_PARTY
|
xor a ; REMOVE_PARTY
|
||||||
ld [wPokemonWithdrawDepositParameter], a
|
ld [wPokemonWithdrawDepositParameter], a
|
||||||
farcall RemoveMonFromPartyOrBox
|
farcall RemoveMonFromPartyOrBox
|
||||||
farcall Function170807
|
farcall BattleTowerAction_16
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
Function11b5e0:
|
TradeCornerHoldMon_Success:
|
||||||
xor a
|
xor a
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
Function11b5e7:
|
TradeCornerHoldMon_Noop:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b5e8:
|
Function11b5e8:
|
||||||
ld a, $0
|
ld a, $0
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, wRTC
|
ld hl, wRTC
|
||||||
ld de, $c608
|
ld de, wc608
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, $c608
|
ld hl, wc608
|
||||||
ld de, $b08c
|
ld de, $b08c
|
||||||
ld bc, 4
|
ld bc, 4
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
@ -7145,7 +7147,7 @@ Function11b66d:
|
|||||||
jr .asm_11b6b0
|
jr .asm_11b6b0
|
||||||
|
|
||||||
.asm_11b691
|
.asm_11b691
|
||||||
farcall Function17081d
|
farcall BattleTowerAction_17
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_11b6b0
|
jr z, .asm_11b6b0
|
||||||
@ -7161,7 +7163,7 @@ Function11b66d:
|
|||||||
ldh [rSVBK], a
|
ldh [rSVBK], a
|
||||||
|
|
||||||
.asm_11b6b0
|
.asm_11b6b0
|
||||||
jp Function11ad8a
|
jp MobileIncJumptableIndex
|
||||||
|
|
||||||
Function11b6b3:
|
Function11b6b3:
|
||||||
ret
|
ret
|
||||||
@ -7170,74 +7172,74 @@ Function11b6b4:
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [wcd30]
|
ld a, [wcd30]
|
||||||
ld [$c708], a
|
ld [wc708], a
|
||||||
ld a, [wcd31]
|
ld a, [wcd31]
|
||||||
ld [$c709], a
|
ld [wc709], a
|
||||||
|
|
||||||
ld a, LOW($c708) ; Species
|
ld a, LOW(wc708)
|
||||||
ld [wMobileMonSpeciesPointer], a
|
ld [wMobileMonSpeciesPointer], a
|
||||||
ld a, HIGH($c708)
|
ld a, HIGH(wc708)
|
||||||
ld [wMobileMonSpeciesPointer + 1], a
|
ld [wMobileMonSpeciesPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c60d) ; Partymon Struct
|
ld a, LOW(wMobileMon)
|
||||||
ld [wMobileMonStructPointer], a
|
ld [wMobileMonStructPointer], a
|
||||||
ld a, HIGH($c60d)
|
ld a, HIGH(wMobileMon)
|
||||||
ld [wMobileMonStructPointer + 1], a
|
ld [wMobileMonStructPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c63d) ; OT
|
ld a, LOW(wMobileMonOT)
|
||||||
ld [wMobileMonOTPointer], a
|
ld [wMobileMonOTPointer], a
|
||||||
ld a, HIGH($c63d)
|
ld a, HIGH(wMobileMonOT)
|
||||||
ld [wMobileMonOTPointer + 1], a
|
ld [wMobileMonOTPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c642) ; Nickname
|
ld a, LOW(wMobileMonNick)
|
||||||
ld [wMobileMonNicknamePointer], a
|
ld [wMobileMonNicknamePointer], a
|
||||||
ld a, HIGH($c642)
|
ld a, HIGH(wMobileMonNick)
|
||||||
ld [wMobileMonNicknamePointer + 1], a
|
ld [wMobileMonNicknamePointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c647) ; Mail
|
ld a, LOW(wMobileMonMail)
|
||||||
ld [wMobileMonMailPointer], a
|
ld [wMobileMonMailPointer], a
|
||||||
ld a, HIGH($c647)
|
ld a, HIGH(wMobileMonMail)
|
||||||
ld [wMobileMonMailPointer + 1], a
|
ld [wMobileMonMailPointer + 1], a
|
||||||
|
|
||||||
ld a, $46
|
ld a, BASE_HAPPINESS
|
||||||
ld [$c628], a
|
ld [wMobileMonHappiness], a
|
||||||
|
|
||||||
ld de, $c63d
|
ld de, wMobileMonOT
|
||||||
ld c, 5
|
ld c, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .length_check_OT
|
jr nc, .length_check_OT
|
||||||
farcall Mobile_CopyDefaultOTName
|
farcall Mobile_CopyDefaultOTName
|
||||||
|
|
||||||
.length_check_OT
|
.length_check_OT
|
||||||
ld de, $c63d
|
ld de, wMobileMonOT
|
||||||
lb bc, 1, 5
|
lb bc, 1, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringContainsLessThanBNextCharacters
|
farcall CheckStringContainsLessThanBNextCharacters
|
||||||
jr nc, .error_check_nick
|
jr nc, .error_check_nick
|
||||||
farcall Mobile_CopyDefaultOTName
|
farcall Mobile_CopyDefaultOTName
|
||||||
|
|
||||||
.error_check_nick
|
.error_check_nick
|
||||||
ld de, $c642
|
ld de, wMobileMonNick
|
||||||
ld c, 5
|
ld c, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .length_check_nick
|
jr nc, .length_check_nick
|
||||||
farcall Mobile_CopyDefaultNickname
|
farcall Mobile_CopyDefaultNickname
|
||||||
|
|
||||||
.length_check_nick
|
.length_check_nick
|
||||||
ld de, $c642
|
ld de, wMobileMonNick
|
||||||
lb bc, 1, 5
|
lb bc, 1, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringContainsLessThanBNextCharacters
|
farcall CheckStringContainsLessThanBNextCharacters
|
||||||
jr nc, .error_check_mail
|
jr nc, .error_check_mail
|
||||||
farcall Mobile_CopyDefaultNickname
|
farcall Mobile_CopyDefaultNickname
|
||||||
|
|
||||||
.error_check_mail
|
.error_check_mail
|
||||||
ld de, $c647
|
ld de, wMobileMonMail
|
||||||
ld c, MAIL_MSG_LENGTH + 1
|
ld c, MAIL_MSG_LENGTH + 1
|
||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .length_check_mail
|
jr nc, .length_check_mail
|
||||||
farcall Mobile_CopyDefaultMail
|
farcall Mobile_CopyDefaultMail
|
||||||
|
|
||||||
.length_check_mail
|
.length_check_mail
|
||||||
ld de, $c647
|
ld de, wMobileMonMail
|
||||||
lb bc, 2, MAIL_MSG_LENGTH + 1
|
lb bc, 2, MAIL_MSG_LENGTH + 1
|
||||||
farcall CheckStringContainsLessThanBNextCharacters
|
farcall CheckStringContainsLessThanBNextCharacters
|
||||||
jr c, .fix_mail
|
jr c, .fix_mail
|
||||||
@ -7249,33 +7251,33 @@ Function11b6b4:
|
|||||||
farcall Mobile_CopyDefaultMail
|
farcall Mobile_CopyDefaultMail
|
||||||
|
|
||||||
.mail_ok
|
.mail_ok
|
||||||
ld de, $c668
|
ld de, wMobileMonMailAuthor
|
||||||
ld c, $5
|
ld c, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .length_check_author
|
jr nc, .length_check_author
|
||||||
farcall Mobile_CopyDefaultMailAuthor
|
farcall Mobile_CopyDefaultMailAuthor
|
||||||
|
|
||||||
.length_check_author
|
.length_check_author
|
||||||
ld de, $c668
|
ld de, wMobileMonMailAuthor
|
||||||
lb bc, 1, 5
|
lb bc, 1, NAME_LENGTH_JAPANESE - 1
|
||||||
farcall CheckStringContainsLessThanBNextCharacters
|
farcall CheckStringContainsLessThanBNextCharacters
|
||||||
jr nc, .author_okay
|
jr nc, .author_okay
|
||||||
farcall Mobile_CopyDefaultMailAuthor
|
farcall Mobile_CopyDefaultMailAuthor
|
||||||
|
|
||||||
.author_okay
|
.author_okay
|
||||||
ld a, [$c60e]
|
ld a, [wMobileMonItem]
|
||||||
cp -1
|
cp -1
|
||||||
jr nz, .item_okay
|
jr nz, .item_okay
|
||||||
xor a
|
xor a
|
||||||
ld [$c60e], a
|
ld [wMobileMonItem], a
|
||||||
|
|
||||||
.item_okay
|
.item_okay
|
||||||
ld a, [wcd31]
|
ld a, [wcd31]
|
||||||
ld [$c60d], a
|
ld [wMobileMonSpecies], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
|
|
||||||
ld hl, $c60d + MON_LEVEL
|
ld hl, wMobileMonLevel
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp MIN_LEVEL
|
cp MIN_LEVEL
|
||||||
ld a, MIN_LEVEL
|
ld a, MIN_LEVEL
|
||||||
@ -7289,12 +7291,12 @@ Function11b6b4:
|
|||||||
.done_level
|
.done_level
|
||||||
ld [wCurPartyLevel], a
|
ld [wCurPartyLevel], a
|
||||||
|
|
||||||
ld hl, $c60d + MON_STAT_EXP - 1
|
ld hl, wMobileMonExp + 2
|
||||||
ld de, $c60d + MON_MAXHP
|
ld de, wMobileMonMaxHP
|
||||||
ld b, TRUE
|
ld b, TRUE
|
||||||
predef CalcMonStats
|
predef CalcMonStats
|
||||||
ld de, $c60d + MON_MAXHP
|
ld de, wMobileMonMaxHP
|
||||||
ld hl, $c60d + MON_HP
|
ld hl, wMobileMonHP
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
@ -7304,27 +7306,27 @@ Function11b6b4:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b7e5:
|
Function11b7e5:
|
||||||
ld a, [$c60d] ; species
|
ld a, [wMobileMonSpecies]
|
||||||
ld [wOTTrademonSpecies], a
|
ld [wOTTrademonSpecies], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld a, [wcd81]
|
ld a, [wcd81]
|
||||||
ld [wc74e], a
|
ld [wc74e], a
|
||||||
ld hl, $c63d ; OT
|
ld hl, wMobileMonOT ; OT
|
||||||
ld de, wOTTrademonOTName
|
ld de, wOTTrademonOTName
|
||||||
ld bc, 5
|
ld bc, 5
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, [$c60d + MON_ID] ; id
|
ld a, [wMobileMonID]
|
||||||
ld [wOTTrademonID], a
|
ld [wOTTrademonID], a
|
||||||
ld a, [$c60d + MON_ID + 1]
|
ld a, [wMobileMonID + 1]
|
||||||
ld [wOTTrademonID + 1], a
|
ld [wOTTrademonID + 1], a
|
||||||
ld hl, $c60d + MON_DVS ; dvs
|
ld hl, wMobileMonDVs
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wOTTrademonDVs], a
|
ld [wOTTrademonDVs], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wOTTrademonDVs + 1], a
|
ld [wOTTrademonDVs + 1], a
|
||||||
ld bc, $c60d ; pokemon_data_start
|
ld bc, wMobileMon ; pokemon_data_start
|
||||||
farcall GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wOTTrademonCaughtData], a
|
ld [wOTTrademonCaughtData], a
|
||||||
@ -7340,10 +7342,10 @@ Function11b7e5:
|
|||||||
xor a
|
xor a
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
ld a, $5
|
ld a, BANK(s5_a800)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [$a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, [wMapGroup]
|
ld a, [wMapGroup]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -7366,17 +7368,17 @@ Function11b879:
|
|||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $5
|
ld a, BANK(s5_a800)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [$a800]
|
ld a, [s5_a800]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, [$a890]
|
ld a, [s5_a890]
|
||||||
ld [wcd49], a
|
ld [wcd49], a
|
||||||
ld a, [$a891]
|
ld a, [s5_a891]
|
||||||
ld [wcd4a], a
|
ld [wcd4a], a
|
||||||
ld a, [$a892]
|
ld a, [s5_a892]
|
||||||
ld [wcd4b], a
|
ld [wcd4b], a
|
||||||
ld a, [$a893]
|
ld a, [s5_a893]
|
||||||
ld [wcd4c], a
|
ld [wcd4c], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
@ -7455,10 +7457,10 @@ Function11b879:
|
|||||||
|
|
||||||
Function11b920:
|
Function11b920:
|
||||||
call Mobile46_InitJumptable
|
call Mobile46_InitJumptable
|
||||||
ld a, $5
|
ld a, BANK(sOfferTrainerID)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, $a81f
|
ld hl, sOfferTrainerID
|
||||||
ld de, $c626
|
ld de, wOfferTrainerID
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -7466,39 +7468,39 @@ Function11b920:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function11b93b:
|
Function11b93b:
|
||||||
ld a, $5
|
ld a, BANK(s5_a800)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
xor a
|
xor a
|
||||||
ld [$a800], a
|
ld [s5_a800], a
|
||||||
ld hl, $a823
|
ld hl, sOfferGender
|
||||||
ld de, $c608
|
ld de, wc608
|
||||||
ld bc, $008f
|
ld bc, TRADE_CORNER_REQUEST_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ld a, LOW($c608)
|
ld a, LOW(wUnknownGender)
|
||||||
ld [wMobileMonSpeciesPointer], a
|
ld [wMobileMonSpeciesPointer], a
|
||||||
ld a, HIGH($c608)
|
ld a, HIGH(wUnknownGender)
|
||||||
ld [wMobileMonSpeciesPointer + 1], a
|
ld [wMobileMonSpeciesPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c611)
|
ld a, LOW(wUnknownMon)
|
||||||
ld [wMobileMonStructPointer], a
|
ld [wMobileMonStructPointer], a
|
||||||
ld a, HIGH($c611)
|
ld a, HIGH(wUnknownMon)
|
||||||
ld [wMobileMonStructPointer + 1], a
|
ld [wMobileMonStructPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c641)
|
ld a, LOW(wUnknownMonOT)
|
||||||
ld [wMobileMonOTPointer], a
|
ld [wMobileMonOTPointer], a
|
||||||
ld a, HIGH($c641)
|
ld a, HIGH(wUnknownMonOT)
|
||||||
ld [wMobileMonOTPointer + 1], a
|
ld [wMobileMonOTPointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c646)
|
ld a, LOW(wUnknownMonNick)
|
||||||
ld [wMobileMonNicknamePointer], a
|
ld [wMobileMonNicknamePointer], a
|
||||||
ld a, HIGH($c646)
|
ld a, HIGH(wUnknownMonNick)
|
||||||
ld [wMobileMonNicknamePointer + 1], a
|
ld [wMobileMonNicknamePointer + 1], a
|
||||||
|
|
||||||
ld a, LOW($c64b)
|
ld a, LOW(wUnknownMonMail)
|
||||||
ld [wMobileMonMailPointer], a
|
ld [wMobileMonMailPointer], a
|
||||||
ld a, HIGH($c64b)
|
ld a, HIGH(wUnknownMonMail)
|
||||||
ld [wMobileMonMailPointer + 1], a
|
ld [wMobileMonMailPointer + 1], a
|
||||||
call AddMobileMonToParty
|
call AddMobileMonToParty
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
@ -7532,7 +7534,7 @@ AddMobileMonToParty:
|
|||||||
ld hl, wPartyMon1Species
|
ld hl, wPartyMon1Species
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wMobileMonSpecies], a
|
ld [wMobileMonIndex], a
|
||||||
.loop2
|
.loop2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec a
|
dec a
|
||||||
@ -7549,7 +7551,7 @@ AddMobileMonToParty:
|
|||||||
|
|
||||||
ld hl, wPartyMonOTs
|
ld hl, wPartyMonOTs
|
||||||
ld bc, NAME_LENGTH
|
ld bc, NAME_LENGTH
|
||||||
ld a, [wMobileMonSpecies]
|
ld a, [wMobileMonIndex]
|
||||||
.loop3
|
.loop3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec a
|
dec a
|
||||||
@ -7568,7 +7570,7 @@ AddMobileMonToParty:
|
|||||||
|
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
ld a, [wMobileMonSpecies]
|
ld a, [wMobileMonIndex]
|
||||||
.loop4
|
.loop4
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec a
|
dec a
|
||||||
@ -7587,7 +7589,7 @@ AddMobileMonToParty:
|
|||||||
|
|
||||||
ld hl, sPartyMail
|
ld hl, sPartyMail
|
||||||
ld bc, MAIL_STRUCT_LENGTH
|
ld bc, MAIL_STRUCT_LENGTH
|
||||||
ld a, [wMobileMonSpecies]
|
ld a, [wMobileMonIndex]
|
||||||
.loop5
|
.loop5
|
||||||
add hl, bc
|
add hl, bc
|
||||||
dec a
|
dec a
|
||||||
|
@ -1,68 +1,68 @@
|
|||||||
Function170000:
|
Function170000:
|
||||||
ld a, [$c62b]
|
ld a, [wOfferSpecies]
|
||||||
ld [wPlayerTrademonSpecies], a
|
ld [wPlayerTrademonSpecies], a
|
||||||
ld hl, $c62e
|
ld hl, wOfferMonSender
|
||||||
ld de, wPlayerTrademonSenderName
|
ld de, wPlayerTrademonSenderName
|
||||||
ld bc, $0005
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, $50
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $c663
|
ld hl, wOfferMonOT
|
||||||
ld de, wPlayerTrademonOTName
|
ld de, wPlayerTrademonOTName
|
||||||
ld bc, $0005
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, $50
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $c648
|
ld hl, wOfferMonDVs
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wPlayerTrademonDVs], a
|
ld [wPlayerTrademonDVs], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wPlayerTrademonDVs + 1], a
|
ld [wPlayerTrademonDVs + 1], a
|
||||||
ld hl, $c639
|
ld hl, wOfferMonID
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wPlayerTrademonID], a
|
ld [wPlayerTrademonID], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wPlayerTrademonID + 1], a
|
ld [wPlayerTrademonID + 1], a
|
||||||
ld bc, $c633
|
ld bc, wOfferMon
|
||||||
farcall GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wPlayerTrademonCaughtData], a
|
ld [wPlayerTrademonCaughtData], a
|
||||||
ld a, [wcd81]
|
ld a, [wcd81]
|
||||||
ld [wc74e], a
|
ld [wc74e], a
|
||||||
ld hl, $c608
|
ld hl, wc608
|
||||||
ld de, $d800
|
ld de, $d800
|
||||||
ld bc, $008f
|
ld bc, TRADE_CORNER_REQUEST_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17005a:
|
Function17005a:
|
||||||
ld a, $5
|
ld a, BANK(sOfferMon)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [$a824]
|
ld a, [sOfferSpecies]
|
||||||
ld [wOTTrademonSpecies], a
|
ld [wOTTrademonSpecies], a
|
||||||
ld hl, $a827
|
ld hl, sOfferMonSender
|
||||||
ld de, wOTTrademonSenderName
|
ld de, wOTTrademonSenderName
|
||||||
ld bc, NAME_LENGTH_JAPANESE - 1
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $a85c
|
ld hl, sOfferMonOT
|
||||||
ld de, wOTTrademonOTName
|
ld de, wOTTrademonOTName
|
||||||
ld bc, NAME_LENGTH_JAPANESE - 1
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $a841
|
ld hl, sOfferMonDVs
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wOTTrademonDVs], a
|
ld [wOTTrademonDVs], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wOTTrademonDVs + 1], a
|
ld [wOTTrademonDVs + 1], a
|
||||||
ld hl, $a832
|
ld hl, sOfferMonID
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wOTTrademonID], a
|
ld [wOTTrademonID], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wOTTrademonID + 1], a
|
ld [wOTTrademonID + 1], a
|
||||||
ld bc, $a82c
|
ld bc, sOfferMon
|
||||||
farcall GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wOTTrademonCaughtData], a
|
ld [wOTTrademonCaughtData], a
|
||||||
@ -413,10 +413,10 @@ Function171ac9:
|
|||||||
|
|
||||||
Function171ad7:
|
Function171ad7:
|
||||||
xor a
|
xor a
|
||||||
ld hl, $c608
|
ld hl, wc608
|
||||||
ld bc, $66
|
ld bc, $66
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld de, $c608
|
ld de, wc608
|
||||||
ld a, MOBILEAPI_06
|
ld a, MOBILEAPI_06
|
||||||
call MobileAPI
|
call MobileAPI
|
||||||
jp Function171c66
|
jp Function171c66
|
||||||
@ -445,7 +445,7 @@ Function171aec:
|
|||||||
jr nz, .asm_171b01
|
jr nz, .asm_171b01
|
||||||
hlcoord 2, 7
|
hlcoord 2, 7
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld de, $c608
|
ld de, wc608
|
||||||
.asm_171b1b
|
.asm_171b1b
|
||||||
push af
|
push af
|
||||||
push hl
|
push hl
|
||||||
@ -515,16 +515,16 @@ Function171b4b:
|
|||||||
Function171b85:
|
Function171b85:
|
||||||
ld hl, hJoyPressed
|
ld hl, hJoyPressed
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $2
|
and B_BUTTON
|
||||||
jp nz, Function171b9f
|
jp nz, Function171b9f
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $1
|
and A_BUTTON
|
||||||
jp nz, Function171bbd
|
jp nz, Function171bbd
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $40
|
and D_UP
|
||||||
jr nz, asm_171ba5
|
jr nz, asm_171ba5
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $80
|
and D_DOWN
|
||||||
jr nz, asm_171baf
|
jr nz, asm_171baf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -562,10 +562,10 @@ Function171bbd:
|
|||||||
Function171bcc:
|
Function171bcc:
|
||||||
ld hl, hJoyPressed
|
ld hl, hJoyPressed
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $2
|
and B_BUTTON
|
||||||
jp nz, Function171bdc
|
jp nz, Function171bdc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $1
|
and A_BUTTON
|
||||||
jp nz, Function171beb
|
jp nz, Function171beb
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -579,10 +579,10 @@ Function171bdc:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function171beb:
|
Function171beb:
|
||||||
ld a, $5
|
ld a, BANK(s5_aa4a)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [wcd4a]
|
ld a, [wcd4a]
|
||||||
ld [$aa4a], a
|
ld [s5_aa4a], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld hl, MenuHeader_171c6b
|
ld hl, MenuHeader_171c6b
|
||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
@ -652,7 +652,7 @@ Function171c87:
|
|||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld hl, AsciiFontGFX
|
ld hl, AsciiFontGFX
|
||||||
ld de, vTiles2 tile $00
|
ld de, vTiles2 tile $00
|
||||||
ld bc, $6e0
|
ld bc, $6e tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, PasswordSlowpokeLZ
|
ld hl, PasswordSlowpokeLZ
|
||||||
ld de, vTiles0 tile $00
|
ld de, vTiles0 tile $00
|
||||||
@ -724,7 +724,7 @@ Function171d2b:
|
|||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld hl, AsciiFontGFX
|
ld hl, AsciiFontGFX
|
||||||
ld de, vTiles2 tile $00
|
ld de, vTiles2 tile $00
|
||||||
ld bc, $6e0
|
ld bc, $6e tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld hl, PasswordSlowpokeLZ
|
ld hl, PasswordSlowpokeLZ
|
||||||
ld de, vTiles0 tile $00
|
ld de, vTiles0 tile $00
|
||||||
@ -797,7 +797,7 @@ Function172e78:
|
|||||||
call DisableLCD
|
call DisableLCD
|
||||||
ld hl, Stadium2N64GFX
|
ld hl, Stadium2N64GFX
|
||||||
ld de, vTiles2 tile $00
|
ld de, vTiles2 tile $00
|
||||||
ld bc, $610
|
ld bc, $61 tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
ld hl, Stadium2N64Tilemap
|
ld hl, Stadium2N64Tilemap
|
||||||
|
@ -265,27 +265,27 @@ CheckStringForErrors_IgnoreTerminator:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function17d0f3:
|
Function17d0f3:
|
||||||
ld a, [wc608 + 5]
|
ld a, [wMobileMonSpecies]
|
||||||
ld [wOTTrademonSpecies], a
|
ld [wOTTrademonSpecies], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld a, [wcd81]
|
ld a, [wcd81]
|
||||||
ld [wc74e], a
|
ld [wc74e], a
|
||||||
ld hl, wc608 + 53
|
ld hl, wMobileMonOT
|
||||||
ld de, wOTTrademonOTName
|
ld de, wOTTrademonOTName
|
||||||
ld bc, 5
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, [wc608 + 11]
|
ld a, [wMobileMonID]
|
||||||
ld [wOTTrademonID], a
|
ld [wOTTrademonID], a
|
||||||
ld a, [wc608 + 12]
|
ld a, [wMobileMonID + 1]
|
||||||
ld [wOTTrademonID + 1], a
|
ld [wOTTrademonID + 1], a
|
||||||
ld hl, wc608 + 26
|
ld hl, wMobileMonDVs
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wOTTrademonDVs], a
|
ld [wOTTrademonDVs], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wOTTrademonDVs + 1], a
|
ld [wOTTrademonDVs + 1], a
|
||||||
ld bc, wc608 + 5
|
ld bc, wMobileMonSpecies
|
||||||
farcall GetCaughtGender
|
farcall GetCaughtGender
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wOTTrademonCaughtData], a
|
ld [wOTTrademonCaughtData], a
|
||||||
@ -301,10 +301,10 @@ Function17d0f3:
|
|||||||
xor a
|
xor a
|
||||||
ld [wLinkMode], a
|
ld [wLinkMode], a
|
||||||
farcall SaveAfterLinkTrade
|
farcall SaveAfterLinkTrade
|
||||||
ld a, $5
|
ld a, BANK(s5_a800)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, $5
|
ld a, BANK(s5_a800)
|
||||||
ld [$a800], a
|
ld [s5_a800], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, [wMapGroup]
|
ld a, [wMapGroup]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -324,8 +324,8 @@ Function17d0f3:
|
|||||||
|
|
||||||
Mobile_CopyDefaultOTName:
|
Mobile_CopyDefaultOTName:
|
||||||
ld hl, Mobile5F_PlayersName
|
ld hl, Mobile5F_PlayersName
|
||||||
ld de, wc63d
|
ld de, wMobileMonOT
|
||||||
ld bc, 5
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -334,8 +334,8 @@ Mobile5F_PlayersName:
|
|||||||
|
|
||||||
Mobile_CopyDefaultNickname:
|
Mobile_CopyDefaultNickname:
|
||||||
ld hl, .DefaultNickname
|
ld hl, .DefaultNickname
|
||||||
ld de, wc642
|
ld de, wMobileMonNick
|
||||||
ld bc, 5
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -344,26 +344,27 @@ Mobile_CopyDefaultNickname:
|
|||||||
|
|
||||||
Mobile_CopyDefaultMail:
|
Mobile_CopyDefaultMail:
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld hl, wc647
|
ld hl, wMobileMonMail
|
||||||
ld bc, MAIL_MSG_LENGTH + 1
|
ld bc, MAIL_MSG_LENGTH + 1
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld hl, .DefaultMessage
|
ld hl, .DefaultMessage
|
||||||
ld de, wc647
|
ld de, wMobileMonMail
|
||||||
ld bc, 6
|
ld bc, .DefaultMessageEnd - .DefaultMessage
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.DefaultMessage:
|
.DefaultMessage:
|
||||||
db "こんにちは@"
|
db "こんにちは@"
|
||||||
|
.DefaultMessageEnd:
|
||||||
|
|
||||||
Mobile_CopyDefaultMailAuthor:
|
Mobile_CopyDefaultMailAuthor:
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld de, wc668
|
ld de, wMobileMonMailAuthor
|
||||||
ld bc, 5
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld hl, Mobile5F_PlayersName
|
ld hl, Mobile5F_PlayersName
|
||||||
ld de, wc668
|
ld de, wMobileMonMailAuthor
|
||||||
ld bc, 5
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -542,20 +543,20 @@ Function17d2ce:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function17d314:
|
Function17d314:
|
||||||
ld a, $5
|
ld a, BANK(s5_b1b1)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld a, [$b1b1]
|
ld a, [s5_b1b1]
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
cp $21
|
cp $21
|
||||||
jr nc, .asm_17d354
|
jr nc, .asm_17d354
|
||||||
ld a, $6
|
ld a, BANK(s6_a006)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld l, $0
|
ld l, 0
|
||||||
ld h, l
|
ld h, l
|
||||||
ld de, $a006
|
ld de, s6_a006
|
||||||
ld a, [$a004]
|
ld a, [s6_a004]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [$a005]
|
ld a, [s6_a005]
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_17d336
|
.asm_17d336
|
||||||
push bc
|
push bc
|
||||||
@ -569,10 +570,10 @@ Function17d314:
|
|||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
jr nz, .asm_17d336
|
jr nz, .asm_17d336
|
||||||
ld a, [$a002]
|
ld a, [s6_a002]
|
||||||
cp l
|
cp l
|
||||||
jr nz, .asm_17d354
|
jr nz, .asm_17d354
|
||||||
ld a, [$a003]
|
ld a, [s6_a003]
|
||||||
cp h
|
cp h
|
||||||
jr nz, .asm_17d354
|
jr nz, .asm_17d354
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -635,10 +636,10 @@ Function17d370:
|
|||||||
ld [wBGMapBuffer], a
|
ld [wBGMapBuffer], a
|
||||||
ld a, $d0
|
ld a, $d0
|
||||||
ld [wcd21], a
|
ld [wcd21], a
|
||||||
ld a, $6
|
ld a, BANK(s6_a006)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, $a006
|
ld hl, s6_a006
|
||||||
ld de, wBGPals1
|
ld de, w4_d000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
@ -1176,11 +1177,11 @@ Function17d78d:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
ld b, a
|
||||||
call HlToCrashCheckPointer
|
call HlToCrashCheckPointer
|
||||||
ld a, $6
|
ld a, BANK(s6_a006)
|
||||||
call OpenSRAM
|
call OpenSRAM
|
||||||
ld hl, $a006
|
ld hl, s6_a006
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, wBGPals1
|
ld de, w4_d000
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
36
ram/sram.asm
36
ram/sram.asm
@ -286,13 +286,23 @@ sTrainerRankingsBackup:: ds sTrainerRankingsEnd - sTrainerRankings
|
|||||||
|
|
||||||
s5_a800:: db
|
s5_a800:: db
|
||||||
|
|
||||||
ds $24
|
sOfferEmail:: ds MOBILE_EMAIL_LENGTH
|
||||||
|
sOfferTrainerID:: dw
|
||||||
s5_a825:: db
|
sOfferSecretID:: dw
|
||||||
s5_a826:: db
|
sOfferGender:: db
|
||||||
|
sOfferSpecies:: db
|
||||||
ds $6d
|
sOfferReqGender:: db
|
||||||
|
sOfferReqSpecies:: db
|
||||||
|
sOfferMonSender:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
sOfferMon:: party_struct sOfferMon
|
||||||
|
sOfferMonOT:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
sOfferMonNick:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
sOfferMonMail:: mailmsg_jp sOfferMonMail
|
||||||
|
|
||||||
|
s5_a890:: db
|
||||||
|
s5_a891:: db
|
||||||
|
s5_a892:: db
|
||||||
|
s5_a893:: db
|
||||||
s5_a894:: ds 6
|
s5_a894:: ds 6
|
||||||
s5_a89a:: dw
|
s5_a89a:: dw
|
||||||
s5_a89c:: ds 22
|
s5_a89c:: ds 22
|
||||||
@ -372,13 +382,19 @@ s5_bfff:: db
|
|||||||
|
|
||||||
SECTION "SRAM Mobile 3", SRAM
|
SECTION "SRAM Mobile 3", SRAM
|
||||||
|
|
||||||
s6_a000::
|
s6_a000:: db
|
||||||
|
db
|
||||||
|
s6_a002:: db
|
||||||
|
s6_a003:: db
|
||||||
|
s6_a004:: db
|
||||||
|
s6_a005:: db
|
||||||
|
s6_a006:: ds $1000
|
||||||
|
|
||||||
SECTION "SRAM Mobile 4", SRAM
|
SECTION "SRAM Mobile 4", SRAM
|
||||||
|
|
||||||
s7_a000::
|
s7_a000:: db
|
||||||
|
s7_a001:: db
|
||||||
|
|
||||||
ds $800
|
ds $7fe
|
||||||
|
|
||||||
s7_a800:: db
|
s7_a800:: db
|
||||||
|
69
ram/wram.asm
69
ram/wram.asm
@ -275,7 +275,8 @@ wSpriteAnimDataEnd::
|
|||||||
|
|
||||||
; mobile data
|
; mobile data
|
||||||
wc3cc:: ds 1
|
wc3cc:: ds 1
|
||||||
wc3cd:: ds 31
|
wEmailAddress:: ds MOBILE_EMAIL_LENGTH
|
||||||
|
ds 1
|
||||||
wc3ec:: ds 1
|
wc3ec:: ds 1
|
||||||
wc3ed:: ds 1
|
wc3ed:: ds 1
|
||||||
wc3ee:: ds 1
|
wc3ee:: ds 1
|
||||||
@ -668,16 +669,46 @@ wDebugDarkTileColor:: ds 2
|
|||||||
wDebugBlackTileColor:: ds 2
|
wDebugBlackTileColor:: ds 2
|
||||||
|
|
||||||
NEXTU
|
NEXTU
|
||||||
wc608:: ds 16
|
wMobileMonSender:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
wc618:: ds 37
|
wMobileMon:: party_struct wMobileMon
|
||||||
wc63d:: ds 5
|
wMobileMonOT:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
wc642:: ds 5
|
wMobileMonNick:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
wc647:: ds 1
|
wMobileMonMail:: mailmsg_jp wMobileMonMail
|
||||||
|
|
||||||
|
NEXTU
|
||||||
|
wOfferEmail:: ds MOBILE_EMAIL_LENGTH
|
||||||
|
wOfferTrainerID:: dw
|
||||||
|
wOfferSecretID:: dw
|
||||||
|
wOfferGender:: db
|
||||||
|
wOfferSpecies:: db
|
||||||
|
wOfferReqGender:: db
|
||||||
|
wOfferReqSpecies:: db
|
||||||
|
wOfferMonSender:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wOfferMon:: party_struct wOfferMon
|
||||||
|
wOfferMonOT:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wOfferMonNick:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wOfferMonMail:: mailmsg_jp wOfferMonMail
|
||||||
|
|
||||||
|
NEXTU
|
||||||
|
wUnknownGender:: db
|
||||||
|
wUnknownSpecies:: db
|
||||||
|
wUnknownReqGender:: db
|
||||||
|
wUnknownReqSpecies:: db
|
||||||
|
wUnknownMonSender:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wUnknownMon:: party_struct wUnknownMon
|
||||||
|
wUnknownMonOT:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wUnknownMonNick:: ds NAME_LENGTH_JAPANESE - 1
|
||||||
|
wUnknownMonMail:: mailmsg_jp wUnknownMonMail
|
||||||
|
|
||||||
|
NEXTU
|
||||||
|
wc608:: ds 7
|
||||||
|
wc60f:: ds 9
|
||||||
|
wc618:: ds 48
|
||||||
wc648:: ds 2
|
wc648:: ds 2
|
||||||
wc64a:: ds 30
|
wc64a:: ds 62
|
||||||
wc668:: ds 32
|
|
||||||
wc688:: ds 2
|
wc688:: ds 2
|
||||||
wc68a:: ds 30
|
wc68a:: ds 15
|
||||||
|
wc699:: ds 15
|
||||||
wc6a8:: ds 40
|
wc6a8:: ds 40
|
||||||
ENDU
|
ENDU
|
||||||
|
|
||||||
@ -1103,8 +1134,7 @@ wc80b:: db
|
|||||||
wc80c:: dw
|
wc80c:: dw
|
||||||
wc80e:: db
|
wc80e:: db
|
||||||
wc80f:: db
|
wc80f:: db
|
||||||
wc810:: db
|
wc810:: dw
|
||||||
wc811:: db
|
|
||||||
wMobileSDK_PacketChecksum:: dw
|
wMobileSDK_PacketChecksum:: dw
|
||||||
wc814:: db
|
wc814:: db
|
||||||
wc815:: db
|
wc815:: db
|
||||||
@ -1122,8 +1152,7 @@ wc821:: db
|
|||||||
wc822:: db
|
wc822:: db
|
||||||
wc823:: ds 4
|
wc823:: ds 4
|
||||||
wc827:: dw
|
wc827:: dw
|
||||||
wc829:: db
|
wc829:: dw
|
||||||
wc82a:: db
|
|
||||||
wc82b:: db
|
wc82b:: db
|
||||||
wc82c:: db
|
wc82c:: db
|
||||||
wc82d:: db
|
wc82d:: db
|
||||||
@ -1141,8 +1170,7 @@ wc86a:: db
|
|||||||
wc86b:: db
|
wc86b:: db
|
||||||
wc86c:: db
|
wc86c:: db
|
||||||
wc86d:: db
|
wc86d:: db
|
||||||
wc86e:: db
|
wc86e:: dw
|
||||||
wc86f:: db
|
|
||||||
wc870:: db
|
wc870:: db
|
||||||
wc871:: db
|
wc871:: db
|
||||||
wc872:: db
|
wc872:: db
|
||||||
@ -1158,8 +1186,7 @@ wc87c:: db
|
|||||||
wc87d:: db
|
wc87d:: db
|
||||||
wc87e:: db
|
wc87e:: db
|
||||||
wc87f:: db
|
wc87f:: db
|
||||||
wc880:: db
|
wc880:: dw
|
||||||
wc881:: db
|
|
||||||
wc882:: db
|
wc882:: db
|
||||||
wc883:: db
|
wc883:: db
|
||||||
wc884:: ds 8
|
wc884:: ds 8
|
||||||
@ -1309,7 +1336,8 @@ wcd27:: ds 1
|
|||||||
wcd28:: ds 1
|
wcd28:: ds 1
|
||||||
wcd29:: ds 1
|
wcd29:: ds 1
|
||||||
|
|
||||||
wMobileMonSpecies::
|
wMobileMonIndex::
|
||||||
|
wMobileMonMiscSpecies::
|
||||||
wcd2a:: db
|
wcd2a:: db
|
||||||
|
|
||||||
UNION
|
UNION
|
||||||
@ -3465,6 +3493,11 @@ w3_de00:: ds $200
|
|||||||
ENDU
|
ENDU
|
||||||
|
|
||||||
|
|
||||||
|
SECTION "News Script RAM", WRAMX
|
||||||
|
|
||||||
|
w4_d000:: ds $1000
|
||||||
|
|
||||||
|
|
||||||
SECTION "GBC Video", WRAMX, ALIGN[8]
|
SECTION "GBC Video", WRAMX, ALIGN[8]
|
||||||
|
|
||||||
; eight 4-color palettes each
|
; eight 4-color palettes each
|
||||||
|
Loading…
Reference in New Issue
Block a user