-
-
Notifications
You must be signed in to change notification settings - Fork 249
Add Assassin's Creed: Unity's Forge files and Data files (Compressed and Decompressed) #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
haruse23
wants to merge
41
commits into
WerWolv:master
Choose a base branch
from
haruse23:haru233-patterns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+373
−0
Open
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
91e9222
Add Capcom's Devil May Cry 3 HD .mod hexpat
haruse23 76b24fc
Update DMC3 HD Mod.hexpat
haruse23 7481fe5
Update DMC3 HD Mod.hexpat
haruse23 7b08f08
Update DMC3 HD Mod.hexpat
haruse23 e182d17
Add files via upload
haruse23 d2dfe0a
Update README.md
haruse23 7e8f603
Rename DMC3 HD Mod.hexpat to dmc3_hd_mod.hexpat
haruse23 a67765d
Delete patterns/dmc3_hd_mod.hexpat
haruse23 6de6f37
Delete tests/patterns/test_data/dmc3_hd_mod.hexpat.mod
haruse23 646057b
Add files via upload
haruse23 34341eb
Update dmc3_hd_mod.hexpat
haruse23 ff737c3
Add files via upload
haruse23 baf773f
Update README.md
haruse23 bee8802
Update README.md
haruse23 691c10c
Update README.md
haruse23 a5d4309
Add files via upload
haruse23 cba726f
Update ACU_FORGE.hexpat
haruse23 4279de2
Update README.md
haruse23 df54d67
Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.h…
haruse23 dd23dfa
Update and rename ACU_FORGE.hexpat to acu_forge.hexpat
haruse23 400a06b
Update README.md
haruse23 7e0ab43
Update acu_data_compressed.hexpat
haruse23 caf1327
Update acu_data_compressed.hexpat
haruse23 556f813
Add files via upload
haruse23 f5aeb83
Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompress…
haruse23 32b762b
Update README.md
haruse23 7cb7460
Update acu_data_compressed.hexpat
haruse23 db46129
Update README.md
haruse23 7eabc06
Delete patterns/acu_data_compressed.hexpat
haruse23 ac54dcc
Delete patterns/acu_data_decompressed.hexpat
haruse23 2f586be
Delete patterns/acu_forge.hexpat
haruse23 f2cbf61
Create acu_forge.hexpat
haruse23 0ae3f28
Add files via upload
haruse23 aa84210
Update and rename ACU_DATA_Compressed.hexpat to acu_data_compressed.h…
haruse23 12f26f1
Update and rename ACU_DATA_Decompressed.hexpat to acu_data_decompress…
haruse23 dcbc606
Update README.md
haruse23 1890bf0
Delete patterns/dmc3_hd_mod.hexpat
haruse23 d5dd93b
Create dmc3_hd_mod.hexpat
haruse23 e481fee
Update README.md
haruse23 6c706f2
Update dmc3_hd_mod.hexpat
haruse23 d7a6dab
Update README.md
haruse23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
patterns/Assassin's Creed: Unity/acu_data_compressed.hexpat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#pragma description Assassin's Creed: Unity's Compressed .data file | ||
#pragma author haru233 | ||
|
||
// many thanks to AxCut | ||
// ImHex Hex Pattern File for Assassin's Creed: Unity's Compressed .data files | ||
|
||
|
||
import std.core; | ||
import std.mem; | ||
|
||
enum CompressionType : u8 { | ||
LZO1X_ = 0x00, // Both 0x00 and 0x01 mean LZO1X | ||
LZO1X = 0x01, | ||
LZO2A = 0x02, | ||
xmemdecompress = 0x03, | ||
LZO1C = 0x05 | ||
}; | ||
|
||
struct CHUNK { | ||
u16 Uncompressed_Size; | ||
u16 Compressed_Size; | ||
}; | ||
|
||
struct CHUNK_Data { | ||
u32 Hash; | ||
|
||
u64 i = std::core::array_index(); | ||
u8 data[parent.chunk[i].Compressed_Size]; | ||
}; | ||
|
||
struct PACK { | ||
u64 ID; | ||
padding[2]; | ||
CompressionType Compression_Type; | ||
padding[3]; | ||
u8 Version; | ||
u16 CHUNK_Count; | ||
|
||
CHUNK chunk[CHUNK_Count]; | ||
CHUNK_Data data[CHUNK_Count]; | ||
|
||
|
||
}; | ||
|
||
|
||
|
||
PACK pack[while(!std::mem::eof())] @0x00; |
93 changes: 93 additions & 0 deletions
93
patterns/Assassin's Creed: Unity/acu_data_decompressed.hexpat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#pragma description Assassin's Creed: Unity's Decompressed .data file | ||
#pragma author haru233 | ||
|
||
// Thanks to yretenai on GitHub for helping with the Block Allocator part | ||
|
||
import std.core; | ||
import std.mem; | ||
|
||
struct Block_Allocator_Type0 { | ||
padding[4]; | ||
u32 Class_ID; | ||
u32 Size; | ||
}; | ||
|
||
struct Block_Allocator_Type1 { | ||
padding[4]; | ||
u32 Type_ID; | ||
u32 Size; | ||
}; | ||
|
||
struct Block_Allocator { | ||
u16 Version; | ||
|
||
if (Version == 0) { | ||
u32 Block_Allocator_Number; | ||
Block_Allocator_Type0 block_allocator_type0[Block_Allocator_Number]; | ||
} | ||
|
||
else if (Version == 1) { | ||
u32 Block_Allocator_Number; | ||
Block_Allocator_Type1 block_allocator_type1_[Block_Allocator_Number]; | ||
} | ||
|
||
else if (Version == 2) { | ||
bool Has_Secondary_Block_Allocator; | ||
u32 Main_Block_Allocator_Number; | ||
|
||
Block_Allocator_Type1 block_allocator_type1__[Main_Block_Allocator_Number]; | ||
|
||
if (Has_Secondary_Block_Allocator) { | ||
u32 Secondary_Block_Allocator_Number; | ||
Block_Allocator_Type1 block_allocator_type1___[Secondary_Block_Allocator_Number+1]; | ||
} | ||
} | ||
|
||
|
||
}; | ||
|
||
struct File { | ||
u32 Object_Hash; | ||
u32 File_Size; | ||
u32 Filename_Length; | ||
|
||
if (File_Size > 0) { | ||
if (Filename_Length == 0) { | ||
bool HasBlockAllocator; | ||
|
||
if (HasBlockAllocator) { | ||
Block_Allocator block_allocator; | ||
u8 File_Data[File_Size]; | ||
} | ||
|
||
else | ||
u8 File_Data[File_Size]; | ||
} | ||
|
||
else { | ||
char Filename[Filename_Length]; | ||
|
||
bool HasBlockAllocator; | ||
|
||
if (HasBlockAllocator) { | ||
Block_Allocator block_allocator; | ||
u8 File_Data[File_Size]; | ||
} | ||
|
||
else | ||
u8 File_Data[File_Size]; | ||
|
||
|
||
} | ||
|
||
} | ||
|
||
else | ||
continue; | ||
|
||
|
||
|
||
}; | ||
|
||
|
||
File file[while(!std::mem::eof())] @0x00; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#pragma description Assassin's Creed: Unity's .forge archive file | ||
#pragma author haru233 | ||
|
||
// many thanks to AxCut | ||
// ImHex Hex Pattern File for Assassin's Creed: Unity's .forge files | ||
|
||
import std.core; | ||
|
||
struct Forge_Header { | ||
char MAGIC[8]; | ||
padding[1]; | ||
u32 Version; | ||
u32 File_Data_Header_Offset; | ||
}; | ||
|
||
struct File_Data_Header { | ||
u32 File_Count; | ||
padding[32]; | ||
u64 File_Data_Header2_Offset; | ||
}; | ||
|
||
struct File_Data_Header2 { | ||
u32 File_Count2; | ||
padding[4]; | ||
u64 File_Table_Offset; | ||
padding[12]; | ||
u32 File_Count3; | ||
u64 File_Name_Table_Offset; | ||
padding[8]; | ||
}; | ||
|
||
|
||
struct File_Table { | ||
u64 Raw_Data_Offset; | ||
u64 File_ID; | ||
u32 Raw_Data_Size; | ||
}; | ||
|
||
struct File_Name_Table { | ||
u32 Raw_Data_Size; | ||
padding[40]; | ||
char Filename[128]; | ||
padding[20]; | ||
}; | ||
|
||
|
||
Forge_Header forge_header @0x00; | ||
|
||
File_Data_Header file_data_header @(forge_header.File_Data_Header_Offset); | ||
|
||
File_Data_Header2 file_data_header2 @(file_data_header.File_Data_Header2_Offset); | ||
|
||
File_Table file_table[file_data_header.File_Count] @(file_data_header2.File_Table_Offset); | ||
|
||
File_Name_Table file_name_table[file_data_header.File_Count] @(file_data_header2.File_Name_Table_Offset); | ||
|
||
|
||
struct Raw_Data_Table { | ||
u64 i = std::core::array_index(); | ||
u8 Raw_Data[file_table[i].Raw_Data_Size] @ file_table[i].Raw_Data_Offset; | ||
}; | ||
|
||
|
||
Raw_Data_Table raw_data_table[file_data_header.File_Count] @0x00; |
165 changes: 165 additions & 0 deletions
165
patterns/Devil May Cry HD Collection/dmc3_hd_mod.hexpat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
#pragma description Devil May Cry 3 HD .mod 3D model file | ||
#pragma author haru233 | ||
|
||
// many thanks to AxCut | ||
// ImHex Hex Pattern File for Capcom's Devil May Cry 3 HD .mod files | ||
|
||
|
||
import std.core; | ||
|
||
|
||
struct ModelHeader { | ||
char ID[4]; | ||
float Version; | ||
padding[8]; | ||
u8 objectCount; | ||
u8 boneCount; | ||
u8 numberTextures; | ||
u8; | ||
u32; | ||
u64; | ||
u64 skeletonOffset; | ||
padding[24]; | ||
}; | ||
|
||
struct ObjectInfo { | ||
u8 meshCount; | ||
u8; | ||
u16 numberVertices; | ||
padding[4]; | ||
u64 meshOffset; | ||
u32 flags; | ||
padding[28]; | ||
float X, Y, Z; | ||
float radius; | ||
}; | ||
|
||
struct Positions { | ||
float positions[3]; | ||
}; | ||
|
||
|
||
struct Normals { | ||
float normal[3]; | ||
}; | ||
|
||
|
||
struct UVs { | ||
s16 uv[2]; | ||
}; | ||
|
||
struct BoneIndices { | ||
u8 boneindex[4]; | ||
}; | ||
|
||
struct Weights { | ||
u16 weight[1]; | ||
}; | ||
|
||
struct MeshSCM { | ||
u16 numberVertices; | ||
u16 textureIndex; | ||
padding[12]; | ||
u64 VerticesPositionsOffset; | ||
u64 NormalsPositionsOffset; | ||
u64 UVsPositionsOffset; | ||
|
||
padding[16]; | ||
u64 unknownOffset; | ||
|
||
u64; | ||
padding[8]; | ||
|
||
Positions positions[numberVertices] @VerticesPositionsOffset; | ||
Normals normals[numberVertices] @NormalsPositionsOffset; | ||
UVs uvs[numberVertices] @UVsPositionsOffset; | ||
|
||
|
||
}; | ||
|
||
struct Mesh { | ||
u16 numberVertices; | ||
u16 textureIndex; | ||
padding[12]; | ||
u64 VerticesPositionsOffset; | ||
u64 NormalsPositionsOffset; | ||
u64 UVsPositionsOffset; | ||
|
||
u64 BoneIndicesOffset; | ||
u64 WeightsOffset; | ||
padding[8]; | ||
|
||
u64; | ||
padding[8]; | ||
|
||
Positions positions[numberVertices] @VerticesPositionsOffset; | ||
Normals normals[numberVertices] @NormalsPositionsOffset; | ||
UVs uvs[numberVertices] @UVsPositionsOffset; | ||
|
||
BoneIndices b_index[numberVertices] @BoneIndicesOffset; | ||
Weights weights[numberVertices] @WeightsOffset; | ||
|
||
|
||
}; | ||
|
||
|
||
struct Hierarchy { | ||
u8 hierarchy; | ||
}; | ||
|
||
struct HierarchyOrder { | ||
u8 hierarchyorder; | ||
}; | ||
|
||
struct Unknown { | ||
u8; | ||
}; | ||
|
||
struct Transform { | ||
float x; | ||
float y; | ||
float z; | ||
float length; // sqrt(x*x + y*y + z*z) | ||
padding[16]; | ||
}; | ||
|
||
struct Skeleton{ | ||
u32 hierarchyOffset; | ||
u32 hierarchyOrderOffset; | ||
u32 unknownOffset; | ||
u32 transformsOffset; | ||
}; | ||
|
||
|
||
|
||
|
||
|
||
ModelHeader modelheader @ 0x00; | ||
ObjectInfo objects_info[modelheader.objectCount] @ 0x40; | ||
|
||
u32 objectOffset; | ||
|
||
struct Object { | ||
u64 i = std::core::array_index(); | ||
if (modelheader.ID == "SCM ") { | ||
objectOffset = objects_info[0].meshOffset; | ||
MeshSCM meshscm[objects_info[i].meshCount] @ objects_info[i].meshOffset; | ||
|
||
|
||
} else { | ||
objectOffset = objects_info[0].meshOffset; | ||
Mesh mesh[objects_info[i].meshCount] @ objects_info[i].meshOffset; | ||
} | ||
}; | ||
|
||
Object objects[modelheader.objectCount] @objectOffset; | ||
|
||
Skeleton skeleton @modelheader.skeletonOffset; | ||
|
||
Hierarchy hierarchy[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.hierarchyOffset); | ||
|
||
HierarchyOrder hierarchyorder[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.hierarchyOrderOffset); | ||
|
||
Unknown unknown[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.unknownOffset); | ||
|
||
Transform transform[modelheader.boneCount] @(modelheader.skeletonOffset + skeleton.transformsOffset); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.