Merge pull request #33 from TakaRikka/warning-fixes-2

More warning fixes & pointer truncation fixes
This commit is contained in:
TakaRikka
2026-02-28 20:13:13 -08:00
committed by GitHub
60 changed files with 117 additions and 118 deletions
+3 -3
View File
@@ -134,7 +134,7 @@ struct JAISoundStatus_ {
u8 flag8 : 1;
} flags;
} state;
/* 0x4 */ u32 userdata_;
/* 0x4 */ uintptr_t userdata_;
}; // Size: 0x8
/**
@@ -294,8 +294,8 @@ public:
void setAnimationState(u32 state) {
status_.state.flags.animationState = state;
}
u32 getUserData() const { return status_.userdata_; }
void setUserData(u32 userData) { status_.userdata_ = userData; }
uintptr_t getUserData() const { return status_.userdata_; }
void setUserData(uintptr_t userData) { status_.userdata_ = userData; }
JAIAudible* getAudible() { return audible_; }
bool isHandleAttached() const { return handle_ != NULL; }
bool hasLifeTime() const { return status_.field_0x1.flags.flag2; }
+1 -1
View File
@@ -112,7 +112,7 @@ namespace JASDsp {
void invalChannelAll();
void initBuffer();
int setFXLine(u8, s16*, JASDsp::FxlineConfig_*);
BOOL changeFXLineParam(u8, u8, u32);
BOOL changeFXLineParam(u8, u8, uintptr_t);
extern u8 const DSPADPCM_FILTER[64];
extern u32 const DSPRES_FILTER[320];
+2 -2
View File
@@ -265,13 +265,13 @@ namespace JASKernel {
void setupRootHeap(JKRSolidHeap*, u32);
JKRHeap* getSystemHeap();
JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* getCommandHeap();
void setupAramHeap(u32, u32);
void setupAramHeap(uintptr_t, u32);
JASHeap* getAramHeap();
u32 getAramFreeSize();
u32 getAramSize();
extern JASHeap audioAramHeap;
extern u32 sAramBase;
extern uintptr_t sAramBase;
extern JKRHeap* sSystemHeap;
extern JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* sCommandHeap;
};
+3 -3
View File
@@ -8,10 +8,10 @@ namespace JASResArcLoader {
size_t getResSize(JKRArchive const*, u16);
size_t getResMaxSize(JKRArchive const*);
static void loadResourceCallback(void*);
int loadResourceAsync(JKRArchive*, u16, u8*, u32, void (*)(u32, u32), u32);
int loadResourceAsync(JKRArchive*, u16, u8*, u32, void (*)(u32, uintptr_t), uintptr_t);
// from pikmin2
typedef void (*LoadCallback)(u32, u32);
typedef void (*LoadCallback)(u32, uintptr_t);
struct TLoadResInfo {
inline TLoadResInfo(JKRArchive* archive, u16 id, void* buf, u32 size)
@@ -30,7 +30,7 @@ namespace JASResArcLoader {
void* mBuffer; // _08
u32 mBufferSize; // _0C
LoadCallback mCallback; // _10
u32 mCallbackArg; // _14, arg to pass to mCallback along with readResource result
uintptr_t mCallbackArg; // _14, arg to pass to mCallback along with readResource result
OSMessageQueue* mQueue; // _18
};
};
+1 -1
View File
@@ -72,7 +72,7 @@ public:
JKRHeap* find(void* ptr) const;
JKRHeap* findAllHeap(void* ptr) const;
void dispose_subroutine(u32 start, u32 end);
void dispose_subroutine(uintptr_t start, uintptr_t end);
bool dispose(void* ptr, u32 size);
void dispose(void* begin, void* end);
void dispose();
+2 -1
View File
@@ -2,6 +2,7 @@
#define JSUOUTPUTSTREAM_H
#include "JSystem/JSupport/JSUIosBase.h"
#include <cstdint>
/**
* @ingroup jsystem-jsupport
@@ -18,7 +19,7 @@ public:
s32 write(const void*, s32);
void write(const char*);
#ifdef TARGET_PC
#if INTPTR_MAX > INT32_MAX
JSUOutputStream& operator<<(uintptr_t param_0) {
write(&param_0, sizeof(uintptr_t));
return *this;
-4
View File
@@ -18,11 +18,7 @@ T* JSUConvertOffsetToPtr(const void* ptr, uintptr_t offset) {
*
*/
template <typename T>
#if TARGET_PC
T* JSUConvertOffsetToPtr(const void* ptr, u32 offset) {
#else
T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
#endif
T* ret;
if (offset == 0) {
ret = NULL;
+3 -2
View File
@@ -4,14 +4,15 @@
#include "f_op/f_op_scene_pause.h"
#include "f_pc/f_pc_manager.h"
#include "f_op/f_op_scene.h"
#include <cstdint>
typedef struct base_process_class base_process_class;
scene_class* fopScnM_SearchByID(fpc_ProcID id);
int fopScnM_ChangeReq(scene_class* i_scene, s16 i_procName, s16 param_3, u16 param_4);
fpc_ProcID fopScnM_DeleteReq(scene_class* i_scene);
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, u32 i_data);
u32 fopScnM_ReRequest(s16 i_procName, u32 i_data);
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, uintptr_t i_data);
u32 fopScnM_ReRequest(s16 i_procName, uintptr_t i_data);
void fopScnM_Management();
void fopScnM_Init();
+1 -1
View File
@@ -143,7 +143,7 @@ bool JASAramStream::start() {
}
bool JASAramStream::stop(u16 param_0) {
if (!OSSendMessage(&field_0x000, (OSMessage)(param_0 << 0x10 | 1), OS_MESSAGE_NOBLOCK)) {
if (!OSSendMessage(&field_0x000, (OSMessage)(uintptr_t)(param_0 << 0x10 | 1), OS_MESSAGE_NOBLOCK)) {
JUT_WARN(290, "%s", "OSSendMessage Failed");
return false;
}
+1 -1
View File
@@ -472,7 +472,7 @@ int JASDsp::setFXLine(u8 param_0, s16* buffer, JASDsp::FxlineConfig_* param_2) {
return 1;
}
BOOL JASDsp::changeFXLineParam(u8 param_0, u8 param_1, u32 param_2) {
BOOL JASDsp::changeFXLineParam(u8 param_0, u8 param_1, uintptr_t param_2) {
JUT_ASSERT(450, dspMutex);
FxBuf* buf = &FX_BUF[param_0];
switch (param_1) {
+2 -2
View File
@@ -285,7 +285,7 @@ void JASGenericMemPool::free(void* ptr, u32 param_1) {
freeMemCount++;
}
u32 JASKernel::sAramBase;
uintptr_t JASKernel::sAramBase;
JKRHeap* JASKernel::sSystemHeap;
@@ -310,7 +310,7 @@ JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::getCom
JASHeap JASKernel::audioAramHeap;
void JASKernel::setupAramHeap(u32 param_0, u32 param_1) {
void JASKernel::setupAramHeap(uintptr_t param_0, u32 param_1) {
#if !PLATFORM_GCN
OSReport("setupAramHeap %x, %x, %x\n", param_0, ARGetBaseAddress(), param_1);
param_0 = ARGetBaseAddress();
+1 -1
View File
@@ -55,7 +55,7 @@ static void JASResArcLoader::loadResourceCallback(void* args) {
}
int JASResArcLoader::loadResourceAsync(JKRArchive* archive, u16 id, u8* buffer, u32 size, LoadCallback callback, u32 cbArg)
int JASResArcLoader::loadResourceAsync(JKRArchive* archive, u16 id, u8* buffer, u32 size, LoadCallback callback, uintptr_t cbArg)
{
TLoadResInfo args(archive, id, buffer, size);
args.mCallback = callback;
+2 -2
View File
@@ -111,10 +111,10 @@ bool JAUDynamicSeqDataBlocks::appendDynamicSeqDataBlock(JAUSeqDataBlock* seqData
return 1;
}
static void JAUDynamicSeqDataBlocks_receiveLoaded_(u32 param_0, u32 param_1) {
static void JAUDynamicSeqDataBlocks_receiveLoaded_(u32 param_0, uintptr_t param_1) {
JSULink<JAUSeqDataBlock>* link = (JSULink<JAUSeqDataBlock>*)param_1;
JAUSeqDataBlock* seqDataBlock = link->getObject();
if (param_0 != NULL) {
if (param_0 != 0) {
seqDataBlock->field_0x1c = 2;
} else {
seqDataBlock->field_0x1c = 0;
+1 -1
View File
@@ -125,7 +125,7 @@ s32 JKRDvdFile::sync(void) {
void JKRDvdFile::doneProcess(s32 id, DVDFileInfo* fileInfo) {
// fileInfo->field_0x3c looks like some kind of user pointer?
JKRDvdFile* dvdFile = *(JKRDvdFile**)((u8*)fileInfo + (offsetof(JKRDvdFile, mDvdFile) - offsetof(JKRDvdFile, mFileInfo)));
OSSendMessage(&dvdFile->mMessageQueue2, (OSMessage)id, OS_MESSAGE_NOBLOCK);
OSSendMessage(&dvdFile->mMessageQueue2, (OSMessage)(intptr_t)id, OS_MESSAGE_NOBLOCK);
}
s32 JKRDvdFile::getFileSize(void) const {
+1 -1
View File
@@ -386,7 +386,7 @@ JKRHeap* JKRHeap::findAllHeap(void* ptr) const {
return NULL;
}
void JKRHeap::dispose_subroutine(u32 begin, u32 end) {
void JKRHeap::dispose_subroutine(uintptr_t begin, uintptr_t end) {
JSUListIterator<JKRDisposer> next_iterator((JSULink<JKRDisposer>*)NULL);
JSUListIterator<JKRDisposer> it = mDisposerList.getFirst();
while (it != mDisposerList.getEnd()) {
+1 -1
View File
@@ -178,7 +178,7 @@ void JUTVideo::postRetraceProc(u32 retrace_count) {
sManager->mPostCallback(retrace_count);
}
OSSendMessage(&sManager->mMessageQueue, (OSMessage)VIGetRetraceCount(), OS_MESSAGE_NOBLOCK);
OSSendMessage(&sManager->mMessageQueue, (OSMessage)(uintptr_t)VIGetRetraceCount(), OS_MESSAGE_NOBLOCK);
}
void JUTVideo::setRenderMode(GXRenderModeObj const* pObj) {
+1 -1
View File
@@ -454,7 +454,7 @@ f32 Z2SpotMic::calcMicVolume(f32 param_0, int camID, f32 param_2) {
JUT_ASSERT(687, camID >= 0);
JUT_ASSERT(688, camID < 1);
if (mMicOn == NULL) {
if (mMicOn == false) {
return param_2;
}
+10 -10
View File
@@ -718,11 +718,11 @@ void Z2SoundObjBeeGroup::playBeeGroupSound(JAISoundID soundID, u8 param_1) {
Z2SoundHandlePool* handle1 = startLevelSound((u32)soundID, 0, -1);
Z2SoundHandlePool* handle2 = startLevelSound(sound_id2, 0, -1);
if (handle1 != NULL && *handle1 != NULL) {
if (handle1 != NULL && *handle1 != false) {
f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 5.0f, 0.5f, 1.0f, false);
(*handle1)->getAuxiliary().moveVolume(volume, 0);
}
if (handle2 != NULL && *handle2 != NULL) {
if (handle2 != NULL && *handle2 != false) {
f32 volume = Z2Calc::linearTransform(param_1, 1.0f, 20.0f, 0.1f, 1.0f, false);
(*handle2)->getAuxiliary().moveVolume(volume, 0);
}
@@ -924,28 +924,28 @@ Z2SoundHandlePool* Z2CreatureOI::startCreatureSoundLevel(JAISoundID soundID, u32
f32 pitch = Z2Calc::getParamByExp(mapinfo, 0.0f, 42.0f, 0.4f, 0.9f, 1.1f,
Z2Calc::CURVE_POSITIVE);
if (handle1 != NULL && *handle1 != NULL) {
if (handle1 != NULL && *handle1 != false) {
(*handle1)->getAuxiliary().moveVolume(volume, 0);
(*handle1)->getAuxiliary().movePitch(pitch, 0);
} else {
return NULL;
}
if (handle2 != NULL && *handle2 != NULL) {
if (handle2 != NULL && *handle2 != false) {
(*handle2)->getAuxiliary().moveVolume(volume, 0);
(*handle2)->getAuxiliary().movePitch(pitch, 0);
} else {
return NULL;
}
if (handle3 != NULL && *handle3 != NULL) {
if (handle3 != NULL && *handle3 != false) {
(*handle3)->getAuxiliary().moveVolume(volume, 0);
(*handle3)->getAuxiliary().movePitch(pitch, 0);
} else {
return NULL;
}
if (handle4 != NULL && *handle4 != NULL) {
if (handle4 != NULL && *handle4 != false) {
(*handle4)->getAuxiliary().moveVolume(volume, 0);
(*handle4)->getAuxiliary().movePitch(pitch, 0);
return handle4;
@@ -979,7 +979,7 @@ Z2SoundHandlePool* Z2CreatureOI::startTentacleSoundLevel(JAISoundID soundID, u8
}
static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
if (handle != NULL && *handle != NULL) {
if (handle != NULL && *handle != false) {
f32 pitch = 1.0f;
switch (mapinfo) {
case 1:
@@ -994,7 +994,7 @@ static void Z2_E_sw_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
}
static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) {
if (handle != NULL && *handle != NULL) {
if (handle != NULL && *handle != false) {
f32 var_f31 = 0.2f;
if (mapinfo == 1) {
(*handle)->getAuxiliary().moveVolume(var_f31, 0);
@@ -1003,7 +1003,7 @@ static void Z2_E_ms_modVol(Z2SoundHandlePool* handle, u32 mapinfo) {
}
static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
if (handle != NULL && *handle != NULL) {
if (handle != NULL && *handle != false) {
f32 var_f31 = 0.7f;
if (mapinfo == 3) {
(*handle)->getAuxiliary().movePitch(var_f31, 0);
@@ -1012,7 +1012,7 @@ static void Z2_E_mm_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
}
static void Z2_B_zan_modPitch(Z2SoundHandlePool* handle, u32 mapinfo) {
if (handle != NULL && *handle != NULL) {
if (handle != NULL && *handle != false) {
f32 pitch = 1.0f;
f32 volume = 1.0f;
if (mapinfo > 400) {
+8 -8
View File
@@ -164,7 +164,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startLevelSound(JAISoundID soundID, u32 mapin
if (handle != NULL) {
soundStarter_->startSound(soundID, handle, pos_, mapinfo, fxMix,
1.0f, 1.0f, -1.0f, -1.0f, 0);
if (handle != NULL && (*handle) != NULL) {
if (handle != NULL && (*handle) != false) {
(*handle)->setLifeTime(1, false);
#if PLATFORM_WII || PLATFORM_SHIELD
@@ -210,7 +210,7 @@ Z2SoundHandlePool* Z2SoundObjBase::startCollisionSE(u32 hitID, u32 mapinfo, Z2So
}
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(JAISoundID(hitID), mapinfo, -1);
if (handle != NULL && (*handle) != NULL) {
if (handle != NULL && (*handle) != false) {
(*handle)->setUserData(mapinfo);
if (30 <= mapinfo && mapinfo <= 52) {
Z2Audible* audible = (Z2Audible*)(*handle)->getAudible();
@@ -251,7 +251,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startSound(JAISoundID soundID, u32 map
pos_ = NULL;
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb);
if (pos != NULL && handle != NULL && (*handle) != NULL) {
if (pos != NULL && handle != NULL && (*handle) != false) {
if ((*handle)->acceptsNewAudible()) {
(*handle)->newAudible(*pos, &field_0x20, 0, NULL);
}
@@ -266,7 +266,7 @@ Z2SoundHandlePool* Z2DopplerSoundObjBase::startLevelSound(JAISoundID soundID, u3
pos_ = NULL;
Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb);
if (pos != NULL && handle != NULL && (*handle) != NULL) {
if (pos != NULL && handle != NULL && (*handle) != false) {
if ((*handle)->acceptsNewAudible()) {
(*handle)->newAudible(*pos, &field_0x20, 0, NULL);
}
@@ -285,7 +285,7 @@ void Z2SoundObjSimple::init(Vec* posPtr, u8 handleNum) {
Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo, s8 reverb) {
Z2SoundHandlePool* handle = Z2SoundObjBase::startSound(soundID, mapinfo, reverb);
if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != NULL) {
if (soundID == Z2SE_AL_UKI_POKOPOKO && handle != NULL && (*handle) != false) {
f32 volume = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.4f, 1.0f, Z2Calc::CURVE_POSITIVE);
f32 pitch = Z2Calc::getParamByExp((f32)mapinfo, 0.0f, 127.0f, 0.2f, 0.6f, 1.2f, Z2Calc::CURVE_POSITIVE);
(*handle)->getAuxiliary().movePitch(pitch, 0);
@@ -298,7 +298,7 @@ Z2SoundHandlePool* Z2SoundObjSimple::startSound(JAISoundID soundID, u32 mapinfo,
Z2SoundHandlePool* Z2SoundObjSimple::startLevelSound(JAISoundID soundID, u32 mapinfo, s8 reverb) {
Z2SoundHandlePool* handle = Z2SoundObjBase::startLevelSound(soundID, mapinfo, reverb);
if (handle != NULL && (*handle) != NULL) {
if (handle != NULL && (*handle) != false) {
f32 pitch = 1.0f;
f32 volume = 1.0f;
switch (soundID) {
@@ -502,7 +502,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3<f32>& pos, f32 para
u32 id = getSoundID(animationSound, pos, param_1);
if (!Z2GetSeMgr()->isSoundCulling(id)) {
JAISoundHandle* handle = getHandleUserData(user_data);
if (handle != NULL && (*handle) != NULL && (*handle)->getAnimationState() != 1) {
if (handle != NULL && (*handle) != false && (*handle)->getAnimationState() != 1) {
handle = NULL;
}
@@ -514,7 +514,7 @@ void Z2SoundObjAnime::startSoundInner(const JGeometry::TVec3<f32>& pos, f32 para
bool result = soundStarter->startSound(id, handle, &pos, mapinfo, (f32)reverb / 127.0f,
animationSound->field_0x0c, (f32)animationSound->field_0x14 / 127.0f,
-1.0f, -1.0f, 0);
if ((*handle) != NULL) {
if ((*handle) != false) {
(*handle)->setAnimationState(1);
(*handle)->setUserData(user_data);
if (animationSound->setsLifeTime()) {
+1 -1
View File
@@ -916,7 +916,7 @@ BOOL cCc_Check() {
BOOL rt = TRUE;
for (int i = 0; i < ARRAY_SIZEU(DynamicNameTable); i++) {
uintptr_t ptr = (uintptr_t)DMC[i];
if (ptr != NULL) {
if (ptr != 0) {
u32 ptr_hi_byte = ptr >> 0x18;
if (ptr_hi_byte < 0x80 || ptr_hi_byte > 0x83) {
// "cCc_Check invalid pointer detected"
+1 -1
View File
@@ -3082,7 +3082,7 @@ cXyz* daAlink_c::getNeckAimPos(cXyz* param_0, int* param_1, int param_2) {
}
} else if (field_0x35c4.abs2XZ() > 1.0f && checkModeFlg(1)) {
f32 var_f31;
if (checkWolf() != NULL) {
if (checkWolf() != 0) {
var_f31 = 80.0f;
} else {
var_f31 = 150.0f;
+2 -2
View File
@@ -113,11 +113,11 @@ int daCoachFire_c::execute() {
dAttention_c* attn = dComIfGp_getAttention();
if (attn->LockonTruth()) {
if (attn->LockonTarget(0) != this) {
if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) {
if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) {
fopAcM_delete(this);
}
}
} else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != NULL) {
} else if (coach->deleteFireArrowFromList(fopAcM_GetID(this)) != false) {
fopAcM_delete(this);
}
}
+2 -2
View File
@@ -1380,7 +1380,7 @@ int daDoor20_c::createKey() {
}
field_0x5ec =
fopAcM_createChildFromOffset(PROC_Obj_Lv5Key, fopAcM_GetID(this), 0xffffffff,
&cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0);
&cStack_28, roomNo, &cStack_30, &scale, -1, 0);
break;
default:
OSReport_Error("シャッタードア:鍵タイプが不明です\n"); // Shutter door: key type unknown
@@ -1399,7 +1399,7 @@ int daDoor20_c::createKey() {
}
field_0x5ec =
fopAcM_createChildFromOffset(PROC_OBJ_KEYHOLE, fopAcM_GetID(this), 0xffffffff,
&cStack_28, roomNo, &cStack_30, &scale, 0xffffffff, 0);
&cStack_28, roomNo, &cStack_30, &scale, -1, 0);
}
current.pos = prevPos;
+1 -1
View File
@@ -330,7 +330,7 @@ static void e_arrow_spin(e_arrow_class* i_this) {
}
static void* s_limit_sub(void* i_actor, void* i_data) {
if (fopAcM_IsActor(i_actor) != NULL && i_actor != i_data &&
if (fopAcM_IsActor(i_actor) != FALSE && i_actor != i_data &&
fopAcM_GetName(i_actor) == PROC_E_ARROW &&
static_cast<e_arrow_class*>(i_actor)->mAction == ACTION_ARROW_FIRE &&
fabsf(static_cast<e_arrow_class*>(i_actor)->field_0xa00.z -
+1 -1
View File
@@ -93,7 +93,7 @@ int daE_BG_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
}
int daE_BG_c::JointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daE_BG_c* bg = (daE_BG_c*)model->getUserArea();
if (bg != NULL) {
+1 -1
View File
@@ -659,7 +659,7 @@ int daE_DF_c::Create() {
return cPhs_ERROR_e;
}
if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == NULL) {
if (fopAcM_entrySolidHeap(this, useHeapInit, 0x1a40) == false) {
return cPhs_ERROR_e;
}
+1 -1
View File
@@ -93,7 +93,7 @@ int daE_GI_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
}
int daE_GI_c::JointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daE_GI_c* a_this = (daE_GI_c*)model->getUserArea();
+2 -2
View File
@@ -119,7 +119,7 @@ int daE_HP_c::ctrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
}
int daE_HP_c::JointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daE_HP_c* poe = (daE_HP_c*)model->getUserArea();
if (poe != NULL) {
@@ -155,7 +155,7 @@ int daE_HP_c::LampCtrlJoint(J3DJoint* i_joint, J3DModel* i_model) {
}
int daE_HP_c::LampJointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daE_HP_c* poe = (daE_HP_c*)model->getUserArea();
if (poe != NULL) {
+1 -1
View File
@@ -382,7 +382,7 @@ void daFmtMng_c::create_init() {
for (int i = 0; i < mFormationLine * mFormationRow; i++, member++) {
member->mNpcId = fopAcM_createChild(0x294, fopAcM_GetID(this), (inTime << 0x10) | 0x200,
&member->field_0x04, fopAcM_GetRoomNo(this),
&home.angle, NULL, 0xffffffff, NULL);
&home.angle, NULL, -1, NULL);
}
}
+14 -14
View File
@@ -188,7 +188,7 @@ bool daKago_c::checkBck(int param_0) {
}
int daKago_c::draw() {
if (field_0x6de == NULL) {
if (field_0x6de == 0) {
return 1;
}
@@ -692,7 +692,7 @@ int daKago_c::setSceneChange(int param_0) {
void daKago_c::createBalloonScore() {
if (field_0x6e7 != 0 && mBalloon2DId == fpcM_ERROR_PROCESS_ID_e) {
mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, 0, 0xffffffff, 0, 0, 0xffffffff);
mBalloon2DId = fopAcM_create(PROC_BALLOON2D, 0, 0, 0xffffffff, 0, 0, -1);
field_0x6e9 = 1;
}
}
@@ -1199,7 +1199,7 @@ void daKago_c::executeFly() {
}
if (field_0x744 == 3) {
cLib_chaseUC(&field_0x6de, 0, 4);
cLib_addCalcAngleS(&current.angle.x, 0xffffe000, 8, 0x100, 0x10);
cLib_addCalcAngleS(&current.angle.x, -8192, 8, 0x100, 0x10);
} else {
cLib_addCalcAngleS(&current.angle.x, unkInt2, 8, 0x100, 0x10);
}
@@ -2230,7 +2230,7 @@ bool daKago_c::PerchDemoAwayForward() {
if (field_0x728 < 30) {
cLib_addCalcAngleS(&current.angle.x, 0, 8, 0x100, 0x40);
} else {
cLib_addCalcAngleS(&current.angle.x, 0xffffe000, 8, 0x100, 0x40);
cLib_addCalcAngleS(&current.angle.x, -8192, 8, 0x100, 0x40);
}
shape_angle.x = current.angle.x;
@@ -2277,7 +2277,7 @@ bool daKago_c::PerchDemoAwayForward() {
cLib_chaseF(&field_0x6f8, 30.0f, 1.0f);
cLib_addCalcAngleS(&current.angle.x, 0xffffe000, 8, 0x100, 0x40);
cLib_addCalcAngleS(&current.angle.x, -8192, 8, 0x100, 0x40);
shape_angle.x = current.angle.x;
shape_angle.y = current.angle.y;
@@ -2547,7 +2547,7 @@ bool daKago_c::executeFirstDemo() {
if (field_0x728 > 30) {
cLib_chaseF(&field_0x6cc, 350.0f, 4.0f);
cLib_addCalcAngleS(&field_0x718, 0xfffff800, 8, 0x100, 0x10);
cLib_addCalcAngleS(&field_0x718, -2048, 8, 0x100, 0x10);
} else {
cLib_chaseF(&field_0x6cc, 350.0f, 6.0f);
cLib_addCalcAngleS(&field_0x718, 0x400, 8, 0x200, 0x10);
@@ -2699,7 +2699,7 @@ bool daKago_c::executeFirstDemo() {
case 6:
dComIfGp_getEvent()->setSkipProc(this, DemoSkipCallBack, 2);
cLib_addCalcAngleS(&current.angle.x, 0xffffe000, 8, 0x100, 0x40);
cLib_addCalcAngleS(&current.angle.x, -8192, 8, 0x100, 0x40);
shape_angle.x = current.angle.x;
shape_angle.y = current.angle.y;
@@ -2944,7 +2944,7 @@ void daKago_c::executeLandingLakeHairia() {
speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x));
speed.y = -field_0x6f8 * cM_ssin(current.angle.x);
cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x100);
cLib_chaseAngleS(&shape_angle.x, -8192, 0x100);
current.angle.x = shape_angle.x;
if (field_0x728 == 90) {
@@ -3078,7 +3078,7 @@ void daKago_c::executeLandingBoartHouse() {
speedF = field_0x6f8 * std::abs(cM_scos(current.angle.x));
speed.y = -field_0x6f8 * cM_ssin(current.angle.x);
cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x100);
cLib_chaseAngleS(&shape_angle.x, -8192, 0x100);
current.angle.x = shape_angle.x;
if (field_0x728 == 0x50) {
@@ -3391,7 +3391,7 @@ void daKago_c::setDashBlurEffect(int param_0) {
field_0x6be.y = shape_angle.y;
field_0x6be.z = 0;
}
field_0xb40 = dComIfGp_particle_set(field_0xb40, 0x860f, &cameraEyeOffset, &tevStr, &field_0x6be, 0, 0xff, 0, 0xffffffff, 0, 0, 0);
field_0xb40 = dComIfGp_particle_set(field_0xb40, 0x860f, &cameraEyeOffset, &tevStr, &field_0x6be, 0, 0xff, 0, -1, 0, 0, 0);
}
void daKago_c::setWallHitEffect(cXyz param_0, int param_1) {
@@ -3422,7 +3422,7 @@ void daKago_c::setSibukiEffect() {
for (int i = 0; i < 3; i++) {
field_0xb44[i] =
dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30,
0, 0xff, 0, 0xffffffff, 0, 0, 0);
0, 0xff, 0, -1, 0, 0, 0);
}
if (field_0x6e7 == 0) {
@@ -3436,7 +3436,7 @@ void daKago_c::setDashSibukiEffect() {
cXyz acStack_20(current.pos.x, field_0x70c + l_HIO.mYOffsetFromWaterSurface, current.pos.z);
csXyz cStack_28(0, shape_angle.y, 0);
field_0xb50 = dComIfGp_particle_set(field_0xb50, 0x86fe, &acStack_20, &tevStr, &cStack_28, 0,
0xff, 0, 0xffffffff, 0, 0, 0);
0xff, 0, -1, 0, 0, 0);
}
void daKago_c::setWaterFallEffect() {
@@ -3450,7 +3450,7 @@ void daKago_c::setWaterFallEffect() {
for (int i = 0; i < 2; i++) {
field_0xb44[i] =
dComIfGp_particle_set(field_0xb44[i], kago_wave_id[i], &acStack_28, &tevStr, &cStack_30,
0, 0xff, 0, 0xffffffff, 0, 0, 0);
0, 0xff, 0, -1, 0, 0, 0);
}
if (field_0x6e7 == 0) {
mSound.startCreatureSoundLevel(Z2SE_EN_YC_SPLASH, 0, -1);
@@ -3734,7 +3734,7 @@ int daKago_c::ctrlJoint(J3DJoint* param_0, J3DModel* param_1) {
}
int daKago_c::JointCallBack(J3DJoint* param_0, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daKago_c* kago = (daKago_c*)model->getUserArea();
if (kago != NULL) {
+1 -1
View File
@@ -3719,7 +3719,7 @@ BOOL daMP_WaitUntilPrepare() {
}
void daMP_PrepareReady(BOOL msg) {
OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)msg, 1);
OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)(uintptr_t)msg, 1);
}
static BOOL daMP_THPPlayerPrepare(s32 frame, s32 flag, s32 audioTrack) {
+1 -1
View File
@@ -97,7 +97,7 @@ int daNbomb_c::searchEnemy(fopAc_ac_c* i_enemy) {
static void* daNbomb_searchEnemy(fopAc_ac_c* i_actor, void* i_data) {
if (fopAcM_GetGroup(i_actor) == fopAc_ENEMY_e &&
((daNbomb_c*)i_data)->searchEnemy(i_actor) != NULL)
((daNbomb_c*)i_data)->searchEnemy(i_actor) != 0)
{
return i_actor;
}
+2 -2
View File
@@ -362,7 +362,7 @@ int daNpcChin_c::CreateHeap() {
setMotionAnm(motionAnmParam, 0.0f);
if (field_0xe24 != 0 && mSpotLight.loadModel() == NULL) {
if (field_0xe24 != 0 && mSpotLight.loadModel() == 0) {
return 0;
}
@@ -439,7 +439,7 @@ int daNpcChin_c::createHeapCallBack(fopAc_ac_c* i_this) {
}
int daNpcChin_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daNpcChin_c* chin = (daNpcChin_c*)model->getUserArea();
if (chin != NULL) {
+1 -1
View File
@@ -1791,7 +1791,7 @@ int daNpc_Hanjo_c::takayose(void* param_0) {
}
}
}
if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit() != NULL) {
if (daPy_py_c::checkNowWolf() && mCyl2.ChkCoHit() != 0) {
if (!daPy_getPlayerActorClass()->checkPlayerFly() ||
daPy_getPlayerActorClass()->checkAutoJump() ||
daPy_getPlayerActorClass()->checkWolfTriggerJump())
+1 -1
View File
@@ -2498,7 +2498,7 @@ static int daNpc_Henna_Execute(npc_henna_class* i_this) {
mDoMtx_stack_c::transS(-460.0f + AREG_F(0), 51.0f + AREG_F(1),
-240.0f + AREG_F(2));
mDoMtx_stack_c::YrotM(-17729 + AREG_S(0));
mDoMtx_stack_c::XrotM(AREG_S(1) - 0x8107);
mDoMtx_stack_c::XrotM((s16)(AREG_S(1) - 0x8107));
mDoMtx_stack_c::ZrotM(AREG_S(2) + 2000 + sp_0xe);
} else {
mDoMtx_stack_c::transS(-790.0f + AREG_F(0), 153.0f + AREG_F(1),
+1 -1
View File
@@ -4965,7 +4965,7 @@ int daNpc_Kn_c::setPrtcl() {
mParticleMngr[i].mpModel == true ? &mParticleMngr[i].mAngle : NULL,
0, fopAcM_GetRoomNo(this), 0.0f, speedF);
if (mParticleMngr[i].mpModel != NULL) {
if (mParticleMngr[i].mpModel != false) {
emitter = mParticleMngr[i].mManager.getCenterEmitter(0, 0);
if (emitter != NULL) {
switch (i) {
+1 -1
View File
@@ -421,7 +421,7 @@ int daNpcRafrel_c::createHeapCallBack(fopAc_ac_c* i_this) {
}
int daNpcRafrel_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* mdl_p = j3dSys.getModel();
daNpcRafrel_c* i_this = (daNpcRafrel_c*)mdl_p->getUserArea();
+4 -4
View File
@@ -1340,7 +1340,7 @@ void daNPC_TK_c::executeBack() {
if (current.pos.y > unkXyz1.y) {
cLib_chaseAngleS(&shape_angle.x, 0x2000, 0x400);
} else {
cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x400);
cLib_chaseAngleS(&shape_angle.x, -8192, 0x400);
}
} else {
cLib_chaseAngleS(&field_0x69c, 0x200, 0x10);
@@ -1379,7 +1379,7 @@ void daNPC_TK_c::executeBack() {
if (current.pos.y > unkXyz1.y) {
cLib_chaseAngleS(&shape_angle.x, 0x2000, 0x400);
} else {
cLib_chaseAngleS(&shape_angle.x, 0xffffe000, 0x400);
cLib_chaseAngleS(&shape_angle.x, -8192, 0x400);
}
} else {
cLib_chaseAngleS(&field_0x69c, 0x200, 0x10);
@@ -2456,7 +2456,7 @@ void daNPC_TK_c::executeWolfPerch() {
void daNPC_TK_c::executeResistanceDemo() {
daNpcMoiR_c* npcMoiR;
if (fopAcM_SearchByName(PROC_NPC_MOIR, (fopAc_ac_c**)&npcMoiR) == NULL || npcMoiR == NULL) {
if (fopAcM_SearchByName(PROC_NPC_MOIR, (fopAc_ac_c**)&npcMoiR) == 0 || npcMoiR == NULL) {
return;
}
@@ -2623,7 +2623,7 @@ void daNPC_TK_c::executeResistanceDemo() {
// fallthrough
case 8: {
cLib_addCalcAngleS2(&field_0x6a2, 0xffffdc00, 8, 0x200);
cLib_addCalcAngleS2(&field_0x6a2, -9216, 8, 0x200);
cLib_addCalcAngleS2(&field_0x6a0, 0x1000, 8, 0x200);
cLib_addCalcAngleS2(&field_0x6aa, 0x2000, 8, 0x200);
+1 -1
View File
@@ -176,7 +176,7 @@ static void Wind_effect(npc_tkj2_class* i_this) {
if ((s16)(sVar1 - i_this->field_0x5c4) < 0) {
cLib_addCalcAngleS(&a_this->shape_angle.z, 0x2000, 0x10, 0x1000, 0);
} else {
cLib_addCalcAngleS(&a_this->shape_angle.z, 0xFFFFE000, 2, 0x1000, 0);
cLib_addCalcAngleS(&a_this->shape_angle.z, -8192, 2, 0x1000, 0);
}
}
+4 -4
View File
@@ -904,12 +904,12 @@ int daNpc_Uri_c::selectAction() {
switch (mType) {
case TYPE_1:
if (field_0x100d != NULL) {
if (field_0x100d != 0) {
field_0xfc0[0] = &daNpc_Uri_c::sitWait;
} else {
if (field_0x100e != NULL) {
if (field_0x100e != 0) {
/* T_0007 - Ordon Village - During Uli's pick-up tutorial */
if (daNpcT_chkTmpBit(7) && field_0x100f == NULL) {
if (daNpcT_chkTmpBit(7) && field_0x100f == 0) {
field_0xfc0[0] = &daNpc_Uri_c::walk;
} else {
field_0xfc0[0] = &daNpc_Uri_c::wait;
@@ -981,7 +981,7 @@ int daNpc_Uri_c::getTutorialCond(cXyz param_1) {
field_0x1000 = mpHIO->m.field_0xa8 - 100.0f;
return 5;
}
if (field_0x1009 != NULL) {
if (field_0x1009 != 0) {
return 8;
}
}
+1 -1
View File
@@ -462,7 +462,7 @@ int daNpc_ykW_c::createHeapCallBack(fopAc_ac_c* i_this) {
}
int daNpc_ykW_c::ctrlJointCallBack(J3DJoint* i_joint, int param_1) {
if (param_1 == NULL) {
if (param_1 == 0) {
J3DModel* model = j3dSys.getModel();
daNpc_ykW_c* ykw = (daNpc_ykW_c*)model->getUserArea();
if (ykw != 0) {
+1 -1
View File
@@ -253,7 +253,7 @@ int daObjAvalanche_c::demoProc() {
void daObjAvalanche_c::setEffect() {
cXyz acStack_18(0.0f, 0.0f, 0.0f);
csXyz cStack_20(0, 0, 0);
dComIfGp_particle_set(0x8c51, &acStack_18, &cStack_20, NULL, 0xff, NULL, 0xffffffff, NULL, NULL,
dComIfGp_particle_set(0x8c51, &acStack_18, &cStack_20, NULL, 0xff, NULL, -1, NULL, NULL,
NULL);
}
+4 -4
View File
@@ -186,8 +186,8 @@ int daObjMarm_c::Create() {
mIsYRotForward = 0;
}
if (dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW1, this) != NULL ||
dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW2, this) != NULL)
if (dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW1, this) != false ||
dComIfG_Bgsp().Regist((dBgW_Base*)mpBgW2, this) != false)
{
return FALSE;
}
@@ -1060,11 +1060,11 @@ void daObjMarm_c::debugDraw() {
}
int daObjMarm_c::Delete() {
if (mpBgW1 != NULL && mpBgW1->ChkUsed() != NULL) {
if (mpBgW1 != NULL && mpBgW1->ChkUsed() != false) {
dComIfG_Bgsp().Release(mpBgW1);
}
if (mpBgW2 != NULL && mpBgW2->ChkUsed() != NULL) {
if (mpBgW2 != NULL && mpBgW2->ChkUsed() != false) {
dComIfG_Bgsp().Release(mpBgW2);
}
endMagneHoleEffect();
+1 -1
View File
@@ -712,7 +712,7 @@ void dBgS::MoveBgMatrixCrrPos(cBgS_PolyInfo const& i_poly, bool param_1, cXyz* i
void dBgS_MoveBGProc_Typical(dBgW* i_bgw, void* i_actor_ptr, cBgS_PolyInfo const& i_poly,
bool param_3, cXyz* i_pos, csXyz* i_angle, csXyz* i_shapeAngle) {
Mtx m;
if (i_bgw->GetOldInvMtx(m) != NULL) {
if (i_bgw->GetOldInvMtx(m) != 0) {
cXyz move_old;
MTXMultVec(m, i_pos, &move_old);
+1 -1
View File
@@ -10131,7 +10131,7 @@ bool dCamera_c::eventCamera(s32 param_0) {
}
int* sp90_i;
if (getEvStringData(sp90, "Trim", "DEFAULT") != NULL) {
if (getEvStringData(sp90, "Trim", "DEFAULT") != false) {
sp90_i = (int*)sp90;
if (*sp90_i == 'STAN') {
mEventData.field_0x1c = 0;
+1 -1
View File
@@ -3134,7 +3134,7 @@ bool dCamera_c::useItem1EvCamera() {
if (item_p->field_0x20 < item_p->field_0x4) break;
if (data_list[item_p->mType][1].field_0x08 != NULL && item_p->field_0x1c == 0) {
if (data_list[item_p->mType][1].field_0x08 != 0 && item_p->field_0x1c == 0) {
item_p->field_0x1c = 1;
item_p->field_0x0 = 1;
break;
+2 -2
View File
@@ -2540,9 +2540,9 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) {
color_reg0.b = 0;
f32 size = 8000.0f;
if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == NULL) {
if (strcmp(dComIfGp_getStartStageName(), "F_SP127") == 0) {
size = 11000.0f;
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == NULL) {
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP200") == 0) {
size = 10000.0f;
}
+1 -1
View File
@@ -2270,7 +2270,7 @@ bool dMenu_Fmap_c::readFieldMapData(void** o_data, char const* i_path, bool para
}
void dMenu_Fmap_c::decodeFieldMapData() {
int field_data = (intptr_t)mpFieldDat;
intptr_t field_data = (intptr_t)mpFieldDat;
dMenu_Fmap_field_region_data_c* region_data
= (dMenu_Fmap_field_region_data_c*)(field_data + mpFieldDat->mRegionDataOffset);
dMenuMapCommon_c::Stage_c* stage_data
+1 -1
View File
@@ -290,7 +290,7 @@ void dMenu_ItemExplain_c::move() {
if (status != mStatus) {
(this->*init_process[mStatus])();
}
if (mStatus != NULL) {
if (mStatus != 0) {
mpInfoScreen->animation();
}
if (g_ringHIO.mItemDescAlpha != mDescAlpha) {
+3 -3
View File
@@ -1484,12 +1484,12 @@ void dMenu_Option_c::screenSet() {
}
}
for (int i = 0; i < 6; i++) {
if (let2_n[i] != NULL) {
if (let2_n[i] != 0) {
mpMenuPane3[i] = new CPaneMgr(mpClipScreen, let2_n[i], 0, NULL);
} else {
mpMenuPane3[i] = NULL;
}
if (menu3_n[i] != NULL) {
if (menu3_n[i] != 0) {
mpMenuPane32[i] = new CPaneMgr(mpClipScreen, menu3_n[i], 0, NULL);
} else {
mpMenuPane32[i] = NULL;
@@ -1720,7 +1720,7 @@ void dMenu_Option_c::screenSet() {
field_0x1c0[i] = 0;
}
for (int i = 0; i < 3; i++) {
if (z_tx[i] != NULL) {
if (z_tx[i] != 0) {
mpZButtonText[i] = new CPaneMgr(mpBackScreen, z_tx[i], 2, NULL);
} else {
mpZButtonText[i] = NULL;
+1 -1
View File
@@ -1602,7 +1602,7 @@ s32 dPa_control_c::getPolyColor(cBgS_PolyInfo& param_0, int param_1, _GXColor* p
return 0;
}
if (param_1 == NULL) {
if (param_1 == 0) {
dKy_pol_eff_prim_get(&param_0, param_2);
dKy_pol_eff_env_get(&param_0, param_3);
*param_4 = dKy_pol_eff_alpha_get(&param_0);
+1 -1
View File
@@ -54,7 +54,7 @@ int dRes_info_c::set(char const* i_arcName, char const* i_path, u8 i_mountDirect
JUT_ASSERT(120, strlen(i_arcName) <= NAME_MAX);
#endif
if (*i_path != NULL) {
if (*i_path != '\0') {
char path[40];
snprintf(path, sizeof(path), "%s%s.arc", i_path, i_arcName);
mDMCommand = mDoDvdThd_mountArchive_c::create(path, i_mountDirection, i_heap);
+1 -1
View File
@@ -554,7 +554,7 @@ static int phase_3(dScnPly_c* i_this) {
return cPhs_INIT_e;
}
if (!i_this->field_0x1d0 == NULL && !i_this->field_0x1d0->sync()) {
if (i_this->field_0x1d0 != NULL && !i_this->field_0x1d0->sync()) {
return cPhs_INIT_e;
}
+1 -1
View File
@@ -329,7 +329,7 @@ static int phase_1(room_of_scene_class* i_this) {
} else {
stage_stag_info_class* stagInfo = dComIfGp_getStage()->getStagInfo();
if (dStage_staginfo_GetArchiveHeap(stagInfo) != NULL) {
if (dStage_staginfo_GetArchiveHeap(stagInfo) != FALSE) {
heap = mDoExt_getArchiveHeap();
}
}
+1 -1
View File
@@ -2725,7 +2725,7 @@ void dStage_Delete() {
OS_REPORT("dStage_Delete\n");
char* demoArcName = dStage_roomControl_c::getDemoArcName();
if (*demoArcName != NULL) {
if (*demoArcName != '\0') {
dComIfG_deleteObjectResMain(demoArcName);
}
+2 -2
View File
@@ -29,14 +29,14 @@ fpc_ProcID fopScnM_DeleteReq(scene_class* i_scene) {
return fopScnRq_Request(1, i_scene, 0x7FFF, NULL, 0x7FFF, 0) != fpcM_ERROR_PROCESS_ID_e;
}
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, u32 i_data) {
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, uintptr_t i_data) {
printf("[DIAG] fopScnM_CreateReq: procName=%d fade=%d\n", i_procName, param_2); fflush(stdout);
fpc_ProcID result = fopScnRq_Request(0, 0, i_procName, (void*)i_data, param_2, param_3);
printf("[DIAG] fopScnM_CreateReq: result=%d (error=%d)\n", result, fpcM_ERROR_PROCESS_ID_e); fflush(stdout);
return result != fpcM_ERROR_PROCESS_ID_e;
}
u32 fopScnM_ReRequest(s16 i_procName, u32 i_data) {
u32 fopScnM_ReRequest(s16 i_procName, uintptr_t i_data) {
if (l_scnRqID == fpcM_ERROR_PROCESS_ID_e) {
return 0;
}
+3 -2
View File
@@ -6,6 +6,7 @@
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_layer_iter.h"
#include <cstdint>
int fpcPause_IsEnable(void* i_proc, u8 i_flag) {
if ((((base_process_class*)i_proc)->pause_flag & i_flag) == i_flag) {
@@ -20,7 +21,7 @@ int fpcPause_Enable(void* i_proc, u8 i_flag) {
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
(void*)i_flag);
(void*)(uintptr_t)i_flag);
}
return 1;
}
@@ -30,7 +31,7 @@ int fpcPause_Disable(void* i_proc, u8 i_flag) {
((base_process_class*)i_proc)->pause_flag &= var_r31;
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)(uintptr_t)i_flag);
}
return 1;
+1 -1
View File
@@ -99,7 +99,7 @@ void mDoRst_reset(int reset, u32 resetCode, int forceMenu) {
}
void checkDiskCallback(s32 result, DVDCommandBlock* block) {
block->userData = (void*)result;
block->userData = (void*)(intptr_t)result;
}
void mDoRst_resetCallBack(int port, void*) {
+1 -1
View File
@@ -3713,7 +3713,7 @@ J3DModel* mDoExt_J3DModel__create(J3DModelData* i_modelData, u32 i_modelFlag, u3
bool hasSharedDlistObj =
i_modelData->getMaterialNodePointer(0)->getSharedDisplayListObj() != NULL;
// Update the modelFlag if the model data passed in has a shared dlist object
if (hasSharedDlistObj != NULL) {
if (hasSharedDlistObj != false) {
if (i_modelData->isLocked()) {
i_modelFlag = J3DMdlFlag_UseSharedDL;
} else if (i_modelFlag == J3DMdlFlag_UseSharedDL) {
+1 -1
View File
@@ -586,7 +586,7 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
JUTException* manager = JUTException::getManager();
JUTConsole* exConsole = manager->getConsole();
u32 srr0 = p_context->srr0 & -4;
uintptr_t srr0 = p_context->srr0 & -4;
if (srr0 >= 0x8000000C && srr0 < 0x82FFFFFF) {
exConsole->print_f("(SRR0-3):%08X %08X %08X %08X\n", *(u32*)(srr0 - 0xC),
*(u32*)(srr0 - 0x8), *(u32*)(srr0 - 0x4), *(u32*)srr0);