mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-11 05:04:40 -04:00
Various minor warning fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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, ...) \
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user