mirror of
https://github.com/zeldaret/ss
synced 2026-07-11 14:48:32 -04:00
fixed up typedef for u32 and s32 from mistake long ago
This commit is contained in:
+2
-2
@@ -54,12 +54,12 @@
|
||||
|
||||
typedef signed char s8;
|
||||
typedef signed short s16;
|
||||
typedef signed int s32;
|
||||
typedef signed long s32;
|
||||
typedef signed long long s64;
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned long u32;
|
||||
typedef unsigned long long u64;
|
||||
typedef float f32;
|
||||
typedef double f64;
|
||||
|
||||
+2
-2
@@ -22,8 +22,8 @@ public:
|
||||
/* 80050980 */ static void resetFlags();
|
||||
/* 800509a0 */ static bool isActorPlayer(dBase_c &);
|
||||
/* 800509e0 */ static void initLoader();
|
||||
/* 80050a00 */ static dBase_c *createBase(ProfileName, dBase_c *, unsigned long, u8);
|
||||
/* 80050a10 */ static dBase_c *createRoot(ProfileName, unsigned long, u8);
|
||||
/* 80050a00 */ static dBase_c *createBase(ProfileName, dBase_c *, u32, u8);
|
||||
/* 80050a10 */ static dBase_c *createRoot(ProfileName, u32, u8);
|
||||
|
||||
private:
|
||||
/* 800509c0 */ static int loadAsyncCallback();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "rvl/MEM.h"
|
||||
#include <common.h>
|
||||
|
||||
/* 80495310 */ void MEMInitAllocatorFor_Heap(MEMAllocator* alloc, s32 align, void* heap);
|
||||
/* 80495310 */ void MEMInitAllocatorFor_Heap(MEMAllocator *alloc, s32 align, void *heap);
|
||||
|
||||
namespace EGG {
|
||||
class Heap;
|
||||
|
||||
@@ -46,9 +46,9 @@ public:
|
||||
/* 80493ac0 */ static Archive *loadFST(const char *fileName, Heap *heap, s32 align);
|
||||
/* 80493b80 */ void unmount();
|
||||
/* 80493c20 */ u32 getFile(const char *name, FileInfo *out);
|
||||
/* 80493cf0 */ long convertPathToEntryID(const char *path);
|
||||
/* 80493d00 */ void *getFileFast(long entryId, FileInfo *fileinfo);
|
||||
/* 80493dc0 */ void *getFileFast(long entryId, Heap *heap, s32 align);
|
||||
/* 80493cf0 */ s32 convertPathToEntryID(const char *path);
|
||||
/* 80493d00 */ void *getFileFast(s32 entryId, FileInfo *fileinfo);
|
||||
/* 80493dc0 */ void *getFileFast(s32 entryId, Heap *heap, s32 align);
|
||||
/* 80493f30 */ s32 countFile();
|
||||
/* 804940c0 */ void searchInside(FileCallbackFunc, void *);
|
||||
/* 80494140 */ static void *loadFromNAND(NANDFileInfo *fileInfo, Heap *heap, s32 align);
|
||||
|
||||
@@ -18,10 +18,10 @@ class Allocator;
|
||||
|
||||
struct HeapAllocArg {
|
||||
void *userArg; // 00
|
||||
u32 size; // 04
|
||||
int align; // 08
|
||||
void *ptr; // 0C the allocated ptr
|
||||
Heap *heap; // 10 heap to allocate in
|
||||
u32 size; // 04
|
||||
int align; // 08
|
||||
void *ptr; // 0C the allocated ptr
|
||||
Heap *heap; // 10 heap to allocate in
|
||||
|
||||
inline HeapAllocArg() : userArg(0), size(0), align(0), heap(nullptr), ptr(nullptr) {}
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@ struct Matrix34f {
|
||||
/* */ void makeT(const Vector3f &t);
|
||||
/* 8049ae90 */ void fromQuat(const Quatf &q);
|
||||
/* 8049af40 */ void toQuat(Quatf &q) const;
|
||||
/* 8049b250 */ void slerpTo(const Matrix34f &, Matrix34f &, f32);
|
||||
/* 8049b250 */ void slerpTo(const Matrix34f &, Matrix34f &, f32) const;
|
||||
/* */ void copyTo16(f32 *pf) const;
|
||||
/* 8049b2d0 */ void setAxisRotation(const Vector3f &, f32);
|
||||
/* */ Vector3f multVector(const Vector3f &vec) const;
|
||||
|
||||
+4
-7
@@ -126,13 +126,10 @@ public:
|
||||
/* 802e2510 */ bool checkChildProcessCreateState() const;
|
||||
|
||||
public:
|
||||
/* 802e2540 */ static void setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param,
|
||||
u8 groupType);
|
||||
/* 802e2560 */ static fBase_c *fBase_make(ProfileName profName, fTrNdBa_c *connectParent, unsigned long param,
|
||||
u8 groupType);
|
||||
/* 802e2640 */ static fBase_c *createRoot(ProfileName profName, unsigned long param, u8 groupType);
|
||||
/* 802e2600 */ static fBase_c *createChild(ProfileName profName, fBase_c *parent, unsigned long param,
|
||||
u8 groupType);
|
||||
/* 802e2540 */ static void setTmpCtData(ProfileName profName, fTrNdBa_c *connectParent, u32 param, u8 groupType);
|
||||
/* 802e2560 */ static fBase_c *fBase_make(ProfileName profName, fTrNdBa_c *connectParent, u32 param, u8 groupType);
|
||||
/* 802e2640 */ static fBase_c *createRoot(ProfileName profName, u32 param, u8 groupType);
|
||||
/* 802e2600 */ static fBase_c *createChild(ProfileName profName, fBase_c *parent, u32 param, u8 groupType);
|
||||
|
||||
public:
|
||||
/* 80575ba8 */ static fLiMgBa_c m_forceExecuteList;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
/* 802e28c0 */ int getSearchTableNum();
|
||||
/* 802e28d0 */ static fBase_c *searchBaseByID(fBaseID_e id);
|
||||
/* 802e2920 */ static fBase_c *searchBaseByProfName(ProfileName profID, const fBase_c *parent);
|
||||
/* 802e2980 */ static fBase_c *searchBaseByGroupType(unsigned char groupType, const fBase_c *parent);
|
||||
/* 802e2980 */ static fBase_c *searchBaseByGroupType(u8 groupType, const fBase_c *parent);
|
||||
/* 802e29e0 */ static void mainLoop();
|
||||
|
||||
private:
|
||||
|
||||
+48
-31
@@ -14,37 +14,54 @@ class ExpHeap;
|
||||
class AssertHeap;
|
||||
} // namespace EGG
|
||||
// TODO: Doc symbols and func locations
|
||||
namespace mHeap {
|
||||
/* 802f0f00 */ u16 copyAttribute(u32);
|
||||
/* 802f0f40 */ EGG::Heap *setCurrentHeap(EGG::Heap *);
|
||||
/* 802f0f50 */ EGG::ExpHeap *createExpHeap(size_t size, EGG::Heap *parentHeap, char *name, s32 align, u32 unk);
|
||||
/* 802f1060 */ size_t adjustExpHeap(EGG::Heap *heap);
|
||||
/* 802f10d0 */ size_t expHeapCost(size_t start, s32 size);
|
||||
/* 802f10f0 */ EGG::FrmHeap *createFrmHeap(size_t size, EGG::Heap *parentHeap, char *name, size_t align, size_t attrs);
|
||||
/* 802f1200 */ void destroyFrmHeap(EGG::FrmHeap *heap);
|
||||
/* 802f1220 */ size_t adjustFrmHeap(EGG::FrmHeap *heap);
|
||||
/* 802f1290 */ size_t frmHeapCost(size_t start, s32 size);
|
||||
/* 802f12b0 */ EGG::Heap **setTempHeap(EGG::Heap **prevHeap, EGG::Heap *tempNewHeap);
|
||||
/* 802f12f0 */ EGG::Heap **restoreTempHeap(EGG::Heap **prevHeap, s32 size);
|
||||
/* 802f1350 */ EGG::ExpHeap *createHeap(size_t size, EGG::Heap *, char *name);
|
||||
/* 802f13d0 */ void saveCurrentHeap();
|
||||
/* 802f13e0 */ void restoreCurrentHeap();
|
||||
/* 802f1410 */ EGG::FrmHeap *makeFrmHeapAndUpdate(size_t size, EGG::Heap *parentHeap, const char *name, s32 align,
|
||||
u32 unk);
|
||||
/* 802f1450 */ int getGameHeapNum();
|
||||
/* 802f1460 */ EGG::ExpHeap *createGameHeap(s32 heapNum, size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f1510 */ EGG::ExpHeap *createGameHeap1(s32 size, EGG::Heap *parentHeap);
|
||||
/* 802f1560 */ EGG::ExpHeap *createArchiveHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f1590 */ EGG::ExpHeap *createCommandHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f15c0 */ EGG::ExpHeap *createDylinkHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f15f0 */ EGG::AssertHeap *createAssertHeap(EGG::Heap *parentHeap);
|
||||
/* 802f1640 */ EGG::Heap *makeHeapOnCurrentGameHeap(size_t size, char *name, s32 align, u32 unk);
|
||||
extern EGG::ExpHeap *g_gameHeaps[4];
|
||||
extern EGG::ExpHeap *s_SavedCurrentHeap;
|
||||
extern EGG::ExpHeap *g_archiveHeap;
|
||||
extern EGG::ExpHeap *g_commandHeap;
|
||||
extern EGG::ExpHeap *g_dylinkHeap;
|
||||
extern EGG::AssertHeap *g_assertHeap;
|
||||
class mHeap {
|
||||
public:
|
||||
/* 802f0f00 */ static u16 copyAttribute(u32);
|
||||
/* 802f0f40 */ static EGG::Heap *setCurrentHeap(EGG::Heap *);
|
||||
/* 802f0f50 */ static EGG::Heap *createExpHeap(size_t size, EGG::Heap *parentHeap, const char *name, u32 align,
|
||||
u32 attrs);
|
||||
/* 802f1060 */ static size_t adjustExpHeap(EGG::ExpHeap *heap);
|
||||
/* 802f10d0 */ static size_t expHeapCost(size_t start, u32 size);
|
||||
/* 802f10f0 */ static EGG::FrmHeap *createFrmHeap(size_t size, EGG::Heap *parentHeap, const char *name,
|
||||
size_t align, size_t attrs);
|
||||
/* 802f1200 */ static void destroyFrmHeap(EGG::FrmHeap *heap);
|
||||
/* 802f1220 */ static size_t adjustFrmHeap(EGG::FrmHeap *heap);
|
||||
/* 802f1290 */ static size_t frmHeapCost(size_t start, u32 size);
|
||||
mHeap() {
|
||||
heap = nullptr;
|
||||
}
|
||||
/* 802f12b0 */ mHeap(EGG::Heap *heap);
|
||||
/* 802f12f0 */ ~mHeap();
|
||||
/* 802f1350 */ static EGG::Heap *createHeap(size_t size, EGG::Heap *, const char *name);
|
||||
/* 802f13d0 */ static void saveCurrentHeap();
|
||||
/* 802f13e0 */ static void restoreCurrentHeap();
|
||||
/* 802f1410 */ static EGG::FrmHeap *makeFrmHeapAndUpdate(size_t size, EGG::Heap *parentHeap, const char *name,
|
||||
u32 align, u32 attrs);
|
||||
/* 802f1450 */ static int getGameHeapNum();
|
||||
/* 802f1460 */ static EGG::Heap *createGameHeap(int heapNum, size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f1510 */ static void createGameHeap1(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f1560 */ static void createArchiveHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f1590 */ static void createCommandHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f15c0 */ static void createDylinkHeap(size_t size, EGG::Heap *parentHeap);
|
||||
/* 802f15f0 */ static EGG::AssertHeap *createAssertHeap(EGG::Heap *parentHeap);
|
||||
/* 802f1640 */ static EGG::Heap *makeHeapOnCurrentGameHeap(size_t size, const char *name, u32 align, u32 flags);
|
||||
|
||||
static int getDefaultGameHeapId();
|
||||
|
||||
static bool isValidHeapId(u32 id) {
|
||||
return id >= 1 && id <= 2;
|
||||
}
|
||||
|
||||
static EGG::Heap *g_gameHeaps[4];
|
||||
static EGG::Heap *s_SavedCurrentHeap;
|
||||
static EGG::Heap *g_archiveHeap;
|
||||
static EGG::Heap *g_commandHeap;
|
||||
static EGG::Heap *g_dylinkHeap;
|
||||
static EGG::AssertHeap *g_assertHeap;
|
||||
static u8 g_DefaultGameHeapId;
|
||||
static const char *const s_GameHeapNames[4];
|
||||
|
||||
EGG::Heap *heap;
|
||||
}; // namespace mHeap
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,42 +1,39 @@
|
||||
#ifndef NW4R_SND_WAVESOUND_H
|
||||
#define NW4R_SND_WAVESOUND_H
|
||||
#include "types_nw4r.h"
|
||||
#include "snd_BasicSound.h"
|
||||
#include "snd_WsdPlayer.h"
|
||||
#include "types_nw4r.h"
|
||||
#include "ut_RuntimeTypeInfo.h"
|
||||
|
||||
namespace nw4r
|
||||
{
|
||||
namespace snd
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
struct WaveSound : BasicSound
|
||||
{
|
||||
WsdPlayer mPlayer; // at 0xD8
|
||||
WaveSoundHandle *mTempSpecialHandle; // at 0x1B0
|
||||
SoundInstanceManager<WaveSound> *mManager; // at 0x1B4
|
||||
bool mIsPrepared; // at 0x1B8
|
||||
|
||||
WaveSound(SoundInstanceManager<WaveSound> *);
|
||||
bool Prepare(const void *, long, WsdPlayer::StartOffsetType, s32, int, const WsdPlayer::WsdCallback *, u32);
|
||||
void SetChannelPriority(int);
|
||||
void SetReleasePriorityFix(bool);
|
||||
namespace nw4r {
|
||||
namespace snd {
|
||||
namespace detail {
|
||||
struct WaveSound : BasicSound {
|
||||
WsdPlayer mPlayer; // at 0xD8
|
||||
WaveSoundHandle *mTempSpecialHandle; // at 0x1B0
|
||||
SoundInstanceManager<WaveSound> *mManager; // at 0x1B4
|
||||
bool mIsPrepared; // at 0x1B8
|
||||
|
||||
static ut::detail::RuntimeTypeInfo typeInfo;
|
||||
|
||||
virtual const ut::detail::RuntimeTypeInfo * GetRuntimeTypeInfo() const; // at 0x8
|
||||
virtual ~WaveSound(); // at 0xc
|
||||
virtual UNKTYPE Shutdown(); // at 0x28
|
||||
virtual bool IsPrepared() const; // at 0x2c
|
||||
virtual void SetPlayerPriority(int); // at 0x4c
|
||||
virtual bool IsAttachedTempSpecialHandle(); // at 0x5c
|
||||
virtual UNKTYPE DetachTempSpecialHandle(); // at 0x60
|
||||
virtual BasicPlayer * GetBasicPlayer(); // at 0x68
|
||||
virtual const BasicPlayer * GetBasicPlayer() const; // at 0x6c
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
WaveSound(SoundInstanceManager<WaveSound> *);
|
||||
bool Prepare(const void *, s32, WsdPlayer::StartOffsetType, s32, int, const WsdPlayer::WsdCallback *, u32);
|
||||
void SetChannelPriority(int);
|
||||
void SetReleasePriorityFix(bool);
|
||||
|
||||
#endif
|
||||
static ut::detail::RuntimeTypeInfo typeInfo;
|
||||
|
||||
virtual const ut::detail::RuntimeTypeInfo *GetRuntimeTypeInfo() const; // at 0x8
|
||||
virtual ~WaveSound(); // at 0xc
|
||||
virtual UNKTYPE Shutdown(); // at 0x28
|
||||
virtual bool IsPrepared() const; // at 0x2c
|
||||
virtual void SetPlayerPriority(int); // at 0x4c
|
||||
virtual bool IsAttachedTempSpecialHandle(); // at 0x5c
|
||||
virtual UNKTYPE DetachTempSpecialHandle(); // at 0x60
|
||||
virtual BasicPlayer *GetBasicPlayer(); // at 0x68
|
||||
virtual const BasicPlayer *GetBasicPlayer() const; // at 0x6c
|
||||
};
|
||||
} // namespace detail
|
||||
} // namespace snd
|
||||
} // namespace nw4r
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
DvdFileStream(long entrynum);
|
||||
DvdFileStream(s32 entrynum);
|
||||
DvdFileStream(const DVDFileInfo *info, bool close);
|
||||
virtual ~DvdFileStream(); // at 0xC
|
||||
|
||||
@@ -67,15 +67,15 @@ public:
|
||||
|
||||
virtual void Close(); // at 0x10
|
||||
|
||||
virtual long Read(void *dst, unsigned long size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, unsigned long size, AsyncCallback callback,
|
||||
virtual s32 Read(void *dst, u32 size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x18
|
||||
|
||||
virtual long Peek(void *dst, unsigned long size); // at 0x5C
|
||||
virtual bool PeekAsync(void *dst, unsigned long size, AsyncCallback callback,
|
||||
virtual s32 Peek(void *dst, u32 size); // at 0x5C
|
||||
virtual bool PeekAsync(void *dst, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x60
|
||||
|
||||
virtual void Seek(long offset, unsigned long origin); // at 0x44
|
||||
virtual void Seek(s32 offset, u32 origin); // at 0x44
|
||||
|
||||
virtual void Cancel(); // at 0x48
|
||||
virtual bool CancelAsync(AsyncCallback callback, void *arg); // at 0x4C
|
||||
@@ -88,11 +88,11 @@ public:
|
||||
bool Open(const DVDFileInfo *info, bool close);
|
||||
|
||||
private:
|
||||
static void DvdAsyncCallback_(long result, DVDFileInfo *info);
|
||||
static void DvdCBAsyncCallback_(long result, DVDCommandBlock *block);
|
||||
static void DvdAsyncCallback_(s32 result, DVDFileInfo *info);
|
||||
static void DvdCBAsyncCallback_(s32 result, DVDCommandBlock *block);
|
||||
|
||||
void Initialize_();
|
||||
unsigned long AdjustReadLength_(unsigned long len);
|
||||
u32 AdjustReadLength_(u32 len);
|
||||
|
||||
private:
|
||||
FilePosition mFilePosition; // at 0x14
|
||||
|
||||
@@ -11,19 +11,19 @@ class DvdLockedFileStream : public DvdFileStream {
|
||||
public:
|
||||
NW4R_UT_RTTI_DECL(DvdLockedFileStream);
|
||||
|
||||
DvdLockedFileStream(long entrynum);
|
||||
DvdLockedFileStream(s32 entrynum);
|
||||
DvdLockedFileStream(const DVDFileInfo *info, bool close);
|
||||
virtual ~DvdLockedFileStream(); // at 0xC
|
||||
|
||||
virtual void Close(); // at 0x10
|
||||
|
||||
virtual long Read(void *dst, unsigned long size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, unsigned long size, AsyncCallback callback, void *arg) {
|
||||
virtual s32 Read(void *dst, u32 size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback, void *arg) {
|
||||
return false;
|
||||
} // at 0x18
|
||||
|
||||
virtual long Peek(void *dst, unsigned long size); // at 0x5C
|
||||
virtual bool PeekAsync(void *dst, unsigned long size, AsyncCallback callback, void *arg) {
|
||||
virtual s32 Peek(void *dst, u32 size); // at 0x5C
|
||||
virtual bool PeekAsync(void *dst, u32 size, AsyncCallback callback, void *arg) {
|
||||
return false;
|
||||
} // at 0x60
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
u32 GetFileSize() const {
|
||||
return mFileSize;
|
||||
}
|
||||
void SetFileSize(unsigned long fileSize) {
|
||||
void SetFileSize(u32 fileSize) {
|
||||
mFileSize = fileSize;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@ public:
|
||||
return mFileOffset;
|
||||
}
|
||||
|
||||
u32 Skip(long offset);
|
||||
u32 Append(long offset);
|
||||
void Seek(long offset, unsigned long origin);
|
||||
u32 Skip(s32 offset);
|
||||
u32 Append(s32 offset);
|
||||
void Seek(s32 offset, u32 origin);
|
||||
|
||||
private:
|
||||
u32 mFileSize; // at 0x0
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
virtual ~FileStream() {} // at 0xC
|
||||
|
||||
virtual u32 GetSize() const = 0; // at 0x40
|
||||
virtual void Seek(long offset, unsigned long origin); // at 0x44
|
||||
virtual void Seek(s32 offset, u32 origin); // at 0x44
|
||||
virtual void Cancel(); // at 0x48
|
||||
virtual bool CancelAsync(AsyncCallback callback, void *arg); // at 0x4C
|
||||
virtual bool CanSeek() const = 0; // at 0x50
|
||||
|
||||
@@ -10,17 +10,17 @@ class IOStream {
|
||||
public:
|
||||
NW4R_UT_RTTI_DECL(IOStream);
|
||||
|
||||
typedef void (*AsyncCallback)(long result, IOStream *stream, void *arg);
|
||||
typedef void (*AsyncCallback)(s32 result, IOStream *stream, void *arg);
|
||||
|
||||
IOStream() : mIsOpen(false), mCallback(NULL), mCallbackArg(NULL) {}
|
||||
virtual ~IOStream() {} // at 0xC
|
||||
|
||||
virtual void Close() = 0; // at 0x10
|
||||
virtual long Read(void *dst, unsigned long size) = 0; // at 0x14
|
||||
virtual bool ReadAsync(void *dst, unsigned long size, AsyncCallback callback,
|
||||
void *arg); // at 0x18
|
||||
virtual long Write(const void *src, unsigned long size); // at 0x1C
|
||||
virtual bool WriteAsync(const void *src, unsigned long size, AsyncCallback callback,
|
||||
virtual void Close() = 0; // at 0x10
|
||||
virtual s32 Read(void *dst, u32 size) = 0; // at 0x14
|
||||
virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x18
|
||||
virtual s32 Write(const void *src, u32 size); // at 0x1C
|
||||
virtual bool WriteAsync(const void *src, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x20
|
||||
virtual bool IsBusy() const; // at 0x24
|
||||
virtual bool CanAsync() const = 0; // at 0x28
|
||||
|
||||
@@ -25,8 +25,8 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
NandFileStream(const char *path, unsigned long access);
|
||||
NandFileStream(const NANDFileInfo *info, unsigned long access, bool close);
|
||||
NandFileStream(const char *path, u32 access);
|
||||
NandFileStream(const NANDFileInfo *info, u32 access, bool close);
|
||||
virtual ~NandFileStream(); // at 0xC
|
||||
|
||||
virtual bool IsBusy() const {
|
||||
@@ -68,21 +68,21 @@ public:
|
||||
|
||||
virtual void Close(); // at 0x10
|
||||
|
||||
virtual long Read(void *dst, unsigned long size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, unsigned long size, AsyncCallback callback,
|
||||
virtual s32 Read(void *dst, u32 size); // at 0x14
|
||||
virtual bool ReadAsync(void *dst, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x18
|
||||
|
||||
virtual long Write(const void *src, unsigned long size); // at 0x1C
|
||||
virtual bool WriteAsync(const void *src, unsigned long size, AsyncCallback callback,
|
||||
virtual s32 Write(const void *src, u32 size); // at 0x1C
|
||||
virtual bool WriteAsync(const void *src, u32 size, AsyncCallback callback,
|
||||
void *arg); // at 0x20
|
||||
|
||||
virtual void Seek(long offset, unsigned long origin); // at 0x44
|
||||
virtual void Seek(s32 offset, u32 origin); // at 0x44
|
||||
|
||||
bool Open(const char *path, unsigned long access);
|
||||
bool Open(const NANDFileInfo *info, unsigned long access, bool close) DECOMP_DONT_INLINE;
|
||||
bool Open(const char *path, u32 access);
|
||||
bool Open(const NANDFileInfo *info, u32 access, bool close) DECOMP_DONT_INLINE;
|
||||
|
||||
private:
|
||||
static void NandAsyncCallback_(long result, NANDCommandBlock *block);
|
||||
static void NandAsyncCallback_(s32 result, NANDCommandBlock *block);
|
||||
|
||||
void Initialize_();
|
||||
|
||||
|
||||
@@ -94,13 +94,13 @@ public:
|
||||
f32 VPrintfMutable(const T *format, va_list args);
|
||||
f32 PrintMutable(const T *str, int n);
|
||||
|
||||
// static int VSNPrintf(T *buffer, unsigned long count, const T *fmt, va_list args);
|
||||
// static int VSNPrintf(T *buffer, u32 count, const T *fmt, va_list args);
|
||||
|
||||
static int VSNPrintf(char *buffer, unsigned long count, const char *fmt, va_list args) {
|
||||
static int VSNPrintf(char *buffer, u32 count, const char *fmt, va_list args) {
|
||||
return vsnprintf(buffer, count, fmt, args);
|
||||
}
|
||||
|
||||
static int VSNPrintf(wchar_t *buffer, unsigned long count, const wchar_t *fmt, va_list args) {
|
||||
static int VSNPrintf(wchar_t *buffer, u32 count, const wchar_t *fmt, va_list args) {
|
||||
return vswprintf(buffer, count, fmt, args);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
f32 PrintImpl(const T *str, int len, bool m);
|
||||
f32 AdjustCursor(f32 *x1, f32 *y1, const T *str, int len);
|
||||
|
||||
bool IsDrawFlagSet(unsigned long mask, unsigned long flag) const {
|
||||
bool IsDrawFlagSet(u32 mask, u32 flag) const {
|
||||
return (mDrawFlag & mask) == flag;
|
||||
}
|
||||
|
||||
@@ -127,16 +127,6 @@ private:
|
||||
static TagProcessorBase<T> mDefaultTagProcessor;
|
||||
};
|
||||
|
||||
// template <>
|
||||
// int TextWriterBase<char>::VSNPrintf(char *buffer, unsigned long count, const char *fmt, va_list args) {
|
||||
// return vsnprintf(buffer, count, fmt, args);
|
||||
// }
|
||||
|
||||
// template <>
|
||||
// int TextWriterBase<wchar_t>::VSNPrintf(wchar_t *buffer, unsigned long count, const wchar_t *fmt, va_list args) {
|
||||
// return vswprintf(buffer, count, fmt, args);
|
||||
// }
|
||||
|
||||
} // namespace ut
|
||||
} // namespace nw4r
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ struct BinaryFileHeader {
|
||||
u16 numBlocks; // at 0xE
|
||||
};
|
||||
|
||||
bool IsValidBinaryFile(const BinaryFileHeader *header, unsigned long magic, u16 version, u16 numBlocks);
|
||||
bool IsValidBinaryFile(const BinaryFileHeader *header, u32 magic, u16 version, u16 numBlocks);
|
||||
|
||||
} // namespace ut
|
||||
} // namespace nw4r
|
||||
|
||||
@@ -45,8 +45,8 @@ typedef enum {
|
||||
DVD_COVER_CLOSED,
|
||||
} DVDCoverState;
|
||||
|
||||
typedef void (*DVDAsyncCallback)(long result, struct DVDFileInfo *info);
|
||||
typedef void (*DVDCommandCallback)(long result, struct DVDCommandBlock *block);
|
||||
typedef void (*DVDAsyncCallback)(s32 result, struct DVDFileInfo *info);
|
||||
typedef void (*DVDCommandCallback)(s32 result, struct DVDCommandBlock *block);
|
||||
|
||||
typedef struct DVDDiskID {
|
||||
char game[4]; // at 0x0
|
||||
|
||||
@@ -66,7 +66,7 @@ typedef enum {
|
||||
NAND_PERM_RWALL = NAND_PERM_RALL | NAND_PERM_WALL
|
||||
} NANDPermission;
|
||||
|
||||
typedef void (*NANDAsyncCallback)(long result, struct NANDCommandBlock *block);
|
||||
typedef void (*NANDAsyncCallback)(s32 result, struct NANDCommandBlock *block);
|
||||
|
||||
typedef struct NANDStatus {
|
||||
u32 ownerId; // at 0x0
|
||||
@@ -76,8 +76,8 @@ typedef struct NANDStatus {
|
||||
} NANDStatus;
|
||||
|
||||
typedef struct NANDFileInfo {
|
||||
long fd; // at 0x0
|
||||
long tempFd; // at 0x4
|
||||
s32 fd; // at 0x0
|
||||
s32 tempFd; // at 0x4
|
||||
char openPath[FS_MAX_PATH]; // at 0x8
|
||||
char tempPath[FS_MAX_PATH]; // at 0x48
|
||||
u8 access; // at 0x88
|
||||
@@ -158,7 +158,7 @@ NANDResult NANDPrivateCreateDirAsync(const char *path, u8 perm, u8 attr, NANDAsy
|
||||
|
||||
NANDResult NANDMove(const char *from, const char *to);
|
||||
|
||||
NANDResult NANDGetLength(NANDFileInfo *info, unsigned long *length);
|
||||
NANDResult NANDGetLength(NANDFileInfo *info, u32 *length);
|
||||
NANDResult NANDGetLengthAsync(NANDFileInfo *info, u32 *lengthOut, NANDAsyncCallback callback, NANDCommandBlock *block);
|
||||
|
||||
NANDResult NANDGetStatus(const char *path, NANDStatus *status);
|
||||
|
||||
Reference in New Issue
Block a user