mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-06 02:38:11 -04:00
m_Do demo work (#1189)
* m_Do_controller_pad and m_Do_Reset OK for demo, m_Do_machine 100% with weak func order * Add machine.pch, m_Do_machine OK for demo * m_Do_gba_com and m_Do_MemCardRWmng OK for demo * m_Do_graphic work * m_Do_graphic JPN/PAL version diffs
This commit is contained in:
@@ -43,7 +43,7 @@ public:
|
||||
static void dump(void);
|
||||
|
||||
static JKRAram* getManager() { return sAramObject; }
|
||||
static JKRAramHeap* getAramHeap() { return getManager()->mAramHeap; }
|
||||
static JKRAramHeap* getAramHeap() { return sAramObject->mAramHeap; }
|
||||
static JSUList<JKRAMCommand>& getCommandList() { return sAramCommandList; }
|
||||
|
||||
static u8 decideAramGroupId(int groupId) {
|
||||
@@ -94,6 +94,4 @@ inline JKRAramBlock* JKRMainRamToAram(u8* buf, JKRAramBlock* block, u32 size, JK
|
||||
return JKRAram::mainRamToAram(buf, block, size, expandSwitch, fileSize, heap, id);
|
||||
}
|
||||
|
||||
// void JKRDecompressFromAramToMainRam(u32, void*, u32, u32, u32, u32*);
|
||||
|
||||
#endif /* JKRARAM_H */
|
||||
|
||||
@@ -68,4 +68,12 @@ inline JKRAramStreamCommand* JKRStreamToAram_Async(JSUFileInputStream *stream, u
|
||||
return JKRAramStream::write_StreamToAram_Async(stream, addr, size, offset);
|
||||
}
|
||||
|
||||
inline void JKRSetAramTransferBuffer(u8* buffer, u32 bufferSize, JKRHeap* heap) {
|
||||
JKRAramStream::setTransBuffer(buffer, bufferSize, heap);
|
||||
}
|
||||
|
||||
inline void JKRResetAramTransferBuffer() {
|
||||
JKRAramStream::setTransBuffer(NULL, 0, NULL);
|
||||
}
|
||||
|
||||
#endif /* JKRARAMSTREAM_H */
|
||||
|
||||
@@ -240,4 +240,12 @@ inline u32 JKRReadTypeResource(void* buffer, u32 bufferSize, u32 tag, const char
|
||||
return JKRArchive::readTypeResource(buffer, bufferSize, tag, name, arc);
|
||||
}
|
||||
|
||||
inline JKRArchive* JKRMountArchive(const char* path, JKRArchive::EMountMode mountMode, JKRHeap* heap, JKRArchive::EMountDirection mountDirection) {
|
||||
return JKRArchive::mount(path, mountMode, heap, mountDirection);
|
||||
}
|
||||
|
||||
inline void JKRUnmountArchive(JKRArchive* arc) {
|
||||
arc->unmount();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,31 +3,25 @@
|
||||
|
||||
#include "dolphin/dvd/dvd.h"
|
||||
|
||||
struct JKRFileFinder_UnknownBase {
|
||||
/* 0x00 */ const char* mEntryName;
|
||||
/* 0x04 */ s32 mEntryFileIndex;
|
||||
/* 0x08 */ u16 mEntryId;
|
||||
/* 0x0A */ u16 mEntryTypeFlags;
|
||||
}; // Size: 0x0C
|
||||
|
||||
class JKRFileFinder : public JKRFileFinder_UnknownBase {
|
||||
class JKRFileFinder {
|
||||
public:
|
||||
JKRFileFinder() {
|
||||
mIsAvailable = false;
|
||||
mIsFileOrDirectory = false;
|
||||
}
|
||||
virtual ~JKRFileFinder() {}
|
||||
|
||||
bool isAvailable() const { return mIsAvailable; }
|
||||
bool isFile() const { return mIsFileOrDirectory; }
|
||||
bool isDirectory() const { return mIsFileOrDirectory; }
|
||||
|
||||
public:
|
||||
/* 0x00 */ const char* mEntryName;
|
||||
/* 0x04 */ s32 mEntryFileIndex;
|
||||
/* 0x08 */ u16 mEntryId;
|
||||
/* 0x0A */ u16 mEntryTypeFlags;
|
||||
|
||||
virtual ~JKRFileFinder() {}
|
||||
/* vt[3] */ virtual bool findNextFile() = 0;
|
||||
|
||||
protected:
|
||||
/* 0x00 */ // JKRFileFinder_UnknownBase
|
||||
/* 0x0C */ // vtable
|
||||
/* 0x10 */ bool mIsAvailable;
|
||||
/* 0x11 */ bool mIsFileOrDirectory;
|
||||
/* 0x12 */ u8 field_0x12[2];
|
||||
@@ -43,9 +37,6 @@ public:
|
||||
/* vt[3] */ virtual bool findNextFile(void); /* override */
|
||||
|
||||
private:
|
||||
/* 0x00 */ // JKRFileFinder_UnknownBase
|
||||
/* 0x0C */ // vtable
|
||||
/* 0x10 */ // JKRFileFinder
|
||||
/* 0x14 */ JKRArchive* mArchive;
|
||||
/* 0x18 */ s32 mStartIndex;
|
||||
/* 0x1C */ s32 mEndIndex;
|
||||
@@ -61,12 +52,13 @@ public:
|
||||
/* vt[3] */ virtual bool findNextFile(void); /* override */
|
||||
|
||||
private:
|
||||
/* 0x00 */ // JKRFileFinder_UnknownBase
|
||||
/* 0x0C */ // vtable
|
||||
/* 0x10 */ // JKRFileFinder
|
||||
/* 0x14 */ DVDDirectory mDvdDirectory;
|
||||
/* 0x20 */ bool mDvdIsOpen;
|
||||
/* 0x21 */ u8 field_0x21[3];
|
||||
};
|
||||
|
||||
inline bool JKRIsFileFinderAvailable(JKRFileFinder* fileFinder) {
|
||||
return fileFinder->isAvailable();
|
||||
}
|
||||
|
||||
#endif /* JKRFILEFINDER_H */
|
||||
|
||||
@@ -65,4 +65,8 @@ inline void* JKRGetResource(const char* name) {
|
||||
return JKRFileLoader::getGlbResource(name);
|
||||
}
|
||||
|
||||
inline bool JKRRemoveResource(void* resource, JKRFileLoader* fileLoader) {
|
||||
return JKRFileLoader::removeResource(resource, fileLoader);
|
||||
}
|
||||
|
||||
#endif /* JKRFILELOADER_H */
|
||||
|
||||
@@ -241,4 +241,16 @@ inline JKRHeap* JKRGetRootHeap() {
|
||||
return JKRHeap::getRootHeap();
|
||||
}
|
||||
|
||||
inline JKRErrorHandler JKRSetErrorHandler(JKRErrorHandler errorHandler) {
|
||||
return JKRHeap::setErrorHandler(errorHandler);
|
||||
}
|
||||
|
||||
inline bool JKRSetErrorFlag(JKRHeap* heap, bool flag) {
|
||||
return heap->setErrorFlag(flag);
|
||||
}
|
||||
|
||||
inline void JKRSetDebugFillDelete(u8) {}
|
||||
inline void JKRSetDebugFillNew(u8) {}
|
||||
inline void JKRSetDebugFillNotuse(u8) {}
|
||||
|
||||
#endif /* JKRHEAP_H */
|
||||
|
||||
Reference in New Issue
Block a user