Skip to content

Commit

Permalink
Fixed sequences not getting extracted
Browse files Browse the repository at this point in the history
  • Loading branch information
KiritoDv authored Feb 2, 2025
1 parent 6947867 commit c152b6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Create Package
run: |
mkdir torch-release
mv build/x64/Release/torch.exe torch-release/
mv Debug/torch.exe torch-release/
- name: Upload build
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion src/factories/naudio/v1/AudioTableFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ std::optional<std::shared_ptr<IParsedData>> AudioTableFactory::parse(std::vector
auto parent = AudioContext::tables[AudioTableType::SEQ_TABLE].offset;
if(size != 0){
YAML::Node seq;
seq["type"] = "BLOB";
seq["type"] = "NAUDIO:V1:SEQUENCE";
seq["offset"] = parent + addr;
seq["size"] = size;
Companion::Instance->AddAsset(seq);
Expand Down
6 changes: 3 additions & 3 deletions src/factories/naudio/v1/SequenceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ExportResult NSequenceBinaryExporter::Export(std::ostream &write, std::shared_pt
}

std::optional<std::shared_ptr<IParsedData>> NSequenceFactory::parse(std::vector<uint8_t>& buffer, YAML::Node& node) {
auto offset = GetSafeNode<uint32_t>(node, "offset");
auto entry = AudioContext::tables[AudioTableType::SEQ_TABLE];
return std::make_shared<RawBuffer>((uint8_t*) entry.buffer.data() + entry.entries[offset].addr, entry.entries[offset].size);
auto size = GetSafeNode<size_t>(node, "size");
auto [_, segment] = Decompressor::AutoDecode(node, buffer, size);
return std::make_shared<RawBuffer>(segment.data, segment.size);
}

0 comments on commit c152b6d

Please sign in to comment.