diff --git a/docs/HitmanBloodMoney/Formats/SND.h b/docs/HitmanBloodMoney/Formats/SND.h index c423896..037f86e 100644 --- a/docs/HitmanBloodMoney/Formats/SND.h +++ b/docs/HitmanBloodMoney/Formats/SND.h @@ -29,14 +29,14 @@ struct SND_Footer { uint32_t offsetToReservedTable1; // table always filled with nulls uint32_t offsetToStreamsFilename; // always 0x10 as this is always right after basic header - uint32_t offsetToRootGroupEntry; // seems to point to some SND_EntryGroup... maybe some root group? if null it is not present in file + uint32_t offsetToRootGroupEntry; // seems to point to some SND_Entry_Group... maybe some root group? if null it is not present in file char unkC[0x74 - 0xC]; - uint32_t offsetsToTableOfSoundEntries; // all offsets points to SND_EntrySound, if null it is not present in file - uint32_t offsetsToTableOfSetEntries; // all offsets points to SND_EntrySet, if null it is not present in file - uint32_t offsetsToTableOfSequenceEntries; // all offsets points to SND_EntrySequence, if null it is not present in file - uint32_t offsetsToTableOfWaveEntries; // all offsets points to SND_EntryWave, if null it is not present in file - uint32_t offsetsToTableOfDefineEntries; // all offsets points to SND_EntryDefine, if null it is not present in file - uint32_t unk_offsetsToTableOfEntriesWithType_6; // unknown, assume that this is type table for 6 entries, all offsets points to SNDENTRY, if null it is not present in file + uint32_t offsetsToTableOfSoundEntries; // all offsets points to SND_Entry_Sound, if null it is not present in file + uint32_t offsetsToTableOfSetEntries; // all offsets points to SND_Entry_Set, if null it is not present in file + uint32_t offsetsToTableOfSequenceEntries; // all offsets points to SND_Entry_Sequence, if null it is not present in file + uint32_t offsetsToTableOfWaveEntries; // all offsets points to SND_Entry_Wave, if null it is not present in file + uint32_t offsetsToTableOfDefineEntries; // all offsets points to SND_Entry_Define, if null it is not present in file + uint32_t unk88; // unknown, mostly null uint32_t offsetsToTableOfUnknownOffsets1; // all offsets points to seemingly null bytes, at least always a single row of 16-bytes with 0, had not observed more than 16-bytes yet char unk90[0x1E0 - 0x90]; }; @@ -48,8 +48,8 @@ enum SND_EntryType SOUND = 0x01, // looks like "audio:#sound" SET = 0x02, // looks like "audio:#set" SEQUENCE = 0x03, // looks like "audio:#seq" - WAVE = 0x04, // does not have ID used it seems, but can be seen in file as "audio:#waves" - DEFINE = 0x05, // does not have ID used it seems, but can be seen in file as "audio:#def" + WAVE = 0x04, // does not have ID used it seems by corresponding entry, but can be seen in file as "audio:#waves" + DEFINE = 0x05, // looks like "audio:#def" GROUP = 0x17, // looks like "audio:#group" }; @@ -67,31 +67,27 @@ struct SND_UNKTYPE1 uint32_t nullsOrReservedOrUnknown[3]; }; -struct SND_EntrySound +struct SND_Entry_Sound { uint32_t type; // enum SND_EntryType::SOUND uint32_t unk4; // seems to be 0xCDCDCDCD in test files, check what it does, may be reserved or padding uint32_t offsetToIdentifier; // aligned on 16 bytes, null-terminated string, seems to always be some kind of string ID aligned like specified uint16_t unkC; // equals 1 for example uint16_t unkE; // equals 0xCDCD in test files, check what it does, may be reserved - - // TODO - these may or may not belong to the entry, unsure of sizes - uint32_t offsetToUnknown1; // some offset to some 16-byte type - uint32_t offsetToWaveEntry; // offset to wave entry SND_EntryWave, if null then not present in file + uint32_t offsetToUnknown1; // some offset to some 16-byte type, SND_UNKTYPE1 + uint32_t offsetToWaveEntry; // offset to wave entry SND_Entry_Wave, if null then not present in file char unk18[0x30 - 0x18]; // unknown, doesn't seem important for now... }; -struct SND_EntrySet +struct SND_Entry_Set { uint32_t type; // enum SND_EntryType::SET uint32_t unk4; // seems to be 0xCDCDCDCD in test files, check what it does, may be reserved or padding uint32_t offsetToIdentifier; // aligned on 16 bytes, null-terminated string, seems to always be some kind of string ID aligned like specified uint16_t unkC; // equals 2 for example uint16_t unkE; // equals 0xCDCD in test files, check what it does, may be reserved - - // TODO - these may or may not belong to the entry, unsure of sizes uint32_t unk10; // maybe offset or size, was 0x40 in test case - uint32_t offsetToTableOfSoundEntries; // offset to table of offsets to SND_EntrySound entries, if null then not present in file, if entry in table is null then that is the table end, 16-byte aligned, probably any size possible, took 32 bytes in test case + uint32_t offsetToTableOfSoundEntries; // offset to table of offsets to SND_Entry_Sound entries, if null then not present in file, if entry in table is null then that is the table end, 16-byte aligned, probably any size possible, took 32 bytes in test case uint16_t unk18; // was 6 in example, same as number of entries in table... uint16_t unk1A; // was 6 in example, same as number of entries in table... uint32_t unk1C; // was 0 in example @@ -99,46 +95,40 @@ struct SND_EntrySet char unk24[0x30 - 0x24]; // unknown, doesn't seem important for now... seem like nulls anyway }; -struct SND_EntrySequence +struct SND_Entry_Sequence { uint32_t type; // enum SND_EntryType::SEQUENCE uint32_t unk4; // seems to be 0xCDCDCDCD in test files, check what it does, may be reserved or padding uint32_t offsetToIdentifier; // aligned on 16 bytes, null-terminated string, seems to always be some kind of string ID aligned like specified uint16_t unkC; // equals 1 for example uint16_t unkE; // equals 0xCDCD in test files, check what it does, may be reserved - - // TODO - these may or may not belong to the entry, unsure of sizes uint32_t unk10; // maybe offset or size, was 0x30 in test case - uint32_t offsetToSetEntry; // offset to wave entry SND_EntrySet, if null then not present in file + uint32_t offsetToSetEntry; // offset to wave entry SND_Entry_Set, if null then not present in file uint16_t unk18; // was 2 in example uint16_t unk1A; // was 2 in example uint16_t unk1C; // was 0x64 in example uint16_t unk1E; // was 0xCDCD in example }; -struct SND_EntryWave +struct SND_Entry_Wave { uint32_t type; // enum SND_EntryType::WAVE uint32_t waveFileNameLength; // length of wave file name contained in the following offset, without null-terminator uint32_t waveFileNameOffset; // offset to null-terminated wave file name, aligned on 16-bytes uint32_t unkC; // maybe reserved, seens to be 0, check - - // TODO - these may or may not belong to the entry, unsure of sizes uint32_t unk10; // maybe reserved, seens to be 0, check uint32_t offsetToSetEntryID; // offset to ID of sound set, in form "audio:#set" uint32_t unk_timestamp32bit; // may be timestamp time_t in 32-bit format, check uint32_t unk_nullMaybeReserved; // unknown, seems to be null }; -struct SND_EntryDefine +struct SND_Entry_Define { uint32_t type; // enum SND_EntryType::DEFINE uint32_t unk4; // seems to be 0xCDCDCDCD in test files, check what it does, may be reserved or padding uint32_t offsetToIdentifier; // aligned on 16 bytes, null-terminated string, seems to always be some kind of string ID aligned like specified uint16_t unkC; // equals 0 for example uint16_t unkE; // equals 0xCDCD in test files, check what it does, may be reserved - - // TODO - these may or may not belong to the entry, unsure of sizes uint32_t unk10; // maybe offset, was 0 in test case uint32_t offsetToUnknown; // all offsets points to seemingly null bytes, at least always a single row of 16-bytes with 0, had not observed more than 16-bytes yet, possibly same offset as some which can be found in SND_Footer::offsetsToTableOfUnknownOffsets1 table uint16_t unk18; // was 16 in example @@ -146,16 +136,14 @@ struct SND_EntryDefine uint32_t unk1C; // was 0 in example }; -struct SND_EntryGroup +struct SND_Entry_Group { uint32_t type; // enum SND_EntryType::GROUP uint32_t unk4; // (seems to be 0xCDCDCDCD in test files, check what it does, may be reserved or padding) uint32_t offsetToIdentifier; // (aligned on 16 bytes, null-terminated string, seems to always be some kind of string ID aligned like specified) uint16_t unkC; // equals 0 for example uint16_t unkE; // equals 0xCDCD in test files, check what it does, may be reserved - - // TODO - these may or may not belong to the entry, unsure of sizes uint32_t unk10; // was 0 in example - uint32_t offsetToTableOfChildGroupEntries; // offset to table of offsets to other SND_EntryGroup entries, if null then not present in file, unsure if some fixed size or alignemnt, assume 16-byte alignemnt, maybe fixed size of 0xA0, may contain NULLs (no childs either) - char unk18[0x70 - 0x18]; // unknown, doesn't seem important for now... possibly 0x30 instead of 0x70 as in SNDENTRY_SOUND, but not known... + uint32_t offsetToTableOfChildGroupEntries; // offset to table of offsets to other SND_Entry_Group entries, if null then not present in file, unsure if some fixed size or alignemnt, assume 16-byte alignemnt, maybe fixed size of 0xA0, may contain NULLs (no childs either) + char unk18[0x70 - 0x18]; // unknown, doesn't seem important for now... possibly 0x30 instead of 0x70 as in SND_Entry_Sound, but not known... }; diff --git a/docs/HitmanBloodMoney/Formats/STR.h b/docs/HitmanBloodMoney/Formats/STR.h index bc3bd59..af69cd5 100644 --- a/docs/HitmanBloodMoney/Formats/STR.h +++ b/docs/HitmanBloodMoney/Formats/STR.h @@ -25,10 +25,9 @@ struct STR_Header { struct STR_Footer { }; -// LIP chunk which may be at the start of some sound files data, it is aligned on 0x100 boundary +// LIP chunk which may be at the start of some sound files data, it is always in a block of 0x1000 ending with bunch of zeroes, unknown purpose struct STR_LIPChunk { uint32_t id; // compares to first 4 chars from "LIP " - uint32_t dataSize; - // follows dataSize, note that structure is aligned on 0x100 (same as header) + char unk4[0x1000 - 0x4]; // unknown contents, ends with 0, always a block of this size if it is present }; diff --git a/docs/HitmanBloodMoney/Formats/WHD+WAV.h b/docs/HitmanBloodMoney/Formats/WHD+WAV.h index 7499ff3..86a5985 100644 --- a/docs/HitmanBloodMoney/Formats/WHD+WAV.h +++ b/docs/HitmanBloodMoney/Formats/WHD+WAV.h @@ -39,7 +39,7 @@ union WHD_Record uint32_t dataOffset; uint32_t samplesCount; uint32_t blockAlign; // something weird for OGG! - uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 2041 for ADPCM, 0x004F3E93 for OGG... + uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 0x07F9 for ADPCM, 0x004F3E93 for OGG... uint32_t nullBytes[4]; }; @@ -57,7 +57,7 @@ union WHD_Record uint32_t dataOffset; uint32_t samplesCount; uint32_t blockAlign; // something weird for OGG! - uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 2041 for ADPCM, 0x004F3E93 for OGG... + uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 0x07F9 for ADPCM, 0x004F3E93 for OGG... uint32_t nullBytes[4]; }; @@ -75,7 +75,7 @@ union WHD_Record uint32_t dataOffset; // may start with "LIP " (0x2050494C) chunk, ignore lip->dataSize bytes aligned on 0x100 boundary uint32_t samplesCount; uint32_t unk18; - uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 2041 for ADPCM, 0x004F3E93 for OGG... + uint32_t fmtExtra; // 0xCDCDCDCD for PCMs, 0x07F9 for ADPCM, 0x004F3E93 for OGG... uint32_t unk2C; uint32_t nullBytes[3]; };