From 776064322d3d67fc96519e9a4fa7267fd5cdebae Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 16 Nov 2019 13:04:12 +1000 Subject: [PATCH] Decompile func0f175f58, func0f175f68 and func0f175f78 --- ld/stage1.ld | 2 + src/game/game_175f50.c | 104 +++------------------------------ src/game/game_175f90.c | 85 +++++++++++++++++++++++++++ src/include/game/game_175f50.h | 7 +-- src/include/game/game_175f90.h | 10 ++++ 5 files changed, 109 insertions(+), 99 deletions(-) create mode 100644 src/game/game_175f90.c create mode 100644 src/include/game/game_175f90.h diff --git a/ld/stage1.ld b/ld/stage1.ld index fdece7ba8..43694e4cc 100644 --- a/ld/stage1.ld +++ b/ld/stage1.ld @@ -106,6 +106,7 @@ SECTIONS src/game/game_1668e0.o (.text); src/game/game_16cfa0.o (.text); src/game/game_175f50.o (.text); + src/game/game_175f90.o (.text); src/game/game_176080.o (.text); src/game/game_176d70.o (.text); src/game/game_187770.o (.text); @@ -190,6 +191,7 @@ SECTIONS src/game/game_1668e0.o (.rodata); src/game/game_16cfa0.o (.rodata); src/game/game_175f50.o (.rodata); + src/game/game_175f90.o (.rodata); src/game/game_176080.o (.rodata); src/game/game_176d70.o (.rodata); src/game/game_187770.o (.rodata); diff --git a/src/game/game_175f50.c b/src/game/game_175f50.c index e97b32b9f..ac0ed9c72 100644 --- a/src/game/game_175f50.c +++ b/src/game/game_175f50.c @@ -1,108 +1,22 @@ #include -#include "constants.h" -#include "gvars/gvars.h" -#include "setup/setup_000000.h" -#include "setup/setup_0160b0.h" -#include "setup/setup_020df0.h" #include "types.h" -#include "game/game_1668e0.h" -#include "game/game_175f50.h" -#include "library/library.h" - -const char var7f1b7c90[] = "Apr 6 2000 15:05:01"; -const char var7f1b7ca8[] = ""; -const char var7f1b7cac[] = ""; void func0f175f50(void) { // empty } -GLOBAL_ASM( -glabel func0f175f58 -/* f175f58: afa40000 */ sw $a0,0x0($sp) -/* f175f5c: afa50004 */ sw $a1,0x4($sp) -/* f175f60: 03e00008 */ jr $ra -/* f175f64: afa60008 */ sw $a2,0x8($sp) -/* f175f68: afa40000 */ sw $a0,0x0($sp) -/* f175f6c: afa50004 */ sw $a1,0x4($sp) -/* f175f70: 03e00008 */ jr $ra -/* f175f74: 00001025 */ or $v0,$zero,$zero -/* f175f78: afa40000 */ sw $a0,0x0($sp) -/* f175f7c: afa50004 */ sw $a1,0x4($sp) -/* f175f80: 03e00008 */ jr $ra -/* f175f84: afa60008 */ sw $a2,0x8($sp) -/* f175f88: 00000000 */ sll $zero,$zero,0x0 -/* f175f8c: 00000000 */ sll $zero,$zero,0x0 -); - -void func0f175f90(void) +void func0f175f58(s32 arg0, s32 arg1, s32 arg2) { // empty } -GLOBAL_ASM( -glabel func0f175f98 -/* f175f98: 27bdffe8 */ addiu $sp,$sp,-24 -/* f175f9c: afbf0014 */ sw $ra,0x14($sp) -/* f175fa0: 0fc59ccc */ jal func0f167330 -/* f175fa4: 00000000 */ sll $zero,$zero,0x0 -/* f175fa8: 0c00494a */ jal func00012528 -/* f175fac: 24040005 */ addiu $a0,$zero,0x5 -/* f175fb0: 0fc59cbc */ jal func0f1672f0 -/* f175fb4: 24040005 */ addiu $a0,$zero,0x5 -/* f175fb8: 8fbf0014 */ lw $ra,0x14($sp) -/* f175fbc: 27bd0018 */ addiu $sp,$sp,0x18 -/* f175fc0: 03e00008 */ jr $ra -/* f175fc4: 00000000 */ sll $zero,$zero,0x0 -); +bool func0f175f68(s32 arg0, s32 arg1) +{ + return false; +} -GLOBAL_ASM( -glabel func0f175fc8 -/* f175fc8: 27bdffe8 */ addiu $sp,$sp,-24 -/* f175fcc: afbf0014 */ sw $ra,0x14($sp) -/* f175fd0: 0c004965 */ jal func00012594 -/* f175fd4: 24040005 */ addiu $a0,$zero,0x5 -/* f175fd8: 0fc59cbc */ jal func0f1672f0 -/* f175fdc: 24040005 */ addiu $a0,$zero,0x5 -/* f175fe0: 8fbf0014 */ lw $ra,0x14($sp) -/* f175fe4: 27bd0018 */ addiu $sp,$sp,0x18 -/* f175fe8: 03e00008 */ jr $ra -/* f175fec: 00000000 */ sll $zero,$zero,0x0 -/* f175ff0: 3c027f1b */ lui $v0,%hi(var7f1b7c90) -/* f175ff4: 03e00008 */ jr $ra -/* f175ff8: 24427c90 */ addiu $v0,$v0,%lo(var7f1b7c90) -/* f175ffc: 00000000 */ sll $zero,$zero,0x0 -/* f176000: 03e00008 */ jr $ra -/* f176004: 00801025 */ or $v0,$a0,$zero -/* f176008: afa50004 */ sw $a1,0x4($sp) -/* f17600c: afa60008 */ sw $a2,0x8($sp) -/* f176010: afa7000c */ sw $a3,0xc($sp) -/* f176014: 03e00008 */ jr $ra -/* f176018: 00801025 */ or $v0,$a0,$zero -/* f17601c: afa50004 */ sw $a1,0x4($sp) -/* f176020: afa60008 */ sw $a2,0x8($sp) -/* f176024: afa7000c */ sw $a3,0xc($sp) -/* f176028: 03e00008 */ jr $ra -/* f17602c: 00801025 */ or $v0,$a0,$zero -/* f176030: afa50004 */ sw $a1,0x4($sp) -/* f176034: afa60008 */ sw $a2,0x8($sp) -/* f176038: afa7000c */ sw $a3,0xc($sp) -/* f17603c: 03e00008 */ jr $ra -/* f176040: 00801025 */ or $v0,$a0,$zero -/* f176044: afa50004 */ sw $a1,0x4($sp) -/* f176048: afa60008 */ sw $a2,0x8($sp) -/* f17604c: afa7000c */ sw $a3,0xc($sp) -/* f176050: 03e00008 */ jr $ra -/* f176054: 00801025 */ or $v0,$a0,$zero -/* f176058: 03e00008 */ jr $ra -/* f17605c: e7ac0000 */ swc1 $f12,0x0($sp) -/* f176060: afa50004 */ sw $a1,0x4($sp) -/* f176064: afa60008 */ sw $a2,0x8($sp) -/* f176068: afa7000c */ sw $a3,0xc($sp) -/* f17606c: 03e00008 */ jr $ra -/* f176070: 00801025 */ or $v0,$a0,$zero -/* f176074: 03e00008 */ jr $ra -/* f176078: 00000000 */ sll $zero,$zero,0x0 -/* f17607c: 00000000 */ sll $zero,$zero,0x0 -); +void func0f175f78(s32 arg0, s32 arg1, s32 arg2) +{ + // empty +} diff --git a/src/game/game_175f90.c b/src/game/game_175f90.c new file mode 100644 index 000000000..10967af1b --- /dev/null +++ b/src/game/game_175f90.c @@ -0,0 +1,85 @@ +#include +#include "constants.h" +#include "gvars/gvars.h" +#include "setup/setup_000000.h" +#include "setup/setup_0160b0.h" +#include "setup/setup_020df0.h" +#include "types.h" +#include "game/game_1668e0.h" +#include "game/game_175f50.h" +#include "library/library.h" + +const char var7f1b7c90[] = "Apr 6 2000 15:05:01"; +const char var7f1b7ca8[] = ""; +const char var7f1b7cac[] = ""; + +void func0f175f90(void) +{ + // empty +} + +GLOBAL_ASM( +glabel func0f175f98 +/* f175f98: 27bdffe8 */ addiu $sp,$sp,-24 +/* f175f9c: afbf0014 */ sw $ra,0x14($sp) +/* f175fa0: 0fc59ccc */ jal func0f167330 +/* f175fa4: 00000000 */ sll $zero,$zero,0x0 +/* f175fa8: 0c00494a */ jal func00012528 +/* f175fac: 24040005 */ addiu $a0,$zero,0x5 +/* f175fb0: 0fc59cbc */ jal func0f1672f0 +/* f175fb4: 24040005 */ addiu $a0,$zero,0x5 +/* f175fb8: 8fbf0014 */ lw $ra,0x14($sp) +/* f175fbc: 27bd0018 */ addiu $sp,$sp,0x18 +/* f175fc0: 03e00008 */ jr $ra +/* f175fc4: 00000000 */ sll $zero,$zero,0x0 +); + +GLOBAL_ASM( +glabel func0f175fc8 +/* f175fc8: 27bdffe8 */ addiu $sp,$sp,-24 +/* f175fcc: afbf0014 */ sw $ra,0x14($sp) +/* f175fd0: 0c004965 */ jal func00012594 +/* f175fd4: 24040005 */ addiu $a0,$zero,0x5 +/* f175fd8: 0fc59cbc */ jal func0f1672f0 +/* f175fdc: 24040005 */ addiu $a0,$zero,0x5 +/* f175fe0: 8fbf0014 */ lw $ra,0x14($sp) +/* f175fe4: 27bd0018 */ addiu $sp,$sp,0x18 +/* f175fe8: 03e00008 */ jr $ra +/* f175fec: 00000000 */ sll $zero,$zero,0x0 +/* f175ff0: 3c027f1b */ lui $v0,%hi(var7f1b7c90) +/* f175ff4: 03e00008 */ jr $ra +/* f175ff8: 24427c90 */ addiu $v0,$v0,%lo(var7f1b7c90) +/* f175ffc: 00000000 */ sll $zero,$zero,0x0 +/* f176000: 03e00008 */ jr $ra +/* f176004: 00801025 */ or $v0,$a0,$zero +/* f176008: afa50004 */ sw $a1,0x4($sp) +/* f17600c: afa60008 */ sw $a2,0x8($sp) +/* f176010: afa7000c */ sw $a3,0xc($sp) +/* f176014: 03e00008 */ jr $ra +/* f176018: 00801025 */ or $v0,$a0,$zero +/* f17601c: afa50004 */ sw $a1,0x4($sp) +/* f176020: afa60008 */ sw $a2,0x8($sp) +/* f176024: afa7000c */ sw $a3,0xc($sp) +/* f176028: 03e00008 */ jr $ra +/* f17602c: 00801025 */ or $v0,$a0,$zero +/* f176030: afa50004 */ sw $a1,0x4($sp) +/* f176034: afa60008 */ sw $a2,0x8($sp) +/* f176038: afa7000c */ sw $a3,0xc($sp) +/* f17603c: 03e00008 */ jr $ra +/* f176040: 00801025 */ or $v0,$a0,$zero +/* f176044: afa50004 */ sw $a1,0x4($sp) +/* f176048: afa60008 */ sw $a2,0x8($sp) +/* f17604c: afa7000c */ sw $a3,0xc($sp) +/* f176050: 03e00008 */ jr $ra +/* f176054: 00801025 */ or $v0,$a0,$zero +/* f176058: 03e00008 */ jr $ra +/* f17605c: e7ac0000 */ swc1 $f12,0x0($sp) +/* f176060: afa50004 */ sw $a1,0x4($sp) +/* f176064: afa60008 */ sw $a2,0x8($sp) +/* f176068: afa7000c */ sw $a3,0xc($sp) +/* f17606c: 03e00008 */ jr $ra +/* f176070: 00801025 */ or $v0,$a0,$zero +/* f176074: 03e00008 */ jr $ra +/* f176078: 00000000 */ sll $zero,$zero,0x0 +/* f17607c: 00000000 */ sll $zero,$zero,0x0 +); diff --git a/src/include/game/game_175f50.h b/src/include/game/game_175f50.h index 7246f1c74..29a2a46b1 100644 --- a/src/include/game/game_175f50.h +++ b/src/include/game/game_175f50.h @@ -4,9 +4,8 @@ #include "types.h" void func0f175f50(void); -u32 func0f175f58(void); -void func0f175f90(void); -u32 func0f175f98(void); -u32 func0f175fc8(void); +void func0f175f58(s32 arg0, s32 arg1, s32 arg2); +bool func0f175f68(s32 arg0, s32 arg1); +void func0f175f78(s32 arg0, s32 arg1, s32 arg2); #endif diff --git a/src/include/game/game_175f90.h b/src/include/game/game_175f90.h new file mode 100644 index 000000000..bdb80d1fd --- /dev/null +++ b/src/include/game/game_175f90.h @@ -0,0 +1,10 @@ +#ifndef IN_GAME_GAME_175F90_H +#define IN_GAME_GAME_175F90_H +#include +#include "types.h" + +void func0f175f90(void); +u32 func0f175f98(void); +u32 func0f175fc8(void); + +#endif