assorted matches (#399)

* assorted matches
This commit is contained in:
MegaMech
2023-09-05 15:00:15 -06:00
committed by GitHub
parent 67fbcac9ec
commit 7f7ecc5854
8 changed files with 53 additions and 600 deletions
+12 -29
View File
@@ -1575,18 +1575,11 @@ void func_8008B44C(s32 arg0) {
D_80165C18[arg0].unk_07C++;
}
#ifdef MIPS_TO_C
//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-24-2023
void func_8008B478(s32 objectIndex, s32 arg1) {
f32 sp34;
struct_80165C18_entry *sp24;
f32 temp_f0;
f32 temp_f0_2;
f32 temp;
f32 temp2;
f32 var_f6;
s16 (*temp_v0)[4];
struct_80165C18_entry *temp_v1;
u16 temp_t9;
u32 temp_t3;
func_8008B3E4(objectIndex);
if (arg1 != 0) {
@@ -1594,29 +1587,19 @@ void func_8008B478(s32 objectIndex, s32 arg1) {
} else {
func_8008B1D4(objectIndex);
}
temp_v1 = &D_80165C18[objectIndex];
temp_t9 = temp_v1->unk_098;
var_f6 = (f32) temp_t9;
if ((s32) temp_t9 < 0) {
var_f6 += 4294967296.0f;
}
sp24 = temp_v1;
temp_f0 = (f32) ((f64) var_f6 / 10000.0);
sp34 = temp_f0;
func_8008B17C(objectIndex, temp_f0);
if (func_8007223C(objectIndex, 0x00000800) != 0) {
sp24 = temp_v1;
sp34 = ((f32)D_80165C18[objectIndex].unk_098 / 10000.0);
func_8008B17C(objectIndex, sp34);
if (func_8007223C(objectIndex, 0x800) != 0) {
func_8008AFE0(objectIndex, sp34);
}
temp_v0 = temp_v1->unk_07C;
temp_f0_2 = (f32) temp_v0[0][3];
temp_t3 = (u32) (10000.0 / (f64) ((((f32) temp_v0->unkE - temp_f0_2) * sp34) + temp_f0_2));
temp_v1->unk_09A = (s16) temp_t3;
temp_v1->unk_098 += temp_t3;
var_f6 = D_80165C18[objectIndex].unk_07C[0][3];
temp = D_80165C18[objectIndex].unk_07C[0][7];
D_80165C18[objectIndex].unk_09A = 10000.0 / (((temp - var_f6) * sp34) + var_f6);
D_80165C18[objectIndex].unk_098 += D_80165C18[objectIndex].unk_09A;
}
#else
GLOBAL_ASM("asm/non_matchings/code_80086E70/func_8008B478.s")
#endif
void func_8008B620(s32 objectIndex) {
s16 temp_t0;
+39 -53
View File
@@ -1699,21 +1699,13 @@ void func_8002B9CC(Player *player, s8 arg1, UNUSED s32 arg2) {
}
}
//void func_8002BB9C(Player *player, f32 arg1, f32 arg2, UNUSED f32 arg3, f32 arg4, f32 arg5);
#ifdef NON_MATCHING
//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
//extern s16 D_800E3C98[10];// = { 0x0000, 0x00b6, 0x016c, 0x0222, 0x02d8, 0x038e, 0x0444, 0x04fa, 0x05b0, 0x0666 };
void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED s8 arg4, UNUSED Vec3f arg5)
{
void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED s8 arg4, UNUSED Vec3f arg5) {
Mat3 sp64;
Vec3f sp58;
Vec3f sp4C;
s16 var_v0;
s32 bbb;
s16 t0;
UNUSED s32 pad;
s16 sp30[10] = {0x0000, 0x00b6, 0x016c, 0x0222, 0x02d8, 0x038e, 0x0444, 0x04fa, 0x05b0, 0x0666};
if (((u16) player->unk_256) <= 0) {
@@ -1728,24 +1720,26 @@ void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED
return;
}
func_802B6540(sp64, 0.0f, 1.0f, 0.0f, (s16) 0);
func_802B6540(sp64, 0, 1, 0, (s16) 0);
sp58[0] = *arg1;
sp58[1] = 0.0f;
sp58[1] = 0;
sp58[2] = *arg2;
func_802B63B8(sp58, sp64);
sp4C[0] = player->rotX;
sp4C[1] = 0.0f;
sp4C[1] = 0;
sp4C[2] = player->rotZ;
func_802B63B8(sp4C, sp64);
bbb = player->unk_02C[1] - (-func_802B5224(sp58, sp4C));
var_v0 = (s16)((bbb) + 0x10000) / 182;
var_v0 = -(s16)func_802B5224(sp58, sp4C);
t0 = player->unk_02C[1];
var_v0 = 0x10000 + (t0 - var_v0);
var_v0 /= 182;
if (var_v0 < 0x97 && var_v0 > (-0x97)) {
if (var_v0 < 0x97 && (var_v0 > -0x97)) {
return;
}
@@ -1761,14 +1755,10 @@ void func_8002BB9C(Player *player, f32 *arg1, f32 *arg2, UNUSED s8 arg3, UNUSED
if ((player->unk_07C >> 0x10) < 0) {
player->unk_02C[1] -= sp30[var_v0];
}
else {
} else {
player->unk_02C[1] += sp30[var_v0];
}
}
#else
GLOBAL_ASM("asm/non_matchings/player_controller/func_8002BB9C.s")
#endif
void func_8002BD58(Player *player) {
s32 sp2C[7] = { 0x002f0000, 0x00300000, 0x00310000, 0x00320000, 0x00320000, 0x00320000, 0x00320000 };
@@ -2152,61 +2142,57 @@ void func_8002CD48(Player *player, s8 arg1, s8 arg2) {
}
}
#ifdef NON_MATCHING
void func_8002D028(Player *player, s8 arg1) {
Vec3f sp4C;
f32 sqrt;
f32 temp_f18;
s16 temp_t1;
s16 test;
s16 temp;
s16 var_a2;
s16 temp2;
f32 thing0;
thing0 = 8.0f;
UNUSED s32 pad;
sp4C[0] = D_80165210[D_80165270[arg1]];
sp4C[1] = 0.0f;
sp4C[1] = 0;
sp4C[2] = D_80165230[D_80165270[arg1]];
//temp_f0 = thing0 * 182.0f;
test = -(s16)func_802B5224(player->pos, sp4C);
temp = player->unk_02C[1];
var_a2 = test - temp;
temp = -(s16)func_802B5224(player->pos, sp4C);
temp2 = player->unk_02C[1];
temp = (temp - temp2);
if ((s16)var_a2 > (s16)thing0 * 182) {
var_a2 = (s16)thing0 * 182;
thing0 = 8;
if (temp > ((s16) (thing0 * 182))) {
temp = (thing0 * 182);
}
//temp_f18 = -thing0 * 182.0f;
if (var_a2 < (s16)-thing0 * 182) {
var_a2 = (s16)-thing0 * 182;
if (temp < ((s16) (-thing0 * 182))) {
temp = (-thing0 * 182);
}
temp_t1 = ((s16) ((var_a2 * 0x35) / thing0 * 182) + D_80165020[arg1]) / 2;
temp_t1 = (D_80165020[arg1] + ((s16) ((temp * 0x35) / (thing0 * 182)))) / 2;
func_8003680C(player, (s16) temp_t1);
D_80165020[arg1] = (s16) temp_t1;
//temp_f0 = sp4C[2] - player->pos[2];
//temp_f18 = sp4C[0] - player->pos[0];
sqrt = sqrtf((sp4C[0] - player->pos[0]) * (sp4C[0] + player->pos[0]) + (sp4C[2] + player->pos[2]) * (sp4C[2] + player->pos[2]));
if (sqrt <= 8.0f) {
temp_f18 = sqrtf((sp4C[0] - player->pos[0]) * (sp4C[0] - player->pos[0])+ (sp4C[2] - player->pos[2]) * (sp4C[2] - player->pos[2]));
if (temp_f18 <= 8.0f) {
func_800224F0(&player->unk_02C[1], -0x8000, 0x016C);
if ((player->unk_02C[1] < -0x7F41) || (player->unk_02C[1] > 0x7F41)) {
if ((player->unk_02C[1] < (-0x7F41)) || (player->unk_02C[1] > 0x7F41)) {
player->unk_000 &= ~0x0200;
}
player->unk_08C = 0.0f;
player->unk_094 = 0.0f;
player->unk_104 = 0.0f;
player->unk_08C = 0;
player->unk_094 = 0;
player->unk_104 = 0;
player->unk_240 = 0;
player->unk_07C = 0;
player->unk_034[0] = 0.0f;
player->unk_034[1] = 0.0f;
player->unk_034[2] = 0.0f;
player->unk_034[0] = 0;
player->unk_034[1] = 0;
player->unk_034[2] = 0;
player->unk_0C0 = 0;
player->unk_078 = 0;
} else {
player->unk_08C = 1200.0f;
player->unk_08C = 1200;
}
}
#else
GLOBAL_ASM("asm/non_matchings/player_controller/func_8002D028.s")
#endif
void func_8002D268(Player *player, UNUSED Camera *camera, s8 arg2, s8 arg3)
{