summaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2021-04-19 16:31:37 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2021-04-19 16:31:37 -0400
commit316fa4b69558a1930a1a1ae44a40221a1ddd4f26 (patch)
tree4706eaec78ee5706e16e944eba4abfe1e7316168 /mobile
parent35219230960f0dc85c0cb6a5723877b247609e46 (diff)
Use rgbds 0.5.0
Diffstat (limited to 'mobile')
-rw-r--r--mobile/fixed_words.asm13
-rw-r--r--mobile/mobile_12.asm4
-rw-r--r--mobile/mobile_46.asm12
-rw-r--r--mobile/mobile_5f.asm8
4 files changed, 10 insertions, 27 deletions
diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm
index 464685678..c2cc99ea3 100644
--- a/mobile/fixed_words.asm
+++ b/mobile/fixed_words.asm
@@ -4048,11 +4048,7 @@ macro_11f220: MACRO
; parameter: number of words
db \1
; 12 words per page (0-based indexing)
-x = \1 / 12
-if \1 % 12 == 0
-x = x - 1
-endc
- db x
+ db (\1 - 1) / 12
ENDM
macro_11f220 18 ; 01: Types
macro_11f220 36 ; 02: Greetings
@@ -4076,10 +4072,10 @@ EZChat_SortedWords:
; These arrays are expanded dynamically to accomodate
; any Pokemon you've seen that starts with each kana.
macro_11f23c: MACRO
- dw x - w3_d000, \1
+ dw w3_d012 - w3_d000 + x, \1
x = x + 2 * \1
ENDM
-x = $d012 ; w3_d012
+x = 0
macro_11f23c $2f ; a
macro_11f23c $1e ; i
macro_11f23c $11 ; u
@@ -4124,6 +4120,5 @@ x = $d012 ; w3_d012
macro_11f23c $02 ; re
macro_11f23c $02 ; ro
macro_11f23c $15 ; wa
-x = $d000 ; w3_d000
- macro_11f23c $09 ; end
+ dw NULL, $09 ; end
.End
diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm
index 0521a05df..7f3e17190 100644
--- a/mobile/mobile_12.asm
+++ b/mobile/mobile_12.asm
@@ -593,10 +593,8 @@ MenuData_0x4851b:
.Items:
db 46
-x = 0
-rept 46
+for x, 46
db x
-x = x + 1
endr
db -1
diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm
index 91ae7811b..d51047afb 100644
--- a/mobile/mobile_46.asm
+++ b/mobile/mobile_46.asm
@@ -5240,24 +5240,18 @@ Function11a88c:
ret
Unknown_11a89a:
-x = 0
-rept 16
+for x, 16
bcd x % 100, x / 100
-x = x + 1
endr
Unknown_11a8ba:
-x = 0
-rept 16
+for x, 0, 16**2, 16
bcd x % 100, x / 100
-x = x + 16
endr
Unknown_11a8da:
-x = 0
-rept 16
+for x, 0, 16**3, 16**2
bcd x % 100, x / 100
-x = x + 256
endr
BattleTowerRoomMenu_WriteMessage:
diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm
index 9fde2ad34..75b61704d 100644
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -1601,17 +1601,13 @@ Function17da31:
ret
Unknown_17da8c:
-x = 0
-rept 8
+for x, 8
db 1 << x
-x = x + 1
endr
Unknown_17da94:
-x = 0
-rept 8
+for x, 8
db $ff ^ (1 << x)
-x = x + 1
endr
Function17da9c: