// // FIXED PROPERTIES // uint32 n_verts = 0x5DE8; uint64 name_offset1 = 0x0EA9; // CHAR_Kitana_A uint64 name_offset2 = 0x0FD4; // CHAR_Kitana_A uint64 mesh_info_offset1 = 0x1136; // not important uint64 mesh_info_offset2 = 0x1699; // not important uint64 mesh_info_offset3 = 0x2CF8; // important!!! uint64 ib_offset = 0x02DA5; // index buffer uint64 jm_offset = 0x379DF; // joint map uint64 vb1_offset = 0x43B9C; // points uint64 vb2_offset = 0xE8120; // UV uint64 vb3_offset = 0xB91D4; // blending // move to surface information ifile.seekg(mesh_info_offset3); if(ifile.fail()) return error("Seek failure.", __LINE__); // read number of surface uint32 n_surfaces = LE_read_uint32(ifile); if(ifile.fail()) return error("Read failure.", __LINE__); // read surfaces boost::shared_array<MKXMESH> meshlist(new MKXMESH[n_surfaces]); for(uint32 i = 0; i < n_surfaces; i++) { meshlist[i].id = LE_read_uint16(ifile); // id meshlist[i].jm = LE_read_uint16(ifile); // joint map index meshlist[i].start = LE_read_uint32(ifile); // index buffer start meshlist[i].n_tri = LE_read_uint32(ifile); // number of triangles meshlist[i].bflag = LE_read_uint08(ifile); // some kind of flag if(ifile.fail()) return error("Read failure.", __LINE__); }