mirror of
https://github.com/zeldaret/ss
synced 2026-06-10 20:58:38 -04:00
ut_IOStream
thanks ogws
This commit is contained in:
@@ -185,6 +185,7 @@ nw4r/ut/ut_TagProcessorBase.cpp:
|
||||
nw4r/ut/ut_IOStream.cpp:
|
||||
.text start:0x8042B4E0 end:0x8042B55C
|
||||
.ctors start:0x804DB938 end:0x804DB93C
|
||||
.sbss start:0x80576590 end:0x80576598
|
||||
|
||||
nw4r/ut/ut_FileStream.cpp:
|
||||
.text start:0x8042B560 end:0x8042B6EC
|
||||
|
||||
@@ -23960,10 +23960,10 @@ ReadAsync__Q34nw4r2ut8IOStreamFPvUlPFlPQ34nw4r2ut8IOStreamPv_vPv = .text:0x8042B
|
||||
Write__Q34nw4r2ut8IOStreamFPCvUl = .text:0x8042B4F0; // type:function size:0x8
|
||||
WriteAsync__Q34nw4r2ut8IOStreamFPCvUlPFlPQ34nw4r2ut8IOStreamPv_vPv = .text:0x8042B500; // type:function size:0x8
|
||||
IsBusy__Q34nw4r2ut8IOStreamCFv = .text:0x8042B510; // type:function size:0x8
|
||||
GetBufferAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B520; // type:function size:0x8
|
||||
GetSizeAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B530; // type:function size:0x8
|
||||
GetOffsetAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B540; // type:function size:0x8
|
||||
__sinit_\ut_IOStream_cpp = .text:0x8042B550; // type:function size:0xC
|
||||
GetBufferAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B520; // type:function size:0x8 scope:weak
|
||||
GetSizeAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B530; // type:function size:0x8 scope:weak
|
||||
GetOffsetAlign__Q34nw4r2ut8IOStreamCFv = .text:0x8042B540; // type:function size:0x8 scope:weak
|
||||
__sinit_\ut_IOStream_cpp = .text:0x8042B550; // type:function size:0xC scope:local
|
||||
Cancel__Q34nw4r2ut10FileStreamFv = .text:0x8042B560; // type:function size:0x4
|
||||
CancelAsync__Q34nw4r2ut10FileStreamFPFlPQ34nw4r2ut8IOStreamPv_vPv = .text:0x8042B570; // type:function size:0x8
|
||||
Skip__Q44nw4r2ut10FileStream12FilePositionFl = .text:0x8042B580; // type:function size:0x64
|
||||
@@ -40808,7 +40808,7 @@ lbl_8057657C = .sbss:0x8057657C; // type:object size:0x4 data:4byte
|
||||
lbl_80576580 = .sbss:0x80576580; // type:object size:0x1 data:byte
|
||||
lbl_80576584 = .sbss:0x80576584; // type:object size:0x4 data:4byte
|
||||
lbl_80576588 = .sbss:0x80576588; // type:object size:0x8 data:4byte
|
||||
lbl_80576590 = .sbss:0x80576590; // type:object size:0x8 data:4byte
|
||||
typeInfo__Q34nw4r2ut8IOStream = .sbss:0x80576590; // type:object size:0x4 data:4byte
|
||||
lbl_80576598 = .sbss:0x80576598; // type:object size:0x8 data:4byte
|
||||
lbl_805765A0 = .sbss:0x805765A0; // type:object size:0x8 data:4byte
|
||||
lbl_805765A8 = .sbss:0x805765A8; // type:object size:0x8 data:4byte
|
||||
|
||||
+1
-1
@@ -322,7 +322,7 @@ config.libs = [
|
||||
Object(Matching, "nw4r/ut/ut_binaryFileFormat.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_CharStrmReader.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_TagProcessorBase.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_IOStream.cpp"),
|
||||
Object(Matching, "nw4r/ut/ut_IOStream.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_FileStream.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_DvdFileStream.cpp"),
|
||||
Object(NonMatching, "nw4r/ut/ut_DvdLockedFileStream.cpp"),
|
||||
|
||||
@@ -10,33 +10,41 @@ class IOStream {
|
||||
public:
|
||||
NW4R_UT_RTTI_DECL(IOStream);
|
||||
|
||||
typedef void (*AsyncCallback)(s32 result, IOStream* stream, void* arg);
|
||||
typedef void (*AsyncCallback)(long result, IOStream *stream, void *arg);
|
||||
|
||||
IOStream() : mIsOpen(false), mCallback(NULL), mCallbackArg(NULL) {}
|
||||
virtual ~IOStream() {} // at 0xC
|
||||
|
||||
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 void 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
|
||||
virtual bool CanRead() const = 0; // at 0x2C
|
||||
virtual bool CanWrite() const = 0; // at 0x30
|
||||
virtual u32 GetOffsetAlign() const { return 1; } // at 0x34
|
||||
virtual u32 GetSizeAlign() const { return 1; } // at 0x38
|
||||
virtual u32 GetBufferAlign() const { return 1; } // at 0x3C
|
||||
virtual s32 Read(void *dst, u32 size) = 0; // at 0x14
|
||||
virtual bool ReadAsync(void *dst, unsigned long size, AsyncCallback callback,
|
||||
void *arg); // at 0x18
|
||||
virtual bool Write(const void *src, unsigned long size); // at 0x1C
|
||||
virtual bool WriteAsync(const void *src, unsigned long size, AsyncCallback callback,
|
||||
void *arg); // at 0x20
|
||||
virtual bool IsBusy() const; // at 0x24
|
||||
virtual bool CanAsync() const = 0; // at 0x28
|
||||
virtual bool CanRead() const = 0; // at 0x2C
|
||||
virtual bool CanWrite() const = 0; // at 0x30
|
||||
virtual u32 GetOffsetAlign() const {
|
||||
return 1;
|
||||
} // at 0x34
|
||||
virtual u32 GetSizeAlign() const {
|
||||
return 1;
|
||||
} // at 0x38
|
||||
virtual u32 GetBufferAlign() const {
|
||||
return 1;
|
||||
} // at 0x3C
|
||||
|
||||
bool IsAvailable() const { return mIsOpen; }
|
||||
bool IsAvailable() const {
|
||||
return mIsOpen;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool mIsOpen; // at 0x4
|
||||
s32 mResult; // at 0x8
|
||||
AsyncCallback mCallback; // at 0xC
|
||||
void* mCallbackArg; // at 0x10
|
||||
void *mCallbackArg; // at 0x10
|
||||
};
|
||||
|
||||
} // namespace ut
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#include <nw4r/ut.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace ut {
|
||||
|
||||
NW4R_UT_RTTI_DEF_BASE(IOStream);
|
||||
|
||||
bool IOStream::ReadAsync(void *dst, unsigned long size, AsyncCallback callback, void *arg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IOStream::Write(const void *src, unsigned long size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IOStream::WriteAsync(const void *src, unsigned long size, AsyncCallback callback, void *arg) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IOStream::IsBusy() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace ut
|
||||
} // namespace nw4r
|
||||
|
||||
Reference in New Issue
Block a user