Decompile filesInit
This commit is contained in:
parent
044537c4e8
commit
4e35c03150
139
src/game/file.c
139
src/game/file.c
|
|
@ -4173,127 +4173,26 @@ const char var7f1b1d80nb[] = "DMA-Crash %s %d Ram: %02x%02x%02x%02x%02x%02x%02x%
|
|||
const char var7f1b1dd8nb[] = "ob.c";
|
||||
#endif
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
GLOBAL_ASM(
|
||||
glabel filesInit
|
||||
/* f166f74: 27bdffd0 */ addiu $sp,$sp,-48
|
||||
/* f166f78: afb20020 */ sw $s2,0x20($sp)
|
||||
/* f166f7c: afb1001c */ sw $s1,0x1c($sp)
|
||||
/* f166f80: afb40028 */ sw $s4,0x28($sp)
|
||||
/* f166f84: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f166f88: 3c11800a */ lui $s1,%hi(g_FileInfo)
|
||||
/* f166f8c: 3c128008 */ lui $s2,%hi(g_FileTable)
|
||||
/* f166f90: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f166f94: afb30024 */ sw $s3,0x24($sp)
|
||||
/* f166f98: 26522060 */ addiu $s2,$s2,%lo(g_FileTable)
|
||||
/* f166f9c: 26316680 */ addiu $s1,$s1,%lo(g_FileInfo)
|
||||
/* f166fa0: 24100001 */ addiu $s0,$zero,0x1
|
||||
/* f166fa4: 241407de */ addiu $s4,$zero,0x7e0
|
||||
/* f166fa8: 001070c0 */ sll $t6,$s0,0x3
|
||||
.L0f166fac:
|
||||
/* f166fac: 022e1021 */ addu $v0,$s1,$t6
|
||||
/* f166fb0: 00107880 */ sll $t7,$s0,0x2
|
||||
/* f166fb4: ac400000 */ sw $zero,0x0($v0)
|
||||
/* f166fb8: ac400004 */ sw $zero,0x4($v0)
|
||||
/* f166fbc: 0fc59b95 */ jal fileGetRomSizeByTableAddress
|
||||
/* f166fc0: 024f2021 */ addu $a0,$s2,$t7
|
||||
/* f166fc4: 26100001 */ addiu $s0,$s0,0x1
|
||||
/* f166fc8: 5614fff8 */ bnel $s0,$s4,.L0f166fac
|
||||
/* f166fcc: 001070c0 */ sll $t6,$s0,0x3
|
||||
/* f166fd0: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f166fd4: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* f166fd8: 8fb1001c */ lw $s1,0x1c($sp)
|
||||
/* f166fdc: 8fb20020 */ lw $s2,0x20($sp)
|
||||
/* f166fe0: 8fb30024 */ lw $s3,0x24($sp)
|
||||
/* f166fe4: 8fb40028 */ lw $s4,0x28($sp)
|
||||
/* f166fe8: 03e00008 */ jr $ra
|
||||
/* f166fec: 27bd0030 */ addiu $sp,$sp,0x30
|
||||
);
|
||||
#elif VERSION >= VERSION_NTSC_1_0
|
||||
GLOBAL_ASM(
|
||||
glabel filesInit
|
||||
/* f166f74: 27bdffd0 */ addiu $sp,$sp,-48
|
||||
/* f166f78: afb20020 */ sw $s2,0x20($sp)
|
||||
/* f166f7c: afb1001c */ sw $s1,0x1c($sp)
|
||||
/* f166f80: afb40028 */ sw $s4,0x28($sp)
|
||||
/* f166f84: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f166f88: 3c11800a */ lui $s1,%hi(g_FileInfo)
|
||||
/* f166f8c: 3c128008 */ lui $s2,%hi(g_FileTable)
|
||||
/* f166f90: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f166f94: afb30024 */ sw $s3,0x24($sp)
|
||||
/* f166f98: 26522060 */ addiu $s2,$s2,%lo(g_FileTable)
|
||||
/* f166f9c: 26316680 */ addiu $s1,$s1,%lo(g_FileInfo)
|
||||
/* f166fa0: 24100001 */ addiu $s0,$zero,0x1
|
||||
/* f166fa4: 241407de */ addiu $s4,$zero,0x7de
|
||||
/* f166fa8: 001070c0 */ sll $t6,$s0,0x3
|
||||
.L0f166fac:
|
||||
/* f166fac: 022e1021 */ addu $v0,$s1,$t6
|
||||
/* f166fb0: 00107880 */ sll $t7,$s0,0x2
|
||||
/* f166fb4: ac400000 */ sw $zero,0x0($v0)
|
||||
/* f166fb8: ac400004 */ sw $zero,0x4($v0)
|
||||
/* f166fbc: 0fc59b95 */ jal fileGetRomSizeByTableAddress
|
||||
/* f166fc0: 024f2021 */ addu $a0,$s2,$t7
|
||||
/* f166fc4: 26100001 */ addiu $s0,$s0,0x1
|
||||
/* f166fc8: 5614fff8 */ bnel $s0,$s4,.L0f166fac
|
||||
/* f166fcc: 001070c0 */ sll $t6,$s0,0x3
|
||||
/* f166fd0: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f166fd4: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* f166fd8: 8fb1001c */ lw $s1,0x1c($sp)
|
||||
/* f166fdc: 8fb20020 */ lw $s2,0x20($sp)
|
||||
/* f166fe0: 8fb30024 */ lw $s3,0x24($sp)
|
||||
/* f166fe4: 8fb40028 */ lw $s4,0x28($sp)
|
||||
/* f166fe8: 03e00008 */ jr $ra
|
||||
/* f166fec: 27bd0030 */ addiu $sp,$sp,0x30
|
||||
);
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
glabel filesInit
|
||||
/* f166f74: 27bdffd0 */ addiu $sp,$sp,-48
|
||||
/* f166f78: afb20020 */ sw $s2,0x20($sp)
|
||||
/* f166f7c: afb1001c */ sw $s1,0x1c($sp)
|
||||
/* f166f80: afb40028 */ sw $s4,0x28($sp)
|
||||
/* f166f84: afb00018 */ sw $s0,0x18($sp)
|
||||
/* f166f88: 3c11800a */ lui $s1,%hi(g_FileInfo)
|
||||
/* f166f8c: 3c128008 */ lui $s2,%hi(g_FileTable)
|
||||
/* f166f90: afbf002c */ sw $ra,0x2c($sp)
|
||||
/* f166f94: afb30024 */ sw $s3,0x24($sp)
|
||||
/* f166f98: 26522060 */ addiu $s2,$s2,%lo(g_FileTable)
|
||||
/* f166f9c: 26316680 */ addiu $s1,$s1,%lo(g_FileInfo)
|
||||
/* f166fa0: 24100001 */ addiu $s0,$zero,0x1
|
||||
/* f166fa4: 241407de */ addiu $s4,$zero,0x7dd
|
||||
/* f166fa8: 001070c0 */ sll $t6,$s0,0x3
|
||||
.L0f166fac:
|
||||
/* f166fac: 022e1021 */ addu $v0,$s1,$t6
|
||||
/* f166fb0: 00107880 */ sll $t7,$s0,0x2
|
||||
/* f166fb4: ac400000 */ sw $zero,0x0($v0)
|
||||
/* f166fb8: ac400004 */ sw $zero,0x4($v0)
|
||||
/* f166fbc: 0fc59b95 */ jal fileGetRomSizeByTableAddress
|
||||
/* f166fc0: 024f2021 */ addu $a0,$s2,$t7
|
||||
/* f166fc4: 26100001 */ addiu $s0,$s0,0x1
|
||||
/* f166fc8: 5614fff8 */ bnel $s0,$s4,.L0f166fac
|
||||
/* f166fcc: 001070c0 */ sll $t6,$s0,0x3
|
||||
/* f166fd0: 8fbf002c */ lw $ra,0x2c($sp)
|
||||
/* f166fd4: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* f166fd8: 8fb1001c */ lw $s1,0x1c($sp)
|
||||
/* f166fdc: 8fb20020 */ lw $s2,0x20($sp)
|
||||
/* f166fe0: 8fb30024 */ lw $s3,0x24($sp)
|
||||
/* f166fe4: 8fb40028 */ lw $s4,0x28($sp)
|
||||
/* f166fe8: 03e00008 */ jr $ra
|
||||
/* f166fec: 27bd0030 */ addiu $sp,$sp,0x30
|
||||
);
|
||||
#endif
|
||||
void filesInit(void)
|
||||
{
|
||||
s32 i;
|
||||
s32 j = 0;
|
||||
|
||||
//void filesInit(void)
|
||||
//{
|
||||
// s32 i;
|
||||
//
|
||||
// for (i = 1; i < NUM_FILES; i++) {
|
||||
// g_FileInfo[i].loadedsize = 0;
|
||||
// g_FileInfo[i].allocsize = 0;
|
||||
//
|
||||
// fileGetRomSizeByTableAddress(&g_FileTable[i]);
|
||||
// }
|
||||
//}
|
||||
for (i = 1, j = 0; i < NUM_FILES; i++) {
|
||||
struct fileinfo *info = g_FileInfo + i;
|
||||
j = i;
|
||||
|
||||
info->loadedsize = 0;
|
||||
info->allocsize = 0;
|
||||
|
||||
fileGetRomSizeByTableAddress((u32 *)(g_FileTable + i));
|
||||
|
||||
if (g_FileTable);
|
||||
if (g_FileInfo);
|
||||
}
|
||||
|
||||
if (j);
|
||||
}
|
||||
|
||||
void fileLoadPartToAddr(u16 filenum, void *memaddr, s32 offset, u32 len)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2952,7 +2952,6 @@
|
|||
#define NUM_CHEATS 42
|
||||
#define NUM_CYCLEABLE_WEAPONS 45
|
||||
#define NUM_EXPLOSIONTYPES 26
|
||||
#define NUM_FILES (VERSION == VERSION_JPN_FINAL ? 2016 : 2014)
|
||||
#define NUM_FIRESLOTS 20
|
||||
#define NUM_MPBEAUHEADS 5
|
||||
#define NUM_MPBOTCOMMANDS 14
|
||||
|
|
|
|||
|
|
@ -2013,3 +2013,11 @@
|
|||
#define FILE_ASAUCEREXP1M 0x07dd
|
||||
#define FILE_PJPNLOGO 0x07de
|
||||
#define FILE_PJPNPD 0x07df
|
||||
|
||||
#if VERSION >= VERSION_JPN_FINAL
|
||||
#define NUM_FILES 2016
|
||||
#elif VERSION >= VERSION_NTSC_1_0
|
||||
#define NUM_FILES 2014
|
||||
#else
|
||||
#define NUM_FILES 2013
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue