4 more and format

This commit is contained in:
Ethan Roseman 2020-12-12 17:55:21 +09:00
parent a124c54d79
commit 5ca6409423
12 changed files with 65 additions and 111 deletions

View File

@ -1,38 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80055F58
/* 31358 80055F58 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 3135C 80055F5C AFB00018 */ sw $s0, 0x18($sp)
/* 31360 80055F60 00A0802D */ daddu $s0, $a1, $zero
/* 31364 80055F64 AFB1001C */ sw $s1, 0x1c($sp)
/* 31368 80055F68 00C0882D */ daddu $s1, $a2, $zero
/* 3136C 80055F6C 27A50010 */ addiu $a1, $sp, 0x10
/* 31370 80055F70 27A60014 */ addiu $a2, $sp, 0x14
/* 31374 80055F74 AFBF0024 */ sw $ra, 0x24($sp)
/* 31378 80055F78 0C01573A */ jal func_80055CE8
/* 3137C 80055F7C AFB20020 */ sw $s2, 0x20($sp)
/* 31380 80055F80 0040902D */ daddu $s2, $v0, $zero
/* 31384 80055F84 1640000D */ bnez $s2, .L80055FBC
/* 31388 80055F88 0240102D */ daddu $v0, $s2, $zero
/* 3138C 80055F8C 2E220080 */ sltiu $v0, $s1, 0x80
/* 31390 80055F90 50400001 */ beql $v0, $zero, .L80055F98
/* 31394 80055F94 2411007F */ addiu $s1, $zero, 0x7f
.L80055F98:
/* 31398 80055F98 2E020010 */ sltiu $v0, $s0, 0x10
/* 3139C 80055F9C 50400001 */ beql $v0, $zero, .L80055FA4
/* 313A0 80055FA0 2410000F */ addiu $s0, $zero, 0xf
.L80055FA4:
/* 313A4 80055FA4 8FA40014 */ lw $a0, 0x14($sp)
/* 313A8 80055FA8 0200282D */ daddu $a1, $s0, $zero
/* 313AC 80055FAC 24060060 */ addiu $a2, $zero, 0x60
/* 313B0 80055FB0 0C01420F */ jal func_8005083C
/* 313B4 80055FB4 322700FF */ andi $a3, $s1, 0xff
/* 313B8 80055FB8 0240102D */ daddu $v0, $s2, $zero
.L80055FBC:
/* 313BC 80055FBC 8FBF0024 */ lw $ra, 0x24($sp)
/* 313C0 80055FC0 8FB20020 */ lw $s2, 0x20($sp)
/* 313C4 80055FC4 8FB1001C */ lw $s1, 0x1c($sp)
/* 313C8 80055FC8 8FB00018 */ lw $s0, 0x18($sp)
/* 313CC 80055FCC 03E00008 */ jr $ra
/* 313D0 80055FD0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80055FD4
/* 313D4 80055FD4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 313D8 80055FD8 AFBF0010 */ sw $ra, 0x10($sp)
/* 313DC 80055FDC 0C0157D6 */ jal func_80055F58
/* 313E0 80055FE0 0000302D */ daddu $a2, $zero, $zero
/* 313E4 80055FE4 8FBF0010 */ lw $ra, 0x10($sp)
/* 313E8 80055FE8 03E00008 */ jr $ra
/* 313EC 80055FEC 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80055FF0
/* 313F0 80055FF0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 313F4 80055FF4 AFBF0010 */ sw $ra, 0x10($sp)
/* 313F8 80055FF8 0C0157D6 */ jal func_80055F58
/* 313FC 80055FFC 2406003F */ addiu $a2, $zero, 0x3f
/* 31400 80056000 8FBF0010 */ lw $ra, 0x10($sp)
/* 31404 80056004 03E00008 */ jr $ra
/* 31408 80056008 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,11 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8005600C
/* 3140C 8005600C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 31410 80056010 AFBF0010 */ sw $ra, 0x10($sp)
/* 31414 80056014 0C0157D6 */ jal func_80055F58
/* 31418 80056018 2406007F */ addiu $a2, $zero, 0x7f
/* 3141C 8005601C 8FBF0010 */ lw $ra, 0x10($sp)
/* 31420 80056020 03E00008 */ jr $ra
/* 31424 80056024 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
COMPILER_OPTS="-std=gnu89 -Iinclude -Isrc -D_LANGUAGE_C -DSCRIPT(...)={}"

View File

@ -382,8 +382,8 @@ void func_8004E158(UnkAlA9C*, s32, s32, UnkAl19E0*);
void func_8004E3A4(UnkAlA9C*);
void func_8004E444(UnkAlA9C*);
s16 func_8004E4B8(UnkAlA9C*);
void func_80056068(s32, u8);
void func_800506C8(s32, s32);
s32 func_80056068(s32, u8);
s32 func_800506C8(s32, s32);
s32 func_80050C30(u32);
void func_800511BC(UnkAl834*);
@ -404,9 +404,11 @@ void func_80054CE0(s32, s32);
void func_8005610C(void);
void func_80055110(UnkAlA9C*);
void func_80056028(s32, u8);
void func_80056044(s32, u8);
void func_80056068(s32, u8);
s32 func_80055FF0(s32, s32);
s32 func_8005600C(s32, s32);
s32 func_80056028(s32, u8);
s32 func_80056044(s32, u8);
s32 func_80056068(s32, u8);
void func_8005608C(s32*, s32*);
void func_800560A8(void);
void func_8005610C(void);

View File

@ -186,7 +186,7 @@ INCLUDE_ASM(s32, "code_28910_len_5090", func_80050654);
INCLUDE_ASM(s32, "code_28910_len_5090", func_8005068C);
INCLUDE_ASM(void, "code_28910_len_5090", func_800506C8, s32 arg0, s32 arg1);
INCLUDE_ASM(s32, "code_28910_len_5090", func_800506C8, s32 arg0, s32 arg1);
INCLUDE_ASM(s32, "code_28910_len_5090", func_80050770);

View File

@ -368,24 +368,45 @@ s32* func_80055EB4(s32 arg0) {
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055EB4);
#endif
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055F58);
s32 func_80055F58(s32 arg0, u32 arg1, u32 arg2) {
s32* subroutine_arg4;
s32* subroutine_arg5;
s32 temp_s2 = func_80055CE8(arg0, &subroutine_arg4, &subroutine_arg5);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055FD4);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_80055FF0);
INCLUDE_ASM(s32, "code_303c0_len_3e10", func_8005600C);
void func_80056028(s32 arg0, u8 arg1) {
func_800506C8(arg0, arg1);
if (temp_s2 == 0) {
if (arg2 > 0x7F) {
arg2 = 0x7F;
}
if (arg1 > 0xF) {
arg1 = 0xF;
}
func_8005083C(subroutine_arg5, arg1, 0x60, (u8)arg2); // todo remove cast when func is defined
}
return temp_s2;
}
void func_80056044(s32 arg0, u8 arg1) {
func_800506C8(arg0, arg1 | 0x57000000);
s32 func_80055FD4(s32 arg0, s32 arg1) {
return func_80055F58(arg0, arg1, 0);
}
void func_80056068(s32 arg0, u8 arg1) {
func_800506C8(arg0, arg1 | 0x7F000000);
s32 func_80055FF0(s32 arg0, s32 arg1) {
return func_80055F58(arg0, arg1, 0x3F);
}
s32 func_8005600C(s32 arg0, s32 arg1) {
return func_80055F58(arg0, arg1, 0x7F);
}
s32 func_80056028(s32 arg0, u8 arg1) {
return func_800506C8(arg0, arg1);
}
s32 func_80056044(s32 arg0, u8 arg1) {
return func_800506C8(arg0, arg1 | 0x57000000);
}
s32 func_80056068(s32 arg0, u8 arg1) {
return func_800506C8(arg0, arg1 | 0x7F000000);
}
void func_8005608C(s32* arg0, s32* arg1) {

View File

@ -9,7 +9,8 @@ s8 D_80078E5C = 0;
s32 D_80078E60[] = { 0x7FFF7FFC, 0x7FF57FE8, 0x7FD77FC0, 0x7FA57F84, 0x7F5F7F34, 0x7F057ED0, 0x7E977E58, 0x7E157DCD,
0x7D7F7D2D, 0x7CD67C7A, 0x7C1A7BB4, 0x7B497ADA, 0x7A6679ED, 0x796F78ED, 0x786677DA, 0x774976B4, 0x761A757B,
0x74D87430, 0x738472D3, 0x721E7164, 0x70A66FE3, 0x6F1C6E51, 0x6D816CAD, 0x6BD56AF9, 0x6A186933, 0x684A675D,
0x666C6577, 0x647E6381, 0x6280617C, 0x60735F67, 0x5E575D43, 0x5C2C5B11, };
0x666C6577, 0x647E6381, 0x6280617C, 0x60735F67, 0x5E575D43, 0x5C2C5B11,
};
INCLUDE_ASM(s32, "code_31650", func_80056250);
@ -73,7 +74,8 @@ void func_80056F78(u8 arg0) {
al7C->unk_70 = 1;
}
INCLUDE_ASM(void, "code_31650", func_80056FA4, u8 arg0, u8 arg1, s32 arg2, f32 arg3, s16 arg4, u8 arg5, u8 arg6, s32 arg7);
INCLUDE_ASM(void, "code_31650", func_80056FA4, u8 arg0, u8 arg1, s32 arg2, f32 arg3, s16 arg4, u8 arg5, u8 arg6,
s32 arg7);
INCLUDE_ASM(void, "code_31650", func_80057224, u8 arg0, UnkAl30* arg1);