Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename dt and dd to bigdt and bigdd #1141

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
420 changes: 210 additions & 210 deletions data/battle_tower/parties.asm

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions data/events/odd_eggs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ OddEggs:
db NO_ITEM
db THUNDERSHOCK, CHARM, DIZZY_PUNCH, 0
dw 02048 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -66,7 +66,7 @@ OddEggs:
db NO_ITEM
db THUNDERSHOCK, CHARM, DIZZY_PUNCH, 0
dw 00256 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -92,7 +92,7 @@ OddEggs:
db NO_ITEM
db POUND, CHARM, DIZZY_PUNCH, 0
dw 04096 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -118,7 +118,7 @@ OddEggs:
db NO_ITEM
db POUND, CHARM, DIZZY_PUNCH, 0
dw 00768 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -144,7 +144,7 @@ OddEggs:
db NO_ITEM
db SING, CHARM, DIZZY_PUNCH, 0
dw 04096 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -170,7 +170,7 @@ OddEggs:
db NO_ITEM
db SING, CHARM, DIZZY_PUNCH, 0
dw 00768 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -196,7 +196,7 @@ OddEggs:
db NO_ITEM
db POUND, LICK, DIZZY_PUNCH, 0
dw 03584 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -222,7 +222,7 @@ OddEggs:
db NO_ITEM
db POUND, LICK, DIZZY_PUNCH, 0
dw 00512 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -248,7 +248,7 @@ OddEggs:
db NO_ITEM
db EMBER, DIZZY_PUNCH, 0, 0
dw 02560 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -274,7 +274,7 @@ OddEggs:
db NO_ITEM
db EMBER, DIZZY_PUNCH, 0, 0
dw 00512 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -300,7 +300,7 @@ OddEggs:
db NO_ITEM
db QUICK_ATTACK, LEER, DIZZY_PUNCH, 0
dw 03072 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -326,7 +326,7 @@ OddEggs:
db NO_ITEM
db QUICK_ATTACK, LEER, DIZZY_PUNCH, 0
dw 00512 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -352,7 +352,7 @@ OddEggs:
db NO_ITEM
db TACKLE, DIZZY_PUNCH, 0, 0
dw 02560 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand All @@ -378,7 +378,7 @@ OddEggs:
db NO_ITEM
db TACKLE, DIZZY_PUNCH, 0, 0
dw 00256 ; OT ID
dt 125 ; Exp
bigdt 125 ; Exp
; Stat exp
bigdw 0
bigdw 0
Expand Down
5 changes: 2 additions & 3 deletions data/items/mom_phone.asm
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MACRO momitem
; money to trigger, cost, kind, item
dt \1
dt \2
bigdt \1, \2
db \3, \4
ENDM

Expand All @@ -26,4 +25,4 @@ MomItems_2:
momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL
.End

dt 0 ; unused
bigdt 0 ; unused
29 changes: 9 additions & 20 deletions engine/events/mom.asm
Original file line number Diff line number Diff line change
Expand Up @@ -552,26 +552,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
Expand Down
1 change: 0 additions & 1 deletion engine/events/mom_phone.asm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ MomItsInYourRoomText:
text_far _MomItsInYourRoomText
text_end


DummyPredef3A_DummyData: ; unreferenced
db 0

Expand Down
2 changes: 1 addition & 1 deletion engine/events/money.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ GiveMoney::
ret

MaxMoney:
dt MAX_MONEY
bigdt MAX_MONEY

TakeMoney::
ld a, 3
Expand Down
21 changes: 15 additions & 6 deletions macros/data.asm
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,25 @@ MACRO dc ; "crumbs"
endr
ENDM

MACRO dt ; three-byte (big-endian)
db LOW((\1) >> 16), HIGH(\1), LOW(\1)
MACRO bigdw ; big-endian word
rept _NARG
db HIGH(\1), LOW(\1)
shift
endr
ENDM

MACRO dd ; four-byte (big-endian)
db HIGH((\1) >> 16), LOW((\1) >> 16), HIGH(\1), LOW(\1)
MACRO bigdt ; big-endian "tribyte"
rept _NARG
db LOW((\1) >> 16), HIGH(\1), LOW(\1)
shift
endr
ENDM

MACRO bigdw ; big-endian word
db HIGH(\1), LOW(\1)
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
Expand Down
8 changes: 8 additions & 0 deletions macros/legacy.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions macros/scripts/events.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions mobile/mobile_41.asm
Original file line number Diff line number Diff line change
Expand Up @@ -698,21 +698,21 @@ endr
ret

._9
dd 1000000000
bigdd 10**9
._8
dd 100000000
bigdd 10**8
._7
dd 10000000
bigdd 10**7
._6
dd 1000000
bigdd 10**6
._5
dd 100000
bigdd 10**5
._4
dd 10000
bigdd 10**4
._3
dd 1000
bigdd 10**3
._2
dd 100
bigdd 10**2

.Function1062b2:
ld c, $0
Expand Down