mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-12 05:28:43 -04:00
Merge pull request #32 from TakaRikka/warning-fixes
Warning fixes & decompiled ASM blocks
This commit is contained in:
+8
-6
@@ -15,8 +15,13 @@ add_subdirectory(extern/aurora EXCLUDE_FROM_ALL)
|
||||
option(DUSK_BUILD_WARNINGS "If off, compiler warnings will be suppressed")
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-register")
|
||||
# -Wno-multichar: Multi-character constants ('ABCD') are implementation-defined but all compilers
|
||||
# (CW, GCC, Clang, MSVC) encode them identically in big-endian order.
|
||||
# For >4-char literals (which GCC/Clang truncate to int), use the MULTI_CHAR() macro.
|
||||
# -Wwrite-strings: Game code relies on implicit const char* -> char* conversions
|
||||
# -Wdeprecated-declarations: JSystem uses std::iterator, deprecated in C++17
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar -Wno-write-strings")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-multichar -Wno-write-strings -Wno-trigraphs -Wno-deprecated-declarations")
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN")
|
||||
set(CMAKE_BUILD_RPATH "$ORIGIN")
|
||||
elseif (APPLE)
|
||||
@@ -38,10 +43,7 @@ elseif (MSVC)
|
||||
endif ()
|
||||
add_compile_options(/utf-8)
|
||||
endif ()
|
||||
if (NOT MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error -Wno-c++11-narrowing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -Wno-c++11-narrowing")
|
||||
endif ()
|
||||
|
||||
|
||||
include(files.cmake)
|
||||
|
||||
|
||||
@@ -1326,7 +1326,6 @@ set(DUSK_FILES
|
||||
src/dusk/extras.c
|
||||
src/dusk/extras.cpp
|
||||
src/dusk/globals.cpp
|
||||
src/dusk/J3DTransforms_C.cpp
|
||||
#src/dusk/m_Do_ext_dusk.cpp
|
||||
src/dusk/dvd_emu.cpp
|
||||
src/dolphin/os/OSContext.cpp
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DAnimation.h"
|
||||
#include "JSystem/JUtility/JUTPalette.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
typedef struct _GXColorS10 GXColorS10;
|
||||
class J2DScreen;
|
||||
class JUTPalette;
|
||||
struct ResTIMG;
|
||||
|
||||
enum J2DAnmKind {
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
J2DAnmVtxColor() {
|
||||
mKind = KIND_VTX_COLOR;
|
||||
for (int i = 0; i < ARRAY_SIZE(mAnmTableNum); i++) {
|
||||
mAnmTableNum[i] = NULL;
|
||||
mAnmTableNum[i] = 0;
|
||||
}
|
||||
for (int i = 0; i < ARRAY_SIZE(mVtxColorIndexData); i++) {
|
||||
mVtxColorIndexData[i] = NULL;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "JSystem/J3DGraphAnimator/J3DCluster.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DMtxBuffer.h"
|
||||
#include <dolphin/types.h>
|
||||
#include <cstring>
|
||||
|
||||
class J3DModel;
|
||||
class J3DAnmCluster;
|
||||
@@ -115,6 +116,8 @@ inline void J3DFillZero32B(__REGISTER void* param_0, __REGISTER u32 param_1) {
|
||||
addi param_0, param_0, 0x20
|
||||
bdnz lbl_8032D948
|
||||
}
|
||||
#else
|
||||
memset(param_0, 0, param_1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ struct J3DTextureSRTInfo {
|
||||
/* 0x10 */ f32 mTranslationY;
|
||||
|
||||
bool operator==(J3DTextureSRTInfo&) const;
|
||||
inline void operator=(J3DTextureSRTInfo const& other) {
|
||||
#ifdef __MWERKS__
|
||||
inline void operator=(J3DTextureSRTInfo const& other) {
|
||||
__REGISTER const f32* src = &other.mScaleX;
|
||||
__REGISTER f32* dst = &mScaleX;
|
||||
__REGISTER f32 xy;
|
||||
@@ -58,8 +58,8 @@ struct J3DTextureSRTInfo {
|
||||
psq_l xy, 0(src), 0, 0
|
||||
psq_st xy, 0(dst), 0, 0
|
||||
};
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}; // Size: 0x14
|
||||
|
||||
enum J3DTexMtxMode {
|
||||
|
||||
@@ -85,6 +85,12 @@ inline void J3DPSMtx33Copy(__REGISTER Mtx3P src, __REGISTER Mtx3P dst) {
|
||||
psq_st fr1, 0x18(dst), 0, 0
|
||||
stfs fr0, 0x20(dst)
|
||||
}
|
||||
#else
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
dst[i][j] = src[i][j];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -110,6 +116,12 @@ inline void J3DPSMtx33CopyFrom34(__REGISTER MtxP src, __REGISTER Mtx3P dst) {
|
||||
psq_st x_y3, 24(dst), 0, 0
|
||||
stfs z3, 0x20(dst)
|
||||
}
|
||||
#else
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
dst[i][j] = src[i][j];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -137,6 +149,12 @@ inline void J3DPSMulMtxVec(__REGISTER MtxP mtx, __REGISTER Vec* vec, __REGISTER
|
||||
ps_sum0 f6, f5, f6, f5
|
||||
psq_st f6, 8(dst), 1, 0
|
||||
}
|
||||
#else
|
||||
Vec tmp;
|
||||
tmp.x = mtx[0][0] * vec->x + mtx[0][1] * vec->y + mtx[0][2] * vec->z + mtx[0][3];
|
||||
tmp.y = mtx[1][0] * vec->x + mtx[1][1] * vec->y + mtx[1][2] * vec->z + mtx[1][3];
|
||||
tmp.z = mtx[2][0] * vec->x + mtx[2][1] * vec->y + mtx[2][2] * vec->z + mtx[2][3];
|
||||
*dst = tmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -164,6 +182,12 @@ inline void J3DPSMulMtxVec(__REGISTER MtxP mtx, __REGISTER S16Vec* vec, __REGIST
|
||||
ps_sum0 f6, f5, f6, f5
|
||||
psq_st f6, 4(dst), 1, 7
|
||||
}
|
||||
#else
|
||||
S16Vec tmp;
|
||||
tmp.x = (s16)(mtx[0][0] * vec->x + mtx[0][1] * vec->y + mtx[0][2] * vec->z + mtx[0][3]);
|
||||
tmp.y = (s16)(mtx[1][0] * vec->x + mtx[1][1] * vec->y + mtx[1][2] * vec->z + mtx[1][3]);
|
||||
tmp.z = (s16)(mtx[2][0] * vec->x + mtx[2][1] * vec->y + mtx[2][2] * vec->z + mtx[2][3]);
|
||||
*dst = tmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -195,6 +219,12 @@ inline void J3DPSMulMtxVec(__REGISTER Mtx3P mtx, __REGISTER Vec* vec, __REGISTER
|
||||
ps_sum0 f6, f5, f6, f5
|
||||
psq_st f6, 8(dst), 1, 0
|
||||
}
|
||||
#else
|
||||
Vec tmp;
|
||||
tmp.x = mtx[0][0] * vec->x + mtx[0][1] * vec->y + mtx[0][2] * vec->z;
|
||||
tmp.y = mtx[1][0] * vec->x + mtx[1][1] * vec->y + mtx[1][2] * vec->z;
|
||||
tmp.z = mtx[2][0] * vec->x + mtx[2][1] * vec->y + mtx[2][2] * vec->z;
|
||||
*dst = tmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -226,6 +256,12 @@ inline void J3DPSMulMtxVec(__REGISTER Mtx3P mtx, __REGISTER S16Vec* vec, __REGIS
|
||||
ps_sum0 f6, f5, f6, f5
|
||||
psq_st f6, 4(dst), 1, 7
|
||||
}
|
||||
#else
|
||||
S16Vec tmp;
|
||||
tmp.x = (s16)(mtx[0][0] * vec->x + mtx[0][1] * vec->y + mtx[0][2] * vec->z);
|
||||
tmp.y = (s16)(mtx[1][0] * vec->x + mtx[1][1] * vec->y + mtx[1][2] * vec->z);
|
||||
tmp.z = (s16)(mtx[2][0] * vec->x + mtx[2][1] * vec->y + mtx[2][2] * vec->z);
|
||||
*dst = tmp;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ struct JASNonCopyable {
|
||||
JASNonCopyable() {}
|
||||
~JASNonCopyable() {}
|
||||
|
||||
/* 0x0 */ int field_0x0;
|
||||
/* 0x0 */ void* field_0x0;
|
||||
}; // Size: 0x4
|
||||
|
||||
/**
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
mParams.init();
|
||||
mMaxActiveSe = 0;
|
||||
mMaxInactiveSe = 0;
|
||||
field_0x0 = 0;
|
||||
field_0x0 = NULL;
|
||||
}
|
||||
|
||||
virtual bool isUsingSeqData(const JAISeqDataRegion& seqDataRegion);
|
||||
|
||||
@@ -151,6 +151,10 @@ inline void setTVec3f(const __REGISTER f32* vec_a, __REGISTER f32* vec_b) {
|
||||
psq_st a_x, 0(vec_b), 0, 0
|
||||
stfs b_x, 8(vec_b)
|
||||
};
|
||||
#else
|
||||
vec_b[0] = vec_a[0];
|
||||
vec_b[1] = vec_a[1];
|
||||
vec_b[2] = vec_a[2];
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -163,6 +167,8 @@ inline float fsqrt_step(float mag) {
|
||||
#ifdef __MWERKS__
|
||||
f32 root = __frsqrte(mag);
|
||||
return 0.5f * root * (3.0f - mag * (root * root));
|
||||
#else
|
||||
return 1.0f / sqrtf(mag);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -182,6 +188,10 @@ inline void mulInternal(__REGISTER const f32* a, __REGISTER const f32* b, __REGI
|
||||
psq_st x_y, 0(dst), 0, 0
|
||||
};
|
||||
dst[2] = a[2] * b[2];
|
||||
#else
|
||||
dst[0] = a[0] * b[0];
|
||||
dst[1] = a[1] * b[1];
|
||||
dst[2] = a[2] * b[2];
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -359,6 +369,10 @@ struct TVec3<f32> : public Vec {
|
||||
fneg z, z
|
||||
stfs z, 8(rdst)
|
||||
};
|
||||
#else
|
||||
dst->x = -x;
|
||||
dst->y = -y;
|
||||
dst->z = -z;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -2,17 +2,14 @@
|
||||
#define JHICOMMONMEM_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include "dusk/endian.h"
|
||||
|
||||
inline u32 JHIhtonl(u32 v) {
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
return v;
|
||||
#else
|
||||
// todo
|
||||
#endif
|
||||
return BSWAP32(v);
|
||||
}
|
||||
|
||||
inline u32 JHIntohl(u32 v) {
|
||||
return v;
|
||||
return BSWAP32(v);
|
||||
}
|
||||
|
||||
template<typename T> class JHIComPortManager;
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
*/
|
||||
DEFINE_GEN_SLIDER(u8, 0x100 | jhostio::EKind_8B)
|
||||
DEFINE_GEN_SLIDER(s16, jhostio::EKind_16B)
|
||||
DEFINE_GEN_SLIDER(f32, JORPropertyEvent::EKind_FloatValue | jhostio::EKind_32B)
|
||||
DEFINE_GEN_SLIDER(f32, (u32)JORPropertyEvent::EKind_FloatValue | (u32)jhostio::EKind_32B)
|
||||
DEFINE_GEN_SLIDER(s32, jhostio::EKind_32B)
|
||||
|
||||
DEFINE_GEN_SLIDER_ID(f64, JORPropertyEvent::EKind_ValueID | JORPropertyEvent::EKind_FloatValue)
|
||||
|
||||
@@ -210,16 +210,22 @@ public:
|
||||
static JKRErrorHandler mErrorHandler;
|
||||
};
|
||||
|
||||
#ifndef TARGET_PC
|
||||
void* operator new(size_t size);
|
||||
#endif
|
||||
void* operator new(size_t size, int alignment);
|
||||
void* operator new(size_t size, JKRHeap* heap, int alignment);
|
||||
|
||||
#ifndef TARGET_PC
|
||||
void* operator new[](size_t size);
|
||||
#endif
|
||||
void* operator new[](size_t size, int alignment);
|
||||
void* operator new[](size_t size, JKRHeap* heap, int alignment);
|
||||
|
||||
#ifndef TARGET_PC
|
||||
void operator delete(void* ptr);
|
||||
void operator delete[](void* ptr);
|
||||
#endif
|
||||
|
||||
void JKRDefaultMemoryErrorRoutine(void* heap, u32 size, int alignment);
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ extern const char ga4cSignature[4];
|
||||
|
||||
const int PARAGRAPH_DATA = 1;
|
||||
|
||||
typedef enum TEComposite {
|
||||
enum TEComposite {
|
||||
/* 0x0 */ COMPOSITE_NONE,
|
||||
/* 0x1 */ COMPOSITE_RAW,
|
||||
/* 0x2 */ COMPOSITE_IDX,
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
const void* getSequence() const { return pSequence; }
|
||||
void setSequence_(const void* arg1) { pSequence = arg1; }
|
||||
const void* getSequence_offset(s32 i_no) const {
|
||||
int s32Val = (intptr_t)getSequence();
|
||||
intptr_t s32Val = (intptr_t)getSequence();
|
||||
return (const void*)(s32Val + i_no);
|
||||
}
|
||||
const void* getSequence_next() const { return pSequence_next; }
|
||||
|
||||
@@ -24,7 +24,7 @@ T* JSUConvertOffsetToPtr(const void* ptr, u32 offset) {
|
||||
T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
|
||||
#endif
|
||||
T* ret;
|
||||
if (offset == NULL) {
|
||||
if (offset == 0) {
|
||||
ret = NULL;
|
||||
} else {
|
||||
ret = (T*)((intptr_t)ptr + (intptr_t)offset);
|
||||
|
||||
@@ -60,13 +60,13 @@ JUTAssertion::showAssert_f(JUTAssertion::getSDevice(), __FILE__, __LINE__, MSG,
|
||||
OSPanic(__FILE__, __LINE__, "Halt");
|
||||
|
||||
#define JUT_WARN_DEVICE(LINE, DEVICE, ...) \
|
||||
JUTAssertion::setWarningMessage_f(DEVICE, __FILE__, __LINE__, __VA_ARGS__); \
|
||||
JUTAssertion::setWarningMessage_f(DEVICE, const_cast<char*>(__FILE__), __LINE__, __VA_ARGS__); \
|
||||
|
||||
#define JUT_LOG(LINE, ...) \
|
||||
JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, __LINE__, __VA_ARGS__)
|
||||
JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), const_cast<char*>(__FILE__), __LINE__, __VA_ARGS__)
|
||||
|
||||
#define JUT_SET_CONFIRM(LINE, COND) \
|
||||
JUTAssertion::setConfirmMessage(JUTAssertion::getSDevice(), __FILE__, __LINE__, COND, #COND)
|
||||
JUTAssertion::setConfirmMessage(JUTAssertion::getSDevice(), const_cast<char*>(__FILE__), __LINE__, COND, #COND)
|
||||
|
||||
#endif
|
||||
#define JUT_WARN(LINE, ...) \
|
||||
|
||||
+25
-25
@@ -573,7 +573,7 @@ public:
|
||||
virtual roomRead_class* getRoom(void) const {
|
||||
OSReport("Room non room data !!\n");
|
||||
JUT_ASSERT(2100, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setMapInfo(stage_map_info_class* i_MapInfo) { mMapInfo = i_MapInfo; }
|
||||
virtual stage_map_info_class* getMapInfo(void) const { return mMapInfo; }
|
||||
@@ -589,7 +589,7 @@ public:
|
||||
virtual stage_palette_info_class* getPaletteInfo(void) const {
|
||||
OSReport("Room non palet data !!\n");
|
||||
JUT_ASSERT(2130, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setPselectInfo(stage_pselect_info_class* i_PselectInfo) {
|
||||
UNUSED(i_PselectInfo);
|
||||
@@ -600,7 +600,7 @@ public:
|
||||
virtual stage_pselect_info_class* getPselectInfo(void) const {
|
||||
OSReport("Room non pselect data !!\n");
|
||||
JUT_ASSERT(2141, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setEnvrInfo(stage_envr_info_class* i_EnvrInfo) {
|
||||
UNUSED(i_EnvrInfo);
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
virtual stage_envr_info_class* getEnvrInfo(void) const {
|
||||
OSReport("Room non envr data !!\n");
|
||||
JUT_ASSERT(2152, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setVrboxInfo(stage_vrbox_info_class* i_VrboxInfo) { mVrboxInfo = i_VrboxInfo; }
|
||||
virtual stage_vrbox_info_class* getVrboxInfo(void) const { return mVrboxInfo; }
|
||||
@@ -626,7 +626,7 @@ public:
|
||||
virtual stage_plight_info_class* getPlightInfo(void) const {
|
||||
OSReport("Room non plight data !!\n");
|
||||
JUT_ASSERT(2178, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setPaletteNumInfo(int i_PaletteNumInfo) {
|
||||
UNUSED(i_PaletteNumInfo);
|
||||
@@ -637,7 +637,7 @@ public:
|
||||
virtual int getPaletteNumInfo(void) const {
|
||||
OSReport("Room non palette num data !!\n");
|
||||
JUT_ASSERT(2190, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setPselectNumInfo(int i_PselectNumInfo) {
|
||||
UNUSED(i_PselectNumInfo);
|
||||
@@ -648,7 +648,7 @@ public:
|
||||
virtual int getPselectNumInfo(void) const {
|
||||
OSReport("Room non pselect num data !!\n");
|
||||
JUT_ASSERT(2201, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setEnvrNumInfo(int i_EnvrNumInfo) {
|
||||
UNUSED(i_EnvrNumInfo);
|
||||
@@ -659,7 +659,7 @@ public:
|
||||
virtual int getEnvrNumInfo(void) const {
|
||||
OSReport("Room non envr num data !!\n");
|
||||
JUT_ASSERT(2212, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setVrboxNumInfo(int i_VrboxNumInfo) { mVrboxNumInfo = i_VrboxNumInfo; }
|
||||
virtual int getVrboxNumInfo(void) const { return mVrboxNumInfo; }
|
||||
@@ -674,7 +674,7 @@ public:
|
||||
virtual int getPlightNumInfo(void) const {
|
||||
OSReport("Room non plight num data !!\n");
|
||||
JUT_ASSERT(2227, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setLightVecInfo(stage_pure_lightvec_info_class* i_LightVecInfo) { mLightVecInfo = i_LightVecInfo; }
|
||||
virtual stage_pure_lightvec_info_class* getLightVecInfo(void) const { return mLightVecInfo; }
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
virtual stage_stag_info_class* getStagInfo(void) const {
|
||||
OSReport("Room non stag data !!\n");
|
||||
JUT_ASSERT(2260, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setSclsInfo(stage_scls_info_dummy_class* i_SclsInfo) { mSclsInfo = i_SclsInfo; }
|
||||
virtual stage_scls_info_dummy_class* getSclsInfo(void) const { return mSclsInfo; }
|
||||
@@ -702,7 +702,7 @@ public:
|
||||
virtual dStage_dPnt_c* getPntInf(void) const {
|
||||
OSReport("Room non Pnts data !\n");
|
||||
JUT_ASSERT(2285, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setPathInfo(dStage_dPath_c* i_PathInfo) {
|
||||
UNUSED(i_PathInfo);
|
||||
@@ -713,7 +713,7 @@ public:
|
||||
virtual dStage_dPath_c* getPathInf(void) const {
|
||||
OSReport("Room non Path data !\n");
|
||||
JUT_ASSERT(2296, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setPnt2Info(dStage_dPnt_c* i_Pnt2Info) { mPnt2Info = i_Pnt2Info; }
|
||||
virtual dStage_dPnt_c* getPnt2Inf(void) const { return mPnt2Info; }
|
||||
@@ -739,7 +739,7 @@ public:
|
||||
virtual dStage_MemoryConfig_c* getMemoryConfig(void) const {
|
||||
OSReport("Room non memory config data!\n");
|
||||
JUT_ASSERT(2423, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setMemoryMap(dStage_MemoryMap_c* i_MemoryMap) {
|
||||
UNUSED(i_MemoryMap);
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
virtual dStage_MemoryMap_c* getMemoryMap(void) const {
|
||||
OSReport("Room non memory map data!\n");
|
||||
JUT_ASSERT(2442, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setMulti(dStage_Multi_c* i_Multi) {
|
||||
UNUSED(i_Multi);
|
||||
@@ -759,7 +759,7 @@ public:
|
||||
virtual dStage_Multi_c* getMulti(void) const {
|
||||
OSReport("Room non multi data!\n");
|
||||
JUT_ASSERT(2457, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setOldMulti(void) {
|
||||
OSReport("Room non old multi data!\n");
|
||||
@@ -772,7 +772,7 @@ public:
|
||||
virtual dStage_Multi_c* getOldMulti(void) const {
|
||||
OSReport("Room non old multi data!\n");
|
||||
JUT_ASSERT(2472, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setLbnk(dStage_Lbnk_c* i_Lbnk) { mLbnk = i_Lbnk; }
|
||||
virtual dStage_Lbnk_c* getLbnk(void) const { return mLbnk; }
|
||||
@@ -786,7 +786,7 @@ public:
|
||||
virtual dStage_DMap_c* getDMap(void) const {
|
||||
OS_REPORT("Room non DMap data\n");
|
||||
JUT_ASSERT(2513, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setDrTg(stage_tgsc_class* i_DrTg) { mDrTg = i_DrTg; }
|
||||
virtual stage_tgsc_class* getDrTg(void) const { return mDrTg; }
|
||||
@@ -804,7 +804,7 @@ public:
|
||||
virtual void* getMapPath(void) {
|
||||
OSReport("stage non 2d map path data !!\n");
|
||||
JUT_ASSERT(2561, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
virtual void setElst(dStage_Elst_c* i_Elst) {
|
||||
UNUSED(i_Elst);
|
||||
@@ -815,7 +815,7 @@ public:
|
||||
virtual dStage_Elst_c* getElst(void) {
|
||||
dStage_SetErrorRoom();
|
||||
OSReport("Room no Elst Data!!\n");
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -901,7 +901,7 @@ public:
|
||||
/* vt[43] */ virtual stage_pure_lightvec_info_class* getLightVecInfo(void) const {
|
||||
OSReport("stage non LightVec data !!\n");
|
||||
JUT_ASSERT(3007, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/* vt[44] */ virtual void setLightVecInfoNum(int i_LightVecInfoNum) {
|
||||
UNUSED(i_LightVecInfoNum);
|
||||
@@ -912,7 +912,7 @@ public:
|
||||
/* vt[45] */ virtual int getLightVecInfoNum(void) const {
|
||||
OSReport("stage non LightVecNum data !!\n");
|
||||
JUT_ASSERT(3018, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/* vt[40] */ virtual void setPlightNumInfo(int i_PlightNumInfo) { mPlightNumInfo = i_PlightNumInfo; }
|
||||
/* vt[41] */ virtual int getPlightNumInfo(void) const { return mPlightNumInfo; }
|
||||
@@ -943,7 +943,7 @@ public:
|
||||
/* vt[65] */ virtual dStage_FileList2_dt_c* getFileList2Info(void) const {
|
||||
OSReport("stage non filelist2 data!\n");
|
||||
JUT_ASSERT(3127, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/* vt[66] */ virtual void setFileListInfo(dStage_FileList_dt_c* list) {
|
||||
UNUSED(list);
|
||||
@@ -954,7 +954,7 @@ public:
|
||||
/* vt[67] */ virtual dStage_FileList_dt_c* getFileListInfo(void) const {
|
||||
OSReport("stage non filelist data!\n");
|
||||
JUT_ASSERT(3142, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/* vt[68] */ virtual void setFloorInfo(dStage_FloorInfo_c* i_FloorInfo) { mFloorInfo = i_FloorInfo; }
|
||||
/* vt[69] */ virtual dStage_FloorInfo_c* getFloorInfo(void) const { return mFloorInfo; }
|
||||
@@ -976,7 +976,7 @@ public:
|
||||
/* vt[80] */ virtual dStage_Lbnk_c* getLbnk(void) const {
|
||||
OSReport("stage non Lbnk data!\n");
|
||||
JUT_ASSERT(3238, FALSE);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/* vt[81] */ virtual void setTresure(stage_tresure_class* i_Tresure) { mTresure = i_Tresure; }
|
||||
/* vt[82] */ virtual stage_tresure_class* getTresure(void) const { return mTresure; }
|
||||
@@ -995,7 +995,7 @@ public:
|
||||
virtual void* getUnit() {
|
||||
OSReport("stage non unit list data !!\n");
|
||||
JUT_ASSERT(3325, 0);
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
/* vt[89] */ virtual void setMapPath(void* i_MapPath) { return; }
|
||||
|
||||
@@ -87,8 +87,12 @@ typedef unsigned int uint;
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus >= 201103L
|
||||
#define NULL nullptr
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846f
|
||||
#endif
|
||||
#define M_SQRT3 1.73205f
|
||||
|
||||
#define DEG_TO_RAD(degrees) (degrees * (M_PI / 180.0f))
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
BOOL chkCondition(u16 condition) { return (mCondition & condition) == condition; }
|
||||
|
||||
void suspendProc(void* actor) {
|
||||
if (field_0x10 != NULL) {
|
||||
if (field_0x10 != 0) {
|
||||
field_0x14(actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -423,7 +423,14 @@ inline BOOL fopAcM_CULLSIZE_IS_BOX(int i_culltype) {
|
||||
i_culltype == fopAc_CULLBOX_CUSTOM_e;
|
||||
}
|
||||
|
||||
inline const cXyz& fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
|
||||
inline
|
||||
#ifdef __MWERKS__
|
||||
// In the original code, this constructs a temporary and returns a reference to it
|
||||
const cXyz&
|
||||
#else
|
||||
const Vec&
|
||||
#endif
|
||||
fopAcM_getCullSizeSphereCenter(const fopAc_ac_c* i_actor) {
|
||||
return i_actor->cull.sphere.center;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -169,22 +169,22 @@ static const float INF = 2000000000.0f;
|
||||
#define UNSET_FLAG(var, flag, type) (var) &= ~(flag)
|
||||
#endif
|
||||
|
||||
#ifdef TARGET_PC
|
||||
// Macro for multi-character literals that exceed 4 bytes (e.g. 'ari_os').
|
||||
// CW encodes all characters in big-endian order into the full integer, but GCC/Clang
|
||||
// truncate multi-char constants to int (4 bytes). This macro produces matching u64
|
||||
// values on all compilers. For <=4-char literals, raw constants like 'ABCD' are fine.
|
||||
#ifdef __MWERKS__
|
||||
#define MULTI_CHAR(x) (x)
|
||||
#else
|
||||
template <int N>
|
||||
inline constexpr auto MultiCharLiteral(const char (&buf)[N]) {
|
||||
// static_assert(buf[0] == '\'' && buf[N - 2] == '\''); // can't constexpr strings, just pray
|
||||
constexpr int len = N - 1;
|
||||
static_assert(len >= 2 && len <= 10);
|
||||
|
||||
inline constexpr unsigned long long MultiCharLiteral(const char (&buf)[N]) {
|
||||
static_assert(N - 1 >= 3 && N - 1 <= 10, "MULTI_CHAR literal must be 1-8 characters");
|
||||
unsigned long long out = 0;
|
||||
for (int i = 1; i < len - 1; i++) {
|
||||
out = (out << 8) | ((unsigned long long)buf[i]);
|
||||
for (int i = 1; i < N - 2; i++) {
|
||||
out = (out << 8) | static_cast<unsigned char>(buf[i]);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
#define MULTI_CHAR(x) MultiCharLiteral(#x)
|
||||
#else
|
||||
#define MULTI_CHAR(x) MultiCharLiteral(#x)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -71,8 +71,12 @@ typedef unsigned int uint;
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus >= 201103L
|
||||
#define NULL nullptr
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#else
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@ bool DynamicModuleControl::do_load() {
|
||||
if (mModule == NULL) {
|
||||
snprintf(buffer, 64, "/rel/Final/Release/%s.rel", mName);
|
||||
mModule = (OSModuleHeader*)JKRDvdToMainRam(
|
||||
buffer, NULL, EXPAND_SWITCH_UNKNOWN1, NULL, heap,
|
||||
buffer, NULL, EXPAND_SWITCH_UNKNOWN1, 0, heap,
|
||||
JKRDvdRipper::ALLOC_DIRECTION_FORWARD, 0, NULL, NULL);
|
||||
if (mModule != NULL) {
|
||||
mSize = 0;
|
||||
|
||||
@@ -248,7 +248,7 @@ u16 J2DMaterialFactory::newTexNo(int param_0, int param_1) const {
|
||||
if (iVar2->field_0x38[param_1] != 0xffff) {
|
||||
return field_0x28[iVar2->field_0x38[param_1]];
|
||||
}
|
||||
return 0x1FFFF;
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
u16 J2DMaterialFactory::newFontNo(int param_0) const {
|
||||
@@ -256,7 +256,7 @@ u16 J2DMaterialFactory::newFontNo(int param_0) const {
|
||||
if (iVar2->field_0x48 != 0xffff) {
|
||||
return field_0x2c[iVar2->field_0x48];
|
||||
}
|
||||
return 0x1FFFF;
|
||||
return 0xFFFF;
|
||||
}
|
||||
|
||||
J2DTevOrder J2DMaterialFactory::newTevOrder(int param_0, int param_1) const {
|
||||
|
||||
@@ -917,7 +917,7 @@ JUTTexture* J2DPictureEx::getTexture(u8 param_0) const {
|
||||
|
||||
u8 J2DPictureEx::getTextureCount() const {
|
||||
if (mMaterial == NULL) {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return mMaterial->getTexGenBlock()->getTexGenNum();
|
||||
|
||||
@@ -227,7 +227,7 @@ void J3DShape::makeVtxArrayCmd() {
|
||||
if (array[i] != 0)
|
||||
GDSetArray((GXAttr)(i + GX_VA_POS), array[i], stride[i]);
|
||||
else
|
||||
GDSetArrayRaw((GXAttr)(i + GX_VA_POS), NULL, stride[i]);
|
||||
GDSetArrayRaw((GXAttr)(i + GX_VA_POS), 0, stride[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,12 @@ void J3DTexMtxInfo::setEffectMtx(Mtx param_0) {
|
||||
};
|
||||
mEffectMtx[3][2] = 0.0f;
|
||||
mEffectMtx[3][3] = 1.0f;
|
||||
#else
|
||||
JMath::gekko_ps_copy12(&mEffectMtx, param_0);
|
||||
mEffectMtx[3][0] = 0.0f;
|
||||
mEffectMtx[3][1] = 0.0f;
|
||||
mEffectMtx[3][2] = 0.0f;
|
||||
mEffectMtx[3][3] = 1.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,14 @@ lbl_8005F118:
|
||||
li r3, 1
|
||||
psq_st f8, 32(r4), 1, 0
|
||||
blr
|
||||
#else
|
||||
Mtx invX;
|
||||
|
||||
if (C_MTXInvXpose(src, invX) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
J3DPSMtx33CopyFrom34(invX, dst);
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -327,6 +335,22 @@ ASM void J3DScaleNrmMtx(__REGISTER Mtx mtx, const __REGISTER Vec& scl) {
|
||||
fmuls f4, fp1, fp3
|
||||
stfs f4, 40(mtx)
|
||||
blr
|
||||
#else
|
||||
f32 sx = scl.x;
|
||||
f32 sy = scl.y;
|
||||
f32 sz = scl.z;
|
||||
|
||||
mtx[0][0] *= sx;
|
||||
mtx[0][1] *= sy;
|
||||
mtx[0][2] *= sz;
|
||||
|
||||
mtx[1][0] *= sx;
|
||||
mtx[1][1] *= sy;
|
||||
mtx[1][2] *= sz;
|
||||
|
||||
mtx[2][0] *= sx;
|
||||
mtx[2][1] *= sy;
|
||||
mtx[2][2] *= sz;
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -353,6 +377,22 @@ ASM void J3DScaleNrmMtx33(__REGISTER Mtx33 mtx, const __REGISTER Vec& scale) {
|
||||
psq_st f4, 24(mtx), 0, 0
|
||||
stfs f5, 0x20(mtx)
|
||||
blr
|
||||
#else
|
||||
f32 sx = scale.x;
|
||||
f32 sy = scale.y;
|
||||
f32 sz = scale.z;
|
||||
|
||||
mtx[0][0] *= sx;
|
||||
mtx[0][1] *= sy;
|
||||
mtx[0][2] *= sz;
|
||||
|
||||
mtx[1][0] *= sx;
|
||||
mtx[1][1] *= sy;
|
||||
mtx[1][2] *= sz;
|
||||
|
||||
mtx[2][0] *= sx;
|
||||
mtx[2][1] *= sy;
|
||||
mtx[2][2] *= sz;
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -431,6 +471,22 @@ ASM void J3DMtxProjConcat(__REGISTER Mtx mtx1, __REGISTER Mtx mtx2, __REGISTER M
|
||||
ps_madd f0, f9, f13, f0
|
||||
psq_st f0, 40(dst), 0, 0
|
||||
blr
|
||||
#else
|
||||
Mtx tmp;
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
f32 a0 = mtx1[i][0];
|
||||
f32 a1 = mtx1[i][1];
|
||||
f32 a2 = mtx1[i][2];
|
||||
f32 a3 = mtx1[i][3];
|
||||
|
||||
tmp[i][0] = a0 * mtx2[0][0] + a1 * mtx2[1][0] + a2 * mtx2[2][0] + a3 * mtx2[3][0];
|
||||
tmp[i][1] = a0 * mtx2[0][1] + a1 * mtx2[1][1] + a2 * mtx2[2][1] + a3 * mtx2[3][1];
|
||||
tmp[i][2] = a0 * mtx2[0][2] + a1 * mtx2[1][2] + a2 * mtx2[2][2] + a3 * mtx2[3][2];
|
||||
tmp[i][3] = a0 * mtx2[0][3] + a1 * mtx2[1][3] + a2 * mtx2[2][3] + a3 * mtx2[3][3];
|
||||
}
|
||||
|
||||
JMath::gekko_ps_copy12(dst, tmp);
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -543,6 +599,15 @@ loop:
|
||||
#undef FP31
|
||||
#undef UNIT_R
|
||||
}
|
||||
#else
|
||||
void J3DPSMtxArrayConcat(Mtx mA, Mtx mB, Mtx mAB, u32 count) {
|
||||
Mtx* src = (Mtx*)mB;
|
||||
Mtx* dst = (Mtx*)mAB;
|
||||
|
||||
for (u32 i = 0; i < count; i++) {
|
||||
C_MTXConcat(mA, src[i], dst[i]);
|
||||
}
|
||||
}
|
||||
#endif // clang-format on
|
||||
|
||||
f32 const PSMulUnit01[] = {
|
||||
|
||||
@@ -42,7 +42,7 @@ JASWaveArc* JASSimpleWaveBank::getWaveArc(u32 no) {
|
||||
int JASSimpleWaveBank::TWaveHandle::getWavePtr() const {
|
||||
void* base = mHeap->getBase();
|
||||
if (base == NULL) {
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
return (intptr_t)base + mWaveInfo.field_0x08;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace {
|
||||
field_0x4 = stack_14.getNumFiles();
|
||||
field_0x8 = new s32[field_0x4];
|
||||
if (!field_0x8) {
|
||||
field_0x4 = NULL;
|
||||
field_0x4 = 0;
|
||||
return;
|
||||
}
|
||||
for (u32 i = 0; i < field_0x4; i++) {
|
||||
|
||||
@@ -69,7 +69,7 @@ JKRAram::JKRAram(u32 audio_buffer_size, u32 audio_graph_size, s32 priority)
|
||||
if (mAramMemorySize) {
|
||||
mAramMemoryPtr = ARAlloc(mAramMemorySize);
|
||||
} else {
|
||||
mAramMemoryPtr = NULL;
|
||||
mAramMemoryPtr = 0;
|
||||
}
|
||||
|
||||
OS_REPORT("ARAM audio area %08x: %08x\n", mAudioMemoryPtr, mAudioMemorySize);
|
||||
|
||||
@@ -208,7 +208,7 @@ void* JKRAramArchive::fetchResource(SDIFileEntry* pEntry, u32* pOutSize) {
|
||||
&outBuf);
|
||||
|
||||
*pOutSize = size;
|
||||
if (size == NULL) {
|
||||
if (size == 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ void* JKRAramArchive::fetchResource(void* buffer, u32 bufferSize, SDIFileEntry*
|
||||
} else {
|
||||
if (compression == COMPRESSION_YAZ0) {
|
||||
u32 expandSize = this->getExpandSize(pEntry);
|
||||
if (expandSize != NULL) {
|
||||
if (expandSize != 0) {
|
||||
size = expandSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ s32 JKRAramStream::writeToAram(JKRAramStreamCommand* command) {
|
||||
}
|
||||
}
|
||||
|
||||
OSSendMessage(&command->mMessageQueue, (OSMessage)writtenLength, OS_MESSAGE_NOBLOCK);
|
||||
OSSendMessage(&command->mMessageQueue, (OSMessage)(uintptr_t)writtenLength, OS_MESSAGE_NOBLOCK);
|
||||
return writtenLength;
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ u32 JKRFileCache::readResource(void* dst, u32 dstLength, u32, const char* path)
|
||||
if (findFile(finalPath, path)) {
|
||||
return readResource(dst, dstLength, filePath);
|
||||
}
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JKRFileCache::removeResourceAll(void) {
|
||||
|
||||
@@ -73,7 +73,7 @@ void JKRThread::setCommon_mesgQueue(JKRHeap* heap, int message_count) {
|
||||
sThreadList.append(&mThreadListLink);
|
||||
|
||||
mCurrentHeap = NULL;
|
||||
mCurrentHeapError = NULL;
|
||||
mCurrentHeapError = 0;
|
||||
}
|
||||
|
||||
void JKRThread::setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param_3) {
|
||||
|
||||
@@ -37,6 +37,8 @@ void JMAQuatLerp(__REGISTER const Quaternion* p, __REGISTER const Quaternion* q,
|
||||
|
||||
ps_sum0 dp, dp, dp, dp
|
||||
}
|
||||
#else
|
||||
dp = p->x * q->x + p->y * q->y + p->z * q->z + p->w * q->w;
|
||||
#endif // clang-format on
|
||||
f32 local_78 = dp;
|
||||
if (local_78 < 0.0) {
|
||||
@@ -68,6 +70,12 @@ void JMAFastVECNormalize(__REGISTER const Vec* src, __REGISTER Vec* dst) {
|
||||
fmuls vz, vz, length
|
||||
stfs vz, dst->z
|
||||
}
|
||||
#else
|
||||
f32 mag = src->x * src->x + src->y * src->y + src->z * src->z;
|
||||
length = 1.0f / sqrtf(mag);
|
||||
dst->x = src->x * length;
|
||||
dst->y = src->y * length;
|
||||
dst->z = src->z * length;
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -88,6 +96,10 @@ void JMAVECScaleAdd(__REGISTER const Vec* vec1, __REGISTER const Vec* vec2, __RE
|
||||
ps_madds0 rz, v1z, scale, v2z
|
||||
psq_st rz, 8(dst), 1, 0
|
||||
}
|
||||
#else
|
||||
dst->x = vec1->x * scale + vec2->x;
|
||||
dst->y = vec1->y * scale + vec2->y;
|
||||
dst->z = vec1->z * scale + vec2->z;
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -122,5 +134,18 @@ void JMAMTXApplyScale(__REGISTER const Mtx src, __REGISTER Mtx dst, __REGISTER f
|
||||
psq_st y, 24(dst), 0, 0
|
||||
psq_st z, 40(dst), 0, 0
|
||||
}
|
||||
#else
|
||||
dst[0][0] = src[0][0] * xScale;
|
||||
dst[0][1] = src[0][1] * yScale;
|
||||
dst[0][2] = src[0][2] * zScale;
|
||||
dst[0][3] = src[0][3];
|
||||
dst[1][0] = src[1][0] * xScale;
|
||||
dst[1][1] = src[1][1] * yScale;
|
||||
dst[1][2] = src[1][2] * zScale;
|
||||
dst[1][3] = src[1][3];
|
||||
dst[2][0] = src[2][0] * xScale;
|
||||
dst[2][1] = src[2][1] * yScale;
|
||||
dst[2][2] = src[2][2] * zScale;
|
||||
dst[2][3] = src[2][3];
|
||||
#endif // clang-format on
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ void JPABaseEmitter::init(JPAEmitterManager* param_0, JPAResource* param_1) {
|
||||
mGlobalPrmClr.r = mGlobalPrmClr.g = mGlobalPrmClr.b = mGlobalPrmClr.a = mGlobalEnvClr.r = mGlobalEnvClr.g = mGlobalEnvClr.b = mGlobalEnvClr.a = 0xff;
|
||||
param_1->getBsp()->getPrmClr(&mPrmClr);
|
||||
param_1->getBsp()->getEnvClr(&mEnvClr);
|
||||
mpUserWork = NULL;
|
||||
mpUserWork = 0;
|
||||
mScaleOut = 1.0f;
|
||||
mEmitCount = 0.0f;
|
||||
initStatus(0x30);
|
||||
|
||||
@@ -18,7 +18,7 @@ JUTGraphFifo::JUTGraphFifo(u32 size) {
|
||||
GXInitFifoPtrs(mFifo, mBase, mBase);
|
||||
} else {
|
||||
mBase = JKRAllocFromSysHeap(mSize + 0xA0, 32);
|
||||
mBase = (void*)ROUND((intptr_t)mBase, 0x20);
|
||||
mBase = (void*)ALIGN_NEXT((intptr_t)mBase, 0x20);
|
||||
mFifo = GXInit(mBase, mSize);
|
||||
GXSetColorUpdate(GX_ENABLE);
|
||||
data_804514B8 = true;
|
||||
|
||||
@@ -12223,7 +12223,7 @@ BOOL daAlink_c::checkGroundSpecialMode() {
|
||||
return procScreamWaitInit();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int daAlink_c::commonCheckNextAction(int param_0) {
|
||||
|
||||
@@ -339,7 +339,7 @@ void daAlink_c::setHorseStirrup() {
|
||||
if (field_0x2fab & 1) {
|
||||
mDoMtx_stack_c::copy(mpLinkModel->getAnmMtx(field_0x30bc));
|
||||
mDoMtx_stack_c::transM(-2.0f, -11.0f, 1.5f);
|
||||
mDoMtx_stack_c::ZXYrotM(NULL, -0x8000, 0x4000);
|
||||
mDoMtx_stack_c::ZXYrotM(0, -0x8000, 0x4000);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), horse->getLeftStirrupMtx());
|
||||
}
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ int daAlink_c::checkNextActionSwim() {
|
||||
int daAlink_c::checkSwimAction(int param_0) {
|
||||
f32 var_f31;
|
||||
if (checkWolf()) {
|
||||
if (getMoveBGActorName(mLinkAcch.m_gnd, NULL) == PROC_Obj_ITA) {
|
||||
if (getMoveBGActorName(mLinkAcch.m_gnd, 0) == PROC_Obj_ITA) {
|
||||
var_f31 = 200.0f;
|
||||
} else {
|
||||
var_f31 = mpHIO->mWolf.mWlSwim.m.mStartHeight;
|
||||
|
||||
@@ -4083,7 +4083,7 @@ int daB_DR_c::create() {
|
||||
gravity = -3.0f;
|
||||
|
||||
mSound.init(¤t.pos, &eyePos, 3, 1);
|
||||
mColliderStts.Init(0x19, NULL, this);
|
||||
mColliderStts.Init(0x19, 0, this);
|
||||
|
||||
fopAcM_OnStatus(this, 0x4000);
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ int daDoor20_c::checkOpenMsgDoor(int* param_1) {
|
||||
*param_1 = 0;
|
||||
return 1;
|
||||
}
|
||||
field_0x624.init(NULL, msgNo, NULL, NULL);
|
||||
field_0x624.init(NULL, msgNo, 0, NULL);
|
||||
int rv = field_0x624.checkOpenDoor(this, param_1);
|
||||
dMsgObject_endFlowGroup();
|
||||
return rv;
|
||||
|
||||
@@ -2008,7 +2008,7 @@ static int daE_YH_Execute(e_yh_class* i_this) {
|
||||
J3DModel* model = i_this->mpMorf->getModel();
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
i_this->mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
|
||||
i_this->mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(a_this)));
|
||||
i_this->mBrk->play();
|
||||
i_this->mpMorf->modelCalc();
|
||||
|
||||
|
||||
@@ -3147,7 +3147,7 @@ void daE_YM_c::action() {
|
||||
cXyz unused_vec(field_0x68c, field_0x68c, field_0x68c);
|
||||
cXyz my_pos = current.pos;
|
||||
setMidnaBindEffect(this, &mSound, &my_pos, &scale);
|
||||
mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mpBrk->play();
|
||||
}
|
||||
|
||||
|
||||
@@ -511,7 +511,7 @@ void daKago_c::demo_skip(int param_0) {
|
||||
switch (param_0) {
|
||||
case 0:
|
||||
field_0x748 = 2;
|
||||
field_0x74c = NULL;
|
||||
field_0x74c = 0;
|
||||
break;
|
||||
case 1:
|
||||
field_0x728 = 0;
|
||||
@@ -525,7 +525,7 @@ void daKago_c::demo_skip(int param_0) {
|
||||
/* dSv_event_flag_c::M_051 - Main Event - Shadow Kargorok (?) (Large) event complete (Horse grass appears in various places) */
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[84]);
|
||||
field_0x748 = 7;
|
||||
field_0x74c = NULL;
|
||||
field_0x74c = 0;
|
||||
break;
|
||||
case 4:
|
||||
setSceneChange(0);
|
||||
|
||||
@@ -736,14 +736,14 @@ void daNpcBlueNS_c::playMotion() {
|
||||
int daNpcBlueNS_c::setAction(int (daNpcBlueNS_c::*i_action)(int)) {
|
||||
field_0xdc0 = 3;
|
||||
if (mAction != NULL) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
field_0xdc0 = 0;
|
||||
mAction = i_action;
|
||||
|
||||
if (mAction != NULL) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -1361,22 +1361,22 @@ int daNpcBouS_c::EvCut_BousIntroSumo1(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
setLookMode(LOOK_PLAYER_TALK);
|
||||
mActorMngrs[0].entry(daPy_getPlayerActorClass());
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case MULTI_CHAR('0003'):
|
||||
case MULTI_CHAR('0005'):
|
||||
case MULTI_CHAR('0006'):
|
||||
case MULTI_CHAR('0007'):
|
||||
case MULTI_CHAR('0008'):
|
||||
case MULTI_CHAR('0009'):
|
||||
case '0002':
|
||||
case '0003':
|
||||
case '0005':
|
||||
case '0006':
|
||||
case '0007':
|
||||
case '0008':
|
||||
case '0009':
|
||||
initTalk(9, NULL);
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0004'):
|
||||
case '0004':
|
||||
setExpressionAnm(ANM_FH_TALK_B, true);
|
||||
break;
|
||||
|
||||
@@ -1397,17 +1397,17 @@ int daNpcBouS_c::EvCut_BousIntroSumo1(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case MULTI_CHAR('0004'):
|
||||
case '0001':
|
||||
case '0004':
|
||||
return 1;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case MULTI_CHAR('0003'):
|
||||
case MULTI_CHAR('0005'):
|
||||
case MULTI_CHAR('0006'):
|
||||
case MULTI_CHAR('0007'):
|
||||
case MULTI_CHAR('0008'):
|
||||
case MULTI_CHAR('0009'):
|
||||
case '0002':
|
||||
case '0003':
|
||||
case '0005':
|
||||
case '0006':
|
||||
case '0007':
|
||||
case '0008':
|
||||
case '0009':
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
s32 choiceNo = mFlow.getChoiceNo();
|
||||
OS_REPORT("二択分岐 %s\n", choiceNo == 0 ? "はい" : "いいえ");
|
||||
@@ -1435,7 +1435,7 @@ int daNpcBouS_c::EvCut_BousIntroSumo2(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
initTalk(9, NULL);
|
||||
setLookMode(LOOK_PLAYER_TALK);
|
||||
mActorMngrs[0].entry(daPy_getPlayerActorClass());
|
||||
@@ -1457,7 +1457,7 @@ int daNpcBouS_c::EvCut_BousIntroSumo2(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
if (mCurAngle.y == fopAcM_searchPlayerAngleY(this)) {
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
int choiceNo = mFlow.getChoiceNo();
|
||||
@@ -1490,15 +1490,15 @@ int daNpcBouS_c::EvCut_BousIntroSumo3(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
setLookMode(LOOK_PLAYER_TALK);
|
||||
mActorMngrs[0].entry(daPy_getPlayerActorClass());
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0003':
|
||||
setMotion(MOT_WALK, -1.0f, 0);
|
||||
// fallthrough
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
setAngle(-0x2AAA);
|
||||
initTalk(9, NULL);
|
||||
break;
|
||||
@@ -1522,16 +1522,16 @@ int daNpcBouS_c::EvCut_BousIntroSumo3(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
return 1;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0003'): {
|
||||
case '0003': {
|
||||
cXyz* pos = dComIfGp_evmng_getMyXyzP(i_staffId, "pos");
|
||||
if (pos != NULL) {
|
||||
if (cLib_chaseAngleS(&shape_angle.y, cLib_targetAngleY(¤t.pos, pos), 0x100)) {
|
||||
|
||||
@@ -883,7 +883,7 @@ void daNpc_Fairy_c::srchActors() {
|
||||
|
||||
BOOL daNpc_Fairy_c::evtTalk() {
|
||||
if (chkAction(&daNpc_Fairy_c::talk)) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
} else {
|
||||
mPreItemNo = 0;
|
||||
|
||||
@@ -952,7 +952,7 @@ void daNpc_Fairy_c::action() {
|
||||
}
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1124,7 +1124,7 @@ BOOL daNpc_Fairy_c::setAction(actionFunc action, int param_2) {
|
||||
mMode = 0xFFFF;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
mMode = 0;
|
||||
|
||||
@@ -448,8 +448,8 @@ BOOL daNpc_grM_c::evtProc() {
|
||||
int face_motion, motion;
|
||||
if (ctrlMsgAnm(&face_motion, &motion, this, field_0xe2d)) {
|
||||
if (field_0xe26) {
|
||||
mFaceMotionSeqMngr.setNo(face_motion, -1.0f, TRUE, NULL);
|
||||
mMotionSeqMngr.setNo(motion, -1.0f, TRUE, NULL);
|
||||
mFaceMotionSeqMngr.setNo(face_motion, -1.0f, TRUE, 0);
|
||||
mMotionSeqMngr.setNo(motion, -1.0f, TRUE, 0);
|
||||
}
|
||||
} else if (tmp != 0 && field_0xe26) {
|
||||
setAfterTalkMotion();
|
||||
|
||||
@@ -277,7 +277,7 @@ static void message_shop(npc_henna_class* i_this) {
|
||||
i_this->field_0x750 = 1;
|
||||
}
|
||||
if (i_this->field_0x750 != 0) {
|
||||
fopAcM_OffStatus(actor, NULL);
|
||||
fopAcM_OffStatus(actor, 0);
|
||||
cLib_offBit<u32>(actor->attention_info.flags, fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e);
|
||||
} else {
|
||||
fopAcM_OnStatus(actor, 0);
|
||||
|
||||
@@ -853,7 +853,7 @@ BOOL daNpcKasiHana_c::main() {
|
||||
}
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
mKasiMng.sendInfo();
|
||||
@@ -1072,14 +1072,14 @@ BOOL daNpcKasiHana_c::setAction(actionFunc action) {
|
||||
mMode = -1;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
mMode = 0;
|
||||
mAction = action;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -400,7 +400,7 @@ BOOL daNpcKasiKyu_c::main() {
|
||||
}
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
playMotion();
|
||||
@@ -621,14 +621,14 @@ BOOL daNpcKasiKyu_c::setAction(actionFunc action) {
|
||||
mMode = -1;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
mMode = 0;
|
||||
mAction = action;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -400,7 +400,7 @@ BOOL daNpcKasiMich_c::main() {
|
||||
}
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
playMotion();
|
||||
@@ -621,14 +621,14 @@ BOOL daNpcKasiMich_c::setAction(actionFunc action) {
|
||||
mMode = -1;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
mMode = 0;
|
||||
mAction = action;
|
||||
|
||||
if (mAction) {
|
||||
(this->*mAction)(NULL);
|
||||
(this->*mAction)(0);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
@@ -386,7 +386,7 @@ int daNpc_Maro_c::Execute() {
|
||||
setSellItemMax(getMaxNumItem());
|
||||
field_0xf60 = -1;
|
||||
setMasterType(2);
|
||||
mShopCamAction.setCamDataIdx(NULL);
|
||||
mShopCamAction.setCamDataIdx(0);
|
||||
mShopCamAction.setCamAction(NULL);
|
||||
field_0x1131 = 1;
|
||||
}
|
||||
|
||||
@@ -1485,7 +1485,7 @@ bool daNpcShad_c::talk(void* param_1) {
|
||||
if (strcmp(dComIfGp_getStartStageName(), "R_SP116") == 0 || mCurAngle.y == fopAcM_searchPlayerAngleY(this)) {
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
mActorMngr[0].entry(daPy_getPlayerActorClass());
|
||||
itemNo = NULL;
|
||||
itemNo = 0;
|
||||
eventID = mFlow.getEventId(&itemNo);
|
||||
OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventID, itemNo); // At the end of the conversation, Event ID=%d Item No=%d
|
||||
|
||||
|
||||
@@ -1177,10 +1177,10 @@ int daNpcTheB_c::EvCut_PersonalCombatIntro(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
initTalk(0x16, NULL);
|
||||
setLookMode(LOOK_PLAYER);
|
||||
mActorMngrs[0].entry(daPy_getPlayerActorClass());
|
||||
@@ -1205,10 +1205,10 @@ int daNpcTheB_c::EvCut_PersonalCombatIntro(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
return 1;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
dComIfGs_onSaveDunSwitch(52);
|
||||
dComIfGs_onSaveDunSwitch(53);
|
||||
@@ -1230,7 +1230,7 @@ int daNpcTheB_c::EvCut_PersonalCombatRevenge(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'): {
|
||||
case '0001': {
|
||||
fopAc_ac_c* actor_p = getEvtAreaTagP(5, 0);
|
||||
cXyz* pos = dComIfGp_evmng_getMyXyzP(i_staffId, "pos");
|
||||
int* angle = dComIfGp_evmng_getMyIntegerP(i_staffId, "angle");
|
||||
@@ -1249,13 +1249,13 @@ int daNpcTheB_c::EvCut_PersonalCombatRevenge(int i_staffId) {
|
||||
break;
|
||||
}
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
initTalk(0x17, NULL);
|
||||
setLookMode(LOOK_PLAYER);
|
||||
mActorMngrs[0].entry(daPy_getPlayerActorClass());
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0003':
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1283,19 +1283,19 @@ int daNpcTheB_c::EvCut_PersonalCombatRevenge(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
if (getCoachSpeed() == 0.0f) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0003':
|
||||
return 1;
|
||||
|
||||
default:
|
||||
@@ -1412,7 +1412,7 @@ int daNpcTheB_c::EvCut_AnnulationFieldRace(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
if (startAndGoal_p != NULL) {
|
||||
startAndGoal_p->readyStartTimer();
|
||||
}
|
||||
@@ -1425,7 +1425,7 @@ int daNpcTheB_c::EvCut_AnnulationFieldRace(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
if (startAndGoal_p != NULL && startAndGoal_p->isStartCheck()) {
|
||||
return 1;
|
||||
}
|
||||
@@ -1445,15 +1445,15 @@ int daNpcTheB_c::EvCut_TheBHint(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
setMotionAnm(ANM_SIT, 0.0f);
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
initTalk(mHintMsgNo, NULL);
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0003'): {
|
||||
case '0003': {
|
||||
cXyz pos;
|
||||
csXyz angle;
|
||||
daNpcF_getPlayerInfoFromPlayerList(field_0xe04, mRoomNo, pos, angle);
|
||||
@@ -1480,11 +1480,11 @@ int daNpcTheB_c::EvCut_TheBHint(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0001':
|
||||
case '0003':
|
||||
return 1;
|
||||
|
||||
case MULTI_CHAR('0002'):
|
||||
case '0002':
|
||||
if (talkProc(NULL, TRUE, NULL)) {
|
||||
mHintEvtFlag = 0;
|
||||
return 1;
|
||||
@@ -1505,22 +1505,22 @@ int daNpcTheB_c::EvCut_CoachGuardGameOver(int i_staffId) {
|
||||
|
||||
if (eventManager.getIsAddvance(i_staffId)) {
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case '0001':
|
||||
Z2GetAudioMgr()->bgmStart(Z2BGM_GAME_OVER, 0, 0);
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0002'): {
|
||||
case '0002': {
|
||||
daNpcCoach_c* coach_p = (daNpcCoach_c*)fopAcM_SearchByID(parentActorID);
|
||||
cXyz pos(0.0f, -30000.0f, 0.0f);
|
||||
coach_p->setPosAngle(pos, shape_angle);
|
||||
break;
|
||||
}
|
||||
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0003':
|
||||
((daCoach2D_c*)fpcM_SearchByName(PROC_COACH2D))->hide();
|
||||
break;
|
||||
|
||||
case MULTI_CHAR('0004'):
|
||||
case '0004':
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1530,12 +1530,12 @@ int daNpcTheB_c::EvCut_CoachGuardGameOver(int i_staffId) {
|
||||
}
|
||||
|
||||
switch (*cutName) {
|
||||
case MULTI_CHAR('0001'):
|
||||
case MULTI_CHAR('0002'):
|
||||
case MULTI_CHAR('0003'):
|
||||
case '0001':
|
||||
case '0002':
|
||||
case '0003':
|
||||
return 1;
|
||||
|
||||
case MULTI_CHAR('0004'):
|
||||
case '0004':
|
||||
daPy_getPlayerActorClass()->onForceGameOver();
|
||||
return 1;
|
||||
|
||||
|
||||
@@ -1822,7 +1822,7 @@ BOOL daNpc_ykW_c::cutLv5DungeonClear(int param_0) {
|
||||
itemPos.y += 50.0f;
|
||||
|
||||
unkActor1 = fopAcM_fastCreateItem(&itemPos, 0, fopAcM_GetRoomNo(this), &unkSxyz,
|
||||
&unkXyz1, &unkFloat2, &unkFloat3, -1, NULL, NULL);
|
||||
&unkXyz1, &unkFloat2, &unkFloat3, -1, 0, NULL);
|
||||
if (unkActor1 != NULL) {
|
||||
mDoAud_seStart(Z2SE_OBJ_YO_HEART_S, &itemPos, 0, 0);
|
||||
fopAcM_OnStatus(unkActor1, fopAcM_STATUS_UNK_0x4000);
|
||||
|
||||
@@ -509,7 +509,7 @@ int daObjBATTA_c::execute() {
|
||||
action();
|
||||
mBrk->play();
|
||||
mBtk->play();
|
||||
mpMorf->play(NULL, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mpMorf->play(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
mtx_set();
|
||||
if (field_0x9f0 == 0) {
|
||||
mSph.SetC(current.pos);
|
||||
|
||||
@@ -30,7 +30,7 @@ void daObj_Bed_HIO_c::genMessage(JORMContext* ctx) {
|
||||
}
|
||||
#endif
|
||||
|
||||
daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {NULL, -3.0f, 1.0f, 600.0f};
|
||||
daObj_Bed_HIOParam const daObj_Bed_Param_c::m = {0, -3.0f, 1.0f, 600.0f};
|
||||
|
||||
daObj_Bed_c::~daObj_Bed_c() {
|
||||
if (mpCollider != NULL) {
|
||||
|
||||
@@ -68,7 +68,7 @@ int daBkyRock_c::draw() {
|
||||
|
||||
mModels[mMode], &tevStr);
|
||||
if (field_0x57a) {
|
||||
dMdl_c* dMdl = dMdl_mng_c::entry(mModels[2]->getModelData(), NULL, current.roomNo);
|
||||
dMdl_c* dMdl = dMdl_mng_c::entry(mModels[2]->getModelData(), 0, current.roomNo);
|
||||
if (dMdl != NULL) {
|
||||
_pieceData* piece = mPieces;
|
||||
for (int i = 0; i < 20; i++, piece++) {
|
||||
|
||||
@@ -288,7 +288,7 @@ void daBmWindow_c::setBreakEffect(int param_1) {
|
||||
}
|
||||
int temp = param_1 * 3;
|
||||
for (int i = temp; i < temp + 3; i++) {
|
||||
dComIfGp_particle_set(particle_id[i], &cStack_2c, &cStack_40, &scale, 0xff, 0, 0xffffffff,
|
||||
dComIfGp_particle_set(particle_id[i], &cStack_2c, &cStack_40, &scale, 0xff, 0, -1,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ int daObjDigholl_c::execute() {
|
||||
}
|
||||
|
||||
if (player->current.pos.abs(current.pos) < 1000.0f) {
|
||||
dComIfGp_particle_setSimple(0x70f, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, NULL,
|
||||
dComIfGp_particle_setSimple(0x70f, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, 0,
|
||||
0.0f);
|
||||
dComIfGp_particle_setSimple(0x73d, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, NULL,
|
||||
dComIfGp_particle_setSimple(0x73d, ¤t.pos, 0xff, g_whiteColor, g_whiteColor, 0,
|
||||
0.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ void daObjFlag_c::calcJointAngle() {
|
||||
joint->mJoint3 = joint->mJoint1 - joint->mJoint2;
|
||||
}
|
||||
|
||||
if(attr().field_0x25 != NULL) {
|
||||
if(attr().field_0x25 != 0) {
|
||||
if(i == 1) {
|
||||
calcAngleSwingX(joint, power);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ static void break_eff(obj_kbox_class* i_this) {
|
||||
fopAcM_GetRoomNo(&i_this->mActor), NULL, NULL, &particleScale);
|
||||
dPa_modelEcallBack::setModel(pEmitter, kibako_bmd, i_this->mActor.tevStr, 3, NULL, 0, 0);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, 0xffffffff,
|
||||
dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, -1,
|
||||
0, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -213,7 +213,7 @@ static void kbox_float(obj_kbox_class* i_this) {
|
||||
i_this->field_0x5a4 + i_this->field_0x590 + i_this->field_0x58c + i_this->field_0x5ac;
|
||||
i_this->field_0x9e8 = dComIfGp_particle_set(i_this->field_0x9e8, 0x86c3,
|
||||
&cStack_88, &a_this->tevStr, &a_this->shape_angle,
|
||||
&cStack_7c, 0xff, 0, 0xffffffff, 0, 0, 0);
|
||||
&cStack_7c, 0xff, 0, -1, 0, 0, 0);
|
||||
if (i_this->field_0x5ac <= -50.0f) {
|
||||
fopAcM_delete(a_this);
|
||||
dComIfGp_particle_set(0x86c4, &cStack_88, &a_this->tevStr, &a_this->shape_angle,
|
||||
|
||||
@@ -113,7 +113,7 @@ cXyz* daObjLndRope_c::getRopeStartPos() {
|
||||
}
|
||||
|
||||
f32 daObjLndRope_c::getStartRate(cXyz* i_ropeSegmentPos) {
|
||||
if (mFlag != NULL) {
|
||||
if (mFlag != 0) {
|
||||
return mScale * (i_ropeSegmentPos->x - getRopeStartPos()->x);
|
||||
} else {
|
||||
return mScale * (i_ropeSegmentPos->z - getRopeStartPos()->z);
|
||||
|
||||
@@ -53,14 +53,14 @@ static int tandem;
|
||||
|
||||
static int demo_f;
|
||||
|
||||
static int target_info[10];
|
||||
static void* target_info[10];
|
||||
|
||||
static int target_info_count;
|
||||
|
||||
static void* s_ks_sub(void* param_1, void* param_2) {
|
||||
if (fopAcM_IsActor(param_1) && fopAcM_GetName(param_1) == 0x60) {
|
||||
if (target_info_count < 10) {
|
||||
target_info[target_info_count] = (intptr_t)param_1;
|
||||
target_info[target_info_count] = param_1;
|
||||
target_info_count++;
|
||||
}
|
||||
return param_1;
|
||||
@@ -77,7 +77,7 @@ static int hit_check(obj_lp_class* i_this, wd_ss* WdSs) {
|
||||
|
||||
fVar1 = 50.0f;
|
||||
for (int i = 0; i < target_info_count; i++) {
|
||||
sp6c = WdSs->field_0x10 - *(cXyz *)(target_info[i] + 0x4d0);
|
||||
sp6c = WdSs->field_0x10 - *(cXyz *)((u8 *)target_info[i] + 0x4d0);
|
||||
if (sp6c.y >= -3.0f) {
|
||||
f32 dist = JMAFastSqrt(sp6c.x * sp6c.x + sp6c.z * sp6c.z);
|
||||
if (dist <= fVar1 * WdSs->field_0x3c) {
|
||||
@@ -126,7 +126,7 @@ static int hit_check(obj_lp_class* i_this, wd_ss* WdSs) {
|
||||
cLib_addCalc2(&WdSs->field_0x10.y, WdSs->field_0x4.y + fVar8 * -0.5f, 0.5f, 3.0f);
|
||||
cLib_addCalc2(&WdSs->field_0x28.x, fVar8, 0.1f, fVar8 * 0.5f);
|
||||
cLib_addCalcAngleS2(&WdSs->field_0x34, cM_atan2s(sp6c.x, sp6c.z), 0x20, 0x400);
|
||||
cLib_addCalcAngleS2(&WdSs->field_0x36, 0xfffff060, 0x20, 0x400);
|
||||
cLib_addCalcAngleS2(&WdSs->field_0x36, -4000, 0x20, 0x400);
|
||||
rv = 1;
|
||||
}
|
||||
}
|
||||
@@ -221,7 +221,7 @@ static int daObj_Lp_Execute(obj_lp_class* i_this) {
|
||||
target_info[i] = 0;
|
||||
}
|
||||
|
||||
target_info[0] = (intptr_t)dComIfGp_getPlayer(0);
|
||||
target_info[0] = dComIfGp_getPlayer(0);
|
||||
target_info_count = 1;
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_MN05") == 0) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
};
|
||||
|
||||
daLv3Water_HIO_c::daLv3Water_HIO_c() {
|
||||
mLevelControlWaitFrames = NULL;
|
||||
mLevelControlWaitFrames = 0;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -127,7 +127,7 @@ int daLv6ChangeGate_c::Execute(Mtx** param_0) {
|
||||
|
||||
for (int i = 0; i < 12; i++) {
|
||||
cXyz spC(cyl_x_offset + mMoveTransX, 0.0f, 0.0f);
|
||||
mDoMtx_stack_c::ZXYrotS(NULL, shape_angle.y, shape_angle.z);
|
||||
mDoMtx_stack_c::ZXYrotS(0, shape_angle.y, shape_angle.z);
|
||||
mDoMtx_stack_c::multVec(&spC, &spC);
|
||||
spC += current.pos;
|
||||
|
||||
@@ -251,7 +251,7 @@ void daLv6ChangeGate_c::init_modeBreak() {
|
||||
|
||||
void daLv6ChangeGate_c::modeBreak() {
|
||||
cXyz effpos(mMoveTransX, 0.0f, 0.0f);
|
||||
mDoMtx_stack_c::ZXYrotS(NULL, shape_angle.y, shape_angle.z);
|
||||
mDoMtx_stack_c::ZXYrotS(0, shape_angle.y, shape_angle.z);
|
||||
mDoMtx_stack_c::multVec(&effpos, &effpos);
|
||||
effpos += current.pos;
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ void daTogeRoll_c::moveTogeRoll() {
|
||||
&daTogeRoll_c::modeBound, &daTogeRoll_c::modeBound2, &daTogeRoll_c::modeBoundWait,
|
||||
};
|
||||
|
||||
if (field_0x5dc == NULL) {
|
||||
if (field_0x5dc == 0) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (mSph[i].ChkCoHit()) {
|
||||
fopAc_ac_c* hit_actor = dCc_GetAc(mSph[i].GetCoHitObj()->GetAc());
|
||||
@@ -264,7 +264,7 @@ void daTogeRoll_c::init_modeBoundWait() {
|
||||
}
|
||||
|
||||
void daTogeRoll_c::modeBoundWait() {
|
||||
if (field_0x5db != NULL) {
|
||||
if (field_0x5db != 0) {
|
||||
field_0x5db -= 1;
|
||||
} else {
|
||||
field_0x5dc = 0;
|
||||
|
||||
@@ -494,7 +494,7 @@ void daObjLv6Bm_c::calcBeam() {
|
||||
|
||||
if (field_0xa19 > 0) {
|
||||
cXyz sp84(field_0x9f8);
|
||||
if (fopAcM_lc_c::lineCheck(&field_0x9e4, &field_0x9f8, this) != NULL && fopAcM_lc_c::checkGroundHit()) {
|
||||
if (fopAcM_lc_c::lineCheck(&field_0x9e4, &field_0x9f8, this) != false && fopAcM_lc_c::checkGroundHit()) {
|
||||
sp84 = fopAcM_lc_c::getCross();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ int daObj_Maki_Execute(obj_maki_class* i_this) {
|
||||
cxyz.y += 20000.0f;
|
||||
i_this->field_0x6f8[0] = dComIfGp_particle_set(
|
||||
i_this->field_0x6f8[0], 0x820b, &i_this->current.pos, &i_this->tevStr,
|
||||
&i_this->shape_angle, 0, 0xff, 0, 0xffffffff, 0, 0, 0);
|
||||
&i_this->shape_angle, 0, 0xff, 0, -1, 0, 0, 0);
|
||||
fopAcM_seStartLevel(i_this, 0x800a6, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ int daObjProp_c::Delete() {
|
||||
}
|
||||
|
||||
int daObjProp_c::draw() {
|
||||
g_env_light.settingTevStruct(NULL, ¤t.pos, &tevStr);
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
g_env_light.setLightTevColorType_MAJI(mpModel, &tevStr);
|
||||
mDoExt_modelUpdate(mpModel);
|
||||
return 1;
|
||||
|
||||
@@ -157,7 +157,7 @@ void daRfHole_c::setBreakEffect() {
|
||||
mDoMtx_stack_c::multVec(&acStack_24, &acStack_24);
|
||||
cXyz cStack_30 = current.pos + acStack_24;
|
||||
for (int i = 0; i < 5; i++) {
|
||||
dComIfGp_particle_set(particle_id[i], &cStack_30, NULL, &scale, 0xff, 0, 0xffffffff, NULL,
|
||||
dComIfGp_particle_set(particle_id[i], &cStack_30, NULL, &scale, 0xff, 0, -1, NULL,
|
||||
NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ static char* l_ropeArcName = "L_Ropest";
|
||||
|
||||
void daObjRBridge_c::initBaseMtx() {
|
||||
mDoMtx_stack_c::transS(current.pos);
|
||||
mDoMtx_stack_c::ZXYrotM(NULL, current.angle.y, 0);
|
||||
mDoMtx_stack_c::ZXYrotM(0, current.angle.y, 0);
|
||||
MTXCopy(mDoMtx_stack_c::get(), mMtx);
|
||||
|
||||
mpBrgModel->setBaseScale(scale);
|
||||
|
||||
@@ -255,7 +255,7 @@ int daObj_Sekizoa_c::CreateHeap() {
|
||||
}
|
||||
if (mType == TYPE_6) {
|
||||
int success_create = mInvModel.create(mpMorf[0]->getModel(), 1);
|
||||
if (success_create == NULL) {
|
||||
if (success_create == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -736,7 +736,7 @@ void daObj_Sekizoa_c::setAttnPos() {
|
||||
mpMorf[1]->modelCalc();
|
||||
}
|
||||
if (mpMcaMorf != NULL) {
|
||||
((mDoExt_McaMorfSO*)mpMcaMorf)->play(NULL, 0);
|
||||
((mDoExt_McaMorfSO*)mpMcaMorf)->play(0, 0);
|
||||
if (mType == TYPE_1 || mType == TYPE_3 || mType == TYPE_5) {
|
||||
mDoMtx_stack_c::copy(mpMorf[0]->getModel()->getAnmMtx(7));
|
||||
} else {
|
||||
|
||||
@@ -831,7 +831,7 @@ static void demo_camera(obj_so_class* i_this) {
|
||||
// fallthrough
|
||||
case 2:
|
||||
sp3c.set(12459.0f, 3152.0f, 4628.0f);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp3c, 0xfffffaee, 0);
|
||||
daPy_getPlayerActorClass()->setPlayerPosAndAngle(&sp3c, -1298, 0);
|
||||
i_this->mDemoCamCenter.x = a_this->current.pos.x;
|
||||
i_this->mDemoCamCenter.z = a_this->current.pos.z;
|
||||
sp3c.y = (a_this->current.pos.y + 150.0f) - 50.0f;
|
||||
|
||||
@@ -807,7 +807,7 @@ void daObjStone_c::init_modeBreak() {
|
||||
JPABaseEmitter* emitter = dComIfGp_particle_set(
|
||||
0x15c, ¤t.pos, 0, &acStack_40, 0xff, &dPa_modelEcallBack::getEcallback(), fopAcM_GetRoomNo(this), 0, 0, 0);
|
||||
dPa_modelEcallBack::setModel(emitter, stone_bmd, tevStr,
|
||||
3, 0, NULL, 0);
|
||||
3, 0, 0, 0);
|
||||
for (int i = 0; i < 3; i = i + 1) {
|
||||
dComIfGp_particle_set(
|
||||
l_eff_id[i],
|
||||
@@ -947,7 +947,7 @@ void daObjStone_c::set_carry_eff() {
|
||||
if (field_0x0950 == 3) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
field_0x0964[i] =
|
||||
dComIfGp_particle_set(l_carry_eff_id[i], ¤t.pos, 0, &pos, 0xFF, 0, 0xFFFFFFFF,
|
||||
dComIfGp_particle_set(l_carry_eff_id[i], ¤t.pos, 0, &pos, 0xFF, 0, -1,
|
||||
0, 0, 0); // float literal inline
|
||||
if (field_0x0964[i] != 0) {
|
||||
field_0x0964[i]->becomeImmortalEmitter();
|
||||
|
||||
@@ -279,7 +279,7 @@ int daObjTks_c::createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
}
|
||||
|
||||
int daObjTks_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) {
|
||||
if (param_1 == NULL) {
|
||||
if (param_1 == 0) {
|
||||
J3DModel* mdl_p = j3dSys.getModel();
|
||||
daObjTks_c* a_this = (daObjTks_c*)mdl_p->getUserArea();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ int daObjVGnd_c::CreateHeap() {
|
||||
J3DAnmTextureSRTKey* pbtk = (J3DAnmTextureSRTKey*)dComIfG_getObjectRes(l_arcName, 0xb);
|
||||
JUT_ASSERT(198, pbtk != NULL);
|
||||
mpBtk = new mDoExt_btkAnm();
|
||||
if ((!mpBtk) || (!mpBtk->init(modelData, pbtk, 1, NULL, 1.0f, NULL, -1))) {
|
||||
if ((!mpBtk) || (!mpBtk->init(modelData, pbtk, 1, 0, 1.0f, 0, -1))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ int daObjVGnd_c::CreateHeap() {
|
||||
J3DAnmTevRegKey* pbrk = (J3DAnmTevRegKey*)dComIfG_getObjectRes(l_arcName, 0x8);
|
||||
JUT_ASSERT(212, pbrk != NULL);
|
||||
mpBrk = new mDoExt_brkAnm();
|
||||
if ((!mpBrk) || (!mpBrk->init(modelData, pbrk, 1, NULL, 1.0f, NULL, -1))) {
|
||||
if ((!mpBrk) || (!mpBrk->init(modelData, pbrk, 1, 0, 1.0f, 0, -1))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ int daPasserMng_c::execute() {
|
||||
csXyz cStack_20(field_0x596 != 0 ? 0xff : endTime, current.angle.y, 0);
|
||||
childProcIds[currentChildIndex] =
|
||||
fopAcM_createChild(npcId, fopAcM_GetID(this), getPasserParam(), ¤t.pos,
|
||||
fopAcM_GetRoomNo(this), &cStack_20, 0, 0xffffffff, 0);
|
||||
fopAcM_GetRoomNo(this), &cStack_20, 0, -1, 0);
|
||||
currentChildIndex = (currentChildIndex + 1) % getMaxNum();
|
||||
}
|
||||
mTime = time + intervalTime;
|
||||
|
||||
@@ -561,8 +561,10 @@ int daPeru_c::wait(int param_0) {
|
||||
_AppearDemoTag_delete();
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -632,8 +634,10 @@ int daPeru_c::talk(int param_0) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -674,7 +678,11 @@ int daPeru_c::jump_st(int param_1) {
|
||||
setAction(&daPeru_c::jump_ed, actionArg);
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
#else
|
||||
case (u16)MODE_INVALID:
|
||||
#endif
|
||||
field_0xe58 = 0;
|
||||
break;
|
||||
}
|
||||
@@ -712,7 +720,11 @@ int daPeru_c::jump_ed(int param_1) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
#else
|
||||
case (u16)MODE_INVALID:
|
||||
#endif
|
||||
field_0xe58 = 0;
|
||||
break;
|
||||
}
|
||||
@@ -739,8 +751,10 @@ int daPeru_c::sniff(int param_0) {
|
||||
mSound.startCreatureVoice(Z2SE_GZ_NE_KNKN, -1);
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -769,8 +783,10 @@ int daPeru_c::demo_appear(int param_0) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -809,8 +825,10 @@ int daPeru_c::demo_walk_to_link(int param_0) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -838,8 +856,10 @@ int daPeru_c::demo_walk_circle(int param_0) {
|
||||
field_0xe6e -= 0x155;
|
||||
break;
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -880,8 +900,10 @@ int daPeru_c::demo_walk_to_window(int param_0) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -912,8 +934,10 @@ int daPeru_c::demo_walk_to_window(int param_0) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef __MWERKS__
|
||||
case MODE_INVALID:
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -128,7 +128,7 @@ void daShopItem_c::CreateInit() {
|
||||
|
||||
home.pos = current.pos;
|
||||
set_mtx();
|
||||
mpModel->setUserArea(NULL);
|
||||
mpModel->setUserArea(0);
|
||||
}
|
||||
|
||||
void daShopItem_c::set_mtx() {
|
||||
|
||||
@@ -517,7 +517,7 @@ int daTag_AllMato_c::checkCrsMato2() {
|
||||
}
|
||||
|
||||
fopAc_ac_c* sp18 = NULL;
|
||||
int sp14 = NULL;
|
||||
int sp14 = 0;
|
||||
|
||||
for (int i = 0; i < 499; i++) {
|
||||
for (int j = 0; j < mBouMatoActorNum; j++) {
|
||||
|
||||
@@ -44,7 +44,7 @@ static void* search_spinner_sub(void* tag_0, void* tag_1) {
|
||||
daTagSpinner_c* actor2 = (daTagSpinner_c*)tag_1;
|
||||
|
||||
if (actor != NULL &&
|
||||
fopAcM_IsActor(actor) != NULL &&
|
||||
fopAcM_IsActor(actor) != 0 &&
|
||||
fopAcM_GetProfName(actor) == PROC_SPINNER) {
|
||||
f32 latDist = actor->current.pos.absXZ(actor2->current.pos);
|
||||
if (latDist < actor2->GetR()) {
|
||||
|
||||
@@ -689,9 +689,9 @@ void dBgWKCol::ShdwDraw(cBgS_ShdwDraw* param_0) {
|
||||
|
||||
do {
|
||||
stepY_sp78 = 1000000;
|
||||
best1_sp70 = NULL;
|
||||
best2_sp6C = NULL;
|
||||
best3_sp68 = NULL;
|
||||
best1_sp70 = 0;
|
||||
best2_sp6C = 0;
|
||||
best3_sp68 = 0;
|
||||
|
||||
int x_sp44 = minX_spA0;
|
||||
do {
|
||||
|
||||
+1
-1
@@ -255,7 +255,7 @@ dCcD_GObjInf* dCcD_GObjInf::GetTgHitGObj() {
|
||||
u8 dCcD_GObjInf::GetTgHitObjSe() {
|
||||
dCcD_GObjInf* objInf = GetTgHitGObj();
|
||||
if (objInf == NULL) {
|
||||
return NULL;
|
||||
return 0;
|
||||
} else {
|
||||
return objInf->GetAtSe();
|
||||
}
|
||||
|
||||
@@ -1114,7 +1114,7 @@ void dComIfG_inf_c::baseCsr_c::draw(f32 param_1, f32 param_2) {
|
||||
r28 = 0xFF;
|
||||
}
|
||||
|
||||
J2DPicture* picture = field_0x8.getPicture('cursor00');
|
||||
J2DPicture* picture = field_0x8.getPicture(MULTI_CHAR('cursor00'));
|
||||
JUT_ASSERT(1450, picture != NULL);
|
||||
picture->scale(1.3f, 1.3f);
|
||||
JUtility::TColor color = picture->getWhite();
|
||||
@@ -1148,7 +1148,7 @@ void dComIfG_inf_c::baseCsr_c::create() {
|
||||
int rt = field_0x8.create(resInfo->getArchive(), "zelda_pointing_cursor_navi.blo");
|
||||
JUT_ASSERT(1498, rt);
|
||||
|
||||
J2DPicture* picture = field_0x8.getPicture('cursor00');
|
||||
J2DPicture* picture = field_0x8.getPicture(MULTI_CHAR('cursor00'));
|
||||
JUT_ASSERT(1500, picture != NULL);
|
||||
JUtility::TColor color = picture->getWhite();
|
||||
color.a = 0;
|
||||
@@ -1172,7 +1172,7 @@ void dComIfG_inf_c::baseCsr_c::particleExecute() {
|
||||
}
|
||||
|
||||
void dComIfG_inf_c::anmCsr_c::draw(f32 param_1, f32 param_2) {
|
||||
field_0x8.setPos('lock_n', param_1, param_2);
|
||||
field_0x8.setPos(MULTI_CHAR('lock_n'), param_1, param_2);
|
||||
dComIfGd_set2DXlu(&field_0x8);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1245,7 +1245,7 @@ void* dEvent_manager_c::getMySubstanceP(int staffId, const char* dataname, int d
|
||||
int dEvent_manager_c::getMySubstanceNum(int staffId, const char* dataname) {
|
||||
dEvDtData_c* data = getMyDataP(staffId, dataname, FALSE);
|
||||
if (data == NULL) {
|
||||
return NULL;
|
||||
return 0;
|
||||
} else {
|
||||
return data->getNumber();
|
||||
}
|
||||
|
||||
@@ -228,6 +228,8 @@ int dThunder_c::create() {
|
||||
#ifdef __MWERKS__
|
||||
f32 tmp = __frsqrtes(var_f29_2);
|
||||
var_f29_2 = tmp * var_f29_2;
|
||||
#else
|
||||
var_f29_2 = sqrtf(var_f29_2);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1728,7 +1728,7 @@ void dMenu_Dmap_c::_create() {
|
||||
|
||||
screenInit();
|
||||
|
||||
mpDrawBg->getMapPane()->changeTexture(mMapCtrl->getResTIMGPointer(0), NULL);
|
||||
mpDrawBg->getMapPane()->changeTexture(mMapCtrl->getResTIMGPointer(0), 0);
|
||||
|
||||
if (mpDrawBg->getMapPane()->append(mMapCtrl->getResTIMGPointer(1), 1.0f)) {
|
||||
mpDrawBg->getMapPane()->setBlendRatio(1.0f, 0.0f);
|
||||
|
||||
@@ -492,7 +492,7 @@ void dMenu_Letter_c::read_open_init() {
|
||||
}
|
||||
J2DTextBox* text2 = (J2DTextBox*)field_0x2ec[i]->getPanePtr();
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1,
|
||||
NULL, NULL, NULL);
|
||||
NULL, NULL, 0);
|
||||
}
|
||||
field_0x3e2 = mpString->getPageMax(LINE_MAX);
|
||||
if (field_0x3e2 > 1) {
|
||||
@@ -642,7 +642,7 @@ 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, NULL, NULL, NULL);
|
||||
mpString->getStringPage(dMenu_Letter::getLetterText(idx), field_0x3e3 - 1, LINE_MAX, text2, text1, NULL, NULL, 0);
|
||||
}
|
||||
char acStack_30[10];
|
||||
sprintf(acStack_30, "%d/%d", field_0x3e3, field_0x3e2);
|
||||
|
||||
@@ -1173,7 +1173,7 @@ void dMeter2Draw_c::initButton() {
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
field_0x524[i][j] = NULL;
|
||||
field_0x524[i][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ dMsgScrnStaff_c::dMsgScrnStaff_c(u8 unused) {
|
||||
mpScreen->search(MULTI_CHAR('right_n'))->hide();
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], NULL, NULL);
|
||||
mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL);
|
||||
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
|
||||
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x200, "");
|
||||
}
|
||||
|
||||
+1
-1
@@ -974,5 +974,5 @@ scene_process_profile_definition g_profile_LOGO_SCENE = {
|
||||
0,
|
||||
&g_fopScn_Method.base,
|
||||
&l_dScnLogo_Method,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
|
||||
+2
-2
@@ -339,7 +339,7 @@ scene_process_profile_definition g_profile_NAME_SCENE = {
|
||||
0,
|
||||
&g_fopScn_Method.base,
|
||||
&l_dScnName_Method,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
|
||||
scene_process_profile_definition g_profile_NAMEEX_SCENE = {
|
||||
@@ -353,5 +353,5 @@ scene_process_profile_definition g_profile_NAMEEX_SCENE = {
|
||||
0,
|
||||
&g_fopScn_Method.base,
|
||||
&l_dScnName_Method,
|
||||
NULL,
|
||||
0,
|
||||
};
|
||||
|
||||
+5
-5
@@ -2456,10 +2456,10 @@ static int dStage_elstInfoInit(dStage_dt_c* i_stage, void* i_data, int param_2,
|
||||
}
|
||||
|
||||
static void dKankyo_create() {
|
||||
fopKyM_fastCreate(PROC_KANKYO, NULL, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_KYEFF, NULL, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_KYEFF2, NULL, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_ENVSE, NULL, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_KANKYO, 0, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_KYEFF, 0, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_KYEFF2, 0, NULL, NULL, NULL);
|
||||
fopKyM_fastCreate(PROC_ENVSE, 0, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static void layerMemoryInfoLoader(void* i_data, dStage_dt_c* i_stage, int param_2) {
|
||||
@@ -2710,7 +2710,7 @@ void dStage_Create() {
|
||||
JUT_ASSERT(4517, status);
|
||||
}
|
||||
|
||||
*dStage_roomControl_c::getDemoArcName() = NULL;
|
||||
*dStage_roomControl_c::getDemoArcName() = 0;
|
||||
dKankyo_create();
|
||||
|
||||
if (dComIfG_getStageRes("vrbox_sora.bmd")) {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#include <stdint.h>
|
||||
#include <dolphin/mtx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DTransform.h"
|
||||
|
||||
// translated to C, should be correct, but not tested.
|
||||
|
||||
void J3DPSMtxArrayConcat(Mtx mA, Mtx mB, Mtx mAB, u32 count) {
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
const float* b = (const float*)mB[i];
|
||||
float* res = (float*)mAB[i];
|
||||
|
||||
for (int row = 0; row < 3; row++) {
|
||||
float a0 = mA[row][0];
|
||||
float a1 = mA[row][1];
|
||||
float a2 = mA[row][2];
|
||||
float a3 = mA[row][3];
|
||||
|
||||
// Standard Matrix Multiply for 3x4 * 3x4 (with implicit 4th row [0,0,0,1])
|
||||
res[row * 4 + 0] = a0 * b[0] + a1 * b[4] + a2 * b[8];
|
||||
res[row * 4 + 1] = a0 * b[1] + a1 * b[5] + a2 * b[9];
|
||||
res[row * 4 + 2] = a0 * b[2] + a1 * b[6] + a2 * b[10];
|
||||
// The 4th column includes the translation
|
||||
res[row * 4 + 3] = a0 * b[3] + a1 * b[7] + a2 * b[11] + a3;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user