mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-09 12:37:18 -04:00
Merge pull request #18 from TakaRikka/26-02-25-windows-build-fix
Windows build fixes
This commit is contained in:
@@ -1325,7 +1325,6 @@ set(DUSK_FILES
|
||||
src/dusk/globals.cpp
|
||||
src/dusk/J3DTransforms_C.cpp
|
||||
#src/dusk/m_Do_ext_dusk.cpp
|
||||
src/dusk/jsystem_stubs.cpp
|
||||
src/dusk/dvd_emu.cpp
|
||||
src/dolphin/os/OSContext.cpp
|
||||
src/dolphin/os/OSThread.cpp
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <dolphin/types.h>
|
||||
|
||||
class JASChannel;
|
||||
class JASInstParam;
|
||||
struct JASInstParam;
|
||||
class JASWaveBank;
|
||||
|
||||
namespace JASDsp {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <dolphin/os.h>
|
||||
#include <dolphin/os.h>
|
||||
|
||||
class JASDisposer;
|
||||
struct JASDisposer;
|
||||
class JKRHeap;
|
||||
class JKRSolidHeap;
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ class JASVoiceBank;
|
||||
class JAUBankTableLink;
|
||||
class JAUDisposer_;
|
||||
class JAUSectionHeap;
|
||||
class JAUSoundTable;
|
||||
class JAUSoundNameTable;
|
||||
struct JAUSoundTable;
|
||||
struct JAUSoundNameTable;
|
||||
class JKRArchive;
|
||||
class JKRSolidHeap;
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@ extern u8 data_80450C9D;
|
||||
extern u8 data_80450C9E;
|
||||
extern u8 cDmr_FishingWether;
|
||||
extern u8 data_80450CA0;
|
||||
extern JPTraceParticleCallBack4 JPTracePCB4;
|
||||
|
||||
extern "C" {
|
||||
extern JPTraceParticleCallBack4 JPTracePCB4;
|
||||
}
|
||||
|
||||
void debug_actor_create();
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
class CPaneMgr;
|
||||
class J2DTextBox;
|
||||
struct JMSMesgEntry_c;
|
||||
class JMSMesgEntry_c;
|
||||
class JUTFont;
|
||||
|
||||
struct dMenu_LetterData {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <dolphin/ar.h>
|
||||
|
||||
#if !TARGET_PC
|
||||
JASHeap::JASHeap(JASDisposer* disposer) : mTree(this) {
|
||||
mDisposer = disposer;
|
||||
mBase = NULL;
|
||||
@@ -16,7 +15,6 @@ JASHeap::JASHeap(JASDisposer* disposer) : mTree(this) {
|
||||
field_0x40 = 0;
|
||||
OSInitMutex(&mMutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
void JASHeap::initRootHeap(void* param_0, u32 param_1) {
|
||||
JUT_ASSERT(97, ! isAllocated());
|
||||
|
||||
@@ -498,7 +498,7 @@ bool JKRHeap::isSubHeap(JKRHeap* heap) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void* operator new(size_t size) {
|
||||
return JKRHeap::alloc(size, 4, NULL);
|
||||
}
|
||||
@@ -516,14 +516,14 @@ void* operator new(size_t size) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void* operator new(size_t size, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new(size_t size, int alignment) {
|
||||
if (sCurrentHeap == nullptr)
|
||||
#if TARGET_PC
|
||||
#if !_WIN32
|
||||
return aligned_alloc(alignment, size);
|
||||
#else
|
||||
return _aligned_malloc(size, alignment);
|
||||
@@ -531,7 +531,7 @@ void* operator new(size_t size, int alignment) {
|
||||
void* mem = JKRHeap::alloc(size, alignment, nullptr);
|
||||
if (mem == nullptr) {
|
||||
OSReport("[NEW] JKRHeap FULL! Fallback to aligned_malloc size %u\n", (unsigned)size);
|
||||
#if TARGET_PC
|
||||
#if !_WIN32
|
||||
return aligned_alloc(alignment, size);
|
||||
#else
|
||||
return _aligned_malloc(size, alignment);
|
||||
@@ -545,7 +545,7 @@ void* operator new(size_t size, JKRHeap* heap, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, heap);
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void* operator new[](size_t size) {
|
||||
return JKRHeap::alloc(size, 4, NULL);
|
||||
}
|
||||
@@ -561,21 +561,21 @@ void* operator new[](size_t size) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void* operator new[](size_t size, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, NULL);
|
||||
}
|
||||
#else
|
||||
void* operator new[](size_t size, int alignment) {
|
||||
if (sCurrentHeap == nullptr)
|
||||
#if TARGET_PC
|
||||
#if !_WIN32
|
||||
return aligned_alloc(alignment, size);
|
||||
#else
|
||||
return _aligned_malloc(size, alignment);
|
||||
#endif
|
||||
void* mem = JKRHeap::alloc(size, alignment, nullptr);
|
||||
if (mem == nullptr)
|
||||
#if TARGET_PC
|
||||
#if !_WIN32
|
||||
return aligned_alloc(alignment, size);
|
||||
#else
|
||||
return _aligned_malloc(size, alignment);
|
||||
@@ -588,7 +588,7 @@ void* operator new[](size_t size, JKRHeap* heap, int alignment) {
|
||||
return JKRHeap::alloc(size, alignment, heap);
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void operator delete(void* ptr) {
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ void operator delete(void* ptr) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#if !TARGET_PC
|
||||
void operator delete[](void* ptr) {
|
||||
JKRHeap::free(ptr, NULL);
|
||||
}
|
||||
|
||||
@@ -62,6 +62,6 @@ BOOL cDmrNowMidnaTalk() {
|
||||
|
||||
u8 data_80450CA0;
|
||||
|
||||
#if !TARGET_PC
|
||||
JPTraceParticleCallBack4 JPTracePCB4;
|
||||
#endif
|
||||
extern "C" {
|
||||
JPTraceParticleCallBack4 JPTracePCB4;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,9 @@
|
||||
//#pragma nosyminline on
|
||||
#endif
|
||||
|
||||
extern dPa_particleTracePcallBack_c JPTracePCB4;
|
||||
extern "C" {
|
||||
extern dPa_particleTracePcallBack_c JPTracePCB4;
|
||||
}
|
||||
|
||||
void dPa_cleanupGX() {
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <stdint.h>
|
||||
#include <dolphin/mtx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DTransform.h"
|
||||
|
||||
// translated to C, should be correct, but not tested.
|
||||
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
*/
|
||||
#pragma mark J3DShapeTable
|
||||
#include "JSystem/J3DGraphAnimator/J3DShapeTable.h"
|
||||
|
||||
// JAISe::JAISeMgr_startID_, JAISeq::JAISeqMgr_startID_, JAIStream::JAIStreamMgr_startID_
|
||||
// are compiled from their real source files (JAISe.obj, JAISeq.obj, JAIStream.obj)
|
||||
|
||||
#pragma mark JAUSection
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
|
||||
#if 0
|
||||
|
||||
JAUSoundTable* JAUSection::newSoundTable(void const* data, u32 size, bool flag) {
|
||||
puts("JAUSection::newSoundTable is a stub");
|
||||
return nullptr;
|
||||
}
|
||||
JAUSoundNameTable* JAUSection::newSoundNameTable(void const* data, u32 size, bool flag) {
|
||||
puts("JAUSection::newSoundNameTable is a stub");
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
#pragma mark JASHeap
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
|
||||
JASHeap::JASHeap(JASDisposer* disposer)
|
||||
: mTree(this), mDisposer(disposer), mBase(nullptr), mSize(0), field_0x40(nullptr) {
|
||||
OSInitMutex(&mMutex);
|
||||
}
|
||||
|
||||
#pragma mark JASVoiceBank
|
||||
#include "JSystem/JAudio2/JASVoiceBank.h"
|
||||
|
||||
/*
|
||||
bool JASVoiceBank::getInstParam(int a, int b, int c, JASInstParam* param) const {
|
||||
puts("JASVoiceBank::getInstParam is a stub");
|
||||
return false;
|
||||
}*/
|
||||
|
||||
// JASSeqParser::sCallBackFunc is compiled from JASSeqParser.obj
|
||||
/*
|
||||
#pragma mark JHICommBuf
|
||||
#include "JSystem/JHostIO/JHIComm.h"
|
||||
|
||||
void JHICommBufHeader::init() {
|
||||
puts("JHICommBufHeader::init is a stub");
|
||||
}
|
||||
|
||||
int JHICommBufHeader::load() {
|
||||
puts("JHICommBufHeader::load is a stub");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int JHICommBufReader::readBegin() {
|
||||
puts("JHICommBufReader::readBegin is a stub");
|
||||
return -1;
|
||||
}
|
||||
|
||||
void JHICommBufReader::readEnd() {
|
||||
puts("JHICommBufReader::readEnd is a stub");
|
||||
}
|
||||
|
||||
int JHICommBufReader::read(void* buf, int size) {
|
||||
puts("JHICommBufReader::read is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 JHICommBufReader::Header::getReadableSize() const {
|
||||
puts("JHICommBufReader::Header::getReadableSize is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int JHICommBufWriter::writeBegin() {
|
||||
puts("JHICommBufWriter::writeBegin is a stub");
|
||||
return -1;
|
||||
}
|
||||
|
||||
void JHICommBufWriter::writeEnd() {
|
||||
puts("JHICommBufWriter::writeEnd is a stub");
|
||||
}
|
||||
|
||||
int JHICommBufWriter::write(void* buf, int size) {
|
||||
puts("JHICommBufWriter::write is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
#pragma mark HIO / HIO2
|
||||
#include <dolphin/hio.h>
|
||||
#include <revolution/hio2.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
BOOL HIORead(u32 addr, void* buffer, s32 size) {
|
||||
puts("HIORead is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIOWrite(u32 addr, void* buffer, s32 size) {
|
||||
puts("HIOWrite is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIO2Init(void) {
|
||||
puts("HIO2Init is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL HIO2EnumDevices(HIO2EnumCallback callback) {
|
||||
puts("HIO2EnumDevices is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 HIO2Open(HIO2DeviceType type, HIO2UnkCallback exiCb, HIO2DisconnectCallback disconnectCb) {
|
||||
puts("HIO2Open is a stub");
|
||||
return -1;
|
||||
}
|
||||
|
||||
BOOL HIO2Close(s32 handle) {
|
||||
puts("HIO2Close is a stub");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
#pragma mark JOR
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
|
||||
int JOREventCallbackListNode::JORAct(u32 eventID, const char* eventName) {
|
||||
puts("JOREventCallbackListNode::JORAct is a stub");
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
#if !TARGET_PC
|
||||
#pragma mark J3DPSMtxArrayConcat
|
||||
void J3DPSMtxArrayConcat(float (*a)[4], float (*b)[4], float (*out)[4], u32 count) {
|
||||
puts("J3DPSMtxArrayConcat is a stub");
|
||||
}
|
||||
#endif
|
||||
@@ -1859,6 +1859,3 @@ u32 JHICommBufReader::Header::getReadableSize() const {
|
||||
puts("JHICommBufReader::Header::getReadableSize is a stub");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
dPa_particleTracePcallBack_c JPTracePCB4;
|
||||
|
||||
Reference in New Issue
Block a user