mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-04 00:15:27 -05:00
commit
178f4e95dc
4223
asm/code_80A26CC_1.s
4223
asm/code_80A26CC_1.s
File diff suppressed because it is too large
Load Diff
|
|
@ -26,7 +26,7 @@ GroundMap_Select:
|
|||
ldr r0, [r4]
|
||||
cmp r0, 0
|
||||
beq _080A4E08
|
||||
bl sub_80A2D00
|
||||
bl GroundBg_FreeAll
|
||||
ldr r0, [r4]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
|
|
@ -47,7 +47,7 @@ _080A4E08:
|
|||
bne _080A4E4C
|
||||
ldr r1, _080A4E48
|
||||
adds r0, r2, 0
|
||||
bl sub_80A2B40
|
||||
bl GroundBg_Init
|
||||
ldr r0, [r4]
|
||||
adds r1, r5, 0
|
||||
bl sub_80A2FBC
|
||||
|
|
@ -97,7 +97,7 @@ _080A4EA8:
|
|||
ldr r0, _080A4EC0
|
||||
ldr r0, [r0]
|
||||
ldr r1, _080A4EC4
|
||||
bl sub_80A2B40
|
||||
bl GroundBg_Init
|
||||
ldr r1, _080A4EC8
|
||||
movs r2, 0x80
|
||||
lsls r2, 5
|
||||
|
|
@ -152,7 +152,7 @@ _080A4F20:
|
|||
ldr r0, _080A4FA0
|
||||
ldr r0, [r0]
|
||||
ldr r1, _080A4FA4
|
||||
bl sub_80A2B40
|
||||
bl GroundBg_Init
|
||||
movs r0, 0x1
|
||||
bl sub_80A5EDC
|
||||
_080A4F30:
|
||||
|
|
@ -385,7 +385,7 @@ GroundMap_SelectDungeon:
|
|||
ldr r0, [r7]
|
||||
cmp r0, 0
|
||||
beq _080A5110
|
||||
bl sub_80A2D00
|
||||
bl GroundBg_FreeAll
|
||||
ldr r0, [r7]
|
||||
bl MemoryFree
|
||||
movs r0, 0
|
||||
|
|
@ -413,7 +413,7 @@ _080A5110:
|
|||
_080A5138:
|
||||
ldr r1, _080A515C
|
||||
adds r0, r2, 0
|
||||
bl sub_80A2B40
|
||||
bl GroundBg_Init
|
||||
ldr r0, [r7]
|
||||
adds r1, r6, 0
|
||||
bl sub_80A2FBC
|
||||
|
|
@ -447,7 +447,7 @@ _080A5188: .4byte gUnknown_8117740
|
|||
_080A518C:
|
||||
ldr r1, _080A51FC
|
||||
adds r0, r2, 0
|
||||
bl sub_80A2B40
|
||||
bl GroundBg_Init
|
||||
movs r0, 0x1
|
||||
bl sub_80A5EDC
|
||||
ldr r0, [r7]
|
||||
|
|
|
|||
|
|
@ -644,236 +644,3 @@ gUnknown_8117298: @ 8117298
|
|||
gUnknown_81172A8: @ 81172A8
|
||||
.string "Square\0"
|
||||
.align 2,0
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81172B8
|
||||
gUnknown_81172B8: @ 81172B8
|
||||
.4byte 0x00
|
||||
.4byte 0x00
|
||||
|
||||
.global GroundBGFile_Text
|
||||
GroundBGFile_Text: @ Text
|
||||
.string "../ground/ground_bg.c\0"
|
||||
.align 2,0
|
||||
|
||||
.global UncompressCell_Text
|
||||
UncompressCell_Text: @ Text
|
||||
.string "_UncompressCell\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81172E8
|
||||
gUnknown_81172E8: @ 81172E8
|
||||
.4byte GroundBGFile_Text
|
||||
.byte 0xA0, 0x04, 0x00, 0x00
|
||||
.4byte UncompressCell_Text
|
||||
|
||||
.global gUnknown_81172F4
|
||||
gUnknown_81172F4: @ 81172F4
|
||||
@ replacing .incbin "baserom.gba", 0x1172F4, 0x20
|
||||
.string "GroundBg cell type error %d %d\0"
|
||||
.align 2, 0
|
||||
|
||||
.global gUnknown_8117314
|
||||
gUnknown_8117314: @ 8117314
|
||||
.byte 0x60, 0x00, 0x00, 0x00
|
||||
.byte 0x18, 0x00, 0x00, 0x00
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117324
|
||||
gUnknown_8117324: @ 8117324
|
||||
@ replacing .incbin "baserom.gba", 0x00117324, 0x18
|
||||
.byte 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x03, 0xb0, 0x04, 0x01, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gUnknown_811733C
|
||||
gUnknown_811733C: @ 811733C
|
||||
@ replacing .incbin "baserom.gba", 0x0011733c, 0x18
|
||||
.byte 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x04, 0xb0, 0x04, 0x00, 0x00, 0x02, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gUnknown_8117354
|
||||
gUnknown_8117354: @ 8117354
|
||||
@ replacing .incbin "baserom.gba", 0x00117354, 0x18
|
||||
.byte 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, 0xb0, 0x04, 0x01, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gGroundScriptNullCallbacks
|
||||
gGroundScriptNullCallbacks: @ 811736C
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_81173C0
|
||||
gUnknown_81173C0: @ 81173C0
|
||||
.byte 0xb3, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x02, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x04, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00
|
||||
.byte 0x05, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x06, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x09, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xc5, 0x00, 0x00, 0x00, 0x0a, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x0b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x0c, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xca, 0x00, 0x00, 0x00, 0x0d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00, 0x0e, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x00, 0x00, 0x00
|
||||
.byte 0x0f, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00, 0x10, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x11, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xd1, 0x00, 0x00, 0x00, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x13, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x14, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x22, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x00, 0x00, 0x00, 0x25, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00
|
||||
.byte 0x23, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x00, 0x00, 0x00, 0x3c, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x17, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xd9, 0x00, 0x00, 0x00, 0x1d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x1a, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0x00, 0x00, 0x35, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global GroundMap_FileText
|
||||
GroundMap_FileText: @ 8117510
|
||||
.string "../ground/ground_map.c\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_Reset_Text
|
||||
GroundMap_Reset_Text: @ Reset
|
||||
.string "GroundMap_Reset\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117538
|
||||
gUnknown_8117538: @ 8117538
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0xf8, 0x00, 0x00, 0x00
|
||||
.4byte GroundMap_Reset_Text
|
||||
|
||||
.global GroundMap_GetStationScript_Text
|
||||
GroundMap_GetStationScript_Text: @ GetStationScript
|
||||
.string "GroundMap_GetStationScript\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117560
|
||||
gUnknown_8117560: @ 8117560
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x38, 0x01, 0x00, 0x00
|
||||
.4byte GroundMap_GetStationScript_Text
|
||||
|
||||
.global gUnknown_811756C
|
||||
gUnknown_811756C: @ 811756C
|
||||
.string "GroundMap ExecuteStation %3d %3d %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117594
|
||||
gUnknown_8117594: @ 8117594
|
||||
.string "GroundMap ExecuteEvent %3d %d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteEventText
|
||||
GroundMap_ExecuteEventText: @ ExecuteEventText
|
||||
.string "GroundMap_ExecuteEvent\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81175E0
|
||||
gUnknown_81175E0: @ 81175E0
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x7D, 0x01, 0x00, 0x00
|
||||
.4byte GroundMap_ExecuteEventText
|
||||
|
||||
.global gUnknown_81175EC
|
||||
gUnknown_81175EC: @ 81175EC
|
||||
.string "GroundMap ExecuteStation %3d %3d %3d %d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteStationText
|
||||
GroundMap_ExecuteStationText: @ ExecuteStationText
|
||||
.string "GroundMap_ExecuteStation\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117644
|
||||
gUnknown_8117644: @ 8117644
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x199
|
||||
.4byte GroundMap_ExecuteStationText
|
||||
|
||||
.global gUnknown_8117650
|
||||
gUnknown_8117650: @ 8117650
|
||||
.string "GroundMap ExecuteEnter %3d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteEnterText
|
||||
GroundMap_ExecuteEnterText: @ ExecuteEnterText
|
||||
.string "GroundMap_ExecuteEnter\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117698
|
||||
gUnknown_8117698: @ 8117698
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x1B3
|
||||
.4byte GroundMap_ExecuteEnterText
|
||||
|
||||
.global gUnknown_81176A4
|
||||
gUnknown_81176A4: @ 81176A4
|
||||
.string "GroundMap Select %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_SelectText
|
||||
GroundMap_SelectText: @ SelectText
|
||||
.string "GroundMap_Select\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81176D0
|
||||
gUnknown_81176D0: @ 81176D0
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x249
|
||||
.4byte GroundMap_SelectText
|
||||
|
||||
.global gUnknown_81176DC
|
||||
gUnknown_81176DC: @ 81176DC
|
||||
.string "select map type error %d %d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81176F8
|
||||
gUnknown_81176F8: @ 81176F8
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global gUnknown_8117700
|
||||
gUnknown_8117700: @ 8117700
|
||||
.string "GroundMap SelectDungeon %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_SelectDungeonText
|
||||
GroundMap_SelectDungeonText: @ SelectDungeonText
|
||||
.string "GroundMap_SelectDungeon\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117734
|
||||
gUnknown_8117734: @ 8117734
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x2C6
|
||||
.4byte GroundMap_SelectDungeonText
|
||||
|
||||
.global gUnknown_8117740
|
||||
gUnknown_8117740: @ 8117740
|
||||
.string "map type error %d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117754
|
||||
gUnknown_8117754: @ 8117754
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global GroundMap_Action_Text
|
||||
GroundMap_Action_Text: @ Action
|
||||
.string "GroundMap_Action\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117770
|
||||
gUnknown_8117770: @ 8117770
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x7f, 0x05, 0x00, 0x00
|
||||
.4byte GroundMap_Action_Text
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117784
|
||||
gUnknown_8117784: @ 8117784
|
||||
.byte 0x0d, 0x00, 0x01, 0x00, 0x80, 0x03, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gGroundWeatherSelect
|
||||
gGroundWeatherSelect: @ 811779C
|
||||
.string "GroundWeather Select %3d %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81177BC
|
||||
gUnknown_81177BC: @ 81177BC
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
|
|
|||
206
data/data_8115F5C_2_1.s
Normal file
206
data/data_8115F5C_2_1.s
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
.section .rodata
|
||||
|
||||
|
||||
.align 2,0
|
||||
|
||||
|
||||
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117324
|
||||
gUnknown_8117324: @ 8117324
|
||||
@ replacing .incbin "baserom.gba", 0x00117324, 0x18
|
||||
.byte 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x80, 0x03, 0xb0, 0x04, 0x01, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gUnknown_811733C
|
||||
gUnknown_811733C: @ 811733C
|
||||
@ replacing .incbin "baserom.gba", 0x0011733c, 0x18
|
||||
.byte 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x04, 0xb0, 0x04, 0x00, 0x00, 0x02, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gUnknown_8117354
|
||||
gUnknown_8117354: @ 8117354
|
||||
@ replacing .incbin "baserom.gba", 0x00117354, 0x18
|
||||
.byte 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x02, 0xb0, 0x04, 0x01, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00
|
||||
.4byte sub_80A5204
|
||||
|
||||
.global gGroundScriptNullCallbacks
|
||||
gGroundScriptNullCallbacks: @ 811736C
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gUnknown_81173C0
|
||||
gUnknown_81173C0: @ 81173C0
|
||||
.byte 0xb3, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x01, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x00, 0x00, 0x02, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x04, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbd, 0x00, 0x00, 0x00
|
||||
.byte 0x05, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, 0x00, 0x00, 0x06, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x09, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xc5, 0x00, 0x00, 0x00, 0x0a, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x0b, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x0c, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xca, 0x00, 0x00, 0x00, 0x0d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcb, 0x00, 0x00, 0x00, 0x0e, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcd, 0x00, 0x00, 0x00
|
||||
.byte 0x0f, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0x00, 0x00, 0x00, 0x10, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x11, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xd1, 0x00, 0x00, 0x00, 0x12, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd2, 0x00, 0x00, 0x00, 0x13, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x00, 0x00, 0x00, 0x14, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x22, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x00, 0x00, 0x00, 0x25, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00
|
||||
.byte 0x23, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7, 0x00, 0x00, 0x00, 0x3c, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x17, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0xd9, 0x00, 0x00, 0x00, 0x1d, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdb, 0x00, 0x00, 0x00, 0x1a, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x00, 0x00, 0x00, 0x35, 0x64, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global GroundMap_FileText
|
||||
GroundMap_FileText: @ 8117510
|
||||
.string "../ground/ground_map.c\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_Reset_Text
|
||||
GroundMap_Reset_Text: @ Reset
|
||||
.string "GroundMap_Reset\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117538
|
||||
gUnknown_8117538: @ 8117538
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0xf8, 0x00, 0x00, 0x00
|
||||
.4byte GroundMap_Reset_Text
|
||||
|
||||
.global GroundMap_GetStationScript_Text
|
||||
GroundMap_GetStationScript_Text: @ GetStationScript
|
||||
.string "GroundMap_GetStationScript\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117560
|
||||
gUnknown_8117560: @ 8117560
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x38, 0x01, 0x00, 0x00
|
||||
.4byte GroundMap_GetStationScript_Text
|
||||
|
||||
.global gUnknown_811756C
|
||||
gUnknown_811756C: @ 811756C
|
||||
.string "GroundMap ExecuteStation %3d %3d %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117594
|
||||
gUnknown_8117594: @ 8117594
|
||||
.string "GroundMap ExecuteEvent %3d %d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteEventText
|
||||
GroundMap_ExecuteEventText: @ ExecuteEventText
|
||||
.string "GroundMap_ExecuteEvent\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81175E0
|
||||
gUnknown_81175E0: @ 81175E0
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x7D, 0x01, 0x00, 0x00
|
||||
.4byte GroundMap_ExecuteEventText
|
||||
|
||||
.global gUnknown_81175EC
|
||||
gUnknown_81175EC: @ 81175EC
|
||||
.string "GroundMap ExecuteStation %3d %3d %3d %d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteStationText
|
||||
GroundMap_ExecuteStationText: @ ExecuteStationText
|
||||
.string "GroundMap_ExecuteStation\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117644
|
||||
gUnknown_8117644: @ 8117644
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x199
|
||||
.4byte GroundMap_ExecuteStationText
|
||||
|
||||
.global gUnknown_8117650
|
||||
gUnknown_8117650: @ 8117650
|
||||
.string "GroundMap ExecuteEnter %3d ==================\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_ExecuteEnterText
|
||||
GroundMap_ExecuteEnterText: @ ExecuteEnterText
|
||||
.string "GroundMap_ExecuteEnter\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117698
|
||||
gUnknown_8117698: @ 8117698
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x1B3
|
||||
.4byte GroundMap_ExecuteEnterText
|
||||
|
||||
.global gUnknown_81176A4
|
||||
gUnknown_81176A4: @ 81176A4
|
||||
.string "GroundMap Select %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_SelectText
|
||||
GroundMap_SelectText: @ SelectText
|
||||
.string "GroundMap_Select\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81176D0
|
||||
gUnknown_81176D0: @ 81176D0
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x249
|
||||
.4byte GroundMap_SelectText
|
||||
|
||||
.global gUnknown_81176DC
|
||||
gUnknown_81176DC: @ 81176DC
|
||||
.string "select map type error %d %d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81176F8
|
||||
gUnknown_81176F8: @ 81176F8
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
||||
.global gUnknown_8117700
|
||||
gUnknown_8117700: @ 8117700
|
||||
.string "GroundMap SelectDungeon %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global GroundMap_SelectDungeonText
|
||||
GroundMap_SelectDungeonText: @ SelectDungeonText
|
||||
.string "GroundMap_SelectDungeon\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117734
|
||||
gUnknown_8117734: @ 8117734
|
||||
.4byte GroundMap_FileText
|
||||
.4byte 0x2C6
|
||||
.4byte GroundMap_SelectDungeonText
|
||||
|
||||
.global gUnknown_8117740
|
||||
gUnknown_8117740: @ 8117740
|
||||
.string "map type error %d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117754
|
||||
gUnknown_8117754: @ 8117754
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global GroundMap_Action_Text
|
||||
GroundMap_Action_Text: @ Action
|
||||
.string "GroundMap_Action\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117770
|
||||
gUnknown_8117770: @ 8117770
|
||||
.4byte GroundMap_FileText
|
||||
.byte 0x7f, 0x05, 0x00, 0x00
|
||||
.4byte GroundMap_Action_Text
|
||||
.string "pksdir0\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_8117784
|
||||
gUnknown_8117784: @ 8117784
|
||||
.byte 0x0d, 0x00, 0x01, 0x00, 0x80, 0x03, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0xbc, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
|
||||
.global gGroundWeatherSelect
|
||||
gGroundWeatherSelect: @ 811779C
|
||||
.string "GroundWeather Select %3d %3d\0"
|
||||
.align 2,0
|
||||
|
||||
.global gUnknown_81177BC
|
||||
gUnknown_81177BC: @ 81177BC
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
.byte 0x00, 0x00, 0x00, 0x00
|
||||
|
|
@ -3,18 +3,7 @@
|
|||
|
||||
#include "file_system.h"
|
||||
#include "structs/rgb.h"
|
||||
|
||||
// size: 0x18
|
||||
typedef struct unkStruct_202EE8C
|
||||
{
|
||||
u32 unk0;
|
||||
u16 unk4;
|
||||
s16 unk6;
|
||||
RGB *unk8;
|
||||
RGB *unkC;
|
||||
RGB *unk10;
|
||||
RGB unk14;
|
||||
} unkStruct_202EE8C;
|
||||
#include "structs/str_202EE8C.h"
|
||||
|
||||
extern unkStruct_202EE8C gUnknown_202EE8C[32];
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ struct unkStruct_81188F0
|
|||
/* 0x0 */ u8 *text1;
|
||||
/* 0x4 */ u8 *text2;
|
||||
/* 0x8 */ u8 *text3;
|
||||
/* 0xC */ u8 *text4;
|
||||
/* 0x10 */ u32 unk1;
|
||||
/* 0xC */ u8 *text4[2];
|
||||
/* 0x14 */ u32 unk2;
|
||||
/* 0x18 */ u32 unk3;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -101,7 +101,8 @@ enum DungeonID
|
|||
DUNGEON_TEAM_RUMBLEROCK = 95,
|
||||
DUNGEON_RESCUE_TEAM_2 = 96,
|
||||
DUNGEON_RESCUE_TEAM_MAZE = 97,
|
||||
NUM_DUNGEONS
|
||||
NUM_DUNGEONS,
|
||||
DUNGEON_INVALID, // 99
|
||||
};
|
||||
|
||||
#define DUNGEON_FIRST_MAZE DUNGEON_NORMAL_MAZE_2
|
||||
|
|
|
|||
|
|
@ -12,4 +12,12 @@ OpenedFile *OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc
|
|||
|
||||
u32 sub_800A8F8(u32 value);
|
||||
|
||||
#define CLOSE_FILE_AND_SET_NULL(filePtr) \
|
||||
{ \
|
||||
CloseFile(filePtr); \
|
||||
filePtr = NULL; \
|
||||
}
|
||||
|
||||
#define TRY_CLOSE_FILE_AND_SET_NULL(filePtr) if (filePtr != NULL) CLOSE_FILE_AND_SET_NULL(filePtr)
|
||||
|
||||
#endif //GUARD_FILE_SYSTEM_H
|
||||
|
|
|
|||
9
include/ground_bg.h
Normal file
9
include/ground_bg.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef GUARD_GROUND_BG_H
|
||||
#define GUARD_GROUND_BG_H
|
||||
|
||||
#include "structs/str_ground_bg.h"
|
||||
|
||||
void GroundBg_Init(GroundBg *groundBg, const SubStruct_52C *a1);
|
||||
void GroundBg_FreeAll(GroundBg *groundBg);
|
||||
|
||||
#endif // GUARD_GROUND_BG_H
|
||||
|
|
@ -1,14 +1,6 @@
|
|||
#ifndef GUARD_GROUND_MAP_H
|
||||
#define GUARD_GROUND_MAP_H
|
||||
|
||||
// size: 0x55C
|
||||
typedef struct unkStruct_3001B70
|
||||
{
|
||||
u8 fill0[0x55C - 0x0];
|
||||
} unkStruct_3001B70;
|
||||
|
||||
extern unkStruct_3001B70 *gGroundMapDungeon_3001B70;
|
||||
|
||||
void GroundMap_Reset(void);
|
||||
|
||||
void AllocGroundMapAction(void);
|
||||
|
|
@ -16,4 +8,4 @@ void FreeGroundMapAction(void);
|
|||
void sub_80A4B38(void);
|
||||
void sub_80A4B54(void);
|
||||
|
||||
#endif // GUARD_GROUND_MAP_H
|
||||
#endif // GUARD_GROUND_MAP_H
|
||||
|
|
|
|||
|
|
@ -8,9 +8,17 @@ void MemoryClear16(u16 *dest, s32 size);
|
|||
void MemoryFill8(void *dest, u8 value, s32 size);
|
||||
void MemoryFill16(u16 *dest, u16 value, s32 size);
|
||||
void MemoryCopy8(void *dest, void *src, s32 size);
|
||||
void MemoryCopy32(u32 *dest, u32 *src, s32 size);
|
||||
void MemoryCopy32(u32 *dest, const u32 *src, s32 size);
|
||||
|
||||
void *MemoryAlloc(s32 size, s32 group);
|
||||
void MemoryFree(void *a);
|
||||
|
||||
#define FREE_AND_SET_NULL(ptr) \
|
||||
{ \
|
||||
MemoryFree(ptr); \
|
||||
ptr = NULL; \
|
||||
}
|
||||
|
||||
#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr)
|
||||
|
||||
#endif // GUARD_MEMORY_H
|
||||
|
|
|
|||
18
include/structs/str_202EE8C.h
Normal file
18
include/structs/str_202EE8C.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef GUARD_STR_202EE8C_H
|
||||
#define GUARD_STR_202EE8C_H
|
||||
|
||||
#include "structs/rgb.h"
|
||||
|
||||
// size: 0x18
|
||||
typedef struct unkStruct_202EE8C
|
||||
{
|
||||
u32 unk0;
|
||||
u16 unk4;
|
||||
s16 unk6;
|
||||
RGB *unk8;
|
||||
RGB *unkC;
|
||||
RGB *unk10;
|
||||
RGB unk14;
|
||||
} unkStruct_202EE8C;
|
||||
|
||||
#endif // GUARD_STR_202EE8C_H
|
||||
136
include/structs/str_ground_bg.h
Normal file
136
include/structs/str_ground_bg.h
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
#ifndef GUARD_STR_GROUND_BG_H
|
||||
#define GUARD_STR_GROUND_BG_H
|
||||
|
||||
#include "structs/str_file_system.h"
|
||||
#include "structs/str_202EE8C.h"
|
||||
#include "structs/str_position.h"
|
||||
|
||||
#define UNK_0_ARR_COUNT 14
|
||||
#define UNK_E0_ARR_COUNT 32
|
||||
#define UNK_3E0_ARR_COUNT 2
|
||||
#define UNK_54C_ARR_COUNT 2
|
||||
#define UNK_545_UNK6_ARR_COUNT 4
|
||||
|
||||
typedef struct SubStruct_0
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
const void *unk4;
|
||||
const void *unk8;
|
||||
u8 fillC;
|
||||
} SubStruct_0;
|
||||
|
||||
struct UnkFileStruct
|
||||
{
|
||||
u8 unk0;
|
||||
s16 unk2;
|
||||
void *unk4[0]; // This is most likely wrong, will need to be fixed.
|
||||
};
|
||||
|
||||
typedef struct SubStruct_3E0
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
OpenedFile *unk8;
|
||||
const struct UnkFileStruct *unkC;
|
||||
const void *unk10;
|
||||
const void *unk14;
|
||||
const void *unk18;
|
||||
const void *unk1C;
|
||||
void *unk20;
|
||||
u32 unk24;
|
||||
} SubStruct_3E0;
|
||||
|
||||
typedef struct SubStruct_488
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
bool8 unk6;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
PixelPos unk10;
|
||||
void (*unk18)(struct SubStruct_488 *);
|
||||
u16 *unk1C;
|
||||
u16 *unk20[UNK_54C_ARR_COUNT];
|
||||
u16 *unk28[UNK_54C_ARR_COUNT];
|
||||
PixelPos unk30;
|
||||
PixelPos unk38;
|
||||
PixelPos unk40;
|
||||
PixelPos bgRegOffsets; // Either bg2 or bg3
|
||||
} SubStruct_488;
|
||||
|
||||
// size: 0x18?
|
||||
typedef struct SubStruct_52C
|
||||
{
|
||||
s16 unk0; // 0x52C
|
||||
s16 unk2; // 0x52E
|
||||
s16 unk4; // 0x530
|
||||
s16 unk6; // 0x532
|
||||
s16 unk8; // 0x534
|
||||
s16 unkA; // 0x536
|
||||
s16 unkC; // 0x538
|
||||
s16 unkE; // 0x53A
|
||||
s16 unk10; // 0x53C
|
||||
s16 unk12; // 0x53E
|
||||
void (*unk14)(void *, const void *, void *, s32); // TODO: fix void * to proper ptr types 0x540
|
||||
} SubStruct_52C;
|
||||
|
||||
typedef struct SubStruct_448
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
u16 unk6;
|
||||
u16 unk8;
|
||||
u16 unkA;
|
||||
} SubStruct_448;
|
||||
|
||||
typedef struct SubStruct_545
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6[UNK_545_UNK6_ARR_COUNT];
|
||||
s16 unkE;
|
||||
} SubStruct_545;
|
||||
|
||||
// size: 0x55C
|
||||
typedef struct GroundBg
|
||||
{
|
||||
SubStruct_0 unk0[UNK_0_ARR_COUNT];
|
||||
unkStruct_202EE8C unkE0[UNK_E0_ARR_COUNT];
|
||||
SubStruct_3E0 unk3E0[UNK_3E0_ARR_COUNT];
|
||||
OpenedFile *unk430;
|
||||
OpenedFile *unk434;
|
||||
OpenedFile *unk438;
|
||||
OpenedFile *unk43C;
|
||||
OpenedFile *unk440;
|
||||
s16 unk444;
|
||||
SubStruct_448 unk448;
|
||||
SubStruct_545 unk454;
|
||||
s16 unk464[2];
|
||||
const void *unk468;
|
||||
const void *unk46C;
|
||||
u8 unk470;
|
||||
u8 unk471;
|
||||
s32 unk474;
|
||||
PixelPos unk478[UNK_54C_ARR_COUNT];
|
||||
struct SubStruct_488 unk488[UNK_54C_ARR_COUNT];
|
||||
u16 unk528;
|
||||
u8 unk52A;
|
||||
SubStruct_52C unk52C;
|
||||
u16 *unk544;
|
||||
u16 *unk548;
|
||||
u16 *unk54C[UNK_54C_ARR_COUNT];
|
||||
u16 *unk554[UNK_54C_ARR_COUNT];
|
||||
} GroundBg;
|
||||
|
||||
extern GroundBg *gGroundMapDungeon_3001B70;
|
||||
|
||||
#endif // GUARD_STR_GROUND_BG_H
|
||||
9
include/unk_dungeon_load.h
Normal file
9
include/unk_dungeon_load.h
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef GUARD_UNK_DUNGEON_LOAD_H
|
||||
#define GUARD_UNK_DUNGEON_LOAD_H
|
||||
|
||||
#include "structs/str_file_system.h"
|
||||
#include "structs/str_dungeon_location.h"
|
||||
|
||||
void sub_80ADD9C(OpenedFile **a0, OpenedFile **a1, u32 *a2, void *a3, u16 *a4, DungeonLocation *a5, s32 a6, s32 a7, s32 a8, u16 *a9, s32 unused);
|
||||
|
||||
#endif
|
||||
|
|
@ -335,7 +335,7 @@ SECTIONS {
|
|||
src/code_809D148.o(.text);
|
||||
src/ground_script.o(.text);
|
||||
src/code_80A26CC.o(.text);
|
||||
asm/code_80A26CC_1.o(.text);
|
||||
src/ground_bg.o(.text);
|
||||
src/ground_map.o(.text);
|
||||
asm/ground_map_1.o(.text);
|
||||
src/ground_map_1.o(.text);
|
||||
|
|
@ -692,6 +692,8 @@ SECTIONS {
|
|||
data/data_8115F5C.o(.rodata);
|
||||
src/code_809A560.o(.rodata);
|
||||
data/data_8115F5C_2.o(.rodata);
|
||||
src/ground_bg.o(.rodata);
|
||||
data/data_8115F5C_2_1.o(.rodata);
|
||||
src/ground_sprite.o(.rodata);
|
||||
src/ground_sprite_data.o(.rodata);
|
||||
src/ground_sprite_monster.o(.rodata);
|
||||
|
|
|
|||
|
|
@ -75,9 +75,7 @@ void sub_802DC00(void)
|
|||
if (sUnknown_203B2FC != NULL) {
|
||||
if (sUnknown_203B2FC->monPortrait.faceFile != NULL)
|
||||
CloseFile(sUnknown_203B2FC->monPortrait.faceFile);
|
||||
|
||||
MemoryFree(sUnknown_203B2FC);
|
||||
sUnknown_203B2FC = NULL;
|
||||
FREE_AND_SET_NULL(sUnknown_203B2FC);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -315,11 +315,7 @@ void sub_809A83C(s16 param_1)
|
|||
temp->monPortrait.spriteId = 0;
|
||||
strcpy(gFormatBuffer_Monsters[param_1], sInvalidText);
|
||||
strcpy(gFormatBuffer_Names[param_1], sInvalidText);
|
||||
if(temp->faceFile)
|
||||
{
|
||||
CloseFile(temp->faceFile);
|
||||
temp->faceFile = NULL;
|
||||
}
|
||||
TRY_CLOSE_FILE_AND_SET_NULL(temp->faceFile);
|
||||
}
|
||||
|
||||
bool8 sub_809A8B8(s32 param_1, s32 param_2)
|
||||
|
|
@ -332,10 +328,7 @@ bool8 sub_809A8B8(s32 param_1, s32 param_2)
|
|||
u8 uVar9 = 1;
|
||||
u8 byte1 = 0;
|
||||
|
||||
if (unkPtr->faceFile != NULL) {
|
||||
CloseFile(unkPtr->faceFile);
|
||||
unkPtr->faceFile = NULL;
|
||||
}
|
||||
TRY_CLOSE_FILE_AND_SET_NULL(unkPtr->faceFile);
|
||||
|
||||
sub_80A7DDC(&local_28,&local_26);
|
||||
if (local_28 >= 10 && local_28 <= 29) {
|
||||
|
|
@ -509,10 +502,7 @@ bool8 sub_809AC7C(s32 a0_, s32 a1_, s32 a2_)
|
|||
u8 a2 = (u8) a2_;
|
||||
struct unkStruct_3001B64_sub *unkPtr = &gUnknown_3001B64->unk43C[a0];
|
||||
|
||||
if (unkPtr->faceFile != NULL) {
|
||||
CloseFile(unkPtr->faceFile);
|
||||
unkPtr->faceFile = NULL;
|
||||
}
|
||||
TRY_CLOSE_FILE_AND_SET_NULL(unkPtr->faceFile);
|
||||
|
||||
if (unkPtr->speciesID >= 0 && r5 != -1 && unkPtr->speciesID != 0) {
|
||||
if (a2 != 0x15) {
|
||||
|
|
|
|||
|
|
@ -462,3 +462,4 @@ UNUSED static const u8 *sub_80A2B28(u16 r0)
|
|||
{
|
||||
return sub_80A2B18(GetScriptVarValue(NULL, GROUND_PLACE));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,10 +224,7 @@ void CloseAllSpriteFiles(void)
|
|||
s32 i;
|
||||
|
||||
for (i = 0; i < MONSTER_MAX; i++) {
|
||||
if (gDungeon->sprites[i] != NULL) {
|
||||
CloseFile(gDungeon->sprites[i]);
|
||||
gDungeon->sprites[i] = NULL;
|
||||
}
|
||||
TRY_CLOSE_FILE_AND_SET_NULL(gDungeon->sprites[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -116,8 +116,7 @@ void DestroyFelicityBank(void)
|
|||
{
|
||||
if (sFelicityBankWork != NULL) {
|
||||
CloseFile(sFelicityBankWork->monPortrait.faceFile);
|
||||
MemoryFree(sFelicityBankWork);
|
||||
sFelicityBankWork = NULL;
|
||||
FREE_AND_SET_NULL(sFelicityBankWork);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
1457
src/ground_bg.c
Normal file
1457
src/ground_bg.c
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,6 +1,7 @@
|
|||
#include "global.h"
|
||||
#include "debug.h"
|
||||
#include "event_flag.h"
|
||||
#include "ground_bg.h"
|
||||
#include "ground_main.h"
|
||||
#include "ground_map.h"
|
||||
#include "ground_map_2.h"
|
||||
|
|
@ -8,7 +9,7 @@
|
|||
#include "memory.h"
|
||||
|
||||
IWRAM_INIT GroundMapAction *gGroundMapAction = {NULL};
|
||||
IWRAM_INIT unkStruct_3001B70 *gGroundMapDungeon_3001B70 = {NULL};
|
||||
IWRAM_INIT GroundBg *gGroundMapDungeon_3001B70 = {NULL};
|
||||
|
||||
extern GroundMapAction *gGroundMapAction;
|
||||
|
||||
|
|
@ -31,9 +32,8 @@ extern bool8 GroundScriptNotify(void *, s32);
|
|||
extern const CallbackData gGroundScriptNullCallbacks;
|
||||
extern const DebugLocation gUnknown_8117538[];
|
||||
|
||||
extern void sub_80A2D00(unkStruct_3001B70 *);
|
||||
extern void sub_80A2D68(unkStruct_3001B70 *);
|
||||
extern void sub_80A2D88(unkStruct_3001B70 *);
|
||||
extern void sub_80A2D68(GroundBg *);
|
||||
extern void sub_80A2D88(GroundBg *);
|
||||
|
||||
void AllocGroundMapAction(void)
|
||||
{
|
||||
|
|
@ -60,7 +60,7 @@ void GroundMap_Reset(void)
|
|||
ActionResetScriptData((Action *)gGroundMapAction, gUnknown_8117538);
|
||||
|
||||
if (gGroundMapDungeon_3001B70 != NULL) {
|
||||
sub_80A2D00(gGroundMapDungeon_3001B70);
|
||||
GroundBg_FreeAll(gGroundMapDungeon_3001B70);
|
||||
MemoryFree(gGroundMapDungeon_3001B70);
|
||||
gGroundMapDungeon_3001B70 = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "ground_bg.h"
|
||||
#include "ground_map.h"
|
||||
#include "ground_map_2.h"
|
||||
#include "ground_script.h"
|
||||
|
|
@ -9,8 +10,8 @@ extern DebugLocation gUnknown_8117770;
|
|||
extern s16 HandleAction(Action *action, DebugLocation *debug);
|
||||
extern void sub_80A4740(void *, s32, s32 *, u32);
|
||||
extern u32 sub_80A4720(void *, s32, s32 *);
|
||||
extern u8 sub_80A46C0(unkStruct_3001B70 *, u32, s32, s32);
|
||||
extern u8 sub_80A4660(unkStruct_3001B70 *, u32, s32, s32);
|
||||
extern u8 sub_80A46C0(GroundBg *, u32, s32, s32);
|
||||
extern u8 sub_80A4660(GroundBg *, u32, s32, s32);
|
||||
|
||||
u8 sub_80A5934(s32 param_1, s32 param_2, s32 param_3)
|
||||
{
|
||||
|
|
@ -42,9 +43,9 @@ void GroundMap_Action(void)
|
|||
}
|
||||
|
||||
extern u8 sub_809D248(PixelPos *r0);
|
||||
extern void sub_80A4580(unkStruct_3001B70 *, u32, PixelPos *);
|
||||
extern void sub_80A456C(unkStruct_3001B70 *, u32, const PixelPos *);
|
||||
extern void sub_80A4764(unkStruct_3001B70 *);
|
||||
extern void sub_80A4580(GroundBg *, u32, PixelPos *);
|
||||
extern void sub_80A456C(GroundBg *, u32, const PixelPos *);
|
||||
extern void sub_80A4764(GroundBg *);
|
||||
|
||||
extern GroundMapAction *gGroundMapAction;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,27 +2,26 @@
|
|||
#include "code_800558C.h"
|
||||
#include "debug.h"
|
||||
#include "event_flag.h"
|
||||
#include "ground_bg.h"
|
||||
#include "ground_map.h"
|
||||
#include "ground_map_2.h"
|
||||
#include "memory.h"
|
||||
|
||||
IWRAM_INIT unkStruct_3001B74 *gUnknown_3001B74 = {NULL};
|
||||
IWRAM_INIT unkStruct_3001B70 *gUnknown_3001B78 = {NULL};
|
||||
IWRAM_INIT GroundBg *gUnknown_3001B78 = {NULL};
|
||||
|
||||
extern const u8 gUnknown_8117784[];
|
||||
extern const SubStruct_52C gUnknown_8117784;
|
||||
extern const s16 gUnknown_811E5F4[][2];
|
||||
extern const u8 gGroundWeatherSelect[];
|
||||
extern const s32 gUnknown_81177BC[];
|
||||
|
||||
extern void sub_80A3BB0(unkStruct_3001B70 *, u32);
|
||||
extern void sub_80A2D00(unkStruct_3001B70 *);
|
||||
extern void sub_80A2B40(unkStruct_3001B70 *, const u8 *);
|
||||
extern void sub_80A2FBC(unkStruct_3001B70 *, u32);
|
||||
extern void sub_80A49E8(unkStruct_3001B70 *);
|
||||
extern void sub_80A456C(unkStruct_3001B70 *, u32, const s32 *);
|
||||
extern void sub_80A4580(unkStruct_3001B70 *, u32, s32 *);
|
||||
extern void sub_80A3BB0(GroundBg *, u32);
|
||||
extern void sub_80A2FBC(GroundBg *, u32);
|
||||
extern void sub_80A49E8(GroundBg *);
|
||||
extern void sub_80A456C(GroundBg *, u32, const s32 *);
|
||||
extern void sub_80A4580(GroundBg *, u32, s32 *);
|
||||
extern void sub_80A56C0(s32 *);
|
||||
extern void sub_80A4764(unkStruct_3001B70 *);
|
||||
extern void sub_80A4764(GroundBg *);
|
||||
|
||||
static void sub_80A62D0(void);
|
||||
|
||||
|
|
@ -56,14 +55,14 @@ void sub_80A5EDC(u8 param_1)
|
|||
gUnknown_3001B74->unk2 = param_1;
|
||||
|
||||
if (gUnknown_3001B78 != NULL) {
|
||||
sub_80A2D00(gUnknown_3001B78);
|
||||
GroundBg_FreeAll(gUnknown_3001B78);
|
||||
MemoryFree(gUnknown_3001B78);
|
||||
gUnknown_3001B78 = NULL;
|
||||
}
|
||||
|
||||
if (param_1) {
|
||||
gUnknown_3001B78 = MemoryAlloc(sizeof(unkStruct_3001B70), 6);
|
||||
sub_80A2B40(gUnknown_3001B78, gUnknown_8117784);
|
||||
gUnknown_3001B78 = MemoryAlloc(sizeof(GroundBg), 6);
|
||||
GroundBg_Init(gUnknown_3001B78, &gUnknown_8117784);
|
||||
sub_80A2FBC(gUnknown_3001B78, -1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,7 @@ void DestroyGulpinShop(void)
|
|||
{
|
||||
if (sGulpinShopWork != NULL) {
|
||||
CloseFile(sGulpinShopWork->monPortrait.faceFile);
|
||||
MemoryFree(sGulpinShopWork);
|
||||
sGulpinShopWork = NULL;
|
||||
FREE_AND_SET_NULL(sGulpinShopWork);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,8 +178,7 @@ void sub_801FD7C(void)
|
|||
{
|
||||
if (gUnknown_203B27C) {
|
||||
CloseFile(gUnknown_203B27C->monPortrait.faceFile);
|
||||
MemoryFree(gUnknown_203B27C);
|
||||
gUnknown_203B27C = NULL;
|
||||
FREE_AND_SET_NULL(gUnknown_203B27C);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -130,8 +130,7 @@ void DeleteKangaskhanStorage(void)
|
|||
{
|
||||
if (gKangaskhanStorageWork != NULL) {
|
||||
CloseFile(gKangaskhanStorageWork->monPortrait.faceFile);
|
||||
MemoryFree(gKangaskhanStorageWork);
|
||||
gKangaskhanStorageWork = NULL;
|
||||
FREE_AND_SET_NULL(gKangaskhanStorageWork);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -232,8 +232,7 @@ void DeleteKecleonBros(void)
|
|||
{
|
||||
if (sKecleonBrosWork1 != NULL) {
|
||||
CloseFile(sKecleonBrosWork1->monPortrait.faceFile);
|
||||
MemoryFree(sKecleonBrosWork1);
|
||||
sKecleonBrosWork1 = NULL;
|
||||
FREE_AND_SET_NULL(sKecleonBrosWork1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,8 +164,7 @@ void CleanLuminousCave(void)
|
|||
{
|
||||
if (sLuminousCaveWork != NULL) {
|
||||
CloseFile(sLuminousCaveWork->unk104);
|
||||
MemoryFree(sLuminousCaveWork);
|
||||
sLuminousCaveWork = NULL;
|
||||
FREE_AND_SET_NULL(sLuminousCaveWork);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,8 +136,7 @@ void MakuhitaDojo_Delete(void)
|
|||
{
|
||||
if (sMakuhitaDojoWork1 != NULL) {
|
||||
CloseFile(sMakuhitaDojoWork1->monPortrait.faceFile);
|
||||
MemoryFree(sMakuhitaDojoWork1);
|
||||
sMakuhitaDojoWork1 = NULL;
|
||||
FREE_AND_SET_NULL(sMakuhitaDojoWork1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ UNUSED static void MemoryCopy16(u16 *dest, u16 *src, s32 size)
|
|||
}
|
||||
}
|
||||
|
||||
void MemoryCopy32(u32 *dest, u32 *src, s32 size)
|
||||
void MemoryCopy32(u32 *dest, const u32 *src, s32 size)
|
||||
{
|
||||
while (size > 0) {
|
||||
size -= 4;
|
||||
|
|
|
|||
|
|
@ -158,12 +158,10 @@ u32 sub_802F298(void)
|
|||
|
||||
void sub_802F2C0(void)
|
||||
{
|
||||
if(gUnknown_203B310 != NULL)
|
||||
{
|
||||
if (gUnknown_203B310 != NULL) {
|
||||
if(gUnknown_203B310->monPortrait.faceFile != 0)
|
||||
CloseFile(gUnknown_203B310->monPortrait.faceFile);
|
||||
MemoryFree(gUnknown_203B310);
|
||||
gUnknown_203B310 = NULL;
|
||||
FREE_AND_SET_NULL(gUnknown_203B310);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ void CleanHelperPelipper(void)
|
|||
if (sPostOfficeHelper != NULL) {
|
||||
if (sPostOfficeHelper->monPortrait.faceFile != NULL)
|
||||
CloseFile(sPostOfficeHelper->monPortrait.faceFile);
|
||||
MemoryFree(sPostOfficeHelper);
|
||||
sPostOfficeHelper = NULL;
|
||||
FREE_AND_SET_NULL(sPostOfficeHelper);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,8 +131,7 @@ void FinishWriteSavePak(void)
|
|||
if (sSavePakWrite != NULL) {
|
||||
if (sSavePakWrite->monPortrait.faceFile != NULL)
|
||||
CloseFile(sSavePakWrite->monPortrait.faceFile);
|
||||
MemoryFree(sSavePakWrite);
|
||||
sSavePakWrite = NULL;
|
||||
FREE_AND_SET_NULL(sSavePakWrite);
|
||||
}
|
||||
sub_80993E4();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -406,11 +406,9 @@ u32 ThankYouMailPelipperCallback(void)
|
|||
|
||||
void CleanThankYouMailPelipper(void)
|
||||
{
|
||||
if(sUnknown_203B2C4 != NULL)
|
||||
{
|
||||
if (sUnknown_203B2C4 != NULL) {
|
||||
CloseFile(sUnknown_203B2C4->monPortrait.faceFile);
|
||||
MemoryFree(sUnknown_203B2C4);
|
||||
sUnknown_203B2C4 = NULL;
|
||||
FREE_AND_SET_NULL(sUnknown_203B2C4);
|
||||
sub_8030DE4();
|
||||
FreeItemDescriptionWindow();
|
||||
sub_803084C();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "unk_dungeon_load.h"
|
||||
#include "memory.h"
|
||||
#include "dungeon.h"
|
||||
#include "decompress_at.h"
|
||||
|
|
@ -15,7 +16,7 @@ extern const u8 gUnknown_8108EC0[];
|
|||
static s32 sub_80ADFB8(s32 a0, s32 a1, s32 a2, s32 a3, u16 *a4, s32 a5, u8 *a6, s32 a7);
|
||||
|
||||
// This function is called when loading a transition between a dungeon and its summit, where the player can continue, save, or go back.
|
||||
void sub_80ADD9C(OpenedFile **a0, OpenedFile **a1, u32 *a2, u32 *a3, u16 *a4, DungeonLocation *a5, s32 a6, s32 a7, s32 a8, u16 *a9)
|
||||
void sub_80ADD9C(OpenedFile **a0, OpenedFile **a1, u32 *a2, void *a3, u16 *a4, DungeonLocation *a5, s32 a6, s32 a7, s32 a8, u16 *a9, s32 unused)
|
||||
{
|
||||
OpenedFile *file;
|
||||
s32 r8;
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ void CleanWigglytuffShop(void)
|
|||
{
|
||||
if (sWigglytuffShop3Work) {
|
||||
CloseFile(sWigglytuffShop3Work->monPortrait.faceFile);
|
||||
MemoryFree(sWigglytuffShop3Work);
|
||||
sWigglytuffShop3Work = NULL;
|
||||
FREE_AND_SET_NULL(sWigglytuffShop3Work);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -399,8 +399,7 @@ void sub_80282FC(void)
|
|||
{
|
||||
if (sUnknown_203B2C0 != NULL) {
|
||||
CloseFile(sUnknown_203B2C0->monPortrait.faceFile);
|
||||
MemoryFree(sUnknown_203B2C0);
|
||||
sUnknown_203B2C0 = NULL;
|
||||
FREE_AND_SET_NULL(sUnknown_203B2C0);
|
||||
sub_8031E10();
|
||||
FriendList_Free();
|
||||
sub_803084C();
|
||||
|
|
|
|||
|
|
@ -128,11 +128,9 @@ u32 sub_802B358(void)
|
|||
|
||||
void sub_802B3B8(void)
|
||||
{
|
||||
if(sUnknown_203B2C8 != NULL)
|
||||
{
|
||||
if (sUnknown_203B2C8 != NULL) {
|
||||
CloseFile(sUnknown_203B2C8->monPortrait.faceFile);
|
||||
MemoryFree(sUnknown_203B2C8);
|
||||
sUnknown_203B2C8 = NULL;
|
||||
FREE_AND_SET_NULL(sUnknown_203B2C8);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -166,8 +166,7 @@ void sub_80310B4(void)
|
|||
sub_803084C();
|
||||
if (gUnknown_203B328 != NULL) {
|
||||
CloseFile(gUnknown_203B328->monPortrait.faceFile);
|
||||
MemoryFree(gUnknown_203B328);
|
||||
gUnknown_203B328 = NULL;
|
||||
FREE_AND_SET_NULL(gUnknown_203B328);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user