scenefile

view src/file_milk.c @ 3:b30f83409769

foo
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sat, 21 Jan 2012 04:14:24 +0200
parents
children
line source
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "scene.h"
5 #ifdef __GNUC__
6 #define PACKED __attribute__((packed))
7 #endif
10 struct header {
11 char magic[10];
12 int fmt_ver;
13 } PACKED;
15 struct vertex {
16 char flags;
17 float pos[3];
18 char bone_id; /* -1 means no bone */
19 char ref_count;
20 } PACKED;
22 struct triangle {
23 uint16_t flags;
24 uint16_t v[3];
25 float vnorm[3][3];
26 float s[3];
27 float t[3];
28 unsigned char smoothing_group;
29 unsigned char group_idx;
30 } PACKED;