-
-
Notifications
You must be signed in to change notification settings - Fork 237
Add Capcom's Devil May Cry 3 HD .mod hexpat #415
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
base: master
Are you sure you want to change the base?
Conversation
Hex Pattern file for Capcom's Devil May Cry 3 HD Collection's .mod (3D Models) files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added some suggested changes that will make the results of your pattern easier to read.
struct MeshSCM { | ||
u16 numberVertices; | ||
u16 textureIndex; | ||
u8 padding0[12]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the padding built-in type instead of creating arrays of u8s you don't want to see in the pattern data window anyway. Instead of u8 padding0[12];
use padding[12];
. That eliminates the need to create unnecessary variables with 0,1,2,..
u8 padding2[16]; | ||
u64 unknownOffset; | ||
|
||
u64 unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pattern language allows you define anonymous entries in the patterns you place.so instead of naming each one as in u64 unknown;
you can simply dou64;
float y; | ||
float z; | ||
float length; // sqrt(x*x + y*y + z*z) | ||
u8 unknown[16]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is a 4x4 matrix that can include rotations and other types of transforms that a vector alone can't do. It just seems it is never used it seems.
|
||
|
||
ModelHeader modelheader @ 0x00; | ||
Object objects[modelheader.objectCount] @ 0x40; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0x40 happens to also be the size of the header so you may prefer to put both inside a pattern but then you will have to change all the places that use the values.
u8 padding1[24]; | ||
}; | ||
|
||
struct Object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like it is defining the objects, it only has information about them so maybe rename it to ObjectInfo.
} | ||
}; | ||
|
||
IthMesh meshes[modelheader.objectCount] @objectOffset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would make a lot more sense as
Object objects[modelHeader.objectCount] @ objectOffset;
Pattern
Hex Pattern file for Capcom's Devil May Cry 3 HD Collection's .mod (3D Models) files
Pattern by @haruse23
Checklist
#pragma description My pattern Description here
)#pragma MIME mime-type
in the source code)application/octet-stream
here as that means "Unidentifiable binary data"