mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
condensing some structs! :)
This commit is contained in:
parent
e78900aa0d
commit
bba92dd7d2
2
Makefile
2
Makefile
@ -54,7 +54,7 @@ CROSS := mips-linux-gnu-
|
||||
AS := $(CROSS)as
|
||||
OLD_AS := tools/mips-nintendo-nu64-as
|
||||
CC := tools/cc1
|
||||
CPP := cpp
|
||||
CPP ?= cpp
|
||||
LD := $(CROSS)ld
|
||||
OBJCOPY := $(CROSS)objcopy
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
glabel func_8004ADD0
|
||||
/* 261D0 8004ADD0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 261D4 8004ADD4 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 261D8 8004ADD8 0080802D */ daddu $s0, $a0, $zero
|
||||
/* 261DC 8004ADDC AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 261E0 8004ADE0 0C018250 */ jal osSetIntMask
|
||||
/* 261E4 8004ADE4 24040001 */ addiu $a0, $zero, 1
|
||||
/* 261E8 8004ADE8 3C018008 */ lui $at, %hi(D_80078174)
|
||||
/* 261EC 8004ADEC AC308174 */ sw $s0, %lo(D_80078174)($at)
|
||||
/* 261F0 8004ADF0 0C018250 */ jal osSetIntMask
|
||||
/* 261F4 8004ADF4 0040202D */ daddu $a0, $v0, $zero
|
||||
/* 261F8 8004ADF8 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 261FC 8004ADFC 8FB00010 */ lw $s0, 0x10($sp)
|
||||
/* 26200 8004AE00 03E00008 */ jr $ra
|
||||
/* 26204 8004AE04 27BD0018 */ addiu $sp, $sp, 0x18
|
@ -221,6 +221,7 @@ extern u32 gBattleMapFlags[MAX_MAPFLAGS];
|
||||
extern s32 D_8009A5D8;
|
||||
|
||||
extern u8 D_800779B0;
|
||||
extern u32 D_80078174;
|
||||
extern u8 D_800A0963;
|
||||
|
||||
// Scripts
|
||||
|
52
src/audio.h
52
src/audio.h
@ -9,12 +9,12 @@ typedef struct UnkAl1 {
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ s16 unk_08;
|
||||
/* 0x0A */ s16 unk_0A;
|
||||
/* 0x0C */ char unk_0C[4];
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
/* 0x10 */ s32 unk_10;
|
||||
/* 0x14 */ s32 unk_14;
|
||||
/* 0x18 */ s16 unk_18;
|
||||
/* 0x1A */ s16 unk_1A;
|
||||
} UnkAl1;
|
||||
} UnkAl1; // size unknown (currently 0x1C)
|
||||
|
||||
typedef struct UnkAl2 {
|
||||
/* 0x00 */ s16 unk_00;
|
||||
@ -72,7 +72,9 @@ typedef struct UnkAl6CC {
|
||||
/* 0x0BE */ u8 unk_BE;
|
||||
/* 0x0BF */ char unk_BF[0x1];
|
||||
/* 0x0C0 */ s8 unk_C0;
|
||||
/* 0x0C1 */ char unk_C1[0xA7];
|
||||
/* 0x0C1 */ char unk_C1[0xA2];
|
||||
/* 0x163 */ s8 unk_163;
|
||||
/* 0x164 */ s32 unk_164;
|
||||
/* 0x168 */ s32 unk_168;
|
||||
/* 0x16C */ char unk_16C[0x560];
|
||||
} UnkAl6CC;
|
||||
@ -87,14 +89,12 @@ typedef struct UnkAlA9C {
|
||||
/* 0x018 */ s32 unk_18;
|
||||
/* 0x01C */ s32 unk_1C;
|
||||
/* 0x020 */ char unk_20[0xC];
|
||||
/* 0x02C */ s32* unk_2C;
|
||||
/* 0x030 */ char unk_30[0x6];
|
||||
/* 0x036 */ s16 unk_36;
|
||||
/* 0x038 */ char unk_38[0xE];
|
||||
/* 0x046 */ s16 unk_46;
|
||||
/* 0x02C */ UnkAl1 unk_2C;
|
||||
/* 0x048 */ char unk_48[0x14];
|
||||
/* 0x05C */ s16 unk_5C;
|
||||
/* 0x05E */ char unk_5E[0xA3A];
|
||||
/* 0x05E */ char unk_5E[0x1C3];
|
||||
/* 0x221 */ u8 unk_221;
|
||||
/* 0x222 */ char unk_222[0x87A];
|
||||
} UnkAlA9C;
|
||||
|
||||
typedef struct UnkAl48 {
|
||||
@ -250,28 +250,6 @@ typedef struct UnkAl834 {
|
||||
/* 0x021 */ char unk_21[0x813];
|
||||
} UnkAl834;
|
||||
|
||||
// Probably some libultra audio thing
|
||||
typedef struct UnkStructFor80053A18 {
|
||||
/* 0x00 */ UNK_TYPE unk_00;
|
||||
/* 0x04 */ s32 unk_04;
|
||||
/* 0x08 */ char unk_08[2];
|
||||
/* 0x0A */ u16 unk_0A;
|
||||
/* 0x0C */ s32 unk_0C;
|
||||
} UnkStructFor80053A18; // size unknown
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ char unk_000[8];
|
||||
/* 0x008 */ s32 unk_008;
|
||||
/* 0x00C */ char unk_00C[4];
|
||||
/* 0x010 */ s32 unk_010;
|
||||
/* 0x014 */ char unk_014[8];
|
||||
/* 0x01C */ UNK_TYPE unk_01C;
|
||||
/* 0x020 */ char unk_020[0xC];
|
||||
/* 0x02C */ UnkStructFor80053A18 unk_02C;
|
||||
/* 0x03C */ char unk_03C[0x1E5];
|
||||
/* 0x221 */ u8 unk_221;
|
||||
} UnkStructFor8004DAA8; // size unknown
|
||||
|
||||
extern UnkAl0* D_80078E54;
|
||||
extern s8* D_80078181;
|
||||
extern s32* D_80078190;
|
||||
@ -301,17 +279,17 @@ void al_LoadBKHeaders(UnkAl19E0* arg0, ALHeap* arg1);
|
||||
|
||||
void func_8004B6D8(UnkAl6CC*, s32, s16, s16, u8);
|
||||
void func_8004B748(UnkAl6CC*);
|
||||
void func_8004BA54(UnkAl6CC* arg0, s32 arg1);
|
||||
void func_8004BA54(UnkAl6CC*, s32);
|
||||
void func_8004D510(UnkAlA9C*);
|
||||
void func_8004DAA8(UnkStructFor8004DAA8* arg0);
|
||||
s32 func_80050C30(u32 arg0);
|
||||
void func_8004DAA8(UnkAlA9C*);
|
||||
s32 func_80050C30(u32);
|
||||
void func_800532F4(UnkAl30*);
|
||||
void func_80053370(UnkAl12*);
|
||||
void func_800533A8(UnkAl2*);
|
||||
void func_80053654(UnkAl19E0*);
|
||||
void func_80053A18(UnkStructFor80053A18* arg0);
|
||||
void func_80053A18(UnkAl1*);
|
||||
void func_80053A28(s32);
|
||||
void func_80053A98(u8 arg0, u16 arg1, s32 arg2);
|
||||
void func_80053A98(u8, u16, s32);
|
||||
void func_80053BA8(UnkAl1*);
|
||||
void func_80054CE0(s32, s32);
|
||||
void func_8005610C(void);
|
||||
@ -327,7 +305,7 @@ void func_80057E5C(u8);
|
||||
void func_80057EB0(void);
|
||||
|
||||
void al_LoadINIT(UnkAl19E0*, s32, ALHeap*);
|
||||
s32 al_CopyFileTableEntry(u16 arg0, s32 arg1, s32* arg2);
|
||||
s32 al_CopyFileTableEntry(u16, s32, s32*);
|
||||
void al_LoadPER(UnkAl19E0*, s32*);
|
||||
void al_LoadPRG(UnkAl19E0*, s32*);
|
||||
void al_DmaCopy(s32, s32*, s32);
|
||||
|
@ -2,7 +2,12 @@
|
||||
|
||||
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004AB00);
|
||||
|
||||
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004ADD0);
|
||||
void func_8004ADD0(s32 arg0) {
|
||||
OSIntMask osIntMask = osSetIntMask(OS_IM_NONE);
|
||||
|
||||
D_80078174 = arg0;
|
||||
osSetIntMask(osIntMask);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "code_25f00_len_940", func_8004AE08);
|
||||
|
||||
|
@ -10,7 +10,7 @@ s32 func_8004DA0C(UNK_TYPE arg0) {
|
||||
s32 ret = 0;
|
||||
|
||||
if (arg0 != 0) {
|
||||
UnkStructFor8004DAA8* unknown;
|
||||
UnkAlA9C* unknown;
|
||||
|
||||
do {
|
||||
unknown = func_8004D794();
|
||||
@ -19,7 +19,7 @@ s32 func_8004DA0C(UNK_TYPE arg0) {
|
||||
do {
|
||||
if (unknown == NULL) {
|
||||
ret = 2;
|
||||
} else if (arg0 == unknown->unk_01C) {
|
||||
} else if (arg0 == unknown->unk_1C) {
|
||||
func_8004DAA8(unknown);
|
||||
ret = 0;
|
||||
}
|
||||
@ -33,12 +33,12 @@ s32 func_8004DA0C(UNK_TYPE arg0) {
|
||||
|
||||
INCLUDE_ASM(s32, "code_28910_len_5090", func_8004DA74);
|
||||
|
||||
void func_8004DAA8(UnkStructFor8004DAA8* arg0) {
|
||||
void func_8004DAA8(UnkAlA9C* arg0) {
|
||||
if (arg0->unk_221 != 0) {
|
||||
arg0->unk_221 = 4;
|
||||
arg0->unk_010 = 1;
|
||||
arg0->unk_008 = 1;
|
||||
func_80053A18(&arg0->unk_02C);
|
||||
arg0->unk_10 = 1;
|
||||
arg0->unk_08 = 1;
|
||||
func_80053A18(&arg0->unk_2C);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ void func_800533D0(void) {
|
||||
t1 = &D_80078DB0;
|
||||
if (t1[0] == 0) {
|
||||
temp_s0_2 = D_8009A5FC;
|
||||
if (temp_s0_2->unk_36 != 0) {
|
||||
if (temp_s0_2->unk_2C.unk_0A != 0) {
|
||||
func_8004E3A4(temp_s0_2);
|
||||
}
|
||||
if (temp_s0_2->unk_1C != 0) {
|
||||
@ -229,14 +229,14 @@ void func_800533D0(void) {
|
||||
func_8004DFD4(temp_s2);
|
||||
}
|
||||
temp_s0_3 = D_8009A664;
|
||||
if (temp_s0_3->unk_46 != 0) {
|
||||
if (temp_s0_3->unk_2C.unk_1A != 0) {
|
||||
func_80053BA8(&temp_s0_3->unk_2C);
|
||||
if (temp_s0_3->unk_36 == 0) {
|
||||
if (temp_s0_3->unk_2C.unk_0A == 0) {
|
||||
func_8004E444(temp_s0_3);
|
||||
} else {
|
||||
func_8004E3A4(temp_s0_3);
|
||||
}
|
||||
} else if (temp_s0_3->unk_36 != 0) {
|
||||
} else if (temp_s0_3->unk_2C.unk_0A != 0) {
|
||||
func_8004E3A4(temp_s0_3);
|
||||
}
|
||||
if (temp_s0_3->unk_1C != 0) {
|
||||
@ -347,9 +347,6 @@ void func_80053654(UnkAl19E0 *arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void func_80053888(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems good
|
||||
if (arg0->unk_45 != 0) {
|
||||
arg0->unk_1C = 0;
|
||||
@ -370,7 +367,7 @@ INCLUDE_ASM(s32, "code_2e230_len_2190", func_800538F8);
|
||||
|
||||
INCLUDE_ASM(s32, "code_2e230_len_2190", func_80053974);
|
||||
|
||||
void func_80053A18(UnkStructFor80053A18* arg0) {
|
||||
void func_80053A18(UnkAl1* arg0) {
|
||||
arg0->unk_0A = 0;
|
||||
arg0->unk_04 = 0;
|
||||
arg0->unk_0C = 0;
|
||||
|
@ -32,7 +32,7 @@ int main(int argc, const char **argv, const char **envp)
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
fprintf(stderr, "Yay0decompress [infile] [outfile]\n");
|
||||
fprintf(stderr, "Yay0compress [infile] [outfile]\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user