2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-14 21:26:09 +00:00

Initial proper CTexture RE, fix configuration corruption

This commit is contained in:
2022-03-02 00:26:24 -08:00
parent 5e7b8ebacf
commit b0a711d5e2
11 changed files with 347 additions and 13 deletions

View File

@@ -16,7 +16,7 @@ COutputStream::COutputStream(u8* ptr, s32 len) : x8_bufLen(len) {
}
COutputStream::~COutputStream() {
if (x8_bufLen < 64) {
if (x8_bufLen > 64) {
delete[] xc_ptr;
}
}

View File

@@ -6,13 +6,10 @@ CTextInStream::CTextInStream(CInputStream& in, int len) : m_in(&in), m_len(len)
std::string CTextInStream::GetNextLine() {
std::string ret;
while (true) {
while (!IsEOF()) {
auto chr = m_in->ReadChar();
ret += chr;
if (ret.back() == '\r' || ret.back() == '\n') {
if (ret.back() == '\r') {
m_in->ReadChar();
}
if (ret.back() == '\n') {
break;
}
}