2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-19 04:45:23 +00:00

Fully decouple hecl from Metaforce

- Added CStringExtras Convert functions
  (and UTF-compatible versions)
- GX header copied into Runtime
- SFX headers copied into Runtime/Audio
This commit is contained in:
2022-02-21 04:04:16 -05:00
committed by Phillip Stephens
parent 6c92f03664
commit 57d96dbb17
120 changed files with 4865 additions and 518 deletions

View File

@@ -23,6 +23,21 @@ union BitsToDouble {
double doub;
};
/** Word Bitmap reader/writer */
void WordBitmap::read(athena::io::IStreamReader& reader, size_t bitCount) {
m_bitCount = bitCount;
size_t wordCount = (bitCount + 31) / 32;
m_words.clear();
m_words.reserve(wordCount);
for (size_t w = 0; w < wordCount; ++w)
m_words.push_back(reader.readUint32Big());
}
void WordBitmap::write(athena::io::IStreamWriter& writer) const {
for (atUint32 word : m_words)
writer.writeUint32Big(word);
}
void WordBitmap::binarySize(size_t& __isz) const { __isz += m_words.size() * 4; }
CScriptLayerManager::CScriptLayerManager(CInputStream& reader, const CWorldSaveGameInfo& saveWorld) {
const u32 bitCount = reader.ReadBits(10);
x10_saveLayers.reserve(bitCount);