Rename dt and dd to bigdt and bigdd

This makes their big-endianness obvious and matches `dw`
This commit is contained in:
Rangi42 2024-10-17 14:56:47 -04:00
parent 80d17e1514
commit fe8254c900
6 changed files with 41 additions and 36 deletions

View File

@ -1,7 +1,6 @@
MACRO momitem
; money to trigger, cost, kind, item
dt \1
dt \2
bigdt \1, \2
db \3, \4
ENDM
@ -26,4 +25,4 @@ MomItems_2:
momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
.End
dt 0 ; unused
bigdt 0 ; unused

View File

@ -554,26 +554,15 @@ Mom_WithdrawDepositMenuJoypad:
ret
.DigitQuantities:
dt 100000
dt 10000
dt 1000
dt 100
dt 10
dt 1
dt 100000
dt 10000
dt 1000
dt 100
dt 10
dt 1
dt 900000
dt 90000
dt 9000
dt 900
dt 90
dt 9
for x, 5, -1, -1
bigdt 10**x
endr
for x, 5, -1, -1
bigdt 10**x
endr
for x, 5, -1, -1
bigdt 9 * 10**x
endr
MomLeavingText1:
text_far _MomLeavingText1

View File

@ -23,7 +23,7 @@ GiveMoney::
ret
MaxMoney:
dt MAX_MONEY
bigdt MAX_MONEY
TakeMoney::
ld a, 3

View File

@ -55,16 +55,25 @@ MACRO dc ; "crumbs"
endr
ENDM
MACRO dt ; three-byte (big-endian)
db LOW((\1) >> 16), HIGH(\1), LOW(\1)
ENDM
MACRO dd ; four-byte (big-endian)
db HIGH((\1) >> 16), LOW((\1) >> 16), HIGH(\1), LOW(\1)
ENDM
MACRO bigdw ; big-endian word
db HIGH(\1), LOW(\1)
rept _NARG
db HIGH(\1), LOW(\1)
shift
endr
ENDM
MACRO bigdt ; big-endian "tribyte"
rept _NARG
db LOW((\1) >> 16), HIGH(\1), LOW(\1)
shift
endr
ENDM
MACRO bigdd ; big-endian "double word"
rept _NARG
db HIGH((\1) >> 16), LOW((\1) >> 16), HIGH(\1), LOW(\1)
shift
endr
ENDM
MACRO dba ; dbw bank, address

View File

@ -13,6 +13,14 @@ ENDM
; macros/data.asm
MACRO dt
bigdt \1
ENDM
MACRO dd
bigdd \1
ENDM
MACRO dbbw
db \1, \2
dw \3

View File

@ -229,21 +229,21 @@ ENDM
MACRO givemoney
db givemoney_command
db \1 ; account
dt \2 ; money
bigdt \2 ; money
ENDM
const takemoney_command ; $23
MACRO takemoney
db takemoney_command
db \1 ; account
dt \2 ; money
bigdt \2 ; money
ENDM
const checkmoney_command ; $24
MACRO checkmoney
db checkmoney_command
db \1 ; account
dt \2 ; money
bigdt \2 ; money
ENDM
const givecoins_command ; $25