Matched REL/w04/big_boo + applying new macros
This commit is contained in:
parent
818428e4ff
commit
4229bfe0c1
19 changed files with 1449 additions and 277 deletions
|
|
@ -20,7 +20,7 @@
|
|||
#include "game/board/window.h"
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "math.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
|
|
@ -260,7 +260,7 @@ static void fn_1_95AC(s32 arg0) {
|
|||
sp14.y = 150.0f;
|
||||
sp14.z = 0.0f;
|
||||
sp8.x = -14.0f;
|
||||
sp8.y = 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI);
|
||||
sp8.y = atan2d(-sp20.x, -sp20.z);
|
||||
sp8.z = 0.0f;
|
||||
BoardCameraMotionStartEx(lbl_1_data_49A, &sp8, &sp14, 1620.0f, -1.0f, 21);
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -394,7 +394,7 @@ static void fn_1_9E5C(s32 arg0) {
|
|||
sp14.y = 150.0f;
|
||||
sp14.z = 0.0f;
|
||||
sp8.x = -14.0f;
|
||||
sp8.y = 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI);
|
||||
sp8.y = atan2d(-sp20.x, -sp20.z);
|
||||
sp8.z = 0.0f;
|
||||
BoardCameraMotionStartEx(lbl_1_data_49A, &sp8, &sp14, 1620.0f, -1.0f, 21);
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -510,7 +510,7 @@ static void fn_1_A408(s32 arg0) {
|
|||
sp14.y = 250.0f;
|
||||
sp14.z = 0.0f;
|
||||
sp8.x = -8.0f;
|
||||
sp8.y = 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI) - 45.0;
|
||||
sp8.y = atan2d(-sp20.x, -sp20.z) - 45.0;
|
||||
sp8.z = 0.0f;
|
||||
BoardCameraMotionStartEx(lbl_1_data_49A, &sp8, &sp14, 1700.0f, -1.0f, 63);
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -658,13 +658,13 @@ static void fn_1_AB4C(s32 arg0, s32 arg1) {
|
|||
BoardModelPosGet(lbl_1_data_49A, &sp30);
|
||||
PSVECSubtract(&sp30, &sp3C, &sp24);
|
||||
PSVECNormalize(&sp24, &sp24);
|
||||
BoardPlayerRotYSet(arg0, 180.0 * (atan2(sp24.x, sp24.z) / M_PI));
|
||||
BoardPlayerRotYSet(arg0, atan2d(sp24.x, sp24.z));
|
||||
BoardPlayerSizeSet(arg0, 2);
|
||||
sp18.x = 0.0f;
|
||||
sp18.y = 150.0f;
|
||||
sp18.z = 0.0f;
|
||||
spC.x = -25.0f;
|
||||
spC.y = 180.0 * (atan2(-sp24.x, -sp24.z) / M_PI);
|
||||
spC.y = atan2d(-sp24.x, -sp24.z);
|
||||
spC.z = 0.0f;
|
||||
BoardCameraMotionStartEx(lbl_1_data_49A, &spC, &sp18, 2000.0f, -1.0f, 2);
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -783,7 +783,7 @@ static void fn_1_B27C(s32 arg0) {
|
|||
sp14.y = 150.0f;
|
||||
sp14.z = 0.0f;
|
||||
sp8.x = -14.0f;
|
||||
sp8.y = 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI);
|
||||
sp8.y = atan2d(-sp20.x, -sp20.z);
|
||||
sp8.z = 0.0f;
|
||||
BoardCameraMotionStartEx(lbl_1_data_49A, &sp8, &sp14, 1620.0f, -1.0f, 21);
|
||||
BoardCameraMotionWait();
|
||||
|
|
@ -890,7 +890,7 @@ static void fn_1_B8E0(omObjData *arg0) {
|
|||
// Bug? Likely to be "%=" instead.
|
||||
temp_r30->unk0C % 360;
|
||||
OSs16tof32(&temp_r30->unk0C, &temp_f30);
|
||||
temp_f30 = 0.5 * sin(temp_f30 * M_PI / 180.0);
|
||||
temp_f30 = 0.5 * sind(temp_f30);
|
||||
BoardModelPosGet(lbl_1_data_49A, &sp8);
|
||||
sp8.y += temp_f30;
|
||||
BoardModelPosSetV(lbl_1_data_49A, &sp8);
|
||||
|
|
@ -961,7 +961,7 @@ static void fn_1_BD8C(s32 arg0) {
|
|||
BoardPlayerPosGet(arg0, &sp18);
|
||||
BoardModelPosGet(lbl_1_data_49A, &sp24);
|
||||
PSVECSubtract(&sp18, &sp24, &spC);
|
||||
var_f26 = 180.0 * (atan2(spC.x, spC.z) / M_PI);
|
||||
var_f26 = atan2d(spC.x, spC.z);
|
||||
BoardPlayerMotBlendSet(arg0, var_f26 + 180.0f, 0x14);
|
||||
fn_1_B6A0(var_f25, 20);
|
||||
while (!BoardPlayerMotBlendCheck(arg0)) {
|
||||
|
|
@ -1043,8 +1043,8 @@ static void fn_1_C40C(void) {
|
|||
var_r29 = BoardSpaceLinkFlagSearch(0, var_r29, 0x04000000);
|
||||
BoardSpacePosGet(0, var_r29, &sp14);
|
||||
BoardModelPosGet(lbl_1_data_498, &sp20);
|
||||
sp20.x += -100.0 * sin(BoardModelRotYGet(lbl_1_data_498) * M_PI / 180.0);
|
||||
sp20.z += -100.0 * cos(BoardModelRotYGet(lbl_1_data_498) * M_PI / 180.0);
|
||||
sp20.x += -100.0 * sind(BoardModelRotYGet(lbl_1_data_498));
|
||||
sp20.z += -100.0 * cosd(BoardModelRotYGet(lbl_1_data_498));
|
||||
sp20.y += 250.0f;
|
||||
BoardModelPosSetV(lbl_1_data_4A0, &sp20);
|
||||
BoardModelScaleSet(lbl_1_data_4A0, 10.0f, 10.0f, 10.0f);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
#include "game/board/window.h"
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "math.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
|
|
@ -227,7 +227,7 @@ static s32 fn_1_8490(s32 arg0, s8 arg1) {
|
|||
BoardPlayerPosGet(arg0, &sp18);
|
||||
BoardSpacePosGet(0, lbl_1_bss_E2, &sp24);
|
||||
PSVECSubtract(&sp24, &sp18, &spC);
|
||||
temp_f30 = 180.0 * (atan2(spC.x, spC.z) / M_PI);
|
||||
temp_f30 = atan2d(spC.x, spC.z);
|
||||
BoardPlayerMotBlendSet(arg0, temp_f30, 0xF);
|
||||
while (!BoardPlayerMotBlendCheck(arg0)) {
|
||||
HuPrcVSleep();
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "game/board/window.h"
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "math.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
static void fn_1_6F80(void);
|
||||
static void fn_1_7210(void);
|
||||
|
|
@ -162,7 +162,7 @@ static void fn_1_72CC(s32 arg0) {
|
|||
lbl_1_bss_C2[i] = 0;
|
||||
}
|
||||
}
|
||||
fn_1_73EC(180.0 * (atan2(spC.x, spC.z) / M_PI));
|
||||
fn_1_73EC(atan2d(spC.x, spC.z));
|
||||
}
|
||||
|
||||
static void fn_1_73EC(float arg0) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include "game/board/window.h"
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "math.h"
|
||||
#include "ext_math.h"
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
|
|
@ -205,7 +205,7 @@ static s32 fn_1_4BF8(s32 arg0) {
|
|||
sp38.z += 115.0 * cos(M_PI);
|
||||
PSVECSubtract(&sp38, &sp2C, &sp20);
|
||||
PSVECNormalize(&sp20, &sp20);
|
||||
BoardPlayerRotYSet(arg0, 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI));
|
||||
BoardPlayerRotYSet(arg0, atan2d(-sp20.x, -sp20.z));
|
||||
BoardPlayerPosLerpStart(arg0, &sp2C, &sp38, 40);
|
||||
BoardModelPosGet(lbl_1_bss_C[5], &sp2C);
|
||||
BoardModelMotionShiftSet(lbl_1_bss_C[5], lbl_1_data_1DA, 0.0f, 8.0f, 0x40000001);
|
||||
|
|
@ -213,7 +213,7 @@ static s32 fn_1_4BF8(s32 arg0) {
|
|||
while (GWPlayer[arg0].moving) {
|
||||
BoardPlayerPosGet(arg0, &sp38);
|
||||
PSVECSubtract(&sp38, &sp2C, &sp20);
|
||||
BoardModelRotYSet(lbl_1_bss_C[5], 180.0 * (atan2(sp20.x, sp20.z) / M_PI));
|
||||
BoardModelRotYSet(lbl_1_bss_C[5], atan2d(sp20.x, sp20.z));
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardModelMotionShiftSet(lbl_1_bss_C[5], 1, 0.0f, 8.0f, 0x40000001);
|
||||
|
|
@ -286,7 +286,7 @@ static void fn_1_519C(s32 arg0) {
|
|||
while (GWPlayer[arg0].moving) {
|
||||
BoardPlayerPosGet(arg0, &sp14);
|
||||
PSVECSubtract(&sp14, &sp20, &sp8);
|
||||
BoardModelRotYSet(lbl_1_bss_C[5], 180.0 * (atan2(sp8.x, sp8.z) / M_PI));
|
||||
BoardModelRotYSet(lbl_1_bss_C[5], atan2d(sp8.x, sp8.z));
|
||||
HuPrcVSleep();
|
||||
}
|
||||
BoardModelMotionShiftSet(lbl_1_bss_C[5], 1, 0.0f, 8.0f, 0x40000001);
|
||||
|
|
@ -346,7 +346,7 @@ static void fn_1_5490(s32 arg0) {
|
|||
BoardModelPosSetV(temp_r31->unk04, &sp3C);
|
||||
BoardModelScaleSet(temp_r31->unk04, temp_f31, temp_f31, temp_f31);
|
||||
BoardModelVisibilitySet(temp_r31->unk04, 0);
|
||||
BoardModelRotYSet(temp_r31->unk04, 180.0 * (atan2(sp18.x, sp18.z) / M_PI));
|
||||
BoardModelRotYSet(temp_r31->unk04, atan2d(sp18.x, sp18.z));
|
||||
BoardModelMotionStart(temp_r31->unk04, 1, 0x40000001);
|
||||
BoardModelMotionStart(lbl_1_data_1DC, 0, 0);
|
||||
}
|
||||
|
|
@ -436,8 +436,8 @@ static void fn_1_59D0(s32 arg0) {
|
|||
temp_r31 = OM_GET_WORK_PTR(lbl_1_bss_4C, Bss4CWork);
|
||||
temp_r31->unk00_field1 = arg0;
|
||||
if (arg0 == 1) {
|
||||
lbl_1_bss_4C->trans.x = 0.96666666f * sin(90 * M_PI / 180.0);
|
||||
lbl_1_bss_4C->trans.z = 0.96666666f * cos(90 * M_PI / 180.0);
|
||||
lbl_1_bss_4C->trans.x = 0.96666666f * sind(90);
|
||||
lbl_1_bss_4C->trans.z = 0.96666666f * cosd(90);
|
||||
temp_r31->unk01 = 60;
|
||||
return;
|
||||
}
|
||||
|
|
@ -520,8 +520,8 @@ static void fn_1_5CE4(s32 arg0) {
|
|||
BoardPlayerMotionStart(temp_r31->unk00_field1, temp_r31->unk02, 0x40000001);
|
||||
omVibrate(temp_r31->unk00_field1, 12, 4, 2);
|
||||
fn_1_5968(&sp14);
|
||||
sp8.x = sp14.x + 18.0 * sin(90 * M_PI / 180.0);
|
||||
sp8.z = sp14.z + 18.0 * cos(90 * M_PI / 180.0);
|
||||
sp8.x = sp14.x + 18.0 * sind(90);
|
||||
sp8.z = sp14.z + 18.0 * cosd(90);
|
||||
BoardPlayerPosSetV(temp_r31->unk00_field1, &sp8);
|
||||
BoardModelPosSetV(temp_r31->unk04, &sp8);
|
||||
return;
|
||||
|
|
@ -641,8 +641,8 @@ static void fn_1_606C(omObjData *arg0) {
|
|||
}
|
||||
fn_1_5968(&sp64);
|
||||
BoardPlayerPosGet(temp_r31->unk00_field1, &sp58);
|
||||
sp58.x = sp64.x + 18.0 * sin(90 * M_PI / 180.0);
|
||||
sp58.z = sp64.z + 18.0 * cos(90 * M_PI / 180.0);
|
||||
sp58.x = sp64.x + 18.0 * sind(90);
|
||||
sp58.z = sp64.z + 18.0 * cosd(90);
|
||||
BoardPlayerPosSetV(temp_r31->unk00_field1, &sp58);
|
||||
BoardModelPosSetV(temp_r31->unk04, &sp58);
|
||||
BoardModelRotYSet(temp_r31->unk04, BoardPlayerRotYGet(temp_r31->unk00_field1));
|
||||
|
|
@ -737,8 +737,8 @@ static void fn_1_6C4C(s32 arg0) {
|
|||
}
|
||||
temp_r31 = &temp_r30->unk0C[i];
|
||||
temp_r31->unk00 = 1;
|
||||
temp_r31->unk08.x = sp8.x + 50.0 * sin(360.0f * var_f31 * M_PI / 180.0);
|
||||
temp_r31->unk08.z = sp8.z + 50.0 * cos(360.0f * var_f31 * M_PI / 180.0);
|
||||
temp_r31->unk08.x = sp8.x + 50.0 * sind(360.0f * var_f31);
|
||||
temp_r31->unk08.z = sp8.z + 50.0 * cosd(360.0f * var_f31);
|
||||
temp_r31->unk08.y = sp8.y + 600.0f + 500.0f * BoardRandFloat();
|
||||
temp_r31->unk01 = 0;
|
||||
temp_r31->unk04 = 360.0f * BoardRandFloat();
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@
|
|||
#include "game/board/window.h"
|
||||
|
||||
#include "dolphin.h"
|
||||
#include "math.h"
|
||||
|
||||
#define ABS(x) ((x) < 0 ? -(x) : (x))
|
||||
#include "ext_math.h"
|
||||
|
||||
typedef struct {
|
||||
struct {
|
||||
|
|
@ -277,7 +275,7 @@ static s32 fn_1_12A0(s32 arg0) {
|
|||
BoardSpacePosGet(0, lbl_1_bss_34, &sp38);
|
||||
PSVECSubtract(&sp38, &sp2C, &sp20);
|
||||
PSVECNormalize(&sp20, &sp20);
|
||||
BoardPlayerRotYSet(arg0, 180.0 * (atan2(-sp20.x, -sp20.z) / M_PI));
|
||||
BoardPlayerRotYSet(arg0, atan2d(-sp20.x, -sp20.z));
|
||||
BoardPlayerPosLerpStart(arg0, &sp2C, &sp38, 20);
|
||||
while (GWPlayer[arg0].moving) {
|
||||
HuPrcVSleep();
|
||||
|
|
@ -983,7 +981,7 @@ static void fn_1_3698(s8 arg0) {
|
|||
}
|
||||
PSVECSubtract(&sp18, &sp24, &spC);
|
||||
lbl_1_bss_28->trans.y = temp_f31 / var_f30;
|
||||
BoardModelRotYSet(lbl_1_bss_C[4], 180.0 * (atan2(spC.x, spC.z) / M_PI));
|
||||
BoardModelRotYSet(lbl_1_bss_C[4], atan2d(spC.x, spC.z));
|
||||
BoardModelMotionShiftSet(lbl_1_bss_C[4], temp_r31->unk08, 0.0f, 8.0f, 0x40000001);
|
||||
BoardModelMotionSpeedSet(lbl_1_bss_C[4], 2.0f);
|
||||
}
|
||||
|
|
@ -1175,8 +1173,8 @@ static void fn_1_4460(ModelData *model, ParticleData *particle, Mtx matrix) {
|
|||
if (j != particle->unk_30) {
|
||||
temp_f30 = 0.003921569f * frand8() * 360.0f;
|
||||
temp_f29 = var_f31 * (20.0f + 0.003921569f * frand8() * 60.0f);
|
||||
var_r31->unk34.x = sp8.x + temp_f29 * sin(temp_f30 * M_PI / 180.0);
|
||||
var_r31->unk34.z = sp8.z + temp_f29 * cos(temp_f30 * M_PI / 180.0);
|
||||
var_r31->unk34.x = sp8.x + temp_f29 * sind(temp_f30);
|
||||
var_r31->unk34.z = sp8.z + temp_f29 * cosd(temp_f30);
|
||||
var_r31->unk34.y = sp8.y + var_f31 * (-30.0f + 0.003921569f * frand8() * 40.0f);
|
||||
var_r31->unk08.x = 0.5f + 0.003921569f * frand8() * 3.0f;
|
||||
var_r31->unk08.y = 0.3f + 0.003921569f * frand8() * 2.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue