mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-02-02 16:23:57 +03:00
Match Func i1 801922 dc (#94)
* update func_i1_801922DC from Boss* -> Object_4C * Moving 85c4666 commit to a proper branch * Match func_i1_801920F0 * Match func_i1_801920F0 * Match func_i1_801988B8 * forgot to delete func.s call * Match func_i1_801923C0 * Update src/overlays/ovl_i1/sf_ve1.c Goto replaced by loop for. Co-authored-by: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> * Match func_i1_8019243C Match function "func_i1_801923C0" * Apply suggestions from code review Co-authored-by: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> * Update src/overlays/ovl_i1/sf_ve1.c Co-authored-by: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> * Update src/overlays/ovl_i1/sf_ve1.c Co-authored-by: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> * Space between declaration and code --------- Co-authored-by: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com>
This commit is contained in:
parent
fdaffa0772
commit
44a73ae55e
@ -1,15 +1,127 @@
|
||||
#include "global.h"
|
||||
#include "sf_ve1.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_801920F0.s")
|
||||
extern s32 D_i1_8019C0B8;
|
||||
extern s32 D_i1_8019C0BC;
|
||||
extern s32 D_i1_8019C0C0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_801922DC.s")
|
||||
f32 func_i1_801920F0(f32* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32* arg5) {
|
||||
f32 temp;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_80192358.s")
|
||||
*arg5 = arg1 - *arg0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_801923C0.s")
|
||||
if (*arg5 > 180.0f) {
|
||||
do {
|
||||
*arg5 -= 360.0f;
|
||||
} while (*arg5 > 180.0f);
|
||||
} else if (*arg5 < -180.0f) {
|
||||
do {
|
||||
*arg5 += 360.0f;
|
||||
} while (*arg5 < -180.0f);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_8019243C.s")
|
||||
temp = *arg5;
|
||||
|
||||
if (temp != 0.0f) {
|
||||
temp *= arg2;
|
||||
|
||||
if ((arg4 <= temp) || ((temp <= -arg4))) {
|
||||
if (arg3 < temp) {
|
||||
temp = arg3;
|
||||
} else {
|
||||
|
||||
if (-arg3 > temp) {
|
||||
temp = -arg3;
|
||||
}
|
||||
}
|
||||
*arg0 += temp;
|
||||
} else {
|
||||
if (temp < arg4) {
|
||||
temp = arg4;
|
||||
*arg0 += arg4;
|
||||
|
||||
if (arg1 < *arg0) {
|
||||
*arg0 = arg1;
|
||||
}
|
||||
} else if (-arg4 < temp) {
|
||||
temp = -arg4;
|
||||
*arg0 += -arg4;
|
||||
|
||||
if (*arg0 < arg1) {
|
||||
*arg0 = arg1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*arg0 >= 360.0f) {
|
||||
*arg0 = *arg0 - 360.0f;
|
||||
} else if (*arg0 < 0.0f) {
|
||||
*arg0 = *arg0 + 360.0f;
|
||||
}
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
void func_i1_801922DC(Object_4C* this) {
|
||||
Boss* boss = &gBosses[0];
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++, boss++) {
|
||||
if ((boss->obj.status != 0) && (boss->obj.id == OBJ_BOSS_319)) {
|
||||
if (boss->obj.pos.z <= this->obj.pos.z) {
|
||||
D_i1_8019C0B8 = (s32) this->obj.rot.x + 1;
|
||||
this->obj.status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_i1_80192358(Object_4C* this) {
|
||||
Boss* boss = &gBosses[0];
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 4; i++, boss++) {
|
||||
if ((boss->obj.status != 0) && (boss->obj.id == 0x13F)) {
|
||||
if (boss->obj.pos.z <= this->obj.pos.z) {
|
||||
D_i1_8019C0B8 = 0;
|
||||
this->obj.status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_i1_801923C0(Object_4C* obj4C) {
|
||||
Boss* boss;
|
||||
s32 i;
|
||||
|
||||
for (boss = &gBosses[0], i = 0; i < 4; i++, boss++) {
|
||||
if (boss->obj.status != 0 && boss->obj.id == OBJ_BOSS_319) {
|
||||
if (boss->obj.pos.z <= obj4C->obj.pos.z) {
|
||||
D_i1_8019C0BC = (s32) obj4C->obj.rot.x + 1;
|
||||
obj4C->obj.status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_i1_8019243C(Object_4C* obj4C) {
|
||||
Boss* boss;
|
||||
s32 i;
|
||||
|
||||
for (boss = &gBosses[0], i = 0; i < 4; i++, boss++) {
|
||||
if (boss->obj.status != 0 && boss->obj.id == OBJ_BOSS_319) {
|
||||
if (boss->obj.pos.z <= obj4C->obj.pos.z) {
|
||||
D_i1_8019C0C0 = 1;
|
||||
obj4C->obj.status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_i1_801924A8(Object_80* arg0) {
|
||||
switch (arg0->unk_48) {
|
||||
@ -26,7 +138,8 @@ void func_i1_801924A8(Object_80* arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_8019250C.s")
|
||||
void func_i1_8019250C(Actor* arg0) {
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/sf_ve1/func_i1_80192518.s")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user