summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-10-30 10:34:35 -0400
committerPikalaxALT <PikalaxALT@gmail.com>2015-10-30 10:34:35 -0400
commit8153737bae7169d42b8937c5dc7eec6f669acbb2 (patch)
tree16347ff0c011990a11dee4a34220a4753152b59c
parented29db5841849345c5971a9b08681dfb6560c07d (diff)
Enumerate text constants
-rw-r--r--home/text.asm18
-rw-r--r--macros/enum.asm4
-rw-r--r--macros/text.asm101
-rw-r--r--main.asm2
-rw-r--r--maps/BattleTower1F.asm4
-rw-r--r--text/battle.asm18
-rw-r--r--text/common_2.asm14
-rw-r--r--text/common_3.asm22
-rw-r--r--text/common_4.asm34
9 files changed, 138 insertions, 79 deletions
diff --git a/home/text.asm b/home/text.asm
index 1445aa5ef..42f55d285 100644
--- a/home/text.asm
+++ b/home/text.asm
@@ -1057,13 +1057,13 @@ Function1522:: ; 1522
; 152d
TextSFX:: ; 152d
- dbw $0b, SFX_DEX_FANFARE_50_79
- dbw $12, SFX_FANFARE
- dbw $0e, SFX_DEX_FANFARE_20_49
- dbw $0f, SFX_ITEM
- dbw $10, SFX_CAUGHT_MON
- dbw $11, SFX_DEX_FANFARE_80_109
- dbw $13, SFX_SLOT_MACHINE_START
+ dbw TX_SOUND_0B, SFX_DEX_FANFARE_50_79
+ dbw TX_SOUND_12, SFX_FANFARE
+ dbw TX_SOUND_0E, SFX_DEX_FANFARE_20_49
+ dbw TX_SOUND_0F, SFX_ITEM
+ dbw TX_SOUND_10, SFX_CAUGHT_MON
+ dbw TX_SOUND_11, SFX_DEX_FANFARE_80_109
+ dbw TX_SOUND_13, SFX_SLOT_MACHINE_START
db -1
; 1543
@@ -1122,11 +1122,11 @@ Text_TX_STRINGBUFFER:: ; 156a
push hl
ld e, a
ld d, 0
- ld hl, Unknown_24000
+ ld hl, StringBufferPointers
rept 2
add hl, de
endr
- ld a, BANK(Unknown_24000)
+ ld a, BANK(StringBufferPointers)
call GetFarHalfword
ld d, h
ld e, l
diff --git a/macros/enum.asm b/macros/enum.asm
index 50a136ba9..933f7b183 100644
--- a/macros/enum.asm
+++ b/macros/enum.asm
@@ -18,6 +18,10 @@ enum: macro
__enum__ = __enum__ + __enumdir__
endm
+enum_set: macro
+__enum__ = \1
+endm
+
; Enumerate constants
diff --git a/macros/text.asm b/macros/text.asm
index 97f919c7c..d8b6fc717 100644
--- a/macros/text.asm
+++ b/macros/text.asm
@@ -12,72 +12,127 @@ page EQUS "db $50," ; Start a new Pokedex page.
dex EQUS "db $e8, $50" ; End a Pokedex entry.
-TX_RAM EQU $01
-TX_FAR EQU $16
+; TX_RAM EQU $01
+; TX_FAR EQU $16
+ enum_start 1
+ enum TX_RAM
+text_from_ram: MACRO
+ db TX_RAM
+ dw \1
+ ENDM
+
+ enum TX_BCD
+text_bcd: macro
+ db TX_BCD
+ dw \1
+ db \2
+ ENDM
-text_jump: MACRO
- db TX_FAR
+ enum TX_MOVE
+text_move: macro
+ db TX_MOVE
dw \1
- db BANK(\1)
ENDM
-text_from_ram: MACRO
- db TX_RAM
+ enum TX_BOX
+text_box: macro
+ db TX_BOX
dw \1
+ db \2, \3
ENDM
-text_dunno1: macro
- db 5
+ enum TX_LOW
+text_low: macro
+ db TX_LOW
endm
+ enum WAIT_BUTTON
text_waitbutton: macro
- db 6
+ db WAIT_BUTTON
endm
-text_dunno2: macro
- db 7
+ enum TX_SCROLL
+text_scroll: macro
+ db TX_SCROLL
endm
+ enum START_ASM
start_asm: macro
- db 8
+ db START_ASM
endm
+ enum TX_NUM
deciram: macro
- db 9
- dw \1
- db \2
+ db TX_NUM
+ dw \1 ; address
+ dn \2, \3 ; bytes, digits
endm
+ enum TX_EXIT
interpret_data: macro
- db 10
+ db TX_EXIT
endm
+ enum TX_SOUND_0B
sound0: macro
- db 11
+ db TX_SOUND_0B
endm
+ enum TX_DOTS
limited_interpret_data: macro
- db 12
+ db TX_DOTS
db \1
endm
+ enum TX_LINK_WAIT_BUTTON
+link_wait_button: macro
+ db TX_LINK_WAIT_BUTTON
+ endm
+
+ enum TX_SOUND_0E
+sound1: macro
+ db TX_SOUND_0E
+ endm
+
+ enum TX_SOUND_0F
sound0x0F: macro
- db $f
+ db TX_SOUND_0F
endm
+ enum TX_SOUND_10
sound0x02: macro
- db $10
+ db TX_SOUND_10
endm
+ enum TX_SOUND_11
sound0x0A: macro
- db $11
+ db TX_SOUND_11
endm
+ enum TX_SOUND_12
+sound0x12: macro
+ db TX_SOUND_12
+ endm
+
+ enum TX_SOUND_13
sound0x2C: macro
db $13
endm
+ enum TX_STRINGBUFFER
+text_buffer: macro
+ db TX_STRINGBUFFER
+ db \1
+ endm
+
+ enum TX_DAY
current_day: macro
- db $15
+ db TX_DAY
endm
+ enum TX_FAR
+text_jump: MACRO
+ db TX_FAR
+ dw \1
+ db BANK(\1)
+ ENDM
diff --git a/main.asm b/main.asm
index 3d3f35ffb..986d7d1a7 100644
--- a/main.asm
+++ b/main.asm
@@ -21990,7 +21990,7 @@ INCLUDE "tilesets/data_3.asm"
SECTION "bank9", ROMX, BANK[$9]
-Unknown_24000:: ; 24000
+StringBufferPointers:: ; 24000
dw StringBuffer3
dw StringBuffer4
dw StringBuffer5
diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm
index 44b226486..619ec517d 100644
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -734,7 +734,7 @@ Text_APkmnLevelExceeds: ; 0x9f1e5
text "One or more of"
line "your #MON's"
cont "levels exceeds @"
- deciram ScriptVar, $13
+ deciram ScriptVar, 1, 3
text "."
done
@@ -746,7 +746,7 @@ Text_MayNotEnterABattleRoomUnderL70: ; 0x9f217
para "This BATTLE ROOM"
line "is for L@"
- deciram ScriptVar, $13
+ deciram ScriptVar, 1, 3
text "."
done
diff --git a/text/battle.asm b/text/battle.asm
index 55d8418b6..381e0bdb8 100644
--- a/text/battle.asm
+++ b/text/battle.asm
@@ -1,7 +1,7 @@
BattleText_0x80730: ; 0x80730
text "<PLAYER> picked up"
line "¥@"
- deciram wPayDayMoney, $36
+ deciram wPayDayMoney, 3, 6
text "!"
prompt
; 0x80746
@@ -99,7 +99,7 @@ SandstormHitsText: ; 0x8084d
PerishCountText: ; 0x80864
text "<USER>'s"
line "PERISH count is @"
- deciram wd265, $11
+ deciram wd265, 1, 1
text "!"
prompt
; 0x80880
@@ -194,7 +194,7 @@ BattleText_EnemyPkmnFainted: ; 0x809a8
GotMoneyForWinningText:
text "<PLAYER> got ¥@"
- deciram wc686, $36
+ deciram wc686, 3, 6
text ""
line "for winning!"
prompt
@@ -213,7 +213,7 @@ TiedAgainstText: ; 0x809eb
SentSomeToMomText:
text "<PLAYER> got ¥@"
- deciram wc686, $36
+ deciram wc686, 3, 6
text ""
line "for winning!"
cont "Sent some to MOM!"
@@ -394,7 +394,7 @@ BattleText_0x80c9c: ; 0x80c9c
text_from_ram StringBuffer1
text " grew to"
line "level @"
- deciram CurPartyLevel, $13
+ deciram CurPartyLevel, 1, 3
text "!@"
sound0
db "@"
@@ -778,7 +778,7 @@ SpiteEffectText: ; 0x8117f
text_from_ram StringBuffer1
text " was"
cont "reduced by @"
- deciram wd265, $11
+ deciram wd265, 1, 1
text "!"
prompt
; 0x811a0
@@ -887,14 +887,14 @@ BlownAwayText: ; 0x812d2
PlayerHitTimesText: ; 0x812e5
text "Hit @"
- deciram PlayerDamageTaken, $11
+ deciram PlayerDamageTaken, 1, 1
text " times!"
prompt
; 0x812f8
EnemyHitTimesText: ; 0x812f8
text "Hit @"
- deciram EnemyDamageTaken, $11
+ deciram EnemyDamageTaken, 1, 1
text " times!"
prompt
; 0x8130b
@@ -1203,7 +1203,7 @@ SafeguardProtectText: ; 0x81733
MagnitudeText: ; 0x81751
text "Magnitude @"
- deciram wd265, $11
+ deciram wd265, 1, 1
text "!"
prompt
; 0x81764
diff --git a/text/common_2.asm b/text/common_2.asm
index 5e0665bd4..ea01fd975 100644
--- a/text/common_2.asm
+++ b/text/common_2.asm
@@ -48,7 +48,7 @@ UnknownText_0x1bc0a2: ; 0x1bc0a2
text_from_ram StringBuffer1
text ""
line "recovered @"
- deciram wd1f3, $23
+ deciram wd1f3, 2, 3
text "HP!"
done
; 0x1bc0bb
@@ -106,7 +106,7 @@ UnknownText_0x1bc14f: ; 0x1bc14f
text_from_ram StringBuffer1
text " grew to"
line "level @"
- deciram CurPartyLevel, $13
+ deciram CurPartyLevel, 1, 3
text "!@"
sound0
text_waitbutton
@@ -1381,7 +1381,7 @@ Text_BreedingIsNotPossible: ; 0x1bd0bd
UnknownText_0x1bd0d8: ; 0x1bd0d8
text "The compatibility"
line "is @"
- deciram wd265, $13
+ deciram wd265, 1, 3
text "."
cont "Should they breed?"
done
@@ -1402,7 +1402,7 @@ UnknownText_0x1bd11c: ; 0x1bd11c
UnknownText_0x1bd131: ; 0x1bd131
text "Test event"
line "@"
- deciram StringBuffer2, $12
+ deciram StringBuffer2, 1, 2
text "?"
done
; 0x1bd145
@@ -1456,7 +1456,7 @@ UnknownText_0x1bd1dd: ; 0x1bd1dd
text_from_ram StringBuffer2
text "'s CARD was"
line "listed as no.@"
- deciram StringBuffer1, $12
+ deciram StringBuffer1, 1, 2
text "."
prompt
; 0x1bd201
@@ -2049,13 +2049,13 @@ UnknownText_0x1bdd96: ; 0x1bdd96
para "By level, it's"
line "grown by @"
- deciram StringBuffer2 + 1, $13
+ deciram StringBuffer2 + 1, 1, 3
text "."
para "If you want your"
line "#MON back, it"
cont "will cost ¥@"
- deciram StringBuffer2 + 2, $34
+ deciram StringBuffer2 + 2, 3, 4
text "."
done
; 0x1bde04
diff --git a/text/common_3.asm b/text/common_3.asm
index 996678adf..ed1bfb83c 100644
--- a/text/common_3.asm
+++ b/text/common_3.asm
@@ -116,7 +116,7 @@ UnknownText_0x1c02a9: ; 1c02a9
text ""
line "a boosted"
cont "@"
- deciram StringBuffer2, $24
+ deciram StringBuffer2, 2, 4
text " EXP. Points!"
prompt
; 1c02c9
@@ -124,7 +124,7 @@ UnknownText_0x1c02a9: ; 1c02a9
UnknownText_0x1c02c9: ; 1c02c9
text ""
line "@"
- deciram StringBuffer2, $24
+ deciram StringBuffer2, 2, 4
text " EXP. Points!"
prompt
; 1c02df
@@ -311,7 +311,7 @@ UnknownText_0x1c0531: ; 1c0531
text_from_ram wc850
text "'s CARD was"
line "listed as no.@"
- deciram wd265, $12
+ deciram wd265, 1, 2
text "."
prompt
; 1c0555
@@ -708,7 +708,7 @@ UnknownText_0x1c0ba5: ; 1c0ba5
UnknownText_0x1c0bbb: ; 1c0bbb
text "Throw away @"
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text ""
line "@"
text_from_ram StringBuffer2
@@ -1056,7 +1056,7 @@ UnknownText_0x1c0fb8: ; 1c0fb8
; 1c0fbc
UnknownText_0x1c0fbc: ; 1c0fbc
- deciram wcf64, $13
+ deciram wcf64, 1, 3
text " @"
text_from_ram StringBuffer1
text ""
@@ -1158,7 +1158,7 @@ ContestJudging_FirstPlaceScoreText: ; 1c113f
text ""
para "The winning score"
line "was @"
- deciram wd004, $23
+ deciram wd004, 2, 3
text " points!"
prompt
; 1c1166
@@ -1179,7 +1179,7 @@ ContestJudging_SecondPlaceScoreText: ; 1c1196
text ""
para "The score was"
line "@"
- deciram wd008, $23
+ deciram wd008, 2, 3
text " points!"
prompt
; 1c11b5
@@ -1200,7 +1200,7 @@ ContestJudging_ThirdPlaceScoreText: ; 1c11e4
text ""
para "The score was"
line "@"
- deciram wd00c, $23
+ deciram wd00c, 2, 3
text " points!"
prompt
; 1c1203
@@ -1293,7 +1293,7 @@ _KrissPCHowManyWithdrawText: ; 1c1381
_KrissPCWithdrewItemsText: ; 1c13a4
text "Withdrew @"
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text ""
line "@"
text_from_ram StringBuffer2
@@ -1320,7 +1320,7 @@ _KrissPCHowManyDepositText: ; 1c13ef
_KrissPCDepositItemsText: ; 1c1411
text "Deposited @"
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text ""
line "@"
text_from_ram StringBuffer2
@@ -1610,7 +1610,7 @@ UnknownText_0x1c1a90: ; 1c1a90
UnknownText_0x1c1aad: ; 1c1aad
text "Throw away @"
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text ""
line "@"
text_from_ram StringBuffer2
diff --git a/text/common_4.asm b/text/common_4.asm
index b85295e46..5739f7bf2 100644
--- a/text/common_4.asm
+++ b/text/common_4.asm
@@ -137,7 +137,7 @@ UnknownText_0x1c4298: ; 0x1c4298
UnknownText_0x1c439c: ; 0x1c439c
text "Today's remaining"
line "time is @"
- deciram StringBuffer2, $12
+ deciram StringBuffer2, 1, 2
text " min."
para "Would you like to"
@@ -147,7 +147,7 @@ UnknownText_0x1c439c: ; 0x1c439c
UnknownText_0x1c43dc: ; 0x1c43dc
text "There are only @"
- deciram StringBuffer2, $12
+ deciram StringBuffer2, 1, 2
text ""
line "min. left today."
@@ -201,7 +201,7 @@ UnknownText_0x1c4508: ; 0x1c4508
UnknownText_0x1c4525: ; 0x1c4525
text "Today's remaining"
line "time is @"
- deciram StringBuffer2, $12
+ deciram StringBuffer2, 1, 2
text " min."
done
; 0x1c454b
@@ -537,12 +537,12 @@ UnknownText_0x1c4bfd: ; 0x1c4bfd
; 0x1c4c08
UnknownText_0x1c4c08: ; 0x1c4c08
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text " @"
text_from_ram StringBuffer2
text "(S)"
line "will be ¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text "."
done
; 0x1c4c28
@@ -569,12 +569,12 @@ UnknownText_0x1c4ca3: ; 0x1c4ca3
; 0x1c4cae
UnknownText_0x1c4cae: ; 0x1c4cae
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text " @"
text_from_ram StringBuffer2
text "(S)"
line "will be ¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text "."
done
; 0x1c4cce
@@ -619,7 +619,7 @@ UnknownText_0x1c4db0: ; 0x1c4db0
text_from_ram StringBuffer2
text " costs"
line "¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text ". Want it?"
done
; 0x1c4dcd
@@ -666,12 +666,12 @@ UnknownText_0x1c4e7e: ; 0x1c4e7e
; 0x1c4e89
UnknownText_0x1c4e89: ; 0x1c4e89
- deciram wd10c, $12
+ deciram wd10c, 1, 2
text " @"
text_from_ram StringBuffer2
text "(S)"
line "will cost ¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text "."
done
; 0x1c4eab
@@ -713,7 +713,7 @@ UnknownText_0x1c4f33: ; 0x1c4f33
UnknownText_0x1c4f3e: ; 0x1c4f3e
text "I can pay you"
line "¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text "."
para "Is that OK?"
@@ -763,7 +763,7 @@ UnknownText_0x1c500d: ; 0x1c500d
UnknownText_0x1c502e: ; 0x1c502e
text "Got ¥@"
- deciram hMoneyTemp, $36
+ deciram hMoneyTemp, 3, 6
text " for"
line "@"
text_from_ram StringBuffer2
@@ -1464,7 +1464,7 @@ UnknownText_0x1c5c5d: ; 0x1c5c5d
UnknownText_0x1c5c5e: ; 0x1c5c5e
text "You now have"
line "@"
- deciram wBlueCardBalance, $12
+ deciram wBlueCardBalance, 1, 2
text " points."
done
; 0x1c5c7b
@@ -1472,7 +1472,7 @@ UnknownText_0x1c5c5e: ; 0x1c5c5e
UnknownText_0x1c5c7b: ; 0x1c5c7b
text "Coins:"
line "@"
- deciram Coins, $24
+ deciram Coins, 2, 4
db "@"
; 0x1c5c89
@@ -1587,7 +1587,7 @@ UnknownText_0x1c5e3a: ; 0x1c5e3a
UnknownText_0x1c5e68: ; 0x1c5e68
text "<PLAYER> used the@"
- text_dunno1
+ text_low
text_from_ram StringBuffer2
text "."
done
@@ -1595,7 +1595,7 @@ UnknownText_0x1c5e68: ; 0x1c5e68
UnknownText_0x1c5e7b: ; 0x1c5e7b
text "<PLAYER> got on the@"
- text_dunno1
+ text_low
text_from_ram StringBuffer2
text "."
prompt
@@ -1603,7 +1603,7 @@ UnknownText_0x1c5e7b: ; 0x1c5e7b
UnknownText_0x1c5e90: ; 0x1c5e90
text "<PLAYER> got off@"
- text_dunno1
+ text_low
text "the @"
text_from_ram StringBuffer2
text "."