diff --git a/CMakeLists.txt b/CMakeLists.txt index be51ec02ce..0e847de45d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1340,7 +1340,7 @@ set(REL_FILES set(DUSK_FILES #src/dusk/imgui.cpp - #src/dusk/stubs.c + src/dusk/stubs.c src/dusk/extras.c ) diff --git a/include/dolphin/os.h b/include/dolphin/os.h index f9bd33ab5b..07eb305adb 100644 --- a/include/dolphin/os.h +++ b/include/dolphin/os.h @@ -1,7 +1,11 @@ #ifndef _DOLPHIN_OS_H_ #define _DOLPHIN_OS_H_ +#ifdef __MWERKS__ #include +#else +#include +#endif #ifdef __REVOLUTION_SDK__ #include diff --git a/include/dolphin/types.h b/include/dolphin/types.h index ea36304400..b957324094 100644 --- a/include/dolphin/types.h +++ b/include/dolphin/types.h @@ -88,7 +88,11 @@ typedef unsigned int uint; #define __REGISTER #endif +#ifdef __MWERKS__ #include +#else +#include +#endif #endif #endif diff --git a/src/dusk/stubs.c b/src/dusk/stubs.c index f31a522eb7..bde5447605 100644 --- a/src/dusk/stubs.c +++ b/src/dusk/stubs.c @@ -1,5 +1,8 @@ -#include +//#include +#include +#include #include +#include #include #include @@ -151,13 +154,13 @@ s32 CARDUnmount(s32 chan) { return 0; } -s32 CARDWrite(CARDFileInfo *fileInfo, const void *addr, s32 length, +s32 CARDWrite(CARDFileInfo *fileInfo, void *addr, s32 length, s32 offset) { puts("CARDWrite is a stub"); return 0; } -s32 CARDWriteAsync(CARDFileInfo *fileInfo, const void *addr, s32 length, +s32 CARDWriteAsync(CARDFileInfo *fileInfo, void *addr, s32 length, s32 offset, CARDCallback callback) { puts("CARDWriteAsync is a stub"); return 0; @@ -187,18 +190,20 @@ void DCStoreRangeNoSync(void *addr, u32 nBytes) { // puts("DCStoreRangeNoSync is a stub"); } -s32 DVDCancel(DVDCommandBlock *block) { +s32 DVDCancel(volatile DVDCommandBlock *block) { puts("DVDCancel is a stub"); return 0; } -void DVDReadAbsAsyncForBS(void *a, struct bb2struct *b, int c, int d, - void (*e)()) { +int DVDReadAbsAsyncForBS(DVDCommandBlock *block, void *addr, s32 length, s32 offset, + DVDCBCallback callback) { puts("DVDReadAbsAsyncForBS is a stub"); + return 0; } -void DVDReadDiskID(void *a, DVDDiskID *b, void (*c)()) { +int DVDReadDiskID(DVDCommandBlock* block, DVDDiskID* diskID, DVDCBCallback callback) { puts("DVDReadDiskID is a stub"); + return 0; } void DVDReset() { puts("DVDReset is a stub"); } @@ -259,12 +264,12 @@ u16 OSGetFontEncode() { return 0; } -char *OSGetFontTexture(char *string, void **image, s32 *x, s32 *y, s32 *width) { +char *OSGetFontTexture(const char* string, void** image, s32* x, s32* y, s32* width) { puts("OSGetFontTexture is a stub"); return 0; } -char *OSGetFontWidth(char *string, s32 *width) { +char *OSGetFontWidth(const char* string, s32* width) { puts("OSGetFontWidth is a stub"); return 0; } @@ -309,7 +314,7 @@ void OSSetCurrentContext(OSContext *context) { puts("OSSetCurrentContext is a stub"); } -void OSSetStringTable(const void *stringTable) { +void OSSetStringTable(void* stringTable) { puts("OSSetStringTable is a stub"); }