projects
/
dosdemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed sdl from mikmod cflags, since we dropped SDL from the
[dosdemo]
/
src
/
bsptree.h
diff --git
a/src/bsptree.h
b/src/bsptree.h
index
53b4cd2
..
2839ab0
100644
(file)
--- a/
src/bsptree.h
+++ b/
src/bsptree.h
@@
-5,15
+5,20
@@
#include "vmath.h"
#include "polyclip.h"
#include "vmath.h"
#include "polyclip.h"
-struct bspnode {
+struct bsppoly {
struct cplane plane;
int vcount;
struct g3d_vertex *verts;
struct cplane plane;
int vcount;
struct g3d_vertex *verts;
+};
+
+struct bspnode {
+ struct bsppoly poly;
struct bspnode *front, *back;
};
struct bsptree {
struct bspnode *root;
struct bspnode *front, *back;
};
struct bsptree {
struct bspnode *root;
+ struct bsppoly *soup; /* dynarr: see dynarr.h */
};
int init_bsp(struct bsptree *bsp);
};
int init_bsp(struct bsptree *bsp);
@@
-23,7
+28,9
@@
int save_bsp(struct bsptree *bsp, const char *fname);
int load_bsp(struct bsptree *bsp, const char *fname);
int bsp_add_poly(struct bsptree *bsp, struct g3d_vertex *v, int vnum);
int load_bsp(struct bsptree *bsp, const char *fname);
int bsp_add_poly(struct bsptree *bsp, struct g3d_vertex *v, int vnum);
-void bsp_add_mesh(struct bsptree *bsp, struct g3d_mesh *m);
+int bsp_add_mesh(struct bsptree *bsp, struct g3d_mesh *m);
+
+int bsp_build(struct bsptree *bsp);
void draw_bsp(struct bsptree *bsp, float view_x, float view_y, float view_z);
void draw_bsp(struct bsptree *bsp, float view_x, float view_y, float view_z);