Assorted, unrelated matches (#267)

* Assorted matches

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-11-01 17:07:35 -04:00
committed by GitHub
parent 1483ddaa03
commit 4647cdcd7e
34 changed files with 1877 additions and 3697 deletions
+95 -125
View File
@@ -757,10 +757,10 @@ void func_80029200(Player *player, s8 arg1) {
}
#ifdef MIPS_TO_C
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
//generated by m2c commit 0927f17aac197848d4ebdf0c6bbad74b01f0851c
static f32 D_800DDBD4[8] = { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f };
void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
void func_8002934C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
f32 sp50;
f32 sp28;
void *sp24;
@@ -798,8 +798,8 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
void *temp_a3;
temp_a3 = player + (arg2 * 2);
temp_a3->unk48 = atan2s(player->pos[0] - arg1->unk0, player->pos[2] - arg1->unk8);
player->unk_244[arg2] = (u16) ((s32) ((player->unk_02E + (s16) temp_a3->unk48 + player->unk_0C0) & 0xFFFF) / 128);
player->unk_048[arg2] = atan2s(player->pos[0] - camera->pos[0], player->pos[2] - camera->pos[2]);
player->unk_244[arg2] = (u16) ((s32) ((player->unk_02C[1] + player->unk_048[arg2] + player->unk_0C0) & 0xFFFF) / 128);
temp_v1 = player->unk_0BC;
temp_f0 = player->unk_230 - player->unk_23C;
temp_f2 = D_800DDBD4[player->characterId] * 18.0f * player->unk_224;
@@ -835,7 +835,7 @@ void func_8002934C(Player *player, struct Camera *arg1, s8 arg2, s8 arg3) {
}
sp24 = temp_a3;
func_80029200(player, arg2);
temp_a0 = (player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
temp_a0 = (player->unk_02C[1] + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
sp20 = temp_a0;
sp28 = sins((u16) temp_a0);
move_s16_towards(temp_a3 + 0x50, (s16) (s32) ((coss((u16) temp_a0) * (f32) temp_a3->unkCC) + ((f32) temp_a3->unkD4 * sp28)), 0.5f);
@@ -868,7 +868,7 @@ block_28:
if (((player->unk_0BC & 8) == 8) && ((player->unk_0CA & 2) == 2)) {
temp_a3->unk50 = 0;
}
temp_t9 = (player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
temp_t9 = (player->unk_02C[1] + temp_a3->unk48 + player->unk_0C0) & 0xFFFF;
if (((player->unk_0BC & 0x80) == 0x80) || ((player->unk_0BC & 0x40) == 0x40) || ((player->unk_0BC & 0x80000) == 0x80000) || ((player->unk_0BC & 0x800000) == 0x800000) || ((player->unk_0BC & 0x20000) == 0x20000) || (player->unk_044 & 0x800)) {
if (temp_t9 >= 0x7FF9) {
temp_t6 = ((s32) (-temp_t9 & 0xFFFF) / var_a1) & 0xFFFF;
@@ -902,7 +902,7 @@ block_28:
if (((temp_v1_5 & 0x80000) == 0x80000) || ((temp_v1_5 & 0x800000) == 0x800000) || (player->unk_044 & 0x800)) {
temp_a3->unk24C = 4U;
}
if (((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x01000000) == 0x01000000) || ((player->unk_0BC & 0x02000000) == 0x02000000) || ((player->unk_0BC << 0xF) < 0) || (player->unk_0BC & 0x80) || (player->unk_0BC & 0x40)) {
if (((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x01000000) == 0x01000000) || ((player->unk_0BC & 0x02000000) == 0x02000000) || (player->unk_0BC & 0x10000) || (player->unk_0BC & 0x80) || (player->unk_0BC & 0x40)) {
var_a2 = 1 << temp_t3;
player->unk_002 |= var_a2;
temp_t9_2 = arg3 * 2;
@@ -935,7 +935,6 @@ block_28:
player->unk_002 |= var_a2;
}
}
/* Warning: struct Camera is not defined (only forward-declared) */
#else
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002934C.s")
#endif
@@ -5551,140 +5550,119 @@ void func_80036C5C(Player *arg0) {
}
}
#ifdef MIPS_TO_C
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
void func_80036CB4(Player *player) {
s32 var_v0;
s32 var_v0_2;
s32 var_v1;
s32 test;
var_v0 = player->unk_0BC;
var_v1 = var_v0 & 0x10;
if ((var_v1 == 0x10) && ((player->unk_000 & 0x4000) == 0x4000)) {
var_v0_2 = (s16) player->unk_0C0 / 182;
if (var_v0_2 > 0) {
var_v0_2 = (s16) player->unk_0C0 / 182;
player->unk_07C = (((s32) ((((s32) player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) + 0x28) << 0x10;
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_000 & 0x4000) == 0x4000)) {
if ((player->unk_0C0 / 182) > 0) {
test = ((((player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) + 0x28;
player->unk_07C = test << 0x10;
}
if (var_v0_2 < 0) {
player->unk_07C = (((s32) ((((s32) player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) - 0x35) << 0x10;
if ((player->unk_0C0 / 182) < 0) {
test = ((((player->unk_07C >> 0x10) * 0xD) + 0x2B1) / 106) - 0x35;
player->unk_07C = test << 0x10;
}
var_v0 = player->unk_0BC & ~0x10;
player->unk_0BC = var_v0;
var_v1 = var_v0 & 0x10;
player->unk_0BC &= ~0x10;
}
if ((var_v1 == 0x10) && ((player->unk_000 & 0x4000) != 0x4000)) {
player->unk_0BC = var_v0 & ~0x10;
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_000 & 0x4000) != 0x4000)) {
player->unk_0BC &= ~0x10;
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036CB4.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
void func_80036DB4(Player *player, f32 *arg1, f32 *arg2) {
#ifdef NEEDS_RODATA
// data_0DD0A0_3_0_0.s
extern f64 D_800EDD90;// = 0.02;
extern f64 D_800EDD98;// = 0.01;
extern f64 D_800EDDA0;// = 0.05;
extern f64 D_800EDDA8;// = 0.1;
extern f64 D_800EDDB0;// = 0.15;
extern f64 D_800EDDB8;// = 0.1;
extern f64 D_800EDDC0;// = 0.05;
void func_80036DB4(Player *player, Vec3f arg1, Vec3f arg2) {
s16 thing;
s16 stackPadding0;
f32 sp20;
f32 var_f14;
f32 var_f18;
f32 var_f2;
f64 var_f10;
s16 var_v0;
s32 temp_a0;
s32 temp_t0;
s32 temp_t6;
temp_t0 = player->unk_0BC;
if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) {
arg1->unk0 = 0.0f;
arg1->unk4 = 0.0f;
arg1->unk8 = 0.0f;
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
if (((player->unk_0BC & 0x1000) == 0x1000) || ((player->unk_0BC & 0x20) == 0x20)) {
arg1[0] = 0.0f;
arg1[1] = 0.0f;
arg1[2] = 0.0f;
func_802B63B8(arg1, player->unk_174);
} else {
temp_a0 = temp_t0 & 0x10;
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
var_f14 = -player->unk_20C;
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f18 = player->unk_208 + (var_f2 * 3.0f) + (var_f14 * 10.0f);
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 10.0f);
sp20 = player->unk_084 * 3.0f;
} else if (!(temp_t0 & 0x800) && !(player->unk_044 & 0x4000)) {
var_v0 = player->unk_0FA;
if (var_v0 > 0) {
var_v0 *= -1;
} else if (!(player->unk_0BC & 0x800) && !(player->unk_044 & 0x4000)) {
thing = player->unk_0FA;
if (thing > 0) {
thing *= -1;
}
temp_t6 = (s32) player->unk_07C >> 0x10;
temp_t6 = player->unk_07C >> 0x10;
if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) {
if (var_v0 < 0x14) {
var_f14 = -player->unk_20C;
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f10 = (f64) (player->unk_208 + (var_f2 / 3.0f)) + ((f64) -player->unk_09C * 0.02) + (f64) (var_f14 * 50.0f);
goto block_16;
if (thing < 0x14) {
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + (-player->unk_09C * 0.02) + (-player->unk_20C * 50.0f);
} else {
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + ((temp_t6 * 0.01) + (-player->unk_09C * 0.05)) + (-player->unk_20C * 50.0f);
}
var_f14 = -player->unk_20C;
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f18 = (f32) ((f64) (player->unk_208 + (var_f2 / 3.0f)) + (((f64) temp_t6 * 0.01) + ((f64) -player->unk_09C * 0.05)) + (f64) (var_f14 * 50.0f));
} else {
var_f14 = -player->unk_20C;
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f10 = (f64) (player->unk_208 + (var_f2 / 3.0f)) + (((f64) temp_t6 * 0.1) + ((f64) -player->unk_09C * 0.15)) + (f64) (var_f14 * 50.0f);
block_16:
var_f18 = (f32) var_f10;
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + ((temp_t6 * 0.1) + (-player->unk_09C * 0.15)) + (-player->unk_20C * 50.0f);
}
sp20 = player->unk_084;
} else {
var_f14 = -player->unk_20C;
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 1.5) + (((player->unk_07C >> 0x10) * 0.1) + (-player->unk_09C * 0.05)) + (-player->unk_20C * 50.0f);
sp20 = player->unk_084;
var_f18 = (f32) ((f64) player->unk_208 + ((f64) var_f2 * 1.5) + (((f64) ((s32) player->unk_07C >> 0x10) * 0.1) + ((f64) -player->unk_09C * 0.05)) + (f64) (var_f14 * 50.0f));
}
if ((temp_t0 & 0x200) == 0x200) {
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
var_f18 = player->unk_208 + (var_f2 * 3.0f) + (var_f14 * 10.0f);
if ((player->unk_0BC & 0x200) == 0x200) {
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 10.0f);
sp20 = player->unk_084 * 3.0f;
} else {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f);
sp20 = player->unk_084;
var_f18 = player->unk_208 + (var_f2 / 3.0f);
}
}
arg1->unk4 = 0.0f;
arg1->unk0 = (player->unk_090 + var_f18) * player->unk_094;
arg1->unk8 = (f32) (player->unk_094 * sp20);
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
arg1[0] = (player->unk_090 + var_f18) * player->unk_094;
arg1[1] = 0.0f;
arg1[2] = player->unk_094 * sp20;
func_802B63B8(arg1, player->unk_174);
}
arg2->unk0 = arg1->unk0;
arg2->unk4 = (f32) arg1->unk4;
arg2->unk8 = (f32) arg1->unk8;
arg2[0] = arg1[0];
arg2[1] = arg1[1];
arg2[2] = arg1[2];
}
#else
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036DB4.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
#ifdef NEEDS_RODATA
// data_0DD0A0_3_0_0.s
extern f64 D_800EDDC8;// = 0.02;
extern f64 D_800EDDD0;// = 0.01;
extern f64 D_800EDDD8;// = 0.05;
extern f64 D_800EDDE0;// = 0.1;
extern f64 D_800EDDE8;// = 0.15;
extern f64 D_800EDDF0;// = 0.1;
extern f64 D_800EDDF8;// = 0.05;
void func_800371F4(Player *player, f32 *arg1, f32 *arg2) {
f32 sp20;
f32 var_f14;
f32 var_f18;
f32 var_f2;
s16 var_v0;
s32 temp_a0;
s32 temp_t0;
f32 sp20;
f32 var_f18;
s32 temp_t6;
temp_t0 = player->unk_0BC;
if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) {
arg1->unk0 = 0.0f;
arg1->unk4 = 0.0f;
arg1->unk8 = 0.0f;
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
if (((player->unk_0BC & 0x1000) == 0x1000) || ((player->unk_0BC & 0x20) == 0x20)) {
arg1[0] = 0.0f;
arg1[1] = 0.0f;
arg1[2] = 0.0f;
func_802B63B8(arg1, player->unk_174);
} else {
temp_a0 = temp_t0 & 0x10;
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f14 = -player->unk_20C * 50.0f;
var_f18 = player->unk_208 + (var_f2 * 3.0f) + var_f14;
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 50.0f);
sp20 = player->unk_084 * 3.0f;
} else if (!(temp_t0 & 0x800) && !(player->unk_044 & 0x4000)) {
} else if (!(player->unk_0BC & 0x800) && !(player->unk_044 & 0x4000)) {
var_v0 = player->unk_0FA;
if (var_v0 > 0) {
var_v0 *= -1;
@@ -5692,43 +5670,35 @@ void func_800371F4(Player *player, f32 *arg1, f32 *arg2) {
temp_t6 = (s32) player->unk_07C >> 0x10;
if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) {
if (var_v0 < 0x14) {
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f14 = -player->unk_20C * 50.0f;
var_f18 = (f32) ((f64) (player->unk_208 + (var_f2 / 3.0f)) + ((f64) -player->unk_09C * 0.02) + (f64) var_f14);
var_f18 = (player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) + (-player->unk_09C * 0.02) + (-player->unk_20C * 50.0f);
} else {
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f14 = -player->unk_20C * 50.0f;
var_f18 = (f32) (((f64) (player->unk_208 + (var_f2 / 3.0f)) - (((f64) temp_t6 * 0.01) + ((f64) player->unk_09C * 0.05))) + (f64) var_f14);
var_f18 = ((player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) - ((temp_t6 * 0.01) + (player->unk_09C * 0.05))) + (-player->unk_20C * 50.0f);
}
} else {
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f14 = -player->unk_20C * 50.0f;
var_f18 = (f32) (((f64) (player->unk_208 + (var_f2 / 3.0f)) - (((f64) temp_t6 * 0.1) + ((f64) player->unk_09C * 0.15))) + (f64) var_f14);
var_f18 = ((player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f)) - ((temp_t6 * 0.1) + (player->unk_09C * 0.15))) + (-player->unk_20C * 50.0f);
}
sp20 = player->unk_084;
} else {
var_f2 = -(player->unk_094 / 18.0f) * 216.0f;
var_f14 = -player->unk_20C * 50.0f;
var_f18 = ((player->unk_208 + ((f64) (-(player->unk_094 / 18.0f) * 216.0f) * 1.5)) - (((player->unk_07C >> 0x10) * 0.1) + (player->unk_09C * 0.05))) + (-player->unk_20C * 50.0f);
sp20 = player->unk_084;
var_f18 = (f32) ((((f64) player->unk_208 + ((f64) var_f2 * 1.5)) - (((f64) ((s32) player->unk_07C >> 0x10) * 0.1) + ((f64) player->unk_09C * 0.05))) + (f64) var_f14);
}
if ((temp_t0 & 0x200) == 0x200) {
if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) {
var_f18 = player->unk_208 + (var_f2 * 3.0f) + var_f14;
if ((player->unk_0BC & 0x200) == 0x200) {
if (((player->unk_0BC & 0x10) == 0x10) && ((player->unk_0BC & 2) != 2)) {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) * 3.0f) + (-player->unk_20C * 50.0f);
sp20 = player->unk_084 * 3.0f;
} else {
var_f18 = player->unk_208 + ((-(player->unk_094 / 18.0f) * 216.0f) / 3.0f);
sp20 = player->unk_084;
var_f18 = player->unk_208 + (var_f2 / 3.0f);
}
}
arg1->unk4 = 0.0f;
arg1->unk0 = -(player->unk_090 + var_f18) * player->unk_094;
arg1->unk8 = (f32) (player->unk_094 * sp20);
func_802B63B8(arg1, (f32 (*)[3]) player->unk_174[0]);
arg1[0] = -(player->unk_090 + var_f18) * player->unk_094;
arg1[1] = 0.0f;
arg1[2] = player->unk_094 * sp20;
func_802B63B8(arg1, player->unk_174);
}
arg2->unk0 = arg1->unk0;
arg2->unk4 = (f32) arg1->unk4;
arg2->unk8 = (f32) arg1->unk8;
arg2[0] = arg1[0];
arg2[1] = arg1[1];
arg2[2] = arg1[2];
}
#else
GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800371F4.s")