summaryrefslogtreecommitdiff
path: root/arm9/modules
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/modules')
-rw-r--r--arm9/modules/05/asm/mod05_021DC0B8.s2
-rw-r--r--arm9/modules/05/asm/mod05_021E80F8.s4
-rw-r--r--arm9/modules/06/asm/module_06.s8
-rw-r--r--arm9/modules/07/asm/module_07.s12
-rw-r--r--arm9/modules/09/asm/module_09.s22
-rw-r--r--arm9/modules/11/asm/module_11_thumb2.s8
-rw-r--r--arm9/modules/14/asm/module_14.s32
-rw-r--r--arm9/modules/15/asm/module_15.s18
-rw-r--r--arm9/modules/16/asm/module_16.s84
-rw-r--r--arm9/modules/17/asm/module_17.s8
-rw-r--r--arm9/modules/20/asm/module_20.s40
-rw-r--r--arm9/modules/21/src/mod21_02254A6C.c10
-rw-r--r--arm9/modules/23/asm/module_23.s4
-rw-r--r--arm9/modules/27/asm/module_27.s20
-rw-r--r--arm9/modules/28/asm/module_28.s2
-rw-r--r--arm9/modules/33/asm/module_33.s2
-rw-r--r--arm9/modules/45/asm/module_45.s14
-rw-r--r--arm9/modules/46/asm/module_46.s2
-rw-r--r--arm9/modules/49/asm/module_49.s2
-rw-r--r--arm9/modules/50/asm/module_50.s2
-rw-r--r--arm9/modules/51/asm/module_51.s4
-rw-r--r--arm9/modules/57/asm/module_57.s2
-rw-r--r--arm9/modules/59/asm/mod59_021D74E0_asm.s10
-rw-r--r--arm9/modules/60/asm/module_60.s6
-rw-r--r--arm9/modules/61/asm/module_61.s6
-rw-r--r--arm9/modules/66/asm/module_66.s46
-rw-r--r--arm9/modules/67/asm/module_67.s8
-rw-r--r--arm9/modules/68/asm/module_68.s2
-rw-r--r--arm9/modules/69/asm/module_69.s2
-rw-r--r--arm9/modules/70/asm/module_70.s2
-rw-r--r--arm9/modules/71/asm/module_71.s40
-rw-r--r--arm9/modules/73/asm/module_73.s12
-rw-r--r--arm9/modules/75/asm/module_75.s8
-rw-r--r--arm9/modules/76/asm/module_76.s8
-rw-r--r--arm9/modules/81/asm/module_81.s14
-rw-r--r--arm9/modules/83/asm/module_83.s24
-rw-r--r--arm9/modules/85/asm/module_85.s4
-rw-r--r--arm9/modules/86/asm/module_86.s4
38 files changed, 249 insertions, 249 deletions
diff --git a/arm9/modules/05/asm/mod05_021DC0B8.s b/arm9/modules/05/asm/mod05_021DC0B8.s
index fc147e48..2645658c 100644
--- a/arm9/modules/05/asm/mod05_021DC0B8.s
+++ b/arm9/modules/05/asm/mod05_021DC0B8.s
@@ -2019,7 +2019,7 @@ _021DCFA0:
ldr r0, [r0, #8]
mov r1, #2
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
mov r0, #0x41
lsl r0, r0, #2
ldr r0, [r4, r0]
diff --git a/arm9/modules/05/asm/mod05_021E80F8.s b/arm9/modules/05/asm/mod05_021E80F8.s
index 8725af08..886d14cd 100644
--- a/arm9/modules/05/asm/mod05_021E80F8.s
+++ b/arm9/modules/05/asm/mod05_021E80F8.s
@@ -192,7 +192,7 @@ MOD05_021E820C: ; 0x021E820C
ldr r0, [r4, #8]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4, #8]
mov r1, #3
bl FUN_02017CD0
@@ -270,7 +270,7 @@ MOD05_021E82A0: ; 0x021E82A0
ldr r0, [r4, #8]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4, #8]
mov r1, #3
bl FUN_02017CD0
diff --git a/arm9/modules/06/asm/module_06.s b/arm9/modules/06/asm/module_06.s
index df0a3ec9..b5179d67 100644
--- a/arm9/modules/06/asm/module_06.s
+++ b/arm9/modules/06/asm/module_06.s
@@ -8780,7 +8780,7 @@ MOD06_0223D918: ; 0x0223D918
ldr r0, [r4]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r4, #0
bl MOD06_0223D7B8
add r0, r4, #0
@@ -28568,7 +28568,7 @@ MOD06_022475A4: ; 0x022475A4
add r0, r5, #0
mov r1, #3
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r5, #0
mov r1, #3
bl FUN_02017CD0
@@ -41381,7 +41381,7 @@ _0224D8DC:
ldr r0, [r4, #0x14]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x61
lsl r0, r0, #2
add r0, r4, r0
@@ -42780,7 +42780,7 @@ _0224E448:
ldr r0, [r5, #4]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r5, #4]
mov r1, #3
bl FUN_02017CD0
diff --git a/arm9/modules/07/asm/module_07.s b/arm9/modules/07/asm/module_07.s
index 332afa24..02116199 100644
--- a/arm9/modules/07/asm/module_07.s
+++ b/arm9/modules/07/asm/module_07.s
@@ -3401,7 +3401,7 @@ _022139EE:
ldrb r3, [r6, #1]
ldr r0, [r5, #0xc]
mov r1, #2
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r0, #0x86
lsl r0, r0, #2
ldrh r0, [r7, r0]
@@ -3419,7 +3419,7 @@ _022139EE:
ldrb r3, [r6, #1]
ldr r0, [r5, #0xc]
mov r1, #2
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
cmp r4, #3
bhs _02213A46
ldr r0, [r5]
@@ -3565,7 +3565,7 @@ MOD07_02213B20: ; 0x02213B20
ldr r0, [r5, #0xc]
mov r1, #1
lsr r2, r2, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, _02213BE8 ; =0x00000844
lsl r2, r6, #0x18
str r4, [sp]
@@ -3582,7 +3582,7 @@ MOD07_02213B20: ; 0x02213B20
ldr r0, [r5, #0xc]
mov r1, #2
lsr r2, r2, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
b _02213BCE
_02213B80:
ldr r2, _02213BE4 ; =0x00000544
@@ -3603,7 +3603,7 @@ _02213B80:
ldr r0, [r5, #0xc]
mov r1, #1
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r1, _02213BE8 ; =0x00000844
mov r2, #0
str r4, [sp]
@@ -3621,7 +3621,7 @@ _02213B80:
ldr r0, [r5, #0xc]
mov r1, #2
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_02213BCE:
ldr r0, [r5, #0xc]
mov r1, #1
diff --git a/arm9/modules/09/asm/module_09.s b/arm9/modules/09/asm/module_09.s
index 4579c6c4..c07cf346 100644
--- a/arm9/modules/09/asm/module_09.s
+++ b/arm9/modules/09/asm/module_09.s
@@ -3181,7 +3181,7 @@ MOD09_02213790: ; 0x02213790
mov r1, #7
add r2, r5, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r3, r4, r5, pc}
.align 2, 0
@@ -3208,7 +3208,7 @@ MOD09_022137C0: ; 0x022137C0
mov r1, #7
add r2, r4, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0xe
str r0, [sp]
mov r0, #1
@@ -3226,7 +3226,7 @@ MOD09_022137C0: ; 0x022137C0
mov r1, #7
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0xf
str r0, [sp]
mov r0, #1
@@ -3244,7 +3244,7 @@ MOD09_022137C0: ; 0x022137C0
mov r1, #7
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0xf
str r0, [sp]
mov r0, #1
@@ -3261,7 +3261,7 @@ MOD09_022137C0: ; 0x022137C0
mov r1, #7
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r3, r4, r5, r6, r7, pc}
@@ -3425,7 +3425,7 @@ _02213976:
lsr r1, r1, #0x18
add r2, #0xc
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r0, #0x79
lsl r0, r0, #2
add r1, r4, #6
@@ -11750,7 +11750,7 @@ MOD09_02217F88: ; 0x02217F88
lsl r0, r0, #2
ldr r0, [r5, r0]
mov r1, #6
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r0, #0x79
lsl r0, r0, #2
ldr r0, [r5, r0]
@@ -14196,7 +14196,7 @@ MOD09_02219368: ; 0x02219368
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
mov r0, #0x1c
str r0, [sp]
mov r0, #8
@@ -14211,7 +14211,7 @@ MOD09_02219368: ; 0x02219368
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
_022193B2:
add sp, #0xc
pop {r3, r4, pc}
@@ -14795,7 +14795,7 @@ MOD09_0221983C: ; 0x0221983C
ldr r0, [r4, #4]
mov r1, #5
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r5, #0
_0221985E:
add r0, r4, #0
@@ -16848,7 +16848,7 @@ MOD09_0221A884: ; 0x0221A884
str r7, [sp, #8]
ldr r0, [r5, #4]
mov r1, #6
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r0, [r5, #4]
mov r1, #6
bl ScheduleBgTilemapBufferTransfer
diff --git a/arm9/modules/11/asm/module_11_thumb2.s b/arm9/modules/11/asm/module_11_thumb2.s
index f0113545..28a6f1fb 100644
--- a/arm9/modules/11/asm/module_11_thumb2.s
+++ b/arm9/modules/11/asm/module_11_thumb2.s
@@ -86408,7 +86408,7 @@ MOD11_022594DC: ; 0x022594DC
add r4, r0, #0
mov r1, #4
mov r3, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r4, #0
mov r1, #5
bl ScheduleBgTilemapBufferTransfer
@@ -86463,7 +86463,7 @@ MOD11_02259554: ; 0x02259554
mov r1, #4
mov r3, #0
add r4, r0, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x10
str r0, [sp]
mov r0, #0xa
@@ -86476,7 +86476,7 @@ MOD11_02259554: ; 0x02259554
add r0, r4, #0
mov r1, #4
mov r3, #0x16
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r4, #0
mov r1, #5
bl ScheduleBgTilemapBufferTransfer
@@ -89244,7 +89244,7 @@ MOD11_0225ABA4: ; 0x0225ABA4
ldrb r3, [r3, #2]
ldr r2, _0225AC5C ; =0x000002FF
add r0, r6, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r6, #0
mov r1, #5
bl ScheduleBgTilemapBufferTransfer
diff --git a/arm9/modules/14/asm/module_14.s b/arm9/modules/14/asm/module_14.s
index c4b96eeb..a7651aca 100644
--- a/arm9/modules/14/asm/module_14.s
+++ b/arm9/modules/14/asm/module_14.s
@@ -12978,7 +12978,7 @@ MOD14_021DDB50: ; 0x021DDB50
ldr r0, [r5, r0]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x57
lsl r0, r0, #2
ldr r0, [r5, r0]
@@ -13610,7 +13610,7 @@ MOD14_021DE014: ; 0x021DE014
mov r1, #3
ldr r0, [r4, r0]
mov r2, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r4, pc}
.align 2, 0
@@ -22454,7 +22454,7 @@ _021E250C:
mov r1, #1
add r2, #0xc
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldrb r6, [r4, #5]
mov r0, #0x20
mov r3, #0xa
@@ -22473,7 +22473,7 @@ _021E250C:
str r3, [sp, #0x18]
ldr r0, [r5, #4]
mov r1, #1
- bl FUN_02018170
+ bl CopyToBgTilemapRect
b _021E2582
_021E2562:
mov r0, #5
@@ -22487,7 +22487,7 @@ _021E2562:
mov r1, #1
add r2, #0xc
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldrb r0, [r4, #4]
add r0, r0, #1
strb r0, [r4, #4]
@@ -22601,7 +22601,7 @@ _021E264A:
ldr r0, [r4, #4]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r0, [r5, #5]
add r0, r0, #1
strb r0, [r5, #5]
@@ -22625,7 +22625,7 @@ _021E264A:
mov r1, #1
add r2, #0xc
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldrb r1, [r5, #5]
mov r2, #5
mov r0, #0x20
@@ -22648,7 +22648,7 @@ _021E264A:
str r3, [sp, #0x18]
ldr r0, [r4, #4]
mov r1, #1
- bl FUN_02018170
+ bl CopyToBgTilemapRect
b _021E26D0
_021E26CA:
ldrb r0, [r5, #4]
@@ -22694,7 +22694,7 @@ MOD14_021E26E4: ; 0x021E26E4
mov r1, #1
add r2, #0xc
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r0, [r5, #0x10]
mov r1, #4
add r0, #0x20
@@ -22950,7 +22950,7 @@ _021E28EC:
ldr r0, [r4, #4]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4, #4]
mov r1, #1
bl FUN_02017CD0
@@ -23368,7 +23368,7 @@ _021E2C0A:
mov r1, #2
mov r2, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
_021E2C46:
add r1, r5, #0
add r1, #0x2b
@@ -24121,7 +24121,7 @@ _021E31CC:
mov r1, #2
add r2, r4, r2
lsr r3, r3, #0x18
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
_021E31F0:
add sp, #0xc
pop {r3, r4, pc}
@@ -24655,7 +24655,7 @@ MOD14_021E355C: ; 0x021E355C
ldr r0, [r4, #8]
mov r1, #4
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4, #8]
mov r1, #4
bl FUN_02017CD0
@@ -28347,7 +28347,7 @@ MOD14_021E5128: ; 0x021E5128
ldr r0, [r4, #0xc]
mov r1, #4
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r4, #0
bl MOD14_021E539C
add r0, r4, #0
@@ -28550,7 +28550,7 @@ _021E534A:
ldr r0, [r5, #0xc]
mov r1, #2
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r0, #6
str r0, [sp]
mov r0, #0x20
@@ -28565,7 +28565,7 @@ _021E534A:
str r0, [sp, #0x18]
ldr r0, [r5, #0xc]
mov r1, #2
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r5, #0xc]
mov r1, #2
bl FUN_02017CD0
diff --git a/arm9/modules/15/asm/module_15.s b/arm9/modules/15/asm/module_15.s
index 217f561a..f4a704e3 100644
--- a/arm9/modules/15/asm/module_15.s
+++ b/arm9/modules/15/asm/module_15.s
@@ -6765,7 +6765,7 @@ MOD15_021DA8E8: ; 0x021DA8E8
add r0, r4, #0
mov r1, #2
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #0
add r0, #0x10
mov r1, #0
@@ -7531,7 +7531,7 @@ MOD15_021DAEB4: ; 0x021DAEB4
ldr r0, [r4, #0xc]
mov r1, #4
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r2, #0xb
mov r0, #0xa5
lsl r0, r0, #2
@@ -7549,7 +7549,7 @@ MOD15_021DAEB4: ; 0x021DAEB4
mov r1, #4
mov r2, #3
mov r3, #0xe
- bl FUN_02018170
+ bl CopyToBgTilemapRect
b _021DAF92
_021DAF4A:
mov r2, #0xb
@@ -7568,7 +7568,7 @@ _021DAF4A:
ldr r0, [r4, #0xc]
mov r1, #4
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r2, #0xb
ldr r0, _021DAFA8 ; =0x00000462
str r2, [sp]
@@ -7585,7 +7585,7 @@ _021DAF4A:
mov r1, #4
mov r2, #3
mov r3, #0xe
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_021DAF92:
add r0, r4, #0
bl MOD15_021DB154
@@ -8105,7 +8105,7 @@ _021DB390:
lsl r3, r3, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r3, [r4]
mov r2, #0xb
add r0, r3, #0
@@ -8131,7 +8131,7 @@ _021DB390:
lsl r3, r3, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r4]
mov r1, #4
ldr r0, [r0, #0xc]
@@ -8176,7 +8176,7 @@ _021DB416:
lsl r3, r3, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r4]
mov r1, #4
ldr r0, [r0, #0xc]
@@ -8223,7 +8223,7 @@ _021DB476:
lsl r3, r3, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r4]
mov r1, #4
ldr r0, [r0, #0xc]
diff --git a/arm9/modules/16/asm/module_16.s b/arm9/modules/16/asm/module_16.s
index 208c87e1..c950d9c2 100644
--- a/arm9/modules/16/asm/module_16.s
+++ b/arm9/modules/16/asm/module_16.s
@@ -1065,7 +1065,7 @@ MOD16_021D7CC8: ; 0x021D7CC8
lsl r1, r1, #0x18
lsr r1, r1, #0x18
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r1, [r5, #0x14]
ldr r6, [r5, #0x1c]
add r0, r1, #0
@@ -1106,7 +1106,7 @@ MOD16_021D7CC8: ; 0x021D7CC8
lsl r1, r1, #0x18
lsr r1, r1, #0x18
add r3, r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_021D7D4C:
mov r0, #0x20
sub r3, r0, r4
@@ -1130,7 +1130,7 @@ _021D7D4C:
ldr r0, [r5]
lsr r1, r1, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_021D7D7C:
ldr r1, [r5, #8]
ldr r0, [r5]
@@ -11429,7 +11429,7 @@ MOD16_021DC860: ; 0x021DC860
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r5]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -11454,7 +11454,7 @@ MOD16_021DC860: ; 0x021DC860
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r5]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -14854,7 +14854,7 @@ _021DE2AC:
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r6, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
add r0, r6, #0
@@ -15438,7 +15438,7 @@ MOD16_021DE788: ; 0x021DE788
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r4, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
add r0, r4, #0
@@ -17304,7 +17304,7 @@ MOD16_021DF514: ; 0x021DF514
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r0, [sp, #0x10]
bl FreeToHeap
cmp r7, #3
@@ -17361,7 +17361,7 @@ _021DF584:
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
ldr r0, [r4]
@@ -18761,7 +18761,7 @@ MOD16_021DFFE0: ; 0x021DFFE0
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -25958,7 +25958,7 @@ MOD16_021E3348: ; 0x021E3348
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r7, #0
bl FreeToHeap
ldr r1, [r6]
@@ -25989,7 +25989,7 @@ MOD16_021E3348: ; 0x021E3348
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r7, #0
bl FreeToHeap
_021E33E6:
@@ -26021,7 +26021,7 @@ _021E33E6:
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r7, #0
bl FreeToHeap
_021E342A:
@@ -26053,7 +26053,7 @@ _021E342A:
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r7, #0
bl FreeToHeap
_021E346E:
@@ -26085,7 +26085,7 @@ _021E346E:
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
_021E34B2:
@@ -28428,7 +28428,7 @@ MOD16_021E4634: ; 0x021E4634
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -29649,7 +29649,7 @@ MOD16_021E4F1C: ; 0x021E4F1C
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -29674,7 +29674,7 @@ MOD16_021E4F1C: ; 0x021E4F1C
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -29700,7 +29700,7 @@ MOD16_021E4F1C: ; 0x021E4F1C
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -29726,7 +29726,7 @@ MOD16_021E4F1C: ; 0x021E4F1C
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -31837,7 +31837,7 @@ MOD16_021E5FA4: ; 0x021E5FA4
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -34357,7 +34357,7 @@ MOD16_021E71D0: ; 0x021E71D0
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -34382,7 +34382,7 @@ MOD16_021E71D0: ; 0x021E71D0
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -34408,7 +34408,7 @@ MOD16_021E71D0: ; 0x021E71D0
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -34434,7 +34434,7 @@ MOD16_021E71D0: ; 0x021E71D0
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -36577,7 +36577,7 @@ MOD16_021E82B8: ; 0x021E82B8
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -36603,7 +36603,7 @@ MOD16_021E82B8: ; 0x021E82B8
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -36629,7 +36629,7 @@ MOD16_021E82B8: ; 0x021E82B8
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -38728,7 +38728,7 @@ _021E932E:
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -39868,7 +39868,7 @@ _021E9B9E:
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -41560,7 +41560,7 @@ MOD16_021EA7F0: ; 0x021EA7F0
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -43594,7 +43594,7 @@ MOD16_021EB724: ; 0x021EB724
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
ldr r0, [r5]
@@ -43634,7 +43634,7 @@ MOD16_021EB724: ; 0x021EB724
str r0, [sp, #8]
ldr r0, [r5]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
@@ -45562,7 +45562,7 @@ MOD16_021EC5A8: ; 0x021EC5A8
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -47021,7 +47021,7 @@ MOD16_021ED0D0: ; 0x021ED0D0
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -48319,7 +48319,7 @@ MOD16_021EDA7C: ; 0x021EDA7C
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -50510,7 +50510,7 @@ MOD16_021EEB50: ; 0x021EEB50
str r0, [sp, #8]
ldr r0, [r4]
ldr r0, [r0]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4]
@@ -52092,7 +52092,7 @@ MOD16_021EF790: ; 0x021EF790
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r5, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -52116,7 +52116,7 @@ MOD16_021EF790: ; 0x021EF790
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r5, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -52141,7 +52141,7 @@ MOD16_021EF790: ; 0x021EF790
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r5, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r6, #0
bl FreeToHeap
str r4, [sp]
@@ -52166,7 +52166,7 @@ MOD16_021EF790: ; 0x021EF790
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r5, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
add r0, r5, #0
@@ -52214,7 +52214,7 @@ MOD16_021EF8A8: ; 0x021EF8A8
lsr r0, r0, #0x18
str r0, [sp, #8]
add r0, r4, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
bl FreeToHeap
add r0, r4, #0
diff --git a/arm9/modules/17/asm/module_17.s b/arm9/modules/17/asm/module_17.s
index fd8ca035..80d17066 100644
--- a/arm9/modules/17/asm/module_17.s
+++ b/arm9/modules/17/asm/module_17.s
@@ -10150,7 +10150,7 @@ MOD17_021DC004: ; 0x021DC004
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
lsl r0, r6, #0x18
lsr r0, r0, #0x18
str r0, [sp]
@@ -10171,7 +10171,7 @@ MOD17_021DC004: ; 0x021DC004
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
lsl r1, r5, #0x18
add r0, r7, #0
lsr r1, r1, #0x18
@@ -14066,7 +14066,7 @@ _021DDD96:
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r5, #0x4c]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r1, [sp, #0x10]
mov r2, #0
ldrh r0, [r1]
@@ -14083,7 +14083,7 @@ _021DDD96:
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r5, #0x4c]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r6, #0
bl FreeToHeap
ldr r0, [r5, #0x4c]
diff --git a/arm9/modules/20/asm/module_20.s b/arm9/modules/20/asm/module_20.s
index e812d527..a425226b 100644
--- a/arm9/modules/20/asm/module_20.s
+++ b/arm9/modules/20/asm/module_20.s
@@ -1634,7 +1634,7 @@ MOD20_02252ED0: ; 0x02252ED0
ldr r0, [r4, r0]
mov r1, #5
mov r2, #0xd8
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -1738,7 +1738,7 @@ _02253048:
mov r1, #5
mov r2, #0x40
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
cmp r7, #0
beq _022530DA
sub r0, r6, #1
@@ -1759,7 +1759,7 @@ _02253048:
mov r1, #5
lsr r2, r2, #0x10
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [sp, #0x14]
mov r2, #0xd8
add r0, r6, r0
@@ -1779,7 +1779,7 @@ _02253048:
mov r1, #5
lsr r2, r2, #0x10
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
_022530DA:
mov r0, #6
lsl r0, r0, #6
@@ -1870,7 +1870,7 @@ _02253158:
ldr r0, [r5, r0]
mov r1, #5
mov r2, #0xd8
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [sp, #0x14]
lsl r1, r7, #0x18
lsl r0, r0, #0x18
@@ -1887,7 +1887,7 @@ _02253158:
mov r1, #5
mov r2, #0xd8
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
cmp r6, #0
beq _02253202
mov r0, #0
@@ -1907,7 +1907,7 @@ _02253158:
mov r1, #5
lsr r2, r2, #0x10
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [sp, #0x14]
add r6, #0xd4
sub r0, r0, #1
@@ -1926,7 +1926,7 @@ _02253158:
mov r1, #5
lsr r2, r2, #0x10
mov r3, #2
- bl FUN_02018540
+ bl FillBgTilemapRect
_02253202:
mov r0, #6
lsl r0, r0, #6
@@ -1978,7 +1978,7 @@ MOD20_02253228: ; 0x02253228
ldr r0, [r4, r0]
mov r1, #5
lsr r2, r2, #0x10
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r6, #0
add r0, #0xa9
ldr r0, [r4, r0]
@@ -2026,7 +2026,7 @@ MOD20_0225328C: ; 0x0225328C
ldr r0, [r4, r0]
mov r1, #5
lsr r2, r2, #0x10
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r6, #0
add r0, #0xa5
ldr r0, [r4, r0]
@@ -2063,7 +2063,7 @@ MOD20_022532F0: ; 0x022532F0
ldr r0, [r4, r0]
add r2, #0x84
mov r3, #0x1b
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -2098,7 +2098,7 @@ MOD20_02253338: ; 0x02253338
ldr r0, [r4, r0]
add r2, #0x2c
mov r3, #0x1b
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -2130,7 +2130,7 @@ MOD20_02253378: ; 0x02253378
ldr r0, [r4, r0]
add r2, #0xdc
mov r3, #0x1b
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -2468,7 +2468,7 @@ _0225361C:
ldr r0, [r4, r0]
mov r1, #5
lsr r2, r2, #0x10
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -2510,7 +2510,7 @@ MOD20_02253668: ; 0x02253668
ldr r0, [r4, r0]
mov r1, #5
mov r2, #0x40
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #6
lsl r0, r0, #6
ldr r0, [r4, r0]
@@ -3118,7 +3118,7 @@ MOD20_02253AA4: ; 0x02253AA4
add r2, sp, #0xc
mov r3, #9
add r6, r0, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r1, #4
add r0, sp, #0xc
strh r1, [r0]
@@ -3137,7 +3137,7 @@ MOD20_02253AA4: ; 0x02253AA4
add r0, r6, #0
lsr r1, r1, #0x18
add r2, sp, #0xc
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r1, #6
add r0, sp, #0xc
strh r1, [r0]
@@ -3157,7 +3157,7 @@ MOD20_02253AA4: ; 0x02253AA4
lsr r1, r1, #0x18
add r2, sp, #0xc
mov r3, #0xd
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
mov r1, #0xa
bl _u32_div_f
@@ -3189,7 +3189,7 @@ MOD20_02253AA4: ; 0x02253AA4
lsr r1, r1, #0x18
add r2, sp, #0xc
mov r3, #0xf
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #4
lsr r1, r0, #2
lsl r0, r0, #0x1e
@@ -3215,7 +3215,7 @@ MOD20_02253AA4: ; 0x02253AA4
lsr r1, r1, #0x18
add r2, sp, #0xc
mov r3, #0x11
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add sp, #0x14
pop {r3, r4, r5, r6, pc}
.align 2, 0
diff --git a/arm9/modules/21/src/mod21_02254A6C.c b/arm9/modules/21/src/mod21_02254A6C.c
index 040ebdaa..a5350105 100644
--- a/arm9/modules/21/src/mod21_02254A6C.c
+++ b/arm9/modules/21/src/mod21_02254A6C.c
@@ -32,7 +32,7 @@ extern void MOD20_02252D7C(u32 param0, u32 param1);
extern void FUN_02017CD0(u32 param0, u32 param1);
extern void FUN_020178A0(u32 param0, u32 param1);
-extern void FUN_02018170(u32 param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 *param6, u8 param7, u32 param8, u32 param9, u32 param10);
+extern void CopyToBgTilemapRect(u32 param0, u32 param1, u32 param2, u32 param3, u32 param4, u32 param5, u32 *param6, u8 param7, u32 param8, u32 param9, u32 param10);
extern void MOD11_02252DB4(u32 param0, u32 param1);
@@ -168,8 +168,8 @@ THUMB_FUNC void MOD21_02254C5C(UnkStruct02254A6C *param0)
while (reg_CP_DIVCNT & (regaddr >> 0xb)) { }
u32 divRemRes = reg_CP_DIVREM_RESULT_L;
- FUN_02018170(param0->Unk04, 6, 3, 7, 4, 9, param0->Unk30, (u8)(divResult << 2), 0, 40, 9);
- FUN_02018170(param0->Unk04, 6, 8, 7, 4, 9, param0->Unk30, (u8)(divRemRes << 2), 0, 40, 9);
+ CopyToBgTilemapRect(param0->Unk04, 6, 3, 7, 4, 9, param0->Unk30, (u8)(divResult << 2), 0, 40, 9);
+ CopyToBgTilemapRect(param0->Unk04, 6, 8, 7, 4, 9, param0->Unk30, (u8)(divRemRes << 2), 0, 40, 9);
tmp = param0->Unk00->Unk04;
reg_CP_DIVCNT = 0;
@@ -182,6 +182,6 @@ THUMB_FUNC void MOD21_02254C5C(UnkStruct02254A6C *param0)
while (reg_CP_DIVCNT & (regaddr >> 0xb)) { }
divRemRes = reg_CP_DIVREM_RESULT_L;
- FUN_02018170(param0->Unk04, 6, 15, 7, 4, 9, param0->Unk30, (u8)(divResult << 2), 0, 40, 9);
- FUN_02018170(param0->Unk04, 6, 20, 7, 4, 9, param0->Unk30, (u8)(divRemRes << 2), 0, 40, 9);
+ CopyToBgTilemapRect(param0->Unk04, 6, 15, 7, 4, 9, param0->Unk30, (u8)(divResult << 2), 0, 40, 9);
+ CopyToBgTilemapRect(param0->Unk04, 6, 20, 7, 4, 9, param0->Unk30, (u8)(divRemRes << 2), 0, 40, 9);
}
diff --git a/arm9/modules/23/asm/module_23.s b/arm9/modules/23/asm/module_23.s
index ec9f38f2..d9858652 100644
--- a/arm9/modules/23/asm/module_23.s
+++ b/arm9/modules/23/asm/module_23.s
@@ -1310,7 +1310,7 @@ MOD23_022551A4: ; 0x022551A4
ldrb r3, [r5, r3]
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r0, [r4, #4]
mov r1, #6
bl FUN_02017CD0
@@ -1356,7 +1356,7 @@ MOD23_02255210: ; 0x02255210
ldrb r3, [r5, r3]
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r0, [r4, #4]
mov r1, #6
bl FUN_02017CD0
diff --git a/arm9/modules/27/asm/module_27.s b/arm9/modules/27/asm/module_27.s
index aeea1e9a..3cb1d089 100644
--- a/arm9/modules/27/asm/module_27.s
+++ b/arm9/modules/27/asm/module_27.s
@@ -540,7 +540,7 @@ MOD27_02254C08: ; 0x02254C08
ldr r0, [r4, #4]
mov r1, #6
mov r2, #5
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0
add r1, r0, #0
bl MOD20_02252D7C
@@ -686,7 +686,7 @@ MOD27_02254D60: ; 0x02254D60
sub r3, r3, #1
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r0, [r5, #6]
mov r1, #6
mov r2, #2
@@ -702,7 +702,7 @@ MOD27_02254D60: ; 0x02254D60
str r0, [sp, #0xc]
ldrb r3, [r5, #5]
ldr r0, [r4, #4]
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r0, [r5, #6]
ldr r2, _02254E98 ; =0x00000401
mov r1, #6
@@ -721,7 +721,7 @@ MOD27_02254D60: ; 0x02254D60
add r3, r6, r3
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r0, [r5, #6]
mov r1, #6
add r2, r1, #0
@@ -737,7 +737,7 @@ MOD27_02254D60: ; 0x02254D60
sub r3, r3, #1
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r0, [r5, #6]
ldr r2, _02254E9C ; =0x00000406
mov r1, #6
@@ -754,7 +754,7 @@ MOD27_02254D60: ; 0x02254D60
add r3, r6, r3
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r1, [r5, #6]
ldrb r0, [r5, #8]
ldr r2, _02254EA0 ; =0x00000801
@@ -773,7 +773,7 @@ MOD27_02254D60: ; 0x02254D60
sub r3, r3, #1
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r1, [r5, #6]
ldrb r0, [r5, #8]
ldr r2, _02254EA4 ; =0x00000802
@@ -790,7 +790,7 @@ MOD27_02254D60: ; 0x02254D60
str r0, [sp, #0xc]
ldrb r3, [r5, #5]
ldr r0, [r4, #4]
- bl FUN_02018540
+ bl FillBgTilemapRect
ldrb r1, [r5, #6]
ldrb r0, [r5, #8]
ldr r2, _02254EA8 ; =0x00000C01
@@ -810,7 +810,7 @@ MOD27_02254D60: ; 0x02254D60
add r3, r4, r3
lsl r3, r3, #0x18
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r4, r5, r6, pc}
nop
@@ -1412,7 +1412,7 @@ MOD27_022552D0: ; 0x022552D0
ldr r0, [r5, #4]
mov r1, #6
mov r2, #5
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #0
add r1, r4, #0
bl MOD27_02254F18
diff --git a/arm9/modules/28/asm/module_28.s b/arm9/modules/28/asm/module_28.s
index 04176ba5..b7f19567 100644
--- a/arm9/modules/28/asm/module_28.s
+++ b/arm9/modules/28/asm/module_28.s
@@ -570,7 +570,7 @@ MOD28_02254C18: ; 0x02254C18
ldr r0, [r5, #4]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0
add r1, r0, #0
bl MOD20_02252D7C
diff --git a/arm9/modules/33/asm/module_33.s b/arm9/modules/33/asm/module_33.s
index 55ccf203..a0e764aa 100644
--- a/arm9/modules/33/asm/module_33.s
+++ b/arm9/modules/33/asm/module_33.s
@@ -324,7 +324,7 @@ MOD33_02254A38: ; 0x02254A38
ldr r0, [r5, #4]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x20
str r0, [sp]
mov r0, #8
diff --git a/arm9/modules/45/asm/module_45.s b/arm9/modules/45/asm/module_45.s
index 95cf3fbc..7350136f 100644
--- a/arm9/modules/45/asm/module_45.s
+++ b/arm9/modules/45/asm/module_45.s
@@ -825,7 +825,7 @@ MOD45_02254E28: ; 0x02254E28
mov r1, #7
add r2, r6, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r3, r4, r5, r6, r7, pc}
.align 2, 0
@@ -846,7 +846,7 @@ MOD45_02254E74: ; 0x02254E74
ldr r0, [r7, #4]
mov r1, #6
mov r2, #0x82
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r7, #4]
ldr r1, [r6]
bl MOD45_02254EBC
@@ -902,7 +902,7 @@ _02254ED6:
mov r1, #6
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add r5, r5, #1
cmp r5, #4
blt _02254ED6
@@ -975,7 +975,7 @@ _02254F46:
mov r1, #6
add r2, r7, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #1
lsl r0, r0, #0x18
lsr r0, r0, #0x18
@@ -992,7 +992,7 @@ _02254F46:
mov r1, #6
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
_02254FAE:
mov r0, #0x14
add r3, r6, #0
@@ -1016,7 +1016,7 @@ _02254FAE:
mov r1, #6
add r2, r6, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #1
lsl r0, r0, #0x18
lsr r0, r0, #0x18
@@ -1034,7 +1034,7 @@ _02254FAE:
mov r1, #6
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x1c
pop {r4, r5, r6, r7, pc}
.align 2, 0
diff --git a/arm9/modules/46/asm/module_46.s b/arm9/modules/46/asm/module_46.s
index 66418468..d0e4c762 100644
--- a/arm9/modules/46/asm/module_46.s
+++ b/arm9/modules/46/asm/module_46.s
@@ -324,7 +324,7 @@ MOD46_02254A38: ; 0x02254A38
ldr r0, [r5, #4]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x20
str r0, [sp]
mov r0, #8
diff --git a/arm9/modules/49/asm/module_49.s b/arm9/modules/49/asm/module_49.s
index 6e550b60..32d2524d 100644
--- a/arm9/modules/49/asm/module_49.s
+++ b/arm9/modules/49/asm/module_49.s
@@ -402,7 +402,7 @@ MOD49_02254AD4: ; 0x02254AD4
ldr r0, [r5, #4]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0
add r1, r0, #0
bl MOD20_02252D7C
diff --git a/arm9/modules/50/asm/module_50.s b/arm9/modules/50/asm/module_50.s
index 5d80d9b6..f6634277 100644
--- a/arm9/modules/50/asm/module_50.s
+++ b/arm9/modules/50/asm/module_50.s
@@ -333,7 +333,7 @@ MOD50_02254A48: ; 0x02254A48
ldr r0, [r5, #4]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x20
str r0, [sp]
mov r0, #8
diff --git a/arm9/modules/51/asm/module_51.s b/arm9/modules/51/asm/module_51.s
index 2721d5fb..7fe42fad 100644
--- a/arm9/modules/51/asm/module_51.s
+++ b/arm9/modules/51/asm/module_51.s
@@ -786,7 +786,7 @@ MOD51_02254E48: ; 0x02254E48
mov r1, #7
add r2, r7, #0
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r0, #0x72
lsl r0, r0, #2
add r7, r5, r0
@@ -1487,7 +1487,7 @@ _022553BE:
ldr r0, [sp, #0x1c]
mov r1, #7
mov r2, #0
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r3, [sp, #0x24]
add r1, r4, #4
lsl r6, r3, #2
diff --git a/arm9/modules/57/asm/module_57.s b/arm9/modules/57/asm/module_57.s
index 1a34bf60..4d540777 100644
--- a/arm9/modules/57/asm/module_57.s
+++ b/arm9/modules/57/asm/module_57.s
@@ -2256,7 +2256,7 @@ MOD57_021D86E8: ; 0x021D86E8
mov r1, #7
mov r2, #0
mov r3, #0x14
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r3, pc}
.align 2, 0
diff --git a/arm9/modules/59/asm/mod59_021D74E0_asm.s b/arm9/modules/59/asm/mod59_021D74E0_asm.s
index 5f558d22..423f9cd6 100644
--- a/arm9/modules/59/asm/mod59_021D74E0_asm.s
+++ b/arm9/modules/59/asm/mod59_021D74E0_asm.s
@@ -843,7 +843,7 @@ MOD59_021D7C10: ; 0x021D7C10
ldr r0, [r5, #0x18]
lsr r1, r1, #0x18
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
lsl r1, r4, #0x18
ldr r0, [r5, #0x18]
lsr r1, r1, #0x18
@@ -1696,7 +1696,7 @@ _021D82C8:
ldr r0, [r5, #0x18]
mov r1, #2
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0xb
str r3, [sp]
mov r0, #0xa
@@ -1705,7 +1705,7 @@ _021D82C8:
ldr r0, [r5, #0x18]
mov r1, #2
add r2, r7, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
mov r1, #2
mov r2, #9
@@ -1746,7 +1746,7 @@ _021D82C8:
ldr r0, [r5, #0x18]
mov r1, #5
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #7
str r0, [sp]
mov r0, #0xa
@@ -1756,7 +1756,7 @@ _021D82C8:
mov r1, #5
add r2, r7, #0
mov r3, #0xb
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r5, #0
mov r1, #5
mov r2, #0xa
diff --git a/arm9/modules/60/asm/module_60.s b/arm9/modules/60/asm/module_60.s
index 10f7e0e4..5dd63118 100644
--- a/arm9/modules/60/asm/module_60.s
+++ b/arm9/modules/60/asm/module_60.s
@@ -761,7 +761,7 @@ MOD60_021D7A40: ; 0x021D7A40
ldr r0, [r5, #0x14]
mov r1, #2
mov r2, #1
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0
str r3, [sp]
mov r0, #0x20
@@ -772,7 +772,7 @@ MOD60_021D7A40: ; 0x021D7A40
ldr r0, [r5, #0x14]
mov r1, #4
mov r2, #1
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r5, #0x28]
mov r1, #0x20
str r1, [sp]
@@ -795,7 +795,7 @@ MOD60_021D7A40: ; 0x021D7A40
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r5, #0x14]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
mov r2, #3
add r3, r2, #0
ldr r0, [r5, #0x14]
diff --git a/arm9/modules/61/asm/module_61.s b/arm9/modules/61/asm/module_61.s
index 6725c1fa..c63204ff 100644
--- a/arm9/modules/61/asm/module_61.s
+++ b/arm9/modules/61/asm/module_61.s
@@ -1281,7 +1281,7 @@ _021D7E00:
ldr r0, [r5, #0x18]
ldr r2, _021D7FAC ; =0x00002001
mov r1, #4
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
ldr r0, [r5, #0x3c]
mov r1, #0x20
@@ -1304,7 +1304,7 @@ _021D7E00:
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r5, #0x18]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r5, #0x18]
mov r1, #3
bl ScheduleBgTilemapBufferTransfer
@@ -1336,7 +1336,7 @@ _021D7E00:
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r5, #0x18]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldr r0, [r5, #0x18]
mov r1, #2
bl ScheduleBgTilemapBufferTransfer
diff --git a/arm9/modules/66/asm/module_66.s b/arm9/modules/66/asm/module_66.s
index a4452068..874296d6 100644
--- a/arm9/modules/66/asm/module_66.s
+++ b/arm9/modules/66/asm/module_66.s
@@ -2090,7 +2090,7 @@ MOD66_021D84C8: ; 0x021D84C8
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
add r4, #0x84
ldr r0, [r4]
mov r1, #1
@@ -2302,7 +2302,7 @@ MOD66_021D868C: ; 0x021D868C
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r5, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_021D86CA:
add r0, r5, #0
add r0, #0xcc
@@ -2333,7 +2333,7 @@ _021D86CA:
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r5, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
add sp, #0x1c
pop {r4, r5, pc}
thumb_func_end MOD66_021D868C
@@ -2394,7 +2394,7 @@ MOD66_021D870C: ; 0x021D870C
ldrb r2, [r3, #2]
ldrb r3, [r3, #3]
ldr r0, [r5, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
add r0, r5, #0
add r0, #0xd4
ldrb r1, [r7, #4]
@@ -2423,7 +2423,7 @@ MOD66_021D870C: ; 0x021D870C
ldrb r2, [r7, #2]
ldrb r3, [r7, #3]
ldr r0, [r5, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
ldr r0, [sp, #0x1c]
cmp r0, #2
beq _021D882E
@@ -2453,7 +2453,7 @@ MOD66_021D870C: ; 0x021D870C
ldrb r2, [r6, #2]
ldrb r3, [r6, #3]
ldr r0, [r5, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
add r0, r5, #0
add r0, #0xd4
ldrb r1, [r4, #4]
@@ -2480,7 +2480,7 @@ MOD66_021D870C: ; 0x021D870C
ldrb r2, [r4, #2]
ldrb r3, [r4, #3]
ldr r0, [r5, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
_021D882E:
add sp, #0x24
pop {r4, r5, r6, r7, pc}
@@ -2516,7 +2516,7 @@ MOD66_021D8838: ; 0x021D8838
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
add r0, r4, #0
add r0, #0xbc
mov r2, #0
@@ -2541,7 +2541,7 @@ MOD66_021D8838: ; 0x021D8838
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
ldrb r0, [r4]
cmp r0, #1
beq _021D88DE
@@ -2569,7 +2569,7 @@ MOD66_021D8838: ; 0x021D8838
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_02018170
+ bl CopyToBgTilemapRect
_021D88DE:
add r0, r4, #0
mov r1, #0
@@ -2598,7 +2598,7 @@ _021D88DE:
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
add r0, r4, #0
add r0, #0xc4
mov r2, #0
@@ -2622,7 +2622,7 @@ _021D88DE:
lsr r0, r0, #0x18
str r0, [sp, #0x18]
ldr r0, [r4, #0x28]
- bl FUN_020181EC
+ bl CopyRectToBgTilemapRect
ldrh r1, [r4, #2]
mov r0, #1
tst r0, r1
@@ -2709,7 +2709,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2720,7 +2720,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2731,7 +2731,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #2
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2742,7 +2742,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #3
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2753,7 +2753,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #4
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2764,7 +2764,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #5
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2775,7 +2775,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #6
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -2786,7 +2786,7 @@ MOD66_021D89B8: ; 0x021D89B8
ldr r0, [r4, #0x28]
mov r1, #7
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4, #0x28]
mov r1, #0
bl ScheduleBgTilemapBufferTransfer
@@ -3416,7 +3416,7 @@ _021D8F7C:
ldr r0, [r5, #0x28]
mov r1, #4
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r2, #0
str r2, [sp]
mov r0, #0x20
@@ -3427,7 +3427,7 @@ _021D8F7C:
ldr r0, [r5, #0x28]
mov r1, #5
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r1, r4, #0
add r0, r5, #0
add r1, #0x68
@@ -3527,7 +3527,7 @@ _021D9066:
ldr r0, [r5, #0x28]
mov r1, #4
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #0
mov r1, #0
mov r2, #1
diff --git a/arm9/modules/67/asm/module_67.s b/arm9/modules/67/asm/module_67.s
index 4a89a4a2..25aa9283 100644
--- a/arm9/modules/67/asm/module_67.s
+++ b/arm9/modules/67/asm/module_67.s
@@ -613,7 +613,7 @@ _021D79AC:
ldrb r1, [r4, r1]
ldr r0, [r4]
add r2, r4, r2
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
mov r3, #0
add r2, r4, #0
str r3, [sp]
@@ -624,7 +624,7 @@ _021D79AC:
ldr r0, [r4]
ldrb r1, [r4, r1]
add r2, #0x5c
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r1, _021D7A34 ; =0x00001062
ldr r0, [r4]
ldrb r1, [r4, r1]
@@ -826,7 +826,7 @@ MOD67_021D7B5C: ; 0x021D7B5C
ldr r0, [r5]
add r3, r2, #0
add r4, r1, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r5]
add r1, r4, #0
bl ScheduleBgTilemapBufferTransfer
@@ -890,7 +890,7 @@ _021D7BCA:
ldr r1, [sp, #0x18]
mov r2, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
b _021D7C10
_021D7BF0:
ldr r0, [sp, #0x14]
diff --git a/arm9/modules/68/asm/module_68.s b/arm9/modules/68/asm/module_68.s
index 081b1768..10d891ac 100644
--- a/arm9/modules/68/asm/module_68.s
+++ b/arm9/modules/68/asm/module_68.s
@@ -393,7 +393,7 @@ _021D7812:
mov r1, #1
add r2, r4, #0
mov r3, #2
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
bl FreeToHeap
ldr r0, [r5]
diff --git a/arm9/modules/69/asm/module_69.s b/arm9/modules/69/asm/module_69.s
index 1ee2e22e..8a49a85d 100644
--- a/arm9/modules/69/asm/module_69.s
+++ b/arm9/modules/69/asm/module_69.s
@@ -776,7 +776,7 @@ MOD69_0222DBAC: ; 0x0222DBAC
ldr r0, [r4, #0x10]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0
add r1, r4, #0
str r3, [sp]
diff --git a/arm9/modules/70/asm/module_70.s b/arm9/modules/70/asm/module_70.s
index 9356ef57..0c6604aa 100644
--- a/arm9/modules/70/asm/module_70.s
+++ b/arm9/modules/70/asm/module_70.s
@@ -867,7 +867,7 @@ MOD70_021D7AF4: ; 0x021D7AF4
ldr r0, [r5, #0x10]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r5, #0
mov r1, #1
bl MOD70_021D7C2C
diff --git a/arm9/modules/71/asm/module_71.s b/arm9/modules/71/asm/module_71.s
index 35aa7381..8cd0ea19 100644
--- a/arm9/modules/71/asm/module_71.s
+++ b/arm9/modules/71/asm/module_71.s
@@ -1304,7 +1304,7 @@ _0222E094:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -3966,7 +3966,7 @@ MOD71_0222F674: ; 0x0222F674
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -4023,7 +4023,7 @@ _0222F6EE:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -4058,7 +4058,7 @@ _0222F738:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -4103,7 +4103,7 @@ MOD71_0222F790: ; 0x0222F790
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -4149,7 +4149,7 @@ MOD71_0222F7E4: ; 0x0222F7E4
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -4895,7 +4895,7 @@ MOD71_0222FDD8: ; 0x0222FDD8
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5f
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5005,7 +5005,7 @@ _0222FF10:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5044,7 +5044,7 @@ _0222FF64:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5081,7 +5081,7 @@ _0222FFB4:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5134,7 +5134,7 @@ MOD71_02230020: ; 0x02230020
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5688,7 +5688,7 @@ MOD71_022304AC: ; 0x022304AC
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, _02230534 ; =0x00002218
add r1, r4, #0
add r1, #0x88
@@ -5787,7 +5787,7 @@ _0223056E:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5836,7 +5836,7 @@ _022305EE:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5885,7 +5885,7 @@ MOD71_02230650: ; 0x02230650
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5f
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5942,7 +5942,7 @@ _022306CA:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -5977,7 +5977,7 @@ _02230714:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -6141,7 +6141,7 @@ MOD71_02230810: ; 0x02230810
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5f
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -6237,7 +6237,7 @@ _0223092E:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
@@ -6276,7 +6276,7 @@ _02230982:
ldr r0, [r4, r0]
add r2, r1, #0
add r3, r1, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0x5e
lsl r3, r3, #2
ldr r0, [r4, r3]
diff --git a/arm9/modules/73/asm/module_73.s b/arm9/modules/73/asm/module_73.s
index fcf89fc9..f267b50a 100644
--- a/arm9/modules/73/asm/module_73.s
+++ b/arm9/modules/73/asm/module_73.s
@@ -4874,7 +4874,7 @@ _021D9B02:
mov r1, #5
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r0, #0xa
ldr r3, [sp, #0x1c]
str r0, [sp]
@@ -4890,7 +4890,7 @@ _021D9B02:
mov r1, #5
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r7, [r5, #0x1c]
mov r2, #0x13
ldr r0, [r5, #0x18]
@@ -5081,7 +5081,7 @@ _021D9CD8:
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r5, #4]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r1, [r5, #0x24]
mov r2, #0
ldrh r0, [r1]
@@ -5097,7 +5097,7 @@ _021D9CD8:
mov r0, #3
str r0, [sp, #8]
ldr r0, [r5, #4]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r3, r5, #0
str r4, [sp]
mov r0, #0x7a
@@ -6029,7 +6029,7 @@ MOD73_021DA374: ; 0x021DA374
lsr r0, r0, #0x18
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
ldr r1, [sp, #0x10]
mov r2, #0
ldrh r0, [r1]
@@ -6045,7 +6045,7 @@ MOD73_021DA374: ; 0x021DA374
mov r0, #4
str r0, [sp, #8]
ldr r0, [r4, #4]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r5, #0
bl FreeToHeap
ldr r0, [r4, #4]
diff --git a/arm9/modules/75/asm/module_75.s b/arm9/modules/75/asm/module_75.s
index 562c24d4..1dd84c2c 100644
--- a/arm9/modules/75/asm/module_75.s
+++ b/arm9/modules/75/asm/module_75.s
@@ -4366,7 +4366,7 @@ MOD75_021E8DAC: ; 0x021E8DAC
ldr r2, _021E8E08 ; =0x021EC5C0
mov r1, #1
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
add r0, #0xfc
ldr r0, [r0]
@@ -4383,7 +4383,7 @@ _021E8DDA:
ldr r2, _021E8E0C ; =0x021EC5F2
mov r1, #1
mov r3, #0
- bl FUN_02018148
+ bl LoadRectToBgTilemapRect
add r0, r4, #0
add r0, #0xfc
ldr r0, [r0]
@@ -7689,7 +7689,7 @@ _021EA828:
mov r1, #2
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0xe
str r0, [sp]
mov r0, #1
@@ -7705,7 +7705,7 @@ _021EA828:
mov r1, #2
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add r0, r4, #1
lsl r0, r0, #0x10
lsr r4, r0, #0x10
diff --git a/arm9/modules/76/asm/module_76.s b/arm9/modules/76/asm/module_76.s
index c4e3785a..5fe58d1c 100644
--- a/arm9/modules/76/asm/module_76.s
+++ b/arm9/modules/76/asm/module_76.s
@@ -1683,7 +1683,7 @@ MOD76_021D8244: ; 0x021D8244
mov r1, #2
add r2, r4, #0
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #5
str r0, [sp]
mov r0, #1
@@ -1699,7 +1699,7 @@ MOD76_021D8244: ; 0x021D8244
mov r1, #2
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #6
str r0, [sp]
mov r0, #1
@@ -1715,7 +1715,7 @@ MOD76_021D8244: ; 0x021D8244
mov r1, #2
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #6
str r0, [sp]
mov r0, #1
@@ -1730,7 +1730,7 @@ MOD76_021D8244: ; 0x021D8244
mov r1, #2
lsr r2, r2, #0x10
lsr r3, r3, #0x18
- bl FUN_02018540
+ bl FillBgTilemapRect
add sp, #0x10
pop {r3, r4, r5, r6, r7, pc}
.align 2, 0
diff --git a/arm9/modules/81/asm/module_81.s b/arm9/modules/81/asm/module_81.s
index d991bc62..102775cd 100644
--- a/arm9/modules/81/asm/module_81.s
+++ b/arm9/modules/81/asm/module_81.s
@@ -1130,7 +1130,7 @@ _022386DE:
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_02018170
+ bl CopyToBgTilemapRect
mov r0, #0xa
str r0, [sp]
str r0, [sp, #4]
@@ -1146,7 +1146,7 @@ _022386DE:
lsr r1, r1, #0x18
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r7, #0
bl FreeToHeap
_02238746:
@@ -2199,7 +2199,7 @@ MOD81_02238E44: ; 0x02238E44
ldr r0, [r4, #0x40]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4]
bl MOD81_02238844
lsl r0, r0, #0x18
@@ -6874,7 +6874,7 @@ MOD81_0223B264: ; 0x0223B264
ldr r0, [r4, #0xc]
mov r1, #1
mov r2, #0xc8
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0
str r3, [sp]
mov r0, #0x20
@@ -6885,7 +6885,7 @@ MOD81_0223B264: ; 0x0223B264
ldr r0, [r4, #0xc]
mov r1, #5
mov r2, #0xc8
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r3, #0
str r3, [sp]
mov r0, #0x20
@@ -6896,7 +6896,7 @@ MOD81_0223B264: ; 0x0223B264
ldr r0, [r4, #0xc]
mov r1, #2
mov r2, #0xc8
- bl FUN_02018540
+ bl FillBgTilemapRect
mov r0, #0x14
str r0, [sp]
mov r1, #0
@@ -9251,7 +9251,7 @@ MOD81_0223C658: ; 0x0223C658
ldr r0, [r4, #0x44]
mov r1, #1
add r3, r2, #0
- bl FUN_02018540
+ bl FillBgTilemapRect
ldr r0, [r4]
bl MOD81_02238844
lsl r0, r0, #0x18
diff --git a/arm9/modules/83/asm/module_83.s b/arm9/modules/83/asm/module_83.s
index 9e9d13b7..a1aea99f 100644
--- a/arm9/modules/83/asm/module_83.s
+++ b/arm9/modules/83/asm/module_83.s
@@ -446,7 +446,7 @@ _0222D8B2:
mov r1, #1
add r2, r6, #0
add r3, r7, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
mov r0, #1
mov r1, #0
bl GX_EngineAToggleLayers
@@ -1613,7 +1613,7 @@ _0222E206:
ldr r2, [sp, #0x10]
ldr r3, [sp, #0x14]
mov r1, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
b _0222E294
_0222E256:
mov r1, #1
@@ -1640,7 +1640,7 @@ _0222E256:
ldr r2, [sp, #0x18]
ldr r3, [sp, #0x1c]
mov r1, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
_0222E294:
add r4, r4, #1
add r5, #0x10
@@ -2618,7 +2618,7 @@ _0222E960:
ldr r0, [r4, #4]
mov r1, #1
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r4, #4]
mov r1, #1
bl FUN_02017CD0
@@ -2683,7 +2683,7 @@ MOD83_0222EA88: ; 0x0222EA88
ldr r0, [r4, #4]
mov r1, #4
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r4, #4]
mov r1, #4
bl FUN_02017CD0
@@ -5728,7 +5728,7 @@ MOD83_022302B4: ; 0x022302B4
add r0, r4, #0
mov r1, #5
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r4, #0
mov r1, #5
bl FUN_02017CD0
@@ -5788,7 +5788,7 @@ MOD83_02230330: ; 0x02230330
add r0, r4, #0
mov r1, #1
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r4, #0
mov r1, #1
bl FUN_02017CD0
@@ -8332,7 +8332,7 @@ MOD83_02231820: ; 0x02231820
add r0, r4, #0
mov r1, #1
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r4, #0
mov r1, #1
bl FUN_02017CD0
@@ -9509,7 +9509,7 @@ _0223219C:
ldr r0, [r5, r0]
mov r1, #3
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, _02232204 ; =0x0000299C
mov r1, #3
ldr r0, [r5, r0]
@@ -17601,7 +17601,7 @@ MOD83_02235FBC: ; 0x02235FBC
mov r1, #2
str r0, [sp, #8]
ldr r0, [r4, #0x20]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r4, #0x20]
mov r1, #2
bl FUN_02017CD0
@@ -17859,7 +17859,7 @@ _02236148:
mov r1, #2
str r0, [sp, #8]
ldr r0, [r6, #0x20]
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r6, #0x20]
mov r1, #2
bl FUN_02017CD0
@@ -24245,7 +24245,7 @@ MOD83_022391EC: ; 0x022391EC
add r0, r5, #0
mov r1, #5
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
add r0, r5, #0
mov r1, #5
bl FUN_02017CD0
diff --git a/arm9/modules/85/asm/module_85.s b/arm9/modules/85/asm/module_85.s
index 34b35590..dbf3de15 100644
--- a/arm9/modules/85/asm/module_85.s
+++ b/arm9/modules/85/asm/module_85.s
@@ -10243,7 +10243,7 @@ MOD85_021DC050: ; 0x021DC050
mov r1, #1
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, _021DC090 ; =0x0000043C
mov r1, #1
ldr r0, [r4, r0]
@@ -10278,7 +10278,7 @@ MOD85_021DC094: ; 0x021DC094
mov r1, #1
lsr r2, r2, #0x18
lsr r3, r3, #0x18
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, _021DC0D4 ; =0x0000043C
mov r1, #1
ldr r0, [r4, r0]
diff --git a/arm9/modules/86/asm/module_86.s b/arm9/modules/86/asm/module_86.s
index a1e2bb35..46f77b31 100644
--- a/arm9/modules/86/asm/module_86.s
+++ b/arm9/modules/86/asm/module_86.s
@@ -701,7 +701,7 @@ _021D7A06:
mov r2, #0
ldr r0, [r5, #0x10]
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r5, #0x10]
mov r1, #1
bl FUN_02017CD0
@@ -745,7 +745,7 @@ _021D7A06:
ldr r0, [r5, #0x10]
mov r1, #5
add r3, r2, #0
- bl FUN_020186B4
+ bl BgTilemapRectChangePalette
ldr r0, [r5, #0x10]
mov r1, #5
bl FUN_02017CD0