polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

slab.h (441B)


      1 
      2 #ifndef SLAB_H
      3 #define SLAB_H
      4 
      5 #include "common.h"
      6 
      7 struct slab {
      8   int x;
      9   int y;
     10   int z;
     11   u8 *voxels;
     12 };
     13 
     14 struct slab *
     15 slab_parse(struct slab *slab, void *data);
     16 
     17 void
     18 slab_show(const struct slab *slab);
     19 
     20 int slab_size(const struct slab *slab);
     21 
     22 void
     23 slab_arrays(const struct slab *slab,
     24             float *verts,
     25             float *normals,
     26             u32 *indices,
     27             int *num_elements
     28             );
     29 
     30 #endif /* SLAB_H */