mod->type = mod_alias;
mod->aliastype = ALIASTYPE_MD2;
- framesize = sizeof(md2memframe_t) + LittleLong(pinmodel->num_xyz) * sizeof(trivert2);
+ framesize = sizeof(md2memframesize_t) + LittleLong(pinmodel->num_xyz) * sizeof(trivert2);
// LordHavoc: calculate size for in memory version
size = sizeof(md2mem_t)
+ LittleLong(pinmodel->num_st) * sizeof(md2stvert_t)
float scale[3]; // multiply byte verts by this
float translate[3]; // then add this
char name[16]; // frame name from grabbing
- trivertx_t verts[]; // variable sized
+ trivertx_t verts[1]; // variable sized
} md2frame_t;
// LordHavoc: memory representation is different than disk
{
float scale[3]; // multiply byte verts by this
float translate[3]; // then add this
- trivert2 verts[]; // variable sized
+ trivert2 verts[1]; // variable sized
} md2memframe_t;
+// must match md2memframe_t, this is just used for sizeof()
+typedef struct
+{
+ float scale[3]; // multiply byte verts by this
+ float translate[3]; // then add this
+} md2memframesize_t;
+
// the glcmd format:
// a positive integer starts a tristrip command, followed by that many