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:
Andrew Cook
2022-09-15 10:49:58 +10:00
committed by GitHub
parent 41d5ea0482
commit 0f5540740b
19 changed files with 536 additions and 468 deletions

View File

@@ -286,13 +286,23 @@ sTrainerRankingsBackup:: ds sTrainerRankingsEnd - sTrainerRankings
s5_a800:: db
ds $24
s5_a825:: db
s5_a826:: db
ds $6d
sOfferEmail:: ds MOBILE_EMAIL_LENGTH
sOfferTrainerID:: dw
sOfferSecretID:: dw
sOfferGender:: db
sOfferSpecies:: db
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_a89a:: dw
s5_a89c:: ds 22
@@ -372,13 +382,19 @@ s5_bfff:: db
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
s7_a000::
s7_a000:: db
s7_a001:: db
ds $800
ds $7fe
s7_a800:: db

View File

@@ -275,7 +275,8 @@ wSpriteAnimDataEnd::
; mobile data
wc3cc:: ds 1
wc3cd:: ds 31
wEmailAddress:: ds MOBILE_EMAIL_LENGTH
ds 1
wc3ec:: ds 1
wc3ed:: ds 1
wc3ee:: ds 1
@@ -668,16 +669,46 @@ wDebugDarkTileColor:: ds 2
wDebugBlackTileColor:: ds 2
NEXTU
wc608:: ds 16
wc618:: ds 37
wc63d:: ds 5
wc642:: ds 5
wc647:: ds 1
wMobileMonSender:: ds NAME_LENGTH_JAPANESE - 1
wMobileMon:: party_struct wMobileMon
wMobileMonOT:: ds NAME_LENGTH_JAPANESE - 1
wMobileMonNick:: ds NAME_LENGTH_JAPANESE - 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
wc64a:: ds 30
wc668:: ds 32
wc64a:: ds 62
wc688:: ds 2
wc68a:: ds 30
wc68a:: ds 15
wc699:: ds 15
wc6a8:: ds 40
ENDU
@@ -1103,8 +1134,7 @@ wc80b:: db
wc80c:: dw
wc80e:: db
wc80f:: db
wc810:: db
wc811:: db
wc810:: dw
wMobileSDK_PacketChecksum:: dw
wc814:: db
wc815:: db
@@ -1122,8 +1152,7 @@ wc821:: db
wc822:: db
wc823:: ds 4
wc827:: dw
wc829:: db
wc82a:: db
wc829:: dw
wc82b:: db
wc82c:: db
wc82d:: db
@@ -1141,8 +1170,7 @@ wc86a:: db
wc86b:: db
wc86c:: db
wc86d:: db
wc86e:: db
wc86f:: db
wc86e:: dw
wc870:: db
wc871:: db
wc872:: db
@@ -1158,8 +1186,7 @@ wc87c:: db
wc87d:: db
wc87e:: db
wc87f:: db
wc880:: db
wc881:: db
wc880:: dw
wc882:: db
wc883:: db
wc884:: ds 8
@@ -1309,7 +1336,8 @@ wcd27:: ds 1
wcd28:: ds 1
wcd29:: ds 1
wMobileMonSpecies::
wMobileMonIndex::
wMobileMonMiscSpecies::
wcd2a:: db
UNION
@@ -3465,6 +3493,11 @@ w3_de00:: ds $200
ENDU
SECTION "News Script RAM", WRAMX
w4_d000:: ds $1000
SECTION "GBC Video", WRAMX, ALIGN[8]
; eight 4-color palettes each