Resolve all "illegal jump past declaration/initializer" warnings (#2911)

* resolve illegal jump past declaration/initializer

* pr comments
This commit is contained in:
Niklas Bauer
2025-12-04 14:57:33 +02:00
committed by GitHub
parent f97d334732
commit 4d3f25d34e
53 changed files with 320 additions and 241 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ public:
/* 0x3 */ TYPE_HYRAL,
};
enum EAction {
enum Mode_e {
/* 0x00 */ ACT_WAIT,
/* 0x01 */ ACT_DEMO_FILONE_1,
/* 0x02 */ ACT_DEMO_FILONE_2,
@@ -106,7 +106,7 @@ public:
(this->*(*mAction))();
}
void setAction(EAction action) {
void setAction(Mode_e action) {
mActionID = action;
mAction = ActionTable[mActionID];
callInit();
+5 -5
View File
@@ -44,9 +44,7 @@ char* J2DResReference::getName(u16 idx) const {
p_name[0] = 0;
return p_name;
} else {
s8 first = resRef[0];
switch (first) {
switch (resRef[0]) {
case 2:
case 3:
for (s32 i = 0; i < resRef[1]; i++) {
@@ -54,8 +52,9 @@ char* J2DResReference::getName(u16 idx) const {
}
p_name[resRef[1]] = 0;
break;
case 4:
s32 pos = resRef[1] + 1;
case 4: {
s32 tmp = resRef[1];
s32 pos = tmp + 1;
for (; pos >= 2; pos--) {
if (resRef[pos] == '\\' || resRef[pos] == '/') {
break;
@@ -70,6 +69,7 @@ char* J2DResReference::getName(u16 idx) const {
p_name[i] = 0;
break;
}
default:
p_name[0] = 0;
}
+6 -3
View File
@@ -75,7 +75,8 @@ bool JKRDvdArchive::open(s32 entryNum) {
JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0, &mCompression, NULL);
DCInvalidateRange(arcHeader, sizeof(SArcHeader));
int alignment = mMountDirection == MOUNT_DIRECTION_HEAD ? 0x20 : -0x20;
int alignment;
alignment = mMountDirection == MOUNT_DIRECTION_HEAD ? 0x20 : -0x20;
mArcInfoBlock = (SArcDataInfo*)JKRAllocFromHeap(mHeap, arcHeader->file_data_offset, alignment);
if (!mArcInfoBlock) {
@@ -93,8 +94,10 @@ bool JKRDvdArchive::open(s32 entryNum) {
mStringTable = (char*)((int)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset);
mExpandedSize = NULL;
u8 useCompression = 0;
SDIFileEntry* fileEntry = mFiles;
u8 useCompression;
useCompression = 0;
SDIFileEntry* fileEntry;
fileEntry = mFiles;
for (u32 i = 0; i < mArcInfoBlock->num_file_entries; fileEntry++, i++) {
if (fileEntry->isUnknownFlag1()) {
useCompression |= fileEntry->getCompressFlag();
+4 -1
View File
@@ -195,15 +195,18 @@ u32 JKRMemArchive::fetchResource_subroutine(u8* src, u32 srcLength, u8* dst, u32
return srcLength;
case COMPRESSION_YAY0:
case COMPRESSION_YAZ0:
case COMPRESSION_YAZ0: {
u32 expendedSize = JKRDecompExpandSize(src);
#if VERSION != VERSION_SHIELD_DEBUG
srcLength = expendedSize;
#endif
if (expendedSize > dstLength) {
srcLength = dstLength;
}
JKRDecompress(src, dst, srcLength, 0);
return srcLength;
}
default: {
JUTException::panic(__FILE__, 723, "??? bad sequence\n");
@@ -48,7 +48,7 @@ int JStudio::TControl::transformOnGet_setOrigin_TxyzRy(Vec const& param_0, f32 p
int JStudio::TControl::transform_setOrigin_ctb(JStudio::ctb::TObject const& param_0) {
switch (param_0.getScheme()) {
case 1:
case 1: {
const f32* pfVar4 = (const f32*)param_0.getData();
Vec local_144 = {0.0f, 0.0f, 0.0f};
local_144.x = pfVar4[0];
@@ -56,6 +56,7 @@ int JStudio::TControl::transform_setOrigin_ctb(JStudio::ctb::TObject const& para
local_144.z = pfVar4[2];
transform_setOrigin_TxyzRy(local_144, pfVar4[3]);
break;
}
default:
return 0;
}
@@ -117,9 +117,9 @@ JStudio_JStage::TAdaptor_camera::adaptor_do_PARENT_ENABLE(JStudio::data::TEOpera
case JStudio::data::UNK_0x2:
JUT_ASSERT(185, uSize==4);
JUT_ASSERT(186, pContent!=NULL);
field_0x114 = *(u32*)pContent ? 1 : 0;
field_0x114 = *(u32*)pContent ? true : false;
switch(field_0x108) {
case 1:
case 1: {
JStage::TObject* parent = 0;
int idx = -1;
if (field_0x114 != 0) {
@@ -128,6 +128,7 @@ JStudio_JStage::TAdaptor_camera::adaptor_do_PARENT_ENABLE(JStudio::data::TEOpera
}
pJSGObject_->JSGSetParent(parent, idx);
break;
}
case 0:
break;
}
@@ -207,7 +208,7 @@ void JStudio_JStage::TAdaptor_camera::setJSG_position_(JStudio::TControl const*
} else {
pViewPosition = &VStack_138;
switch (field_0x108) {
case 0:
case 0: {
int iVar1 =
transform_toGlobalFromLocal(&VStack_144, VStack_138, field_0x10c, field_0x110);
if (iVar1 == 0) {
@@ -215,6 +216,7 @@ void JStudio_JStage::TAdaptor_camera::setJSG_position_(JStudio::TControl const*
}
pViewPosition = &VStack_144;
break;
}
case 1:
break;
}
+3 -3
View File
@@ -277,9 +277,9 @@ void JUTCacheFont::setBlock() {
break;
case 'GLY1':
memcpy(piVar5, pData, 0x20);
JKRAramBlock* iVar1 =
JKRMainRamToAram((u8*)pData + 0x20, aramAddress, pData[1] - 0x20,
EXPAND_SWITCH_UNKNOWN0, 0, NULL, 0xffffffff, NULL);
JKRAramBlock* iVar1;
iVar1 = JKRMainRamToAram((u8*)pData + 0x20, aramAddress, pData[1] - 0x20,
EXPAND_SWITCH_UNKNOWN0, 0, NULL, 0xffffffff, NULL);
if (iVar1 == NULL) {
JUTException::panic("JUTCacheFont.cpp", 0x1dd,
"trouble occurred in JKRMainRamToAram.");
+5 -4
View File
@@ -126,14 +126,15 @@ void JUTResFont::setBlock() {
mMaxCode = -1;
BlockHeader* data = (BlockHeader*)mResFont->data;
for (u32 i = 0; i < mResFont->numBlocks; i++, data = (BlockHeader*)data->getNext()) {
for (u32 i = 0; i < mResFont->numBlocks; data = (BlockHeader*)data->getNext(), i++) {
switch (data->magic) {
case 'INF1':
mInf1Ptr = (ResFONT::INF1*)data;
case 'INF1': {
mInf1Ptr = (ResFONT::INF1*)data;
u32 u = mInf1Ptr->fontType;
JUT_ASSERT(244, u < suAboutEncoding_);
mIsLeadByte = &saoAboutEncoding_[u];
break;
break;
}
case 'WID1':
mpWidthBlocks[widthNum] = (ResFONT::WID1*)data;
+4 -2
View File
@@ -354,6 +354,7 @@ static s8 b_bh_down(b_bh_class* i_this) {
s8 sp8 = 0;
cXyz sp20 = i_this->field_0x6b0 - a_this->current.pos;
sp20.y = 0.0f;
f32 temp_f31;
switch (i_this->mMode) {
case 0:
@@ -371,7 +372,7 @@ static s8 b_bh_down(b_bh_class* i_this) {
i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_BH_V_ROUT, -1);
}
f32 temp_f31 = 100.0f + JREG_F(0);
temp_f31 = 100.0f + JREG_F(0);
sp2C.x = temp_f31 * cM_ssin(i_this->field_0x668 * (TREG_S(0) + 900));
sp2C.z = temp_f31 * cM_scos(i_this->field_0x668 * (TREG_S(2) + 1000));
@@ -661,6 +662,7 @@ static s8 b_bh_b_down(b_bh_class* i_this) {
s8 var_r27 = 0;
cXyz spC = i_this->field_0x6b0 - i_this->current.pos;
spC.y = 0.0f;
f32 temp_f31;
switch (i_this->mMode) {
case 0:
@@ -678,7 +680,7 @@ static s8 b_bh_b_down(b_bh_class* i_this) {
i_this->mSound.startCreatureVoiceLevel(Z2SE_EN_BH_V_ROUT, -1);
}
f32 temp_f31 = 100.0f + JREG_F(0);
temp_f31 = 100.0f + JREG_F(0);
sp18.x = temp_f31 * cM_ssin(i_this->field_0x668 * (TREG_S(0) + 900));
sp18.z = temp_f31 * cM_scos(i_this->field_0x668 * (TREG_S(2) + 1000));
+20 -10
View File
@@ -2652,11 +2652,12 @@ void daB_GG_c::FallChk() {
}
void daB_GG_c::G_AttackAction() {
int rnd;
switch (mMode) {
case 0:
SpeedClear();
int rnd = cM_rndF(100.0f);
rnd = cM_rndF(100.0f);
if (rnd > 70) {
SetAnm(BCK_GGB_ATTACK_A, 0, 5.0f, 1.0f);
@@ -2723,7 +2724,7 @@ void daB_GG_c::G_AttackAction() {
mCcCyl.OnTgShield();
mCcShieldSph.OnTgShield();
int rnd = cM_rndF(100.0f);
rnd = cM_rndF(100.0f);
if (rnd < 30 || mAnm == BCK_GGB_ATTACK_C) {
SetAction(ACTION_GROUND, SUBACT_MOVE, 0);
} else if (mAnm != BCK_GGB_ATTACK_C && rnd > 50) {
@@ -2770,7 +2771,6 @@ void daB_GG_c::G_AttackAction() {
mCcSph[i].OnAtSetBit();
mCcSph[i].SetAtSpl((dCcG_At_Spl) 0xA);
}
break;
}
F_AtHit();
@@ -2904,11 +2904,13 @@ void daB_GG_c::G_DamageAction() {
speedF = 0.0f;
}
s_TargetAngle += 0x4000;
s_TargetAngle += (s16) 0x4000;
break;
case 2:
cXyz* tg_hit_pos = mCcCyl.GetTgHitPosP();
s16 spA = cLib_targetAngleY(&current.pos, tg_hit_pos);
cXyz* tg_hit_pos;
s16 spA;
tg_hit_pos = mCcCyl.GetTgHitPosP();
spA = cLib_targetAngleY(&current.pos, tg_hit_pos);
if ((spA - shape_angle.y) > 0) {
if (mAnm != BCK_GGB_DAMAGE_R) {
SetAnm(BCK_GGB_DAMAGE_R, 0, 5.0f, 1.0f);
@@ -2923,7 +2925,9 @@ void daB_GG_c::G_DamageAction() {
SetAction(ACTION_GROUND, SUBACT_DAMAGE, 3);
if (health < (s16)(field_0x560 * l_HIO.field_0x18) && field_0x5b0 == 0 && mType == TYPE_L7_MBOSS) {
if (health < (s16)(field_0x560 * l_HIO.field_0x18) && field_0x5b0 == 0 &&
mType == TYPE_L7_MBOSS)
{
mpModelMorf->setPlaySpeed(1.0f);
SetAction(ACTION_DEMO, 1, 0);
mCamMode = 0;
@@ -2954,11 +2958,16 @@ void daB_GG_c::G_DamageAction() {
mCamMode = 0;
}
break;
case 3:
int cut_count = daPy_getPlayerActorClass()->getCutCount();
case 3: {
u8 cut_count = daPy_getPlayerActorClass()->getCutCount();
u32 cut_type = daPy_getPlayerActorClass()->getCutType();
if ((cut_type == daPy_py_c::CUT_TYPE_TURN_LEFT || cut_type == daPy_py_c::CUT_TYPE_TURN_RIGHT || cut_type == daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT || cut_type == daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT) && field_0x6bc > 0) {
if ((cut_type == daPy_py_c::CUT_TYPE_TURN_LEFT ||
cut_type == daPy_py_c::CUT_TYPE_TURN_RIGHT ||
cut_type == daPy_py_c::CUT_TYPE_LARGE_TURN_LEFT ||
cut_type == daPy_py_c::CUT_TYPE_LARGE_TURN_RIGHT) &&
field_0x6bc > 0)
{
mCcCyl.OnTgShield();
mCcShieldSph.OnTgShield();
mCcShieldSph.OnTgSetBit();
@@ -2984,6 +2993,7 @@ void daB_GG_c::G_DamageAction() {
FallChk();
break;
}
case 4:
sp38 = eyePos;
sp38.y += 180.0f + NREG_F(7);
+2 -1
View File
@@ -1458,7 +1458,7 @@ static void demo_camera(b_gm_class* i_this) {
i_this->mDemoModeTimer = 0;
}
break;
case 42:
case 42: {
if (i_this->mDemoModeTimer == 30) {
daPy_getPlayerActorClass()->changeDemoMode(daPy_demo_c::DEMO_UNEQUIP_e, 0, 0, 0);
}
@@ -1500,6 +1500,7 @@ static void demo_camera(b_gm_class* i_this) {
sp10 = 2;
}
break;
}
case 50:
if (!a_this->eventInfo.checkCommandDemoAccrpt()) {
fopAcM_orderPotentialEvent(a_this, 2, 0xFFFF, 0);
+2 -1
View File
@@ -204,12 +204,13 @@ void daBdoorL5_c::demoProc() {
}
}
switch (demoAction) {
case 1:
case 1: {
obj_keyhole_class* keyhole = (obj_keyhole_class*)fopAcM_SearchByID(mKeyHoleId);
if ((keyhole != NULL && keyhole->checkOpenEnd()) || mKeyHoleId == -1) {
dComIfGp_evmng_cutEnd(field_0x59c);
}
break;
}
case 2:
if (openProc() != 0) {
openEnd();
+7 -3
View File
@@ -353,7 +353,8 @@ int daKnob20_c::demoProc() {
field_0x610 = 10;
break;
case 10:
int msgNo = knob_param_c::getMsgNo(this);
int msgNo;
msgNo = knob_param_c::getMsgNo(this);
if (msgNo != 0xffff) {
field_0x5c0.init(this, msgNo, 0, NULL);
}
@@ -391,6 +392,7 @@ int daKnob20_c::demoProc() {
case 10:
dComIfGp_event_offHindFlag(1);
if (field_0x5c0.doFlow(this, NULL, 0) != 0) {
OS_REPORT("会話終了!\n"); // Conversation over!
int msgNo = knob_param_c::getMsgNo(this);
if (msgNo != 0xffff) {
field_0x5c0.init(this, msgNo, 0, NULL);
@@ -406,12 +408,14 @@ int daKnob20_c::demoProc() {
case 9:
dComIfGp_evmng_cutEnd(field_0x5bc);
break;
case 14:
if (cLib_addCalcAngleS(&field_0x612, -0x2800, 20, 500, 10) == 0) {
case 14: {
s16 tmp = cLib_addCalcAngleS(&field_0x612, -0x2800, 20, 500, 10);
if (tmp == 0) {
dComIfGp_evmng_cutEnd(field_0x5bc);
}
calcMtx();
break;
}
case 15:
dComIfGp_evmng_cutEnd(field_0x5bc);
calcMtx();
+3 -2
View File
@@ -569,7 +569,7 @@ void daMBdoorL1_c::demoProc() {
int level = getNowLevel(this);
if (dComIfGp_evmng_getIsAddvance(field_0x5e8)) {
switch (demoAction) {
case 0:
case 0: {
int* puVar6 = dComIfGp_evmng_getMyIntegerP(field_0x5e8, "Timer");
if (puVar6 == NULL) {
field_0x5ec = 1;
@@ -577,6 +577,7 @@ void daMBdoorL1_c::demoProc() {
field_0x5ec = *puVar6;
}
break;
}
case 1:
if (level == 5 || level == 11) {
setAngleQuickly();
@@ -597,7 +598,7 @@ void daMBdoorL1_c::demoProc() {
{
unlockInit();
fopAcM_onSwitch(this, (u8)cVar10);
dComIfGp_setItemKeyNumCount(0xffffffff);
dComIfGp_setItemKeyNumCount(-1);
fopAcM_seStart(this, Z2SE_OBJ_DOOR_CHAIN_LOCK_OPEN, 0);
}
break;
+2 -1
View File
@@ -239,7 +239,7 @@ int daDoorPush_c::demoProc() {
dComIfGp_evmng_getMyActIdx(field_0x644, action_table, ARRAY_SIZEU(action_table), 0, 0);
if (dComIfGp_evmng_getIsAddvance(field_0x644) != 0) {
switch (actIdx) {
case WAIT_e:
case WAIT_e: {
int* integerP = dComIfGp_evmng_getMyIntegerP(field_0x644, "Timer");
if (integerP == NULL) {
field_0x648 = 1;
@@ -247,6 +247,7 @@ int daDoorPush_c::demoProc() {
field_0x648 = *integerP;
}
break;
}
case OPEN_e:
rotateInit();
field_0x641 = 0;
+18 -14
View File
@@ -131,7 +131,6 @@ int daDoor20_c::CreateHeap() {
field_0x5a0.entry(mModel1->getModelData());
mModel2->calc();
} else {
switch (kind) {
case 0:
case 3:
@@ -146,10 +145,13 @@ int daDoor20_c::CreateHeap() {
anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpC.bck");
break;
case 2:
J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getStageRes(getBtk());
J3DAnmTextureSRTKey* pbtk;
pbtk = (J3DAnmTextureSRTKey*)dComIfG_getStageRes(getBtk());
JUT_ASSERT(421, pbtk != NULL);
field_0x5c0 = new mDoExt_btkAnm();
if (field_0x5c0 == NULL || !field_0x5c0->init(mModel1->getModelData(), pbtk, 1, 0, 1.0f, 0, -1)) {
if (field_0x5c0 == NULL ||
!field_0x5c0->init(mModel1->getModelData(), pbtk, 1, 0, 1.0f, 0, -1))
{
return 0;
}
anm = (J3DAnmTransform*)dComIfG_getObjectRes(getArcName(), "oj_DoorOpD.bck");
@@ -820,17 +822,18 @@ int daDoor20_c::create() {
int daDoor20_c::demoProc() {
field_0x6cc = dComIfGp_evmng_getMyStaffId("SHUTTER_DOOR", 0, 0);
int demoAction = getDemoAction();
J3DAnmTransform* anm;
if (dComIfGp_evmng_getIsAddvance(field_0x6cc)) {
switch (demoAction) {
case 0:
int* pTimer = dComIfGp_evmng_getMyIntegerP(
field_0x6cc, "Timer");
case 0: {
int* pTimer = dComIfGp_evmng_getMyIntegerP(field_0x6cc, "Timer");
if (pTimer == NULL) {
field_0x5dd = 1;
} else {
field_0x5dd = *pTimer;
}
break;
}
case 3:
openInit(0);
break;
@@ -854,13 +857,14 @@ int daDoor20_c::demoProc() {
keyhole->setOpen();
}
}
int swBit = door_param2_c::getSwbit(this);
int swBit;
swBit = door_param2_c::getSwbit(this);
if (swBit != 0xff &&
!dComIfGs_isSwitch(swBit, 0xffffffff) &&
(door_param2_c::getFrontOption(this) == 2 || door_param2_c::getBackOption(this) == 2))
{
dComIfGs_onSwitch(swBit, 0xffffffff);
dComIfGp_setItemKeyNumCount(0xffffffff);
dComIfGp_setItemKeyNumCount(-1);
if (field_0x673 == 1) {
fopAcM_seStart(this, Z2SE_OBJ_DOOR_LOCK_OPEN, 0);
} else {
@@ -885,8 +889,7 @@ int daDoor20_c::demoProc() {
setAngle();
break;
case 13:
J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes(
getAlwaysArcName(), "FDoorB.bck");
anm = (J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), "FDoorB.bck");
JUT_ASSERT(1796, anm != NULL);
if (!field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true) || !field_0x5a0.init(anm,
1, 0, 1.0f, 0, -1, true))
@@ -897,8 +900,7 @@ int daDoor20_c::demoProc() {
openInit2();
break;
case 12:
anm =
(J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), "FDoorA.bck");
anm = (J3DAnmTransform*)dComIfG_getObjectRes(getAlwaysArcName(), "FDoorA.bck");
JUT_ASSERT(1809, anm != NULL);
if (!field_0x584.init(anm, 1, 0, 1.0f, 0, -1, true) || !field_0x5a0.init(anm,
1, 0, 1.0f, 0, -1, true))
@@ -1102,7 +1104,7 @@ int daDoor20_c::demoProc() {
case 25:
dComIfGp_evmng_cutEnd(field_0x6cc);
break;
case 26:
case 26: {
int msgNo = door_param2_c::getMsgNo(this);
if (door_param2_c::isMsgDoor(this) && msgNo != 0xffff) {
dComIfGp_event_offHindFlag(1);
@@ -1113,6 +1115,7 @@ int daDoor20_c::demoProc() {
dComIfGp_evmng_cutEnd(field_0x6cc);
}
break;
}
case 27:
case 28:
if (field_0x5c0->play()) {
@@ -1678,7 +1681,8 @@ void daDoor20_c::makeEventId() {
}
break;
case 4:
int j = 0;
int j;
j = 0;
for (i = 12; i < 19; i++, j++) {
field_0x692[i] =
dComIfGp_getEventManager().getEventIdx(this, knob_table[j], field_0x6b8[i]);
+8 -7
View File
@@ -344,9 +344,10 @@ static void e_bi_ex(e_bi_class* i_this) {
i_this->field_0x670 = 1;
i_this->field_0x694 = 160;
anm_init(i_this, BCK_BI_BOMBPOSE, 10.0f, J3DFrameCtrl::EMode_NONE, 1.0f);
f32 fVar1 = cM_rndF(0.2f) + 0.9f;
f32 fVar1;
fVar1 = cM_rndF(0.2f) + 0.9f;
i_this->field_0x6a2 = 0;
i_this->field_0x6a4 = 3800.0f * fVar1;
i_this->field_0x6a4 = (3800.0f + JREG_F(5)) * fVar1;
i_this->field_0x6a8 = fVar1 * 20.0f;
a_this->speed.y = 23.0f;
break;
@@ -358,8 +359,8 @@ static void e_bi_ex(e_bi_class* i_this) {
}
// fallthrough
case 2:
cLib_addCalc0(&i_this->field_0x6a8, 1.0f, 1.0f);
cLib_addCalcAngleS2(&i_this->field_0x6a4, 0, 1, 200);
cLib_addCalc0(&i_this->field_0x6a8, 1.0f, 1.0f + JREG_F(7));
cLib_addCalcAngleS2(&i_this->field_0x6a4, 0, 1, 200 + JREG_S(6));
break;
}
@@ -374,13 +375,13 @@ static void e_bi_ex(e_bi_class* i_this) {
if (i_this->field_0x694 != 0) {
i_this->field_0x694--;
i_this->mSound.startCreatureSoundLevel(Z2SE_OBJ_BOMB_IGNITION, 0, -1);
i_this->field_0x696 += 0x1100;
i_this->field_0x696 += (s16) 0x1100;
if (i_this->field_0x694 < 45) {
i_this->field_0x696 += 0x1100;
i_this->field_0x696 += (s16) 0x1100;
if (i_this->field_0x694 < 30) {
i_this->field_0x696 += 0x1100;
i_this->field_0x696 += (s16) 0x1100;
}
}
+2 -1
View File
@@ -511,6 +511,7 @@ static void e_bu_path_fly(e_bu_class* i_this) {
fopAc_ac_c* actor = &i_this->enemy;
fopAc_ac_c* player = dComIfGp_getPlayer(0);
cXyz sp18;
dPnt* pnt;
switch (i_this->mode) {
case 0:
@@ -540,7 +541,7 @@ static void e_bu_path_fly(e_bu_class* i_this) {
case 2:
i_this->mode = 3;
dPnt* pnt = i_this->ppd->m_points;
pnt = i_this->ppd->m_points;
pnt += i_this->now_path_pntNo;
i_this->field_0x690 = TREG_F(7);
+6 -7
View File
@@ -502,6 +502,7 @@ void daE_FZ_c::executeAttack() {
void daE_FZ_c::executeDamage() {
cXyz pos;
pos.set(l_HIO.field_0x0c, l_HIO.field_0x0c, l_HIO.field_0x0c);
f32 tmp;
switch(mActionPhase) {
case 0:
@@ -519,7 +520,7 @@ void daE_FZ_c::executeDamage() {
fopAcM_delete(this);
break;
case 1:
f32 tmp = l_HIO.field_0x28;
tmp = l_HIO.field_0x28;
speedF = tmp;
field_0x6fc = tmp;
case 5:
@@ -611,9 +612,7 @@ void daE_FZ_c::executeRollMove() {
cXyz pos;
s16 roll_angle = static_cast<daB_YO_c*>(mpBlizzetaActor)->getFrizadRollAngle();
f32 mode_rarius = static_cast<daB_YO_c*>(mpBlizzetaActor)->getModeRarius();
mode_rarius = 100.0f + mode_rarius;
f32 mode_rarius = 100.0f + static_cast<daB_YO_c*>(mpBlizzetaActor)->getModeRarius();
if (mode_rarius < 400.0f)
mode_rarius = 400.0f;
@@ -636,9 +635,8 @@ void daE_FZ_c::executeRollMove() {
pos.z += (f32)(mode_rarius * cM_scos(roll_angle + field_0x715 * 0xccc));
current.pos = pos;
u32 frizad_attack = static_cast<daB_YO_c*>(mpBlizzetaActor)->getFrizadAttack();
if (frizad_attack == 3) {
if (static_cast<daB_YO_c*>(mpBlizzetaActor)->getFrizadAttack() == 3) {
mActionPhase = 2;
speedF = 60.0f;
current.angle.y = cLib_targetAngleY(&static_cast<daB_YO_c*>(mpBlizzetaActor)->current.pos,&current.pos);
@@ -655,7 +653,8 @@ void daE_FZ_c::executeRollMove() {
}
if (mAtSph.ChkAtHit()) {
if ((fopAcM_GetName(mAtSph.GetAtHitAc()) == PROC_ALINK) || mAtSph.ChkAtShieldHit()) {
fopAc_ac_c* at_hit_actor = mAtSph.GetAtHitAc();
if ((fopAcM_GetName(at_hit_actor) == PROC_ALINK) || mAtSph.ChkAtShieldHit()) {
setActionMode(ACT_DAMAGE,0);
return;
}
+8 -8
View File
@@ -659,6 +659,7 @@ void daE_GE_c::executeBack() {
cXyz position;
cXyz position2;
s16 chaseAngle = 0x0;
s16 distAngleS;
switch (mMode) {
case 0:
@@ -694,7 +695,7 @@ void daE_GE_c::executeBack() {
position =
calcCircleFly(&home.pos, &position2, field_0xb8c, field_0xb58, field_0xb8a, 1.0f);
s16 distAngleS =
distAngleS =
cLib_distanceAngleS(cLib_targetAngleY(&current.pos, &home.pos), shape_angle.y);
if (position.y > 100.0f || mObjAcch.ChkWallHit() || distAngleS >= 0x5000) {
field_0xb8c += 0x190;
@@ -993,27 +994,26 @@ void daE_GE_c::executeWind() {
}
switch (mMode) {
case 0:
case 0: {
field_0xb9e = 0;
cXyz boomerangPos(daPy_py_c::getThrowBoomerangActor()->current.pos);
field_0xb58 = current.pos.absXZ(boomerangPos);
field_0xb5c = current.pos.y - boomerangPos.y;
speed.y = 0.0f;
speedF = 0.0f;
speedF = speed.y = 0.0f;
mMode = 1;
bckSet(9, 3.0f, 2, 1.0f);
field_0xb64 = cM_rndFX(50.0f);
field_0xb60 = cM_rndFX(100.0f);
}
/* fallthrough */
case 1:
case 1: {
if (mpMorfSO->checkFrame(0.0f)) {
mSound.startCreatureVoice(Z2SE_EN_GE_V_FURA, -1);
}
cXyz boomerangPos2(daPy_py_c::getThrowBoomerangActor()->current.pos);
field_0xb8c += 0x800;
field_0xb8c += (s16)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);
@@ -1028,6 +1028,7 @@ void daE_GE_c::executeWind() {
field_0xb8a = 0x3000;
shape_angle.y += field_0xb8a;
break;
}
case 2:
cLib_addCalcAngleS2(&field_0xb8a, 0, 4, 0x180);
@@ -1042,7 +1043,6 @@ void daE_GE_c::executeWind() {
setActionMode(ACTION_BACK);
mMode = 10;
}
break;
}
}

Some files were not shown because too many files have changed in this diff Show More