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

@@ -53,10 +53,11 @@ DEF MAX_PC_ITEMS EQU 50
DEF MAX_ITEM_STACK EQU 99
; mail
DEF MAIL_LINE_LENGTH EQU $10
DEF MAIL_MSG_LENGTH EQU $20
DEF MAILBOX_CAPACITY EQU 10
DEF MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
DEF MAIL_LINE_LENGTH EQU $10
DEF MAIL_MSG_LENGTH EQU $20
DEF MAILBOX_CAPACITY EQU 10
DEF MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct
DEF MAIL_STRUCT_LENGTH_JP EQU $2a ; mailmsg_jp struct
; held item effects
const_def

View File

@@ -25,7 +25,7 @@
const MOBILEAPI_16
const MOBILEAPI_17
const MOBILEAPI_SETTIMER
const MOBILEAPI_19
const MOBILEAPI_TELEPHONESTATUS
const MOBILEAPI_1A
const MOBILEAPI_1B
const MOBILEAPI_1C
@@ -61,3 +61,10 @@ DEF MOBILE_PHONE_NUMBER_LENGTH EQU 20
; Maximum amount of time allowed for mobile battles each day
DEF MOBILE_BATTLE_ALLOWED_SECONDS EQU 0
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