mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Fixed wrong calculation
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#define SEGMENT_OFFSET(a) ((uint32_t)(a) & 0x00FFFFFF)
|
||||
#define SEGMENT_NUMBER(x) (((uint32_t)(x) >> 24) & 0xFF)
|
||||
// I would love to use 0x01000000, but the stupid compiler takes it as 0x01
|
||||
#define IS_SEGMENTED(x) (((uint32_t)(x) > 16777216) && (SEGMENT_NUMBER(x) < 0x20))
|
||||
#define IS_SEGMENTED(x) ((SEGMENT_NUMBER(x) > 0) && (SEGMENT_NUMBER(x) < 0x20))
|
||||
#define ASSET_PTR(x) (IS_SEGMENTED(x) ? SEGMENT_OFFSET(x) : (x))
|
||||
|
||||
#define tab "\t"
|
||||
|
||||
@@ -60,10 +60,8 @@ DecompressedData Decompressor::AutoDecode(YAML::Node& node, std::vector<uint8_t>
|
||||
}
|
||||
case CompressionType::YAY0:
|
||||
throw std::runtime_error("Found compressed yay0 segment.\nDecompression of yay0 has not been implemented yet.");
|
||||
break;
|
||||
case CompressionType::YAZ0:
|
||||
throw std::runtime_error("Found compressed yaz0 segment.\nDecompression of yaz0 has not been implemented yet.");
|
||||
break;
|
||||
case CompressionType::None:
|
||||
{
|
||||
auto fileOffset = TranslateAddr(offset);
|
||||
|
||||
Reference in New Issue
Block a user