mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
d_a_shop_item, d_a_b_go, d_a_b_gos OK (#2085)
* d_a_shop_item OK * d_a_b_go OK * d_a_b_gos OK * remove asm * some work on d_a_b_oh / d_a_b_zant_sima * d_a_startAndGoal done
This commit is contained in:
+188
-683
File diff suppressed because it is too large
Load Diff
+389
-642
File diff suppressed because it is too large
Load Diff
+119
-117
@@ -921,192 +921,193 @@ static void non(b_oh_class* i_this) {
|
||||
}
|
||||
|
||||
/* 8061C2C4-8061CB4C 000C84 0888+00 2/1 0/0 0/0 .text action__FP10b_oh_class */
|
||||
// close-ish
|
||||
// matches with literals
|
||||
#ifdef NONMATCHING
|
||||
static void action(b_oh_class* i_this) {
|
||||
BOOL bvar;
|
||||
int uvar;
|
||||
b_oh_class* a_this = (b_oh_class*)i_this;
|
||||
int var_r28;
|
||||
BOOL var_r27;
|
||||
|
||||
cXyz sp90;
|
||||
cXyz sp9C;
|
||||
|
||||
cXyz local_90;
|
||||
cXyz cstack_9c;
|
||||
a_this->mAngleToPlayer = fopAcM_searchPlayerAngleY(a_this);
|
||||
a_this->mDistToPlayer = fopAcM_searchPlayerDistance(a_this);
|
||||
|
||||
i_this->mAngleToPlayer = fopAcM_searchPlayerAngleY(i_this);
|
||||
i_this->mDistToPlayer = fopAcM_searchPlayerDistance(i_this);
|
||||
fopAcM_OffStatus(a_this, 0);
|
||||
a_this->attention_info.flags = 0;
|
||||
|
||||
fopAcM_OffStatus(i_this, 0);
|
||||
i_this->attention_info.flags = 0;
|
||||
var_r28 = 0;
|
||||
var_r27 = true;
|
||||
|
||||
uvar = 0;
|
||||
bvar = true;
|
||||
cLib_addCalcAngleS2(&a_this->field_0xc98, 0x800, 1, 0x10);
|
||||
|
||||
cLib_addCalcAngleS2(&i_this->field_0xc98, 0x800, 1, 0x10);
|
||||
|
||||
switch (i_this->mAction) {
|
||||
switch (a_this->mAction) {
|
||||
case ACTION_START:
|
||||
start(i_this);
|
||||
uvar = 1;
|
||||
start(a_this);
|
||||
var_r28 = 1;
|
||||
break;
|
||||
case ACTION_WAIT:
|
||||
wait(i_this);
|
||||
uvar = 1;
|
||||
wait(a_this);
|
||||
var_r28 = 1;
|
||||
break;
|
||||
case ACTION_ATTACK:
|
||||
attack(i_this);
|
||||
uvar = 2;
|
||||
attack(a_this);
|
||||
var_r28 = 2;
|
||||
boss->field_0x4794 = 180;
|
||||
break;
|
||||
case ACTION_CAUGHT:
|
||||
caught(i_this);
|
||||
bvar = false;
|
||||
uvar = 3;
|
||||
caught(a_this);
|
||||
var_r27 = false;
|
||||
var_r28 = 3;
|
||||
boss->field_0x4794 = 180;
|
||||
break;
|
||||
case ACTION_END:
|
||||
end(i_this);
|
||||
uvar = 1;
|
||||
end(a_this);
|
||||
var_r28 = 1;
|
||||
break;
|
||||
case ACTION_NON:
|
||||
non(i_this);
|
||||
non(a_this);
|
||||
return;
|
||||
}
|
||||
|
||||
if (boss->field_0x4752 == 2) {
|
||||
cLib_addCalc2(&i_this->field_0x60c, 500.0f, 1.0f, 80.0f);
|
||||
cLib_addCalc2(&a_this->field_0x60c, 500.0f, 1.0f, 80.0f);
|
||||
}
|
||||
|
||||
if (uvar == 1) {
|
||||
f32 fvar15 = i_this->field_0x608 * 500.0f;
|
||||
f32 fvar14 = i_this->field_0x608 * 1500.0f;
|
||||
s16 tmp = 2000;
|
||||
if (var_r28 == 1) {
|
||||
f32 var_f29 = a_this->field_0x608 * 500.0f;
|
||||
f32 var_f28 = a_this->field_0x608 * 1500.0f;
|
||||
s16 var_r5 = 2000;
|
||||
|
||||
for (int i = i_this->field_0xca8; i < 30; i++) {
|
||||
f32 fvar = 1.0f;
|
||||
f32 var_f31 = 1.0f;
|
||||
if (i < 5) {
|
||||
fvar = i * 0.2f;
|
||||
var_f31 = i * 0.2f;
|
||||
} else if (i >= 20) {
|
||||
fvar = (i - 20) * 0.3f + 1.0f;
|
||||
var_f31 = (i - 20) * 0.3f + 1.0f;
|
||||
}
|
||||
|
||||
i_this->field_0x6d0[i].x = fvar * (fvar15 * cM_ssin(i_this->field_0x5f8 + (i * 1800)));
|
||||
i_this->field_0x6d0[i].y = fvar * (fvar14 * cM_ssin(i_this->field_0x5fa + (i * 1800)));
|
||||
a_this->field_0x6d0[i].x = var_f31 * (var_f29 * cM_ssin( i_this->field_0x5f8 + (i * 1800) ));
|
||||
a_this->field_0x6d0[i].y = var_f31 * (var_f28 * cM_ssin( i_this->field_0x5fa + (i * 1800) ));
|
||||
|
||||
i_this->field_0x838[i].x =
|
||||
tmp + fvar * (fvar15 * cM_ssin(i_this->field_0x5fa + (i * 7000)) * 0.5f);
|
||||
i_this->field_0x838[i].y =
|
||||
fvar * (fvar14 * cM_ssin(i_this->field_0x5f8 + (i * 7000)) * 0.5f);
|
||||
a_this->field_0x838[i].x =
|
||||
var_r5 + var_f31 * (var_f29 * cM_ssin(a_this->field_0x5fa + (i * 7000)) * 0.5f);
|
||||
a_this->field_0x838[i].y =
|
||||
var_f31 * (var_f28 * cM_ssin(a_this->field_0x5f8 + (i * 7000)) * 0.5f);
|
||||
|
||||
tmp -= 200;
|
||||
if (tmp < 0) {
|
||||
tmp = 0;
|
||||
var_r5 -= 200;
|
||||
if (var_r5 < 0) {
|
||||
var_r5 = 0;
|
||||
}
|
||||
|
||||
i_this->field_0x964[i] =
|
||||
i_this->field_0x610 + 1.0f +
|
||||
i_this->field_0x610 * cM_ssin(i_this->field_0x5f6 + i * -10000);
|
||||
a_this->field_0x964[i] =
|
||||
a_this->field_0x610 + 1.0f +
|
||||
a_this->field_0x610 * cM_ssin(a_this->field_0x5f6 + i * -10000);
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.x, -0xF2C, 4, 100);
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->home.angle.y, 4, 0x100);
|
||||
} else if (uvar == 2) {
|
||||
f32 fvar = i_this->field_0xc8c;
|
||||
for (int i = i_this->field_0xca8; i < 30; i++) {
|
||||
if (i >= 30 - i_this->field_0xca2) {
|
||||
i_this->field_0x6d0[i].y = i_this->field_0xca4;
|
||||
cLib_addCalcAngleS2(&a_this->current.angle.x, -0xF2C, 4, 100);
|
||||
cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y, 4, 0x100);
|
||||
} else if (var_r28 == 2) {
|
||||
f32 var_f4 = a_this->field_0xc8c;
|
||||
for (int i = a_this->field_0xca8; i < 30; i++) {
|
||||
if (i >= 30 - a_this->field_0xca2) {
|
||||
a_this->field_0x6d0[i].y = a_this->field_0xca4;
|
||||
} else {
|
||||
i_this->field_0x6d0[i].y = 0;
|
||||
a_this->field_0x6d0[i].y = 0;
|
||||
}
|
||||
|
||||
if (i >= 13) {
|
||||
fvar *= i_this->field_0xc90 + 1.0f;
|
||||
var_f4 *= a_this->field_0xc90 + 1.0f;
|
||||
}
|
||||
|
||||
i_this->field_0x6d0[i].x =
|
||||
fvar * cM_ssin(i_this->field_0xc94 + i * i_this->field_0xc96);
|
||||
a_this->field_0x6d0[i].x =
|
||||
var_f4 * cM_ssin(a_this->field_0xc94 + i * a_this->field_0xc96);
|
||||
|
||||
if (i >= 18) {
|
||||
i_this->field_0x838[i].x =
|
||||
i_this->field_0xc9c * cM_ssin(i_this->field_0x5cc * 1000 + i * -4000);
|
||||
a_this->field_0x838[i].x =
|
||||
a_this->field_0xc9c * cM_ssin(a_this->field_0x5cc * 1000 + i * -4000);
|
||||
} else {
|
||||
i_this->field_0x838[i].x = 0;
|
||||
a_this->field_0x838[i].x = 0;
|
||||
}
|
||||
|
||||
i_this->field_0x838[i].y = 0;
|
||||
i_this->field_0x964[i] =
|
||||
i_this->field_0x610 + 1.0f +
|
||||
i_this->field_0x610 * cM_ssin(i_this->field_0x5f6 + i * -10000);
|
||||
a_this->field_0x838[i].y = 0;
|
||||
a_this->field_0x964[i] =
|
||||
a_this->field_0x610 + 1.0f +
|
||||
a_this->field_0x610 * cM_ssin(a_this->field_0x5f6 + i * -10000);
|
||||
}
|
||||
} else if (uvar == 3) {
|
||||
for (int i = i_this->field_0xca8; i < 30; i++) {
|
||||
i_this->field_0x838[i].y = 0;
|
||||
i_this->field_0x838[i].x = 0;
|
||||
} else if (var_r28 == 3) {
|
||||
for (int i = a_this->field_0xca8; i < 30; i++) {
|
||||
a_this->field_0x838[i].y = 0;
|
||||
a_this->field_0x838[i].x = 0;
|
||||
|
||||
if (i >= 30 - i_this->field_0xca2) {
|
||||
i_this->field_0x6d0[i].y = i_this->field_0xca4;
|
||||
i_this->field_0x6d0[i].x = 0;
|
||||
i_this->field_0x964[i] = 1.0f;
|
||||
if (i >= 30 - a_this->field_0xca2) {
|
||||
a_this->field_0x6d0[i].y = a_this->field_0xca4;
|
||||
a_this->field_0x6d0[i].x = 0;
|
||||
a_this->field_0x964[i] = 1.0f;
|
||||
} else {
|
||||
i_this->field_0x6d0[i].y = 0;
|
||||
i_this->field_0x6d0[i].x = 2250;
|
||||
i_this->field_0x964[i] =
|
||||
i_this->field_0x610 + 1.0f +
|
||||
i_this->field_0x610 * cM_ssin(i_this->field_0x5f6 + i * -10000);
|
||||
a_this->field_0x6d0[i].y = 0;
|
||||
a_this->field_0x6d0[i].x = 2250;
|
||||
a_this->field_0x964[i] =
|
||||
a_this->field_0x610 + 1.0f +
|
||||
a_this->field_0x610 * cM_ssin(a_this->field_0x5f6 + i * -10000);
|
||||
}
|
||||
}
|
||||
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.x, 0xA92, 4, 0x200);
|
||||
cLib_addCalcAngleS2(&i_this->current.angle.y, i_this->home.angle.y, 4, 0x800);
|
||||
cLib_addCalcAngleS2(&a_this->current.angle.x, 0xA92, 4, 0x200);
|
||||
cLib_addCalcAngleS2(&a_this->current.angle.y, a_this->home.angle.y, 4, 0x800);
|
||||
}
|
||||
|
||||
i_this->field_0x600 =
|
||||
(-i_this->field_0x614 - i_this->field_0x60c) + cM_ssin(i_this->field_0x5cc * 200) * 100.0f;
|
||||
i_this->field_0x604 = ((100.0f - i_this->field_0x614) - i_this->field_0x60c) +
|
||||
cM_ssin(i_this->field_0x5cc * 200) * 100.0f;
|
||||
i_this->field_0x5f8 += (s16)i_this->field_0x600;
|
||||
i_this->field_0x5fa += (s16)i_this->field_0x604;
|
||||
i_this->field_0x5fc = i_this->field_0x60c + 2000.0f;
|
||||
i_this->field_0x5f6 += (s16)i_this->field_0x5fc;
|
||||
a_this->field_0x600 =
|
||||
(-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;
|
||||
a_this->field_0x5fc = a_this->field_0x60c + 2000.0f;
|
||||
a_this->field_0x5f6 += (s16)a_this->field_0x5fc;
|
||||
|
||||
cLib_addCalc0(&i_this->field_0x60c, 0.1f, 50.0f);
|
||||
cLib_addCalc2(&i_this->field_0x610, 0.2f, 0.1f, 0.01f);
|
||||
|
||||
if (uvar <= 3) {
|
||||
cLib_addCalc2(&i_this->mTentacleLength, l_HIO.mLength, 0.1f, 0.5f);
|
||||
cLib_addCalc0(&a_this->field_0x60c, 0.1f, 50.0f);
|
||||
cLib_addCalc2(&a_this->field_0x610, 0.2f, 0.1f, 0.01f);
|
||||
|
||||
if (var_r28 <= 3) {
|
||||
cLib_addCalc2(&a_this->mTentacleLength, l_HIO.mLength, 0.1f, 0.5f);
|
||||
}
|
||||
|
||||
MTXCopy(i_this->mpMorf->getModel()->i_getAnmMtx(i_this->field_0x5c8 + 8),
|
||||
MTXCopy(boss->mParts[0].field_0x0->getModel()->i_getAnmMtx(a_this->field_0x5c8 + 8),
|
||||
mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&i_this->current.pos);
|
||||
mDoMtx_stack_c::multVecZero(&a_this->current.pos);
|
||||
|
||||
local_90.x = i_this->current.pos.x - boss->home.pos.x;
|
||||
local_90.z = i_this->current.pos.z - boss->home.pos.z;
|
||||
i_this->home.angle.y = cM_atan2s(local_90.x, local_90.z);
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.y, i_this->current.angle.y, 2, 0x2000);
|
||||
cLib_addCalcAngleS2(&i_this->shape_angle.x, i_this->current.angle.x, 2, 0x2000);
|
||||
sp90.x = a_this->current.pos.x - boss->home.pos.x;
|
||||
sp90.z = a_this->current.pos.z - boss->home.pos.z;
|
||||
a_this->home.angle.y = cM_atan2s(sp90.x, sp90.z);
|
||||
cLib_addCalcAngleS2(&a_this->shape_angle.y, a_this->current.angle.y, 2, 0x2000);
|
||||
cLib_addCalcAngleS2(&a_this->shape_angle.x, a_this->current.angle.x, 2, 0x2000);
|
||||
|
||||
for (int i = i_this->field_0xca8; i < 30; i++) {
|
||||
for (int i = a_this->field_0xca8; i < 30; i++) {
|
||||
if (Cinit) {
|
||||
i_this->field_0x61c[i] = i_this->field_0x6d0[i];
|
||||
i_this->field_0x784[i] = i_this->field_0x838[i];
|
||||
i_this->field_0x8ec[i] = i_this->field_0x964[i];
|
||||
a_this->field_0x61c[i] = a_this->field_0x6d0[i];
|
||||
a_this->field_0x784[i] = a_this->field_0x838[i];
|
||||
a_this->field_0x8ec[i] = a_this->field_0x964[i];
|
||||
} else {
|
||||
cLib_addCalcAngleS2(&i_this->field_0x61c[i].x, i_this->field_0x6d0[i].x, 2,
|
||||
i_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&i_this->field_0x61c[i].y, i_this->field_0x6d0[i].y, 2,
|
||||
i_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&i_this->field_0x784[i].x, i_this->field_0x838[i].x, 2,
|
||||
i_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&i_this->field_0x784[i].y, i_this->field_0x838[i].y, 2,
|
||||
i_this->field_0xc98);
|
||||
cLib_addCalc2(&i_this->field_0x8ec[i], i_this->field_0x964[i], 0.5f, 0.2f);
|
||||
cLib_addCalc0(&i_this->field_0x9dc[i], 0.1f, 0.2f);
|
||||
cLib_addCalcAngleS2(&a_this->field_0x61c[i].x, a_this->field_0x6d0[i].x, 2,
|
||||
a_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&a_this->field_0x61c[i].y, a_this->field_0x6d0[i].y, 2,
|
||||
a_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&a_this->field_0x784[i].x, a_this->field_0x838[i].x, 2,
|
||||
a_this->field_0xc98);
|
||||
cLib_addCalcAngleS2(&a_this->field_0x784[i].y, a_this->field_0x838[i].y, 2,
|
||||
a_this->field_0xc98);
|
||||
cLib_addCalc2(&a_this->field_0x8ec[i], a_this->field_0x964[i], 0.5f, 0.2f);
|
||||
cLib_addCalc0(&a_this->field_0x9dc[i], 0.1f, 0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (bvar && boss->mDemoAction == 0) {
|
||||
i_this->mColliders[i].OnCoSetBit();
|
||||
if (var_r27 && boss->mDemoAction == 0) {
|
||||
a_this->mColliders[i].OnCoSetBit();
|
||||
} else {
|
||||
i_this->mColliders[i].OffCoSetBit();
|
||||
a_this->mColliders[i].OffCoSetBit();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1592,7 +1593,8 @@ extern "C" void __ct__5csXyzFv() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm daB_OH_HIO_c::~daB_OH_HIO_c() {
|
||||
// asm daB_OH_HIO_c::~daB_OH_HIO_c() {
|
||||
extern "C" asm void __dt__12daB_OH_HIO_cFv() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/b/d_a_b_oh/d_a_b_oh/__dt__12daB_OH_HIO_cFv.s"
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,33 +1,21 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: d_a_b_zant_sima
|
||||
//
|
||||
/**
|
||||
* d_a_b_zant_sima.cpp
|
||||
* Boss Zant Lava Island
|
||||
*/
|
||||
|
||||
#include "rel/d/a/b/d_a_b_zant_sima/d_a_b_zant_sima.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/com/d_com_inf_game.h"
|
||||
#include "d/d_procname.h"
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
static int daB_ZANTS_Draw(daB_ZANTS_c*);
|
||||
static int daB_ZANTS_Execute(daB_ZANTS_c*);
|
||||
static int daB_ZANTS_IsDelete(daB_ZANTS_c*);
|
||||
static int daB_ZANTS_Delete(daB_ZANTS_c*);
|
||||
static int daB_ZANTS_Create(daB_ZANTS_c*);
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
#define TIMER_PLAYER 0
|
||||
#define TIMER_ZANT 1
|
||||
|
||||
/* 806529D8-80652AAC 000078 00D4+00 1/1 0/0 0/0 .text draw__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::draw() {
|
||||
g_env_light.settingTevStruct(16, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
|
||||
|
||||
dComIfGd_setListBG();
|
||||
mpBtkAnm->entry(mpModel->getModelData());
|
||||
mpBrkAnm->entry(mpModel->getModelData());
|
||||
@@ -43,13 +31,13 @@ static int daB_ZANTS_Draw(daB_ZANTS_c* i_this) {
|
||||
|
||||
/* 80652ACC-80652B28 00016C 005C+00 1/1 0/0 0/0 .text
|
||||
* zants_ride_call_back__FP4dBgWP10fopAc_ac_cP10fopAc_ac_c */
|
||||
static void zants_ride_call_back(dBgW* param_0, fopAc_ac_c* i_this, fopAc_ac_c* i_target) {
|
||||
static void zants_ride_call_back(dBgW* i_bgw, fopAc_ac_c* i_this, fopAc_ac_c* i_target) {
|
||||
if (fopAcM_GetName(i_target) == PROC_ALINK) {
|
||||
((daB_ZANTS_c*)i_this)->mPlayerID = fopAcM_GetID(i_target);
|
||||
((daB_ZANTS_c*)i_this)->field_0x584[0] = 3;
|
||||
((daB_ZANTS_c*)i_this)->mSinkTimers[TIMER_PLAYER] = 3;
|
||||
} else if (fopAcM_GetName(i_target) == PROC_B_ZANT) {
|
||||
((daB_ZANTS_c*)i_this)->mBossID = fopAcM_GetID(i_target);
|
||||
((daB_ZANTS_c*)i_this)->field_0x584[1] = 3;
|
||||
((daB_ZANTS_c*)i_this)->mSinkTimers[TIMER_ZANT] = 3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,50 +45,61 @@ static void zants_ride_call_back(dBgW* param_0, fopAc_ac_c* i_this, fopAc_ac_c*
|
||||
void daB_ZANTS_c::action() {
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
if (player->i_checkMagneBootsOn()) {
|
||||
field_0x584[0] = 3;
|
||||
mSinkTimers[TIMER_PLAYER] = 3;
|
||||
mPlayerID = fopAcM_GetID(player);
|
||||
}
|
||||
cXyz pos = current.pos;
|
||||
fopAc_ac_c* target;
|
||||
if (field_0x584[1] != 0) {
|
||||
if (fopAcM_SearchByID(mBossID, &target), target != NULL) {
|
||||
pos = target->current.pos;
|
||||
|
||||
cXyz target_pos = current.pos;
|
||||
|
||||
if (mSinkTimers[TIMER_ZANT] != 0) {
|
||||
fopAc_ac_c* target;
|
||||
fopAcM_SearchByID(mBossID, &target);
|
||||
|
||||
if (target != NULL) {
|
||||
target_pos = target->current.pos;
|
||||
}
|
||||
}
|
||||
u8 temp = field_0x584[3];
|
||||
field_0x584[3] = 0;
|
||||
field_0x584[2] = 0;
|
||||
if (field_0x584[1]) {
|
||||
field_0x584[3] = 1;
|
||||
|
||||
bool prev_sink_zant = mSinkZant;
|
||||
mSinkZant = false;
|
||||
mSinkPlayer = false;
|
||||
if (mSinkTimers[TIMER_ZANT] != 0) {
|
||||
mSinkZant = true;
|
||||
}
|
||||
if (field_0x584[0]) {
|
||||
field_0x584[2] = 1;
|
||||
|
||||
if (mSinkTimers[TIMER_PLAYER] != 0) {
|
||||
mSinkPlayer = true;
|
||||
}
|
||||
f32 x = pos.x - current.pos.x;
|
||||
f32 z = pos.z - current.pos.z;
|
||||
pos.absXZ(current.pos);
|
||||
cLib_addCalcAngleS2(&field_0x58c.y, cM_atan2s(x, z), 8, 1024);
|
||||
if (temp == 0 && field_0x584[3] != 0) {
|
||||
if (field_0x58c.x == 0) {
|
||||
field_0x58c.y = cM_atan2s(x, z);
|
||||
|
||||
f32 x = target_pos.x - current.pos.x;
|
||||
f32 z = target_pos.z - current.pos.z;
|
||||
target_pos.absXZ(current.pos);
|
||||
cLib_addCalcAngleS2(&mRotation.y, cM_atan2s(x, z), 8, 0x400);
|
||||
|
||||
if (!prev_sink_zant && mSinkZant) {
|
||||
if (mRotation.x == 0) {
|
||||
mRotation.y = cM_atan2s(x, z);
|
||||
}
|
||||
field_0x58c.z = 0x400;
|
||||
mRotation.z = 0x400;
|
||||
}
|
||||
cLib_addCalcAngleS2(&field_0x58c.x, 0, 8, 64);
|
||||
field_0x58c.x += field_0x58c.z;
|
||||
if (0x1400 < field_0x58c.x) {
|
||||
field_0x58c.x = 0x1400;
|
||||
field_0x58c.z = 0;
|
||||
|
||||
cLib_addCalcAngleS2(&mRotation.x, 0, 8, 0x40);
|
||||
mRotation.x += mRotation.z;
|
||||
if (0x1400 < mRotation.x) {
|
||||
mRotation.x = 0x1400;
|
||||
mRotation.z = 0;
|
||||
}
|
||||
cLib_chaseAngleS(&field_0x58c.z, 0, 128);
|
||||
f32 temp2 = 150.0f;
|
||||
if (field_0x584[0] || field_0x584[1]) {
|
||||
temp2 = 130.0f;
|
||||
cLib_chaseAngleS(&mRotation.z, 0, 0x80);
|
||||
|
||||
f32 target_height = 150.0f;
|
||||
if (mSinkTimers[TIMER_PLAYER] != 0 || mSinkTimers[TIMER_ZANT] != 0) {
|
||||
target_height = 130.0f;
|
||||
}
|
||||
cLib_addCalc2(&field_0x588, temp2, 0.2f, 20.0f);
|
||||
|
||||
cLib_addCalc2(&mHeight, target_height, 0.2f, 20.0f);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (field_0x584[i] != 0) {
|
||||
field_0x584[i] -= 1;
|
||||
if (mSinkTimers[i] != 0) {
|
||||
mSinkTimers[i]--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,17 +108,20 @@ void daB_ZANTS_c::action() {
|
||||
int daB_ZANTS_c::execute() {
|
||||
mpBrkAnm->play();
|
||||
mpBtkAnm->play();
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y + field_0x588, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(field_0x58c.y);
|
||||
mDoMtx_stack_c::XrotM(field_0x58c.x);
|
||||
mDoMtx_stack_c::YrotM(-field_0x58c.y);
|
||||
|
||||
mDoMtx_stack_c::transS(current.pos.x, current.pos.y + mHeight, current.pos.z);
|
||||
mDoMtx_stack_c::YrotM(mRotation.y);
|
||||
mDoMtx_stack_c::XrotM(mRotation.x);
|
||||
mDoMtx_stack_c::YrotM(-mRotation.y);
|
||||
mDoMtx_stack_c::ZXYrotM(shape_angle);
|
||||
mDoMtx_stack_c::transM(0.0f, -30.0f, 0.0f);
|
||||
mpModel->i_setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
cMtx_copy(mDoMtx_stack_c::get(), field_0x594);
|
||||
if (mpBgW) {
|
||||
cMtx_copy(mDoMtx_stack_c::get(), mMtx);
|
||||
|
||||
if (mpBgW != NULL) {
|
||||
mpBgW->Move();
|
||||
}
|
||||
|
||||
action();
|
||||
return 1;
|
||||
}
|
||||
@@ -137,7 +139,7 @@ static int daB_ZANTS_IsDelete(daB_ZANTS_c* i_this) {
|
||||
/* 80652EC0-80652F18 000560 0058+00 1/1 0/0 0/0 .text _delete__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::_delete() {
|
||||
dComIfG_resDelete(&mPhase, "MAGNESIMA");
|
||||
if (mpBgW) {
|
||||
if (mpBgW != NULL) {
|
||||
dComIfG_Bgsp().Release(mpBgW);
|
||||
}
|
||||
return 1;
|
||||
@@ -148,6 +150,88 @@ static int daB_ZANTS_Delete(daB_ZANTS_c* i_this) {
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
/* 80652F38-80653180 0005D8 0248+00 1/1 0/0 0/0 .text CreateHeap__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::CreateHeap() {
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes("MAGNESIMA", 7);
|
||||
mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
|
||||
if (mpModel == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mpBtkAnm = new mDoExt_btkAnm();
|
||||
if (mpBtkAnm == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("MAGNESIMA", 13);
|
||||
if (!mpBtkAnm->init(mpModel->getModelData(), pbtk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0,
|
||||
-1))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mpBrkAnm = new mDoExt_brkAnm();
|
||||
if (mpBrkAnm == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes("MAGNESIMA", 10);
|
||||
if (!mpBrkAnm->init(mpModel->getModelData(), pbrk, TRUE, J3DFrameCtrl::LOOP_REPEAT_e, 1.0f, 0,
|
||||
-1))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mpBgW = new dBgW();
|
||||
if (mpBgW == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
cBgD_t* pdzb = (cBgD_t*)dComIfG_getObjectRes("MAGNESIMA", 16);
|
||||
if (mpBgW->Set(pdzb, cBgW::MOVE_BG_e, &mMtx)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
mpBgW->SetCrrFunc(dBgS_MoveBGProc_Typical);
|
||||
mpBgW->SetRideCallback(zants_ride_call_back);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* 806531C8-806531E8 000868 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
|
||||
static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
return static_cast<daB_ZANTS_c*>(i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
/* 806531E8-80653304 000888 011C+00 1/1 0/0 0/0 .text create__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::create() {
|
||||
fopAcM_SetupActor(this, daB_ZANTS_c);
|
||||
|
||||
int phase_state = dComIfG_resLoad(&mPhase, "MAGNESIMA");
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x3AA0)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
if (mpBgW && dComIfG_Bgsp().Regist(mpBgW, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
attention_info.flags = 0;
|
||||
mHeight = 150.0f;
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
fopAcM_SetMin(this, -200.0f, -500.0f, -500.0f);
|
||||
fopAcM_SetMax(this, 200.0f, 500.0f, 500.0f);
|
||||
daB_ZANTS_Execute(this);
|
||||
}
|
||||
|
||||
return phase_state;
|
||||
}
|
||||
|
||||
/* 80653304-80653324 0009A4 0020+00 1/0 0/0 0/0 .text daB_ZANTS_Create__FP11daB_ZANTS_c */
|
||||
static int daB_ZANTS_Create(daB_ZANTS_c* i_this) {
|
||||
return i_this->create();
|
||||
}
|
||||
|
||||
/* 80653370-80653390 -00001 0020+00 1/0 0/0 0/0 .data l_daB_ZANTS_Method */
|
||||
static actor_method_class l_daB_ZANTS_Method = {
|
||||
(process_method_func)daB_ZANTS_Create, (process_method_func)daB_ZANTS_Delete,
|
||||
@@ -171,71 +255,4 @@ extern actor_process_profile_definition g_profile_B_ZANTS = {
|
||||
0x40000,
|
||||
fopAc_ACTOR_e,
|
||||
fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
/* 80652F38-80653180 0005D8 0248+00 1/1 0/0 0/0 .text CreateHeap__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::CreateHeap() {
|
||||
J3DModelData* model_data = (J3DModelData*)dComIfG_getObjectRes("MAGNESIMA", 7);
|
||||
mpModel = mDoExt_J3DModel__create(model_data, 0x80000, 0x11000084);
|
||||
if (mpModel == NULL) {
|
||||
return 0;
|
||||
}
|
||||
mpBtkAnm = new mDoExt_btkAnm();
|
||||
if (mpBtkAnm == NULL) {
|
||||
return 0;
|
||||
}
|
||||
J3DAnmTextureSRTKey* srtkey = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes("MAGNESIMA", 13);
|
||||
if (!mpBtkAnm->init(mpModel->getModelData(), srtkey, 1, 2, 1.0f, 0, -1)) {
|
||||
return 0;
|
||||
}
|
||||
mpBrkAnm = new mDoExt_brkAnm();
|
||||
if (mpBrkAnm == NULL) {
|
||||
return 0;
|
||||
}
|
||||
J3DAnmTevRegKey* tevkey = (J3DAnmTevRegKey*)dComIfG_getObjectRes("MAGNESIMA", 10);
|
||||
if (!mpBrkAnm->init(mpModel->getModelData(), tevkey, 1, 2, 1.0f, 0, -1)) {
|
||||
return 0;
|
||||
}
|
||||
mpBgW = new dBgW();
|
||||
if (mpBgW == NULL) {
|
||||
return 0;
|
||||
}
|
||||
cBgD_t* bgt = (cBgD_t*)dComIfG_getObjectRes("MAGNESIMA", 16);
|
||||
if (mpBgW->Set(bgt, 1, &field_0x594)) {
|
||||
return 0;
|
||||
}
|
||||
mpBgW->SetCrrFunc(dBgS_MoveBGProc_Typical);
|
||||
mpBgW->SetRideCallback(zants_ride_call_back);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 806531C8-806531E8 000868 0020+00 1/1 0/0 0/0 .text useHeapInit__FP10fopAc_ac_c */
|
||||
static int useHeapInit(fopAc_ac_c* i_this) {
|
||||
return static_cast<daB_ZANTS_c*>(i_this)->CreateHeap();
|
||||
}
|
||||
|
||||
/* 806531E8-80653304 000888 011C+00 1/1 0/0 0/0 .text create__11daB_ZANTS_cFv */
|
||||
int daB_ZANTS_c::create() {
|
||||
fopAcM_SetupActor(this, daB_ZANTS_c);
|
||||
int result = dComIfG_resLoad(&mPhase, "MAGNESIMA");
|
||||
if (result == cPhs_COMPLEATE_e) {
|
||||
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0x3AA0)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
if (mpBgW && dComIfG_Bgsp().Regist(mpBgW, this)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
attention_info.flags = 0;
|
||||
field_0x588 = 150.0f;
|
||||
fopAcM_SetMtx(this, mpModel->getBaseTRMtx());
|
||||
fopAcM_SetMin(this, -200.0f, -500.0f, -500.0f);
|
||||
fopAcM_SetMax(this, 200.0f, 500.0f, 500.0f);
|
||||
daB_ZANTS_Execute(this);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/* 80653304-80653324 0009A4 0020+00 1/0 0/0 0/0 .text daB_ZANTS_Create__FP11daB_ZANTS_c */
|
||||
static int daB_ZANTS_Create(daB_ZANTS_c* i_this) {
|
||||
return i_this->create();
|
||||
}
|
||||
};
|
||||
@@ -10,17 +10,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct fopAcM_lc_c {
|
||||
/* 8001DC68 */ void lineCheck(cXyz const*, cXyz const*, fopAc_ac_c const*);
|
||||
};
|
||||
|
||||
struct fopAcM_gc_c {
|
||||
/* 8001DCBC */ void gndCheck(cXyz const*);
|
||||
|
||||
static u8 mGndCheck[84];
|
||||
static f32 mGroundY;
|
||||
};
|
||||
|
||||
struct J3DMaterial {};
|
||||
|
||||
struct daMidna_matAnm_c {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -884,7 +884,7 @@ int daSpinner_c::setNextPathNum() {
|
||||
}
|
||||
|
||||
/* 804D3694-804D36F4 001DF4 0060+00 1/1 0/0 0/0 .text getPathNextPos__11daSpinner_cFv */
|
||||
cXyz* daSpinner_c::getPathNextPos() {
|
||||
Vec* daSpinner_c::getPathNextPos() {
|
||||
s32 add = field_0xa72 + field_0xa73;
|
||||
if (add < 0) {
|
||||
return &(mpPathMove->m_points + mpPathMove->m_num - 1)->m_position;
|
||||
|
||||
@@ -19,6 +19,7 @@ M706_LIBS := \
|
||||
M706_CFLAGS := \
|
||||
-sdata 0 \
|
||||
-sdata2 0 \
|
||||
-sym on \
|
||||
|
||||
M706_LDFLAGS := \
|
||||
-nodefaults \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user