mirror of
https://github.com/zeldaret/tp
synced 2026-06-09 20:50:45 -04:00
Fix a bunch of compiler warnings and document several more bugs (#3130)
This commit is contained in:
@@ -87,7 +87,7 @@ private:
|
||||
/* 0x6B4 */ s16 field_0x6b4;
|
||||
/* 0x6B6 */ s16 field_0x6b6;
|
||||
/* 0x6B8 */ u8 field_0x6B8[0x6BC - 0x6B8];
|
||||
/* 0x6BC */ char* mpName;
|
||||
/* 0x6BC */ const char* mpName;
|
||||
/* 0x6C0 */ s32 mAction;
|
||||
/* 0x6C4 */ s32 mPrevAction;
|
||||
/* 0x6C8 */ s32 mMode; // That's just a guess. Might need a better name for it's usage
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
/* 0x842 */ u16 field_0x842;
|
||||
/* 0x844 */ u8 field_0x844;
|
||||
/* 0x845 */ u8 field_0x845[0x848 - 0x845];
|
||||
/* 0x848 */ s32 field_0x848;
|
||||
/* 0x848 */ s32 mFlowID;
|
||||
/* 0x84C */ dMsgFlow_c mMsgFlow;
|
||||
/* 0x898 */ u8 field_0x898[0x89A - 0x898];
|
||||
/* 0x89A */ s16 mEvtIdx;
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
void setExpression(int, f32);
|
||||
bool talk(void*);
|
||||
bool demo(void*);
|
||||
inline fopAc_ac_c* searchInstructionTag();
|
||||
inline fopAc_ac_c* searchInstructionTag();
|
||||
bool instruction(void*);
|
||||
bool checkIntroDemoStart();
|
||||
int EvCut_BousIntroSumo1(int);
|
||||
|
||||
@@ -160,7 +160,7 @@ private:
|
||||
/* 0x14B0 */ int field_0x1460;
|
||||
/* 0x1464 */ int field_0x1464;
|
||||
/* 0x1468 */ int field_0x1468;
|
||||
/* 0x146C */ int field_0x146C;
|
||||
/* 0x146C */ int mFlowID;
|
||||
/* 0x1470 */ s16 mLookMode;
|
||||
/* 0x1472 */ u16 field_0x1472;
|
||||
/* 0x1474 */ u8 mType;
|
||||
|
||||
@@ -103,7 +103,7 @@ private:
|
||||
/* 0xE00 */ int field_0xe00;
|
||||
/* 0xE04 */ int field_0xe04;
|
||||
/* 0xE08 */ int field_0xe08;
|
||||
/* 0xE0C */ int field_0xe0c;
|
||||
/* 0xE0C */ int mFlowID;
|
||||
/* 0xE10 */ s16 mLookMode;
|
||||
/* 0xE12 */ u16 mActionState;
|
||||
/* 0xE14 */ u8 mType;
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
/* 0xDFC */ int field_0xdfc;
|
||||
/* 0xE00 */ int field_0xe00;
|
||||
/* 0xE04 */ int field_0xe04;
|
||||
/* 0xE08 */ int field_0xe08;
|
||||
/* 0xE08 */ int mFlowID;
|
||||
/* 0xE0C */ s16 mLookMode;
|
||||
/* 0xE0E */ u16 mMode;
|
||||
/* 0xE10 */ u8 mType;
|
||||
|
||||
@@ -182,7 +182,8 @@ public:
|
||||
s16 getMessageNo() { return s16(home.angle.x); }
|
||||
s8 getType() {
|
||||
s8 rv = fopAcM_GetParam(this) & 0xFF;
|
||||
|
||||
|
||||
// !@bug Comparison of s8 with 0xFF will always evaluate to false
|
||||
if (rv == 0xFF) {
|
||||
rv = 0;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,8 @@ public:
|
||||
|
||||
s8 getType() {
|
||||
s8 rv = fopAcM_GetParam(this) & 0xFF;
|
||||
|
||||
|
||||
// !@bug Comparison of s8 with 0xFF will always evaluate to false
|
||||
if (rv == 0xFF) {
|
||||
rv = 0;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,8 @@ public:
|
||||
|
||||
s8 getType() {
|
||||
s8 rv = fopAcM_GetParam(this) & 0xFF;
|
||||
|
||||
|
||||
// !@bug Comparison of s8 with 0xFF will always evaluate to false
|
||||
if (rv == 0xFF) {
|
||||
rv = 0;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
class daNpc_Kn_prtclMngr_c {
|
||||
public:
|
||||
/* 0x00 */ bool mpModel;
|
||||
/* 0x00 */ bool field_0x00;
|
||||
/* 0x04 */ cXyz mPos;
|
||||
/* 0x10 */ csXyz mAngle;
|
||||
/* 0x18 */ cXyz mScale;
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
/* 0x5B7 */ u8 field_0x5b7;
|
||||
/* 0x5B8 */ int order;
|
||||
/* 0x5BC */ int bitTRB;
|
||||
/* 0x5C0 */ char* res_name;
|
||||
/* 0x5C0 */ const char* res_name;
|
||||
/* 0x5C4 */ f32 dis;
|
||||
/* 0x5C8 */ s16 target_angle;
|
||||
/* 0x5CC */ mDoExt_McaMorfSO* model;
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
/* 0xDF8 */ int field_0xdf8;
|
||||
/* 0xDFC */ int field_0xdfc;
|
||||
/* 0xE00 */ int field_0xe00;
|
||||
/* 0xE04 */ int field_0xe04;
|
||||
/* 0xE04 */ int mFlowID;
|
||||
/* 0xE08 */ s16 mLookMode;
|
||||
/* 0xE0A */ u16 mMode;
|
||||
/* 0xE0C */ u8 mType;
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
/* 0x5D8 */ f32 mDistToTarget;
|
||||
/* 0x5DC */ s16 mAngleToPlayer;
|
||||
/* 0x5E0 */ f32 mDistScale;
|
||||
/* 0x5E4 */ char* mResName;
|
||||
/* 0x5E4 */ const char* mResName;
|
||||
/* 0x5E8 */ mDoExt_McaMorf* mpMorf;
|
||||
/* 0x5EC */ mDoExt_btkAnm* mpBtkAnm;
|
||||
/* 0x5F0 */ mDoExt_btpAnm* mpBtpAnm;
|
||||
|
||||
@@ -24,6 +24,9 @@ public:
|
||||
u8 getBitSW2() { return (fopAcM_GetParam(this) & 0xFF00) >> 8; }
|
||||
|
||||
u32 getFlowNodeNo() {
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
return (u16)home.angle.x;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ public:
|
||||
|
||||
u32 getProcessID() { return mProcessID; }
|
||||
|
||||
int getFlowNodeNum() {
|
||||
return (u16)home.angle.x == 0xFFFF ? -1 : (u16)home.angle.x;
|
||||
}
|
||||
|
||||
/* 0x56C */ u32 mProcessID;
|
||||
/* 0x570 */ s16 mCreateTimer;
|
||||
/* 0x572 */ u8 field_0x572;
|
||||
|
||||
+1
-22
@@ -336,27 +336,6 @@ public:
|
||||
virtual JPABaseEmitter* emitter_create(u32);
|
||||
};
|
||||
|
||||
namespace {
|
||||
class jstudio_tAdaptor_message : public JStudio::TAdaptor_message {
|
||||
public:
|
||||
typedef JStudio::TObject_message ObjectType;
|
||||
|
||||
jstudio_tAdaptor_message() {}
|
||||
|
||||
virtual ~jstudio_tAdaptor_message();
|
||||
virtual void adaptor_do_MESSAGE(JStudio::data::TEOperationData, const void*, u32);
|
||||
};
|
||||
|
||||
class jstudio_tCreateObject_message : public JStudio::TCreateObject {
|
||||
public:
|
||||
jstudio_tCreateObject_message() {}
|
||||
|
||||
virtual ~jstudio_tCreateObject_message();
|
||||
virtual bool create(JStudio::TObject**, const JStudio::stb::data::TParse_TBlock_object&);
|
||||
};
|
||||
|
||||
}; // namespace
|
||||
|
||||
int dDemo_setDemoData(fopAc_ac_c*, u8, mDoExt_McaMorf*, char const*, int, u16*, u32, s8);
|
||||
|
||||
class dDemo_c {
|
||||
@@ -405,7 +384,7 @@ public:
|
||||
static JStudio_JStage::TCreateObject* m_stage;
|
||||
static JStudio_JAudio2::TCreateObject* m_audio;
|
||||
static dDemo_particle_c* m_particle;
|
||||
static jstudio_tCreateObject_message* m_message;
|
||||
static JStudio::TCreateObject* m_message;
|
||||
static JStudio::TFactory* m_factory;
|
||||
static jmessage_tControl* m_mesgControl;
|
||||
static dDemo_object_c* m_object;
|
||||
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
bool isPauseWindow() { return mPauseWindow != false; }
|
||||
void onShowFlag() { mShowFlag |= 1; }
|
||||
void offShowFlag() { mShowFlag &= ~1; }
|
||||
bool isShowFlag() { return mShowFlag & 1 != 0; }
|
||||
bool isShowFlag() { return (mShowFlag & 1) != 0; }
|
||||
bool isFadeNowCheck() { return mDoGph_gInf_c::getFader()->getStatus() == 1; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -112,7 +112,4 @@ struct dMsgScrnHowl_c : public dMsgScrnBase_c {
|
||||
/* 0x27A8 */ f32 field_0x27a8;
|
||||
};
|
||||
|
||||
#define LINE_MAX 30
|
||||
#define PLOT_BUFFER_MAX_e 0x300
|
||||
|
||||
#endif /* MSG_SCRN_D_MSG_SCRN_HOWL_H */
|
||||
|
||||
@@ -425,11 +425,11 @@ inline void fopAcM_SetAngle(fopAc_ac_c* i_actor, s16 x, s16 y, s16 z) {
|
||||
i_actor->current.angle.set(x, y, z);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_revSwitch(int i_no, int i_roomNo);
|
||||
inline BOOL dComIfGs_isSwitch(int i_no, int i_roomNo);
|
||||
inline void dComIfGs_offActor(int i_no, int i_roomNo);
|
||||
void dComIfGs_onSwitch(int i_no, int i_roomNo);
|
||||
void dComIfGs_offSwitch(int i_no, int i_roomNo);
|
||||
void dComIfGs_revSwitch(int i_no, int i_roomNo);
|
||||
BOOL dComIfGs_isSwitch(int i_no, int i_roomNo);
|
||||
void dComIfGs_offActor(int i_no, int i_roomNo);
|
||||
|
||||
inline void fopAcM_onSwitch(const fopAc_ac_c* i_actor, int sw) {
|
||||
return dComIfGs_onSwitch(sw, fopAcM_GetHomeRoomNo(i_actor));
|
||||
@@ -451,12 +451,12 @@ inline fopAc_ac_c* fopAcM_SearchByName(s16 proc_id) {
|
||||
return (fopAc_ac_c*)fopAcIt_Judge(fpcSch_JudgeForPName, &proc_id);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onItem(int bitNo, int roomNo);
|
||||
void dComIfGs_onItem(int bitNo, int roomNo);
|
||||
inline void fopAcM_onItem(const fopAc_ac_c* item, int bitNo) {
|
||||
dComIfGs_onItem(bitNo, fopAcM_GetHomeRoomNo(item));
|
||||
}
|
||||
|
||||
inline bool dComIfGs_isItem(int bitNo, int roomNo);
|
||||
bool dComIfGs_isItem(int bitNo, int roomNo);
|
||||
inline bool fopAcM_isItem(const fopAc_ac_c* item, int bitNo) {
|
||||
return dComIfGs_isItem(bitNo, fopAcM_GetHomeRoomNo(item));
|
||||
}
|
||||
@@ -469,7 +469,7 @@ inline int fopAcM_GetSetId(const fopAc_ac_c* i_actor) {
|
||||
return i_actor->setID;
|
||||
}
|
||||
|
||||
inline void dComIfGs_onActor(int bitNo, int roomNo);
|
||||
void dComIfGs_onActor(int bitNo, int roomNo);
|
||||
|
||||
inline void fopAcM_onActor(const fopAc_ac_c* i_actor) {
|
||||
dComIfGs_onActor(fopAcM_GetSetId(i_actor), fopAcM_GetHomeRoomNo(i_actor));
|
||||
@@ -704,7 +704,7 @@ inline void make_prm_warp_hole(u32* o_params, u8 prm1, u8 prm2, u8 prm3) {
|
||||
*o_params = pprm2 | pprm3 | pprm1;
|
||||
}
|
||||
|
||||
inline fopAc_ac_c* dComIfGp_getPlayer(int);
|
||||
fopAc_ac_c* dComIfGp_getPlayer(int);
|
||||
|
||||
inline s16 fopAcM_searchPlayerAngleY(const fopAc_ac_c* actor) {
|
||||
return fopAcM_searchActorAngleY(actor, dComIfGp_getPlayer(0));
|
||||
|
||||
+12
-1
@@ -106,7 +106,7 @@ static const float INF = 2000000000.0f;
|
||||
#define NO_INLINE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// Hack to trick the compiler into not inlining functions that use this macro.
|
||||
#define FORCE_DONT_INLINE \
|
||||
(void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; (void*)0; \
|
||||
@@ -176,4 +176,15 @@ static const float INF = 2000000000.0f;
|
||||
using std::isnan;
|
||||
#endif
|
||||
|
||||
// Comparing a non-volatile reference type to NULL is tautological
|
||||
// and triggers a warning on modern compilers, but in some cases is
|
||||
// required to match the original assembly.
|
||||
#if defined(__MWERKS__) || defined(DECOMPCTX)
|
||||
#define IS_REF_NULL(r) (&(r) == NULL)
|
||||
#define IS_REF_NONNULL(r) (&(r) != NULL)
|
||||
#else
|
||||
#define IS_REF_NULL(r) (0)
|
||||
#define IS_REF_NONNULL(r) (1)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||
|
||||
class J3DMaterial;
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
||||
@@ -434,7 +434,7 @@ void JASAramStream::updateChannel(u32 i_callbackType, JASChannel* i_channel,
|
||||
field_0x120 = 0;
|
||||
field_0x12c |= 2;
|
||||
if (field_0x0c4 < 0xffffffff) {
|
||||
field_0x0c4++;
|
||||
field_0x0c4 += 1;
|
||||
}
|
||||
field_0x0c0 = false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void* JASAudioThread::run() {
|
||||
|
||||
case AUDIOMSG_DSP:
|
||||
JUT_ASSERT(125, snIntCount != 0);
|
||||
snIntCount--;
|
||||
snIntCount -= 1;
|
||||
if (snIntCount == 0) {
|
||||
JASProbe::stop(7);
|
||||
JASDriver::finishDSPFrame();
|
||||
|
||||
@@ -21,7 +21,7 @@ bool JASBasicBank::getInstParam(int prg_no, int param_1, int param_2,
|
||||
JASInstParam* o_param) const {
|
||||
JASInst* inst = getInst(prg_no);
|
||||
if (inst == NULL) {
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
return inst->getParam(param_1, param_2, o_param);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <limits>
|
||||
|
||||
void JASCalc::imixcopy(const s16* s1, const s16* s2, s16* dst, u32 n) {
|
||||
for (n; n != 0; n--) {
|
||||
for (; n != 0; n--) {
|
||||
*dst++ = *(s1)++;
|
||||
*dst++ = *(s2)++;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ u32 JASSeqParser::readReg(JASTrack* param_0, u32 param_1) const {
|
||||
case 0x6a:
|
||||
result = param_0->getReleasePrio();
|
||||
// @bug this should have been <<=
|
||||
result << 8;
|
||||
(void)(result << 8);
|
||||
result |= param_0->getNoteOnPrio();
|
||||
break;
|
||||
case 0x6b:
|
||||
|
||||
@@ -1260,7 +1260,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) {
|
||||
}
|
||||
|
||||
if (isTexAnm()) {
|
||||
JUT_ASSERT(1698, pBsd->texAnmKeyNum != NULL);
|
||||
JUT_ASSERT(1698, pBsd->texAnmKeyNum != 0);
|
||||
u32 offs = sizeof(JPABaseShapeData);
|
||||
if (isTexCrdAnm()) {
|
||||
offs += 0x28;
|
||||
@@ -1271,7 +1271,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) {
|
||||
}
|
||||
|
||||
if (isPrmAnm()) {
|
||||
JUT_ASSERT(1707, pBsd->prmAnmKeyNum != NULL);
|
||||
JUT_ASSERT(1707, pBsd->prmAnmKeyNum != 0);
|
||||
JPAClrAnmKeyData* anmKeyData = (JPAClrAnmKeyData*)(pData + pBsd->mClrPrmAnmOffset);
|
||||
makeColorTable(&mpPrmClrAnmTbl, anmKeyData,
|
||||
pBsd->prmAnmKeyNum, pBsd->mClrAnmFrmMax, pHeap);
|
||||
@@ -1280,7 +1280,7 @@ JPABaseShape::JPABaseShape(u8 const* pData, JKRHeap* pHeap) {
|
||||
}
|
||||
|
||||
if (isEnvAnm()) {
|
||||
JUT_ASSERT(1716, pBsd->envAnmKeyNum != NULL);
|
||||
JUT_ASSERT(1716, pBsd->envAnmKeyNum != 0);
|
||||
JPAClrAnmKeyData* anmKeyData = (JPAClrAnmKeyData*)(pData + pBsd->mClrEnvAnmOffset);
|
||||
makeColorTable(&mpEnvClrAnmTbl, anmKeyData,
|
||||
pBsd->envAnmKeyNum, pBsd->mClrAnmFrmMax, pHeap);
|
||||
|
||||
@@ -37,7 +37,7 @@ bool JStudio_JStage::TCreateObject::create(
|
||||
eObject = JStage::OBJECT_FOG;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
JUT_ASSERT(99, pfnCreateObject!=NULL);
|
||||
JUT_ASSERT(100, eObject!=JStage::OBJECT_UNDEFINED);
|
||||
|
||||
@@ -180,7 +180,7 @@ void JUTConsole::doDraw(JUTConsole::EConsoleType consoleType) const {
|
||||
mFont->drawString_scale((int)f31, sp94, mFontSizeX, mFontSizeY,
|
||||
mVisible ? "[ON]" : "[OFF]", TRUE);
|
||||
f31 += (int)(mFontSizeX * 6.0f);
|
||||
if (this == NULL) // ????
|
||||
if (IS_REF_NULL(*this)) // ????
|
||||
{
|
||||
mFont->setCharColor(JUtility::TColor(0xff, 0xff, 0x64, 0xff));
|
||||
mFont->drawString_scale((int)(f31 - mFontSizeX), mFontSizeX, mFontSizeY, sp94,
|
||||
|
||||
@@ -947,7 +947,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio
|
||||
dst--;
|
||||
i--;
|
||||
}
|
||||
(void)*src; // needed to match debug
|
||||
UNUSED(*src); // needed to match debug
|
||||
*dst = 0;
|
||||
if (print) {
|
||||
if (begin_with_newline) {
|
||||
|
||||
@@ -15712,7 +15712,7 @@ int daAlink_c::procMoveTurnInit(int param_0) {
|
||||
dComIfGp_setPlayerStatus0(0, 0x800);
|
||||
|
||||
if (param_0 != 0) {
|
||||
mProcVar3.field_0x300e = (mpHIO->mMove.m.mMaxTurnAngle * 4) + 19030;
|
||||
mProcVar3.field_0x300e = (s16)((mpHIO->mMove.m.mMaxTurnAngle * 4) + 19030);
|
||||
mProcVar4.field_0x3010 = mpHIO->mMove.m.mMaxTurnAngle * 2;
|
||||
mProcVar1.field_0x300a = 2;
|
||||
current.angle.y = mMoveAngle;
|
||||
|
||||
@@ -1872,7 +1872,7 @@ static void demo_camera(b_bq_class* i_this) {
|
||||
spFC.set(BREG_F(5) + -30.0f, 0.0f, BREG_F(6) + 1938.0f);
|
||||
}
|
||||
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spFC, BREG_S(5) + 0x8000, 0);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&spFC, (s16)(BREG_S(5) + 0x8000), 0);
|
||||
|
||||
if (i_this->field_0x5c8 != 0) {
|
||||
i_this->field_0x5cc.y += i_this->field_0x5d8;
|
||||
|
||||
@@ -1325,6 +1325,7 @@ void daB_MGN_c::executeDash() {
|
||||
}
|
||||
|
||||
if (mMoveMode == 11) {
|
||||
// @bug - parenthesis should not be on the condition
|
||||
if (abs((s16)(angle - field_0xa90) < 0x1800) != 0) {
|
||||
if ((s16)(angle - field_0xa90) < 0) {
|
||||
angle = field_0xa90 - 0x1800;
|
||||
|
||||
@@ -881,7 +881,7 @@ void daBgObj_c::setParticle() {
|
||||
for (; partNum != 0; partNum--) {
|
||||
u32 flags = *partBlockItems++;
|
||||
u16 res_id = *partBlockItems;
|
||||
*partBlockItems++;
|
||||
partBlockItems++;
|
||||
|
||||
GXColor prmColor = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
GXColor envColor = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
||||
@@ -254,7 +254,7 @@ BOOL daBdoor_c::checkArea() {
|
||||
if (fabsf(vec.z) > 100.0f) {
|
||||
return false;
|
||||
}
|
||||
return (s16)fabs(current.angle.y - 0x7fff - player->current.angle.y) <= 0x4000 ? 1 : 0;
|
||||
return (s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000 ? 1 : 0;
|
||||
}
|
||||
|
||||
BOOL daBdoor_c::checkFront() {
|
||||
|
||||
@@ -825,7 +825,7 @@ int daBdoorL1_c::checkArea() {
|
||||
if (fabsf(local_48.z) > 100.0f) {
|
||||
return 0;
|
||||
}
|
||||
if ((s16)fabs(current.angle.y - 0x7fff - player->current.angle.y) <= 0x4000) {
|
||||
if ((s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -348,7 +348,7 @@ int daBdoorL5_c::checkArea() {
|
||||
if (fabsf(local_48.z) > 100.0f) {
|
||||
return 0;
|
||||
}
|
||||
if ((s16)fabs(current.angle.y - 0x7fff - player->current.angle.y) <= 0x4000) {
|
||||
if ((s16)fabs((f64)(current.angle.y - 0x7fff - player->current.angle.y)) <= 0x4000) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
@@ -1318,7 +1318,7 @@ int daMBdoorL1_c::checkArea() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((s16)fabs(angle - 0x7fff - player->current.angle.y) > 0x4000) {
|
||||
if ((s16)fabs((f64)(angle - 0x7fff - player->current.angle.y)) > 0x4000) {
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
|
||||
@@ -1934,7 +1934,13 @@ int daE_HZ_c::CreateHeap() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// This happens to work with MWCC since the member will only ever be initialized a pointer to a
|
||||
// string in this TU's .data section, but comparing against a string literal is still UB.
|
||||
#if AVOID_UB
|
||||
if (strcmp(mpName, "E_hzp") == 0) {
|
||||
#else
|
||||
if (mpName == "E_hzp") {
|
||||
#endif
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes(mpName, 3);
|
||||
} else {
|
||||
modelData = (J3DModelData*)dComIfG_getObjectRes(mpName, 3);
|
||||
|
||||
@@ -496,6 +496,7 @@ static s8 e_kr_path_move(e_kr_class* i_this) {
|
||||
if (totalDiff < 10.0f * TREG_F(10) + 300.0f) {
|
||||
point = &i_this->field_0x6e4->m_points[i_this->field_0x6e2];
|
||||
u8 pointArg1 = point->mArg1;
|
||||
// !@bug Comparison of u8 with -1 will always evaluate to false
|
||||
if (pointArg1 == -1) {
|
||||
i_this->field_0x684 = 50.0f * 1.2f;
|
||||
} else {
|
||||
|
||||
@@ -370,7 +370,7 @@ static void e_mm_mt_drop(e_mm_mt_class* i_this) {
|
||||
i_this->enemy.speed.y += -5.0f;
|
||||
i_this->enemy.eyePos = i_this->enemy.current.pos;
|
||||
i_this->enemy.attention_info.position = i_this->enemy.current.pos;
|
||||
cLib_addCalcAngleS2(&i_this->m_rotation.z, (TREG_S(6)+0x10000)-0x8000, 1, 0x1000);
|
||||
cLib_addCalcAngleS2(&i_this->m_rotation.z, (s16)((TREG_S(6) + 0x10000) - 0x8000), 1, 0x1000);
|
||||
cLib_onBit<u32>(i_this->enemy.attention_info.flags, fopAc_AttnFlag_CARRY_e);
|
||||
i_this->enemy.attention_info.distances[fopAc_attn_CARRY_e] = 7;
|
||||
i_this->m_rotation.y += i_this->m_spin;
|
||||
|
||||
@@ -724,7 +724,13 @@ void daE_OC_c::damage_check() {
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_40)) {
|
||||
S16_ADD(health, 10);
|
||||
} else if (mAtInfo.mpCollider->ChkAtType(AT_TYPE_SLINGSHOT)) {
|
||||
// This happens to work with MWCC since the member will only ever be initialized a pointer to a
|
||||
// string in this TU's .data section, but comparing against a string literal is still UB.
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
S16_SUB(health, 5);
|
||||
if (health < 0) {
|
||||
health = 0;
|
||||
@@ -855,7 +861,12 @@ void daE_OC_c::setDashSound() {
|
||||
} else if (mpMorf->checkFrame(8.5f)) {
|
||||
mSound.startCreatureSound(Z2SE_EN_OC_FOOTNOTE_R, 0, -1);
|
||||
}
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
mSound.startCreatureSoundLevel(Z2SE_EN_OC_CLUB_DAGGLE, 0, -1);
|
||||
} else {
|
||||
mSound.startCreatureSoundLevel(Z2SE_EN_OC_NATA_DAGGLE, 0, -1);
|
||||
@@ -1421,7 +1432,12 @@ void daE_OC_c::executeAttack() {
|
||||
} else if (mpMorf->checkFrame(12.5f)) {
|
||||
mSound.startCreatureSound(Z2SE_EN_OC_ATTACK_B, 0, -1);
|
||||
} else if (mpMorf->checkFrame(19.0f)) {
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
mSound.startCreatureSound(Z2SE_EN_OC_CLUB_HIT, 0, -1);
|
||||
} else {
|
||||
mSound.startCreatureSound(Z2SE_EN_OC_NATA_HIT, 0, -1);
|
||||
@@ -1843,7 +1859,12 @@ void daE_OC_c::executeDeath() {
|
||||
case 2:
|
||||
cLib_chaseF(&speedF, 0.0f, 1.0f);
|
||||
if (field_0x6c0 == 0) {
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
fopAcM_createDisappear(this, ¤t.pos, 10, 0, 4);
|
||||
} else {
|
||||
fopAcM_createDisappear(this, ¤t.pos, 10, 0, 0x34);
|
||||
@@ -1917,7 +1938,12 @@ void daE_OC_c::executeWaterDeath() {
|
||||
}
|
||||
|
||||
if (mpMorf->isStop()) {
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
fopAcM_createDisappear(this, ¤t.pos, 10, 0, 4);
|
||||
} else {
|
||||
fopAcM_createDisappear(this, ¤t.pos, 10, 0, 0x34);
|
||||
@@ -2741,7 +2767,12 @@ cPhs_Step daE_OC_c::create() {
|
||||
mAcchCir.SetWallH(70.0f);
|
||||
}
|
||||
mAcchCir.SetWallR(100.0f);
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
field_0x560 = health = 40;
|
||||
} else {
|
||||
field_0x560 = health = 220;
|
||||
@@ -2756,7 +2787,12 @@ cPhs_Step daE_OC_c::create() {
|
||||
mSphs_at[0].SetStts(&mStts);
|
||||
mSphs_at[1].Set(E_OC_n::at_sph_src);
|
||||
mSphs_at[1].SetStts(&mStts);
|
||||
// See comment in damage_check
|
||||
#if AVOID_UB
|
||||
if (strcmp(mName, "E_OC") == 0) {
|
||||
#else
|
||||
if (mName == "E_OC") {
|
||||
#endif
|
||||
mSphs_at[0].SetAtAtp(1);
|
||||
mSphs_at[1].SetAtAtp(1);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK_0x10000_e);
|
||||
|
||||
@@ -2155,7 +2155,7 @@ static void e_rdy_damage(e_rdy_class* i_this) {
|
||||
|
||||
case 1:
|
||||
if (i_this->mAcch.ChkWallHit() && i_this->mTimer[0] == 0) {
|
||||
if (check = kado_check(i_this)) {
|
||||
if ((check = kado_check(i_this))) {
|
||||
OS_REPORT(" ..KADO KABE ..%x\n", check);
|
||||
if (check == 2) {
|
||||
i_this->field_0xac6 = 0x1000;
|
||||
@@ -4721,7 +4721,7 @@ static int daE_RDY_Execute(e_rdy_class* i_this) {
|
||||
}
|
||||
MTXCopy(i_this->mpMorf->getModel()->getAnmMtx(JNT_HAND_R), *calc_mtx);
|
||||
MtxTrans(20.0f + NREG_F(0), 5.0f + NREG_F(1), -10.0f + NREG_F(2), 1);
|
||||
cMtx_XrotM(*calc_mtx, NREG_S(0) + 0x8000);
|
||||
cMtx_XrotM(*calc_mtx, (s16)(NREG_S(0) + 0x8000));
|
||||
cMtx_YrotM(*calc_mtx, NREG_S(1) + ang_y + -0x15cd);
|
||||
cMtx_ZrotM(*calc_mtx, NREG_S(2) + 0x28cd);
|
||||
i_this->mpHawkGrassModel->setBaseTRMtx(*calc_mtx);
|
||||
|
||||
@@ -1100,7 +1100,7 @@ static void e_wb_f_run(e_wb_class* i_this) {
|
||||
} else {
|
||||
e_rd_class* local_90 = (e_rd_class*)fopAcM_SearchByID(i_this->rd_id);
|
||||
int saku;
|
||||
if (saku = e_wb_saku_check(i_this)) {
|
||||
if ((saku = e_wb_saku_check(i_this))) {
|
||||
i_this->field_0x6d4 = 60;
|
||||
if ((saku & 2) != 0) {
|
||||
i_this->field_0x6d6 = 0x3000;
|
||||
|
||||
@@ -1235,7 +1235,7 @@ static int daE_YG_Execute(e_yg_class* i_this) {
|
||||
MTXCopy(daPy_getLinkPlayerActorClass()->getWolfMouthMatrix(), mDoMtx_stack_c::get());
|
||||
mDoMtx_stack_c::multVecZero(&actor->current.pos);
|
||||
mDoMtx_stack_c::YrotM(KREG_S(0));
|
||||
mDoMtx_stack_c::XrotM(KREG_S(1) + 0x8000);
|
||||
mDoMtx_stack_c::XrotM((s16)(KREG_S(1) + 0x8000));
|
||||
mDoMtx_stack_c::ZrotM(KREG_S(2) + 2500);
|
||||
mDoMtx_stack_c::transM(KREG_F(0) + 10.0f, KREG_F(1) + -60.0f, KREG_F(2) + -20.0f);
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
@@ -1930,7 +1930,7 @@ static void eff_set(e_yh_class* i_this) {
|
||||
dComIfGp_particle_set(i_this->mParticleIds2[2], dPa_RM(ID_ZI_S_YD_YODAHIT_A),
|
||||
&a_this->current.pos, 0, NULL);
|
||||
{
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticleIds[5]);
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticleIds2[2]);
|
||||
if (emitter != NULL) {
|
||||
MTXCopy(model->getAnmMtx(1), *calc_mtx);
|
||||
emitter->setGlobalRTMatrix(*calc_mtx);
|
||||
|
||||
@@ -516,7 +516,7 @@ void daE_YMB_c::checkWaterPos() {
|
||||
field_0x6cc = wtr_pos;
|
||||
field_0x69c.y = wtr_pos + 1000.0f + l_HIO.fly_height_adjust;
|
||||
|
||||
std::fabsf(field_0x6cc - current.pos.y);
|
||||
UNUSED(std::fabsf(field_0x6cc - current.pos.y));
|
||||
if (current.pos.y < (200.0f + field_0x6cc)) {
|
||||
if (field_0x715 == 0) {
|
||||
setWaterEffect1();
|
||||
|
||||
@@ -542,7 +542,7 @@ bool daE_ZH_c::mBallBgLineCheck() {
|
||||
bool daE_ZH_c::mSearchMove(u8 param_1) {
|
||||
if (mS_Ball == NULL) {
|
||||
setActionMode(ACTION_EXECUTE_FLY_DELETE, 0);
|
||||
return NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
cXyz sp50, sp5c;
|
||||
|
||||
@@ -51,9 +51,10 @@
|
||||
#define ANM_HS_WALK_FAST 34
|
||||
#define ANM_HS_WALK_SLOW 35
|
||||
|
||||
static f32* strippedFunc() {
|
||||
f32 v[3] = {};
|
||||
return v;
|
||||
static void strippedFunc() {
|
||||
extern void F(f32*);
|
||||
f32 v[3] = {0.0f};
|
||||
F(v);
|
||||
}
|
||||
|
||||
static char const l_arcName[] = "Horse";
|
||||
|
||||
@@ -2977,8 +2977,8 @@ static void hook_set(dmg_rod_class* i_this, cXyz* param_1, int param_2) {
|
||||
mDoMtx_stack_c::XrotM(-0x4000);
|
||||
|
||||
if (param_2 == 1 && (i_this->action <= ACTION_LURE_STANDBY || (i_this->lure_type != MG_LURE_SP && i_this->action == ACTION_LURE_CATCH))) {
|
||||
sp38.x = fabsf(hook->field_0x18.y);
|
||||
sp38.z = fabsf(hook->field_0x18.x - 0x4000);
|
||||
sp38.x = fabsf((f32)hook->field_0x18.y);
|
||||
sp38.z = fabsf((f32)(hook->field_0x18.x - 0x4000));
|
||||
|
||||
f32 var_f31 = JMAFastSqrt(SQUARE(sp38.x) + SQUARE(sp38.z));
|
||||
if (var_f31 > 7000.0f) {
|
||||
|
||||
@@ -986,7 +986,7 @@ BOOL daNbomb_c::procWait() {
|
||||
speedF *= player->getBombBoundRate();
|
||||
current.angle.y = (mAcchCir.GetWallAngleY() * 2) - (current.angle.y + 0x8000);
|
||||
} else if (mAcch.ChkGroundLanding() && speedF > 5.0f && cM_deg2s(50.0f) <= field_0xb5a) {
|
||||
if ((f32)fabs(var_r28) >= (f32)0x4000) {
|
||||
if ((f32)fabs((f64)var_r28) >= (f32)0x4000) {
|
||||
speedF *= player->getBombBoundRate();
|
||||
current.angle.y = (var_r27 * 2) - (current.angle.y + 0x8000);
|
||||
mAcch.ClrGroundLanding();
|
||||
|
||||
@@ -544,7 +544,7 @@ void daBaseNpc_c::orderEvent(int param_0, char* i_evtName) {
|
||||
if (i_evtName != NULL) {
|
||||
mEvtIdx = dComIfGp_getEventManager().getEventIdx(this, i_evtName, -1);
|
||||
fopAcM_orderOtherEventId(this, mEvtIdx, 0xFF, 0xFFFF, 0, 1);
|
||||
} else if (field_0x848 >= 0 && attention_info.flags == (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)) {
|
||||
} else if (mFlowID >= 0 && attention_info.flags == (fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e)) {
|
||||
eventInfo.onCondition(1);
|
||||
if (param_0 != 0) {
|
||||
fopAcM_orderSpeakEvent(this, 0, 0);
|
||||
|
||||
@@ -635,7 +635,7 @@ void daNpc_Bou_c::action() {
|
||||
|
||||
hit_actor = field_0xba0.getActorP();
|
||||
if (hit_actor != NULL) {
|
||||
abs( (s16)(fopAcM_searchPlayerAngleY(this) - mCurAngle.y) );
|
||||
UNUSED(abs((s16)(fopAcM_searchPlayerAngleY(this) - mCurAngle.y)));
|
||||
switch (((daTag_Push_c*) hit_actor)->getId()) {
|
||||
case 7: {
|
||||
mEvtNo = 8;
|
||||
|
||||
@@ -2628,7 +2628,7 @@ BOOL daNpcChat_c::setAttention(int param_1) {
|
||||
cXyz(0.0f, 10.0f, 0.0f),
|
||||
};
|
||||
|
||||
int jointNo = isM_() ? JNTM_HEAD : JNTW_HEAD;
|
||||
int jointNo = isM_() ? (int)JNTM_HEAD : (int)JNTW_HEAD;
|
||||
mDoMtx_stack_c::copy(mAnm_p->getModel()->getAnmMtx(jointNo));
|
||||
mDoMtx_stack_c::multVec(&a_eyeOfsTbl[param_1], &eyePos);
|
||||
mBaseAttnPos.set(current.pos.x, current.pos.y + AtnOfs(param_1), current.pos.z);
|
||||
|
||||
@@ -517,8 +517,7 @@ BOOL daNpcChPath_c::setPath(int path_index, int room_no, cXyz& i_vec, bool param
|
||||
mCurrentID = path_index;
|
||||
mPntIndex = 0;
|
||||
|
||||
// Is this really what the Nintendo devs wrote?? The debug ROM suggests as such.
|
||||
if (param_4 && &i_vec) {
|
||||
if (param_4 && IS_REF_NONNULL(i_vec)) {
|
||||
f32 fVar1 = G_CM3D_F_INF;
|
||||
for (int pnt_index = 0; pnt_index < mpPath->m_num; pnt_index++) {
|
||||
dPnt* pnt = dPath_GetPnt(mpPath, pnt_index);
|
||||
@@ -534,8 +533,7 @@ BOOL daNpcChPath_c::setPath(int path_index, int room_no, cXyz& i_vec, bool param
|
||||
|
||||
field_0x8 = G_CM3D_F_INF;
|
||||
|
||||
// ditto.
|
||||
if (&i_vec) {
|
||||
if (IS_REF_NONNULL(i_vec)) {
|
||||
field_0x4 = &i_vec;
|
||||
cXyz targetPoint;
|
||||
getTargetPoint(targetPoint);
|
||||
|
||||
@@ -343,10 +343,13 @@ BOOL daNpc_grA_c::create() {
|
||||
mType = getTypeFromParam();
|
||||
mMode = getMode();
|
||||
mSwBit = getSwBit();
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
field_0x146C = home.angle.x;
|
||||
mFlowID = home.angle.x;
|
||||
} else{
|
||||
field_0x146C = -1;
|
||||
mFlowID = -1;
|
||||
}
|
||||
if (isDelete()) {
|
||||
return cPhs_ERROR_e;
|
||||
@@ -2146,7 +2149,7 @@ BOOL daNpc_grA_c::ECut_talkSpa(int i_staffID) {
|
||||
setLookMode(5);
|
||||
break;
|
||||
case 1:
|
||||
initTalk(field_0x146C, arr);
|
||||
initTalk(mFlowID, arr);
|
||||
break;
|
||||
case 2:
|
||||
if (daNpcF_chkEvtBit(6) && daNpcF_chkEvtBit(0x3e) == FALSE) {
|
||||
@@ -3020,7 +3023,7 @@ BOOL daNpc_grA_c::ECut_rollRockCrash(int i_staffID) {
|
||||
break;
|
||||
case 0x14: {
|
||||
setLookMode(0);
|
||||
initTalk(field_0x146C, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
cXyz c(200.0f, 100.0f, 0.0f);
|
||||
mDoMtx_stack_c::YrotS(home.angle.y);
|
||||
mDoMtx_stack_c::multVec(&c, &c);
|
||||
@@ -3588,7 +3591,7 @@ BOOL daNpc_grA_c::waitSpaWater(void*) {
|
||||
}
|
||||
setLookMode(0);
|
||||
mTurnMode = 0;
|
||||
field_0x146C = 0x28;
|
||||
mFlowID = 0x28;
|
||||
field_0x1472 = 2;
|
||||
field_0x9ea = 1;
|
||||
// fallthrough
|
||||
@@ -3968,7 +3971,7 @@ BOOL daNpc_grA_c::talk(void*) {
|
||||
setGateWalk();
|
||||
}
|
||||
} else {
|
||||
r27 = field_0x146C;
|
||||
r27 = mFlowID;
|
||||
}
|
||||
initTalk(r27, NULL);
|
||||
field_0x1484 = fopAcM_searchPlayerAngleY(this);
|
||||
|
||||
@@ -308,6 +308,9 @@ cPhs_Step daNpc_grC_c::create() {
|
||||
mTwilight = dKy_darkworld_check();
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -172,6 +172,9 @@ int daNpc_Grd_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -396,6 +396,9 @@ cPhs_Step daNpc_grO_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mMsgNo = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -264,6 +264,9 @@ cPhs_Step daNpc_grR_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -138,10 +138,13 @@ int daNpc_grS_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
field_0xe0c = home.angle.x;
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
field_0xe0c = -1;
|
||||
mFlowID = -1;
|
||||
}
|
||||
|
||||
if (isDelete()) {
|
||||
@@ -856,7 +859,7 @@ int daNpc_grS_c::selectAction() {
|
||||
mpNextActionFn = &daNpc_grS_c::test;
|
||||
}
|
||||
else {
|
||||
(int)mType;
|
||||
UNUSED((int)mType);
|
||||
mpNextActionFn = &daNpc_grS_c::wait;
|
||||
}
|
||||
|
||||
@@ -936,7 +939,7 @@ int daNpc_grS_c::doEvent() {
|
||||
if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 &&
|
||||
eventManager->endCheck(mEventIdx))
|
||||
{
|
||||
(int)mOrderEvtNo;
|
||||
UNUSED((int)mOrderEvtNo);
|
||||
dComIfGp_event_reset();
|
||||
mOrderEvtNo = 0;
|
||||
mEventIdx = -1;
|
||||
@@ -1157,7 +1160,7 @@ int daNpc_grS_c::talk(void* param_0) {
|
||||
daNpcF_offTmpBit(11);
|
||||
}
|
||||
|
||||
unkInt1 = field_0xe0c;
|
||||
unkInt1 = mFlowID;
|
||||
mIsSpeaking = false;
|
||||
initTalk(unkInt1, NULL);
|
||||
mTurnMode = 0;
|
||||
|
||||
@@ -455,6 +455,9 @@ cPhs_Step daNpc_Grz_c::create() {
|
||||
mType = getTypeFromParam();
|
||||
mSwNo = fopAcM_GetParam(this) >> 16;
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mMsgNo = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -291,10 +291,13 @@ cPhs_Step daNpc_GWolf_c::create() {
|
||||
|
||||
mExitId = fopAcM_GetParam(this) >> 24;
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
field_0xe08 = home.angle.x;
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
field_0xe08 = -1;
|
||||
mFlowID = -1;
|
||||
}
|
||||
|
||||
swBit = getSwBitFromParam();
|
||||
@@ -1817,7 +1820,7 @@ BOOL daNpc_GWolf_c::talk(void* param_1) {
|
||||
break;
|
||||
}
|
||||
|
||||
int msgNo = field_0xe08;
|
||||
int msgNo = mFlowID;
|
||||
mOrderSpeakEvt = false;
|
||||
initTalk(msgNo, NULL);
|
||||
mTurnMode = 0;
|
||||
|
||||
@@ -4961,11 +4961,11 @@ int daNpc_Kn_c::setPrtcl() {
|
||||
// cXyz* pos = mParticleMngr[i].mpModel == true ? &mParticleMngr[i].mPos : NULL;
|
||||
|
||||
mParticleMngr[i].mManager.setEffectCenter(&tevStr, &mParticleMngr[i].mPos, check, sp_0x18,
|
||||
mParticleMngr[i].mpModel == true ? &mParticleMngr[i].mPos : NULL,
|
||||
mParticleMngr[i].mpModel == true ? &mParticleMngr[i].mAngle : NULL,
|
||||
mParticleMngr[i].field_0x00 == true ? &mParticleMngr[i].mPos : NULL,
|
||||
mParticleMngr[i].field_0x00 == true ? &mParticleMngr[i].mAngle : NULL,
|
||||
0, fopAcM_GetRoomNo(this), 0.0f, speedF);
|
||||
|
||||
if (mParticleMngr[i].mpModel != false) {
|
||||
if (mParticleMngr[i].field_0x00 != false) {
|
||||
emitter = mParticleMngr[i].mManager.getCenterEmitter(0, 0);
|
||||
if (emitter != NULL) {
|
||||
switch (i) {
|
||||
@@ -4984,7 +4984,7 @@ int daNpc_Kn_c::setPrtcl() {
|
||||
}
|
||||
}
|
||||
|
||||
mParticleMngr[i].mpModel = NULL;
|
||||
mParticleMngr[i].field_0x00 = false;
|
||||
}
|
||||
|
||||
return 1;
|
||||
@@ -4996,21 +4996,21 @@ int daNpc_Kn_c::setSlipPrtcl() {
|
||||
mParticleMngr[0].mPos.y -= 20.0f;
|
||||
mParticleMngr[0].mAngle = current.angle;
|
||||
ANGLE_SUB_2(mParticleMngr[0].mAngle.y, 0x8000);
|
||||
mParticleMngr[0].mpModel = true;
|
||||
mParticleMngr[0].field_0x00 = true;
|
||||
|
||||
mDoMtx_stack_c::copy(mpModelMorf[0]->getModel()->getAnmMtx(0x1b));
|
||||
mDoMtx_stack_c::multVecZero(&mParticleMngr[1].mPos);
|
||||
mParticleMngr[1].mPos.y -= 20.0f;
|
||||
mParticleMngr[1].mAngle = current.angle;
|
||||
ANGLE_SUB_2(mParticleMngr[1].mAngle.y, 0x8000);
|
||||
mParticleMngr[1].mpModel = true;
|
||||
mParticleMngr[1].field_0x00 = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int daNpc_Kn_c::setLandingPrtcl() {
|
||||
mParticleMngr[2].mPos = current.pos;
|
||||
mParticleMngr[2].mAngle = mCurAngle;
|
||||
mParticleMngr[2].mpModel = true;
|
||||
mParticleMngr[2].field_0x00 = true;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -250,7 +250,13 @@ static int daNpc_Ks_Draw(npc_ks_class* i_this) {
|
||||
|
||||
fopAc_ac_c* actor = &i_this->actor;
|
||||
J3DModel* model = i_this->model->getModel();
|
||||
// This happens to work with MWCC since the member will only ever be initialized a pointer to a
|
||||
// string in this TU's .data section, but comparing against a string literal is still UB.
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->res_name, "Npc_kst") == 0) {
|
||||
#else
|
||||
if (i_this->res_name == "Npc_kst") {
|
||||
#endif
|
||||
g_env_light.settingTevStruct(4, &actor->current.pos, &actor->tevStr);
|
||||
} else {
|
||||
g_env_light.settingTevStruct(0, &actor->current.pos, &actor->tevStr);
|
||||
|
||||
@@ -189,10 +189,13 @@ int daNpc_myna2_c::create() {
|
||||
mType = getTypeFromParam();
|
||||
field_0xe0d = (fopAcM_GetParam(this) & 0xFF00) >> 8;
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
field_0xe04 = home.angle.x;
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
field_0xe04 = -1;
|
||||
mFlowID = -1;
|
||||
}
|
||||
|
||||
if (isDelete()) {
|
||||
@@ -928,7 +931,7 @@ int daNpc_myna2_c::talk(void* param_0) {
|
||||
switch (mMode) {
|
||||
case 0:
|
||||
if (!mIsDamaged) {
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
mTurnMode = 0;
|
||||
mAnm_p->setPlaySpeed(1.0f);
|
||||
mMode = 2;
|
||||
@@ -1014,7 +1017,7 @@ int daNpc_myna2_c::ECut_firstTalk(int i_staffId) {
|
||||
case 10:
|
||||
break;
|
||||
case 20:
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1063,7 +1066,7 @@ int daNpc_myna2_c::ECut_gameFailure(int i_staffId) {
|
||||
case 20:
|
||||
break;
|
||||
case 10:
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1121,7 +1124,7 @@ int daNpc_myna2_c::ECut_gameGoal(int i_staffId) {
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
break;
|
||||
case 20:
|
||||
break;
|
||||
@@ -1183,7 +1186,7 @@ int daNpc_myna2_c::ECut_gameGoalSuccess(int i_staffId) {
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
break;
|
||||
case 20: {
|
||||
int itemNo = 0;
|
||||
@@ -1193,7 +1196,7 @@ int daNpc_myna2_c::ECut_gameGoalSuccess(int i_staffId) {
|
||||
break;
|
||||
}
|
||||
case 25:
|
||||
initTalk(field_0xe04, NULL);
|
||||
initTalk(mFlowID, NULL);
|
||||
break;
|
||||
case 30:
|
||||
break;
|
||||
|
||||
+58
-12
@@ -135,7 +135,13 @@ static int daNpc_Ne_Draw(npc_ne_class* i_this) {
|
||||
}
|
||||
|
||||
J3DModel* model = i_this->mpMorf->getModel();
|
||||
// This happens to work with MWCC since the member will only ever be initialized a pointer to a
|
||||
// string in this TU's .data section, but comparing against a string literal is still UB.
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
if (!dComIfGs_wolfeye_effect_check()) {
|
||||
return 1;
|
||||
}
|
||||
@@ -426,7 +432,12 @@ static void npc_ne_wait(npc_ne_class* i_this) {
|
||||
daPy_py_c* player = static_cast<daPy_py_c*>(dComIfGp_getPlayer(0));
|
||||
cLib_addCalc0(&_this->speedF, 1.0f, 1.3f);
|
||||
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
switch (i_this->mMode) {
|
||||
case 0:
|
||||
i_this->mTargetAngleY = cM_rndF(0x10000);
|
||||
@@ -2173,7 +2184,12 @@ static void action(npc_ne_class* i_this) {
|
||||
|
||||
_this->gravity = -7.0f;
|
||||
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
i_this->mDistToTarget = 10000.0f;
|
||||
} else {
|
||||
i_this->mDistToTarget = i_this->mDistScale * fopAcM_searchPlayerDistance(_this);
|
||||
@@ -2298,9 +2314,15 @@ static void action(npc_ne_class* i_this) {
|
||||
break;
|
||||
}
|
||||
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") != 0) {
|
||||
#else
|
||||
if (i_this->mResName != "Npc_net") {
|
||||
if (i_this->mMessageState == 1 && daPy_py_c::checkNowWolf()
|
||||
&& i_this->mDistToTarget < 300.0f) {
|
||||
#endif
|
||||
if (i_this->mMessageState == 1 &&
|
||||
daPy_py_c::checkNowWolf() &&
|
||||
i_this->mDistToTarget < 300.0f) {
|
||||
i_this->mAction = npc_ne_class::ACT_MESSAGE;
|
||||
i_this->mMode = 0;
|
||||
bird_check = false;
|
||||
@@ -2846,8 +2868,15 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
}
|
||||
|
||||
static int message(npc_ne_class* i_this) {
|
||||
if (i_this->mResName == "Npc_net" && !dComIfGs_wolfeye_effect_check()) {
|
||||
i_this->mMessageState = 0;
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
if (!dComIfGs_wolfeye_effect_check()) {
|
||||
i_this->mMessageState = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (i_this->mIsTalking) {
|
||||
@@ -2872,7 +2901,12 @@ static int message(npc_ne_class* i_this) {
|
||||
!fopAcM_otherBgCheck(daPy_getLinkPlayerActorClass(), i_this)) {
|
||||
fopAcM_OnStatus(i_this, 0);
|
||||
cLib_onBit<u32>(i_this->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e);
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
cLib_onBit<u32>(i_this->attention_info.flags, fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_UNK_0x400000);
|
||||
}
|
||||
i_this->eventInfo.onCondition(dEvtCnd_CANTALK_e);
|
||||
@@ -2978,14 +3012,21 @@ static int daNpc_Ne_Execute(npc_ne_class* i_this) {
|
||||
message(i_this);
|
||||
demo_camera(i_this);
|
||||
|
||||
if (i_this->mResName == "Npc_net" && !dComIfGs_wolfeye_effect_check()) {
|
||||
static u16 e_name[2] = {0x8497, 0x8498};
|
||||
for (int i = 0; i < 2; i++) {
|
||||
i_this->mParticle[i] = dComIfGp_particle_set(i_this->mParticle[i], e_name[i],
|
||||
&i_this->eyePos, NULL, NULL);
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticle[i]);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalAlpha(!dComIfGs_wolfeye_effect_check() ? 0xff : 0);
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(i_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (i_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
if (!dComIfGs_wolfeye_effect_check()) {
|
||||
static u16 e_name[2] = {0x8497, 0x8498};
|
||||
for (int i = 0; i < 2; i++) {
|
||||
i_this->mParticle[i] = dComIfGp_particle_set(i_this->mParticle[i], e_name[i],
|
||||
&i_this->eyePos, NULL, NULL);
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_getEmitter(i_this->mParticle[i]);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalAlpha(!dComIfGs_wolfeye_effect_check() ? 0xff : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3231,7 +3272,12 @@ static cPhs_Step daNpc_Ne_Create(fopAc_ac_c* i_this) {
|
||||
_this->mAcchCir.SetWall(_this->mBaseScale.y * 30.0f, _this->mBaseScale.z * 35.0f);
|
||||
_this->mDistScale = cM_rndFX(0.2f) + 1.0f;
|
||||
_this->mGroundY = i_this->current.pos.y;
|
||||
// See comment in daNpc_Ne_Draw
|
||||
#if AVOID_UB
|
||||
if (strcmp(_this->mResName, "Npc_net") == 0) {
|
||||
#else
|
||||
if (_this->mResName == "Npc_net") {
|
||||
#endif
|
||||
_this->mAction = npc_ne_class::ACT_WAIT;
|
||||
_this->mMode = 0;
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ int daNpc_Pachi_Maro_c::wait(void* param_1) {
|
||||
}
|
||||
|
||||
if (mJntAnm.getMode() == 0) {
|
||||
(s32)mType;
|
||||
UNUSED((int)mType);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1464,7 +1464,7 @@ int daNpc_Pachi_Taro_c::wait(void* param_1) {
|
||||
|
||||
// ???
|
||||
if (mJntAnm.getMode() == 0) {
|
||||
(int)mType;
|
||||
UNUSED((int)mType);
|
||||
}
|
||||
|
||||
if (field_0x1004 == 0) {
|
||||
|
||||
@@ -696,7 +696,7 @@ BOOL daNpc_Post_c::checkChangeEvt() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
(int)mType;
|
||||
UNUSED((int)mType);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -206,6 +206,9 @@ cPhs_Step daNpc_SoldierA_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mMsgNo = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -171,6 +171,9 @@ cPhs_Step daNpc_SoldierB_c::create() {
|
||||
|
||||
mType = getTypeFromParam();
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xFFFF) {
|
||||
mMsgNo = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -244,6 +244,9 @@ cPhs_Step daNpcTheB_c::create() {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
// !@bug The return value (an s16) is promoted to a 32-bit signed
|
||||
// integer prior to being compared, so the compared value can
|
||||
// never exceed SHORT_MAX and the condition always passes.
|
||||
if (getMessageNo() != 0xFFFF) {
|
||||
mMsgNo = getMessageNo();
|
||||
} else {
|
||||
|
||||
@@ -2219,8 +2219,8 @@ bool daNpcWrestler_c::sumouReady(void* param_1) {
|
||||
// fallthrough
|
||||
case 2:
|
||||
field_0xe5e += field_0xbd8->field_0xac;
|
||||
field_0xe54 -= fabsf(field_0xbd8->field_0xac);
|
||||
if (field_0xe54 < fabsf(field_0xbd8->field_0xac)) {
|
||||
field_0xe54 -= fabsf((f32)field_0xbd8->field_0xac);
|
||||
if (field_0xe54 < fabsf((f32)field_0xbd8->field_0xac)) {
|
||||
field_0xe80 = 1;
|
||||
field_0xe84++;
|
||||
}
|
||||
|
||||
@@ -493,6 +493,9 @@ cPhs_Step daNpc_zrA_c::create() {
|
||||
fopAcM_ct(this, daNpc_zrA_c);
|
||||
|
||||
mType = getTypeFromArgument();
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -222,6 +222,9 @@ cPhs_Step daNpc_zrC_c::create() {
|
||||
fopAcM_ct(this, daNpc_zrC_c);
|
||||
|
||||
mType = getTypeFromParam();
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -203,6 +203,9 @@ cPhs_Step daNpc_zrZ_c::create() {
|
||||
mSwitch1 = home.angle.z & 0xff;
|
||||
mSwitch2 = (home.angle.z >> 8) & 0xff;
|
||||
mSwitch3 = fopAcM_GetParam(this) >> 0x18;
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.x != 0xffff) {
|
||||
mFlowID = home.angle.x;
|
||||
} else {
|
||||
|
||||
@@ -666,8 +666,8 @@ static void obj_brg_move(obj_brg_class* i_this) {
|
||||
if ((i_this->mType & 1) == 1) {
|
||||
i_this->mBr[i].field_0x0e0 = 1.0f;
|
||||
} else {
|
||||
var_f27 = ( f32(i) / (i_this->field_0xb1ea - 1)) * M_PI;
|
||||
i_this->mBr[i].field_0x0e0 = fabsf(sin(var_f27));
|
||||
var_f27 = ((f32)i / (i_this->field_0xb1ea - 1)) * M_PI;
|
||||
i_this->mBr[i].field_0x0e0 = fabsf(sinf(var_f27));
|
||||
}
|
||||
|
||||
i_this->mBr[i].field_0x704 = i_this->mBr[i].field_0x705 = 3;
|
||||
@@ -994,11 +994,11 @@ static int daObj_Brg_Execute(obj_brg_class* i_this) {
|
||||
f32 dbg_0x5c;
|
||||
for (int i = 0; i < i_this->field_0xb1ea; i++, part++) {
|
||||
if (i_this->field_0xb1ed == 2) {
|
||||
dbg_0x5c = f32(i) / f32(i_this->field_0xb1ea - 1) * M_PI;
|
||||
var_f26 = (-300.0f + WREG_F(15)) * f32(sin(dbg_0x5c));
|
||||
dbg_0x5c = (f32)i / (f32)(i_this->field_0xb1ea - 1) * M_PI;
|
||||
var_f26 = (-300.0f + WREG_F(15)) * (f32)sin(dbg_0x5c);
|
||||
} else if (i_this->field_0xb1ed == 1) {
|
||||
dbg_0x5c = f32(i) / f32(i_this->field_0xb1ea - 1) * M_PI;
|
||||
var_f26 = (-100.0f + WREG_F(13)) * f32(sin(dbg_0x5c));
|
||||
dbg_0x5c = (f32)i / (f32)(i_this->field_0xb1ea - 1) * M_PI;
|
||||
var_f26 = (-100.0f + WREG_F(13)) * (f32)sin(dbg_0x5c);
|
||||
}
|
||||
|
||||
MtxTrans(part->field_0x0bc.x, part->field_0x0bc.y, part->field_0x0bc.z, 0);
|
||||
@@ -1795,7 +1795,7 @@ static int daObj_Brg_Create(fopAc_ac_c* i_this) {
|
||||
};
|
||||
|
||||
for (brno = 0; brno < a_this->field_0xb1ea; brno++) {
|
||||
a_this->mBr[brno].field_0x098[2] = brg_init_pos[brno];
|
||||
a_this->mBr[brno].field_0x0b0 = brg_init_pos[brno];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -333,6 +333,10 @@ void daObjCwall_c::getChainBasePos(cXyz* pBasePos) {
|
||||
void daObjCwall_c::setChainMtx() {
|
||||
chain_s* pChain = mChains;
|
||||
s16 sVar7 = home.angle.y;
|
||||
|
||||
// !@bug The variable is promoted to a 32-bit signed integer prior
|
||||
// to being compared to 0xC000, so the compared value can never
|
||||
// exceed SHORT_MAX and the subcondition fails.
|
||||
if (sVar7 == 0x4000 || sVar7 == 0xc000) {
|
||||
sVar7 += 0x4000;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,10 @@ cPhs_Step daObj_GrA_c::create() {
|
||||
}
|
||||
}
|
||||
|
||||
field_0x848 = ((int)home.angle.x == 0xFFFF) ? -1 : home.angle.x;
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always fails.
|
||||
mFlowID = home.angle.x == 0xFFFF ? -1 : home.angle.x;
|
||||
|
||||
field_0x1fe8 = (fopAcM_GetParam(this) & 0xC0000000) >> 30;
|
||||
field_0xa7f = home.angle.z & 0xFF;
|
||||
@@ -1435,7 +1438,7 @@ int daObj_GrA_c::talk(void* param_1) {
|
||||
int iVar1, iVar2;
|
||||
int rv = 0;
|
||||
int iVar3;
|
||||
int iVar4 = field_0x848;
|
||||
int iVar4 = mFlowID;
|
||||
s16 sVar1;
|
||||
switch (field_0xa7c) {
|
||||
case 0:
|
||||
@@ -2013,7 +2016,7 @@ int daObj_GrA_c::face999(int param_1) {
|
||||
}
|
||||
|
||||
int daObj_GrA_c::evtcutTalk(int param_1, int param_2) {
|
||||
s32 sVar1 = field_0x848;
|
||||
s32 sVar1 = mFlowID;
|
||||
if (param_2 != 0) {
|
||||
mMsgFlow.init(this, sVar1, 0, NULL);
|
||||
field_0xaa0 = 0;
|
||||
|
||||
@@ -768,7 +768,7 @@ int daObj_GrA_c::rollDemo(void* param_1) {
|
||||
field_0x91a.y = current.angle.y;
|
||||
|
||||
if (mDemoCamMode >= 5) {
|
||||
field_0x848 = 4;
|
||||
mFlowID = 4;
|
||||
evtcutTalk(-1, 1);
|
||||
field_0x2000 = 0;
|
||||
}
|
||||
@@ -1169,7 +1169,7 @@ int daObj_GrA_c::rollAttacked(void* param_1) {
|
||||
|
||||
case 2:
|
||||
if (mDemoCamMode >= 5) {
|
||||
field_0x848 = 5;
|
||||
mFlowID = 5;
|
||||
evtcutTalk(-1, 1);
|
||||
field_0x2018 = 3;
|
||||
}
|
||||
|
||||
@@ -947,7 +947,7 @@ void daObjMarm_c::calcHimo() {
|
||||
|
||||
getRopeStartPos(&offset1);
|
||||
getFpartsOffset(&offset2);
|
||||
fabs(offset1.y - offset2.y);
|
||||
UNUSED(fabs(offset1.y - offset2.y));
|
||||
|
||||
cXyz* line_mat1_pos = mpRope1->getPos(0);
|
||||
*line_mat1_pos = offset1;
|
||||
|
||||
@@ -288,8 +288,9 @@ int daObj_Pumpkin_c::Execute() {
|
||||
if (field_0xBAE) {
|
||||
int item_table_no = getItemTableNo();
|
||||
if (item_table_no >= 0 && mItemProcId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
mItemProcId = fopAcM_createItemFromTable(¤t.pos, item_table_no, -1, fopAcM_GetRoomNo(this),
|
||||
NULL, 0, NULL, NULL, NULL, NULL);
|
||||
mItemProcId = fopAcM_createItemFromTable(¤t.pos, item_table_no, -1,
|
||||
fopAcM_GetRoomNo(this), NULL, 0, NULL, NULL,
|
||||
NULL, false);
|
||||
}
|
||||
|
||||
if (mItemProcId == fpcM_ERROR_PROCESS_ID_e || fopAcM_IsExecuting(mItemProcId)) {
|
||||
|
||||
@@ -112,7 +112,9 @@ int daObj_SekiDoor_c::Execute(Mtx** i_mtx) {
|
||||
|
||||
if (mOpening != 0) {
|
||||
if (mDestroyed != 0) {
|
||||
if(!dComIfGp_event_runCheck){
|
||||
// !@bug Missing parentheses - the function is not callled and
|
||||
// this always evaluates to false.
|
||||
if (!dComIfGp_event_runCheck) {
|
||||
fopAcM_delete(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1008,9 +1008,14 @@ bool daObj_Sekizoa_c::afterSetMotionAnm(int i_frame, int i_mode, f32 i_morf, int
|
||||
if (mBtkAnm.getBtkAnm() == anm_text) {
|
||||
mAnmFlags |= ANM_PLAY_BTK;
|
||||
} else {
|
||||
if (setBtkAnm(anm_text, mpMorf[0]->getModel()->getModelData(), 1.0f,
|
||||
btkAnmData[4].field_0x4))
|
||||
{
|
||||
#if AVOID_UB
|
||||
// negative attribute values are ignored in favor of the animation's default value
|
||||
if (setBtkAnm(anm_text, mpMorf[0]->getModel()->getModelData(), 1.0f, -1)) {
|
||||
#else
|
||||
// !@bug Out-of-bounds array read, in practice this ends up reading from a jump table
|
||||
// positioned immediately after btkAnmData in .data.
|
||||
if (setBtkAnm(anm_text, mpMorf[0]->getModel()->getModelData(), 1.0f, btkAnmData[4].field_0x4)) {
|
||||
#endif
|
||||
if (frame_1 == 3) {
|
||||
mBtkAnm.setPlaySpeed(0.0f);
|
||||
}
|
||||
@@ -1032,8 +1037,15 @@ bool daObj_Sekizoa_c::afterSetMotionAnm(int i_frame, int i_mode, f32 i_morf, int
|
||||
if (mBrkAnm.getBrkAnm() == anm_tev) {
|
||||
mAnmFlags |= ANM_PLAY_BRK;
|
||||
} else {
|
||||
frame_1 = setBrkAnm(anm_tev, mpMorf[0]->getModel()->getModelData(), 1.0,
|
||||
// !@bug OoB index into brkAnmData ends up indexing into btkAnmData instead.
|
||||
// This was probably supposed to use brkAnmData[5] instead.
|
||||
#if AVOID_UB
|
||||
frame_1 = setBrkAnm(anm_tev, mpMorf[0]->getModel()->getModelData(), 1.0f,
|
||||
btkAnmData[0].field_0x4);
|
||||
#else
|
||||
frame_1 = setBrkAnm(anm_tev, mpMorf[0]->getModel()->getModelData(), 1.0f,
|
||||
brkAnmData[6].field_0x4);
|
||||
#endif
|
||||
if (frame_1 != 0) {
|
||||
if (frame_2 == 5) {
|
||||
mBrkAnm.setPlaySpeed(0.0f);
|
||||
|
||||
@@ -384,6 +384,7 @@ int daObj_SSDrink_c::chkEvent() {
|
||||
}
|
||||
|
||||
int daObj_SSDrink_c::orderEvent() {
|
||||
// !@bug Comparison of u16 (getFlowNodeNum()) with -1 always evaluates to false
|
||||
if (!daPy_py_c::checkNowWolf() && field_0xb0c != 0x60 && getFlowNodeNum() != -1) {
|
||||
attention_info.flags = fopAc_AttnFlag_TALKREAD_e | fopAc_AttnFlag_SPEAK_e;
|
||||
} else {
|
||||
|
||||
@@ -168,6 +168,7 @@ int daTag_Evt_c::isDelete() {
|
||||
if (field_0x5DD == 0xFF ||
|
||||
(field_0x5DD != 0xFF && dComIfGs_isSwitch(field_0x5DD, fopAcM_GetRoomNo(this)) != 0))
|
||||
{
|
||||
// !@bug Comparison of u8 field with 0xFFF will always evaluate to false
|
||||
if (field_0x5DE != 0xFFF) {
|
||||
return dComIfGs_isSwitch(field_0x5DE, fopAcM_GetRoomNo(this));
|
||||
} else {
|
||||
|
||||
@@ -36,6 +36,9 @@ int daTag_EvtMsg_c::create() {
|
||||
scale.y *= 100.0f;
|
||||
scale.z = scale.x;
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.z != 0xFFFF) {
|
||||
mFlowID = home.angle.z;
|
||||
} else {
|
||||
|
||||
@@ -126,6 +126,9 @@ void daTag_Lantern_c::initialize() {
|
||||
mpHIO->entryHIO("カンテラチェックタグ");
|
||||
#endif
|
||||
|
||||
// !@bug home.angle.x is promoted to a 32-bit signed integer prior
|
||||
// to being compared, so the compared value can never exceed
|
||||
// SHORT_MAX and the condition always passes.
|
||||
if (home.angle.z != 0xFFFF) {
|
||||
mFlowIndex = home.angle.z;
|
||||
} else {
|
||||
|
||||
@@ -163,7 +163,7 @@ static int daTagRestart_Execute(daTagRestart_c* i_this) {
|
||||
}
|
||||
|
||||
static int daTagRestart_Delete(daTagRestart_c* i_this) {
|
||||
("Delete -> TagRestart( =%d)\n", fopAcM_GetID(i_this));
|
||||
fopAcM_RegisterDeleteID(i_this, "TagRestart");
|
||||
return i_this->_delete();
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ int daTag_SSDrink_c::chkEvent() {
|
||||
if (!dComIfGp_getEvent()->isOrderOK()) {
|
||||
retVal = 0;
|
||||
if (eventInfo.checkCommandTalk()) {
|
||||
if (!checkProcess(&daTag_SSDrink_c::talk) == 0) {
|
||||
if (checkProcess(&daTag_SSDrink_c::talk) != 0) {
|
||||
retVal = (this->*mProcessFunc)(0);
|
||||
} else {
|
||||
if (dComIfGp_event_chkTalkXY() == 0 || dComIfGp_evmng_ChkPresentEnd() != 0) {
|
||||
|
||||
@@ -23,6 +23,7 @@ int daTagTheBHint_c::execute() {
|
||||
if (fopAcM_searchPlayerDistanceXZ2(this) < field_0x568) {
|
||||
daNpcTheB_c* the_b = (daNpcTheB_c*)fpcM_SearchByName(fpcNm_NPC_THEB_e);
|
||||
if (the_b) {
|
||||
// !@bug Comparison of s8 (getRoomNo) with 0xFF always evaluates to false
|
||||
int roomNo = getRoomNo() == 0xff ? fopAcM_GetRoomNo(this) : getRoomNo();
|
||||
|
||||
the_b->setHintEvent(getMessageNo(), getLinkID(), roomNo);
|
||||
|
||||
@@ -1719,7 +1719,7 @@ JUtility::TColor get_color(JUtility::TColor color) {
|
||||
JUtility::TColor(0x80, 0x80, 0xFF, 0xFF),
|
||||
};
|
||||
|
||||
(void)(u32)color;
|
||||
UNUSED((u32)color);
|
||||
int var_r30 = 1;
|
||||
|
||||
if (var_r30 && (u32)color < 9) {
|
||||
|
||||
+19
-1
@@ -14,6 +14,24 @@
|
||||
s16 dDemo_c::m_branchId = -1;
|
||||
|
||||
namespace {
|
||||
class jstudio_tAdaptor_message : public JStudio::TAdaptor_message {
|
||||
public:
|
||||
typedef JStudio::TObject_message ObjectType;
|
||||
|
||||
jstudio_tAdaptor_message() {}
|
||||
|
||||
virtual ~jstudio_tAdaptor_message();
|
||||
virtual void adaptor_do_MESSAGE(JStudio::data::TEOperationData, const void*, u32);
|
||||
};
|
||||
|
||||
class jstudio_tCreateObject_message : public JStudio::TCreateObject {
|
||||
public:
|
||||
jstudio_tCreateObject_message() {}
|
||||
|
||||
virtual ~jstudio_tCreateObject_message();
|
||||
virtual bool create(JStudio::TObject**, const JStudio::stb::data::TParse_TBlock_object&);
|
||||
};
|
||||
|
||||
jstudio_tAdaptor_message::~jstudio_tAdaptor_message() {}
|
||||
|
||||
void jstudio_tAdaptor_message::adaptor_do_MESSAGE(JStudio::data::TEOperationData iType,
|
||||
@@ -168,7 +186,7 @@ JStudio_JAudio2::TCreateObject* dDemo_c::m_audio;
|
||||
|
||||
dDemo_particle_c* dDemo_c::m_particle;
|
||||
|
||||
jstudio_tCreateObject_message* dDemo_c::m_message;
|
||||
JStudio::TCreateObject* dDemo_c::m_message;
|
||||
|
||||
JStudio::TFactory* dDemo_c::m_factory;
|
||||
|
||||
|
||||
@@ -1820,7 +1820,7 @@ int dDlst_list_c::set(dDlst_base_c**& p_start, dDlst_base_c**& p_end, dDlst_base
|
||||
return 0;
|
||||
}
|
||||
*p_start = p_newDlst;
|
||||
*p_start++;
|
||||
UNUSED(*p_start++);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -2160,7 +2160,7 @@ bool dCamera_c::gameOverEvCamera() {
|
||||
mViewCache.mEye = sp230;
|
||||
gover_p->field_0x0++;
|
||||
mViewCache.mFovy = 75.0f;
|
||||
bVar9 = 75.0f;
|
||||
bVar9 = true;
|
||||
}
|
||||
// fallthrough intentional.
|
||||
case 4: {
|
||||
|
||||
+12
-12
@@ -10483,7 +10483,7 @@ BOOL dKy_camera_water_in_status_check() {
|
||||
|
||||
u8 dKy_pol_efftype_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10513,7 +10513,7 @@ u8 dKy_pol_efftype_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
|
||||
u8 dKy_pol_efftype2_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10543,7 +10543,7 @@ u8 dKy_pol_efftype2_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
|
||||
u8 dKy_pol_sound_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10574,7 +10574,7 @@ u8 dKy_pol_sound_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
|
||||
u8 dKy_pol_argument_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -10599,7 +10599,7 @@ u8 dKy_pol_argument_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
u8 dKy_pol_eff_prim_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
u8 eff_id = 0;
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10636,7 +10636,7 @@ u8 dKy_pol_eff_prim_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
u8 dKy_pol_eff_env_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
u8 eff_id = 0;
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10673,7 +10673,7 @@ u8 dKy_pol_eff_env_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
u8 dKy_pol_eff2_prim_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
u8 eff_id = 0;
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10710,7 +10710,7 @@ u8 dKy_pol_eff2_prim_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p)
|
||||
u8 dKy_pol_eff2_env_get(const cBgS_PolyInfo* polyinfo_p, GXColor* out_color_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
u8 eff_id = 0;
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || out_color_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10748,7 +10748,7 @@ u8 dKy_pol_eff_alpha_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
int z0;
|
||||
u8 eff_id = 0;
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10785,7 +10785,7 @@ f32 dKy_pol_eff_ratio_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
u8 eff_id;
|
||||
f32 ratio = 0.0f;
|
||||
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -10822,7 +10822,7 @@ u8 dKy_pol_eff2_alpha_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
int z0;
|
||||
u8 retval = 0;
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -10858,7 +10858,7 @@ f32 dKy_pol_eff2_ratio_get(const cBgS_PolyInfo* polyinfo_p) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
f32 ratio = 0.0f;
|
||||
|
||||
if (polyinfo_p == NULL || &dComIfG_Bgsp() == NULL) {
|
||||
if (polyinfo_p == NULL || IS_REF_NULL(dComIfG_Bgsp())) {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ u8 STControl::checkTrigger() {
|
||||
f32 stickValue = getValueStick();
|
||||
s16 stickAngle = getAngleStick();
|
||||
u8 var_r6 = 0;
|
||||
s16 temp_r7 = 0x2000 - field_0x26 >> 1;
|
||||
s16 temp_r7 = (0x2000 - field_0x26) >> 1;
|
||||
|
||||
if (!cM3d_IsZero(stickValue)) {
|
||||
if (stickAngle < field_0x22 - 0x7000 + temp_r7) {
|
||||
|
||||
@@ -199,10 +199,10 @@ void dMapInfo_n::getRoomMinMaxXZ(int i_roomNo, f32* i_roomLeftX, f32* i_roomInne
|
||||
|
||||
void dMapInfo_n::getFloorParameter(f32 param_0, s8* i_floorNo, f32* param_2, f32* param_3,
|
||||
f32* param_4, f32* param_5) {
|
||||
f32 gap_level = dStage_stagInfo_GetGapLevel(dComIfGp_getStageStagInfo());
|
||||
f32 range_up = fabsf(dStage_stagInfo_GetRangeUp(dComIfGp_getStageStagInfo()));
|
||||
f32 range_down = fabsf(dStage_stagInfo_GetRangeDown(dComIfGp_getStageStagInfo()));
|
||||
s8 floorNo = (f32)floor(param_0 / gap_level);
|
||||
f32 gap_level = (f32)dStage_stagInfo_GetGapLevel(dComIfGp_getStageStagInfo());
|
||||
f32 range_up = fabsf((f32)dStage_stagInfo_GetRangeUp(dComIfGp_getStageStagInfo()));
|
||||
f32 range_down = fabsf((f32)dStage_stagInfo_GetRangeDown(dComIfGp_getStageStagInfo()));
|
||||
s8 floorNo = (s8)(f32)floor(param_0 / gap_level);
|
||||
|
||||
if (i_floorNo != NULL) {
|
||||
*i_floorNo = floorNo;
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
#include "d/d_lib.h"
|
||||
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#define LINE_MAX 9
|
||||
#define D_MENU_LETTER_LINE_MAX 9
|
||||
#else
|
||||
#define LINE_MAX 12
|
||||
#define D_MENU_LETTER_LINE_MAX 12
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_Letter_c::*initFunc)();
|
||||
@@ -258,8 +258,8 @@ void dMenu_Letter_c::_draw() {
|
||||
uVar10 = (J2DTextBox*)field_0x2f4[i]->getPanePtr();
|
||||
}
|
||||
J2DTextBox* uVar18 = (J2DTextBox*)field_0x2ec[i]->getPanePtr();
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(dVar1), field_0x3e3 - 1, LINE_MAX,
|
||||
uVar18, uVar10, NULL, NULL, 0);
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(dVar1), field_0x3e3 - 1,
|
||||
D_MENU_LETTER_LINE_MAX, uVar18, uVar10, NULL, NULL, 0);
|
||||
}
|
||||
mpString->drawOutFont((J2DTextBox*)field_0x2ec[1]->getPanePtr(), -1.0f);
|
||||
if (mProcess == 4) {
|
||||
@@ -491,10 +491,10 @@ void dMenu_Letter_c::read_open_init() {
|
||||
text1 = (J2DTextBox*)field_0x2f4[i]->getPanePtr();
|
||||
}
|
||||
J2DTextBox* text2 = (J2DTextBox*)field_0x2ec[i]->getPanePtr();
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1,
|
||||
0, NULL, NULL);
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1,
|
||||
D_MENU_LETTER_LINE_MAX, text2, text1, NULL, NULL, 0);
|
||||
}
|
||||
field_0x3e2 = mpString->getPageMax(LINE_MAX);
|
||||
field_0x3e2 = mpString->getPageMax(D_MENU_LETTER_LINE_MAX);
|
||||
if (field_0x3e2 > 1) {
|
||||
char acStack_30[20];
|
||||
sprintf(acStack_30, "%d/%d", field_0x3e3, field_0x3e2);
|
||||
@@ -642,7 +642,8 @@ void dMenu_Letter_c::read_next_fadein_init() {
|
||||
text1 = (J2DTextBox*)field_0x2f4[i]->getPanePtr();
|
||||
}
|
||||
J2DTextBox* text2 = (J2DTextBox*)field_0x2ec[i]->getPanePtr();
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1, 0, NULL, NULL);
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1,
|
||||
D_MENU_LETTER_LINE_MAX, text2, text1, NULL, NULL, 0);
|
||||
}
|
||||
char acStack_30[10];
|
||||
sprintf(acStack_30, "%d/%d", field_0x3e3, field_0x3e2);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user