mirror of
https://github.com/echojc/osu-ds.git
synced 2025-06-19 01:15:44 -04:00

Removed the arm7 section Changed the makefile to only use the arm9 stuff Epicpkmn: Fix source/Graphics/GraphicsManager.cpp Co-Authored-By: Pk11 <epicpkmn11@outlook.com> Co-Authored-By: Kaisaan <34224128+Kaisaan@users.noreply.github.com>
49 lines
791 B
C++
49 lines
791 B
C++
#include <nds.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <string>
|
|
|
|
#ifndef __FILEREADER_H__
|
|
#define __FILEREADER_H__
|
|
|
|
using namespace std;
|
|
|
|
class FileReader
|
|
{
|
|
public:
|
|
FileReader(u8* source);
|
|
FileReader(string& filename);
|
|
FileReader(const char* filename);
|
|
~FileReader();
|
|
|
|
u8 ReadInt8() const;
|
|
u16 ReadInt16() const;
|
|
u32 ReadInt32() const;
|
|
float ReadFloat() const;
|
|
u32 ReadVarInt() const;
|
|
string ReadString() const;
|
|
|
|
bool Ready() const { return fReady; }
|
|
|
|
void Skip(u32 count) const;
|
|
|
|
void Reset() const;
|
|
|
|
protected:
|
|
u8* mBuffer;
|
|
mutable u32 pos;
|
|
|
|
static u32 BUFFERSIZE;
|
|
|
|
FILE* mHandle;
|
|
|
|
int FillBuffer() const;
|
|
void PrepareBuffer(u8 datasize) const;
|
|
|
|
bool fReady;
|
|
|
|
private:
|
|
void Init(FILE* handle, u8* buffer);
|
|
};
|
|
|
|
#endif |