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* readBytes(Int64);
|
||||
bool isOpenForReading();
|
||||
std::string m_filename;
|
||||
std::string m_filepath;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,11 +18,9 @@ public:
|
|||
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);
|
||||
WiiFile* getFile(const std::string& filename) const;
|
||||
std::unordered_map<std::string, WiiFile*>& getFileList();
|
||||
WiiFile* file(const std::string& filename) const;
|
||||
std::unordered_map<std::string, WiiFile*>& fileList();
|
||||
|
||||
void setBanner(WiiBanner* banner);
|
||||
WiiBanner* banner() const;
|
||||
|
|
|
@ -34,7 +34,7 @@ BinaryWriter::BinaryWriter(const Stream& stream) :
|
|||
{}
|
||||
|
||||
BinaryWriter::BinaryWriter(const std::string& filename)
|
||||
: m_filename(filename)
|
||||
: m_filepath(filename)
|
||||
{
|
||||
m_length = 0x10;
|
||||
m_bitPosition = 0;
|
||||
|
@ -47,15 +47,15 @@ BinaryWriter::BinaryWriter(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.");
|
||||
|
||||
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)
|
||||
throw FileNotFoundException(m_filename);
|
||||
throw FileNotFoundException(m_filepath);
|
||||
|
||||
Uint32 done = 0;
|
||||
Uint32 blocksize = BLOCKSZ;
|
||||
|
|
Loading…
Reference in New Issue