diff --git a/include/JSystem/JAudio2/JASTrack.h b/include/JSystem/JAudio2/JASTrack.h index a5eac30c6db..f55e20c964f 100644 --- a/include/JSystem/JAudio2/JASTrack.h +++ b/include/JSystem/JAudio2/JASTrack.h @@ -181,7 +181,7 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded { /* 0x000 */ JASSeqCtrl mSeqCtrl; /* 0x05C */ JASTrackPort mTrackPort; /* 0x080 */ JASRegisterParam mRegisterParam; - /* 0x09C */ union { + /* 0x09C */ union MoveParam_u { struct { MoveParam_ volume; MoveParam_ pitch; @@ -191,6 +191,7 @@ struct JASTrack : public JASPoolAllocObject_MultiThreaded { MoveParam_ distFilter; } params; MoveParam_ array[6]; + MoveParam_u() {} } mMoveParam; /* 0x0e4 */ JASOscillator::Data mOscParam[2]; /* 0x114 */ JASOscillator::Point mOscPoint[4]; diff --git a/include/JSystem/JGadget/binary.h b/include/JSystem/JGadget/binary.h index 93b2a9c008c..fc6c2641fbf 100644 --- a/include/JSystem/JGadget/binary.h +++ b/include/JSystem/JGadget/binary.h @@ -92,7 +92,7 @@ struct TParseValue : public Parser { } static const void* advance(const void* data, s32 advanceNum) { - return (char*)data + (advanceNum * sizeof(Parser::ParseType)); + return (char*)data + (advanceNum * sizeof(typename Parser::ParseType)); } }; diff --git a/include/JSystem/JGadget/linklist.h b/include/JSystem/JGadget/linklist.h index da51a35060f..2fcb281f06b 100644 --- a/include/JSystem/JGadget/linklist.h +++ b/include/JSystem/JGadget/linklist.h @@ -262,7 +262,7 @@ struct TLinkList_factory : public TLinkList { } typename TLinkList::iterator Erase_destroy(T* param_0) { - typename TLinkList::iterator spC(Erase(param_0)); + typename TLinkList::iterator spC(this->Erase(param_0)); Do_destroy(param_0); return spC; } diff --git a/include/d/d_path.h b/include/d/d_path.h index 534d2b3d899..37a876a8f8a 100644 --- a/include/d/d_path.h +++ b/include/d/d_path.h @@ -2,7 +2,7 @@ #define D_D_PATH_H #include "dolphin/types.h" -#include "mtx.h" +#include "dolphin/mtx.h" class cBgS_PolyInfo; struct cXyz; diff --git a/include/global.h b/include/global.h index f9057a67aeb..5176f8021e0 100644 --- a/include/global.h +++ b/include/global.h @@ -131,4 +131,10 @@ static const float INF = 2000000000.0f; #define SJIS(character, value) ((u32)value) #endif +#ifdef __MWERKS__ +#define ASM asm +#else +#define ASM +#endif + #endif diff --git a/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp b/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp index 17112fb93c5..d8ddfdea221 100644 --- a/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp +++ b/src/JSystem/J3DGraphAnimator/J3DSkinDeform.cpp @@ -274,7 +274,7 @@ int J3DSkinDeform::initMtxIndexArray(J3DModelData* pModelData) { u8* pDListPos = pDList; int uVar13; for (; - (int)pDListPos - (int)pDList < pModelData->getShapeNodePointer(i)->getShapeDraw(j)->getDisplayListSize(); + (intptr_t)pDListPos - (intptr_t)pDList < pModelData->getShapeNodePointer(i)->getShapeDraw(j)->getDisplayListSize(); pDListPos += r23 * uVar13 //TODO: This loop's logic has drastically different codegen between GCN and Shield // in a way that so far can't be pinned down as just compiler differences. This @@ -388,8 +388,8 @@ void J3DSkinDeform::changeFastSkinDL(J3DModelData* pModelData) { dl = (u8*)dl + vtxSize * vtxCount; } - int dlistSize = ((int)dst - (int)displayListStart + 0x1f) & ~0x1f; - while ((int)dst - (int)displayListStart < pShapeNode->getShapeDraw(j)->getDisplayListSize()) { + int dlistSize = ((intptr_t)dst - (intptr_t)displayListStart + 0x1f) & ~0x1f; + while ((intptr_t)dst - (intptr_t)displayListStart < pShapeNode->getShapeDraw(j)->getDisplayListSize()) { *dst++ = 0; } diff --git a/src/JSystem/J3DGraphBase/J3DTransform.cpp b/src/JSystem/J3DGraphBase/J3DTransform.cpp index 890d40dee5b..bfcbf4bf8f4 100644 --- a/src/JSystem/J3DGraphBase/J3DTransform.cpp +++ b/src/JSystem/J3DGraphBase/J3DTransform.cpp @@ -101,7 +101,7 @@ void J3DCalcYBBoardMtx(Mtx mtx) { mtx[2][2] = vec.z * z; } -asm void J3DPSCalcInverseTranspose(__REGISTER Mtx src, __REGISTER Mtx33 dst) { +ASM void J3DPSCalcInverseTranspose(__REGISTER Mtx src, __REGISTER Mtx33 dst) { #ifdef __MWERKS__ // clang-format off psq_l f0, 0(src), 1, 0 psq_l f1, 4(src), 0, 0 @@ -290,7 +290,7 @@ void J3DGetTextureMtxMayaOld(const J3DTextureSRTInfo& srt, Mtx dst) { dst[2][2] = 1.0f; } -asm void J3DScaleNrmMtx(__REGISTER Mtx mtx, const __REGISTER Vec& scl) { +ASM void J3DScaleNrmMtx(__REGISTER Mtx mtx, const __REGISTER Vec& scl) { #ifdef __MWERKS__ // clang-format off nofralloc; @@ -326,7 +326,7 @@ asm void J3DScaleNrmMtx(__REGISTER Mtx mtx, const __REGISTER Vec& scl) { #endif // clang-format on } -asm void J3DScaleNrmMtx33(__REGISTER Mtx33 mtx, const __REGISTER Vec& scale) { +ASM void J3DScaleNrmMtx33(__REGISTER Mtx33 mtx, const __REGISTER Vec& scale) { #ifdef __MWERKS__ // clang-format off psq_l f0, 0(mtx), 0, 0 psq_l f6, 0(scale), 0, 0 @@ -352,7 +352,7 @@ asm void J3DScaleNrmMtx33(__REGISTER Mtx33 mtx, const __REGISTER Vec& scale) { #endif // clang-format on } -asm void J3DMtxProjConcat(__REGISTER Mtx mtx1, __REGISTER Mtx mtx2, __REGISTER Mtx dst) { +ASM void J3DMtxProjConcat(__REGISTER Mtx mtx1, __REGISTER Mtx mtx2, __REGISTER Mtx dst) { #ifdef __MWERKS__ // clang-format off psq_l f2, 0(mtx1), 0, 0 psq_l f3, 8(mtx1), 0, 0 diff --git a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp index 3abd6ea603a..895652ef401 100644 --- a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp +++ b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp @@ -70,9 +70,9 @@ void J3DClusterLoader_v15::readCluster(const J3DClusterBlock* block) { mpDeformData->mVtxNrm = JSUConvertOffsetToPtr(block, block->mVtxNrm); void* clusterPointer = block->mClusterPointer; - int clusterKeyPointerSize = (int)block->mClusterKeyPointer - (int)clusterPointer; - int clusterVertexPointerSize = (int)block->mClusterVertex - (int)clusterPointer; - int vtxPosSize = (int)block->mVtxPos - (int)clusterPointer; + int clusterKeyPointerSize = (intptr_t)block->mClusterKeyPointer - (intptr_t)clusterPointer; + int clusterVertexPointerSize = (intptr_t)block->mClusterVertex - (intptr_t)clusterPointer; + int vtxPosSize = (intptr_t)block->mVtxPos - (intptr_t)clusterPointer; u8* arr = new (0x20) u8[vtxPosSize]; memcpy(arr, JSUConvertOffsetToPtr(block, clusterPointer), vtxPosSize); mpDeformData->mClusterPointer = (J3DCluster*)arr; @@ -81,10 +81,10 @@ void J3DClusterLoader_v15::readCluster(const J3DClusterBlock* block) { for (int i = 0; i < mpDeformData->getClusterNum(); i++) { J3DCluster* cluster = &mpDeformData->mClusterPointer[i]; - cluster->mClusterKey = JSUConvertOffsetToPtr(arr - (int)clusterPointer, cluster->mClusterKey); + cluster->mClusterKey = JSUConvertOffsetToPtr(arr - (intptr_t)clusterPointer, cluster->mClusterKey); cluster->field_0x18 = JSUConvertOffsetToPtr(block, cluster->field_0x18); cluster->mClusterVertex = - JSUConvertOffsetToPtr(arr - (int)clusterPointer, cluster->mClusterVertex); + JSUConvertOffsetToPtr(arr - (intptr_t)clusterPointer, cluster->mClusterVertex); J3DDeformer* deformer = new J3DDeformer(mpDeformData); if (cluster->field_0x14 != 0) { deformer->field_0xc = new f32[cluster->field_0x14 * 3]; diff --git a/src/JSystem/JAudio2/JASAudioThread.cpp b/src/JSystem/JAudio2/JASAudioThread.cpp index e689a9607fd..fef909dd163 100644 --- a/src/JSystem/JAudio2/JASAudioThread.cpp +++ b/src/JSystem/JAudio2/JASAudioThread.cpp @@ -9,6 +9,7 @@ #include "JSystem/JAudio2/JASProbe.h" #include "JSystem/JKernel/JKRSolidHeap.h" #include "dolphin/dsp.h" +#include "stdint.h" JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority) : @@ -60,7 +61,7 @@ void* JASAudioThread::run() { while (true) { OSMessage msg = waitMessageBlock(); - switch ((int)msg) { + switch ((intptr_t)msg) { case AUDIOMSG_DMA: if (sbPauseFlag) { JASDriver::stopDMA(); diff --git a/src/JSystem/JAudio2/JASBNKParser.cpp b/src/JSystem/JAudio2/JASBNKParser.cpp index dbaad63bee2..0df05ca9b84 100644 --- a/src/JSystem/JAudio2/JASBNKParser.cpp +++ b/src/JSystem/JAudio2/JASBNKParser.cpp @@ -40,13 +40,13 @@ JASBasicBank* JASBNKParser::createBasicBank(void const* stream, JKRHeap* heap) { JASBNKParser::Ver1::TChunk* JASBNKParser::Ver1::findChunk(void const* stream, u32 id) { TFileHeader* header = (TFileHeader*)stream; - void* end = (void*)((int)stream + header->mSize); - TChunk* chunk = (TChunk*)((int)stream + 0x20); + void* end = (void*)((intptr_t)stream + header->mSize); + TChunk* chunk = (TChunk*)((intptr_t)stream + 0x20); while (chunk < end) { if (chunk->mID == id) { return chunk; } - chunk = (TChunk*)(((int)chunk + 0xb + chunk->mSize) & ~3); + chunk = (TChunk*)(((intptr_t)chunk + 0xb + chunk->mSize) & ~3); } return NULL; } @@ -85,7 +85,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h bank->newInstTable(list_chunk->mCount, heap); for (int i = 0; i < list_chunk->mCount; i++) { if (list_chunk->mOffsets[i] != 0) { - u32* data = (u32*)((int)stream + list_chunk->mOffsets[i]); + u32* data = (u32*)((intptr_t)stream + list_chunk->mOffsets[i]); switch (*data++) { case 'Inst': { JASBasicInst* inst = new (heap, 0) JASBasicInst(); @@ -126,7 +126,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h u32 offset = *data++; if (offset != 0) { JASDrumSet::TPerc* perc = new (heap, 0) JASDrumSet::TPerc(); - u32* ptr = (u32*)((int)stream + offset); + u32* ptr = (u32*)((intptr_t)stream + offset); TPercData* perc_data = (TPercData*)(ptr + 1); perc->setVolume(perc_data->mVolume); perc->setPitch(perc_data->mPitch); diff --git a/src/JSystem/JAudio2/JASBasicWaveBank.cpp b/src/JSystem/JAudio2/JASBasicWaveBank.cpp index 922d00a85f9..f7417e174d6 100644 --- a/src/JSystem/JAudio2/JASBasicWaveBank.cpp +++ b/src/JSystem/JAudio2/JASBasicWaveBank.cpp @@ -4,6 +4,7 @@ #include "JSystem/JAudio2/JASMutex.h" #include "JSystem/JKernel/JKRHeap.h" #include "JSystem/JUtility/JUTAssert.h" +#include "stdint.h" JASBasicWaveBank::JASBasicWaveBank() { mWaveTable = NULL; @@ -130,5 +131,5 @@ int JASBasicWaveBank::TWaveHandle::getWavePtr() const { if (base == 0) { return 0; } - return (int)base + field_0x4.field_0x08; + return (intptr_t)base + field_0x4.field_0x08; } diff --git a/src/JSystem/JAudio2/JASCalc.cpp b/src/JSystem/JAudio2/JASCalc.cpp index 861b8dcd673..3076ec61952 100644 --- a/src/JSystem/JAudio2/JASCalc.cpp +++ b/src/JSystem/JAudio2/JASCalc.cpp @@ -6,8 +6,8 @@ void JASCalc::imixcopy(const s16* s1, const s16* s2, s16* dst, u32 n) { for (n; n != 0; n--) { - *dst++ = *((s16*)s1)++; - *dst++ = *((s16*)s2)++; + *dst++ = *(s1)++; + *dst++ = *(s2)++; } } @@ -21,10 +21,10 @@ void JASCalc::bcopyfast(const void* src, void* dest, u32 size) { u32* udest = (u32*)dest; for (size = size / (4 * sizeof(u32)); size != 0; size--) { - copy1 = *((u32*)usrc)++; - copy2 = *((u32*)usrc)++; - copy3 = *((u32*)usrc)++; - copy4 = *((u32*)usrc)++; + copy1 = *(usrc)++; + copy2 = *(usrc)++; + copy3 = *(usrc)++; + copy4 = *(usrc)++; *udest++ = copy1; *udest++ = copy2; @@ -263,14 +263,6 @@ s16 const JASCalc::CUTOFF_TO_IIR_TABLE[128][4] = { 0x7FFF, 0x0000, 0x0000, 0x0000, }; -// currently required because of missing functions -// JASCalc::hannWindow(short *, u32) -// JASCalc::hammWindow(short *, u32) -// JASCalc::fft(float *, float *, u32, s32) -f32 JASCalc::fake1() { return 0.5f; } -f32 JASCalc::fake2(s32 x) { return JASCalc::clamp(x); } -f32 JASCalc::fake3() { return 0.0f; } - f32 JASCalc::pow2(f32 x) { s32 frac_index = 0; union { @@ -325,3 +317,11 @@ s16 JASCalc::clamp(s32 x) { return std::numeric_limits::max(); return x; } + +// currently required because of missing functions +// JASCalc::hannWindow(short *, u32) +// JASCalc::hammWindow(short *, u32) +// JASCalc::fft(float *, float *, u32, s32) +f32 JASCalc::fake1() { return 0.5f; } +f32 JASCalc::fake2(s32 x) { return JASCalc::clamp(x); } +f32 JASCalc::fake3() { return 0.0f; } diff --git a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp b/src/JSystem/JAudio2/JASSimpleWaveBank.cpp index 98e6136b3d4..a20d6cbdeaa 100644 --- a/src/JSystem/JAudio2/JASSimpleWaveBank.cpp +++ b/src/JSystem/JAudio2/JASSimpleWaveBank.cpp @@ -1,6 +1,7 @@ #include "JSystem/JSystem.h" // IWYU pragma: keep #include "JSystem/JAudio2/JASSimpleWaveBank.h" +#include "stdint.h" JASSimpleWaveBank::JASSimpleWaveBank() { mWaveTable = NULL; @@ -42,7 +43,7 @@ int JASSimpleWaveBank::TWaveHandle::getWavePtr() const { if (base == NULL) { return NULL; } - return (int)base + mWaveInfo.field_0x08; + return (intptr_t)base + mWaveInfo.field_0x08; } JASSimpleWaveBank::TWaveHandle::TWaveHandle() { diff --git a/src/JSystem/JKernel/JKRDvdArchive.cpp b/src/JSystem/JKernel/JKRDvdArchive.cpp index de013a28348..f5ec5aed607 100644 --- a/src/JSystem/JKernel/JKRDvdArchive.cpp +++ b/src/JSystem/JKernel/JKRDvdArchive.cpp @@ -89,9 +89,9 @@ bool JKRDvdArchive::open(s32 entryNum) { sizeof(SArcHeader), NULL, NULL); DCInvalidateRange(mArcInfoBlock, arcHeader->file_data_offset); - mNodes = (SDIDirEntry*)((int)&mArcInfoBlock->num_nodes + mArcInfoBlock->node_offset); - mFiles = (SDIFileEntry*)((int)&mArcInfoBlock->num_nodes + mArcInfoBlock->file_entry_offset); - mStringTable = (char*)((int)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset); + mNodes = (SDIDirEntry*)((intptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->node_offset); + mFiles = (SDIFileEntry*)((intptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->file_entry_offset); + mStringTable = (char*)((intptr_t)&mArcInfoBlock->num_nodes + mArcInfoBlock->string_table_offset); mExpandedSize = NULL; u8 useCompression; diff --git a/src/JSystem/JKernel/JKRDvdFile.cpp b/src/JSystem/JKernel/JKRDvdFile.cpp index 9df201adb71..8cb37909932 100644 --- a/src/JSystem/JKernel/JKRDvdFile.cpp +++ b/src/JSystem/JKernel/JKRDvdFile.cpp @@ -3,6 +3,7 @@ #include "JSystem/JKernel/JKRDvdFile.h" #include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTException.h" +#include "stdint.h" JSUList JKRDvdFile::sDvdList; @@ -123,7 +124,7 @@ s32 JKRDvdFile::sync(void) { OSReceiveMessage(&mMessageQueue2, &message, 1); mOSThread = NULL; OSUnlockMutex(&mMutex1); - return (int)message; + return (intptr_t)message; } void JKRDvdFile::doneProcess(s32 id, DVDFileInfo* fileInfo) { diff --git a/src/JSystem/JKernel/JKRThread.cpp b/src/JSystem/JKernel/JKRThread.cpp index a884fcf615b..510ccd3132d 100644 --- a/src/JSystem/JKernel/JKRThread.cpp +++ b/src/JSystem/JKernel/JKRThread.cpp @@ -82,7 +82,7 @@ void JKRThread::setCommon_heapSpecified(JKRHeap* heap, u32 stack_size, int param mStackMemory = JKRAllocFromHeap(mHeap, mStackSize, 0x20); mThreadRecord = (OSThread*)JKRAllocFromHeap(mHeap, sizeof(OSThread), 0x20); - void* stackBase = (void*)((int)mStackMemory + mStackSize); + void* stackBase = (void*)((intptr_t)mStackMemory + mStackSize); OSCreateThread(mThreadRecord, start, this, stackBase, mStackSize, param_3, 1); } diff --git a/src/JSystem/JMessage/processor.cpp b/src/JSystem/JMessage/processor.cpp index 2be956ef197..f110012717a 100644 --- a/src/JSystem/JMessage/processor.cpp +++ b/src/JSystem/JMessage/processor.cpp @@ -331,9 +331,9 @@ const char* JMessage::TSequenceProcessor::process(char const* pszText) { u32 queryResult = on_branch_queryResult(); if (queryResult > 0x7FFFFFFF) { switch (queryResult) { - case -1: + case 0xFFFFFFFF: return pszCurrent_; - case -2: + case 0xFFFFFFFE: eStatus_ = STATUS_NORMAL; break; default: diff --git a/src/JSystem/JUtility/JUTCacheFont.cpp b/src/JSystem/JUtility/JUTCacheFont.cpp index 6ed26d4fb81..b1202d6e78b 100644 --- a/src/JSystem/JUtility/JUTCacheFont.cpp +++ b/src/JSystem/JUtility/JUTCacheFont.cpp @@ -6,6 +6,7 @@ #include "JSystem/JUtility/JUTConsole.h" #include "JSystem/JKernel/JKRAram.h" #include "dolphin/gx.h" +#include "stdint.h" JUTCacheFont::JUTCacheFont(ResFONT const* p_fontRes, u32 cacheSize, JKRHeap* p_heap) { initialize_state(); @@ -424,18 +425,18 @@ void JUTCacheFont::invalidiateAllCache() { if (uVar2 == 0) { iVar1 = 0; } else { - iVar1 = (int)piVar3 - field_0x94; + iVar1 = (intptr_t)piVar3 - field_0x94; } *piVar3 = iVar1; if (uVar2 == mCachePage - 1) { iVar1 = 0; } else { - iVar1 = (int)piVar3 + field_0x94; + iVar1 = (intptr_t)piVar3 + field_0x94; } piVar3[1] = iVar1; - piVar3 = (int*)((int)piVar3 + field_0x94); + piVar3 = (int*)((intptr_t)piVar3 + field_0x94); } - field_0xa8 = (int)piVar3 - field_0x94; + field_0xa8 = (intptr_t)piVar3 - field_0x94; field_0xa4 = (TGlyphCacheInfo*)mCacheBuffer; field_0x9c = NULL; field_0xa0 = NULL; diff --git a/src/JSystem/JUtility/JUTGraphFifo.cpp b/src/JSystem/JUtility/JUTGraphFifo.cpp index 2add552e850..98f7db2c396 100644 --- a/src/JSystem/JUtility/JUTGraphFifo.cpp +++ b/src/JSystem/JUtility/JUTGraphFifo.cpp @@ -2,6 +2,7 @@ #include "JSystem/JUtility/JUTGraphFifo.h" #include "JSystem/JKernel/JKRHeap.h" +#include "stdint.h" static bool data_804514B8; @@ -16,7 +17,7 @@ JUTGraphFifo::JUTGraphFifo(u32 size) { GXInitFifoPtrs(mFifo, mBase, mBase); } else { mBase = JKRAllocFromSysHeap(mSize + 0xA0, 32); - mBase = (void*)((int)mBase + 0x1F & ~0x1F); + mBase = (void*)((intptr_t)mBase + 0x1F & ~0x1F); mFifo = GXInit(mBase, mSize); data_804514B8 = true; sCurrentFifo = this; diff --git a/src/JSystem/JUtility/JUTTexture.cpp b/src/JSystem/JUtility/JUTTexture.cpp index d62f8961ee1..3a5926586d7 100644 --- a/src/JSystem/JUtility/JUTTexture.cpp +++ b/src/JSystem/JUtility/JUTTexture.cpp @@ -18,10 +18,10 @@ void JUTTexture::storeTIMG(ResTIMG const* param_0, u8 param_1) { if (param_0 && param_1 < 0x10) { mTexInfo = param_0; - mTexData = (void*)((int)mTexInfo + mTexInfo->imageOffset); + mTexData = (void*)((intptr_t)mTexInfo + mTexInfo->imageOffset); if (mTexInfo->imageOffset == 0) { - mTexData = (void*)((int)mTexInfo + 0x20); + mTexData = (void*)((intptr_t)mTexInfo + 0x20); } field_0x2c = NULL; diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp index bad3ea79bd0..e6bd0e3ebea 100644 --- a/src/d/d_camera.cpp +++ b/src/d/d_camera.cpp @@ -9035,7 +9035,7 @@ bool dCamera_c::eventCamera(s32 param_0) { mEventData.field_0xc == specialType[20] || mEventData.field_0xc == specialType[21] || mEventData.field_0xc == specialType[22] || mEventData.field_0xc == specialType[23] || mEventData.field_0xc == specialType[24] || mEventData.field_0xc == specialType[18]) && - *(int*)((int)&mEventData + 0xc) != -1) // fakematch to force additional load + *(int*)((intptr_t)&mEventData + 0xc) != -1) // fakematch to force additional load { var_r29 = 28; } else if (mEventData.field_0xc == specialType[14] && var_r29 != 2) {