mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-15 12:08:37 -04:00
Merge branch 'main' into 26-02-27-allocator-isolation
This commit is contained in:
+836
-757
File diff suppressed because it is too large
Load Diff
+94
-100
@@ -6,6 +6,7 @@
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include <cstring>
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -685,16 +686,16 @@ void daAlinkHIO_cutNormal_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_cutNormal_c::daAlinkHIO_cutNormal_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = {\n";
|
||||
static const char plabel3[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = {\n";
|
||||
static const char plabel4[] = "const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3, plabel4};
|
||||
static void* baseP[5] = {(void*)&daAlinkHIO_cutNmV_c0::m, (void*)&daAlinkHIO_cutNmL_c0::m,
|
||||
(void*)&daAlinkHIO_cutNmR_c0::m, (void*)&daAlinkHIO_cutNmSL_c0::m,
|
||||
(void*)&daAlinkHIO_cutNmSR_c0::m};
|
||||
|
||||
static const char* plabel[] = {"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSL_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmV_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmL_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmSR_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_cutNmR_c0::m = {\n"};
|
||||
|
||||
m_len = 32;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -734,19 +735,18 @@ void daAlinkHIO_cutFinish_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_cutFinish_c::daAlinkHIO_cutFinish_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = {\n";
|
||||
static const char plabel3[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = {\n";
|
||||
static const char plabel4[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = {\n";
|
||||
static const char plabel5[] = "const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3, plabel4, plabel5};
|
||||
|
||||
static void* baseP[6] = {(void*)&daAlinkHIO_cutFnL_c0::m, (void*)&daAlinkHIO_cutFnV_c0::m,
|
||||
(void*)&daAlinkHIO_cutFnS_c0::m, (void*)&daAlinkHIO_cutFnSl_c0::m,
|
||||
(void*)&daAlinkHIO_cutFnSm_c0::m, (void*)&daAlinkHIO_cutFnR_c0::m};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnL_c0::m = {\n",
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnV_c0::m = {\n",
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnS_c0::m = {\n",
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSl_c0::m = {\n",
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnSm_c0::m = {\n",
|
||||
"const daAlinkHIO_cutFinish_c1 daAlinkHIO_cutFnR_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 44;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -826,18 +826,17 @@ void daAlinkHIO_cutDash_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_cutDash_c::daAlinkHIO_cutDash_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2};
|
||||
|
||||
static void* baseP[3] = {
|
||||
(void*)&daAlinkHIO_cutDaL_c0::m,
|
||||
(void*)&daAlinkHIO_cutDaR_c0::m,
|
||||
(void*)&daAlinkHIO_cutDaCharge_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaL_c0::m = {\n",
|
||||
"const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaR_c0::m = {\n",
|
||||
"const daAlinkHIO_cutDash_c1 daAlinkHIO_cutDaCharge_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 28;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -983,6 +982,12 @@ void daAlinkHIO_hoCut_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_hoCut_c::daAlinkHIO_hoCut_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = {\n";
|
||||
static const char plabel3[] = "const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2, plabel3};
|
||||
|
||||
static void* baseP[4] = {
|
||||
(void*)&daAlinkHIO_hoCutLA_c0::m,
|
||||
(void*)&daAlinkHIO_hoCutLB_c0::m,
|
||||
@@ -990,13 +995,6 @@ daAlinkHIO_hoCut_c::daAlinkHIO_hoCut_c(int param_0, float param_1) {
|
||||
(void*)&daAlinkHIO_hoCutRB_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLA_c0::m = {\n",
|
||||
"const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutLB_c0::m = {\n",
|
||||
"const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRA_c0::m = {\n",
|
||||
"const daAlinkHIO_hoCut_c1 daAlinkHIO_hoCutRB_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 32;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -1357,16 +1355,15 @@ void daAlinkHIO_guardAttack_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_guardAttack_c::daAlinkHIO_guardAttack_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1};
|
||||
|
||||
static void* baseP[2] = {
|
||||
(void*)&daAlinkHIO_gAtPush_c0::m,
|
||||
(void*)&daAlinkHIO_gAtKick_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtPush_c0::m = {\n",
|
||||
"const daAlinkHIO_guardAttack_c1 daAlinkHIO_gAtKick_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 36;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -1385,24 +1382,24 @@ daAlinkHIO_guardAttack_c::daAlinkHIO_guardAttack_c(int param_0, float param_1) {
|
||||
void daAlinkHIO_turnMove_c::genMessage(JORMContext* ctx) {
|
||||
// Reset
|
||||
ctx->genButton("リセット", 0x4000003);
|
||||
//
|
||||
daAlinkHIO_setAnmGenMessage((daAlinkHIO_anm_c*)(this + 0x34), ctx, "回込", 27.0, 1);
|
||||
//
|
||||
ctx->genSlider("半回転回込A速度", (float*)(this + 0x50), 0.0, 10.0);
|
||||
//
|
||||
ctx->genSlider("斬上げCF", (float*)(this + 0x54), 0.0, 28.0);
|
||||
//
|
||||
ctx->genSlider("回転速度率", (short*)(this + 0x48), 0, 100);
|
||||
//
|
||||
ctx->genSlider("回転速度最大", (short*)(this + 0x4a), 0, 0x7fff);
|
||||
//
|
||||
ctx->genSlider("回転速度最小", (short*)(this + 0x4c), 0, 0x7fff);
|
||||
//
|
||||
ctx->genSlider("半回転速度最大", (short*)(this + 0x4e), 0, 0x7fff);
|
||||
//
|
||||
ctx->genSlider("通常側転A速度", (float*)(this + 0x58), 0.0, 10.0);
|
||||
//
|
||||
ctx->genSlider("通常側転速度", (float*)(this + 0x5c), 0.0, 100.0);
|
||||
// Return
|
||||
daAlinkHIO_setAnmGenMessage(&m.mTurnAnm, ctx, "回込", 27.0f, 1);
|
||||
// Half-turn rotation A speed
|
||||
ctx->genSlider("半回転回込A速度", &m.mHalfTurnAnmSpeed, 0.0f, 10.0f);
|
||||
// Slash up CF
|
||||
ctx->genSlider("斬上げCF", &m.mTwirlCutDelayF, 0.0f, 28.0f);
|
||||
// Rotation speed
|
||||
ctx->genSlider("回転速度率", &m.mTurnSpeedRate, 0, 100);
|
||||
// Maximum rotation speed
|
||||
ctx->genSlider("回転速度最大", &m.mMaxTurnSpeed, 0, 0x7fff);
|
||||
// Minimum rotation speed
|
||||
ctx->genSlider("回転速度最小", &m.mMinTurnSpeed, 0, 0x7fff);
|
||||
// Half rotation speed maximum
|
||||
ctx->genSlider("半回転速度最大", &m.mMaxHalfTurnSpeed, 0, 0x7fff);
|
||||
// Normal side roll A speed
|
||||
ctx->genSlider("通常側転A速度", &m.mSideRollAnmSpeed, 0.0f, 10.0f);
|
||||
// Normal side roll speed
|
||||
ctx->genSlider("通常側転速度", &m.mSideRollSpeed, 0.0f, 100.0f);
|
||||
}
|
||||
|
||||
daAlinkHIO_turnMove_c::daAlinkHIO_turnMove_c() {
|
||||
@@ -1929,16 +1926,16 @@ void daAlinkHIO_damLaHu_c::genMessage(JORMContext* ctx) {
|
||||
}
|
||||
|
||||
daAlinkHIO_damLaHu_c::daAlinkHIO_damLaHu_c(int param_0) {
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_damLaHu_c1 daAlinkHIO_damLarge_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_damLaHu_c1 daAlinkHIO_damHuge_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1};
|
||||
|
||||
static void* baseP[2] = {
|
||||
(void*)&daAlinkHIO_damLarge_c0::m,
|
||||
(void*)&daAlinkHIO_damHuge_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_guardAttack_c1 daAlinkHIO_damLarge_c0::m = {\n",
|
||||
"const daAlinkHIO_guardAttack_c1 daAlinkHIO_damHuge_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 188;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -2083,8 +2080,8 @@ void daAlinkHIO_damSwim_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genSlider("最高速", &m.mMaxSpeed, 0.0f, 30.0f);
|
||||
// Deceleration
|
||||
ctx->genSlider("減速", &m.mDeceleration, 0.0f, 10.0f);
|
||||
// Sink
|
||||
daAlinkHIO_setAnmGenMessage(&m.mSinkAnm, ctx, "下沈", 10.0f, 0);
|
||||
// Swimming
|
||||
daAlinkHIO_setAnmGenMessage(&m.mSinkAnm, ctx, "泳ぎ", 10.0f, 0);
|
||||
// Water surface
|
||||
daAlinkHIO_setAnmGenMessage(&m.mSurfaceAnm, ctx, "水面", 11.0f, 1);
|
||||
}
|
||||
@@ -2129,8 +2126,8 @@ void daAlinkHIO_damage_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genSlider("無敵時間", &m.mInvincibleTime, 0, 0x96);
|
||||
// Wolf floor invincible time
|
||||
ctx->genSlider("狼ポリゴン時無敵時間", &m.mWolfFloorInvincibleTime, 0, 0x96);
|
||||
// Floor get up
|
||||
daAlinkHIO_setAnmGenMessage(&m.mFloorDmgAnm, ctx, "床起き", 14.0f, 1);
|
||||
// Floor
|
||||
daAlinkHIO_setAnmGenMessage(&m.mFloorDmgAnm, ctx, "床", 14.0f, 1);
|
||||
// Dash
|
||||
daAlinkHIO_setAnmGenMessage(&m.mDashDmgAnm, ctx, "ダッシュ", 9.0f, 0);
|
||||
// Recover stand anm speed
|
||||
@@ -2421,8 +2418,8 @@ void daAlinkHIO_bomb_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genSlider("投げ水平速度", &m.mThrowSpeedH, 0.0f, 100.0f);
|
||||
// Throw vertical speed
|
||||
ctx->genSlider("投げ垂直速度", &m.mThrowSpeedV, 0.0f, 100.0f);
|
||||
// Bound rate
|
||||
ctx->genSlider("バウンド率", &m.mBoundRate, 0.0f, 1.0f);
|
||||
// Bounce rate
|
||||
ctx->genSlider("跳返率", &m.mBoundRate, 0.0f, 1.0f);
|
||||
// Vertical stop speed
|
||||
ctx->genSlider("垂直停止速度", &m.mStopSpeedY, 0.0f, 20.0f);
|
||||
// Bounce time max speed
|
||||
@@ -2520,17 +2517,16 @@ void daAlinkHIO_light_c::genMessage(JORMContext* ctx) {
|
||||
}
|
||||
|
||||
daAlinkHIO_light_c::daAlinkHIO_light_c(int param_0) {
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_light_c1 daAlinkHIO_huLight_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_light_c1 daAlinkHIO_wlLight_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_light_c1 daAlinkHIO_zwLight_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2};
|
||||
|
||||
static void* baseP[] = {
|
||||
(void*)&daAlinkHIO_huLight_c0::m,
|
||||
(void*)&daAlinkHIO_wlLight_c0::m,
|
||||
(void*)&daAlinkHIO_zwLight_c0::m,
|
||||
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_light_c1 daAlinkHIO_huLight_c0::m = {\n",
|
||||
"const daAlinkHIO_light_c1 daAlinkHIO_wlLight_c0::m = {\n",
|
||||
"const daAlinkHIO_light_c1 daAlinkHIO_zwLight_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 28;
|
||||
@@ -2994,19 +2990,19 @@ void daAlinkHIO_bottle_c::genMessage(JORMContext* ctx) {
|
||||
// Start drink
|
||||
daAlinkHIO_setAnmGenMessage(&m.mStartDrinkAnm, ctx, "飲む始め", 56.0f, 0);
|
||||
// End drink
|
||||
daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "飲み終", 39.0f, 0);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "飲終", 39.0f, 0);
|
||||
// Milk end drink
|
||||
daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "ミルク飲み終", 86.0f, 0);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mEndDrinkAnm, ctx, "まずい飲終", 86.0f, 0);
|
||||
// Open
|
||||
daAlinkHIO_setAnmGenMessage(&m.mOpenBottleAnm, ctx, "開ける", 49.0f, 0);
|
||||
// Scoop
|
||||
daAlinkHIO_setAnmGenMessage(&m.mScoopAnm, ctx, "すくう", 54.0f, 0);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mPourAnm, ctx, "出す", 54.0f, 0);
|
||||
// Swing down
|
||||
daAlinkHIO_setAnmGenMessage(&m.mSwingDownAnm, ctx, "下振り", 24.0f, 1);
|
||||
// Swing side
|
||||
daAlinkHIO_setAnmGenMessage(&m.mSwingSideAnm, ctx, "横振り", 19.0f, 1);
|
||||
// Medicine
|
||||
daAlinkHIO_setAnmGenMessage(&m.mDrinkNastyAnm, ctx, "くすり", 29.0f, 0);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mScoopAnm, ctx, "掬う", 29.0f, 0);
|
||||
// Get
|
||||
daAlinkHIO_setAnmGenMessage(&m.mGetAnm, ctx, "ゲット", 47.0f, 0);
|
||||
}
|
||||
@@ -3238,26 +3234,26 @@ void daAlinkHIO_grab_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genSlider("強制重さ指定", &m.mForceWeightSpec, 0, 3);
|
||||
// Preparation
|
||||
daAlinkHIO_setAnmGenMessage(&m.mPrepareAnm, ctx, "準備", 4.0f, 0);
|
||||
// Lift up
|
||||
daAlinkHIO_setAnmGenMessage(&m.mLiftAnm, ctx, "持上", 9.0f, 1);
|
||||
// Lift
|
||||
daAlinkHIO_setAnmGenMessage(&m.mLiftBackAnm, ctx, "持上", 9.0f, 1);
|
||||
// Throw
|
||||
daAlinkHIO_setAnmGenMessage(&m.mThrowAnm, ctx, "投げる", 39.0f, 1);
|
||||
// Carry
|
||||
daAlinkHIO_setAnmGenMessage(&m.mCarryAnm, ctx, "運び", 12.0f, 1);
|
||||
// Lift back
|
||||
daAlinkHIO_setReverseAnmGenMessage(&m.mLiftBackAnm, ctx, "持ち上げ後", 9.0f, 0);
|
||||
// Stand reverse
|
||||
daAlinkHIO_setAnmGenMessage(&m.mLiftAnm, ctx, "投げる", 39.0f, 1);
|
||||
// One-handed throw
|
||||
daAlinkHIO_setAnmGenMessage(&m.mCarryPlaceReverseAnm, ctx, "片手投げ", 12.0f, 1);
|
||||
// Place
|
||||
daAlinkHIO_setReverseAnmGenMessage(&m.mThrowAnm, ctx, "置く", 9.0f, 0);
|
||||
// Stand
|
||||
daAlinkHIO_setReverseAnmGenMessage(&m.mStandReverseAnm, ctx, "立つ", 4.0f, 1);
|
||||
// Recoil
|
||||
daAlinkHIO_setAnmGenMessage(&m.mRecoilAnm, ctx, "反動", 19.0f, 1);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mCarryAnm, ctx, "反動", 19.0f, 1);
|
||||
// Failure
|
||||
daAlinkHIO_setAnmGenMessage(&m.mFailAnm, ctx, "失敗", 19.0f, 1);
|
||||
daAlinkHIO_setAnmGenMessage(&m.mRecoilAnm, ctx, "失敗", 19.0f, 1);
|
||||
// Failure stop time
|
||||
ctx->genSlider("失敗停止時間", &m.mFailStopTime, 0, 300);
|
||||
// Carry lift
|
||||
daAlinkHIO_setAnmGenMessage(&m.mCarryLiftAnm, ctx, "抱え上げ", 39.0f, 0);
|
||||
// Carry place reverse
|
||||
daAlinkHIO_setReverseAnmGenMessage(&m.mCarryPlaceReverseAnm, ctx, "抱え置き", 39.0f, 1);
|
||||
// Lift up
|
||||
daAlinkHIO_setAnmGenMessage(&m.mFailAnm, ctx, "抱え上げ", 39.0f, 0);
|
||||
// Hold
|
||||
daAlinkHIO_setReverseAnmGenMessage(&m.mCarryLiftAnm, ctx, "抱え置き", 39.0f, 1);
|
||||
// Iron ball throw
|
||||
daAlinkHIO_setAnmGenMessage(&m.mIronBallThrowAnm, ctx, "鉄玉投げ", 49.0f, 1);
|
||||
}
|
||||
@@ -4010,16 +4006,15 @@ void daAlinkHIO_wlDamLaHu_c::genMessage(JORMContext* ctx) {
|
||||
}
|
||||
|
||||
daAlinkHIO_wlDamLaHu_c::daAlinkHIO_wlDamLaHu_c(int param_0) {
|
||||
static const char plabel0[] = "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1};
|
||||
|
||||
static void* baseP[] = {
|
||||
(void*)&daAlinkHIO_wlDamLarge_c0::m,
|
||||
(void*)&daAlinkHIO_wlDamHuge_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamLarge_c0::m = {\n",
|
||||
"const daAlinkHIO_wlDamLaHu_c1 daAlinkHIO_wlDamHuge_c0::m = {\n",
|
||||
};
|
||||
|
||||
m_len = 108;
|
||||
mp_src_data = baseP[param_0];
|
||||
mp_data = (void*)&m;
|
||||
@@ -4278,16 +4273,15 @@ void daAlinkHIO_wlAtWait_c::genMessage(JORMContext* ctx) {
|
||||
daAlinkHIO_wlAtWait_c::daAlinkHIO_wlAtWait_c(int param_0, float param_1) {
|
||||
field_0x34 = param_1;
|
||||
|
||||
static const char plabel0[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaLr_c0::m = {\n";
|
||||
static const char plabel1[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaSc_c0::m = {\n";
|
||||
static const char plabel2[] = "const daAlinkHIO_wlAtWait_c1 daAlinkHIO_wlAtWaTl_c0::m = {\n";
|
||||
static const char* plabel[] = {plabel0, plabel1, plabel2};
|
||||
|
||||
static void* baseP[] = {
|
||||
(void*)&daAlinkHIO_wlAtWaLr_c0::m,
|
||||
(void*)&daAlinkHIO_wlAtWaTl_c0::m,
|
||||
(void*)&daAlinkHIO_wlAtWaSc_c0::m,
|
||||
};
|
||||
|
||||
static const char* plabel[] = {
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaLr_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaTl_c0::m = {\n",
|
||||
"const daAlinkHIO_cutNormal_c1 daAlinkHIO_wlAtWaSc_c0::m = {\n",
|
||||
(void*)&daAlinkHIO_wlAtWaTl_c0::m,
|
||||
};
|
||||
|
||||
m_len = 60;
|
||||
@@ -5043,7 +5037,7 @@ daAlinkHIO_wlMoveNoP_c::~daAlinkHIO_wlMoveNoP_c() {}
|
||||
daAlinkHIO_wlMove_c::~daAlinkHIO_wlMove_c() {}
|
||||
|
||||
void daAlinkHIO_c::jumpStateUpdate(const cXyz* param_0, const cXyz* param_1, f32 param_2) {
|
||||
char buf[68];
|
||||
char buf[64];
|
||||
|
||||
f32 xDiff = param_0->x - param_1->x;
|
||||
f32 zDiff = param_0->z - param_1->z;
|
||||
|
||||
@@ -23,6 +23,7 @@ int daAlink_c::bottleModelCallBack() {
|
||||
|
||||
static int daAlink_bottleModelCallBack(J3DJoint* i_joint, int param_1) {
|
||||
UNUSED(i_joint);
|
||||
UNUSED(param_1);
|
||||
|
||||
daAlink_c* player_p = (daAlink_c*)j3dSys.getModel()->getUserArea();
|
||||
|
||||
@@ -568,7 +569,7 @@ int daAlink_c::procBottleSwingInit(fopAc_ac_c* i_catchActor, int param_1) {
|
||||
catchActorName = PROC_ALINK;
|
||||
}
|
||||
|
||||
if (catchActorName == PROC_OBJ_OILTUBO || catchActorName == PROC_TAG_SSDRINK ||
|
||||
if (catchActorName == PROC_TAG_SSDRINK || catchActorName == PROC_OBJ_OILTUBO ||
|
||||
catchActorName == PROC_TAG_BTLITM || mEquipItem == fpcNm_ITEM_KANTERA)
|
||||
{
|
||||
setSingleAnimeParam(ANM_BOTTLE_SCOOP, &mpHIO->mItem.mBottle.m.mScoopAnm);
|
||||
|
||||
@@ -352,6 +352,7 @@ BOOL daAlink_c::checkUpperItemActionBow() {
|
||||
if (mEquipItem == fpcNm_ITEM_BOW) {
|
||||
field_0x301e = 0;
|
||||
}
|
||||
(void)0;
|
||||
} else {
|
||||
changeArrowType();
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ int daAlink_c::procCanoeRide() {
|
||||
if (checkAnmEnd(frameCtrl)) {
|
||||
procCanoeWaitInit(1);
|
||||
} else if (frameCtrl->getFrame() < 9.0f) {
|
||||
mProcVar3.field_0x300e += (s16)0x180;
|
||||
ANGLE_ADD(mProcVar3.field_0x300e, 0x180);
|
||||
|
||||
if (mProcVar0.field_0x3008 == 0) {
|
||||
canoe->incShapeAngleZ(-mProcVar3.field_0x300e);
|
||||
@@ -483,11 +483,11 @@ int daAlink_c::procCanoeGetOffInit() {
|
||||
}
|
||||
|
||||
if (var_r27) {
|
||||
shape_angle.y -= (s16)0x4000;
|
||||
ANGLE_SUB(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, 0x4000, 0);
|
||||
var_r28->mTranslate.x -= 100.0f;
|
||||
} else {
|
||||
shape_angle.y += (s16)0x4000;
|
||||
ANGLE_ADD(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, -0x4000, 0);
|
||||
var_r28->mTranslate.x += 100.0f;
|
||||
}
|
||||
|
||||
@@ -389,12 +389,19 @@ void daAlink_c::setCrawlMoveAngle() {
|
||||
}
|
||||
|
||||
mLinkGndChk.SetPos(&sp20);
|
||||
// Fakematch:
|
||||
// dBgS::GroundCross is implicitly inlined to cBgS::GroundCross, but for some
|
||||
// reason here that breaks the match. This is the only place in the code so
|
||||
// far (September 2025) where it causes issues.
|
||||
sp2C.set(sp20.x - sp38.x, dComIfG_Bgsp().cBgS::GroundCross(&mLinkGndChk) - sp38.y,
|
||||
#if PLATFORM_SHIELD
|
||||
sp2C.set(sp20.x - sp38.x, dComIfG_Bgsp().GroundCross(&mLinkGndChk) - sp38.y,
|
||||
sp20.z - sp38.z);
|
||||
#else
|
||||
// Likely fakematch:
|
||||
// dBgS::GroundCross is implicitly inlined to cBgS::GroundCross, but for some
|
||||
// reason here that breaks instruction ordering. This is the only place in the code
|
||||
// where it causes issues.
|
||||
// It _is_ possible that this is caused by an actual version difference in Shield, given
|
||||
// that the Wii versions need the cast but Shield prod does not.
|
||||
sp2C.set(sp20.x - sp38.x, ((cBgS&)dComIfG_Bgsp()).GroundCross(&mLinkGndChk) - sp38.y,
|
||||
sp20.z - sp38.z);
|
||||
#endif
|
||||
|
||||
if (cLib_distanceAngleS(sp2C.atan2sY_XZ(), shape_angle.x) > 0x800) {
|
||||
shape_angle.y = current.angle.y;
|
||||
@@ -458,7 +465,7 @@ void daAlink_c::setCrawlAutoMoveAimPos() {
|
||||
mProcVar3.field_0x300e = 0;
|
||||
mProcVar0.field_0x3008 = -1;
|
||||
} else if ((shape_angle.y == current.angle.y && direction == DIR_BACKWARD) || (shape_angle.y != current.angle.y && direction == DIR_FORWARD)) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
field_0x37c8.x -= 1.5f * (95.0f * cM_ssin(current.angle.y));
|
||||
field_0x37c8.z -= 1.5f * (95.0f * cM_scos(current.angle.y));
|
||||
|
||||
|
||||
@@ -1233,6 +1233,7 @@ int daAlink_c::procCutFinishInit(int i_type) {
|
||||
field_0x3588 = l_halfAtnWaitBaseAnime;
|
||||
|
||||
if (mCutType == CUT_TYPE_MORTAL_DRAW_A || mCutType == CUT_TYPE_FINISH_STAB) {
|
||||
int dummy; // dummy decl to force stack pointer into r31 for debug
|
||||
field_0x2f99 = 13;
|
||||
}
|
||||
|
||||
@@ -1586,7 +1587,7 @@ int daAlink_c::procCutJump() {
|
||||
daPy_frameCtrl_c* framectrl = mUnderFrameCtrl;
|
||||
|
||||
if (current.angle.y == shape_angle.y && changeCutReverseProc(ANM_CUT_JUMP)) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed = 27.0f;
|
||||
dComIfGp_getVibration().StartShock(VIBMODE_S_POWER5, 31, cXyz(0.0f, 1.0f, 0.0f));
|
||||
} else if (current.angle.y != shape_angle.y) {
|
||||
|
||||
@@ -45,11 +45,11 @@ void daAlink_c::freezeTimerDamage() {
|
||||
}
|
||||
|
||||
if (escapeTrigger()) {
|
||||
mProcVar0.field_0x3008 -= (s16)2;
|
||||
S16_SUB(mProcVar0.field_0x3008, 2);
|
||||
}
|
||||
|
||||
if (checkInputOnR() && abs((s16)(mStickAngle - mPrevStickAngle)) > 0x1000) {
|
||||
mProcVar0.field_0x3008 -= (s16)2;
|
||||
S16_SUB(mProcVar0.field_0x3008, 2);
|
||||
}
|
||||
|
||||
if (mProcVar0.field_0x3008 < 0) {
|
||||
@@ -504,7 +504,7 @@ BOOL daAlink_c::checkDamageAction() {
|
||||
poly_dmg_flags = 0;
|
||||
}
|
||||
} else if (mIceDamageWaitTimer > 3) {
|
||||
mIceDamageWaitTimer -= (s16)3;
|
||||
S16_SUB(mIceDamageWaitTimer, 3);
|
||||
} else {
|
||||
mIceDamageWaitTimer = 0;
|
||||
}
|
||||
@@ -1656,7 +1656,7 @@ int daAlink_c::procCoElecDamageInit(fopAc_ac_c* i_tgHitActor, dCcD_GObjInf* i_tg
|
||||
|
||||
if (getZoraSwim()) {
|
||||
current.pos.y += 50.0f;
|
||||
field_0x3080 += (s16)0x4000;
|
||||
ANGLE_ADD(field_0x3080, 0x4000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1805,7 +1805,7 @@ int daAlink_c::procDkCaught() {
|
||||
f32 var_f30;
|
||||
if (checkInputOnR()) {
|
||||
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "d/actor/d_a_npc_zra.h"
|
||||
#include "d/actor/d_a_obj_tks.h"
|
||||
#include "d/actor/d_a_npc_tkc.h"
|
||||
#include <cstring>
|
||||
|
||||
BOOL daAlink_c::checkEventRun() const {
|
||||
return dComIfGp_event_runCheck() || checkPlayerDemoMode();
|
||||
@@ -268,10 +269,10 @@ int daAlink_c::checkDemoAction() {
|
||||
}
|
||||
|
||||
// TODO: reconcile
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
int type = prm0 - 20;
|
||||
if (type >= 0 && type < 6) {
|
||||
return procCutFinishInit(type);
|
||||
#if VERSION == VERSION_SHIELD_DEBUG || 1
|
||||
prm0 -= 20;
|
||||
if (prm0 >= 0 && prm0 < 6) {
|
||||
return procCutFinishInit(prm0);
|
||||
} else {
|
||||
return procCutTurnInit(1, 1);
|
||||
}
|
||||
@@ -364,7 +365,13 @@ int daAlink_c::checkDemoAction() {
|
||||
return procCutLargeJumpChargeInit();
|
||||
} else if (demoMode == daPy_demo_c::DEMO_UNK_73_e) {
|
||||
onNoResetFlg0(FLG0_UNK_100000);
|
||||
return procSideRollInit(mDemo.getParam0() ? 3 : 2);
|
||||
int temp;
|
||||
if (!mDemo.getParam0()) {
|
||||
temp = 2;
|
||||
} else {
|
||||
temp = 3;
|
||||
}
|
||||
return procSideRollInit(temp);
|
||||
} else if (demoMode == daPy_demo_c::DEMO_UNK_16_e) {
|
||||
onNoResetFlg0(FLG0_UNK_100000);
|
||||
if (checkWolf()) {
|
||||
@@ -584,6 +591,7 @@ void daAlink_c::setDemoData() {
|
||||
if (mMidnaTalkDelayTimer != 0) {
|
||||
mMidnaTalkDelayTimer--;
|
||||
}
|
||||
(void)0;
|
||||
} else {
|
||||
dDemo_actor_c* demo_actor_p = dDemo_c::getActor(demoActorID);
|
||||
cXyz* pos_p = NULL;
|
||||
@@ -763,6 +771,7 @@ void daAlink_c::setDemoData() {
|
||||
dComIfGp_evmng_cutEnd(mAlinkStaffId);
|
||||
}
|
||||
}
|
||||
(void)0;
|
||||
} else {
|
||||
if (mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_TOOL_e || (mDemo.getDemoType() == daPy_demo_c::DEMO_TYPE_SYSTEM_e && mAlinkStaffId != -1)) {
|
||||
if (prm0_p != NULL) {
|
||||
@@ -1093,7 +1102,7 @@ void daAlink_c::setTalkAnime() {
|
||||
}
|
||||
}
|
||||
|
||||
u8 daAlink_c::setTradeItemAnime() {
|
||||
bool daAlink_c::setTradeItemAnime() {
|
||||
setSingleAnimeBase(ANM_TRADE_ITEM_PULL_OUT);
|
||||
offModeFlg(0x100);
|
||||
|
||||
@@ -1110,7 +1119,7 @@ u8 daAlink_c::setTradeItemAnime() {
|
||||
}
|
||||
|
||||
keepItemData();
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void daAlink_c::setTradeItemOutHand() {
|
||||
@@ -1146,7 +1155,7 @@ u8 daAlink_c::setDemoRightHandIndex(u16 param_0) {
|
||||
mProcVar4.field_0x3010 = 1;
|
||||
return 6;
|
||||
} else if (param_0 == 0xFC) {
|
||||
field_0x2fab |= 0x10;
|
||||
field_0x2fab |= (u8)0x10;
|
||||
return 5;
|
||||
} else if (param_0 == 0xFB) {
|
||||
if (mpDemoHRTmpModel != NULL) {
|
||||
@@ -1169,7 +1178,7 @@ u8 daAlink_c::setDemoLeftHandIndex(u16 param_0) {
|
||||
}
|
||||
return 0;
|
||||
} else if (param_0 == 0xFC) {
|
||||
field_0x2fab |= 0x8;
|
||||
field_0x2fab |= (u8)0x8;
|
||||
return 0;
|
||||
} else if (param_0 == 0xFB) {
|
||||
if (mpDemoHLTmpModel != NULL) {
|
||||
@@ -1527,11 +1536,11 @@ int daAlink_c::procCoToolDemo() {
|
||||
}
|
||||
} else if (arg1 == 7) {
|
||||
if (resID == 1) {
|
||||
field_0x2fab |= 2;
|
||||
field_0x2fab |= (u8)0x2;
|
||||
}
|
||||
} else if (arg1 == 8) {
|
||||
if (resID == 1) {
|
||||
field_0x2fab |= 1;
|
||||
field_0x2fab |= (u8)0x1;
|
||||
}
|
||||
} else if (arg1 == 0) {
|
||||
if (arg2 == 1) {
|
||||
@@ -2042,7 +2051,11 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
|
||||
/* fpcNm_ITEM_RED_BOTTLE */ SETYPE_ITEM_GET_MINI,
|
||||
/* fpcNm_ITEM_GREEN_BOTTLE */ SETYPE_ITEM_GET_MINI,
|
||||
/* fpcNm_ITEM_BLUE_BOTTLE */ SETYPE_ITEM_GET_MINI,
|
||||
#if PLATFORM_SHIELD
|
||||
/* fpcNm_ITEM_MILK_BOTTLE */ SETYPE_ITEM_GET,
|
||||
#else
|
||||
/* fpcNm_ITEM_MILK_BOTTLE */ SETYPE_ITEM_GET_MINI,
|
||||
#endif
|
||||
/* fpcNm_ITEM_HALF_MILK_BOTTLE */ SETYPE_ITEM_GET,
|
||||
/* fpcNm_ITEM_OIL_BOTTLE */ SETYPE_ITEM_GET_MINI,
|
||||
/* fpcNm_ITEM_WATER_BOTTLE */ SETYPE_NONE,
|
||||
@@ -2217,6 +2230,8 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
|
||||
}
|
||||
|
||||
BOOL daAlink_c::checkTreasureRupeeReturn(int i_itemNo) const {
|
||||
static const int dummy = 0;
|
||||
|
||||
if (i_itemNo == fpcNm_ITEM_LINKS_SAVINGS) {
|
||||
i_itemNo = fpcNm_ITEM_PURPLE_RUPEE;
|
||||
}
|
||||
@@ -3244,7 +3259,7 @@ int daAlink_c::procHandPatInit() {
|
||||
mNormalSpeed = 0.0f;
|
||||
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
mProcVar2.field_0x300c = 0;
|
||||
mProcVar3.field_0x300e = 0;
|
||||
return 1;
|
||||
@@ -3270,7 +3285,7 @@ int daAlink_c::procHandPat() {
|
||||
if (checkAnmEnd(frameCtrl_p)) {
|
||||
setSingleAnimeBase(ANM_WAIT_B_TO_A);
|
||||
mProcVar2.field_0x300c = 1;
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
mPrevAngleY = shape_angle.y;
|
||||
current.angle.y = shape_angle.y;
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
@@ -3335,11 +3350,12 @@ int daAlink_c::procCoFogDead() {
|
||||
}
|
||||
}
|
||||
|
||||
int roomNo;
|
||||
if (mProcVar0.field_0x3008 > 0) {
|
||||
mProcVar0.field_0x3008--;
|
||||
} else if (mProcVar0.field_0x3008 == 0) {
|
||||
if (dStage_changeScene(daTagMist_c::getPlayerNo(), 0.0f, 5, fopAcM_GetRoomNo(this),
|
||||
shape_angle.y, -1))
|
||||
roomNo = fopAcM_GetRoomNo(this);
|
||||
if (dStage_changeScene(daTagMist_c::getPlayerNo(), 0.0f, 5, roomNo, shape_angle.y, -1))
|
||||
{
|
||||
seStartSystem(Z2SE_FORCE_BACK);
|
||||
mProcVar0.field_0x3008--;
|
||||
@@ -3600,7 +3616,7 @@ int daAlink_c::procWolfSnowEscape() {
|
||||
|
||||
if (checkAnmEnd(frameCtrl_p)) {
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
mPrevAngleY = shape_angle.y;
|
||||
current.angle.y = shape_angle.y;
|
||||
|
||||
@@ -4148,7 +4164,7 @@ int daAlink_c::procDungeonWarpInit() {
|
||||
}
|
||||
|
||||
int daAlink_c::procDungeonWarp() {
|
||||
mProcVar2.field_0x300c += (s16)0x200;
|
||||
ANGLE_ADD(mProcVar2.field_0x300c, 0x200);
|
||||
|
||||
if (mProcVar2.field_0x300c > 0x4000) {
|
||||
mProcVar2.field_0x300c = 0x4000;
|
||||
@@ -4157,7 +4173,7 @@ int daAlink_c::procDungeonWarp() {
|
||||
}
|
||||
|
||||
f32 sin = cM_ssin(mProcVar2.field_0x300c);
|
||||
shape_angle.y += (s16)(14336.0f * sin);
|
||||
ANGLE_ADD(shape_angle.y, 0x3800 * sin);
|
||||
mProcVar3.field_0x300e = 8.0f * sin + 24.0f * (1.0f - scale.x);
|
||||
|
||||
if (mProcVar5.field_0x3012 != 0) {
|
||||
@@ -4216,7 +4232,7 @@ int daAlink_c::procDungeonWarpSceneStartInit() {
|
||||
#endif
|
||||
|
||||
current.pos.y += 120.0f;
|
||||
shape_angle.y += 0x7F7A;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x7F7A);
|
||||
|
||||
scale.set(0.0f, 1.5f, 0.0f);
|
||||
mpLinkModel->setBaseScale(scale);
|
||||
@@ -4247,7 +4263,7 @@ int daAlink_c::procDungeonWarpSceneStart() {
|
||||
if (!var_r31) {
|
||||
current.pos.y -= 5.0f;
|
||||
} else {
|
||||
mProcVar2.field_0x300c -= 0x200;
|
||||
ANGLE_SUB_2(mProcVar2.field_0x300c, 0x200);
|
||||
if (mProcVar2.field_0x300c < 0) {
|
||||
return checkNextAction(0);
|
||||
}
|
||||
@@ -4256,7 +4272,7 @@ int daAlink_c::procDungeonWarpSceneStart() {
|
||||
}
|
||||
|
||||
f32 sin = cM_ssin(mProcVar2.field_0x300c);
|
||||
shape_angle.y += (s16)(sin * 14336.0f);
|
||||
ANGLE_ADD(shape_angle.y, sin * (f32)0x3800);
|
||||
mProcVar3.field_0x300e = (sin * 8.0f) + ((1.0f - scale.x) * 24.0f);
|
||||
return 1;
|
||||
}
|
||||
@@ -4336,7 +4352,7 @@ void daAlink_c::skipPortalObjWarp() {
|
||||
if (checkNoResetFlg3(FLG3_WARP_OBJ_DEMO) &&
|
||||
(dComIfGp_TargetWarpPt_get() == 9 && dComIfGp_TransportWarp_check()))
|
||||
{
|
||||
dStage_changeScene(2, 0.0f, 0, fopAcM_GetRoomNo(this), shape_angle.y, -1);
|
||||
dStage_changeScene(2, 0.0f, 0, (int)fopAcM_GetRoomNo(this), shape_angle.y, -1);
|
||||
} else {
|
||||
dComIfGs_setTurnRestart(dMeter2Info_getWarpPos(), dMeter2Info_getWarpPlayerNo(),
|
||||
dMeter2Info_getWarpRoomNo(), setParamData(dMeter2Info_getWarpRoomNo(), 0, 0xCA, 0));
|
||||
@@ -4605,8 +4621,9 @@ int daAlink_c::procCoWarp() {
|
||||
if (mDemo.getDemoMode() == daPy_demo_c::DEMO_UNK_45_e) {
|
||||
if (mProcVar1.field_0x300a != 0) {
|
||||
if (mGroundCode == 4) {
|
||||
dComIfGp_setNextStage(dComIfGp_getStartStageName(), mProcVar4.field_0x3010,
|
||||
fopAcM_GetRoomNo(this), -1, 0.0f, 5, 1, 0,
|
||||
dComIfGp_setNextStage(dComIfGp_getStartStageName(),
|
||||
mProcVar4.field_0x3010,
|
||||
(int)fopAcM_GetRoomNo(this), -1, 0.0f, 5, 1, 0,
|
||||
shape_angle.y, 1, 0);
|
||||
changeOriginalDemo();
|
||||
changeDemoMode(1, 0, 0, 0);
|
||||
|
||||
+145
-128
@@ -9,7 +9,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_k_wmark.h"
|
||||
|
||||
EffParamProc daAlink_c::m_fEffParamProc[] = {
|
||||
const EffParamProc daAlink_c::m_fEffParamProc[] = {
|
||||
&daAlink_c::setEffectFrontRollParam,
|
||||
&daAlink_c::setEffectSlipParam,
|
||||
&daAlink_c::setEffectSmallLandParam,
|
||||
@@ -554,7 +554,7 @@ void daAlink_c::setEffect() {
|
||||
(field_0x3198 == 0x14C || field_0x3198 == 0x14D || field_0x3198 == 0x155))
|
||||
{
|
||||
sp3C = TRUE;
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
}
|
||||
|
||||
f32 temp_f30 = field_0x3798.absXZ(current.pos);
|
||||
@@ -643,7 +643,7 @@ void daAlink_c::setEffect() {
|
||||
}
|
||||
|
||||
if (sp3C) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
}
|
||||
|
||||
setFirePointDamageEffect();
|
||||
@@ -869,10 +869,6 @@ void daAlink_c::setSwordChargeEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setElecDamageEffect() {
|
||||
static Vec const localOffset = {0.0f, -10.0f, -10.0f};
|
||||
static Vec const localScale0 = {0.69999999f, 0.85f, 1.5f};
|
||||
static Vec const localScale1 = {1.0f, 0.85f, 1.5f};
|
||||
|
||||
static const u16 effName0[] = {
|
||||
dPa_RM(ID_ZI_S_LK_BIRIBIRIA_A),
|
||||
dPa_RM(ID_ZI_S_LK_BIRIBIRIA_B),
|
||||
@@ -885,6 +881,10 @@ void daAlink_c::setElecDamageEffect() {
|
||||
dPa_RM(ID_ZI_S_LK_BIRIBIRIC_C),
|
||||
};
|
||||
|
||||
static Vec const localOffset = {0.0f, -10.0f, -10.0f};
|
||||
static Vec const localScale0 = {0.69999999f, 0.85f, 1.5f};
|
||||
static Vec const localScale1 = {1.0f, 0.85f, 1.5f};
|
||||
|
||||
cXyz pos;
|
||||
|
||||
const u16* effNameList;
|
||||
@@ -938,11 +938,30 @@ void daAlink_c::clearCutTurnEffectID() {
|
||||
}
|
||||
|
||||
void daAlink_c::setCutTurnEffect() {
|
||||
if (mUnderFrameCtrl[0].getFrame() < mProcVar1.field_0x300a) {
|
||||
return;
|
||||
}
|
||||
|
||||
static Vec const waterEffScale = {1.5f, 1.5f, 1.5f};
|
||||
|
||||
static const int unused0 = 0;
|
||||
static const int unused1 = 0;
|
||||
static const int unused2 = 0;
|
||||
|
||||
static const u16 effNameNormal[] = {
|
||||
ID_ZI_J_KAITENGIRI_A,
|
||||
ID_ZI_J_KAITENGIRI_B,
|
||||
};
|
||||
|
||||
static s16 leftRotNormal[] = {
|
||||
cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
|
||||
};
|
||||
|
||||
static Vec const leftTransNormal[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 30.0f, 0.0f},
|
||||
};
|
||||
|
||||
static const u16 effNameLight[] = {
|
||||
ID_ZI_J_KAITENGIRIL_A,
|
||||
ID_ZI_J_KAITENGIRIL_B,
|
||||
@@ -950,25 +969,18 @@ void daAlink_c::setCutTurnEffect() {
|
||||
ID_ZI_J_KAITENGIRIL_D,
|
||||
};
|
||||
|
||||
static const u16 effNameWater[] = {
|
||||
ID_ZI_J_KAITENGIRI_INWTR_A,
|
||||
ID_ZI_J_KAITENGIRI_INWTR_B,
|
||||
static s16 leftRotLight[] = {
|
||||
cM_deg2s(180), cM_deg2s(100), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(80), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
|
||||
};
|
||||
|
||||
static Vec const waterEffScale = {1.5f, 1.5f, 1.5f};
|
||||
|
||||
static Vec const leftTransNormal[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 30.0f, 0.0f},
|
||||
};
|
||||
|
||||
static Vec const leftTransLight[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 35.0f, 0.0f},
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
};
|
||||
|
||||
|
||||
static u16 const effNameLarge[] = {
|
||||
ID_ZI_J_KAITENGIRID_A,
|
||||
ID_ZI_J_KAITENGIRID_B,
|
||||
@@ -977,7 +989,13 @@ void daAlink_c::setCutTurnEffect() {
|
||||
ID_ZI_J_KAITENGIRID_E,
|
||||
ID_ZI_J_KAITENGIRID_F,
|
||||
};
|
||||
|
||||
|
||||
static s16 leftRotLarge[] = {
|
||||
cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
|
||||
};
|
||||
|
||||
static Vec const leftTransLarge[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 35.0f, 0.0f},
|
||||
@@ -987,97 +1005,86 @@ void daAlink_c::setCutTurnEffect() {
|
||||
{0.0f, 50.0f, 0.0f},
|
||||
};
|
||||
|
||||
static const u16 effNameWater[] = {
|
||||
ID_ZI_J_KAITENGIRI_INWTR_A,
|
||||
ID_ZI_J_KAITENGIRI_INWTR_B,
|
||||
};
|
||||
|
||||
static s16 leftRotWater[] = {
|
||||
cM_deg2s(-90), cM_deg2s(0), cM_deg2s(180), cM_deg2s(0), cM_deg2s(0), cM_deg2s(180),
|
||||
};
|
||||
|
||||
static Vec const leftTransWater[] = {
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
{0.0f, 0.0f, 0.0f},
|
||||
};
|
||||
|
||||
if (!(mUnderFrameCtrl[0].getFrame() < mProcVar1.field_0x300a)) {
|
||||
static s16 leftRotNormal[] = {
|
||||
cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
|
||||
};
|
||||
JPABaseEmitter* emitter;
|
||||
u32* emitterId = field_0x3204;
|
||||
const u16* effNameList;
|
||||
JGeometry::TVec3<s16>* rot;
|
||||
JGeometry::TVec3<f32>* trans;
|
||||
int effNum;
|
||||
BOOL sp18 = FALSE;
|
||||
|
||||
static s16 leftRotLight[] = {
|
||||
cM_deg2s(180), cM_deg2s(100), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(80), cM_deg2s(13), cM_deg2s(180), cM_deg2s(80), cM_deg2s(13),
|
||||
};
|
||||
|
||||
static s16 leftRotLarge[] = {
|
||||
cM_deg2s(180), cM_deg2s(45), cM_deg2s(13), cM_deg2s(180), cM_deg2s(45), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
|
||||
cM_deg2s(180), cM_deg2s(60), cM_deg2s(13), cM_deg2s(180), cM_deg2s(60), cM_deg2s(13),
|
||||
};
|
||||
|
||||
static s16 leftRotWater[] = {
|
||||
cM_deg2s(-90), cM_deg2s(0), cM_deg2s(180), cM_deg2s(0), cM_deg2s(0), cM_deg2s(180),
|
||||
};
|
||||
|
||||
u32* emitterId = field_0x3204;
|
||||
const u16* effNameList;
|
||||
JGeometry::TVec3<s16>* rot;
|
||||
JGeometry::TVec3<f32>* trans;
|
||||
int effNum;
|
||||
BOOL sp18 = FALSE;
|
||||
|
||||
if (checkNoResetFlg0(FLG0_WATER_IN_MOVE)) {
|
||||
if (checkZoraWearAbility()) {
|
||||
effNameList = effNameWater;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotWater;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransWater;
|
||||
effNum = 2;
|
||||
if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
|
||||
sp18 = TRUE;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
|
||||
effNameList = effNameLarge;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotLarge;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransLarge;
|
||||
effNum = 6;
|
||||
} else if (checkNoResetFlg3(FLG3_UNK_100000)) {
|
||||
effNameList = effNameLight;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotLight;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransLight;
|
||||
effNum = 4;
|
||||
} else {
|
||||
effNameList = effNameNormal;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotNormal;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransNormal;
|
||||
if (checkNoResetFlg0(FLG0_WATER_IN_MOVE)) {
|
||||
if (checkZoraWearAbility()) {
|
||||
effNameList = effNameWater;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotWater;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransWater;
|
||||
effNum = 2;
|
||||
if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
|
||||
sp18 = TRUE;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else if (mCutType == CUT_TYPE_LARGE_TURN_RIGHT || mCutType == CUT_TYPE_LARGE_TURN_LEFT) {
|
||||
effNameList = effNameLarge;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotLarge;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransLarge;
|
||||
effNum = 6;
|
||||
} else if (checkNoResetFlg3(FLG3_UNK_100000)) {
|
||||
effNameList = effNameLight;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotLight;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransLight;
|
||||
effNum = 4;
|
||||
} else {
|
||||
effNameList = effNameNormal;
|
||||
rot = (JGeometry::TVec3<s16>*)leftRotNormal;
|
||||
trans = (JGeometry::TVec3<f32>*)leftTransNormal;
|
||||
effNum = 2;
|
||||
}
|
||||
|
||||
cXyz pos;
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(1), &pos);
|
||||
cXyz pos;
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(1), &pos);
|
||||
|
||||
if (checkMagneBootsOn()) {
|
||||
mDoMtx_stack_c::transS(pos);
|
||||
mDoMtx_stack_c::concat(mMagneBootMtx);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
}
|
||||
if (checkMagneBootsOn()) {
|
||||
mDoMtx_stack_c::transS(pos);
|
||||
mDoMtx_stack_c::concat(mMagneBootMtx);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
}
|
||||
|
||||
for (int i = 0; i < effNum; i++, emitterId++, effNameList++, rot++, trans++) {
|
||||
JPABaseEmitter* emitter = setEmitter(emitterId, *effNameList, &pos, &shape_angle);
|
||||
if (emitter != NULL) {
|
||||
if (checkMagneBootsOn()) {
|
||||
emitter->setGlobalRTMatrix(mDoMtx_stack_c::get());
|
||||
for (int i = 0; i < effNum; i++, emitterId++, effNameList++, rot++, trans++) {
|
||||
emitter = setEmitter(emitterId, *effNameList, &pos, &shape_angle);
|
||||
if (emitter != NULL) {
|
||||
if (checkMagneBootsOn()) {
|
||||
emitter->setGlobalRTMatrix(mDoMtx_stack_c::get());
|
||||
}
|
||||
|
||||
if (mProcVar4.field_0x3010 == 0) {
|
||||
emitter->setLocalRotation(*rot);
|
||||
if (trans->y > 1.0f) {
|
||||
emitter->setLocalTranslation(*trans);
|
||||
}
|
||||
}
|
||||
|
||||
if (mProcVar4.field_0x3010 == 0) {
|
||||
emitter->setLocalRotation(*rot);
|
||||
if (trans->y > 1.0f) {
|
||||
emitter->setLocalTranslation(*trans);
|
||||
}
|
||||
}
|
||||
|
||||
if (sp18) {
|
||||
if (i == 0) {
|
||||
emitter->setGlobalParticleScale(waterEffScale);
|
||||
} else {
|
||||
emitter->setVolumeSize(225);
|
||||
emitter->setAwayFromAxisSpeed(15.0f);
|
||||
}
|
||||
if (sp18) {
|
||||
if (i == 0) {
|
||||
emitter->setGlobalParticleScale(waterEffScale);
|
||||
} else {
|
||||
emitter->setVolumeSize(225);
|
||||
emitter->setAwayFromAxisSpeed(15.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1094,6 +1101,8 @@ void daAlink_c::setHorseCutTurnEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setCutLargeJumpLandEffect() {
|
||||
static const int dummy = 0;
|
||||
|
||||
cXyz pos(current.pos.x + cM_ssin(shape_angle.y) * 20.0f, current.pos.y + 50.0f, current.pos.z + cM_scos(shape_angle.y) * 20.0f);
|
||||
csXyz rot;
|
||||
cM3dGPla tripla;
|
||||
@@ -1195,7 +1204,7 @@ void daAlink_c::setWolfRollAttackEffect() {
|
||||
csXyz rot(shape_angle.x, shape_angle.y, 0);
|
||||
|
||||
if (mProcVar2.field_0x300c == 0) {
|
||||
rot.x += 0x8000;
|
||||
ANGLE_ADD_2(rot.x, 0x8000);
|
||||
}
|
||||
|
||||
setEmitter(&field_0x3204[0], ID_ZI_J_WL_KAITENAT_A, &pos, &rot);
|
||||
@@ -1243,6 +1252,7 @@ void daAlink_c::setWolfDigEffect() {
|
||||
emitter->setAwayFromAxisSpeed(var_f30);
|
||||
dComIfGp_particle_levelEmitterOnEventMove(field_0x32cc);
|
||||
}
|
||||
(void)0;
|
||||
} else if (field_0x3198 == 7) {
|
||||
var_r29 = 0;
|
||||
var_r28 = ID_ZI_J_DASHWTRA_C;
|
||||
@@ -1364,6 +1374,7 @@ void daAlink_c::setWolfJumpAttackEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setWolfBarrierHitEffect(dBgS_LinChk& i_linchk) {
|
||||
static const int dummy = 0;
|
||||
static const u16 normalNameID[] = {
|
||||
dPa_RM(ID_ZI_S_NSBARRIER_COLL_A),
|
||||
dPa_RM(ID_ZI_S_NSBARRIER_COLL_B),
|
||||
@@ -1406,6 +1417,8 @@ void daAlink_c::setCutWaterDropEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setWaterDropEffect() {
|
||||
static const int dummy1 = 0;
|
||||
static const int dummy2 = 0;
|
||||
static const u16 effDataTable[] = {
|
||||
ID_ZI_J_LK_NUREPOTA_BACKBONE2,
|
||||
ID_ZI_J_LK_NUREPOTA_WAIST,
|
||||
@@ -1467,7 +1480,7 @@ void daAlink_c::setWaterDropEffect() {
|
||||
|
||||
if (field_0x32c0[i] != 0) {
|
||||
if (field_0x32a0[i].a > -20) {
|
||||
field_0x32a0[i].a -= 2;
|
||||
field_0x32a0[i].a -= (s16)2;
|
||||
|
||||
if (field_0x32a0[i].a < -20) {
|
||||
field_0x32a0[i].a = -20;
|
||||
@@ -1507,6 +1520,8 @@ void daAlink_c::setSwordUpColorEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setSwordCutSplash() {
|
||||
static Vec const swordCutSplashScale = {0.6f, 0.6f, 0.6f};
|
||||
|
||||
static const u16 cutSplashName[] = {
|
||||
ID_ZI_J_DOWNWTRA_A,
|
||||
ID_ZI_J_DOWNWTRA_B,
|
||||
@@ -1514,8 +1529,6 @@ void daAlink_c::setSwordCutSplash() {
|
||||
ID_ZI_J_DOWNWTRA_D,
|
||||
};
|
||||
|
||||
static Vec const swordCutSplashScale = {0.6f, 0.6f, 0.6f};
|
||||
|
||||
if (mCutType != 0 && mProcID != PROC_CUT_TURN && getCutAtFlg() && checkNoResetFlg0(FLG0_UNK_80) && mEquipItem == 0x103) {
|
||||
if (mSwordTopPos.y <= mWaterY && field_0x34b0.y > mWaterY) {
|
||||
cXyz sp14(mSwordTopPos.x, mWaterY, mSwordTopPos.z);
|
||||
@@ -1543,7 +1556,7 @@ void daAlink_c::setMetamorphoseEffectStartLink() {
|
||||
JPABaseEmitter* emitter = setEmitter(&field_0x3200, ID_ZI_J_ATOW_C, &cXyz::Zero, NULL);
|
||||
|
||||
#if VERSION == VERSION_SHIELD_DEBUG
|
||||
static Vec effScale = {1.33f, 1.0f, 1.0f};
|
||||
static const Vec effScale = {1.33f, 1.0f, 1.0f};
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalParticleScale(effScale);
|
||||
}
|
||||
@@ -1752,28 +1765,30 @@ void daAlink_c::initFirePointDamageEffect(cXyz const* param_0, dCcD_GObjInf* i_h
|
||||
}
|
||||
}
|
||||
|
||||
if (i != 4) {
|
||||
cXyz* dmg_vec = getDamageVec(i_hitObj);
|
||||
|
||||
csXyz sp38(dmg_vec->atan2sY_XZ(), dmg_vec->atan2sX_Z(), 0);
|
||||
csXyz sp40;
|
||||
cXyz sp30;
|
||||
|
||||
int var_r30 = field_0x2e44.getHitmarkPosAndAngle(param_0, &sp38, &sp30, &sp40, 0);
|
||||
if (var_r30 == -1 || (!checkWolf() && (var_r30 == 1 || var_r30 == 15 || var_r30 == 16))) {
|
||||
return;
|
||||
}
|
||||
|
||||
eff->field_0x2 = field_0x2e44.getJntNum(var_r30);
|
||||
eff->field_0xc = *param_0;
|
||||
eff->field_0x24 = cXyz::Zero;
|
||||
eff->field_0x0 = 1;
|
||||
eff->field_0x4 = 0;
|
||||
|
||||
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(eff->field_0x2));
|
||||
mDoMtx_stack_c::inverse();
|
||||
mDoMtx_stack_c::multVec(&sp30, &eff->field_0x18);
|
||||
if (i == 4) {
|
||||
return;
|
||||
}
|
||||
|
||||
cXyz* dmg_vec = getDamageVec(i_hitObj);
|
||||
|
||||
csXyz sp38(dmg_vec->atan2sY_XZ(), dmg_vec->atan2sX_Z(), 0);
|
||||
csXyz sp40;
|
||||
cXyz sp30;
|
||||
|
||||
int var_r30 = field_0x2e44.getHitmarkPosAndAngle(param_0, &sp38, &sp30, &sp40, 0);
|
||||
if (var_r30 == -1 || (!checkWolf() && (var_r30 == 1 || var_r30 == 15 || var_r30 == 16))) {
|
||||
return;
|
||||
}
|
||||
|
||||
eff->field_0x2 = field_0x2e44.getJntNum(var_r30);
|
||||
eff->field_0xc = *param_0;
|
||||
eff->field_0x24 = cXyz::Zero;
|
||||
eff->field_0x0 = 1;
|
||||
eff->field_0x4 = 0;
|
||||
|
||||
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(eff->field_0x2));
|
||||
mDoMtx_stack_c::inverse();
|
||||
mDoMtx_stack_c::multVec(&sp30, &eff->field_0x18);
|
||||
}
|
||||
|
||||
void daAlink_c::setFirePointDamageEffect() {
|
||||
@@ -1827,6 +1842,11 @@ void daAlink_c::setFirePointDamageEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setFreezeEffect() {
|
||||
static const int dummy = 0;
|
||||
static const u16 effName[] = {
|
||||
dPa_RM(ID_ZI_S_LK_FREEZEND_A),
|
||||
dPa_RM(ID_ZI_S_LK_FREEZEND_B),
|
||||
};
|
||||
static Vec const effScale = {1.0f, 1.8f, 1.0f};
|
||||
static Vec const wolfEffScale = {1.0f, 1.0f, 1.5f};
|
||||
static Vec const offsetPos = {0.0f, 0.0f, -10.0f};
|
||||
@@ -1859,10 +1879,6 @@ void daAlink_c::setFreezeEffect() {
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
static const u16 effName[] = {
|
||||
dPa_RM(ID_ZI_S_LK_FREEZEND_A),
|
||||
dPa_RM(ID_ZI_S_LK_FREEZEND_B),
|
||||
};
|
||||
dComIfGp_particle_setColor(effName[i], &pos, &tevStr, NULL, NULL, 0.0f, 0xFF);
|
||||
}
|
||||
|
||||
@@ -1900,6 +1916,7 @@ void daAlink_c::clearWoodShieldBurnEffect() {
|
||||
}
|
||||
|
||||
void daAlink_c::setWoodShieldBurnOutEffect() {
|
||||
static const int dummy = 0;
|
||||
static const u16 effName[] = {
|
||||
ID_ZI_J_LK_SH_BURN_C,
|
||||
ID_ZI_J_LK_SH_BURN_D,
|
||||
@@ -2061,7 +2078,7 @@ void daAlink_blur_c::draw() {
|
||||
GXTexCoord2s16(var_r27, 0);
|
||||
|
||||
var_r27 = var_r28;
|
||||
var_r28 += temp_r26;
|
||||
ANGLE_ADD_2(var_r28, temp_r26);
|
||||
}
|
||||
|
||||
GXEnd();
|
||||
|
||||
@@ -492,10 +492,10 @@ void daAlink_c::setCarryArmAngle(f32 param_0, f32 param_1) {
|
||||
field_0x3136[1].set(0, 0, temp_r29 - (3500.0f * param_1));
|
||||
|
||||
if (param_1 < 0.0f) {
|
||||
field_0x312a[0].z += (s16)(2500.0f * param_1);
|
||||
field_0x3136[0].y += (s16)(2000.0f * param_1);
|
||||
ANGLE_ADD(field_0x312a[0].z, 2500.0f * param_1);
|
||||
ANGLE_ADD(field_0x3136[0].y, 2000.0f * param_1);
|
||||
} else {
|
||||
field_0x3136[0].y += (s16)(4000.0f * param_1);
|
||||
ANGLE_ADD(field_0x3136[0].y, 4000.0f * param_1);
|
||||
}
|
||||
} else if (checkGrabRooster()) {
|
||||
field_0x3136[0].y = -5000.0f * param_1;
|
||||
@@ -2103,7 +2103,7 @@ int daAlink_c::procGoatMove() {
|
||||
int temp_r27 = abs(mMoveAngle);
|
||||
if (checkInputOnR() && temp_r27 > 0x800 && temp_r27 < 0x7800 && (fabsf(sp8.x) < 250.0f || (sp8.x > 0.0f && mMoveAngle < 0) || (sp8.x < 0.0f && mMoveAngle > 0))) {
|
||||
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
|
||||
if (field_0x2f98 == 3) {
|
||||
@@ -2294,7 +2294,7 @@ int daAlink_c::procGoatCatch() {
|
||||
if (checkAnmEnd(framectrl)) {
|
||||
if (mProcVar5.field_0x3012 == 0) {
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
current.angle.y = shape_angle.y;
|
||||
field_0x2fe4 = shape_angle.y;
|
||||
}
|
||||
@@ -2537,7 +2537,7 @@ int daAlink_c::procGoronMove() {
|
||||
f32 var_f31;
|
||||
if (checkInputOnR() && temp_r28 > 0x800 && temp_r28 < 0x7800) {
|
||||
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
|
||||
if (field_0x2f98 == 3) {
|
||||
|
||||
@@ -92,14 +92,13 @@ void daAlink_c::setArrowShieldActor(fopAc_ac_c* i_actor, int param_1) {
|
||||
fopAcM_delete(first_arrow);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for (; i < 15; i++) {
|
||||
mShieldArrowIDs[i] = mShieldArrowIDs[i + 1];
|
||||
field_0x2f7c[i] = field_0x2f7c[i + 1];
|
||||
for (arrow_num = 0; arrow_num < 15; arrow_num++) {
|
||||
mShieldArrowIDs[arrow_num] = mShieldArrowIDs[arrow_num + 1];
|
||||
field_0x2f7c[arrow_num] = field_0x2f7c[arrow_num + 1];
|
||||
}
|
||||
|
||||
mShieldArrowIDs[i] = new_arrow_id;
|
||||
field_0x2f7c[i] = 10;
|
||||
mShieldArrowIDs[arrow_num] = new_arrow_id;
|
||||
field_0x2f7c[arrow_num] = 10;
|
||||
|
||||
dComIfGp_setItemArrowNumCount(1);
|
||||
fopAcM_createItemForSimpleDemo(¤t.pos, fpcNm_ITEM_ARROW_10, -1, NULL, NULL, 0.0f, 0.0f);
|
||||
@@ -201,6 +200,7 @@ void daAlink_c::setShieldGuard() {
|
||||
|
||||
void daAlink_c::setGuardSe(dCcD_GObjInf* i_objinf) {
|
||||
int var_r31;
|
||||
u32 hit_se;
|
||||
BOOL isRebound;
|
||||
|
||||
if (checkWoodShieldEquipNotIronBall() && !checkMagicArmorNoDamage()) {
|
||||
@@ -211,7 +211,6 @@ void daAlink_c::setGuardSe(dCcD_GObjInf* i_objinf) {
|
||||
isRebound = TRUE;
|
||||
}
|
||||
|
||||
u32 hit_se;
|
||||
if (i_objinf->GetTgHitGObj() != NULL && i_objinf->GetTgHitGObj()->GetAtType() == AT_TYPE_BOMB) {
|
||||
hit_se = Z2SE_HIT_METAL_WEAPON;
|
||||
} else {
|
||||
@@ -330,7 +329,7 @@ int daAlink_c::procGuardSlip() {
|
||||
setShapeAngleToAtnActor(0);
|
||||
|
||||
if (mProcVar1.field_0x300a != 0) {
|
||||
mProcVar1.field_0x300a -= (s16)1;
|
||||
S16_SUB(mProcVar1.field_0x300a, 1);
|
||||
mBodyAngle.y += mProcVar2.field_0x300c;
|
||||
mBodyAngle.x += mProcVar3.field_0x300e;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ int daAlink_c::getHangDirectionFromAngle() {
|
||||
}
|
||||
|
||||
BOOL daAlink_c::hangMoveBgCheck(s16 param_0, cXyz* param_1) {
|
||||
static const int dummy = 0;
|
||||
|
||||
BOOL rt = false;
|
||||
cM3dGPla sp78;
|
||||
|
||||
@@ -902,7 +904,7 @@ int daAlink_c::setDragonHangPos() {
|
||||
cXyz sp18;
|
||||
mDoMtx_stack_c::multVecSR(&cXyz::BaseY, &sp18);
|
||||
if (sp18.y < 0.0f) {
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
shape_angle.x = 0x8000 - shape_angle.x;
|
||||
shape_angle.z *= -1;
|
||||
}
|
||||
@@ -1418,7 +1420,7 @@ int daAlink_c::procLadderDownStartInit() {
|
||||
dComIfGp_setPlayerStatus0(0, 0x2000000);
|
||||
setOldRootQuaternion(0, 0x8000, 0);
|
||||
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
current.angle.y = shape_angle.y;
|
||||
|
||||
f32 var_f31 = cM_ssin(field_0x306e);
|
||||
@@ -1835,8 +1837,8 @@ int daAlink_c::setMoveBGClimbCorrect() {
|
||||
|
||||
current.pos.x = mLinkLinChk.GetCross().x;
|
||||
current.pos.z = mLinkLinChk.GetCross().z;
|
||||
current.angle.y += (s16)(shape_angle.y - temp_r28);
|
||||
field_0x308c += (s16)(temp_r28 - shape_angle.y);
|
||||
ANGLE_ADD(current.angle.y, shape_angle.y - temp_r28);
|
||||
ANGLE_ADD(field_0x308c, temp_r28 - shape_angle.y);
|
||||
|
||||
mPolyInfo1.SetPolyInfo(mLinkLinChk);
|
||||
}
|
||||
@@ -2457,7 +2459,7 @@ int daAlink_c::procClimbToRoof() {
|
||||
field_0x2f99 = 2;
|
||||
|
||||
if (checkAnmEnd(frameCtrl)) {
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
current.angle.y = shape_angle.y;
|
||||
mPrevAngleY = shape_angle.y;
|
||||
setOldRootQuaternion(0, 0x8000, 0);
|
||||
@@ -2495,7 +2497,7 @@ void daAlink_c::setRoofHangHandOnSE(cBgS_PolyInfo* unused) {
|
||||
if (frame_ctrl->checkPass(field_0x3478)) {
|
||||
return;
|
||||
} else if (frame_ctrl->checkPass(field_0x347c)) {
|
||||
|
||||
(void)0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2842,7 +2844,7 @@ int daAlink_c::procRoofHangTurnInit() {
|
||||
if ((s16)(mMoveAngle - shape_angle.y) < 0) {
|
||||
anm_speed = -mpHIO->mRoofHang.m.mInvertASpeed;
|
||||
mProcVar0.field_0x3008 = 1;
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z = -8.899365425109863f;
|
||||
mProcVar2.field_0x300c = mMoveAngle;
|
||||
@@ -2881,7 +2883,7 @@ int daAlink_c::procRoofHangTurn() {
|
||||
daPy_frameCtrl_c* frame_ctrl = mUnderFrameCtrl;
|
||||
if (checkAnmEnd(frame_ctrl)) {
|
||||
if (mProcVar0.field_0x3008 == 0) {
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
current.angle.y = shape_angle.y;
|
||||
setOldRootQuaternion(0, -0x8000, 0);
|
||||
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z += 17.798730850219727f;
|
||||
|
||||
@@ -18,6 +18,8 @@ enum {
|
||||
};
|
||||
|
||||
void daAlink_c::hsChainShape_c::draw() {
|
||||
static const int dummy = 0;
|
||||
|
||||
daAlink_c* alink = (daAlink_c*)getUserArea();
|
||||
J3DModelData* modelData = alink->getItemModelData();
|
||||
J3DMaterial* material = modelData->getMaterialNodePointer(0);
|
||||
@@ -50,7 +52,8 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
ppos++;
|
||||
pangle++;
|
||||
|
||||
for (int i = 0; i < 101; i++, ppos++, pangle++) {
|
||||
int i;
|
||||
for (i = 0; i < 101; i++, ppos++, pangle++) {
|
||||
mDoMtx_stack_c::copy(j3dSys.getViewMtx());
|
||||
mDoMtx_stack_c::transM(*ppos);
|
||||
mDoMtx_stack_c::ZXYrotM(*pangle);
|
||||
@@ -65,7 +68,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
cXyz spC8;
|
||||
cXyz spBC;
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
cXyz* sp48;
|
||||
csXyz* sp44;
|
||||
|
||||
@@ -91,7 +94,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
spE = -0x3000;
|
||||
}
|
||||
|
||||
sp10 = sp44->y;
|
||||
sp10 = (s16)sp44->y;
|
||||
sp14 = sp44->z + spE;
|
||||
f32 var_f29 = spC8.abs();
|
||||
|
||||
@@ -144,7 +147,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
csXyz sp64(sp6C);
|
||||
|
||||
f32 sp34 = M_PI / maxDistanceF;
|
||||
|
||||
|
||||
f32 temp_f27;
|
||||
f32 var_f26 = 0.0f;
|
||||
f32 var_f28;
|
||||
@@ -153,6 +156,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
if (alink->getHookshotStopTime() & 1) {
|
||||
var_f28 *= -1.0f;
|
||||
}
|
||||
(void)0;
|
||||
|
||||
while (maxDistanceF > var_f30) {
|
||||
temp_f27 = var_f28 * cM_fsin(sp34 * var_f30);
|
||||
@@ -172,7 +176,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
|
||||
material->getShape()->simpleDrawCache();
|
||||
|
||||
sp64.z += 0x3000;
|
||||
ANGLE_ADD_2(sp64.z, 0x3000);
|
||||
|
||||
var_f26 = temp_f27;
|
||||
var_f30 += fabsf(cM_scos(spC)) * 5.0f;
|
||||
@@ -183,15 +187,15 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
const cXyz& subChainTopPos = alink->getHsSubChainTopPos();
|
||||
maxDistance = subChainRootPos - subChainTopPos;
|
||||
|
||||
f32 temp_f1 = maxDistance.abs();
|
||||
if (temp_f1 > 1.0f) {
|
||||
maxDistance *= (1.0f / temp_f1);
|
||||
maxDistanceF = maxDistance.abs();
|
||||
if (maxDistanceF > 1.0f) {
|
||||
maxDistance *= (1.0f / maxDistanceF);
|
||||
var_f30 = 0.0f;
|
||||
|
||||
|
||||
sp98 = subChainTopPos;
|
||||
sp6C.set(maxDistance.atan2sY_XZ(), maxDistance.atan2sX_Z(), 0);
|
||||
|
||||
while (temp_f1 > var_f30) {
|
||||
while (maxDistanceF > var_f30) {
|
||||
mDoMtx_stack_c::copy(j3dSys.getViewMtx());
|
||||
mDoMtx_stack_c::transM(sp98);
|
||||
mDoMtx_stack_c::ZXYrotM(sp6C);
|
||||
@@ -202,7 +206,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
material->getShape()->simpleDrawCache();
|
||||
|
||||
sp98 += maxDistance * 5.0f;
|
||||
sp6C.z += 0x3000;
|
||||
ANGLE_ADD_2(sp6C.z, 0x3000);
|
||||
var_f30 += 5.0f;
|
||||
}
|
||||
}
|
||||
@@ -212,8 +216,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
void daAlink_c::hookshotAtHitCallBack(dCcD_GObjInf* i_atObjInf, fopAc_ac_c* i_tgActor,
|
||||
dCcD_GObjInf* i_tgObjInf) {
|
||||
if (i_tgActor != NULL && fopAcM_IsActor(i_tgActor) && !i_tgObjInf->ChkTgHookshotThrough()) {
|
||||
cXyz* hit_pos_p = i_atObjInf->GetAtHitPosP();
|
||||
f32 dist_to_hitpos = getHsChainTopPos().abs(*hit_pos_p);
|
||||
f32 dist_to_hitpos = getHsChainTopPos().abs(*i_atObjInf->GetAtHitPosP());
|
||||
|
||||
if (dist_to_hitpos < mSearchBallScale) {
|
||||
mSearchBallScale = dist_to_hitpos;
|
||||
@@ -709,7 +712,13 @@ void daAlink_c::setHookshotReturnEnd() {
|
||||
field_0x2060->initOldFrameMorf(3.0f, field_0x30a8, field_0x30aa);
|
||||
} else if (checkHookshotShootAnime()) {
|
||||
int _;
|
||||
setUpperAnimeBaseSpeed(dRes_ID_ALANM_BCK_HSWAIT_e, checkAttentionLock() ? mpHIO->mItem.mHookshot.m.mWaitAnmSpeed : 0.0f, 3.0f);
|
||||
f32 anmSpeed;
|
||||
if (!checkAttentionLock()) {
|
||||
anmSpeed = 0.0f;
|
||||
} else {
|
||||
anmSpeed = mpHIO->mItem.mHookshot.m.mWaitAnmSpeed;
|
||||
}
|
||||
setUpperAnimeBaseSpeed(dRes_ID_ALANM_BCK_HSWAIT_e, anmSpeed, 3.0f);
|
||||
}
|
||||
|
||||
mFastShotTime = 0;
|
||||
@@ -732,7 +741,7 @@ int daAlink_c::setHookshotHangMoveBGCollect() {
|
||||
mDoMtx_stack_c::multVec(&field_0x37c8, &mIronBallBgChkPos);
|
||||
|
||||
current.pos += mIronBallBgChkPos - sp28;
|
||||
shape_angle.y += (s16)(mProcVar0.field_0x3008 - carry_actor->shape_angle.y);
|
||||
ANGLE_ADD(shape_angle.y, mProcVar0.field_0x3008 - carry_actor->shape_angle.y);
|
||||
current.angle.y = shape_angle.y;
|
||||
mProcVar0.field_0x3008 = carry_actor->shape_angle.y;
|
||||
} else if (dComIfG_Bgsp().ChkPolySafe(*polyinfo)) {
|
||||
@@ -796,25 +805,24 @@ void daAlink_c::setHookshotPos() {
|
||||
mDoMtx_stack_c::transM(-2.0f, 1.0f, 1.0f);
|
||||
mDoMtx_stack_c::XYZrotM(cM_deg2s(5.7f), cM_deg2s(162.0f), 0);
|
||||
|
||||
J3DModel* var_r27;
|
||||
J3DModel* model;
|
||||
if (field_0x3020 == 0) {
|
||||
var_r27 = mHeldItemModel;
|
||||
model = mHeldItemModel;
|
||||
} else {
|
||||
var_r27 = field_0x0710;
|
||||
model = field_0x0710;
|
||||
}
|
||||
var_r27->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(mRightItemJntNo));
|
||||
mDoMtx_stack_c::transM(-2.0f, 0.0f, 1.0f);
|
||||
mDoMtx_stack_c::XYZrotM(cM_deg2s(-78.0f), cM_deg2s(182.0f), cM_deg2s(-99.0f));
|
||||
|
||||
J3DModel* var_r27_2;
|
||||
if (field_0x3020 == 0) {
|
||||
var_r27_2 = field_0x0710;
|
||||
model = field_0x0710;
|
||||
} else {
|
||||
var_r27_2 = mHeldItemModel;
|
||||
model = mHeldItemModel;
|
||||
}
|
||||
var_r27_2->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
if (mItemMode == 2 || mItemMode == HS_MODE_SHOOT_e) {
|
||||
field_0x33dc += 1.0f;
|
||||
@@ -865,6 +873,7 @@ void daAlink_c::setHookshotPos() {
|
||||
mpHookSound->framework(0, mVoiceReverbIntensity);
|
||||
|
||||
fopAc_ac_c* targetAc_p = mHookTargetAcKeep.getActor();
|
||||
f32 var_f29;
|
||||
f32 return_speed;
|
||||
f32 shoot_speed;
|
||||
f32 max_length;
|
||||
@@ -981,7 +990,7 @@ void daAlink_c::setHookshotPos() {
|
||||
if (mHookTargetAcKeep.getActor() != NULL) {
|
||||
mHookshotTopPos = field_0x381c;
|
||||
|
||||
fopAc_ac_c* targetAc_p = mHookTargetAcKeep.getActor();
|
||||
targetAc_p = mHookTargetAcKeep.getActor();
|
||||
if (targetAc_p != NULL && (targetAc_p->actor_status & 0x280000)) {
|
||||
mHookTargetAcKeep.setData(targetAc_p);
|
||||
mIronBallCenterPos = mHookshotTopPos - targetAc_p->current.pos;
|
||||
@@ -1026,12 +1035,12 @@ void daAlink_c::setHookshotPos() {
|
||||
}
|
||||
|
||||
cXyz sp17C = mHookshotTopPos - mHeldItemRootPos;
|
||||
f32 temp_f1 = sp17C.abs();
|
||||
sp17C *= 1.0f / temp_f1;
|
||||
var_f29 = sp17C.abs();
|
||||
sp17C *= 1.0f / var_f29;
|
||||
|
||||
f32 temp_f26 = max_length - 15.0f;
|
||||
if (temp_f1 >= temp_f26) {
|
||||
mHookshotTopPos = mHeldItemRootPos + (sp17C * temp_f26);
|
||||
f32 var_f26 = max_length - 15.0f;
|
||||
if (var_f29 >= var_f26) {
|
||||
mHookshotTopPos = mHeldItemRootPos + (sp17C * var_f26);
|
||||
mItemMode = HS_MODE_RETURN_e;
|
||||
}
|
||||
|
||||
@@ -1070,9 +1079,9 @@ void daAlink_c::setHookshotPos() {
|
||||
|
||||
mPolyInfo2.SetPolyInfo(mRopeLinChk);
|
||||
if (dComIfG_Bgsp().ChkMoveBG_NoDABg(mRopeLinChk)) {
|
||||
fopAc_ac_c* target_ac = dComIfG_Bgsp().GetActorPointer(mRopeLinChk);
|
||||
mHookTargetAcKeep.setData(target_ac);
|
||||
fopAcM_setHookCarryNow(target_ac);
|
||||
targetAc_p = dComIfG_Bgsp().GetActorPointer(mRopeLinChk);
|
||||
mHookTargetAcKeep.setData(targetAc_p);
|
||||
fopAcM_setHookCarryNow(targetAc_p);
|
||||
}
|
||||
} else {
|
||||
int poly_att0 = dComIfG_Bgsp().GetPolyAtt0(mRopeLinChk);
|
||||
@@ -1131,7 +1140,7 @@ void daAlink_c::setHookshotPos() {
|
||||
if (dComIfG_Bgsp().LineCross(mpHookshotLinChk) &&
|
||||
dComIfG_Bgsp().GetPolyAtt0(*mpHookshotLinChk) != 6)
|
||||
{
|
||||
fpc_ProcID id = fopKyM_createWpillar(mpHookshotLinChk->GetCrossP(), 0.5f, 0);
|
||||
fopKyM_createWpillar(mpHookshotLinChk->GetCrossP(), 0.5f, 0);
|
||||
mDoAud_seStart(Z2SE_CM_BODYFALL_WATER_S, mpHookshotLinChk->GetCrossP(), 0,
|
||||
mVoiceReverbIntensity);
|
||||
}
|
||||
@@ -1217,7 +1226,7 @@ void daAlink_c::hookshotRoofTurn() {
|
||||
|
||||
if (checkInputOnR()) {
|
||||
int stick_direction = getDirectionFromAngle(mStickAngle);
|
||||
int angle = (int)(1024.0f * mMoveValue * mMoveValue);
|
||||
s16 angle = 1024.0f * mMoveValue * mMoveValue;
|
||||
|
||||
if (stick_direction == DIR_LEFT) {
|
||||
shape_angle.y += angle;
|
||||
@@ -1252,11 +1261,11 @@ void daAlink_c::hookshotRoofTurn() {
|
||||
|
||||
u8 status_dir = 0;
|
||||
if (current.pos.y < max_rise_y) {
|
||||
status_dir |= 8;
|
||||
status_dir |= (u8)0x8;
|
||||
}
|
||||
|
||||
if (current.pos.y > min_descend_y) {
|
||||
status_dir |= 2;
|
||||
status_dir |= (u8)0x2;
|
||||
}
|
||||
|
||||
if (!checkEventRun()) {
|
||||
|
||||
@@ -281,9 +281,14 @@ void daAlink_c::setHorseSwordUpAnime() {
|
||||
|
||||
void daAlink_c::setHorseTurnUpperAnime(BOOL i_isTurnL) {
|
||||
if (checkHorseNoUpperAnime() || (!i_isTurnL && checkHorseTurnRAnime()) ||
|
||||
(i_isTurnL == TRUE && checkHorseTurnLAnime()))
|
||||
{
|
||||
setUpperAnimeBaseMorf(!i_isTurnL ? (u16)dRes_ID_ALANM_BCK_TURNLS_e : (u16)dRes_ID_ALANM_BCK_TURNRS_e, 4.0f);
|
||||
(i_isTurnL == TRUE && checkHorseTurnLAnime())) {
|
||||
u16 anmResIdx;
|
||||
if (i_isTurnL == FALSE) {
|
||||
anmResIdx = (u16)dRes_ID_ALANM_BCK_TURNLS_e;
|
||||
} else {
|
||||
anmResIdx = (u16)dRes_ID_ALANM_BCK_TURNRS_e;
|
||||
}
|
||||
setUpperAnimeBaseMorf(anmResIdx, 4.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +339,7 @@ void daAlink_c::setHorseStirrup() {
|
||||
if (field_0x2fab & 1) {
|
||||
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(field_0x30bc));
|
||||
mDoMtx_stack_c::transM(-2.0f, -11.0f, 1.5f);
|
||||
mDoMtx_stack_c::ZXYrotM(NULL, -0x8000, 0x4000);
|
||||
mDoMtx_stack_c::ZXYrotM(0, -0x8000, 0x4000);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), horse->getLeftStirrupMtx());
|
||||
}
|
||||
|
||||
@@ -1095,7 +1100,11 @@ int daAlink_c::checkHorseGetOffDirection() {
|
||||
lin_end_pos.set(ride_actor_p->current.pos.x + cM_ssin(var_r28) * 125.0f, lin_start_pos.y,
|
||||
ride_actor_p->current.pos.z + cM_scos(var_r28) * 125.0f);
|
||||
|
||||
#if PLATFORM_SHIELD
|
||||
f32 check_y[3];
|
||||
#else
|
||||
f32 check_y[3] = {0.0f, 0.0f, 0.0f};
|
||||
#endif
|
||||
check_y[0] = current.pos.y;
|
||||
check_y[1] = ride_actor_p->current.pos.y + (current.pos.y - ride_actor_p->current.pos.y) * 0.5f;
|
||||
|
||||
@@ -1103,8 +1112,7 @@ int daAlink_c::checkHorseGetOffDirection() {
|
||||
check_y[2] = var_f31;
|
||||
|
||||
int check_no;
|
||||
int i;
|
||||
for (i = 0; i < 2; i++) {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (check_no = 0; check_no < 3; check_no++) {
|
||||
lin_start_pos.y = check_y[check_no];
|
||||
lin_end_pos.y = lin_start_pos.y;
|
||||
@@ -1123,7 +1131,7 @@ int daAlink_c::checkHorseGetOffDirection() {
|
||||
|
||||
lin_end_pos.x = lin_start_pos.x * 2.0f - lin_end_pos.x;
|
||||
lin_end_pos.z = lin_start_pos.z * 2.0f - lin_end_pos.z;
|
||||
var_r28 += 0x8000;
|
||||
ANGLE_ADD_2(var_r28, 0x8000);
|
||||
}
|
||||
|
||||
return 2;
|
||||
@@ -1135,11 +1143,11 @@ void daAlink_c::boarForceGetOff() {
|
||||
|
||||
void daAlink_c::horseGetOffEnd() {
|
||||
if (field_0x2fc0 == 0) {
|
||||
shape_angle.y -= (s16)0x4000;
|
||||
ANGLE_SUB(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, 0x4000, 0);
|
||||
mDoMtx_stack_c::YrotS(-0x4000);
|
||||
} else {
|
||||
shape_angle.y += (s16)0x4000;
|
||||
ANGLE_ADD(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, -0x4000, 0);
|
||||
mDoMtx_stack_c::YrotS(0x4000);
|
||||
}
|
||||
@@ -1319,7 +1327,7 @@ int daAlink_c::procHorseRideInit() {
|
||||
}
|
||||
field_0x2fc0 = 1;
|
||||
}
|
||||
|
||||
|
||||
if (mDemo.getDemoMode() != daPy_demo_c::DEMO_UNK_7_e) {
|
||||
setOldRootQuaternion(0, (s16)(shape_angle.y - field_0x27f4->shape_angle.y), 0);
|
||||
}
|
||||
@@ -1587,7 +1595,7 @@ int daAlink_c::procHorseGetOff() {
|
||||
if (rideActor != NULL) {
|
||||
current.pos += rideActor->current.pos - field_0x37d4;
|
||||
field_0x37d4 = rideActor->current.pos;
|
||||
shape_angle.y += (s16)(mProcVar3.field_0x300e - rideActor->shape_angle.y);
|
||||
ANGLE_ADD(shape_angle.y, mProcVar3.field_0x300e - rideActor->shape_angle.y);
|
||||
mProcVar3.field_0x300e = rideActor->shape_angle.y;
|
||||
}
|
||||
|
||||
@@ -1670,7 +1678,8 @@ int daAlink_c::procHorseWaitInit() {
|
||||
initServiceWaitTime();
|
||||
checkHorseGetOffAndSetDoStatus();
|
||||
|
||||
setSyncRide((!checkHorseNoUpperAnime() && !checkEquipAnime()) || checkInputOnR() || !checkHorseGetOff() || checkHorseGetOffDirection() == 2);
|
||||
setSyncRide(!((checkHorseNoUpperAnime() || checkEquipAnime()) && !checkInputOnR() &&
|
||||
checkHorseGetOff() && checkHorseGetOffDirection() != 2));
|
||||
field_0x33f0 = 0.0f;
|
||||
return 1;
|
||||
}
|
||||
@@ -2706,9 +2715,9 @@ int daAlink_c::procHorseRun() {
|
||||
|
||||
if (horse->checkRodeoLeft()) {
|
||||
if (mProcVar3.field_0x300e != 0) {
|
||||
mProcVar5.field_0x3012 -= (s16)150;
|
||||
S16_SUB(mProcVar5.field_0x3012, 150);
|
||||
} else {
|
||||
mProcVar5.field_0x3012 -= (s16)600;
|
||||
S16_SUB(mProcVar5.field_0x3012, 600);
|
||||
}
|
||||
|
||||
if (mProcVar2.field_0x300c == 0) {
|
||||
@@ -2716,9 +2725,9 @@ int daAlink_c::procHorseRun() {
|
||||
}
|
||||
} else {
|
||||
if (mProcVar3.field_0x300e != 0) {
|
||||
mProcVar5.field_0x3012 += (s16)150;
|
||||
S16_ADD(mProcVar5.field_0x3012, 150);
|
||||
} else {
|
||||
mProcVar5.field_0x3012 += (s16)600;
|
||||
S16_ADD(mProcVar5.field_0x3012, 600);
|
||||
}
|
||||
|
||||
if (mProcVar2.field_0x300c == 0) {
|
||||
@@ -2744,7 +2753,7 @@ int daAlink_c::procHorseRun() {
|
||||
daPy_frameCtrl_c* framectrl = &mUnderFrameCtrl[0];
|
||||
f32 temp_f31 = framectrl->getFrame() / framectrl->getEnd();
|
||||
|
||||
mProcVar4.field_0x3010 = (field_0x3478 * (1.0f + cM_fsin((M_PI*2) * (temp_f31 - 0.69999999f)))) + (4000.0f * (1.0f - fabsf(0.000099999997f * mProcVar5.field_0x3012)));
|
||||
mProcVar4.field_0x3010 = (field_0x3478 * (1.0f + cM_fsin((M_PI*2) * (temp_f31 - 0.7f)))) + (4000.0f * (1.0f - fabsf(0.0001f * mProcVar5.field_0x3012)));
|
||||
field_0x3088 = field_0x3478 * (1.0f + cM_fsin((M_PI*2) * (temp_f31 - 1.0f)));
|
||||
|
||||
if (framectrl->checkPass(0.0f)) {
|
||||
|
||||
@@ -378,7 +378,7 @@ int daAlink_c::procMagneBootsFly() {
|
||||
|
||||
cLib_addCalcAngleS(&shape_angle.x, sp24.atan2sY_XZ() + -0x4000, 5, 0x1000, 0x100);
|
||||
cLib_addCalcAngleS(&shape_angle.y, sp24.atan2sX_Z(), 5, 0x1000, 0x100);
|
||||
mProcVar2.field_0x300c += (s16)0x1C00;
|
||||
ANGLE_ADD(mProcVar2.field_0x300c, 0x1C00);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -18,7 +18,8 @@ static fopAc_ac_c* daAlink_searchIceLeaf(fopAc_ac_c* i_actor, void* i_data) {
|
||||
}
|
||||
|
||||
bool daAlink_c::checkSnowCode() const {
|
||||
return mGndPolySpecialCode == dBgW_SPCODE_HEAVY_SNOW || mGndPolySpecialCode == dBgW_SPCODE_LIGHT_SNOW;
|
||||
return mGndPolySpecialCode == dBgW_SPCODE_HEAVY_SNOW ||
|
||||
mGndPolySpecialCode == dBgW_SPCODE_LIGHT_SNOW;
|
||||
}
|
||||
|
||||
bool daAlink_c::checkSnowCodePolygon(cBgS_PolyInfo& i_polyinfo) {
|
||||
@@ -27,7 +28,8 @@ bool daAlink_c::checkSnowCodePolygon(cBgS_PolyInfo& i_polyinfo) {
|
||||
}
|
||||
|
||||
bool daAlink_c::checkBoardRestart() {
|
||||
return (mRideStatus == 0 && mRideAcKeep.getActor() != NULL) && fopAcM_GetName(mRideAcKeep.getActor()) == PROC_Obj_IceLeaf;
|
||||
return (mRideStatus == 0 && mRideAcKeep.getActor() != NULL) &&
|
||||
fopAcM_GetName(mRideAcKeep.getActor()) == PROC_Obj_IceLeaf;
|
||||
}
|
||||
|
||||
int daAlink_c::boardCommon(BOOL i_canMove) {
|
||||
@@ -47,7 +49,9 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
|
||||
s16 sp8 = current.angle.y + 0x8000;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mAcchCir[i].ChkWallHit() && cLib_distanceAngleS(sp8, mAcchCir[i].GetWallAngleY()) <= 0x2000 && mNormalSpeed > 30.0f) {
|
||||
if (mAcchCir[i].ChkWallHit() &&
|
||||
cLib_distanceAngleS(sp8, mAcchCir[i].GetWallAngleY()) <= 0x2000 &&
|
||||
mNormalSpeed > 30.0f) {
|
||||
setJumpMode();
|
||||
return procCoLargeDamageInit(-4, TRUE, 0, 0, NULL, 0);
|
||||
}
|
||||
@@ -110,12 +114,22 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
|
||||
var_f30 = (temp_f29 * mNormalSpeed) / 5.0f;
|
||||
}
|
||||
|
||||
if (checkZeroSpeedF() && temp_r26 > 0x7000 && mProcID == PROC_BOARD_WAIT && !checkModeFlg(2)) {
|
||||
if (mProcVar3.field_0x300e <= 910.0f && checkUnderMove0BckNoArc(ANM_RIDE_WAIT) && mLinkAcch.ChkGroundHit()) {
|
||||
if (checkZeroSpeedF() &&
|
||||
temp_r26 > 0x7000 &&
|
||||
mProcID == PROC_BOARD_WAIT &&
|
||||
!checkModeFlg(2)) {
|
||||
if (mProcVar3.field_0x300e <= l_boardSlopeAngleMin &&
|
||||
checkUnderMove0BckNoArc(ANM_RIDE_WAIT) &&
|
||||
mLinkAcch.ChkGroundHit()) {
|
||||
return procBoardTurnInit();
|
||||
}
|
||||
}
|
||||
} else if (temp_r26 < 0x2000 && field_0x2f8c == 0xB && mProcID == PROC_BOARD_WAIT && !checkModeFlg(2) && mLinkAcch.ChkGroundHit() && (mProcVar3.field_0x300e < field_0x3122) && (checkUnderMove0BckNoArc(ANM_RIDE_WAIT) || checkUnderMove0BckNoArc(ANM_RIDE_FRONT))) {
|
||||
} else if (temp_r26 < 0x2000 &&
|
||||
field_0x2f8c == 0xB &&
|
||||
mProcID == PROC_BOARD_WAIT &&
|
||||
!checkModeFlg(2) && mLinkAcch.ChkGroundHit() &&
|
||||
(mProcVar3.field_0x300e < field_0x3122) &&
|
||||
(checkUnderMove0BckNoArc(ANM_RIDE_WAIT) || checkUnderMove0BckNoArc(ANM_RIDE_FRONT))) {
|
||||
if (mNormalSpeed <= mpHIO->mItem.mBoard.m.mMaxPushSpeed) {
|
||||
return procBoardRowInit();
|
||||
}
|
||||
@@ -160,7 +174,10 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
|
||||
offModeFlg(2);
|
||||
speed.y = 0.0f;
|
||||
} else {
|
||||
if (mProcVar3.field_0x300e > 910.0f && (mProcID != PROC_BOARD_ROW || !(mProcVar3.field_0x300e < 2000.0f))) {
|
||||
if (mProcVar3.field_0x300e > l_boardSlopeAngleMin &&
|
||||
(mProcID != PROC_BOARD_ROW || !(mProcVar3.field_0x300e < l_boardSlopeRowAngleMin))) {
|
||||
f32 temp_f27;
|
||||
f32 temp_f26;
|
||||
f32 var_f25 = (f32)mProcVar3.field_0x300e / (f32)field_0x3122;
|
||||
if (var_f25 > 1.0f) {
|
||||
var_f25 = 1.0f;
|
||||
@@ -176,8 +193,8 @@ int daAlink_c::boardCommon(BOOL i_canMove) {
|
||||
|
||||
var_f31 *= cM_fsin(1.5707964f * var_f25);
|
||||
if (var_f31 > 0.1f) {
|
||||
f32 temp_f27 = (var_f31 * cM_ssin(var_r27)) + (mNormalSpeed * cM_ssin(shape_angle.y));
|
||||
f32 temp_f26 = (var_f31 * cM_scos(var_r27)) + (mNormalSpeed * cM_scos(shape_angle.y));
|
||||
temp_f27 = (var_f31 * cM_ssin(var_r27)) + (mNormalSpeed * cM_ssin(shape_angle.y));
|
||||
temp_f26 = (var_f31 * cM_scos(var_r27)) + (mNormalSpeed * cM_scos(shape_angle.y));
|
||||
|
||||
mNormalSpeed = JMAFastSqrt((temp_f27 * temp_f27) + (temp_f26 * temp_f26));
|
||||
if (mNormalSpeed > mMaxSpeed) {
|
||||
|
||||
@@ -213,6 +213,11 @@ void daAlink_c::setIronBallChainPos() {
|
||||
int sp38;
|
||||
int sp34;
|
||||
|
||||
f32 var_f30;
|
||||
f32 var_f31;
|
||||
f32 var_f29;
|
||||
f32 var_f28;
|
||||
f32 var_f27;
|
||||
if (mItemVar0.field_0x3018 == 2) {
|
||||
var_r29 = mIronBallChainPos + 1;
|
||||
var_r27 = var_r29 - 1;
|
||||
@@ -293,20 +298,20 @@ void daAlink_c::setIronBallChainPos() {
|
||||
daPy_frameCtrl_c* framectrl = &mUnderFrameCtrl[0];
|
||||
|
||||
if (mItemVar0.field_0x3018 == 1) {
|
||||
f32 temp_f25 = framectrl->getEnd() - 13.0f;
|
||||
f32 temp_f29 = (framectrl->getFrame() - 13.0f) / temp_f25;
|
||||
s16 sp12 = -16384.0f - (14336.0f * temp_f29);
|
||||
var_f29 = (framectrl->getFrame() - 13.0f) / (framectrl->getEnd() - 13.0f);
|
||||
s16 sp12 = -16384.0f - (14336.0f * var_f29);
|
||||
|
||||
mDoMtx_stack_c::ZXYrotS(mBodyAngle.x, shape_angle.y, 0);
|
||||
mDoMtx_stack_c::YrotM(sp12);
|
||||
mDoMtx_stack_c::multVec(&cXyz::BaseZ, &sp298);
|
||||
|
||||
sp298 *= 15.0f * (1.0f + temp_f29);
|
||||
sp298 *= 15.0f * (1.0f + var_f29);
|
||||
sp38 = 1000;
|
||||
} else if (mItemVar0.field_0x3018 == 4) {
|
||||
Vec sp268 = {0.0f, 0.0f, 0.0f};
|
||||
sp268.y = mpHIO->mItem.mIronBall.m.mThrowChainAccelY;
|
||||
sp268.z = mpHIO->mItem.mIronBall.m.mThrowChainAccelZ;
|
||||
f32 throwAccelZ = mpHIO->mItem.mIronBall.m.mThrowChainAccelZ;
|
||||
sp268.z = throwAccelZ;
|
||||
|
||||
mDoMtx_stack_c::ZXYrotS(mBodyAngle.x, shape_angle.y, 0);
|
||||
mDoMtx_stack_c::multVec(&sp268, &sp298);
|
||||
@@ -355,10 +360,8 @@ void daAlink_c::setIronBallChainPos() {
|
||||
sp2A4 += sp298;
|
||||
}
|
||||
|
||||
s16 temp_r25 = sp2A4.atan2sX_Z();
|
||||
mIronBallChainAngle->set(sp2A4.atan2sY_XZ(), temp_r25, 0);
|
||||
mIronBallChainAngle->set(sp2A4.atan2sY_XZ(), sp2A4.atan2sX_Z(), 0);
|
||||
} else {
|
||||
f32 var_f30;
|
||||
if (mItemVar0.field_0x3018 == 4 || mItemVar0.field_0x3018 == 5) {
|
||||
var_f30 = mpHIO->mItem.mIronBall.m.mThrowChainGravity;
|
||||
} else {
|
||||
@@ -384,9 +387,9 @@ void daAlink_c::setIronBallChainPos() {
|
||||
|
||||
BOOL sp2C = ((mItemVar0.field_0x3018 == 0 && checkUnderMove1BckNoArc(ANM_IRONBALL_WALK)) && mNowAnmPackUnder[1].getRatio() > 0.8f) && (mUnderFrameCtrl[1].getFrame() >= 24.0f || mUnderFrameCtrl[1].getFrame() <= 3.0f);
|
||||
|
||||
f32 temp_f31 = 5.0f * (5.0f * (mNowAnmPackUnder[1].getRatio() - 0.8f));
|
||||
f32 temp_f28 = temp_f31 * cM_scos(shape_angle.y);
|
||||
temp_f31 *= cM_ssin(shape_angle.y);
|
||||
var_f31 = 5.0f * (5.0f * (mNowAnmPackUnder[1].getRatio() - 0.8f));
|
||||
var_f28 = var_f31 * cM_scos(shape_angle.y);
|
||||
var_f31 *= cM_ssin(shape_angle.y);
|
||||
|
||||
for (i = mItemMode; i > 0; i--, var_r29--, var_r26--) {
|
||||
sp28C = *var_r29;
|
||||
@@ -396,8 +399,8 @@ void daAlink_c::setIronBallChainPos() {
|
||||
} else {
|
||||
sp2A4 = (*var_r29 - *var_r27) + *var_r26;
|
||||
if (sp2C) {
|
||||
sp2A4.x += temp_f31;
|
||||
sp2A4.z += temp_f28;
|
||||
sp2A4.x += var_f31;
|
||||
sp2A4.z += var_f28;
|
||||
}
|
||||
sp2A4.y += var_f30;
|
||||
|
||||
@@ -421,10 +424,10 @@ void daAlink_c::setIronBallChainPos() {
|
||||
s16 sp10;
|
||||
s16 spE = mIronBallChainAngle->z + 0x3000;
|
||||
|
||||
for (i = 0; i < mItemMode; i++, sp3C++, var_r29++, spE += 0x3000) {
|
||||
for (i = 0; i < mItemMode; i++, sp3C++, var_r29++, ANGLE_ADD_2(spE, 0x3000)) {
|
||||
sp2A4 = (*var_r27 - *var_r29);
|
||||
|
||||
f32 var_f27 = sp2A4.absXZ();
|
||||
var_f27 = sp2A4.absXZ();
|
||||
if (var_f27 < 1.0f) {
|
||||
sp10 = sp3C[-1].y;
|
||||
} else {
|
||||
@@ -721,7 +724,7 @@ void daAlink_c::setIronBallPos() {
|
||||
}
|
||||
|
||||
if (mItemMode > 6) {
|
||||
mItemMode -= var_r22;
|
||||
ANGLE_SUB_2(mItemMode, var_r22);
|
||||
if (mItemMode <= 6) {
|
||||
mItemVar0.field_0x3018 = 8;
|
||||
}
|
||||
@@ -749,7 +752,7 @@ void daAlink_c::setIronBallPos() {
|
||||
mDoMtx_stack_c::multVec(&ironBallPosVec, mIronBallChainPos);
|
||||
|
||||
if (mItemMode > 6) {
|
||||
mItemMode -= 10;
|
||||
mItemMode -= (s16)10;
|
||||
if (mItemMode < 6) {
|
||||
mItemMode = 6;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ int daAlink_c::procSumouSideMove() {
|
||||
f32 var_f1;
|
||||
if (checkInputOnR() && temp_r30_2 > 0x800 && temp_r30_2 < 0x7800) {
|
||||
if (abs((s16)(mMoveAngle - current.angle.y)) > 0x4000) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
|
||||
if (field_0x2f98 == 3) {
|
||||
|
||||
@@ -254,7 +254,7 @@ void daAlink_c::setSpeedAndAngleSwim() {
|
||||
|
||||
if (checkInputOnR()) {
|
||||
if (getDirectionFromCurrentAngle() == DIR_BACKWARD) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ int daAlink_c::checkNextActionSwim() {
|
||||
int daAlink_c::checkSwimAction(int param_0) {
|
||||
f32 var_f31;
|
||||
if (checkWolf()) {
|
||||
if (getMoveBGActorName(mLinkAcch.m_gnd, NULL) == PROC_Obj_ITA) {
|
||||
if (getMoveBGActorName(mLinkAcch.m_gnd, 0) == PROC_Obj_ITA) {
|
||||
var_f31 = 200.0f;
|
||||
} else {
|
||||
var_f31 = mpHIO->mWolf.mWlSwim.m.mStartHeight;
|
||||
@@ -875,7 +875,7 @@ BOOL daAlink_c::checkSwimNeckUpDown() const {
|
||||
}
|
||||
|
||||
void daAlink_c::setSwimUpDownOffset() {
|
||||
mProcVar2.field_0x300c += (s16)((cM_rndF(0.3f) + 0.85f) * 2330.0f);
|
||||
ANGLE_ADD(mProcVar2.field_0x300c, (cM_rndF(0.3f) + 0.85f) * 2330.0f);
|
||||
|
||||
f32 var_f1;
|
||||
if (checkWolf()) {
|
||||
@@ -1413,12 +1413,13 @@ int daAlink_c::procSwimDamageInit(dCcD_GObjInf* i_hitObj) {
|
||||
dmg_vec->z * var_f29 + dmg_vec->x * var_f30);
|
||||
|
||||
mProcVar0.field_0x3008 =
|
||||
cLib_minMaxLimit(cM_atan2s(sp24.z, sp24.y), (s16)-mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle,
|
||||
(s16)mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle);
|
||||
cLib_minMaxLimit<s16>(cM_atan2s(sp24.z, sp24.y),
|
||||
-mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle,
|
||||
mpHIO->mDamage.mDamSwim.m.mFrontBackBodyMaxAngle);
|
||||
|
||||
mProcVar1.field_0x300a = cLib_minMaxLimit(
|
||||
mProcVar1.field_0x300a = cLib_minMaxLimit<s16>(
|
||||
cM_atan2s(sp24.x, -JMAFastSqrt(sp24.y * sp24.y + sp24.z * sp24.z)),
|
||||
(s16)-mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle, (s16)mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle);
|
||||
-mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle, mpHIO->mDamage.mDamSwim.m.mLeftRightBodyMaxAngle);
|
||||
|
||||
int dir = getDirectionFromAngle(cM_atan2s(-sp24.x, -sp24.z));
|
||||
if (bvar4) {
|
||||
|
||||
@@ -272,6 +272,7 @@ void daAlink_c::initStatusWindow() {
|
||||
JUT_ASSERT(437, tmpBuffer);
|
||||
|
||||
JKRReadIdxResource(tmpBuffer, 0x400, btpResIdx, dComIfGp_getAnmArchive());
|
||||
// this should call J3DAnmLoaderDataBase::load(const void*) but it breaks retail
|
||||
J3DAnmTexPattern* btp = (J3DAnmTexPattern*)J3DAnmLoaderDataBase::load(tmpBuffer, J3DLOADER_UNK_FLAG0);
|
||||
btp->setFrame(0.0f);
|
||||
btp->searchUpdateMaterialID(field_0x06c0);
|
||||
@@ -281,6 +282,7 @@ void daAlink_c::initStatusWindow() {
|
||||
JUT_ASSERT(449, tmpBuffer);
|
||||
|
||||
JKRReadIdxResource(tmpBuffer, 0x400, btkResIdx, dComIfGp_getAnmArchive());
|
||||
// this should call J3DAnmLoaderDataBase::load(const void*) but it breaks retail
|
||||
J3DAnmTextureSRTKey* btk = (J3DAnmTextureSRTKey*)J3DAnmLoaderDataBase::load(tmpBuffer, J3DLOADER_UNK_FLAG0);
|
||||
btk->setFrame(0.0f);
|
||||
btk->searchUpdateMaterialID(field_0x06c0);
|
||||
|
||||
+121
-114
@@ -722,7 +722,7 @@ void daAlink_c::setSpeedAndAngleWolf() {
|
||||
var_r4 = mMoveAngle;
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS(&shape_angle.y, var_r4, turn_rate, turn_max * 2, turn_min * 2);
|
||||
cLib_addCalcAngleS(&shape_angle.y, var_r4, turn_rate, (s16)turn_max * 2, (s16)turn_min * 2);
|
||||
|
||||
int temp_r3 = (s16)(temp_r26 - current.angle.y) * (s16)(shape_angle.y - current.angle.y);
|
||||
if (temp_r3 <= 0 && temp_r3 >= -0x1000000) {
|
||||
@@ -766,7 +766,7 @@ void daAlink_c::setSpeedAndAngleWolfAtn() {
|
||||
if (getDirectionFromCurrentAngle() == DIR_BACKWARD &&
|
||||
(field_0x2f98 == 0 || field_0x2f98 == 1))
|
||||
{
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
|
||||
if (checkWolfAtnMoveBack((s16)(current.angle.y - shape_angle.y))) {
|
||||
@@ -816,7 +816,7 @@ void daAlink_c::setSpeedAndAngleWolfAtn() {
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS(&shape_angle.y, var_r26, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleRate,
|
||||
turn_max * 2, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleMin * 2);
|
||||
(s16)turn_max * 2, mpHIO->mWolf.mWlAtnMove.m.mTurnAngleMin * 2);
|
||||
}
|
||||
|
||||
setNormalSpeedF(speed, deceleration);
|
||||
@@ -839,19 +839,9 @@ BOOL daAlink_c::checkUnderMove0BckNoArcWolf(daAlink_c::daAlink_WANM i_anm) const
|
||||
}
|
||||
|
||||
void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
|
||||
f32 sp8;
|
||||
if (mGroundCode == 8) {
|
||||
sp8 = 1.0f;
|
||||
} else {
|
||||
sp8 = cM_scos(field_0x2ff0);
|
||||
}
|
||||
|
||||
f32 var_f31;
|
||||
f32 temp_f30 = fabsf(mNormalSpeed * sp8) / mMaxSpeed;
|
||||
|
||||
daPy_frameCtrl_c* framectrl0 = &mUnderFrameCtrl[0];
|
||||
daPy_frameCtrl_c* framectrl1 = &mUnderFrameCtrl[1];
|
||||
|
||||
f32 temp_f30;
|
||||
daPy_frameCtrl_c* framectrl0;
|
||||
daPy_frameCtrl_c* framectrl1;
|
||||
f32 idleAnmSpeed;
|
||||
f32 walkAnmSpeed;
|
||||
f32 jogAnmSpeed;
|
||||
@@ -862,6 +852,21 @@ void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
|
||||
f32 jogToRunRate;
|
||||
f32 walkRunMorf;
|
||||
f32 runAnmMinBlendRate;
|
||||
f32 spC;
|
||||
|
||||
f32 sp8;
|
||||
if (mGroundCode == 8) {
|
||||
sp8 = 1.0f;
|
||||
} else {
|
||||
sp8 = cM_scos(field_0x2ff0);
|
||||
}
|
||||
|
||||
f32 var_f31;
|
||||
temp_f30 = fabsf(mNormalSpeed * sp8) / mMaxSpeed;
|
||||
|
||||
framectrl0 = &mUnderFrameCtrl[0];
|
||||
framectrl1 = &mUnderFrameCtrl[1];
|
||||
|
||||
if (checkWolfDashMode()) {
|
||||
walkToJogRate = mpHIO->mWolf.mWlMove.m.mWalkToBriskWalkRate;
|
||||
walkRunMorf = mpHIO->mWolf.mWlMove.m.mWalkRunInterpolation;
|
||||
@@ -986,7 +991,6 @@ void daAlink_c::setBlendWolfMoveAnime(f32 param_0) {
|
||||
var_f31 = 1.0f;
|
||||
}
|
||||
|
||||
f32 spC;
|
||||
if (checkNoResetFlg1(FLG1_DASH_MODE)) {
|
||||
if (checkWolfSlowDash()) {
|
||||
spC = mpHIO->mWolf.mWlMove.m.mADashQuickRunASpeedSlow;
|
||||
@@ -1075,7 +1079,7 @@ void daAlink_c::setWolfAtnMoveDirection() {
|
||||
}
|
||||
} else if (mProcID != PROC_WOLF_ROLL_ATTACK_MOVE) {
|
||||
if (field_0x2f98 == 1) {
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mNormalSpeed *= -1.0f;
|
||||
}
|
||||
|
||||
@@ -1155,20 +1159,12 @@ void daAlink_c::setBlendWolfAtnMoveAnime(f32 param_0) {
|
||||
void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
|
||||
mMaxSpeed = mpHIO->mWolf.mWlAtnMove.m.mRearMaxSpeed;
|
||||
|
||||
f32 var_f28;
|
||||
if (mGroundCode == 8) {
|
||||
var_f28 = 1.0f;
|
||||
} else {
|
||||
var_f28 = cM_scos(field_0x2ff0);
|
||||
}
|
||||
|
||||
f32 temp_f31 = fabsf(mNormalSpeed * var_f28) / mMaxSpeed;
|
||||
f32 var_f30;
|
||||
f32 var_f31 = fabsf(mNormalSpeed * (mGroundCode == 8 ? 1.0f : cM_scos(field_0x2ff0))) / mMaxSpeed;
|
||||
|
||||
field_0x2fc1 = 3;
|
||||
|
||||
if (temp_f31 < mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate) {
|
||||
f32 temp_f29 = temp_f31 / mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate;
|
||||
if (var_f31 < mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate) {
|
||||
f32 var_f29 = var_f31 / mpHIO->mWolf.mWlAtnMove.m.mRearWalkChangeRate;
|
||||
|
||||
int var_r29;
|
||||
if (checkModeFlg(1)) {
|
||||
@@ -1178,6 +1174,7 @@ void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
|
||||
}
|
||||
|
||||
daAlink_WANM var_r28;
|
||||
f32 var_f30;
|
||||
if (checkWolfAtnWait()) {
|
||||
var_r28 = WANM_ATN;
|
||||
var_f30 = mpHIO->mWolf.mWlMove.m.mGazeIdleAnmSpeed;
|
||||
@@ -1186,7 +1183,7 @@ void daAlink_c::setBlendWolfAtnBackMoveAnime(f32 param_0) {
|
||||
var_f30 = mpHIO->mWolf.mWlMoveNoP.m.mIdleAnmSpeed;
|
||||
}
|
||||
|
||||
setDoubleAnimeWolf(temp_f29, var_f30, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed, var_r28,
|
||||
setDoubleAnimeWolf(var_f29, var_f30, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed, var_r28,
|
||||
WANM_ATN_LOCK_WALK_BACK, var_r29, param_0);
|
||||
} else {
|
||||
setDoubleAnimeWolf(1.0f, mpHIO->mWolf.mWlAtnMove.m.mRearWalkAnmSpeed,
|
||||
@@ -1274,7 +1271,7 @@ int daAlink_c::setSingleAnimeWolf(daAlink_c::daAlink_WANM i_anmID, f32 i_speed,
|
||||
// "Is Adult Link but setting Wolf animation\n"
|
||||
OS_REPORT("リンクなのに狼アニメ設定\n");
|
||||
JUT_ASSERT(2214, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
J3DAnmTransform* var_r30 = getAnimeResource(&mUnderAnmHeap[0], m_wlAnmDataTable[i_anmID].m_bckID, 0x10800);
|
||||
if (var_r30 == NULL) {
|
||||
@@ -1688,7 +1685,7 @@ void daAlink_c::wolfBgCheck() {
|
||||
|
||||
if (var_r28 != 0 || var_r25 != 0) {
|
||||
onNoResetFlg1(FLG1_UNK_20000000);
|
||||
|
||||
|
||||
if (var_r28 != 0 && var_r25 != 0) {
|
||||
if (sp20.abs2() > sp14.abs2()) {
|
||||
sp8 = sp20;
|
||||
@@ -1774,9 +1771,9 @@ void daAlink_c::wolfBgCheck() {
|
||||
if (field_0x2fa6 == 0 && !checkEndResetFlg1(ERFLG1_UNK_200000)) {
|
||||
s16 var_r27 = field_0x3092 - shape_angle.y;
|
||||
if (var_r27 <= 0) {
|
||||
var_r27 += (s16)0x4000;
|
||||
ANGLE_ADD(var_r27, 0x4000);
|
||||
} else {
|
||||
var_r27 -= (s16)0x4000;
|
||||
ANGLE_SUB(var_r27, 0x4000);
|
||||
}
|
||||
|
||||
mPrevAngleY += var_r27;
|
||||
@@ -1819,8 +1816,9 @@ void daAlink_c::setWolfFootMatrix() {
|
||||
daAlink_footData_c* footData = mFootData1;
|
||||
|
||||
int i, j;
|
||||
int var_r31;
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
int var_r31 = fFootJoint[i];
|
||||
var_r31 = fFootJoint[i];
|
||||
for (j = 0; j < 3; j++, var_r31++) {
|
||||
cMtx_copy(mpLinkModel->getAnmMtx(var_r31), footData->field_0x14[j]);
|
||||
if (j == 1) {
|
||||
@@ -1831,9 +1829,9 @@ void daAlink_c::setWolfFootMatrix() {
|
||||
|
||||
footData = mFootData2;
|
||||
|
||||
for (int i = 0; i < 2; i++, footData++) {
|
||||
int var_r31 = bFootJoint[i];
|
||||
for (int j = 0; j < 3; j++, var_r31++) {
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
var_r31 = bFootJoint[i];
|
||||
for (j = 0; j < 3; j++, var_r31++) {
|
||||
cMtx_copy(mpLinkModel->getAnmMtx(var_r31), footData->field_0x14[j]);
|
||||
if (j == 0) {
|
||||
var_r31++;
|
||||
@@ -1841,64 +1839,66 @@ void daAlink_c::setWolfFootMatrix() {
|
||||
}
|
||||
}
|
||||
|
||||
if (field_0x2060->getOldFrameFlg()) {
|
||||
cXyz sp40[4];
|
||||
cXyz sp34(0.0f, 0.0f, 0.0f);
|
||||
cXyz sp28;
|
||||
if (!field_0x2060->getOldFrameFlg()) {
|
||||
return;
|
||||
}
|
||||
|
||||
footData = mFootData1;
|
||||
cXyz sp40[4];
|
||||
cXyz sp34(0.0f, 0.0f, 0.0f);
|
||||
cXyz sp28;
|
||||
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
int var_r31 = fFootJoint[i];
|
||||
for (j = 0; j < 4; j++, var_r31++) {
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
|
||||
}
|
||||
footData = mFootData1;
|
||||
|
||||
int temp_r31 = fFootJoint[i];
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, NULL);
|
||||
|
||||
sp34.x = sp40[0].abs(sp40[1]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
|
||||
sp34.x = sp40[1].abs(sp40[2]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
|
||||
sp34.x = sp40[2].abs(sp40[3]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x2, 0, 0, 0, &sp28);
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
var_r31 = fFootJoint[i];
|
||||
for (j = 0; j < 4; j++, var_r31++) {
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
|
||||
}
|
||||
|
||||
footData = mFootData2;
|
||||
var_r31 = fFootJoint[i];
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, NULL);
|
||||
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
int var_r31 = bFootJoint[i];
|
||||
for (j = 0; j < 4; j++, var_r31++) {
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
|
||||
}
|
||||
sp34.x = sp40[0].abs(sp40[1]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
|
||||
int temp_r31 = bFootJoint[i];
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, NULL);
|
||||
|
||||
sp34.x = sp40[0].abs(sp40[1]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x6, 0, 0, 0, &sp28);
|
||||
sp34.x = sp40[1].abs(sp40[2]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
|
||||
sp34.x = sp40[1].abs(sp40[2]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
sp34.x = sp40[2].abs(sp40[3]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x2, 0, 0, 0, &sp28);
|
||||
}
|
||||
|
||||
sp34.x = sp40[2].abs(sp40[3]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
temp_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(temp_r31), footData->field_0x2, 0, 0, 0, &sp28);
|
||||
footData = mFootData2;
|
||||
|
||||
for (i = 0; i < 2; i++, footData++) {
|
||||
var_r31 = bFootJoint[i];
|
||||
for (j = 0; j < 4; j++, var_r31++) {
|
||||
mDoMtx_multVecZero(mpLinkModel->getAnmMtx(var_r31), &sp40[j]);
|
||||
}
|
||||
|
||||
var_r31 = bFootJoint[i];
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, NULL);
|
||||
|
||||
sp34.x = sp40[0].abs(sp40[1]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x6, 0, 0, 0, &sp28);
|
||||
|
||||
sp34.x = sp40[1].abs(sp40[2]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x4, 0, 0, 0, &sp28);
|
||||
|
||||
sp34.x = sp40[2].abs(sp40[3]);
|
||||
mDoMtx_stack_c::multVec(&sp34, &sp28);
|
||||
var_r31++;
|
||||
setMatrixWorldAxisRot(mpLinkModel->getAnmMtx(var_r31), footData->field_0x2, 0, 0, 0, &sp28);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2039,7 +2039,7 @@ void daAlink_c::wolfFootBgCheck() {
|
||||
}
|
||||
|
||||
if (temp_f30 > 0.0f || sp30) {
|
||||
if (!setLegAngle(temp_f30, footData, &sp58[i][j], &sp50[i][j], 1)) {
|
||||
if (!setLegAngle(temp_f30, footData, &sp58[i][j], &sp50[i][j], 1)) {
|
||||
sp58[i][j] = 0;
|
||||
sp50[i][j] = 0;
|
||||
}
|
||||
@@ -2051,7 +2051,7 @@ void daAlink_c::wolfFootBgCheck() {
|
||||
|
||||
cLib_addCalcAngleS(&footData->field_0x6, sp58[i][j], 2, 0x1800, 0x10);
|
||||
cLib_addCalcAngleS(&footData->field_0x4, sp50[i][j], 2, 0x1800, 0x10);
|
||||
|
||||
|
||||
s16 spE;
|
||||
if (mProcID == PROC_WOLF_SLIDE_READY) {
|
||||
spE = shape_angle.x;
|
||||
@@ -2180,6 +2180,8 @@ f32 daAlink_c::setWolfWaitSlip() {
|
||||
void daAlink_c::checkWolfAtnDoCharge() {}
|
||||
|
||||
void daAlink_c::setWolfChainPos() {
|
||||
static const int dummy1 = 0;
|
||||
static const int dummy2 = 0;
|
||||
static Vec const wolfChainBaseOffset = {22.0f, 0.0f, -12.0f};
|
||||
static Vec const wolfChainVec = {0.0f, 0.0f, -9.0f};
|
||||
|
||||
@@ -2228,7 +2230,7 @@ void daAlink_c::setWolfChainPos() {
|
||||
var_r29->y -= 9.0f;
|
||||
|
||||
*var_r30 = *(var_r30 - 1);
|
||||
var_r30->z += 0x4000;
|
||||
ANGLE_ADD_2(var_r30->z, 0x4000);
|
||||
|
||||
*var_r26 = cXyz::Zero;
|
||||
}
|
||||
@@ -2292,9 +2294,9 @@ void daAlink_c::setWolfChainPos() {
|
||||
|
||||
sp8 = var_r30[-1].z - var_r30->z;
|
||||
if ((sp8 >= 0 && sp8 <= 0x4000) || sp8 < -0x4000) {
|
||||
var_r30->z -= 0x2000;
|
||||
ANGLE_SUB_2(var_r30->z, 0x2000);
|
||||
} else {
|
||||
var_r30->z += 0x2000;
|
||||
ANGLE_ADD_2(var_r30->z, 0x2000);
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::transS(sp78);
|
||||
@@ -2682,7 +2684,7 @@ int daAlink_c::procWolfDashReverseInit(int param_0) {
|
||||
} else {
|
||||
mNormalSpeed = mpHIO->mWolf.mWlMove.m.mDashReboundHorizontalSpeed;
|
||||
speed.y = mpHIO->mWolf.mWlMove.m.mDashReboundVerticalSpeed;
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
mProcVar2.field_0x300c = 0;
|
||||
}
|
||||
|
||||
@@ -3888,19 +3890,19 @@ int daAlink_c::procWolfHowlDemoInit() {
|
||||
sp8.z = sp14.z - var_f30;
|
||||
|
||||
if (!commonLineCheck(&sp14, &sp8)) {
|
||||
shape_angle.y += 0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
} else {
|
||||
sp8.x = sp14.x + var_f30;
|
||||
sp8.z = sp14.z - var_f31;
|
||||
|
||||
if (!commonLineCheck(&sp14, &sp8)) {
|
||||
shape_angle.y += 0x4000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x4000);
|
||||
} else {
|
||||
sp8.x = sp14.x - var_f30;
|
||||
sp8.z = sp14.z + var_f31;
|
||||
|
||||
if (!commonLineCheck(&sp14, &sp8)) {
|
||||
shape_angle.y -= 0x4000;
|
||||
ANGLE_SUB_2(shape_angle.y, 0x4000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4567,10 +4569,10 @@ int daAlink_c::procWolfRopeHangInit(int param_0) {
|
||||
mProcVar2.field_0x300c = 0;
|
||||
|
||||
if (param_0 == 2) {
|
||||
shape_angle.y -= 0x4000;
|
||||
ANGLE_SUB_2(shape_angle.y, 0x4000);
|
||||
mProcVar4.field_0x3010 = -mProcVar4.field_0x3010;
|
||||
} else {
|
||||
shape_angle.y += 0x4000;
|
||||
ANGLE_ADD(shape_angle.y, 0x4000);
|
||||
}
|
||||
|
||||
wolfRopeSwingInc(50.0f);
|
||||
@@ -4597,12 +4599,12 @@ int daAlink_c::procWolfRopeHang() {
|
||||
field_0x2060->getOldFrameTransInfo(0)->mTranslate.z -= 15.0f;
|
||||
|
||||
if (field_0x3198 == 2) {
|
||||
shape_angle.y += 0x4000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, -0x4000, 0);
|
||||
shape_angle.x = -shape_angle.z;
|
||||
return procWolfRopeMoveInit(0, 0);
|
||||
} else {
|
||||
shape_angle.y -= 0x4000;
|
||||
ANGLE_SUB_2(shape_angle.y, 0x4000);
|
||||
setOldRootQuaternion(0, 0x4000, 0);
|
||||
shape_angle.x = shape_angle.z;
|
||||
return procWolfRopeMoveInit(1, 0);
|
||||
@@ -5292,11 +5294,11 @@ int daAlink_c::procWolfGiantPuzzle() {
|
||||
field_0x3478 = mMaxSpeed;
|
||||
}
|
||||
} else if (direction == DIR_LEFT) {
|
||||
mProcVar2.mPuzzleAimAngle += 0x4000;
|
||||
ANGLE_ADD_2(mProcVar2.mPuzzleAimAngle, 0x4000);
|
||||
} else if (direction == DIR_RIGHT) {
|
||||
mProcVar2.mPuzzleAimAngle -= 0x4000;
|
||||
ANGLE_SUB_2(mProcVar2.mPuzzleAimAngle, 0x4000);
|
||||
} else {
|
||||
mProcVar2.mPuzzleAimAngle += 0x8000;
|
||||
ANGLE_ADD_2(mProcVar2.mPuzzleAimAngle, 0x8000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6028,7 +6030,8 @@ BOOL daAlink_c::checkMidnaDisappearMode() const {
|
||||
return mProcID == PROC_WOLF_DIG_THROUGH ||
|
||||
(checkWolf() && dComIfGp_checkPlayerStatus0(0, 0x8000000) &&
|
||||
!dComIfGp_checkPlayerStatus0(0, 0x10) &&
|
||||
(mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000)));
|
||||
!(mTargetedActor != NULL &&
|
||||
mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000));
|
||||
}
|
||||
|
||||
BOOL daAlink_c::checkWolfLieContinue(int param_0) {
|
||||
@@ -6271,7 +6274,7 @@ int daAlink_c::procWolfLieMove() {
|
||||
} else {
|
||||
spA = mMoveAngle + 0x8000;
|
||||
}
|
||||
|
||||
|
||||
cLib_addCalcAngleS(&shape_angle.y, spA, mpHIO->mWolf.mWlLie.m.mProneTurnRate, mpHIO->mWolf.mWlLie.m.mProneTurnMax, mpHIO->mWolf.mWlLie.m.mProneTurnMin);
|
||||
}
|
||||
|
||||
@@ -6379,7 +6382,7 @@ int daAlink_c::procWolfLieAutoMove() {
|
||||
} else {
|
||||
int var_r28 = 1;
|
||||
if (mProcVar1.field_0x300a > 0) {
|
||||
mProcVar1.field_0x300a -= 1;
|
||||
mProcVar1.field_0x300a--;
|
||||
}
|
||||
|
||||
if (mProcVar3.field_0x300e != 0) {
|
||||
@@ -7202,7 +7205,7 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
|
||||
f32 attack_init_speed;
|
||||
f32 var_f30;
|
||||
f32 var_f29;
|
||||
|
||||
|
||||
if (param_0 == 1) {
|
||||
setCutType(CUT_TYPE_WOLF_JUMP);
|
||||
setCylAtParam(AT_TYPE_WOLF_ATTACK, dCcG_At_Spl_UNK_1, 3, dCcD_SE_WOLF_BITE, 3, mpHIO->mWolf.mWlAttack.mWlAtCjump.m.mAttackRadius, mpHIO->mWolf.mWlAttack.mWlAtCjump.m.mAttackHeight);
|
||||
@@ -7271,7 +7274,7 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
|
||||
if (mProcVar0.field_0x3008 != 0) {
|
||||
var_f30 -= 10.0f;
|
||||
}
|
||||
|
||||
|
||||
if (var_f30 > 0.0f) {
|
||||
var_f29 = JMAFastSqrt((2.0f * var_f30) / -gravity);
|
||||
} else {
|
||||
@@ -7286,6 +7289,8 @@ int daAlink_c::procWolfJumpAttackInit(int param_0) {
|
||||
mNormalSpeed = attack_init_speed;
|
||||
speed.y = min_vertical_speed;
|
||||
}
|
||||
|
||||
(void)0;
|
||||
}
|
||||
} else {
|
||||
mNormalSpeed = attack_init_speed;
|
||||
@@ -7548,7 +7553,7 @@ int daAlink_c::procWolfJumpAttackNormalLand() {
|
||||
checkNextActionWolf(0);
|
||||
} else if (frameCtrl->getFrame() > mpHIO->mWolf.mWlAttack.mWlAtLand.m.mNormalLandingAnm.mCancelFrame) {
|
||||
if (mProcVar2.field_0x300c != 0) {
|
||||
shape_angle.y -= -0x8000;
|
||||
ANGLE_ADD_2(shape_angle.y, 0x8000);
|
||||
return procWolfJumpAttackInit(3);
|
||||
}
|
||||
|
||||
@@ -7565,7 +7570,7 @@ int daAlink_c::procWolfWaitAttackInit(int i_attackType) {
|
||||
/* 0x0 */ daAlink_c::daAlink_WANM m_anmID;
|
||||
/* 0x4 */ u8 m_cutType;
|
||||
}; // Size: 0x8
|
||||
|
||||
|
||||
static const daAlink_WCutParamTbl dataTabl[] = {
|
||||
{
|
||||
daAlink_c::WANM_ATTACK_B_LEFT,
|
||||
@@ -8105,7 +8110,7 @@ int daAlink_c::procWolfLockAttackTurn() {
|
||||
if (mWolfLockNum != 0) {
|
||||
s16 target_angle = cLib_targetAngleY(¤t.pos, &mWolfLockAcKeep[0].getActor()->eyePos);
|
||||
if (mProcVar2.field_0x300c != 0) {
|
||||
target_angle += 0x8000;
|
||||
ANGLE_ADD_2(target_angle, 0x8000);
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS(&shape_angle.y, target_angle, 2, 0x2000, 0x800);
|
||||
@@ -8135,7 +8140,7 @@ int daAlink_c::procWolfAttackReverseInit() {
|
||||
|
||||
mNormalSpeed = mpHIO->mWolf.mWlAttack.m.mJumpBackSpeedH;
|
||||
speed.y = mpHIO->mWolf.mWlAttack.m.mJumpBackSpeedV;
|
||||
current.angle.y += 0x8000;
|
||||
ANGLE_ADD_2(current.angle.y, 0x8000);
|
||||
|
||||
dComIfGp_getVibration().StartShock(5, 15, cXyz(0.0f, 1.0f, 0.0f));
|
||||
dKy_Sound_set(current.pos, 100, fopAcM_GetID(this), 5);
|
||||
@@ -8808,7 +8813,7 @@ int daAlink_c::procWolfChainReady() {
|
||||
shape_angle.y = cLib_targetAngleY(¤t.pos, &chain->getJumpAimPos());
|
||||
current.angle.y = shape_angle.y;
|
||||
mProcVar3.field_0x300e = 1;
|
||||
|
||||
|
||||
cXyz vec1 = chain->getJumpAimPos() - field_0x34e0;
|
||||
f32 dist_xz = vec1.absXZ();
|
||||
f32 dist = vec1.abs();
|
||||
@@ -8998,7 +9003,7 @@ int daAlink_c::procWolfDigInit() {
|
||||
|
||||
s16 var_r27 = fopAcM_searchActorAngleY(this, var_r29);
|
||||
if (abs((s16)(var_r27 - shape_angle.y)) > 0x4000) {
|
||||
var_r27 += 0x8000;
|
||||
ANGLE_ADD_2(var_r27, 0x8000);
|
||||
}
|
||||
|
||||
shape_angle.y = var_r27;
|
||||
@@ -9132,7 +9137,7 @@ int daAlink_c::procWolfDig() {
|
||||
((daObjDigpl_c*)dig_actor)->onDigFlg();
|
||||
field_0x280c.clearData();
|
||||
}
|
||||
|
||||
|
||||
if (frame_ctrl->getFrame() >= 11.0f) {
|
||||
if (frame_ctrl->getFrame() <= 41.0f) {
|
||||
if (mProcVar0.field_0x3008 == 0) {
|
||||
@@ -9153,6 +9158,8 @@ int daAlink_c::procWolfDig() {
|
||||
}
|
||||
|
||||
int daAlink_c::procWolfDigThroughInit(int param_0) {
|
||||
static const int dummy = 0;
|
||||
|
||||
static const u16 snowID[] = {
|
||||
dPa_RM(ID_ZI_S_DIGTHROUGHSNOW_A),
|
||||
dPa_RM(ID_ZI_S_DIGTHROUGHSNOW_B),
|
||||
|
||||
@@ -357,7 +357,7 @@ void daArrow_c::clearNearActorData() {
|
||||
s16 daArrow_c::getVibAngle() {
|
||||
s16 angle;
|
||||
if (cLib_calcTimer(&field_0x952)) {
|
||||
field_0x954 += (s16)(21243.0f - cM_rndF(4096.0f));
|
||||
ANGLE_ADD(field_0x954, 21243.0f - cM_rndF(4096.0f));
|
||||
|
||||
f32 f = field_0x952 * 0.02f;
|
||||
angle = f * 1024.0f * f * cM_ssin(field_0x954);
|
||||
|
||||
@@ -2091,9 +2091,9 @@ bool daB_DR_c::mFeintBreath() {
|
||||
field_0x718++;
|
||||
} else {
|
||||
if (field_0x756 > 0) {
|
||||
temp_r30 += (s16)(l_HIO.feint_angle * 0xB6);
|
||||
ANGLE_ADD(temp_r30, l_HIO.feint_angle * 0xB6);
|
||||
} else {
|
||||
temp_r30 -= (s16)(l_HIO.feint_angle * 0xB6);
|
||||
ANGLE_SUB(temp_r30, l_HIO.feint_angle * 0xB6);
|
||||
}
|
||||
|
||||
if (abs((s16)(current.angle.y - temp_r30)) > 0x100) {
|
||||
@@ -3327,7 +3327,8 @@ void daB_DR_c::executeBullet() {
|
||||
if (parentActorID != 0) {
|
||||
daB_DR_c* dr_p = (daB_DR_c*)fopAcM_SearchByID(fopAcM_GetLinkId(this));
|
||||
if (dr_p != NULL) {
|
||||
current.angle.y -= (s16)((s16)(dr_p->mHeadAngle.y - home.angle.y) * (0.002f + JREG_F(13)));
|
||||
ANGLE_SUB(current.angle.y,
|
||||
(s16)(dr_p->mHeadAngle.y - home.angle.y) * (0.002f + JREG_F(13)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3357,7 +3358,7 @@ void daB_DR_c::executeParts() {
|
||||
switch (mMoveMode) {
|
||||
case 0:
|
||||
speedF = 20.0f + ZREG_F(13) + cM_rndF(10.0f + ZREG_F(14));
|
||||
current.angle.y += (s16)cM_rndFX(65536.0f);
|
||||
ANGLE_ADD(current.angle.y, cM_rndFX(65536.0f));
|
||||
speed.y = 30.0f + ZREG_F(10);
|
||||
speed.y += cM_rndFX(10.0f + ZREG_F(11));
|
||||
|
||||
@@ -3396,11 +3397,11 @@ void daB_DR_c::executeParts() {
|
||||
case 10:
|
||||
speedF = 40.0f + ZREG_F(13) + cM_rndF(10.0f + ZREG_F(14));
|
||||
mTimer[0] = 50;
|
||||
current.angle.x += (s16)cM_rndFX(16384.0f);
|
||||
ANGLE_ADD(current.angle.x, cM_rndFX(16384.0f));
|
||||
|
||||
mae = camera->lookat.center - current.pos;
|
||||
current.angle.y = mae.atan2sX_Z();
|
||||
current.angle.y += (s16)cM_rndFX(16384.0f);
|
||||
ANGLE_ADD(current.angle.y, cM_rndFX(16384.0f));
|
||||
|
||||
cMtx_YrotS(*calc_mtx, current.angle.y);
|
||||
cMtx_XrotM(*calc_mtx, current.angle.x);
|
||||
@@ -4082,7 +4083,7 @@ int daB_DR_c::create() {
|
||||
gravity = -3.0f;
|
||||
|
||||
mSound.init(¤t.pos, &eyePos, 3, 1);
|
||||
mColliderStts.Init(0x19, NULL, this);
|
||||
mColliderStts.Init(0x19, 0, this);
|
||||
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ void daB_DS_c::mZsMoveChk() {
|
||||
}
|
||||
|
||||
angle_y = fopAcM_searchPlayerAngleY(this);
|
||||
angle_y += (s16)cM_rndFX(0x2000);
|
||||
ANGLE_ADD(angle_y, cM_rndFX(0x2000));
|
||||
}
|
||||
|
||||
if (!daPy_getPlayerActorClass()->checkSpinnerRide() || mAction == ACT_DAMAGE ||
|
||||
@@ -1044,7 +1044,7 @@ void daB_DS_c::neck_set() {
|
||||
angl.x = -mae.atan2sY_XZ() * 2.0f;
|
||||
if (mAction == ACT_BREATH_ATTACK) {
|
||||
angl.x = mBh2AttackAngleF;
|
||||
angl.x += (s16)(mBackboneLevel * 200);
|
||||
ANGLE_ADD(angl.x, mBackboneLevel * 200);
|
||||
}
|
||||
|
||||
if (angl.x > 0x2000) {
|
||||
@@ -5156,7 +5156,7 @@ int daB_DS_c::execute() {
|
||||
|
||||
if (!mIsOpeningDemo) {
|
||||
s16 hand_x_ang_target = -6000;
|
||||
hand_x_ang_target += (s16)(mBackboneLevel * 1000);
|
||||
ANGLE_ADD(hand_x_ang_target, mBackboneLevel * 1000);
|
||||
if (handX_ang > -4000) {
|
||||
handX_ang = -4000;
|
||||
}
|
||||
@@ -5178,7 +5178,7 @@ int daB_DS_c::execute() {
|
||||
}
|
||||
|
||||
if (jnt_pos.y < chk_pos.y) {
|
||||
handL_ang += (s16)(fabsf(jnt_pos.y - chk_pos.y) * 10.0f);
|
||||
ANGLE_ADD(handL_ang, fabsf(jnt_pos.y - chk_pos.y) * 10.0f);
|
||||
var_r25 = true;
|
||||
|
||||
if (field_0x84d & 1) {
|
||||
@@ -5201,7 +5201,7 @@ int daB_DS_c::execute() {
|
||||
}
|
||||
|
||||
if (jnt_pos.y < chk_pos.y) {
|
||||
handR_ang += (s16)(fabsf(jnt_pos.y - chk_pos.y) * 10.0f);
|
||||
ANGLE_ADD(handR_ang, fabsf(jnt_pos.y - chk_pos.y) * 10.0f);
|
||||
var_r25 = true;
|
||||
if (field_0x84d & 2) {
|
||||
if ((int)mpMorf->getFrame() >= 34 && (int)mpMorf->getFrame() < 41) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
class daB_GG_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -2905,7 +2906,7 @@ void daB_GG_c::G_DamageAction() {
|
||||
speedF = 0.0f;
|
||||
}
|
||||
|
||||
s_TargetAngle += (s16) 0x4000;
|
||||
ANGLE_ADD(s_TargetAngle, 0x4000);
|
||||
break;
|
||||
case 2:
|
||||
cXyz* tg_hit_pos;
|
||||
@@ -3789,7 +3790,7 @@ void daB_GG_c::At_Check() {
|
||||
mAtInfo.mAttackPower = 80;
|
||||
}
|
||||
|
||||
health -= (s16)mAtInfo.mAttackPower;
|
||||
S16_SUB(health, mAtInfo.mAttackPower);
|
||||
}
|
||||
|
||||
int pause_time;
|
||||
|
||||
@@ -865,7 +865,7 @@ static void b_gnd_h_run_a(b_gnd_class* i_this) {
|
||||
i_this->field_0xc92 = cM_rndF(600.0f) + 300.0f;
|
||||
}
|
||||
|
||||
i_this->field_0x5cc += (s16)(var_f30 * cM_ssin(i_this->field_0xc90));
|
||||
ANGLE_ADD(i_this->field_0x5cc, var_f30 * cM_ssin(i_this->field_0xc90));
|
||||
}
|
||||
|
||||
if (i_this->field_0xc72 != 0) {
|
||||
|
||||
@@ -251,8 +251,8 @@ static u8 body_front_sph[15] = {
|
||||
} // namespace
|
||||
|
||||
int daB_MGN_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
u16 jntNo = i_joint->getJntNo();
|
||||
int jointNo = jntNo;
|
||||
J3DJoint* joint = i_joint;
|
||||
int jointNo = joint->getJntNo();
|
||||
mDoMtx_stack_c::copy(i_model->getAnmMtx(jointNo));
|
||||
|
||||
if (jointNo == JNT_BACKBONE1) {
|
||||
@@ -840,9 +840,9 @@ void daB_MGN_c::checkDownBeforeBG() {
|
||||
s16 var_r28 = (s16)cM_atan2s(var_r29->x, var_r29->z);
|
||||
if (abs((s16)(var_r28 - shape_angle.y)) > 0x5000) {
|
||||
if ((s16)(var_r28 - shape_angle.y) != 0) {
|
||||
field_0xa92 -= (s16)0x300;
|
||||
ANGLE_SUB(field_0xa92, 0x300);
|
||||
} else {
|
||||
field_0xa92 += (s16)0x300;
|
||||
ANGLE_ADD(field_0xa92, 0x300);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1546,9 +1546,9 @@ void daB_MGN_c::executeDash() {
|
||||
}
|
||||
|
||||
if ((s16)(mAcchCir.GetWallAngleY() - shape_angle.y) < 0) {
|
||||
shape_angle.y += (s16) 0x100;
|
||||
ANGLE_ADD(shape_angle.y, 0x100);
|
||||
} else {
|
||||
shape_angle.y += (s16) -0x100;
|
||||
ANGLE_ADD(shape_angle.y, -0x100);
|
||||
}
|
||||
|
||||
current.angle.y = shape_angle.y;
|
||||
@@ -2488,6 +2488,7 @@ void daB_MGN_c::executeFall() {
|
||||
}
|
||||
|
||||
void daB_MGN_c::demo_skip(int param_1) {
|
||||
UNUSED(param_1);
|
||||
camera_class* camera = dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0));
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
mBlurRate = 0.0f;
|
||||
|
||||
@@ -256,7 +256,7 @@ static void attack(b_oh_class* i_this) {
|
||||
cLib_addCalcAngleS2(&i_this->field_0xca4, var3, 1, 500);
|
||||
|
||||
if (i_this->mTimers[1] == 0 || i_this->mTimers[1] > 10) {
|
||||
i_this->current.angle.y += (s16)(i_this->field_0xc88 * 300);
|
||||
ANGLE_ADD(i_this->current.angle.y, i_this->field_0xc88 * 300);
|
||||
}
|
||||
|
||||
if (i_this->mActionPhase == 2) {
|
||||
@@ -511,10 +511,10 @@ static void action(b_oh_class* i_this) {
|
||||
(-a_this->field_0x614 - a_this->field_0x60c) + cM_ssin(a_this->field_0x5cc * 200) * 100.0f;
|
||||
a_this->field_0x604 = ((100.0f - a_this->field_0x614) - a_this->field_0x60c) +
|
||||
cM_ssin(a_this->field_0x5cc * 200) * 100.0f;
|
||||
a_this->field_0x5f8 += (s16)a_this->field_0x600;
|
||||
a_this->field_0x5fa += (s16)a_this->field_0x604;
|
||||
ANGLE_ADD(a_this->field_0x5f8, a_this->field_0x600);
|
||||
ANGLE_ADD(a_this->field_0x5fa, a_this->field_0x604);
|
||||
a_this->field_0x5fc = a_this->field_0x60c + 2000.0f;
|
||||
a_this->field_0x5f6 += (s16)a_this->field_0x5fc;
|
||||
ANGLE_ADD(a_this->field_0x5f6, a_this->field_0x5fc);
|
||||
|
||||
cLib_addCalc0(&a_this->field_0x60c, 0.1f, 50.0f);
|
||||
cLib_addCalc2(&a_this->field_0x610, 0.2f, 0.1f, 0.01f);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "d/actor/d_a_b_tn.h"
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_boomerang.h"
|
||||
#include "d/actor/d_a_nbomb.h"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
class daB_YO_HIO_c {
|
||||
public:
|
||||
@@ -1334,7 +1335,7 @@ void daB_YO_c::calcFreeMove(f32 param_0) {
|
||||
}
|
||||
|
||||
void daB_YO_c::setReflectAngle() {
|
||||
current.angle.y += (s16)cM_rndFX(4000.0f);
|
||||
ANGLE_ADD(current.angle.y, cM_rndFX(4000.0f));
|
||||
s16 angle_diff = current.angle.y - mWallAngle;
|
||||
if (abs(angle_diff) > 0x4800) {
|
||||
current.angle.y = mWallAngle * 2 - (current.angle.y + 0x8000);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "d/d_pane_class.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include <cstring>
|
||||
|
||||
class daBalloon2D_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
||||
#include <cstring>
|
||||
|
||||
const char* daBg_c::setArcName() {
|
||||
static char arcName[32];
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
#include "d/actor/d_a_bg_obj.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include <cstdio>
|
||||
#include <dolphin/os.h>
|
||||
#include <os.h>
|
||||
#include <cstring>
|
||||
#include "d/actor/d_a_set_bgobj.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
|
||||
@@ -918,8 +918,8 @@ int daBoomerang_c::procWait() {
|
||||
} else {
|
||||
offStateFlg0(FLG0_10);
|
||||
}
|
||||
|
||||
current.angle.y += (s16)0x1830;
|
||||
|
||||
ANGLE_ADD(current.angle.y, 0x1830);
|
||||
shape_angle.x = current.angle.x;
|
||||
shape_angle.y = current.angle.y;
|
||||
shape_angle.z = 0x1000;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if DEBUG
|
||||
static BOOL l_debugMode;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include <cstring>
|
||||
|
||||
class daCoach2D_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
|
||||
@@ -113,11 +113,11 @@ int daCoachFire_c::execute() {
|
||||
dAttention_c* attn = dComIfGp_getAttention();
|
||||
if (attn->LockonTruth()) {
|
||||
if (attn->LockonTarget(0) != this) {
|
||||
if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) {
|
||||
if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) {
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
} else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) {
|
||||
} else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) {
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_timer.h"
|
||||
#include <dolphin/types.h>
|
||||
#include <types.h>
|
||||
#include <cstring>
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
@@ -1237,16 +1238,16 @@ void daCow_c::action_run() {
|
||||
|
||||
switch (mAction) {
|
||||
case daCow_c::Action_NadeNade:
|
||||
SUB_ANGLE_2(targetAngle, 0x1000);
|
||||
ANGLE_SUB_2(targetAngle, 0x1000);
|
||||
break;
|
||||
case daCow_c::Action_Cry:
|
||||
ADD_ANGLE_2(targetAngle, 0x1000);
|
||||
ANGLE_ADD_2(targetAngle, 0x1000);
|
||||
break;
|
||||
case daCow_c::Action_3:
|
||||
SUB_ANGLE_2(targetAngle, 0x4000);
|
||||
ANGLE_SUB_2(targetAngle, 0x4000);
|
||||
break;
|
||||
case daCow_c::Action_4:
|
||||
ADD_ANGLE_2(targetAngle, 0x4000);
|
||||
ANGLE_ADD_2(targetAngle, 0x4000);
|
||||
break;
|
||||
case daCow_c::Action_Wait:
|
||||
s16 cowshedAngle = getCowshedAngle();
|
||||
@@ -2174,11 +2175,11 @@ void daCow_c::executeCrazyThrow() {
|
||||
|
||||
if (mAction != daCow_c::Action_Wait) {
|
||||
setBck(daCow_c::Animation_DownR, J3DFrameCtrl::EMode_LOOP, 0.0f, 1.0f);
|
||||
mSavedAngle.y -= (s16)0x7000;
|
||||
ANGLE_SUB(mSavedAngle.y, 0x7000);
|
||||
mThrowIntensity = -1000;
|
||||
} else {
|
||||
setBck(daCow_c::Animation_DownL, J3DFrameCtrl::EMode_LOOP, 0.0f, 1.0f);
|
||||
mSavedAngle.y += (s16)0x7000;
|
||||
ANGLE_ADD(mSavedAngle.y, 0x7000);
|
||||
mThrowIntensity = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_crod.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include <cstring>
|
||||
|
||||
enum daCstaF_Action {
|
||||
ACTION_WAIT,
|
||||
@@ -584,7 +585,7 @@ actor_process_profile_definition g_profile_CSTAF = {
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_CSTAF, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
0x00000B38, // mSize
|
||||
sizeof(daCstaF_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
|
||||
@@ -1043,7 +1043,7 @@ void daCstatue_c::initStartBrkBtk() {
|
||||
for (int iParticle = 0; iParticle < 2; iParticle++) {
|
||||
dComIfGp_particle_set(0x88bb, &mBallPos, &angle, NULL);
|
||||
dComIfGp_particle_set(0x88bc, &mBallPos, &angle, NULL);
|
||||
ADD_ANGLE_2(angle.y, 0x8000);
|
||||
ANGLE_ADD_2(angle.y, 0x8000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1220,7 +1220,7 @@ actor_process_profile_definition g_profile_CSTATUE = {
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_CSTATUE, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
0x00000B2C, // mSize
|
||||
sizeof(daCstatue_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "d/actor/d_a_movie_player.h"
|
||||
#if DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
struct UnknownLightData {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
static cXyz l_player_offset = cXyz(0.0f, 115.0f, 54.0f);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "d/d_a_item_static.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
static bool noFallCheck;
|
||||
static bool hio_set;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
static char* l_stageName[20] = {
|
||||
"D_MN05",
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
u32 knob_param_c::getDoorModel(fopAc_ac_c* i_this) {
|
||||
return fopAcM_GetParamBit(i_this, 5, 3);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "d/d_map_path_dmap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
char* daDoor20_c::getStopBmdName() {
|
||||
switch (door_param2_c::getKind(this)) {
|
||||
@@ -305,7 +306,7 @@ int daDoor20_c::checkOpenMsgDoor(int* param_1) {
|
||||
*param_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
field_0x624.init(NULL, msgNo, NULL, NULL);
|
||||
field_0x624.init(NULL, msgNo, 0, NULL);
|
||||
int rv = field_0x624.checkOpenDoor(this, param_1);
|
||||
dMsgObject_endFlowGroup();
|
||||
return rv;
|
||||
@@ -1379,7 +1380,7 @@ int daDoor20_c::createKey() {
|
||||
}
|
||||
field_0x5ec =
|
||||
fopAcM_createChildFromOffset(PROC_Obj_Lv5Key, fopAcM_GetID(this), 0xffffffff,
|
||||
&cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0);
|
||||
&cStack_28, roomNo, &cStack_30, &scale, -1, 0);
|
||||
break;
|
||||
default:
|
||||
OSReport_Error("シャッタードア:鍵タイプが不明です\n"); // Shutter door: key type unknown
|
||||
@@ -1398,7 +1399,7 @@ int daDoor20_c::createKey() {
|
||||
}
|
||||
field_0x5ec =
|
||||
fopAcM_createChildFromOffset(PROC_OBJ_KEYHOLE, fopAcM_GetID(this), 0xffffffff,
|
||||
&cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0);
|
||||
&cStack_28, roomNo, &cStack_30, &scale, -1, 0);
|
||||
}
|
||||
|
||||
current.pos = prevPos;
|
||||
|
||||
@@ -418,7 +418,7 @@ void daSpiral_c::initProc(int param_0) {
|
||||
void daSpiral_c::initOpenDemo(int param_0) {
|
||||
shape_angle.y = current.angle.y;
|
||||
if (field_0x62c == 1) {
|
||||
shape_angle.y += (s16)0x7FFF;
|
||||
ANGLE_ADD(shape_angle.y, 0x7FFF);
|
||||
}
|
||||
|
||||
mStaffId = dComIfGp_evmng_getMyStaffId("SHUTTER_DOOR", NULL, 0);
|
||||
@@ -559,7 +559,7 @@ int daSpiral_c::actionWait() {
|
||||
fopAc_ac_c* door = dComIfGp_event_getDoorPartner();
|
||||
if (door == this) {
|
||||
shape_angle.y = current.angle.y;
|
||||
shape_angle.y += (s16)0x7FFF;
|
||||
ANGLE_ADD(shape_angle.y, 0x7FFF);
|
||||
mStaffId = dComIfGp_evmng_getMyStaffId("PARTNER_DOOR", NULL, 0);
|
||||
setAction(daSpiral_ACT_DEMO_e);
|
||||
eventInfo.setEventId(mEventIds[mDemoMode]);
|
||||
@@ -573,7 +573,7 @@ int daSpiral_c::actionWait() {
|
||||
mStaffId = dComIfGp_evmng_getMyStaffId("SHUTTER_DOOR", NULL, 0);
|
||||
shape_angle.y = current.angle.y;
|
||||
if (field_0x62c == 1) {
|
||||
shape_angle.y += (s16)0x7FFF;
|
||||
ANGLE_ADD(shape_angle.y, 0x7FFF);
|
||||
}
|
||||
setAction(daSpiral_ACT_DEMO_e);
|
||||
demoProc();
|
||||
@@ -667,10 +667,10 @@ void daSpiral_c::setNextSpiral() {
|
||||
s16 pl_angle = (s16)door->current.angle.y;
|
||||
if (mType == daSpiral_TYPE_DOWN_e) {
|
||||
pl_pos = l_spiral_path_point_u[0];
|
||||
pl_angle += (s16)0x4000;
|
||||
ANGLE_ADD(pl_angle, 0x4000);
|
||||
} else {
|
||||
pl_pos = l_spiral_path_point_d[0];
|
||||
pl_angle -= (s16)0x4000;
|
||||
ANGLE_SUB(pl_angle, 0x4000);
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::transS(door->current.pos.x, door->current.pos.y, door->current.pos.z);
|
||||
@@ -829,7 +829,7 @@ void daSpiral_c::debugDraw() {
|
||||
|
||||
s16 var_r25 = current.angle.y;
|
||||
if (field_0x62c == 1) {
|
||||
var_r25 += (s16)0x7FFF;
|
||||
ANGLE_ADD(var_r25, 0x7FFF);
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::YrotS(var_r25);
|
||||
@@ -1083,7 +1083,7 @@ void dSpiral_stop_c::calcMtx(daSpiral_c* i_spiral) {
|
||||
|
||||
s16 angle = i_spiral->current.angle.y;
|
||||
if (field_0x72 == 1) {
|
||||
angle += (s16)0x7FFF;
|
||||
ANGLE_ADD(angle, 0x7FFF);
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::transS(pos.x, pos.y, pos.z);
|
||||
|
||||
@@ -200,10 +200,10 @@ static void hit_check(e_arrow_class* i_this) {
|
||||
i_this->speedF *= 0.3f;
|
||||
|
||||
if (i_this->mCcTgSph.ChkTgHit()) {
|
||||
i_this->current.angle.y += (s16)(cM_rndFX(8000.0f) + 32768.0f);
|
||||
ANGLE_ADD(i_this->current.angle.y, cM_rndFX(8000.0f) + 32768.0f);
|
||||
i_this->mSound.startSound(Z2SE_COL_FLIP_ARROW, 0, -1);
|
||||
} else {
|
||||
i_this->current.angle.y += (s16)(cM_rndFX(4000.0f) + 32768.0f);
|
||||
ANGLE_ADD(i_this->current.angle.y, cM_rndFX(4000.0f) + 32768.0f);
|
||||
}
|
||||
|
||||
dKy_Sound_set(i_this->current.pos, 3, fopAcM_GetID(i_this), 10);
|
||||
@@ -330,7 +330,7 @@ static void e_arrow_spin(e_arrow_class* i_this) {
|
||||
}
|
||||
|
||||
static void* s_limit_sub(void* i_actor, void* i_data) {
|
||||
if (fopAcM_IsActor(i_actor) != NULL && i_actor != i_data &&
|
||||
if (fopAcM_IsActor(i_actor) != FALSE && i_actor != i_data &&
|
||||
fopAcM_GetName(i_actor) == PROC_E_ARROW &&
|
||||
static_cast<e_arrow_class*>(i_actor)->mAction == ACTION_ARROW_FIRE &&
|
||||
fabsf(static_cast<e_arrow_class*>(i_actor)->field_0xa00.z -
|
||||
@@ -470,7 +470,7 @@ static void e_arrow_demo_bound(e_arrow_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->field_0xa0c > 0) {
|
||||
a_this->shape_angle.x += (s16)i_this->field_0xa10;
|
||||
ANGLE_ADD(a_this->shape_angle.x, i_this->field_0xa10);
|
||||
|
||||
if (a_this->shape_angle.x > i_this->field_0xa0c ||
|
||||
a_this->shape_angle.x < (s16)-i_this->field_0xa0c)
|
||||
|
||||
@@ -497,7 +497,7 @@ static void bee_control(e_bee_class* i_this) {
|
||||
} else {
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
if (cc_pl_cut_bit_get() == 0x80) {
|
||||
i_this->mBoomerangAngle += (s16)0x1400;
|
||||
ANGLE_ADD(i_this->mBoomerangAngle, 0x1400);
|
||||
vec1.z = 150.0f + TREG_F(15);
|
||||
} else {
|
||||
vec1.z = 100.0f + TREG_F(12);
|
||||
|
||||
@@ -44,7 +44,7 @@ void daE_BG_HIO_c::genMessage(JORMContext* ctx) {
|
||||
namespace {
|
||||
dCcD_SrcSph cc_bg_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x03}, 0x75}}, // mObj
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x03}, 0x75}}, // mObj
|
||||
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
@@ -93,7 +93,7 @@ int daE_BG_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
}
|
||||
|
||||
int daE_BG_c::JointCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == NULL) {
|
||||
if (param_1 == 0) {
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daE_BG_c* bg = (daE_BG_c*)model->getUserArea();
|
||||
if (bg != NULL) {
|
||||
@@ -1227,11 +1227,11 @@ int daE_BG_c::execute() {
|
||||
mIsBomb = true;
|
||||
|
||||
if (field_0x694 < 30) {
|
||||
field_0x698 += (s16)0x1000;
|
||||
ANGLE_ADD(field_0x698, 0x1000);
|
||||
} else if (field_0x694 < 45) {
|
||||
field_0x698 += (s16)0x800;
|
||||
ANGLE_ADD(field_0x698, 0x800);
|
||||
} else {
|
||||
field_0x698 += (s16)0x300;
|
||||
ANGLE_ADD(field_0x698, 0x300);
|
||||
}
|
||||
|
||||
if (field_0x694 == 0) {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/actor/d_a_obj_fw.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_BI_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -373,13 +374,13 @@ static void e_bi_ex(e_bi_class* i_this) {
|
||||
if (i_this->ignition_time != 0) {
|
||||
i_this->ignition_time--;
|
||||
i_this->sound.startCreatureSoundLevel(Z2SE_OBJ_BOMB_IGNITION, 0, -1);
|
||||
i_this->field_0x696 += (s16) 0x1100;
|
||||
ANGLE_ADD(i_this->field_0x696, 0x1100);
|
||||
|
||||
if (i_this->ignition_time < 45) {
|
||||
i_this->field_0x696 += (s16) 0x1100;
|
||||
ANGLE_ADD(i_this->field_0x696, 0x1100);
|
||||
|
||||
if (i_this->ignition_time < 30) {
|
||||
i_this->field_0x696 += (s16) 0x1100;
|
||||
ANGLE_ADD(i_this->field_0x696, 0x1100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ static s8 e_bu_head(e_bu_class* i_this) {
|
||||
actor->speedF *= 0.5f;
|
||||
actor->speed.y = 30.0f;
|
||||
i_this->mode = 2;
|
||||
i_this->head_rot_y += (s16)cM_rndFX(10000.0f);
|
||||
ANGLE_ADD(i_this->head_rot_y, cM_rndFX(10000.0f));
|
||||
|
||||
if (cM_rndF(1.0f) < 0.5f) {
|
||||
i_this->field_0x6bc = 0x4000;
|
||||
@@ -641,7 +641,7 @@ static s8 e_bu_head(e_bu_class* i_this) {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
i_this->head_rot_x += (s16)(actor->speedF * (400.0f + AREG_F(1)));
|
||||
ANGLE_ADD(i_this->head_rot_x, actor->speedF * (400.0f + AREG_F(1)));
|
||||
|
||||
if (!i_this->acch.ChkGroundHit()) {
|
||||
break;
|
||||
@@ -650,7 +650,7 @@ static s8 e_bu_head(e_bu_class* i_this) {
|
||||
i_this->mode = 3;
|
||||
actor->speed.y = 20.0f;
|
||||
case 3:
|
||||
i_this->head_rot_x += (s16)(actor->speedF * (400.0f + AREG_F(1)));
|
||||
ANGLE_ADD(i_this->head_rot_x, actor->speedF * (400.0f + AREG_F(1)));
|
||||
i_this->head_rot_y += i_this->field_0x6b8;
|
||||
|
||||
cLib_addCalc2(&actor->speedF, 10.0f, 1.0f, 2.0f + TREG_F(16));
|
||||
@@ -705,7 +705,7 @@ static s8 e_bu_head(e_bu_class* i_this) {
|
||||
i_this->mode = 0;
|
||||
anm_init(i_this, 7, 10.0f, 2, 1.0f + cM_rndF(0.1f));
|
||||
} else {
|
||||
actor->current.angle.y += (s16)cM_rndFX(8000.0f);
|
||||
ANGLE_ADD(actor->current.angle.y, cM_rndFX(8000.0f));
|
||||
i_this->mode = 11;
|
||||
actor->speed.y = JREG_F(7) + (20.0f + cM_rndF(10.0f));
|
||||
actor->speedF = 10.0f + cM_rndF(10.0f);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "d/d_path.h"
|
||||
#include "d/actor/d_a_nbomb.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
enum E_bug_RES_File_ID {
|
||||
/* BMDG */
|
||||
@@ -517,7 +518,7 @@ static void normal_move(e_bug_class* a_this, bug_s* i_this) {
|
||||
cLib_addCalcAngleS2(&i_this->field_0x3c.y, i_this->field_0x42 + (sVar1 + cM_atan2s(sp74.x, sp74.z)), 2, 0x800);
|
||||
i_this->field_0x3c.x = 0;
|
||||
} else {
|
||||
i_this->field_0x3c.x += (s16)((i_this->field_0x8 << 1) + 0xE00);
|
||||
ANGLE_ADD(i_this->field_0x3c.x, (i_this->field_0x8 << 1) + 0xE00);
|
||||
}
|
||||
|
||||
i_this->field_0x30.x = i_this->field_0x24 * cM_ssin(i_this->field_0x3c.y);
|
||||
|
||||
@@ -29,7 +29,7 @@ static void e_cr_egg_move(e_cr_egg_class* a_this) {
|
||||
a_this->mode = 1;
|
||||
a_this->timers[0] = 150;
|
||||
actor->speedF = 5.0f + cM_rndF(3.0f);
|
||||
actor->current.angle.y += (int)cM_rndFX(10000.0f);
|
||||
actor->current.angle.y += (s16)cM_rndFX(10000.0f);
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
@@ -43,7 +43,7 @@ static void e_cr_egg_move(e_cr_egg_class* a_this) {
|
||||
if (a_this->mode < 4) {
|
||||
static f32 spy[] = {17.0f, 8.0f, 5.0f};
|
||||
actor->speed.y = spy[a_this->mode - 1];
|
||||
actor->current.angle.y += (int)cM_rndFX(8000.0f);
|
||||
actor->current.angle.y += (s16)cM_rndFX(8000.0f);
|
||||
|
||||
int sp28[3] = {40, 20, 10};
|
||||
Z2GetAudioMgr()->seStart(Z2SE_EN_CR_EGG_BOUND, &actor->current.pos, sp28[a_this->mode], 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
@@ -79,7 +79,7 @@ static void action(e_cr_egg_class* a_this) {
|
||||
break;
|
||||
}
|
||||
|
||||
actor->current.angle.x += (int)(actor->speedF * (700.0f + TREG_F(9)));
|
||||
actor->current.angle.x += (s16)(actor->speedF * (700.0f + TREG_F(9)));
|
||||
|
||||
cMtx_YrotS(*calc_mtx, actor->current.angle.y);
|
||||
mae.x = 0.0f;
|
||||
@@ -140,7 +140,7 @@ static int daE_CR_EGG_IsDelete(e_cr_egg_class* a_this) {
|
||||
static int daE_CR_EGG_Delete(e_cr_egg_class* a_this) {
|
||||
fopAc_ac_c* actor = &a_this->enemy;
|
||||
|
||||
fopAcM_RegisterDeleteID(actor, "E_CR_EGG");
|
||||
fopAcM_RegisterDeleteID(a_this, "E_CR_EGG");
|
||||
dComIfG_resDelete(&a_this->phase, "E_CR");
|
||||
a_this->sound.stopAnime();
|
||||
return 1;
|
||||
|
||||
@@ -659,7 +659,7 @@ int daE_DF_c::Create() {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == NULL) {
|
||||
if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == false) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ enum E_DK_RES_FILE_ID {
|
||||
namespace {
|
||||
static dCcD_SrcSph cc_dk_src = {
|
||||
{ // mObjInf
|
||||
{ 0x0, { { 0, 0, { 0 } }, { (s32)0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
|
||||
{ 0x0, { { 0, 0, { 0 } }, { 0xd8fbbddf, { 3 } }, { { 0x75 } } } }, // mObj
|
||||
{ 0x09, 0, 0, 0, { 0 } }, // mGObjAt
|
||||
{ 0x00, 0x00, 0x00, 0x00, { 5 } }, // mGObjTg
|
||||
{ { 0 } }, // mGObjCo
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_DN_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -874,7 +875,7 @@ static void e_dn_normal(e_dn_class* i_this) {
|
||||
/* Calculate how much the actor turned */
|
||||
angle -= actor->current.angle.y;
|
||||
/* Scale turn strength */
|
||||
angle *= (s16)(YREG_S(5) + 2);
|
||||
ANGLE_MULT(angle, YREG_S(5) + 2);
|
||||
|
||||
/* Ensure the targeted angle is no more than ±22.5° */
|
||||
s16 max_turn = YREG_S(6) + 0x1000;
|
||||
@@ -957,7 +958,7 @@ static void e_dn_wolfbite(e_dn_class* i_this) {
|
||||
anm_init(i_this, ANM_HANGED, 3.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
i_this->mode = 1;
|
||||
i_this->sound.startCreatureVoice(Z2SE_EN_DN_V_DRAWBACK, -1);
|
||||
actor->health -= (s16)10;
|
||||
S16_SUB(actor->health, 10);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
@@ -977,7 +978,7 @@ static void e_dn_wolfbite(e_dn_class* i_this) {
|
||||
if (actor->health <= 0 || actor->checkWolfBiteDamage()) {
|
||||
actor->offWolfBiteDamage();
|
||||
anm_init(i_this, ANM_HANGED_DAMAGE, 2.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
actor->health -= (s16)10;
|
||||
S16_SUB(actor->health, 10);
|
||||
if (actor->health <= 0) {
|
||||
player->offWolfEnemyHangBite();
|
||||
i_this->field_0x750 = (actor->shape_angle.y - 0x8000) - player->shape_angle.y;
|
||||
@@ -1167,7 +1168,7 @@ static void e_dn_fight_run(e_dn_class* i_this) {
|
||||
sVar1 -= actor->shape_angle.y;
|
||||
}
|
||||
|
||||
sVar1 *= (s16)(YREG_S(5) + 2);
|
||||
ANGLE_MULT(sVar1, YREG_S(5) + 2);
|
||||
s16 sVar4 = YREG_S(6) + 0x1000;
|
||||
if (sVar1 > sVar4) {
|
||||
sVar1 = sVar4;
|
||||
@@ -1505,7 +1506,7 @@ static void e_dn_attack(e_dn_class* i_this) {
|
||||
sVar1 = actor->current.angle.y;
|
||||
cLib_addCalcAngleS2(&actor->current.angle.y, i_this->search_angle_y, 2, 0x800);
|
||||
sVar1 -= actor->current.angle.y;
|
||||
sVar1 *= (s16)(YREG_S(5) + 2);
|
||||
ANGLE_MULT(sVar1, YREG_S(5) + 2);
|
||||
s16 sVar3 = YREG_S(6) + 0x1000;
|
||||
if (sVar1 > sVar3) {
|
||||
sVar1 = sVar3;
|
||||
@@ -1950,7 +1951,7 @@ static void e_dn_damage(e_dn_class* i_this) {
|
||||
case 3:
|
||||
if (body_gake(i_this)) {
|
||||
i_this->field_0x704 = VREG_F(8) + -20.0f;
|
||||
i_this->field_0x724.x -= (s16)(VREG_S(7) + 0x300);
|
||||
ANGLE_SUB(i_this->field_0x724.x, VREG_S(7) + 0x300);
|
||||
}
|
||||
|
||||
if (actor->health <= 0 && i_this->timer[1] == 0) {
|
||||
|
||||
+12
-12
@@ -22,10 +22,10 @@ daE_FB_HIO_c::daE_FB_HIO_c() {
|
||||
maximum_rotation_width = 0x300;
|
||||
minimum_turning_range = 0x10;
|
||||
rotation_width_stairs = 120;
|
||||
color_register_1r = 0x87;
|
||||
color_register_1g = 0x96;
|
||||
color_register_1b = 0x91;
|
||||
color_register_1a = 0xB6;
|
||||
color_register_1r = 135;
|
||||
color_register_1g = 150;
|
||||
color_register_1b = 145;
|
||||
color_register_1a = 182;
|
||||
maximum_rotation_width_2 = 120;
|
||||
}
|
||||
|
||||
@@ -159,18 +159,18 @@ int daE_FB_c::draw() {
|
||||
cStack_44.set(player->current.pos);
|
||||
cStack_44.y += 100.0f;
|
||||
GXColor local_48;
|
||||
local_48.r = 0x82;
|
||||
local_48.g = 0xff;
|
||||
local_48.b = 0x82;
|
||||
local_48.a = 0xfa;
|
||||
local_48.r = 130;
|
||||
local_48.g = 255;
|
||||
local_48.b = 130;
|
||||
local_48.a = 250;
|
||||
dDbVw_drawLineXlu(attention_info.position, cStack_44, local_48, 1, 0xc);
|
||||
}
|
||||
#endif
|
||||
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
mShadowKey =
|
||||
dComIfGd_setShadow(mShadowKey, 1, model, &my_vec, BREG_F(19) + 1300.0f, 0.0f, current.pos.y,
|
||||
mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr, 0, 1.0f, tex_obj);
|
||||
mObjAcch.GetGroundH(), mObjAcch.m_gnd, &tevStr, 0, 1.0f,
|
||||
dDlst_shadowControl_c::getSimpleTex());
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -293,14 +293,14 @@ bool daE_FB_c::search_check() {
|
||||
if (fopAcM_searchPlayerDistance(this) <= l_HIO.player_detection_range) {
|
||||
if (!field_0x69c) {
|
||||
mRotation = fopAcM_searchPlayerAngleY(this);
|
||||
field_0x69c = 0x1E;
|
||||
field_0x69c = 30;
|
||||
field_0x696 = 0;
|
||||
}
|
||||
|
||||
retval = true;
|
||||
} else if (mActionMode != 1 && !field_0x69c) {
|
||||
mRotation = home.angle.y;
|
||||
field_0x69c = 0x1E;
|
||||
field_0x69c = 30;
|
||||
field_0x696 = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -613,7 +613,7 @@ void daE_FK_c::At_Check(int i_sphIdx) {
|
||||
}
|
||||
|
||||
if ((s16)mAtInfo.mAttackPower > 0) {
|
||||
health -= (s16)mAtInfo.mAttackPower;
|
||||
S16_SUB(health, mAtInfo.mAttackPower);
|
||||
}
|
||||
|
||||
int unk_r29 = 0;
|
||||
|
||||
@@ -2756,7 +2756,7 @@ static void action(e_fm_class* i_this) {
|
||||
|
||||
for (int i = 0; i < create_num; i++) {
|
||||
fopAcM_createChild(PROC_E_BA, fopAcM_GetID(actor), 0xFFFF1F02, &actor->eyePos, fopAcM_GetRoomNo(actor), &rot, NULL, -1, NULL);
|
||||
rot.y += (s16)(0x10000 / create_num);
|
||||
ANGLE_ADD(rot.y, 0x10000 / create_num);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_Fs_HIO_c {
|
||||
public:
|
||||
|
||||
+196
-191
@@ -13,6 +13,7 @@
|
||||
#include "d/actor/d_a_obj_smallkey.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
enum Head_Action {
|
||||
/* 0x0 */ HEAD_ACTION_WAIT,
|
||||
@@ -393,35 +394,38 @@ static void e_gb_damage(e_gb_class* i_this) {
|
||||
|
||||
i_this->invulnerabilityTimer = 35;
|
||||
switch (i_this->mode) {
|
||||
case 0:
|
||||
i_this->mode = 1;
|
||||
if ((s16)(i_this->angleYTarget - actor->current.angle.y) < 0) {
|
||||
actor->current.angle.y += (s16)(KREG_S(6) + 0x2000);
|
||||
} else {
|
||||
actor->current.angle.y -= (s16)(KREG_S(6) + 0x2000);
|
||||
}
|
||||
case 0: {
|
||||
i_this->mode = 1;
|
||||
s16 angleDiff = i_this->angleYTarget - actor->current.angle.y;
|
||||
if (angleDiff < 0) {
|
||||
ANGLE_ADD(actor->current.angle.y, KREG_S(6) + 0x2000);
|
||||
} else {
|
||||
ANGLE_SUB(actor->current.angle.y, KREG_S(6) + 0x2000);
|
||||
}
|
||||
|
||||
cMtx_YrotS(*calc_mtx, actor->current.angle.y);
|
||||
work.x = 0.0f;
|
||||
work.y = AREG_F(2) + 50.0f;
|
||||
work.z = AREG_F(1) + 800.0f;
|
||||
MtxPosition(&work, &i_this->currentPosTarget);
|
||||
i_this->currentPosTarget += actor->home.pos;
|
||||
actor->speed.x = fabsf(actor->current.pos.x - i_this->currentPosTarget.x) * 0.2f;
|
||||
actor->speed.y = fabsf(actor->current.pos.y - i_this->currentPosTarget.y) * 0.2f;
|
||||
actor->speed.z = fabsf(actor->current.pos.z - i_this->currentPosTarget.z) * 0.2f;
|
||||
i_this->timer[0] = KREG_S(7) + 15;
|
||||
// fallthrough
|
||||
case 1:
|
||||
if (i_this->timer[0] == 0) {
|
||||
if (actor->health <= 0) {
|
||||
i_this->headAction = HEAD_ACTION_END;
|
||||
i_this->mode = 0;
|
||||
} else {
|
||||
i_this->headAction = HEAD_ACTION_WAIT;
|
||||
i_this->mode = -2;
|
||||
}
|
||||
cMtx_YrotS(*calc_mtx, actor->current.angle.y);
|
||||
work.x = 0.0f;
|
||||
work.y = AREG_F(2) + 50.0f;
|
||||
work.z = AREG_F(1) + 800.0f;
|
||||
MtxPosition(&work, &i_this->currentPosTarget);
|
||||
i_this->currentPosTarget += actor->home.pos;
|
||||
actor->speed.x = fabsf(actor->current.pos.x - i_this->currentPosTarget.x) * 0.2f;
|
||||
actor->speed.y = fabsf(actor->current.pos.y - i_this->currentPosTarget.y) * 0.2f;
|
||||
actor->speed.z = fabsf(actor->current.pos.z - i_this->currentPosTarget.z) * 0.2f;
|
||||
i_this->timer[0] = KREG_S(7) + 15;
|
||||
}
|
||||
// fallthrough
|
||||
case 1:
|
||||
if (i_this->timer[0] == 0) {
|
||||
if (actor->health <= 0) {
|
||||
i_this->headAction = HEAD_ACTION_END;
|
||||
i_this->mode = 0;
|
||||
} else {
|
||||
i_this->headAction = HEAD_ACTION_WAIT;
|
||||
i_this->mode = -2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
cLib_addCalc2(&actor->current.pos.x, i_this->currentPosTarget.x, 0.1f, actor->speed.x);
|
||||
@@ -871,7 +875,7 @@ static void action(e_gb_class* i_this) {
|
||||
i_this->xRot = i_this->field_0x94c * cM_scos((s16)i_this->field_0x94a);
|
||||
}
|
||||
|
||||
i_this->field_0x94a += (s16)(10000 + VREG_S(2));
|
||||
ANGLE_ADD(i_this->field_0x94a, 10000 + VREG_S(2));
|
||||
cLib_addCalc0(&i_this->field_0x94c, 1.0f, VREG_F(2) + 150.0f);
|
||||
} else {
|
||||
i_this->xRot = 0;
|
||||
@@ -1106,183 +1110,183 @@ static void demo_camera(e_gb_class* i_this) {
|
||||
camera_class* camera2 = dComIfGp_getCamera(0);
|
||||
fopAc_ac_c* player = (fopAc_ac_c*)dComIfGp_getPlayer(0);
|
||||
cXyz work, pos, sp34, sp40;
|
||||
int swBit;
|
||||
|
||||
switch (i_this->demoMode) {
|
||||
case 1:
|
||||
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
|
||||
actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
case 1: {
|
||||
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
|
||||
actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
camera->mCamera.Stop();
|
||||
i_this->demoMode = 2;
|
||||
i_this->demoCamFovy = 55.0f;
|
||||
i_this->demoCounter = 0;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
daPy_getPlayerActorClass()->changeOriginalDemo();
|
||||
i_this->keyPos.set(-5750.0f, 4410.0f, 10684.0f);
|
||||
i_this->keyYRot = KREG_S(4) + 0x5000;
|
||||
i_this->demoCamCenter.set(-5689.0f, 4747.0f, 15000.0f);
|
||||
i_this->demoCamEye.set(-5700.0f, 4740.0f, 14644.0f);
|
||||
i_this->demoCamCenterTarget.set(-5689.0f, 4740.0f, 14643.0f);
|
||||
i_this->demoCamEyeTarget.set(-5723.0f, 4733.0f, 14293.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0;
|
||||
camera->mCamera.Stop();
|
||||
i_this->demoMode = 2;
|
||||
i_this->demoCamFovy = 55.0f;
|
||||
i_this->demoCounter = 0;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
daPy_getPlayerActorClass()->changeOriginalDemo();
|
||||
i_this->keyPos.set(-5750.0f, 4410.0f, 10684.0f);
|
||||
i_this->keyYRot = KREG_S(4) + 0x5000;
|
||||
i_this->demoCamCenter.set(-5689.0f, 4747.0f, 15000.0f);
|
||||
i_this->demoCamEye.set(-5700.0f, 4740.0f, 14644.0f);
|
||||
i_this->demoCamCenterTarget.set(-5689.0f, 4740.0f, 14643.0f);
|
||||
i_this->demoCamEyeTarget.set(-5723.0f, 4733.0f, 14293.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0;
|
||||
|
||||
Z2GetAudioMgr()->setBattleBgmOff(true);
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(actor);
|
||||
swBit = (fopAcM_GetParam(actor) & 0xFF00) >> 8;
|
||||
dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(actor));
|
||||
// fallthrough
|
||||
case 2:
|
||||
pos.set(-5700.0f, 4350.0f, 9670.0f);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&pos, 0, 0);
|
||||
if (i_this->demoCounter > 50) {
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.02f, 1.0f, 0.0005f);
|
||||
}
|
||||
Z2GetAudioMgr()->setBattleBgmOff(true);
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(actor);
|
||||
int swBit = (fopAcM_GetParam(actor) & 0xFF00) >> 8;
|
||||
dComIfGs_onSwitch(swBit, fopAcM_GetRoomNo(actor));
|
||||
// fallthrough
|
||||
}
|
||||
case 2:
|
||||
pos.set(-5700.0f, 4350.0f, 9670.0f);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&pos, 0, 0);
|
||||
if (i_this->demoCounter > 50) {
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.02f, 1.0f, 0.0005f);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter != 170) break;
|
||||
i_this->demoCamCenter.set(-5690.0f, 4432.0f, 9610.0f);
|
||||
i_this->demoCamEye.set(-5709.0f, 4445.0f, 9961.0f);
|
||||
i_this->demoCamCenterTarget.set(-5741.0f, 4432.0f, 10530.0f);
|
||||
i_this->demoCamEyeTarget.set(-5760.0f, 4496.0f, 10896.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0f;
|
||||
i_this->demoMode = 3;
|
||||
i_this->demoCamFovy = 55.0f;
|
||||
i_this->demoCounter = 0;
|
||||
// fallthrough
|
||||
case 3:
|
||||
if (i_this->demoCounter > 30) {
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.02f, 1.0f, 0.0005f);
|
||||
}
|
||||
if (i_this->demoCounter != 170) break;
|
||||
i_this->demoCamCenter.set(-5690.0f, 4432.0f, 9610.0f);
|
||||
i_this->demoCamEye.set(-5709.0f, 4445.0f, 9961.0f);
|
||||
i_this->demoCamCenterTarget.set(-5741.0f, 4432.0f, 10530.0f);
|
||||
i_this->demoCamEyeTarget.set(-5760.0f, 4496.0f, 10896.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0f;
|
||||
i_this->demoMode = 3;
|
||||
i_this->demoCamFovy = 55.0f;
|
||||
i_this->demoCounter = 0;
|
||||
// fallthrough
|
||||
case 3:
|
||||
if (i_this->demoCounter > 30) {
|
||||
cam_3d_morf(i_this, 0.1f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.02f, 1.0f, 0.0005f);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 130) {
|
||||
i_this->mode++;
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 135) {
|
||||
i_this->sound.startCreatureSound(Z2SE_EN_GB_SWINGHEAD, 0, -1);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 143) {
|
||||
i_this->field_0x670 = 2;
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 162) {
|
||||
daPy_getPlayerActorClass()->changeDemoMode(23, 1, 2, 0);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter != 190) break;
|
||||
if (i_this->demoCounter == 130) {
|
||||
i_this->mode++;
|
||||
i_this->demoMode = 4;
|
||||
i_this->demoCounter = 0;
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_OPEN_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
mDoAud_seStart(Z2SE_EN_GF_OPEN, &actor->home.pos, 0, 0);
|
||||
i_this->demoCamCenter.set(-5706.0f, 4526.0f, 11379.0f);
|
||||
i_this->demoCamEye.set(-5687.0f, 4505.0f, 11008.0f);
|
||||
i_this->demoCamCenterTarget.set(-5624.0f, 4439.0f, 9818.0f);
|
||||
i_this->demoCamEyeTarget.set(-5604.0f, 4418.0f, 9447.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0f;
|
||||
i_this->demoCamCenter.y = 4584.0f;
|
||||
// fallthrough
|
||||
case 4:
|
||||
if (i_this->demoCounter == (s16)(NREG_S(5) + 48)) {
|
||||
head_anm_init(i_this, dRes_ID_E_GB_BCK_GB_DEMO_DROPKEY_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
i_this->sound.startCreatureSound(Z2SE_EN_GB_DROPKEY, 0, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == (s16)(NREG_S(6) + 54)) {
|
||||
head_anm_init(i_this, dRes_ID_E_GB_BCK_GB_DEMO_DROPKEY_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
i_this->keyPos = actor->home.pos;
|
||||
i_this->keyPos.y += NREG_F(9) + 400.0f;
|
||||
i_this->field_0x670 = 1;
|
||||
}
|
||||
if (i_this->demoCounter == 135) {
|
||||
i_this->sound.startCreatureSound(Z2SE_EN_GB_SWINGHEAD, 0, -1);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == (s16)(NREG_S(7) + 68)) {
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_CLOSE_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
mDoAud_seStart(Z2SE_EN_GF_CLOSE, &actor->home.pos, 0, 0);
|
||||
i_this->keyStatus = 0;
|
||||
}
|
||||
if (i_this->demoCounter == 143) {
|
||||
i_this->field_0x670 = 2;
|
||||
}
|
||||
|
||||
if (i_this->demoCounter > 150) {
|
||||
cam_3d_morf(i_this, 0.2f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.04f, 1.0f, 0.002f);
|
||||
} else if (i_this->demoCounter >= 80) {
|
||||
cLib_addCalc2(&i_this->demoCamCenter.y, 4526.0f, 0.05f, 1.0f);
|
||||
}
|
||||
if (i_this->demoCounter == 162) {
|
||||
daPy_getPlayerActorClass()->changeDemoMode(23, 1, 2, 0);
|
||||
}
|
||||
|
||||
if (i_this->bodyAnmNo == dRes_ID_E_GB_BCK_GF_CLOSE_e && i_this->flowerAnmP->isStop()) {
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_WAIT_CLOSE_e, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f);
|
||||
}
|
||||
if (i_this->demoCounter != 190) break;
|
||||
i_this->mode++;
|
||||
i_this->demoMode = 4;
|
||||
i_this->demoCounter = 0;
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_OPEN_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
mDoAud_seStart(Z2SE_EN_GF_OPEN, &actor->home.pos, 0, 0);
|
||||
i_this->demoCamCenter.set(-5706.0f, 4526.0f, 11379.0f);
|
||||
i_this->demoCamEye.set(-5687.0f, 4505.0f, 11008.0f);
|
||||
i_this->demoCamCenterTarget.set(-5624.0f, 4439.0f, 9818.0f);
|
||||
i_this->demoCamEyeTarget.set(-5604.0f, 4418.0f, 9447.0f);
|
||||
i_this->demoCamEyeTargetDist.x = fabsf(i_this->demoCamEyeTarget.x - i_this->demoCamEye.x);
|
||||
i_this->demoCamEyeTargetDist.y = fabsf(i_this->demoCamEyeTarget.y - i_this->demoCamEye.y);
|
||||
i_this->demoCamEyeTargetDist.z = fabsf(i_this->demoCamEyeTarget.z - i_this->demoCamEye.z);
|
||||
i_this->demoCamCenterTargetDist.x = fabsf(i_this->demoCamCenterTarget.x - i_this->demoCamCenter.x);
|
||||
i_this->demoCamCenterTargetDist.y = fabsf(i_this->demoCamCenterTarget.y - i_this->demoCamCenter.y);
|
||||
i_this->demoCamCenterTargetDist.z = fabsf(i_this->demoCamCenterTarget.z - i_this->demoCamCenter.z);
|
||||
i_this->demoCamStepScale = 0.0f;
|
||||
i_this->demoCamCenter.y = 4584.0f;
|
||||
// fallthrough
|
||||
case 4:
|
||||
if (i_this->demoCounter == (s16)(NREG_S(5) + 48)) {
|
||||
head_anm_init(i_this, dRes_ID_E_GB_BCK_GB_DEMO_DROPKEY_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
i_this->sound.startCreatureSound(Z2SE_EN_GB_DROPKEY, 0, -1);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 220) {
|
||||
i_this->demoMode = 100;
|
||||
i_this->headAction = HEAD_ACTION_WAIT;
|
||||
i_this->mode = 0;
|
||||
i_this->flowerAction = FLOWER_ACTION_WAIT;
|
||||
i_this->flowerMode = 0;
|
||||
Z2GetAudioMgr()->setBattleBgmOff(false);
|
||||
}
|
||||
break;
|
||||
if (i_this->demoCounter == (s16)(NREG_S(6) + 54)) {
|
||||
head_anm_init(i_this, dRes_ID_E_GB_BCK_GB_DEMO_DROPKEY_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
i_this->keyPos = actor->home.pos;
|
||||
i_this->keyPos.y += NREG_F(9) + 400.0f;
|
||||
i_this->field_0x670 = 1;
|
||||
}
|
||||
|
||||
case 10:
|
||||
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
|
||||
actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
if (i_this->demoCounter == (s16)(NREG_S(7) + 68)) {
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_CLOSE_e, 5.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
|
||||
mDoAud_seStart(Z2SE_EN_GF_CLOSE, &actor->home.pos, 0, 0);
|
||||
i_this->keyStatus = 0;
|
||||
}
|
||||
|
||||
camera->mCamera.Stop();
|
||||
i_this->demoMode = 11;
|
||||
i_this->demoCamFovy = 55.0;
|
||||
i_this->demoCounter = 0;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
// fallthrough
|
||||
case 11:
|
||||
i_this->demoCamCenter = actor->home.pos;
|
||||
i_this->demoCamCenter.y += YREG_F(12) + 100.0f;
|
||||
i_this->demoCamEye = actor->home.pos;
|
||||
i_this->demoCamEye.x += YREG_F(13);
|
||||
i_this->demoCamEye.y += YREG_F(14) + 300.0f;
|
||||
i_this->demoCamEye.z += YREG_F(15) + -600.0f;
|
||||
if (i_this->demoCounter > 150) {
|
||||
cam_3d_morf(i_this, 0.2f);
|
||||
cLib_addCalc2(&i_this->demoCamStepScale, 0.04f, 1.0f, 0.002f);
|
||||
} else if (i_this->demoCounter >= 80) {
|
||||
cLib_addCalc2(&i_this->demoCamCenter.y, 4526.0f, 0.05f, 1.0f);
|
||||
}
|
||||
|
||||
if (i_this->demoCounter == 100) {
|
||||
i_this->demoMode = 100;
|
||||
}
|
||||
break;
|
||||
if (i_this->bodyAnmNo == dRes_ID_E_GB_BCK_GF_CLOSE_e && i_this->flowerAnmP->isStop()) {
|
||||
body_anm_init(i_this, dRes_ID_E_GB_BCK_GF_WAIT_CLOSE_e, 10.0f, J3DFrameCtrl::EMode_LOOP, 1.0f);
|
||||
}
|
||||
|
||||
case 100:
|
||||
camera->mCamera.Reset(i_this->demoCamCenter, i_this->demoCamEye);
|
||||
camera->mCamera.Start();
|
||||
camera->mCamera.SetTrimSize(0);
|
||||
dComIfGp_event_reset();
|
||||
daPy_getPlayerActorClass()->cancelOriginalDemo();
|
||||
i_this->demoMode = 0;
|
||||
break;
|
||||
if (i_this->demoCounter == 220) {
|
||||
i_this->demoMode = 100;
|
||||
i_this->headAction = HEAD_ACTION_WAIT;
|
||||
i_this->mode = 0;
|
||||
i_this->flowerAction = FLOWER_ACTION_WAIT;
|
||||
i_this->flowerMode = 0;
|
||||
Z2GetAudioMgr()->setBattleBgmOff(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
case 10:
|
||||
if (!actor->eventInfo.checkCommandDemoAccrpt()) {
|
||||
fopAcM_orderPotentialEvent(actor, 2, 0xFFFF, 0);
|
||||
actor->eventInfo.onCondition(dEvtCnd_CANDEMO_e);
|
||||
return;
|
||||
}
|
||||
|
||||
camera->mCamera.Stop();
|
||||
i_this->demoMode = 11;
|
||||
i_this->demoCamFovy = 55.0;
|
||||
i_this->demoCounter = 0;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
// fallthrough
|
||||
case 11:
|
||||
i_this->demoCamCenter = actor->home.pos;
|
||||
i_this->demoCamCenter.y += YREG_F(12) + 100.0f;
|
||||
i_this->demoCamEye = actor->home.pos;
|
||||
i_this->demoCamEye.x += YREG_F(13);
|
||||
i_this->demoCamEye.y += YREG_F(14) + 300.0f;
|
||||
i_this->demoCamEye.z += YREG_F(15) + -600.0f;
|
||||
|
||||
if (i_this->demoCounter == 100) {
|
||||
i_this->demoMode = 100;
|
||||
}
|
||||
break;
|
||||
|
||||
case 100:
|
||||
camera->mCamera.Reset(i_this->demoCamCenter, i_this->demoCamEye);
|
||||
camera->mCamera.Start();
|
||||
camera->mCamera.SetTrimSize(0);
|
||||
dComIfGp_event_reset();
|
||||
daPy_getPlayerActorClass()->cancelOriginalDemo();
|
||||
i_this->demoMode = 0;
|
||||
break;
|
||||
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
|
||||
if (i_this->demoMode != 0) {
|
||||
@@ -1290,7 +1294,7 @@ static void demo_camera(e_gb_class* i_this) {
|
||||
i_this->demoCounter++;
|
||||
|
||||
if (i_this->demoMode < 10) {
|
||||
dComIfGp_getEvent()->setSkipProc(i_this, dEv_defaultSkipProc, 0);
|
||||
dComIfGp_getEvent()->setSkipProc(actor, dEv_defaultSkipProc, 0);
|
||||
if (dComIfGp_getEvent()->checkSkipEdge()) {
|
||||
i_this->demoMode = 100;
|
||||
cMtx_YrotS(*calc_mtx, player->shape_angle.y);
|
||||
@@ -1323,6 +1327,7 @@ static int daE_GB_Execute(e_gb_class* i_this) {
|
||||
|
||||
fopEn_enemy_c* actor = &i_this->actor;
|
||||
cXyz work, pos;
|
||||
J3DModel* model;
|
||||
|
||||
i_this->frameCounter++;
|
||||
|
||||
@@ -1357,7 +1362,7 @@ static int daE_GB_Execute(e_gb_class* i_this) {
|
||||
f32 scale = l_HIO.face_size;
|
||||
mDoMtx_stack_c::scaleM(scale, scale, scale);
|
||||
|
||||
J3DModel* model = i_this->anmP->getModel();
|
||||
model = i_this->anmP->getModel();
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
i_this->anmP->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)), 0);
|
||||
i_this->anmP->modelCalc();
|
||||
@@ -1449,7 +1454,7 @@ static int daE_GB_Execute(e_gb_class* i_this) {
|
||||
if (i_this->field_0x670 == 1) {
|
||||
i_this->keyPos.y += i_this->field_0x680;
|
||||
i_this->field_0x680 -= 3.0f;
|
||||
i_this->keyXRot += (s16)-0xC00;
|
||||
ANGLE_ADD(i_this->keyXRot, -0xC00);
|
||||
|
||||
if (i_this->keyPos.y < actor->home.pos.y) {
|
||||
i_this->keyXRot = 0;
|
||||
|
||||
@@ -1013,7 +1013,7 @@ void daE_GE_c::executeWind() {
|
||||
}
|
||||
|
||||
cXyz boomerangPos2(daPy_py_c::getThrowBoomerangActor()->current.pos);
|
||||
field_0xb8c += (s16)0x800;
|
||||
ANGLE_ADD(field_0xb8c, 0x800);
|
||||
current.pos.x = boomerangPos2.x + field_0xb58 * cM_ssin(field_0xb8c);
|
||||
current.pos.z = boomerangPos2.z + field_0xb58 * cM_scos(field_0xb8c);
|
||||
cLib_chaseF(&field_0xb58, field_0xb60, 2.0f);
|
||||
|
||||
@@ -93,7 +93,7 @@ int daE_GI_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
}
|
||||
|
||||
int daE_GI_c::JointCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == NULL) {
|
||||
if (param_1 == 0) {
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daE_GI_c* a_this = (daE_GI_c*)model->getUserArea();
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
void daE_HM_c::initCcCylinder() {
|
||||
static const dCcD_SrcSph ccShpSrc = {
|
||||
{
|
||||
{0x0, {{0x2, 0x1, 0xd}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
|
||||
{0x0, {{0x2, 0x1, 0xd}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
|
||||
{dCcD_SE_STONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
@@ -395,7 +395,7 @@ int daE_HM_c::W_MoveCheckWall() {
|
||||
dComIfG_Bgsp().GetTriPla(linChk, &plane1);
|
||||
|
||||
if (!dComIfG_Bgsp().GetMagnetCode(linChk)) {
|
||||
field_0x5b4 += (s16)0x200;
|
||||
ANGLE_ADD(field_0x5b4, 0x200);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ int daE_HM_c::W_WallCheck() {
|
||||
cM3dGPla plane;
|
||||
dComIfG_Bgsp().GetTriPla(linChk, &plane);
|
||||
if (!dComIfG_Bgsp().GetMagnetCode(linChk)) {
|
||||
field_0x5b4 += (s16)0x200;
|
||||
ANGLE_ADD(field_0x5b4, 0x200);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -841,7 +841,7 @@ void daE_HM_c::DeathMotion() {
|
||||
f32 frame = mAnm_p->getFrame();
|
||||
if (mAcch.ChkGroundHit() && (field_0x5da++, field_0x5da) == 1) {
|
||||
speed.y = yREG_F(11) + 35.0f;
|
||||
current.angle.y -= (s16)0x1000;
|
||||
ANGLE_SUB(current.angle.y, 0x1000);
|
||||
SetAnm(8, 0, nREG_F(9) + 1.0f, nREG_F(12) + 1.0f);
|
||||
mAnm_p->setPlaySpeed(yREG_F(12) + 2.0f);
|
||||
}
|
||||
@@ -1075,7 +1075,7 @@ void daE_HM_c::At_Check() {
|
||||
}
|
||||
|
||||
if ((s16)mAtInfo.mAttackPower > 0) {
|
||||
health -= (s16)mAtInfo.mAttackPower;
|
||||
S16_SUB(health, mAtInfo.mAttackPower);
|
||||
}
|
||||
|
||||
s8 unkByte1 = 0;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_HP_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -30,7 +31,7 @@ public:
|
||||
namespace {
|
||||
static dCcD_SrcCyl cc_hp_src = {
|
||||
{
|
||||
{0, {{0x0, 0x0, 0x0}, {(s32)0xd8000000, 0x3}, 0x0}},
|
||||
{0, {{0x0, 0x0, 0x0}, {0xd8000000, 0x3}, 0x0}},
|
||||
{dCcD_SE_13, 0, 0, 0, {0}},
|
||||
{dCcD_SE_NONE, 0, 0, 0, {6}},
|
||||
{0},
|
||||
@@ -46,7 +47,7 @@ static dCcD_SrcCyl cc_hp_src = {
|
||||
|
||||
static dCcD_SrcSph cc_lamp_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xD8FBFDFF, 0x43}, 0x75}}, // mObj
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0xD8FBFDFF, 0x43}, 0x75}}, // mObj
|
||||
{dCcD_SE_13, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x6}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
@@ -118,7 +119,7 @@ int daE_HP_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
}
|
||||
|
||||
int daE_HP_c::JointCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == NULL) {
|
||||
if (param_1 == 0) {
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daE_HP_c* poe = (daE_HP_c*)model->getUserArea();
|
||||
if (poe != NULL) {
|
||||
@@ -154,7 +155,7 @@ int daE_HP_c::LampCtrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
}
|
||||
|
||||
int daE_HP_c::LampJointCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == NULL) {
|
||||
if (param_1 == 0) {
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daE_HP_c* poe = (daE_HP_c*)model->getUserArea();
|
||||
if (poe != NULL) {
|
||||
|
||||
+150
-138
@@ -169,10 +169,14 @@ static fopAc_ac_c* m_near_carry;
|
||||
static fopAc_ac_c* m_near_weapon;
|
||||
|
||||
static void* s_obj_sub(void* i_actor, void* i_data) {
|
||||
f32 actor_dist;
|
||||
|
||||
UNUSED(i_data);
|
||||
|
||||
if (fopAcM_IsActor(i_actor)) {
|
||||
if (!fpcM_IsCreating(fopAcM_GetID(i_actor)) && !fopAcM_checkCarryNow((fopAc_ac_c*)i_actor))
|
||||
{
|
||||
f32 actor_dist = fopAcM_searchActorDistance((fopAc_ac_c*)i_actor, (fopAc_ac_c*)i_data);
|
||||
actor_dist = fopAcM_searchActorDistance((fopAc_ac_c*)i_actor, (fopAc_ac_c*)i_data);
|
||||
|
||||
if (actor_dist < 100.0f && !fopAcM_GetSpeedF((fopAc_ac_c*)i_actor) &&
|
||||
!fopAcM_GetSpeed((fopAc_ac_c*)i_actor).y)
|
||||
@@ -463,7 +467,7 @@ void daE_HZ_c::executeWait() {
|
||||
case 4:
|
||||
target = home.pos.y + 30.0f;
|
||||
if (cLib_chaseF(¤t.pos.y, target, 5.0f)) {
|
||||
field_0x6b4 += (s16)0x800;
|
||||
ANGLE_ADD(field_0x6b4, 0x800);
|
||||
current.pos.y += cM_ssin(field_0x6b4) * 1.5f;
|
||||
cLib_chaseAngleS(&shape_angle.y, mPlayerAngleY, 0x400);
|
||||
}
|
||||
@@ -713,8 +717,12 @@ void daE_HZ_c::initBackWalk() {
|
||||
linChk.Set(&start, &end, NULL);
|
||||
|
||||
if (dComIfG_Bgsp().LineCross(&linChk)) {
|
||||
cLib_offsetPos(&field_0x678, &home.pos, modifiedTargetAngleY & 0x4000 ? (s16)((targetAngleY + 0x4000) & 0x8000) :
|
||||
(s16)((targetAngleY & 0x8000) + 0x4000), &position);
|
||||
if (modifiedTargetAngleY & 0x4000) {
|
||||
targetAngleY = (s16)(targetAngleY + 0x4000 & 0x8000);
|
||||
} else {
|
||||
targetAngleY = (s16)((targetAngleY & 0x8000) + 0x4000);
|
||||
}
|
||||
cLib_offsetPos(&field_0x678, &home.pos, targetAngleY, &position);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -863,6 +871,7 @@ void daE_HZ_c::executeWind() {
|
||||
dBgS_GndChk gndChk;
|
||||
dBgS_LinChk linChk;
|
||||
BOOL bVar = false;
|
||||
f32 deltaY;
|
||||
f32 frame = mpMorfSO->getFrame();
|
||||
f32 playerDist;
|
||||
f32 groundCross;
|
||||
@@ -890,13 +899,13 @@ void daE_HZ_c::executeWind() {
|
||||
field_0x6cc = (s16)((playerDist * 15.0f) / 1000.0f);
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
frame = 6.0f - frame / 3.0f;
|
||||
if (frame < 0.0f) {
|
||||
frame = 0.0f;
|
||||
deltaY = 6.0f - frame / 3.0f;
|
||||
if (deltaY < 0.0f) {
|
||||
deltaY = 0.0f;
|
||||
}
|
||||
|
||||
current.pos.y += frame;
|
||||
shape_angle.y -= (s16)0x7D0;
|
||||
current.pos.y += deltaY;
|
||||
ANGLE_SUB(shape_angle.y, 0x7D0);
|
||||
|
||||
if (mpMorfSO->checkFrame(field_0x6cc) || mpBoomerangActor == NULL ||
|
||||
mpBoomerangActor->getReturnFlg())
|
||||
@@ -962,7 +971,7 @@ void daE_HZ_c::executeWind() {
|
||||
return;
|
||||
}
|
||||
|
||||
field_0x6b2 += (s16)0x800;
|
||||
ANGLE_ADD(field_0x6b2, 0x800);
|
||||
linChk.Set(¤t.pos, &position, NULL);
|
||||
if (!dComIfG_Bgsp().LineCross(&linChk)) {
|
||||
cLib_chaseF(¤t.pos.x, position.x + field_0x678.x * cM_ssin(field_0x6b2), 50.0f);
|
||||
@@ -991,7 +1000,7 @@ void daE_HZ_c::executeWind() {
|
||||
cLib_chaseAngleS(&shape_angle.x, -0x8000, 0x400);
|
||||
}
|
||||
|
||||
shape_angle.y -= (s16)l_HIO.reeling_rotation_speed;
|
||||
ANGLE_SUB(shape_angle.y, l_HIO.reeling_rotation_speed);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@@ -1277,7 +1286,7 @@ void daE_HZ_c::executeWindChance() {
|
||||
}
|
||||
|
||||
end = mpBoomerangActor->current.pos;
|
||||
field_0x6b6 += (s16)0x800;
|
||||
ANGLE_ADD(field_0x6b6, 0x800);
|
||||
start = current.pos;
|
||||
start.y += 50.0f;
|
||||
linChk.Set(&start, &end, NULL);
|
||||
@@ -1296,7 +1305,7 @@ void daE_HZ_c::executeWindChance() {
|
||||
}
|
||||
|
||||
shape_angle.y -= field_0x6b2;
|
||||
field_0x6b4 += (s16)0x1000;
|
||||
ANGLE_ADD(field_0x6b4, 0x1000);
|
||||
shape_angle.x = (s16)(cM_scos(field_0x6b4) * 6144.0f);
|
||||
break;
|
||||
|
||||
@@ -1307,12 +1316,12 @@ void daE_HZ_c::executeWindChance() {
|
||||
cLib_chaseAngleS(&field_0x6b2, 0, 0x100);
|
||||
cLib_chaseAngleS(&field_0x6b6, 0, 0x200);
|
||||
shape_angle.y -= field_0x6b2;
|
||||
field_0x6b4 += (s16)0x1000;
|
||||
ANGLE_ADD(field_0x6b4, 0x1000);
|
||||
shape_angle.x = (s16)(field_0x6b6 * cM_scos(field_0x6b4));
|
||||
|
||||
|
||||
if (mWaitTimer == 0) {
|
||||
if (mPiyoriTimer != 0) {
|
||||
mPiyoriTimer += (s16)20;
|
||||
S16_ADD(mPiyoriTimer, 20);
|
||||
}
|
||||
|
||||
setActionMode(ACTION_CHANCE);
|
||||
@@ -1345,15 +1354,14 @@ void daE_HZ_c::executeWindWalk() {
|
||||
}
|
||||
|
||||
void daE_HZ_c::setWaterEffect() {
|
||||
cXyz position(current.pos.x, mGroundCross, current.pos.z);
|
||||
static cXyz sc(2.0f, 2.0f, 2.0f);
|
||||
static u16 w_eff_id[4] = {
|
||||
ID_ZI_J_DOWNWTRA_A,
|
||||
ID_ZI_J_DOWNWTRA_B,
|
||||
ID_ZI_J_DOWNWTRA_C,
|
||||
ID_ZI_J_DOWNWTRA_D,
|
||||
};
|
||||
|
||||
cXyz position(current.pos.x, mGroundCross, current.pos.z);
|
||||
static cXyz sc(2.0f, 2.0f, 2.0f);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
mWaterEffects[i] = dComIfGp_particle_set(mWaterEffects[i], w_eff_id[i], &position, &tevStr,
|
||||
@@ -1453,7 +1461,7 @@ void daE_HZ_c::executeDeathWait() {
|
||||
}
|
||||
|
||||
void daE_HZ_c::damage_check() {
|
||||
s16 angle;
|
||||
s16 targetAngleY;
|
||||
|
||||
if (mAction != 1 || mMode < 4) {
|
||||
if (mSpheres[0].ChkTgHit() && mSpheres[0].GetTgHitObj()->ChkAtType(AT_TYPE_BOOMERANG)) {
|
||||
@@ -1533,68 +1541,68 @@ void daE_HZ_c::damage_check() {
|
||||
}
|
||||
|
||||
setActionMode(ACTION_DEATH);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (mAction == ACTION_AWAY) {
|
||||
if (bVar) {
|
||||
field_0x6cc = 1;
|
||||
setActionMode(ACTION_DAMAGE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mAction == ACTION_AWAY) {
|
||||
if (bVar) {
|
||||
field_0x6cc = 1;
|
||||
setActionMode(ACTION_DAMAGE);
|
||||
targetAngleY = cLib_targetAngleY(&mSpheres[1].GetCoCP(), &player_pos);
|
||||
targetAngleY = (s16)(targetAngleY - shape_angle.y);
|
||||
if (i == 1) {
|
||||
if (abs(targetAngleY) >= 0x4000) {
|
||||
if (bVar) {
|
||||
mBackbone1YZRot.z = 0x5000;
|
||||
mBackbone2YZRot.z = -0x4000;
|
||||
mBackbone3YZRot.z = 0;
|
||||
} else {
|
||||
mBackbone1YZRot.z = 0x3000;
|
||||
}
|
||||
|
||||
} else if (bVar) {
|
||||
mBackbone1YZRot.z = -0x3000;
|
||||
mBackbone2YZRot.z = -0x2000;
|
||||
mBackbone3YZRot.z = -0x1000;
|
||||
} else {
|
||||
mBackbone1YZRot.z = -0x2000;
|
||||
mBackbone2YZRot.z = -0x1000;
|
||||
mBackbone3YZRot.z = -0x800;
|
||||
}
|
||||
speedF = 0.0f;
|
||||
} else if (bVar) {
|
||||
mBackbone1YZRot.z = 0x5000;
|
||||
mBackbone2YZRot.z = -0x4000;
|
||||
mBackbone3YZRot.z = 0;
|
||||
} else {
|
||||
mBackbone1YZRot.z = 0x3000;
|
||||
}
|
||||
|
||||
if (targetAngleY < -0x2800) {
|
||||
targetAngleY = -0x2800;
|
||||
}
|
||||
|
||||
if (targetAngleY > 0x2800) {
|
||||
targetAngleY = 0x2800;
|
||||
}
|
||||
|
||||
mBackbone1YZRot.y = targetAngleY;
|
||||
mSound.startCreatureVoice(Z2SE_EN_HZ_V_DAMAGE, -1);
|
||||
return;
|
||||
}
|
||||
|
||||
angle = cLib_targetAngleY(&mSpheres[1].GetCoCP(), &player_pos) - shape_angle.y;
|
||||
if (i == 1) {
|
||||
if (abs(angle) >= 0x4000) {
|
||||
if (bVar) {
|
||||
mBackbone1YZRot.z = 0x5000;
|
||||
mBackbone2YZRot.z = -0x4000;
|
||||
mBackbone3YZRot.z = 0;
|
||||
} else {
|
||||
mBackbone1YZRot.z = 0x3000;
|
||||
}
|
||||
|
||||
} else if (bVar) {
|
||||
mBackbone1YZRot.z = -0x3000;
|
||||
mBackbone2YZRot.z = -0x2000;
|
||||
mBackbone3YZRot.z = -0x1000;
|
||||
} else {
|
||||
mBackbone1YZRot.z = -0x2000;
|
||||
mBackbone2YZRot.z = -0x1000;
|
||||
mBackbone3YZRot.z = -0x800;
|
||||
}
|
||||
speedF = 0.0f;
|
||||
} else if (bVar) {
|
||||
mBackbone1YZRot.z = 0x5000;
|
||||
mBackbone2YZRot.z = -0x4000;
|
||||
mBackbone3YZRot.z = 0;
|
||||
if (bVar) {
|
||||
field_0x6cc = 1;
|
||||
} else {
|
||||
mBackbone1YZRot.z = 0x3000;
|
||||
field_0x6cc = 0;
|
||||
if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_SHIELD_ATTACK)) {
|
||||
field_0x6cc = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if (angle < -0x2800) {
|
||||
angle = -0x2800;
|
||||
}
|
||||
|
||||
if (angle > 0x2800) {
|
||||
angle = 0x2800;
|
||||
}
|
||||
|
||||
mBackbone1YZRot.y = angle;
|
||||
mSound.startCreatureVoice(Z2SE_EN_HZ_V_DAMAGE, -1);
|
||||
return;
|
||||
setActionMode(ACTION_DAMAGE);
|
||||
}
|
||||
|
||||
if (bVar) {
|
||||
field_0x6cc = 1;
|
||||
} else {
|
||||
field_0x6cc = 0;
|
||||
if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_SHIELD_ATTACK)) {
|
||||
field_0x6cc = 2;
|
||||
}
|
||||
}
|
||||
|
||||
setActionMode(ACTION_DAMAGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1605,13 +1613,8 @@ void daE_HZ_c::damage_check() {
|
||||
bool daE_HZ_c::checkWaterSurface() {
|
||||
dBgS_ObjGndChk_Spl spline;
|
||||
|
||||
Vec modified_pos /* = current.pos; */;
|
||||
// this might not match in debug since it's not calling
|
||||
// Vec::operator_= in debug
|
||||
// For retail, it's no problem since it gets optimized out
|
||||
modified_pos.x = current.pos.x;
|
||||
modified_pos.y = current.pos.y;
|
||||
modified_pos.z = current.pos.z;
|
||||
Vec modified_pos;
|
||||
modified_pos = current.pos;
|
||||
modified_pos.y += 500.0f;
|
||||
spline.SetPos(&modified_pos);
|
||||
mGroundCross = dComIfG_Bgsp().GroundCross(&spline);
|
||||
@@ -1722,59 +1725,64 @@ void daE_HZ_c::action() {
|
||||
void daE_HZ_c::mtx_set() {
|
||||
mDoMtx_stack_c::transS(home.pos.x, home.pos.y - 13.0f, home.pos.z);
|
||||
mpModel2->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
if (field_0x6e8 == 0) {
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::scaleM(l_HIO.basic_size, l_HIO.basic_size, l_HIO.basic_size);
|
||||
J3DModel* morfModel = mpMorfSO->getModel();
|
||||
morfModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mpMorfSO->modelCalc();
|
||||
MtxP anmMtx = morfModel->getAnmMtx(7);
|
||||
mpModel->setBaseTRMtx(anmMtx);
|
||||
mSmokeEffectPosition.set(anmMtx[0][3], anmMtx[1][3], anmMtx[2][3]);
|
||||
if (mSetModelAnmMtx) {
|
||||
mSetModelAnmMtx = false;
|
||||
mDoMtx_stack_c::copy(anmMtx);
|
||||
mDoMtx_stack_c::ZrotM(-0x4000);
|
||||
mDoMtx_stack_c::transM(0.0f, 14.0f, 0.0f);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mMtx);
|
||||
} else {
|
||||
mDoMtx_stack_c::transS(home.pos);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mMtx);
|
||||
}
|
||||
|
||||
if (mpBgW != NULL) {
|
||||
mpBgW->Move();
|
||||
}
|
||||
if (field_0x6e8 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y, current.pos.z);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::scaleM(l_HIO.basic_size, l_HIO.basic_size, l_HIO.basic_size);
|
||||
J3DModel* morfModel = mpMorfSO->getModel();
|
||||
morfModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mpMorfSO->modelCalc();
|
||||
MtxP anmMtx = morfModel->getAnmMtx(7);
|
||||
mpModel->setBaseTRMtx(anmMtx);
|
||||
mSmokeEffectPosition.set(anmMtx[0][3], anmMtx[1][3], anmMtx[2][3]);
|
||||
if (mSetModelAnmMtx) {
|
||||
mSetModelAnmMtx = false;
|
||||
mDoMtx_stack_c::copy(anmMtx);
|
||||
mDoMtx_stack_c::ZrotM(-0x4000);
|
||||
mDoMtx_stack_c::transM(0.0f, 14.0f, 0.0f);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), mMtx);
|
||||
} else {
|
||||
mDoMtx_stack_c::transS(home.pos);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), mMtx);
|
||||
}
|
||||
|
||||
if (mpBgW != NULL) {
|
||||
mpBgW->Move();
|
||||
}
|
||||
}
|
||||
|
||||
void daE_HZ_c::cc_set() {
|
||||
if (field_0x6e8 == 0) {
|
||||
cXyz pos;
|
||||
J3DModel* morfModel = mpMorfSO->getModel();
|
||||
|
||||
attention_info.position = eyePos = mSmokeEffectPosition;
|
||||
attention_info.position.y += 30.0f;
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(7), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[0].SetC(pos);
|
||||
mSpheres[0].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[0]);
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(1), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[1].SetC(pos);
|
||||
mSpheres[1].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[1]);
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(0x12), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[2].SetC(pos);
|
||||
mSpheres[2].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[2]);
|
||||
if (field_0x6e8 != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
cXyz pos;
|
||||
J3DModel* morfModel = mpMorfSO->getModel();
|
||||
|
||||
attention_info.position = eyePos = mSmokeEffectPosition;
|
||||
attention_info.position.y += 30.0f;
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(7), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[0].SetC(pos);
|
||||
mSpheres[0].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[0]);
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(1), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[1].SetC(pos);
|
||||
mSpheres[1].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[1]);
|
||||
|
||||
MTXCopy(morfModel->getAnmMtx(0x12), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&pos);
|
||||
mSpheres[2].SetC(pos);
|
||||
mSpheres[2].SetR(80.0f);
|
||||
dComIfG_Ccsp()->Set(&mSpheres[2]);
|
||||
}
|
||||
|
||||
int daE_HZ_c::execute() {
|
||||
@@ -1875,7 +1883,8 @@ static int daE_HZ_Delete(daE_HZ_c* i_this) {
|
||||
}
|
||||
|
||||
int daE_HZ_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
int joint_no = i_joint->getJntNo();
|
||||
J3DJoint* joint = i_joint;
|
||||
int joint_no = joint->getJntNo();
|
||||
|
||||
mDoMtx_stack_c::copy(i_model->getAnmMtx(joint_no));
|
||||
|
||||
@@ -1897,7 +1906,7 @@ int daE_HZ_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
|
||||
}
|
||||
|
||||
i_model->setAnmMtx(joint_no, mDoMtx_stack_c::get());
|
||||
MTXCopy(mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -2007,11 +2016,11 @@ int daE_HZ_c::create() {
|
||||
|
||||
static dCcD_SrcSph cc_sph_src2 = {
|
||||
{
|
||||
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fafdff, 0x3}, 0x75}}, // mObj
|
||||
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{0x0, {{AT_TYPE_CSTATUE_SWING, 0x1, 0x0}, {0xd8fafdff, 0x3}, 0x75}}, // mObj
|
||||
{dCcD_SE_METAL, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
}, // mObjInf
|
||||
{
|
||||
{{0.0f, 0.0f, 0.0f}, 40.0f} // mSph
|
||||
} // mSphAttr
|
||||
@@ -2026,7 +2035,10 @@ int daE_HZ_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
if ((fopAcM_GetParam(this) >> 8 & 0xFF) == 1) {
|
||||
u8 param = (fopAcM_GetParam(this) >> 8) & 0xFF;
|
||||
if (param == 1) {
|
||||
int dummy; // force debug to use r31 as stack pointer
|
||||
|
||||
mpName = "E_hzp2";
|
||||
} else {
|
||||
mpName = "E_hzp";
|
||||
@@ -2035,7 +2047,7 @@ int daE_HZ_c::create() {
|
||||
phase = dComIfG_resLoad(&mPhaseReq2, mpName);
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("E_HZ PARAM %x\n", fopAcM_GetParam(this));
|
||||
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x2C20)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -2046,7 +2058,7 @@ int daE_HZ_c::create() {
|
||||
if (!hio_set) {
|
||||
mHIOInit = true;
|
||||
hio_set = true;
|
||||
l_HIO.enemy_sample = mDoHIO_CREATE_CHILD("Hajiki-san", &l_HIO);
|
||||
l_HIO.enemy_sample = mDoHIO_CREATE_CHILD("ハジキさん", &l_HIO);
|
||||
}
|
||||
|
||||
fopAcM_SetMtx(this, mpMorfSO->getModel()->getBaseTRMtx());
|
||||
|
||||
@@ -398,7 +398,7 @@ static BOOL coach_path_check(e_kr_class* i_this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Vec* pointPos = &i_this->field_0x6e4->m_points[0].m_position;
|
||||
BE(Vec)* pointPos = &i_this->field_0x6e4->m_points[0].m_position;
|
||||
f32 x = pointPos->x - coach->current.pos.x;
|
||||
f32 z = pointPos->z - coach->current.pos.z;
|
||||
if (JMAFastSqrt(x * x + z * z) < 500.0f + KREG_F(9)) {
|
||||
@@ -2258,7 +2258,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
|
||||
};
|
||||
static dCcD_SrcSph head_tg_sph_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
|
||||
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
@@ -2270,7 +2270,7 @@ static int daE_Kr_Create(fopAc_ac_c* i_this) {
|
||||
|
||||
static dCcD_SrcSph body_tg_sph_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x1, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x0}}, // mObj
|
||||
{0x0, {{0x0, 0x1, 0x0}, {0xd8fbfdff, 0x3}, 0x0}}, // mObj
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
|
||||
+37
-31
@@ -57,13 +57,13 @@ void daE_MD_c::setCcCylinder(f32 i_height) {
|
||||
}
|
||||
|
||||
int daE_MD_c::CreateHeap() {
|
||||
void* modelData;
|
||||
J3DModelData* modelData;
|
||||
if (mType != TYPE_LV9) {
|
||||
modelData = dComIfG_getObjectRes("E_MD", 0xB);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 0xB);
|
||||
} else if (mType == TYPE_LV9) {
|
||||
modelData = dComIfG_getObjectRes("E_MD", 9);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 9);
|
||||
} else {
|
||||
modelData = dComIfG_getObjectRes("E_MD", 9);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 9);
|
||||
}
|
||||
|
||||
JUT_ASSERT(180, modelData != NULL);
|
||||
@@ -74,19 +74,20 @@ int daE_MD_c::CreateHeap() {
|
||||
}
|
||||
|
||||
if (mType == TYPE_DUMMY) {
|
||||
modelData = dComIfG_getObjectRes("E_MD", 0xD);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 0xD);
|
||||
mpYariModelMorf = JKR_NEW mDoExt_McaMorfSO((J3DModelData*)modelData, NULL, NULL, NULL, 2, 1.0f, 0, -1, NULL, 0x80000, 0x11000084);
|
||||
if (mpYariModelMorf == NULL || mpYariModelMorf->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
} else if (mType == TYPE_LV9) {
|
||||
modelData = dComIfG_getObjectRes("E_MD", 0xA);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 0xA);
|
||||
mpYariModelMorf = JKR_NEW mDoExt_McaMorfSO((J3DModelData*)modelData, NULL, NULL, NULL, 2, 1.0f, 0, -1, NULL, 0x80000, 0x11000084);
|
||||
if (mpYariModelMorf == NULL || mpYariModelMorf->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
mpTbModel = mDoExt_J3DModel__create((J3DModelData*)dComIfG_getObjectRes("E_MD", 0xC), 0x80000, 0x11000084);
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes("E_MD", 0xC);
|
||||
mpTbModel = mDoExt_J3DModel__create(modelData, 0x80000, 0x11000084);
|
||||
if (mpTbModel == NULL) {
|
||||
return 0;
|
||||
}
|
||||
@@ -126,8 +127,9 @@ void daE_MD_c::At_Check() {
|
||||
if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
|
||||
mAtInfo.mAttackPower = 0;
|
||||
}
|
||||
|
||||
u8 at_se = ((dCcD_GObjInf*)mAtInfo.mpCollider)->GetAtSe();
|
||||
|
||||
dCcD_GObjInf* collider = (dCcD_GObjInf*)mAtInfo.mpCollider;
|
||||
int at_se = collider->GetAtSe();
|
||||
if (mAtInfo.mpSound != NULL && mAtInfo.field_0x18 != 0) {
|
||||
mAtInfo.mpSound->startCollisionSE(dCcD_GObjInf::getHitSeID(at_se, 0), mAtInfo.field_0x18);
|
||||
}
|
||||
@@ -148,6 +150,10 @@ void daE_MD_c::CheckHit() {
|
||||
|
||||
cCcD_Obj* hit_obj = mCyl.GetTgHitObj();
|
||||
fopAc_ac_c* hit_actor = dCc_GetAc(hit_obj->GetAc());
|
||||
//TODO: probably a fakematch (debug)
|
||||
UNUSED(hit_obj);
|
||||
UNUSED(hit_actor);
|
||||
|
||||
if ((hit_obj->ChkAtType(AT_TYPE_IRON_BALL) || fopAcM_GetName(hit_actor) == PROC_E_TH_BALL || fopAcM_GetName(hit_actor) == PROC_B_TN) && (mType == TYPE_DUMMY || mType == TYPE_LV9)) {
|
||||
if (mAction == ACTION_WAIT) {
|
||||
mCyl.OffTgIronBallRebound();
|
||||
@@ -164,8 +170,8 @@ void daE_MD_c::CheckHit() {
|
||||
|
||||
mBreakTimer = 10;
|
||||
Z2GetAudioMgr()->seStart(Z2SE_OBJ_ARMOR_HIT, ¤t.pos, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
|
||||
u32 bu_params = (mSwbit << 0x18) | 0xFF0000 | 0x2FFF;
|
||||
|
||||
u32 bu_params = (mSwbit << 0x18) | 0xFF2FFF;
|
||||
if (mCanCreateBu && mType == TYPE_DUMMY) {
|
||||
fopAcM_create(PROC_E_BU, bu_params, ¤t.pos, fopAcM_GetRoomNo(this), &shape_angle, NULL, -1);
|
||||
}
|
||||
@@ -223,7 +229,7 @@ void daE_MD_c::HalfBreakAction() {
|
||||
}
|
||||
}
|
||||
|
||||
bool daE_MD_c::VibAction() {
|
||||
u8 daE_MD_c::VibAction() {
|
||||
shape_angle.x = field_0x5ca * cM_ssin(field_0x5ce);
|
||||
cLib_addCalcAngleS(&field_0x5cc, 0x10, 3.0f + nREG_F(3), 0x100, 0);
|
||||
field_0x5ce += field_0x5cc;
|
||||
@@ -313,7 +319,7 @@ int daE_MD_c::Execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daE_MD_c::Delete() {
|
||||
inline int daE_MD_c::Delete() {
|
||||
dComIfG_resDelete(&mPhase, "E_MD");
|
||||
if (heap != NULL) {
|
||||
mpModelMorf->stopZelAnime();
|
||||
@@ -384,7 +390,7 @@ static int daE_MD_Execute(daE_MD_c* i_this) {
|
||||
return i_this->Execute();
|
||||
}
|
||||
|
||||
int daE_MD_c::create() {
|
||||
inline int daE_MD_c::create() {
|
||||
fopAcM_ct(this, daE_MD_c);
|
||||
|
||||
int phase_state = dComIfG_resLoad(&mPhase, "E_MD");
|
||||
@@ -396,7 +402,7 @@ int daE_MD_c::create() {
|
||||
|
||||
mSwbit = (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
|
||||
u8 type = fopAcM_GetParam(this) & 0xFF;
|
||||
u8 type = fopAcM_GetParam(this) & 0x0FFFFFFF;
|
||||
if (type == 1) {
|
||||
mType = TYPE_DUMMY;
|
||||
mCanCreateBu = TRUE;
|
||||
@@ -428,7 +434,7 @@ int daE_MD_c::create() {
|
||||
mAcchCir.SetWall(100.0f, 10.0f);
|
||||
fopAcM_setCullSizeBox(this, -1500.0f, 0.0f, -1500.0f, 1000.0f, 1500.0f, 1500.0f);
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), NULL, NULL);
|
||||
|
||||
|
||||
cXyz sp1C(current.pos.x, 100.0f + current.pos.y, current.pos.z);
|
||||
if (fopAcM_gc_c::gndCheck(&sp1C)) {
|
||||
field_0x5bc = fopAcM_gc_c::getGroundY();
|
||||
@@ -458,18 +464,18 @@ static actor_method_class l_daE_MD_Method = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_E_MD = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
7, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_E_MD, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
sizeof(daE_MD_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
132, // mPriority
|
||||
&l_daE_MD_Method, // sub_method
|
||||
0x00044100, // mStatus
|
||||
fopAc_ENV_e, // mActorType
|
||||
fopAc_CULLBOX_CUSTOM_e, // cullType
|
||||
};
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
7, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_E_MD, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
sizeof(daE_MD_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
132, // mPriority
|
||||
&l_daE_MD_Method, // sub_method
|
||||
0x00044100, // mStatus
|
||||
fopAc_ENV_e, // mActorType
|
||||
fopAc_CULLBOX_CUSTOM_e, // cullType
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_MF_HIO_c : public JORReflexible {
|
||||
public:
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "d/d_camera.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_MK_HIO_c : public JORReflexible {
|
||||
public:
|
||||
|
||||
@@ -516,7 +516,7 @@ static void action(e_mk_bo_class* i_this) {
|
||||
sound = Z2SE_EN_MK_BOOM_FLY;
|
||||
}
|
||||
|
||||
actor->shape_angle.y += (s16) 0x2000;
|
||||
ANGLE_ADD(actor->shape_angle.y, 0x2000);
|
||||
|
||||
if ((i_this->counter & 7) == 0) {
|
||||
i_this->sound.startSound(sound, 0, -1);
|
||||
|
||||
@@ -313,7 +313,7 @@ static void e_mm_mt_drop(e_mm_mt_class* i_this) {
|
||||
if (wall_angle != 0x23) {
|
||||
wall_angle = i_this->enemy.current.angle.y - wall_angle;
|
||||
i_this->m_spin = wall_angle * (TREG_F(6) + -0.3f);
|
||||
i_this->enemy.current.angle.y += (s16)(0x8000 - (wall_angle << 1));
|
||||
ANGLE_ADD(i_this->enemy.current.angle.y, 0x8000 - (wall_angle << 1));
|
||||
if (i_this->m_acch.ChkWaterHit()) {
|
||||
mDoAud_seStart(Z2SE_EN_MM_MET_BOUND_WTR, &i_this->enemy.current.pos, (u32)(i_this->enemy.speed.y), 0);
|
||||
} else {
|
||||
@@ -489,7 +489,7 @@ static void action(e_mm_mt_class* i_this) {
|
||||
s16 playerAngleY = fopAcM_searchPlayerAngleY(actor);
|
||||
s16 playerAngleDelta = i_this->m_rotation.y - playerAngleY;
|
||||
if (playerAngleDelta > 0x4000 || playerAngleDelta < -0x4000) {
|
||||
playerAngleY += (s16)0x8000;
|
||||
ANGLE_ADD(playerAngleY, 0x8000);
|
||||
}
|
||||
cLib_addCalcAngleS2(&i_this->m_rotation.y, playerAngleY, 4, 0x100);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_MS_HIO_c : public JORReflexible {
|
||||
public:
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_procname.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
static bool hio_set;
|
||||
|
||||
@@ -416,7 +417,7 @@ static void e_nest_drop(e_nest_class* i_this) {
|
||||
if (wall_angle != 0x23) {
|
||||
s16 angle_delta = i_this->current.angle.y - wall_angle;
|
||||
i_this->mSpin = angle_delta * -0.3f;
|
||||
i_this->current.angle.y += (s16)(0x8000 - (angle_delta << 1));
|
||||
ANGLE_ADD(i_this->current.angle.y, 0x8000 - (angle_delta << 1));
|
||||
i_this->speedF *= 0.5f;
|
||||
i_this->mTimers[1] = 10;
|
||||
i_this->mSound.startSound(Z2SE_OBJ_HACHINOSU_BOUND, 0, -1);
|
||||
|
||||
@@ -373,8 +373,8 @@ static void e_nz_damage(e_nz_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, _GXColor* param_3,
|
||||
_GXColor* param_4, u8* param_5, f32* param_6) {
|
||||
static BOOL getPolyColor(cBgS_PolyInfo& param_1, int param_2, GXColor* param_3,
|
||||
GXColor* param_4, u8* param_5, f32* param_6) {
|
||||
if (!dComIfG_Bgsp().ChkPolySafe(param_1)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+23
-18
@@ -14,6 +14,7 @@
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
enum OC_ACTIONS {
|
||||
@@ -139,7 +140,7 @@ int daE_OC_c::ctrlJoint(J3DJoint* i_joint, J3DModel* param_1) {
|
||||
mDoMtx_stack_c::YrotM(field_0x6d0);
|
||||
}
|
||||
param_1->setAnmMtx(jnt_no, mDoMtx_stack_c::get());
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
|
||||
cMtx_copy(mDoMtx_stack_c::get(), J3DSys::mCurrentMtx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -714,17 +715,17 @@ void daE_OC_c::damage_check() {
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_IRON_BALL)) {
|
||||
my_val = 5;
|
||||
if (dComIfGp_checkPlayerStatus0(0,0x400)) {
|
||||
health += (s16) 140;
|
||||
S16_ADD(health, 140);
|
||||
} else {
|
||||
health += (s16) 80;
|
||||
S16_ADD(health, 80);
|
||||
}
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_BOOMERANG)) {
|
||||
my_val = 4;
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_40)) {
|
||||
health += (s16) 10;
|
||||
S16_ADD(health, 10);
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_SLINGSHOT)) {
|
||||
if (mName == "E_OC") {
|
||||
health -= (s16) 5;
|
||||
S16_SUB(health, 5);
|
||||
if (health < 0) {
|
||||
health = 0;
|
||||
mSound.startCollisionSE(0x40007,0x20);
|
||||
@@ -1487,22 +1488,26 @@ void daE_OC_c::executeAttack() {
|
||||
current.pos.x += (my_float - field_0x6a0) * cM_ssin(shape_angle.y);
|
||||
current.pos.z += (my_float - field_0x6a0) * cM_scos(shape_angle.y);
|
||||
field_0x6a0 = my_float;
|
||||
if (mpMorf->isStop()) {
|
||||
setBck(0x1c, 2, 5.0f, 1.0f);
|
||||
mSound.startCreatureVoice(Z2SE_EN_OC_V_WAIT_ST, -1);
|
||||
if (field_0x6e3) {
|
||||
setActionMode(E_OC_ACTION_MOVE_OUT, 0);
|
||||
} else {
|
||||
if (field_0x6ca && fopAcM_searchPlayerDistance(this) < 500.0f) {
|
||||
if (abs(shape_angle.y - fopAcM_searchPlayerAngleY(this)) < 0x1000) {
|
||||
mOcState = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!mpMorf->isStop()) {
|
||||
break;
|
||||
}
|
||||
|
||||
setActionMode(E_OC_ACTION_FIND, 0);
|
||||
setBck(0x1c, 2, 5.0f, 1.0f);
|
||||
mSound.startCreatureVoice(Z2SE_EN_OC_V_WAIT_ST, -1);
|
||||
if (field_0x6e3) {
|
||||
setActionMode(E_OC_ACTION_MOVE_OUT, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (field_0x6ca && fopAcM_searchPlayerDistance(this) < 500.0f) {
|
||||
if (abs(shape_angle.y - fopAcM_searchPlayerAngleY(this)) < 0x1000) {
|
||||
mOcState = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setActionMode(E_OC_ACTION_FIND, 0);
|
||||
int _; // forces b in dbg asm
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <types.h>
|
||||
|
||||
#include "d/actor/d_a_e_oct_bg.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
@@ -280,9 +280,9 @@ void daE_OT_c::executeEgg() {
|
||||
speed.y = 50.0f + cM_rndFX(10.0f);
|
||||
current.angle.y = mpToadActor->shape_angle.y;
|
||||
if (mChildNo < 5 || (mChildNo >= 10 && mChildNo < 15)) {
|
||||
current.angle.y += (s16)(0x4000 + cM_rndFX(0x1000));
|
||||
ANGLE_ADD(current.angle.y, 0x4000 + cM_rndFX(0x1000));
|
||||
} else {
|
||||
current.angle.y += (s16)(-0x4000 + cM_rndFX(0x1000));
|
||||
ANGLE_ADD(current.angle.y, -0x4000 + cM_rndFX(0x1000));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#define PH_BMD 20
|
||||
|
||||
@@ -617,9 +618,9 @@ void daE_PH_c::StopAction() {
|
||||
switch (mCAction) {
|
||||
case 0:
|
||||
if (mAnmID == ANM_HANG_WAIT || mAnmID == ANM_HANG_START) {
|
||||
mHeadRotX += (s16)(field_0x612 + 0x1000);
|
||||
ANGLE_ADD(mHeadRotX, field_0x612 + 0x1000);
|
||||
} else {
|
||||
mHeadRotX += (s16)(field_0x612 + 0x500);
|
||||
ANGLE_ADD(mHeadRotX, field_0x612 + 0x500);
|
||||
}
|
||||
|
||||
mSound.startCreatureSoundLevel(Z2SE_EN_PH_PROPELLER, field_0x612 + 0x500, -1);
|
||||
|
||||
@@ -2452,7 +2452,7 @@ void daE_PM_c::At_Check() {
|
||||
}
|
||||
|
||||
if ((s16)mAtInfo.mAttackPower > 0) {
|
||||
health -= (s16)mAtInfo.mAttackPower;
|
||||
S16_SUB(health, mAtInfo.mAttackPower);
|
||||
}
|
||||
|
||||
u32 pause_timer = 0;
|
||||
|
||||
+13
-12
@@ -12,6 +12,7 @@
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
static s16 mAttackNo = 3;
|
||||
@@ -1864,21 +1865,21 @@ static void e_po_holl_demo(e_po_class* i_this) {
|
||||
i_this->field_0x7DE += 1;
|
||||
i_this->field_0x7E2 += 1;
|
||||
if (mArg0Check(i_this, 7) != 0) {
|
||||
a_this->current.angle.x += (s16)(400.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
a_this->current.angle.y += (s16)(500.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
a_this->current.angle.z += (s16)(500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_ADD(a_this->current.angle.x, 400.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
ANGLE_ADD(a_this->current.angle.y, 500.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_ADD(a_this->current.angle.z, 500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
} else if (mArg0Check(i_this, 8) != 0) {
|
||||
a_this->current.angle.x += (s16)(-400.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
a_this->current.angle.y += (s16)(500.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
a_this->current.angle.z += (s16)(500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_ADD(a_this->current.angle.x, -400.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
ANGLE_ADD(a_this->current.angle.y, 500.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_ADD(a_this->current.angle.z, 500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
} else if (mArg0Check(i_this, 9) != 0) {
|
||||
a_this->current.angle.x -= (s16)(200.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
a_this->current.angle.y -= (s16)(1000.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
a_this->current.angle.z -= (s16)(500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_SUB(a_this->current.angle.x, 200.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
ANGLE_SUB(a_this->current.angle.y, 1000.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_SUB(a_this->current.angle.z, 500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
} else {
|
||||
a_this->current.angle.x -= (s16)(100.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
a_this->current.angle.y -= (s16)(100.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
a_this->current.angle.z -= (s16)(500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_SUB(a_this->current.angle.x, 100.0f * cM_ssin(1000.0f * i_this->field_0x7DE));
|
||||
ANGLE_SUB(a_this->current.angle.y, 100.0f * cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
ANGLE_SUB(a_this->current.angle.z, 500.0f * -cM_scos(1000.0f * i_this->field_0x7E2));
|
||||
}
|
||||
if (i_this->field_0x74A[2] != 0) {
|
||||
break;
|
||||
|
||||
@@ -626,7 +626,7 @@ static void e_rb_base_1(e_rb_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->field_0xa64 != 0) {
|
||||
i_this->field_0xa4e += (s16)(AREG_S(6) + 300);
|
||||
ANGLE_ADD(i_this->field_0xa4e, AREG_S(6) + 300);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
+2751
-2748
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_RDB_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -251,8 +252,8 @@ static void e_rdb_fight(e_rdb_class* i_this) {
|
||||
i_this->field_0x6c8 = 1;
|
||||
}
|
||||
|
||||
static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, _GXColor* p_effPrim,
|
||||
_GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) {
|
||||
static int getPolyColor(cBgS_PolyInfo& i_polyInfo, int param_2, GXColor* p_effPrim,
|
||||
GXColor* p_effEnv, u8* p_alpha, f32* p_ratio) {
|
||||
if (dComIfG_Bgsp().ChkPolySafe(i_polyInfo) == 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -300,7 +301,7 @@ static void e_rdb_attack(e_rdb_class* i_this) {
|
||||
if (frame == 68) {
|
||||
u8 i_alpha;
|
||||
f32 i_ratio;
|
||||
_GXColor i_effPrim, i_effEnv;
|
||||
GXColor i_effPrim, i_effEnv;
|
||||
if (getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) !=
|
||||
0)
|
||||
{
|
||||
@@ -394,7 +395,7 @@ static void e_rdb_spin_attack(e_rdb_class* i_this) {
|
||||
cLib_addCalc0(&i_this->enemy.speedF, 1.0f, 3.0f);
|
||||
u8 i_alpha;
|
||||
f32 i_ratio;
|
||||
_GXColor i_effPrim, i_effEnv;
|
||||
GXColor i_effPrim, i_effEnv;
|
||||
if (iVar1 != 0 &&
|
||||
getPolyColor(i_this->mAcch.m_gnd, 0, &i_effPrim, &i_effEnv, &i_alpha, &i_ratio) != 0)
|
||||
{
|
||||
@@ -1296,8 +1297,8 @@ static void demo_camera(e_rdb_class* i_this) {
|
||||
if (i_this->field_0x10aa >= 40) {
|
||||
e_rd_class* bulblin_p = (e_rd_class*)fopAcM_SearchByName(PROC_E_RD);
|
||||
if (bulblin_p != NULL) {
|
||||
a_this->current.pos = bulblin_p->actor.current.pos;
|
||||
a_this->eyePos = bulblin_p->actor.eyePos;
|
||||
a_this->current.pos = bulblin_p->enemy.current.pos;
|
||||
a_this->eyePos = bulblin_p->enemy.eyePos;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+14
-13
@@ -19,6 +19,7 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_RDY_HIO_c : public JORReflexible {
|
||||
public:
|
||||
@@ -683,7 +684,7 @@ static BOOL way_check(e_rdy_class* i_this) {
|
||||
dBgS_LinChk lin_chk;
|
||||
lin_chk.Set(&start, &end, _this);
|
||||
if (dComIfG_Bgsp().LineCross(&lin_chk)) {
|
||||
ADD_ANGLE_2(angle, 0x1000);
|
||||
ANGLE_ADD_2(angle, 0x1000);
|
||||
} else {
|
||||
i_this->mTargetAngleY = angle;
|
||||
return TRUE;
|
||||
@@ -1165,7 +1166,7 @@ static void e_rdy_bow_run(e_rdy_class* i_this) {
|
||||
|
||||
case 1:
|
||||
target_speed = run_speed;
|
||||
ADD_ANGLE_2(target_angle, 0x8000);
|
||||
ANGLE_ADD_2(target_angle, 0x8000);
|
||||
if (i_this->mPlayerDist > l_HIO.field_0x28 || i_this->mTimer[0] == 0
|
||||
|| i_this->mAcch.ChkWallHit())
|
||||
{
|
||||
@@ -1933,7 +1934,7 @@ static void e_rdy_bomb_action(e_rdy_class* i_this) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
ADD_ANGLE_2(target_angle, 0x8000);
|
||||
ANGLE_ADD_2(target_angle, 0x8000);
|
||||
target_speed = l_HIO.mRunSpeed;
|
||||
if (JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z) > 600.0f) {
|
||||
i_this->mMode = 3;
|
||||
@@ -2158,10 +2159,10 @@ static void e_rdy_damage(e_rdy_class* i_this) {
|
||||
OS_REPORT(" ..KADO KABE ..%x\n", check);
|
||||
if (check == 2) {
|
||||
i_this->field_0xac6 = 0x1000;
|
||||
i_this->field_0xadc.y += (s16)(TREG_S(8) - 7000);
|
||||
ANGLE_ADD(i_this->field_0xadc.y, TREG_S(8) - 7000);
|
||||
} else {
|
||||
i_this->field_0xac6 = -0x1000;
|
||||
i_this->field_0xadc.y += (s16)-(TREG_S(8) - 7000);
|
||||
ANGLE_ADD(i_this->field_0xadc.y, -(TREG_S(8) - 7000));
|
||||
}
|
||||
i_this->field_0xb88 = 8000.0f + BREG_F(10);
|
||||
i_this->field_0xaf4 = 100.0f + BREG_F(4);
|
||||
@@ -2171,7 +2172,7 @@ static void e_rdy_damage(e_rdy_class* i_this) {
|
||||
i_this->mMode = 10;
|
||||
a_this->speed.y = 0.0f;
|
||||
i_this->field_0xabc *= 0.2f;
|
||||
ADD_ANGLE_2(i_this->field_0xadc.y, 0x8000);
|
||||
ANGLE_ADD_2(i_this->field_0xadc.y, 0x8000);
|
||||
i_this->field_0xbc0 = 5 + BREG_S(7);
|
||||
i_this->field_0xaf4 = 100.0f + BREG_F(4);
|
||||
i_this->field_0xafc = 100.0f + BREG_F(5);
|
||||
@@ -2261,7 +2262,7 @@ static void e_rdy_damage(e_rdy_class* i_this) {
|
||||
case 3:
|
||||
if (body_gake(i_this)) {
|
||||
i_this->field_0xabc = -20.0f + VREG_F(8);
|
||||
i_this->field_0xadc.x -= (s16)(VREG_S(7) + 0x300);
|
||||
ANGLE_SUB(i_this->field_0xadc.x, VREG_S(7) + 0x300);
|
||||
}
|
||||
if (a_this->health <= 0 && i_this->mTimer[1] == 0) {
|
||||
rd_disappear(i_this);
|
||||
@@ -2416,7 +2417,7 @@ static s16 gake_check(e_rdy_class* i_this, f32 i_dist) {
|
||||
return angle_y;
|
||||
}
|
||||
}
|
||||
angle_y += (s16)0x1000;
|
||||
ANGLE_ADD(angle_y, 0x1000);
|
||||
}
|
||||
return _this->shape_angle.y;
|
||||
}
|
||||
@@ -3526,13 +3527,13 @@ static void action(e_rdy_class* i_this) {
|
||||
i_this->field_0xb44[1].x = i_this->field_0xafc * cM_scos(i_this->field_0xb00) * (70.0f + BREG_F(0));
|
||||
i_this->field_0xb44[2].x += i_this->field_0xb44[1].x;
|
||||
cLib_addCalc0(&i_this->field_0xafc, 1.0f, 3.0f + BREG_F(1));
|
||||
i_this->field_0xb00 += (s16)(4000 + BREG_S(0));
|
||||
ANGLE_ADD(i_this->field_0xb00, 4000 + BREG_S(0));
|
||||
}
|
||||
|
||||
if (fabsf(i_this->field_0xaf4) > 1.0f) {
|
||||
i_this->field_0xb44[0].x = i_this->field_0xaf4 * cM_scos(i_this->field_0xaf8) * (70.0f + BREG_F(2));
|
||||
cLib_addCalc0(&i_this->field_0xaf4, 1.0f, 3.0f + BREG_F(3));
|
||||
i_this->field_0xaf8 += (s16)(4000 + BREG_S(1));
|
||||
ANGLE_ADD(i_this->field_0xaf8, 4000 + BREG_S(1));
|
||||
}
|
||||
|
||||
if (a_this->speed.y < 0.0f && i_this->mAcch.ChkGroundHit()) {
|
||||
@@ -4218,7 +4219,7 @@ static void demo_camera(e_rdy_class* i_this) {
|
||||
i_this->mCamEye += player->current.pos;
|
||||
i_this->mCamCenter = player->current.pos;
|
||||
i_this->mCamCenter.y += 100.0f + NREG_F(10);
|
||||
i_this->field_0x13d4 += (s16)(230 + NREG_S(2));
|
||||
ANGLE_ADD(i_this->field_0x13d4, 230 + NREG_S(2));
|
||||
if (i_this->mDemoTimer >= 30) {
|
||||
if (i_this->mDemoTimer == 30) {
|
||||
i_this->mMsgFlow.init(a_this, 0x7d1, 0, NULL);
|
||||
@@ -4687,8 +4688,8 @@ static int daE_RDY_Execute(e_rdy_class* i_this) {
|
||||
arrow_angle.x = -cM_atan2s(vec1.y, JMAFastSqrt(vec1.x * vec1.x + vec1.z * vec1.z));
|
||||
if (strcmp(dComIfGp_getStartStageName(), "F_SP121") && !i_this->field_0x1366) {
|
||||
// Not Hyrule Field
|
||||
arrow_angle.x += (s16)(cM_rndFX(200.0f) + -500.0f);
|
||||
arrow_angle.y += (s16)cM_rndFX(100.0f);
|
||||
ANGLE_ADD(arrow_angle.x, cM_rndFX(200.0f) + -500.0f);
|
||||
ANGLE_ADD(arrow_angle.y, cM_rndFX(100.0f));
|
||||
}
|
||||
}
|
||||
arrow_angle.z = 0;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "d/d_s_play.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_S1_HIO_c {
|
||||
public:
|
||||
|
||||
@@ -1048,7 +1048,7 @@ int daE_SB_c::Draw() {
|
||||
mpMorf->entryDL();
|
||||
cXyz my_vec;
|
||||
my_vec.set(current.pos.x, 100.0f + current.pos.y, current.pos.z);
|
||||
_GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
mShadowKey = dComIfGd_setShadow(mShadowKey, 1, model, &my_vec, 1000.0f, 300.0f,
|
||||
current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd,
|
||||
&tevStr, 0, 1.0f, tex_obj);
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
enum E_sf_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -93,7 +93,7 @@ static int daE_SG_Draw(e_sg_class* i_this) {
|
||||
cXyz shadow_pos(i_this->current.pos.x, i_this->current.pos.y + 100.0f,
|
||||
i_this->current.pos.z);
|
||||
|
||||
_GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
GXTexObj* tex_obj = dDlst_shadowControl_c::getSimpleTex();
|
||||
|
||||
i_this->mShadowKey =
|
||||
dComIfGd_setShadow(i_this->mShadowKey, 1, i_this->mpModel, &shadow_pos, 400.0f, 0.0f,
|
||||
@@ -700,7 +700,7 @@ static void e_sg_drop(e_sg_class* i_this) {
|
||||
i_this->mRotationTarget = -0x8000;
|
||||
}
|
||||
|
||||
i_this->current.angle.y += (s16)cM_rndFX(15000.0f);
|
||||
ANGLE_ADD(i_this->current.angle.y, cM_rndFX(15000.0f));
|
||||
i_this->mSound.startCreatureSound(Z2SE_EN_SG_BOUND, 0, -1);
|
||||
}
|
||||
|
||||
|
||||
@@ -1160,7 +1160,7 @@ static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
static int daE_SH_Create(fopAc_ac_c* i_this) {
|
||||
static dCcD_SrcSph cc_sph_src = {
|
||||
{
|
||||
{0x0, {{0x0, 0x0, 0x0}, {(s32)0xd8fbfdff, 0x3}, 0x75}}, // mObj
|
||||
{0x0, {{0x0, 0x0, 0x0}, {0xd8fbfdff, 0x3}, 0x75}}, // mObj
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjAt
|
||||
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x2}, // mGObjTg
|
||||
{0x0}, // mGObjCo
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/actor/d_a_arrow.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
enum E_SM_RES_File_ID {
|
||||
/* BCK */
|
||||
@@ -242,7 +243,7 @@ void daE_SM_c::ArrowCheck() {
|
||||
}
|
||||
|
||||
void daE_SM_c::E_SM_Damage() {
|
||||
field_0x6bc += (s16)((field_0x980 + 1000.0f) / field_0x6f0);
|
||||
ANGLE_ADD(field_0x6bc, (field_0x980 + 1000.0f) / field_0x6f0);
|
||||
mCoSm.OffAtSetBit();
|
||||
|
||||
if (field_0x6c0[0] != 0) {
|
||||
@@ -254,7 +255,7 @@ void daE_SM_c::E_SM_Damage() {
|
||||
fVar1 = field_0x978;
|
||||
}
|
||||
|
||||
field_0x6be += (s16)(3000.0f / field_0x6f0);
|
||||
ANGLE_ADD(field_0x6be, 3000.0f / field_0x6f0);
|
||||
cLib_addCalc2(&field_0x6e4, field_0x974, 0.3f, 1.0f);
|
||||
cLib_addCalc2(&field_0x6e0, fVar1 + 1.0f, 0.3f, 1.0f);
|
||||
cLib_addCalc2(&field_0x6dc, field_0x97c + 0.005f, 0.05f, 0.5f);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
class daE_SM2_HIO_c : public fOpAcm_HIO_entry_c {
|
||||
public:
|
||||
@@ -1276,7 +1277,8 @@ static void action(e_sm2_class* i_this) {
|
||||
static f32 asp[] = {500.0f, 400.0f, 300.0f, 200.0f, 100.0f};
|
||||
static f32 asp2[] = {3500.0f, 3000.0f, 2500.0f, 2000.0f, 1500.0f};
|
||||
|
||||
i_this->field_0x828 += (s16)(asp2[i_this->sizetype] + (i_this->field_0x82c * asp[i_this->sizetype]));
|
||||
ANGLE_ADD(i_this->field_0x828,
|
||||
asp2[i_this->sizetype] + (i_this->field_0x82c * asp[i_this->sizetype]));
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (i_this->action != ACTION_FAIL) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
enum E_st_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -35,7 +35,7 @@ static void chain_draw(e_th_ball_class* i_this) {
|
||||
|
||||
rot_z = var_r28 * 3000;
|
||||
if (var_r28 & 1) {
|
||||
rot_z += (s16)0x4000;
|
||||
ANGLE_ADD(rot_z, 0x4000);
|
||||
}
|
||||
cMtx_ZrotM(*calc_mtx, rot_z);
|
||||
MtxScale(size, size, size, 1);
|
||||
@@ -57,7 +57,7 @@ static void chain_draw(e_th_ball_class* i_this) {
|
||||
|
||||
rot_z = var_r28 * 3000;
|
||||
if (var_r28 & 1) {
|
||||
rot_z += (s16)0x4000;
|
||||
ANGLE_ADD(rot_z, 0x4000);
|
||||
}
|
||||
cMtx_ZrotM(*calc_mtx, rot_z);
|
||||
MtxScale(size, size, size, 1);
|
||||
@@ -78,7 +78,7 @@ static void chain_draw(e_th_ball_class* i_this) {
|
||||
|
||||
rot_z = var_r28 * 3000;
|
||||
if (var_r28 & 1) {
|
||||
rot_z += (s16)0x4000;
|
||||
ANGLE_ADD(rot_z, 0x4000);
|
||||
}
|
||||
cMtx_ZrotM(*calc_mtx, rot_z);
|
||||
MtxScale(size, size, size, 1);
|
||||
@@ -462,7 +462,7 @@ static void normal_move(e_th_ball_class* i_this, s8 param_1) {
|
||||
|
||||
a_this->speed.y -= 5.0f;
|
||||
if (param_1 != 0) {
|
||||
a_this->current.angle.x += (s16)(200.0f * a_this->speedF);
|
||||
ANGLE_ADD(a_this->current.angle.x, 200.0f * a_this->speedF);
|
||||
}
|
||||
|
||||
f32 y_speed = a_this->speed.y;
|
||||
@@ -655,7 +655,7 @@ static void e_th_ball_shot(e_th_ball_class* i_this) {
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.y, spE, 1, 0x4000);
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.x, 0, 1, 0x4000);
|
||||
} else if (temp_f31 > 0.0f) {
|
||||
i_this->current.angle.y += (s16)cM_rndFX(4000.0f);
|
||||
ANGLE_ADD(i_this->current.angle.y, cM_rndFX(4000.0f));
|
||||
i_this->speed.y = 20.0f + AREG_F(5);
|
||||
}
|
||||
|
||||
@@ -674,7 +674,7 @@ static void e_th_ball_shot(e_th_ball_class* i_this) {
|
||||
|
||||
if (wall_angle != 35) {
|
||||
s16 spA = i_this->current.angle.y - wall_angle;
|
||||
i_this->current.angle.y += (s16)(0x8000 - (spA * 2));
|
||||
ANGLE_ADD(i_this->current.angle.y, 0x8000 - (spA * 2));
|
||||
i_this->speedF *= 0.3f + AREG_F(14);
|
||||
} else {
|
||||
i_this->current.angle.y -= 0x8000;
|
||||
@@ -738,7 +738,7 @@ static void e_th_ball_return(e_th_ball_class* i_this) {
|
||||
i_this->speed.y = 0.0f;
|
||||
i_this->speedF = 10.0f;
|
||||
i_this->mMode = 3;
|
||||
i_this->current.angle.y += (s16)cM_rndFX(6000.0f);
|
||||
ANGLE_ADD(i_this->current.angle.y, cM_rndFX(6000.0f));
|
||||
} else if (fabsf(i_this->speedF) < 0.1f) {
|
||||
i_this->mMode = 3;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ static void e_tk_find(e_tk_class* i_this) {
|
||||
break;
|
||||
|
||||
case MODE_TK_SWIM:
|
||||
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
|
||||
ANGLE_ADD(i_this->mPlayerAngleY, 0x8000);
|
||||
i_this->mAttentionOFF = true;
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->mAnimSpeed = 4.0f;
|
||||
@@ -343,7 +343,7 @@ static void e_tk_find(e_tk_class* i_this) {
|
||||
}
|
||||
}
|
||||
if (i_this->mActionTimer[1] == 0) {
|
||||
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
|
||||
ANGLE_ADD(i_this->mPlayerAngleY, 0x8000);
|
||||
} else {
|
||||
i_this->mPlayerAngleY = i_this->mSomeAngle;
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ static void e_tk2_find(e_tk2_class* i_this) {
|
||||
break;
|
||||
|
||||
case MODE_TK2_SWIM:
|
||||
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
|
||||
ANGLE_ADD(i_this->mPlayerAngleY, 0x8000);
|
||||
i_this->mAttentionOFF = true;
|
||||
if (i_this->mpMorf->isStop()) {
|
||||
i_this->mAnimSpeed = 4.0f;
|
||||
@@ -268,7 +268,7 @@ static void e_tk2_find(e_tk2_class* i_this) {
|
||||
}
|
||||
}
|
||||
if (i_this->mActionTimer[1] == 0) {
|
||||
ADD_ANGLE(i_this->mPlayerAngleY, 0x8000);
|
||||
ANGLE_ADD(i_this->mPlayerAngleY, 0x8000);
|
||||
} else {
|
||||
i_this->mPlayerAngleY = i_this->mSomeAngle;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ static void impact_eff_set(e_tk_ball_class* i_this) {
|
||||
cXyz scale(2.0f + TREG_F(8), 2.0f + TREG_F(8), 2.0f + TREG_F(8));
|
||||
|
||||
csXyz rotation = actor->current.angle;
|
||||
ADD_ANGLE(rotation.y, 0x8000);
|
||||
ANGLE_ADD(rotation.y, 0x8000);
|
||||
|
||||
if (i_this->mType == TYPE_TK_BALL_WATER) {
|
||||
dComIfGp_particle_set(0x819B, &pos, &rotation, &scale);
|
||||
@@ -157,7 +157,7 @@ static void e_tk_ball_move(e_tk_ball_class* i_this) {
|
||||
if (actor_lockon && daPy_getPlayerActorClass()->getCutType() != daPy_py_c::CUT_TYPE_NONE) {
|
||||
i_this->mAction = ACT_TK_BALL_RETURN;
|
||||
i_this->mMode = MODE_TK_BALL_INIT;
|
||||
ADD_ANGLE(actor->current.angle.y, 0x8000);
|
||||
ANGLE_ADD(actor->current.angle.y, 0x8000);
|
||||
} else {
|
||||
i_this->mAction = ACT_TK_BALL_DROP;
|
||||
i_this->mMode = MODE_TK_BALL_INIT;
|
||||
@@ -335,8 +335,8 @@ static int daE_TK_BALL_Execute(e_tk_ball_class* i_this) {
|
||||
|
||||
action(i_this);
|
||||
|
||||
ADD_ANGLE(actor->shape_angle.y, 0x1000);
|
||||
ADD_ANGLE(actor->shape_angle.x, 0xE00);
|
||||
ANGLE_ADD(actor->shape_angle.y, 0x1000);
|
||||
ANGLE_ADD(actor->shape_angle.x, 0xE00);
|
||||
|
||||
mDoMtx_stack_c::transS(actor->current.pos.x, actor->current.pos.y + i_this->mArcHeight,
|
||||
actor->current.pos.z);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user