diff --git a/configure.py b/configure.py index 962df3413..4fac3a52e 100644 --- a/configure.py +++ b/configure.py @@ -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"), ], diff --git a/include/JSystem/JSupport/JSURandomInputStream.h b/include/JSystem/JSupport/JSURandomInputStream.h index 49da046eb..774ad3b4d 100644 --- a/include/JSystem/JSupport/JSURandomInputStream.h +++ b/include/JSystem/JSupport/JSURandomInputStream.h @@ -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); diff --git a/src/JSystem/JKernel/JKRAramStream.cpp b/src/JSystem/JKernel/JKRAramStream.cpp index 5ca40cc8e..0b42cead2 100644 --- a/src/JSystem/JKernel/JKRAramStream.cpp +++ b/src/JSystem/JKernel/JKRAramStream.cpp @@ -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(); -}