JSUInputStream match

This commit is contained in:
Jasper St. Pierre
2023-09-24 12:56:13 -07:00
parent 9cff8c08f3
commit 3994791ee3
3 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -786,7 +786,7 @@ config.libs = [
"JSupport",
[
Object(Matching, "JSystem/JSupport/JSUList.cpp"),
Object(NonMatching, "JSystem/JSupport/JSUInputStream.cpp"),
Object(Matching, "JSystem/JSupport/JSUInputStream.cpp"),
Object(Matching, "JSystem/JSupport/JSUMemoryStream.cpp"),
Object(Matching, "JSystem/JSupport/JSUFileStream.cpp"),
],
@@ -8,13 +8,16 @@ public:
JSURandomInputStream() {}
virtual ~JSURandomInputStream() {}
/* vt[3] */ virtual s32 getAvailable() const; /* override */
/* vt[4] */ virtual s32 skip(s32); /* override */
/* vt[5] */ virtual u32 readData(void*, s32) = 0;
/* vt[6] */ virtual s32 getLength() const = 0;
/* vt[7] */ virtual s32 getPosition() const = 0;
/* vt[8] */ virtual s32 seekPos(s32, JSUStreamSeekFrom) = 0;
/* vt[3] */ virtual s32 getAvailable() const /* override */ {
return getLength() - getPosition();
}
// TODO: fix return types
s32 align(s32);
s32 peek(void*, s32);
-5
View File
@@ -196,8 +196,3 @@ void JKRAramStream::setTransBuffer(u8* buffer, u32 bufferSize, JKRHeap* heap) {
JKRAramStreamCommand::JKRAramStreamCommand() {
mAllocatedTransferBuffer = false;
}
/* 802B6714-802B6770 .text getAvailable__20JSURandomInputStreamCFv */
s32 JSURandomInputStream::getAvailable() const {
return getLength() - getPosition();
}