mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-29 15:23:01 -04:00
Merge branch 'main' into 26-03-28-movie-player
This commit is contained in:
@@ -54,6 +54,10 @@
|
||||
#include "res/Object/Alink.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
bool dusk::tweaks::FastIronBoots = false;
|
||||
#endif
|
||||
|
||||
static int daAlink_Create(fopAc_ac_c* i_this);
|
||||
static int daAlink_Delete(daAlink_c* i_this);
|
||||
static int daAlink_Execute(daAlink_c* i_this);
|
||||
@@ -7509,6 +7513,11 @@ void daAlink_c::setBlendMoveAnime(f32 i_morf) {
|
||||
f32 sp28 = mpHIO->mMove.m.mFootPositionRatio;
|
||||
BOOL sp24 = checkEventRun();
|
||||
BOOL sp20 = checkBootsMoveAnime(1);
|
||||
#if TARGET_PC
|
||||
if (dusk::tweaks::FastIronBoots) {
|
||||
sp20 = FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
f32 var_f29;
|
||||
|
||||
@@ -9469,6 +9478,11 @@ void daAlink_c::setStickData() {
|
||||
} else {
|
||||
mHeavySpeedMultiplier = mpHIO->mItem.mIronBoots.m.mInputFactor;
|
||||
}
|
||||
#if TARGET_PC
|
||||
if (dusk::tweaks::FastIronBoots) {
|
||||
mHeavySpeedMultiplier = 1.0f;
|
||||
}
|
||||
#endif
|
||||
mStickValue *= mHeavySpeedMultiplier;
|
||||
} else if (checkBootsOrArmorHeavy()) {
|
||||
if (checkZoraWearAbility()) {
|
||||
@@ -9476,6 +9490,11 @@ void daAlink_c::setStickData() {
|
||||
} else {
|
||||
mHeavySpeedMultiplier = mpHIO->mItem.mIronBoots.m.mWaterInputFactor;
|
||||
}
|
||||
#if TARGET_PC
|
||||
if (dusk::tweaks::FastIronBoots) {
|
||||
mHeavySpeedMultiplier = 1.0f;
|
||||
}
|
||||
#endif
|
||||
mStickValue *= mHeavySpeedMultiplier;
|
||||
} else if ((checkWolf() && field_0x2fbc == 11 && checkWaterPolygonUnder()) ||
|
||||
mGndPolyAtt0 == 11)
|
||||
|
||||
@@ -976,7 +976,7 @@ void daBgObj_c::setSe() {
|
||||
temp++;
|
||||
|
||||
for (; i != 0; i--) {
|
||||
fopAcM_seStart(this, *temp, 0);
|
||||
fopAcM_seStart(this, *(BE(u32)*)temp, 0);
|
||||
temp++;
|
||||
}
|
||||
}
|
||||
|
||||
+514
-509
File diff suppressed because it is too large
Load Diff
+10
-10
@@ -189,8 +189,8 @@ int daE_OC_c::draw() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daE_OC_Draw(daE_OC_c* i_this) {
|
||||
i_this->draw();
|
||||
static int daE_OC_Draw(daE_OC_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
daE_OC_c* E_OC_n::m_battle_oc;
|
||||
@@ -2639,12 +2639,12 @@ int daE_OC_c::execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daE_OC_Execute(daE_OC_c* i_this) {
|
||||
i_this->execute();
|
||||
static int daE_OC_Execute(daE_OC_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
static BOOL daE_OC_IsDelete(daE_OC_c* param_0) {
|
||||
return TRUE;
|
||||
static int daE_OC_IsDelete(daE_OC_c* param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daE_OC_c::_delete() {
|
||||
@@ -2662,9 +2662,9 @@ int daE_OC_c::_delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daE_OC_Delete(daE_OC_c* i_this) {
|
||||
static int daE_OC_Delete(daE_OC_c* i_this) {
|
||||
fopAcM_RegisterDeleteID(i_this, "E_OC");
|
||||
i_this->_delete();
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
int daE_OC_c::CreateHeap() {
|
||||
@@ -2833,8 +2833,8 @@ cPhs_Step daE_OC_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
static void daE_OC_Create(daE_OC_c* i_this) {
|
||||
i_this->create();
|
||||
static int daE_OC_Create(daE_OC_c* i_this) {
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daE_OC_Method = {
|
||||
|
||||
+201
-181
@@ -10,6 +10,10 @@
|
||||
#include <cmath>
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
|
||||
#define PLAYER_NOT_FOUND 0
|
||||
#define PLAYER_TARGET 1
|
||||
#define PLAYER_NEAR 2
|
||||
|
||||
class daE_WS_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daE_WS_HIO_c();
|
||||
@@ -28,6 +32,7 @@ public:
|
||||
/* 0x24 */ u8 debug_ON;
|
||||
};
|
||||
|
||||
|
||||
namespace {
|
||||
static dCcD_SrcSph cc_ws_src = {
|
||||
{
|
||||
@@ -66,13 +71,27 @@ daE_WS_HIO_c::daE_WS_HIO_c() {
|
||||
attack_speed = 10.0f;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
void daE_WS_HIO_c::genMessage(JORMContext* ctx) {
|
||||
ctx->genLabel("スタルウォーーーーーーーール", 0x80000001);
|
||||
ctx->genSlider("基本サイズ", &base_size, 0.0f, 5.0f);
|
||||
ctx->genSlider("サーチ角度", &search_angle, 0.0f, 30000.0f);
|
||||
ctx->genSlider("攻撃速度", &attack_speed, 0.0f, 100.0f);
|
||||
ctx->genSlider("移動範囲", &move_range, 0.0f, 1000.0f);
|
||||
ctx->genSlider("サーチ範囲", &search_range, 0.0f, 1000.0f);
|
||||
ctx->genSlider("サーチY上下範囲", &search_y_range, 0.0f, 1000.0f);
|
||||
ctx->genSlider("地面までの距離", &dist_to_ground, 0.0f, 1000.0f);
|
||||
ctx->genCheckBox("デバック表示", &debug_ON, 0x1);
|
||||
}
|
||||
#endif
|
||||
|
||||
int daE_WS_c::draw() {
|
||||
J3DModel* model_p = mpModelMorf->getModel();
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model_p, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(model, &tevStr);
|
||||
|
||||
if (mDownColor) {
|
||||
J3DModelData* modelData_p = model_p->getModelData();
|
||||
J3DModelData* modelData_p = model->getModelData();
|
||||
for (u16 i = 0; i < modelData_p->getMaterialNum(); i++) {
|
||||
J3DMaterial* material_p = modelData_p->getMaterialNodePointer(i);
|
||||
material_p->getTevColor(0)->r = mDownColor;
|
||||
@@ -81,48 +100,48 @@ int daE_WS_c::draw() {
|
||||
}
|
||||
}
|
||||
|
||||
mpModelMorf->entryDL();
|
||||
mAnm_p->entryDL();
|
||||
|
||||
cXyz sp8;
|
||||
sp8.set(current.pos.x, 100.0f + current.pos.y, current.pos.z);
|
||||
mShadowId = dComIfGd_setShadow(mShadowId, 1, model_p, &sp8, 400.0f, 0.0f, current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
|
||||
mShadowId = dComIfGd_setShadow(mShadowId, 1, model, &sp8, 400.0f, 0.0f, current.pos.y, mAcch.GetGroundH(), mAcch.m_gnd, &tevStr, 0, 1.0f, dDlst_shadowControl_c::getSimpleTex());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daE_WS_Draw(daE_WS_c* a_this) {
|
||||
return a_this->draw();
|
||||
static int daE_WS_Draw(daE_WS_c* i_this) {
|
||||
return i_this->draw();
|
||||
}
|
||||
|
||||
void daE_WS_c::setBck(int i_anm, u8 i_mode, f32 i_morf, f32 i_speed) {
|
||||
mpModelMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_WS", i_anm), i_mode, i_morf, i_speed, 0.0f, -1.0f);
|
||||
mAnm_p->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("E_WS", i_anm), i_mode, i_morf, i_speed, 0.0f, -1.0f);
|
||||
}
|
||||
|
||||
void daE_WS_c::setFootSound() {
|
||||
if (mpModelMorf->getAnm() == dComIfG_getObjectRes("E_WS", 7)) {
|
||||
if (mpModelMorf->checkFrame(0.0f) ||
|
||||
mpModelMorf->checkFrame(4.5f) ||
|
||||
mpModelMorf->checkFrame(7.5f) ||
|
||||
mpModelMorf->checkFrame(9.0f) ||
|
||||
mpModelMorf->checkFrame(13.5f) ||
|
||||
mpModelMorf->checkFrame(16.0f) ||
|
||||
mpModelMorf->checkFrame(19.0f) ||
|
||||
mpModelMorf->checkFrame(23.5f) ||
|
||||
mpModelMorf->checkFrame(25.0f) ||
|
||||
mpModelMorf->checkFrame(28.0f) ||
|
||||
mpModelMorf->checkFrame(32.5f) ||
|
||||
mpModelMorf->checkFrame(36.0f) ||
|
||||
mpModelMorf->checkFrame(39.5f))
|
||||
if (mAnm_p->getAnm() == dComIfG_getObjectRes("E_WS", 7)) {
|
||||
if (mAnm_p->checkFrame(0.0f) ||
|
||||
mAnm_p->checkFrame(4.5f) ||
|
||||
mAnm_p->checkFrame(7.5f) ||
|
||||
mAnm_p->checkFrame(9.0f) ||
|
||||
mAnm_p->checkFrame(13.5f) ||
|
||||
mAnm_p->checkFrame(16.0f) ||
|
||||
mAnm_p->checkFrame(19.0f) ||
|
||||
mAnm_p->checkFrame(23.5f) ||
|
||||
mAnm_p->checkFrame(25.0f) ||
|
||||
mAnm_p->checkFrame(28.0f) ||
|
||||
mAnm_p->checkFrame(32.5f) ||
|
||||
mAnm_p->checkFrame(36.0f) ||
|
||||
mAnm_p->checkFrame(39.5f))
|
||||
{
|
||||
mSound.startCreatureSound(Z2SE_EN_WS_FOOTNOTE, 0, -1);
|
||||
}
|
||||
} else if (mpModelMorf->getAnm() == dComIfG_getObjectRes("E_WS", 8)) {
|
||||
if (mpModelMorf->checkFrame(0.5f) ||
|
||||
mpModelMorf->checkFrame(6.0f) ||
|
||||
mpModelMorf->checkFrame(11.0f) ||
|
||||
mpModelMorf->checkFrame(16.0f) ||
|
||||
mpModelMorf->checkFrame(21.0f) ||
|
||||
mpModelMorf->checkFrame(26.5f) ||
|
||||
mpModelMorf->checkFrame(31.0f))
|
||||
} else if (mAnm_p->getAnm() == dComIfG_getObjectRes("E_WS", 8)) {
|
||||
if (mAnm_p->checkFrame(0.5f) ||
|
||||
mAnm_p->checkFrame(6.0f) ||
|
||||
mAnm_p->checkFrame(11.0f) ||
|
||||
mAnm_p->checkFrame(16.0f) ||
|
||||
mAnm_p->checkFrame(21.0f) ||
|
||||
mAnm_p->checkFrame(26.5f) ||
|
||||
mAnm_p->checkFrame(31.0f))
|
||||
{
|
||||
mSound.startCreatureSound(Z2SE_EN_WS_FOOTNOTE, 0, -1);
|
||||
}
|
||||
@@ -141,13 +160,13 @@ f32 daE_WS_c::calcTargetDist(cXyz i_basePos, cXyz i_targetPos) {
|
||||
}
|
||||
|
||||
s16 daE_WS_c::calcTargetAngle(cXyz i_basePos, cXyz i_targetPos) {
|
||||
cXyz sp1C;
|
||||
cXyz sp10 = i_targetPos - i_basePos;
|
||||
cXyz mae;
|
||||
cXyz ato = i_targetPos - i_basePos;
|
||||
|
||||
mDoMtx_stack_c::XrotS(-field_0x668.x);
|
||||
mDoMtx_stack_c::YrotM(-field_0x668.y);
|
||||
mDoMtx_stack_c::multVec(&sp10, &sp1C);
|
||||
return cM_atan2s(sp1C.x, sp1C.z);
|
||||
mDoMtx_stack_c::XrotS(-mTargetWallAngle.x);
|
||||
mDoMtx_stack_c::YrotM(-mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::multVec(&ato, &mae);
|
||||
return cM_atan2s(mae.x, mae.z);
|
||||
}
|
||||
|
||||
static u8 hio_set;
|
||||
@@ -171,13 +190,13 @@ int daE_WS_c::checkPlayerPos() {
|
||||
dComIfGp_checkPlayerStatus1(0, 0x2000000) ||
|
||||
dComIfGp_checkPlayerStatus1(0, 0x10000) ||
|
||||
calcTargetDist(current.pos, player_pos) < 150.0f) &&
|
||||
checkInSearchRange(player_pos, field_0x65c) && checkInSearchRange(current.pos, field_0x65c))
|
||||
checkInSearchRange(player_pos, mHomePos) && checkInSearchRange(current.pos, mHomePos))
|
||||
{
|
||||
dBgS_GndChk gndchk;
|
||||
cXyz gndpos;
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(field_0x66e);
|
||||
mDoMtx_stack_c::ZXYrotM(mWallAngle);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::transM(0.0f, 100.0f, 0.0f);
|
||||
mDoMtx_stack_c::multVecZero(&gndpos);
|
||||
@@ -187,17 +206,17 @@ int daE_WS_c::checkPlayerPos() {
|
||||
if (current.pos.y - gndpos.y > l_HIO.dist_to_ground) {
|
||||
// Return 1 if walltula is looking towards player
|
||||
if (cLib_distanceAngleS(shape_angle.y, calcTargetAngle(current.pos, player_pos)) < l_HIO.search_angle) {
|
||||
return 1;
|
||||
return PLAYER_TARGET;
|
||||
}
|
||||
|
||||
// otherwise return 2 if player is near the walltula
|
||||
if (calcTargetDist(current.pos, player_pos) < 150.0f) {
|
||||
return 2;
|
||||
return PLAYER_NEAR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return PLAYER_NOT_FOUND;
|
||||
}
|
||||
|
||||
bool daE_WS_c::checkAttackEnd() {
|
||||
@@ -205,17 +224,17 @@ bool daE_WS_c::checkAttackEnd() {
|
||||
mDoMtx_stack_c::copy(daPy_getLinkPlayerActorClass()->getModelJointMtx(0));
|
||||
mDoMtx_stack_c::multVecZero(&player_pos);
|
||||
|
||||
BOOL r30 = false;
|
||||
BOOL checkPlayerNear = FALSE;
|
||||
if (
|
||||
daPy_getPlayerActorClass()->checkClimbMove() ||
|
||||
dComIfGp_checkPlayerStatus1(0, 0x02000000) ||
|
||||
dComIfGp_checkPlayerStatus1(0, 0x10000) ||
|
||||
calcTargetDist(current.pos, player_pos) < 200.0f
|
||||
) {
|
||||
r30 = true;
|
||||
checkPlayerNear = TRUE;
|
||||
}
|
||||
if (!r30 ||
|
||||
!checkInSearchRange(current.pos, field_0x65c) ||
|
||||
if (!checkPlayerNear ||
|
||||
!checkInSearchRange(current.pos, mHomePos) ||
|
||||
checkBeforeBg(shape_angle.y)
|
||||
)
|
||||
{
|
||||
@@ -228,41 +247,41 @@ bool daE_WS_c::checkAttackEnd() {
|
||||
}
|
||||
|
||||
void daE_WS_c::executeWait() {
|
||||
int temp_r3 = checkPlayerPos();
|
||||
if (temp_r3 == 1) {
|
||||
int playerCheck = checkPlayerPos();
|
||||
if (playerCheck == PLAYER_TARGET) {
|
||||
setActionMode(ACTION_ATTACK_e);
|
||||
return;
|
||||
}
|
||||
|
||||
if (temp_r3 == 2 && mMode != 3 && mMode != 4) {
|
||||
if (playerCheck == PLAYER_NEAR && mMode != 3 && mMode != 4) {
|
||||
mMode = 2;
|
||||
}
|
||||
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
mMoveWaitTimer = 50.0f + cM_rndF(50.0f);
|
||||
mWaitTimer = 50.0f + cM_rndF(50.0f);
|
||||
setBck(9, 2, 3.0f, 1.0f);
|
||||
mMode = 1;
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
mMode = 2;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
speedF = 0.0f;
|
||||
field_0x690 = 0;
|
||||
mTargetAngle = shape_angle.y + cM_rndFX(32768.0f);
|
||||
mIsReturnHome = 0;
|
||||
mTargetAngle = shape_angle.y + cM_rndFX(32768.0f); // random turn up to ±180°
|
||||
|
||||
if (temp_r3 == 2) {
|
||||
mTargetStep = 0x200;
|
||||
if (playerCheck == PLAYER_NEAR) {
|
||||
mStepAngle = 0x200;
|
||||
setBck(8, 2, 3.0f, 2.4f);
|
||||
} else {
|
||||
if (calcTargetDist(current.pos, field_0x65c) >= l_HIO.move_range) {
|
||||
mTargetAngle = calcTargetAngle(current.pos, field_0x65c);
|
||||
field_0x690 = 1;
|
||||
if (calcTargetDist(current.pos, mHomePos) >= l_HIO.move_range) {
|
||||
mTargetAngle = calcTargetAngle(current.pos, mHomePos);
|
||||
mIsReturnHome = 1;
|
||||
}
|
||||
mTargetStep = 0x100;
|
||||
mStepAngle = 0x100;
|
||||
setBck(8, 2, 3.0f, 1.2f);
|
||||
}
|
||||
|
||||
@@ -271,37 +290,37 @@ void daE_WS_c::executeWait() {
|
||||
case 3:
|
||||
setFootSound();
|
||||
|
||||
if (cLib_chaseAngleS(&shape_angle.y, mTargetAngle, mTargetStep)) {
|
||||
if (cLib_chaseAngleS(&shape_angle.y, mTargetAngle, mStepAngle)) {
|
||||
mMode = 4;
|
||||
mMoveWaitTimer = 10;
|
||||
mWaitTimer = 10;
|
||||
setBck(9, 2, 3.0f, 1.0f);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
mMode = 5;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
mMode = 6;
|
||||
speedF = 3.0f;
|
||||
mMoveWaitTimer = 20.0f + cM_rndF(10.0f);
|
||||
mWaitTimer = 20.0f + cM_rndF(10.0f);
|
||||
setBck(7, 2, 3.0f, 1.0f);
|
||||
/* fallthrough */
|
||||
case 6:
|
||||
setFootSound();
|
||||
|
||||
if (field_0x690 == 0) {
|
||||
if (calcTargetDist(current.pos, field_0x65c) >= l_HIO.move_range) {
|
||||
mMoveWaitTimer = 0;
|
||||
if (mIsReturnHome == 0) {
|
||||
if (calcTargetDist(current.pos, mHomePos) >= l_HIO.move_range) {
|
||||
mWaitTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (checkBeforeBg(shape_angle.y)) {
|
||||
mMoveWaitTimer = 0;
|
||||
mWaitTimer = 0;
|
||||
}
|
||||
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
speedF = 0.0f;
|
||||
mMode = 0;
|
||||
}
|
||||
@@ -333,11 +352,11 @@ void daE_WS_c::executeAttack() {
|
||||
mMode = 2;
|
||||
setBck(10, 2, 3.0f, 1.0f);
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_YOKOKU, -1);
|
||||
mMoveWaitTimer = 10;
|
||||
mWaitTimer = 10;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
speedF = l_HIO.attack_speed * mBodyScale;
|
||||
setBck(7, 2, 3.0f, 3.0f);
|
||||
mMode = 3;
|
||||
@@ -352,20 +371,20 @@ void daE_WS_c::executeAttack() {
|
||||
setFootSound();
|
||||
cLib_chaseAngleS(&shape_angle.y, calcTargetAngle(current.pos, player_pos), 0x400);
|
||||
|
||||
BOOL r28 = false;
|
||||
BOOL checkAttackStart = FALSE;
|
||||
if (checkBeforeBg(shape_angle.y)) {
|
||||
r28 = true;
|
||||
checkAttackStart = TRUE;
|
||||
}
|
||||
if (mCcSph.ChkAtHit()) {
|
||||
cCcD_Obj* r27 = mCcSph.GetAtHitObj();
|
||||
if (fopAcM_GetName(dCc_GetAc(r27->GetAc())) == fpcNm_ALINK_e) {
|
||||
r28 = true;
|
||||
cCcD_Obj* hitObj = mCcSph.GetAtHitObj();
|
||||
if (fopAcM_GetName(dCc_GetAc(hitObj->GetAc())) == fpcNm_ALINK_e) {
|
||||
checkAttackStart = TRUE;
|
||||
}
|
||||
}
|
||||
if (!checkInSearchRange(current.pos, field_0x65c)) {
|
||||
r28 = true;
|
||||
if (!checkInSearchRange(current.pos, mHomePos)) {
|
||||
checkAttackStart = TRUE;
|
||||
}
|
||||
if (r28) {
|
||||
if (checkAttackStart) {
|
||||
mMode = 4;
|
||||
speedF = 0.0f;
|
||||
setBck(4, 0, 3.0f, 1.0f);
|
||||
@@ -378,11 +397,11 @@ void daE_WS_c::executeAttack() {
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
if (mpModelMorf->checkFrame(7.5f)) {
|
||||
if (mAnm_p->checkFrame(7.5f)) {
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_ATTACK, -1);
|
||||
}
|
||||
|
||||
if (mpModelMorf->isStop()) {
|
||||
if (mAnm_p->isStop()) {
|
||||
setActionMode(ACTION_WAIT_e);
|
||||
}
|
||||
/* fallthrough */
|
||||
@@ -408,9 +427,9 @@ void daE_WS_c::executeDown() {
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DAMAGE, -1);
|
||||
/* fallthrough */
|
||||
case 1:
|
||||
if (mpModelMorf->isStop()) {
|
||||
mAcchCir.SetWall(0.0f, 4.0f);
|
||||
current.angle.y = field_0x668.y;
|
||||
if (mAnm_p->isStop()) {
|
||||
mBgc.SetWall(0.0f, 4.0f);
|
||||
current.angle.y = mTargetWallAngle.y;
|
||||
setBck(6, 0, 3.0f, 0.0f);
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DEATH, -1);
|
||||
speedF = 5.0f;
|
||||
@@ -433,7 +452,7 @@ void daE_WS_c::executeDown() {
|
||||
speedF = 3.0f + cM_rndF(2.0f);
|
||||
speed.y = 12.0f;
|
||||
mMode = 3;
|
||||
mMoveWaitTimer = 30;
|
||||
mWaitTimer = 30;
|
||||
setBck(6, 0, 5.0f, 1.0f);
|
||||
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
||||
}
|
||||
@@ -467,8 +486,8 @@ void daE_WS_c::executeDown() {
|
||||
case 4:
|
||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||
|
||||
if (mpModelMorf->isStop()) {
|
||||
mMoveWaitTimer = 15;
|
||||
if (mAnm_p->isStop()) {
|
||||
mWaitTimer = 15;
|
||||
mMode = 5;
|
||||
return;
|
||||
}
|
||||
@@ -476,12 +495,12 @@ void daE_WS_c::executeDown() {
|
||||
case 5:
|
||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
fopAcM_delete(this);
|
||||
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
||||
|
||||
if (mSwbit != 0xFF && !dComIfGs_isSwitch(mSwbit, fopAcM_GetRoomNo(this))) {
|
||||
dComIfGs_onSwitch(mSwbit, fopAcM_GetRoomNo(this));
|
||||
if (bitSw != 0xFF && !dComIfGs_isSwitch(bitSw, fopAcM_GetRoomNo(this))) {
|
||||
dComIfGs_onSwitch(bitSw, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -497,36 +516,36 @@ void daE_WS_c::executeWindDown() {
|
||||
mCcSph.OffTgSetBit();
|
||||
mCcBokkuriSph.OffTgSetBit();
|
||||
|
||||
mAcchCir.SetWall(0.0f, 4.0f);
|
||||
mBgc.SetWall(0.0f, 4.0f);
|
||||
mMode = 1;
|
||||
setBck(7, 2, 3.0f, 1.0f);
|
||||
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DAMAGE, -1);
|
||||
mMoveWaitTimer = 5;
|
||||
mWaitTimer = 5;
|
||||
mAcch.SetGroundUpY(20.0f);
|
||||
attention_info.flags = 0;
|
||||
speed.y = 0.0f;
|
||||
speedF = 5.0f;
|
||||
current.angle.y = field_0x668.y;
|
||||
mTargetStep = -0x800;
|
||||
current.angle.y = mTargetWallAngle.y;
|
||||
mStepAngle = -0x800;
|
||||
break;
|
||||
case 1:
|
||||
shape_angle.y += mTargetStep;
|
||||
cLib_chaseAngleS(&field_0x66e.y, 0, 0x400);
|
||||
cLib_chaseAngleS(&field_0x66e.x, 0, 0x400);
|
||||
shape_angle.y += mStepAngle;
|
||||
cLib_chaseAngleS(&mWallAngle.y, 0, 0x400);
|
||||
cLib_chaseAngleS(&mWallAngle.x, 0, 0x400);
|
||||
shape_angle.x += 0x800;
|
||||
shape_angle.z += 0x800;
|
||||
speed.y = 30.0f;
|
||||
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
mMode = 2;
|
||||
gravity = -3.0f;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
shape_angle.y += mTargetStep;
|
||||
cLib_chaseAngleS(&field_0x66e.y, 0, 0x400);
|
||||
cLib_chaseAngleS(&field_0x66e.x, 0, 0x400);
|
||||
shape_angle.y += mStepAngle;
|
||||
cLib_chaseAngleS(&mWallAngle.y, 0, 0x400);
|
||||
cLib_chaseAngleS(&mWallAngle.x, 0, 0x400);
|
||||
cLib_chaseAngleS(&shape_angle.x, -0x8000, 0x400);
|
||||
cLib_chaseAngleS(&shape_angle.z, 0, 0x400);
|
||||
|
||||
@@ -534,15 +553,15 @@ void daE_WS_c::executeWindDown() {
|
||||
speedF = 3.0f + cM_rndF(2.0f);
|
||||
speed.y = 12.0f;
|
||||
mMode = 3;
|
||||
mMoveWaitTimer = 30;
|
||||
mWaitTimer = 30;
|
||||
setBck(6, 0, 5.0f, 1.0f);
|
||||
mSound.startCreatureVoice(Z2SE_EN_WS_V_DEATH, -1);
|
||||
mSound.startCreatureSound(Z2SE_CM_BODYFALL_S, 0, -1);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
shape_angle.y += mTargetStep;
|
||||
cLib_chaseAngleS(&mTargetStep, 0, 0x80);
|
||||
shape_angle.y += mStepAngle;
|
||||
cLib_chaseAngleS(&mStepAngle, 0, 0x80);
|
||||
cLib_chaseAngleS(&shape_angle.x, -0x8000, 0x400);
|
||||
cLib_chaseAngleS(&shape_angle.z, 0, 0x400);
|
||||
|
||||
@@ -556,23 +575,23 @@ void daE_WS_c::executeWindDown() {
|
||||
break;
|
||||
case 4:
|
||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||
shape_angle.y += mTargetStep;
|
||||
cLib_chaseAngleS(&mTargetStep, 0, 0x80);
|
||||
shape_angle.y += mTargetStep;
|
||||
shape_angle.y += mStepAngle;
|
||||
cLib_chaseAngleS(&mStepAngle, 0, 0x80);
|
||||
shape_angle.y += mStepAngle;
|
||||
|
||||
if (mpModelMorf->isStop()) {
|
||||
mMoveWaitTimer = 15;
|
||||
if (mAnm_p->isStop()) {
|
||||
mWaitTimer = 15;
|
||||
mMode = 5;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
cLib_addCalc2(&mDownColor, -20.0f, 1.0f, 0.4f);
|
||||
if (mMoveWaitTimer == 0) {
|
||||
if (mWaitTimer == 0) {
|
||||
fopAcM_delete(this);
|
||||
fopAcM_createDisappear(this, ¤t.pos, 7, 0, 7);
|
||||
|
||||
if (mSwbit != 0xFF && !dComIfGs_isSwitch(mSwbit, fopAcM_GetRoomNo(this))) {
|
||||
dComIfGs_onSwitch(mSwbit, fopAcM_GetRoomNo(this));
|
||||
if (bitSw != 0xFF && !dComIfGs_isSwitch(bitSw, fopAcM_GetRoomNo(this))) {
|
||||
dComIfGs_onSwitch(bitSw, fopAcM_GetRoomNo(this));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -653,47 +672,47 @@ void daE_WS_c::action() {
|
||||
mSound.setLinkSearch(field_0x566);
|
||||
|
||||
if (mAction != ACTION_DOWN_e && mAction != ACTION_WIND_DOWN_e) {
|
||||
cXyz sp14;
|
||||
mDoMtx_stack_c::YrotS(field_0x668.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x668.x);
|
||||
cXyz ato;
|
||||
mDoMtx_stack_c::YrotS(mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::XrotM(mTargetWallAngle.x);
|
||||
mDoMtx_stack_c::YrotM(current.angle.y);
|
||||
|
||||
cXyz sp8(0.0f, 0.0f, speedF);
|
||||
mDoMtx_stack_c::multVec(&sp8, &sp14);
|
||||
speed = sp14;
|
||||
cXyz mae(0.0f, 0.0f, speedF);
|
||||
mDoMtx_stack_c::multVec(&mae, &ato);
|
||||
speed = ato;
|
||||
current.pos += speed;
|
||||
} else {
|
||||
fopAcM_posMoveF(this, NULL);
|
||||
}
|
||||
|
||||
mAcch.CrrPos(dComIfG_Bgsp());
|
||||
mpModelMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mAnm_p->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
}
|
||||
|
||||
void daE_WS_c::mtx_set() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(field_0x66e);
|
||||
mDoMtx_stack_c::ZXYrotM(mWallAngle);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::scaleM(mBodyScale, mBodyScale, mBodyScale);
|
||||
|
||||
J3DModel* model_p = mpModelMorf->getModel();
|
||||
J3DModel* model_p = mAnm_p->getModel();
|
||||
model_p->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
mpModelMorf->modelCalc();
|
||||
mAnm_p->modelCalc();
|
||||
}
|
||||
|
||||
void daE_WS_c::cc_set() {
|
||||
cXyz mae;
|
||||
cXyz ato;
|
||||
J3DModel* model_p = mpModelMorf->getModel();
|
||||
J3DModel* model = mAnm_p->getModel();
|
||||
|
||||
mDoMtx_stack_c::YrotS(field_0x668.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x668.x);
|
||||
mDoMtx_stack_c::YrotS(mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::XrotM(mTargetWallAngle.x);
|
||||
mae.set(0.0f, 15.0f + nREG_F(10), 0.0f);
|
||||
mDoMtx_stack_c::multVec(&mae, &ato);
|
||||
attention_info.position = current.pos + ato;
|
||||
attention_info.position.y += 90.0f * mBodyScale;
|
||||
|
||||
MTXCopy(model_p->getAnmMtx(1), mDoMtx_stack_c::get());
|
||||
MTXCopy(model->getAnmMtx(1), mDoMtx_stack_c::get());
|
||||
mae.set(-15.0f + nREG_F(5), -10.0f + nREG_F(6), nREG_F(7));
|
||||
mDoMtx_stack_c::multVec(&mae, &eyePos);
|
||||
|
||||
@@ -707,8 +726,8 @@ void daE_WS_c::cc_set() {
|
||||
}
|
||||
|
||||
int daE_WS_c::execute() {
|
||||
if (mMoveWaitTimer != 0) {
|
||||
mMoveWaitTimer--;
|
||||
if (mWaitTimer != 0) {
|
||||
mWaitTimer--;
|
||||
}
|
||||
|
||||
if (mInvulnerabilityTimer != 0) {
|
||||
@@ -725,8 +744,8 @@ int daE_WS_c::execute() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daE_WS_Execute(daE_WS_c* a_this) {
|
||||
return a_this->execute();
|
||||
static int daE_WS_Execute(daE_WS_c* i_this) {
|
||||
return i_this->execute();
|
||||
}
|
||||
|
||||
void daE_WS_c::checkInitialWall() {
|
||||
@@ -739,7 +758,7 @@ void daE_WS_c::checkInitialWall() {
|
||||
linchk.Set(¤t.pos, &endpos, NULL);
|
||||
|
||||
if (dComIfG_Bgsp().LineCross(&linchk)) {
|
||||
if (field_0x691 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
if (arg0 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -749,9 +768,9 @@ void daE_WS_c::checkInitialWall() {
|
||||
dComIfG_Bgsp().GetTriPla(linchk, &tri);
|
||||
|
||||
cXyz* tri_np = tri.GetNP();
|
||||
field_0x668.y = cM_atan2s(tri_np->x, tri_np->z);
|
||||
field_0x668.x = cM_atan2s(tri_np->absXZ(), tri_np->y);
|
||||
field_0x66e = field_0x668;
|
||||
mTargetWallAngle.y = cM_atan2s(tri_np->x, tri_np->z);
|
||||
mTargetWallAngle.x = cM_atan2s(tri_np->absXZ(), tri_np->y);
|
||||
mWallAngle = mTargetWallAngle;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -759,8 +778,8 @@ void daE_WS_c::checkInitialWall() {
|
||||
|
||||
bool daE_WS_c::checkBeforeBg(s16 i_angle) {
|
||||
dBgS_LinChk linchk;
|
||||
cXyz sp68;
|
||||
cXyz sp5C;
|
||||
cXyz mae;
|
||||
cXyz ato;
|
||||
cXyz endpos;
|
||||
cXyz startpos;
|
||||
|
||||
@@ -768,56 +787,56 @@ bool daE_WS_c::checkBeforeBg(s16 i_angle) {
|
||||
return false;
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::YrotS(field_0x668.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x668.x);
|
||||
mDoMtx_stack_c::YrotS(mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::XrotM(mTargetWallAngle.x);
|
||||
mDoMtx_stack_c::YrotM(i_angle);
|
||||
sp68.set(0.0f, 50.0f * mBodyScale, 0.0f);
|
||||
mDoMtx_stack_c::multVec(&sp68, &startpos);
|
||||
mae.set(0.0f, 50.0f * mBodyScale, 0.0f);
|
||||
mDoMtx_stack_c::multVec(&mae, &startpos);
|
||||
startpos += current.pos;
|
||||
|
||||
mDoMtx_stack_c::YrotS(field_0x668.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x668.x);
|
||||
mDoMtx_stack_c::YrotS(mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::XrotM(mTargetWallAngle.x);
|
||||
mDoMtx_stack_c::YrotM(i_angle);
|
||||
sp68.set(0.0f, 0.0f, 50.0f * mBodyScale);
|
||||
mDoMtx_stack_c::multVec(&sp68, &sp5C);
|
||||
mae.set(0.0f, 0.0f, 50.0f * mBodyScale);
|
||||
mDoMtx_stack_c::multVec(&mae, &ato);
|
||||
|
||||
sp68.set(sp5C.x, 0.0f, sp5C.z);
|
||||
endpos = startpos + sp68;
|
||||
mae.set(ato.x, 0.0f, ato.z);
|
||||
endpos = startpos + mae;
|
||||
|
||||
linchk.Set(&startpos, &endpos, NULL);
|
||||
if (dComIfG_Bgsp().LineCross(&linchk)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (sp5C.y > 0.0f) {
|
||||
sp68.set(0.0f, 50.0f * mBodyScale, 0.0f);
|
||||
if (ato.y > 0.0f) {
|
||||
mae.set(0.0f, 50.0f * mBodyScale, 0.0f);
|
||||
} else {
|
||||
sp68.set(0.0f, -l_HIO.dist_to_ground, 0.0f);
|
||||
mae.set(0.0f, -l_HIO.dist_to_ground, 0.0f);
|
||||
}
|
||||
|
||||
endpos = startpos + sp68;
|
||||
endpos = startpos + mae;
|
||||
linchk.Set(&startpos, &endpos, NULL);
|
||||
if (dComIfG_Bgsp().LineCross(&linchk)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
mDoMtx_stack_c::YrotS(field_0x668.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x668.x);
|
||||
mDoMtx_stack_c::YrotS(mTargetWallAngle.y);
|
||||
mDoMtx_stack_c::XrotM(mTargetWallAngle.x);
|
||||
mDoMtx_stack_c::YrotM(i_angle);
|
||||
sp68.set(0.0f, 50.0f * mBodyScale, 100.0f * mBodyScale);
|
||||
mDoMtx_stack_c::multVec(&sp68, &sp5C);
|
||||
startpos = current.pos + sp5C;
|
||||
mae.set(0.0f, 50.0f * mBodyScale, 100.0f * mBodyScale);
|
||||
mDoMtx_stack_c::multVec(&mae, &ato);
|
||||
startpos = current.pos + ato;
|
||||
|
||||
cXyz sp38(0.0f, -40.0f * mBodyScale, 100.0f * mBodyScale);
|
||||
mDoMtx_stack_c::multVec(&sp38, &sp5C);
|
||||
endpos = current.pos + sp5C;
|
||||
mDoMtx_stack_c::multVec(&sp38, &ato);
|
||||
endpos = current.pos + ato;
|
||||
|
||||
linchk.Set(&startpos, &endpos, NULL);
|
||||
if (!dComIfG_Bgsp().LineCross(&linchk)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (field_0x691 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
if (arg0 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -825,7 +844,7 @@ bool daE_WS_c::checkBeforeBg(s16 i_angle) {
|
||||
dComIfG_Bgsp().GetTriPla(linchk, &tri);
|
||||
|
||||
cXyz* tri_np = tri.GetNP();
|
||||
cLib_chaseAngleS(&field_0x66e.y, cM_atan2s(tri_np->x, tri_np->z), 0x100);
|
||||
cLib_chaseAngleS(&mWallAngle.y, cM_atan2s(tri_np->x, tri_np->z), 0x100);
|
||||
checkWall();
|
||||
return false;
|
||||
}
|
||||
@@ -834,7 +853,7 @@ bool daE_WS_c::checkWall() {
|
||||
cXyz startpos;
|
||||
cXyz endpos;
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(field_0x66e);
|
||||
mDoMtx_stack_c::ZXYrotM(mWallAngle);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
|
||||
mDoMtx_stack_c::transM(0.0f, 100.0f, 0.0f);
|
||||
@@ -846,7 +865,7 @@ bool daE_WS_c::checkWall() {
|
||||
dBgS_LinChk linchk;
|
||||
linchk.Set(&startpos, &endpos, NULL);
|
||||
if (dComIfG_Bgsp().LineCross(&linchk)) {
|
||||
if (field_0x691 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
if (arg0 == 0 && dComIfG_Bgsp().GetWallCode(linchk) != 1 && dComIfG_Bgsp().GetWallCode(linchk) != 4) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -856,8 +875,8 @@ bool daE_WS_c::checkWall() {
|
||||
dComIfG_Bgsp().GetTriPla(linchk, &tri);
|
||||
|
||||
cXyz* tri_np = tri.GetNP();
|
||||
field_0x668.y = cM_atan2s(tri_np->x, tri_np->z);
|
||||
field_0x668.x = cM_atan2s(tri_np->absXZ(), tri_np->y);
|
||||
mTargetWallAngle.y = cM_atan2s(tri_np->x, tri_np->z);
|
||||
mTargetWallAngle.x = cM_atan2s(tri_np->absXZ(), tri_np->y);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -871,8 +890,8 @@ static int daE_WS_IsDelete(daE_WS_c* a_this) {
|
||||
int daE_WS_c::_delete() {
|
||||
dComIfG_resDelete(&mPhase, "E_WS");
|
||||
|
||||
if (mHIOInit) {
|
||||
hio_set = false;
|
||||
if (mHioSet) {
|
||||
hio_set = FALSE;
|
||||
mDoHIO_DELETE_CHILD(l_HIO.id);
|
||||
}
|
||||
|
||||
@@ -883,24 +902,25 @@ int daE_WS_c::_delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int daE_WS_Delete(daE_WS_c* a_this) {
|
||||
return a_this->_delete();
|
||||
static int daE_WS_Delete(daE_WS_c* i_this) {
|
||||
fopAcM_RegisterDeleteID(i_this, "E_WS");
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
int daE_WS_c::CreateHeap() {
|
||||
J3DModelData* modelData = (J3DModelData*)dComIfG_getObjectRes("E_WS", 0xD);
|
||||
JUT_ASSERT(1401, modelData != NULL);
|
||||
|
||||
mpModelMorf = JKR_NEW mDoExt_McaMorfSO(modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_WS", 7), 0, 1.0f, 0, -1, &mSound, 0x80000, 0x11000084);
|
||||
if (mpModelMorf == NULL || mpModelMorf->getModel() == NULL) {
|
||||
mAnm_p = JKR_NEW mDoExt_McaMorfSO(modelData, NULL, NULL, (J3DAnmTransform*)dComIfG_getObjectRes("E_WS", 7), 0, 1.0f, 0, -1, &mSound, 0x80000, 0x11000084);
|
||||
if (mAnm_p == NULL || mAnm_p->getModel() == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
return ((daE_WS_c*)i_this)->CreateHeap();
|
||||
static int useHeapInit(fopAc_ac_c* actor) {
|
||||
return ((daE_WS_c*)actor)->CreateHeap();
|
||||
}
|
||||
|
||||
int daE_WS_c::create() {
|
||||
@@ -910,8 +930,8 @@ int daE_WS_c::create() {
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("E_WS PARAM %x\n", fopAcM_GetParam(this));
|
||||
|
||||
mSwbit = (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
if (mSwbit != 0xFF && dComIfGs_isSwitch(mSwbit, fopAcM_GetRoomNo(this))) {
|
||||
bitSw = (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
if (bitSw != 0xFF && dComIfGs_isSwitch(bitSw, fopAcM_GetRoomNo(this))) {
|
||||
OS_REPORT("E_WS やられ後なので再セットしません\n");
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
@@ -922,13 +942,13 @@ int daE_WS_c::create() {
|
||||
|
||||
if (!hio_set) {
|
||||
hio_set = true;
|
||||
mHIOInit = true;
|
||||
mHioSet = true;
|
||||
l_HIO.id = mDoHIO_CREATE_CHILD("スタルウォール", &l_HIO);
|
||||
}
|
||||
|
||||
field_0x691 = fopAcM_GetParam(this);
|
||||
if (field_0x691 == 0xFF) {
|
||||
field_0x691 = 0;
|
||||
arg0 = fopAcM_GetParam(this);
|
||||
if (arg0 == 0xFF) {
|
||||
arg0 = 0;
|
||||
}
|
||||
|
||||
if (((fopAcM_GetParam(this) & 0xFF0000) >> 0x10) == 1) {
|
||||
@@ -938,12 +958,12 @@ int daE_WS_c::create() {
|
||||
}
|
||||
|
||||
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
|
||||
fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx());
|
||||
fopAcM_SetMtx(this, mAnm_p->getModel()->getBaseTRMtx());
|
||||
fopAcM_SetMin(this, -200.0f, -200.0f, -200.0f);
|
||||
fopAcM_SetMax(this, 200.0f, 200.0f, 200.0f);
|
||||
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), NULL, NULL);
|
||||
mAcchCir.SetWall(0.0f, 0.0f);
|
||||
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1, &mBgc, fopAcM_GetSpeed_p(this), NULL, NULL);
|
||||
mBgc.SetWall(0.0f, 0.0f);
|
||||
|
||||
health = 10;
|
||||
field_0x560 = 10;
|
||||
@@ -963,7 +983,7 @@ int daE_WS_c::create() {
|
||||
setActionMode(ACTION_WAIT_e);
|
||||
checkInitialWall();
|
||||
|
||||
field_0x65c = current.pos;
|
||||
mHomePos = current.pos;
|
||||
speed.y = 0.0f;
|
||||
gravity = 0.0f;
|
||||
mtx_set();
|
||||
@@ -972,8 +992,8 @@ int daE_WS_c::create() {
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
static int daE_WS_Create(daE_WS_c* a_this) {
|
||||
return a_this->create();
|
||||
static int daE_WS_Create(daE_WS_c* i_this) {
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daE_WS_Method = {
|
||||
|
||||
@@ -495,8 +495,8 @@ int daE_ZS_c::CreateHeap() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void useHeapInit(fopAc_ac_c* i_this) {
|
||||
static_cast<daE_ZS_c*>(i_this)->CreateHeap();
|
||||
static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
return static_cast<daE_ZS_c*>(i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
int daE_ZS_c::create() {
|
||||
@@ -504,7 +504,7 @@ int daE_ZS_c::create() {
|
||||
int phase = dComIfG_resLoad(&mPhase, "E_ZS");
|
||||
if (phase == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("E_ZS PARAM %x\n", fopAcM_GetParam(this));
|
||||
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)useHeapInit, 0xFC0)) {
|
||||
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0xFC0)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,12 +80,7 @@ void daGrass_c::deleteGrass() {
|
||||
}
|
||||
}
|
||||
|
||||
dGrass_packet_c::~dGrass_packet_c() {
|
||||
#if TARGET_PC
|
||||
GXDestroyTexObj(&mTexObj_l_M_kusa05_RGBATEX);
|
||||
GXDestroyTexObj(&mTexObj_l_M_Hijiki00TEX);
|
||||
#endif
|
||||
}
|
||||
dGrass_packet_c::~dGrass_packet_c() {}
|
||||
|
||||
void daGrass_c::executeGrass() {
|
||||
if (m_grass != NULL) {
|
||||
|
||||
@@ -268,9 +268,9 @@ void daMant_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12);
|
||||
GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, this->getPos(), sizeof(mPos[0]), 12, true);
|
||||
GXSETARRAY(GX_VA_NRM, this->getNrm(), sizeof(mNrm[0]), 12, true);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord), 8, false); // TODO: set to true when converted to float literals
|
||||
|
||||
GXSetZCompLoc(0);
|
||||
GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_ENABLE);
|
||||
|
||||
@@ -1834,12 +1834,12 @@ void daMidna_c::setBckAnime(J3DAnmTransform* i_bck, int i_attr, f32 i_morf) {
|
||||
}
|
||||
} else {
|
||||
u8* buf = mBckHeap[0].getBuffer();
|
||||
if (*(u32*)(buf + 0x1c) == 0xffffffff) {
|
||||
if (*(BE(u32)*)(buf + 0x1c) == 0xffffffff) {
|
||||
offStateFlg1(FLG1_UNK_800);
|
||||
bas = NULL;
|
||||
} else {
|
||||
onStateFlg1(FLG1_UNK_800);
|
||||
bas = mBckHeap[0].getBuffer() + *(u32*)(buf + 0x1c);
|
||||
bas = mBckHeap[0].getBuffer() + *(BE(u32)*)(buf + 0x1c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,9 +74,9 @@ static char* l_bckFileNameTBL[] = {
|
||||
|
||||
static char* l_btpFileNameTBL[] = {"MYNA.btp"};
|
||||
|
||||
static void createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
static int createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
daMyna_c* a_this = static_cast<daMyna_c*>(i_this);
|
||||
a_this->createHeap();
|
||||
return a_this->createHeap();
|
||||
}
|
||||
|
||||
static int jntNodeCallBack(J3DJoint* i_jnt, int param_1) {
|
||||
@@ -339,7 +339,7 @@ int daMyna_c::create() {
|
||||
return phase;
|
||||
}
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)&createHeapCallBack, 0x21F0)) {
|
||||
if (!fopAcM_entrySolidHeap(this, createHeapCallBack, 0x21F0)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,14 +194,13 @@ int daNpc_solA_c::Execute() {
|
||||
return execute();
|
||||
}
|
||||
|
||||
void daNpc_solA_c::Draw() {
|
||||
int daNpc_solA_c::Draw() {
|
||||
if (mpMatAnm[0] != NULL) {
|
||||
J3DModelData* mdlData_p = mpMorf[0]->getModel()->getModelData();
|
||||
mdlData_p->getMaterialNodePointer(getEyeballMaterialNo())->setMaterialAnm(mpMatAnm[0]);
|
||||
}
|
||||
draw(FALSE, FALSE, mpHIO->m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE,
|
||||
FALSE);
|
||||
return;
|
||||
|
||||
return draw(FALSE, FALSE, mpHIO->m.common.real_shadow_size, NULL, 100.0f, FALSE, FALSE, FALSE);
|
||||
}
|
||||
|
||||
BOOL daNpc_solA_c::createHeapCallBack(fopAc_ac_c* a_this) {
|
||||
@@ -481,12 +480,12 @@ static int daNpc_solA_Execute(void* param_0) {
|
||||
return static_cast<daNpc_solA_c*>(param_0)->Execute();
|
||||
}
|
||||
|
||||
static void daNpc_solA_Draw(void* param_0) {
|
||||
static int daNpc_solA_Draw(void* param_0) {
|
||||
return static_cast<daNpc_solA_c*>(param_0)->Draw();
|
||||
}
|
||||
|
||||
static BOOL daNpc_solA_IsDelete(void* param_0) {
|
||||
return TRUE;
|
||||
static int daNpc_solA_IsDelete(void* param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static actor_method_class daNpc_solA_MethodTable = {
|
||||
|
||||
@@ -2014,7 +2014,7 @@ void daNPC_TK_c::executeWolfPerch() {
|
||||
mWolfPathData = dPath_GetRoomPath(mpPath1->m_nextID, fopAcM_GetRoomNo(this));
|
||||
JUT_ASSERT(2498, mWolfPathData != NULL);
|
||||
|
||||
field_0x6ea = mWolfPathData->field_0x6;
|
||||
field_0x6ea = mWolfPathData->swbit;
|
||||
field_0x6e8 = mWolfPathData->field_0x4;
|
||||
field_0x6e9 = mWolfPathData->field_0x7;
|
||||
field_0x6d0.Init(mWolfPathData);
|
||||
@@ -2518,7 +2518,7 @@ void daNPC_TK_c::executeResistanceDemo() {
|
||||
0x200, 0x10);
|
||||
shape_angle.x = -current.angle.x;
|
||||
|
||||
cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY((Vec*)¤t, &posWithOffset), 8,
|
||||
cLib_addCalcAngleS(¤t.angle.y, cLib_targetAngleY(¤t.pos, &posWithOffset), 8,
|
||||
0x400, 0x10);
|
||||
shape_angle.y = current.angle.y;
|
||||
|
||||
|
||||
@@ -356,21 +356,21 @@ int daObjYtaihou_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daObjYtaihou_create1st(daObjYtaihou_c* i_this) {
|
||||
static int daObjYtaihou_create1st(daObjYtaihou_c* i_this) {
|
||||
fopAcM_ct(i_this, daObjYtaihou_c);
|
||||
i_this->create1st();
|
||||
return i_this->create1st();
|
||||
}
|
||||
|
||||
static void daObjYtaihou_MoveBGDelete(daObjYtaihou_c* i_this) {
|
||||
i_this->MoveBGDelete();
|
||||
static int daObjYtaihou_MoveBGDelete(daObjYtaihou_c* i_this) {
|
||||
return i_this->MoveBGDelete();
|
||||
}
|
||||
|
||||
static void daObjYtaihou_MoveBGExecute(daObjYtaihou_c* i_this) {
|
||||
i_this->MoveBGExecute();
|
||||
static int daObjYtaihou_MoveBGExecute(daObjYtaihou_c* i_this) {
|
||||
return i_this->MoveBGExecute();
|
||||
}
|
||||
|
||||
static void daObjYtaihou_MoveBGDraw(daObjYtaihou_c* i_this) {
|
||||
i_this->Draw();
|
||||
static int daObjYtaihou_MoveBGDraw(daObjYtaihou_c* i_this) {
|
||||
return i_this->Draw();
|
||||
}
|
||||
|
||||
static actor_method_class daObjYtaihou_METHODS = {
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/logging.h"
|
||||
|
||||
static void ride_call_back(dBgW* i_bgw, fopAc_ac_c* i_bgActor, fopAc_ac_c* i_rideActor) {
|
||||
obj_brg_class* a_this = (obj_brg_class*)i_bgActor;
|
||||
|
||||
@@ -1794,6 +1796,10 @@ static int daObj_Brg_Create(fopAc_ac_c* i_this) {
|
||||
cXyz(334.0f, 85.0f, -16054.0f),
|
||||
cXyz(334.0f, 150.0f, -16270.0f),
|
||||
cXyz(334.0f, 216.0f, -16485.0f),
|
||||
#ifdef TARGET_PC
|
||||
// Avoids out-of-bounds index (n=22)
|
||||
cXyz(0.f, 0.f, 0.f),
|
||||
#endif
|
||||
};
|
||||
|
||||
for (brno = 0; brno < a_this->field_0xb1ea; brno++) {
|
||||
|
||||
@@ -310,9 +310,9 @@ int daObjFan_c::Delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daObjFan_create1st(daObjFan_c* param_0) {
|
||||
static int daObjFan_create1st(daObjFan_c* param_0) {
|
||||
fopAcM_ct(param_0, daObjFan_c);
|
||||
param_0->create1st();
|
||||
return param_0->create1st();
|
||||
}
|
||||
|
||||
static int daObjFan_MoveBGDelete(daObjFan_c* param_0) {
|
||||
|
||||
@@ -16,7 +16,7 @@ daObjFlag_c::M_attrs const daObjFlag_c::M_attr = {
|
||||
};
|
||||
|
||||
void daObjFlag_c::create_init() {
|
||||
field_0x5dc = (*(u32*)dComIfG_getObjectRes(daSetBgObj_c::getArcName(this), "spec.dat")) & 0xffff;
|
||||
field_0x5dc = (*(BE(u32)*)dComIfG_getObjectRes(daSetBgObj_c::getArcName(this), "spec.dat")) & 0xffff;
|
||||
mPos = cXyz(current.pos.x, current.pos.y + field_0x5dc, current.pos.z);
|
||||
mFlagJoints[0].mRv = (short)(cM_rnd() * 65535.0f);
|
||||
mFlagJoints[1].mRv = (short)(cM_rnd() * 65535.0f);
|
||||
|
||||
@@ -274,9 +274,9 @@ void FlagCloth_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(mpTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mpTexCoord, sizeof(l_texCoord), 8, true);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -304,7 +304,7 @@ void FlagCloth_c::draw() {
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
GXSetCullMode(GX_CULL_BACK);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz), true);
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
GXCallDisplayList(l_pennant_flagDL, 0x80);
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
@@ -233,9 +233,9 @@ inline void FlagCloth2_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, getPos(), sizeof(mPositions), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_NRM, getNormal(), sizeof(mNormals), sizeof(cXyz), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mTexCoord, sizeof(mTexCoord), 8, true);
|
||||
GXSetZCompLoc(GX_FALSE);
|
||||
GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE);
|
||||
GXLoadTexObj(&mTexObj, GX_TEXMAP0);
|
||||
@@ -276,7 +276,7 @@ inline void FlagCloth2_c::draw() {
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz));
|
||||
GXSETARRAY(GX_VA_NRM, getNormalBack(), sizeof(mNormalBacks), sizeof(cXyz), true);
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
|
||||
@@ -89,8 +89,8 @@ static void* s_boar_sub(void* i_actor, void* i_data) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
static_cast<daObjIBone_c*>(i_this)->CreateHeap();
|
||||
static int CheckCreateHeap(fopAc_ac_c* i_this) {
|
||||
return static_cast<daObjIBone_c*>(i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
void daObjIBone_c::initBaseMtx() {
|
||||
@@ -150,7 +150,7 @@ int daObjIBone_c::create() {
|
||||
int result = dComIfG_resLoad(&mPhase, l_arcName);
|
||||
|
||||
if (result == cPhs_COMPLEATE_e) {
|
||||
if (!fopAcM_entrySolidHeap(this, (heapCallbackFunc)CheckCreateHeap, 0x860)) {
|
||||
if (!fopAcM_entrySolidHeap(this, CheckCreateHeap, 0x860)) {
|
||||
return cPhs_ERROR_e;
|
||||
} else if (!Create()) {
|
||||
return cPhs_ERROR_e;
|
||||
|
||||
@@ -198,24 +198,24 @@ void daObj_Stick_c::setMtx() {
|
||||
mpModel->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
}
|
||||
|
||||
static u32 daObj_Stick_Create(void* i_this) {
|
||||
static int daObj_Stick_Create(void* i_this) {
|
||||
return static_cast<daObj_Stick_c*>(i_this)->create();
|
||||
}
|
||||
|
||||
static void daObj_Stick_Delete(void* param_0) {
|
||||
static_cast<daObj_Stick_c*>(param_0)->Delete();
|
||||
static int daObj_Stick_Delete(void* param_0) {
|
||||
return static_cast<daObj_Stick_c*>(param_0)->Delete();
|
||||
}
|
||||
|
||||
static void daObj_Stick_Execute(void* param_0) {
|
||||
static_cast<daObj_Stick_c*>(param_0)->Execute();
|
||||
static int daObj_Stick_Execute(void* param_0) {
|
||||
return static_cast<daObj_Stick_c*>(param_0)->Execute();
|
||||
}
|
||||
|
||||
static void daObj_Stick_Draw(void* param_0) {
|
||||
static_cast<daObj_Stick_c*>(param_0)->Draw();
|
||||
static int daObj_Stick_Draw(void* param_0) {
|
||||
return static_cast<daObj_Stick_c*>(param_0)->Draw();
|
||||
}
|
||||
|
||||
static BOOL daObj_Stick_IsDelete(void* param_0) {
|
||||
return TRUE;
|
||||
static int daObj_Stick_IsDelete(void* param_0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static actor_method_class daObj_Stick_MethodTable = {
|
||||
|
||||
@@ -126,7 +126,7 @@ static f32 bound(cXyz* param_0, cBgS_PolyInfo const& param_1, f32 param_2) {
|
||||
cXyz pos;
|
||||
f32 abs = param_0->abs();
|
||||
|
||||
C_VECReflect(param_0, (Vec*)&plane, &pos);
|
||||
C_VECReflect(param_0, &plane.mNormal, &pos);
|
||||
*param_0 = pos * abs * param_2;
|
||||
|
||||
return param_0->absXZ();
|
||||
|
||||
@@ -59,7 +59,7 @@ static daNpcT_motionAnmData_c l_motionAnmData[11] = {
|
||||
static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_faceMotionSequenceData[20] = {
|
||||
{1, -1, 1}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {2, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
|
||||
{0, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0}, {3, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
|
||||
{4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
|
||||
{4, -1, 0}, {-1, 0, 0}, {-1, 0, 0}, {-1, 0, 0},
|
||||
};
|
||||
|
||||
static daNpcT_MotionSeqMngr_c::sequenceStepData_c l_motionSequenceData[40] = {
|
||||
|
||||
@@ -44,15 +44,15 @@ int daTagMagne_c::_delete() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void daTagMagne_Delete(daTagMagne_c* i_this) {
|
||||
static int daTagMagne_Delete(daTagMagne_c* i_this) {
|
||||
int id = fopAcM_GetID(i_this);
|
||||
i_this->_delete();
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
static void daTagMagne_Create(fopAc_ac_c* i_this) {
|
||||
static int daTagMagne_Create(fopAc_ac_c* i_this) {
|
||||
daTagMagne_c* magne = static_cast<daTagMagne_c*>(i_this);
|
||||
int id = fopAcM_GetID(i_this);
|
||||
magne->create();
|
||||
return magne->create();
|
||||
}
|
||||
|
||||
static actor_method_class l_daTagMagne_Method = {
|
||||
|
||||
@@ -189,7 +189,7 @@ int daTagSppath_c::execute() {
|
||||
}
|
||||
|
||||
if (mpBestPath->field_0x4 == 0) {
|
||||
if (mpBestPath->field_0x6 == 0xff || fopAcM_isSwitch(this, mpBestPath->field_0x6) == 0) {
|
||||
if (mpBestPath->swbit == 0xff || fopAcM_isSwitch(this, mpBestPath->swbit) == 0) {
|
||||
field_0x6e8 = 1;
|
||||
} else {
|
||||
field_0x6e8 = 2;
|
||||
|
||||
+42
-12
@@ -5,8 +5,14 @@
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
|
||||
#if TARGET_PC
|
||||
const u16 l_J_Ohana00_64TEX__width = 64;
|
||||
const u16 l_J_Ohana00_64TEX__height = 64;
|
||||
#else
|
||||
const u16 l_J_Ohana00_64TEX__width = 63;
|
||||
const u16 l_J_Ohana00_64TEX__height = 63;
|
||||
#endif
|
||||
|
||||
#include "assets/l_J_Ohana00_64TEX.h"
|
||||
|
||||
static u8 l_flowerPos[708] = {
|
||||
@@ -72,8 +78,8 @@ static u8 l_flowerNormal[180] = {
|
||||
0x46, 0x54, 0x0D, 0x3C, 0x4B, 0xEE, 0x80, 0x3F, 0x7F, 0xF5, 0xF9, 0x3C, 0x49, 0x81, 0xBF,
|
||||
};
|
||||
|
||||
static u8 l_flowerColor[8] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0xB2, 0xB2, 0xFF,
|
||||
static GXColor l_flowerColor[2] = {
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, {0xB2, 0xB2, 0xB2, 0xFF}
|
||||
};
|
||||
|
||||
static u8 l_flowerTexCoord[] = {
|
||||
@@ -108,8 +114,14 @@ l_matDL__d_a_grass(l_J_Ohana00_64TEX)
|
||||
#include "assets/l_matLight4DL.h"
|
||||
l_matLight4DL(l_J_Ohana00_64TEX)
|
||||
|
||||
#if TARGET_PC
|
||||
const u16 l_J_Ohana01_64128_0419TEX__width = 64;
|
||||
const u16 l_J_Ohana01_64128_0419TEX__height = 128;
|
||||
#else
|
||||
const u16 l_J_Ohana01_64128_0419TEX__width = 63;
|
||||
const u16 l_J_Ohana01_64128_0419TEX__height = 127;
|
||||
#endif
|
||||
|
||||
#include "assets/l_J_Ohana01_64128_0419TEX.h"
|
||||
|
||||
static u8 l_flowerPos2[1224] = {
|
||||
@@ -213,8 +225,8 @@ static u8 l_flowerNormal2[288] = {
|
||||
0x3B, 0x76, 0x7B, 0x1C, 0x3B, 0x99, 0x6B, 0x76, 0x3F, 0x7F, 0xF5, 0xF9, 0xBC, 0x8A, 0x1D, 0xFC,
|
||||
};
|
||||
|
||||
static u8 l_flowerColor2[8] = {
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xB2, 0xFF,
|
||||
static GXColor l_flowerColor2[2] = {
|
||||
{0xFF, 0xFF, 0xFF, 0xFF}, {0xFF, 0xFF, 0xB2, 0xFF}
|
||||
};
|
||||
|
||||
static u8 l_flowerTexCoord2[] = {
|
||||
@@ -509,6 +521,16 @@ dFlower_packet_c::dFlower_packet_c() {
|
||||
unused += 0x2000;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
GXInitTexObj(&mTexObj_l_J_Ohana00_64TEX, l_J_Ohana00_64TEX,
|
||||
l_J_Ohana00_64TEX__width, l_J_Ohana00_64TEX__height, GX_TF_CMPR, GX_MIRROR, GX_MIRROR, GX_FALSE
|
||||
);
|
||||
|
||||
GXInitTexObj(&mTexObj_l_J_Ohana01_64128_0419TEX, l_J_Ohana01_64128_0419TEX,
|
||||
l_J_Ohana01_64128_0419TEX__width, l_J_Ohana01_64128_0419TEX__height, GX_TF_CMPR, GX_MIRROR, GX_MIRROR, GX_FALSE
|
||||
);
|
||||
#endif
|
||||
|
||||
m_deleteRoom = &dFlower_packet_c::deleteRoom;
|
||||
|
||||
#if AVOID_UB
|
||||
@@ -531,10 +553,10 @@ void dFlower_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, &l_flowerPos, sizeof(l_flowerPos), 0xC, false);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal, sizeof(l_flowerNormal), 0xC, false);
|
||||
GXSETARRAY(GX_VA_CLR0, &l_flowerColor, sizeof(l_flowerColor), 4, false);
|
||||
GXSETARRAY(GX_VA_TEX0, &l_flowerTexCoord, sizeof(l_flowerTexCoord), 8, false);
|
||||
|
||||
GXColor sp64;
|
||||
dFlower_room_c* sp5C = m_room;
|
||||
@@ -615,6 +637,10 @@ void dFlower_packet_c::draw() {
|
||||
GXLoadPosMtxImm(sp44->m_modelMtx, 0);
|
||||
GXLoadNrmMtxImm(j3dSys.getViewMtx(), 0);
|
||||
|
||||
#if TARGET_PC
|
||||
GXLoadTexObj(&mTexObj_l_J_Ohana00_64TEX, GX_TEXMAP0);
|
||||
#endif
|
||||
|
||||
if (!cLib_checkBit<u8>(sp44->m_state, 8)) {
|
||||
GXCallDisplayList(&l_J_hana00DL, 0x140);
|
||||
} else {
|
||||
@@ -626,10 +652,10 @@ void dFlower_packet_c::draw() {
|
||||
sp5C++;
|
||||
}
|
||||
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_flowerPos2), 0xC, true);
|
||||
GXSETARRAY(GX_VA_NRM, &l_flowerNormal2, sizeof(l_flowerNormal2), 0xC, false);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_flowerColor2), 4, true);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_flowerTexCoord2), 8, true);
|
||||
|
||||
sp5C = m_room;
|
||||
|
||||
@@ -757,6 +783,10 @@ void dFlower_packet_c::draw() {
|
||||
GXLoadPosMtxImm(sp34->m_modelMtx, 0);
|
||||
GXLoadNrmMtxImm(j3dSys.getViewMtx(), 0);
|
||||
|
||||
#if TARGET_PC
|
||||
GXLoadTexObj(&mTexObj_l_J_Ohana01_64128_0419TEX, GX_TEXMAP0);
|
||||
#endif
|
||||
|
||||
if (!cLib_checkBit<u8>(sp34->m_state, 8)) {
|
||||
if (!cLib_checkBit<u8>(sp34->m_state, 0x10)) {
|
||||
GXCallDisplayList(mp_Jhana01DL, m_Jhana01DL_size);
|
||||
|
||||
@@ -536,10 +536,10 @@ void dGrass_packet_c::draw() {
|
||||
|
||||
GXSetVtxDescv(l_vtxDescList);
|
||||
GXSetVtxAttrFmtv(GX_VTXFMT0, l_vtxAttrFmtList);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec));
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor));
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8);
|
||||
GXSETARRAY(GX_VA_POS, mp_pos, sizeof(l_pos), sizeof(Vec), true);
|
||||
GXSETARRAY(GX_VA_NRM, mp_normal, sizeof(l_normal), sizeof(Vec), true);
|
||||
GXSETARRAY(GX_VA_CLR0, mp_colors, sizeof(l_color), sizeof(GXColor), true);
|
||||
GXSETARRAY(GX_VA_TEX0, mp_texCoords, sizeof(l_texCoord), 8, true);
|
||||
|
||||
GXColorS10 spA0 = {0, 0, 0, 0};
|
||||
GXColorS10 sp98 = {0, 0, 0, 0};
|
||||
|
||||
Reference in New Issue
Block a user