I've done some work decoding the mesh format. I started on the ccmesh_pc format, but then realized most of the important info is in the gcmesh_pc file. But then realized that reading in the gcmesh format would be a lot easier with the info from the ccmesh. So I'm going to continue working on that. I've also learned that the ccmesh and the csmesh files are basically the same thing, except a ccmesh has a rig and the csmesh does not.
I'm pretty sure they are using 8 byte pointers. So there appears to be junk sitting around in some places:
Of the ccmesh format heres where I got:
It starts off with a basic header:
unsigned int unknown (always 0x00043854)
unsigned int data_size
unsigned int unknown (always 0)
unsigned int file_count
* unknown (appears to be 2 pointers)
After that is a list of files of size data_size + 1
Then there is the mesh_info_header:
unsigned int unknown (always 0x424bdood)
unsigned int unknown (always 0x0000002a)
short points_of_interest_count
short bones_in_rig_count
short something_count
short something_count
short something_count
short something_count
int unknown
* unknown
* unknown
vector bounding_sphere_center
float bounding_sphere_radius
short thing1_count
short thing2_count
int unknown (might be junk)
* unknown (6 pointers in a row?)
int something_count
int unknown
* unknown (2 more pointers ?)
uint texture_name_data_size
texture_name block (alignment to 16 bytes):
byte unknown
texture_names
points_of_interest block (alignment to 16 bytes, points_of_interest_count)
char name[64]
int unknown
vector position
quaternion orientation
thing1 block (alignment to 16 bytes, thing1_count)
int unknown
int unknown
vector position
float value
thing2 block (alignment to 16 bytes, thing2_count)
int unknown
int unknown
vector normal
vector position
float value1
float value2
array of ints (alignment to 16 bytes, num_bones_in_rig)
appear to be just counting up starting from 0 to num_bones_in_rig - 1
another_header block - I think this is the important block describing the gcmesh file
int unknown (always 0x00000009)
int crc (same value that appears at the beginning and end of the gpu file)
int unknown
int size_of_gcmesh_pc
int flags (1 if it's an csmesh, 3 if it's a ccmesh)
int unknown[7]
int indices_count
int unknown[3]
byte index_stride
byte unknown
short unknown
int unknown
int bones_in_rig_count
int unknown[7]
vector scale(just a guess, it always appears to be 1, 1, 1)
int unknown[3]
int vertex_count
byte vertex_stride