This commit is contained in:
petrie911
2023-10-16 08:54:41 -05:00
parent ff4ff9d2db
commit f97d418f5b
34 changed files with 17 additions and 7 deletions
+1
View File
@@ -14,5 +14,6 @@
"tools/gfxsotn/**": false,
},
"files.associations": {
"functions.h": "c"
},
}
+3 -1
View File
@@ -98,6 +98,8 @@ SPLAT ?= $(TOOLS)/splat/split.py
SPLAT_YAML ?= $(TARGET).$(VERSION).yaml
COMPTOOL := $(TOOLS)/comptool.py
COMPTOOL_DIR := baserom
MIO0 := $(TOOLS)/mio0
IINC := -Iinclude -Ibin/$(VERSION) -I.
@@ -218,7 +220,7 @@ endif
decompress: $(BASEROM)
@echo "Decompressing ROM..."
@$(PYTHON) $(COMPTOOL) -d $(BASEROM) $(BASEROM_UNCOMPRESSED)
@$(PYTHON) $(COMPTOOL) -de $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED)
extract:
$(RM) -r asm/$(VERSION) bin/$(VERSION)
+2 -1
View File
@@ -1,7 +1,8 @@
#ifndef GLOBAL_H
#define GLOBAL_H
#include "libultra/PR/ultratypes.h"
#include "PR/ultratypes.h"
#include "PR/mbi.h"
#include "functions.h"
#include "variables.h"
#include "macros.h"
+7 -2
View File
@@ -1,10 +1,15 @@
#include "common.h"
#include "global.h"
extern Gfx D_800D31B0[];
extern Gfx* D_80137E64;
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/B99D0/func_800B8DD0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/B99D0/func_800B8E14.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/B99D0/func_800B8F18.s")
void func_800B8F18(void) {
gSPDisplayList(D_80137E64++, D_800D31B0);
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/main/B99D0/func_800B8F48.s")
+4 -3
View File
@@ -4,6 +4,7 @@ import os
from subprocess import run
import struct
import argparse
import sys
def int32(x):
return x & 0xFFFFFFFF
@@ -173,8 +174,8 @@ def decompress(baserom, decomprom, mio0, extract_dest=None):
dec_msg = 'compressed'
v_file_size = len(file_bytes)
else:
print('You dun goofed')
exit
print('Invalid compression flag. This should be impossible, so please tell us if you get this error anyways.')
sys.exit(2)
decompfile.seek(0, 2)
@@ -186,7 +187,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None):
if not os.path.exists(extract_dest):
os.mkdir(extract_dest)
file_name = 'file_' + str(file_count)+'_'+format(v_file_begin, 'X') + '.bin'
file_name = 'segment_' + str(file_count)+'_'+format(v_file_begin, 'X') + '.bin'
with open(extract_dest + os.sep + file_name, 'wb') as extract_file:
extract_file.write(file_bytes)