Split map data

This commit is contained in:
octorock
2021-10-28 23:14:39 +02:00
parent dbb3eb700e
commit 0f7d5fa29a
7 changed files with 25739 additions and 25 deletions
+2 -2
View File
@@ -61543,7 +61543,7 @@
"size": 17568
},
{
"path": "data_08132B30/gUnk_085A7320.bin",
"path": "data_08132B30/gPalette_549.bin",
"start": 5927712,
"size": 9344
},
@@ -62575,7 +62575,7 @@
{
"path": "data_08132B30/gUnk_086E8460.bin",
"start": 7242848,
"size": 1406624
"size": 161088
},
{
"path": "figurines/gFigurineGfx1.4bpp",
+19251
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+15 -13
View File
@@ -9,21 +9,23 @@ gMapData:: @ 08324AE4
.align 2
gGlobalGfxAndPalettes:: @ 085A2E80
.incbin "data_08132B30/gGlobalGfxAndPalettes.bin"
.include "data/gfx/gfx_and_palettes.s"
gUnk_085A7320:: @ 085A7320
.incbin "data_08132B30/gUnk_085A7320.bin"
gUnk_085A97A0:: @ 085A97A0
.incbin "data_08132B30/gUnk_085A97A0.bin"
@ .incbin "data_08132B30/gGlobalGfxAndPalettes.bin"
gUnk_085B4180:: @ 085B4180
.ifdef EU
@TODO differs to
.incbin "data_08132B30/gUnk_085B4180_EU.bin"
.else
.incbin "data_08132B30/gUnk_085B4180_1_USA-JP-DEMO_USA-DEMO_JP.bin"
.endif
@ gPalette_549:: @ 085A7320
@ .incbin "data_08132B30/gPalette_549.bin"
@ gUnk_085A97A0:: @ 085A97A0
@ .incbin "data_08132B30/gUnk_085A97A0.bin"
@ gUnk_085B4180:: @ 085B4180
@ .ifdef EU
@ @TODO differs to
@ .incbin "data_08132B30/gUnk_085B4180_EU.bin"
@ .else
@ .incbin "data_08132B30/gUnk_085B4180_1_USA-JP-DEMO_USA-DEMO_JP.bin"
@ .endif
+4 -4
View File
@@ -1724,10 +1724,10 @@ SECTIONS {
data/gfx/sprite_gfx.o(.rodata);
data/gfx/frame_obj_lists.o(.rodata);
data/gfx_08324AE4.o(.rodata);
data/gfx/figurine_pals.o(.rodata);
data/gfx_085BD620.o(.rodata);
data/gfx/figurine_gfx.o(.rodata);
data/gfx_808C2280.o(.rodata);
/* data/gfx/figurine_pals.o(.rodata);*/
/*data/gfx_085BD620.o(.rodata);*/
/*data/gfx/figurine_gfx.o(.rodata);*/
/*data/gfx_808C2280.o(.rodata);*/
data/strings.o(.rodata);
data/gfx/sprite_table.o(.rodata);
src/gba/m4a.o(.rodata);
+3 -3
View File
@@ -28,7 +28,7 @@ extern void* gUnk_0200B650;
extern u16 gUnk_020176E0[];
extern u8 gUnk_02017700[];
extern const u16 gUnk_085A7320[];
extern const u16 gPalette_549[];
void Manager10_Main(Manager10* this) {
if (!this->manager.action) {
@@ -85,12 +85,12 @@ void sub_08059690(Manager10* this) {
if (sub_08059844()) {
if (this->unk_20 == 0)
return;
sub_08059894(gUnk_085A7320, gUnk_085A7320 + 0xD0, this->unk_20);
sub_08059894(gPalette_549, gPalette_549 + 0xD0, this->unk_20);
this->unk_20--;
} else {
if (this->unk_20 > 0x1F)
return;
sub_08059894(gUnk_085A7320, gUnk_085A7320 + 0xD0, this->unk_20);
sub_08059894(gPalette_549, gPalette_549 + 0xD0, this->unk_20);
this->unk_20++;
}
}
+10 -3
View File
@@ -113,7 +113,7 @@ def extract_assets(variant, assets_folder):
extract_tileset(path)
elif mode == 'palette':
extract_palette(path)
elif mode == 'graphic':
elif mode == 'graphic' or mode == 'gfx':
extract_graphic(path, options)
elif mode == 'midi':
extract_midi(path, baserom_path, start, options)
@@ -143,6 +143,8 @@ def extract_assets(variant, assets_folder):
elif mode == 'entity_list':
entity_list = EntityList(path, start, size, options)
entity_list.extract_binary(baserom)
elif mode == 'unknown':
pass
elif mode != '':
print(f'Asset type {mode} not yet implemented')
@@ -167,8 +169,13 @@ def extract_palette(path):
run_gbagfx(path, base+'.pal', [])
def extract_graphic(path, options):
assert(path.endswith('.4bpp'))
base = path[0:-5]
if path.endswith('.4bpp'):
base = path[0:-5]
elif path.endswith('.4bpp.lz'):
base = path[0:-8]
else:
assert(False, f'Invalid graphic extension {path}')
params = []
for key in options:
params.append('-'+key)