mirror of
https://github.com/pret/pmd-red.git
synced 2024-11-23 21:19:53 +00:00
Merge pull request #203 from mateon1/EXECUTESCRIPTCOMMAND
ExecuteScriptCommand
This commit is contained in:
commit
fa797763ef
@ -887,7 +887,7 @@ _08011624: .4byte 0x00004df8
|
||||
_08011628: .4byte 0x00004ddc
|
||||
_0801162C: .4byte 0x00004de0
|
||||
_08011630: .4byte gUnknown_80D4104
|
||||
_08011634: .4byte gUnknown_202DE30
|
||||
_08011634: .4byte gFormatData_202DE30
|
||||
_08011638: .4byte gUnknown_202DE58
|
||||
_0801163C: .4byte gUnknown_80D4120
|
||||
_08011640:
|
||||
|
@ -1460,7 +1460,7 @@ _08014E78:
|
||||
b _08014F0E
|
||||
.align 2, 0
|
||||
_08014E7C: .4byte gUnknown_80D4900
|
||||
_08014E80: .4byte gUnknown_202DE30
|
||||
_08014E80: .4byte gFormatData_202DE30
|
||||
_08014E84:
|
||||
adds r5, 0x1
|
||||
ldr r1, _08014EBC
|
||||
@ -1492,7 +1492,7 @@ _08014EB2:
|
||||
bne _08014EAC
|
||||
b _08014E78
|
||||
.align 2, 0
|
||||
_08014EBC: .4byte gUnknown_202DE30
|
||||
_08014EBC: .4byte gFormatData_202DE30
|
||||
_08014EC0: .4byte gUnknown_80D4904
|
||||
_08014EC4:
|
||||
adds r5, 0x1
|
||||
@ -1525,7 +1525,7 @@ _08014EF2:
|
||||
bne _08014EEC
|
||||
b _08014E78
|
||||
.align 2, 0
|
||||
_08014EFC: .4byte gUnknown_202DE30
|
||||
_08014EFC: .4byte gFormatData_202DE30
|
||||
_08014F00: .4byte gUnknown_80D4908
|
||||
_08014F04:
|
||||
ldr r4, _08014F08
|
||||
|
@ -1739,7 +1739,7 @@ _08040EB8: .4byte gUnknown_202F224
|
||||
_08040EBC: .4byte gDungeon
|
||||
_08040EC0: .4byte 0x00018204
|
||||
_08040EC4: .4byte gUnknown_8106A8C
|
||||
_08040EC8: .4byte gUnknown_202DE30
|
||||
_08040EC8: .4byte gFormatData_202DE30
|
||||
_08040ECC: .4byte gPtrMagnitudeMessage
|
||||
_08040ED0:
|
||||
cmp r1, 0x76
|
||||
|
@ -874,7 +874,7 @@ _08043208: .4byte 0x0000067c
|
||||
_0804320C: .4byte 0x00ffffff
|
||||
_08043210: .4byte gDungeon
|
||||
_08043214: .4byte 0x00000644
|
||||
_08043218: .4byte gUnknown_202DE30
|
||||
_08043218: .4byte gFormatData_202DE30
|
||||
_0804321C: .4byte 0x0000067b
|
||||
_08043220: .4byte gUnknown_80FEC48
|
||||
_08043224:
|
||||
@ -948,7 +948,7 @@ _0804326A:
|
||||
_080432B4: .4byte gUnknown_80FEC7C
|
||||
_080432B8: .4byte gDungeon
|
||||
_080432BC: .4byte 0x00000644
|
||||
_080432C0: .4byte gUnknown_202DE30
|
||||
_080432C0: .4byte gFormatData_202DE30
|
||||
_080432C4: .4byte gUnknown_81002B8
|
||||
_080432C8:
|
||||
ldr r4, _080432CC
|
||||
|
@ -4317,7 +4317,7 @@ _0805FBB0: .4byte gFieldMenuTeamPtr
|
||||
_0805FBB4: .4byte gFieldMenuOthersPtr
|
||||
_0805FBB8: .4byte gFieldMenuGroundPtr
|
||||
_0805FBBC: .4byte gPlayTimeRef
|
||||
_0805FBC0: .4byte gUnknown_202DE30
|
||||
_0805FBC0: .4byte gFormatData_202DE30
|
||||
_0805FBC4: .4byte gUnknown_80F9174
|
||||
_0805FBC8: .4byte gTeamInventoryRef
|
||||
_0805FBCC: .4byte gUnknown_80F9190
|
||||
@ -7317,7 +7317,7 @@ _080613EE:
|
||||
b _08061438
|
||||
.align 2, 0
|
||||
_0806141C: .4byte gUnknown_8106BD0
|
||||
_08061420: .4byte gUnknown_202DE30
|
||||
_08061420: .4byte gFormatData_202DE30
|
||||
_08061424: .4byte gUnknown_202EE10
|
||||
_08061428: .4byte gUnknown_8106BD4
|
||||
_0806142C:
|
||||
|
@ -2163,7 +2163,7 @@ _08067F4C:
|
||||
b _08067FA4
|
||||
.align 2, 0
|
||||
_08067F8C: .4byte gAvailablePokemonNames
|
||||
_08067F90: .4byte gUnknown_202DE30
|
||||
_08067F90: .4byte gFormatData_202DE30
|
||||
_08067F94: .4byte gUnknown_202DE58
|
||||
_08067F98: .4byte gUnknown_8106E2C
|
||||
_08067F9C:
|
||||
@ -2262,7 +2262,7 @@ _0806804C:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08068064: .4byte gUnknown_202DE30
|
||||
_08068064: .4byte gFormatData_202DE30
|
||||
_08068068: .4byte gUnknown_8106E6C
|
||||
thumb_func_end sub_8067F00
|
||||
|
||||
|
@ -1010,7 +1010,7 @@ _0806D808:
|
||||
bl sub_80522F4
|
||||
b _0806D84A
|
||||
.align 2, 0
|
||||
_0806D824: .4byte gUnknown_202DE30
|
||||
_0806D824: .4byte gFormatData_202DE30
|
||||
_0806D828: .4byte gUnknown_80F9764
|
||||
_0806D82C: .4byte 0x000003e7
|
||||
_0806D830:
|
||||
|
@ -170,7 +170,7 @@ _08071EB6:
|
||||
movs r1, 0
|
||||
b _08071F02
|
||||
.align 2, 0
|
||||
_08071EE8: .4byte gUnknown_202DE30
|
||||
_08071EE8: .4byte gFormatData_202DE30
|
||||
_08071EEC: .4byte gAvailablePokemonNames
|
||||
_08071EF0: .4byte gUnknown_80F9E64
|
||||
_08071EF4: .4byte 0x00000149
|
||||
@ -303,7 +303,7 @@ _08071FE2:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08071FF4: .4byte gUnknown_202DE30
|
||||
_08071FF4: .4byte gFormatData_202DE30
|
||||
_08071FF8: .4byte gAvailablePokemonNames
|
||||
_08071FFC: .4byte gUnknown_202DE58
|
||||
_08072000: .4byte gUnknown_80FF730
|
||||
@ -494,7 +494,7 @@ _08072162:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08072174: .4byte gUnknown_202DE30
|
||||
_08072174: .4byte gFormatData_202DE30
|
||||
_08072178: .4byte gAvailablePokemonNames
|
||||
_0807217C: .4byte gUnknown_202DE58
|
||||
_08072180: .4byte gUnknown_80FF730
|
||||
@ -690,7 +690,7 @@ _080722F4:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08072308: .4byte gUnknown_80FCF18
|
||||
_0807230C: .4byte gUnknown_202DE30
|
||||
_0807230C: .4byte gFormatData_202DE30
|
||||
_08072310: .4byte gUnknown_80F9ACC
|
||||
_08072314: .4byte gUnknown_8107010
|
||||
_08072318: .4byte gUnknown_8107018
|
||||
@ -870,7 +870,7 @@ _08072456:
|
||||
bl sub_80528F4
|
||||
b _080724A4
|
||||
.align 2, 0
|
||||
_08072474: .4byte gUnknown_202DE30
|
||||
_08072474: .4byte gFormatData_202DE30
|
||||
_08072478: .4byte gAvailablePokemonNames
|
||||
_0807247C: .4byte gUnknown_80F9E80
|
||||
_08072480:
|
||||
@ -1010,7 +1010,7 @@ _08072576:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08072588: .4byte gUnknown_202DE30
|
||||
_08072588: .4byte gFormatData_202DE30
|
||||
_0807258C: .4byte gAvailablePokemonNames
|
||||
_08072590: .4byte gUnknown_80F9E80
|
||||
_08072594: .4byte 0x03e60000
|
||||
@ -1261,7 +1261,7 @@ _08072760:
|
||||
pop {r1}
|
||||
bx r1
|
||||
.align 2, 0
|
||||
_08072770: .4byte gUnknown_202DE30
|
||||
_08072770: .4byte gFormatData_202DE30
|
||||
_08072774: .4byte gUnknown_80F9EC8
|
||||
thumb_func_end sub_80725A4
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ _0807F158:
|
||||
_0807F168: .4byte gDungeon
|
||||
_0807F16C: .4byte 0xffff0000
|
||||
_0807F170: .4byte 0xff00ffff
|
||||
_0807F174: .4byte gUnknown_202DE30
|
||||
_0807F174: .4byte gFormatData_202DE30
|
||||
_0807F178: .4byte gUnknown_80FE5C0
|
||||
_0807F17C: .4byte 0x0000068c
|
||||
_0807F180: .4byte 0x0000e240
|
||||
@ -1451,7 +1451,7 @@ _0807F1EC: .4byte 0xffff0000
|
||||
_0807F1F0: .4byte 0xff00ffff
|
||||
_0807F1F4: .4byte gDungeon
|
||||
_0807F1F8: .4byte 0x00000694
|
||||
_0807F1FC: .4byte gUnknown_202DE30
|
||||
_0807F1FC: .4byte gFormatData_202DE30
|
||||
_0807F200: .4byte gUnknown_80FE568
|
||||
_0807F204:
|
||||
ldr r0, _0807F224
|
||||
|
@ -111,7 +111,7 @@ _08098522:
|
||||
bl sub_809C5C4
|
||||
bl sub_809A560
|
||||
bl sub_809CB50
|
||||
bl sub_80A4A7C
|
||||
bl AllocGroundMapAction
|
||||
bl nullsub_117
|
||||
bl sub_80AD990
|
||||
bl sub_80A77F8
|
||||
@ -164,7 +164,7 @@ _080985DC:
|
||||
movs r0, 0x1
|
||||
negs r0, r0
|
||||
bl sub_809A71C
|
||||
bl sub_809A76C
|
||||
bl ScriptPrintNullTextbox
|
||||
bl sub_809977C
|
||||
ldr r0, _08098600
|
||||
ldr r0, [r0]
|
||||
@ -394,10 +394,10 @@ _080987C0:
|
||||
bl sub_809A62C
|
||||
bl GroundMap_Reset
|
||||
bl sub_809D0BC
|
||||
bl sub_80AD9D0
|
||||
bl sub_80A786C
|
||||
bl sub_80ABB98
|
||||
bl sub_80ACBD4
|
||||
bl DeleteBlankGroundEvents
|
||||
bl DeleteBlankGroundLives
|
||||
bl DeleteBlankGroundObjects
|
||||
bl DeleteBlankGroundEffects
|
||||
bl sub_809C658
|
||||
bl nullsub_16
|
||||
bl sub_8097944
|
||||
@ -539,7 +539,7 @@ _08098988:
|
||||
bhi _08098990
|
||||
b _080985DC
|
||||
_08098990:
|
||||
bl sub_80A4AC4
|
||||
bl FreeGroundMapAction
|
||||
bl nullsub_118
|
||||
bl sub_80A78F0
|
||||
bl sub_80ABBD4
|
||||
|
@ -450,7 +450,7 @@ sub_80993F0:
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_8005838
|
||||
bl sub_80A4A7C
|
||||
bl AllocGroundMapAction
|
||||
mov r7, sp
|
||||
add r0, sp, 0x8
|
||||
mov r8, r0
|
||||
@ -662,7 +662,7 @@ _08099620: .4byte gGameOptionsRef
|
||||
_08099624:
|
||||
movs r0, 0x10
|
||||
bl FadeOutAllMusic
|
||||
bl sub_80A4AC4
|
||||
bl FreeGroundMapAction
|
||||
bl sub_8099768
|
||||
bl nullsub_103
|
||||
add sp, 0x28
|
||||
|
@ -747,8 +747,8 @@ _0809AE8A:
|
||||
bx r1
|
||||
thumb_func_end sub_809AE3C
|
||||
|
||||
thumb_func_start sub_809AE90
|
||||
sub_809AE90:
|
||||
thumb_func_start ScriptPrintText
|
||||
ScriptPrintText:
|
||||
push {r4-r6,lr}
|
||||
adds r5, r0, 0
|
||||
adds r4, r2, 0
|
||||
@ -756,7 +756,7 @@ sub_809AE90:
|
||||
asrs r6, r1, 16
|
||||
cmp r4, 0
|
||||
bne _0809AEA4
|
||||
bl sub_809A76C
|
||||
bl ScriptPrintNullTextbox
|
||||
b _0809AEE0
|
||||
_0809AEA4:
|
||||
ldrb r0, [r4]
|
||||
@ -784,14 +784,14 @@ _0809AED0: .4byte gUnknown_8116134
|
||||
_0809AED4: .4byte gUnknown_3001B64
|
||||
_0809AED8: .4byte gUnknown_8116148
|
||||
_0809AEDC:
|
||||
bl sub_809A7B4
|
||||
bl ScriptPrintEmptyTextbox
|
||||
_0809AEE0:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
pop {r4-r6}
|
||||
pop {r1}
|
||||
bx r1
|
||||
thumb_func_end sub_809AE90
|
||||
thumb_func_end ScriptPrintText
|
||||
|
||||
thumb_func_start sub_809AEEC
|
||||
sub_809AEEC:
|
||||
@ -817,7 +817,7 @@ sub_809AEEC:
|
||||
.align 2, 0
|
||||
_0809AF18: .4byte gUnknown_3001B64
|
||||
_0809AF1C:
|
||||
bl sub_809A76C
|
||||
bl ScriptPrintNullTextbox
|
||||
_0809AF20:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -850,7 +850,7 @@ sub_809AF2C:
|
||||
.align 2, 0
|
||||
_0809AF58: .4byte gUnknown_3001B64
|
||||
_0809AF5C:
|
||||
bl sub_809A76C
|
||||
bl ScriptPrintNullTextbox
|
||||
_0809AF60:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
@ -883,7 +883,7 @@ sub_809AF6C:
|
||||
.align 2, 0
|
||||
_0809AF98: .4byte gUnknown_3001B64
|
||||
_0809AF9C:
|
||||
bl sub_809A76C
|
||||
bl ScriptPrintNullTextbox
|
||||
_0809AFA0:
|
||||
lsls r0, 24
|
||||
lsrs r0, 24
|
||||
|
@ -75,7 +75,7 @@ _0809CC20:
|
||||
movs r0, 0
|
||||
adds r2, r5, 0
|
||||
_0809CC4A:
|
||||
bl sub_809AE90
|
||||
bl ScriptPrintText
|
||||
_0809CC4E:
|
||||
movs r0, 0
|
||||
b _0809CC82
|
||||
@ -94,7 +94,7 @@ _0809CC5E:
|
||||
negs r1, r1
|
||||
movs r0, 0
|
||||
adds r2, r7, 0
|
||||
bl sub_809AE90
|
||||
bl ScriptPrintText
|
||||
movs r1, 0x80
|
||||
lsls r1, 1
|
||||
movs r0, 0xCB
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
|
||||
|
||||
thumb_func_start sub_809D600
|
||||
sub_809D600:
|
||||
thumb_func_start InitActionWithParams
|
||||
InitActionWithParams:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
@ -22,7 +22,7 @@ sub_809D600:
|
||||
asrs r4, 16
|
||||
lsls r5, 24
|
||||
asrs r5, 24
|
||||
bl sub_809D5B8
|
||||
bl InitAction
|
||||
str r6, [r7]
|
||||
mov r0, r8
|
||||
str r0, [r7, 0x4]
|
||||
@ -45,12 +45,12 @@ _0809D63C:
|
||||
pop {r4-r7}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_809D600
|
||||
thumb_func_end InitActionWithParams
|
||||
|
||||
thumb_func_start sub_809D648
|
||||
sub_809D648:
|
||||
push {lr}
|
||||
bl sub_809D5B8
|
||||
bl InitAction
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_809D648
|
||||
|
@ -147,7 +147,7 @@ _0809043C:
|
||||
ldr r0, _08090470
|
||||
b _08090476
|
||||
.align 2, 0
|
||||
_08090464: .4byte gUnknown_202DE30
|
||||
_08090464: .4byte gFormatData_202DE30
|
||||
_08090468: .4byte gUnknown_81159DC
|
||||
_0809046C: .4byte gDungeons
|
||||
_08090470: .4byte gUnknown_8115A80
|
||||
|
@ -32,7 +32,7 @@ _080ACBB0:
|
||||
adds r1, r4
|
||||
cmp r0, 0xF
|
||||
ble _080ACBB0
|
||||
bl sub_80ACBD4
|
||||
bl DeleteBlankGroundEffects
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -41,8 +41,8 @@ _080ACBCC: .4byte gUnknown_3001B8C
|
||||
_080ACBD0: .4byte 0x0000ffff
|
||||
thumb_func_end sub_80ACB90
|
||||
|
||||
thumb_func_start sub_80ACBD4
|
||||
sub_80ACBD4:
|
||||
thumb_func_start DeleteBlankGroundEffects
|
||||
DeleteBlankGroundEffects:
|
||||
push {r4-r6,lr}
|
||||
ldr r0, _080ACC0C
|
||||
ldr r4, [r0]
|
||||
@ -74,12 +74,12 @@ _080ACBF2:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080ACC0C: .4byte gUnknown_3001B8C
|
||||
thumb_func_end sub_80ACBD4
|
||||
thumb_func_end DeleteBlankGroundEffects
|
||||
|
||||
thumb_func_start sub_80ACC10
|
||||
sub_80ACC10:
|
||||
push {r4,lr}
|
||||
bl sub_80ACBD4
|
||||
bl DeleteBlankGroundEffects
|
||||
ldr r4, _080ACC28
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
@ -621,7 +621,7 @@ _080AD01A:
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
mov r3, r10
|
||||
bl sub_809D600
|
||||
bl InitActionWithParams
|
||||
ldr r2, [r7, 0x8]
|
||||
cmp r2, 0
|
||||
bne _080AD04C
|
||||
@ -641,7 +641,7 @@ _080AD048:
|
||||
_080AD04C:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r3, _080AD07C
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
|
@ -30,7 +30,7 @@ _080AD9AC:
|
||||
adds r1, 0x20
|
||||
cmp r0, 0x1F
|
||||
ble _080AD9AC
|
||||
bl sub_80AD9D0
|
||||
bl DeleteBlankGroundEvents
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -39,8 +39,8 @@ _080AD9C8: .4byte gUnknown_3001B90
|
||||
_080AD9CC: .4byte 0x0000ffff
|
||||
thumb_func_end sub_80AD990
|
||||
|
||||
thumb_func_start sub_80AD9D0
|
||||
sub_80AD9D0:
|
||||
thumb_func_start DeleteBlankGroundEvents
|
||||
DeleteBlankGroundEvents:
|
||||
push {r4-r6,lr}
|
||||
ldr r0, _080ADA04
|
||||
ldr r4, [r0]
|
||||
@ -70,12 +70,12 @@ _080AD9EE:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080ADA04: .4byte gUnknown_3001B90
|
||||
thumb_func_end sub_80AD9D0
|
||||
thumb_func_end DeleteBlankGroundEvents
|
||||
|
||||
thumb_func_start sub_80ADA08
|
||||
sub_80ADA08:
|
||||
push {r4,lr}
|
||||
bl sub_80AD9D0
|
||||
bl DeleteBlankGroundEvents
|
||||
ldr r4, _080ADA20
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
@ -352,7 +352,7 @@ _080ADC02:
|
||||
ldr r0, [r1, 0x8]
|
||||
ldr r0, [r0, 0x8]
|
||||
str r0, [r4, 0x1C]
|
||||
bl sub_80A7A78
|
||||
bl GroundLives_CancelBlank_2
|
||||
adds r0, r7, 0
|
||||
_080ADC24:
|
||||
add sp, 0x14
|
||||
|
@ -52,7 +52,7 @@ _080A7826:
|
||||
adds r0, r1
|
||||
movs r1, 0x1
|
||||
strh r1, [r0]
|
||||
bl sub_80A786C
|
||||
bl DeleteBlankGroundLives
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -62,8 +62,8 @@ _080A7864: .4byte gUnknown_3001B84
|
||||
_080A7868: .4byte 0x0000ffff
|
||||
thumb_func_end sub_80A77F8
|
||||
|
||||
thumb_func_start sub_80A786C
|
||||
sub_80A786C:
|
||||
thumb_func_start DeleteBlankGroundLives
|
||||
DeleteBlankGroundLives:
|
||||
push {r4-r6,lr}
|
||||
ldr r0, _080A78E8
|
||||
ldr r4, [r0]
|
||||
@ -131,12 +131,12 @@ _080A78CE:
|
||||
.align 2, 0
|
||||
_080A78E8: .4byte gUnknown_3001B84
|
||||
_080A78EC: .4byte gUnknown_3001B80
|
||||
thumb_func_end sub_80A786C
|
||||
thumb_func_end DeleteBlankGroundLives
|
||||
|
||||
thumb_func_start sub_80A78F0
|
||||
sub_80A78F0:
|
||||
push {r4,r5,lr}
|
||||
bl sub_80A786C
|
||||
bl DeleteBlankGroundLives
|
||||
ldr r4, _080A7914
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
@ -270,8 +270,8 @@ _080A79F4: .4byte gUnknown_81180BC
|
||||
_080A79F8: .4byte gUnknown_3001B84
|
||||
thumb_func_end GroundLives_Cancel
|
||||
|
||||
thumb_func_start sub_80A79FC
|
||||
sub_80A79FC:
|
||||
thumb_func_start GroundLives_CancelBlank_1
|
||||
GroundLives_CancelBlank_1:
|
||||
push {r4-r7,lr}
|
||||
mov r7, r8
|
||||
push {r7}
|
||||
@ -331,10 +331,10 @@ _080A7A50:
|
||||
.align 2, 0
|
||||
_080A7A70: .4byte gUnknown_81180D8
|
||||
_080A7A74: .4byte gUnknown_3001B84
|
||||
thumb_func_end sub_80A79FC
|
||||
thumb_func_end GroundLives_CancelBlank_1
|
||||
|
||||
thumb_func_start sub_80A7A78
|
||||
sub_80A7A78:
|
||||
thumb_func_start GroundLives_CancelBlank_2
|
||||
GroundLives_CancelBlank_2:
|
||||
push {r4-r7,lr}
|
||||
ldr r1, _080A7AC0
|
||||
movs r0, 0
|
||||
@ -391,7 +391,7 @@ _080A7ACC:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A7AE4: .4byte 0x0000ffff
|
||||
thumb_func_end sub_80A7A78
|
||||
thumb_func_end GroundLives_CancelBlank_2
|
||||
|
||||
thumb_func_start sub_80A7AE8
|
||||
sub_80A7AE8:
|
||||
@ -1722,7 +1722,7 @@ _080A8508:
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
ldr r3, [sp, 0x14]
|
||||
bl sub_809D600
|
||||
bl InitActionWithParams
|
||||
ldr r0, _080A8548
|
||||
ldr r2, [r0]
|
||||
movs r1, 0xCB
|
||||
@ -1754,7 +1754,7 @@ _080A855C:
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
ldr r3, [sp, 0x14]
|
||||
bl sub_809D600
|
||||
bl InitActionWithParams
|
||||
_080A8566:
|
||||
ldr r3, [sp, 0x10]
|
||||
ldr r2, [r3, 0xC]
|
||||
@ -1766,7 +1766,7 @@ _080A8566:
|
||||
_080A8574:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x1
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r0, [sp, 0x10]
|
||||
ldr r2, [r0, 0x10]
|
||||
cmp r2, 0
|
||||
@ -1776,7 +1776,7 @@ _080A8574:
|
||||
_080A8588:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x2
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r1, [sp, 0x10]
|
||||
ldr r2, [r1, 0x14]
|
||||
cmp r2, 0
|
||||
@ -1786,14 +1786,14 @@ _080A8588:
|
||||
_080A859C:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x3
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r3, [sp, 0x10]
|
||||
ldr r2, [r3, 0x8]
|
||||
cmp r2, 0
|
||||
beq _080A8630
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r0, [sp, 0x20]
|
||||
cmp r0, 0
|
||||
bne _080A860C
|
||||
|
@ -101,7 +101,7 @@ _080A4E08:
|
||||
_080A4E38: .4byte gUnknown_81176A4
|
||||
_080A4E3C: .4byte gUnknown_3001B70
|
||||
_080A4E40: .4byte 0x0000055c
|
||||
_080A4E44: .4byte gUnknown_3001B6C
|
||||
_080A4E44: .4byte gGroundMapAction
|
||||
_080A4E48: .4byte gUnknown_8117324
|
||||
_080A4E4C:
|
||||
lsls r0, r5, 1
|
||||
@ -121,7 +121,7 @@ _080A4E4C:
|
||||
ldr r0, [r0]
|
||||
mov pc, r0
|
||||
.align 2, 0
|
||||
_080A4E6C: .4byte gUnknown_811BAF4
|
||||
_080A4E6C: .4byte gGroundConversion_811BAF4
|
||||
_080A4E70: .4byte _080A4E74
|
||||
.align 2, 0
|
||||
_080A4E74:
|
||||
@ -258,7 +258,7 @@ _080A4F30:
|
||||
.align 2, 0
|
||||
_080A4FA0: .4byte gUnknown_3001B70
|
||||
_080A4FA4: .4byte gUnknown_8117324
|
||||
_080A4FA8: .4byte gUnknown_3001B6C
|
||||
_080A4FA8: .4byte gGroundMapAction
|
||||
_080A4FAC:
|
||||
cmp r0, 0xAA
|
||||
beq _080A500C
|
||||
@ -467,7 +467,7 @@ _080A5138:
|
||||
_080A514C: .4byte gUnknown_8117700
|
||||
_080A5150: .4byte gUnknown_3001B70
|
||||
_080A5154: .4byte 0x0000055c
|
||||
_080A5158: .4byte gUnknown_3001B6C
|
||||
_080A5158: .4byte gGroundMapAction
|
||||
_080A515C: .4byte gUnknown_8117324
|
||||
_080A5160:
|
||||
lsls r0, r5, 1
|
||||
@ -486,7 +486,7 @@ _080A5160:
|
||||
adds r2, r5, 0
|
||||
bl FatalError
|
||||
.align 2, 0
|
||||
_080A5180: .4byte gUnknown_811BAF4
|
||||
_080A5180: .4byte gGroundConversion_811BAF4
|
||||
_080A5184: .4byte gUnknown_8117734
|
||||
_080A5188: .4byte gUnknown_8117740
|
||||
_080A518C:
|
||||
@ -1272,7 +1272,7 @@ sub_80A56F0:
|
||||
str r1, [r2, 0x4]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080A5700: .4byte gUnknown_3001B6C
|
||||
_080A5700: .4byte gGroundMapAction
|
||||
thumb_func_end sub_80A56F0
|
||||
|
||||
thumb_func_start sub_80A5704
|
||||
@ -1293,7 +1293,7 @@ sub_80A5704:
|
||||
str r1, [r0]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080A5724: .4byte gUnknown_3001B6C
|
||||
_080A5724: .4byte gGroundMapAction
|
||||
thumb_func_end sub_80A5704
|
||||
|
||||
thumb_func_start sub_80A5728
|
||||
@ -1305,7 +1305,7 @@ sub_80A5728:
|
||||
ldrsh r0, [r0, r1]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080A5734: .4byte gUnknown_3001B6C
|
||||
_080A5734: .4byte gGroundMapAction
|
||||
thumb_func_end sub_80A5728
|
||||
|
||||
thumb_func_start sub_80A5738
|
||||
@ -1322,8 +1322,8 @@ sub_80A5738:
|
||||
adds r0, r1
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080A5750: .4byte gUnknown_3001B6C
|
||||
_080A5754: .4byte gUnknown_811BAF4
|
||||
_080A5750: .4byte gGroundMapAction
|
||||
_080A5754: .4byte gGroundConversion_811BAF4
|
||||
thumb_func_end sub_80A5738
|
||||
|
||||
thumb_func_start sub_80A5758
|
||||
@ -1451,8 +1451,8 @@ _080A5832:
|
||||
b _080A5856
|
||||
.align 2, 0
|
||||
_080A5838: .4byte gUnknown_3001B70
|
||||
_080A583C: .4byte gUnknown_3001B6C
|
||||
_080A5840: .4byte gUnknown_811BAF4
|
||||
_080A583C: .4byte gGroundMapAction
|
||||
_080A5840: .4byte gGroundConversion_811BAF4
|
||||
_080A5844: .4byte 0xffff8800
|
||||
_080A5848: .4byte 0xffffb000
|
||||
_080A584C: .4byte 0xffff7000
|
||||
@ -1678,7 +1678,7 @@ GroundMap_Action:
|
||||
pop {r0}
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080A59D4: .4byte gUnknown_3001B6C
|
||||
_080A59D4: .4byte gGroundMapAction
|
||||
_080A59D8: .4byte gUnknown_8117770
|
||||
thumb_func_end GroundMap_Action
|
||||
|
||||
@ -1734,7 +1734,7 @@ _080A5A32:
|
||||
b _080A5E46
|
||||
.align 2, 0
|
||||
_080A5A34: .4byte gUnknown_3001B70
|
||||
_080A5A38: .4byte gUnknown_3001B6C
|
||||
_080A5A38: .4byte gGroundMapAction
|
||||
_080A5A3C:
|
||||
cmp r0, 0xA8
|
||||
beq _080A5AF4
|
||||
|
@ -32,7 +32,7 @@ _080ABB74:
|
||||
adds r1, r4
|
||||
cmp r0, 0xF
|
||||
ble _080ABB74
|
||||
bl sub_80ABB98
|
||||
bl DeleteBlankGroundObjects
|
||||
pop {r4,r5}
|
||||
pop {r0}
|
||||
bx r0
|
||||
@ -41,8 +41,8 @@ _080ABB90: .4byte gUnknown_3001B88
|
||||
_080ABB94: .4byte 0x0000ffff
|
||||
thumb_func_end sub_80ABB54
|
||||
|
||||
thumb_func_start sub_80ABB98
|
||||
sub_80ABB98:
|
||||
thumb_func_start DeleteBlankGroundObjects
|
||||
DeleteBlankGroundObjects:
|
||||
push {r4-r6,lr}
|
||||
ldr r0, _080ABBD0
|
||||
ldr r4, [r0]
|
||||
@ -74,12 +74,12 @@ _080ABBB6:
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080ABBD0: .4byte gUnknown_3001B88
|
||||
thumb_func_end sub_80ABB98
|
||||
thumb_func_end DeleteBlankGroundObjects
|
||||
|
||||
thumb_func_start sub_80ABBD4
|
||||
sub_80ABBD4:
|
||||
push {r4,lr}
|
||||
bl sub_80ABB98
|
||||
bl DeleteBlankGroundObjects
|
||||
ldr r4, _080ABBEC
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
@ -733,7 +733,7 @@ _080AC0C0:
|
||||
adds r0, r4, 0
|
||||
adds r2, r5, 0
|
||||
mov r3, r10
|
||||
bl sub_809D600
|
||||
bl InitActionWithParams
|
||||
adds r6, r4, 0
|
||||
mov r1, r8
|
||||
ldr r2, [r1, 0xC]
|
||||
@ -751,7 +751,7 @@ _080AC0C0:
|
||||
_080AC0F2:
|
||||
adds r0, r6, 0
|
||||
movs r1, 0x1
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
adds r1, r4, 0
|
||||
mov r3, r8
|
||||
ldr r2, [r3, 0x10]
|
||||
@ -762,7 +762,7 @@ _080AC0F2:
|
||||
_080AC108:
|
||||
adds r0, r1, 0
|
||||
movs r1, 0x2
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
mov r0, r8
|
||||
ldr r2, [r0, 0x14]
|
||||
cmp r2, 0
|
||||
@ -772,14 +772,14 @@ _080AC108:
|
||||
_080AC11C:
|
||||
adds r0, r4, 0
|
||||
movs r1, 0x3
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
mov r1, r8
|
||||
ldr r2, [r1, 0x8]
|
||||
cmp r2, 0
|
||||
beq _080AC140
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
bl sub_809D6D8
|
||||
bl SetPredefinedScript
|
||||
ldr r3, _080AC164
|
||||
adds r0, r4, 0
|
||||
movs r1, 0
|
||||
|
6659
asm/ground_script.s
6659
asm/ground_script.s
File diff suppressed because it is too large
Load Diff
1856
asm/handleaction.s
Normal file
1856
asm/handleaction.s
Normal file
File diff suppressed because it is too large
Load Diff
@ -258,7 +258,7 @@ _0808F964:
|
||||
b _0808F9D8
|
||||
.align 2, 0
|
||||
_0808F998: .4byte gUnknown_8107754
|
||||
_0808F99C: .4byte gUnknown_202DE30
|
||||
_0808F99C: .4byte gFormatData_202DE30
|
||||
_0808F9A0: .4byte gLevel810DD6C_Ptr
|
||||
_0808F9A4: .4byte gExpPts810DD9C_Ptr
|
||||
_0808F9A8: .4byte gUnknown_810DDB8
|
||||
@ -335,7 +335,7 @@ _0808FA0E:
|
||||
_0808FA44: .4byte gUnknown_810DE38
|
||||
_0808FA48: .4byte gUnknown_810DDFC
|
||||
_0808FA4C: .4byte gUnknown_810DE24
|
||||
_0808FA50: .4byte gUnknown_202DE30
|
||||
_0808FA50: .4byte gFormatData_202DE30
|
||||
_0808FA54: .4byte gUnknown_810DE28
|
||||
_0808FA58: .4byte gUnknown_810DE54
|
||||
_0808FA5C:
|
||||
@ -438,7 +438,7 @@ _0808FB10:
|
||||
_0808FB24: .4byte gUnknown_202DE58
|
||||
_0808FB28: .4byte gUnknown_810DE58
|
||||
_0808FB2C: .4byte gUnknown_810DE6C
|
||||
_0808FB30: .4byte gUnknown_202DE30
|
||||
_0808FB30: .4byte gFormatData_202DE30
|
||||
_0808FB34: .4byte gUnknown_8115718
|
||||
_0808FB38: .4byte gAvailablePokemonNames
|
||||
_0808FB3C: .4byte gUnknown_810DE80
|
||||
@ -884,7 +884,7 @@ _0808FED6:
|
||||
.align 2, 0
|
||||
_0808FEEC: .4byte gUnknown_8107798
|
||||
_0808FEF0: .4byte gAvailablePokemonNames
|
||||
_0808FEF4: .4byte gUnknown_202DE30
|
||||
_0808FEF4: .4byte gFormatData_202DE30
|
||||
_0808FEF8: .4byte gUnknown_810DEB4
|
||||
_0808FEFC: .4byte gUnknown_202DE58
|
||||
_0808FF00: .4byte gUnknown_810DEC8
|
||||
|
@ -6971,8 +6971,8 @@ gUnknown_811BAE4: @ 811BAE4
|
||||
.byte 0x54, 0x30, 0x30, 0x50, 0x30, 0x31, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64
|
||||
.byte 0x69, 0x72, 0x30, 0x00
|
||||
|
||||
.global gUnknown_811BAF4
|
||||
gUnknown_811BAF4: @ 811BAF4
|
||||
.global gGroundConversion_811BAF4
|
||||
gGroundConversion_811BAF4: @ 811BAF4
|
||||
@ replacing .incbin "baserom.gba", 0x0011baf4, 0x2764
|
||||
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00
|
||||
.4byte gUnknown_811E230
|
||||
|
@ -2,20 +2,20 @@
|
||||
#define GUARD_CODE_80A26CC_H
|
||||
|
||||
// size: 0x14
|
||||
typedef struct unkStruct_80A2608
|
||||
typedef struct DungeonInfo
|
||||
{
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ s16 unk4;
|
||||
/* 0x6 */ u16 unk6;
|
||||
/* 0x8 */ u16 unk8;
|
||||
/* 0xA */ u16 unkA;
|
||||
/* 0x6 */ s16 unk6;
|
||||
/* 0x8 */ s16 unk8;
|
||||
/* 0xA */ s16 unkA;
|
||||
/* 0xC */ u8 dungeonIndex;
|
||||
/* 0xD */ u8 unkD;
|
||||
/* 0xE */ s16 unkE;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 unk11;
|
||||
} unkStruct_80A2608;
|
||||
} DungeonInfo;
|
||||
|
||||
void sub_80A2500(s32, s16 *);
|
||||
void sub_80A252C(s32, s16 *);
|
||||
@ -23,8 +23,13 @@ void sub_80A2558(s32, s16 *);
|
||||
void sub_80A2584(s16, s16);
|
||||
void sub_80A2598(s16, s16);
|
||||
u32 sub_80A25AC(u16);
|
||||
const unkStruct_80A2608 *sub_80A2608(s16 index);
|
||||
const unkStruct_80A2608 *sub_80A2620(s16 index);
|
||||
#if !defined(NONMATCHING) && defined(GROUND_SCRIPT_INCOMPLETE_DECLARATIONS)
|
||||
// Workaround for ExecuteScriptCommand relying on s32 behavior of arguments
|
||||
const DungeonInfo *sub_80A2608(s32 index);
|
||||
#else
|
||||
const DungeonInfo *sub_80A2608(s16 index);
|
||||
#endif
|
||||
const DungeonInfo *sub_80A2620(s16 index);
|
||||
s16 sub_80A2654(s16 index);
|
||||
s16 sub_80A2668(u32);
|
||||
s16 sub_80A2688(u8);
|
||||
@ -40,4 +45,4 @@ bool8 sub_80A28F0(u8 index);
|
||||
s32 sub_80A29B0(u8 *);
|
||||
const u8 *sub_80A2B18(s16);
|
||||
|
||||
#endif // GUARD_CODE_80A26CC_H
|
||||
#endif // GUARD_CODE_80A26CC_H
|
||||
|
@ -27,7 +27,7 @@ void PrintFuncFileLine(u8 *buf, DebugLocation *loc, const u8 *prefix);
|
||||
void PrintMessageWithFuncFileLine(u8 *buffer, DebugLocation *debug, const u8 *text, ...);
|
||||
void sub_8011B08(void);
|
||||
void sub_8011B88(const u8 *text, ...);
|
||||
u32 sub_8011BA4(void);
|
||||
s8 ScriptLoggingEnabled(bool8);
|
||||
u32 sub_8011BA8(void);
|
||||
const u8 *sub_8011BAC(void);
|
||||
void sub_8011B14(void);
|
||||
@ -36,4 +36,4 @@ u8 sub_8011B3C(void);
|
||||
void sub_8011BC8(u32, u32, u32, ...);
|
||||
void UnusedHang(void);
|
||||
|
||||
#endif // GUARD_DEBUG_H
|
||||
#endif // GUARD_DEBUG_H
|
||||
|
@ -2,17 +2,32 @@
|
||||
#define GUARD_GROUND_MAIN_H
|
||||
|
||||
// size: 0xC
|
||||
typedef struct unkStruct_811BAF4
|
||||
typedef struct GroundConversionStruct
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
/* 0x8 */ u8 *text;
|
||||
} unkStruct_811BAF4;
|
||||
} GroundConversionStruct;
|
||||
|
||||
bool8 sub_8098F88(void);
|
||||
const char *sub_8098FB4(void);
|
||||
|
||||
#if !defined(NONMATCHING) && defined(GROUND_SCRIPT_INCOMPLETE_DECLARATIONS)
|
||||
// Workaround for ExecuteScriptCommand relying on s32 behavior of arguments
|
||||
// Arguments could be left fully implicit (as I think they were in the original code),
|
||||
// but this way at least verifies the argument count
|
||||
bool8 GroundMainGroundRequest(s32 r0, s32 r1, s32 r2);
|
||||
bool8 GroundMainRescueRequest(s32 r0, s32 r1);
|
||||
#else
|
||||
bool8 GroundMainGroundRequest(s16 r0, u32 r1, s32 r2);
|
||||
bool8 GroundMainRescueRequest(s16 r0, u32 r1);
|
||||
#endif
|
||||
|
||||
bool32 GroundMainGameEndRequest(u32 r0);
|
||||
bool32 GroundMainGameCancelRequest(u32 r0);
|
||||
|
||||
extern GroundConversionStruct gGroundConversion_811BAF4[10];
|
||||
|
||||
#endif // GUARD_GROUND_MAIN_H
|
||||
|
@ -11,8 +11,8 @@ extern unkStruct_3001B70 *gUnknown_3001B70;
|
||||
|
||||
void GroundMap_Reset(void);
|
||||
|
||||
void sub_80A4A7C(void);
|
||||
void sub_80A4AC4(void);
|
||||
void AllocGroundMapAction(void);
|
||||
void FreeGroundMapAction(void);
|
||||
void sub_80A4B38(void);
|
||||
void sub_80A4B54(void);
|
||||
|
||||
|
@ -1,86 +1,143 @@
|
||||
#ifndef GUARD_GROUND_SCRIPT_H
|
||||
#define GUARD_GROUND_SCRIPT_H
|
||||
|
||||
typedef struct GroundScript_ExecutePP_3
|
||||
{
|
||||
// size: 0xC
|
||||
u8 *scriptPointer;
|
||||
s16 scriptType;
|
||||
s16 unk6;
|
||||
u8 unk8;
|
||||
} GroundScript_ExecutePP_3;
|
||||
#include "structs/str_position.h"
|
||||
|
||||
typedef struct __attribute__((packed)) GroundScript_ExecutePP_1_sub
|
||||
typedef struct ScriptCommand {
|
||||
// size: 0x10
|
||||
/* 0x0 */ u8 op;
|
||||
/* 0x1 */ u8 argByte;
|
||||
/* 0x2 */ s16 argShort;
|
||||
/* 0x4 */ s32 arg1;
|
||||
/* 0x8 */ s32 arg2;
|
||||
/* 0xC */ u8* argPtr;
|
||||
} ScriptCommand;
|
||||
|
||||
typedef struct ScriptInfoSmall
|
||||
{
|
||||
// size: 0xC (3 padding)
|
||||
/* 0x0 */ ScriptCommand *ptr;
|
||||
/* 0x4 */ s16 state;
|
||||
/* 0x6 */ s16 group;
|
||||
/* 0x8 */ s8 sector;
|
||||
} ScriptInfoSmall;
|
||||
|
||||
typedef struct ScriptInfo
|
||||
{
|
||||
// size: 0xC (1 padding)
|
||||
/* 0x0 */ ScriptCommand *ptr;
|
||||
/* 0x4 */ ScriptCommand *ptr2;
|
||||
/* 0x8 */ s16 group;
|
||||
/* 0xA */ s8 sector;
|
||||
} ScriptInfo;
|
||||
|
||||
typedef union ScriptUnion832 {
|
||||
s32 raw;
|
||||
s8 arr[4];
|
||||
} ScriptUnion832;
|
||||
|
||||
typedef union ScriptUnion1632 {
|
||||
s32 raw;
|
||||
s16 arr[2];
|
||||
} ScriptUnion1632;
|
||||
|
||||
typedef struct ScriptData
|
||||
{
|
||||
// size: 0x60
|
||||
/* 0x0 */ s16 scriptType;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ u8 *scriptPointer1;
|
||||
/* 0x8 */ u8 *scriptPointer2;
|
||||
/* 0xC */ u16 unkC;
|
||||
/* 0xE */ u8 unkE;
|
||||
/* 0xF */ u8 fillF;
|
||||
/* 0x10 */ u32 unk10;
|
||||
/* 0x14 */ u8 *unk14;
|
||||
/* 0x18 */ u8 fill18[0x22 - 0x18];
|
||||
/* 0x00 */ s16 state;
|
||||
/* 0x02 */ s16 savedState;
|
||||
/* 0x04 */ ScriptInfo script;
|
||||
// padding
|
||||
/* 0x10 */ ScriptInfo savedScript;
|
||||
// padding
|
||||
/* 0x1C */ ScriptCommand *curPtr;
|
||||
/* 0x20 */ u8 curScriptOp;
|
||||
// padding
|
||||
/* 0x22 */ u16 unk22;
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u32 unk26;
|
||||
u8 fill50[0x60 - 0x2A];
|
||||
} GroundScript_ExecutePP_1_sub;
|
||||
/* 0x26 */ s8 unk26;
|
||||
// padding
|
||||
/* 0x28 */ s16 branchDiscriminant;
|
||||
/* 0x2A */ s16 unk2A;
|
||||
/* 0x2C */ s16 unk2C;
|
||||
// padding
|
||||
/* 0x30 */ s32 unk30;
|
||||
/* 0x34 */ Position32 pos1;
|
||||
/* 0x3C */ Position32 pos2;
|
||||
/* 0x44 */ u8 unk44[4];
|
||||
/* 0x48 */ s32 unk48;
|
||||
/* 0x4C */ u8 unk4C;
|
||||
/* 0x4D */ u8 unk4D;
|
||||
// padding
|
||||
// ultimately accessed as ldrb, doesn't work as array of u32-sized structs, needs union
|
||||
/* 0x50 */ ScriptUnion832 unk50[4];
|
||||
} ScriptData;
|
||||
|
||||
// Needed for sub_809D568, possibly could be merged with GroundScript_ExecutePP_1_sub?
|
||||
typedef struct GroundScript_ExecutePP_1_sub_not_packed
|
||||
typedef struct CallbackData
|
||||
{
|
||||
// size: 0x60
|
||||
/* 0x0 */ s16 scriptType;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ u8 *scriptPointer1;
|
||||
/* 0x8 */ u8 *scriptPointer2;
|
||||
/* 0xC */ u16 unkC;
|
||||
/* 0xE */ u8 unkE;
|
||||
/* 0xF */ u8 fillF;
|
||||
/* 0x10 */ u32 unk10;
|
||||
/* 0x14 */ u8 *unk14;
|
||||
/* 0x18 */ u8 fill18[2];
|
||||
/* 0x1C */ u32 unk1C;
|
||||
/* 0x20 */ u8 unk20;
|
||||
/* 0x22 */ u16 unk22;
|
||||
/* 0x24 */ u16 unk24;
|
||||
/* 0x26 */ u8 unk26;
|
||||
/* 0x28 */ u16 unk28;
|
||||
/* 0x2A */ u16 unk2A;
|
||||
/* 0x2C */ u16 unk2C;
|
||||
/* 0x2E */ u16 unk2E;
|
||||
/* 0x30 */ u32 unk30;
|
||||
u8 fill34[0x1C];
|
||||
u32 unk5C[4];
|
||||
} GroundScript_ExecutePP_1_sub_not_packed;
|
||||
// size: 0x54
|
||||
/* 0x00 */ u16 maybeId;
|
||||
// padding
|
||||
// (almost?) all callbacks take the parentObject as first parameter
|
||||
/* 0x04 */ s16 (*func04)(void*); // id related
|
||||
/* 0x08 */ u32 (*func08)();
|
||||
/* 0x0C */ u32 (*func0C)();
|
||||
/* 0x10 */ u32 (*func10)();
|
||||
/* 0x14 */ u32 (*func14)();
|
||||
/* 0x18 */ u32 (*func18)();
|
||||
/* 0x1C */ u32 (*func1C)();
|
||||
/* 0x20 */ u32 (*func20)();
|
||||
/* 0x24 */ u32 (*func24)();
|
||||
/* 0x28 */ u32 (*func28)();
|
||||
/* 0x2C */ u32 (*func2C)();
|
||||
/* 0x30 */ u32 (*func30)();
|
||||
/* 0x34 */ u32 (*func34)();
|
||||
/* 0x38 */ u32 (*func38)();
|
||||
/* 0x3C */ u32 (*func3C)();
|
||||
/* 0x40 */ u32 (*func40)();
|
||||
/* 0x44 */ u32 (*func44)();
|
||||
/* 0x48 */ u32 (*func48)();
|
||||
/* 0x4C */ u32 (*func4C)();
|
||||
/* 0x50 */ u32 (*func50)();
|
||||
} CallbackData;
|
||||
|
||||
typedef void (*Callback)(u32, void *);
|
||||
typedef struct GroundScript_ExecutePP_1_sub2
|
||||
typedef struct Action
|
||||
{
|
||||
Callback callbacks[10]; // IDK the size..
|
||||
} GroundScript_ExecutePP_1_sub2;
|
||||
// size: 0xE4
|
||||
/* 0x00 */ struct CallbackData *callbacks;
|
||||
/* 0x04 */ void *parentObject; // struct GroundObject *
|
||||
/* 0x08 */ s16 unk8[2]; // id?
|
||||
/* 0x0C */ ScriptUnion1632 unkC;
|
||||
/* 0x10 */ u16 group;
|
||||
/* 0x12 */ u8 sector;
|
||||
// padding
|
||||
/* 0x14 */ ScriptCommand *predefinedScripts[4];
|
||||
/* 0x24 */ ScriptData scriptData;
|
||||
/* 0x84 */ ScriptData scriptData2;
|
||||
} Action;
|
||||
|
||||
// size: 0x110
|
||||
typedef struct GroundScript_ExecutePP_1
|
||||
// Only used when accessing gGroundMapAction (3001B6C), basically everything else just uses Action
|
||||
// probably worth moving to ground_map.h together with the main GroundMap struct
|
||||
// oh well, TODO later I guess
|
||||
typedef struct GroundMapAction
|
||||
{
|
||||
GroundScript_ExecutePP_1_sub2 *unk0;
|
||||
u32 unk4;
|
||||
u16 unk8;
|
||||
u32 unkC;
|
||||
u16 unk10;
|
||||
u8 unk12;
|
||||
u8 *unk14[4];
|
||||
GroundScript_ExecutePP_1_sub unk24;
|
||||
GroundScript_ExecutePP_1_sub unk84;
|
||||
u16 unkE4;
|
||||
u8 fillE8[0x110 - 0xE8];
|
||||
} GroundScript_ExecutePP_1;
|
||||
// size: 0x110
|
||||
/* 0x00 */ Action action;
|
||||
/* 0xE4 */ u16 groundMapId;
|
||||
/* .... */ u8 fillE8[0x110 - 0xE6];
|
||||
} GroundMapAction;
|
||||
|
||||
typedef struct FunctionScript
|
||||
{
|
||||
u32 unk0;
|
||||
u8 *funcName;
|
||||
ScriptCommand *script;
|
||||
} FunctionScript;
|
||||
|
||||
extern FunctionScript gFunctionScriptTable[];
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
bool8 GroundScript_ExecutePP(GroundScript_ExecutePP_1 *, s32 *, GroundScript_ExecutePP_3 *, const DebugLocation *unused);
|
||||
bool8 GroundScript_ExecutePP(Action *, s32 *, ScriptInfoSmall *, const DebugLocation *unused);
|
||||
|
||||
#endif // GUARD_GROUND_SCRIPT_H
|
||||
|
@ -352,6 +352,8 @@ SECTIONS {
|
||||
src/code_809D148.o(.text);
|
||||
asm/code_809D148.o(.text);
|
||||
src/ground_script.o(.text);
|
||||
asm/handleaction.o(.text);
|
||||
src/ground_script_1.o(.text);
|
||||
asm/ground_script.o(.text);
|
||||
src/code_80A26CC.o(.text);
|
||||
asm/code_80A26CC_1.o(.text);
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "text2.h"
|
||||
#include "structs/struct_sub80095e4.h"
|
||||
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
|
||||
static EWRAM_DATA_2 struct_Sub80095E4_2 *sAdventureLog = {0};
|
||||
|
||||
@ -110,32 +110,32 @@ static void DisplayAdventureLog(void)
|
||||
switch (temp) {
|
||||
case 12:
|
||||
v1 = sub_80978B8();
|
||||
gUnknown_202DE30 = (s16)v1;
|
||||
gFormatData_202DE30 = (s16)v1;
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 7:
|
||||
v2 = sub_8097880();
|
||||
gUnknown_202DE30 = (s16)v2;
|
||||
gFormatData_202DE30 = (s16)v2;
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 11:
|
||||
v3 = sub_8097838();
|
||||
gUnknown_202DE30 = (s16)v3;
|
||||
gFormatData_202DE30 = (s16)v3;
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 8:
|
||||
v4 = sub_80977B8();
|
||||
gUnknown_202DE30 = v4;
|
||||
gFormatData_202DE30 = v4;
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 9:
|
||||
v5 = sub_80977F8();
|
||||
gUnknown_202DE30 = v5;
|
||||
gFormatData_202DE30 = v5;
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
break;
|
||||
case 10:
|
||||
v6 = sub_8097870();
|
||||
gUnknown_202DE30 = (s16)v6;
|
||||
gFormatData_202DE30 = (s16)v6;
|
||||
// fallthrough
|
||||
default:
|
||||
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->s0.input, i), GetAdventureLogLine(temp), sAdventureLog->s0.unk34, 0);
|
||||
|
@ -14,7 +14,6 @@
|
||||
static EWRAM_DATA_2 struct struct_Sub80095E4_2 *sUnknown_203B258 = {0};
|
||||
|
||||
extern struct unkStruct_81188F0 gUnknown_81188F0[10];
|
||||
extern unkStruct_811BAF4 gUnknown_811BAF4[10];
|
||||
|
||||
#include "data/code_801D9E4.h"
|
||||
|
||||
@ -105,7 +104,7 @@ static void sub_801DB54(void)
|
||||
|
||||
static void sub_801DBD4(void)
|
||||
{
|
||||
unkStruct_811BAF4 *temp;
|
||||
GroundConversionStruct *temp;
|
||||
struct unkStruct_81188F0 *temp2;
|
||||
s32 x, y, n;
|
||||
s16 index;
|
||||
@ -124,7 +123,7 @@ static void sub_801DBD4(void)
|
||||
|
||||
for (counter = 0; counter < sUnknown_203B258->s0.input.unk1A; counter++) {
|
||||
index = (sUnknown_203B258->s0.input.unk1E * sUnknown_203B258->s0.input.unk1C) + counter;
|
||||
temp = &gUnknown_811BAF4[index];
|
||||
temp = &gGroundConversion_811BAF4[index];
|
||||
temp2 = &gUnknown_81188F0[temp->unk4];
|
||||
|
||||
y = sub_8013800(&sUnknown_203B258->s0.input, counter);
|
||||
|
@ -17,7 +17,7 @@ struct unkStruct_8113080
|
||||
|
||||
extern u8 gUnknown_202DE58[];
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern s32 gUnknown_202DE30[2];
|
||||
extern s32 gFormatData_202DE30[2];
|
||||
|
||||
extern const u8 *gUnknown_811383C[];
|
||||
extern const u8 *gUnknown_8113850[];
|
||||
@ -112,46 +112,46 @@ void sub_8094558(u32 param_1,u8 *param_2,unkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
xxx_format_and_draw(x,y,buffer,param_1,0);
|
||||
|
||||
y += 0x10;
|
||||
gUnknown_202DE30[0] = param_3->exp;
|
||||
gUnknown_202DE30[1] = param_3->level;
|
||||
if (gUnknown_202DE30[1] >= 100) {
|
||||
gFormatData_202DE30[0] = param_3->exp;
|
||||
gFormatData_202DE30[1] = param_3->level;
|
||||
if (gFormatData_202DE30[1] >= 100) {
|
||||
xxx_format_and_draw(4,y,*gUnknown_81138C0,param_1,0);
|
||||
}
|
||||
else {
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113898,param_1,0);
|
||||
}
|
||||
y += 0xA;
|
||||
gUnknown_202DE30[0] = param_3->maxHPStat;
|
||||
gFormatData_202DE30[0] = param_3->maxHPStat;
|
||||
xxx_format_and_draw(4,y,*gUnknown_81138D0,param_1,0);
|
||||
y += 0xA;
|
||||
gUnknown_202DE30[0] = param_3->atk;
|
||||
gUnknown_202DE30[1] = param_3->def;
|
||||
gFormatData_202DE30[0] = param_3->atk;
|
||||
gFormatData_202DE30[1] = param_3->def;
|
||||
if (param_3->attBoost) {
|
||||
gUnknown_202DE30[0] = gUnknown_202DE30[0] + param_3->attBoost;
|
||||
gFormatData_202DE30[0] = gFormatData_202DE30[0] + param_3->attBoost;
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113950,param_1,0);
|
||||
}
|
||||
else {
|
||||
xxx_format_and_draw(4,y,*gUnknown_81138E4,param_1,0);
|
||||
}
|
||||
if (param_3->defBoost) {
|
||||
gUnknown_202DE30[1] = gUnknown_202DE30[1] + param_3->defBoost;
|
||||
gFormatData_202DE30[1] = gFormatData_202DE30[1] + param_3->defBoost;
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113974,param_1,0);
|
||||
}
|
||||
else {
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113900,param_1,0);
|
||||
}
|
||||
y += 0xA;
|
||||
gUnknown_202DE30[0] = param_3->spAtk;
|
||||
gUnknown_202DE30[1] = param_3->spDef;
|
||||
gFormatData_202DE30[0] = param_3->spAtk;
|
||||
gFormatData_202DE30[1] = param_3->spDef;
|
||||
if (param_3->spAttBoost) {
|
||||
gUnknown_202DE30[0] = gUnknown_202DE30[0] + param_3->spAttBoost;
|
||||
gFormatData_202DE30[0] = gFormatData_202DE30[0] + param_3->spAttBoost;
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113990,param_1,0);
|
||||
}
|
||||
else {
|
||||
xxx_format_and_draw(4,y,*gUnknown_8113918,param_1,0);
|
||||
}
|
||||
if (param_3->spDefBoost) {
|
||||
gUnknown_202DE30[1] = gUnknown_202DE30[1] + param_3->spDefBoost;
|
||||
gFormatData_202DE30[1] = gFormatData_202DE30[1] + param_3->spDefBoost;
|
||||
xxx_format_and_draw(4,y,*gUnknown_81139B4,param_1,0);
|
||||
}
|
||||
else {
|
||||
|
@ -143,7 +143,7 @@ u32 sub_809A768(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 sub_809A76C(void)
|
||||
u8 ScriptPrintNullTextbox(void)
|
||||
{
|
||||
switch(gUnknown_3001B64->unk0)
|
||||
{
|
||||
@ -158,7 +158,7 @@ u8 sub_809A76C(void)
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_809A7B4(void)
|
||||
u8 ScriptPrintEmptyTextbox(void)
|
||||
{
|
||||
switch(gUnknown_3001B64->unk0)
|
||||
{
|
||||
|
@ -387,7 +387,7 @@ void sub_809D490(void)
|
||||
sub_809D4B0();
|
||||
}
|
||||
|
||||
extern s16 gUnknown_2039A30;
|
||||
extern s16 gCurrentMap;
|
||||
extern s16 gUnknown_2039A32;
|
||||
extern s16 gUnknown_2039A34;
|
||||
extern u8 gUnknown_2039A36;
|
||||
@ -399,7 +399,7 @@ void sub_809D4B0(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
gUnknown_2039A30 = -1;
|
||||
gCurrentMap = -1;
|
||||
gUnknown_2039A32 = -1;
|
||||
gUnknown_2039A34 = -1;
|
||||
gUnknown_2039A36 = 0;
|
||||
@ -442,44 +442,44 @@ s32 sub_809D52C(void *a0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sub_809D568(GroundScript_ExecutePP_1_sub_not_packed *a0)
|
||||
void InitScriptData(ScriptData *a0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
a0->scriptType = -1;
|
||||
a0->unk2 = 0;
|
||||
a0->scriptPointer2 = 0;
|
||||
a0->scriptPointer1 = 0;
|
||||
a0->unk14 = 0;
|
||||
a0->unk10 = 0;
|
||||
a0->unk20 = 0;
|
||||
a0->unk1C = 0;
|
||||
a0->state = -1;
|
||||
a0->savedState = 0;
|
||||
a0->script.ptr2 = 0;
|
||||
a0->script.ptr = 0;
|
||||
a0->savedScript.ptr2 = 0;
|
||||
a0->savedScript.ptr = 0;
|
||||
a0->curScriptOp = 0;
|
||||
a0->curPtr = 0;
|
||||
a0->unk22 = -1;
|
||||
a0->unk24 = 0;
|
||||
a0->unk26 = 0xFF;
|
||||
a0->unk28 = 0;
|
||||
a0->branchDiscriminant = 0;
|
||||
a0->unk2A = 0;
|
||||
a0->unk2C = 0;
|
||||
a0->unk30 = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
a0->unk5C[i] = 0;
|
||||
a0->unk50[i].raw = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_809D5B8(GroundScript_ExecutePP_1 *a0)
|
||||
void InitAction(Action *a0)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
a0->unk0 = 0;
|
||||
a0->unk4 = 0;
|
||||
a0->unk10 = -1;
|
||||
a0->unk12 = 0xFF;
|
||||
a0->callbacks = NULL;
|
||||
a0->parentObject = NULL;
|
||||
a0->group = -1;
|
||||
a0->sector = 0xFF;
|
||||
sub_809D520(&a0->unkC);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
a0->unk14[i] = 0;
|
||||
a0->predefinedScripts[i] = NULL;
|
||||
}
|
||||
|
||||
sub_809D568((void *) &a0->unk24); // Casting to void* because packed/not packed
|
||||
sub_809D568((void *) &a0->unk84); // Casting to void* because packed/not packed
|
||||
InitScriptData(&a0->scriptData);
|
||||
InitScriptData(&a0->scriptData2);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "ground_main.h"
|
||||
|
||||
// data_8115F5C.s
|
||||
extern const unkStruct_80A2608 gUnknown_81168A8[];
|
||||
extern const DungeonInfo gUnknown_81168A8[];
|
||||
extern const s16 gUnknown_8116F24[];
|
||||
extern const s16 gUnknown_8116F9A[];
|
||||
extern const u8 *gUnknown_8117000[];
|
||||
@ -78,12 +78,12 @@ u32 sub_80A25AC(u16 param_1)
|
||||
return 1;
|
||||
}
|
||||
|
||||
const unkStruct_80A2608 *sub_80A2608(s16 index)
|
||||
const DungeonInfo *sub_80A2608(s16 index)
|
||||
{
|
||||
return &gUnknown_81168A8[index];
|
||||
}
|
||||
|
||||
const unkStruct_80A2608 *sub_80A2620(s16 index)
|
||||
const DungeonInfo *sub_80A2620(s16 index)
|
||||
{
|
||||
u32 temp;
|
||||
temp = sub_80A26B8(index);
|
||||
@ -97,7 +97,7 @@ UNUSED static s16 sub_80A2644(u32 index)
|
||||
|
||||
s16 sub_80A2654(s16 index)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
temp = sub_80A2608(index);
|
||||
return temp->unkE;
|
||||
@ -149,7 +149,7 @@ UNUSED static s16 sub_80A26D8(u8 index)
|
||||
{
|
||||
s32 i;
|
||||
s16 counter2;
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
for (i = 0; i < 83; i++) {
|
||||
counter2 = i;
|
||||
@ -165,7 +165,7 @@ UNUSED static s16 sub_80A26D8(u8 index)
|
||||
|
||||
u8 sub_80A270C(s16 index)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
s32 index_s32;
|
||||
|
||||
index_s32 = index; // forcing a shift before addressing
|
||||
@ -175,7 +175,7 @@ u8 sub_80A270C(s16 index)
|
||||
|
||||
u8 sub_80A2728(s16 index)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
s16 temp_number = 55 + index;
|
||||
temp = sub_80A2608(temp_number);
|
||||
@ -184,7 +184,7 @@ u8 sub_80A2728(s16 index)
|
||||
|
||||
u8 sub_80A2740(s32 index)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
temp = sub_80A2608(index);
|
||||
return temp->dungeonIndex;
|
||||
@ -192,7 +192,7 @@ u8 sub_80A2740(s32 index)
|
||||
|
||||
s16 sub_80A2750(s16 r0)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
s32 temp_32;
|
||||
s32 temp_2;
|
||||
|
||||
@ -227,7 +227,7 @@ bool8 sub_80A27CC(s16 r0)
|
||||
{
|
||||
s32 temp;
|
||||
s32 temp2;
|
||||
const unkStruct_80A2608 *t;
|
||||
const DungeonInfo *t;
|
||||
|
||||
// Same dumbness as above to get a match
|
||||
temp2 = r0;
|
||||
@ -250,7 +250,7 @@ bool8 sub_80A27CC(s16 r0)
|
||||
bool8 sub_80A2824(u8 index)
|
||||
{
|
||||
s32 i;
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
if (sub_80023E4(5))
|
||||
return FALSE;
|
||||
@ -285,7 +285,7 @@ bool8 sub_80A2824(u8 index)
|
||||
|
||||
UNUSED static bool8 sub_80A28B4(s16 r0)
|
||||
{
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
temp = sub_80A2620(r0);
|
||||
|
||||
@ -302,7 +302,7 @@ UNUSED static bool8 sub_80A28B4(s16 r0)
|
||||
bool8 sub_80A28F0(u8 index)
|
||||
{
|
||||
s32 counter;
|
||||
const unkStruct_80A2608 *temp;
|
||||
const DungeonInfo *temp;
|
||||
|
||||
for (counter = 0; counter < 0x2E; counter++) {
|
||||
temp = sub_80A2620(counter);
|
||||
@ -323,7 +323,7 @@ bool8 sub_80A28F0(u8 index)
|
||||
UNUSED static s32 sub_80A293C(u8 *param_1)
|
||||
{
|
||||
u8 *pcVar2;
|
||||
const unkStruct_80A2608 *iVar3;
|
||||
const DungeonInfo *iVar3;
|
||||
s32 index;
|
||||
s32 counter;
|
||||
u8 local_68[64];
|
||||
@ -358,7 +358,7 @@ UNUSED static s32 sub_80A293C(u8 *param_1)
|
||||
s32 sub_80A29B0(u8 *param_1)
|
||||
{
|
||||
u8 *pcVar2;
|
||||
const unkStruct_80A2608 *iVar3;
|
||||
const DungeonInfo *iVar3;
|
||||
s32 index;
|
||||
s32 counter;
|
||||
u8 *local1;
|
||||
@ -409,7 +409,7 @@ s32 sub_80A29B0(u8 *param_1)
|
||||
UNUSED static s32 sub_80A2A5C(u8 *param_1)
|
||||
{
|
||||
u8 *pcVar2;
|
||||
const unkStruct_80A2608 *iVar3;
|
||||
const DungeonInfo *iVar3;
|
||||
s32 index;
|
||||
s32 counter;
|
||||
u8 local_58[0x40];
|
||||
@ -461,4 +461,4 @@ const u8 *sub_80A2B18(s16 param_1)
|
||||
UNUSED static const u8 *sub_80A2B28(u16 r0)
|
||||
{
|
||||
return sub_80A2B18(sub_8001658(0, 17));
|
||||
}
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ void nullsub_28(void)
|
||||
{
|
||||
}
|
||||
|
||||
u32 sub_8011BA4(void)
|
||||
s8 ScriptLoggingEnabled(bool8 unused)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
static EWRAM_DATA_2 FelicityBankWork *sFelicityBankWork = {0};
|
||||
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
extern u8 gUnknown_202E1C8[];
|
||||
extern u8 gUnknown_202E5D8[];
|
||||
|
||||
@ -167,7 +167,7 @@ static void UpdateFelicityBankDialogue(void)
|
||||
sub_8014248(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__NO_MONEY], 0, sFelicityBankWork->menuAction,
|
||||
sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->unkA4, 0xC);
|
||||
else {
|
||||
gUnknown_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
gFormatData_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
sub_8014248(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_HOW_MAY_I_SERVE__HAS_MONEY], 0, sFelicityBankWork->menuAction,
|
||||
sFelicityBankWork->unk14, sFelicityBankWork->unk54, 4, 0, sFelicityBankWork->unkA4, 0xC);
|
||||
}
|
||||
@ -181,7 +181,7 @@ static void UpdateFelicityBankDialogue(void)
|
||||
if (gTeamInventoryRef->teamSavings == 0)
|
||||
sub_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__NO_MONEY], 0, sFelicityBankWork->unkA4, 0x10D);
|
||||
else {
|
||||
gUnknown_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
gFormatData_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
sub_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_BYE__HAS_MONEY], 0, sFelicityBankWork->unkA4, 0x10D);
|
||||
}
|
||||
break;
|
||||
@ -220,7 +220,7 @@ static void UpdateFelicityBankDialogue(void)
|
||||
break;
|
||||
case 9:
|
||||
sFelicityBankWork->fallbackState = 1;
|
||||
gUnknown_202DE30 = sFelicityBankWork->chosenAmount;
|
||||
gFormatData_202DE30 = sFelicityBankWork->chosenAmount;
|
||||
sub_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_DEPOSIT__RECEIPT], 0, sFelicityBankWork->unkA4, 0x10D);
|
||||
break;
|
||||
case 10:
|
||||
@ -234,7 +234,7 @@ static void UpdateFelicityBankDialogue(void)
|
||||
}
|
||||
else {
|
||||
sFelicityBankWork->fallbackState = 11;
|
||||
gUnknown_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
gFormatData_202DE30 = gTeamInventoryRef->teamSavings;
|
||||
sub_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__HOW_MUCH], 0, sFelicityBankWork->unkA4, 0x10D);
|
||||
}
|
||||
break;
|
||||
@ -258,7 +258,7 @@ static void UpdateFelicityBankDialogue(void)
|
||||
break;
|
||||
case 12:
|
||||
sFelicityBankWork->fallbackState = 1;
|
||||
gUnknown_202DE30 = sFelicityBankWork->chosenAmount;
|
||||
gFormatData_202DE30 = sFelicityBankWork->chosenAmount;
|
||||
sub_80141B4(gCommonFelicity[sFelicityBankWork->mode][FEL_DLG_WITHDRAW__RECEIPT], 0, sFelicityBankWork->unkA4, 0x10D);
|
||||
break;
|
||||
}
|
||||
|
@ -27,8 +27,6 @@ EWRAM_DATA_2 u8 gUnknown_203B49D = {0};
|
||||
|
||||
#include "data/ground_main.h"
|
||||
|
||||
extern unkStruct_811BAF4 gUnknown_811BAF4[10];
|
||||
|
||||
extern void sub_809B57C();
|
||||
extern void GroundScript_Unlock();
|
||||
extern void sub_809D25C();
|
||||
@ -293,7 +291,7 @@ s16 sub_8098FCC(u32 unused)
|
||||
s32 iVar4;
|
||||
s32 iVar5;
|
||||
s32 iVar6;
|
||||
const unkStruct_80A2608 *iVar3;
|
||||
const DungeonInfo *iVar3;
|
||||
|
||||
iVar5 = (s16)sub_8001658(0,0x13);
|
||||
iVar6 = iVar5;
|
||||
@ -330,7 +328,7 @@ const char *sub_80990B8(void)
|
||||
index = sub_8098FCC(0xB);
|
||||
if(index != -1)
|
||||
{
|
||||
return sub_80A2B18(gUnknown_811BAF4[index].unk2);
|
||||
return sub_80A2B18(gGroundConversion_811BAF4[index].unk2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6,42 +6,42 @@
|
||||
#include "ground_script.h"
|
||||
#include "memory.h"
|
||||
|
||||
IWRAM_DATA GroundScript_ExecutePP_1 *gUnknown_3001B6C = {0};
|
||||
IWRAM_DATA GroundMapAction *gGroundMapAction = {0};
|
||||
IWRAM_DATA unkStruct_3001B70 *gUnknown_3001B70 = {0};
|
||||
|
||||
extern const u8 gUnknown_811736C[];
|
||||
extern const CallbackData gUnknown_811736C;
|
||||
extern const DebugLocation gUnknown_8117538[];
|
||||
|
||||
extern void sub_809D600(void *, const u8 *, u32, u32, u32);
|
||||
extern void InitActionWithParams(Action *action, const CallbackData *callbacks, void *parent, s16 group, s8 sector);
|
||||
extern void sub_809D648(void *);
|
||||
extern void sub_80A2D00(unkStruct_3001B70 *);
|
||||
extern void sub_809D754(GroundScript_ExecutePP_1 *, const DebugLocation *);
|
||||
extern void InitActionScriptData(GroundMapAction *, const DebugLocation *);
|
||||
extern void sub_80A2D68(unkStruct_3001B70 *);
|
||||
extern void sub_80A2D88(unkStruct_3001B70 *);
|
||||
|
||||
void sub_80A4A7C(void)
|
||||
void AllocGroundMapAction(void)
|
||||
{
|
||||
gUnknown_3001B6C = MemoryAlloc(sizeof(GroundScript_ExecutePP_1), 6);
|
||||
gUnknown_3001B6C->unkE4 = -1;
|
||||
sub_809D600(gUnknown_3001B6C, gUnknown_811736C, 0, -1, -1);
|
||||
gGroundMapAction = MemoryAlloc(sizeof(GroundMapAction), 6);
|
||||
gGroundMapAction->groundMapId = -1;
|
||||
InitActionWithParams(&gGroundMapAction->action, &gUnknown_811736C, 0, -1, -1);
|
||||
sub_80A5E8C(0);
|
||||
GroundMap_Reset();
|
||||
}
|
||||
|
||||
void sub_80A4AC4(void)
|
||||
void FreeGroundMapAction(void)
|
||||
{
|
||||
GroundMap_Reset();
|
||||
sub_80A5EBC();
|
||||
sub_809D648(gUnknown_3001B6C);
|
||||
MemoryFree(gUnknown_3001B6C);
|
||||
gUnknown_3001B6C = NULL;
|
||||
sub_809D648(gGroundMapAction);
|
||||
MemoryFree(gGroundMapAction);
|
||||
gGroundMapAction = NULL;
|
||||
}
|
||||
|
||||
void GroundMap_Reset(void)
|
||||
{
|
||||
sub_80015C0(0, 0x37);
|
||||
sub_80015C0(0, 0x38);
|
||||
sub_809D754(gUnknown_3001B6C, gUnknown_8117538);
|
||||
InitActionScriptData(gGroundMapAction, gUnknown_8117538);
|
||||
|
||||
if (gUnknown_3001B70 != NULL) {
|
||||
sub_80A2D00(gUnknown_3001B70);
|
||||
@ -66,4 +66,4 @@ void sub_80A4B54(void)
|
||||
sub_80A2D88(gUnknown_3001B70);
|
||||
|
||||
nullsub_122();
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "ground_map_1.h"
|
||||
#include "ground_script.h"
|
||||
|
||||
extern GroundScript_ExecutePP_1 *gUnknown_3001B6C;
|
||||
extern GroundMapAction *gGroundMapAction;
|
||||
|
||||
extern const u8 gUnknown_8117594[];
|
||||
extern const u8 gUnknown_81175EC[];
|
||||
@ -12,22 +12,21 @@ extern const DebugLocation gUnknown_81175E0;
|
||||
extern const DebugLocation gUnknown_8117644;
|
||||
extern const u8 gUnknown_8117650[];
|
||||
extern const DebugLocation gUnknown_8117698;
|
||||
extern const unkStruct_811BAF4 gUnknown_811BAF4[10];
|
||||
|
||||
extern void GroundMap_GetStationScript(GroundScript_ExecutePP_3 *, s16, u32, u32);
|
||||
extern void GroundMap_GetStationScript(ScriptInfoSmall *, s16, u32, u32);
|
||||
|
||||
extern u8 sub_809D678(void *);
|
||||
extern void sub_809D710(u8 *, GroundScript_ExecutePP_3 *, s32);
|
||||
extern void sub_809D710(u8 *, ScriptInfoSmall *, s32);
|
||||
extern bool8 sub_809D968(void *, s32);
|
||||
|
||||
static void sub_80A4BE8(GroundScript_ExecutePP_3 *script, s16 r1)
|
||||
static void sub_80A4BE8(ScriptInfoSmall *script, s16 r1)
|
||||
{
|
||||
GroundMap_GetStationScript(script, r1, 0, 0);
|
||||
}
|
||||
|
||||
void GroundMap_ExecuteEvent(s16 scriptIndex, u32 param_2)
|
||||
{
|
||||
GroundScript_ExecutePP_3 script;
|
||||
ScriptInfoSmall script;
|
||||
s32 index_s32;
|
||||
u8 iVar2;
|
||||
|
||||
@ -37,14 +36,14 @@ void GroundMap_ExecuteEvent(s16 scriptIndex, u32 param_2)
|
||||
Log(0,gUnknown_8117594, index_s32, iVar2); // "GroundMap ExecuteEvent %3d %d
|
||||
sub_809D710(NULL, &script, index_s32);
|
||||
if (iVar2 != 0)
|
||||
script.scriptType = 5;
|
||||
script.state = 5;
|
||||
|
||||
GroundScript_ExecutePP(gUnknown_3001B6C, 0, &script, &gUnknown_81175E0);
|
||||
GroundScript_ExecutePP(&gGroundMapAction->action, 0, &script, &gUnknown_81175E0);
|
||||
}
|
||||
|
||||
void GroundMap_ExecuteStation(s16 param_1, s16 param_2, s8 param_3, u32 param_4)
|
||||
{
|
||||
GroundScript_ExecutePP_3 script;
|
||||
ScriptInfoSmall script;
|
||||
s32 iVar1;
|
||||
s32 iVar2;
|
||||
s32 iVar3;
|
||||
@ -58,41 +57,41 @@ void GroundMap_ExecuteStation(s16 param_1, s16 param_2, s8 param_3, u32 param_4)
|
||||
Log(0, gUnknown_81175EC, iVar1, iVar2, iVar3, iVar4); // GroundMap ExecuteStation %3d %3d %3d %d
|
||||
GroundMap_GetStationScript(&script, iVar1, iVar2, iVar3);
|
||||
if (iVar4 != 0)
|
||||
script.scriptType = 5;
|
||||
script.state = 5;
|
||||
|
||||
GroundScript_ExecutePP(gUnknown_3001B6C, 0, &script, &gUnknown_8117644);
|
||||
GroundScript_ExecutePP(&gGroundMapAction->action, 0, &script, &gUnknown_8117644);
|
||||
}
|
||||
|
||||
void GroundMap_ExecuteEnter(s16 param_1)
|
||||
{
|
||||
GroundScript_ExecutePP_3 script;
|
||||
ScriptInfoSmall script;
|
||||
s32 iVar1;
|
||||
|
||||
iVar1 = param_1;
|
||||
|
||||
Log(0, gUnknown_8117650, iVar1); // GroundMap ExecuteEnter %3d
|
||||
sub_80A4BE8(&script, iVar1);
|
||||
script.scriptType = 2;
|
||||
script.unk6 = 0;
|
||||
script.unk8 = 0;
|
||||
GroundScript_ExecutePP(gUnknown_3001B6C, 0, &script, &gUnknown_8117698);
|
||||
script.state = 2;
|
||||
script.group = 0;
|
||||
script.sector = 0;
|
||||
GroundScript_ExecutePP(&gGroundMapAction->action, 0, &script, &gUnknown_8117698);
|
||||
}
|
||||
|
||||
UNUSED static u8 sub_80A4D14(void)
|
||||
{
|
||||
return sub_809D678(gUnknown_3001B6C);
|
||||
return sub_809D678(&gGroundMapAction->action);
|
||||
}
|
||||
|
||||
bool8 sub_80A4D2C(s16 param_1)
|
||||
{
|
||||
s32 iVar1 = param_1;
|
||||
return sub_809D968(gUnknown_3001B6C, iVar1);
|
||||
return sub_809D968(&gGroundMapAction->action, iVar1);
|
||||
}
|
||||
|
||||
bool8 sub_80A4D48(s16 index)
|
||||
{
|
||||
if (index == -1) return TRUE;
|
||||
if (gUnknown_811BAF4[index].unk0 == 5) return FALSE;
|
||||
if (gUnknown_811BAF4[index].unk0 != 8) return TRUE;
|
||||
if (gGroundConversion_811BAF4[index].unk0 == 5) return FALSE;
|
||||
if (gGroundConversion_811BAF4[index].unk0 != 8) return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -17,160 +17,151 @@ extern u8 gUnknown_811656C[];
|
||||
extern DebugLocation gUnknown_81165C8;
|
||||
|
||||
extern void sub_809D520(void *);
|
||||
extern void sub_809D568(void *);
|
||||
extern void InitScriptData(void *);
|
||||
extern u8 sub_80AC378(void);
|
||||
extern u8 sub_80AD290(void);
|
||||
extern u8 sub_80A8B74(void);
|
||||
extern u8 sub_809A750(void);
|
||||
extern u8 *sub_80A2460(GroundScript_ExecutePP_1 *param_1, u32);
|
||||
extern ScriptCommand *sub_80A2460(Action *param_1, u32);
|
||||
void FatalError(u32 *, const char *, ...) __attribute__((noreturn));
|
||||
|
||||
typedef struct FunctionScript
|
||||
void SetPredefinedScript(Action *param_1, s16 index, ScriptCommand *param_3)
|
||||
{
|
||||
u32 unk0;
|
||||
u8 *funcName;
|
||||
u8 *script;
|
||||
} FunctionScript;
|
||||
|
||||
extern FunctionScript gFunctionScriptTable[];
|
||||
|
||||
void sub_809D6D8(GroundScript_ExecutePP_1 *param_1, s16 index, u8 *param_3)
|
||||
{
|
||||
param_1->unk14[index] = param_3;
|
||||
param_1->predefinedScripts[index] = param_3;
|
||||
}
|
||||
|
||||
bool8 sub_809D6E4(GroundScript_ExecutePP_1 *param_1, GroundScript_ExecutePP_3 *script, s16 _index)
|
||||
bool8 sub_809D6E4(Action *param_1, ScriptInfoSmall *script, s16 _index)
|
||||
{
|
||||
u8 *scriptPtr;
|
||||
ScriptCommand *scriptPtr;
|
||||
s32 index = _index;
|
||||
|
||||
scriptPtr = param_1->unk14[index];
|
||||
script->scriptPointer = scriptPtr;
|
||||
script->scriptType = index;
|
||||
script->unk6 = param_1->unk10;
|
||||
script->unk8 = param_1->unk12;
|
||||
scriptPtr = param_1->predefinedScripts[index];
|
||||
script->ptr = scriptPtr;
|
||||
script->state = index;
|
||||
script->group = param_1->group;
|
||||
script->sector = param_1->sector;
|
||||
return scriptPtr != NULL;
|
||||
}
|
||||
|
||||
void sub_809D710(GroundScript_ExecutePP_1 *param_1, GroundScript_ExecutePP_3 *script, s16 index)
|
||||
void sub_809D710(Action *param_1, ScriptInfoSmall *script, s16 index)
|
||||
{
|
||||
s32 index_s32 = index;
|
||||
script->scriptPointer = gFunctionScriptTable[index_s32].script;
|
||||
script->scriptType = 2;
|
||||
script->ptr = gFunctionScriptTable[index_s32].script;
|
||||
script->state = 2;
|
||||
if (param_1 != NULL) {
|
||||
script->unk6 = param_1->unk10;
|
||||
script->unk8 = param_1->unk12;
|
||||
script->group = param_1->group;
|
||||
script->sector = param_1->sector;
|
||||
}
|
||||
else {
|
||||
script->unk6 = -1;
|
||||
script->unk8 = -1;
|
||||
script->group = -1;
|
||||
script->sector = -1;
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_809D754(GroundScript_ExecutePP_1 *param_1, DebugLocation *unused)
|
||||
bool8 InitActionScriptData(Action *param_1, DebugLocation *unused)
|
||||
{
|
||||
sub_809D568(¶m_1->unk24);
|
||||
sub_809D568(¶m_1->unk84);
|
||||
InitScriptData(¶m_1->scriptData);
|
||||
InitScriptData(¶m_1->scriptData2);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_809D770(GroundScript_ExecutePP_1 *param_1, DebugLocation *unused)
|
||||
bool8 sub_809D770(Action *param_1, DebugLocation *unused)
|
||||
{
|
||||
sub_809D568(¶m_1->unk24);
|
||||
sub_809D568(¶m_1->unk84);
|
||||
param_1->unk24.unk2 = 4;
|
||||
InitScriptData(¶m_1->scriptData);
|
||||
InitScriptData(¶m_1->scriptData2);
|
||||
param_1->scriptData.savedState = 4;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 GroundScript_ExecutePP(GroundScript_ExecutePP_1 *param_1, s32 *param_2, GroundScript_ExecutePP_3 *param_3, const DebugLocation *unused)
|
||||
bool8 GroundScript_ExecutePP(Action *action, s32 *param_2, ScriptInfoSmall *param_3, const DebugLocation *unused)
|
||||
{
|
||||
if ((param_3 == NULL) || (param_3->scriptPointer == NULL)) {
|
||||
if ((param_3 == NULL) || (param_3->ptr == NULL)) {
|
||||
return FALSE;
|
||||
}
|
||||
switch(param_3->scriptType) {
|
||||
switch(param_3->state) {
|
||||
case 2:
|
||||
case 3:
|
||||
if (param_1->unk24.scriptType == 1) {
|
||||
param_1->unk84 = param_1->unk24;
|
||||
if (action->scriptData.state == 1) {
|
||||
action->scriptData2 = action->scriptData;
|
||||
break;
|
||||
}
|
||||
if (param_1->unk24.scriptType == 5) {
|
||||
sub_809D568(¶m_1->unk84);
|
||||
if (action->scriptData.state == 5) {
|
||||
InitScriptData(&action->scriptData2);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (param_1->unk24.scriptType != 2) {
|
||||
// "execute script type error B"
|
||||
if (action->scriptData.state != 2) {
|
||||
// "execute script type error B" at ../ground/ground_script.c:688
|
||||
FatalError(&gUnknown_8116538, gUnknown_8116544);
|
||||
}
|
||||
if (param_1->unk84.scriptType != -1) {
|
||||
// "execute script type error C"
|
||||
if (action->scriptData2.state != -1) {
|
||||
// "execute script type error C" at ../ground/ground_script.c:689
|
||||
FatalError(&gUnknown_8116560, gUnknown_811656C);
|
||||
}
|
||||
param_1->unk84 = param_1->unk24;
|
||||
action->scriptData2 = action->scriptData;
|
||||
break;
|
||||
case 0:
|
||||
if (param_1->unk24.scriptType != 1) goto _0809D84A;
|
||||
param_1->unk84 = param_1->unk24;
|
||||
if (action->scriptData.state != 1) goto _0809D84A;
|
||||
action->scriptData2 = action->scriptData;
|
||||
break;
|
||||
case 1:
|
||||
_0809D84A:
|
||||
sub_809D568(¶m_1->unk84);
|
||||
InitScriptData(&action->scriptData2);
|
||||
break;
|
||||
default:
|
||||
// "execute script type error %d"
|
||||
FatalError(&gUnknown_8116588, gUnknown_8116594, param_3->scriptType);
|
||||
// "execute script type error %d" at ../ground/ground_script.c:708
|
||||
FatalError(&gUnknown_8116588, gUnknown_8116594, param_3->state);
|
||||
}
|
||||
sub_809D568(¶m_1->unk24);
|
||||
InitScriptData(&action->scriptData);
|
||||
if (param_2 != NULL) {
|
||||
param_1->unkC = param_2[0];
|
||||
action->unkC.raw = param_2[0];
|
||||
}
|
||||
else {
|
||||
sub_809D520(¶m_1->unkC);
|
||||
sub_809D520(&action->unkC);
|
||||
}
|
||||
param_1->unk24.scriptType = param_3->scriptType;
|
||||
param_1->unk24.unk2 = 3;
|
||||
param_1->unk24.unkC = param_3->unk6;
|
||||
param_1->unk24.unkE = param_3->unk8;
|
||||
param_1->unk24.scriptPointer1 = param_3->scriptPointer;
|
||||
param_1->unk24.scriptPointer2 = param_3->scriptPointer;
|
||||
param_1->unk24.unk10 = 0;
|
||||
param_1->unk24.unk14 = NULL;
|
||||
action->scriptData.state = param_3->state;
|
||||
action->scriptData.savedState = 3;
|
||||
action->scriptData.script.group = param_3->group;
|
||||
action->scriptData.script.sector = param_3->sector;
|
||||
action->scriptData.script.ptr = param_3->ptr;
|
||||
action->scriptData.script.ptr2 = param_3->ptr;
|
||||
action->scriptData.savedScript.ptr = 0;
|
||||
action->scriptData.savedScript.ptr2 = NULL;
|
||||
|
||||
if (param_1->unk0->callbacks[5] != 0) {
|
||||
param_1->unk0->callbacks[5](param_1->unk4, ¶m_1->unk24.unk26);
|
||||
if (action->callbacks->func14 != 0) {
|
||||
action->callbacks->func14(action->parentObject, &action->scriptData.unk26);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool8 sub_809D8C0(GroundScript_ExecutePP_1 *param_1, s32 *param_2, s16 index, DebugLocation *debug)
|
||||
bool8 sub_809D8C0(Action *param_1, s32 *param_2, s16 index, DebugLocation *debug)
|
||||
{
|
||||
GroundScript_ExecutePP_3 auStack28;
|
||||
ScriptInfoSmall auStack28;
|
||||
|
||||
sub_809D6E4(param_1,&auStack28,index);
|
||||
return GroundScript_ExecutePP(param_1, param_2, &auStack28, debug);
|
||||
}
|
||||
|
||||
u8 sub_809D8EC(GroundScript_ExecutePP_1 *param_1, s16 param_2)
|
||||
u8 sub_809D8EC(Action *param_1, s16 param_2)
|
||||
{
|
||||
s32 param_2_s32;
|
||||
|
||||
param_2_s32 = param_2;
|
||||
|
||||
if ((param_2 == 0) && (sub_809A750() == 0)) {
|
||||
param_1->unk24.scriptPointer1 = sub_80A2460(param_1, 0);
|
||||
param_1->scriptData.script.ptr = sub_80A2460(param_1, 0);
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
param_1->unk24.unk22 = param_2_s32;
|
||||
param_1->unk24.unk2 = 2;
|
||||
param_1->scriptData.unk22 = param_2_s32;
|
||||
param_1->scriptData.savedState = 2;
|
||||
gUnknown_2039A36 = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool8 GroundScript_Cancel(GroundScript_ExecutePP_1 *r0)
|
||||
bool8 GroundScript_Cancel(Action *r0)
|
||||
{
|
||||
// NOTE: Will always return TRUE
|
||||
return sub_809D770(r0, &gUnknown_81165C8);
|
||||
@ -186,7 +177,7 @@ u8 sub_809D940(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool8 sub_809D968(GroundScript_ExecutePP_1 *param_1, s16 param_2)
|
||||
bool8 sub_809D968(Action *param_1, s16 param_2)
|
||||
{
|
||||
s16 sVar1;
|
||||
s16 sVar2;
|
||||
@ -195,14 +186,14 @@ bool8 sub_809D968(GroundScript_ExecutePP_1 *param_1, s16 param_2)
|
||||
s32 param_2_s16 = param_2;
|
||||
|
||||
ret = FALSE;
|
||||
sVar1 = param_1->unk24.unk22;
|
||||
sVar1 = param_1->scriptData.unk22;
|
||||
if ((sVar1 != -1) && (sVar1 == param_2_s16)) {
|
||||
param_1->unk24.unk22 = -1;
|
||||
param_1->scriptData.unk22 = -1;
|
||||
ret = TRUE;
|
||||
}
|
||||
sVar2 = param_1->unk84.unk22;
|
||||
sVar2 = param_1->scriptData2.unk22;
|
||||
if ((sVar2 != -1) && (sVar2 == param_2_s16)) {
|
||||
param_1->unk84.unk22 = -1;
|
||||
param_1->scriptData2.unk22 = -1;
|
||||
ret = TRUE;
|
||||
}
|
||||
return ret;
|
||||
@ -224,7 +215,7 @@ void sub_809D9E0(s16 index, s32 r1)
|
||||
gUnknown_2039A36 = 1;
|
||||
}
|
||||
|
||||
bool8 sub_809DA08(GroundScript_ExecutePP_1 *param_1, s16 index, u32 param_3)
|
||||
bool8 sub_809DA08(Action *param_1, s16 index, u32 param_3)
|
||||
{
|
||||
s32 index_s32;
|
||||
|
||||
@ -234,14 +225,14 @@ bool8 sub_809DA08(GroundScript_ExecutePP_1 *param_1, s16 index, u32 param_3)
|
||||
if (sub_809A750() == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
param_1->unk24.unk22 = index_s32;
|
||||
param_1->scriptData.unk22 = index_s32;
|
||||
}
|
||||
else {
|
||||
param_1->unk24.unk22 = index_s32 | 0x80;
|
||||
param_1->scriptData.unk22 = index_s32 | 0x80;
|
||||
gUnknown_2039A38[index_s32] = 1;
|
||||
gUnknown_2039AC0[index_s32] = 1;
|
||||
}
|
||||
param_1->unk24.unk2 = 2;
|
||||
param_1->scriptData.savedState = 2;
|
||||
gUnknown_2039A36 = 1;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
1874
src/ground_script_1.c
Normal file
1874
src/ground_script_1.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -21,7 +21,7 @@ extern s32 gUnknown_81097B0[];
|
||||
extern u8 gUnknown_81097C4[];
|
||||
extern u16 gGummiStatBoostLUT[];
|
||||
extern u8 gUnknown_202DE58[];
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
extern u8* gPtrTypeText; // ptr to "Type\0"
|
||||
extern u8* gPtrPPD0Text; // ptr to "PP {ARG_VALUE_0} \0"
|
||||
extern u32 gUnknown_81097E8[4]; // some sort of lookup table (16, 18, 20, 22)
|
||||
@ -690,7 +690,7 @@ u32 sub_80913E0(Item* slot, u32 a2, struct subStruct_203B240 ** a3)
|
||||
typestring = GetUnformattedTypeString(moves_data);
|
||||
xxx_format_and_draw(64, 84, typestring, a2, 0);
|
||||
result = GetMoveBasePP(buffer8);
|
||||
gUnknown_202DE30 = result;
|
||||
gFormatData_202DE30 = result;
|
||||
xxx_format_and_draw(128, 84, gPtrPPD0Text, a2, 0);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "text1.h"
|
||||
#include "text2.h"
|
||||
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
extern u8 gUnknown_202DE58[];
|
||||
extern u8 gUnknown_202E1C8[];
|
||||
extern u8 gUnknown_202E5D8[];
|
||||
@ -341,7 +341,7 @@ static void UpdateKecleonStoreDialogue(void)
|
||||
case 22:
|
||||
sub_8019700();
|
||||
sub_8090E14(gUnknown_202DE58, &sKecleonBrosWork1->soldItem, 0);
|
||||
gUnknown_202DE30 = sKecleonBrosWork1->itemSellPrice;
|
||||
gFormatData_202DE30 = sKecleonBrosWork1->itemSellPrice;
|
||||
sub_8019E04(FALSE);
|
||||
sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_05], 0, 5,sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12);
|
||||
break;
|
||||
@ -394,7 +394,7 @@ static void UpdateKecleonStoreDialogue(void)
|
||||
case 30:
|
||||
sub_8019700();
|
||||
sub_8090E14(gUnknown_202DE58, &sKecleonBrosWork1->soldItem, NULL);
|
||||
gUnknown_202DE30 = sKecleonBrosWork1->itemSellPrice;
|
||||
gFormatData_202DE30 = sKecleonBrosWork1->itemSellPrice;
|
||||
sub_8019E04(FALSE);
|
||||
sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_09], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12);
|
||||
break;
|
||||
@ -415,7 +415,7 @@ static void UpdateKecleonStoreDialogue(void)
|
||||
break;
|
||||
case 31:
|
||||
sub_8019700();
|
||||
gUnknown_202DE30 = sKecleonBrosWork1->inventoryItemSellPrice;
|
||||
gFormatData_202DE30 = sKecleonBrosWork1->inventoryItemSellPrice;
|
||||
sub_8019E04(FALSE);
|
||||
sub_8014248(gCommonKecleonBros[sKecleonBrosWork1->mode][KECLEON_DLG_10], 0, 5, sKecleonBrosWork1->menuItems, NULL, 4, 0, sKecleonBrosWork1->unkE4, 12);
|
||||
break;
|
||||
|
@ -40,7 +40,7 @@ extern u8 gUnknown_202E628[];
|
||||
extern u8 gUnknown_202DEA8[];
|
||||
extern u8 gUnknown_202E5D8[];
|
||||
extern u8 gAvailablePokemonNames[];
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
|
||||
enum FriendRewardStates
|
||||
{
|
||||
@ -222,7 +222,7 @@ void HandleMissionReward(void)
|
||||
SetRewardSceneState(PREP_FRIEND_AREA_REWARD);
|
||||
}
|
||||
else {
|
||||
gUnknown_202DE30 = moneyReward;
|
||||
gFormatData_202DE30 = moneyReward;
|
||||
if (gUnknown_203B310->displayClientDialogueSprite) {
|
||||
sub_80141B4(gUnknown_80E0434,0,&gUnknown_203B310->faceFile,0x10d);
|
||||
gUnknown_203B310->nextState = MONEY_REWARD;
|
||||
@ -348,7 +348,7 @@ void HandleMissionReward(void)
|
||||
else {
|
||||
gUnknown_203B310->nextState = REWARD_EXIT;
|
||||
}
|
||||
gUnknown_202DE30 = gUnknown_203B310->unk10->teamRankPtsReward;
|
||||
gFormatData_202DE30 = gUnknown_203B310->unk10->teamRankPtsReward;
|
||||
sub_80141B4(gUnknown_80E0670,0,0,0x101);
|
||||
}
|
||||
break;
|
||||
|
@ -15,7 +15,7 @@ static EWRAM_DATA MoveDataEntry *sMovesData = {0};
|
||||
static EWRAM_DATA MoveLearnset *sMoveLearnsets = {0}; // 420 entries, aka (MONSTER_DEOXYS_SPEED + 1), aka (MONSTER_MUNCHLAX)
|
||||
|
||||
// ???
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
extern u8 gAvailablePokemonNames[]; // 202DF98
|
||||
|
||||
// data_8107010.s
|
||||
@ -1449,7 +1449,7 @@ static void unk_MovePrintData(Move *move, s32 y)
|
||||
text = GetUnformattedTypeString(type);
|
||||
xxx_format_and_draw(64, 86, text, y, 0);
|
||||
power = GetMoveBasePower(move);
|
||||
gUnknown_202DE30 = power;
|
||||
gFormatData_202DE30 = power;
|
||||
}
|
||||
|
||||
static void CopyAndResetMove(Move *dest, Move *src)
|
||||
|
@ -123,7 +123,7 @@ extern u8 *gUnknown_80FBBB8[];
|
||||
extern u8 *gUnknown_80FBB94[];
|
||||
extern s16 gUnknown_80F4EF4[];
|
||||
|
||||
extern s32 gUnknown_202DE30[10];
|
||||
extern s32 gFormatData_202DE30[10];
|
||||
|
||||
extern void sub_8041D84(Entity *);
|
||||
extern void sub_804178C(u32);
|
||||
@ -670,8 +670,8 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo
|
||||
maxHPStat = entityInfo->maxHPStat - maxHPStat;
|
||||
HP = entityInfo->HP - HP;
|
||||
EntityUpdateStatusSprites(target);
|
||||
gUnknown_202DE30[0] = HP;
|
||||
gUnknown_202DE30[1] = maxHPStat;
|
||||
gFormatData_202DE30[0] = HP;
|
||||
gFormatData_202DE30[1] = maxHPStat;
|
||||
SetMessageArgument(gAvailablePokemonNames,target,0);
|
||||
if ((HP == 0) && (maxHPStat == 0)) {
|
||||
if (displayMessage_u8)
|
||||
@ -1139,7 +1139,7 @@ void HandleStockpile(Entity * pokemon, Entity * target)
|
||||
entityInfo->stockpileStage++;
|
||||
sub_804178C(1);
|
||||
sub_8041D5C(target);
|
||||
gUnknown_202DE30[0] = entityInfo->stockpileStage;
|
||||
gFormatData_202DE30[0] = entityInfo->stockpileStage;
|
||||
sub_80522F4(pokemon,target,*gUnknown_80FBA38);
|
||||
}
|
||||
else {
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "text2.h"
|
||||
#include "trade_items_menu.h"
|
||||
|
||||
extern u32 gUnknown_202DE30;
|
||||
extern u32 gFormatData_202DE30;
|
||||
extern u8 gUnknown_202DE58[];
|
||||
|
||||
static EWRAM_DATA_2 struct TradeItemsMenu *sTradeItemsMenu = {0};
|
||||
@ -529,7 +529,7 @@ void sub_8036B28(void)
|
||||
sub_8036F74();
|
||||
break;
|
||||
case TRADE_ITEMS_SEND_ITEM_CONFIRM:
|
||||
gUnknown_202DE30 = sTradeItemsMenu->unk14.unk0;
|
||||
gFormatData_202DE30 = sTradeItemsMenu->unk14.unk0;
|
||||
BufferItemName(gUnknown_202DE58,sTradeItemsMenu->itemToSend.id,NULL);
|
||||
sub_8014248(sFmtWillBeSentPrompt,0,5, sUnknown_80E6154,0,4,0,0,0x101);
|
||||
break;
|
||||
@ -588,17 +588,17 @@ void sub_8036B28(void)
|
||||
break;
|
||||
case 0xe:
|
||||
if (sTradeItemsMenu->unk24C.quantity == 0) {
|
||||
gUnknown_202DE30 = sTradeItemsMenu->unk244.quantity;
|
||||
gFormatData_202DE30 = sTradeItemsMenu->unk244.quantity;
|
||||
BufferItemName(gUnknown_202DE58,sTradeItemsMenu->unk244.itemIdx.id,NULL);
|
||||
}
|
||||
else {
|
||||
gUnknown_202DE30 = sTradeItemsMenu->unk24C.quantity;
|
||||
gFormatData_202DE30 = sTradeItemsMenu->unk24C.quantity;
|
||||
BufferItemName(gUnknown_202DE58,sTradeItemsMenu->unk24C.itemIdx.id,NULL);
|
||||
}
|
||||
sub_80141B4(sFmtYouReceived,0,0,0x101);
|
||||
break;
|
||||
case 0xd:
|
||||
gUnknown_202DE30 = sTradeItemsMenu->unk14.unk0;
|
||||
gFormatData_202DE30 = sTradeItemsMenu->unk14.unk0;
|
||||
BufferItemName(gUnknown_202DE58,sTradeItemsMenu->itemToSend.id,NULL);
|
||||
sub_80141B4(sFmtYouSent,0,0,0x101);
|
||||
break;
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "wigglytuff_shop2.h"
|
||||
#include "wigglytuff_shop3.h"
|
||||
|
||||
extern u32 gUnknown_202DE30[2];
|
||||
extern u32 gFormatData_202DE30[2];
|
||||
extern u8 gAvailablePokemonNames[]; // 202DF98
|
||||
extern u8 gUnknown_202E1C8[];
|
||||
extern u8 gUnknown_202E5D8[];
|
||||
@ -234,7 +234,7 @@ static void UpdateWigglytuffDialogue(void)
|
||||
case BUY_FRIEND_AREA:
|
||||
CreateWigglytuffConfirmFriendAreaMenu();
|
||||
sub_8092578(gUnknown_202E628, sWigglytuffShop3Work->chosenFriendArea, FALSE);
|
||||
gUnknown_202DE30[0] = sWigglytuffShop3Work->friendAreaPrice;
|
||||
gFormatData_202DE30[0] = sWigglytuffShop3Work->friendAreaPrice;
|
||||
sub_8014248(gCommonWigglytuff[sWigglytuffShop3Work->mode][WIGGLY_DLG_05], 0, 5, sWigglytuffShop3Work->unk1C, 0, 4, 0, sWigglytuffShop3Work->unkCC, 12);
|
||||
break;
|
||||
case FRIEND_AREA_INFO:
|
||||
|
@ -183,10 +183,10 @@ gUnknown_202DE19: /* 202DE19 (sub_800F990 - sub_8010014) */
|
||||
.include "src/save.o"
|
||||
.align 4
|
||||
|
||||
/* gUnknown_202DE30[0] seems to be the s32 value to insert in place of "$d0" (ARG_VALUE_0) in strings */
|
||||
/* gUnknown_202DE30[1] through gUnknown_202DE30[4] are for "$d1" (ARG_VALUE_1) through "$d4" (ARG_VALUE_4) */
|
||||
/* gFormatData_202DE30[0] seems to be the s32 value to insert in place of "$d0" (ARG_VALUE_0) in strings */
|
||||
/* gFormatData_202DE30[1] through gFormatData_202DE30[4] are for "$d1" (ARG_VALUE_1) through "$d4" (ARG_VALUE_4) */
|
||||
/* No known occurences after those (in pmd red) */
|
||||
gUnknown_202DE30: /* 202DE30 [used everywhere tbh] */
|
||||
gFormatData_202DE30: /* 202DE30 [used everywhere tbh] */
|
||||
.space 0x28
|
||||
/* Seems to be a general u8 buffer for text, mostly used with item names */
|
||||
gUnknown_202DE58: /* 202DE58 [used everywhere tbh] */
|
||||
@ -579,7 +579,7 @@ gUnknown_20399E8: /* 20399E8 (sub_809D0BC - sub_809D25C) */
|
||||
.space 0x14
|
||||
gUnknown_20399FC: /* 20399FC (sub_809D25C) */
|
||||
.space 0x34
|
||||
gUnknown_2039A30: /* 2039A30 (sub_809D4B0 - ExecuteScriptCommand) */
|
||||
gCurrentMap: /* 2039A30 (sub_809D4B0 - ExecuteScriptCommand) */
|
||||
.space 0x2
|
||||
gUnknown_2039A32: /* 2039A32 (sub_809D4B0 - ExecuteScriptCommand) */
|
||||
.space 0x2
|
||||
|
Loading…
Reference in New Issue
Block a user