mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 05:47:42 +00:00
Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
#include <thread>
|
||||
#include <tuple>
|
||||
|
||||
#include <hecl/hecl.hpp>
|
||||
#include <hecl/Database.hpp>
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
#include "hecl/Blender/Token.hpp"
|
||||
#include "hecl/Database.hpp"
|
||||
#include "hecl/hecl.hpp"
|
||||
#include "hecl/SteamFinder.hpp"
|
||||
#include "MeshOptimizer.hpp"
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include <athena/MemoryWriter.hpp>
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#include "MeshOptimizer.hpp"
|
||||
#include <numeric>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cfloat>
|
||||
#include <climits>
|
||||
#include <cmath>
|
||||
#include <numeric>
|
||||
#include <unordered_set>
|
||||
|
||||
namespace hecl::blender {
|
||||
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "hecl/Blender/Connection.hpp"
|
||||
#include <unordered_set>
|
||||
|
||||
namespace hecl::blender {
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#include "hecl/Blender/SDNARead.hpp"
|
||||
#include "athena/FileReader.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include "hecl/hecl.hpp"
|
||||
|
||||
#include <athena/FileReader.hpp>
|
||||
#include <athena/MemoryReader.hpp>
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
namespace hecl::blender {
|
||||
@@ -69,7 +77,7 @@ SDNARead::SDNARead(SystemStringView path) {
|
||||
atUint64 length = r.length();
|
||||
char magicBuf[7];
|
||||
r.readUBytesToBuf(magicBuf, 7);
|
||||
r.seek(0, athena::Begin);
|
||||
r.seek(0, athena::SeekOrigin::Begin);
|
||||
if (strncmp(magicBuf, "BLENDER", 7)) {
|
||||
/* Try gzip decompression */
|
||||
std::unique_ptr<uint8_t[]> compBuf(new uint8_t[4096]);
|
||||
@@ -161,15 +169,15 @@ BlendType GetBlendType(SystemStringView path) {
|
||||
r.enumerate(
|
||||
[idPropIdx, typeOffset, nameOffset, valOffset, &ret](const FileBlock& block, athena::io::MemoryReader& r) {
|
||||
if (block.type == FOURCC('DATA') && block.sdnaIdx == idPropIdx) {
|
||||
r.seek(typeOffset, athena::Begin);
|
||||
r.seek(typeOffset, athena::SeekOrigin::Begin);
|
||||
if (r.readUByte() != 1)
|
||||
return true;
|
||||
|
||||
r.seek(nameOffset, athena::Begin);
|
||||
r.seek(nameOffset, athena::SeekOrigin::Begin);
|
||||
if (r.readString() != "hecl_type")
|
||||
return true;
|
||||
|
||||
r.seek(valOffset, athena::Begin);
|
||||
r.seek(valOffset, athena::SeekOrigin::Begin);
|
||||
ret = BlendType(r.readUint32Little());
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user