Files
ac-decomp/include/JSystem/JSupport/JSUFileInputStream.h
T
Cuyler36 80ef14e480 Add & Link JKernel (#142)
* match and link JKRAram.cpp

* match and link JKRExpHeap

* match and link JKRAramStream.cpp

* match and link JKRFileLoader.cpp

* match and link JKRFileFinder.cpp

* JKernel Dump

* match and link JKRAramArchive.cpp

* match and link JKRDvdArchive.cpp

* match and link JKRCompArchive.cpp

* match but not link JKRDvdAramRipper

* small refactors

* match and link JKRThread.cpp

* fix and link JKRDvdAramStream.cpp

* Formatting fixes

---------

Co-authored-by: SwareJonge <olaf23okken@gmail.com>
2023-11-07 23:34:10 -05:00

27 lines
712 B
C++

#ifndef JSUFILEINPUTSTREAM_H
#define JSUFILEINPUTSTREAM_H
#include "types.h"
#include "JSystem/JKernel/JKRFile.h"
#include "JSystem/JSupport/JSURandomInputStream.h"
class JSUFileInputStream : public JSURandomInputStream {
public:
JSUFileInputStream(JKRFile* file);
virtual int readData(void* buf, s32 len);
virtual int getLength() const { return ((JKRFile*)this->mObject)->getFileSize(); }
virtual int getPosition() const { return this->mPosition; }
virtual int seekPos(s32 offset, JSUStreamSeekFrom from);
/* These two functions are shown in the symbol map, but are unused. */
// bool open(const char* path);
// bool close();
protected:
const void* mObject;
s32 mPosition;
};
#endif