mirror of https://github.com/libAthena/athena.git
* Get libzelda compiling
This commit is contained in:
parent
24f6a1715a
commit
2a5f4add1c
|
@ -136,7 +136,7 @@ protected:
|
||||||
Int8 readByte();
|
Int8 readByte();
|
||||||
Int8* readBytes(Int64);
|
Int8* readBytes(Int64);
|
||||||
bool isOpenForReading();
|
bool isOpenForReading();
|
||||||
std::string m_filename;
|
std::string m_filepath;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,11 +18,9 @@ public:
|
||||||
WiiSave();
|
WiiSave();
|
||||||
virtual ~WiiSave();
|
virtual ~WiiSave();
|
||||||
|
|
||||||
bool saveToFile(const std::string& filepath, Uint8* macAddress, Uint32 ngId, Uint8* ngPriv, Uint8* ngSig, Uint32 ngKeyId);
|
|
||||||
|
|
||||||
void addFile(const std::string& filename, WiiFile* file);
|
void addFile(const std::string& filename, WiiFile* file);
|
||||||
WiiFile* getFile(const std::string& filename) const;
|
WiiFile* file(const std::string& filename) const;
|
||||||
std::unordered_map<std::string, WiiFile*>& getFileList();
|
std::unordered_map<std::string, WiiFile*>& fileList();
|
||||||
|
|
||||||
void setBanner(WiiBanner* banner);
|
void setBanner(WiiBanner* banner);
|
||||||
WiiBanner* banner() const;
|
WiiBanner* banner() const;
|
||||||
|
|
|
@ -34,7 +34,7 @@ BinaryWriter::BinaryWriter(const Stream& stream) :
|
||||||
{}
|
{}
|
||||||
|
|
||||||
BinaryWriter::BinaryWriter(const std::string& filename)
|
BinaryWriter::BinaryWriter(const std::string& filename)
|
||||||
: m_filename(filename)
|
: m_filepath(filename)
|
||||||
{
|
{
|
||||||
m_length = 0x10;
|
m_length = 0x10;
|
||||||
m_bitPosition = 0;
|
m_bitPosition = 0;
|
||||||
|
@ -47,15 +47,15 @@ BinaryWriter::BinaryWriter(const std::string& filename)
|
||||||
|
|
||||||
void BinaryWriter::save(const std::string& filename)
|
void BinaryWriter::save(const std::string& filename)
|
||||||
{
|
{
|
||||||
if (filename.empty() && m_filename.empty())
|
if (filename.empty() && m_filepath.empty())
|
||||||
throw Exception("InvalidOperationException: BinaryWriter::Save() -> No file specified, cannot save.");
|
throw Exception("InvalidOperationException: BinaryWriter::Save() -> No file specified, cannot save.");
|
||||||
|
|
||||||
if (!filename.empty())
|
if (!filename.empty())
|
||||||
m_filename = filename;
|
m_filepath = filename;
|
||||||
|
|
||||||
FILE* out = fopen(m_filename.c_str(), "wb");
|
FILE* out = fopen(m_filepath.c_str(), "wb");
|
||||||
if (!out)
|
if (!out)
|
||||||
throw FileNotFoundException(m_filename);
|
throw FileNotFoundException(m_filepath);
|
||||||
|
|
||||||
Uint32 done = 0;
|
Uint32 done = 0;
|
||||||
Uint32 blocksize = BLOCKSZ;
|
Uint32 blocksize = BLOCKSZ;
|
||||||
|
|
Loading…
Reference in New Issue