summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arm9/asm/RUNTIME_CPLUS_StaticInitializers.s2
-rw-r--r--arm9/asm/unk_0206C700.s2
-rw-r--r--arm9/asm/unk_0207D5BC.s2
-rw-r--r--arm9/global.inc10
-rw-r--r--arm9/modules/05/asm/mod05_021E1AD8.s4
-rw-r--r--arm9/modules/05/asm/module_05.s6
-rw-r--r--arm9/modules/06/asm/module_06.s6
-rw-r--r--arm9/modules/09/asm/module_09.s8
-rw-r--r--arm9/modules/11/asm/module_11_thumb1.s2
-rw-r--r--arm9/modules/11/asm/module_11_thumb2.s2
-rw-r--r--arm9/modules/14/asm/module_14.s16
-rw-r--r--arm9/modules/15/asm/module_15.s14
-rw-r--r--arm9/modules/16/asm/module_16.s4
-rw-r--r--arm9/modules/17/asm/module_17.s10
-rw-r--r--arm9/modules/27/asm/module_27.s2
-rw-r--r--arm9/modules/36/asm/module_36.s2
-rw-r--r--arm9/modules/38/asm/module_38.s8
-rw-r--r--arm9/modules/43/asm/module_43.s2
-rw-r--r--arm9/modules/47/asm/module_47.s2
-rw-r--r--arm9/modules/49/asm/module_49.s2
-rw-r--r--arm9/modules/69/asm/module_69.s2
-rw-r--r--arm9/modules/70/asm/module_70.s4
-rw-r--r--arm9/modules/73/asm/module_73.s6
-rw-r--r--arm9/modules/84/asm/module_84_thumb2.s2
-rw-r--r--arm9/src/unk_02016B94.c312
-rw-r--r--include/unk_02016B94.h75
26 files changed, 254 insertions, 253 deletions
diff --git a/arm9/asm/RUNTIME_CPLUS_StaticInitializers.s b/arm9/asm/RUNTIME_CPLUS_StaticInitializers.s
index 403e0812..c1446521 100644
--- a/arm9/asm/RUNTIME_CPLUS_StaticInitializers.s
+++ b/arm9/asm/RUNTIME_CPLUS_StaticInitializers.s
@@ -5,7 +5,7 @@
.global __global_destructor_chain
__global_destructor_chain: ; 0x021D74C8
- .space 0x18
+ .space 0xC
.text
diff --git a/arm9/asm/unk_0206C700.s b/arm9/asm/unk_0206C700.s
index 9b642d7a..bb88f0ee 100644
--- a/arm9/asm/unk_0206C700.s
+++ b/arm9/asm/unk_0206C700.s
@@ -297,7 +297,7 @@ FUN_0206C92C: ; 0x0206C92C
bl Main_SetVBlankIntrCB
ldr r0, [r4, #0x4]
mov r1, #0x1
- bl FUN_020191A4
+ bl WindowArray_dtor
ldr r0, [r4, #0x14]
mov r1, #0x0
bl FUN_02003038
diff --git a/arm9/asm/unk_0207D5BC.s b/arm9/asm/unk_0207D5BC.s
index 9bf3f266..d9a67905 100644
--- a/arm9/asm/unk_0207D5BC.s
+++ b/arm9/asm/unk_0207D5BC.s
@@ -269,7 +269,7 @@ _0207D732:
ldr r1, [r1, r2]
lsl r1, r1, #0x18
lsr r1, r1, #0x18
- bl FUN_020191A4
+ bl WindowArray_dtor
_0207D744:
pop {r3, pc}
nop
diff --git a/arm9/global.inc b/arm9/global.inc
index 3972e4ae..828294f1 100644
--- a/arm9/global.inc
+++ b/arm9/global.inc
@@ -1077,14 +1077,14 @@
.extern FUN_020190EC
.extern FUN_02019150
.extern FUN_02019178
-.extern FUN_020191A4
+.extern WindowArray_dtor
.extern CopyWindowToVram
.extern FUN_02019220
-.extern FUN_02019270
-.extern FUN_0201928C
+.extern PutWindowTilemap
+.extern PutWindowTilemapRectAnchoredTopLeft
.extern FUN_020192B8
-.extern FUN_020192D4
-.extern FUN_02019358
+.extern PutWindowTilemap_TextMode
+.extern PutWindowTilemap_AffineMode
.extern FUN_020193B4
.extern FUN_02019444
.extern FUN_0201949C
diff --git a/arm9/modules/05/asm/mod05_021E1AD8.s b/arm9/modules/05/asm/mod05_021E1AD8.s
index c41f4c57..3ede4756 100644
--- a/arm9/modules/05/asm/mod05_021E1AD8.s
+++ b/arm9/modules/05/asm/mod05_021E1AD8.s
@@ -1791,7 +1791,7 @@ MOD05_021E288C: ; 0x021E288C
bl FUN_0200CCF8
add r0, r4, #0
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
pop {r4, pc}
thumb_func_start MOD05_021E28A0
@@ -1925,7 +1925,7 @@ MOD05_021E29B4: ; 0x021E29B4
bl FUN_0200CCF8
add r0, r4, #0
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
pop {r4, pc}
thumb_func_start MOD05_021E29C8
diff --git a/arm9/modules/05/asm/module_05.s b/arm9/modules/05/asm/module_05.s
index a67d2d02..c01bfea2 100644
--- a/arm9/modules/05/asm/module_05.s
+++ b/arm9/modules/05/asm/module_05.s
@@ -3169,7 +3169,7 @@ _021E9FA4:
lsl r0, r0, #2
ldr r0, [r4, r0]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #3
mov r1, #0x20
mov r2, #0
@@ -4102,7 +4102,7 @@ _021EA76C:
lsl r0, r0, #8
ldr r0, [r4, r0]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #3
mov r1, #0x20
mov r2, #0
@@ -5571,7 +5571,7 @@ _021EB394:
bl FUN_02019178
ldr r0, [r4]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #3
mov r1, #0x20
mov r2, #0
diff --git a/arm9/modules/06/asm/module_06.s b/arm9/modules/06/asm/module_06.s
index 6fbee88b..8e1e98db 100644
--- a/arm9/modules/06/asm/module_06.s
+++ b/arm9/modules/06/asm/module_06.s
@@ -41839,7 +41839,7 @@ MOD06_0224DCB4: ; 0x0224DCB4
bl FUN_02019178
ldr r0, [r4, #4]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #0
str r0, [r4]
_0224DCD6:
@@ -42111,7 +42111,7 @@ _0224DEE6:
bl FUN_02019178
ldr r0, [r6, #4]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #0
str r0, [r6]
_0224DF18:
@@ -42452,7 +42452,7 @@ _0224E1C0:
bl FUN_02019178
ldr r0, [r6, #4]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #1
str r0, [r6]
_0224E1E2:
diff --git a/arm9/modules/09/asm/module_09.s b/arm9/modules/09/asm/module_09.s
index 003e2dc8..a7342efb 100644
--- a/arm9/modules/09/asm/module_09.s
+++ b/arm9/modules/09/asm/module_09.s
@@ -3974,7 +3974,7 @@ MOD09_02213DE0: ; 0x02213DE0
bx r3
nop
_02213DF0: .word 0x00002070
-_02213DF4: .word FUN_020191A4
+_02213DF4: .word WindowArray_dtor
thumb_func_start MOD09_02213DF8
MOD09_02213DF8: ; 0x02213DF8
@@ -3984,7 +3984,7 @@ MOD09_02213DF8: ; 0x02213DF8
ldr r0, [r5, r1]
add r1, r1, #4
ldrb r1, [r5, r1]
- bl FUN_020191A4
+ bl WindowArray_dtor
ldr r0, _02213E24 ; =0x00002050
mov r4, #0
add r5, r5, r0
@@ -14395,7 +14395,7 @@ MOD09_02219510: ; 0x02219510
ldrb r1, [r1]
bx r3
.align 2, 0
-_0221951C: .word FUN_020191A4
+_0221951C: .word WindowArray_dtor
thumb_func_start MOD09_02219520
MOD09_02219520: ; 0x02219520
@@ -14405,7 +14405,7 @@ MOD09_02219520: ; 0x02219520
add r1, #0x30
ldrb r1, [r1]
ldr r0, [r4, #0x2c]
- bl FUN_020191A4
+ bl WindowArray_dtor
add r4, #0x1c
add r0, r4, #0
bl FUN_02019178
diff --git a/arm9/modules/11/asm/module_11_thumb1.s b/arm9/modules/11/asm/module_11_thumb1.s
index 65a74381..96c089da 100644
--- a/arm9/modules/11/asm/module_11_thumb1.s
+++ b/arm9/modules/11/asm/module_11_thumb1.s
@@ -1355,7 +1355,7 @@ _0222E1AC:
bl FUN_02002BB8
ldr r0, [r4, #8]
mov r1, #3
- bl FUN_020191A4
+ bl WindowArray_dtor
ldr r0, [r4, #4]
bl FreeToHeap
mov r0, #0x87
diff --git a/arm9/modules/11/asm/module_11_thumb2.s b/arm9/modules/11/asm/module_11_thumb2.s
index 451daa87..3f35ee60 100644
--- a/arm9/modules/11/asm/module_11_thumb2.s
+++ b/arm9/modules/11/asm/module_11_thumb2.s
@@ -810,7 +810,7 @@ MOD11_0222F93C: ; 0x0222F93C
bl FUN_02002FEC
ldr r0, [r4, #8]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
mov r0, #2
mov r1, #0
bl GX_EngineAToggleLayers
diff --git a/arm9/modules/14/asm/module_14.s b/arm9/modules/14/asm/module_14.s
index d5f05188..7e76f5c5 100644
--- a/arm9/modules/14/asm/module_14.s
+++ b/arm9/modules/14/asm/module_14.s
@@ -19651,13 +19651,13 @@ _021E0F5E:
ldr r0, [r5, #4]
beq _021E0F78
add r0, r0, r4
- bl FUN_02019270
+ bl PutWindowTilemap
b _021E0F82
_021E0F78:
add r0, r0, r4
mov r1, #0xc
mov r2, #2
- bl FUN_0201928C
+ bl PutWindowTilemapRectAnchoredTopLeft
_021E0F82:
add r7, r7, #1
add r6, #8
@@ -20815,7 +20815,7 @@ MOD14_021E189C: ; 0x021E189C
add r5, r0, #0
ldr r0, [r5, #0x18]
add r4, r1, #0
- bl FUN_02019270
+ bl PutWindowTilemap
ldr r3, [r5, #0x18]
ldrb r0, [r3, #7]
str r0, [sp]
@@ -22538,10 +22538,10 @@ _021E25C2:
cmp r0, #0
bne _021E260E
ldr r0, [r5, #0x10]
- bl FUN_02019270
+ bl PutWindowTilemap
ldr r0, [r5, #0x10]
add r0, #0x10
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
bl MOD14_021E2394
add r0, r5, #0
@@ -28642,7 +28642,7 @@ _021E541E:
add r2, r6, #0
bl FUN_02019150
add r0, r4, #0
- bl FUN_02019270
+ bl PutWindowTilemap
add r5, r5, #1
add r6, #8
add r4, #0x10
@@ -28794,7 +28794,7 @@ _021E554C:
add r2, r7, #0
bl FUN_02019150
add r0, r5, r4
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, r4
mov r1, #0
bl FillWindowPixelBuffer
@@ -28980,7 +28980,7 @@ _021E56B4:
add r2, r7, #0
bl FUN_02019150
add r0, r5, r4
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, r4
mov r1, #0
bl FillWindowPixelBuffer
diff --git a/arm9/modules/15/asm/module_15.s b/arm9/modules/15/asm/module_15.s
index a1f0f2d1..015a582d 100644
--- a/arm9/modules/15/asm/module_15.s
+++ b/arm9/modules/15/asm/module_15.s
@@ -4532,10 +4532,10 @@ MOD15_021D9694: ; 0x021D9694
bl FUN_0200D06C
add r0, r5, #0
add r0, #0xc
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r0, #0x1c
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
bl MOD15_021D9868
add r0, r5, #0
@@ -5647,7 +5647,7 @@ MOD15_021DA044: ; 0x021DA044
add r2, r5, #0
bl FUN_02019150
add r0, sp, #0x10
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, sp, #0x10
mov r1, #0xe
bl FillWindowPixelBuffer
@@ -6042,7 +6042,7 @@ _021DA31A:
add r2, r5, #0
bl AddTextPrinterParameterized2
add r0, sp, #0x28
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, sp, #0x28
bl FUN_02019548
add r0, r5, #0
@@ -6145,7 +6145,7 @@ _021DA452:
add r0, sp, #0x20
bl FUN_02019548
add r0, sp, #0x20
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r4, #0
bl String_dtor
add r0, sp, #0x20
@@ -6230,7 +6230,7 @@ _021DA4C2:
mov r1, #0
bl AddTextPrinterParameterized2
add r0, r6, #0
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r6, #0
bl FUN_02019548
add r0, r6, #0
@@ -6772,7 +6772,7 @@ MOD15_021DA8E8: ; 0x021DA8E8
bl FillWindowPixelBuffer
add r0, r5, #0
add r0, #0x10
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r0, #0x10
bl FUN_02019548
diff --git a/arm9/modules/16/asm/module_16.s b/arm9/modules/16/asm/module_16.s
index 9417b6bd..61e584b4 100644
--- a/arm9/modules/16/asm/module_16.s
+++ b/arm9/modules/16/asm/module_16.s
@@ -8457,7 +8457,7 @@ MOD16_021DB3BC: ; 0x021DB3BC
mov r1, #1
bx r3
nop
-_021DB3C4: .word FUN_020191A4
+_021DB3C4: .word WindowArray_dtor
thumb_func_end MOD16_021DB3BC
thumb_func_start MOD16_021DB3C8
@@ -51491,7 +51491,7 @@ MOD16_021EF358: ; 0x021EF358
bl FUN_02019178
add r0, r4, #0
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
pop {r4, pc}
thumb_func_end MOD16_021EF358
diff --git a/arm9/modules/17/asm/module_17.s b/arm9/modules/17/asm/module_17.s
index 7d11697e..e761b2d7 100644
--- a/arm9/modules/17/asm/module_17.s
+++ b/arm9/modules/17/asm/module_17.s
@@ -2472,7 +2472,7 @@ _021D8780:
ldr r0, _021D8810 ; =0x000006A8
mov r1, #1
ldr r0, [r4, r0]
- bl FUN_020191A4
+ bl WindowArray_dtor
add r0, r4, #0
bl MOD17_021D92AC
ldr r0, _021D8814 ; =0x0000048C
@@ -3080,7 +3080,7 @@ MOD17_021D8C9C: ; 0x021D8C9C
ldr r0, _021D8D58 ; =0x000006A8
mov r1, #1
ldr r0, [r4, r0]
- bl FUN_020191A4
+ bl WindowArray_dtor
add r0, r4, #0
bl MOD17_021D92AC
ldr r0, _021D8D5C ; =0x0000048C
@@ -11308,7 +11308,7 @@ MOD17_021DC8F8: ; 0x021DC8F8
mov r1, #1
bx r3
nop
-_021DC900: .word FUN_020191A4
+_021DC900: .word WindowArray_dtor
thumb_func_end MOD17_021DC8F8
thumb_func_start MOD17_021DC904
@@ -11848,7 +11848,7 @@ MOD17_021DCCE0: ; 0x021DCCE0
mov r1, #1
bx r3
nop
-_021DCCE8: .word FUN_020191A4
+_021DCCE8: .word WindowArray_dtor
thumb_func_end MOD17_021DCCE0
thumb_func_start MOD17_021DCCEC
@@ -14300,7 +14300,7 @@ MOD17_021DDF84: ; 0x021DDF84
lsl r0, r0, #4
ldr r0, [r4, r0]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
pop {r4, pc}
.align 2, 0
thumb_func_end MOD17_021DDF84
diff --git a/arm9/modules/27/asm/module_27.s b/arm9/modules/27/asm/module_27.s
index 25e4a4b6..09600b4b 100644
--- a/arm9/modules/27/asm/module_27.s
+++ b/arm9/modules/27/asm/module_27.s
@@ -633,7 +633,7 @@ _02254CE8:
lsr r3, r3, #0x18
bl FUN_02019064
add r0, r4, #0
- bl FUN_02019270
+ bl PutWindowTilemap
ldr r1, [sp, #0x14]
add r0, r4, #0
bl MOD27_02254D60
diff --git a/arm9/modules/36/asm/module_36.s b/arm9/modules/36/asm/module_36.s
index 0b141199..0c92457f 100644
--- a/arm9/modules/36/asm/module_36.s
+++ b/arm9/modules/36/asm/module_36.s
@@ -1112,7 +1112,7 @@ MOD36_0225503C: ; 0x0225503C
_02255082:
add r0, r4, #0
add r0, #0x48
- bl FUN_02019270
+ bl PutWindowTilemap
add r4, #0x48
add r0, r4, #0
bl FUN_02019548
diff --git a/arm9/modules/38/asm/module_38.s b/arm9/modules/38/asm/module_38.s
index ee5980ec..1fa38d02 100644
--- a/arm9/modules/38/asm/module_38.s
+++ b/arm9/modules/38/asm/module_38.s
@@ -879,16 +879,16 @@ MOD38_02254E28: ; 0x02254E28
bl FUN_02019064
add r0, r5, #0
add r0, #0x74
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r0, #0x84
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r0, #0x94
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r0, #0xa4
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
add r1, r6, #0
bl MOD38_02254FCC
diff --git a/arm9/modules/43/asm/module_43.s b/arm9/modules/43/asm/module_43.s
index ce3da4bb..892a3c08 100644
--- a/arm9/modules/43/asm/module_43.s
+++ b/arm9/modules/43/asm/module_43.s
@@ -667,7 +667,7 @@ MOD43_02254CD0: ; 0x02254CD0
str r1, [sp, #0xc]
bl AddTextPrinterParameterized2
add r0, sp, #0x14
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, sp, #0x14
bl FUN_02019548
add r0, sp, #0x14
diff --git a/arm9/modules/47/asm/module_47.s b/arm9/modules/47/asm/module_47.s
index 3cd1bb32..69ade0a7 100644
--- a/arm9/modules/47/asm/module_47.s
+++ b/arm9/modules/47/asm/module_47.s
@@ -924,7 +924,7 @@ MOD47_02254E74: ; 0x02254E74
bl FUN_02019064
add r0, r5, #0
add r0, #0x20
- bl FUN_02019270
+ bl PutWindowTilemap
add r0, r5, #0
bl MOD47_022550FC
ldr r0, [r5, #4]
diff --git a/arm9/modules/49/asm/module_49.s b/arm9/modules/49/asm/module_49.s
index 1de7ea96..2bd21a96 100644
--- a/arm9/modules/49/asm/module_49.s
+++ b/arm9/modules/49/asm/module_49.s
@@ -423,7 +423,7 @@ MOD49_02254AD4: ; 0x02254AD4
mov r1, #4
bl FillWindowPixelBuffer
add r0, sp, #0x1c
- bl FUN_02019270
+ bl PutWindowTilemap
ldr r1, _02254BD4 ; =0x00000197
mov r0, #0x1a
mov r2, #0
diff --git a/arm9/modules/69/asm/module_69.s b/arm9/modules/69/asm/module_69.s
index c9bce6b2..e2fe9788 100644
--- a/arm9/modules/69/asm/module_69.s
+++ b/arm9/modules/69/asm/module_69.s
@@ -799,7 +799,7 @@ MOD69_0222DBAC: ; 0x0222DBAC
bl FUN_02019548
add r0, r4, #0
add r0, #0x14
- bl FUN_02019270
+ bl PutWindowTilemap
mov r0, #0
str r0, [sp]
str r0, [sp, #4]
diff --git a/arm9/modules/70/asm/module_70.s b/arm9/modules/70/asm/module_70.s
index daff2762..2f9e4ae0 100644
--- a/arm9/modules/70/asm/module_70.s
+++ b/arm9/modules/70/asm/module_70.s
@@ -979,10 +979,10 @@ MOD70_021D7C2C: ; 0x021D7C2C
bl FUN_02019064
add r0, r5, #0
add r0, #0x14
- bl FUN_02019270
+ bl PutWindowTilemap
add r5, #0x24
add r0, r5, #0
- bl FUN_02019270
+ bl PutWindowTilemap
add r4, #0xb4
add r0, r4, #0
add sp, #0x14
diff --git a/arm9/modules/73/asm/module_73.s b/arm9/modules/73/asm/module_73.s
index 3caf2693..c1b87cfb 100644
--- a/arm9/modules/73/asm/module_73.s
+++ b/arm9/modules/73/asm/module_73.s
@@ -5020,12 +5020,12 @@ MOD73_021D9C7C: ; 0x021D9C7C
bl FUN_02019178
ldr r0, [r4, #8]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
ldr r0, [r4, #0xc]
bl FUN_02019178
ldr r0, [r4, #0xc]
mov r1, #1
- bl FUN_020191A4
+ bl WindowArray_dtor
pop {r4, pc}
.align 2, 0
thumb_func_end MOD73_021D9C7C
@@ -5976,7 +5976,7 @@ _021DA35C:
bl FUN_02019178
ldr r0, [r5, #8]
add r1, r6, #0
- bl FUN_020191A4
+ bl WindowArray_dtor
add r4, r4, #1
add r5, r5, #4
cmp r4, #4
diff --git a/arm9/modules/84/asm/module_84_thumb2.s b/arm9/modules/84/asm/module_84_thumb2.s
index 17f9316e..44a7d65a 100644
--- a/arm9/modules/84/asm/module_84_thumb2.s
+++ b/arm9/modules/84/asm/module_84_thumb2.s
@@ -579,7 +579,7 @@ MOD84_021D84F8: ; 0x021D84F8
mov r1, #0
bl FillWindowPixelBuffer
ldr r0, [r4, #0x24]
- bl FUN_02019270
+ bl PutWindowTilemap
ldr r0, [r4, #0x24]
bl CopyWindowToVram
mov r0, #0x4b
diff --git a/arm9/src/unk_02016B94.c b/arm9/src/unk_02016B94.c
index c03fbd75..b8bdf158 100644
--- a/arm9/src/unk_02016B94.c
+++ b/arm9/src/unk_02016B94.c
@@ -37,10 +37,10 @@ void (*const UNK_020EDB44[])(struct Window *) = {
FUN_020195D0,
};
-void (*const UNK_020EDB38[])(struct Window *) = {
- FUN_020192D4,
- FUN_02019358,
- FUN_020192D4,
+void (*const sPutWindowTilemapFuncs[])(struct Window *) = {
+ PutWindowTilemap_TextMode,
+ PutWindowTilemap_AffineMode,
+ PutWindowTilemap_TextMode,
};
void (*const UNK_020EDB68[])(struct Window *) = {
@@ -59,7 +59,7 @@ THUMB_FUNC struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id)
{
struct UnkStruct_02016B94_2 *ptr = AllocFromHeap(heap_id, sizeof(struct UnkStruct_02016B94_2));
memset(ptr, 0, sizeof(struct UnkStruct_02016B94_2));
- ptr->unk00 = heap_id;
+ ptr->heap_id = heap_id;
ptr->unk04 = 0;
ptr->unk06 = 0;
@@ -2418,7 +2418,7 @@ THUMB_FUNC void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u3
break;
case 2:
- if (param0->unk08[2].unk1c == 0)
+ if (param0->unk08[2].mode == 0)
{
reg_G2_BG2OFS = (r1 & 0x1FF) | ((r0 << 16) & 0x1FF0000);
}
@@ -2430,7 +2430,7 @@ THUMB_FUNC void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u3
break;
case 3:
- if (param0->unk08[3].unk1c == 0)
+ if (param0->unk08[3].mode == 0)
{
reg_G2_BG3OFS = (r1 & 0x1FF) | ((r0 << 16) & 0x1FF0000);
}
@@ -2451,7 +2451,7 @@ THUMB_FUNC void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u3
break;
case 6:
- if (param0->unk08[6].unk1c == 0)
+ if (param0->unk08[6].mode == 0)
{
reg_G2S_DB_BG2OFS = (r1 & 0x1FF) | ((r0 << 16) & 0x1FF0000);
}
@@ -2463,7 +2463,7 @@ THUMB_FUNC void FUN_020179E0(struct UnkStruct_02016B94_2 *param0, u32 param1, u3
break;
case 7:
- if (param0->unk08[7].unk1c == 0)
+ if (param0->unk08[7].mode == 0)
{
reg_G2S_DB_BG3OFS = (r1 & 0x1FF) | ((r0 << 16) & 0x1FF0000);
}
@@ -2611,7 +2611,7 @@ THUMB_FUNC void FUN_02017CE8(
}
u32 r7 = param2[0] >> 8;
- void *ptr = AllocFromHeapAtEnd(param0->unk00, r7);
+ void *ptr = AllocFromHeapAtEnd(param0->heap_id, r7);
FUN_02017C98(param2, ptr, st0);
FUN_02017D68(param1, ptr, param4 * 2, r7);
FreeToHeap(ptr);
@@ -2679,7 +2679,7 @@ THUMB_FUNC void FUN_02017E40(
{
u32 r4 = param2[0] >> 8;
- void *ptr = AllocFromHeapAtEnd(param0->unk00, r4);
+ void *ptr = AllocFromHeapAtEnd(param0->heap_id, r4);
FUN_02017C98(param2, ptr, st0);
FUN_02017E84(param1, ptr, param4, r4);
FreeToHeap(ptr);
@@ -2737,7 +2737,7 @@ THUMB_FUNC void FUN_02017F48(
void *st4;
u32 st0 = param3 * param0->unk08[param1].unk1f;
u32 r5 = param2;
- st4 = AllocFromHeapAtEnd(param0->unk00, st0);
+ st4 = AllocFromHeapAtEnd(param0->heap_id, st0);
if (param0->unk08[param1].unk1f == 0x20)
{
@@ -2878,7 +2878,7 @@ THUMB_FUNC void FUN_02018170(struct UnkStruct_02016B94_2 *param0,
u8 param9,
u8 param10)
{
- if (param0->unk08[param1].unk1c != 1)
+ if (param0->unk08[param1].mode != 1)
{
FUN_02018268(&param0->unk08[param1],
param2,
@@ -2920,7 +2920,7 @@ THUMB_FUNC void FUN_020181EC(struct UnkStruct_02016B94_2 *param0,
u8 param9,
u8 param10)
{
- if (param0->unk08[param1].unk1c != 1)
+ if (param0->unk08[param1].mode != 1)
{
FUN_02018268(&param0->unk08[param1],
param2,
@@ -3145,7 +3145,7 @@ THUMB_FUNC void FUN_02018540(struct UnkStruct_02016B94_2 *param0,
u8 param6,
u8 param7)
{
- if (param0->unk08[param1].unk1c != 1)
+ if (param0->unk08[param1].mode != 1)
{
FUN_02018590(&param0->unk08[param1], param2, param3, param4, param5, param6, param7);
@@ -4503,22 +4503,22 @@ THUMB_FUNC void *AllocWindows(u32 heap_id, s32 size)
THUMB_FUNC void InitWindow(struct Window *param0)
{
param0->unk00 = 0;
- param0->unk04 = 0xff;
- param0->unk05 = 0;
- param0->unk06 = 0;
+ param0->bgId = 0xff;
+ param0->tilemapLeft = 0;
+ param0->tilemapTop = 0;
param0->width = 0;
param0->height = 0;
- param0->unk09 = 0;
+ param0->paletteNum = 0;
- param0->unk0a_0 = 0;
- param0->unk0c = 0;
+ param0->baseTile = 0;
+ param0->pixelBuffer = 0;
param0->unk0b_15 = 0;
}
THUMB_FUNC BOOL FUN_02019048(struct Window *param0)
{
- if (param0->unk00 == 0 || param0->unk04 == 0xff || param0->unk0c == 0)
+ if (param0->unk00 == 0 || param0->bgId == 0xff || param0->pixelBuffer == 0)
{
return FALSE;
}
@@ -4547,22 +4547,22 @@ THUMB_FUNC void FUN_02019064(struct UnkStruct_02016B94_2 *param0,
return;
}
- void *ptr = AllocFromHeap(param0->unk00, (u32)(param5 * param6 * param0->unk08[param2].unk1f));
+ void *ptr = AllocFromHeap(param0->heap_id, (u32)(param5 * param6 * param0->unk08[param2].unk1f));
if (ptr == NULL)
{
return;
}
param1->unk00 = param0;
- param1->unk04 = param2;
- param1->unk05 = param3;
- param1->unk06 = param4;
+ param1->bgId = param2;
+ param1->tilemapLeft = param3;
+ param1->tilemapTop = param4;
param1->width = param5;
param1->height = param6;
- param1->unk09 = param7;
+ param1->paletteNum = param7;
- param1->unk0a_0 = param8;
- param1->unk0c = ptr;
+ param1->baseTile = param8;
+ param1->pixelBuffer = ptr;
enum UnkEnum1 r2;
if (param0->unk08[param2].unk1e == 0)
@@ -4586,7 +4586,7 @@ THUMB_FUNC void FUN_020190EC(struct UnkStruct_02016B94_2 *param0,
{
u32 size = (u32)(param2 * param3 * 32);
- void *ptr = AllocFromHeap(param0->unk00, size);
+ void *ptr = AllocFromHeap(param0->heap_id, size);
param5 |= (param5 * 16);
memset(ptr, param5, size);
@@ -4596,8 +4596,8 @@ THUMB_FUNC void FUN_020190EC(struct UnkStruct_02016B94_2 *param0,
param1->unk00 = param0;
param1->width = param2;
param1->height = param3;
- param1->unk0a_0 = param4;
- param1->unk0c = ptr;
+ param1->baseTile = param4;
+ param1->pixelBuffer = ptr;
param1->unk0b_15 = 0;
}
}
@@ -4617,108 +4617,108 @@ THUMB_FUNC void FUN_02019150(
param2->unk6);
}
-THUMB_FUNC void FUN_02019178(struct Window *param0)
+THUMB_FUNC void FUN_02019178(struct Window *window)
{
- FreeToHeap(param0->unk0c);
-
- param0->unk00 = 0;
- param0->unk04 = 0xff;
- param0->unk05 = 0;
- param0->unk06 = 0;
- param0->width = 0;
- param0->height = 0;
- param0->unk09 = 0;
- param0->unk0a_0 = 0;
- param0->unk0c = 0;
+ FreeToHeap(window->pixelBuffer);
+
+ window->unk00 = 0;
+ window->bgId = 0xff;
+ window->tilemapLeft = 0;
+ window->tilemapTop = 0;
+ window->width = 0;
+ window->height = 0;
+ window->paletteNum = 0;
+ window->baseTile = 0;
+ window->pixelBuffer = NULL;
}
-THUMB_FUNC void FUN_020191A4(struct Window *param0, int param1)
+THUMB_FUNC void WindowArray_dtor(struct Window *windows, int count)
{
- for (u16 i = 0; i < param1; i++)
+ for (u16 i = 0; i < count; i++)
{
- if (param0[i].unk0c != NULL)
+ if (windows[i].pixelBuffer != NULL)
{
- FreeToHeap(param0[i].unk0c);
+ FreeToHeap(windows[i].pixelBuffer);
}
}
- FreeToHeap(param0);
+ FreeToHeap(windows);
}
-THUMB_FUNC void CopyWindowToVram(struct Window *param0)
+THUMB_FUNC void CopyWindowToVram(struct Window *window)
{
- GF_ASSERT(param0);
- GF_ASSERT(param0->unk00);
- GF_ASSERT(param0->unk04 < 8);
- GF_ASSERT(param0->unk00->unk08[param0->unk04].unk1c < 3);
+ GF_ASSERT(window != NULL);
+ GF_ASSERT(window->unk00 != NULL);
+ GF_ASSERT(window->bgId < NELEMS(window->unk00->unk08));
+ GF_ASSERT(window->unk00->unk08[window->bgId].mode < NELEMS(UNK_020EDB68));
- UNK_020EDB68[param0->unk00->unk08[param0->unk04].unk1c](param0);
+ UNK_020EDB68[window->unk00->unk08[window->bgId].mode](window);
}
-THUMB_FUNC void FUN_02019220(struct Window *param0)
+THUMB_FUNC void FUN_02019220(struct Window *window)
{
- GF_ASSERT(param0);
- GF_ASSERT(param0->unk00);
- GF_ASSERT(param0->unk04 < 8);
- GF_ASSERT(param0->unk00->unk08[param0->unk04].unk1c < 3);
+ GF_ASSERT(window);
+ GF_ASSERT(window->unk00);
+ GF_ASSERT(window->bgId < NELEMS(window->unk00->unk08));
+ GF_ASSERT(window->unk00->unk08[window->bgId].mode < NELEMS(UNK_020EDB5C));
- UNK_020EDB5C[param0->unk00->unk08[param0->unk04].unk1c](param0);
+ UNK_020EDB5C[window->unk00->unk08[window->bgId].mode](window);
}
-THUMB_FUNC void FUN_02019270(struct Window *param0)
+THUMB_FUNC void PutWindowTilemap(struct Window *window)
{
- UNK_020EDB38[param0->unk00->unk08[param0->unk04].unk1c](param0);
+ sPutWindowTilemapFuncs[window->unk00->unk08[window->bgId].mode](window);
}
-THUMB_FUNC void FUN_0201928C(struct Window *param0, u8 param1, u8 param2)
+THUMB_FUNC void PutWindowTilemapRectAnchoredTopLeft(struct Window *window, u8 width, u8 height)
{
- u8 unk07 = param0->width;
- u8 unk08 = param0->height;
+ u8 widthBak = window->width;
+ u8 heightBak = window->height;
- param0->width = param1;
- param0->height = param2;
- UNK_020EDB38[param0->unk00->unk08[param0->unk04].unk1c](param0);
+ window->width = width;
+ window->height = height;
+ sPutWindowTilemapFuncs[window->unk00->unk08[window->bgId].mode](window);
- param0->width = unk07;
- param0->height = unk08;
+ window->width = widthBak;
+ window->height = heightBak;
}
-THUMB_FUNC void FUN_020192B8(struct Window *param0)
+THUMB_FUNC void FUN_020192B8(struct Window *window)
{
- UNK_020EDB74[param0->unk00->unk08[param0->unk04].unk1c](param0);
+ UNK_020EDB74[window->unk00->unk08[window->bgId].mode](window);
}
-THUMB_FUNC void FUN_020192D4(struct Window *param0)
+THUMB_FUNC void PutWindowTilemap_TextMode(struct Window *param0)
{
u32 i, j;
u32 r3;
u32 iCount, jCount;
- u16 *st4 = param0->unk00->unk08[param0->unk04].unk08;
+ u16 *st4 = param0->unk00->unk08[param0->bgId].unk08;
if (st4 == NULL)
{
return;
}
- r3 = param0->unk0a_0;
- jCount = (u32)(param0->unk05 + param0->width);
- iCount = (u32)(param0->unk06 + param0->height);
+ r3 = param0->baseTile;
+ jCount = (u32)(param0->tilemapLeft + param0->width);
+ iCount = (u32)(param0->tilemapTop + param0->height);
- for (i = param0->unk06; i < iCount; i++)
+ for (i = param0->tilemapTop; i < iCount; i++)
{
- for (j = param0->unk05; j < jCount; j++)
+ for (j = param0->tilemapLeft; j < jCount; j++)
{
st4[((i & 0x20) * 32) + ((j & 0x20) * 32) + ((i & 0x1f) << 5) + (j & 0x1f)] =
- (u16)(r3 | (param0->unk09 << 12));
+ (u16)(r3 | (param0->paletteNum << 12));
r3++;
}
}
}
-THUMB_FUNC void FUN_02019358(struct Window *param0)
+THUMB_FUNC void PutWindowTilemap_AffineMode(struct Window *param0)
{
int j, i;
u8 *r4;
@@ -4726,15 +4726,15 @@ THUMB_FUNC void FUN_02019358(struct Window *param0)
int r5;
int r6;
- if (param0->unk00->unk08[param0->unk04].unk08 == NULL)
+ if (param0->unk00->unk08[param0->bgId].unk08 == NULL)
{
return;
}
- r6 = UNK_020EDB30[param0->unk00->unk08[param0->unk04].unk1d];
+ r6 = UNK_020EDB30[param0->unk00->unk08[param0->bgId].unk1d];
- r4 = param0->unk00->unk08[param0->unk04].unk08 + param0->unk06 * r6 + param0->unk05;
- r5 = param0->unk0a_0;
+ r4 = param0->unk00->unk08[param0->bgId].unk08 + param0->tilemapTop * r6 + param0->tilemapLeft;
+ r5 = param0->baseTile;
for (i = 0; i < param0->height; i++)
{
@@ -4757,19 +4757,19 @@ THUMB_FUNC void FUN_020193B4(struct Window *param0)
u16 *st4;
- if (param0->unk00->unk08[param0->unk04].unk08 == NULL)
+ if (param0->unk00->unk08[param0->bgId].unk08 == NULL)
{
return;
}
- st4 = param0->unk00->unk08[param0->unk04].unk08;
+ st4 = param0->unk00->unk08[param0->bgId].unk08;
- st8 = UNK_020EDB30[param0->unk00->unk08[param0->unk04].unk1d];
- jCount = (u32)(param0->unk05 + param0->width);
- iCount = (u32)(param0->unk06 + param0->height);
+ st8 = UNK_020EDB30[param0->unk00->unk08[param0->bgId].unk1d];
+ jCount = (u32)(param0->tilemapLeft + param0->width);
+ iCount = (u32)(param0->tilemapTop + param0->height);
- for (i = param0->unk06; i < iCount; i++)
+ for (i = param0->tilemapTop; i < iCount; i++)
{
- for (j = param0->unk05; j < jCount; j++)
+ for (j = param0->tilemapLeft; j < jCount; j++)
{
st4[((i & 0x20) * 32) + ((j & 0x20) * 32) + ((i & 0x1f) * st8) + (j & 0x1f)] = 0;
}
@@ -4784,13 +4784,13 @@ THUMB_FUNC void FUN_02019444(struct Window *param0)
int r6;
- if (param0->unk00->unk08[param0->unk04].unk08 == NULL)
+ if (param0->unk00->unk08[param0->bgId].unk08 == NULL)
{
return;
}
- r6 = UNK_020EDB30[param0->unk00->unk08[param0->unk04].unk1d];
- r5 = param0->unk00->unk08[param0->unk04].unk08 + param0->unk06 * r6 + param0->unk05;
+ r6 = UNK_020EDB30[param0->unk00->unk08[param0->bgId].unk1d];
+ r5 = param0->unk00->unk08[param0->bgId].unk08 + param0->tilemapTop * r6 + param0->tilemapLeft;
for (i = 0; i < param0->height; i++)
{
@@ -4804,111 +4804,111 @@ THUMB_FUNC void FUN_02019444(struct Window *param0)
THUMB_FUNC void FUN_0201949C(struct Window *window)
{
- FUN_020192D4(window);
+ PutWindowTilemap_TextMode(window);
FUN_02019548(window);
FUN_02017CE8(window->unk00,
- window->unk04,
- window->unk00->unk08[window->unk04].unk08,
- window->unk00->unk08[window->unk04].unk0c,
- window->unk00->unk08[window->unk04].unk10);
+ window->bgId,
+ window->unk00->unk08[window->bgId].unk08,
+ window->unk00->unk08[window->bgId].unk0c,
+ window->unk00->unk08[window->bgId].unk10);
}
THUMB_FUNC void FUN_020194C8(struct Window *window)
{
- FUN_020192D4(window);
- FUN_0201AC68(window->unk00, window->unk04);
+ PutWindowTilemap_TextMode(window);
+ FUN_0201AC68(window->unk00, window->bgId);
FUN_02019548(window);
}
THUMB_FUNC void FUN_020194E0(struct Window *window)
{
- FUN_02019358(window);
+ PutWindowTilemap_AffineMode(window);
FUN_02017CE8(window->unk00,
- window->unk04,
- window->unk00->unk08[window->unk04].unk08,
- window->unk00->unk08[window->unk04].unk0c,
- window->unk00->unk08[window->unk04].unk10);
+ window->bgId,
+ window->unk00->unk08[window->bgId].unk08,
+ window->unk00->unk08[window->bgId].unk0c,
+ window->unk00->unk08[window->bgId].unk10);
FUN_02017E14(window->unk00,
- window->unk04,
- window->unk0c,
+ window->bgId,
+ window->pixelBuffer,
(u32)(window->width * window->height * 64),
- window->unk0a_0);
+ window->baseTile);
}
THUMB_FUNC void FUN_0201951C(struct Window *window)
{
- FUN_02019358(window);
- FUN_0201AC68(window->unk00, window->unk04);
+ PutWindowTilemap_AffineMode(window);
+ FUN_0201AC68(window->unk00, window->bgId);
FUN_02017E14(window->unk00,
- window->unk04,
- window->unk0c,
+ window->bgId,
+ window->pixelBuffer,
(u32)(window->width * window->height * 64),
- window->unk0a_0);
+ window->baseTile);
}
THUMB_FUNC void FUN_02019548(struct Window *window)
{
FUN_02017E14(window->unk00,
- window->unk04,
- window->unk0c,
- (u32)(window->width * window->height * window->unk00->unk08[window->unk04].unk1f),
- window->unk0a_0);
+ window->bgId,
+ window->pixelBuffer,
+ (u32)(window->width * window->height * window->unk00->unk08[window->bgId].unk1f),
+ window->baseTile);
}
THUMB_FUNC void FUN_02019570(struct Window *window)
{
- UNK_020EDB50[window->unk00->unk08[window->unk04].unk1c](window);
+ UNK_020EDB50[window->unk00->unk08[window->bgId].mode](window);
}
THUMB_FUNC void FUN_0201958C(struct Window *window)
{
- UNK_020EDB44[window->unk00->unk08[window->unk04].unk1c](window);
+ UNK_020EDB44[window->unk00->unk08[window->bgId].mode](window);
}
THUMB_FUNC void FUN_020195A8(struct Window *window)
{
FUN_020193B4(window);
FUN_02017CE8(window->unk00,
- window->unk04,
- window->unk00->unk08[window->unk04].unk08,
- window->unk00->unk08[window->unk04].unk0c,
- window->unk00->unk08[window->unk04].unk10);
+ window->bgId,
+ window->unk00->unk08[window->bgId].unk08,
+ window->unk00->unk08[window->bgId].unk0c,
+ window->unk00->unk08[window->bgId].unk10);
}
THUMB_FUNC void FUN_020195D0(struct Window *window)
{
FUN_020193B4(window);
- FUN_0201AC68(window->unk00, window->unk04);
+ FUN_0201AC68(window->unk00, window->bgId);
}
THUMB_FUNC void FUN_020195E4(struct Window *window)
{
FUN_02019444(window);
FUN_02017CE8(window->unk00,
- window->unk04,
- window->unk00->unk08[window->unk04].unk08,
- window->unk00->unk08[window->unk04].unk0c,
- window->unk00->unk08[window->unk04].unk10);
+ window->bgId,
+ window->unk00->unk08[window->bgId].unk08,
+ window->unk00->unk08[window->bgId].unk0c,
+ window->unk00->unk08[window->bgId].unk10);
}
THUMB_FUNC void FUN_0201960C(struct Window *window)
{
FUN_02019444(window);
- FUN_0201AC68(window->unk00, window->unk04);
+ FUN_0201AC68(window->unk00, window->bgId);
}
THUMB_FUNC void FillWindowPixelBuffer(struct Window *window, u8 param1)
{
- if (window->unk00->unk08[window->unk04].unk1f == 0x20)
+ if (window->unk00->unk08[window->bgId].unk1f == 0x20)
{
param1 |= param1 << 4;
}
MI_CpuFillFast(
- window->unk0c,
+ window->pixelBuffer,
(u32)((param1 << 0x18) | (param1 << 0x10) | (param1 << 0x8) | param1),
- (u32)(window->unk00->unk08[window->unk04].unk1f * window->width * window->height));
+ (u32)(window->unk00->unk08[window->bgId].unk1f * window->width * window->height));
}
THUMB_FUNC void BlitBitmapRectToWindow(struct Window *window,
@@ -4940,10 +4940,10 @@ THUMB_FUNC void BlitBitmapRect(struct Window *window,
{
struct UnkStruct_02016B94_3 st1c = { param1, param4, param5 };
struct UnkStruct_02016B94_3 st14 = {
- window->unk0c, (u16)(window->width << 3), (u16)(window->height << 3)
+ window->pixelBuffer, (u16)(window->width << 3), (u16)(window->height << 3)
};
- if (window->unk00->unk08[window->unk04].unk1e == 0)
+ if (window->unk00->unk08[window->bgId].unk1e == 0)
{
BlitBitmapRect4Bit(&st1c, &st14, param2, param3, param6, param7, param8, param9, param10);
}
@@ -4957,10 +4957,10 @@ THUMB_FUNC void FillWindowPixelRect(
struct Window *window, u8 fillValue, u16 x, u16 y, u16 width, u16 height)
{
struct UnkStruct_02016B94_3 st8 = {
- window->unk0c, (u16)(window->width << 3), (u16)(window->height << 3)
+ window->pixelBuffer, (u16)(window->width << 3), (u16)(window->height << 3)
};
- if (window->unk00->unk08[window->unk04].unk1e == 0)
+ if (window->unk00->unk08[window->bgId].unk1e == 0)
{
FUN_02018E88(&st8, x, y, width, height, fillValue);
}
@@ -7540,7 +7540,7 @@ FUN_0201A8BC: // 0x0201A8BC
THUMB_FUNC void ScrollWindow(struct Window *window, u32 param1, u8 param2, u8 param3)
{
- if (window->unk00->unk08[window->unk04].unk1e == 0)
+ if (window->unk00->unk08[window->bgId].unk1e == 0)
{
FUN_0201A8E8(window, param1, param2, param3);
}
@@ -7558,7 +7558,7 @@ THUMB_FUNC void FUN_0201A8E8(struct Window *window, u32 param1, u8 param2, u8 pa
u32 st8;
int i, j;
- r2 = window->unk0c;
+ r2 = window->pixelBuffer;
st4 = (param3 << 0x18) | (param3 << 0x10) | (param3 << 0x8) | param3;
stc = window->height * window->width * 32;
st8 = window->width;
@@ -7627,7 +7627,7 @@ THUMB_FUNC void FUN_0201A9D4(struct Window *window, u32 param1, u8 param2, u8 pa
u32 st8;
int i, j;
- r2 = (u8 *)window->unk0c;
+ r2 = (u8 *)window->pixelBuffer;
st4 = (param3 << 0x18) | (param3 << 0x10) | (param3 << 0x8) | param3;
stc = window->height * window->width * 64;
st8 = window->width;
@@ -7711,7 +7711,7 @@ THUMB_FUNC void FUN_0201A9D4(struct Window *window, u32 param1, u8 param2, u8 pa
THUMB_FUNC u8 FUN_0201AB08(struct Window *window)
{
- return window->unk04;
+ return window->bgId;
}
THUMB_FUNC u8 GetWindowWidth(struct Window *window)
@@ -7724,23 +7724,23 @@ THUMB_FUNC u8 GetWindowHeight(struct Window *window)
}
THUMB_FUNC u8 FUN_0201AB14(struct Window *window)
{
- return window->unk05;
+ return window->tilemapLeft;
}
THUMB_FUNC u8 FUN_0201AB18(struct Window *window)
{
- return window->unk06;
+ return window->tilemapTop;
}
THUMB_FUNC void FUN_0201AB1C(struct Window *window, u8 param1)
{
- window->unk05 = param1;
+ window->tilemapLeft = param1;
}
THUMB_FUNC void FUN_0201AB20(struct Window *window, u8 param1)
{
- window->unk06 = param1;
+ window->tilemapTop = param1;
}
THUMB_FUNC void FUN_0201AB24(struct Window *window, u8 param1)
{
- window->unk09 = param1;
+ window->paletteNum = param1;
}
THUMB_FUNC u32 FUN_0201AB28(struct Window *window, u32 heap_id, const char *path)
@@ -7836,7 +7836,7 @@ THUMB_FUNC void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0)
if ((param0->unk04 & 4) != 0)
{
- if (param0->unk08[2].unk1c == 0)
+ if (param0->unk08[2].mode == 0)
{
reg_G2_BG2OFS = (u32)(
(param0->unk08[2].unk14 & 0x1ff) | ((param0->unk08[2].unk18 << 0x10) & 0x1ff0000));
@@ -7857,7 +7857,7 @@ THUMB_FUNC void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0)
if ((param0->unk04 & 8) != 0)
{
- if (param0->unk08[3].unk1c == 0)
+ if (param0->unk08[3].mode == 0)
{
reg_G2_BG3OFS = (u32)(
(param0->unk08[3].unk14 & 0x1ff) | ((param0->unk08[3].unk18 << 0x10) & 0x1ff0000));
@@ -7890,7 +7890,7 @@ THUMB_FUNC void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0)
if ((param0->unk04 & 0x40) != 0)
{
- if (param0->unk08[6].unk1c == 0)
+ if (param0->unk08[6].mode == 0)
{
reg_G2S_DB_BG2OFS = (u32)(
(param0->unk08[6].unk14 & 0x1ff) | ((param0->unk08[6].unk18 << 0x10) & 0x1ff0000));
@@ -7911,7 +7911,7 @@ THUMB_FUNC void FUN_0201AC78(struct UnkStruct_02016B94_2 *param0)
if ((param0->unk04 & 0x80) != 0)
{
- if (param0->unk08[7].unk1c == 0)
+ if (param0->unk08[7].mode == 0)
{
reg_G2S_DB_BG3OFS = (u32)(
(param0->unk08[7].unk14 & 0x1ff) | ((param0->unk08[7].unk18 << 0x10) & 0x1ff0000));
@@ -8017,7 +8017,7 @@ THUMB_FUNC u32 FUN_0201AFBC(
if (param0->unk08[param1].unk1e == 0)
{
u16 *stc = param0->unk08[param1].unk08;
- u8 *ptr = AllocFromHeapAtEnd(param0->unk00, 0x40);
+ u8 *ptr = AllocFromHeapAtEnd(param0->heap_id, 0x40);
st18 += ((stc[r6] & 0x3ff) << 5);
for (i = 0; i < 0x20; i++)
@@ -8038,10 +8038,10 @@ THUMB_FUNC u32 FUN_0201AFBC(
}
else
{
- if (param0->unk08[param1].unk1c != 1)
+ if (param0->unk08[param1].mode != 1)
{
u16 *r4 = param0->unk08[param1].unk08;
- u8 *ptr = AllocFromHeapAtEnd(param0->unk00, 0x40);
+ u8 *ptr = AllocFromHeapAtEnd(param0->heap_id, 0x40);
memcpy(ptr, st18 + ((r4[r6] & 0x3ff) << 6), 0x40);
@@ -8075,7 +8075,7 @@ THUMB_FUNC void FUN_0201B118(struct UnkStruct_02016B94_2 *param0, u8 param1, u8
u8 i, j;
if (param1 != 0)
{
- u8 *ptr = AllocFromHeapAtEnd(param0->unk00, 0x40);
+ u8 *ptr = AllocFromHeapAtEnd(param0->heap_id, 0x40);
if ((param1 & 1) != 0)
{
diff --git a/include/unk_02016B94.h b/include/unk_02016B94.h
index d3648560..788c8ddc 100644
--- a/include/unk_02016B94.h
+++ b/include/unk_02016B94.h
@@ -31,32 +31,33 @@ struct UnkStruct_02016B94_1
u32 unk18;
};
-struct UnkStruct_02016B94_2
+struct UnkStruct_02016B94_2_sub
{
- u32 unk00;
- u16 unk04;
- u16 unk06;
+ void *unk08;
+ u32 unk0c;
+ u32 unk10;
- struct UnkStruct_02016B94_2_sub
- {
- void *unk08;
- u32 unk0c;
- u32 unk10;
+ fx32 unk14;
+ fx32 unk18;
- fx32 unk14;
- fx32 unk18;
+ u8 mode;
+ u8 unk1d;
+ u8 unk1e;
+ u8 unk1f;
+ u16 unk20;
+ u16 unk22; // probably padding
+ fx32 unk24;
+ fx32 unk28;
+ fx32 unk2c;
+ fx32 unk30;
+};
- u8 unk1c;
- u8 unk1d;
- u8 unk1e;
- u8 unk1f;
- u16 unk20;
- u16 unk22; // probably padding
- fx32 unk24;
- fx32 unk28;
- fx32 unk2c;
- fx32 unk30;
- } unk08[8];
+struct UnkStruct_02016B94_2
+{
+ u32 heap_id;
+ u16 unk04;
+ u16 unk06;
+ struct UnkStruct_02016B94_2_sub unk08[8];
};
struct UnkStruct_02016B94_3
@@ -80,15 +81,15 @@ struct UnkStruct_02016B94_4
struct Window
{
struct UnkStruct_02016B94_2 *unk00;
- u8 unk04;
- u8 unk05;
- u8 unk06;
+ u8 bgId;
+ u8 tilemapLeft;
+ u8 tilemapTop;
u8 width;
u8 height;
- u8 unk09;
- u16 unk0a_0 : 15;
+ u8 paletteNum;
+ u16 baseTile : 15;
u16 unk0b_15 : 1;
- void *unk0c;
+ void *pixelBuffer;
};
struct UnkStruct_02016B94_2 *FUN_02016B94(u32 heap_id);
@@ -265,15 +266,15 @@ void FUN_020190EC(struct UnkStruct_02016B94_2 *param0,
void FUN_02019150(struct UnkStruct_02016B94_2 *param0,
struct Window *param1,
const struct UnkStruct_02016B94_4 *param2);
-void FUN_02019178(struct Window *param0);
-void FUN_020191A4(struct Window *param0, int param1);
-void CopyWindowToVram(struct Window *param0);
-void FUN_02019220(struct Window *param0);
-void FUN_02019270(struct Window *param0);
-void FUN_0201928C(struct Window *param0, u8 param1, u8 param2);
-void FUN_020192B8(struct Window *param0);
-void FUN_020192D4(struct Window *param0);
-void FUN_02019358(struct Window *param0);
+void FUN_02019178(struct Window *window);
+void WindowArray_dtor(struct Window *windows, int count);
+void CopyWindowToVram(struct Window *window);
+void FUN_02019220(struct Window *window);
+void PutWindowTilemap(struct Window *window);
+void PutWindowTilemapRectAnchoredTopLeft(struct Window *window, u8 width, u8 height);
+void FUN_020192B8(struct Window *window);
+void PutWindowTilemap_TextMode(struct Window *param0);
+void PutWindowTilemap_AffineMode(struct Window *param0);
void FUN_020193B4(struct Window *param0);
void FUN_02019444(struct Window *param0);
void FUN_0201949C(struct Window *window);