* Working on Wii Port

This commit is contained in:
Antidote
2013-09-08 20:36:54 -07:00
parent baf16a6fbd
commit 740fbd4273
12 changed files with 415 additions and 48 deletions

View File

@@ -25,6 +25,10 @@
#include <vector>
#include <iostream>
#ifdef HW_RVL
#include <malloc.h>
#endif // HW_RVL
namespace zelda
{
namespace io
@@ -44,12 +48,27 @@ BinaryWriter::BinaryWriter(const std::string& filename)
m_length = 0x10;
m_bitPosition = 0;
m_position = 0;
#ifdef HW_RVL
m_data = (Uint8*)memalign(32, m_length);
#else
m_data = new Uint8[m_length];
#endif
if (!m_data)
throw error::IOException("BinaryWriter::BinaryWriter -> Could not allocate memory!");
memset(m_data, 0, m_length);
}
void BinaryWriter::setFilepath(const std::string& filepath)
{
m_filepath = filepath;
}
std::string BinaryWriter::filepath() const
{
return m_filepath;
}
void BinaryWriter::save(const std::string& filename)
{
if (filename.empty() && m_filepath.empty())