mirror of
https://github.com/isledecomp/SIEdit.git
synced 2025-02-17 00:40:42 -05:00
lib: fix random list handling
This commit is contained in:
parent
501fa2f0cf
commit
3228bc8096
2 changed files with 5 additions and 4 deletions
|
@ -136,8 +136,9 @@ Interleaf::Error Interleaf::ReadChunk(Core *parent, FileBase *f, Info *info)
|
|||
if (list_count == LIST::Act_ || list_count == LIST::RAND) {
|
||||
desc << "Extension: ";
|
||||
if (list_count == LIST::RAND) {
|
||||
uint32_t rand_lower = f->ReadU32();
|
||||
uint64_t rand_val = uint64_t(list_count) << 32 | rand_lower;
|
||||
uint32_t rand_upper = f->ReadU32();
|
||||
uint64_t rand_val = uint64_t(rand_upper) << 32 | list_count;
|
||||
f->seek(1, File::SeekCurrent);
|
||||
desc << ((const char *) &rand_val);
|
||||
} else if (list_count == LIST::Act_) {
|
||||
desc << ((const char *) &list_count);
|
||||
|
@ -211,7 +212,7 @@ Interleaf::Error Interleaf::ReadChunk(Core *parent, FileBase *f, Info *info)
|
|||
if (!(flags & MxCh::FLAG_END)) {
|
||||
std::map<uint32_t, Object*>::iterator it = m_ObjectIDTable.find(object);
|
||||
if (it == m_ObjectIDTable.end()) {
|
||||
LogError() << "Failed to find object " << object << " for chunk at " << std::hex << offset << std::endl;
|
||||
LogError() << "Failed to find object " << object << " for chunk at " << std::hex << offset << std::dec << std::endl;
|
||||
//return ERROR_INVALID_INPUT;
|
||||
} else {
|
||||
Object *o = it->second;
|
||||
|
|
|
@ -65,7 +65,7 @@ class LIST : public RIFF
|
|||
public:
|
||||
enum Variation {
|
||||
Act_ = 0x00746341,
|
||||
RAND = 0x4f444e41
|
||||
RAND = 0x444e4152
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue