rename FUN_02039438 to FieldSysGetAttrAddr to match HG

This commit is contained in:
Akashi Akira
2023-05-12 22:45:45 +01:00
parent e55cf1e3b2
commit 8715baa2b2
20 changed files with 339 additions and 339 deletions

View File

@@ -313,7 +313,7 @@ _02042578:
_0204258A:
add r0, r1, #0x0
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r2, r0, #0x0
ldr r1, [r7, #0x74]
add r0, r5, #0x0
@@ -324,7 +324,7 @@ _0204258A:
_020425A2:
add r0, r1, #0x0
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, #0x80
ldr r2, [r7, #0x0]
add r1, r0, #0x0
@@ -389,7 +389,7 @@ _0204261A:
_02042626:
add r0, r1, #0x0
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, #0x80
add r2, r0, #0x0
ldr r0, [r7, #0x0]
@@ -806,7 +806,7 @@ ScrCmd_Unk0294: ; 0x02042950
str r1, [r5, #0x8]
ldrb r4, [r2, #0x0]
mov r1, #0x26
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, #0x80
add r7, r0, #0x0
ldr r0, [r5, #0x0]
@@ -823,7 +823,7 @@ ScrCmd_Unk0295: ; 0x02042980
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x26
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl MOD05_021E29B4
mov r0, #0x0
@@ -837,7 +837,7 @@ ScrCmd_Unk0296: ; 0x02042998
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x26
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r0, #0x0
add r4, #0x80
ldr r0, [r4, #0x0]

View File

@@ -192,7 +192,7 @@ _02042E2E:
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -239,7 +239,7 @@ _02042E9A:
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword

View File

@@ -10,7 +10,7 @@ ScrCmd_Unk00F8: ; 0x0203FE90
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -33,7 +33,7 @@ ScrCmd_Unk00F9: ; 0x0203FEC0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
bl ScriptReadHalfword
add r1, r0, #0x0
@@ -57,7 +57,7 @@ FUN_0203FEF4: ; 0x0203FEF4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r1, [r4, #0x64]
ldr r0, [r0, #0x0]
lsl r1, r1, #0x18
@@ -73,7 +73,7 @@ ScrCmd_Unk00FA: ; 0x0203FF10
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0x0]
add r0, r5, #0x0
add r0, #0x80
@@ -192,7 +192,7 @@ ScrCmd_Unk00FB: ; 0x02040028
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -227,13 +227,13 @@ ScrCmd_Unk00FC: ; 0x02040074
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -265,13 +265,13 @@ ScrCmd_Unk00FD: ; 0x020400C8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -303,13 +303,13 @@ ScrCmd_Unk00FE: ; 0x0204011C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -342,12 +342,12 @@ ScrCmd_Unk00FF: ; 0x02040170
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -383,7 +383,7 @@ ScrCmd_Unk0100: ; 0x020401CC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_02081DC4
ldr r1, _020401EC ; =FUN_020401F0
@@ -400,7 +400,7 @@ FUN_020401F0: ; 0x020401F0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_02081EB8
pop {r3, pc}
@@ -412,7 +412,7 @@ ScrCmd_Unk0101: ; 0x02040204
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r0, #0x0
ldr r0, [r4, #0x74]
ldr r1, [r1, #0x0]
@@ -427,13 +427,13 @@ ScrCmd_Unk0102: ; 0x02040220
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -455,13 +455,13 @@ ScrCmd_Unk0103: ; 0x0204025C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -483,13 +483,13 @@ ScrCmd_Unk0104: ; 0x02040298
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -511,7 +511,7 @@ ScrCmd_Unk0105: ; 0x020402D4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -534,13 +534,13 @@ ScrCmd_Unk0106: ; 0x02040304
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -562,7 +562,7 @@ ScrCmd_Unk0107: ; 0x02040340
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -585,7 +585,7 @@ ScrCmd_Unk0108: ; 0x02040370
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -608,7 +608,7 @@ ScrCmd_Unk0109: ; 0x020403A0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -631,7 +631,7 @@ ScrCmd_Unk010A: ; 0x020403D0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -662,7 +662,7 @@ ScrCmd_Unk010B: ; 0x02040414
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -693,7 +693,7 @@ ScrCmd_Unk010C: ; 0x02040458
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -717,7 +717,7 @@ ScrCmd_Unk0110: ; 0x02040488
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -767,7 +767,7 @@ ScrCmd_Unk010D: ; 0x020404FC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -790,13 +790,13 @@ ScrCmd_Unk010E: ; 0x0204052C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -820,7 +820,7 @@ ScrCmd_Unk010F: ; 0x0204056C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -842,7 +842,7 @@ ScrCmd_Unk0117: ; 0x0204059C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_0208223C
mov r0, #0x0
@@ -855,7 +855,7 @@ ScrCmd_Unk0118: ; 0x020405B4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_0208224C
mov r0, #0x0
@@ -869,7 +869,7 @@ ScrCmd_Unk0111: ; 0x020405CC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -890,7 +890,7 @@ ScrCmd_Unk0112: ; 0x020405F8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r1, _02040614 ; =FUN_02040618
add r0, r4, #0x0
bl SetupNativeScript
@@ -905,7 +905,7 @@ FUN_02040618: ; 0x02040618
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_02082508
cmp r0, #0x1
@@ -949,7 +949,7 @@ ScrCmd_Unk0115: ; 0x02040660
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword

View File

@@ -20,56 +20,56 @@ ScrCmd_Unk00B6: ; 0x020416A8
bne _02041708
add r0, r4, #0x0
mov r1, #0x18
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0x14]
add r0, r4, #0x0
mov r1, #0x19
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0xc]
add r0, r4, #0x0
mov r1, #0x1a
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x1b
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x1c
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0x10]
add r0, r4, #0x0
mov r1, #0x1d
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
mov r1, #0x1e
bl FUN_02039438
bl FieldSysGetAttrAddr
b _02041748
_02041708:
add r0, r4, #0x0
mov r1, #0x1f
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0x14]
add r0, r4, #0x0
mov r1, #0x20
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0xc]
add r0, r4, #0x0
mov r1, #0x21
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x22
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x23
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [sp, #0x10]
add r0, r4, #0x0
mov r1, #0x24
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
mov r1, #0x25
bl FUN_02039438
bl FieldSysGetAttrAddr
_02041748:
add r7, r0, #0x0
mov r0, #0x0
@@ -117,13 +117,13 @@ ScrCmd_Unk00B7: ; 0x02041770
add r5, #0x80
ldr r0, [r5, #0x0]
mov r1, #0x1e
bl FUN_02039438
bl FieldSysGetAttrAddr
b _020417B8
_020417AE:
add r5, #0x80
ldr r0, [r5, #0x0]
mov r1, #0x25
bl FUN_02039438
bl FieldSysGetAttrAddr
_020417B8:
add r5, r0, #0x0
ldr r0, [r5, #0x0]
@@ -153,7 +153,7 @@ ScrCmd_Unk00B8: ; 0x020417E0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x1c
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -173,13 +173,13 @@ ScrCmd_Unk00B9: ; 0x02041808
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x1b
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x22
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -214,7 +214,7 @@ ScrCmd_Unk00E4: ; 0x0204185C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x8
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -239,10 +239,10 @@ ScrCmd_Unk00E5: ; 0x0204188C
ldr r4, [r0, #0x0]
mov r1, #0x8
add r0, r4, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -295,7 +295,7 @@ ScrCmd_Unk02A0: ; 0x0204190C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -339,7 +339,7 @@ ScrCmd_Unk00E7: ; 0x02041970
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x8
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -403,7 +403,7 @@ ScrCmd_Unk00E8: ; 0x020419F8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x8
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -467,7 +467,7 @@ ScrCmd_Unk00E9: ; 0x02041A80
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x8
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -514,7 +514,7 @@ ScrCmd_Unk00EC: ; 0x02041AE0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -537,7 +537,7 @@ ScrCmd_Unk00ED: ; 0x02041B10
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -560,7 +560,7 @@ ScrCmd_Unk02BC: ; 0x02041B40
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -605,7 +605,7 @@ ScrCmd_Unk00EF: ; 0x02041B9C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
mov r1, #0xb
str r1, [sp, #0x0]
str r0, [sp, #0x4]
@@ -624,7 +624,7 @@ ScrCmd_Unk00F0: ; 0x02041BC4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
ldr r0, [r5, #0x0]
bl FUN_02058738
@@ -646,7 +646,7 @@ ScrCmd_Unk00F1: ; 0x02041BF0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r6, #0x0
bl ScriptReadWord

View File

@@ -103,7 +103,7 @@ _02041ECA:
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -268,7 +268,7 @@ ScrCmd_Unk0237: ; 0x02042038
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword

View File

@@ -21,7 +21,7 @@ ScrCmd_Unk02A5: ; 0x0203B914
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r5, #0x0
add r1, #0x80
add r4, r0, #0x0
@@ -44,7 +44,7 @@ ScrCmd_Unk0192: ; 0x0203B944
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, #0x80
add r4, r0, #0x0
ldr r0, [r5, #0x0]
@@ -70,7 +70,7 @@ ScrCmd_Unk0193: ; 0x0203B968
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
cmp r0, #0x0
@@ -101,7 +101,7 @@ ScrCmd_Unk0194: ; 0x0203B9B4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -175,7 +175,7 @@ ScrCmd_Unk0195: ; 0x0203BA3C
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
cmp r0, #0x0
@@ -216,7 +216,7 @@ ScrCmd_Unk0196: ; 0x0203BAB0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -254,7 +254,7 @@ ScrCmd_Unk0197: ; 0x0203BAF4
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
cmp r0, #0x0
@@ -277,7 +277,7 @@ ScrCmd_Unk009B: ; 0x0203BB34
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -332,7 +332,7 @@ FUN_0203BB90: ; 0x0203BB90
ldr r5, [r0, #0x0]
mov r1, #0x13
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl FUN_0204647C
@@ -355,7 +355,7 @@ FUN_0203BBBC: ; 0x0203BBBC
ldr r5, [r0, #0x0]
mov r1, #0x13
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
ldr r6, [r4, #0x0]
@@ -511,7 +511,7 @@ ScrCmd_Unk00A4: ; 0x0203BCD8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -551,7 +551,7 @@ ScrCmd_Unk0208: ; 0x0203BD28
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -618,7 +618,7 @@ ScrCmd_Unk028C: ; 0x0203BDB8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -686,7 +686,7 @@ ScrCmd_Unk0209: ; 0x0203BE50
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
mov r1, #0x1
strb r1, [r0, #0x0]
@@ -700,7 +700,7 @@ ScrCmd_Unk028D: ; 0x0203BE68
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
mov r1, #0x2
strb r1, [r0, #0x0]
@@ -729,7 +729,7 @@ FUN_0203BE9C: ; 0x0203BE9C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
ldr r1, [r5, #0x64]
@@ -758,7 +758,7 @@ ScrCmd_Unk020A: ; 0x0203BECC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -780,7 +780,7 @@ ScrCmd_Unk020B: ; 0x0203BF00
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r1, [r0, #0x0]
cmp r1, #0x0
beq _0203BF1C
@@ -846,7 +846,7 @@ ScrCmd_Unk00A7: ; 0x0203BF84
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -895,7 +895,7 @@ ScrCmd_Unk00A8: ; 0x0203BFEC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -1053,7 +1053,7 @@ ScrCmd_Unk00AA: ; 0x0203C12C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
mov r1, #0x5
add r4, r0, #0x0
mov r0, #0xb
@@ -1086,7 +1086,7 @@ ScrCmd_Unk01D7: ; 0x0203C174
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -1170,7 +1170,7 @@ ScrCmd_Unk01D9: ; 0x0203C200
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
mov r0, #0xb
mov r1, #0x8
@@ -1208,7 +1208,7 @@ ScrCmd_MonStoragePC: ; 0x0203C278
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
mov r0, #0xb
mov r1, #0xc
@@ -1279,7 +1279,7 @@ ScrCmd_Unk00AF: ; 0x0203C300
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -1311,7 +1311,7 @@ ScrCmd_Unk00B1: ; 0x0203C33C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -1395,7 +1395,7 @@ ScrCmd_Unk00B4: ; 0x0203C3E8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
mov r0, #0xb
mov r1, #0x8
@@ -1428,7 +1428,7 @@ ScrCmd_Unk00B5: ; 0x0203C430
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, #0x80
add r4, r0, #0x0
ldr r0, [r5, #0x0]
@@ -1465,7 +1465,7 @@ _0203C476:
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
ldr r0, [r6, #0x0]
cmp r0, #0x0
@@ -1500,7 +1500,7 @@ ScrCmd_Unk0179: ; 0x0203C4B0
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
cmp r0, #0x0
@@ -1706,7 +1706,7 @@ ScrCmd_Unk0245: ; 0x0203C680
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -2079,7 +2079,7 @@ ScrCmd_Unk00C5: ; 0x0203C990
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -2124,7 +2124,7 @@ FUN_0203C9F8: ; 0x0203C9F8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
bl MOD06_022466A0
@@ -2376,17 +2376,17 @@ ScrCmd_Unk00E6: ; 0x0203CBE8
ldr r4, [r0, #0x0]
mov r1, #0x8
add r0, r4, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x10
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
mov r1, #0x6
bl FUN_02039438
bl FieldSysGetAttrAddr
add r0, r4, #0x0
mov r1, #0x3
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -2410,12 +2410,12 @@ ScrCmd_Unk00E6: ; 0x0203CBE8
bl GetTrainerMessageByIdPair
add r0, r4, #0x0
mov r1, #0x1
bl FUN_02039438
bl FieldSysGetAttrAddr
mov r1, #0xf
bl FillWindowPixelBuffer
add r0, r4, #0x0
mov r1, #0x1
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -2601,7 +2601,7 @@ ScrCmd_Unk00F6: ; 0x0203CDD0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r5, #0x80
ldr r4, [r6, #0x0]
@@ -2712,7 +2712,7 @@ ScrCmd_Unk011D: ; 0x0203CEBC
ldr r0, [r0, #0x0]
mov r1, #0xf
str r0, [sp, #0x4]
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, r0, #0x0
ldr r0, [r5, #0x8]
add r1, r0, #0x1
@@ -2905,7 +2905,7 @@ ScrCmd_Unk0124: ; 0x0203D050
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -2944,7 +2944,7 @@ ScrCmd_Unk02BD: ; 0x0203D0A4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -3048,7 +3048,7 @@ ScrCmd_Unk0129: ; 0x0203D178
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x17
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r0, #0x0
ldr r0, [r4, #0x74]
bl FUN_02046DB4
@@ -3279,7 +3279,7 @@ ScrCmd_Unk0137: ; 0x0203D33C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -3310,7 +3310,7 @@ ScrCmd_Unk0138: ; 0x0203D36C
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r0, #0x0
add r5, #0x80
ldr r0, [r5, #0x0]
@@ -3360,13 +3360,13 @@ ScrCmd_Unk013C: ; 0x0203D3DC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -3449,7 +3449,7 @@ ScrCmd_Unk013F: ; 0x0203D490
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -3466,7 +3466,7 @@ ScrCmd_Unk013F: ; 0x0203D490
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r7, r0, #0x0
ldr r0, [r4, #0x0]
bl FUN_02058448
@@ -3505,7 +3505,7 @@ ScrCmd_Unk02BA: ; 0x0203D4E8
add r5, #0x80
ldr r0, [r5, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FreeToHeap
_0203D522:
@@ -3521,7 +3521,7 @@ ScrCmd_Unk0140: ; 0x0203D528
ldr r5, [r0, #0x0]
mov r1, #0xa
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -3547,7 +3547,7 @@ ScrCmd_Unk0146: ; 0x0203D560
ldr r5, [r0, #0x0]
mov r1, #0xa
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -3791,7 +3791,7 @@ ScrCmd_Unk0154: ; 0x0203D738
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl PlayerProfile_GetTrainerID
@@ -4334,7 +4334,7 @@ ScrCmd_Unk018F: ; 0x0203DBD4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xc
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r4, #0x0
bl ScriptReadHalfword
@@ -4555,13 +4555,13 @@ ScrCmd_Unk019E: ; 0x0203DD60
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xa
bl FUN_02039438
bl FieldSysGetAttrAddr
add r6, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -4598,7 +4598,7 @@ FUN_0203DDC0: ; 0x0203DDC0
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
ldr r1, [r5, #0x64]
@@ -4630,7 +4630,7 @@ ScrCmd_Unk019F: ; 0x0203DE00
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x3
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -4655,7 +4655,7 @@ FUN_0203DE38: ; 0x0203DE38
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x3
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrb r0, [r0, #0x0]
bl FUN_020546C8
pop {r3, pc}
@@ -5088,7 +5088,7 @@ ScrCmd_Unk01CD: ; 0x0203E168
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, r0, #0x0
add r0, r7, #0x0
sub r0, #0x10
@@ -5392,7 +5392,7 @@ ScrCmd_Unk01EA: ; 0x0203E440
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -5416,7 +5416,7 @@ ScrCmd_Unk01EB: ; 0x0203E470
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
add r0, #0x80
@@ -5923,7 +5923,7 @@ ScrCmd_Unk0226: ; 0x0203E870
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r1, [r5, #0x8]
add r4, r0, #0x0
add r0, r1, #0x1
@@ -5942,7 +5942,7 @@ ScrCmd_Unk0227: ; 0x0203E894
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -5965,7 +5965,7 @@ ScrCmd_Unk0228: ; 0x0203E8C4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -5988,7 +5988,7 @@ ScrCmd_Unk0229: ; 0x0203E8F4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
add r0, r5, #0x0
bl ScriptReadHalfword
@@ -6012,7 +6012,7 @@ ScrCmd_Unk022A: ; 0x0203E928
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x14
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl MOD06_022488CC
mov r0, #0x0
@@ -6560,7 +6560,7 @@ ScrCmd_Unk0258: ; 0x0203EDA4
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x16
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
mov r0, #0x0
add r5, #0x80
@@ -6578,7 +6578,7 @@ ScrCmd_Unk0259: ; 0x0203EDC8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x16
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl MOD05_021E71E8
mov r0, #0x1
@@ -7202,7 +7202,7 @@ ScrCmd_Unk0273: ; 0x0203F2AC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r1, [r5, #0x8]
add r6, r0, #0x0
add r0, r1, #0x1
@@ -7345,7 +7345,7 @@ ScrCmd_Unk027D: ; 0x0203F3AC
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
add r5, #0x80
add r6, r0, #0x0
ldr r0, [r5, #0x0]
@@ -7852,7 +7852,7 @@ ScrCmd_Unk0290: ; 0x0203F7C8
add r0, #0x80
ldr r0, [r0, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, r5, #0x0
add r1, #0x80
add r4, r0, #0x0
@@ -7891,7 +7891,7 @@ ScrCmd_Unk0291: ; 0x0203F80C
add r5, r0, #0x0
ldr r0, [r4, #0x0]
mov r1, #0x13
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r4, #0x0]
cmp r0, #0x0
@@ -8292,7 +8292,7 @@ ScrCmd_Unk02AF: ; 0x0203FB64
add r5, r0, #0x0
add r0, r4, #0x0
mov r1, #0xf
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0, #0x0]
bl FUN_0205296C
strh r0, [r5, #0x0]
@@ -8425,7 +8425,7 @@ ScrCmd_Unk02C1: ; 0x0203FC80
ldr r5, [r0, #0x0]
mov r1, #0x28
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r5, #0xc]
bl FUN_0202280C
@@ -8449,7 +8449,7 @@ ScrCmd_Unk02C2: ; 0x0203FCB0
ldr r5, [r0, #0x0]
mov r1, #0x28
add r0, r5, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r4, r0, #0x0
ldr r0, [r5, #0xc]
bl FUN_0202280C

View File

@@ -1869,8 +1869,8 @@ _02039430:
mov r0, #0x0
pop {r3, pc}
thumb_func_start FUN_02039438
FUN_02039438: ; 0x02039438
thumb_func_start FieldSysGetAttrAddr
FieldSysGetAttrAddr: ; 0x02039438
push {r3-r5, lr}
ldr r0, [r0, #0x10]
add r5, r1, #0x0
@@ -1964,7 +1964,7 @@ _020394DE:
ldr r1, _020394EC ; =0x00007FD7
add r0, r5, #0x0
sub r1, r4, r1
bl FUN_02039438
bl FieldSysGetAttrAddr
pop {r3-r5, pc}
nop
_020394EC: .word 0x00007FD7
@@ -2087,19 +2087,19 @@ FUN_020395BC: ; 0x020395BC
mov r1, #0x29
add r6, r2, #0x0
add r7, r3, #0x0
bl FUN_02039438
bl FieldSysGetAttrAddr
strh r4, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2a
bl FUN_02039438
bl FieldSysGetAttrAddr
strh r6, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2b
bl FUN_02039438
bl FieldSysGetAttrAddr
strh r7, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2c
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, sp, #0x8
ldrh r1, [r1, #0x10]
strh r1, [r0, #0x0]

View File

@@ -239,22 +239,22 @@ _0205CFC6:
bl FUN_02038CD8
add r0, r5, #0x0
mov r1, #0x29
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrh r1, [r4, #0x4]
strh r1, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2a
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrh r1, [r4, #0x6]
strh r1, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2b
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrh r1, [r4, #0x8]
strh r1, [r0, #0x0]
add r0, r5, #0x0
mov r1, #0x2c
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrh r1, [r4, #0xa]
strh r1, [r0, #0x0]
ldr r0, [r6, #0x0]

View File

@@ -870,7 +870,7 @@ _0205E33A:
bl FUN_02038CD8
add r0, r4, #0x0
mov r1, #0x29
bl FUN_02039438
bl FieldSysGetAttrAddr
ldrb r2, [r6, #0x0]
mov r1, #0x32
sub r1, r1, r2

View File

@@ -2676,7 +2676,7 @@
.extern FUN_02038CD8
.extern FUN_02038D10
.extern CreateScriptContext
.extern FUN_02039438
.extern FieldSysGetAttrAddr
.extern FUN_02039460
.extern GetVarPointer
.extern VarGet

View File

@@ -215,30 +215,30 @@ MOD05_021E2D14: ; 0x021E2D14
add r4, r1, #0
mov r1, #0x10
add r5, r0, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0]
mov r1, #0x11
str r0, [r4]
add r0, r5, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0]
mov r1, #0xf
str r0, [r4, #4]
add r0, r5, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0]
mov r1, #1
str r0, [r4, #8]
add r0, r5, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0xc]
add r0, r5, #0
mov r1, #6
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0x10]
add r0, r5, #0
mov r1, #3
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0x14]
pop {r3, r4, r5, pc}
@@ -249,26 +249,26 @@ MOD05_021E2D5C: ; 0x021E2D5C
mov r1, #0x10
add r5, r0, #0
add r4, r2, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0]
mov r1, #0x11
str r0, [r4]
add r0, r5, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
ldr r0, [r0]
mov r1, #1
str r0, [r4, #4]
str r6, [r4, #8]
add r0, r5, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0xc]
add r0, r5, #0
mov r1, #6
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0x10]
add r0, r5, #0
mov r1, #3
bl FUN_02039438
bl FieldSysGetAttrAddr
str r0, [r4, #0x14]
pop {r4, r5, r6, pc}

View File

@@ -259,7 +259,7 @@ MOD05_021F3AE0: ; 0x021F3AE0
mov r1, #0xf
add r7, r2, #0
add r4, r3, #0
bl FUN_02039438
bl FieldSysGetAttrAddr
add r1, sp, #0x10
add r5, r0, #0
ldrh r1, [r1, #0x10]

View File

@@ -14,7 +14,7 @@
#include "unk_0200CA44.h"
#include "unk_0205EC84.h"
extern void *FUN_02039438(struct FieldSystem* fieldSystem, u32 id);
extern void *FieldSysGetAttrAddr(struct FieldSystem* fieldSystem, u32 id);
extern void *CreateScriptContext(struct FieldSystem* fieldSystem, u16 id);
extern u8 FUN_02058448(u32 param0);
extern void FlagSet(struct FieldSystem *fieldSystem, u16 flag);
@@ -300,8 +300,8 @@ THUMB_FUNC BOOL ScrCmd_CompareVarToVar(struct ScriptContext *ctx) //0012
THUMB_FUNC BOOL ScrCmd_RunScript(struct ScriptContext *ctx) //0013
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u8 *unk1 = (u8 *)FUN_02039438(fieldSystem, 0x7);
u32 **unk2 = (u32 **)FUN_02039438(fieldSystem, 0xe);
u8 *unk1 = (u8 *)FieldSysGetAttrAddr(fieldSystem, 0x7);
u32 **unk2 = (u32 **)FieldSysGetAttrAddr(fieldSystem, 0xe);
u16 id = ScriptReadHalfword(ctx);
*unk2 = CreateScriptContext(fieldSystem, id);
@@ -312,9 +312,9 @@ THUMB_FUNC BOOL ScrCmd_RunScript(struct ScriptContext *ctx) //0013
THUMB_FUNC BOOL ScrCmd_RunScriptWait(struct ScriptContext *ctx) //0014
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u8 *unk1 = (u8 *)FUN_02039438(fieldSystem, 0x5);
u8 *unk2 = (u8 *)FUN_02039438(fieldSystem, 0x7);
u32 **unk3 = (u32 **)FUN_02039438(fieldSystem, 0xe);
u8 *unk1 = (u8 *)FieldSysGetAttrAddr(fieldSystem, 0x5);
u8 *unk2 = (u8 *)FieldSysGetAttrAddr(fieldSystem, 0x7);
u32 **unk3 = (u32 **)FieldSysGetAttrAddr(fieldSystem, 0xe);
u16 id = ScriptReadHalfword(ctx);
*unk1 = 1;
@@ -327,7 +327,7 @@ THUMB_FUNC BOOL ScrCmd_RunScriptWait(struct ScriptContext *ctx) //0014
THUMB_FUNC static BOOL FUN_02039CC8(struct ScriptContext *ctx)
{
u8* unk = FUN_02039438(ctx->fieldSystem, 0x5);
u8* unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x5);
if (*unk == 0)
{
@@ -338,7 +338,7 @@ THUMB_FUNC static BOOL FUN_02039CC8(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_RestartCurrentScript(struct ScriptContext *ctx) //0015
{
u8* unk = (u8 *)FUN_02039438(ctx->fieldSystem, 0x5);
u8* unk = (u8 *)FieldSysGetAttrAddr(ctx->fieldSystem, 0x5);
*unk = 0;
return FALSE;
@@ -353,7 +353,7 @@ THUMB_FUNC BOOL ScrCmd_GoTo(struct ScriptContext *ctx) //0016
THUMB_FUNC BOOL ScrCmd_ObjectGoTo(struct ScriptContext *ctx) //0017
{
u32* unk = FUN_02039438(ctx->fieldSystem, 0xa);
u32* unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0xa);
u8 id = ScriptReadByte(ctx);
s32 offset = (s32)ScriptReadWord(ctx);
if (FUN_02058448(*unk) == id)
@@ -378,7 +378,7 @@ THUMB_FUNC BOOL ScrCmd_BgGoTo(struct ScriptContext *ctx) //0018
THUMB_FUNC BOOL ScrCmd_DirectionGoTo(struct ScriptContext *ctx) //0019
{
u32 *playerDirection = FUN_02039438(ctx->fieldSystem, 0x9);
u32 *playerDirection = FieldSysGetAttrAddr(ctx->fieldSystem, 0x9);
u8 dir = ScriptReadByte(ctx);
s32 offset = (s32)ScriptReadWord(ctx);
@@ -646,7 +646,7 @@ THUMB_FUNC BOOL ScrCmd_Unk002C(struct ScriptContext *ctx) //002C - todo: Message
THUMB_FUNC /*static*/ BOOL FUN_0203A2F0(struct ScriptContext *ctx)
{
u8 *unk = (u8 *)FUN_02039438(ctx->fieldSystem, 3);
u8 *unk = (u8 *)FieldSysGetAttrAddr(ctx->fieldSystem, 3);
return FUN_020546C8(*unk);
}
@@ -682,7 +682,7 @@ THUMB_FUNC BOOL ScrCmd_Unk002E(struct ScriptContext *ctx) //002E - todo: Message
THUMB_FUNC BOOL ScrCmd_Unk020C(struct ScriptContext *ctx) //020C
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0xa);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0xa);
u8 msg = (u8)FUN_02058488(*unk);
MOD05_021E2BD0(ctx, ctx->msgData, msg, 1, NULL);
SetupNativeScript(ctx, FUN_0203A2F0);
@@ -810,9 +810,9 @@ THUMB_FUNC static BOOL FUN_0203A570(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_Unk0033(struct ScriptContext *ctx) //0033 - todo: OpenMessageBox?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u8 *unk = (u8 *)FUN_02039438(fieldSystem, 6);
FUN_020545B8(fieldSystem->bgConfig, (struct Window *)FUN_02039438(fieldSystem, 1), 3);
FUN_02054608((struct Window *)FUN_02039438(fieldSystem, 1), Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2));
u8 *unk = (u8 *)FieldSysGetAttrAddr(fieldSystem, 6);
FUN_020545B8(fieldSystem->bgConfig, (struct Window *)FieldSysGetAttrAddr(fieldSystem, 1), 3);
FUN_02054608((struct Window *)FieldSysGetAttrAddr(fieldSystem, 1), Sav2_PlayerData_GetOptionsAddr(ctx->fieldSystem->saveBlock2));
*unk = 1;
return FALSE;
}
@@ -820,8 +820,8 @@ THUMB_FUNC BOOL ScrCmd_Unk0033(struct ScriptContext *ctx) //0033 - todo: OpenMes
THUMB_FUNC BOOL ScrCmd_CloseMessageBox(struct ScriptContext* ctx) //0034
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct Window *unk = FUN_02039438(fieldSystem, 0x1);
u8 *unk2 = FUN_02039438(fieldSystem, 0x6);
struct Window *unk = FieldSysGetAttrAddr(fieldSystem, 0x1);
u8 *unk2 = FieldSysGetAttrAddr(fieldSystem, 0x6);
ClearFrameAndWindow2(unk, 0);
RemoveWindow(unk);
*unk2 = 0;
@@ -831,8 +831,8 @@ THUMB_FUNC BOOL ScrCmd_CloseMessageBox(struct ScriptContext* ctx) //0034
THUMB_FUNC BOOL ScrCmd_Unk0035(struct ScriptContext* ctx) //0035 - todo: FreezeMessageBox?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct Window *unk = FUN_02039438(fieldSystem, 0x1);
u8 *unk2 = FUN_02039438(fieldSystem, 0x6);
struct Window *unk = FieldSysGetAttrAddr(fieldSystem, 0x1);
u8 *unk2 = FieldSysGetAttrAddr(fieldSystem, 0x6);
RemoveWindow(unk);
*unk2 = 0;
return FALSE;
@@ -841,12 +841,12 @@ THUMB_FUNC BOOL ScrCmd_Unk0035(struct ScriptContext* ctx) //0035 - todo: FreezeM
THUMB_FUNC BOOL ScrCmd_ScrollBg(struct ScriptContext* ctx) //003C
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u16 *xval = FUN_02039438(fieldSystem, 0x31);
u16 *xcnt = FUN_02039438(fieldSystem, 0x2d);
u16 *xdir = FUN_02039438(fieldSystem, 0x32);
u16 *yval = FUN_02039438(fieldSystem, 0x33);
u16 *ycnt = FUN_02039438(fieldSystem, 0x2e);
u16 *ydir = FUN_02039438(fieldSystem, 0x34);
u16 *xval = FieldSysGetAttrAddr(fieldSystem, 0x31);
u16 *xcnt = FieldSysGetAttrAddr(fieldSystem, 0x2d);
u16 *xdir = FieldSysGetAttrAddr(fieldSystem, 0x32);
u16 *yval = FieldSysGetAttrAddr(fieldSystem, 0x33);
u16 *ycnt = FieldSysGetAttrAddr(fieldSystem, 0x2e);
u16 *ydir = FieldSysGetAttrAddr(fieldSystem, 0x34);
*xval = ScriptReadByte(ctx);
*xcnt = ScriptReadByte(ctx);
@@ -862,12 +862,12 @@ THUMB_FUNC BOOL ScrCmd_ScrollBg(struct ScriptContext* ctx) //003C
THUMB_FUNC static BOOL FUN_0203A6C8(struct ScriptContext* ctx)
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u16 *xval = FUN_02039438(fieldSystem, 0x31);
u16 *xdir = FUN_02039438(fieldSystem, 0x32);
u16 *yval = FUN_02039438(fieldSystem, 0x33);
u16 *ydir = FUN_02039438(fieldSystem, 0x34);
u16 *xcnt = FUN_02039438(fieldSystem, 0x2d);
u16 *ycnt = FUN_02039438(fieldSystem, 0x2e);
u16 *xval = FieldSysGetAttrAddr(fieldSystem, 0x31);
u16 *xdir = FieldSysGetAttrAddr(fieldSystem, 0x32);
u16 *yval = FieldSysGetAttrAddr(fieldSystem, 0x33);
u16 *ydir = FieldSysGetAttrAddr(fieldSystem, 0x34);
u16 *xcnt = FieldSysGetAttrAddr(fieldSystem, 0x2d);
u16 *ycnt = FieldSysGetAttrAddr(fieldSystem, 0x2e);
if (*xcnt == 0 && *ycnt == 0)
{
@@ -914,9 +914,9 @@ THUMB_FUNC static BOOL FUN_0203A6C8(struct ScriptContext* ctx)
THUMB_FUNC BOOL ScrCmd_CreateMessageBox(struct ScriptContext* ctx) //003C
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct String **unk1 = FUN_02039438(fieldSystem, 0x11);
struct String **unk2 = FUN_02039438(fieldSystem, 0x10);
struct ScrStrBufs **unk3 = FUN_02039438(fieldSystem, 0x0f);
struct String **unk1 = FieldSysGetAttrAddr(fieldSystem, 0x11);
struct String **unk2 = FieldSysGetAttrAddr(fieldSystem, 0x10);
struct ScrStrBufs **unk3 = FieldSysGetAttrAddr(fieldSystem, 0x0f);
u8 typ, msg;
u16 wk, map;
@@ -927,7 +927,7 @@ THUMB_FUNC BOOL ScrCmd_CreateMessageBox(struct ScriptContext* ctx) //003C
if (map == 0)
{
u32 *unk4 = FUN_02039438(fieldSystem, 10);
u32 *unk4 = FieldSysGetAttrAddr(fieldSystem, 10);
map = (u16)FUN_02058510(*unk4, 0);
}
@@ -985,10 +985,10 @@ THUMB_FUNC static BOOL FUN_0203A8A0(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_Unk003A(struct ScriptContext *ctx) //003A - todo: CreateMessageBoxText?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u8 *unk1 = FUN_02039438(fieldSystem, 3);
struct String **unk2 = FUN_02039438(fieldSystem, 17);
struct String **unk3 = FUN_02039438(fieldSystem, 16);
struct ScrStrBufs **unk4 = FUN_02039438(fieldSystem, 15);
u8 *unk1 = FieldSysGetAttrAddr(fieldSystem, 3);
struct String **unk2 = FieldSysGetAttrAddr(fieldSystem, 17);
struct String **unk3 = FieldSysGetAttrAddr(fieldSystem, 16);
struct ScrStrBufs **unk4 = FieldSysGetAttrAddr(fieldSystem, 15);
u8 msg = ScriptReadByte(ctx);
u16 wk = ScriptReadHalfword(ctx);
@@ -1005,7 +1005,7 @@ THUMB_FUNC BOOL ScrCmd_Unk003A(struct ScriptContext *ctx) //003A - todo: CreateM
THUMB_FUNC static BOOL FUN_0203A94C(struct ScriptContext *ctx)
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u8 *unk1 = FUN_02039438(fieldSystem, 3);
u8 *unk1 = FieldSysGetAttrAddr(fieldSystem, 3);
u16 *varPtr = GetVarPointer(fieldSystem, (u16)ctx->data[0]);
MOD05_021E8144(fieldSystem->unk60);
@@ -1116,7 +1116,7 @@ THUMB_FUNC BOOL ScrCmd_Menu(struct ScriptContext *ctx) //003C
THUMB_FUNC BOOL ScrCmd_YesNoMenu(struct ScriptContext *ctx) //003E
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 2);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 2);
u16 wk = ScriptReadHalfword(ctx);
FUN_0200CB00(fieldSystem->bgConfig, 3, 985, 11, 0, 4);
*unk = Std_CreateYesNoMenu(fieldSystem->bgConfig, &UNK_020F34E0, 985, 11, 4);
@@ -1128,7 +1128,7 @@ THUMB_FUNC BOOL ScrCmd_YesNoMenu(struct ScriptContext *ctx) //003E
THUMB_FUNC static BOOL FUN_0203AB00(struct ScriptContext *ctx)
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 2);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 2);
u16 *ptr = GetVarPointer(fieldSystem, (u16)ctx->data[0]);
u32 unk2 = FUN_020021AC(*unk, 4);
@@ -1150,8 +1150,8 @@ THUMB_FUNC static BOOL FUN_0203AB00(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_ShowSaveClock(struct ScriptContext *ctx) //018D
{
struct Window *unk = (struct Window *)FUN_02039438(ctx->fieldSystem, 1);
struct UnkStruct_0200CABC_1 **unk2 = (struct UnkStruct_0200CABC_1 **)FUN_02039438(ctx->fieldSystem, 18);
struct Window *unk = (struct Window *)FieldSysGetAttrAddr(ctx->fieldSystem, 1);
struct UnkStruct_0200CABC_1 **unk2 = (struct UnkStruct_0200CABC_1 **)FieldSysGetAttrAddr(ctx->fieldSystem, 18);
*unk2 = FUN_0200D858(unk, 994);
return FALSE;
}
@@ -1159,7 +1159,7 @@ THUMB_FUNC BOOL ScrCmd_ShowSaveClock(struct ScriptContext *ctx) //018D
THUMB_FUNC BOOL ScrCmd_HideSaveClock(struct ScriptContext *ctx) //018E
{
struct UnkStruct_0200CABC_1 **unk = (struct UnkStruct_0200CABC_1 **)FUN_02039438(ctx->fieldSystem, 18);
struct UnkStruct_0200CABC_1 **unk = (struct UnkStruct_0200CABC_1 **)FieldSysGetAttrAddr(ctx->fieldSystem, 18);
FUN_0200DBFC(*unk);
return FALSE;
}
@@ -1167,15 +1167,15 @@ THUMB_FUNC BOOL ScrCmd_HideSaveClock(struct ScriptContext *ctx) //018E
THUMB_FUNC BOOL ScrCmd_Unk0040(struct ScriptContext *ctx) //0040
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk2 = FUN_02039438(fieldSystem, 15);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
u8 unk3 = ScriptReadByte(ctx);
u8 unk4 = ScriptReadByte(ctx);
u8 unk5 = ScriptReadByte(ctx);
u8 unk6 = ScriptReadByte(ctx);
u16 unk7 = ScriptReadHalfword(ctx);
u16 *ptr = GetVarPointer(fieldSystem, unk7);
u32 *unk8 = FUN_02039438(ctx->fieldSystem, 1);
u32 *unk8 = FieldSysGetAttrAddr(ctx->fieldSystem, 1);
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *unk2, unk8, NULL);
ctx->data[0] = unk7;
return TRUE;
@@ -1184,15 +1184,15 @@ THUMB_FUNC BOOL ScrCmd_Unk0040(struct ScriptContext *ctx) //0040
THUMB_FUNC BOOL ScrCmd_Unk0041(struct ScriptContext *ctx) //0041
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk2 = FUN_02039438(fieldSystem, 15);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
u8 unk3 = ScriptReadByte(ctx);
u8 unk4 = ScriptReadByte(ctx);
u8 unk5 = ScriptReadByte(ctx);
u8 unk6 = ScriptReadByte(ctx);
u16 unk7 = ScriptReadHalfword(ctx);
u16 *ptr = GetVarPointer(fieldSystem, unk7);
u32 *unk8 = FUN_02039438(ctx->fieldSystem, 1);
u32 *unk8 = FieldSysGetAttrAddr(ctx->fieldSystem, 1);
*unk = MOD05_021E1BF8(fieldSystem, unk3, unk4, unk5, unk6, ptr, *unk2, unk8, ctx->msgData);
ctx->data[0] = unk7;
return TRUE;
@@ -1200,7 +1200,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0041(struct ScriptContext *ctx) //0041
THUMB_FUNC BOOL ScrCmd_Unk0042(struct ScriptContext *ctx) //0042
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
u8 unk2 = ScriptReadByte(ctx);
u8 unk3 = ScriptReadByte(ctx);
MOD05_021E1C4C(*unk, unk2, unk3);
@@ -1210,7 +1210,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0042(struct ScriptContext *ctx) //0042
THUMB_FUNC BOOL ScrCmd_Unk029D(struct ScriptContext *ctx) //029D
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
u16 unk2 = ScriptGetVar(ctx);
u16 unk3 = ScriptGetVar(ctx);
MOD05_021E1C4C(*unk, unk2, unk3);
@@ -1219,7 +1219,7 @@ THUMB_FUNC BOOL ScrCmd_Unk029D(struct ScriptContext *ctx) //029D
THUMB_FUNC BOOL ScrCmd_Unk0043(struct ScriptContext *ctx) //0043
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E1C54(*unk);
SetupNativeScript(ctx, FUN_0203AD2C);
return TRUE;
@@ -1240,7 +1240,7 @@ THUMB_FUNC static BOOL FUN_0203AD2C(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_Unk02B9(struct ScriptContext *ctx) //02B9
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E1C54(*unk);
SetupNativeScript(ctx, FUN_0203AD78);
return TRUE;
@@ -1250,7 +1250,7 @@ THUMB_FUNC static BOOL FUN_0203AD78(struct ScriptContext *ctx)
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u16 *varPtr = GetVarPointer(fieldSystem, (u16)ctx->data[0]);
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
if (*varPtr == 0xEEEE)
{
@@ -1274,8 +1274,8 @@ THUMB_FUNC static BOOL FUN_0203AD78(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_Unk0044(struct ScriptContext *ctx) //0044
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk2 = FUN_02039438(fieldSystem, 15);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
u8 unk3 = ScriptReadByte(ctx);
u8 unk4 = ScriptReadByte(ctx);
u8 unk5 = ScriptReadByte(ctx);
@@ -1283,7 +1283,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0044(struct ScriptContext *ctx) //0044
u16 halfWord = ScriptReadHalfword(ctx);
u16 *varPtr = GetVarPointer(fieldSystem, halfWord);
u32 *unk7 = FUN_02039438(ctx->fieldSystem, 1);
u32 *unk7 = FieldSysGetAttrAddr(ctx->fieldSystem, 1);
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *unk2, unk7, NULL);
ctx->data[0] = halfWord;
return TRUE;
@@ -1292,8 +1292,8 @@ THUMB_FUNC BOOL ScrCmd_Unk0044(struct ScriptContext *ctx) //0044
THUMB_FUNC BOOL ScrCmd_Unk0045(struct ScriptContext *ctx) //0045
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *unk = FUN_02039438(fieldSystem, 0);
u32 *unk2 = FUN_02039438(fieldSystem, 15);
u32 *unk = FieldSysGetAttrAddr(fieldSystem, 0);
u32 *unk2 = FieldSysGetAttrAddr(fieldSystem, 15);
u8 unk3 = ScriptReadByte(ctx);
u8 unk4 = ScriptReadByte(ctx);
u8 unk5 = ScriptReadByte(ctx);
@@ -1301,7 +1301,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0045(struct ScriptContext *ctx) //0045
u16 halfWord = ScriptReadHalfword(ctx);
u16 *varPtr = GetVarPointer(fieldSystem, halfWord);
u32 *unk7 = FUN_02039438(ctx->fieldSystem, 1);
u32 *unk7 = FieldSysGetAttrAddr(ctx->fieldSystem, 1);
*unk = MOD05_021E1F34(fieldSystem, unk3, unk4, unk5, unk6, varPtr, *unk2, unk7, ctx->msgData);
ctx->data[0] = halfWord;
return TRUE;
@@ -1309,7 +1309,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0045(struct ScriptContext *ctx) //0045
THUMB_FUNC BOOL ScrCmd_Unk0046(struct ScriptContext *ctx) //0046 - todo: AddListOption?
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
u16 unk2 = ScriptGetVar(ctx);
u16 unk3 = ScriptGetVar(ctx);
u16 unk4 = ScriptGetVar(ctx);
@@ -1319,7 +1319,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0046(struct ScriptContext *ctx) //0046 - todo: AddList
THUMB_FUNC BOOL ScrCmd_Unk0047(struct ScriptContext *ctx) //0047 - todo: ShowList?
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E1F60(*unk);
SetupNativeScript(ctx, FUN_0203AD2C);
return TRUE;
@@ -1327,7 +1327,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0047(struct ScriptContext *ctx) //0047 - todo: ShowLis
THUMB_FUNC BOOL ScrCmd_Unk0048(struct ScriptContext *ctx) //0048
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E26CC(*unk, ScriptReadByte(ctx));
SetupNativeScript(ctx, FUN_0203AD2C);
return TRUE;
@@ -1335,14 +1335,14 @@ THUMB_FUNC BOOL ScrCmd_Unk0048(struct ScriptContext *ctx) //0048
THUMB_FUNC BOOL ScrCmd_Unk02CF(struct ScriptContext *ctx) //02CF
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E2B80(*unk, ScriptReadByte(ctx));
return TRUE;
}
THUMB_FUNC BOOL ScrCmd_Unk02D0(struct ScriptContext *ctx) //02D0
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0);
MOD05_021E2B9C(*unk, ScriptReadByte(ctx));
return TRUE;
}
@@ -1356,7 +1356,7 @@ THUMB_FUNC BOOL ScrCmd_Unk005E(struct ScriptContext *ctx) //005E - todo: ApplyMo
GF_ASSERT(unk3);
u32 unk4 = FUN_0205AEA4(unk3, ctx->scriptPtr + unk2);
u8 *unk5 = FUN_02039438(ctx->fieldSystem, 4);
u8 *unk5 = FieldSysGetAttrAddr(ctx->fieldSystem, 4);
(*unk5)++;
FUN_0203B174(ctx->fieldSystem, unk4, NULL);
@@ -1410,7 +1410,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02A1(struct ScriptContext *ctx) //02A1
unk4[pos * 2 + 1] = 0;
u32 unk7 = FUN_0205AEA4(unk3, unk4);
u8 *unk8 = FUN_02039438(ctx->fieldSystem, 4);
u8 *unk8 = FieldSysGetAttrAddr(ctx->fieldSystem, 4);
(*unk8)++;
@@ -1426,7 +1426,7 @@ THUMB_FUNC static struct Vecx32 *FUN_0203B120(struct FieldSystem *fieldSystem, u
}
else if (eventId == 241)
{
struct Vecx32 **res = (struct Vecx32 **)FUN_02039438(fieldSystem, 11);
struct Vecx32 **res = (struct Vecx32 **)FieldSysGetAttrAddr(fieldSystem, 11);
return *res;
}
else
@@ -1443,7 +1443,7 @@ THUMB_FUNC BOOL ScrCmd_WaitForMovement(struct ScriptContext *ctx) //005F
THUMB_FUNC static BOOL FUN_0203B158(struct ScriptContext *ctx)
{
u8 *unk = FUN_02039438(ctx->fieldSystem, 4);
u8 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 4);
return *unk == 0 ? TRUE : FALSE;
}
@@ -1465,7 +1465,7 @@ THUMB_FUNC void FUN_0203B1A8(u32 param0, UnkStruct_0203B174 *param1)
{
//is it tho?
#pragma unused(param0)
u8 *res = (u8 *)FUN_02039438(param1->fieldSystem, 4);
u8 *res = (u8 *)FieldSysGetAttrAddr(param1->fieldSystem, 4);
if (FUN_0205AEF0(param1->Unk04) != TRUE)
{
@@ -1494,7 +1494,7 @@ THUMB_FUNC void FUN_0203B1A8(u32 param0, UnkStruct_0203B174 *param1)
THUMB_FUNC BOOL ScrCmd_LockAllEvents(struct ScriptContext *ctx) //0060
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 *res = (u32 *)FUN_02039438(fieldSystem, 10);
u32 *res = (u32 *)FieldSysGetAttrAddr(fieldSystem, 10);
if (*res == 0)
{
@@ -1510,7 +1510,7 @@ THUMB_FUNC BOOL ScrCmd_LockAllEvents(struct ScriptContext *ctx) //0060
THUMB_FUNC static BOOL FUN_0203B218(struct ScriptContext *ctx)
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct Vecx32 **unk0 = (struct Vecx32 **)FUN_02039438(fieldSystem, 10);
struct Vecx32 **unk0 = (struct Vecx32 **)FieldSysGetAttrAddr(fieldSystem, 10);
struct Vecx32 *unk1 = FUN_020553A0(fieldSystem->playerAvatar);
if (UNK_021C5A0C[0] & 1)
{
@@ -1559,7 +1559,7 @@ THUMB_FUNC static BOOL FUN_0203B218(struct ScriptContext *ctx)
THUMB_FUNC BOOL ScrCmd_LockAllEvents2(struct ScriptContext *ctx) //02B4
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct Vecx32 **unk0 = (struct Vecx32 **)FUN_02039438(fieldSystem, 10);
struct Vecx32 **unk0 = (struct Vecx32 **)FieldSysGetAttrAddr(fieldSystem, 10);
struct Vecx32 *unk1 = FUN_020553A0(fieldSystem->playerAvatar);
struct Vecx32 *unk2 = FUN_020580B4(fieldSystem->unk34, 48);
struct Vecx32 *unk3 = FUN_0205E7C4(*unk0);
@@ -1647,7 +1647,7 @@ THUMB_FUNC BOOL ScrCmd_LockCamera(struct ScriptContext *ctx) //0066
{
u16 x = ScriptGetVar(ctx);
u16 y = ScriptGetVar(ctx);
struct Vecx32 **targetPtr = FUN_02039438(ctx->fieldSystem, 0xb);
struct Vecx32 **targetPtr = FieldSysGetAttrAddr(ctx->fieldSystem, 0xb);
*targetPtr = FUN_0205753C(ctx->fieldSystem->unk34, x, y, 0, 0x2000, 0, *ctx->fieldSystem->mapId);
FUN_02059D1C(*targetPtr);
FUN_0205889C(*targetPtr, 1);
@@ -1660,7 +1660,7 @@ THUMB_FUNC BOOL ScrCmd_LockCamera(struct ScriptContext *ctx) //0066
THUMB_FUNC BOOL ScrCmd_ReleaseCamera(struct ScriptContext *ctx) //0067
{
struct Vecx32 **targetPtr = FUN_02039438(ctx->fieldSystem, 0xb);
struct Vecx32 **targetPtr = FieldSysGetAttrAddr(ctx->fieldSystem, 0xb);
FUN_02057654(*targetPtr);
struct Vecx32 *modifiedTarget = FUN_02058B7C(FUN_02058060(ctx->fieldSystem->unk34, 0xff));
MOD05_021EF5E0(modifiedTarget, ctx->fieldSystem->unk24);
@@ -1672,7 +1672,7 @@ THUMB_FUNC BOOL ScrCmd_FacePlayer(struct ScriptContext *ctx) //0068
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u32 unk0 = FUN_02059E74(PlayerAvatar_GetFacingDirection(fieldSystem->playerAvatar));
struct Vecx32 **unk1 = FUN_02039438(fieldSystem, 10);
struct Vecx32 **unk1 = FieldSysGetAttrAddr(fieldSystem, 10);
if (*unk1 == NULL)
{
@@ -1812,7 +1812,7 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonForme(struct ScriptContext *ctx) //0095
THUMB_FUNC BOOL ScrCmd_Unk0191(struct ScriptContext *ctx) //0191
{
u32 *unk = FUN_02039438(ctx->fieldSystem, 0x13);
u32 *unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x13);
*unk = FUN_020379F8(0x20, ctx->fieldSystem);
SetupNativeScript(ctx, FUN_0203BC04);
return TRUE;

View File

@@ -4,7 +4,7 @@
#include "unk_020377F0.h"
#include "unk_02088DD8.h"
extern void* FUN_02039438(struct FieldSystem*, int idx);
extern void* FieldSysGetAttrAddr(struct FieldSystem*, int idx);
extern struct UnkStruct_02037CF0* FUN_02037CF0(u32 heap_id, struct FieldSystem*, u8);
extern u8 FUN_02037D5C(struct UnkStruct_02037CF0*);
@@ -14,7 +14,7 @@ extern BOOL FUN_0203BC04(struct ScriptContext* ctx);
THUMB_FUNC BOOL ScrCmd_Unk01C6(struct ScriptContext* ctx) //01C6 - todo: MoveInfo?
{
u16 unk = ScriptGetVar(ctx);
struct UnkStruct_02037CF0** unk_ret_ptr = FUN_02039438(ctx->fieldSystem, 19);
struct UnkStruct_02037CF0** unk_ret_ptr = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
*unk_ret_ptr = FUN_02037CF0(32, ctx->fieldSystem, (u8)unk);
SetupNativeScript(ctx, FUN_0203BC04);
@@ -27,7 +27,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01C7(struct ScriptContext* ctx) //01C7 - todo: StoreMo
u16* ret_ptr;
ret_ptr = ScriptGetVarPointer(ctx);
unk_ptr = FUN_02039438(ctx->fieldSystem, 19);
unk_ptr = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
GF_ASSERT(*unk_ptr != NULL);
*ret_ptr = FUN_02037D5C(*unk_ptr);
@@ -63,7 +63,7 @@ THUMB_FUNC BOOL ScrCmd_Unk021F(struct ScriptContext* ctx) //021F
THUMB_FUNC void FUN_02045E74(struct ScriptContext* ctx, u8 a1, struct Pokemon* pokemon, void* a3)
{
struct UnkStruct_02088DD8** unk = FUN_02039438(ctx->fieldSystem, 19);
struct UnkStruct_02088DD8** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
struct UnkStruct_02088DD8* unk2 = FUN_02088DD8(32);
*unk = unk2;
@@ -126,7 +126,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0223(struct ScriptContext* ctx) //0223 - todo: Remembe
u16* ret_ptr;
ret_ptr = ScriptGetVarPointer(ctx);
unk = FUN_02039438(ctx->fieldSystem, 19);
unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
unk_sub = *unk;
GF_ASSERT(unk_sub != NULL);
@@ -151,7 +151,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0225(struct ScriptContext* ctx) //0225 - todo: TeachMo
u16* ret_ptr;
ret_ptr = ScriptGetVarPointer(ctx);
unk = FUN_02039438(ctx->fieldSystem, 19);
unk = FieldSysGetAttrAddr(ctx->fieldSystem, 19);
unk_sub = *unk;
GF_ASSERT(unk_sub != NULL);

View File

@@ -1,7 +1,7 @@
#include "scrcmd.h"
#include "unk_02029FB0.h"
extern void* FUN_02039438(struct FieldSystem*, int idx);
extern void* FieldSysGetAttrAddr(struct FieldSystem*, int idx);
extern u8 FUN_0204B5FC(struct FieldSystem*, void*);
extern void FUN_0204B57C(struct FieldSystem*, void*, int);
@@ -17,7 +17,7 @@ extern void FUN_0204B4FC(struct FieldSystem*, void*);
THUMB_FUNC BOOL ScrCmd_GetBerryTreeGrowth(struct ScriptContext* ctx) //017D
{
u16* ret_ptr = ScriptGetVarPointer(ctx);
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
*ret_ptr = FUN_0204B5FC(ctx->fieldSystem, *unk);
@@ -26,7 +26,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryTreeGrowth(struct ScriptContext* ctx) //017D
THUMB_FUNC BOOL ScrCmd_GetBerryTreeType(struct ScriptContext* ctx) //017E
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
u16* ret_ptr = ScriptGetVarPointer(ctx);
*ret_ptr = FUN_0204B63C(ctx->fieldSystem, *unk);
@@ -36,7 +36,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryTreeType(struct ScriptContext* ctx) //017E
THUMB_FUNC BOOL ScrCmd_GetBerryTreeMulch(struct ScriptContext* ctx) //017F
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
u16* ret_ptr = ScriptGetVarPointer(ctx);
*ret_ptr = FUN_0204B660(ctx->fieldSystem, *unk);
@@ -46,7 +46,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryTreeMulch(struct ScriptContext* ctx) //017F
THUMB_FUNC BOOL ScrCmd_GetBerryTreeWater(struct ScriptContext* ctx) //0180
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
u16* ret_ptr = ScriptGetVarPointer(ctx);
*ret_ptr = FUN_0204B684(ctx->fieldSystem, *unk);
@@ -56,7 +56,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryTreeWater(struct ScriptContext* ctx) //0180
THUMB_FUNC BOOL ScrCmd_GetBerryTreeAmount(struct ScriptContext* ctx) //0181
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
u16* ret_ptr = ScriptGetVarPointer(ctx);
*ret_ptr = FUN_0204B6A4(ctx->fieldSystem, *unk);
@@ -66,7 +66,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryTreeAmount(struct ScriptContext* ctx) //0181
THUMB_FUNC BOOL ScrCmd_SetBerryTreeMulch(struct ScriptContext* ctx) //0182
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
u16 unk2 = ScriptGetVar(ctx);
FUN_0204B57C(ctx->fieldSystem, *unk, unk2);
@@ -76,7 +76,7 @@ THUMB_FUNC BOOL ScrCmd_SetBerryTreeMulch(struct ScriptContext* ctx) //0182
THUMB_FUNC BOOL ScrCmd_SetBerryTreeType(struct ScriptContext* ctx) //0183
{
void** unk = FUN_02039438(ctx->fieldSystem, 10);
void** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
struct GameStats* unk2 = Sav2_GameStats_get(ctx->fieldSystem->saveBlock2);
u16 unk3 = ScriptGetVar(ctx);
@@ -109,7 +109,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0184(struct ScriptContext* ctx) //0184 - todo: SetBerr
THUMB_FUNC BOOL ScrCmd_TakeBerryTreeBerries(struct ScriptContext* ctx) //0185
{
struct GameStats* unk = Sav2_GameStats_get(ctx->fieldSystem->saveBlock2);
void** unk2 = FUN_02039438(ctx->fieldSystem, 10);
void** unk2 = FieldSysGetAttrAddr(ctx->fieldSystem, 10);
FUN_0204B4FC(ctx->fieldSystem, *unk2);
GameStats_AddSpecial(unk, 0);

View File

@@ -1,7 +1,7 @@
#include "scrcmd.h"
#include "coins.h"
extern void * FUN_02039438(struct FieldSystem* arg, u8 idx);
extern void * FieldSysGetAttrAddr(struct FieldSystem* arg, u8 idx);
extern u32 MOD05_021E2950(struct FieldSystem* arg, u8, u8);
extern void MOD05_021E29B4(u16 *unk);
@@ -12,7 +12,7 @@ THUMB_FUNC BOOL ScrCmd_ShowCoinBox(struct ScriptContext * ctx) //0075
struct FieldSystem* sav_ptr = ctx->fieldSystem;
u32 unk1 = ScriptGetVar(ctx);
u32 unk2 = ScriptGetVar(ctx);
u16 ** unk_ret_ptr = FUN_02039438(sav_ptr, 0x26);
u16 ** unk_ret_ptr = FieldSysGetAttrAddr(sav_ptr, 0x26);
u32 unk3 = MOD05_021E2950(ctx->fieldSystem, (u8)unk1, (u8)unk2);
*unk_ret_ptr = (u16 *)unk3;
@@ -22,7 +22,7 @@ THUMB_FUNC BOOL ScrCmd_ShowCoinBox(struct ScriptContext * ctx) //0075
THUMB_FUNC BOOL ScrCmd_HideCoinBox(struct ScriptContext * ctx) //0076
{
u16 ** unk = FUN_02039438(ctx->fieldSystem, 0x26);
u16 ** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x26);
MOD05_021E29B4(*unk);
return FALSE;
@@ -30,7 +30,7 @@ THUMB_FUNC BOOL ScrCmd_HideCoinBox(struct ScriptContext * ctx) //0076
THUMB_FUNC BOOL ScrCmd_UpdateCoinBox(struct ScriptContext * ctx) //0077
{
u16 ** unk = FUN_02039438(ctx->fieldSystem, 0x26);
u16 ** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x26);
MOD05_021E29C8(ctx->fieldSystem, *unk);
return FALSE;

View File

@@ -3,7 +3,7 @@
#include "party.h"
#include "script_buffers.h"
extern void* FUN_02039438(struct FieldSystem*, int idx);
extern void* FieldSysGetAttrAddr(struct FieldSystem*, int idx);
extern void MOD05_021EC57C(struct PlayerParty* party, u8 idx, struct DayCare* daycare, struct SaveBlock2* sav2);
extern u16 MOD05_021EC71C(struct PlayerParty* party, struct ScrStrBufs* mgr, struct DayCare* daycare, u8 idx);
@@ -20,7 +20,7 @@ extern u32 MOD05_021ED644(struct DayCare* daycare);
THUMB_FUNC BOOL ScrCmd_GetDaycarePokemonNames(struct ScriptContext* ctx) //016D
{
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
struct DayCare* daycare = Sav2_DayCare_get(sav2);
MOD05_021ED4E0(daycare, *mgr);
@@ -64,7 +64,7 @@ THUMB_FUNC BOOL ScrCmd_GiveDaycareEgg(struct ScriptContext* ctx) //01A9
THUMB_FUNC BOOL ScrCmd_Unk01A4(struct ScriptContext* ctx) //01A4
{
struct FieldSystem* fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
struct SaveBlock2* sav2 = fieldSystem->saveBlock2;
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 idx = ScriptGetVar(ctx);
@@ -79,7 +79,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01A4(struct ScriptContext* ctx) //01A4
THUMB_FUNC BOOL ScrCmd_Unk01AA(struct ScriptContext* ctx) //01AA
{
struct FieldSystem* fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
struct SaveBlock2* sav2 = fieldSystem->saveBlock2;
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 idx = ScriptGetVar(ctx);
@@ -93,7 +93,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01AA(struct ScriptContext* ctx) //01AA
THUMB_FUNC BOOL ScrCmd_GetDaycareLevel(struct ScriptContext* ctx) //01AE
{
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u16* ret_ptr = ScriptGetVarPointer(ctx);
u16 idx = ScriptGetVar(ctx);
struct DayCare* daycare = SavArray_get(sav2, 8);
@@ -106,7 +106,7 @@ THUMB_FUNC BOOL ScrCmd_GetDaycareLevel(struct ScriptContext* ctx) //01AE
THUMB_FUNC BOOL ScrCmd_Unk01AF(struct ScriptContext* ctx) //01AF
{
struct FieldSystem* fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u16 unused = ScriptReadHalfword(ctx);
u16 idx = ScriptGetVar(ctx);
u16* ret_ptr = ScriptGetVarPointer(ctx);
@@ -133,7 +133,7 @@ THUMB_FUNC BOOL ScrCmd_Unk01B0(struct ScriptContext* ctx) //01B0
THUMB_FUNC BOOL ScrCmd_Unk01BC(struct ScriptContext* ctx) //01BC
{
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u16 idx1 = ScriptGetVar(ctx);
u16 idx2 = ScriptGetVar(ctx);
u16 idx3 = ScriptGetVar(ctx);

View File

@@ -1,7 +1,7 @@
#include "scrcmd.h"
#include "player_data.h"
extern void * FUN_02039438(struct FieldSystem *fieldSystem, u8 idx);
extern void * FieldSysGetAttrAddr(struct FieldSystem *fieldSystem, u8 idx);
extern u32 MOD05_021E27E8(struct FieldSystem *fieldSystem, u8, u8);
extern void MOD05_021E288C(u32 *);
@@ -87,7 +87,7 @@ THUMB_FUNC BOOL ScrCmd_ShowMoneyBox(struct ScriptContext * ctx) //0072
struct FieldSystem *fieldSystem = ctx->fieldSystem;
u16 unk1 = ScriptGetVar(ctx);
u16 unk2 = ScriptGetVar(ctx);
u32 *unk_ret_ptr = FUN_02039438(fieldSystem, 0x27);
u32 *unk_ret_ptr = FieldSysGetAttrAddr(fieldSystem, 0x27);
*unk_ret_ptr = MOD05_021E27E8(ctx->fieldSystem, (u8)unk1, (u8)unk2);
@@ -96,7 +96,7 @@ THUMB_FUNC BOOL ScrCmd_ShowMoneyBox(struct ScriptContext * ctx) //0072
THUMB_FUNC BOOL ScrCmd_HideMoneyBox(struct ScriptContext * ctx) //0073
{
u32 ** unk = FUN_02039438(ctx->fieldSystem, 0x27);
u32 ** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x27);
MOD05_021E288C(*unk);
return FALSE;
@@ -104,7 +104,7 @@ THUMB_FUNC BOOL ScrCmd_HideMoneyBox(struct ScriptContext * ctx) //0073
THUMB_FUNC BOOL ScrCmd_UpdateMoneyBox(struct ScriptContext * ctx) //0074
{
u32 ** unk = FUN_02039438(ctx->fieldSystem, 0x27);
u32 ** unk = FieldSysGetAttrAddr(ctx->fieldSystem, 0x27);
MOD05_021E28A0(ctx->fieldSystem, *unk);
return FALSE;

View File

@@ -10,7 +10,7 @@
#include "unk_02064E4C.h"
#include "unk_0207FC5C.h"
extern void* FUN_02039438(struct FieldSystem* fieldSystem, int idx);
extern void* FieldSysGetAttrAddr(struct FieldSystem* fieldSystem, int idx);
extern u32 FUN_020536D0(u32 gender, u32 avatar, u32 a2);
extern u32 FUN_0205F388(struct ScriptState* state);
@@ -22,7 +22,7 @@ extern u32 FUN_02054C14(u32 number);
THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx) //00CD - todo: BufferPlayerName? TextPlayerName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(fieldSystem);
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
@@ -35,7 +35,7 @@ THUMB_FUNC BOOL ScrCmd_GetPlayerName(struct ScriptContext* ctx) //00CD - todo: B
THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx) //00CE - todo: BufferRivalName? TextRivalName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
BufferRivalsName(*mgr, idx, fieldSystem->saveBlock2);
@@ -46,7 +46,7 @@ THUMB_FUNC BOOL ScrCmd_GetRivalName(struct ScriptContext* ctx) //00CE - todo: Bu
THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx) //00CF - todo: BufferFriendName? TextFriendName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
BufferFriendsName(*mgr, idx, fieldSystem->saveBlock2);
@@ -57,7 +57,7 @@ THUMB_FUNC BOOL ScrCmd_GetFriendName(struct ScriptContext* ctx) //00CF - todo: B
THUMB_FUNC BOOL ScrCmd_GetPokemonName(struct ScriptContext* ctx) //00D0 - todo: BufferPartyPokemonName? TextPartyPokemonName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 mon_idx = ScriptGetVar(ctx);
struct PlayerParty* party = SavArray_PlayerParty_get(fieldSystem->saveBlock2);
@@ -71,7 +71,7 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonName(struct ScriptContext* ctx) //00D0 - todo:
THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx) //00D1 - todo: BufferItemName? TextItemName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 item = ScriptGetVar(ctx);
@@ -83,7 +83,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemName(struct ScriptContext* ctx) //00D1 - todo: Buf
THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx) //00D2 - todo: BufferPocketName? TextPocketName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 pocket = ScriptGetVar(ctx);
@@ -95,7 +95,7 @@ THUMB_FUNC BOOL ScrCmd_GetPocketName(struct ScriptContext* ctx) //00D2 - todo: B
THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx) //00D3 - todo: BufferTMHMName? BufferMachineName? TextTMHMName? TextMachineName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 tmhm = ScriptGetVar(ctx);
u16 move = TMHMGetMove(tmhm);
@@ -108,7 +108,7 @@ THUMB_FUNC BOOL ScrCmd_GetTMHMMoveName(struct ScriptContext* ctx) //00D3 - todo:
THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx) //00D4 - todo: BufferMoveName? TextMoveName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 move = ScriptGetVar(ctx);
@@ -119,7 +119,7 @@ THUMB_FUNC BOOL ScrCmd_GetMoveName(struct ScriptContext* ctx) //00D4 - todo: Buf
THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx) //00D5 - todo: BufferNumber? TextNumber?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 unk = ScriptGetVar(ctx);
u32 digits = FUN_02054C14(unk);
@@ -131,7 +131,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D5(struct ScriptContext* ctx) //00D5 - todo: BufferN
THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx) //0280 - todo: BufferNumberSpecial? need more info
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 unk = ScriptGetVar(ctx);
u8 unk2 = ScriptReadByte(ctx);
@@ -149,7 +149,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0280(struct ScriptContext* ctx) //0280 - todo: BufferN
THUMB_FUNC BOOL ScrCmd_GetPokemonNickname(struct ScriptContext* ctx) //00D6 - todo: BufferPartyPokemonNickname? TextPartyPokemonNickname?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 mon_idx = ScriptGetVar(ctx);
struct PlayerParty* party = SavArray_PlayerParty_get(fieldSystem->saveBlock2);
@@ -164,7 +164,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx) //0251 - todo: BufferB
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct PCStorage* pc = GetStoragePCPointer(fieldSystem->saveBlock2);
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 box_mon_idx = ScriptGetVar(ctx);
s32 box_no = box_mon_idx / 30;
@@ -178,7 +178,7 @@ THUMB_FUNC BOOL ScrCmd_Unk0251(struct ScriptContext* ctx) //0251 - todo: BufferB
THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx) //00D7 - todo: BufferPoketchAppName? TextPoketchAppName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 app = ScriptGetVar(ctx);
@@ -189,7 +189,7 @@ THUMB_FUNC BOOL ScrCmd_GetPoketchAppName(struct ScriptContext* ctx) //00D7 - tod
THUMB_FUNC BOOL ScrCmd_GetTrainerClassName(struct ScriptContext* ctx) //00D8 - todo: BufferTrainerClassName? TextTrainerClassName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 trainer_class = ScriptGetVar(ctx);
@@ -203,7 +203,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx) //00D9 - todo: BufferP
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct SaveBlock2* sav2 = ScriptEnvironment_GetSav2Ptr(fieldSystem);
struct PlayerData* player = Sav2_PlayerData_GetProfileAddr(sav2);
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u32 gender = PlayerProfile_GetTrainerGender(player);
u32 avatar = PlayerProfile_GetAvatar(player);
@@ -216,7 +216,7 @@ THUMB_FUNC BOOL ScrCmd_Unk00D9(struct ScriptContext* ctx) //00D9 - todo: BufferP
THUMB_FUNC BOOL ScrCmd_Unk00DA(struct ScriptContext* ctx) //00DA - todo: BufferPokemonSpeciesName? TextPokemonSpeciesName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 msg_no = ScriptGetVar(ctx);
u16 unk1 = ScriptReadHalfword(ctx);
@@ -240,7 +240,7 @@ THUMB_FUNC struct String* FUN_02040AE4(u32 msg_no, u32 heap_id) //todo: GetPokem
THUMB_FUNC BOOL ScrCmd_GetPlayerStarterName(struct ScriptContext* ctx) //00DB - todo: BufferPlayerStarterSpecies?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
u32 msg_no = FUN_0205F388(state);
@@ -254,7 +254,7 @@ THUMB_FUNC BOOL ScrCmd_GetPlayerStarterName(struct ScriptContext* ctx) //00DB -
THUMB_FUNC BOOL ScrCmd_GetRivalStarterName(struct ScriptContext* ctx) //00DC - todo: BufferRivalStarterSpecies?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
u32 msg_no = FUN_0205F398(state);
@@ -268,7 +268,7 @@ THUMB_FUNC BOOL ScrCmd_GetRivalStarterName(struct ScriptContext* ctx) //00DC - t
THUMB_FUNC BOOL ScrCmd_GetCounterpartStarterName(struct ScriptContext* ctx) //00DD - todo: BufferFriendStarterSpecies?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
u32 msg_no = FUN_0205F3C0(state);
@@ -282,7 +282,7 @@ THUMB_FUNC BOOL ScrCmd_GetCounterpartStarterName(struct ScriptContext* ctx) //00
THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx) //00DF - todo: BufferDecorationName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 decoration = ScriptGetVar(ctx);
@@ -293,7 +293,7 @@ THUMB_FUNC BOOL ScrCmd_GetDecorationName(struct ScriptContext* ctx) //00DF - tod
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx) //00E0 - todo: BufferUndergroundTrapName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 underground_trap = ScriptGetVar(ctx);
@@ -304,7 +304,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapName(struct ScriptContext* ctx) //00E0
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx) //00E1 - todo: BufferUndergroundItemName? BufferTreasureName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 underground_item = ScriptGetVar(ctx);
@@ -316,7 +316,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundItemName(struct ScriptContext* ctx) //00E1
THUMB_FUNC BOOL ScrCmd_GetMapName(struct ScriptContext* ctx) //00E2 - todo: BufferMapName?
{
struct String* str = String_ctor(22, 4);
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 map_no = ScriptGetVar(ctx);
@@ -329,7 +329,7 @@ THUMB_FUNC BOOL ScrCmd_GetMapName(struct ScriptContext* ctx) //00E2 - todo: Buff
THUMB_FUNC BOOL ScrCmd_GetBerryName(struct ScriptContext* ctx) //017B - todo: BufferBerryName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 berry = ScriptGetVar(ctx);
u16 unk = ScriptGetVar(ctx);
@@ -343,7 +343,7 @@ THUMB_FUNC BOOL ScrCmd_GetBerryName(struct ScriptContext* ctx) //017B - todo: Bu
THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx) //017C - todo: BufferNatureName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 nature = ScriptGetVar(ctx);
@@ -354,7 +354,7 @@ THUMB_FUNC BOOL ScrCmd_GetNatureName(struct ScriptContext* ctx) //017C - todo: B
THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx) //0261 - todo: BufferAccessoryName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 fashion = ScriptGetVar(ctx);
@@ -365,7 +365,7 @@ THUMB_FUNC BOOL ScrCmd_GetFashionName(struct ScriptContext* ctx) //0261 - todo:
THUMB_FUNC BOOL ScrCmd_GetWhiteRockInscription(struct ScriptContext* ctx) //0272 - todo: BufferWhiteRockInscription?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct String* str = String_ctor(11, 11);
struct UnkStruct_02024E64* unk = FUN_02024EB4(ctx->fieldSystem->saveBlock2);
@@ -381,7 +381,7 @@ THUMB_FUNC BOOL ScrCmd_GetWhiteRockInscription(struct ScriptContext* ctx) //0272
THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx) //01CB - todo: BufferPartyPokemonMoveName?
{
struct FieldSystem *fieldSystem = ctx->fieldSystem;
struct ScrStrBufs** mgr = FUN_02039438(fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 mon_idx = ScriptGetVar(ctx);
u16 mon_move_idx = ScriptGetVar(ctx);
@@ -396,7 +396,7 @@ THUMB_FUNC BOOL ScrCmd_GetPokemonMoveName(struct ScriptContext* ctx) //01CB - to
THUMB_FUNC BOOL ScrCmd_GetRibbonName(struct ScriptContext* ctx) //0232 - todo: BufferRibbonName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u8 unk = (u8)ScriptGetVar(ctx);
u16 ribbon = (u16)FUN_0207FC5C(unk, 3);
@@ -408,7 +408,7 @@ THUMB_FUNC BOOL ScrCmd_GetRibbonName(struct ScriptContext* ctx) //0232 - todo: B
THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx) //02B3 - todo: BufferSealName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 seal = ScriptGetVar(ctx);
@@ -419,7 +419,7 @@ THUMB_FUNC BOOL ScrCmd_GetSealName(struct ScriptContext* ctx) //02B3 - todo: Buf
THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx) //02C4 - todo: BufferIndefItemName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 item = ScriptGetVar(ctx);
@@ -430,7 +430,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemNameWithIndefArticle(struct ScriptContext* ctx) //
THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx) //02C5 - todo: BufferPluralItemName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 item = ScriptGetVar(ctx);
@@ -441,7 +441,7 @@ THUMB_FUNC BOOL ScrCmd_GetItemNamePlural(struct ScriptContext* ctx) //02C5 - tod
THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx) //02C6 - todo: BufferIndefDecorationName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 decoration = ScriptGetVar(ctx);
@@ -452,7 +452,7 @@ THUMB_FUNC BOOL ScrCmd_GetDecorationNameWithArticle(struct ScriptContext* ctx) /
THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* ctx) //02C7 - todo: BufferIndefTrapName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 underground_trap = ScriptGetVar(ctx);
@@ -463,7 +463,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundTrapNameWithArticle(struct ScriptContext* c
THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* ctx) //02C8 - todo: BufferIndefUndergroundItemName? BufferIndefTreasureName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 underground_item = ScriptGetVar(ctx);
@@ -474,7 +474,7 @@ THUMB_FUNC BOOL ScrCmd_GetUndergroundItemNameWithArticle(struct ScriptContext* c
THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx) //02C9 - todo: BufferIndefSpeciesName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 species = ScriptGetVar(ctx);
u16 unused1 = ScriptReadHalfword(ctx);
@@ -487,7 +487,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02C9(struct ScriptContext* ctx) //02C9 - todo: BufferI
THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx) //02CA - todo: BufferIndefFriendStarterSpecies?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
struct ScriptState* state = SavArray_Flags_get(ctx->fieldSystem->saveBlock2);
u32 species = FUN_0205F3C0(state);
@@ -499,7 +499,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02CA(struct ScriptContext* ctx) //02CA - todo: BufferI
THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx) //02CB - todo: BufferIndefAccessoryName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 fashion = ScriptGetVar(ctx);
@@ -510,7 +510,7 @@ THUMB_FUNC BOOL ScrCmd_GetFashionNameWithArticle(struct ScriptContext* ctx) //02
THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx) //02CC - todo: BufferIndefTrainerClassName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 trainer_class = ScriptGetVar(ctx);
@@ -521,7 +521,7 @@ THUMB_FUNC BOOL ScrCmd_Unk02CC(struct ScriptContext* ctx) //02CC - todo: BufferI
THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx) //02CD - todo: BufferPluralSealName?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
u16 seal = ScriptGetVar(ctx);
@@ -532,7 +532,7 @@ THUMB_FUNC BOOL ScrCmd_GetSealNamePlural(struct ScriptContext* ctx) //02CD - tod
THUMB_FUNC BOOL ScrCmd_CapitalizeFirstChar(struct ScriptContext* ctx) //02CE - todo CapitalizeText?
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
u8 idx = ScriptReadByte(ctx);
ScrStrBufs_UpperFirstChar(*mgr, idx);

View File

@@ -2,7 +2,7 @@
#include "math_util.h"
#include "unk_020286F8.h"
extern void* FUN_02039438(struct FieldSystem*, u8 idx);
extern void* FieldSysGetAttrAddr(struct FieldSystem*, u8 idx);
extern void FUN_020385CC(struct TaskManager *, u32, u32, u32, u32, u16*, u16* ret_ptr);
extern BOOL FUN_020612EC(struct FieldSystem*);
@@ -10,7 +10,7 @@ extern BOOL FUN_020612F8(struct FieldSystem*);
THUMB_FUNC BOOL ScrCmd_UnionGroup(struct ScriptContext* ctx) //021D
{
struct ScrStrBufs** mgr = FUN_02039438(ctx->fieldSystem, 15);
struct ScrStrBufs** mgr = FieldSysGetAttrAddr(ctx->fieldSystem, 15);
struct UnkSaveStruct_020286F8* unk_sav_ptr = FUN_0202881C(ctx->fieldSystem->saveBlock2);
struct SaveBlock2* sav2 = ctx->fieldSystem->saveBlock2;