scenefile
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/file_milk.c Sat Jan 21 04:14:24 2012 +0200 1.3 @@ -0,0 +1,32 @@ 1.4 +#include <stdio.h> 1.5 +#include <stdlib.h> 1.6 +#include "scene.h" 1.7 + 1.8 +#ifdef __GNUC__ 1.9 +#define PACKED __attribute__((packed)) 1.10 +#endif 1.11 + 1.12 + 1.13 +struct header { 1.14 + char magic[10]; 1.15 + int fmt_ver; 1.16 +} PACKED; 1.17 + 1.18 +struct vertex { 1.19 + char flags; 1.20 + float pos[3]; 1.21 + char bone_id; /* -1 means no bone */ 1.22 + char ref_count; 1.23 +} PACKED; 1.24 + 1.25 +struct triangle { 1.26 + uint16_t flags; 1.27 + uint16_t v[3]; 1.28 + float vnorm[3][3]; 1.29 + float s[3]; 1.30 + float t[3]; 1.31 + unsigned char smoothing_group; 1.32 + unsigned char group_idx; 1.33 +} PACKED; 1.34 + 1.35 +