mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
Rand and degree macros (#110)
* half * pm * dtor * pi and such * permuter settings * angles * float fix * macro * formatting * small thing
This commit is contained in:
parent
a784be473a
commit
6528b2b5cf
@ -1903,7 +1903,7 @@ typedef union {
|
||||
((flag) == 1) ? __gsSP1Triangle_w1(v1, v2, v0): \
|
||||
__gsSP1Triangle_w1(v2, v0, v1))
|
||||
# define __gsSPLine3D_w1(v0, v1, wd) \
|
||||
(_SHIFTL((v0)*2,16,8)|_SHIFT((v1)*2,8,8)|_SHIFT((wd),0,8))
|
||||
(_SHIFTL((v0)*2,16,8)|_SHIFTL((v1)*2,8,8)|_SHIFTL((wd),0,8))
|
||||
# define __gsSPLine3D_w1f(v0, v1, wd, flag) \
|
||||
(((flag) == 0) ? __gsSPLine3D_w1(v0, v1, wd): \
|
||||
__gsSPLine3D_w1(v1, v0, wd))
|
||||
|
@ -49,7 +49,7 @@
|
||||
#define _SHIFTR(v, s, w) \
|
||||
((unsigned int)(((unsigned int)(v) >> (s)) & ((0x01 << (w)) - 1)))
|
||||
|
||||
#define _SHIFT _SHIFTL /* old, for compatibility only */
|
||||
// #define _SHIFT _SHIFTL /* old, for compatibility only */
|
||||
|
||||
#define G_ON (1)
|
||||
#define G_OFF (0)
|
||||
|
@ -594,7 +594,7 @@ void func_800BB5D0(void);
|
||||
// fox_reset
|
||||
void Graphics_NMIWipe(void);
|
||||
|
||||
// sf_versus
|
||||
// fox_versus
|
||||
s32 func_800C1E9C(void);
|
||||
void func_800C1ED4(void);
|
||||
void func_800C20B0(void);
|
||||
|
@ -6,6 +6,7 @@
|
||||
#define M_PI 3.14159265358979323846f
|
||||
#define M_DTOR (M_PI / 180.0f)
|
||||
#define M_RTOD (180.0f / M_PI)
|
||||
#define M_DTOD 1.0f
|
||||
#define M_SQRT2 1.41421356237309504880f
|
||||
#define M_SQRT1_2 0.70710678118654752440f /* 1/sqrt(2) */
|
||||
#define FLT_MAX 340282346638528859811704183484516925440.0f
|
||||
@ -13,7 +14,10 @@
|
||||
#define SHT_MINV (1.0f / SHT_MAX)
|
||||
|
||||
#define RAD_TO_DEG(radians) (((radians) * 180.0f) / M_PI)
|
||||
#define DEG_TO_RAD(degrees) (((degrees) * M_PI) / 180.0f)
|
||||
#define DEG_TO_RAD(degrees) (((degrees) / 180.0f) * M_PI)
|
||||
|
||||
#define SIN_DEG(angle) __sinf((M_DTOR)*(angle))
|
||||
#define COS_DEG(angle) __cosf((M_DTOR)*(angle))
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
|
@ -4,6 +4,14 @@
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
#define RAND_FLOAT(max) (Rand_ZeroOne()*(max))
|
||||
#define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max)))
|
||||
#define RAND_FLOAT_CENTERED(width) ((Rand_ZeroOne()-0.5f)*(width))
|
||||
|
||||
#define RAND_FLOAT_SEEDED(max) (Rand_ZeroOneSeeded()*(max))
|
||||
#define RAND_INT_SEEDED(max) ((s32)(Rand_ZeroOneSeeded()*(max)))
|
||||
#define RAND_FLOAT_CENTERED_SEEDED(width) ((Rand_ZeroOneSeeded()-0.5f)*(width))
|
||||
|
||||
#define SEGMENTED_TO_VIRTUAL(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)<<4)>>0x1C]+(((uintptr_t)(segment))&0xFFFFFF)))
|
||||
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
@ -738,7 +738,7 @@ extern s32 D_80178744;
|
||||
extern s32 D_80178748;
|
||||
extern s32 D_8017874C;
|
||||
|
||||
// sf_versus
|
||||
// fox_versus
|
||||
extern s32 D_80178750;
|
||||
extern s32 D_80178754;
|
||||
extern s32 D_80178758;
|
||||
|
@ -333,7 +333,7 @@ void func_8002EE64(Actor* actor) {
|
||||
actor->fwork[25] = spA8.y;
|
||||
actor->fwork[26] = spA0[0];
|
||||
actor->fwork[28] = spA0[1];
|
||||
actor->fwork[27] = (temp4 / 180.0f) * M_PI;
|
||||
actor->fwork[27] = DEG_TO_RAD(temp4);
|
||||
}
|
||||
} else {
|
||||
colId = COL2_0;
|
||||
@ -344,7 +344,7 @@ void func_8002EE64(Actor* actor) {
|
||||
actor->fwork[25] = spB4.y;
|
||||
actor->fwork[26] = spB4.x;
|
||||
actor->fwork[28] = spB4.z;
|
||||
actor->fwork[27] = (temp4 / 180.0f) * M_PI;
|
||||
actor->fwork[27] = DEG_TO_RAD(temp4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -702,8 +702,8 @@ s32 func_800301F4(Actor* actor) {
|
||||
if (gLevelMode == LEVELMODE_ON_RAILS) {
|
||||
return 0;
|
||||
}
|
||||
sp1C = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
sp18 = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
sp1C = SIN_DEG(actor->obj.rot.y);
|
||||
sp18 = COS_DEG(actor->obj.rot.y);
|
||||
temp_ft4 = actor->fwork[9] * 10.0f + (sp1C * 650.0f);
|
||||
temp_ft5 = actor->fwork[9] * 10.0f + (sp18 * 650.0f);
|
||||
for (i = 0; i < 200; i++) {
|
||||
@ -751,8 +751,8 @@ s32 func_8003049C(Actor* actor) {
|
||||
if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) {
|
||||
return func_800301F4(actor);
|
||||
}
|
||||
sp40 = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
sp3C = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
sp40 = SIN_DEG(actor->obj.rot.y);
|
||||
sp3C = COS_DEG(actor->obj.rot.y);
|
||||
temp_fa0 = actor->fwork[9] * 10.0f + (sp40 * 650.0f);
|
||||
temp_ft4 = actor->fwork[9] * 10.0f + (sp3C * 650.0f);
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
@ -870,8 +870,8 @@ void func_8003088C(Actor* actor) {
|
||||
Audio_PlaySfx(0x2903700B, actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
actor->timer_0C2 = 10;
|
||||
actor->timer_0BE = 0;
|
||||
actor->timer_04C = (Rand_ZeroOne() * 2.9f);
|
||||
switch ((s32) (Rand_ZeroOne() * 4.0f)) {
|
||||
actor->timer_04C = RAND_INT(2.9f);
|
||||
switch (RAND_INT(4.0f)) {
|
||||
case 0:
|
||||
actor->timer_0BC = 0;
|
||||
break;
|
||||
@ -892,11 +892,11 @@ void func_8003088C(Actor* actor) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
actor->timer_0BC = 10;
|
||||
} else {
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 50.0f);
|
||||
actor->timer_0BC = RAND_INT(50.0f);
|
||||
}
|
||||
}
|
||||
if ((actor->unk_0E4 >= 4) && (actor->unk_0E4 < 8)) {
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 40.0f) + 60.0f;
|
||||
actor->timer_0BC = RAND_INT(40.0f) + 60.0f;
|
||||
}
|
||||
if (actor->damage >= 20) {
|
||||
actor->timer_0BC = 0;
|
||||
@ -1013,7 +1013,7 @@ void func_8003088C(Actor* actor) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
sp48.x = -30.0f;
|
||||
}
|
||||
sp48.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
sp48.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
sp48.z = 0.0f;
|
||||
if (actor->iwork[7] != 0) {
|
||||
sp48.x *= 1.5f;
|
||||
@ -1194,7 +1194,7 @@ void func_800319AC(Actor* this) {
|
||||
return;
|
||||
}
|
||||
if ((this->iwork[17] != 0) && (this->iwork[16] == 0) && (this->unk_0E4 >= 4)) {
|
||||
switch ((s32) (Rand_ZeroOne() * 3.9f)) {
|
||||
switch (RAND_INT(3.9f)) {
|
||||
case 0:
|
||||
case 1:
|
||||
if (gCurrentLevel == LEVEL_VENOM_2) {
|
||||
@ -1229,7 +1229,7 @@ void func_800319AC(Actor* this) {
|
||||
this->unk_046 = 0;
|
||||
break;
|
||||
case 9:
|
||||
this->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 30;
|
||||
this->timer_0BC = RAND_INT(20.0f) + 30;
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
this->fwork[19] = this->obj.rot.y + 50.0f;
|
||||
} else {
|
||||
@ -1455,9 +1455,9 @@ void func_800319AC(Actor* this) {
|
||||
}
|
||||
if ((this->unk_0E4 >= 4) && (this->unk_0E4 != 8) &&
|
||||
((gCurrentLevel != LEVEL_VENOM_2) || (this->unk_0E4 != 4))) {
|
||||
spCC = __sinf(((this->index * 45) + gGameFrameCount) * M_DTOR) * 100.0f;
|
||||
spC8 = __cosf(((this->index * 45) + (gGameFrameCount * 2)) * M_DTOR) * 100.0f;
|
||||
spC4 = __sinf(((this->index * 45) + gGameFrameCount) * M_DTOR) * 100.0f;
|
||||
spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
|
||||
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f;
|
||||
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f;
|
||||
}
|
||||
if (gPlayer[0].unk_4DC == 0) {
|
||||
this->fwork[4] = gPlayer[0].pos.x + spCC;
|
||||
@ -1485,9 +1485,9 @@ void func_800319AC(Actor* this) {
|
||||
}
|
||||
} else if (this->unk_0E6 != 100) {
|
||||
if (this->unk_0E4 >= 10) {
|
||||
spCC = __sinf(((this->index * 45) + gGameFrameCount) * M_DTOR) * 200.0f;
|
||||
spC8 = __cosf(((this->index * 45) + (gGameFrameCount * 2)) * M_DTOR) * 200.0f;
|
||||
spC4 = __sinf(((this->index * 45) + gGameFrameCount) * M_DTOR) * 200.0f;
|
||||
spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f;
|
||||
spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 200.0f;
|
||||
spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f;
|
||||
}
|
||||
this->fwork[4] = gActors[this->unk_0E6].obj.pos.x + spCC;
|
||||
this->fwork[5] = gActors[this->unk_0E6].obj.pos.y + spC8;
|
||||
@ -1525,7 +1525,7 @@ void func_800319AC(Actor* this) {
|
||||
}
|
||||
}
|
||||
} else if (this->timer_0C0 == 0) {
|
||||
this->timer_0C0 = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
this->timer_0C0 = RAND_INT(200.0f) + 200;
|
||||
this->fwork[10] = 20.0f;
|
||||
}
|
||||
if ((spE8 < spF4) && (spEC < spF4)) {
|
||||
@ -1753,38 +1753,37 @@ void func_800319AC(Actor* this) {
|
||||
}
|
||||
if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) {
|
||||
if ((gCurrentLevel == LEVEL_SECTOR_Z) && (this->unk_0E4 == 8)) {
|
||||
Rand_ZeroOne();
|
||||
spE4 = 0.0f;
|
||||
spE0 = (Rand_ZeroOne() - 0.5f) * 500.0f;
|
||||
spDC = ((Rand_ZeroOne() - 0.5f) * 5000.0f) + 12000.0f;
|
||||
spE4 = RAND_FLOAT_CENTERED(0.0f);
|
||||
spE0 = RAND_FLOAT_CENTERED(500.0f);
|
||||
spDC = RAND_FLOAT_CENTERED(5000.0f) + 12000.0f;
|
||||
} else {
|
||||
spE4 = (Rand_ZeroOne() - 0.5f) * 15000.0f;
|
||||
spE0 = (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
spDC = (Rand_ZeroOne() - 0.5f) * 15000.0f;
|
||||
spE4 = RAND_FLOAT_CENTERED(15000.0f);
|
||||
spE0 = RAND_FLOAT_CENTERED(1000.0f);
|
||||
spDC = RAND_FLOAT_CENTERED(15000.0f);
|
||||
}
|
||||
} else {
|
||||
spE4 = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
spE4 = RAND_FLOAT_CENTERED(10000.0f);
|
||||
if ((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_KATINA) ||
|
||||
(gCurrentLevel == LEVEL_VENOM_2)) {
|
||||
spE0 = Rand_ZeroOne() * 1000.0f;
|
||||
spE0 = RAND_FLOAT(1000.0f);
|
||||
} else {
|
||||
spE0 = 0.0f;
|
||||
}
|
||||
spDC = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
spDC = RAND_FLOAT_CENTERED(10000.0f);
|
||||
if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0)) {
|
||||
spE4 = (Rand_ZeroOne() - 0.5f) * 5000.0f;
|
||||
spDC = (Rand_ZeroOne() - 0.5f) * 5000.0f;
|
||||
spE4 = RAND_FLOAT_CENTERED(5000.0f);
|
||||
spDC = RAND_FLOAT_CENTERED(5000.0f);
|
||||
}
|
||||
}
|
||||
if ((fabsf(this->obj.pos.x - spE4) > 2000.0f) || (fabsf(this->obj.pos.z - spDC) > 2000.0f)) {
|
||||
this->fwork[4] = spE4;
|
||||
this->fwork[5] = spE0;
|
||||
this->fwork[6] = spDC;
|
||||
this->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 10;
|
||||
this->timer_0BC = RAND_INT(20.0f) + 10;
|
||||
}
|
||||
}
|
||||
if (this->timer_0C0 == 0) {
|
||||
this->timer_0C0 = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
this->timer_0C0 = RAND_INT(200.0f) + 200;
|
||||
this->fwork[10] = 30.0f;
|
||||
}
|
||||
if ((this->unk_0E6 > 0) && (gActors[this->unk_0E6].obj.id == OBJ_ACTOR_197) &&
|
||||
@ -1886,7 +1885,7 @@ void func_800319AC(Actor* this) {
|
||||
sp108 = func_8003049C(this);
|
||||
if ((sp108 != 0) && (this->unk_0E4 < 10) && (this->timer_0BE == 0) &&
|
||||
((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) {
|
||||
this->timer_0BE = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
this->timer_0BE = RAND_INT(200.0f) + 200;
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
this->fwork[8] = 0.0f;
|
||||
this->fwork[7] = 360.0f;
|
||||
@ -1954,10 +1953,10 @@ void func_800319AC(Actor* this) {
|
||||
this->obj.rot.y = this->unk_0F4.y;
|
||||
Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f);
|
||||
Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f);
|
||||
spC0 = __sinf(this->obj.rot.x * M_DTOR);
|
||||
spB8 = __cosf(this->obj.rot.x * M_DTOR);
|
||||
spBC = __sinf(this->obj.rot.y * M_DTOR);
|
||||
spB4 = __cosf(this->obj.rot.y * M_DTOR);
|
||||
spC0 = SIN_DEG(this->obj.rot.x);
|
||||
spB8 = COS_DEG(this->obj.rot.x);
|
||||
spBC = SIN_DEG(this->obj.rot.y);
|
||||
spB4 = COS_DEG(this->obj.rot.y);
|
||||
|
||||
sp9C.z = (this->fwork[0] + this->fwork[9]) * spB8;
|
||||
sp9C.y = (this->fwork[0] + this->fwork[9]) * -spC0;
|
||||
@ -2170,7 +2169,7 @@ void func_80035448(Actor* actor) {
|
||||
|
||||
if (actor->unk_0E4 != 1000) {
|
||||
if ((actor->iwork[8] != 0) && (actor->unk_0E4 < 100)) {
|
||||
pad2 = __sinf(actor->iwork[8] * 400.0f * M_DTOR);
|
||||
pad2 = SIN_DEG(actor->iwork[8] * 400.0f);
|
||||
sp38 = actor->iwork[8] * pad2;
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp38, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp38, 1);
|
||||
|
@ -556,7 +556,7 @@ bool func_80099254(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, CollisionHeader* arg3,
|
||||
sp108.dist = var_s0->dist;
|
||||
if ((DOT_XYZ(sp108.normal, temp_V3f1) + sp108.dist) <= 0.0f) {
|
||||
temp_fs0 = sp108.normal.x * arg2->x + sp108.normal.y * arg2->y + sp108.normal.z * arg2->z;
|
||||
if (Math_FAcosF(temp_fs0 / (sqrtf(VEC3F_SQ(sp108.normal)) * spEC)) > M_PI / 2.0f) {
|
||||
if (Math_FAcosF(temp_fs0 / (sqrtf(VEC3F_SQ(sp108.normal)) * spEC)) > M_PI / 2) {
|
||||
temp_fs0 = (DOT_XYZ(sp108.normal, temp_V3f1) + sp108.dist) / temp_fs0;
|
||||
spDC.x = temp_V3f1.x - (arg2->x * temp_fs0);
|
||||
spDC.y = temp_V3f1.y - (arg2->y * temp_fs0);
|
||||
|
@ -693,7 +693,7 @@ void func_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) {
|
||||
} else {
|
||||
shot->unk_64 = 25;
|
||||
shot->obj.rot.y += 90.0f;
|
||||
shot->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
shot->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
@ -839,7 +839,7 @@ void func_80038140(PlayerShot* shot) {
|
||||
(fabsf(player->pos.y - shot->obj.pos.y) < temp_fa0)) {
|
||||
if (player->unk_280 >= 100) {
|
||||
shot->obj.rot.y = player->unk_0E8 + player->unk_114 + 180.0f + 90.0f;
|
||||
shot->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
shot->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1);
|
||||
sp88.x = sp88.y = 0.0f;
|
||||
@ -1221,8 +1221,8 @@ void func_80039A50(PlayerShot* shot) {
|
||||
}
|
||||
} else {
|
||||
if ((shot->obj.id == PLAYERSHOT_5) || (shot->obj.id == PLAYERSHOT_6) || (shot->obj.id == PLAYERSHOT_7)) {
|
||||
shot->obj.rot.y = (-gPlayer[gPlayerNum].unk_058 * 180.0f) / M_PI;
|
||||
shot->obj.rot.x = (gPlayer[gPlayerNum].unk_05C * 180.0f) / M_PI;
|
||||
shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058);
|
||||
shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C);
|
||||
}
|
||||
if (shot->obj.id != PLAYERSHOT_2) {
|
||||
Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, 1);
|
||||
@ -1334,7 +1334,7 @@ void func_80039A50(PlayerShot* shot) {
|
||||
var_fv1 = 0.0f;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 0.5235988f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_301AD60);
|
||||
@ -1346,7 +1346,7 @@ void func_80039A50(PlayerShot* shot) {
|
||||
var_fv1 = 0.0f;
|
||||
}
|
||||
Matrix_RotateY(gGfxMatrix, var_fv1, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 0.5235988f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.0f, 0.65f, 1.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL_68();
|
||||
@ -1626,12 +1626,12 @@ void func_8003B55C(PlayerShot* shot, s32 index) {
|
||||
func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f);
|
||||
func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f);
|
||||
func_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f);
|
||||
func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0);
|
||||
func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0);
|
||||
func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0);
|
||||
func_i3_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y,
|
||||
shot->obj.pos.z, 0.8f, 0);
|
||||
func_i3_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y,
|
||||
shot->obj.pos.z, 0.8f, 0);
|
||||
func_i3_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y,
|
||||
shot->obj.pos.z, 0.8f, 0);
|
||||
}
|
||||
}
|
||||
if (shot->unk_64 == 0) {
|
||||
@ -1898,7 +1898,7 @@ void func_8003C4D0(PlayerShot* shot, s32 damage) {
|
||||
actor->vel.y = sp64 * 0.03f;
|
||||
actor->vel.z = sp60 * 0.03f;
|
||||
actor->obj.status = OBJ_DYING;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(15.0f) + 10;
|
||||
actor->timer_0BE = 0;
|
||||
actor->timer_04C = 4;
|
||||
actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f);
|
||||
@ -2204,7 +2204,7 @@ void func_8003D54C(PlayerShot* shot, s32 index) {
|
||||
if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) &&
|
||||
((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) {
|
||||
do {
|
||||
teamId = (s32) (Rand_ZeroOne() * 2.9f) + 1;
|
||||
teamId = RAND_INT(2.9f) + 1;
|
||||
} while (gTeamShields[teamId] <= 0);
|
||||
switch (teamId) {
|
||||
case 1:
|
||||
|
@ -605,7 +605,7 @@ void func_8003E1E8(void) {
|
||||
case LEVEL_SECTOR_Z:
|
||||
Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_6002F80);
|
||||
break;
|
||||
@ -631,8 +631,8 @@ void func_8003E1E8(void) {
|
||||
sp124 = 0;
|
||||
sp48 = 0.0f;
|
||||
for (sp124 = 0; sp124 < 300; sp124++, sp50++, sp4C++) {
|
||||
*sp50 = (Rand_ZeroOneSeeded() * 480.0f) - 80.0f;
|
||||
*sp4C = (Rand_ZeroOneSeeded() * 360.0f) - 60.0f;
|
||||
*sp50 = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
|
||||
*sp4C = RAND_FLOAT_SEEDED(360.0f) - 60.0f;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, sp48, 1);
|
||||
@ -640,7 +640,7 @@ void func_8003E1E8(void) {
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_800CFD80);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
sp48 += M_PI / 4.0f;
|
||||
sp48 += M_PI / 4;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -766,7 +766,7 @@ void func_80040954(void) {
|
||||
Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, 1);
|
||||
if (((i == 5) || (i == 11)) && (gCurrentLevel != LEVEL_KATINA)) {
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
var_fv0 = *var_s4;
|
||||
|
@ -84,7 +84,7 @@ f32 D_800CA080[] = { -400.0f, 0.0f, 400.0f };
|
||||
|
||||
f32 D_800CA08C[] = { 0.0f, 200.0f, 0.0f };
|
||||
|
||||
f32 D_800CA098[] = { 1.0f, -0.8999999762f, 0.6999999881f };
|
||||
f32 D_800CA098[] = { 1.0f, -0.9f, 0.7f };
|
||||
|
||||
f32 D_800CA0A4[] = { 150.0f, 100.0f, 200.0f };
|
||||
|
||||
@ -110,13 +110,13 @@ Vec3f D_800CA110[8] = {
|
||||
};
|
||||
|
||||
f32 D_800CA170[] = {
|
||||
0.150000006f, 0.4499999881f, 0.75f, 1.299999952f, 0.75f, 0.4499999881f, 0.150000006f, 0.0f,
|
||||
0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f,
|
||||
};
|
||||
|
||||
f32 D_800CA190[] = { 5.0f, 5.199999809f };
|
||||
f32 D_800CA190[] = { 5.0f, 5.2f };
|
||||
|
||||
f32 D_800CA198[] = {
|
||||
0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.200000003f, 0.200000003f,
|
||||
0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f,
|
||||
};
|
||||
|
||||
f32 D_800CA1B4[] = {
|
||||
@ -124,7 +124,7 @@ f32 D_800CA1B4[] = {
|
||||
};
|
||||
|
||||
f32 D_800CA1D4[] = {
|
||||
1.5f, 0.8700000048f, 0.8299999833f, 0.75f, 0.6999999881f, 0.6000000238f, 0.400000006f, 0.1000000015f,
|
||||
1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f,
|
||||
};
|
||||
|
||||
AnimationHeader* D_800CA1F4[] = {
|
||||
@ -239,7 +239,7 @@ void func_80048E40(Player* player) {
|
||||
Math_SmoothStepToF(&D_80177A48[2], 1.2f, 0.1f, 0.01f, 0.0f);
|
||||
Math_SmoothStepToF(&D_80177A48[0], 0.1f, 0.1f, 0.002f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_0D0, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
Matrix_RotateX(gCalcMatrix, -0.08726646f, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, D_80177A48[1] * M_DTOR, 1);
|
||||
sp5C.x = 0.0f;
|
||||
sp5C.y = 0.0f;
|
||||
@ -354,9 +354,9 @@ void func_80048E40(Player* player) {
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = (-__sinf(player->unk_088 * M_DTOR)) * 0.3f;
|
||||
player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_80049630(Actor* actor) {
|
||||
@ -445,7 +445,7 @@ void func_80049A9C(Effect* effect, f32 x, f32 y, f32 z) {
|
||||
effect->obj.pos.y = y;
|
||||
effect->obj.pos.z = z;
|
||||
effect->vel.z = 40.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -457,9 +457,9 @@ void func_80049B44(void) {
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
x = (Rand_ZeroOne() - 0.5f) * 400.0f;
|
||||
y = (Rand_ZeroOne() - 0.5f) * 400.0f;
|
||||
z = (-D_80177D20 - 500.0f) - Rand_ZeroOne() * 500.0f;
|
||||
x = RAND_FLOAT_CENTERED(400.0f);
|
||||
y = RAND_FLOAT_CENTERED(400.0f);
|
||||
z = -D_80177D20 - 500.0f - RAND_FLOAT(500.0f);
|
||||
func_80049A9C(&gEffects[i], x, y, z);
|
||||
break;
|
||||
}
|
||||
@ -753,8 +753,8 @@ void func_8004A700(Actor* actor, s32 arg1) {
|
||||
actor->fwork[1] = D_800CA05C[arg1];
|
||||
actor->fwork[2] = D_800CA068[arg1];
|
||||
actor->fwork[3] = 4.0f;
|
||||
actor->fwork[7] = Rand_ZeroOne() * 100.0f;
|
||||
actor->fwork[8] = Rand_ZeroOne() * 100.0f;
|
||||
actor->fwork[7] = RAND_FLOAT(100.0f);
|
||||
actor->fwork[8] = RAND_FLOAT(100.0f);
|
||||
actor->obj.rot.z = D_800CA074[arg1];
|
||||
actor->iwork[11] = 1;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
@ -774,8 +774,8 @@ void func_8004A888(Effect* effect) {
|
||||
Effect_Initialize(effect);
|
||||
|
||||
effect->obj.status = OBJ_INIT;
|
||||
sp2C.x = (Rand_ZeroOne() - 0.5f) * 1500.0f;
|
||||
sp2C.y = (Rand_ZeroOne() - 0.5f) * 800.0f;
|
||||
sp2C.x = RAND_FLOAT_CENTERED(1500.0f);
|
||||
sp2C.y = RAND_FLOAT_CENTERED(800.0f);
|
||||
sp2C.z = 3000.0f;
|
||||
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20);
|
||||
@ -795,7 +795,7 @@ void func_8004A888(Effect* effect) {
|
||||
effect->obj.id = OBJ_EFFECT_352;
|
||||
effect->timer_50 = 0x28;
|
||||
effect->unk_46 = 0x90;
|
||||
effect->scale2 = (Rand_ZeroOne() * 30.0f) + 10.0f;
|
||||
effect->scale2 = RAND_FLOAT(30.0f) + 10.0f;
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
effect->obj.rot.z = 180.0f;
|
||||
@ -961,9 +961,9 @@ void func_8004AAF4(Player* player) {
|
||||
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
|
||||
func_800AA800(player);
|
||||
}
|
||||
@ -1361,9 +1361,9 @@ void func_8004B368(Player* player) {
|
||||
Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.f);
|
||||
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = (-__sinf(player->unk_088 * M_DTOR)) * 0.3f;
|
||||
player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_8004C90C(Player* player) {
|
||||
@ -1649,7 +1649,7 @@ void func_8004D440(Player* player) {
|
||||
if ((gCurrentLevel != LEVEL_TRAINING) &&
|
||||
((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) {
|
||||
do {
|
||||
teamId = (s32) (Rand_ZeroOne() * 2.9f) + 1;
|
||||
teamId = RAND_INT(2.9f) + 1;
|
||||
} while (gTeamShields[teamId] <= 0);
|
||||
|
||||
switch (teamId) {
|
||||
@ -1732,13 +1732,12 @@ void func_8004D828(Player* player) {
|
||||
|
||||
if (gCamCount == 1) {
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007D24C((Rand_ZeroOne() - 0.5f) * 20.0 + player->pos.x,
|
||||
(Rand_ZeroOne() - 0.5f) * 20.0 + player->pos.y, player->unk_138, 2.2f);
|
||||
func_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y,
|
||||
player->unk_138, 2.2f);
|
||||
}
|
||||
} else if (!(gGameFrameCount & 3)) {
|
||||
func_8007D10C(((Rand_ZeroOne() - 0.5f) * 10.0f) + player->pos.x,
|
||||
(Rand_ZeroOne() - 0.5f) * 10.0f + player->pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + player->unk_138, 2.2f);
|
||||
func_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->pos.x, RAND_FLOAT_CENTERED(10.0f) + player->pos.y,
|
||||
RAND_FLOAT_CENTERED(10.0f) + player->unk_138, 2.2f);
|
||||
}
|
||||
|
||||
if ((player->pos.y < player->unk_0A4) && (player->unk_1D0 == 0)) {
|
||||
@ -1821,9 +1820,7 @@ void func_8004D828(Player* player) {
|
||||
}
|
||||
|
||||
void func_8004DEF8(Player* player) {
|
||||
s32 pad[2];
|
||||
f32 sp34;
|
||||
s32 var_s0;
|
||||
s32 i;
|
||||
|
||||
if (player->unk_0E4 < 0.0f) {
|
||||
player->unk_0E4 += 1.0f;
|
||||
@ -1850,8 +1847,7 @@ void func_8004DEF8(Player* player) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
sp34 = Rand_ZeroOne();
|
||||
func_8007D24C(((sp34 - 0.5f) * 20.0) + player->pos.x, ((Rand_ZeroOne() - 0.5f) * 20.0) + player->pos.y,
|
||||
func_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y,
|
||||
player->unk_138, 2.2f);
|
||||
}
|
||||
|
||||
@ -1887,11 +1883,11 @@ void func_8004DEF8(Player* player) {
|
||||
func_8007BFFC(player->pos.x, player->pos.y - player->vel.y, player->unk_138 - (2.0f * player->vel.z), 0.0f,
|
||||
0.0f, 0.0f, 3.0f, 0x14);
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
for (var_s0 = 0; var_s0 < 2; var_s0++) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
func_800A69F8(2, player->pos.x, player->pos.y, player->unk_138);
|
||||
}
|
||||
|
||||
for (var_s0 = 0; var_s0 < 4; var_s0++) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_800A69F8(4, player->pos.x, player->pos.y, player->unk_138);
|
||||
}
|
||||
}
|
||||
@ -1952,9 +1948,9 @@ void func_8004E4D4(Actor* actor) {
|
||||
f32 sp34;
|
||||
|
||||
actor->fwork[7] += 3.0f;
|
||||
actor->unk_0F4.z = __sinf(actor->fwork[7] * M_DTOR) * 1.5f;
|
||||
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
|
||||
actor->fwork[8] += 2.0f;
|
||||
sp34 = __sinf(actor->fwork[8] * M_DTOR) * 10.0f;
|
||||
sp34 = SIN_DEG(actor->fwork[8]) * 10.0f;
|
||||
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
@ -2040,7 +2036,7 @@ void func_8004E4D4(Actor* actor) {
|
||||
actor->fwork[1] = sp3C.y;
|
||||
actor->fwork[2] = sp3C.z - 100.0f;
|
||||
|
||||
Math_SmoothStepToF(&actor->obj.rot.z, __sinf(actor->fwork[3] * M_DTOR) * -30.0f, 0.1f, 2.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + sp38->pos.x, 0.03f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + sp38->pos.y + sp34, 0.03f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + sp38->unk_138, 0.03f, 10.0f, 0.0f);
|
||||
@ -2181,7 +2177,7 @@ void func_8004EBD0(Actor* actor) {
|
||||
void func_8004F05C(Actor* actor) {
|
||||
if (((gLevelType == LEVELTYPE_PLANET) && (actor->unk_0B6 == 0)) || (gCurrentLevel == LEVEL_BOLSE)) {
|
||||
actor->fwork[0] += 3.0f;
|
||||
actor->fwork[1] = __sinf(actor->fwork[0] * M_DTOR) * 1.5f;
|
||||
actor->fwork[1] = SIN_DEG(actor->fwork[0]) * 1.5f;
|
||||
}
|
||||
|
||||
switch (gCurrentLevel) {
|
||||
@ -2190,8 +2186,8 @@ void func_8004F05C(Actor* actor) {
|
||||
case 0:
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
actor->unk_0F4.z += actor->unk_0F4.y;
|
||||
actor->vel.x = __sinf(actor->unk_0F4.z * M_DTOR) * 10.0f;
|
||||
actor->obj.rot.z = __sinf(actor->unk_0F4.z * M_DTOR) * 40.0f;
|
||||
actor->vel.x = SIN_DEG(actor->unk_0F4.z) * 10.0f;
|
||||
actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z) * 40.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2641,12 +2637,12 @@ void func_8004FEC0(Actor* actor) {
|
||||
|
||||
for (sp2D0 = 0; sp2D0 < 30; sp2D0++) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, ((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20],
|
||||
((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20],
|
||||
((Rand_ZeroOneSeeded() - 0.5f) * 3000.0f) * actor->fwork[20], 1);
|
||||
Matrix_RotateY(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * M_PI), 1);
|
||||
Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20],
|
||||
RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20],
|
||||
RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], 1);
|
||||
Matrix_RotateY(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 2.0f * (Rand_ZeroOneSeeded() * M_PI), 1);
|
||||
Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1);
|
||||
|
||||
switch (sp2D0 & 3) {
|
||||
case 0:
|
||||
@ -2666,8 +2662,7 @@ void func_8004FEC0(Actor* actor) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_Scale(gGfxMatrix, (Rand_ZeroOneSeeded() * 8.0f) + 8.0f, (Rand_ZeroOneSeeded() * 8.0f) + 8.0f,
|
||||
10.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, RAND_FLOAT_SEEDED(8.0f) + 8.0f, RAND_FLOAT_SEEDED(8.0f) + 8.0f, 10.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1021E20);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@ -2678,11 +2673,11 @@ void func_8004FEC0(Actor* actor) {
|
||||
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateX(gGfxMatrix, 0.34906584f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 20.0f * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.5f) * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1);
|
||||
} else {
|
||||
Matrix_RotateX(gGfxMatrix, -0.17453292f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -10.0f * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.3f) * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
@ -71,10 +71,10 @@ void func_80051B30(void) {
|
||||
case 0:
|
||||
if (D_800CA234->sfxPos[0] > 0.0f) {
|
||||
sp78 = 20.0f;
|
||||
sp74 = M_PI / 2.0f;
|
||||
sp74 = M_PI / 2;
|
||||
} else {
|
||||
sp78 = -20.0f;
|
||||
sp74 = -M_PI / 2.0f;
|
||||
sp74 = -M_PI / 2;
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, 1);
|
||||
@ -87,7 +87,7 @@ void func_80051B30(void) {
|
||||
case 1:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -M_PI / 2.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
@ -95,7 +95,7 @@ void func_80051B30(void) {
|
||||
sp78 = -20.0f;
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1023700);
|
||||
@ -738,7 +738,7 @@ void func_80054300(Player* player) {
|
||||
case FORM_ON_FOOT:
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@ -1118,7 +1118,7 @@ void func_80055E98(Player* player) {
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@ -1131,7 +1131,7 @@ void func_80055E98(Player* player) {
|
||||
Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1);
|
||||
Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@ -1501,9 +1501,9 @@ void func_800578C4(Player* player) {
|
||||
D_801779D8.x = player->pos.x + sp40.x;
|
||||
D_801779D8.y = player->pos.y + sp40.y + 20.0f;
|
||||
D_801779D8.z = player->unk_138 + sp40.z;
|
||||
D_801779E8.x = (__sinf(gGameFrameCount * 3.0f * M_DTOR) * 3.0f) + player->pos.x;
|
||||
D_801779E8.y = (__cosf(gGameFrameCount * 4.0f * M_DTOR) * 3.0f) + player->pos.y;
|
||||
D_801779E8.z = (__sinf(gGameFrameCount * 3.5f * M_DTOR) * 3.0f) + player->unk_138;
|
||||
D_801779E8.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x;
|
||||
D_801779E8.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y;
|
||||
D_801779E8.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->unk_138;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1557,7 +1557,7 @@ void func_80057D00(void) {
|
||||
D_801779E8.z += player->unk_138 + player->unk_144;
|
||||
|
||||
if ((player->unk_238 != 0) && (player->unk_110 > 5.0f)) {
|
||||
D_801779E8.x += __sinf(gGameFrameCount * 150.0f * M_DTOR) * player->unk_110 * 0.2f;
|
||||
D_801779E8.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f;
|
||||
}
|
||||
} else if (player->state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
func_800578C4(player);
|
||||
@ -1580,7 +1580,7 @@ void func_80057D00(void) {
|
||||
sp78.z = 0.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C);
|
||||
if (D_80178410 != 0) {
|
||||
D_80178428 = (gPlayer[0].unk_034 / 180.0f) * M_PI;
|
||||
D_80178428 = DEG_TO_RAD(gPlayer[0].unk_034);
|
||||
func_800B6F50(D_801779D8.x, D_801779D8.y, D_801779D8.z, D_801779E8.x, D_801779E8.y, D_801779E8.z);
|
||||
func_8003DAF0();
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void func_80059FDC(Item* item) {
|
||||
|
||||
void func_8005A010(Object_4C* obj4C) {
|
||||
if (obj4C->unk_48 == 0) {
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_60361F0);
|
||||
}
|
||||
@ -459,7 +459,7 @@ void func_8005ADAC(Actor* actor) {
|
||||
Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@ -468,7 +468,7 @@ void func_8005ADAC(Actor* actor) {
|
||||
Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
@ -624,7 +624,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
case OBJ_EFFECT_374:
|
||||
if (gEffects[index].state == 0) {
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
}
|
||||
@ -636,7 +636,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
switch (gActors[index].unk_0B4) {
|
||||
case 3:
|
||||
Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102A010);
|
||||
break;
|
||||
@ -646,7 +646,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255);
|
||||
temp_fv0 = gActors[index].fwork[15] * 3.0f;
|
||||
Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@ -670,7 +670,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200);
|
||||
}
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Graphics_SetScaleMtx(150.0f);
|
||||
gSPDisplayList(gMasterDisp++, D_102A8A0);
|
||||
break;
|
||||
@ -678,7 +678,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
case OBJ_BOSS_294:
|
||||
case OBJ_BOSS_295:
|
||||
case OBJ_BOSS_296:
|
||||
__cosf(gBosses[index].obj.rot.z * M_DTOR);
|
||||
COS_DEG(gBosses[index].obj.rot.z);
|
||||
if (D_80161A88 == 2) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90);
|
||||
} else {
|
||||
@ -712,7 +712,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1);
|
||||
Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@ -726,7 +726,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@ -738,7 +738,7 @@ void func_8005BAB4(ObjectId objId, s32 index) {
|
||||
Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
break;
|
||||
@ -1447,7 +1447,7 @@ void Object_58_Draw(Object_58* obj58) {
|
||||
Matrix_RotateY(gGfxMatrix, obj58->obj.rot.y * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, obj58->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, obj58->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_6007650);
|
||||
@ -1679,8 +1679,8 @@ void func_8006046C(s32 arg0) {
|
||||
for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) {
|
||||
if (effect->obj.status >= OBJ_ACTIVE) {
|
||||
if (effect->info.unk_14 == 1) {
|
||||
effect->obj.rot.y = (-gPlayer[gPlayerNum].unk_058 * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = (gPlayer[gPlayerNum].unk_05C * 180.0f) / M_PI;
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C);
|
||||
}
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
@ -208,7 +208,7 @@ void func_800778C4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 y
|
||||
effect->scale2 = scale2;
|
||||
effect->unk_4C = 0;
|
||||
effect->scale1 = 0.5f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
effect->unk_44 = 255;
|
||||
}
|
||||
@ -403,7 +403,7 @@ void func_80078438(Effect* effect) {
|
||||
void func_800784B4(Effect* effect) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_46);
|
||||
Graphics_SetScaleMtx(effect->scale2);
|
||||
Matrix_RotateX(gGfxMatrix, (M_PI / 2.0f), 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_200D750);
|
||||
}
|
||||
@ -430,7 +430,7 @@ void func_8007868C(Effect* effect) {
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
if (effect->unk_44 >= 2) {
|
||||
Matrix_RotateX(gGfxMatrix, (M_PI / 2.0f), 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
}
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1029780);
|
||||
@ -441,7 +441,7 @@ void func_8007879C(Effect* effect) {
|
||||
RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar);
|
||||
gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, (M_PI / 2.0f), 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1029780);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
@ -609,12 +609,12 @@ void func_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8
|
||||
effect->vel.x = (xPos - gBosses[1].obj.pos.x) * 0.1f;
|
||||
effect->vel.z = (zPos - gBosses[1].obj.pos.z) * 0.1f;
|
||||
} else if (scale2 == 1.3f) {
|
||||
effect->vel.x = ((Rand_ZeroOne() * 0.05f) + 0.03f) * xPos;
|
||||
effect->vel.z = ((Rand_ZeroOne() * 0.05f) + 0.03f) * zPos;
|
||||
effect->vel.x = (RAND_FLOAT(0.05f) + 0.03f) * xPos;
|
||||
effect->vel.z = (RAND_FLOAT(0.05f) + 0.03f) * zPos;
|
||||
effect->vel.y = 5.0f;
|
||||
} else if (scale2 == 1.55f) {
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
effect->vel.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
} else if ((gCurrentLevel == LEVEL_BOLSE) && ((scale2 == 5.11f) || (scale2 == 7.22f))) {
|
||||
sp3C.x = gPlayer[0].pos.x;
|
||||
sp3C.y = gPlayer[0].pos.y;
|
||||
@ -624,25 +624,24 @@ void func_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8
|
||||
xAng = -Math_Atan2F(sp3C.y - yPos, sp38);
|
||||
Matrix_RotateY(gCalcMatrix, yAng, 0);
|
||||
Matrix_RotateX(gCalcMatrix, xAng, 1);
|
||||
sp54.x = (Rand_ZeroOne() - 0.5f) * 50.0f;
|
||||
sp54.y = (Rand_ZeroOne() - 0.5f) * 50.0f;
|
||||
sp54.z = (Rand_ZeroOne() * 10.0f) + 150.0f;
|
||||
sp54.x = RAND_FLOAT_CENTERED(50.0f);
|
||||
sp54.y = RAND_FLOAT_CENTERED(50.0f);
|
||||
sp54.z = RAND_FLOAT(10.0f) + 150.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48);
|
||||
effect->vel.x = sp48.x;
|
||||
effect->vel.y = sp48.y;
|
||||
effect->vel.z = sp48.z;
|
||||
} else {
|
||||
effect->vel.y =
|
||||
(gLevelType == LEVELTYPE_PLANET) ? (Rand_ZeroOne() * 7.0f) + 7.0f : (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.y = (gLevelType == LEVELTYPE_PLANET) ? RAND_FLOAT(7.0f) + 7.0f : RAND_FLOAT_CENTERED(10.0f);
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
effect->vel.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
}
|
||||
effect->scale2 = ((Rand_ZeroOne() * 0.8f) + 0.3f) * scale2;
|
||||
effect->timer_50 = (s32) (Rand_ZeroOne() * 50.0f) + 70;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2;
|
||||
effect->timer_50 = RAND_INT(50.0f) + 70;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -1029,10 +1028,10 @@ void func_8007A818(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8
|
||||
effect->scale1 = scale1;
|
||||
effect->unk_44 = arg5;
|
||||
effect->unk_46 = arg6;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
effect->unk_60.y = scale1 * 0.1f;
|
||||
if (arg7 != 0) {
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
@ -1154,8 +1153,8 @@ void func_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) {
|
||||
for (yRot = 11.25f, i = 0; i < 16; i++, yRot += 22.5f) {
|
||||
for (j = 0; j < ARRAY_COUNT(gEffects); j++) {
|
||||
if (gEffects[j].obj.status == OBJ_FREE) {
|
||||
sinf = __sinf(M_DTOR * yRot) * scale1 * 20.0f;
|
||||
cosf = __cosf(M_DTOR * yRot) * scale1 * 20.0f;
|
||||
sinf = SIN_DEG(yRot) * scale1 * 20.0f;
|
||||
cosf = COS_DEG(yRot) * scale1 * 20.0f;
|
||||
func_8007AD58(&gEffects[j], xPos + sinf, yPos, zPos + cosf, scale2, scale1, yRot);
|
||||
break;
|
||||
}
|
||||
@ -1391,8 +1390,8 @@ void func_8007B7E8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f);
|
||||
effect->unk_48 = 3;
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
@ -1401,7 +1400,7 @@ void func_8007B7E8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->unk_4A = 50;
|
||||
effect->unk_46 = 1;
|
||||
effect->scale2 = scale2 * 0.2f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -1459,8 +1458,8 @@ void func_8007BB14(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f);
|
||||
effect->unk_48 = 3;
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
@ -1476,7 +1475,7 @@ void func_8007BB14(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
}
|
||||
|
||||
effect->scale2 = scale2 * 0.25f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
|
||||
if (scale2 == 6.0f) {
|
||||
effect->vel.z = gPlayer[0].vel.z * 0.6f;
|
||||
@ -1497,8 +1496,8 @@ void func_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
|
||||
void func_8007BCE8(Effect* effect) {
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) {
|
||||
effect->obj.rot.x = (gPlayer[0].unk_05C * 180.0f) / M_PI;
|
||||
effect->obj.rot.y = (-gPlayer[0].unk_058 * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C);
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058);
|
||||
}
|
||||
if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6) {
|
||||
effect->unk_46 = 2;
|
||||
@ -1628,9 +1627,9 @@ void func_8007C250(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(effect->timer_50 & var_v0)) {
|
||||
randX = (Rand_ZeroOne() - 0.5f) * 40.0f;
|
||||
randY = (Rand_ZeroOne() - 0.5f) * 40.0f;
|
||||
randOther = ((Rand_ZeroOne() * 0.5f) + 1.0f);
|
||||
randX = RAND_FLOAT_CENTERED(40.0f);
|
||||
randY = RAND_FLOAT_CENTERED(40.0f);
|
||||
randOther = RAND_FLOAT(0.5f) + 1.0f;
|
||||
func_8007D0E0(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z,
|
||||
effect->scale2 * randOther);
|
||||
if (effect->timer_50 == 0) {
|
||||
@ -1654,8 +1653,8 @@ void func_8007C3B4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 y
|
||||
|
||||
effect->scale2 = scale2;
|
||||
effect->unk_4A = arg8;
|
||||
effect->unk_4C = (s32) (Rand_ZeroOne() * 12.0f);
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_4C = RAND_INT(12.0f);
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
effect->unk_44 = 0xFF;
|
||||
}
|
||||
@ -1677,9 +1676,9 @@ void func_8007C50C(Effect* effect) {
|
||||
f32 randOther;
|
||||
|
||||
if (!(effect->timer_50 & 7)) {
|
||||
randX = (Rand_ZeroOne() - 0.5f) * 40.0f * effect->scale2;
|
||||
randY = (Rand_ZeroOne() - 0.5f) * 40.0f * effect->scale2;
|
||||
randOther = (Rand_ZeroOne() + 1.0f);
|
||||
randX = RAND_FLOAT_CENTERED(40.0f) * effect->scale2;
|
||||
randY = RAND_FLOAT_CENTERED(40.0f) * effect->scale2;
|
||||
randOther = RAND_FLOAT(1.0f) + 1.0f;
|
||||
func_8007C484(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, effect->vel.x,
|
||||
effect->vel.y, effect->vel.z, effect->scale2 * randOther, 0);
|
||||
if (effect->timer_50 == 0) {
|
||||
@ -1734,7 +1733,7 @@ void func_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
}
|
||||
|
||||
effect->scale2 = scale2 * 0.25f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_44 = 0;
|
||||
|
||||
if (Rand_ZeroOne() < 0.3f) {
|
||||
@ -1742,7 +1741,7 @@ void func_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->unk_4A = 255;
|
||||
effect->scale2 = scale2 * 0.3f;
|
||||
}
|
||||
effect->scale1 = Rand_ZeroOne() * 0.2f;
|
||||
effect->scale1 = RAND_FLOAT(0.2f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -1769,9 +1768,9 @@ void func_8007C8C4(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(effect->timer_50 & var_v0) && (gLevelType == LEVELTYPE_PLANET)) {
|
||||
randX = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
randY = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
randOther = ((Rand_ZeroOne() * 0.5f) + 1.0f);
|
||||
randX = RAND_FLOAT_CENTERED(10.0f);
|
||||
randY = RAND_FLOAT_CENTERED(10.0f);
|
||||
randOther = RAND_FLOAT(0.5f) + 1.0f;
|
||||
func_8007C85C(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z,
|
||||
effect->scale2 * randOther);
|
||||
if (effect->timer_50 == 0) {
|
||||
@ -1825,7 +1824,7 @@ void func_8007CC00(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->scale2 = scale2;
|
||||
effect->scale1 = 0.5f;
|
||||
effect->unk_4C = 0;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
effect->unk_44 = 230;
|
||||
@ -1846,7 +1845,7 @@ void func_8007CCBC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->scale2 = scale2;
|
||||
effect->unk_4C = 3;
|
||||
effect->scale1 = 0.2f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
effect->unk_44 = 230;
|
||||
@ -1871,7 +1870,7 @@ void func_8007CD7C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32
|
||||
}
|
||||
effect->unk_4A = 0xFF;
|
||||
effect->scale2 = scale2;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
|
||||
if ((Rand_ZeroOne() < 0.5f) && (gLevelType == LEVELTYPE_PLANET) && (timer50 != 1)) {
|
||||
effect->unk_44 = 1;
|
||||
@ -1958,7 +1957,7 @@ void func_8007D138(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) {
|
||||
effect->obj.pos.z = zPos;
|
||||
|
||||
effect->scale2 = scale2;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
effect->unk_4C = 15;
|
||||
@ -2272,13 +2271,13 @@ void func_8007E014(Effect* effect) {
|
||||
if (D_801784AC == 4) {
|
||||
func_i5_801B6E20(effect->obj.pos.x, effect->obj.pos.z + D_80177D20, &x, &y, &z);
|
||||
effect->obj.pos.y = y + 3.0f;
|
||||
effect->obj.rot.x = (x * 180.0f) / M_PI;
|
||||
effect->obj.rot.z = (z * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = RAD_TO_DEG(x);
|
||||
effect->obj.rot.z = RAD_TO_DEG(z);
|
||||
}
|
||||
|
||||
if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((effect->timer_50 & 3) == 1) && (Rand_ZeroOne() < 0.5f)) {
|
||||
func_8007D10C(effect->obj.pos.x, effect->obj.pos.y + (effect->scale2 * 5.0f), effect->obj.pos.z + 3.0f,
|
||||
((Rand_ZeroOne() * 0.7f) + 1.0f) * (effect->scale2 * 1.2f));
|
||||
(RAND_FLOAT(0.7f) + 1.0f) * (effect->scale2 * 1.2f));
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
@ -2418,8 +2417,8 @@ void func_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32
|
||||
effect->vel.z = sp34.z - D_80177D08;
|
||||
|
||||
if ((objId == OBJ_EFFECT_353) || (objId == OBJ_EFFECT_354)) {
|
||||
effect->obj.rot.x = (sp54 * 180.0f) / M_PI;
|
||||
effect->obj.rot.y = (sp50 * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = RAD_TO_DEG(sp54);
|
||||
effect->obj.rot.y = RAD_TO_DEG(sp50);
|
||||
}
|
||||
|
||||
if (objId == OBJ_EFFECT_356) {
|
||||
@ -2427,7 +2426,7 @@ void func_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32
|
||||
}
|
||||
|
||||
if (objId == OBJ_EFFECT_376) {
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_4A = 180;
|
||||
effect->scale2 = 5.0f;
|
||||
return;
|
||||
@ -2475,8 +2474,8 @@ void func_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32
|
||||
effect->vel.z = sp34.z - D_80177D08;
|
||||
|
||||
if (objId == OBJ_EFFECT_353) {
|
||||
effect->obj.rot.x = (sp54 * 180.0f) / M_PI;
|
||||
effect->obj.rot.y = (sp50 * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = RAD_TO_DEG(sp54);
|
||||
effect->obj.rot.y = RAD_TO_DEG(sp50);
|
||||
}
|
||||
|
||||
if (objId == OBJ_EFFECT_356) {
|
||||
@ -2484,7 +2483,7 @@ void func_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32
|
||||
}
|
||||
|
||||
if (objId == OBJ_EFFECT_376) {
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_4A = 180;
|
||||
effect->scale2 = 5.0f;
|
||||
return;
|
||||
@ -2737,7 +2736,7 @@ void func_8007F6B0(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 3) && (effect->state == 0)) {
|
||||
randfloat = Rand_ZeroOne() * 30.0f;
|
||||
randfloat = RAND_FLOAT(30.0f);
|
||||
for (i = 0; i < 36; i += 2) {
|
||||
temp = (i * 10.0f * M_DTOR) + randfloat;
|
||||
sin = __sinf(temp) * effect->scale2 * 8.0f;
|
||||
@ -2784,7 +2783,7 @@ void func_8007F958(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
randFloat = Rand_ZeroOne() * 144.0f;
|
||||
randFloat = RAND_FLOAT(144.0f);
|
||||
for (i = 0; i < 5; i++) {
|
||||
temp = (i * 72.0f * M_DTOR) + randFloat;
|
||||
sin = __sinf(temp) * effect->scale2 * 16.0f;
|
||||
@ -2825,7 +2824,7 @@ void func_8007FBE0(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
randFloat = Rand_ZeroOne() * 144.0f;
|
||||
randFloat = RAND_FLOAT(144.0f);
|
||||
for (i = 0; i < 10; i++) {
|
||||
temp = (i * 36.0f * M_DTOR) + randFloat;
|
||||
sin = __sinf(temp) * effect->scale2 * 16.0f;
|
||||
@ -2886,7 +2885,7 @@ void func_8007FE88(Effect* effect) {
|
||||
(fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) {
|
||||
if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) {
|
||||
effect->obj.rot.y = 90.0f;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1);
|
||||
srcVelocity.x = 0.0f;
|
||||
@ -3019,7 +3018,7 @@ void func_8008040C(Effect* effect) {
|
||||
(fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) {
|
||||
if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) {
|
||||
effect->obj.rot.y = 90.0f;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1);
|
||||
srcVelocity.y = 0.0f;
|
||||
@ -3089,7 +3088,7 @@ void func_8008092C(Effect* effect) {
|
||||
RCP_SetupDL(&gMasterDisp, 0x31);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255);
|
||||
Matrix_RotateZ(gGfxMatrix, 0.5235988f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
@ -3269,7 +3268,7 @@ void func_80080D04(Effect* effect) {
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 10.0f, 0.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Translate(gGfxMatrix, 1.0f, 20.0f, 0.0f, 1);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, 1);
|
||||
@ -3353,12 +3352,12 @@ void func_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32
|
||||
break;
|
||||
|
||||
case 5:
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() * 20.0f) + 30.0f;
|
||||
effect->vel.z = Rand_ZeroOne() * 30.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(20.0f);
|
||||
effect->vel.y = RAND_FLOAT(20.0f) + 30.0f;
|
||||
effect->vel.z = RAND_FLOAT(30.0f);
|
||||
|
||||
effect->unk_46 = 5;
|
||||
effect->unk_44 = ((Rand_ZeroOne() - 0.5f) * 20.0f) * 1.5f;
|
||||
effect->unk_44 = RAND_FLOAT_CENTERED(20.0f) * 1.5f;
|
||||
effect->info.unk_14 = 0;
|
||||
effect->unk_4A = 0xFF;
|
||||
break;
|
||||
@ -3369,27 +3368,27 @@ void func_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32
|
||||
break;
|
||||
|
||||
case 7:
|
||||
effect->vel.y = (Rand_ZeroOne() * 7.0f) + 7.0f;
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
effect->vel.y = RAND_FLOAT(7.0f) + 7.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
effect->vel.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
|
||||
effect->scale2 = ((Rand_ZeroOne() * 0.8f) + 0.3f) * scale2;
|
||||
effect->timer_50 = (s32) (Rand_ZeroOne() * 50.0f) + 70;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2;
|
||||
effect->timer_50 = RAND_INT(50.0f) + 70;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
|
||||
effect->info.unk_14 = 0;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
effect->obj.pos.x += (Rand_ZeroOne() - 0.5f) * 600.0f;
|
||||
effect->obj.pos.y += (Rand_ZeroOne() - 0.5f) * 600.0f;
|
||||
effect->obj.pos.z += ((Rand_ZeroOne() - 0.5f) * 300.0f) + 300.0f;
|
||||
effect->obj.pos.x += RAND_FLOAT_CENTERED(600.0f);
|
||||
effect->obj.pos.y += RAND_FLOAT_CENTERED(600.0f);
|
||||
effect->obj.pos.z += RAND_FLOAT_CENTERED(300.0f) + 300.0f;
|
||||
effect->scale1 = 0.0f;
|
||||
effect->scale2 = Rand_ZeroOne() + 1.0f;
|
||||
effect->scale2 = RAND_FLOAT(1.0f) + 1.0f;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
@ -3514,10 +3513,10 @@ void func_80081C5C(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 50.0f) + effect->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + effect->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y,
|
||||
effect->vel.z, (Rand_ZeroOne() * 0.05f) + 0.05f, 0);
|
||||
func_8007C484(RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y,
|
||||
effect->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0);
|
||||
}
|
||||
|
||||
if (func_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
@ -3580,10 +3579,10 @@ void func_80081C5C(Effect* effect) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 3)) {
|
||||
func_8007C120((((Rand_ZeroOne() - 0.5f) * effect->scale2) * 50.0f) + effect->obj.pos.x,
|
||||
(((Rand_ZeroOne() - 0.5f) * effect->scale2) * 50.0f) + effect->obj.pos.y,
|
||||
(((Rand_ZeroOne() - 0.5f) * effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x,
|
||||
effect->vel.y, effect->vel.z, (Rand_ZeroOne() * 0.03f) + 0.05f, 10);
|
||||
func_8007C120((RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.x,
|
||||
(RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.y,
|
||||
(RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x,
|
||||
effect->vel.y, effect->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10);
|
||||
}
|
||||
if (func_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) {
|
||||
func_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7);
|
||||
@ -3784,14 +3783,13 @@ void func_80081C5C(Effect* effect) {
|
||||
effect->unk_46 -= 1;
|
||||
}
|
||||
if ((!(gGameFrameCount & 0xF)) && (effect->timer_50 == 0)) {
|
||||
D_800D18EC = Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x,
|
||||
gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_80177D20)) *
|
||||
180.0f / M_PI;
|
||||
D_800D18EC = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x,
|
||||
gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_80177D20)));
|
||||
|
||||
D_800D18E8 = -Math_Atan2F(gPlayer[0].camEye.y - gBosses[0].obj.pos.y,
|
||||
D_800D18E8 = RAD_TO_DEG(
|
||||
-Math_Atan2F(gPlayer[0].camEye.y - gBosses[0].obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_80177D20)) +
|
||||
SQ(gPlayer[0].camEye.x - gBosses[0].obj.pos.x))) *
|
||||
180.0f / M_PI;
|
||||
SQ(gPlayer[0].camEye.x - gBosses[0].obj.pos.x))));
|
||||
}
|
||||
if (gBosses[0].timer_050 == 0) {
|
||||
gBosses[0].swork[39] = effect->index;
|
||||
@ -4051,10 +4049,10 @@ void func_800837EC(Effect* effect) {
|
||||
var_fv1 = effect->unk_60.y * 100.0f;
|
||||
}
|
||||
for (i = 0; i < var_s2; i++) {
|
||||
func_80081BEC(((Rand_ZeroOne() - 0.5f) * (effect->scale2 * 200.0f)) + effect->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * (effect->scale2 * 100.0f)) + (effect->obj.pos.y + var_fv1),
|
||||
((Rand_ZeroOne() - 0.5f) * (effect->scale2 * 200.0f)) + effect->obj.pos.z,
|
||||
0.3f - ((Rand_ZeroOne() - 0.5f) * 0.2f), 0xB);
|
||||
func_80081BEC(effect->obj.pos.x + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f),
|
||||
effect->obj.pos.y + var_fv1 + RAND_FLOAT_CENTERED(effect->scale2 * 100.0f),
|
||||
effect->obj.pos.z + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f),
|
||||
0.3f - RAND_FLOAT_CENTERED(0.2f), 11);
|
||||
}
|
||||
effect->state++;
|
||||
}
|
||||
@ -4071,10 +4069,8 @@ void func_800837EC(Effect* effect) {
|
||||
break;
|
||||
}
|
||||
|
||||
effect->obj.rot.y =
|
||||
(Math_Atan2F(gPlayer[0].camEye.x - effect->obj.pos.x, gPlayer[0].camEye.z - (effect->obj.pos.z + D_80177D20)) *
|
||||
180.0f) /
|
||||
M_PI;
|
||||
effect->obj.rot.y = RAD_TO_DEG(
|
||||
Math_Atan2F(gPlayer[0].camEye.x - effect->obj.pos.x, gPlayer[0].camEye.z - (effect->obj.pos.z + D_80177D20)));
|
||||
}
|
||||
|
||||
void func_80083B8C(Effect* effect) {
|
||||
@ -4174,8 +4170,8 @@ void func_80083FA8(Effect* effect) {
|
||||
return;
|
||||
}
|
||||
|
||||
effect->obj.rot.y = (-gPlayer[0].unk_058 * 180.0f) / M_PI;
|
||||
effect->obj.rot.x = (gPlayer[0].unk_05C * 180.0f) / M_PI;
|
||||
effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058);
|
||||
effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C);
|
||||
effect->obj.rot.z += 20.0f;
|
||||
|
||||
Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, 0);
|
||||
|
@ -258,12 +258,12 @@ void func_80061958(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
effect->timer_50 = 200;
|
||||
effect->scale2 = 0.3f;
|
||||
effect->scale1 = Rand_ZeroOne() * 255.0f;
|
||||
effect->scale1 = RAND_FLOAT(255.0f);
|
||||
}
|
||||
effect->obj.pos.x = xPos;
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
effect->info.unk_10 = 100.0f;
|
||||
@ -275,14 +275,11 @@ void func_80061A4C(void) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
f32 sp1C;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
x = gPlayer[0].pos.x + (sp1C * 400.0f) + (5.0f * gPlayer[0].vel.x);
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
y = gPlayer[0].pos.y + (sp1C * 400.0f) + (5.0f * gPlayer[0].vel.y);
|
||||
x = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(400.0f) + (5.0f * gPlayer[0].vel.x);
|
||||
y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(400.0f) + (5.0f * gPlayer[0].vel.y);
|
||||
z = -D_80177D20 - 500.0f;
|
||||
if (D_80177D08 < 0.0f) {
|
||||
z = -D_80177D20 + 500.0f;
|
||||
@ -298,17 +295,14 @@ void func_80061B68(void) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
f32 sp1C;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
x = gPlayer[0].pos.x + (sp1C * 2000.0f) + (5.0f * gPlayer[0].vel.x);
|
||||
x = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.x);
|
||||
y = 0;
|
||||
while (y <= gGroundLevel) {
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
y = gPlayer[0].pos.y + (sp1C * 2000.0f) + (5.0f * gPlayer[0].vel.y);
|
||||
y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.y);
|
||||
}
|
||||
z = -D_80177D20 - 3000.0f;
|
||||
if (D_80177D08 < 0.0f) {
|
||||
@ -325,15 +319,12 @@ void func_80061CD0(void) {
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
f32 sp1C;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gEffects); i++) {
|
||||
if (gEffects[i].obj.status == OBJ_FREE) {
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
x = gPlayer[gPlayerNum].pos.x + (sp1C * 3000.0f) + (5.0f * gPlayer[gPlayerNum].vel.x);
|
||||
sp1C = (Rand_ZeroOne() - 0.5f);
|
||||
y = gPlayer[gPlayerNum].pos.y + 1000.0f + (sp1C * 500.0f) + (5.0f * gPlayer[gPlayerNum].vel.y);
|
||||
z = -D_80177D20 - 2000.0f * Rand_ZeroOne();
|
||||
x = gPlayer[gPlayerNum].pos.x + RAND_FLOAT_CENTERED(3000.0f) + (5.0f * gPlayer[gPlayerNum].vel.x);
|
||||
y = gPlayer[gPlayerNum].pos.y + 1000.0f + RAND_FLOAT_CENTERED(500.0f) + (5.0f * gPlayer[gPlayerNum].vel.y);
|
||||
z = -D_80177D20 - RAND_FLOAT(2000.0f);
|
||||
if (D_80177D08 < 0.0f) {
|
||||
z = -D_80177D20 + 1000.0f;
|
||||
}
|
||||
@ -926,7 +917,7 @@ void func_80063CAC(Object_80* obj80) {
|
||||
gActors[i].obj.pos.x = obj80->obj.pos.x;
|
||||
gActors[i].obj.pos.y = obj80->obj.pos.y;
|
||||
gActors[i].obj.pos.z = obj80->obj.pos.z;
|
||||
gActors[i].obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
gActors[i].obj.rot.y = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&gActors[i].info, gActors[i].obj.id);
|
||||
break;
|
||||
}
|
||||
@ -1022,8 +1013,8 @@ void Object_Init(s32 index, ObjectId objId) {
|
||||
func_i5_801B6E20(gEffects[index].obj.pos.x, gEffects[index].obj.pos.z + D_80177D20, &sp54, &sp4C,
|
||||
&sp50);
|
||||
gEffects[index].obj.pos.y = sp4C + 3.0f;
|
||||
gEffects[index].obj.rot.x = (sp54 * 180.0f) / M_PI;
|
||||
gEffects[index].obj.rot.z = (sp50 * 180.0f) / M_PI;
|
||||
gEffects[index].obj.rot.x = RAD_TO_DEG(sp54);
|
||||
gEffects[index].obj.rot.z = RAD_TO_DEG(sp50);
|
||||
} else if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
gEffects[index].obj.status = OBJ_FREE;
|
||||
}
|
||||
@ -1106,12 +1097,12 @@ void Object_Init(s32 index, ObjectId objId) {
|
||||
case OBJ_ACTOR_186:
|
||||
gActors[index].unk_046 = gFogRed;
|
||||
gActors[index].unk_048 = gFogNear;
|
||||
gActors[index].obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
gActors[index].obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
gActors[index].obj.rot.x = RAND_FLOAT(360.0f);
|
||||
gActors[index].obj.rot.y = RAND_FLOAT(360.0f);
|
||||
break;
|
||||
case OBJ_ACTOR_181:
|
||||
gActors[index].obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
gActors[index].obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
gActors[index].obj.rot.x = RAND_FLOAT(360.0f);
|
||||
gActors[index].obj.rot.y = RAND_FLOAT(360.0f);
|
||||
gActors[index].health = 200;
|
||||
break;
|
||||
case OBJ_ACTOR_202:
|
||||
@ -1332,8 +1323,8 @@ void func_800652CC(Object_80* obj80) {
|
||||
if ((D_801784AC == 4) && (obj80->state == 0)) {
|
||||
func_i5_801B6E20(obj80->obj.pos.x, obj80->obj.pos.z + D_80177D20, &sp2C, &sp24, &sp28);
|
||||
obj80->obj.pos.y = sp24 + 3.0f;
|
||||
obj80->obj.rot.x = (sp2C * 180.0f) / M_PI;
|
||||
obj80->obj.rot.z = (sp28 * 180.0f) / M_PI;
|
||||
obj80->obj.rot.x = RAD_TO_DEG(sp2C);
|
||||
obj80->obj.rot.z = RAD_TO_DEG(sp28);
|
||||
obj80->state++;
|
||||
}
|
||||
}
|
||||
@ -1342,7 +1333,7 @@ void func_80065380(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_ACTIVE;
|
||||
actor->obj.id = OBJ_ACTOR_182;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 10.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(10.0f) + 10;
|
||||
actor->timer_0C2 = 30;
|
||||
actor->vel.x = arg4;
|
||||
actor->vel.y = arg5;
|
||||
@ -1352,8 +1343,8 @@ void func_80065380(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg
|
||||
actor->obj.pos.z = zPos;
|
||||
actor->unk_046 = 0xFF;
|
||||
actor->unk_048 = 900;
|
||||
actor->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
actor->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
actor->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
actor->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
|
||||
@ -1375,8 +1366,8 @@ void func_800654E4(Object* obj) {
|
||||
|
||||
func_8007D2C8(obj->pos.x, obj->pos.y, obj->pos.z, 12.0f);
|
||||
for (var_s1 = 0; var_s1 < 4; var_s1++) {
|
||||
func_8006546C(obj->pos.x, obj->pos.y, obj->pos.z, (Rand_ZeroOne() - 0.5f) * 40.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 40.0f, Rand_ZeroOne() * -20.0f);
|
||||
func_8006546C(obj->pos.x, obj->pos.y, obj->pos.z, RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT_CENTERED(40.0f),
|
||||
RAND_FLOAT(-20.0f));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1495,7 +1486,7 @@ void func_800656D4(Actor* actor) {
|
||||
actor->unk_180 = gActors[spC4].obj.pos.x;
|
||||
if ((fabsf(actor->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) &&
|
||||
(fabsf(actor->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) {
|
||||
if ((Rand_ZeroOne() * (spC4 - 1)) < 0.6f) {
|
||||
if (RAND_FLOAT(spC4 - 1) < 0.6f) {
|
||||
gActors[spC4].iwork[9] = 1;
|
||||
}
|
||||
}
|
||||
@ -1516,10 +1507,10 @@ void func_800656D4(Actor* actor) {
|
||||
if (actor->unk_0B4 == 1) {
|
||||
sp80 = 0.1f;
|
||||
}
|
||||
spD0 = __sinf(actor->fwork[0] * M_DTOR) * sp80;
|
||||
sp88 = __cosf(actor->fwork[1] * M_DTOR) * sp80;
|
||||
spD4 = __cosf(actor->obj.rot.y * M_DTOR) * sp88;
|
||||
spCC = -__sinf(actor->obj.rot.y * M_DTOR) * sp88;
|
||||
spD0 = SIN_DEG(actor->fwork[0]) * sp80;
|
||||
sp88 = COS_DEG(actor->fwork[1]) * sp80;
|
||||
spD4 = COS_DEG(actor->obj.rot.y) * sp88;
|
||||
spCC = -SIN_DEG(actor->obj.rot.y) * sp88;
|
||||
sp88 = (actor->unk_180 + spD4) - actor->obj.pos.x;
|
||||
sp84 = (actor->unk_184 + spD0) - actor->obj.pos.y;
|
||||
sp80 = (actor->unk_188 + spCC) - actor->obj.pos.z;
|
||||
@ -1699,8 +1690,8 @@ void func_8006654C(Actor* actor) {
|
||||
actor->obj.pos.y = gGroundLevel + 130.0f;
|
||||
actor->vel.y = 0.0f;
|
||||
}
|
||||
actor->vel.x = __sinf(actor->obj.rot.y * M_DTOR) * actor->fwork[0];
|
||||
actor->vel.z = __cosf(actor->obj.rot.y * M_DTOR) * actor->fwork[0];
|
||||
actor->vel.x = SIN_DEG(actor->obj.rot.y) * actor->fwork[0];
|
||||
actor->vel.z = COS_DEG(actor->obj.rot.y) * actor->fwork[0];
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
if (actor->fwork[0] < 20.0f) {
|
||||
@ -1739,7 +1730,7 @@ void func_8006654C(Actor* actor) {
|
||||
actor->scale = 0.8f;
|
||||
if (actor->unk_0D0 != 0) {
|
||||
actor->obj.status = OBJ_DYING;
|
||||
actor->vel.y = (Rand_ZeroOne() * 5.0f) + 6.0f;
|
||||
actor->vel.y = RAND_FLOAT(5.0f) + 6.0f;
|
||||
if (actor->unk_0D0 == 2) {
|
||||
actor->vel.y = -2.0f;
|
||||
}
|
||||
@ -1830,7 +1821,7 @@ void func_80066C00(Object_80* obj80) {
|
||||
sp64.z = zf;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58);
|
||||
func_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z,
|
||||
Rand_ZeroOne() + 2.0f);
|
||||
RAND_FLOAT(1.0f) + 2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1934,7 +1925,7 @@ void func_800671D0(Item* item) {
|
||||
if (!(var_v0 & gGameFrameCount)) {
|
||||
Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, 0);
|
||||
sp40.x = 50.0f;
|
||||
sp40.y = (Rand_ZeroOne() - 0.5f) * 120.0f;
|
||||
sp40.y = RAND_FLOAT_CENTERED(120.0f);
|
||||
sp40.z = 0.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34);
|
||||
func_80078E50(item->obj.pos.x + sp34.x, item->obj.pos.y + sp34.y, item->obj.pos.z + sp34.z, 3.0f);
|
||||
@ -1956,7 +1947,7 @@ void func_80067348(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRo
|
||||
actor->vel.x = arg6;
|
||||
actor->vel.y = arg7;
|
||||
actor->vel.z = arg8;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 25.0f;
|
||||
actor->timer_0BC = RAND_INT(15.0f) + 25.0f;
|
||||
actor->gravity = 0.5f;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
@ -2006,8 +1997,8 @@ void func_8006753C(Actor* actor) {
|
||||
for (i = 0; i < 6; i++) {
|
||||
func_800674B4(D_800CFEC4[i].x + actor->obj.pos.x, D_800CFEC4[i].y + actor->obj.pos.y,
|
||||
D_800CFEC4[i].z + actor->obj.pos.z, D_800CFF0C[i].y + actor->obj.rot.y,
|
||||
D_800CFF0C[i].x + actor->obj.rot.x, (Rand_ZeroOne() - 0.5f) * 40.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, (Rand_ZeroOne() - 0.5f) * 40.0f);
|
||||
D_800CFF0C[i].x + actor->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(10.0f) + 10.0f,
|
||||
RAND_FLOAT_CENTERED(40.0f));
|
||||
func_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.6f);
|
||||
}
|
||||
Object_Kill(&actor->obj, actor->sfxPos);
|
||||
|
@ -35,7 +35,7 @@ void func_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4) {
|
||||
effect->scale1 = 0.1f;
|
||||
}
|
||||
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -67,9 +67,9 @@ void func_8006A984(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
|
||||
|
||||
effect->unk_44 = 40;
|
||||
effect->scale2 = 5.0f;
|
||||
effect->scale1 = 2.0f * (Rand_ZeroOne() - 0.5f);
|
||||
effect->scale1 = RAND_FLOAT_CENTERED(2.0f);
|
||||
effect->vel.y = 10.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -92,8 +92,8 @@ void func_8006AA98(Object_80* obj80) {
|
||||
if ((gGameFrameCount % 4) == 0) {
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
|
||||
|
||||
sp18.x = (Rand_ZeroOne() - 0.5f) * 700.0f;
|
||||
sp18.y = Rand_ZeroOne() * 50.0f;
|
||||
sp18.x = RAND_FLOAT_CENTERED(700.0f);
|
||||
sp18.y = RAND_FLOAT(50.0f);
|
||||
sp18.z = 700.0f;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp18, &sp24);
|
||||
@ -359,8 +359,8 @@ void func_8006BA64(Effect* effect, f32 xPos, f32 yPos, f32 zPos) {
|
||||
|
||||
effect->scale2 = 0.0f;
|
||||
effect->scale1 = 0.12f;
|
||||
effect->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
effect->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(3.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ void func_8006BB78(Actor* actor) {
|
||||
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
actor->fwork[10] = (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
actor->fwork[10] = RAND_FLOAT_CENTERED(1000.0f);
|
||||
actor->state = 1;
|
||||
break;
|
||||
|
||||
@ -444,7 +444,7 @@ void func_8006BB78(Actor* actor) {
|
||||
case 4:
|
||||
if (actor->timer_0BC == 0) {
|
||||
actor->state = 0;
|
||||
actor->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
actor->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -454,8 +454,8 @@ void func_8006BB78(Actor* actor) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & 7)) {
|
||||
func_8006A900(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x, actor->obj.pos.y + 10.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, 0.5f);
|
||||
func_8006A900(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, actor->obj.pos.y + 10.0f,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, 0.5f);
|
||||
}
|
||||
|
||||
if ((actor->unk_0D0 != 0) && (actor->unk_0B6 != 0)) {
|
||||
@ -626,9 +626,9 @@ void func_8006C008(Actor* actor) {
|
||||
case 58:
|
||||
if (actor->unk_046 == 0) {
|
||||
actor->unk_046++;
|
||||
actor->fwork[0] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[1] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[2] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[0] = RAND_FLOAT_CENTERED(30.0f);
|
||||
actor->fwork[1] = RAND_FLOAT_CENTERED(30.0f);
|
||||
actor->fwork[2] = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
|
||||
actor->obj.rot.x += actor->fwork[0];
|
||||
@ -701,9 +701,9 @@ void func_8006C008(Actor* actor) {
|
||||
default:
|
||||
if (actor->unk_046 == 0) {
|
||||
actor->unk_046++;
|
||||
actor->fwork[10] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[11] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[12] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
actor->fwork[10] = RAND_FLOAT_CENTERED(30.0f);
|
||||
actor->fwork[11] = RAND_FLOAT_CENTERED(30.0f);
|
||||
actor->fwork[12] = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
|
||||
actor->obj.rot.x += actor->fwork[10];
|
||||
@ -769,12 +769,12 @@ void func_8006C008(Actor* actor) {
|
||||
if ((actor->state != 2) && (actor->state != 4)) {
|
||||
func_8006BF7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z);
|
||||
} else if (gCurrentLevel == LEVEL_FORTUNA) {
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 10.0f) + actor->obj.pos.x, actor->obj.pos.y,
|
||||
actor->obj.pos.z, 1.0f);
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 10.0f) + actor->obj.pos.x, actor->obj.pos.y,
|
||||
actor->obj.pos.z, 1.0f);
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 10.0f) + actor->obj.pos.x, actor->obj.pos.y,
|
||||
actor->obj.pos.z, 1.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
|
||||
1.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
|
||||
1.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
|
||||
1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1817,8 +1817,8 @@ void func_8006F40C(Actor* actor) {
|
||||
case 8:
|
||||
sp6C.x = gPlayer[0].pos.x;
|
||||
sp6C.y = gPlayer[0].pos.y;
|
||||
gPlayer[0].pos.x += (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
gPlayer[0].pos.y += (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f);
|
||||
gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f);
|
||||
func_8007F11C(OBJ_EFFECT_353, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_80177828);
|
||||
gPlayer[0].pos.x = sp6C.x;
|
||||
gPlayer[0].pos.y = sp6C.y;
|
||||
@ -1947,8 +1947,8 @@ void func_8006FEEC(Actor* actor) {
|
||||
|
||||
if (actor->health <= 0) {
|
||||
for (i = 3; i < 11; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], (Rand_ZeroOne() - 0.5f) * 20.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 41, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f),
|
||||
RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 0;
|
||||
func_80066254(actor);
|
||||
@ -2053,7 +2053,7 @@ void func_800701E0(Actor* actor) {
|
||||
actor->unk_0C9 = 1;
|
||||
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
actor->timer_04C = (s16) (s32) (Rand_ZeroOne() * 2.9f);
|
||||
actor->timer_04C = RAND_INT(2.9f);
|
||||
if (actor->unk_0B4 == 2) {
|
||||
actor->timer_04C = 1;
|
||||
if (actor->obj.pos.x < actor->unk_0D8.x) {
|
||||
@ -2068,14 +2068,14 @@ void func_800701E0(Actor* actor) {
|
||||
|
||||
if (gLevelMode != LEVELMODE_ALL_RANGE) {
|
||||
actor->vel.x *= 0.5f;
|
||||
actor->vel.y = Rand_ZeroOne() * 5.0f;
|
||||
actor->vel.y = RAND_FLOAT(5.0f);
|
||||
if (actor->vel.z < 0.0f) {
|
||||
actor->vel.z = actor->vel.z;
|
||||
} else {
|
||||
actor->vel.z = actor->vel.z * 0.3f;
|
||||
}
|
||||
if (((actor->obj.pos.z + D_80177D20) > -3000.0f) && (actor->vel.z > 0.0f)) {
|
||||
actor->vel.z = Rand_ZeroOne() * -10.0f;
|
||||
actor->vel.z = RAND_FLOAT(-10.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2107,8 +2107,8 @@ void func_800701E0(Actor* actor) {
|
||||
default:
|
||||
actor->timer_0BC = 35;
|
||||
actor->timer_04C = 2;
|
||||
actor->vel.y = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
actor->vel.x = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
actor->vel.y = RAND_FLOAT_CENTERED(20.0f);
|
||||
actor->vel.x = RAND_FLOAT_CENTERED(20.0f);
|
||||
actor->vel.z = 0.0f;
|
||||
break;
|
||||
}
|
||||
@ -2756,17 +2756,17 @@ void func_80071DC0(Actor* actor) {
|
||||
Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1);
|
||||
|
||||
if (actor->unk_0B4 == 30) {
|
||||
rInd = Rand_ZeroOne() * (ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error?
|
||||
rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error?
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1074[rInd], &sp38);
|
||||
}
|
||||
|
||||
if (actor->unk_0B4 == 17) {
|
||||
rInd = Rand_ZeroOne() * (ARRAY_COUNT(D_800D0DD4) - 0.1f);
|
||||
rInd = RAND_FLOAT(ARRAY_COUNT(D_800D0DD4) - 0.1f);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D0DD4[rInd], &sp38);
|
||||
}
|
||||
|
||||
if (actor->unk_0B4 == 31) {
|
||||
rInd = Rand_ZeroOne() * (ARRAY_COUNT(D_800D1194) - 0.1f);
|
||||
rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1194) - 0.1f);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1194[rInd], &sp38);
|
||||
}
|
||||
|
||||
@ -2853,8 +2853,8 @@ void func_800722EC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) {
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->unk_44 = 250;
|
||||
effect->scale2 = 2.0f;
|
||||
effect->scale1 = (Rand_ZeroOne() - 0.5f) * 200.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->scale1 = RAND_FLOAT_CENTERED(200.0f);
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_4C = effect->state = 1;
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
@ -2912,9 +2912,9 @@ void func_80072594(Actor* actor) {
|
||||
f32 spE8;
|
||||
f32 spE4;
|
||||
f32 spE0;
|
||||
f32 spDC;
|
||||
f32 spD8;
|
||||
f32 spD4;
|
||||
f32 spDC = 0.0f;
|
||||
f32 spD8 = 0.0f;
|
||||
f32 spD4 = 0.0f;
|
||||
s32 pad;
|
||||
f32 spCC;
|
||||
f32 spC8;
|
||||
@ -2923,10 +2923,6 @@ void func_80072594(Actor* actor) {
|
||||
Vec3f spAC;
|
||||
Vec3f spA0;
|
||||
|
||||
spDC = 0.0f;
|
||||
spD8 = 0.0f;
|
||||
spD4 = 0.0f;
|
||||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (D_8017828C != 0)) {
|
||||
Object_Kill(&actor->obj, actor->sfxPos);
|
||||
return;
|
||||
@ -3114,8 +3110,8 @@ void func_80072594(Actor* actor) {
|
||||
break;
|
||||
|
||||
case 13:
|
||||
spDC = __sinf(((actor->index * 45) + gGameFrameCount) * M_DTOR) * actor->fwork[17];
|
||||
spD8 = __cosf(((actor->index * 45) + (gGameFrameCount * 2)) * M_DTOR) * actor->fwork[17];
|
||||
spDC = SIN_DEG((actor->index * 45) + gGameFrameCount) * actor->fwork[17];
|
||||
spD8 = COS_DEG((actor->index * 45) + (gGameFrameCount * 2)) * actor->fwork[17];
|
||||
pad = actor->iwork[1];
|
||||
pad = gActors[pad].iwork[12];
|
||||
D_Timer_80161670[pad] = 5;
|
||||
@ -3386,9 +3382,9 @@ void func_80072594(Actor* actor) {
|
||||
case 95:
|
||||
case 96:
|
||||
if (!(gGameFrameCount & 7)) {
|
||||
actor->fwork[18] = Rand_ZeroOne() * 255.0f;
|
||||
actor->fwork[19] = Rand_ZeroOne() * 255.0f;
|
||||
actor->fwork[20] = Rand_ZeroOne() * 255.0f;
|
||||
actor->fwork[18] = RAND_FLOAT(255.0f);
|
||||
actor->fwork[19] = RAND_FLOAT(255.0f);
|
||||
actor->fwork[20] = RAND_FLOAT(255.0f);
|
||||
}
|
||||
Math_SmoothStepToF(&actor->fwork[15], actor->fwork[18], 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->fwork[16], actor->fwork[19], 1.0f, 10.0f, 0.0f);
|
||||
@ -3442,7 +3438,7 @@ void func_80072594(Actor* actor) {
|
||||
}
|
||||
if (((s32) gGameFrameCount % 3) == 0) {
|
||||
func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y - 20, actor->obj.pos.z - 180.0f, 0.0f,
|
||||
Rand_ZeroOne() * 20.0f * -1.0f, 0.0f, 4.0f, 2);
|
||||
RAND_FLOAT(20.0f) * -1.0f, 0.0f, 4.0f, 2);
|
||||
}
|
||||
} else if (actor->unk_0B6 >= Animation_GetFrameCount(&D_40057AC)) {
|
||||
actor->unk_0B6 = 0;
|
||||
@ -3507,22 +3503,22 @@ void func_80072594(Actor* actor) {
|
||||
effect->obj.pos.x = actor->obj.pos.x + sp90.x;
|
||||
effect->obj.pos.y = actor->obj.pos.y + sp90.y;
|
||||
effect->obj.pos.z = actor->obj.pos.z;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
sp84.x = (Rand_ZeroOne() * 25.0f) + 30.0f;
|
||||
sp84.y = (Rand_ZeroOne() * 25.0f) + 20.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
effect->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
sp84.x = RAND_FLOAT(25.0f) + 30.0f;
|
||||
sp84.y = RAND_FLOAT(25.0f) + 20.0f;
|
||||
sp84.z = 0.0f;
|
||||
effect->unk_44 = 10;
|
||||
effect->scale2 = 1.0f;
|
||||
Matrix_RotateY(gCalcMatrix, ((Rand_ZeroOne() * 180.0f) + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, 0);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78);
|
||||
effect->vel.x = sp78.x;
|
||||
effect->vel.y = sp78.y;
|
||||
effect->vel.z = sp78.z;
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) + 5.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) + 5.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) + 5.0f;
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(1.0f) + 5.0f;
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(1.0f) + 5.0f;
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(1.0f) + 5.0f;
|
||||
}
|
||||
}
|
||||
actor->unk_046++;
|
||||
@ -3540,14 +3536,14 @@ void func_80072594(Actor* actor) {
|
||||
|
||||
effect->obj.status = OBJ_ACTIVE;
|
||||
|
||||
effect->obj.pos.x = ((Rand_ZeroOne() - 0.5f) * 3.0f) + actor->obj.pos.x + sp90.x;
|
||||
effect->obj.pos.y = ((Rand_ZeroOne() - 0.5f) * 3.0f) + actor->obj.pos.y + sp90.y;
|
||||
effect->obj.pos.z = ((Rand_ZeroOne() - 0.5f) * 3.0f) + actor->obj.pos.z + 180.0f;
|
||||
effect->obj.pos.x = actor->obj.pos.x + RAND_FLOAT_CENTERED(3.0f) + sp90.x;
|
||||
effect->obj.pos.y = actor->obj.pos.y + RAND_FLOAT_CENTERED(3.0f) + sp90.y;
|
||||
effect->obj.pos.z = actor->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 180.0f;
|
||||
|
||||
effect->scale2 = 9.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 30.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 30.0f;
|
||||
effect->unk_44 = 100;
|
||||
effect->unk_46 = -8;
|
||||
effect->unk_60.z = 3;
|
||||
@ -3566,13 +3562,13 @@ void func_80072594(Actor* actor) {
|
||||
if (effect != NULL) {
|
||||
effect->unk_78 = effect->unk_7A = 11;
|
||||
effect->obj.status = OBJ_ACTIVE;
|
||||
effect->obj.pos.x = ((Rand_ZeroOne() - 0.5f) * 3.0f) + actor->obj.pos.x;
|
||||
effect->obj.pos.y = ((Rand_ZeroOne() - 0.5f) * 5.0f) + actor->obj.pos.y + 50.0f;
|
||||
effect->obj.pos.z = ((Rand_ZeroOne() - 0.5f) * 3.0f) + actor->obj.pos.z + 200.0f;
|
||||
effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.x;
|
||||
effect->obj.pos.y = RAND_FLOAT_CENTERED(5.0f) + actor->obj.pos.y + 50.0f;
|
||||
effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.z + 200.0f;
|
||||
effect->scale2 = 9.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 10.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 10.0f;
|
||||
effect->unk_44 = 100;
|
||||
effect->unk_46 = -8;
|
||||
effect->unk_60.z = 3;
|
||||
@ -3634,9 +3630,9 @@ void func_80072594(Actor* actor) {
|
||||
actor->unk_0B6 = 49;
|
||||
}
|
||||
if (gGameFrameCount & 1) {
|
||||
func_i3_801AC8A8(((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.x,
|
||||
(Rand_ZeroOne() * 50.0f) + actor->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.z, 1.0f, 0);
|
||||
func_i3_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + actor->obj.pos.x,
|
||||
RAND_FLOAT(50.0f) + actor->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(100.0f) + actor->obj.pos.z, 1.0f, 0);
|
||||
}
|
||||
}
|
||||
actor->timer_0C2 = 10000;
|
||||
@ -3769,7 +3765,7 @@ void func_80074FF0(Actor* actor) {
|
||||
if ((actor->unk_0B4 != 0x15) && (actor->unk_0B4 != 0x17) && (actor->unk_0B4 != 0x4F) &&
|
||||
(actor->unk_0B4 != 0x53) && (actor->unk_0B4 != 0x1B) && (actor->unk_0B4 != 0x33) &&
|
||||
(actor->unk_0B4 != 0xD) && (actor->unk_0B4 != 0x48) && (actor->unk_0B4 != 0x1C) && (actor->scale > 0.5f)) {
|
||||
sp40 = __sinf(actor->timer_0C6 * 400.0f * M_DTOR) * actor->timer_0C6;
|
||||
sp40 = SIN_DEG(actor->timer_0C6 * 400.0f) * actor->timer_0C6;
|
||||
Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * sp40, 1);
|
||||
@ -3920,10 +3916,9 @@ void func_80074FF0(Actor* actor) {
|
||||
case 27:
|
||||
if (actor->timer_0C2 != 0) {
|
||||
if (!(actor->timer_0C2 & 3) && (D_80177854 != 0x64)) {
|
||||
func_8007D0E0(((Rand_ZeroOne() - 0.5f) * 200.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 200.0f) + actor->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 200.0f) + actor->obj.pos.z,
|
||||
(Rand_ZeroOne() * 1.5f) + 2.5f);
|
||||
func_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + actor->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(200.0f) + actor->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(200.0f) + actor->obj.pos.z, RAND_FLOAT(1.5f) + 2.5f);
|
||||
}
|
||||
RCP_SetupDL(&gMasterDisp, 0x39);
|
||||
gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK);
|
||||
@ -3934,7 +3929,7 @@ void func_80074FF0(Actor* actor) {
|
||||
break;
|
||||
|
||||
case 31:
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_600E0C0);
|
||||
break;
|
||||
@ -4190,7 +4185,7 @@ void func_800763A4(Actor* actor) {
|
||||
}
|
||||
|
||||
actor->obj.pos.y -= actor->vel.y;
|
||||
actor->vel.y = Rand_ZeroOne() * 10.0f;
|
||||
actor->vel.y = RAND_FLOAT(10.0f);
|
||||
actor->timer_04C = 3;
|
||||
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
|
@ -252,10 +252,10 @@ void func_80084B94(s32 arg0) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_RotateZ(gGfxMatrix, 3.0f * M_PI / 2.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@ -264,11 +264,11 @@ void func_80084B94(s32 arg0) {
|
||||
} else {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, -234.0f, -167.0f, -600.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_RotateZ(gGfxMatrix, 3.0f * M_PI / 2.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_500B600);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
@ -437,7 +437,7 @@ void func_80085944(void) {
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, 0);
|
||||
Matrix_RotateZ(gGfxMatrix, (3.14159265358979323846f / 180.0f) * D_801618B0[0], 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], 1);
|
||||
Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], 1);
|
||||
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
@ -2721,7 +2721,7 @@ void func_8008C104(u16* texture, u16* arg1) {
|
||||
break;
|
||||
}
|
||||
|
||||
angle = (height / 2) * __cosf(M_DTOR * temp1);
|
||||
angle = (height / 2) * COS_DEG(temp1);
|
||||
temp2 = angle;
|
||||
|
||||
if (temp2 >= height) {
|
||||
@ -3733,7 +3733,7 @@ void func_8008FFF0(Boss* boss, s32 arg1) {
|
||||
temp /= 2.0f;
|
||||
}
|
||||
|
||||
i = Rand_ZeroOne() * 36.0f;
|
||||
i = RAND_INT(36.0f);
|
||||
|
||||
if (!(gGameFrameCount & 2)) {
|
||||
func_8007C120(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y,
|
||||
@ -3846,8 +3846,8 @@ s32 func_80090200(Boss* boss) {
|
||||
player->camAt.y = boss->obj.pos.x;
|
||||
player->camAt.z = boss->obj.pos.x;
|
||||
|
||||
player->camAt.x += __cosf(M_DTOR * ((f32) boss->timer_050 * 60)) * boss->fwork[9];
|
||||
player->camAt.y += __sinf(M_DTOR * ((f32) boss->timer_050 * 179)) * boss->fwork[9];
|
||||
player->camAt.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9];
|
||||
player->camAt.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9];
|
||||
}
|
||||
}
|
||||
|
||||
@ -4007,7 +4007,7 @@ bool func_80090CCC(Actor* actor) {
|
||||
}
|
||||
|
||||
if (actor->timer_0BE == 0) {
|
||||
actor->timer_0BE = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
actor->timer_0BE = RAND_INT(200.0f) + 200;
|
||||
actor->fwork[10] = 30.0f;
|
||||
}
|
||||
|
||||
@ -4029,20 +4029,20 @@ s32 func_80090E8C(Actor* actor) {
|
||||
|
||||
if (actor->timer_0BC == 0) {
|
||||
if (gLevelType == LEVELTYPE_SPACE) {
|
||||
x = (Rand_ZeroOne() - 0.5f) * 20000.0f;
|
||||
y = (Rand_ZeroOne() - 0.5f) * 5000.0f;
|
||||
z = (Rand_ZeroOne() - 0.5f) * 20000.0f;
|
||||
x = RAND_FLOAT_CENTERED(20000.0f);
|
||||
y = RAND_FLOAT_CENTERED(5000.0f);
|
||||
z = RAND_FLOAT_CENTERED(20000.0f);
|
||||
} else {
|
||||
x = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
y = Rand_ZeroOne() * 1000.0f;
|
||||
z = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
x = RAND_FLOAT_CENTERED(10000.0f);
|
||||
y = RAND_FLOAT(1000.0f);
|
||||
z = RAND_FLOAT_CENTERED(10000.0f);
|
||||
}
|
||||
|
||||
if ((fabsf(actor->obj.pos.x - x) > 2000.0f) && (fabsf(actor->obj.pos.z - z) > 2000.0f)) {
|
||||
actor->fwork[4] = x;
|
||||
actor->fwork[5] = y;
|
||||
actor->fwork[6] = z;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(20.0f) + 10;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4058,7 +4058,7 @@ s32 func_80090E8C(Actor* actor) {
|
||||
}
|
||||
|
||||
if (actor->timer_0BE == 0) {
|
||||
actor->timer_0BE = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
actor->timer_0BE = RAND_INT(200.0f) + 200;
|
||||
actor->fwork[10] = 30.0f;
|
||||
}
|
||||
return false;
|
||||
@ -4068,10 +4068,10 @@ bool func_800910C0(Actor* actor) {
|
||||
f32 var_fv1;
|
||||
|
||||
if (actor->timer_0BC == 0) {
|
||||
actor->vwork[28].x = (Rand_ZeroOne() - 0.5f) * 2000.0f;
|
||||
actor->vwork[28].y = (Rand_ZeroOne() * 1000.0f) + 200.0f;
|
||||
actor->vwork[28].z = (Rand_ZeroOne() - 0.5f) * 2000.0f;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 10;
|
||||
actor->vwork[28].x = RAND_FLOAT_CENTERED(2000.0f);
|
||||
actor->vwork[28].y = RAND_FLOAT(1000.0f) + 200.0f;
|
||||
actor->vwork[28].z = RAND_FLOAT_CENTERED(2000.0f);
|
||||
actor->timer_0BC = RAND_INT(20.0f) + 10;
|
||||
}
|
||||
|
||||
actor->fwork[4] = gBosses[0].obj.pos.x + actor->vwork[28].x;
|
||||
@ -4090,7 +4090,7 @@ bool func_800910C0(Actor* actor) {
|
||||
}
|
||||
|
||||
if (actor->timer_0BE == 0) {
|
||||
actor->timer_0BE = (s32) (Rand_ZeroOne() * 200.0f) + 200;
|
||||
actor->timer_0BE = RAND_INT(200.0f) + 200;
|
||||
actor->fwork[10] = 30.0f;
|
||||
}
|
||||
return false;
|
||||
@ -4148,7 +4148,7 @@ bool func_80091368(Actor* actor) {
|
||||
}
|
||||
|
||||
if (actor->timer_0BC == 0) {
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 30;
|
||||
actor->timer_0BC = RAND_INT(20.0f) + 30;
|
||||
actor->fwork[7] = 360.0f;
|
||||
actor->fwork[8] = 0.0f;
|
||||
}
|
||||
@ -4413,7 +4413,7 @@ bool func_80091F00(Actor* actor) {
|
||||
sp40.x = 20.0f;
|
||||
}
|
||||
|
||||
sp40.y = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
sp40.y = RAND_FLOAT_CENTERED(20.0f);
|
||||
sp40.z = 0.0f;
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34);
|
||||
@ -4499,17 +4499,15 @@ void func_800922F4(Actor* actor) {
|
||||
}
|
||||
|
||||
if (!(gGameFrameCount & temp)) {
|
||||
func_8007D10C(actor->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 10.0f),
|
||||
actor->obj.pos.y + (Rand_ZeroOne() * 10.0f),
|
||||
actor->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 10.0f), 2.2f);
|
||||
func_8007D10C(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT(10.0f),
|
||||
actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.2f);
|
||||
}
|
||||
|
||||
if (!((temp >> 2) & gGameFrameCount)) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
func_8007C120(actor->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 30.0f),
|
||||
actor->obj.pos.y + (Rand_ZeroOne() * 10.0f),
|
||||
actor->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 30.0f), actor->vel.x, actor->vel.y,
|
||||
actor->vel.z, actor->scale * 0.07f, 3);
|
||||
func_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(30.0f), actor->obj.pos.y + RAND_FLOAT(10.0f),
|
||||
actor->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), actor->vel.x, actor->vel.y, actor->vel.z,
|
||||
actor->scale * 0.07f, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4699,7 +4697,7 @@ bool func_800927A0(Actor* actor) {
|
||||
actor->obj.rot.z = actor->vwork[29].z + actor->fwork[20];
|
||||
actor->obj.pos.y += actor->fwork[28];
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * 0.017453292f, 0U);
|
||||
Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), 1);
|
||||
|
||||
src.z = actor->fwork[1];
|
||||
@ -4803,7 +4801,7 @@ void func_80092EC0(Actor* actor) {
|
||||
case 1:
|
||||
if (func_800924E0(actor) != 0) {
|
||||
actor->unk_048 = 0;
|
||||
actor->iwork[9] = (s32) (Rand_ZeroOne() * 30.0f) + 90;
|
||||
actor->iwork[9] = RAND_INT(30.0f) + 90;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -4811,7 +4809,7 @@ void func_80092EC0(Actor* actor) {
|
||||
if (func_800927A0(actor) != 0) {
|
||||
actor->unk_04A = 0;
|
||||
actor->unk_048 = actor->unk_04A;
|
||||
actor->iwork[9] = (s32) (Rand_ZeroOne() * 30.0f) + 90;
|
||||
actor->iwork[9] = RAND_INT(30.0f) + 90;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -4904,13 +4902,13 @@ void func_800933D8(f32 x, f32 y, f32 z, f32 arg3) {
|
||||
effect->scale1 = 0.4f;
|
||||
effect->unk_44 = 0;
|
||||
effect->unk_46 = 24;
|
||||
effect->unk_48 = Rand_ZeroOne() * 4.0f;
|
||||
effect->unk_48 = RAND_INT(4.0f);
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
effect->unk_48 = -effect->unk_48;
|
||||
}
|
||||
} else {
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f);
|
||||
effect->unk_48 = 0;
|
||||
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
@ -4927,7 +4925,7 @@ void func_800933D8(f32 x, f32 y, f32 z, f32 arg3) {
|
||||
}
|
||||
|
||||
effect->scale2 = arg3 * 0.2f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
break;
|
||||
}
|
||||
@ -5013,11 +5011,11 @@ void func_800935E8(Player* player) {
|
||||
|
||||
case 1:
|
||||
if ((player->unk_208 == 0) && (gCsFrameCount < 250)) {
|
||||
i = Rand_ZeroOne() * 64.0f;
|
||||
i = RAND_INT(64.0f);
|
||||
if (i < 32) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
src.x = D_800D2320[i].x;
|
||||
src.y = D_800D2320[i].y + (Rand_ZeroOne() * 12.0f);
|
||||
src.y = D_800D2320[i].y + RAND_FLOAT(12.0f);
|
||||
src.z = D_800D2320[i].z;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0);
|
||||
@ -5036,7 +5034,7 @@ void func_800935E8(Player* player) {
|
||||
i -= 32;
|
||||
for (j = 0; j < 4; j++) {
|
||||
src.x = -D_800D2320[i].x;
|
||||
src.y = D_800D2320[i].y + (Rand_ZeroOne() * 12.0f);
|
||||
src.y = D_800D2320[i].y + RAND_FLOAT(12.0f);
|
||||
src.z = D_800D2320[i].z;
|
||||
|
||||
Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0);
|
||||
@ -5052,7 +5050,7 @@ void func_800935E8(Player* player) {
|
||||
i = (i + 1) % 32;
|
||||
}
|
||||
}
|
||||
player->unk_208 = (s32) (Rand_ZeroOne() * 3.0f) + 1;
|
||||
player->unk_208 = RAND_INT(3.0f) + 1;
|
||||
} else {
|
||||
player->unk_208--;
|
||||
}
|
||||
@ -5201,7 +5199,7 @@ void func_800935E8(Player* player) {
|
||||
if (temp > 20.0f) {
|
||||
temp = 20.0f;
|
||||
}
|
||||
temp2 = __sinf(M_DTOR * (((f32) gGameFrameCount) * 70.0f)) * temp;
|
||||
temp2 = SIN_DEG(gGameFrameCount * 70.0f) * temp;
|
||||
}
|
||||
|
||||
player->camEye.y = D_80177980 + temp2;
|
||||
@ -5237,9 +5235,9 @@ void func_800935E8(Player* player) {
|
||||
|
||||
if (((gGameFrameCount % 3) == 0) && (player->timer_1F8 <= 740)) {
|
||||
for (i = 0; i < 8; i++) {
|
||||
func_i3_801AC8A8(player->camEye.x + (Rand_ZeroOne() - 0.5f) * D_800D22C4,
|
||||
player->camEye.y + 260.0f + ((Rand_ZeroOne() - 0.5f) * D_800D22C8),
|
||||
player->camEye.z + (Rand_ZeroOne() - 0.5f) * D_800D22CC, 1.0f, 0);
|
||||
func_i3_801AC8A8(player->camEye.x + RAND_FLOAT_CENTERED(D_800D22C4),
|
||||
player->camEye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8),
|
||||
player->camEye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5292,11 +5290,11 @@ void func_800935E8(Player* player) {
|
||||
player->camAt.z = D_801779C0 = 0.0f;
|
||||
|
||||
case 6:
|
||||
player->unk_060 = __sinf(M_DTOR * (player->unk_0F4 * 0.7f)) * 0.5f;
|
||||
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_080 = -__sinf(M_DTOR * player->unk_088) * 0.5f;
|
||||
player->unk_0F0 = __sinf(M_DTOR * player->unk_0F4) * 1.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
|
||||
D_80177978 = player->pos.x * (600.0f / player->unk_09C);
|
||||
D_80177980 = player->pos.y * (740.0f / player->unk_0A0);
|
||||
@ -5329,9 +5327,8 @@ void func_800935E8(Player* player) {
|
||||
func_8001D444(0U, 0xEU, 0U, 0xFFU);
|
||||
}
|
||||
|
||||
func_i3_801AC8A8(player->pos.x + (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
player->pos.y + (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
player->pos.z - 65.0f + (Rand_ZeroOne() - 0.5f) * 10.0f, 0.4f, 1);
|
||||
func_i3_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT_CENTERED(10.0f),
|
||||
player->pos.z - 65.0f + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -6010,20 +6007,20 @@ void func_80095604(Player* player) {
|
||||
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
|
||||
player->unk_060 = __sinf(M_DTOR * (player->unk_0F4 * 0.7f)) * 0.5f;
|
||||
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_080 = -__sinf(M_DTOR * player->unk_088) * 0.5f;
|
||||
player->unk_0F0 = __sinf(M_DTOR * player->unk_0F4) * 1.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
|
||||
if (player->unk_234) {
|
||||
src.x = 0.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = -70.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
func_i3_801AC8A8(player->pos.x + dest.x + (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
player->pos.y + dest.y + (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
player->pos.z + dest.z + (Rand_ZeroOne() - 0.5f) * 10.0f, 0.4f, 1);
|
||||
func_i3_801AC8A8(player->pos.x + dest.x + RAND_FLOAT_CENTERED(10.0f),
|
||||
player->pos.y + dest.y + RAND_FLOAT_CENTERED(10.0f),
|
||||
player->pos.z + dest.z + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1);
|
||||
}
|
||||
|
||||
player->unk_178 += 20.0f;
|
||||
@ -6171,9 +6168,9 @@ void func_80096A74(Player* player) {
|
||||
Math_SmoothStepToAngle(&player->unk_0E4, 0.0f, 0.1f, 2.4f, 0.001f);
|
||||
} else {
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(M_DTOR * (player->unk_088)) * 0.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
player->unk_0F4 += 3.0f;
|
||||
player->unk_0F0 = __sinf(M_DTOR * (player->unk_0F4)) * 1.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ void func_800A3FEC(void) {
|
||||
Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f);
|
||||
Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f);
|
||||
if ((D_801782FC & spA8) == (i & spA8)) {
|
||||
*var_s5 = Rand_ZeroOne() * sp90;
|
||||
*var_s5 = RAND_FLOAT(sp90);
|
||||
*var_s4 = 0.0f;
|
||||
}
|
||||
*var_s0 += *var_s1;
|
||||
@ -167,22 +167,22 @@ void func_800A3FEC(void) {
|
||||
|
||||
void func_800A4460(Player* player) {
|
||||
if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == OBJ_ACTIVE) && (gBosses[0].state == 17)) {
|
||||
player->unk_060 = __sinf(player->unk_0F4 * 0.7f * M_DTOR) * 0.5f;
|
||||
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
|
||||
player->unk_088 += 13.0f;
|
||||
player->unk_0F4 += 20.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 5.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 10.0f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 5.0f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 10.0f;
|
||||
return;
|
||||
} else {
|
||||
player->unk_060 = __sinf(player->unk_0F4 * 0.7f * M_DTOR) * 0.5f;
|
||||
player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
if ((gLevelType == LEVELTYPE_PLANET) || ((player->unk_238 == 1) && (gLevelMode == LEVELMODE_ON_RAILS))) {
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) {
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 5.0f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 5.0f;
|
||||
} else {
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 1.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -195,24 +195,24 @@ void func_800A46A0(Player* player) {
|
||||
if ((player->unk_238 == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) {
|
||||
if (player->wings.rightState <= WINGSTATE_BROKEN) {
|
||||
if (!(gGameFrameCount & 1) && (D_80177D70[player->num] != 0)) {
|
||||
func_8007D10C(((Rand_ZeroOne() - 0.5f) * 10.0f) + player->hit1.x,
|
||||
(Rand_ZeroOne() * 5.0f) + player->hit1.y, player->hit1.z, 1.0f);
|
||||
func_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
|
||||
player->hit1.z, 1.0f);
|
||||
}
|
||||
if (!(gGameFrameCount & 1) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 5.0f) + player->hit1.x,
|
||||
(Rand_ZeroOne() * 5.0f) + player->hit1.y, player->hit1.z, player->vel.x, player->vel.y,
|
||||
player->vel.z, (Rand_ZeroOne() * 0.02f) + 0.02f, player->num + 1);
|
||||
func_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y,
|
||||
player->hit1.z, player->vel.x, player->vel.y, player->vel.z, RAND_FLOAT(0.02f) + 0.02f,
|
||||
player->num + 1);
|
||||
}
|
||||
}
|
||||
if (player->wings.leftState <= WINGSTATE_BROKEN) {
|
||||
if (!(gGameFrameCount & 1) && (D_80177D88[player->num] != 0)) {
|
||||
func_8007D10C(((Rand_ZeroOne() - 0.5f) * 10.0f) + player->hit2.x,
|
||||
(Rand_ZeroOne() * 5.0f) + player->hit2.y, player->hit2.z, 1.0f);
|
||||
func_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y,
|
||||
player->hit2.z, 1.0f);
|
||||
}
|
||||
if (!(gGameFrameCount & 1) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 5.0f) + player->hit2.x,
|
||||
(Rand_ZeroOne() * 5.0f) + player->hit2.y, player->hit2.z, player->vel.x, player->vel.y,
|
||||
player->vel.z, (Rand_ZeroOne() * 0.02f) + 0.02f, player->num + 1);
|
||||
func_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y,
|
||||
player->hit2.z, player->vel.x, player->vel.y, player->vel.z, RAND_FLOAT(0.02f) + 0.02f,
|
||||
player->num + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -233,15 +233,13 @@ void func_800A46A0(Player* player) {
|
||||
sp40 = 30.0f;
|
||||
}
|
||||
if (!(gGameFrameCount & var_v1)) {
|
||||
func_8007D10C(((Rand_ZeroOne() - 0.5f) * 10.0f) + player->pos.x,
|
||||
(Rand_ZeroOne() * 10.0f) + (player->pos.y + sp40),
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + player->unk_138, 2.2f);
|
||||
func_8007D10C(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f),
|
||||
player->unk_138 + RAND_FLOAT_CENTERED(10.0f), 2.2f);
|
||||
}
|
||||
if (!((var_v1 >> 2) & gGameFrameCount) && (Rand_ZeroOne() < 0.5f)) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 30.0f) + player->pos.x,
|
||||
(Rand_ZeroOne() * 10.0f) + (player->pos.y + sp40),
|
||||
((Rand_ZeroOne() - 0.5f) * 30.0f) + player->unk_138, player->vel.x, player->vel.y,
|
||||
player->vel.z, (Rand_ZeroOne() * 0.03f) + 0.04f, player->num + 1);
|
||||
func_8007C484(player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f),
|
||||
player->unk_138 + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, player->vel.z,
|
||||
0.04f + RAND_FLOAT(0.03f), player->num + 1);
|
||||
if (player->timer_224 == 0) {
|
||||
player->timer_224 = 2;
|
||||
}
|
||||
@ -552,8 +550,8 @@ void func_800A5D6C(void) {
|
||||
MEM_ARRAY_ALLOCATE(D_80178298, 1000);
|
||||
Rand_SetSeed(1, 29000, 9876);
|
||||
for (i = 0; i < 1000; i++) {
|
||||
D_80178288[i] = (Rand_ZeroOneSeeded() * 480.0f) - 80.0f;
|
||||
D_80178290[i] = (Rand_ZeroOneSeeded() * 360.0f) - 60.0f;
|
||||
D_80178288[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f;
|
||||
D_80178290[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f;
|
||||
D_80178298[i] = FILL_COLOR(D_800C9C3C[i % ARRAY_COUNT(D_800C9C3C)]);
|
||||
}
|
||||
}
|
||||
@ -739,7 +737,7 @@ void func_800A670C(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) {
|
||||
actor->obj.pos.z = zPos;
|
||||
actor->gravity = 0.5f;
|
||||
if ((state == 0) || (state == 1)) {
|
||||
actor->vel.y = (Rand_ZeroOne() * 5.0f) + 10.0f;
|
||||
actor->vel.y = RAND_FLOAT(5.0f) + 10.0f;
|
||||
actor->vel.x = 10.0f;
|
||||
|
||||
if (state == 0) {
|
||||
@ -748,27 +746,27 @@ void func_800A670C(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) {
|
||||
actor->timer_0BC = 15;
|
||||
} else {
|
||||
if (gLevelType == LEVELTYPE_PLANET) {
|
||||
actor->vel.y = (Rand_ZeroOne() * 7.0f) + 7.0f;
|
||||
actor->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->vel.z = (Rand_ZeroOne() * 5.0f) + 5.0f;
|
||||
actor->vel.y = RAND_FLOAT(7.0f) + 7.0f;
|
||||
actor->vel.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
actor->vel.z = RAND_FLOAT(5.0f) + 5.0f;
|
||||
if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
actor->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->vel.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
}
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 10.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(10.0f) + 10;
|
||||
} else {
|
||||
actor->vel.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->vel.y = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->vel.z = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 25.0f) + 25;
|
||||
actor->vel.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
actor->vel.y = RAND_FLOAT_CENTERED(10.0f);
|
||||
actor->vel.z = RAND_FLOAT_CENTERED(10.0f);
|
||||
actor->timer_0BC = RAND_INT(25.0f) + 25;
|
||||
actor->gravity = 0.0f;
|
||||
}
|
||||
if (state == 2) {
|
||||
actor->scale = (Rand_ZeroOne() * 1.5f) + 0.75f;
|
||||
actor->scale = RAND_FLOAT(1.5f) + 0.75f;
|
||||
} else if (state == 4) {
|
||||
actor->scale = (Rand_ZeroOne() * 0.8f) + 0.3f;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 50.0f) + 70;
|
||||
actor->scale = RAND_FLOAT(0.8f) + 0.3f;
|
||||
actor->timer_0BC = RAND_INT(50.0f) + 70;
|
||||
}
|
||||
actor->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
actor->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
}
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
@ -1830,14 +1828,12 @@ void func_800A8BA4(Player* player) {
|
||||
player->timer_498 = 5;
|
||||
player->unk_0D8.y = 30.0f;
|
||||
boss->dmgType = DMG_BEAM;
|
||||
func_8007BFFC(player->pos.x + (10.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
player->pos.y + (10.0f * Rand_ZeroOne()),
|
||||
player->unk_138 + (10.0f * (Rand_ZeroOne() - 0.5f)), 0.0f, 15.0f, 0.0f, 2.0f, 5);
|
||||
func_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT(10.0f),
|
||||
player->unk_138 + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5);
|
||||
for (j = 0; j < 10; j++) {
|
||||
func_8007C484(player->pos.x + (30.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
player->pos.y + (10.0f * Rand_ZeroOne()),
|
||||
player->unk_138 + (30.0f * (Rand_ZeroOne() - 0.5f)), player->vel.x,
|
||||
20.0f + player->vel.y, player->vel.z, (Rand_ZeroOne() * 0.1f) + 0.1f,
|
||||
func_8007C484(player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + RAND_FLOAT(10.0f),
|
||||
player->unk_138 + RAND_FLOAT_CENTERED(30.0f), player->vel.x,
|
||||
20.0f + player->vel.y, player->vel.z, RAND_FLOAT(0.1f) + 0.1f,
|
||||
player->num + 11);
|
||||
}
|
||||
break;
|
||||
@ -2204,7 +2200,7 @@ void func_800AA800(Player* player) {
|
||||
player->unk_068 = spB0.y;
|
||||
player->unk_248 = spA8[0];
|
||||
player->unk_24C = spA8[1];
|
||||
player->unk_070 = (sp120 / 180.0f) * M_PI;
|
||||
player->unk_070 = DEG_TO_RAD(sp120);
|
||||
}
|
||||
} else {
|
||||
colId = COL2_0;
|
||||
@ -2215,7 +2211,7 @@ void func_800AA800(Player* player) {
|
||||
player->unk_068 = spBC.y;
|
||||
player->unk_248 = spBC.x;
|
||||
player->unk_24C = spBC.z;
|
||||
player->unk_070 = (sp120 / 180.0f) * M_PI;
|
||||
player->unk_070 = DEG_TO_RAD(sp120);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2265,7 +2261,7 @@ void func_800AA800(Player* player) {
|
||||
player->unk_06C = player->unk_138 + var_fs1;
|
||||
player->unk_248 = spBC.x;
|
||||
player->unk_24C = spBC.z;
|
||||
player->unk_070 = (sp120 / 180.0f) * M_PI;
|
||||
player->unk_070 = DEG_TO_RAD(sp120);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2311,8 +2307,8 @@ void func_800AA800(Player* player) {
|
||||
if (gGroundLevel < player->unk_068) {
|
||||
player->unk_068 = spEC.y + 15.0f + tempy;
|
||||
player->unk_06C = spEC.z + 10.0f + tempz;
|
||||
player->unk_248 = (sp100 / 180.0f) * M_PI;
|
||||
player->unk_070 = (sp120 / 180.0f) * M_PI;
|
||||
player->unk_248 = DEG_TO_RAD(sp100);
|
||||
player->unk_070 = DEG_TO_RAD(sp120);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -2716,8 +2712,8 @@ void func_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerS
|
||||
shot->obj.rot.z = player->unk_0F8;
|
||||
if (shotId == PLAYERSHOT_8) {
|
||||
if (gCurrentLevel == LEVEL_AQUAS) {
|
||||
shot->unk_58 = Rand_ZeroOne() * 360.0f;
|
||||
shot->unk_60 = Rand_ZeroOne() * 360.0f;
|
||||
shot->unk_58 = RAND_INT(360.0f);
|
||||
shot->unk_60 = RAND_INT(360.0f);
|
||||
shot->unk_2C = player->unk_0E4 + player->unk_4D8;
|
||||
shot->unk_30 = player->unk_0E8;
|
||||
shot->unk_34 = player->unk_0F8;
|
||||
@ -3184,8 +3180,8 @@ void func_800ADD98(Player* player) {
|
||||
player->timer_1E4 = 10;
|
||||
}
|
||||
}
|
||||
player->unk_18C = fabsf(__sinf(player->unk_12C * M_DTOR) * 25.0f);
|
||||
player->unk_18C += fabsf(__sinf(player->unk_130 * M_DTOR) * 20.0f);
|
||||
player->unk_18C = fabsf(SIN_DEG(player->unk_12C) * 25.0f);
|
||||
player->unk_18C += fabsf(SIN_DEG(player->unk_130) * 20.0f);
|
||||
}
|
||||
|
||||
void func_800ADF58(Player* player) {
|
||||
@ -3732,7 +3728,7 @@ void func_800AF928(Player* player) {
|
||||
sp44.y = 0.0f;
|
||||
sp44.z = player->unk_0D0;
|
||||
sp44.z -= fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f);
|
||||
sp44.z += __sinf(player->unk_000 * M_DTOR) * player->unk_110;
|
||||
sp44.z += SIN_DEG(player->unk_000) * player->unk_110;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38);
|
||||
player->vel.x = sp38.x;
|
||||
player->vel.z = sp38.z;
|
||||
@ -3788,7 +3784,7 @@ void func_800AF928(Player* player) {
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
if (player->unk_1D4 != 0) {
|
||||
player->unk_0F4 += player->unk_0D0 * 5.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 0.7f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f;
|
||||
}
|
||||
func_800A46A0(player);
|
||||
}
|
||||
@ -3851,7 +3847,7 @@ void func_800B0194(Player* player) {
|
||||
Math_SmoothStepToF(&player->unk_168, -sp74 * 0.3f, 0.1f, 10.0f, 0.00001f);
|
||||
} else {
|
||||
if (((gGameFrameCount & 0xF) == 0) && (Rand_ZeroOne() < 0.5f)) {
|
||||
player->unk_17C = (Rand_ZeroOne() - 0.5f) * 100.0f;
|
||||
player->unk_17C = RAND_FLOAT_CENTERED(100.0f);
|
||||
}
|
||||
if (((gGameFrameCount & 0xF) == 3) && (Rand_ZeroOne() < 0.5f)) {
|
||||
player->unk_174 = (Rand_ZeroOne() - 0.2f) * 50.0f;
|
||||
@ -3896,7 +3892,7 @@ void func_800B0194(Player* player) {
|
||||
if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_301CFEC)) {
|
||||
player->unk_00C = 0.0f;
|
||||
}
|
||||
player->unk_080 = 2.0f * __sinf((player->unk_20C + 7) * 24.0f * M_DTOR);
|
||||
player->unk_080 = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f);
|
||||
if (player->unk_080 < -0.5f) {
|
||||
player->unk_080 = -0.5f;
|
||||
}
|
||||
@ -4838,17 +4834,17 @@ void func_800B3314(Player* player) {
|
||||
player->unk_0D4 = -0.4f;
|
||||
Math_SmoothStepToF(&D_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f);
|
||||
if ((gCamCount == 1) && !(gGameFrameCount & 1)) {
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 20.0f) + player->pos.x, player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, (2.0f * Rand_ZeroOne()) + 4.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, player->unk_138 - 10.0f,
|
||||
RAND_FLOAT(2.0f) + 4.0f);
|
||||
}
|
||||
} else if ((gCamCount == 1) && !(gGameFrameCount & 3) && (player->unk_1DC == 0)) {
|
||||
if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) {
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, (2.0f * Rand_ZeroOne()) + 3.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.0f);
|
||||
}
|
||||
if ((player->unk_170 > 0.2f) && (player->timer_220 == 0)) {
|
||||
func_8007BC7C(((Rand_ZeroOne() - 0.5f) * 10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, (2.0f * Rand_ZeroOne()) + 3.0f);
|
||||
func_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4935,15 +4931,14 @@ void func_800B39E0(Player* player) {
|
||||
}
|
||||
player->unk_1F4--;
|
||||
if (player->form == FORM_ARWING) {
|
||||
player->unk_134 =
|
||||
(__sinf(player->unk_1F4 * 400.0f * M_DTOR) * player->unk_1F4) * D_800D3164[player->unk_21C];
|
||||
player->unk_134 = (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C];
|
||||
if (player->state_1C8 == PLAYERSTATE_1C8_3) {
|
||||
player->unk_084 =
|
||||
(__sinf(player->unk_1F4 * 400.0f * M_DTOR) * player->unk_1F4) * D_800D3164[player->unk_21C] * 0.8f;
|
||||
(SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C] * 0.8f;
|
||||
}
|
||||
} else {
|
||||
player->unk_134 =
|
||||
(__sinf(player->unk_1F4 * 400.0f * M_DTOR) * player->unk_1F4) * D_800D3164[player->unk_21C] * 1.5f;
|
||||
(SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C] * 1.5f;
|
||||
player->unk_084 = 0.0f;
|
||||
}
|
||||
if ((gLevelMode != LEVELMODE_UNK_2) &&
|
||||
@ -5179,7 +5174,7 @@ void func_800B46F8(Player* player) {
|
||||
if ((player->shields < 0x40) && ((gTeamShields[1] > 0) || (gTeamShields[3] > 0) || (gTeamShields[2] > 0))) {
|
||||
do {
|
||||
do {
|
||||
teamId = (s32) (Rand_ZeroOne() * 2.9f) + 1;
|
||||
teamId = RAND_INT(2.9f) + 1;
|
||||
} while (gTeamShields[teamId] <= 0);
|
||||
} while (0); // macro?
|
||||
switch (teamId) {
|
||||
@ -5311,7 +5306,7 @@ void func_800B48BC(Player* player) {
|
||||
} else if (D_80177E7C != 0) {
|
||||
if (gPlayerInactive[player->num] == true) {
|
||||
do {
|
||||
sp1C4 = (s32) (Rand_ZeroOne() * 3.9f);
|
||||
sp1C4 = RAND_INT(3.9f);
|
||||
} while (gPlayerInactive[sp1C4]);
|
||||
player->unk_288 = sp1C4 + 1;
|
||||
player->state_1C8 = PLAYERSTATE_1C8_13;
|
||||
@ -5640,7 +5635,7 @@ void func_800B5FBC(Player* player, s32 playerNum, bool arg2) {
|
||||
}
|
||||
if (((var_v0 & gGameFrameCount) == (gPlayerNum * 32)) || arg2) {
|
||||
for (i = 0; i < 100; i++) {
|
||||
playerNum = (s32) (Rand_ZeroOne() * 3.9f);
|
||||
playerNum = RAND_INT(3.9f);
|
||||
if ((gPlayer[playerNum].state_1C8 != PLAYERSTATE_1C8_13) && !gPlayerInactive[playerNum]) {
|
||||
break;
|
||||
}
|
||||
@ -5881,10 +5876,10 @@ void func_800B6F50(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
|
||||
sp28 = -Math_Atan2F(arg0 - arg3, arg2 - arg5);
|
||||
var_ft5 = sqrtf(SQ(arg2 - arg5) + SQ(arg0 - arg3));
|
||||
sp2C = -Math_Atan2F(arg1 - arg4, var_ft5);
|
||||
if (sp28 >= M_PI / 2.0f) {
|
||||
if (sp28 >= M_PI / 2) {
|
||||
sp28 -= M_PI;
|
||||
}
|
||||
if (sp28 <= -M_PI / 2.0f) {
|
||||
if (sp28 <= -M_PI / 2) {
|
||||
sp28 += M_PI;
|
||||
}
|
||||
var_ft5 = 0.0f;
|
||||
@ -6189,9 +6184,9 @@ void func_800B79B0(void) {
|
||||
var_a0 = MIN(gPlayer[0].shields, 0xFF);
|
||||
func_8001D1C8(var_a0, sp3A);
|
||||
if (!(gGameFrameCount & 7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) {
|
||||
func_i3_8019E8B8((Rand_ZeroOne() - 0.5f) * 6000.0f, -80.0f,
|
||||
gPlayer[0].unk_138 + ((Rand_ZeroOne() * 2000.0f) + -6000.0f),
|
||||
(Rand_ZeroOne() * 10.0f) + 20.0f);
|
||||
func_i3_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f,
|
||||
gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f),
|
||||
RAND_FLOAT(10.0f) + 20.0f); // check
|
||||
}
|
||||
func_8008C104(D_60229A4, D_6010198);
|
||||
if (gPlayer[0].shields == 0) {
|
||||
@ -6264,13 +6259,13 @@ void func_800B832C(void) {
|
||||
if (var_fv1 > 20.0f) {
|
||||
var_fv1 = 20.0f;
|
||||
}
|
||||
D_8017847C = var_fv1 * __sinf(gGameFrameCount * 70.0f * M_DTOR);
|
||||
D_8017847C = var_fv1 * SIN_DEG(gGameFrameCount * 70.0f);
|
||||
}
|
||||
func_800B79B0();
|
||||
}
|
||||
|
||||
void func_800B852C(ObjectId objId, Item* item) {
|
||||
u8 sp1F = Rand_ZeroOne() * 5.0f;
|
||||
u8 sp1F = (u8) RAND_FLOAT(5.0f);
|
||||
|
||||
if (D_800D317C == sp1F) {
|
||||
D_80177844 -= 1;
|
||||
|
@ -81,44 +81,44 @@ void Texture_Mottle(void* dst, void* src, u8 mode) {
|
||||
src = SEGMENTED_TO_VIRTUAL(src);
|
||||
switch (mode) {
|
||||
case 2:
|
||||
for (var_s3 = 0; var_s3 < 0x400; var_s3 += 0x20) {
|
||||
temp_ft3 = 3.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 4)) % 0x20U) * (M_PI / 16.0f));
|
||||
for (var_v1 = 0; var_v1 < 0x20; var_v1++) {
|
||||
for (var_s3 = 0; var_s3 < 32 * 32; var_s3 += 32) {
|
||||
temp_ft3 = 3.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32));
|
||||
for (var_v1 = 0; var_v1 < 32; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 0x20U] = ((u16*) src)[var_s3 + var_v1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
for (var_s3 = 0; var_s3 < 0x580; var_s3 += 0x40) {
|
||||
temp_ft3 = __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 0x20U) * (M_PI / 4.0f));
|
||||
for (var_v1 = 0; var_v1 < 0x40; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 0x40U] = ((u16*) src)[var_s3 + var_v1];
|
||||
for (var_s3 = 0; var_s3 < 22 * 64; var_s3 += 64) {
|
||||
temp_ft3 = __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 8));
|
||||
for (var_v1 = 0; var_v1 < 64; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 64U] = ((u16*) src)[var_s3 + var_v1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
for (var_s3 = 0; var_s3 < 0x100; var_s3 += 0x10) {
|
||||
temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 16) + (gGameFrameCount / 2)) % 0x10U) * (M_PI / 8.0f));
|
||||
for (var_v1 = 0; var_v1 < 0x10; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 0x10U] = ((u16*) src)[var_s3 + var_v1];
|
||||
for (var_s3 = 0; var_s3 < 16 * 16; var_s3 += 16) {
|
||||
temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 16) + (gGameFrameCount / 2)) % 16U) * (2 * M_PI / 16));
|
||||
for (var_v1 = 0; var_v1 < 16; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 16U] = ((u16*) src)[var_s3 + var_v1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
for (var_s3 = 0; var_s3 < 0x400; var_s3 += 0x20) {
|
||||
temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 2)) % 0x20U) * (M_PI / 16.0f));
|
||||
for (var_v1 = 0; var_v1 < 0x20; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 0x20U] = ((u16*) src)[var_s3 + var_v1];
|
||||
for (var_s3 = 0; var_s3 < 32 * 32; var_s3 += 32) {
|
||||
temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32));
|
||||
for (var_v1 = 0; var_v1 < 32; var_v1++) {
|
||||
((u16*) dst)[var_s3 + (temp_ft3 + var_v1) % 32U] = ((u16*) src)[var_s3 + var_v1];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
var_s0_2 = (u8*) dst;
|
||||
var_s4_2 = (u8*) src;
|
||||
for (var_s3 = 0; var_s3 < 0x1000; var_s3 += 0x40) {
|
||||
temp_ft3 = 4.0f * __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 0x20U) * (M_PI / 16.0f));
|
||||
for (var_v1 = 0; var_v1 < 0x40; var_v1++) {
|
||||
var_s0_2[var_s3 + (temp_ft3 + var_v1) % 0x40U] = var_s4_2[var_s3 + var_v1];
|
||||
for (var_s3 = 0; var_s3 < 64 * 64; var_s3 += 64) {
|
||||
temp_ft3 = 4.0f * __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32));
|
||||
for (var_v1 = 0; var_v1 < 64; var_v1++) {
|
||||
var_s0_2[var_s3 + (temp_ft3 + var_v1) % 64U] = var_s4_2[var_s3 + var_v1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,15 +142,15 @@ void func_800438E0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) {
|
||||
effect->obj.pos.x = xPos;
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->vel.x = Rand_ZeroOne() - (2.0f * Rand_ZeroOne());
|
||||
effect->vel.y = ((Rand_ZeroOne() * 3.0f) - (gPlayer[0].vel.z / 5.0f)) + 3.0f;
|
||||
effect->vel.z = ((Rand_ZeroOne() * 3.0f) - (gPlayer[0].vel.z / 5.0f)) + 2.0f;
|
||||
effect->scale2 = ((Rand_ZeroOne() * 0.8f) + 0.3f) * scale;
|
||||
effect->timer_50 = (s32) (Rand_ZeroOne() * 5.0f) + 8;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.x = RAND_FLOAT(1.0f) - RAND_FLOAT(2.0f);
|
||||
effect->vel.y = RAND_FLOAT(3.0f) - (gPlayer[0].vel.z / 5.0f) + 3.0f;
|
||||
effect->vel.z = RAND_FLOAT(3.0f) - (gPlayer[0].vel.z / 5.0f) + 2.0f;
|
||||
effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale;
|
||||
effect->timer_50 = RAND_INT(5.0f) + 8;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ void func_80043B18(Player* player) {
|
||||
if (player->unk_1DC != 0) {
|
||||
|
||||
sp48.x = 0.0f;
|
||||
sp48.z = ((Rand_ZeroOne() - 0.5f) * 50.0f) + -20.0f;
|
||||
sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f;
|
||||
if (player->unk_1EC < 0) {
|
||||
sp38 -= 65.0f;
|
||||
} else {
|
||||
@ -366,8 +366,8 @@ void func_800444BC(Player* player) {
|
||||
if (player->vel.y) {} // fake?
|
||||
player->pos.y += 7.0f;
|
||||
}
|
||||
player->unk_104 = (sp40 * 180.0f) / M_PI;
|
||||
player->unk_10C = (sp3C * 180.0f) / M_PI;
|
||||
player->unk_104 = RAD_TO_DEG(sp40);
|
||||
player->unk_10C = RAD_TO_DEG(sp3C);
|
||||
if (gCurrentLevel == LEVEL_MACBETH) {
|
||||
if (player->unk_104 > 90.0f) {
|
||||
player->unk_104 = -(180 - player->unk_104);
|
||||
@ -449,7 +449,7 @@ void func_80044868(Player* player) {
|
||||
player->unk_184 = -15.0f;
|
||||
}
|
||||
}
|
||||
player->vel.z = -(__cosf(player->unk_108 * M_DTOR) * __cosf(player->unk_104 * M_DTOR) * sp2C);
|
||||
player->vel.z = -(COS_DEG(player->unk_108) * COS_DEG(player->unk_104) * sp2C);
|
||||
if ((player->vel.x < 20.0f) && (player->unk_10C < -30.0f)) {
|
||||
Math_SmoothStepToF(&player->vel.x, -player->unk_10C * 0.5f, 0.2f, 3.0f, 0.0f);
|
||||
player->unk_184 = 0.0f;
|
||||
@ -457,12 +457,11 @@ void func_80044868(Player* player) {
|
||||
Math_SmoothStepToF(&player->vel.x, -player->unk_10C * 0.5f, 0.2f, 3.0f, 0.0f);
|
||||
player->unk_184 = 0.0f;
|
||||
} else {
|
||||
Math_SmoothStepToF(&player->vel.x, player->unk_184 - (__sinf(player->unk_108 * M_DTOR) * sp2C), 0.5f, 5.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToF(&player->vel.x, player->unk_184 - (SIN_DEG(player->unk_108) * sp2C), 0.5f, 5.0f, 0.0f);
|
||||
}
|
||||
player->vel.z += fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f);
|
||||
if (player->unk_000 == 0) {
|
||||
player->vel.z += __sinf(player->unk_0E4 * M_DTOR) * player->unk_110;
|
||||
player->vel.z += SIN_DEG(player->unk_0E4) * player->unk_110;
|
||||
}
|
||||
if (D_800C9F00 != 0) {
|
||||
player->vel.z = 2.0f * D_800C9F00;
|
||||
@ -495,7 +494,7 @@ void func_80044868(Player* player) {
|
||||
if (player->unk_1D4 != 0) {
|
||||
player->unk_0A0 = 0.0f;
|
||||
player->unk_0F4 += player->unk_0D0 * 5.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 0.7f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f;
|
||||
if (D_800C9F04 == 0) {
|
||||
if (player->unk_0D0 != 0.0f) {
|
||||
func_80043B18(player);
|
||||
@ -552,8 +551,8 @@ void func_80045130(Player* player) {
|
||||
player->timer_1E4 = 10;
|
||||
}
|
||||
}
|
||||
player->unk_18C = fabsf(__sinf(player->unk_12C * M_DTOR) * 25.0f);
|
||||
player->unk_18C += fabsf(__sinf(player->unk_130 * M_DTOR) * 20.0f);
|
||||
player->unk_18C = fabsf(SIN_DEG(player->unk_12C) * 25.0f);
|
||||
player->unk_18C += fabsf(SIN_DEG(player->unk_130) * 20.0f);
|
||||
}
|
||||
|
||||
void func_80045348(Player* player) {
|
||||
@ -693,19 +692,19 @@ void func_80045678(Player* player) {
|
||||
Math_SmoothStepToF(&player->vel.y, 0.0f, 0.1f, 2.0f, 0);
|
||||
}
|
||||
if ((gCamCount == 1) && !(gGameFrameCount & 1)) {
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 20.0f) + player->pos.x, player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, (2.0f * Rand_ZeroOne()) + 3.5f, 0xFF, 0x10, 1);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, player->unk_138 - 10.0f,
|
||||
RAND_FLOAT(2.0f) + 3.5f, 0xFF, 0x10, 1);
|
||||
}
|
||||
} else {
|
||||
D_800C9F3C = 0;
|
||||
if ((gCamCount == 1) && !(gGameFrameCount & 3) && (player->unk_1DC == 0)) {
|
||||
if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) {
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, Rand_ZeroOne() + 1.5f, 0xFF, 0xF, 0);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 0xFF, 0xF, 0);
|
||||
}
|
||||
if ((player->unk_170 > 0.2f) && (player->timer_220 == 0)) {
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, Rand_ZeroOne() + 1.5f, 0xFF, 0xF, 0);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f,
|
||||
player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 0xFF, 0xF, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,10 +455,10 @@ s32 func_800BE564(void) {
|
||||
|
||||
if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) {
|
||||
if (sUnlockLandmaster && sUnlockOnFoot) {
|
||||
D_80178780[i] = (s32) (Rand_ZeroOne() * 3.0f) + 1;
|
||||
D_80178780[i] = RAND_INT(3.0f) + 1;
|
||||
}
|
||||
if (sUnlockLandmaster && !sUnlockOnFoot) {
|
||||
D_80178780[i] = (s32) (Rand_ZeroOne() * 2.0f) + 1;
|
||||
D_80178780[i] = RAND_INT(2.0f) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -666,10 +666,10 @@ s32 func_800BF17C(void) {
|
||||
gPlayer[i].unk_1D0 = 0;
|
||||
if ((!D_80178780[i]) && (D_801787F8[i] == 0)) {
|
||||
if (sUnlockLandmaster && sUnlockOnFoot) {
|
||||
D_80178780[i] = (s32) (Rand_ZeroOne() * 3.0f) + 1;
|
||||
D_80178780[i] = RAND_INT(3.0f) + 1;
|
||||
}
|
||||
if (sUnlockLandmaster && !sUnlockOnFoot) {
|
||||
D_80178780[i] = (s32) (Rand_ZeroOne() * 2.0f) + 1;
|
||||
D_80178780[i] = RAND_INT(2.0f) + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1878,24 +1878,24 @@ void func_800C2244(Actor* actor) {
|
||||
boolTemp = true;
|
||||
|
||||
if (actor->timer_0BC == 0) {
|
||||
y = Rand_ZeroOne() * 1000.0f;
|
||||
x = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
z = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
y = RAND_FLOAT(1000.0f);
|
||||
x = RAND_FLOAT_CENTERED(10000.0f);
|
||||
z = RAND_FLOAT_CENTERED(10000.0f);
|
||||
|
||||
if ((fabsf(actor->obj.pos.x - x) > 2000.0f) || (fabsf(actor->obj.pos.z - z) > 2000.0f)) {
|
||||
actor->fwork[4] = x;
|
||||
actor->fwork[5] = y;
|
||||
actor->fwork[6] = z;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(20.0f) + 10;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
sinX = __sinf(M_DTOR * (actor->obj.rot.x));
|
||||
cosX = __cosf(M_DTOR * (actor->obj.rot.x));
|
||||
sinY = __sinf(M_DTOR * (actor->obj.rot.y));
|
||||
cosY = __cosf(M_DTOR * (actor->obj.rot.y));
|
||||
sinX = SIN_DEG(actor->obj.rot.x);
|
||||
cosX = COS_DEG(actor->obj.rot.x);
|
||||
sinY = SIN_DEG(actor->obj.rot.y);
|
||||
cosY = COS_DEG(actor->obj.rot.y);
|
||||
|
||||
if (boolTemp) {
|
||||
x = actor->fwork[4] - actor->obj.pos.x;
|
||||
@ -1996,7 +1996,7 @@ void func_800C26C8(void) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_ACTIVE;
|
||||
actor->obj.id = 197;
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * (Rand_ZeroOne() * 360.0f), 0);
|
||||
Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), 0);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
actor->obj.pos.x = dest.x;
|
||||
actor->obj.pos.y = dest.y;
|
||||
|
@ -22,9 +22,9 @@ void func_i1_801875A4(Object_4C* obj4C) {
|
||||
f32 var_f;
|
||||
|
||||
if (!(gGameFrameCount & 3)) {
|
||||
sp1C = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
sp18 = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
var_f = ((Rand_ZeroOne() * 0.5f) + 1.0f);
|
||||
sp1C = RAND_FLOAT_CENTERED(10.0f);
|
||||
sp18 = RAND_FLOAT_CENTERED(10.0f);
|
||||
var_f = RAND_FLOAT(0.5f) + 1.0f;
|
||||
func_8007C85C(obj4C->obj.pos.x + sp1C, obj4C->obj.pos.y + sp18, obj4C->obj.pos.z, 4.0f * var_f);
|
||||
}
|
||||
}
|
||||
@ -185,8 +185,8 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
boss->swork[3] = 15;
|
||||
boss->swork[20] = 30;
|
||||
boss->swork[28] -= boss->damage;
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[12] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_i1_8019B6D8[13],
|
||||
D_i1_8019B6D8[14] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f);
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[12] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[13],
|
||||
D_i1_8019B6D8[14] + RAND_FLOAT_CENTERED(60.0f), 2.0f);
|
||||
func_i1_80187A38(boss, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.1f, 20);
|
||||
if (boss->swork[28] <= 0) {
|
||||
boss->swork[3] = 1000;
|
||||
@ -200,8 +200,8 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
boss->swork[21] = 30;
|
||||
boss->swork[26] -= boss->damage;
|
||||
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[6] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_i1_8019B6D8[7],
|
||||
D_i1_8019B6D8[8] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f);
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[6] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[7],
|
||||
D_i1_8019B6D8[8] + RAND_FLOAT_CENTERED(60.0f), 2.0f);
|
||||
func_i1_80187A38(boss, D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 0.1f, 20);
|
||||
if (boss->swork[26] <= 0) {
|
||||
boss->swork[2] = 1000;
|
||||
@ -212,8 +212,8 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
boss->swork[1] = 15;
|
||||
boss->swork[22] = 30;
|
||||
boss->swork[27] -= boss->damage;
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[0] + ((Rand_ZeroOne() - 0.5f) * 60.0f), D_i1_8019B6D8[1],
|
||||
D_i1_8019B6D8[2] + ((Rand_ZeroOne() - 0.5f) * 60.0f), 2.0f);
|
||||
func_i1_801879F0(boss, D_i1_8019B6D8[0] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[1],
|
||||
D_i1_8019B6D8[2] + RAND_FLOAT_CENTERED(60.0f), 2.0f);
|
||||
func_i1_80187A38(boss, D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 0.1f, 20);
|
||||
if (boss->swork[27] <= 0) {
|
||||
boss->swork[1] = 1000;
|
||||
@ -234,8 +234,7 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
func_800430DC(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2],
|
||||
D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2],
|
||||
D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f,
|
||||
(Rand_ZeroOne() * 20.0f), 0.0f, 5.5f, var_s1 + 0x1C,
|
||||
((s32) (Rand_ZeroOne() * 30.0f)) + 60.0f);
|
||||
RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 0x1C, RAND_INT(30.0f) + 60.0f);
|
||||
}
|
||||
if (boss->state < 5) {
|
||||
boss->state = 5;
|
||||
@ -254,8 +253,7 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
func_800430DC(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2],
|
||||
D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2],
|
||||
D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f,
|
||||
(Rand_ZeroOne() * 20.0f), 0.0f, 5.5f, var_s1 + 0x1C,
|
||||
((s32) (Rand_ZeroOne() * 30.0f)) + 60.0f);
|
||||
RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 0x1C, RAND_INT(30.0f) + 60.0f);
|
||||
}
|
||||
if (boss->state < 5) {
|
||||
boss->state = 6;
|
||||
@ -279,7 +277,7 @@ void func_i1_80187AC8(Boss* boss) {
|
||||
}
|
||||
if (boss->state < 5) {
|
||||
boss->state = 0;
|
||||
switch ((s32) (Rand_ZeroOne() * 5.0f)) {
|
||||
switch (RAND_INT(5.0f)) {
|
||||
case 0:
|
||||
boss->swork[31] = 2;
|
||||
break;
|
||||
@ -384,9 +382,9 @@ void func_i1_801887AC(Boss* boss) {
|
||||
sp3C.x = gPlayer[0].pos.x;
|
||||
sp3C.y = gPlayer[0].pos.y;
|
||||
sp3C.z = gPlayer[0].unk_138;
|
||||
gPlayer[0].pos.x += (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
gPlayer[0].pos.y += (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
gPlayer[0].unk_138 += (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f);
|
||||
gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f);
|
||||
gPlayer[0].unk_138 += RAND_FLOAT_CENTERED(300.0f);
|
||||
func_8007F11C(OBJ_EFFECT_376, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 60.0f);
|
||||
gPlayer[0].pos.x = sp3C.x;
|
||||
gPlayer[0].pos.y = sp3C.y;
|
||||
@ -403,10 +401,10 @@ void func_i1_80188A18(Boss* boss) {
|
||||
|
||||
if (boss->timer_050 == 0) {
|
||||
boss->state = 0;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 20.0f) + 20;
|
||||
boss->timer_050 = RAND_INT(20.0f) + 20;
|
||||
boss->fwork[14] = 0.0f;
|
||||
|
||||
switch ((s32) (Rand_ZeroOne() * 8.0f)) {
|
||||
switch (RAND_INT(8.0f)) {
|
||||
case 0:
|
||||
case 1:
|
||||
boss->swork[31] = 1;
|
||||
@ -489,7 +487,7 @@ void func_i1_80188D50(Boss* boss) {
|
||||
if ((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0)) {
|
||||
do {
|
||||
do {
|
||||
temp_ft3 = (s32) (Rand_ZeroOne() * 2.9f) + 1;
|
||||
temp_ft3 = RAND_INT(2.9f) + 1;
|
||||
} while (gTeamShields[temp_ft3] <= 0);
|
||||
} while (0);
|
||||
|
||||
@ -630,14 +628,14 @@ void func_i1_80189058(Boss* boss) {
|
||||
}
|
||||
|
||||
func_i1_80187AC8(boss);
|
||||
boss->fwork[0] = __sinf(boss->swork[18] * 50.0f * M_DTOR) * func_i1_80187A88(boss->swork[18]);
|
||||
boss->fwork[1] = __sinf(boss->swork[19] * 50.0f * M_DTOR) * func_i1_80187A88(boss->swork[19]);
|
||||
boss->fwork[2] = __sinf(boss->swork[20] * 50.0f * M_DTOR) * func_i1_80187A88(boss->swork[20]);
|
||||
boss->fwork[3] = __sinf(boss->swork[21] * 50.0f * M_DTOR) * func_i1_80187A88(boss->swork[21]);
|
||||
boss->fwork[4] = __sinf(boss->swork[22] * 50.0f * M_DTOR) * func_i1_80187A88(boss->swork[22]);
|
||||
boss->fwork[0] = SIN_DEG(boss->swork[18] * 50.0f) * func_i1_80187A88(boss->swork[18]);
|
||||
boss->fwork[1] = SIN_DEG(boss->swork[19] * 50.0f) * func_i1_80187A88(boss->swork[19]);
|
||||
boss->fwork[2] = SIN_DEG(boss->swork[20] * 50.0f) * func_i1_80187A88(boss->swork[20]);
|
||||
boss->fwork[3] = SIN_DEG(boss->swork[21] * 50.0f) * func_i1_80187A88(boss->swork[21]);
|
||||
boss->fwork[4] = SIN_DEG(boss->swork[22] * 50.0f) * func_i1_80187A88(boss->swork[22]);
|
||||
|
||||
if (boss->state < 5) {
|
||||
sp5C = __sinf(boss->swork[23] * 12.0f * M_DTOR) * func_i1_80187A88(boss->swork[23]) * 0.3f;
|
||||
sp5C = SIN_DEG(boss->swork[23] * 12.0f) * func_i1_80187A88(boss->swork[23]) * 0.3f;
|
||||
Math_SmoothStepToF(&boss->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f);
|
||||
}
|
||||
if (boss->obj.pos.y <= 10.0f) {
|
||||
@ -689,27 +687,27 @@ void func_i1_80189058(Boss* boss) {
|
||||
switch (boss->swork[31]) {
|
||||
case 1:
|
||||
boss->state = 1;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 50.0f) + 50;
|
||||
boss->timer_050 = RAND_INT(50.0f) + 50;
|
||||
boss->fwork[14] = 0.0f;
|
||||
break;
|
||||
case 2:
|
||||
boss->state = 2;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 100.0f) + 150;
|
||||
boss->timer_050 = RAND_INT(100.0f) + 150;
|
||||
boss->timer_052 = 40;
|
||||
boss->timer_054 = 40;
|
||||
boss->fwork[14] = 0.07f;
|
||||
break;
|
||||
case 4:
|
||||
boss->state = 4;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 70.0f) + 100;
|
||||
boss->timer_050 = RAND_INT(70.0f) + 100;
|
||||
boss->fwork[14] = 0.1f;
|
||||
D_i1_8019B6D8[66] = (Rand_ZeroOne() - 0.5f) * 6000.0f;
|
||||
D_i1_8019B6D8[67] = (Rand_ZeroOne() - 0.5f) * 6000.0f;
|
||||
D_i1_8019B6D8[66] = RAND_FLOAT_CENTERED(6000.0f);
|
||||
D_i1_8019B6D8[67] = RAND_FLOAT_CENTERED(6000.0f);
|
||||
boss->fwork[14] = 0.07f;
|
||||
break;
|
||||
case 3:
|
||||
boss->state = 3;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 100.0f) + 150;
|
||||
boss->timer_050 = RAND_INT(100.0f) + 150;
|
||||
boss->fwork[14] = 0.07f;
|
||||
break;
|
||||
}
|
||||
@ -797,9 +795,9 @@ void func_i1_80189058(Boss* boss) {
|
||||
boss->unk_05E = 0;
|
||||
D_8017812C = 1;
|
||||
if (!(gGameFrameCount & 7)) {
|
||||
D_i1_8019B6D8[17] = gPlayer[0].pos.x + ((Rand_ZeroOne() - 0.5f) * 2000.0f);
|
||||
D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f);
|
||||
D_i1_8019B6D8[18] = gPlayer[0].pos.y;
|
||||
D_i1_8019B6D8[19] = gPlayer[0].unk_138 + ((Rand_ZeroOne() - 0.5f) * 2000.0f);
|
||||
D_i1_8019B6D8[19] = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(2000.0f);
|
||||
}
|
||||
boss->fwork[12] += 0.05f;
|
||||
if (boss->state == 6) {
|
||||
@ -844,9 +842,9 @@ void func_i1_80189058(Boss* boss) {
|
||||
}
|
||||
}
|
||||
|
||||
boss->unk_068 = __sinf(boss->obj.rot.z * M_DTOR) * 30.0f;
|
||||
boss->unk_068 = SIN_DEG(boss->obj.rot.z) * 30.0f;
|
||||
if (!(gGameFrameCount & 0xF)) {
|
||||
boss->unk_04C = (s32) (Rand_ZeroOne() * 100.0f);
|
||||
boss->unk_04C = RAND_INT(100.0f);
|
||||
}
|
||||
Animation_GetFrameData(&D_602BC18, boss->unk_04C, sp84);
|
||||
boss->fwork[14] = 0.03f;
|
||||
@ -880,9 +878,9 @@ void func_i1_80189058(Boss* boss) {
|
||||
gShowBossHealth = 0;
|
||||
|
||||
for (sp218 = 0; sp218 < 100; sp218++) {
|
||||
func_80079618(D_i1_8019B6D8[62] + ((Rand_ZeroOne() - 0.5f) * 600.0f),
|
||||
(D_i1_8019B6D8[63] + ((Rand_ZeroOne() - 0.5f) * 500.0f)) - 100.0f,
|
||||
D_i1_8019B6D8[64] + ((Rand_ZeroOne() - 0.5f) * 600.0f), 2.0f);
|
||||
func_80079618(D_i1_8019B6D8[62] + RAND_FLOAT_CENTERED(600.0f),
|
||||
(D_i1_8019B6D8[63] + RAND_FLOAT_CENTERED(500.0f)) - 100.0f,
|
||||
D_i1_8019B6D8[64] + RAND_FLOAT_CENTERED(600.0f), 2.0f);
|
||||
}
|
||||
}
|
||||
if (boss->timer_050 < 50) {
|
||||
@ -1148,9 +1146,9 @@ void func_i1_8018ACE0(Actor* actor) {
|
||||
}
|
||||
}
|
||||
if ((actor->health < 11) && !(gGameFrameCount & 3)) {
|
||||
func_8007D2C8(((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 100.0f) + (actor->obj.pos.y + 200.0f),
|
||||
(Rand_ZeroOne() * 50.0f) + (actor->obj.pos.z + 50.0f), 3.0f);
|
||||
func_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f),
|
||||
actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f),
|
||||
actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f);
|
||||
func_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y,
|
||||
actor->vel.z, 0.1f, 10);
|
||||
}
|
||||
@ -1167,9 +1165,9 @@ void func_i1_8018AED0(Actor* actor) {
|
||||
func_i1_8018ACE0(actor);
|
||||
Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_602991C, actor->unk_0B6, sp40), 1.0f,
|
||||
1.0f, 1.0f);
|
||||
temp_sin = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
temp_sin = SIN_DEG(actor->obj.rot.y);
|
||||
actor->vel.x = actor->fwork[0] * temp_sin;
|
||||
temp_cos = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
temp_cos = COS_DEG(actor->obj.rot.y);
|
||||
actor->vel.z = actor->fwork[0] * temp_cos;
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
@ -1236,9 +1234,9 @@ void func_i1_8018B15C(Actor* actor) {
|
||||
|
||||
func_i1_8018ACE0(actor);
|
||||
obj80 = &gObjects80[actor->iwork[0]];
|
||||
temp_sin = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
temp_sin = SIN_DEG(actor->obj.rot.y);
|
||||
actor->vel.x = actor->fwork[0] * temp_sin;
|
||||
temp_cos = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
temp_cos = COS_DEG(actor->obj.rot.y);
|
||||
actor->vel.z = actor->fwork[0] * temp_cos;
|
||||
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0);
|
||||
|
||||
@ -1255,7 +1253,7 @@ void func_i1_8018B15C(Actor* actor) {
|
||||
Texture_Scroll(&D_60329C0, 16, 16, 1);
|
||||
if (actor->timer_0BC == 0) {
|
||||
actor->state = 2;
|
||||
actor->iwork[2] = (s32) (Rand_ZeroOne() * 10.0f) + 10;
|
||||
actor->iwork[2] = RAND_INT(10.0f) + 10;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
@ -1301,9 +1299,9 @@ void func_i1_8018B418(Actor* actor) {
|
||||
s32 pad2[4];
|
||||
|
||||
func_i1_8018ACE0(actor);
|
||||
temp_sin = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
temp_sin = SIN_DEG(actor->obj.rot.y);
|
||||
actor->vel.x = actor->fwork[0] * temp_sin;
|
||||
temp_cos = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
temp_cos = COS_DEG(actor->obj.rot.y);
|
||||
actor->vel.z = actor->fwork[0] * temp_cos;
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
@ -1344,9 +1342,9 @@ void func_i1_8018B58C(Actor* actor) {
|
||||
case 100:
|
||||
if (!(actor->timer_0BC & 3)) {
|
||||
|
||||
func_8007D2C8(((Rand_ZeroOne() - 0.5f) * 100.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 100.0f) + (actor->obj.pos.y + 200.0f),
|
||||
(Rand_ZeroOne() * 50.0f) + (actor->obj.pos.z + 50.0f), 3.0f);
|
||||
func_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f),
|
||||
actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f),
|
||||
actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f);
|
||||
func_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y,
|
||||
actor->vel.z, 0.1f, 10);
|
||||
Audio_PlaySfx(0x2903A008, actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
@ -1357,9 +1355,8 @@ void func_i1_8018B58C(Actor* actor) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
||||
func_800430DC(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f,
|
||||
spB4[i] * ((Rand_ZeroOne() * 0.75f) + 0.5f),
|
||||
spA4[i] * ((Rand_ZeroOne() * 0.75f) + 0.5f), (Rand_ZeroOne() - 0.5f) * 20.0f, 3.0f,
|
||||
i + 0x18, ((s32) (Rand_ZeroOne() * 30.0f) + 60.0f));
|
||||
spB4[i] * (RAND_FLOAT(0.75f) + 0.5f), spA4[i] * (RAND_FLOAT(0.75f) + 0.5f),
|
||||
RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f);
|
||||
}
|
||||
|
||||
if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f) &&
|
||||
@ -1923,8 +1920,8 @@ void func_i1_8018C19C(Boss* boss) {
|
||||
D_801779A8[0] = 20.0f;
|
||||
if (!(gGameFrameCount & 0x1F)) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 300.0f) + boss->obj.pos.x, boss->obj.pos.y,
|
||||
boss->obj.pos.z, 1.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z,
|
||||
1.0f);
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToF(&boss->obj.pos.x, boss->fwork[7], 1.0f, 10.0f, 0.00001f);
|
||||
@ -1971,8 +1968,8 @@ void func_i1_8018C19C(Boss* boss) {
|
||||
case 9:
|
||||
if (!(gGameFrameCount & 0xF)) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 300.0f) + boss->obj.pos.x, boss->obj.pos.y,
|
||||
boss->obj.pos.z, 1.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z,
|
||||
1.0f);
|
||||
}
|
||||
}
|
||||
Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f);
|
||||
@ -1994,8 +1991,8 @@ void func_i1_8018C19C(Boss* boss) {
|
||||
case 10:
|
||||
if (!(gGameFrameCount & 7)) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 300.0f) + boss->obj.pos.x, boss->obj.pos.y,
|
||||
boss->obj.pos.z, 1.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z,
|
||||
1.0f);
|
||||
}
|
||||
}
|
||||
if (boss->timer_050 == 0) {
|
||||
@ -2459,8 +2456,8 @@ void func_i1_8018F31C(Object_80* obj80) {
|
||||
void func_i1_8018F3BC(Object_80* obj80, f32 arg1) {
|
||||
Object_80_Initialize(obj80);
|
||||
obj80->obj.status = OBJ_INIT;
|
||||
obj80->obj.pos.x = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + arg1;
|
||||
obj80->obj.rot.y = (Rand_ZeroOne() * 90.0f) + 45.0f;
|
||||
obj80->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1;
|
||||
obj80->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f;
|
||||
if (arg1 > 0.0f) {
|
||||
obj80->obj.rot.y *= -1.0f;
|
||||
}
|
||||
@ -2496,14 +2493,14 @@ void func_i1_8018F55C(Effect* effect) {
|
||||
|
||||
Effect_Initialize(effect);
|
||||
effect->obj.status = OBJ_INIT;
|
||||
effect->obj.pos.x = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 500.0f);
|
||||
effect->obj.pos.x = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(500.0f);
|
||||
effect->obj.pos.y = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.8f) * 350.0f);
|
||||
effect->obj.id = OBJ_EFFECT_352;
|
||||
effect->timer_50 = 80;
|
||||
effect->unk_46 = 0x90;
|
||||
effect->obj.pos.z = -4000.0f;
|
||||
effect->vel.z = 60.0f;
|
||||
effect->scale2 = (Rand_ZeroOne() * 15.0f) + 10.0f;
|
||||
effect->scale2 = RAND_FLOAT(15.0f) + 10.0f;
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
effect->obj.rot.z = 180.0f;
|
||||
}
|
||||
@ -2545,7 +2542,7 @@ void func_i1_8018F6F8(Actor* actor, s32 arg1) {
|
||||
actor->obj.rot.z = D_i1_80199AD8[arg1];
|
||||
actor->state = 100;
|
||||
actor->obj.rot.y = 180.0f;
|
||||
actor->fwork[0] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[0] = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
actor->unk_0C9 = 1;
|
||||
actor->iwork[11] = 1;
|
||||
@ -2643,9 +2640,9 @@ void func_i1_8018F880(Player* player) {
|
||||
player->pos.z = player->pos.z;
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
player->unk_0F4 += 3.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 1.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
func_i1_8018F678();
|
||||
player->wings.unk_30 = 0;
|
||||
|
||||
@ -2711,8 +2708,8 @@ void func_i1_8018F880(Player* player) {
|
||||
player->unk_204 = 0;
|
||||
}
|
||||
if ((player->timer_1F8 < 120) && !(player->timer_1F8 & 0xF)) {
|
||||
D_80177A48[1] = ((Rand_ZeroOne() - 0.5f) * 60.0f);
|
||||
D_80177A48[2] = ((Rand_ZeroOne() - 0.5f) * 60.0f);
|
||||
D_80177A48[1] = RAND_FLOAT_CENTERED(60.0f);
|
||||
D_80177A48[2] = RAND_FLOAT_CENTERED(60.0f);
|
||||
}
|
||||
if (player->timer_1F8 == 0) {
|
||||
D_80177A48[1] = 0.0f;
|
||||
@ -3007,8 +3004,8 @@ void func_i1_80190F74(Actor* actor, s32 arg1) {
|
||||
actor->fwork[0] = sp38.x;
|
||||
actor->fwork[1] = sp38.y;
|
||||
actor->fwork[2] = sp38.z;
|
||||
actor->fwork[7] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[8] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[7] = RAND_FLOAT(360.0f);
|
||||
actor->fwork[8] = RAND_FLOAT(360.0f);
|
||||
actor->vel.x = player->vel.x;
|
||||
actor->vel.y = player->vel.y;
|
||||
actor->vel.z = player->vel.z;
|
||||
@ -3270,7 +3267,7 @@ void func_i1_80191160(Player* player) {
|
||||
player->unk_138 = player->pos.z;
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ void func_i1_80198C50(void) {
|
||||
obj58->obj.id = D_80178310[i].id;
|
||||
obj58->obj.pos.x = D_80178310[i].xPos;
|
||||
obj58->obj.pos.z = -D_80178310[i].zPos1;
|
||||
obj58->obj.pos.y = D_80178310[i].yPos - (Rand_ZeroOneSeeded() * 300.0f);
|
||||
obj58->obj.pos.y = D_80178310[i].yPos - RAND_FLOAT_SEEDED(300.0f);
|
||||
obj58->obj.rot.y = D_80178310[i].rot.y;
|
||||
Object_SetInfo(&obj58->info, obj58->obj.id);
|
||||
obj58++;
|
||||
@ -83,19 +83,19 @@ void func_i1_80199024(Actor* actor) {
|
||||
f32 cosRotY;
|
||||
|
||||
if (actor->timer_0BC == 0) {
|
||||
sp54.y = Rand_ZeroOne() * 1000.0f;
|
||||
sp54.z = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
sp54.x = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
sp54.y = RAND_FLOAT(1000.0f);
|
||||
sp54.z = RAND_FLOAT_CENTERED(10000.0f);
|
||||
sp54.x = RAND_FLOAT_CENTERED(10000.0f);
|
||||
actor->fwork[4] = sp54.z;
|
||||
actor->fwork[5] = sp54.y;
|
||||
actor->fwork[6] = sp54.x;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 20.0f) + 10;
|
||||
actor->timer_0BC = RAND_INT(20.0f) + 10;
|
||||
}
|
||||
|
||||
sinRotX = __sinf(actor->obj.rot.x * M_DTOR);
|
||||
cosRotX = __cosf(actor->obj.rot.x * M_DTOR);
|
||||
sinRotY = __sinf(actor->obj.rot.y * M_DTOR);
|
||||
cosRotY = __cosf(actor->obj.rot.y * M_DTOR);
|
||||
sinRotX = SIN_DEG(actor->obj.rot.x);
|
||||
cosRotX = COS_DEG(actor->obj.rot.x);
|
||||
sinRotY = SIN_DEG(actor->obj.rot.y);
|
||||
cosRotY = COS_DEG(actor->obj.rot.y);
|
||||
sp54.z = actor->fwork[4] - actor->obj.pos.x;
|
||||
sp54.y = actor->fwork[5] - actor->obj.pos.y;
|
||||
sp54.x = actor->fwork[6] - actor->obj.pos.z;
|
||||
|
@ -239,16 +239,16 @@ void func_i1_80192518(Actor* actor) {
|
||||
effect->unk_78 = effect->unk_7A;
|
||||
effect->obj.status = 2;
|
||||
|
||||
effect->obj.pos.x = (Rand_ZeroOne() - 0.5f) * 3.0f + actor->obj.pos.x;
|
||||
effect->obj.pos.y = (Rand_ZeroOne() - 0.5f) * 3.0f + actor->obj.pos.y;
|
||||
effect->obj.pos.z = (Rand_ZeroOne() - 0.5f) * 3.0f + actor->obj.pos.z + 80.0f;
|
||||
effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.x;
|
||||
effect->obj.pos.y = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.y;
|
||||
effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.z + 80.0f;
|
||||
|
||||
effect->scale2 = 8.0f;
|
||||
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f + 10.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 10.0f;
|
||||
|
||||
effect->unk_44 = 100;
|
||||
effect->unk_46 = -5;
|
||||
@ -274,7 +274,7 @@ void func_i1_80192518(Actor* actor) {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
src.x = __sinf(((((30 - actor->timer_0BE) % 10) / 10.0f) * M_PI) * 2) * 5.0f;
|
||||
src.x = __sinf((((30 - actor->timer_0BE) % 10) / 10.0f) * M_PI * 2) * 5.0f;
|
||||
src.y = 0.0f;
|
||||
src.z = 0.0f;
|
||||
|
||||
@ -300,8 +300,8 @@ void func_i1_80192AA4(Actor* actor) {
|
||||
Vec3f dest;
|
||||
f32 var_fs0;
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * 0.017453292f, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * 0.017453292f, 1U);
|
||||
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1U);
|
||||
|
||||
if ((actor->obj.rot.y <= 30.0f) || (actor->obj.rot.y >= 330.0f)) {
|
||||
temp.x = D_i1_80199FFC.x;
|
||||
@ -316,8 +316,8 @@ void func_i1_80192AA4(Actor* actor) {
|
||||
}
|
||||
if (0.0f <= 450.0f) {
|
||||
for (var_fs0 = 0.0f; var_fs0 <= 450.0f; var_fs0 += 50.0f) {
|
||||
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * 0.017453292f, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * 0.017453292f, 1U);
|
||||
Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0U);
|
||||
Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1U);
|
||||
src.y = var_fs0;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest);
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ void func_i2_801887D0(Boss* boss) {
|
||||
if (boss->swork[0] != 0) {
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, boss->swork[0]);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, i * (M_PI / 2), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, 1);
|
||||
|
||||
if (gGameFrameCount & 1) {
|
||||
@ -746,7 +746,7 @@ void func_i2_801892F0(Boss* boss, s32 arg1) {
|
||||
Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, arg1 * (M_PI / 2), 1);
|
||||
Matrix_RotateZ(gCalcMatrix, M_DTOR * 90.0f * arg1, 1);
|
||||
|
||||
src.x = 0.0f;
|
||||
src.y = 200.0f;
|
||||
@ -978,7 +978,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
if (boss->obj.pos.y > 0.0f) {
|
||||
boss->fwork[13] = -7.0f;
|
||||
}
|
||||
boss->timer_054 = (s32) (Rand_ZeroOne() * 30.0f) + 40.0f;
|
||||
boss->timer_054 = RAND_INT(30.0f) + 40.0f;
|
||||
boss->swork[16] = 1;
|
||||
}
|
||||
break;
|
||||
@ -994,7 +994,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
|
||||
if (boss->timer_054 == 0) {
|
||||
boss->swork[16] = 0;
|
||||
boss->timer_054 = (s32) (Rand_ZeroOne() * 30.0f) + 40.0f;
|
||||
boss->timer_054 = RAND_INT(30.0f) + 40.0f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1015,7 +1015,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
if (boss->obj.pos.x > 0.0f) {
|
||||
boss->fwork[14] = -7.0f;
|
||||
}
|
||||
boss->timer_056 = (s32) (Rand_ZeroOne() * 40.0f) + 50.0f;
|
||||
boss->timer_056 = RAND_INT(40.0f) + 50.0f;
|
||||
boss->swork[17] = 1;
|
||||
}
|
||||
break;
|
||||
@ -1029,7 +1029,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
}
|
||||
if (boss->timer_056 == 0) {
|
||||
boss->swork[17] = 0;
|
||||
boss->timer_056 = (s32) (Rand_ZeroOne() * 40.0f) + 50.0f;
|
||||
boss->timer_056 = RAND_INT(40.0f) + 50.0f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1204,7 +1204,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
}
|
||||
|
||||
if (boss->timer_058 == 0) {
|
||||
boss->timer_058 = (s32) (Rand_ZeroOne() * 80.0f) + 180.0f;
|
||||
boss->timer_058 = RAND_INT(80.0f) + 180.0f;
|
||||
boss->swork[18] = 1;
|
||||
}
|
||||
break;
|
||||
@ -1270,7 +1270,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
D_80178348 = D_80178350 = D_80178354 = 0xFF;
|
||||
func_i2_80187E38(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 1300.0f,
|
||||
boss->fwork[12] + boss->obj.rot.z);
|
||||
boss->fwork[12] = Rand_ZeroOne() * 360.0f;
|
||||
boss->fwork[12] = RAND_FLOAT(360.0f);
|
||||
}
|
||||
if ((boss->timer_050 == 13) || (boss->timer_050 == 33) || (boss->timer_050 == 53) ||
|
||||
(boss->timer_050 == 73)) {
|
||||
@ -1340,7 +1340,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
boss->fwork[10] = boss->fwork[10] + 0.0002f;
|
||||
}
|
||||
|
||||
boss->obj.rot.x += ((-180.0f - boss->obj.rot.x) * boss->fwork[10]);
|
||||
boss->obj.rot.x += (-180.0f - boss->obj.rot.x) * boss->fwork[10];
|
||||
|
||||
if (boss->timer_052 != 0) {
|
||||
if (boss->swork[0] == 5) {
|
||||
@ -1364,7 +1364,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
break;
|
||||
|
||||
case 9:
|
||||
boss->obj.rot.x += ((-180.0f - boss->obj.rot.x) * boss->fwork[10]);
|
||||
boss->obj.rot.x += (-180.0f - boss->obj.rot.x) * boss->fwork[10];
|
||||
if ((boss->timer_050 > 50) && (boss->timer_050 <= 64)) {
|
||||
boss->fwork[22] -= 0.1f;
|
||||
if (boss->fwork[22] < 0.0f) {
|
||||
@ -1423,7 +1423,7 @@ void func_i2_8018978C(Boss* boss) {
|
||||
boss->timer_05C = 4;
|
||||
}
|
||||
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[(s32) ((Rand_ZeroOne() * 19.9f))], &dest);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[RAND_INT(19.9f)], &dest);
|
||||
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C120(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x,
|
||||
@ -1465,9 +1465,9 @@ void func_i2_8018978C(Boss* boss) {
|
||||
|
||||
case 0:
|
||||
for (i = 0; i < 0x64; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 1000.0f) + boss->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 1000.0f) + boss->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 1000.0f) + boss->obj.pos.z, 3.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.z, 3.0f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1612,7 +1612,7 @@ void func_i2_8018BACC(Boss* boss) {
|
||||
|
||||
if (i == 4) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0, 300.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
Matrix_Scale(gGfxMatrix, boss->fwork[21], boss->fwork[21], 1.0f, 1);
|
||||
}
|
||||
|
||||
@ -1627,7 +1627,7 @@ void func_i2_8018BACC(Boss* boss) {
|
||||
}
|
||||
|
||||
if (i < 4) {
|
||||
Matrix_RotateZ(gGfxMatrix, i * (M_PI / 2), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 200.0f, 500.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, boss->fwork[17 + i], boss->fwork[17 + i], 1.0f, 1);
|
||||
}
|
||||
@ -1655,22 +1655,22 @@ void func_i2_8018BACC(Boss* boss) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -(M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -M_PI / 4, 1);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Matrix_Translate(gGfxMatrix, -746.0f, 741.0f, 680.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Matrix_Translate(gGfxMatrix, -746.0f, -741.0f, 680.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (3 * M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 4, 1);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Matrix_Translate(gGfxMatrix, 746.0f, -741.0f, 680.0f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -(3 * M_PI / 4), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, -3 * M_PI / 4, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1686,10 +1686,10 @@ void func_i2_8018BACC(Boss* boss) {
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_102ED50);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_RotateX(gGfxMatrix, -(M_PI / 6), 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 6, 1);
|
||||
|
||||
if (gGameFrameCount & 1) {
|
||||
Matrix_RotateY(gGfxMatrix, 3.1415927f, 1);
|
||||
Matrix_RotateY(gGfxMatrix, M_PI, 1);
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, 2.0f, 2.0f * var_fs1, 2.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -20.0f, 0.0f, 1);
|
||||
@ -1802,12 +1802,12 @@ void func_i2_8018C8F4(Actor* actor1, Actor* actor2) {
|
||||
actor1->obj.status = OBJ_INIT;
|
||||
actor1->obj.id = OBJ_ACTOR_182;
|
||||
|
||||
actor1->obj.pos.x = ((Rand_ZeroOneSeeded() - 0.5f) * 2000.0f) + actor2->obj.pos.x;
|
||||
actor1->obj.pos.y = ((Rand_ZeroOneSeeded() - 0.5f) * 2000.0f) + actor2->obj.pos.y;
|
||||
actor1->obj.pos.z = (((Rand_ZeroOneSeeded() - 0.5f) * 500.0f) + actor2->obj.pos.z) - 9000.0f;
|
||||
actor1->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actor2->obj.pos.x;
|
||||
actor1->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actor2->obj.pos.y;
|
||||
actor1->obj.pos.z = (RAND_FLOAT_CENTERED_SEEDED(500.0f) + actor2->obj.pos.z) - 9000.0f;
|
||||
|
||||
actor1->obj.rot.y = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor1->obj.rot.x = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor1->obj.rot.y = RAND_FLOAT_SEEDED(360.0f);
|
||||
actor1->obj.rot.x = RAND_FLOAT_SEEDED(360.0f);
|
||||
|
||||
actor1->timer_0C2 = 10000;
|
||||
actor1->vel.z = 30.0f;
|
||||
@ -1823,8 +1823,8 @@ void func_i2_8018CA10(Actor* actor1, Actor* actor2, f32 x, f32 y, f32 z) {
|
||||
actor1->obj.pos.y = actor2->obj.pos.y + y;
|
||||
actor1->obj.pos.z = actor2->obj.pos.x + z;
|
||||
|
||||
actor1->obj.rot.y = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor1->obj.rot.x = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor1->obj.rot.y = RAND_FLOAT_SEEDED(360.0f);
|
||||
actor1->obj.rot.x = RAND_FLOAT_SEEDED(360.0f);
|
||||
|
||||
actor1->timer_0C2 = 0x2710;
|
||||
actor1->vel.z = 30.0f;
|
||||
@ -1848,18 +1848,18 @@ void func_i2_8018CB50(Effect* effect, Actor* actor) {
|
||||
Effect_Initialize(effect);
|
||||
effect->obj.status = OBJ_ACTIVE;
|
||||
effect->obj.id = OBJ_EFFECT_346;
|
||||
effect->timer_50 = (s32) (Rand_ZeroOne() * 20.0f) + 20.0f;
|
||||
effect->scale2 = (Rand_ZeroOne() * 0.5f) + 0.5f;
|
||||
effect->timer_50 = RAND_INT(20.0f) + 20.0f;
|
||||
effect->scale2 = RAND_FLOAT(0.5f) + 0.5f;
|
||||
|
||||
effect->obj.pos.x = actor->obj.pos.x;
|
||||
effect->obj.pos.y = actor->obj.pos.y;
|
||||
effect->obj.pos.z = actor->obj.pos.z;
|
||||
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->vel.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -2116,7 +2116,7 @@ void func_i2_8018CD8C(Player* player) {
|
||||
void func_i2_8018D9EC(Actor* actor) {
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
actor->fwork[0] = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
actor->fwork[0] = RAND_FLOAT_CENTERED(10.0f);
|
||||
actor->state = 1;
|
||||
|
||||
case 1:
|
||||
@ -2145,7 +2145,7 @@ void func_i2_8018DBEC(Effect* effect) {
|
||||
if (effect->state == 1) {
|
||||
Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, (M_PI / 2), 1);
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44);
|
||||
gSPDisplayList(gMasterDisp++, D_60263F0);
|
||||
@ -2161,7 +2161,7 @@ void func_i2_8018DCE4(Effect* effect) {
|
||||
Matrix_RotateZ(gGfxMatrix, M_PI, 1);
|
||||
}
|
||||
|
||||
Matrix_RotateX(gGfxMatrix, -(M_PI / 2), 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, effect->unk_44);
|
||||
gSPDisplayList(gMasterDisp++, D_102F5E0);
|
||||
@ -2471,9 +2471,9 @@ void func_i2_8018E084(Player* player) {
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_i2_8018ED9C(Actor* actor) {
|
||||
|
@ -99,10 +99,10 @@ void func_i2_8018F330(Actor* actor) {
|
||||
|
||||
case 1:
|
||||
actor->unk_0F4.z += 3.0f;
|
||||
actor->obj.rot.z = __sinf((actor->unk_0F4.z + 90.0f) * M_DTOR) * 60.0f;
|
||||
actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z + 90.0f) * 60.0f;
|
||||
sp34 = fabsf(actor->obj.pos.z - gBosses[0].obj.pos.z) * 0.1f;
|
||||
Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + __sinf(actor->unk_0F4.z * M_DTOR) * sp34, 0.1f,
|
||||
20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->unk_0F4.z) * sp34, 0.1f, 20.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.y, gBosses[0].obj.pos.y, 0.1f, 20.0f, 0.0f);
|
||||
Math_SmoothStepToF(&actor->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0);
|
||||
if (gBosses[0].state == 20) {
|
||||
@ -185,8 +185,8 @@ void func_i2_8018F884(Actor* actor) {
|
||||
break;
|
||||
|
||||
case -1:
|
||||
actor->obj.rot.y = (-gPlayer[gPlayerNum].unk_058 * 180.0f) / M_PI;
|
||||
actor->obj.rot.x = (gPlayer[gPlayerNum].unk_05C * 180.0f) / M_PI;
|
||||
actor->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058);
|
||||
actor->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C);
|
||||
RCP_SetupDL(&gMasterDisp, 0x40);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 220, 70, 30, 255);
|
||||
Matrix_Scale(gGfxMatrix, 70.0f, 70.0f, 1.0f, 1);
|
||||
@ -392,8 +392,8 @@ void func_i2_80190078(Boss* boss) {
|
||||
Math_SmoothStepToAngle(&boss->fwork[6], 0.0f, 0.1f, 1.0f, 0.00001f);
|
||||
}
|
||||
|
||||
boss->fwork[5] = __sinf((boss->timer_054 * 50.0f) * M_DTOR) * boss->timer_054;
|
||||
boss->fwork[7] = __sinf((boss->timer_054 * 30.0f) * M_DTOR) * boss->timer_054 * 0.5f;
|
||||
boss->fwork[5] = SIN_DEG(boss->timer_054 * 50.0f) * boss->timer_054;
|
||||
boss->fwork[7] = SIN_DEG(boss->timer_054 * 30.0f) * boss->timer_054 * 0.5f;
|
||||
|
||||
Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].pos.z + boss->fwork[1], 0.1f, boss->fwork[42], 0);
|
||||
Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[2], 0.05f, boss->fwork[43], 0);
|
||||
@ -978,7 +978,7 @@ void func_i2_80190078(Boss* boss) {
|
||||
boss->state = 35;
|
||||
boss->timer_050 = 400;
|
||||
boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->unk_078.y = 0.0f;
|
||||
boss->swork[9] = Rand_ZeroOne() * 1.9f;
|
||||
boss->swork[9] = RAND_INT(1.9f);
|
||||
Radio_PlayMessage(gMsg_ID_5498, RCID_BOSS_SECTORX);
|
||||
}
|
||||
} else {
|
||||
@ -1059,9 +1059,9 @@ void func_i2_80190078(Boss* boss) {
|
||||
}
|
||||
|
||||
if (!(boss->timer_050 & 3)) {
|
||||
func_8007D2C8(((Rand_ZeroOne() - 0.5f) * 500.0f) + boss->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 500.0f) + boss->obj.pos.y, boss->obj.pos.z + 100.0f,
|
||||
(Rand_ZeroOne() * 5.0f) + 5.0f);
|
||||
func_8007D2C8(RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.y, boss->obj.pos.z + 100.0f,
|
||||
RAND_FLOAT(5.0f) + 5.0f);
|
||||
}
|
||||
|
||||
if ((!(gGameFrameCount & 7)) && (Rand_ZeroOne() < 0.5f)) {
|
||||
@ -1671,8 +1671,8 @@ void func_i2_801944D4(Actor* actor, s32 arg1) {
|
||||
actor->fwork[0] = destB.x;
|
||||
actor->fwork[1] = destB.y;
|
||||
actor->fwork[2] = destB.z;
|
||||
actor->fwork[7] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[8] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[7] = RAND_FLOAT(360.0f);
|
||||
actor->fwork[8] = RAND_FLOAT(360.0f);
|
||||
actor->vel.x = player->vel.x;
|
||||
actor->vel.y = player->vel.y;
|
||||
actor->vel.z = player->vel.z;
|
||||
@ -1957,7 +1957,7 @@ void func_i2_80194728(Player* player) {
|
||||
player->unk_138 = player->pos.z + player->unk_08C;
|
||||
player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130;
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
@ -552,13 +552,11 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
|
||||
gBossFrameCount++;
|
||||
if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) {
|
||||
bossA6->obj.rot.y = Math_Atan2F(gPlayer[0].camEye.x - bossA6->obj.pos.x,
|
||||
gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_80177D20)) *
|
||||
180.0f / M_PI;
|
||||
bossA6->obj.rot.x = -Math_Atan2F(gPlayer[0].camEye.y - bossA6->obj.pos.y,
|
||||
bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - bossA6->obj.pos.x,
|
||||
gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_80177D20)));
|
||||
bossA6->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].camEye.y - bossA6->obj.pos.y,
|
||||
sqrtf(SQ(gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_80177D20)) +
|
||||
SQ(gPlayer[0].camEye.x - bossA6->obj.pos.x))) *
|
||||
180.0f / M_PI;
|
||||
SQ(gPlayer[0].camEye.x - bossA6->obj.pos.x))));
|
||||
}
|
||||
Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1);
|
||||
@ -651,18 +649,18 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f);
|
||||
if (bossA6->swork[A6_SWK_25] >= 2) {
|
||||
if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) {
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 500.0f);
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(500.0f);
|
||||
}
|
||||
if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) {
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 500.0f);
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(500.0f);
|
||||
}
|
||||
} else {
|
||||
if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) {
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(1000.0f);
|
||||
bossA6->fwork[A6_FWK_30] = 0.0f;
|
||||
}
|
||||
if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) {
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(1000.0f);
|
||||
bossA6->fwork[A6_FWK_31] = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -698,9 +696,9 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f);
|
||||
Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 5.0f, 0.1f, 0.2f, 0.0001f);
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_80079618(bossA6->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 500.0f),
|
||||
bossA6->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 500.0f),
|
||||
bossA6->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 100.0f), (Rand_ZeroOne() * 4.0f) + 1.0f);
|
||||
func_80079618(bossA6->obj.pos.x + RAND_FLOAT_CENTERED(500.0f),
|
||||
bossA6->obj.pos.y + RAND_FLOAT_CENTERED(500.0f),
|
||||
bossA6->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(4.0f) + 1.0f);
|
||||
}
|
||||
if (bossA6->timer_05C == 0) {
|
||||
bossA6->timer_05C = 15;
|
||||
@ -712,9 +710,9 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED28, &spC8[3]);
|
||||
Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED34, &spC8[4]);
|
||||
for (i = 0; i < 5; i++) {
|
||||
var_s0 = (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
var_s0 = RAND_FLOAT_CENTERED(300.0f);
|
||||
if (i == 0) {
|
||||
var_s0 = (Rand_ZeroOne() - 0.5f) * 100.0f;
|
||||
var_s0 = RAND_FLOAT_CENTERED(100.0f);
|
||||
}
|
||||
func_8007D0E0(bossA6->obj.pos.x + var_s0 + spC8[i].x, bossA6->obj.pos.y + var_s0 + spC8[i].y,
|
||||
bossA6->obj.pos.z + spC8[i].z, 10.0f);
|
||||
@ -806,9 +804,9 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 2.0f, 0.1f, 0.1f, 0.0f);
|
||||
Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.2f, 0.1f, 0.1f, 0.0f);
|
||||
if (D_i3_801C22F0.unk_24 < 1.0f) {
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f);
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f);
|
||||
bossA6->fwork[A6_FWK_3] = -3700.0f + (Rand_ZeroOne() - 0.5f) * 3000.0f;
|
||||
bossA6->fwork[A6_FWK_6] = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(1000.0f);
|
||||
bossA6->fwork[A6_FWK_7] = gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(1000.0f);
|
||||
bossA6->fwork[A6_FWK_3] = -3700.0f + RAND_FLOAT_CENTERED(3000.0f);
|
||||
bossA6->fwork[A6_FWK_34] = 2.0f;
|
||||
bossA6->fwork[A6_FWK_35] = 1.2f;
|
||||
if ((bossA6->swork[A6_SWK_37] == 0) && (bossA6->swork[A6_SWK_33 + 0] == 0) &&
|
||||
@ -821,7 +819,7 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
bossA6->swork[A6_SWK_18 + 0] = bossA6->swork[A6_SWK_18 + 1] = bossA6->swork[A6_SWK_18 + 2] = 3;
|
||||
bossA6->fwork[A6_FWK_3] = -1700.0f;
|
||||
if ((bossA6->swork[A6_SWK_25] != 1) && (D_i3_801C2250[A6_BSS_0] != 2)) {
|
||||
bossA6->fwork[A6_FWK_3] = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f;
|
||||
bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f;
|
||||
}
|
||||
bossA6->obj.pos.z = gPlayer[0].camEye.z - D_80177D20 + bossA6->fwork[A6_FWK_3];
|
||||
bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].camEye.x;
|
||||
@ -946,7 +944,7 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
if (bossA6->swork[A6_SWK_25] == 0) {
|
||||
bossA6->swork[A6_SWK_25] = 1;
|
||||
}
|
||||
bossA6->fwork[A6_FWK_3] = ((Rand_ZeroOne() - 0.5f) * 1000.0f) + -3700.0f;
|
||||
bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f;
|
||||
if (D_i3_801C2250[A6_BSS_28] == 0) {
|
||||
Audio_PlaySfx(0x39404068, bossA6->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
}
|
||||
@ -960,7 +958,7 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
D_i3_801C2250[A6_BSS_30] &= 1;
|
||||
}
|
||||
if (!(gGameFrameCount & 0x3F)) {
|
||||
bossA6->fwork[A6_FWK_8] = Rand_ZeroOne() * 360.0f;
|
||||
bossA6->fwork[A6_FWK_8] = RAND_FLOAT(360.0f);
|
||||
bossA6->fwork[A6_FWK_9] = 0.0f;
|
||||
}
|
||||
if ((bossA6->timer_050 == 0) ||
|
||||
@ -1157,9 +1155,9 @@ void func_i3_80187944(Boss* bossA6) {
|
||||
func_i3_8018A464(bossA6, 2);
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (!(gGameFrameCount & 3)) {
|
||||
D_i3_801BF280[i] = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
D_i3_801BF2B0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
D_i3_801BF2E0[i] = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
D_i3_801BF280[i] = RAND_FLOAT_CENTERED(10.0f);
|
||||
D_i3_801BF2B0[i] = RAND_FLOAT_CENTERED(10.0f);
|
||||
D_i3_801BF2E0[i] = RAND_FLOAT_CENTERED(10.0f);
|
||||
}
|
||||
Math_SmoothStepToF(&D_i3_801BF1F0[i], D_i3_801BF280[i], 1.0f, 5.0f, 0.001f);
|
||||
Math_SmoothStepToF(&D_i3_801BF220[i], D_i3_801BF2B0[i], 1.0f, 5.0f, 0.001f);
|
||||
@ -1307,7 +1305,7 @@ void func_i3_8018A464(Boss* bossA6, s32 arg1) {
|
||||
D_i3_801BEEC0[i] = 3.0f;
|
||||
if ((bossA6->swork[A6_SWK_6] == 0) && (bossA6->state != 3)) {
|
||||
bossA6->swork[A6_SWK_6] = 20;
|
||||
D_i3_801BEE00[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f;
|
||||
D_i3_801BEE00[0].y = RAND_FLOAT_CENTERED(720.0f);
|
||||
if (D_i3_801BEE00[0].y < -20.0f) {
|
||||
D_i3_801BEE00[0].y = -20.0f;
|
||||
}
|
||||
@ -1327,7 +1325,7 @@ void func_i3_8018A464(Boss* bossA6, s32 arg1) {
|
||||
}
|
||||
} else {
|
||||
bossA6->swork[A6_SWK_9] = 30;
|
||||
D_i3_801BEE00[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
D_i3_801BEE00[0].x = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
D_i3_801BF334[0] = D_i3_801BEE00[0].x;
|
||||
} else if (!(bossA6->swork[A6_SWK_9] & 7)) {
|
||||
@ -1353,7 +1351,7 @@ void func_i3_8018A464(Boss* bossA6, s32 arg1) {
|
||||
D_i3_801BF040[i] = 3.0f;
|
||||
if (bossA6->swork[A6_SWK_7] == 0) {
|
||||
bossA6->swork[A6_SWK_7] = 20;
|
||||
D_i3_801BEF80[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f;
|
||||
D_i3_801BEF80[0].y = RAND_FLOAT_CENTERED(720.0f);
|
||||
if (D_i3_801BEF80[0].y < -20.0f) {
|
||||
D_i3_801BEF80[0].y = -20.0f;
|
||||
}
|
||||
@ -1372,7 +1370,7 @@ void func_i3_8018A464(Boss* bossA6, s32 arg1) {
|
||||
}
|
||||
} else {
|
||||
bossA6->swork[A6_SWK_10] = 30;
|
||||
D_i3_801BEF80[0].x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
D_i3_801BEF80[0].x = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
D_i3_801BF364[0] = D_i3_801BEF80[0].x;
|
||||
} else if (!(bossA6->swork[A6_SWK_10] & 7)) {
|
||||
@ -1397,7 +1395,7 @@ void func_i3_8018A464(Boss* bossA6, s32 arg1) {
|
||||
D_i3_801BF1C0[i] = 3.0f;
|
||||
if (bossA6->swork[A6_SWK_8] == 0) {
|
||||
bossA6->swork[A6_SWK_8] = 20;
|
||||
D_i3_801BF100[0].y = (Rand_ZeroOne() - 0.5f) * 720.0f;
|
||||
D_i3_801BF100[0].y = RAND_FLOAT_CENTERED(720.0f);
|
||||
if (D_i3_801BF100[0].y < -20.0f) {
|
||||
D_i3_801BF100[0].y = -20.0f;
|
||||
}
|
||||
@ -1744,7 +1742,7 @@ void func_i3_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Push(&gCalcMatrix);
|
||||
if (i == 4) {
|
||||
Matrix_RotateX(gCalcMatrix, 1.3962634f, 1);
|
||||
Matrix_RotateX(gCalcMatrix, 80.0f * M_DTOR, 1);
|
||||
Matrix_RotateX(gCalcMatrix, (90.0f - arg3) * M_DTOR, 1);
|
||||
Matrix_Scale(gCalcMatrix, var_fs3, var_fs3, 1.0f, 1);
|
||||
Matrix_Mult(gGfxMatrix, gCalcMatrix, 1);
|
||||
@ -1768,7 +1766,7 @@ void func_i3_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) {
|
||||
Matrix_Pop(&gCalcMatrix);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Translate(gCalcMatrix, 0.0f, -120.0f, 0.0f, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -0.34906584f, 1);
|
||||
Matrix_RotateX(gCalcMatrix, -20.0f * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, arg0[i] * M_DTOR, 1);
|
||||
}
|
||||
Matrix_Pop(&gCalcMatrix);
|
||||
@ -2048,9 +2046,9 @@ void func_i3_8018D694(Actor* actor, s32 arg1) {
|
||||
actor->iwork[11] = 1;
|
||||
actor->unk_0F4.y = 90.0f;
|
||||
actor->fwork[0] = 1.5f;
|
||||
actor->fwork[7] = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor->fwork[8] = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor->fwork[9] = Rand_ZeroOneSeeded() * 360.0f;
|
||||
actor->fwork[7] = RAND_FLOAT_SEEDED(360.0f);
|
||||
actor->fwork[8] = RAND_FLOAT_SEEDED(360.0f);
|
||||
actor->fwork[9] = RAND_FLOAT_SEEDED(360.0f);
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
Audio_PlaySfx(0x31000011, actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
}
|
||||
@ -2107,11 +2105,11 @@ void func_i3_8018DA58(Actor* actor) {
|
||||
switch (actor->state) { /* irregular */
|
||||
case 1:
|
||||
actor->fwork[7] += 2.5f;
|
||||
actor->unk_0F4.z = __sinf(actor->fwork[7] * M_DTOR) * 10.0f;
|
||||
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f;
|
||||
actor->fwork[8] += 1.0f;
|
||||
actor->obj.pos.y += __sinf(actor->fwork[8] * M_DTOR) * 1.5f;
|
||||
actor->obj.pos.y += SIN_DEG(actor->fwork[8]) * 1.5f;
|
||||
actor->fwork[9] += 1.0f;
|
||||
actor->obj.pos.z += __cosf(actor->fwork[9] * M_DTOR) * 1.5f;
|
||||
actor->obj.pos.z += COS_DEG(actor->fwork[9]) * 1.5f;
|
||||
break;
|
||||
case 2:
|
||||
Math_SmoothStepToF(&actor->unk_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f);
|
||||
|
@ -211,7 +211,7 @@ void func_i3_8019E920(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3
|
||||
effect->vel.x = xVel;
|
||||
effect->vel.y = yVel;
|
||||
effect->vel.z = zVel;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_44 = 176;
|
||||
effect->scale2 = scale2;
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
@ -306,7 +306,7 @@ void func_i3_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32
|
||||
actor->obj.pos.x = xPos;
|
||||
actor->obj.pos.y = yPos;
|
||||
actor->obj.pos.z = zPos;
|
||||
actor->unk_0F4.x = Rand_ZeroOne() * 360.0f;
|
||||
actor->unk_0F4.x = RAND_FLOAT(360.0f);
|
||||
actor->vel.x = xVel;
|
||||
actor->vel.y = yVel;
|
||||
actor->vel.z = zVel;
|
||||
@ -337,7 +337,7 @@ void func_i3_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32
|
||||
actor->obj.pos.x = xPos;
|
||||
actor->obj.pos.y = yPos;
|
||||
actor->obj.pos.z = zPos;
|
||||
actor->unk_0F4.x = Rand_ZeroOne() * 360.0f;
|
||||
actor->unk_0F4.x = RAND_FLOAT(360.0f);
|
||||
actor->vel.x = xVel;
|
||||
actor->vel.y = yVel;
|
||||
actor->vel.z = zVel;
|
||||
@ -409,7 +409,7 @@ void func_i3_8019F20C(Actor* actor) {
|
||||
actor->obj.pos.y = sp8C;
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i],
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1);
|
||||
RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1);
|
||||
}
|
||||
actor->timer_0C2 = 5;
|
||||
Audio_PlaySfx(0x29000071, actor->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
@ -421,7 +421,7 @@ void func_i3_8019F20C(Actor* actor) {
|
||||
func_8007A6F0(&actor->obj.pos, 0x29000072);
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i],
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1);
|
||||
RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1);
|
||||
}
|
||||
}
|
||||
if (actor->timer_0BC == 0) {
|
||||
@ -435,9 +435,8 @@ void func_i3_8019F20C(Actor* actor) {
|
||||
if (actor->obj.id == OBJ_ACTOR_277) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019F038(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
|
||||
D_i3_801BF8F0[i].x + ((Rand_ZeroOne() - 0.5f) * 3.0f),
|
||||
D_i3_801BF8F0[i].y + ((Rand_ZeroOne() - 0.5f) * 3.0f),
|
||||
(Rand_ZeroOne() * -10.0f) - 10.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(3.0f),
|
||||
D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(-10.0f) - 10.0f);
|
||||
}
|
||||
} else if (actor->obj.id == OBJ_ACTOR_275) {
|
||||
actor->unk_044 = 1;
|
||||
@ -453,9 +452,8 @@ void func_i3_8019F20C(Actor* actor) {
|
||||
func_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.3f);
|
||||
}
|
||||
for (i = 0; i < 7; i++) {
|
||||
func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 30.0f, (Rand_ZeroOne() - 0.5f) * 30.0f, 0.0f,
|
||||
((2.0f * Rand_ZeroOne()) + 2.0f) * actor->scale, 1);
|
||||
func_i3_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(30.0f),
|
||||
RAND_FLOAT_CENTERED(30.0f), 0.0f, (RAND_FLOAT(2.0f) + 2.0f) * actor->scale, 1);
|
||||
}
|
||||
func_8007A6F0(&actor->obj.pos, 0x2903A008);
|
||||
}
|
||||
@ -511,7 +509,7 @@ void func_i3_8019F99C(Actor* actor, Effect* effect, f32 scale1) {
|
||||
effect->obj.pos.z = effect->vel.z = actor->obj.pos.z;
|
||||
effect->scale1 = scale1;
|
||||
effect->unk_60.y = actor->obj.rot.y;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_44 = 255 - (actor->unk_04E * 8);
|
||||
if (effect->unk_44 < 0) {
|
||||
effect->unk_44 = 0;
|
||||
@ -567,12 +565,12 @@ void func_i3_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos
|
||||
effect->vel.z = gPlayer[0].vel.z;
|
||||
}
|
||||
} else {
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->vel.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
effect->unk_60.y = bossSO->obj.rot.y;
|
||||
effect->unk_60.x = 90.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_44 = 255;
|
||||
effect->unk_48 = 1;
|
||||
effect->state = 4;
|
||||
@ -595,7 +593,7 @@ void func_i3_8019FDE0(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos
|
||||
effect->scale2 = scale2;
|
||||
effect->unk_60.y = bossSO->obj.rot.y;
|
||||
effect->unk_60.x = 0.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_44 = 255;
|
||||
effect->unk_48 = 1;
|
||||
effect->state = state + 5;
|
||||
@ -712,7 +710,7 @@ void func_i3_801A0120(Effect* effect) {
|
||||
sp58 = -100.0f;
|
||||
}
|
||||
func_i3_8019E9F4(effect->obj.pos.x + sp58, effect->obj.pos.y + sp54, effect->obj.pos.z, sp58 * 0.25f,
|
||||
(Rand_ZeroOne() * 10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1);
|
||||
RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@ -778,7 +776,7 @@ void func_i3_801A0120(Effect* effect) {
|
||||
sp58 = -100.0f;
|
||||
}
|
||||
func_i3_8019E9F4(effect->obj.pos.x + sp58, effect->obj.pos.y + -50.0f, effect->obj.pos.z, sp58 * 0.25f,
|
||||
(Rand_ZeroOne() * 10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1);
|
||||
RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
@ -790,8 +788,8 @@ void func_i3_801A0120(Effect* effect) {
|
||||
effect->unk_60.x += 0.25f;
|
||||
}
|
||||
effect->unk_60.z += 10.0f;
|
||||
effect->vel.x = __sinf(effect->unk_60.z * M_DTOR) * (effect->unk_60.x * 10.0f);
|
||||
effect->vel.y = __cosf(effect->unk_60.z * M_DTOR) * (effect->unk_60.x * 10.0f);
|
||||
effect->vel.x = SIN_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f);
|
||||
effect->vel.y = COS_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f);
|
||||
effect->vel.z = gPlayer[0].vel.z + 15.0f;
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) {
|
||||
func_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f);
|
||||
@ -814,8 +812,8 @@ void func_i3_801A0120(Effect* effect) {
|
||||
effect->unk_4C = 0;
|
||||
}
|
||||
effect->unk_60.z += 20.0f;
|
||||
effect->vel.x = __sinf(effect->unk_60.z * M_DTOR) * sp50 * 50.0f;
|
||||
effect->vel.y = __cosf(effect->unk_60.z * M_DTOR) * sp50 * 50.0f;
|
||||
effect->vel.x = SIN_DEG(effect->unk_60.z) * sp50 * 50.0f;
|
||||
effect->vel.y = COS_DEG(effect->unk_60.z) * sp50 * 50.0f;
|
||||
effect->vel.z = gPlayer[0].vel.z + 80.0f;
|
||||
if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) {
|
||||
func_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f);
|
||||
@ -892,10 +890,10 @@ void func_i3_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) {
|
||||
case 0:
|
||||
if (D_80177A10[0] != 0) {
|
||||
sp2C = 5;
|
||||
D_80177A10[1] = (s32) (Rand_ZeroOne() * 10.0f) + 128;
|
||||
D_80177A10[1] = RAND_INT(10.0f) + 128;
|
||||
} else {
|
||||
sp2C = 4;
|
||||
D_80177A10[0] = (s32) (Rand_ZeroOne() * 10.0f) + 128;
|
||||
D_80177A10[0] = RAND_INT(10.0f) + 128;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
@ -1013,8 +1011,8 @@ void func_i3_801A10F4(Player* player) {
|
||||
D_8017835C = 8;
|
||||
}
|
||||
if (!(gGameFrameCount & 7)) {
|
||||
func_i3_8019E8B8((Rand_ZeroOne() - 0.5f) * 6000.0f, ((Rand_ZeroOne() - 0.5f) * 5.0f) - 90.0f,
|
||||
(Rand_ZeroOne() * 2000.0f) - 6000.0f + D_80177D20, (Rand_ZeroOne() * 20.0f) + 20.0f);
|
||||
func_i3_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), RAND_FLOAT_CENTERED(5.0f) - 90.0f,
|
||||
RAND_FLOAT(2000.0f) - 6000.0f + D_80177D20, RAND_FLOAT(20.0f) + 20.0f);
|
||||
}
|
||||
if (gCsFrameCount == 380) {
|
||||
for (i = 0; i < 100; i++) {
|
||||
@ -1074,9 +1072,8 @@ void func_i3_801A10F4(Player* player) {
|
||||
case 3:
|
||||
D_80177CE8 += 60.0f;
|
||||
if (!(gGameFrameCount & 3)) {
|
||||
func_i3_8019E8B8((Rand_ZeroOne() - 0.5f) * 6000.0f, -400.0f - ((player->camEye.y - 1380.0f) * 0.3f),
|
||||
((Rand_ZeroOne() - 0.5f) * 2000.0f) + 500.0f + D_80177D20,
|
||||
(Rand_ZeroOne() * 20.0f) + 20.0f);
|
||||
func_i3_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->camEye.y - 1380.0f) * 0.3f),
|
||||
RAND_FLOAT_CENTERED(2000.0f) + 500.0f + D_80177D20, RAND_FLOAT(20.0f) + 20.0f);
|
||||
}
|
||||
if (gCsFrameCount == 615) {
|
||||
func_800A6028(player->sfxPos, 0x09000002);
|
||||
@ -1176,9 +1173,9 @@ void func_i3_801A1CD8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32
|
||||
actor->vel.z = zVel;
|
||||
actor->iwork[0] = 3;
|
||||
|
||||
actor->fwork[0] = (Rand_ZeroOne() - 0.5f) * 25.0f;
|
||||
actor->fwork[1] = (Rand_ZeroOne() - 0.5f) * 25.0f;
|
||||
actor->fwork[2] = (Rand_ZeroOne() - 0.5f) * 25.0f;
|
||||
actor->fwork[0] = RAND_FLOAT_CENTERED(25.0f);
|
||||
actor->fwork[1] = RAND_FLOAT_CENTERED(25.0f);
|
||||
actor->fwork[2] = RAND_FLOAT_CENTERED(25.0f);
|
||||
actor->fwork[5] = 2000.0f;
|
||||
actor->gravity = 3.5f;
|
||||
actor->scale = 5.5f;
|
||||
@ -1198,8 +1195,8 @@ void func_i3_801A1E14(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot
|
||||
}
|
||||
|
||||
void func_i3_801A1EB0(Boss* bossSO, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) {
|
||||
func_i3_8019E9F4(xPos + xOffset, yPos, zPos, 20.0f, (Rand_ZeroOne() * 10.0f) + 20.0f, 0.0f, 20.0f, 1);
|
||||
func_i3_8019E9F4(xPos - xOffset, yPos, zPos, -20.0f, (Rand_ZeroOne() * 10.0f) + 20.0f, 0.0f, 20.0f, 1);
|
||||
func_i3_8019E9F4(xPos + xOffset, yPos, zPos, 20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1);
|
||||
func_i3_8019E9F4(xPos - xOffset, yPos, zPos, -20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1);
|
||||
}
|
||||
|
||||
void func_i3_801A1F80(Boss* bossSO) {
|
||||
@ -1369,9 +1366,9 @@ void func_i3_801A23F4(Boss* bossSO) {
|
||||
sp40.z = 1100.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34);
|
||||
for (i = 0; i < 4; i++) {
|
||||
sp58.x = D_i3_801BF8F0[i].x + (2.0f * (Rand_ZeroOne() - 0.5f));
|
||||
sp58.y = 2.0f * (Rand_ZeroOne() - 0.5f);
|
||||
sp58.z = (Rand_ZeroOne() * 10.0f) + 2.5f;
|
||||
sp58.x = D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f);
|
||||
sp58.y = RAND_FLOAT_CENTERED(2.0f);
|
||||
sp58.z = RAND_FLOAT(10.0f) + 2.5f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp58, &sp4C);
|
||||
func_i3_8019F038(bossSO->fwork[SO_FWK_4] + sp34.x, bossSO->fwork[SO_FWK_5] + sp34.y,
|
||||
bossSO->fwork[SO_FWK_6] + sp34.z, sp4C.x, sp4C.y, sp4C.z);
|
||||
@ -1481,13 +1478,13 @@ void func_i3_801A2C98(Boss* bossSO) {
|
||||
if (bossSO->unk_04C == 60) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f,
|
||||
D_i3_801BF8F0[i].x + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
D_i3_801BF8F0[i].y + 10.0f + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
(Rand_ZeroOne() * -10.0f) - 10.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f),
|
||||
D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f),
|
||||
RAND_FLOAT(-10.0f) - 10.0f);
|
||||
func_i3_8019F038(bossSO->obj.pos.x - 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f,
|
||||
D_i3_801BF8F0[i].x + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
D_i3_801BF8F0[i].y + 10.0f + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
(Rand_ZeroOne() * -10.0f) - 10.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f),
|
||||
D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f),
|
||||
RAND_FLOAT(-10.0f) - 10.0f);
|
||||
}
|
||||
}
|
||||
if (bossSO->unk_04C == 20) {
|
||||
@ -1651,7 +1648,7 @@ void func_i3_801A3510(Boss* bossSO) {
|
||||
Audio_PlaySfx(0x29432077, bossSO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
}
|
||||
if (bossSO->unk_04C == 94) {
|
||||
func_i3_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], (Rand_ZeroOne() - 0.5f) * 60.0f, 4,
|
||||
func_i3_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4,
|
||||
2.0f);
|
||||
bossSO->timer_050 = 90;
|
||||
}
|
||||
@ -1680,9 +1677,8 @@ void func_i3_801A3510(Boss* bossSO) {
|
||||
if (bossSO->unk_04C == 65) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019F194(bossSO->obj.pos.x, bossSO->obj.pos.y + 300.0f, bossSO->obj.pos.z + 1000.0f,
|
||||
D_i3_801BF8F0[i].x + ((Rand_ZeroOne() - 0.5f) * 0.25f),
|
||||
D_i3_801BF8F0[i].y + ((Rand_ZeroOne() - 0.5f) * 0.25f),
|
||||
(Rand_ZeroOne() * 10.0f) + 100.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(0.25f),
|
||||
D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(0.25f), RAND_FLOAT(10.0f) + 100.0f);
|
||||
}
|
||||
}
|
||||
if ((bossSO->unk_048 != 0) && (bossSO->unk_04C == 68)) {
|
||||
@ -1877,8 +1873,8 @@ void func_i3_801A4214(Boss* bossSO) {
|
||||
gShowBossHealth = false;
|
||||
Audio_PlaySfx(0x39439076, bossSO->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] + 300.0f, bossSO->fwork[SO_FWK_6],
|
||||
bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, 80.0f, 40.0f, 8);
|
||||
bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f),
|
||||
80.0f, 40.0f, 8);
|
||||
D_i3_801C2768[3] = 6.0f;
|
||||
D_i3_801C2768[2] = 100.0f;
|
||||
D_80178340 = 255;
|
||||
@ -1998,31 +1994,25 @@ void func_i3_801A4A34(Boss* bossSO) {
|
||||
bossSO->swork[SO_SWK_2] = 0;
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_28], bossSO->fwork[SO_FWK_29], bossSO->fwork[SO_FWK_30],
|
||||
bossSO->fwork[SO_FWK_41], bossSO->fwork[SO_FWK_42], bossSO->fwork[SO_FWK_43],
|
||||
(Rand_ZeroOne() * -25.0f) - 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 0);
|
||||
RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 0);
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_22], bossSO->fwork[SO_FWK_23], bossSO->fwork[SO_FWK_24],
|
||||
bossSO->fwork[SO_FWK_47], bossSO->fwork[SO_FWK_48], bossSO->fwork[SO_FWK_49],
|
||||
(Rand_ZeroOne() * -25.0f) - 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 1);
|
||||
RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 1);
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_10], bossSO->fwork[SO_FWK_11], bossSO->fwork[SO_FWK_12],
|
||||
bossSO->fwork[SO_FWK_35], bossSO->fwork[SO_FWK_36], bossSO->fwork[SO_FWK_37],
|
||||
(Rand_ZeroOne() * -25.0f) - 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 2);
|
||||
RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 2);
|
||||
}
|
||||
if (bossSO->swork[SO_SWK_3] < 0) {
|
||||
bossSO->swork[SO_SWK_3] = 0;
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_25], bossSO->fwork[SO_FWK_26], bossSO->fwork[SO_FWK_27],
|
||||
bossSO->fwork[SO_FWK_38], bossSO->fwork[SO_FWK_39], bossSO->fwork[SO_FWK_40],
|
||||
(Rand_ZeroOne() * 25.0f) + 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 5);
|
||||
RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 5);
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_19], bossSO->fwork[SO_FWK_20], bossSO->fwork[SO_FWK_21],
|
||||
bossSO->fwork[SO_FWK_44], bossSO->fwork[SO_FWK_45], bossSO->fwork[SO_FWK_46],
|
||||
(Rand_ZeroOne() * 25.0f) + 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 4);
|
||||
RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 4);
|
||||
func_i3_801A1E14(bossSO->fwork[SO_FWK_7], bossSO->fwork[SO_FWK_8], bossSO->fwork[SO_FWK_9],
|
||||
bossSO->fwork[SO_FWK_32], bossSO->fwork[SO_FWK_33], bossSO->fwork[SO_FWK_34],
|
||||
(Rand_ZeroOne() * 25.0f) + 10.0f, (Rand_ZeroOne() * 25.0f) + 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 25.0f) - 50.0f, 3);
|
||||
RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 3);
|
||||
}
|
||||
switch (bossSO->unk_04C) {
|
||||
case 30:
|
||||
@ -2096,13 +2086,13 @@ void func_i3_801A4EF8(Boss* bossSO) {
|
||||
D_Timer_80177BD0[gMainController] = 70;
|
||||
for (i = 0; i < 4; i++) {
|
||||
func_i3_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f,
|
||||
D_i3_801BF8F0[i].x + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
D_i3_801BF8F0[i].y + 10.0f + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
(Rand_ZeroOne() * -10.0f) - 10.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f),
|
||||
D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f),
|
||||
RAND_FLOAT(-10.0f) - 10.0f);
|
||||
func_i3_8019F038(bossSO->obj.pos.x - 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f,
|
||||
D_i3_801BF8F0[i].x + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
D_i3_801BF8F0[i].y + 10.0f + (2.0f * (Rand_ZeroOne() - 0.5f)),
|
||||
(Rand_ZeroOne() * -10.0f) - 10.0f);
|
||||
D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f),
|
||||
D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f),
|
||||
RAND_FLOAT(-10.0f) - 10.0f);
|
||||
}
|
||||
}
|
||||
if (bossSO->swork[SO_SWK_11] == 16) {
|
||||
@ -2140,8 +2130,8 @@ void func_i3_801A4EF8(Boss* bossSO) {
|
||||
gActors[9].unk_0D0 = 2;
|
||||
}
|
||||
if (bossSO->swork[SO_SWK_11] <= 170) {
|
||||
bossSO->vel.y = __cosf(bossSO->obj.rot.x * M_DTOR) * 80.0f;
|
||||
bossSO->vel.z = (__sinf(bossSO->obj.rot.x * M_DTOR) * 30.0f) + gPlayer[0].vel.z;
|
||||
bossSO->vel.y = COS_DEG(bossSO->obj.rot.x) * 80.0f;
|
||||
bossSO->vel.z = (SIN_DEG(bossSO->obj.rot.x) * 30.0f) + gPlayer[0].vel.z;
|
||||
}
|
||||
if (bossSO->obj.rot.x < 190.0f) {
|
||||
bossSO->obj.rot.x += 1.0f;
|
||||
@ -2743,8 +2733,8 @@ void func_i3_801A71B8(Boss* bossSO) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 230.0f,
|
||||
(bossSO->obj.pos.z - 300.0f) + D_80177D20, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI * 0.027777777, 1); // 1 / 36
|
||||
bossSO->obj.pos.z - 300.0f + D_80177D20, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_DTOR * 5.0f, 1);
|
||||
Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_20112C0);
|
||||
@ -2755,7 +2745,7 @@ void func_i3_801A71B8(Boss* bossSO) {
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 270.0f,
|
||||
(bossSO->obj.pos.z - 300.0f) + D_80177D20, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -M_PI / 60.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, -3.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_20112C0);
|
||||
@ -3133,9 +3123,9 @@ void func_i3_801A7930(Player* player) {
|
||||
Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f);
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_i3_801A8BE8(Actor* actor) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
// 13.0f,
|
||||
// { { -163.79999f, 187.2f }, { 1495.0f, 119.6f }, { 0.0f, 153.4f } },
|
||||
// { { -397.8f, 130.0f }, { 1284.3999f, 262.59998f }, { 0.0f, 80.6f } },
|
||||
// { { -223.599991f, 197.599991f }, { 904.8f, 145.59999f }, { 0.0f, 140.4f } },
|
||||
// { { -223.59999f, 197.59999f }, { 904.8f, 145.59999f }, { 0.0f, 140.4f } },
|
||||
// {
|
||||
// HITBOX_UNK_2,
|
||||
// { 40.0f, 0.0f, 0.0f },
|
||||
@ -15,14 +15,14 @@
|
||||
// { 40.0f, 0.0f, 0.0f },
|
||||
// { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { -338.0f, 104.0f } },
|
||||
// },
|
||||
// { { -78.0f, 231.4f }, { 577.19995f, 184.599991f }, { 0.0f, 189.799988f } },
|
||||
// { { 26.0f, 754.0f }, { 140.4f, 267.8f }, { 0.0f, 215.799988f } },
|
||||
// { { -78.0f, 231.4f }, { 577.19995f, 184.59999f }, { 0.0f, 189.79999f } },
|
||||
// { { 26.0f, 754.0f }, { 140.4f, 267.8f }, { 0.0f, 215.79999f } },
|
||||
// { { -556.39996f, 260.0f }, { 491.4f, 226.2f }, { 0.0f, 179.4f } },
|
||||
// { { -213.2f, 200.2f }, { 473.199982f, 231.4f }, { 613.6f, 187.2f } },
|
||||
// { { -213.2f, 200.2f }, { 473.199982f, 231.4f }, { -613.6f, 187.2f } },
|
||||
// { { -351.0f, 694.199951f }, { 33.8f, 208.0f }, { 572.0f, 306.8f } },
|
||||
// { { -351.0f, 694.199951f }, { 33.8f, 208.0f }, { -572.0f, 306.8f } },
|
||||
// { { -896.99994f, 244.4f }, { 863.199951f, 171.599991f }, { 0.0f, 93.6f } },
|
||||
// { { -213.2f, 200.2f }, { 473.19998f, 231.4f }, { 613.6f, 187.2f } },
|
||||
// { { -213.2f, 200.2f }, { 473.19998f, 231.4f }, { -613.6f, 187.2f } },
|
||||
// { { -351.0f, 694.19995f }, { 33.8f, 208.0f }, { 572.0f, 306.8f } },
|
||||
// { { -351.0f, 694.19995f }, { 33.8f, 208.0f }, { -572.0f, 306.8f } },
|
||||
// { { -896.99994f, 244.4f }, { 863.19995f, 171.59999f }, { 0.0f, 93.6f } },
|
||||
// };
|
||||
|
||||
typedef struct {
|
||||
@ -565,13 +565,13 @@ f32 sZoFwork[ZO_BSF_MAX];
|
||||
|
||||
void func_i3_8018FF50(Actor* actor) {
|
||||
f32 temp;
|
||||
|
||||
(void) " Enm->hitNO %d\n"; // Unclear where this goes. hitNO can't be info.bonus. Damage related?
|
||||
actor->obj.rot.y =
|
||||
Math_Atan2F(gPlayer[0].camEye.x - actor->obj.pos.x, gPlayer[0].camEye.z - (actor->obj.pos.z + D_80177D20)) *
|
||||
180.0f / M_PI;
|
||||
actor->obj.rot.y = RAD_TO_DEG(
|
||||
Math_Atan2F(gPlayer[0].camEye.x - actor->obj.pos.x, gPlayer[0].camEye.z - (actor->obj.pos.z + D_80177D20)));
|
||||
temp =
|
||||
sqrtf(SQ(gPlayer[0].camEye.z - (actor->obj.pos.z + D_80177D20)) + SQ(gPlayer[0].camEye.x - actor->obj.pos.x));
|
||||
actor->obj.rot.x = -Math_Atan2F(gPlayer[0].camEye.y - actor->obj.pos.y, temp) * 180.0f / M_PI;
|
||||
actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].camEye.y - actor->obj.pos.y, temp));
|
||||
}
|
||||
|
||||
void func_i3_80190028(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8,
|
||||
@ -695,8 +695,8 @@ void func_i3_801904CC(Actor* actor) {
|
||||
break;
|
||||
case 1:
|
||||
for (i = 0; i < 11; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], (Rand_ZeroOne() - 0.5f) * 20.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 41, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f),
|
||||
RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 0;
|
||||
func_80066254(actor);
|
||||
@ -737,10 +737,10 @@ void func_i3_80190790(Actor* actor) {
|
||||
actor->unk_04E = 0;
|
||||
}
|
||||
actor->fwork[0] += 4.0f;
|
||||
actor->vel.y = __sinf(actor->fwork[0] * M_DTOR) * 20.0f;
|
||||
actor->vel.y = SIN_DEG(actor->fwork[0]) * 20.0f;
|
||||
actor->unk_0F4.x = -actor->vel.y * 2.5f;
|
||||
actor->fwork[1] += 5.0f;
|
||||
actor->unk_0F4.z = __sinf(actor->fwork[1] * M_DTOR) * 30.0f;
|
||||
actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f;
|
||||
for (i = 0, sp30 = gActors; i < 60; i++, sp30++) {
|
||||
if ((sp30->obj.status == OBJ_ACTIVE) && (sp30->obj.id == OBJ_ACTOR_239) &&
|
||||
(sp30->iwork[0] == actor->iwork[0])) {
|
||||
@ -880,7 +880,7 @@ void func_i3_80191010(Actor* actor) {
|
||||
switch (actor->state) {
|
||||
case 0:
|
||||
actor->fwork[3] = actor->obj.rot.x;
|
||||
actor->fwork[1] = (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
actor->fwork[1] = RAND_FLOAT_CENTERED(1000.0f);
|
||||
actor->health = 10;
|
||||
actor->timer_0BC = 30;
|
||||
actor->scale = 5.0f;
|
||||
@ -936,8 +936,8 @@ void func_i3_80191010(Actor* actor) {
|
||||
break;
|
||||
case 3:
|
||||
for (i = 0; i < 3; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[3 + i], (Rand_ZeroOne() - 0.5f) * 20.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 42, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f),
|
||||
RAND_FLOAT(10.0f), 42, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 4;
|
||||
func_80066254(actor);
|
||||
@ -1024,8 +1024,8 @@ void func_i3_80191680(Actor* actor) {
|
||||
}
|
||||
if (actor->timer_0BC == 0) {
|
||||
actor->timer_0BC = 30;
|
||||
actor->fwork[1] = gPlayer[0].pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f);
|
||||
actor->fwork[2] = gPlayer[0].pos.y + 50.0f + (Rand_ZeroOne() * 200.0f);
|
||||
actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(1000.0f);
|
||||
actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(200.0f);
|
||||
actor->fwork[3] = gPlayer[0].unk_138 - 1500.0f;
|
||||
}
|
||||
actor->fwork[3] += gPlayer[0].vel.z;
|
||||
@ -1105,10 +1105,9 @@ void func_i3_80191BC4(Actor* actor) {
|
||||
actor->fwork[0] += 10.0f;
|
||||
func_i3_8018FF50(actor);
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z,
|
||||
(Rand_ZeroOne() * 0.05f) + 0.05f, 0);
|
||||
func_8007C484(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z,
|
||||
RAND_FLOAT(0.05f) + 0.05f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1264,8 +1263,8 @@ void func_i3_80192094(Actor* actor) {
|
||||
break;
|
||||
case 4:
|
||||
for (i = 0; i < 6; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 6], (Rand_ZeroOne() - 0.5f) * 40.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 20.0f, 44, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f),
|
||||
RAND_FLOAT(20.0f), 44, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 5;
|
||||
func_80066254(actor);
|
||||
@ -1366,8 +1365,8 @@ void func_i3_80192834(Actor* actor) {
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 5; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[5 + i], (Rand_ZeroOne() - 0.5f) * 20.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 10.0f, 43, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f),
|
||||
RAND_FLOAT(10.0f), 43, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 0;
|
||||
func_80066254(actor);
|
||||
@ -1483,8 +1482,8 @@ void func_i3_80192E64(Actor* actor) {
|
||||
break;
|
||||
case 3:
|
||||
for (i = 0; i < 9; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[9 + i], (Rand_ZeroOne() - 0.5f) * 40.0f,
|
||||
Rand_ZeroOne() * -10.0f, Rand_ZeroOne() * 20.0f, 59, actor->scale, 200, i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f),
|
||||
RAND_FLOAT(20.0f), 59, actor->scale, 200, i);
|
||||
}
|
||||
actor->unk_044 = 7;
|
||||
func_80066254(actor);
|
||||
@ -1636,10 +1635,10 @@ void func_i3_801937D8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) {
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->unk_44 = 100;
|
||||
effect->scale2 = 3.0f;
|
||||
effect->scale1 = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
effect->scale1 = RAND_FLOAT_CENTERED(20.0f);
|
||||
effect->unk_78 = 100;
|
||||
effect->unk_7A = 14;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -1672,8 +1671,8 @@ void func_i3_80193970(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s3
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->scale2 = 8.0f;
|
||||
effect->unk_44 = arg5;
|
||||
effect->scale1 = (Rand_ZeroOne() - 0.5f) * 200.0f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->scale1 = RAND_FLOAT_CENTERED(200.0f);
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->state = 1;
|
||||
effect->unk_78 = 100;
|
||||
effect->unk_7A = 13;
|
||||
@ -1700,8 +1699,8 @@ void func_i3_80193B08(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) {
|
||||
effect->obj.pos.x = xPos;
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->vel.x = (Rand_ZeroOne() - 0.5f) * 5.0f;
|
||||
effect->vel.y = (Rand_ZeroOne() - 0.5f) * 3.0f;
|
||||
effect->vel.x = RAND_FLOAT_CENTERED(5.0f);
|
||||
effect->vel.y = RAND_FLOAT_CENTERED(3.0f);
|
||||
effect->unk_48 = 3;
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
effect->unk_48 = -effect->unk_48;
|
||||
@ -1711,7 +1710,7 @@ void func_i3_80193B08(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) {
|
||||
effect->unk_78 = 101;
|
||||
effect->unk_7A = 15;
|
||||
effect->scale2 = scale * 0.25f;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
if (scale == 6.0f) {
|
||||
effect->vel.z = gPlayer[0].vel.z * 0.6f;
|
||||
}
|
||||
@ -2299,7 +2298,7 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
bossZO->swork[ZO_SWK_1] &= 1;
|
||||
}
|
||||
bossZO->fwork[ZO_FWK_5] += 4.0f;
|
||||
bossZO->vel.x = __cosf(bossZO->fwork[ZO_FWK_5] * M_DTOR) * 40.0f;
|
||||
bossZO->vel.x = COS_DEG(bossZO->fwork[ZO_FWK_5]) * 40.0f;
|
||||
Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7],
|
||||
Math_RadToDeg(Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x,
|
||||
(D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] +
|
||||
@ -2484,22 +2483,22 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
D_80178340 = D_80178358 = 255;
|
||||
D_80178358 = 0;
|
||||
D_8017835C = 25;
|
||||
D_80178480 = (Rand_ZeroOne() * 20.0f) + 20.0f;
|
||||
D_80178480 = (s32) (RAND_FLOAT(20.0f) + 20.0f);
|
||||
}
|
||||
if (D_80178480 == 29) {
|
||||
D_80178348 = D_80178350 = D_80178354 = D_80178340 = 0;
|
||||
}
|
||||
if (!(gGameFrameCount & 3)) {
|
||||
spE4.x = ((Rand_ZeroOne() - 0.5f) * 300.0f) + bossZO->obj.pos.x;
|
||||
spE4.y = ((Rand_ZeroOne() - 0.5f) * 200.0f) + (bossZO->obj.pos.y + 600.0f);
|
||||
spE4.x = RAND_FLOAT_CENTERED(300.0f) + bossZO->obj.pos.x;
|
||||
spE4.y = RAND_FLOAT_CENTERED(200.0f) + (bossZO->obj.pos.y + 600.0f);
|
||||
spE4.z = bossZO->obj.pos.z - 50.0f;
|
||||
spD8.x = bossZO->obj.rot.x;
|
||||
spD8.y = Math_ModF(((Rand_ZeroOne() - 0.5f) * 60.0f) + 360.0f, 360.0f);
|
||||
spD8.y = Math_ModF(RAND_FLOAT_CENTERED(60.0f) + 360.0f, 360.0f);
|
||||
spD8.z = bossZO->obj.rot.z;
|
||||
for (i = 0; i < 5; i++) {
|
||||
func_i3_801900FC(&spE4, &spD8, (Rand_ZeroOne() - 0.5f) * 30.0f, (Rand_ZeroOne() - 0.5f) * 20.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 30.0f, 4, 1.0f,
|
||||
(Rand_ZeroOne() * 15.0f) + (bossZO->unk_3F8 * 10.0f), 0);
|
||||
func_i3_801900FC(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f),
|
||||
RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (bossZO->unk_3F8 * 10.0f),
|
||||
0);
|
||||
}
|
||||
}
|
||||
bossZO->vel.x = 0.0f;
|
||||
@ -2510,7 +2509,7 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
}
|
||||
func_8007C120(sZoFwork[ZO_BSF_55_X], sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], bossZO->vel.x,
|
||||
bossZO->vel.y, bossZO->vel.z, 0.2f, 10);
|
||||
func_8007D0E0(((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_55_X],
|
||||
func_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + sZoFwork[ZO_BSF_55_X],
|
||||
((Rand_ZeroOne() - 0.2f) * 800.0f) + sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], 10.0f);
|
||||
if (bossZO->timer_050 == 30) {
|
||||
Radio_PlayMessage(gMsg_ID_6079, RCID_BOSS_ZONESS);
|
||||
@ -2546,8 +2545,8 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
D_801779A8[0] = 20.0f;
|
||||
if (!(gGameFrameCount & 7) &&
|
||||
(func_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) {
|
||||
func_8008377C(((Rand_ZeroOne() - 0.5f) * 500.0f) + bossZO->obj.pos.x, sp134 - 300.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f);
|
||||
func_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f,
|
||||
RAND_FLOAT_CENTERED(3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f);
|
||||
}
|
||||
if ((bossZO->timer_050 == 0) || (bossZO->obj.pos.y < -800.0f)) {
|
||||
Object_Kill(&bossZO->obj, bossZO->sfxPos);
|
||||
@ -2736,9 +2735,9 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) {
|
||||
D_801779A8[0] = 20.0f;
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007D0E0(((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_52_X],
|
||||
((Rand_ZeroOne() - 0.5f) * 200.0f) + sZoFwork[ZO_BSF_52_Y],
|
||||
((Rand_ZeroOne() - 0.5f) * 100.0f) + sZoFwork[ZO_BSF_52_Z], 5.0f);
|
||||
func_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + sZoFwork[ZO_BSF_52_X],
|
||||
RAND_FLOAT_CENTERED(200.0f) + sZoFwork[ZO_BSF_52_Y],
|
||||
RAND_FLOAT_CENTERED(100.0f) + sZoFwork[ZO_BSF_52_Z], 5.0f);
|
||||
}
|
||||
if (bossZO->swork[ZO_SWK_14] != 0) {
|
||||
if (sZoLimbTimers[ZO_LIMB_5] == 0) {
|
||||
@ -3037,9 +3036,9 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
}
|
||||
if (func_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, bossZO->obj.pos.y - 500.0f, bossZO->obj.pos.z) != 0) {
|
||||
Math_SmoothStepToF(&bossZO->obj.pos.y, sp134 - 20.0f, 0.1f, bossZO->fwork[ZO_FWK_4], 0.0f);
|
||||
bossZO->fwork[ZO_FWK_1] = __sinf(gGameFrameCount * 7.0f * M_DTOR) * 12.0f;
|
||||
bossZO->fwork[ZO_FWK_2] = __cosf(gGameFrameCount * 9.0f * M_DTOR) * 12.0f;
|
||||
bossZO->fwork[ZO_FWK_3] = __sinf(gGameFrameCount * 10.0f * M_DTOR) * 30.0f;
|
||||
bossZO->fwork[ZO_FWK_1] = SIN_DEG(gGameFrameCount * 7.0f) * 12.0f;
|
||||
bossZO->fwork[ZO_FWK_2] = COS_DEG(gGameFrameCount * 9.0f) * 12.0f;
|
||||
bossZO->fwork[ZO_FWK_3] = SIN_DEG(gGameFrameCount * 10.0f) * 30.0f;
|
||||
if ((bossZO->timer_054 == 0) && (sZoSwork[ZO_BSS_5] < 2)) {
|
||||
func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 50.0f, 0.0f, 5.0f);
|
||||
func_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 46.0f, 19.0f, 5.0f);
|
||||
@ -3087,7 +3086,7 @@ void func_i3_80194A84(Boss* bossZO) {
|
||||
|
||||
for (sp124 = 0, temp2 = &sZoSwork[ZO_BSS_49], temp3 = &sZoFwork[ZO_BSF_112]; sp124 < 6; sp124++, temp2++, temp3++) {
|
||||
if ((!(&gPlayer[0].pos)) && (!(&gPlayer[0].pos))) {}
|
||||
*temp3 = __sinf(*temp2 * 50.0f * M_DTOR) * func_i3_80193CC8(*temp2);
|
||||
*temp3 = SIN_DEG(*temp2 * 50.0f) * func_i3_80193CC8(*temp2);
|
||||
}
|
||||
}
|
||||
#else
|
||||
@ -3253,7 +3252,7 @@ void func_i3_80198F3C(Boss* bossZO, s32 arg1, s32 arg2) {
|
||||
sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] =
|
||||
sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15;
|
||||
}
|
||||
func_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + ((Rand_ZeroOne() - 0.5f) * 400.0f),
|
||||
func_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + RAND_FLOAT_CENTERED(400.0f),
|
||||
sZoFwork[ZO_BSF_1 + arg2] + (Rand_ZeroOne() - 0.2f) * 800.0f, sZoFwork[ZO_BSF_2 + arg2], 7.0f);
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C120(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2], bossZO->vel.x,
|
||||
@ -3381,9 +3380,9 @@ void func_i3_8019969C(Actor* actor) {
|
||||
if (actor->health <= 0) {
|
||||
actor->health = 0;
|
||||
for (i = 0; i < 5; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, 1.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, 1.0f);
|
||||
}
|
||||
func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5.0f);
|
||||
actor->unk_044 = 5;
|
||||
@ -3668,7 +3667,7 @@ void func_i3_8019A5D4(Actor* actor) {
|
||||
actor->obj.pos.z = sZoFwork[ZO_BSF_65_Z];
|
||||
if ((sZoSwork[ZO_BSS_20] != 0) && (actor->timer_0BC == 0)) {
|
||||
if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].state == 8)) {
|
||||
var_fv1 = (Rand_ZeroOne() - 0.5f) * 3000.0f;
|
||||
var_fv1 = RAND_FLOAT_CENTERED(3000.0f);
|
||||
var_fa0 = 0.0f;
|
||||
} else {
|
||||
var_fv1 = 0.0f;
|
||||
@ -3801,8 +3800,8 @@ void func_i3_8019ACCC(Actor* actor) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1);
|
||||
sp94 = (180.0f / var_s4) + 1.0f;
|
||||
for (i = 0; i < var_s4; i++) {
|
||||
temp_fs1_2 = __sinf(i * sp94 * M_DTOR) * actor->fwork[5];
|
||||
temp_fs0_4 = __cosf(i * sp94 * M_DTOR) * actor->fwork[5] * -0.25f;
|
||||
temp_fs1_2 = SIN_DEG(i * sp94) * actor->fwork[5];
|
||||
temp_fs0_4 = COS_DEG(i * sp94) * actor->fwork[5] * -0.25f;
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, actor->fwork[1], 1);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, temp_fs1_2, 0.0f, 1);
|
||||
@ -3999,19 +3998,19 @@ void func_i3_8019B854(Actor* actor) {
|
||||
break;
|
||||
case 1:
|
||||
for (i = 0; i < 6; i++) {
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[6 + i], (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 20.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 39, actor->scale,
|
||||
(Rand_ZeroOne() * 15.0f) + (actor->scale * 10.0f), i);
|
||||
func_i3_801900FC(&actor->vwork[i], &actor->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, actor->scale,
|
||||
RAND_FLOAT(15.0f) + (actor->scale * 10.0f), i);
|
||||
}
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.y,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + actor->obj.pos.z, 2.0f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y,
|
||||
RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, 2.0f);
|
||||
}
|
||||
for (i = 0; i < 3; i++) {
|
||||
func_8007D0E0(actor->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 50.0f),
|
||||
actor->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 50.0f) + 20.0f,
|
||||
actor->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 30.0f), 10.0f + 2 * i);
|
||||
func_8007D0E0(actor->obj.pos.x + RAND_FLOAT_CENTERED(50.0f),
|
||||
actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f) + 20.0f,
|
||||
actor->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), 10.0f + 2 * i);
|
||||
}
|
||||
actor->obj.pos.y += 100.0f;
|
||||
if (D_i3_801BF824[actor->iwork[0]] < 1000) {
|
||||
@ -4026,8 +4025,8 @@ void func_i3_8019B854(Actor* actor) {
|
||||
spB4.x = D_i3_801BF84C[j].x + actor->obj.pos.x;
|
||||
spB4.y = D_i3_801BF84C[j].y + actor->obj.pos.y;
|
||||
spB4.z = D_i3_801BF84C[j].z + actor->obj.pos.z;
|
||||
sp9C.x = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
sp9C.y = (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
sp9C.x = RAND_FLOAT_CENTERED(10.0f);
|
||||
sp9C.y = RAND_FLOAT_CENTERED(10.0f);
|
||||
sp9C.z = 50.0f;
|
||||
func_8007EE68(353, &spB4, &spA8, &spA8, &sp9C, 1.0f);
|
||||
}
|
||||
@ -4515,9 +4514,9 @@ void func_i3_8019D428(Player* player) {
|
||||
s32 sp2C;
|
||||
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.5f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f;
|
||||
player->unk_0F4 += 3.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR) * 1.5f;
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f;
|
||||
switch (player->unk_1D0) { /* irregular */
|
||||
case 0:
|
||||
gCsFrameCount = 0;
|
||||
@ -4847,9 +4846,9 @@ void func_i3_8019D76C(Player* player) {
|
||||
Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f);
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
#else
|
||||
// zoness outro
|
||||
|
@ -560,8 +560,8 @@ void func_i3_801A8E30(void) {
|
||||
spA8[i] = 0.0f;
|
||||
sp64[i] = 0.0f;
|
||||
} else {
|
||||
spA8[i] = (Rand_ZeroOne() - 0.5f) * 70.0f;
|
||||
sp64[i] = (Rand_ZeroOne() - 0.5f) * 70.0f;
|
||||
spA8[i] = RAND_FLOAT_CENTERED(70.0f);
|
||||
sp64[i] = RAND_FLOAT_CENTERED(70.0f);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < 34; i++) {
|
||||
@ -664,8 +664,8 @@ void func_i3_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < 36; i += spread) {
|
||||
temp_fs1 = __sinf(i * 10.0f * M_DTOR) * radius;
|
||||
temp_fs0 = __cosf(i * 10.0f * M_DTOR) * radius;
|
||||
temp_fs1 = SIN_DEG(i * 10.0f) * radius;
|
||||
temp_fs0 = COS_DEG(i * 10.0f) * radius;
|
||||
temp = gGroundLevel + 30.0f;
|
||||
func_8007B8F8(actor->obj.pos.x + temp_fs1, temp, actor->obj.pos.z + temp_fs0, scale);
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ void func_i4_801888C0(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel,
|
||||
actor->vel.z = zVel;
|
||||
|
||||
actor->scale = 2.5f;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 25.0f;
|
||||
actor->timer_0BC = RAND_INT(15.0f) + 25.0f;
|
||||
actor->gravity = 0.5f;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
@ -476,14 +476,14 @@ void func_i4_80188AD0(Actor* actor) {
|
||||
actor->fwork[0] += 2.0f;
|
||||
if (actor->state == 2) {
|
||||
actor->state = 3;
|
||||
func_i4_80188A48(actor->vwork, &actor->vwork[6], (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 36);
|
||||
func_i4_80188A48(&actor->vwork[1], &actor->vwork[7], (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 36);
|
||||
func_i4_80188A48(&actor->vwork[2], &actor->vwork[8], (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 35);
|
||||
func_i4_80188A48(&actor->vwork[3], &actor->vwork[9], (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 10.0f) + 10.0f, (Rand_ZeroOne() - 0.5f) * 50.0f, 35);
|
||||
func_i4_80188A48(actor->vwork, &actor->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f,
|
||||
RAND_FLOAT_CENTERED(50.0f), 36);
|
||||
func_i4_80188A48(&actor->vwork[1], &actor->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f,
|
||||
RAND_FLOAT_CENTERED(50.0f), 36);
|
||||
func_i4_80188A48(&actor->vwork[2], &actor->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f,
|
||||
RAND_FLOAT_CENTERED(50.0f), 35);
|
||||
func_i4_80188A48(&actor->vwork[3], &actor->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f,
|
||||
RAND_FLOAT_CENTERED(50.0f), 35);
|
||||
func_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 180.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10);
|
||||
actor->unk_044 = 1;
|
||||
actor->obj.pos.y += 230.0f;
|
||||
|
@ -75,7 +75,7 @@ void func_i4_80199B18(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3
|
||||
effect->scale1 = 0.5f;
|
||||
|
||||
effect->unk_4C = 2;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
|
||||
@ -117,7 +117,7 @@ void func_i4_80199C60(Actor* actor) {
|
||||
|
||||
var_fv1 = gBosses[0].obj.pos.x - actor->obj.pos.x;
|
||||
var_fa0 = gBosses[0].obj.pos.z - actor->obj.pos.z;
|
||||
__sinf((gGameFrameCount * M_DTOR));
|
||||
SIN_DEG(gGameFrameCount);
|
||||
|
||||
if (0) {
|
||||
;
|
||||
@ -130,8 +130,8 @@ void func_i4_80199C60(Actor* actor) {
|
||||
}
|
||||
|
||||
if (actor->unk_0E4 < 100) {
|
||||
var_fv1 = __sinf(((f32) ((actor->index * 45) + gGameFrameCount)) * M_DTOR) * 5000.0f;
|
||||
var_fa0 = __cosf(((f32) ((actor->index * 45) + (gGameFrameCount * 2))) * M_DTOR) * 5000.0f;
|
||||
var_fv1 = SIN_DEG((actor->index * 45) + gGameFrameCount) * 5000.0f;
|
||||
var_fa0 = COS_DEG((actor->index * 45) + (gGameFrameCount * 2)) * 5000.0f;
|
||||
} else {
|
||||
var_fa0 = 0.0f;
|
||||
var_fv1 = 0.0f;
|
||||
@ -342,11 +342,11 @@ void func_i4_8019A3E8(Actor* actor) {
|
||||
Actor_Initialize(actorPtr);
|
||||
actorPtr->obj.status = OBJ_ACTIVE;
|
||||
actorPtr->obj.id = OBJ_ACTOR_197;
|
||||
Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * 0.017453292f, 0);
|
||||
Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * M_DTOR, 0);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34);
|
||||
|
||||
actorPtr->obj.pos.x = sp34.x;
|
||||
actorPtr->obj.pos.y = (Rand_ZeroOne() * 1000.0f) + 300.0f;
|
||||
actorPtr->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f;
|
||||
actorPtr->obj.pos.z = sp34.z;
|
||||
|
||||
actorPtr->unk_0F4.y = actor->unk_04E * 18.0f;
|
||||
@ -658,7 +658,7 @@ void func_i4_8019B48C(void) {
|
||||
actor->obj.pos.x = D_i4_8019F528[i].x;
|
||||
actor->obj.pos.y = D_i4_8019F528[i].y;
|
||||
actor->obj.pos.z = D_i4_8019F528[i].z;
|
||||
actor->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
actor->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
actor->vel.x = 5.0f;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
@ -989,8 +989,8 @@ void func_i4_8019BA64(Player* player) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * 0.017453292f, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * 0.017453292f), 1);
|
||||
Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1);
|
||||
|
||||
sp74.x = 0.0f;
|
||||
sp74.y = 0.0f;
|
||||
@ -1558,9 +1558,9 @@ void func_i4_8019C85C(Player* player) {
|
||||
}
|
||||
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_i4_8019DD20(Actor* actor) {
|
||||
@ -1727,18 +1727,18 @@ void func_i4_8019E454(Boss* boss) {
|
||||
z = boss->obj.pos.z + 1000.0f;
|
||||
|
||||
for (i = 0; i < 25; i++) {
|
||||
func_800794CC(x + ((Rand_ZeroOne() - 0.5f) * 300.0f), y + ((Rand_ZeroOne() - 0.5f) * 100.0f), z, 2.0f);
|
||||
func_80079618(x + ((Rand_ZeroOne() - 0.5f) * 300.0f), y + ((Rand_ZeroOne() - 0.5f) * 100.0f), z, 2.0f);
|
||||
func_800794CC(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f);
|
||||
func_80079618(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f);
|
||||
}
|
||||
func_8007BFFC(x, y, z, 0.0f, 0.0f, 0.0f, 20.0f, 30);
|
||||
}
|
||||
|
||||
if (boss->timer_052 != 0) {
|
||||
for (j = 0; j < 1; j++) {
|
||||
i = Rand_ZeroOne() * 11.99f;
|
||||
i = RAND_INT(11.99f);
|
||||
func_i4_80199BDC(D_i4_8019F64C[i].x + boss->obj.pos.x, D_i4_8019F64C[i].y + boss->obj.pos.y,
|
||||
D_i4_8019F64C[i].z + boss->obj.pos.z, (Rand_ZeroOne() - 0.5f) * 5.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 5.0f, 10.0f, (Rand_ZeroOne() * 2.0f) + 4.0f);
|
||||
D_i4_8019F64C[i].z + boss->obj.pos.z, RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f),
|
||||
10.0f, RAND_FLOAT(2.0f) + 4.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1763,12 +1763,12 @@ void func_i4_8019E454(Boss* boss) {
|
||||
Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F64C[(s32) (Rand_ZeroOne() * 11.99f)], &dest);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F64C[RAND_INT(11.99f)], &dest);
|
||||
func_8007C484(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x,
|
||||
boss->vel.y, boss->vel.z, (Rand_ZeroOne() * 0.1f) + 0.15f, 0);
|
||||
boss->vel.y, boss->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0);
|
||||
if (((gGameFrameCount % 7) == 0) && (Rand_ZeroOne() < 0.5f)) {
|
||||
func_i4_80199BDC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x,
|
||||
boss->vel.y, boss->vel.z + 5.0f, (2.0f * Rand_ZeroOne()) + 4.0f);
|
||||
boss->vel.y, boss->vel.z + 5.0f, RAND_FLOAT(2.0f) + 4.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1820,8 +1820,8 @@ void func_i4_8019EA68(void) {
|
||||
actor->obj.pos.y = D_80178310[i].yPos;
|
||||
actor->obj.pos.z = -D_80178310[i].zPos1;
|
||||
actor->health = 24;
|
||||
actor->unk_0F4.x = (Rand_ZeroOne() - 0.5f) * 4.0f;
|
||||
actor->unk_0F4.y = (Rand_ZeroOne() - 0.5f) * 4.0f;
|
||||
actor->unk_0F4.x = RAND_FLOAT_CENTERED(4.0f);
|
||||
actor->unk_0F4.y = RAND_FLOAT_CENTERED(4.0f);
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
actor->unk_044 = 1;
|
||||
|
||||
|
@ -211,14 +211,12 @@ void func_i5_8018769C(Player* player) {
|
||||
}
|
||||
|
||||
if (player->pos.y < 100.0f) {
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 30.0f) + player->pos.x, 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 30.0f) + player->unk_138, (2.0f * Rand_ZeroOne()) + 3.5f, 255,
|
||||
12, 1);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(30.0f) + player->pos.x, 30.0f,
|
||||
RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1);
|
||||
Object_Kill(&gActors[3].obj, gActors[3].sfxPos);
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&player->unk_0F0, __sinf(((gGameFrameCount) *5.0f) * M_DTOR) * 10.0f, 0.1f, 100.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f);
|
||||
|
||||
if (gCsFrameCount == 0x244) {
|
||||
D_80177838 = 0x32;
|
||||
@ -257,8 +255,8 @@ void func_i5_80188108(Actor* actor, s32 arg1) {
|
||||
actor->obj.pos.y = D_i5_801B7328[arg1] + player->pos.y;
|
||||
actor->obj.pos.z = D_i5_801B7338[arg1] + player->pos.z;
|
||||
|
||||
actor->fwork[7] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[8] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[7] = RAND_FLOAT(360.0f);
|
||||
actor->fwork[8] = RAND_FLOAT(360.0f);
|
||||
|
||||
actor->vel.x = player->vel.x;
|
||||
actor->vel.y = player->vel.y;
|
||||
@ -330,7 +328,7 @@ void func_i5_801882CC(Player* player) {
|
||||
|
||||
D_80177A48[2] = D_80177A48[1] + D_80177A48[2];
|
||||
|
||||
Matrix_RotateX(gCalcMatrix, -0.17453292f, 0);
|
||||
Matrix_RotateX(gCalcMatrix, -10.0f * M_DTOR, 0);
|
||||
Matrix_RotateY(gCalcMatrix, D_80177A48[2] * M_DTOR, 1);
|
||||
|
||||
src.x = 0.0f;
|
||||
@ -365,11 +363,11 @@ void func_i5_801882CC(Player* player) {
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
x = D_i5_801B72B8[i].x;
|
||||
y = D_i5_801B72B8[i].y + (Rand_ZeroOne() - 0.5f) * 10.0f;
|
||||
y = D_i5_801B72B8[i].y + RAND_FLOAT_CENTERED(10.0f);
|
||||
z = D_i5_801B72B8[i].z;
|
||||
|
||||
func_8007A900(player->pos.x + x, player->pos.y + y, player->unk_138 + z,
|
||||
(Rand_ZeroOne() * 0.5f) + 0.5f, 255, 21, 0);
|
||||
func_8007A900(player->pos.x + x, player->pos.y + y, player->unk_138 + z, RAND_FLOAT(0.5f) + 0.5f,
|
||||
255, 21, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -384,27 +382,23 @@ void func_i5_801882CC(Player* player) {
|
||||
D_801779C0 = player->pos.z + player->unk_144;
|
||||
|
||||
if (player->pos.y < 100.0f) {
|
||||
camAtY = __sinf((gGameFrameCount * 130.0f) * 0.017453292f) * 3.0f;
|
||||
camAtY = SIN_DEG(gGameFrameCount * 130.0f) * 3.0f;
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&player->unk_170, 2.0f, 1.0f, 0.2f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_16C, 2.0f, 1.0f, 0.2f, 0.0f);
|
||||
|
||||
if (gCsFrameCount < 1470) {
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 30.0f) + (player->pos.x + 30.0f), 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 30.0f) + player->unk_138, (2.0f * Rand_ZeroOne()) + 3.5f, 255,
|
||||
12, 1);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x + 30.0f), 30.0f,
|
||||
RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1);
|
||||
}
|
||||
|
||||
func_8007A900(((Rand_ZeroOne() - 0.5f) * 30.0f) + (player->pos.x - 30.0f), 30.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 30.0f) + player->unk_138, (2.0f * Rand_ZeroOne()) + 3.5f, 255, 12,
|
||||
1);
|
||||
Math_SmoothStepToF(&player->unk_0F0, __sinf((gGameFrameCount * 6.0f) * 0.017453292f) * 18.0f, 0.1f, 100.0f,
|
||||
0.0f);
|
||||
Math_SmoothStepToF(&player->unk_080, __sinf((gGameFrameCount * 3.0f) * 0.017453292f) * 5.0f, 0.1f, 100.0f,
|
||||
0.0f);
|
||||
func_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x - 30.0f), 30.0f,
|
||||
RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1);
|
||||
Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 6.0f) * 18.0f, 0.1f, 100.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->unk_080, SIN_DEG(gGameFrameCount * 3.0f) * 5.0f, 0.1f, 100.0f, 0.0f);
|
||||
|
||||
x = __sinf((gGameFrameCount * 4.0f) * 0.017453292f) * -1.5f;
|
||||
x = SIN_DEG(gGameFrameCount * 4.0f) * -1.5f;
|
||||
|
||||
player->vel.x = x;
|
||||
player->vel.y += 0.1f;
|
||||
|
@ -72,7 +72,7 @@ extern u32 D_C039290[];
|
||||
extern u32 D_C03A290[];
|
||||
|
||||
void func_i6_801876FC(void) {
|
||||
f32 temp_ft3;
|
||||
s32 temp_ft3;
|
||||
s32* var_s0;
|
||||
s32* var_s3;
|
||||
s32 i;
|
||||
@ -81,11 +81,11 @@ void func_i6_801876FC(void) {
|
||||
var_s0 = SEGMENTED_TO_VIRTUAL(&D_C039290);
|
||||
var_s3 = SEGMENTED_TO_VIRTUAL(&D_C03A290);
|
||||
|
||||
for (i = 0; i < 1024; i += 32) {
|
||||
temp_ft3 = 4.0f * __sinf(((((i / 32) + (((s32) gGameFrameCount) / 2)) & 0x1F)) * (M_PI / 16.0f));
|
||||
for (i = 0; i < 32 * 32; i += 32) {
|
||||
temp_ft3 = 4.0f * __sinf((s32) (((i / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32));
|
||||
|
||||
for (j = 0; j < 32; j++) {
|
||||
var_s0[i + ((((s32) temp_ft3) + j) & 0x1F)] = var_s3[i + j];
|
||||
var_s0[i + ((temp_ft3 + j) % 32U)] = var_s3[i + j];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ void func_i6_80187C5C(void) {
|
||||
Object_58* obj58;
|
||||
s32 i;
|
||||
|
||||
switch ((s32) (Rand_ZeroOne() * 2.9f)) {
|
||||
switch (RAND_INT(2.9f)) {
|
||||
case 0:
|
||||
D_80178310 = SEGMENTED_TO_VIRTUAL(&D_C036310);
|
||||
break;
|
||||
@ -509,10 +509,10 @@ void func_i6_80188CB8(Boss* boss) {
|
||||
if (boss->swork[7] != 0) {
|
||||
boss->swork[7]--;
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_i6_8018887C(((Rand_ZeroOne() - 0.5f) * 100.0f) + boss->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 300.0f) + (boss->obj.pos.y - 250.0f),
|
||||
((Rand_ZeroOne() - 0.5f) * 100.0f) + boss->obj.pos.z, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 10.0f, (Rand_ZeroOne() - 0.5f) * 50.0f);
|
||||
func_i6_8018887C(RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(300.0f) + (boss->obj.pos.y - 250.0f),
|
||||
RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(50.0f));
|
||||
}
|
||||
}
|
||||
boss->fwork[14] += boss->fwork[15];
|
||||
@ -704,8 +704,8 @@ void func_i6_80189724(Actor* actor) {
|
||||
vec.y = 0.0f;
|
||||
vec.z = -30.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &vel);
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * (Rand_ZeroOne() * M_PI), 1);
|
||||
vec.x = Rand_ZeroOne() * 300.0f;
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 1);
|
||||
vec.x = RAND_FLOAT(300.0f);
|
||||
vec.y = 0.0f;
|
||||
vec.z = 0.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &displacement);
|
||||
@ -715,7 +715,7 @@ void func_i6_80189724(Actor* actor) {
|
||||
actor->vel.z = vel.z * 0.2f;
|
||||
for (i = 0; i < 1; i++) {
|
||||
func_8007797C(actor->obj.pos.x + displacement.x, actor->obj.pos.y + displacement.y,
|
||||
actor->obj.pos.z + displacement.z, vel.x, vel.y, vel.z, (Rand_ZeroOne() * 2.5f) + 15.5f);
|
||||
actor->obj.pos.z + displacement.z, vel.x, vel.y, vel.z, RAND_FLOAT(2.5f) + 15.5f);
|
||||
}
|
||||
}
|
||||
if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) &&
|
||||
@ -743,12 +743,12 @@ void func_i6_801899E4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2,
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->unk_4C = arg5;
|
||||
effect->scale2 = (Rand_ZeroOne() * 0.8f + 0.3f) * scale2;
|
||||
effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2;
|
||||
effect->timer_50 = 100;
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f);
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -838,13 +838,13 @@ void func_i6_80189B70(Boss* boss) {
|
||||
case 1:
|
||||
if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) && (boss->timer_050 == 0)) {
|
||||
boss->fwork[2] = 1.6f;
|
||||
boss->timer_050 = (s32) Rand_ZeroOne() * 50.0f + 50;
|
||||
boss->fwork[3] = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
boss->fwork[4] = (Rand_ZeroOne() - 0.5f) * 1000.0f;
|
||||
boss->fwork[5] = (Rand_ZeroOne() - 0.5f) * 10000.0f;
|
||||
boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50;
|
||||
boss->fwork[3] = RAND_FLOAT_CENTERED(10000.0f);
|
||||
boss->fwork[4] = RAND_FLOAT_CENTERED(1000.0f);
|
||||
boss->fwork[5] = RAND_FLOAT_CENTERED(10000.0f);
|
||||
if (Rand_ZeroOne() < 0.3f) {
|
||||
boss->state = 2;
|
||||
boss->timer_050 = (s32) Rand_ZeroOne() * 100.0f + 50;
|
||||
boss->timer_050 = RAND_INT(1.0f) * 100.0f + 50;
|
||||
boss->fwork[1] = 0.0f;
|
||||
}
|
||||
}
|
||||
@ -852,7 +852,7 @@ void func_i6_80189B70(Boss* boss) {
|
||||
case 2:
|
||||
if (boss->timer_050 == 0) {
|
||||
boss->state = 1;
|
||||
boss->timer_050 = (s32) Rand_ZeroOne() * 50.0f + 50;
|
||||
boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50;
|
||||
boss->fwork[1] = 50.0f;
|
||||
}
|
||||
break;
|
||||
@ -890,7 +890,7 @@ void func_i6_80189B70(Boss* boss) {
|
||||
boss->timer_05A = 50;
|
||||
if (boss->swork[4] != 0) {
|
||||
boss->state = 1;
|
||||
boss->timer_050 = (s32) Rand_ZeroOne() * 50.0f + 50;
|
||||
boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50;
|
||||
boss->fwork[1] = 50.0f;
|
||||
} else {
|
||||
boss->state = 3;
|
||||
@ -942,16 +942,16 @@ void func_i6_80189B70(Boss* boss) {
|
||||
boss->obj.rot.x += 0.1f;
|
||||
boss->obj.pos.y -= 3.0f;
|
||||
Matrix_RotateY(gCalcMatrix, -gPlayer[0].unk_058, 0U);
|
||||
vec.x = (Rand_ZeroOne() - 0.5f) * 700.0f;
|
||||
vec.y = (Rand_ZeroOne() - 0.5f) * 300.0f;
|
||||
vec.x = RAND_FLOAT_CENTERED(700.0f);
|
||||
vec.y = RAND_FLOAT_CENTERED(300.0f);
|
||||
vec.z = 500.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &vec, &sp64);
|
||||
func_8007797C(boss->obj.pos.x + sp64.x, boss->obj.pos.y + sp64.y, boss->obj.pos.z + sp64.z, 0.0f, 0.0f,
|
||||
0.0f, (Rand_ZeroOne() * 5.0f) + 7.0f);
|
||||
0.0f, RAND_FLOAT(5.0f) + 7.0f);
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(((Rand_ZeroOne() - 0.5f) * 600.0f) + boss->obj.pos.x,
|
||||
(Rand_ZeroOne() * 100.0f) + (boss->obj.pos.y + 100.0f), boss->obj.pos.z, 0.0f, 0.0f, 0.0f,
|
||||
(Rand_ZeroOne() * 0.3f) + 0.5f, 0);
|
||||
func_8007C484(RAND_FLOAT_CENTERED(600.0f) + boss->obj.pos.x,
|
||||
RAND_FLOAT(100.0f) + (boss->obj.pos.y + 100.0f), boss->obj.pos.z, 0.0f, 0.0f, 0.0f,
|
||||
RAND_FLOAT(0.3f) + 0.5f, 0);
|
||||
}
|
||||
vec.x = 0.0f;
|
||||
vec.y = 0.0f;
|
||||
@ -1068,9 +1068,9 @@ void func_i6_80189B70(Boss* boss) {
|
||||
|
||||
if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(gGameFrameCount & 3)) {
|
||||
Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0U);
|
||||
vec.x = (Rand_ZeroOne() - 0.5f) * 800.0f;
|
||||
vec.x = RAND_FLOAT_CENTERED(800.0f);
|
||||
vec.y = 600.0f;
|
||||
vec.z = (Rand_ZeroOne() * 1000.0f) + -3000.0f;
|
||||
vec.z = RAND_FLOAT(1000.0f) + -3000.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64);
|
||||
func_i6_80189B00(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].unk_138 + sp64.z, 1.2f);
|
||||
}
|
||||
@ -1080,8 +1080,8 @@ void func_i6_80189B70(Boss* boss) {
|
||||
vec.y = 0.0f;
|
||||
vec.z = -50.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp58);
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * (Rand_ZeroOne() * M_PI), 1);
|
||||
vec.x = Rand_ZeroOne() * 50.0f + 120.0f;
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 1);
|
||||
vec.x = RAND_FLOAT(50.0f) + 120.0f;
|
||||
vec.y = 0.0f;
|
||||
vec.z = 0.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64);
|
||||
@ -1098,8 +1098,7 @@ void func_i6_80189B70(Boss* boss) {
|
||||
if (!(gGameFrameCount & frameCountMask)) {
|
||||
for (i = 0; i < sp98; i++) {
|
||||
func_8007797C(gPlayer[0].camEye.x + sp64.x, gPlayer[0].camEye.y + sp64.y,
|
||||
gPlayer[0].camEye.z + sp64.z, sp58.x, sp58.y, sp58.z,
|
||||
(Rand_ZeroOne() * 2.5f) + 2.5f);
|
||||
gPlayer[0].camEye.z + sp64.z, sp58.x, sp58.y, sp58.z, RAND_FLOAT(2.5f) + 2.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1256,7 +1255,7 @@ void func_i6_8018B8C0(Boss* boss) {
|
||||
|
||||
for (j = 0; j < 10; j++) {
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, 1);
|
||||
temp = __sinf(((s32) boss->fwork[19] * (i * 10 + j) + gGameFrameCount * 5) * M_DTOR) * boss->fwork[10];
|
||||
temp = SIN_DEG((s32) boss->fwork[19] * (i * 10 + j) + (gGameFrameCount * 5)) * boss->fwork[10];
|
||||
Matrix_RotateZ(gGfxMatrix, (boss->fwork[18] + temp) * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, boss->fwork[17] * M_DTOR, 1);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
@ -1293,11 +1292,11 @@ void func_i6_8018BDD8(void) {
|
||||
spC0[i] = 0.0f;
|
||||
sp7C[i] = 0.0f;
|
||||
} else if (gLevelMode == LEVELMODE_ALL_RANGE) {
|
||||
spC0[i] = (Rand_ZeroOne() - 0.5f) * 120.0f;
|
||||
sp7C[i] = (Rand_ZeroOne() - 0.5f) * 120.0f;
|
||||
spC0[i] = RAND_FLOAT_CENTERED(120.0f);
|
||||
sp7C[i] = RAND_FLOAT_CENTERED(120.0f);
|
||||
} else {
|
||||
spC0[i] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
sp7C[i] = (Rand_ZeroOne() - 0.5f) * 30.0f;
|
||||
spC0[i] = RAND_FLOAT_CENTERED(30.0f);
|
||||
sp7C[i] = RAND_FLOAT_CENTERED(30.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1372,9 +1371,9 @@ void func_i6_8018C660(Effect* effect, f32 xPos, f32 yPos, f32 zPos, s32 arg4) {
|
||||
effect->obj.pos.y = yPos;
|
||||
effect->obj.pos.z = zPos;
|
||||
effect->unk_4C = arg4;
|
||||
effect->scale2 = (Rand_ZeroOne() * 2.5f) + 5.0f;
|
||||
effect->unk_60.x = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
effect->scale2 = RAND_FLOAT(2.5f) + 5.0f;
|
||||
effect->unk_60.x = RAND_FLOAT_CENTERED(20.0f);
|
||||
effect->unk_60.y = RAND_FLOAT_CENTERED(20.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
}
|
||||
|
||||
@ -1402,12 +1401,12 @@ void func_i6_8018C7A0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3
|
||||
effect->state = 1;
|
||||
effect->unk_4C = arg7;
|
||||
if (arg7 < 8) {
|
||||
effect->scale2 = (Rand_ZeroOne() * 2.5f) + 5.0f;
|
||||
effect->scale2 = RAND_FLOAT(2.5f) + 5.0f;
|
||||
}
|
||||
effect->obj.rot.x = Rand_ZeroOne() * 360.0f;
|
||||
effect->obj.rot.y = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.x = (Rand_ZeroOne() * 10.0f) + 10.0f;
|
||||
effect->unk_60.y = (Rand_ZeroOne() * 10.0f) + 10.0f;
|
||||
effect->obj.rot.x = RAND_FLOAT(360.0f);
|
||||
effect->obj.rot.y = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.x = RAND_FLOAT(10.0f) + 10.0f;
|
||||
effect->unk_60.y = RAND_FLOAT(10.0f) + 10.0f;
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
effect->info.unk_10 = 100.0f;
|
||||
}
|
||||
@ -1437,8 +1436,8 @@ void func_i6_8018C958(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3
|
||||
effect->scale1 = scale;
|
||||
effect->scale2 = scale * 0.1f;
|
||||
effect->unk_44 = 100;
|
||||
effect->obj.rot.z = Rand_ZeroOne() * 360.0f;
|
||||
effect->unk_60.z = (Rand_ZeroOne() - 0.5f) * 20.0f;
|
||||
effect->obj.rot.z = RAND_FLOAT(360.0f);
|
||||
effect->unk_60.z = RAND_FLOAT_CENTERED(20.0f);
|
||||
Object_SetInfo(&effect->info, effect->obj.id);
|
||||
effect->info.unk_14 = 1;
|
||||
effect->info.unk_10 = 100.0f;
|
||||
@ -1702,9 +1701,9 @@ void func_i6_8018D2B0(Boss* boss) {
|
||||
15);
|
||||
|
||||
for (i = 0; i < 30; i++) {
|
||||
func_800794CC(boss->vwork[0].x + ((Rand_ZeroOne() - 0.5f) * 500.0f),
|
||||
boss->vwork[0].y + ((Rand_ZeroOne() - 0.5f) * 500.0f), boss->vwork[0].z,
|
||||
Rand_ZeroOne() + 1.0f);
|
||||
func_800794CC(boss->vwork[0].x + RAND_FLOAT_CENTERED(500.0f),
|
||||
boss->vwork[0].y + RAND_FLOAT_CENTERED(500.0f), boss->vwork[0].z,
|
||||
RAND_FLOAT(1.0f) + 1.0f);
|
||||
}
|
||||
func_8007B344(boss->vwork[0].x, boss->vwork[0].y, boss->vwork[0].z, 20.0f, 5);
|
||||
func_8007A6F0(&sp68, 0x2903B009);
|
||||
@ -1722,9 +1721,9 @@ void func_i6_8018D2B0(Boss* boss) {
|
||||
15);
|
||||
|
||||
for (i = 0; i < 30; i++) {
|
||||
func_800794CC(boss->vwork[1].x + ((Rand_ZeroOne() - 0.5f) * 500.0f),
|
||||
boss->vwork[1].y + ((Rand_ZeroOne() - 0.5f) * 500.0f), boss->vwork[1].z,
|
||||
Rand_ZeroOne() + 1.0f);
|
||||
func_800794CC(boss->vwork[1].x + RAND_FLOAT_CENTERED(500.0f),
|
||||
boss->vwork[1].y + RAND_FLOAT_CENTERED(500.0f), boss->vwork[1].z,
|
||||
RAND_FLOAT(1.0f) + 1.0f);
|
||||
}
|
||||
func_8007B344(boss->vwork[1].x, boss->vwork[1].y, boss->vwork[1].z, 20.0f, 5);
|
||||
func_8007A6F0(&sp68, 0x2903B009);
|
||||
@ -1783,8 +1782,8 @@ void func_i6_8018DA94(Boss* boss, Vec3f* arg1) {
|
||||
|
||||
func_8007BFFC(arg1->x, arg1->y, arg1->z, 0.0f, 0.0f, 0.0f, 10.0f, 10);
|
||||
for (i = 0; i < 7; i++) {
|
||||
func_800794CC(((Rand_ZeroOne() - 0.5f) * 200.0f) + arg1->x, ((Rand_ZeroOne() - 0.5f) * 200.0f) + arg1->y,
|
||||
arg1->z, (Rand_ZeroOne() * 0.5f) + 1.0f);
|
||||
func_800794CC(RAND_FLOAT_CENTERED(200.0f) + arg1->x, RAND_FLOAT_CENTERED(200.0f) + arg1->y, arg1->z,
|
||||
RAND_FLOAT(0.5f) + 1.0f);
|
||||
}
|
||||
func_8007B344(arg1->x, arg1->y, arg1->z, 10.0f, 5);
|
||||
Audio_PlaySfx(0x2903B009, boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
@ -2389,21 +2388,21 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
gRightWingHealth[0] = 0;
|
||||
player->wings.rightState = 1;
|
||||
func_i6_8018C8D4(boss->obj.pos.x, boss->obj.pos.y - 200.0f, boss->obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 10.0f, (Rand_ZeroOne() - 0.5f) * 10.0f, 10.0f, 8);
|
||||
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8);
|
||||
}
|
||||
if (player->wings.leftState == 2) {
|
||||
gLeftWingHealth[0] = 0;
|
||||
player->wings.leftState = 1;
|
||||
func_i6_8018C8D4(boss->obj.pos.x, boss->obj.pos.y - 200.0f, boss->obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 10.0f, (Rand_ZeroOne() - 0.5f) * 10.0f, 10.0f, 9);
|
||||
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9);
|
||||
}
|
||||
}
|
||||
if (boss->unk_04C >= 10 && boss->unk_04C < 20) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
func_i6_8018C8D4(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 100.0f),
|
||||
(boss->obj.pos.y - 200.0f) + ((Rand_ZeroOne() - 0.5f) * 100.0f), boss->obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() * 5.0f) + 5.0f, (s32) (Rand_ZeroOne() * 7.9));
|
||||
func_i6_8018C8D4(boss->obj.pos.x + RAND_FLOAT_CENTERED(100.0f),
|
||||
(boss->obj.pos.y - 200.0f) + RAND_FLOAT_CENTERED(100.0f), boss->obj.pos.z,
|
||||
RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(5.0f) + 5.0f,
|
||||
RAND_INT(7.9));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2417,9 +2416,9 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
boss->timer_056 = 50;
|
||||
|
||||
if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && !(gGameFrameCount & 3)) {
|
||||
func_i6_8018C734(gPlayer[0].camEye.x + ((Rand_ZeroOne() - 0.5f) * 3000.0f),
|
||||
gPlayer[0].camEye.y + ((Rand_ZeroOne() - 0.5f) * 3000.0f),
|
||||
gPlayer[0].camEye.z - D_80177D20, (s32) (Rand_ZeroOne() * 7.9));
|
||||
func_i6_8018C734(gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(3000.0f),
|
||||
gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(3000.0f), gPlayer[0].camEye.z - D_80177D20,
|
||||
RAND_INT(7.9));
|
||||
}
|
||||
if (boss->timer_050 > 0) {
|
||||
playerShot = gPlayerShots;
|
||||
@ -2584,14 +2583,13 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
limbCount = Animation_GetFrameData(&D_C017050, boss->unk_04C, spD0);
|
||||
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
|
||||
boss->vel.z, (Rand_ZeroOne() * 0.2f) + 0.2f, 0);
|
||||
func_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z,
|
||||
RAND_FLOAT(0.2f) + 0.2f, 0);
|
||||
}
|
||||
if (gCsFrameCount >= 0x33) {
|
||||
func_8007D0E0(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z,
|
||||
(Rand_ZeroOne() * 3.0f) + 3.0f);
|
||||
func_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, RAND_FLOAT(3.0f) + 3.0f);
|
||||
}
|
||||
|
||||
gCsFrameCount++;
|
||||
@ -2651,9 +2649,8 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
limbCount = Animation_GetFrameData(&D_C00208C, boss->unk_04C, spD0);
|
||||
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
|
||||
|
||||
func_8007C484(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 700.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 700.0f), boss->obj.pos.z, 0.0f, 0.0f,
|
||||
gPlayer[0].vel.z, (Rand_ZeroOne() * 0.15f) + 0.15f, 0);
|
||||
func_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), boss->obj.pos.y + RAND_FLOAT_CENTERED(700.0f),
|
||||
boss->obj.pos.z, 0.0f, 0.0f, gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0);
|
||||
break;
|
||||
case 10:
|
||||
boss->fwork[6] = 0.0f;
|
||||
@ -2667,9 +2664,8 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
limbCount = Animation_GetFrameData(&D_C00208C, boss->unk_04C, spD0);
|
||||
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
|
||||
|
||||
func_8007C484(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 700.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 700.0f), boss->obj.pos.z, 0.0f, 0.0f,
|
||||
gPlayer[0].vel.z, (Rand_ZeroOne() * 0.15f) + 0.15f, 0);
|
||||
func_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), boss->obj.pos.y + RAND_FLOAT_CENTERED(700.0f),
|
||||
boss->obj.pos.z, 0.0f, 0.0f, gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0);
|
||||
if (boss->timer_050 == 0) {
|
||||
boss->state = 9;
|
||||
boss->timer_050 = 130;
|
||||
@ -2689,13 +2685,12 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
boss->fwork[0] = 0.0f;
|
||||
boss->fwork[3] = 0.0f;
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
|
||||
boss->vel.z, (Rand_ZeroOne() * 0.2f) + 0.2f, 0);
|
||||
func_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z,
|
||||
RAND_FLOAT(0.2f) + 0.2f, 0);
|
||||
}
|
||||
func_8007D0E0(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z,
|
||||
(Rand_ZeroOne() * 5.0f) + 5.0f);
|
||||
func_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, RAND_FLOAT(5.0f) + 5.0f);
|
||||
break;
|
||||
case 32:
|
||||
boss->fwork[6] = -3000.0f;
|
||||
@ -2715,15 +2710,14 @@ void func_i6_8018DBF0(Boss* boss) {
|
||||
limbCount = Animation_GetFrameData(&D_C017050, boss->unk_04C, spD0);
|
||||
Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f);
|
||||
if (!(gGameFrameCount & 1)) {
|
||||
func_8007C484(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z, 0.0f, 0.0f,
|
||||
boss->vel.z, (Rand_ZeroOne() * 0.2f) + 0.2f, 0);
|
||||
func_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z,
|
||||
RAND_FLOAT(0.2f) + 0.2f, 0);
|
||||
}
|
||||
|
||||
if (gCsFrameCount > 50) {
|
||||
func_8007D0E0(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
boss->obj.pos.y + ((Rand_ZeroOne() - 0.5f) * 1000.0f), boss->obj.pos.z,
|
||||
(Rand_ZeroOne() * 3.0f) + 3.0f);
|
||||
func_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f),
|
||||
boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, RAND_FLOAT(3.0f) + 3.0f);
|
||||
}
|
||||
|
||||
gCsFrameCount++;
|
||||
@ -3219,23 +3213,23 @@ void func_i6_801928C8(Boss* boss) {
|
||||
}
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, 0.0f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 0.2617994f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_C017440);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, 2.0943952f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 0.2617994f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 120.0f * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_C017440);
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_RotateZ(gGfxMatrix, 4.1887903f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 0.2617994f, 1);
|
||||
Matrix_RotateZ(gGfxMatrix, 240.0f * M_DTOR, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1);
|
||||
Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1);
|
||||
Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
@ -3300,9 +3294,8 @@ void func_i6_80192E94(Actor* actor) {
|
||||
if (actor->health <= 0) {
|
||||
func_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f);
|
||||
for (i = 0; i < 7; i++) {
|
||||
func_80079618(((Rand_ZeroOne() - 0.5f) * 10.0f) + actor->obj.pos.x,
|
||||
((Rand_ZeroOne() - 0.5f) * 10.0f) + actor->obj.pos.y, actor->obj.pos.z,
|
||||
(Rand_ZeroOne() * 0.5f) + 0.5f);
|
||||
func_80079618(RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.x,
|
||||
RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT(0.5f) + 0.5f);
|
||||
}
|
||||
func_8007A6F0(&actor->obj.pos, 0x2903A008);
|
||||
Object_Kill(&actor->obj, actor->sfxPos);
|
||||
@ -3326,7 +3319,7 @@ void func_i6_80193244(Actor* actor) {
|
||||
scale *= 1.2f;
|
||||
}
|
||||
Matrix_Scale(gGfxMatrix, scale, scale, scale, 1);
|
||||
Matrix_RotateX(gGfxMatrix, 1.5707964f, 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
RCP_SetupDL(&gMasterDisp, 0x43);
|
||||
gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha);
|
||||
@ -3512,8 +3505,8 @@ void func_i6_80193AE4(s32 actorIndex) {
|
||||
return;
|
||||
}
|
||||
actor->iwork[11] = 1;
|
||||
actor->fwork[7] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[8] = Rand_ZeroOne() * 360.0f;
|
||||
actor->fwork[7] = RAND_FLOAT(360.0f);
|
||||
actor->fwork[8] = RAND_FLOAT(360.0f);
|
||||
actor->state = 100;
|
||||
Audio_PlaySfx(0x3100000C, actor->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
}
|
||||
@ -3554,7 +3547,7 @@ void func_i6_80193C4C(Player* player) {
|
||||
Math_SmoothStepToF(&player->camEye.x, player->pos.x, 0.1f, 15.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camEye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f);
|
||||
if (player->timer_1F8 == 0) {
|
||||
player->pos.y += __sinf(player->unk_0E4 * M_DTOR) * 15.0f;
|
||||
player->pos.y += SIN_DEG(player->unk_0E4) * 15.0f;
|
||||
Math_SmoothStepToF(&player->unk_0E4, 180.0f, 0.1f, 5.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->vel.z, 40.0f, 1.0f, 2.0f, 0.0f);
|
||||
} else {
|
||||
@ -3596,8 +3589,8 @@ void func_i6_80193C4C(Player* player) {
|
||||
case 2:
|
||||
player->unk_190 = D_80177A48[8];
|
||||
sp90 = 0;
|
||||
sp68.x = (Rand_ZeroOne() - 0.5f) * 150.0f;
|
||||
sp68.y = (Rand_ZeroOne() - 0.5f) * 150.0f;
|
||||
sp68.x = RAND_FLOAT_CENTERED(150.0f);
|
||||
sp68.y = RAND_FLOAT_CENTERED(150.0f);
|
||||
sp68.z = 0.0f;
|
||||
if (gCsFrameCount == 50) {
|
||||
Audio_PlaySfx(0x11403071, player->sfxPos, 0, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
@ -3621,8 +3614,8 @@ void func_i6_80193C4C(Player* player) {
|
||||
Math_SmoothStepToF(&D_80177A48[3], 200.0f, 0.1f, 5.0f, 0.0f);
|
||||
D_80177A48[4] += 4.5f;
|
||||
D_80177AB0 = 2;
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * (Rand_ZeroOne() * M_PI), 0);
|
||||
sp74.x = Rand_ZeroOne() * 50.0f + 120.0f;
|
||||
Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 0);
|
||||
sp74.x = RAND_FLOAT(50.0f) + 120.0f;
|
||||
sp74.y = 0.0f;
|
||||
sp74.z = 0.0f;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68);
|
||||
@ -3640,7 +3633,7 @@ void func_i6_80193C4C(Player* player) {
|
||||
for (i = 0; i < sp90; i++) {
|
||||
func_8007797C(player->pos.x + sp68.x, player->pos.y + sp68.y,
|
||||
player->pos.z - (D_80177A48[3] + D_80177A48[4]), 0.0f, 0.0f, 50.0f,
|
||||
(Rand_ZeroOne() * 2.5f) + 2.5f);
|
||||
RAND_FLOAT(2.5f) + 2.5f);
|
||||
}
|
||||
|
||||
Math_SmoothStepToF(&player->camEye.x, D_80177A48[1] + player->pos.x, 0.1f, 15.0f, 0.0f);
|
||||
@ -3734,9 +3727,9 @@ void func_i6_80193C4C(Player* player) {
|
||||
}
|
||||
if (gCsFrameCount > 40) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
func_8007797C(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 150.0f), boss->obj.pos.y + 500.0f,
|
||||
boss->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 150.0f), (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
60.0f, (Rand_ZeroOne() - 0.5f) * 10.0f, (Rand_ZeroOne() * 5.5f) + 5.5f);
|
||||
func_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(150.0f), boss->obj.pos.y + 500.0f,
|
||||
boss->obj.pos.z + RAND_FLOAT_CENTERED(150.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f,
|
||||
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 5.5f);
|
||||
}
|
||||
Math_SmoothStepToF(&D_801779B8, gActors[10].obj.pos.y, 1.0f, D_80177A48[1], 0.0f);
|
||||
Math_SmoothStepToF(&D_80177A48[1], 1000.0f, 1.0f, 5.0f, 0.0f);
|
||||
@ -3800,15 +3793,15 @@ void func_i6_80193C4C(Player* player) {
|
||||
D_801779B8 = gActors[10].obj.pos.y + 50.0f;
|
||||
D_801779C0 = gActors[10].obj.pos.z;
|
||||
if (!(gGameFrameCount & 3) && (gCsFrameCount < 215)) {
|
||||
func_8007797C(boss->obj.pos.x + ((Rand_ZeroOne() - 0.5f) * 350.0f), boss->obj.pos.y + 500.0f,
|
||||
boss->obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 350.0f), (Rand_ZeroOne() - 0.5f) * 10.0f,
|
||||
60.0f, (Rand_ZeroOne() - 0.5f) * 10.0f, (Rand_ZeroOne() * 5.5f) + 15.5f);
|
||||
func_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f,
|
||||
boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f,
|
||||
RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 15.5f);
|
||||
}
|
||||
sp80 = Rand_ZeroOne() * 40.0f;
|
||||
sp80 = RAND_FLOAT(40.0f);
|
||||
for (i = 0; i < 36; i += 4) {
|
||||
sp8C = __sinf((i * 10.0f * M_DTOR) + sp80) * D_80177A48[2];
|
||||
sp84 = __cosf((i * 10.0f * M_DTOR) + sp80) * D_80177A48[2];
|
||||
func_8007797C(sp8C, 300.0f, sp84, 0.0f, 0.0f, 0.0f, (Rand_ZeroOne() * 5.5f) + 15.5f);
|
||||
func_8007797C(sp8C, 300.0f, sp84, 0.0f, 0.0f, 0.0f, RAND_FLOAT(5.5f) + 15.5f);
|
||||
}
|
||||
Math_SmoothStepToF(&D_80177A48[2], 10000.0f, 0.05f, 20.0f, 0.0f);
|
||||
if (gCsFrameCount == 220) {
|
||||
@ -3874,7 +3867,7 @@ void func_i6_80193C4C(Player* player) {
|
||||
if (gCsFrameCount == 920) {
|
||||
player->timer_1F8 = 25;
|
||||
}
|
||||
gActors[10].fwork[19] = __sinf(player->timer_1F8 * 40.0f * M_DTOR) * 5.0f;
|
||||
gActors[10].fwork[19] = SIN_DEG(player->timer_1F8 * 40.0f) * 5.0f;
|
||||
} else {
|
||||
if (gCsFrameCount < 850) {
|
||||
switch (gCsFrameCount) {
|
||||
@ -3919,12 +3912,12 @@ void func_i6_80193C4C(Player* player) {
|
||||
Math_SmoothStepToF(&player->camEye.x, gActors[10].obj.pos.x - 50.0f, D_80177A48[0], D_80177A48[1], 0);
|
||||
Math_SmoothStepToF(&player->camEye.y, gActors[10].obj.pos.y + 10.0f, D_80177A48[0], D_80177A48[1], 0);
|
||||
Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], D_80177A48[1], 0);
|
||||
D_801779B8 = __sinf(gGameFrameCount * 5.5f * M_DTOR) + 15000.0f;
|
||||
D_801779B8 = SIN_DEG(gGameFrameCount * 5.5f) + 15000.0f;
|
||||
} else {
|
||||
D_80177978 -= 1.0f;
|
||||
D_80177980 += 0.3f;
|
||||
D_80177988 += 4.0f;
|
||||
D_801779B8 = (__sinf(gGameFrameCount * 1.5f * M_DTOR) * 10.0f) + 15000.0f;
|
||||
D_801779B8 = (SIN_DEG(gGameFrameCount * 1.5f) * 10.0f) + 15000.0f;
|
||||
Math_SmoothStepToF(&player->camEye.x, D_80177978, D_80177A48[0], 50000.0f, 0);
|
||||
Math_SmoothStepToF(&player->camEye.y, D_80177980, D_80177A48[0], 50000.0f, 0);
|
||||
Math_SmoothStepToF(&player->camEye.z, D_80177988, D_80177A48[0], 50000.0f, 0);
|
||||
@ -3958,7 +3951,7 @@ void func_i6_80193C4C(Player* player) {
|
||||
if (gCsFrameCount > 1300) {
|
||||
D_80178288[109] += 1.0f;
|
||||
D_80178290[109] += 0.5f;
|
||||
temp_v0_2 = (s32) (Rand_ZeroOne() * 100.0f);
|
||||
temp_v0_2 = RAND_INT(100.0f);
|
||||
D_80178298[109] = FILL_COLOR(D_800C9C3C[temp_v0_2 & 0xF]);
|
||||
}
|
||||
} else {
|
||||
@ -4019,9 +4012,9 @@ void func_i6_80193C4C(Player* player) {
|
||||
D_80161A44 = 12800.0f;
|
||||
}
|
||||
D_80177A48[0] = 1.0f;
|
||||
D_801779A0 = (2.0f * __sinf(gGameFrameCount * 40.0f * M_DTOR)) + player->pos.x;
|
||||
D_801779B8 = (2.0f * __sinf(gGameFrameCount * 30.0f * M_DTOR)) + player->pos.y;
|
||||
D_801779C0 = (2.0f * __sinf(gGameFrameCount * 50.0f * M_DTOR)) + player->pos.z;
|
||||
D_801779A0 = (2.0f * SIN_DEG(gGameFrameCount * 40.0f)) + player->pos.x;
|
||||
D_801779B8 = (2.0f * SIN_DEG(gGameFrameCount * 30.0f)) + player->pos.y;
|
||||
D_801779C0 = (2.0f * SIN_DEG(gGameFrameCount * 50.0f)) + player->pos.z;
|
||||
sp74.x = 0.0f;
|
||||
sp74.y = 0.0f;
|
||||
sp74.z = D_80177A48[5];
|
||||
@ -4089,9 +4082,9 @@ void func_i6_80195E44(Actor* actor) {
|
||||
break;
|
||||
case 100:
|
||||
actor->fwork[7] += 3.0f;
|
||||
actor->unk_0F4.z = __sinf(actor->fwork[7] * M_DTOR) * 1.5f;
|
||||
actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f;
|
||||
actor->fwork[8] += 2.0f;
|
||||
sp34 = __sinf(actor->fwork[8] * M_DTOR) * 0.5f;
|
||||
sp34 = SIN_DEG(actor->fwork[8]) * 0.5f;
|
||||
break;
|
||||
case 200:
|
||||
break;
|
||||
|
@ -105,8 +105,8 @@ void func_i6_80197CC4(Boss* boss) {
|
||||
} else {
|
||||
boss->unk_078.y = 345.0f;
|
||||
}
|
||||
boss->vel.x = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45] * 0.2f;
|
||||
boss->vel.z = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45] * 0.2f;
|
||||
boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f;
|
||||
boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f;
|
||||
func_i6_80198244(boss);
|
||||
boss->timer_056 = 250;
|
||||
}
|
||||
@ -125,7 +125,7 @@ void func_i6_80197F18(Boss* boss) {
|
||||
boss->swork[20] = 0;
|
||||
boss->swork[21] = 3;
|
||||
boss->fwork[9] = 0.0f;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 100.0f) + 60;
|
||||
boss->timer_050 = RAND_INT(100.0f) + 60;
|
||||
if (boss->index != 0) {
|
||||
boss->timer_050 += 60;
|
||||
}
|
||||
@ -181,9 +181,9 @@ void func_i6_80198244(Boss* boss) {
|
||||
|
||||
boss->swork[20] = 3;
|
||||
boss->swork[21] = 1;
|
||||
boss->timer_056 = (Rand_ZeroOne() * 500.0f) + 100.0f;
|
||||
boss->fwork[11] = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[13] = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->timer_056 = (s32) (RAND_FLOAT(500.0f) + 100.0f);
|
||||
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
speed = ABS(boss->vel.x);
|
||||
|
||||
if (speed < 5.0f) {
|
||||
@ -232,8 +232,8 @@ void func_i6_801983E4(Boss* boss) {
|
||||
if (boss->unk_078.z < 0.0f) {
|
||||
boss->unk_078.z += 360.0f;
|
||||
}
|
||||
boss->fwork[11] = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[13] = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[34] = 2.8f;
|
||||
}
|
||||
}
|
||||
@ -273,8 +273,8 @@ void func_i6_801983E4(Boss* boss) {
|
||||
} else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_5) {
|
||||
Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f);
|
||||
boss->swork[21] = 3;
|
||||
boss->fwork[11] = __sinf(boss->unk_078.y * M_DTOR) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[13] = __cosf(boss->unk_078.y * M_DTOR) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[13] = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[34] = 2.8f;
|
||||
}
|
||||
}
|
||||
@ -308,7 +308,7 @@ void func_i6_80198ABC(Boss* boss) {
|
||||
boss->swork[21] = 3;
|
||||
boss->fwork[34] = 4.5f;
|
||||
|
||||
boss->timer_056 = (Rand_ZeroOne() * 100.0f) + 100.0f;
|
||||
boss->timer_056 = (s32) (RAND_FLOAT(100.0f) + 100.0f);
|
||||
boss->timer_050 = 0;
|
||||
if (yAngle > 180.0f) {
|
||||
boss->fwork[27] = 40.0f;
|
||||
@ -362,11 +362,11 @@ void func_i6_80198CE4(Boss* boss) {
|
||||
Math_SmoothStepToAngle(&boss->unk_078.y, yAngle, 0.1f, 2.0f, 0.1f);
|
||||
}
|
||||
if (boss->index == 0) {
|
||||
boss->vel.x = __sinf(boss->unk_078.y * M_DTOR) * (boss->fwork[45] + 20.0f);
|
||||
boss->vel.z = __cosf(boss->unk_078.y * M_DTOR) * (boss->fwork[45] + 20.0f);
|
||||
boss->vel.x = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f);
|
||||
boss->vel.z = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f);
|
||||
} else {
|
||||
boss->vel.x = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->vel.z = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
}
|
||||
if (func_i6_8019B5CC(boss) != 0) {
|
||||
Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f);
|
||||
@ -532,9 +532,8 @@ void func_i6_80199438(Boss* boss) {
|
||||
func_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 8.0f, 5);
|
||||
for (i = 10; i < 24; i++) {
|
||||
if (i != 15) {
|
||||
func_i6_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + boss->vel.z, i);
|
||||
func_i6_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -569,9 +568,8 @@ void func_i6_80199438(Boss* boss) {
|
||||
|
||||
for (i = 10; i < 24; i++) {
|
||||
if (i != 15) {
|
||||
func_i6_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, ((Rand_ZeroOne() - 0.5f) * 50.0f) + boss->vel.z,
|
||||
i);
|
||||
func_i6_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i);
|
||||
}
|
||||
}
|
||||
boss->timer_058 = 100;
|
||||
@ -603,8 +601,8 @@ void func_i6_80199438(Boss* boss) {
|
||||
for (j = 59; j >= 0; j--) {
|
||||
if (gActors[j].obj.status == OBJ_FREE) {
|
||||
func_i6_801A39FC(&gActors[j], boss->fwork[28], boss->fwork[29], boss->fwork[30],
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
((Rand_ZeroOne() - 0.5f) * 50.0f) + boss->vel.z, 15);
|
||||
RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, 15);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -655,8 +653,8 @@ void func_i6_80199DAC(Boss* boss) {
|
||||
|
||||
sp34 = Math_RadToDeg(Math_Atan2F(0.0f - boss->obj.pos.x, -300.0f - boss->obj.pos.z));
|
||||
|
||||
boss->fwork[11] = __sinf(M_DTOR * sp34) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[13] = __cosf(M_DTOR * sp34) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[11] = SIN_DEG(sp34) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[13] = COS_DEG(sp34) * (boss->fwork[45] + 10.0f);
|
||||
boss->fwork[10] = sp34;
|
||||
|
||||
Math_SmoothStepToAngle(&boss->unk_078.z, 0.0f, 0.1f, 4.0f, 0.1f);
|
||||
@ -734,9 +732,9 @@ void func_i6_80199DAC(Boss* boss) {
|
||||
void func_i6_8019A434(Boss* boss) {
|
||||
boss->swork[20] = 7;
|
||||
boss->swork[21] = 5;
|
||||
boss->timer_056 = (Rand_ZeroOne() * 130.0f) + 60.0f;
|
||||
boss->fwork[11] = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[13] = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f);
|
||||
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[12] = 30.0f;
|
||||
boss->fwork[10] = 181.0f;
|
||||
Audio_PlaySfx(0x19031003, boss->sfxPos, 4, &D_800C5D34, &D_800C5D34, &D_800C5D3C);
|
||||
@ -788,8 +786,8 @@ void func_i6_8019A66C(Boss* boss) {
|
||||
}
|
||||
}
|
||||
if (boss->timer_056 <= 60) {
|
||||
boss->fwork[11] = __sinf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[13] = __cosf(boss->unk_078.y * M_DTOR) * boss->fwork[45];
|
||||
boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45];
|
||||
boss->swork[21] = 1;
|
||||
Math_SmoothStepToF(&boss->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f);
|
||||
Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.5f);
|
||||
@ -805,7 +803,7 @@ void func_i6_8019A82C(Boss* boss) {
|
||||
|
||||
boss->swork[20] = 9;
|
||||
boss->fwork[9] = 0.0f;
|
||||
boss->timer_050 = (s32) (Rand_ZeroOne() * 150.0f) + 340;
|
||||
boss->timer_050 = RAND_INT(150.0f) + 340;
|
||||
boss->timer_056 = 0;
|
||||
func_8002E4F8(gMsg_ID_14340, 160);
|
||||
}
|
||||
@ -1179,25 +1177,25 @@ void func_i6_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) {
|
||||
}
|
||||
if (boss->index == 0) {
|
||||
|
||||
sp2C = __sinf(boss->fwork[44] * M_DTOR) * ABS(boss->vel.z * 1.5f);
|
||||
sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.5f);
|
||||
boss->obj.pos.x += sp2C;
|
||||
|
||||
sp28 = __sinf(boss->fwork[44] * M_DTOR) * ABS(boss->vel.x * 1.5f);
|
||||
sp28 = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.x * 1.5f);
|
||||
boss->obj.pos.z += sp28;
|
||||
|
||||
} else {
|
||||
sp2C = __sinf(boss->fwork[44] * M_DTOR) * ABS(boss->vel.z * 1.2f);
|
||||
sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.2f);
|
||||
boss->obj.pos.x += sp2C;
|
||||
|
||||
sp28 = __sinf(boss->fwork[44] * M_DTOR) * ABS(boss->vel.x * 1.2f);
|
||||
sp28 = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.x * 1.2f);
|
||||
boss->obj.pos.z += sp28;
|
||||
}
|
||||
|
||||
if (func_i6_8019B5CC(boss) == 0) {
|
||||
if (boss->index == 0) {
|
||||
boss->obj.pos.y += __sinf(boss->fwork[44] * M_DTOR) * 30.0f;
|
||||
boss->obj.pos.y += SIN_DEG(boss->fwork[44]) * 30.0f;
|
||||
} else {
|
||||
boss->obj.pos.y += __sinf(boss->fwork[44] * M_DTOR) * 10.0f;
|
||||
boss->obj.pos.y += SIN_DEG(boss->fwork[44]) * 10.0f;
|
||||
}
|
||||
}
|
||||
if (boss->index == 0) {
|
||||
@ -1411,7 +1409,7 @@ void func_i6_8019C888(Boss* boss) {
|
||||
|
||||
Math_SmoothStepToAngle(&boss->fwork[8], sp1E0, 0.4f, 8.0f, 0.1f);
|
||||
Math_SmoothStepToAngle(&boss->fwork[7], sp1DC, 0.4f, 8.0f, 0.1f);
|
||||
sp58.x = (boss->fwork[18] - boss->obj.pos.x) + (__cosf(boss->obj.rot.y * M_DTOR) * 100.0f);
|
||||
sp58.x = (boss->fwork[18] - boss->obj.pos.x) + (COS_DEG(boss->obj.rot.y) * 100.0f);
|
||||
sp58.y = (boss->fwork[19] - boss->obj.pos.y) - 80.0f;
|
||||
sp58.z = boss->fwork[20] - boss->obj.pos.z;
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C);
|
||||
@ -1436,8 +1434,8 @@ void func_i6_8019C888(Boss* boss) {
|
||||
Matrix_RotateX(gCalcMatrix, -boss->fwork[14] * M_DTOR, 1);
|
||||
Matrix_RotateY(gCalcMatrix, -boss->fwork[15] * M_DTOR, 1);
|
||||
sp58.x = boss->fwork[18] - boss->obj.pos.x;
|
||||
sp58.y = (boss->fwork[19] - boss->obj.pos.y) + (__cosf(boss->obj.rot.z * M_DTOR) * 40.0f);
|
||||
sp58.z = (boss->fwork[20] - boss->obj.pos.z) - (__cosf(boss->obj.rot.y * M_DTOR) * 60.0f);
|
||||
sp58.y = (boss->fwork[19] - boss->obj.pos.y) + (COS_DEG(boss->obj.rot.z) * 40.0f);
|
||||
sp58.z = (boss->fwork[20] - boss->obj.pos.z) - (COS_DEG(boss->obj.rot.y) * 60.0f);
|
||||
Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C);
|
||||
sp1E4 = Math_RadToDeg(Math_Atan2F(sp4C.x, sp4C.z));
|
||||
sp1E8 = Math_RadToDeg(-Math_Atan2F(sp4C.y, sqrtf((sp4C.x * sp4C.x) + (sp4C.z * sp4C.z))));
|
||||
@ -1786,7 +1784,7 @@ void func_i6_8019E2C4(Boss* boss) {
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
Matrix_Translate(gGfxMatrix, boss->obj.pos.x, 157.0f, boss->obj.pos.z, 1);
|
||||
Matrix_RotateX(gGfxMatrix, (M_PI / 2), 1);
|
||||
Matrix_RotateX(gGfxMatrix, M_PI / 2, 1);
|
||||
Matrix_Scale(gGfxMatrix, boss->fwork[43], boss->fwork[43], boss->fwork[43], 1);
|
||||
Matrix_SetGfxMtx(&gMasterDisp);
|
||||
gSPDisplayList(gMasterDisp++, D_1024AC0);
|
||||
@ -1837,10 +1835,10 @@ void func_i6_8019EB80(void) {
|
||||
Actor_Initialize(actor);
|
||||
actor->obj.status = OBJ_INIT;
|
||||
actor->obj.id = OBJ_ACTOR_195;
|
||||
actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + ((Rand_ZeroOneSeeded() - 0.5f) * 2000.0f);
|
||||
actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + (Rand_ZeroOneSeeded() * 1000.0f);
|
||||
actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + (Rand_ZeroOneSeeded() * 1000.0f);
|
||||
actor->unk_0F4.z = (Rand_ZeroOneSeeded() - 0.5f) * 200.0f;
|
||||
actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f);
|
||||
actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + RAND_FLOAT_SEEDED(1000.0f);
|
||||
actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + RAND_FLOAT_SEEDED(1000.0f);
|
||||
actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f);
|
||||
actor->vwork[0].x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x;
|
||||
actor->vwork[0].y = D_i6_801A69FC[i].y + gPlayer[0].pos.y;
|
||||
actor->vwork[0].z = D_i6_801A69FC[i].z + gPlayer[0].pos.z;
|
||||
@ -2158,9 +2156,9 @@ void func_i6_8019EE60(Player* player) {
|
||||
Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[0], 50000.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[0], 50000.0f, 0.0f);
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
||||
void func_i6_8019FF00(Actor* actor) {
|
||||
@ -2450,9 +2448,10 @@ void func_i6_801A0AC0(Player* player) {
|
||||
spB0 = 6;
|
||||
}
|
||||
}
|
||||
sp80 = ((Rand_ZeroOne() - 0.5f) * 3000.0f) + gActors[8].obj.pos.z;
|
||||
sp80 = RAND_FLOAT_CENTERED(3000.0f) + gActors[8].obj.pos.z;
|
||||
|
||||
sp94 = gActors[spB0].obj.pos.x - gActors[8].obj.pos.x;
|
||||
sp90 = (gActors[spB0].obj.pos.y - gActors[8].obj.pos.y) - 200.0f;
|
||||
sp90 = gActors[spB0].obj.pos.y - gActors[8].obj.pos.y - 200.0f;
|
||||
sp8C = gActors[spB0].obj.pos.z - sp80;
|
||||
sp84 = Math_RadToDeg(Math_Atan2F(sp94, sp8C));
|
||||
sp88 = Math_RadToDeg(-Math_Atan2F(sp90, sqrtf(SQ(sp94) + SQ(sp8C))));
|
||||
@ -2481,10 +2480,10 @@ void func_i6_801A0AC0(Player* player) {
|
||||
gActors[5].vel.x = gActors[6].vel.x = gActors[7].vel.x = 80.0f;
|
||||
}
|
||||
if (gCsFrameCount >= 189) {
|
||||
gActors[6].vel.z = (__sinf(((gCsFrameCount * 2) - 378) * M_DTOR) * gActors[6].fwork[1]);
|
||||
gActors[6].vel.y = (__cosf(((gCsFrameCount * 2) - 378) * M_DTOR) * gActors[6].fwork[1]);
|
||||
gActors[7].vel.z = (__sinf(((gCsFrameCount * 2) - 378) * M_DTOR) * -gActors[6].fwork[1]);
|
||||
gActors[7].vel.y = (__cosf(((gCsFrameCount * 2) - 378) * M_DTOR) * -gActors[6].fwork[1]);
|
||||
gActors[6].vel.z = SIN_DEG((gCsFrameCount * 2) - 378) * gActors[6].fwork[1];
|
||||
gActors[6].vel.y = COS_DEG((gCsFrameCount * 2) - 378) * gActors[6].fwork[1];
|
||||
gActors[7].vel.z = SIN_DEG((gCsFrameCount * 2) - 378) * -gActors[6].fwork[1];
|
||||
gActors[7].vel.y = COS_DEG((gCsFrameCount * 2) - 378) * -gActors[6].fwork[1];
|
||||
Math_SmoothStepToF(&gActors[6].fwork[1], 30.0f, 1.0f, 1.0f, 0.0f);
|
||||
Math_SmoothStepToAngle(&gActors[6].obj.rot.z, 180.0f, 1.0f, 0.5f, 1.0f);
|
||||
Math_SmoothStepToAngle(&gActors[7].obj.rot.z, 181.0f, 1.0f, 0.5f, 1.0f);
|
||||
@ -2525,26 +2524,26 @@ void func_i6_801A0AC0(Player* player) {
|
||||
Matrix_RotateY(gCalcMatrix, gActors[8].obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, gActors[8].obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, gActors[8].obj.rot.z * M_DTOR, 1);
|
||||
spA4.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + 1500.0f;
|
||||
spA4.y = ((Rand_ZeroOne() - 0.5f) * 500.0f) + -500.0f;
|
||||
spA4.z = ((Rand_ZeroOne() - 0.5f) * 5000.0f) + 170.0f;
|
||||
spA4.x = RAND_FLOAT_CENTERED(100.0f) + 1500.0f;
|
||||
spA4.y = RAND_FLOAT_CENTERED(500.0f) + -500.0f;
|
||||
spA4.z = RAND_FLOAT_CENTERED(5000.0f) + 170.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &spA4, &sp98);
|
||||
func_8007C120(gActors[8].obj.pos.x + sp98.x, gActors[8].obj.pos.y + sp98.y,
|
||||
gActors[8].obj.pos.z + sp98.z, gActors[8].vel.x, gActors[8].vel.y, gActors[8].vel.z, 0.8f,
|
||||
5);
|
||||
func_8007D2C8(((gActors[8].obj.pos.x - 2000.0f) + (Rand_ZeroOne() - 0.5f) * 500.0f),
|
||||
(gActors[8].obj.pos.y - 500.0f) + ((Rand_ZeroOne() - 0.5f) * 1000.0f),
|
||||
gActors[8].obj.pos.z + ((Rand_ZeroOne() - 0.5f) * 3000.0f), 8);
|
||||
func_8007D2C8(gActors[8].obj.pos.x - 2000.0f + RAND_FLOAT_CENTERED(500.0f),
|
||||
gActors[8].obj.pos.y - 500.0f + RAND_FLOAT_CENTERED(1000.0f),
|
||||
gActors[8].obj.pos.z + RAND_FLOAT_CENTERED(3000.0f), 8);
|
||||
}
|
||||
if (gGameFrameCount & 0x14) {
|
||||
for (i = 12; i < ARRAY_COUNT(gActors); i++) {
|
||||
if (gActors[i].obj.status == OBJ_FREE) {
|
||||
func_i6_801A0A08(&gActors[i], gActors[8].obj.pos.x + 1000.0f,
|
||||
(gActors[8].obj.pos.y + 2000.0f + (((gGameFrameCount & 3) - 2) * 2000.0f)) +
|
||||
((Rand_ZeroOne() - 0.5f) * 4000.0f),
|
||||
RAND_FLOAT_CENTERED(4000.0f),
|
||||
(gActors[8].obj.pos.z + 4000.0f + (((gGameFrameCount & 3) - 2) * 3000.0f)) +
|
||||
((Rand_ZeroOne() - 0.5f) * 7000.0f),
|
||||
Rand_ZeroOne() * 10.0f);
|
||||
RAND_FLOAT_CENTERED(7000.0f),
|
||||
RAND_FLOAT(10.0f));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2609,8 +2608,8 @@ void func_i6_801A0AC0(Player* player) {
|
||||
Object_Kill(&gActors[11].obj, gActors[11].sfxPos);
|
||||
for (i = 10; i < 24; i++) {
|
||||
func_i6_801A3B50(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, (Rand_ZeroOne() - 0.5f) * 50.0f,
|
||||
(Rand_ZeroOne() - 0.5f) * 50.0f, i);
|
||||
RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f),
|
||||
RAND_FLOAT_CENTERED(50.0f), i);
|
||||
}
|
||||
break;
|
||||
case 155:
|
||||
@ -2703,10 +2702,10 @@ void func_i6_801A0AC0(Player* player) {
|
||||
gActors[9].iwork[3] -= 5;
|
||||
}
|
||||
if (gCsFrameCount >= 280) {
|
||||
gActors[6].vel.z = (__cosf(((gCsFrameCount * 2) - 540) * M_DTOR) * gActors[6].fwork[1]);
|
||||
gActors[6].vel.y = (__sinf(((gCsFrameCount * 2) - 540) * M_DTOR) * -gActors[6].fwork[1]);
|
||||
gActors[7].vel.z = (__cosf(((gCsFrameCount * 2) - 540) * M_DTOR) * -gActors[6].fwork[1]);
|
||||
gActors[7].vel.y = (__sinf(((gCsFrameCount * 2) - 540) * M_DTOR) * gActors[6].fwork[1]);
|
||||
gActors[6].vel.z = COS_DEG((gCsFrameCount * 2) - 540) * gActors[6].fwork[1];
|
||||
gActors[6].vel.y = SIN_DEG((gCsFrameCount * 2) - 540) * -gActors[6].fwork[1];
|
||||
gActors[7].vel.z = COS_DEG((gCsFrameCount * 2) - 540) * -gActors[6].fwork[1];
|
||||
gActors[7].vel.y = SIN_DEG((gCsFrameCount * 2) - 540) * gActors[6].fwork[1];
|
||||
Math_SmoothStepToF(&gActors[6].fwork[1], 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
Math_SmoothStepToAngle(&gActors[6].obj.rot.z, 0.0f, 1.0f, 4.0f, 1.0f);
|
||||
Math_SmoothStepToAngle(&gActors[7].obj.rot.z, 0.0f, 1.0f, 1.5f, 1.0f);
|
||||
@ -3147,7 +3146,7 @@ void func_i6_801A39FC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32
|
||||
actor->vel.y = yVel;
|
||||
actor->vel.z = zVel;
|
||||
actor->scale = 2.5f;
|
||||
actor->timer_0BC = (s32) (Rand_ZeroOne() * 15.0f) + 15.0f;
|
||||
actor->timer_0BC = RAND_INT(15.0f) + 15.0f;
|
||||
Object_SetInfo(&actor->info, actor->obj.id);
|
||||
}
|
||||
|
||||
@ -3256,27 +3255,27 @@ void func_i6_801A4E44(Object_80* obj80) {
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1);
|
||||
sp3C.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + 500.0f;
|
||||
sp3C.y = ((Rand_ZeroOne() - 0.5f) * 900.0f) + -150.0f;
|
||||
sp3C.z = 90.0f - (Rand_ZeroOne() * 50.0f);
|
||||
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f;
|
||||
sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f;
|
||||
sp3C.z = 90.0f - RAND_FLOAT(50.0f);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
|
||||
func_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.2f, 5);
|
||||
sp3C.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + -500.0f;
|
||||
sp3C.y = (Rand_ZeroOne() - 0.5f) * 900.0f;
|
||||
sp3C.z = 80.0f - (Rand_ZeroOne() * 50.0f);
|
||||
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f;
|
||||
sp3C.y = RAND_FLOAT_CENTERED(900.0f);
|
||||
sp3C.z = 80.0f - RAND_FLOAT(50.0f);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
|
||||
func_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.2f, 5);
|
||||
sp3C.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + 500.0f;
|
||||
sp3C.y = ((Rand_ZeroOne() - 0.5f) * 900.0f) + -50.0f;
|
||||
sp3C.z = 1900.0f - (Rand_ZeroOne() * 50.0f);
|
||||
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f;
|
||||
sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f;
|
||||
sp3C.z = 1900.0f - RAND_FLOAT(50.0f);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
|
||||
func_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.2f, 5);
|
||||
sp3C.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + -1000.0f;
|
||||
sp3C.y = ((Rand_ZeroOne() - 0.5f) * 900.0f) + -250.0f;
|
||||
sp3C.z = 1100.0f - (Rand_ZeroOne() * 50.0f);
|
||||
sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f;
|
||||
sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f;
|
||||
sp3C.z = 1100.0f - RAND_FLOAT(50.0f);
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30);
|
||||
func_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.2f, 5);
|
||||
@ -3295,15 +3294,15 @@ void func_i6_801A52B8(Object_80* obj80) {
|
||||
Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0);
|
||||
Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1);
|
||||
Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1);
|
||||
sp44.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + -800.0f;
|
||||
sp44.y = ((Rand_ZeroOne() - 0.5f) * 300.0f) + -100.0f;
|
||||
sp44.z = ((Rand_ZeroOne() - 0.5f) * 5000.0f) + 500.0f;
|
||||
sp44.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f;
|
||||
sp44.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f;
|
||||
sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
|
||||
func_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.3f, 5);
|
||||
sp44.x = ((Rand_ZeroOne() - 0.5f) * 100.0f) + -600.0f;
|
||||
sp44.y = ((Rand_ZeroOne() - 0.5f) * 250.0f) + 300.0f;
|
||||
sp44.z = ((Rand_ZeroOne() - 0.5f) * 1500.0f) + -1650.0f;
|
||||
sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f;
|
||||
sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f;
|
||||
sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f;
|
||||
Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38);
|
||||
func_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, obj80->unk_58,
|
||||
obj80->unk_5C, obj80->unk_60, 0.2f, 5);
|
||||
|
@ -469,7 +469,7 @@ void func_i6_80196D88(Player* player) {
|
||||
Math_SmoothStepToF(&player->camAt.y, D_801779B8, D_80177A48[1], 100.0f, 0);
|
||||
Math_SmoothStepToF(&player->camAt.z, D_801779C0, D_80177A48[1], 100.0f, 0);
|
||||
player->unk_088 += 10.0f;
|
||||
player->unk_080 = -__sinf(player->unk_088 * M_DTOR) * 0.3f;
|
||||
player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f;
|
||||
player->unk_0F4 += 8.0f;
|
||||
player->unk_0F0 = __sinf(player->unk_0F4 * M_DTOR);
|
||||
player->unk_0F0 = SIN_DEG(player->unk_0F4);
|
||||
}
|
||||
|
@ -1176,14 +1176,14 @@ void func_menu_8019E99C(void) {
|
||||
D_menu_801CEBD0[2][i] = 0xFF;
|
||||
D_menu_801CEC48[1][i] = 0.0f;
|
||||
D_menu_801CEC48[2][i] = 0.0f;
|
||||
D_menu_801CECC0[1][i] = 0.5f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801CECC0[2][i] = 0.5f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801CEE28[1][i] = 1 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801CEE28[2][i] = 1 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801CED38[1][i] = 50.0f + (s32) (Rand_ZeroOne() * 30.0f);
|
||||
D_menu_801CED38[2][i] = 110.0f + (s32) (Rand_ZeroOne() * 30.0f);
|
||||
D_menu_801CEDB0[1][i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801CEDB0[2][i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801CECC0[1][i] = 0.5f + RAND_FLOAT(0.3f);
|
||||
D_menu_801CECC0[2][i] = 0.5f + RAND_FLOAT(0.3f);
|
||||
D_menu_801CEE28[1][i] = 1 + RAND_INT(5.0f);
|
||||
D_menu_801CEE28[2][i] = 1 + RAND_INT(5.0f);
|
||||
D_menu_801CED38[1][i] = 50.0f + RAND_INT(30.0f);
|
||||
D_menu_801CED38[2][i] = 110.0f + RAND_INT(30.0f);
|
||||
D_menu_801CEDB0[1][i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
D_menu_801CEDB0[2][i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
}
|
||||
|
||||
D_menu_801CD978 = 0;
|
||||
@ -1200,8 +1200,8 @@ void func_menu_8019E99C(void) {
|
||||
D_menu_801CDA20 = 0.0f;
|
||||
D_menu_801CDA24 = 1.0f;
|
||||
D_menu_801CDA28 = 0.0f;
|
||||
D_menu_801CDA00 = -150.552155f;
|
||||
D_menu_801CDA04 = -489.679993f;
|
||||
D_menu_801CDA00 = -150.55215f;
|
||||
D_menu_801CDA04 = -489.68f;
|
||||
D_menu_801CDA08 = 0.0f;
|
||||
D_menu_801CDA0C = -42.750008f;
|
||||
D_menu_801CDA10 = -9.849999f;
|
||||
@ -2377,13 +2377,13 @@ void func_menu_801A1C14(void) {
|
||||
if (sCurrentPlanetId == PLANET_CORNERIA) {
|
||||
D_menu_801CEB48[0] = 1;
|
||||
for (i = 0; i < 10; i++) {
|
||||
D_menu_801CEB58[0][i] = Rand_ZeroOne() * 3.0f;
|
||||
D_menu_801CEB58[0][i] = RAND_INT(3.0f);
|
||||
D_menu_801CEBD0[0][i] = 255;
|
||||
D_menu_801CEC48[0][i] = 0.0f;
|
||||
D_menu_801CECC0[0][i] = 0.5f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801CEE28[0][i] = 1 + (s32) (Rand_ZeroOne() * 4.0f);
|
||||
D_menu_801CED38[0][i] = 110.0f + (s32) (Rand_ZeroOne() * 30.0f);
|
||||
D_menu_801CEDB0[0][i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801CECC0[0][i] = 0.5f + RAND_FLOAT(0.3f);
|
||||
D_menu_801CEE28[0][i] = 1 + RAND_INT(4.0f);
|
||||
D_menu_801CED38[0][i] = 110.0f + RAND_INT(30.0f);
|
||||
D_menu_801CEDB0[0][i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2647,8 +2647,8 @@ void func_menu_801A281C(void) {
|
||||
D_menu_801CEEE8[5].y = D_menu_801CEEE8[4].y = D_menu_801CEEE8[3].y = D_menu_801CEEE8[2].y;
|
||||
D_menu_801CEEE8[5].z = D_menu_801CEEE8[4].z = D_menu_801CEEE8[3].z = D_menu_801CEEE8[2].z;
|
||||
|
||||
D_menu_801CEF58[7].x = D_menu_801CEF58[6].x = -150.552155f;
|
||||
D_menu_801CEF58[7].y = D_menu_801CEF58[6].y = -489.679993f;
|
||||
D_menu_801CEF58[7].x = D_menu_801CEF58[6].x = -150.55215f;
|
||||
D_menu_801CEF58[7].y = D_menu_801CEF58[6].y = -489.68f;
|
||||
D_menu_801CEF58[7].z = D_menu_801CEF58[6].z = 0.0f;
|
||||
|
||||
D_menu_801CDA0C = -42.750008f;
|
||||
@ -4640,7 +4640,7 @@ void func_menu_801A7D3C(PlanetId planetId) {
|
||||
src.y = 0.0f;
|
||||
src.z = 0.0f;
|
||||
|
||||
scale = 7.0f + (Rand_ZeroOne() * 8.0f);
|
||||
scale = 7.0f + RAND_FLOAT(8.0f);
|
||||
|
||||
Matrix_Push(&gGfxMatrix);
|
||||
|
||||
@ -4744,7 +4744,7 @@ void func_menu_801A809C(PlanetId planetId) {
|
||||
break;
|
||||
|
||||
case 1:
|
||||
scale = 5.0f + (Rand_ZeroOne() * 4.0f);
|
||||
scale = 5.0f + RAND_FLOAT(4.0f);
|
||||
|
||||
Math_SmoothStepToF(&D_menu_801CD99C, 150.0f, 0.09f, 100.0f, 0.1f);
|
||||
|
||||
@ -4939,19 +4939,19 @@ void func_menu_801A89BC(PlanetId planetId, s32 arg1) {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
D_menu_801CEB58[arg1][i] = Rand_ZeroOne() * 3.0f;
|
||||
D_menu_801CEB58[arg1][i] = RAND_INT(3.0f);
|
||||
D_menu_801CEBD0[arg1][i] = 255;
|
||||
D_menu_801CEC48[arg1][i] = 0.0f;
|
||||
D_menu_801CECC0[arg1][i] = 0.5f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801CEE28[arg1][i] = 1 + (s32) (Rand_ZeroOne() * 4.0f);
|
||||
D_menu_801CECC0[arg1][i] = 0.5f + RAND_FLOAT(0.3f);
|
||||
D_menu_801CEE28[arg1][i] = 1 + RAND_INT(4.0f);
|
||||
|
||||
temp = 110.0f;
|
||||
if (arg1 == 1) {
|
||||
temp = 50.0f;
|
||||
}
|
||||
|
||||
D_menu_801CED38[arg1][i] = temp + (s32) (Rand_ZeroOne() * 30.0f);
|
||||
D_menu_801CEDB0[arg1][i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801CED38[arg1][i] = temp + RAND_INT(30.0f);
|
||||
D_menu_801CEDB0[arg1][i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1660,7 +1660,7 @@ void func_menu_801952B4(void) {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
D_menu_801B9178 = Rand_ZeroOne() * 15.0f;
|
||||
D_menu_801B9178 = RAND_INT(15.0f);
|
||||
D_menu_801B914C = 1;
|
||||
break;
|
||||
}
|
||||
@ -1703,7 +1703,7 @@ void func_menu_801952B4(void) {
|
||||
break;
|
||||
}
|
||||
|
||||
D_menu_801B917C = Rand_ZeroOne() * 30.0f;
|
||||
D_menu_801B917C = RAND_INT(30.0f);
|
||||
D_menu_801B9158 = 0;
|
||||
break;
|
||||
}
|
||||
@ -3696,7 +3696,7 @@ void func_menu_8019BF34(void) {
|
||||
func_menu_8019BDF0();
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
D_menu_801B920C = Rand_ZeroOne() * 0.5f;
|
||||
D_menu_801B920C = RAND_FLOAT(0.5f);
|
||||
D_menu_801B9210 = 0.5f;
|
||||
func_menu_8019C04C();
|
||||
D_menu_801B9204 += 6.0f;
|
||||
|
@ -755,7 +755,7 @@ void func_menu_801888E8(void) {
|
||||
break;
|
||||
|
||||
case 3:
|
||||
D_menu_801B82A8 = (s32) ((Rand_ZeroOne() * 5.0f) + 1.0f) * 10;
|
||||
D_menu_801B82A8 = (s32) (RAND_FLOAT(5.0f) + 1.0f) * 10;
|
||||
temp_fv1 = D_menu_801B8340;
|
||||
D_menu_801B8350[D_menu_801B8340].unk_5C = 0;
|
||||
D_menu_801B8350[D_menu_801B8340].unk_18 = 0.0f;
|
||||
@ -765,10 +765,10 @@ void func_menu_801888E8(void) {
|
||||
}
|
||||
|
||||
while (temp_fv1 == D_menu_801B8340) {
|
||||
D_menu_801B8340 = (s32) (Rand_ZeroOne() * 4.0f);
|
||||
D_menu_801B8340 = RAND_INT(4.0f);
|
||||
}
|
||||
|
||||
D_menu_801B8350[D_menu_801B8340].unk_5C = (s32) (Rand_ZeroOne() * 6.0f) + 5;
|
||||
D_menu_801B8350[D_menu_801B8340].unk_5C = RAND_INT(6.0f) + 5;
|
||||
D_menu_801B8350[D_menu_801B8340].unk_54 = 1;
|
||||
|
||||
D_menu_801B82CC = 0.07f;
|
||||
@ -887,10 +887,8 @@ void func_menu_80189208(void) {
|
||||
gAmbientB = D_menu_801B830C;
|
||||
|
||||
if ((D_menu_801B86A4 < 2) && (D_menu_801B9040 != 0)) {
|
||||
D_menu_801B86D8 = Math_Atan2F(-D_menu_801B9060, sqrtf((-D_menu_801B905C * -D_menu_801B905C) +
|
||||
(-D_menu_801B9064 * -D_menu_801B9064))) *
|
||||
180.0f / M_PI;
|
||||
D_menu_801B86DC = (Math_Atan2F(D_menu_801B905C, D_menu_801B9064) * 180.0f) / M_PI;
|
||||
D_menu_801B86D8 = RAD_TO_DEG(Math_Atan2F(-D_menu_801B9060, sqrtf(SQ(-D_menu_801B905C) + SQ(-D_menu_801B9064))));
|
||||
D_menu_801B86DC = RAD_TO_DEG(Math_Atan2F(D_menu_801B905C, D_menu_801B9064));
|
||||
|
||||
Math_SmoothStepToF(&D_menu_801B86C8, D_menu_801B86D8, 0.1f, 100.0f, 0.0001f);
|
||||
Math_SmoothStepToF(&D_menu_801B86CC, D_menu_801B86DC, 0.1f, 100.0f, 0.0001f);
|
||||
@ -923,11 +921,11 @@ void func_menu_801894E8(void) {
|
||||
D_menu_801B7C98 = 10;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
D_menu_801B7BF8[i] = 10.0f + (Rand_ZeroOne() * 10.0f);
|
||||
D_menu_801B7C20[i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f);
|
||||
D_menu_801B7C20[i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
D_menu_801B7C48[i] = 0.0f;
|
||||
D_menu_801B7C70[i] = 0.1f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801B7D18[i] = 5 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801B7C70[i] = 0.1f + RAND_FLOAT(0.3f);
|
||||
D_menu_801B7D18[i] = 5 + RAND_INT(5.0f);
|
||||
D_menu_801B7CC8[i] = 255;
|
||||
D_menu_801B7CF0[i] = 128;
|
||||
D_menu_801B7CA0[i] = 0;
|
||||
@ -1557,11 +1555,11 @@ void func_menu_8018B058(void) {
|
||||
D_menu_801B7C98 = 10;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
D_menu_801B7BF8[i] = (Rand_ZeroOne() * 10.0f) + 10.0f;
|
||||
D_menu_801B7C20[i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f);
|
||||
D_menu_801B7C20[i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
D_menu_801B7C48[i] = 0.0f;
|
||||
D_menu_801B7C70[i] = 0.1f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801B7D18[i] = 5 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801B7C70[i] = 0.1f + RAND_FLOAT(0.3f);
|
||||
D_menu_801B7D18[i] = 5 + RAND_INT(5.0f);
|
||||
D_menu_801B7CC8[i] = 255;
|
||||
D_menu_801B7CF0[i] = 128;
|
||||
D_menu_801B7CA0[i] = 0;
|
||||
@ -1570,12 +1568,12 @@ void func_menu_8018B058(void) {
|
||||
D_menu_801B8100 = 20;
|
||||
|
||||
for (i = 0; i < D_menu_801B8100; i++) {
|
||||
D_menu_801B7D40[i] = -(Rand_ZeroOne() * 22.0f) + 13.0f;
|
||||
D_menu_801B7DE0[i] = 5.0f - (Rand_ZeroOne() * 10.0f);
|
||||
D_menu_801B7E80[i] = -25.0f - (Rand_ZeroOne() * 15.0f);
|
||||
D_menu_801B7D40[i] = -RAND_FLOAT(22.0f) + 13.0f;
|
||||
D_menu_801B7DE0[i] = 5.0f - RAND_FLOAT(10.0f);
|
||||
D_menu_801B7E80[i] = -25.0f - RAND_FLOAT(15.0f);
|
||||
D_menu_801B7FC0[i] = 0.0f;
|
||||
D_menu_801B8060[i] = Rand_ZeroOne() * 0.04f;
|
||||
D_menu_801B7F20[i] = 0.02f + (Rand_ZeroOne() * 0.08f);
|
||||
D_menu_801B8060[i] = RAND_FLOAT(0.04f);
|
||||
D_menu_801B7F20[i] = 0.02f + RAND_FLOAT(0.08f);
|
||||
D_menu_801B8108[i] = 0;
|
||||
}
|
||||
|
||||
@ -1913,11 +1911,11 @@ void func_menu_8018C1C0(void) {
|
||||
D_menu_801B7C98 = 10;
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
D_menu_801B7BF8[i] = (Rand_ZeroOne() * 10.0f) + 10.0f;
|
||||
D_menu_801B7C20[i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801B7BF8[i] = RAND_FLOAT(10.0f) + 10.0f;
|
||||
D_menu_801B7C20[i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
D_menu_801B7C48[i] = 0.0f;
|
||||
D_menu_801B7C70[i] = (Rand_ZeroOne() * 0.3f) + 0.1f;
|
||||
D_menu_801B7D18[i] = 5 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801B7C70[i] = RAND_FLOAT(0.3f) + 0.1f;
|
||||
D_menu_801B7D18[i] = 5 + RAND_INT(5.0f);
|
||||
D_menu_801B7CC8[i] = 255;
|
||||
D_menu_801B7CF0[i] = 128;
|
||||
D_menu_801B7CA0[i] = 0;
|
||||
@ -2080,8 +2078,8 @@ void func_menu_8018C644(void) {
|
||||
y = D_menu_801AE444[i] - D_menu_801B84E8[i].unk_00.y;
|
||||
z = D_menu_801AE454[i] + 10.0f - D_menu_801B84E8[i].unk_00.z;
|
||||
|
||||
D_menu_801B84E8[i].unk_18 = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))) * 180.0f / M_PI;
|
||||
D_menu_801B84E8[i].unk_1C = Math_Atan2F(x, z) * 180.0f / M_PI;
|
||||
D_menu_801B84E8[i].unk_18 = RAD_TO_DEG(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))));
|
||||
D_menu_801B84E8[i].unk_1C = RAD_TO_DEG(Math_Atan2F(x, z));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2377,12 +2375,12 @@ void func_menu_8018D80C(s32 arg0) {
|
||||
break;
|
||||
|
||||
case 255:
|
||||
D_menu_801B7D40[i] = 10.0f - (Rand_ZeroOne() * 20.0f);
|
||||
D_menu_801B7DE0[i] = 3.0f - (Rand_ZeroOne() * 7.0f);
|
||||
D_menu_801B7E80[i] = -30.0f - (Rand_ZeroOne() * 15.0f);
|
||||
D_menu_801B7D40[i] = 10.0f - RAND_FLOAT(20.0f);
|
||||
D_menu_801B7DE0[i] = 3.0f - RAND_FLOAT(7.0f);
|
||||
D_menu_801B7E80[i] = -30.0f - RAND_FLOAT(15.0f);
|
||||
D_menu_801B7FC0[i] = 0.0f;
|
||||
D_menu_801B8060[i] = Rand_ZeroOne() * 0.02f;
|
||||
D_menu_801B7F20[i] = 0.02f + (Rand_ZeroOne() * 0.08f);
|
||||
D_menu_801B8060[i] = RAND_FLOAT(0.02f);
|
||||
D_menu_801B7F20[i] = 0.02f + RAND_FLOAT(0.08f);
|
||||
D_menu_801B8108[i] = 0;
|
||||
break;
|
||||
}
|
||||
@ -2523,11 +2521,11 @@ void func_menu_8018E200(void) {
|
||||
break;
|
||||
|
||||
case 255:
|
||||
D_menu_801B7BF8[i] = 10.0f + (Rand_ZeroOne() * 10.0f);
|
||||
D_menu_801B7C20[i] = -10.0f + (Rand_ZeroOne() * -60.0f);
|
||||
D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f);
|
||||
D_menu_801B7C20[i] = -10.0f + RAND_FLOAT(-60.0f);
|
||||
D_menu_801B7C48[i] = 0.0f;
|
||||
D_menu_801B7C70[i] = 0.1f + (Rand_ZeroOne() * 0.3f);
|
||||
D_menu_801B7D18[i] = 5 + (s32) (Rand_ZeroOne() * 5.0f);
|
||||
D_menu_801B7C70[i] = 0.1f + RAND_FLOAT(0.3f);
|
||||
D_menu_801B7D18[i] = 5 + RAND_INT(5.0f);
|
||||
D_menu_801B7CC8[i] = 255;
|
||||
D_menu_801B7CF0[i] = 128;
|
||||
D_menu_801B7CA0[i] = 0;
|
||||
@ -2610,7 +2608,7 @@ void func_menu_8018E67C(s32 arg0) {
|
||||
|
||||
Matrix_Pop(&gGfxMatrix);
|
||||
|
||||
temp_fv1 = __sinf(sp5C * 12.0f * M_DTOR) * 15.0f;
|
||||
temp_fv1 = SIN_DEG(sp5C * 12.0f) * 15.0f;
|
||||
|
||||
if (temp_fv1 >= 0) {
|
||||
D_menu_801B8350[arg0].unk_0C = temp_fv1;
|
||||
@ -3448,8 +3446,8 @@ void func_menu_80191798(f32* arg0, f32* arg1) {
|
||||
f32 temp_fv2 = D_80177980 - D_801779B8;
|
||||
f32 temp_ft4 = D_80177988 - D_801779C0;
|
||||
|
||||
*arg0 = -Math_Atan2F(temp_fv2, sqrtf(SQ(temp_fv1) + SQ(temp_ft4))) * (180.0f / M_PI);
|
||||
*arg1 = Math_Atan2F(temp_fv1, temp_ft4) * (180.0f / M_PI);
|
||||
*arg0 = -Math_Atan2F(temp_fv2, sqrtf(SQ(temp_fv1) + SQ(temp_ft4))) * M_RTOD;
|
||||
*arg1 = Math_Atan2F(temp_fv1, temp_ft4) * M_RTOD;
|
||||
}
|
||||
|
||||
void func_menu_80191844(f32 arg0, f32 arg1) {
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 05102b12b75400ad2be8bd0872404237b36e1702
|
||||
Subproject commit 0514701ef53ce46e91e4e675455c44647714d014
|
@ -3,6 +3,7 @@ compiler_type = "ido"
|
||||
[preserve_macros]
|
||||
"g[DS]P.*" = "void"
|
||||
"gs[DS]P.*" = "void"
|
||||
"G_.*" = "int"
|
||||
"M_.*" = "float"
|
||||
"ARRAY_COUNT" = "int"
|
||||
"[AB]_BUTTON" = "int"
|
||||
@ -10,6 +11,11 @@ compiler_type = "ido"
|
||||
"[LRZ]_TRIG" = "int"
|
||||
"[ULRD]_JPAD" = "int"
|
||||
"[ULRD]_CBUTTONS" = "int"
|
||||
"SEGMENTED_TO_VIRTUAL" = "void*"
|
||||
"OS_PHYSICAL_TO_K0" = "int"
|
||||
"RAD_TO_DEG" = "float"
|
||||
"DEG_TO_RAD" = "float"
|
||||
"NULL" = "void*"
|
||||
|
||||
[decompme.compilers]
|
||||
"tools/ido-recomp/linux/cc" = "ido5.3"
|
Loading…
Reference in New Issue
Block a user