projects
/
neverball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct logic of BSP back/front tests
[neverball]
/
share
/
solid.h
diff --git
a/share/solid.h
b/share/solid.h
index
ec06e00
..
6038b83
100644
(file)
--- a/
share/solid.h
+++ b/
share/solid.h
@@
-43,7
+43,7
@@
* n Node (struct s_node)
* p Path (struct s_path)
* b Body (struct s_body)
* n Node (struct s_node)
* p Path (struct s_path)
* b Body (struct s_body)
- * c Coin (struct s_coin)
+ * h Item (struct s_item)
* z Goal (struct s_goal)
* j Jump (struct s_jump)
* x Switch (struct s_swch)
* z Goal (struct s_goal)
* j Jump (struct s_jump)
* x Switch (struct s_swch)
@@
-72,7
+72,7
@@
* Those members that do not conform to this convention are explicitly
* documented with a comment.
*
* Those members that do not conform to this convention are explicitly
* documented with a comment.
*
- * These prefixes are still available: h k o q y.
+ * These prefixes are still available: c k o q y.
*/
/*---------------------------------------------------------------------------*/
*/
/*---------------------------------------------------------------------------*/
@@
-85,27
+85,37
@@
#define M_ENVIRONMENT 8
#define M_ADDITIVE 16
#define M_CLAMPED 32
#define M_ENVIRONMENT 8
#define M_ADDITIVE 16
#define M_CLAMPED 32
-#define M_SHADOWED (M_OPAQUE | M_REFLECTIVE | M_ENVIRONMENT)
+#define M_DECAL 64
+#define M_TWO_SIDED 128
/* Billboard types. */
#define B_EDGE 1
#define B_FLAT 2
#define B_ADDITIVE 4
/* Billboard types. */
#define B_EDGE 1
#define B_FLAT 2
#define B_ADDITIVE 4
+#define B_NOFACE 8
/* Lump flags. */
#define L_DETAIL 1
/* Lump flags. */
#define L_DETAIL 1
+/* Item types. */
+
+#define ITEM_NONE 0
+#define ITEM_COIN 1
+#define ITEM_GROW 2
+#define ITEM_SHRINK 3
+
/*---------------------------------------------------------------------------*/
struct s_mtrl
{
/*---------------------------------------------------------------------------*/
struct s_mtrl
{
- float a[4]; /* ambient color */
float d[4]; /* diffuse color */
float d[4]; /* diffuse color */
+ float a[4]; /* ambient color */
float s[4]; /* specular color */
float e[4]; /* emission color */
float h[1]; /* specular exponent */
float s[4]; /* specular color */
float e[4]; /* emission color */
float h[1]; /* specular exponent */
+ float angle;
int fl; /* material flags */
int fl; /* material flags */
@@
-168,6
+178,7
@@
struct s_path
int pi;
int f; /* enable flag */
int pi;
int f; /* enable flag */
+ int s; /* smooth flag */
};
struct s_body
};
struct s_body
@@
-187,9
+198,10
@@
struct s_body
int gc;
};
int gc;
};
-struct s_coin
+struct s_item
{
float p[3]; /* position */
{
float p[3]; /* position */
+ int t; /* type */
int n; /* value */
};
int n; /* value */
};
@@
-197,8
+209,6
@@
struct s_goal
{
float p[3]; /* position */
float r; /* radius */
{
float p[3]; /* position */
float r; /* radius */
- int s; /* levels skiped */
- int c; /* special coloration? */
};
struct s_swch
};
struct s_swch
@@
-228,6
+238,8
@@
struct s_bill
float rx[3]; /* X rotation coefficients */
float ry[3]; /* Y rotation coefficients */
float rz[3]; /* Z rotation coefficients */
float rx[3]; /* X rotation coefficients */
float ry[3]; /* Y rotation coefficients */
float rz[3]; /* Z rotation coefficients */
+
+ float p[3];
};
struct s_jump
};
struct s_jump
@@
-243,6
+255,8
@@
struct s_ball
float p[3]; /* position vector */
float v[3]; /* velocity vector */
float w[3]; /* angular velocity vector */
float p[3]; /* position vector */
float v[3]; /* velocity vector */
float w[3]; /* angular velocity vector */
+ float E[3][3]; /* basis of pendulum */
+ float W[3]; /* angular pendulum velocity */
float r; /* radius */
};
float r; /* radius */
};
@@
-260,6
+274,7
@@
struct s_dict
struct s_file
{
struct s_file
{
+ int ac;
int mc;
int vc;
int ec;
int mc;
int vc;
int ec;
@@
-270,7
+285,7
@@
struct s_file
int nc;
int pc;
int bc;
int nc;
int pc;
int bc;
- int cc;
+ int hc;
int zc;
int jc;
int xc;
int zc;
int jc;
int xc;
@@
-278,9
+293,9
@@
struct s_file
int uc;
int wc;
int dc;
int uc;
int wc;
int dc;
- int ac;
int ic;
int ic;
+ char *av;
struct s_mtrl *mv;
struct s_vert *vv;
struct s_edge *ev;
struct s_mtrl *mv;
struct s_vert *vv;
struct s_edge *ev;
@@
-291,15
+306,15
@@
struct s_file
struct s_node *nv;
struct s_path *pv;
struct s_body *bv;
struct s_node *nv;
struct s_path *pv;
struct s_body *bv;
- struct s_coin *cv;
+ struct s_item *hv;
struct s_goal *zv;
struct s_jump *jv;
struct s_swch *xv;
struct s_bill *rv;
struct s_ball *uv;
struct s_view *wv;
struct s_goal *zv;
struct s_jump *jv;
struct s_swch *xv;
struct s_bill *rv;
struct s_ball *uv;
struct s_view *wv;
+ struct s_dict *dv;
int *iv;
int *iv;
- char *av;
};
/*---------------------------------------------------------------------------*/
};
/*---------------------------------------------------------------------------*/
@@
-315,11
+330,12
@@
void sol_free(struct s_file *);
float sol_step(struct s_file *, const float *, float, int, int *);
float sol_step(struct s_file *, const float *, float, int, int *);
-int sol_coin_test(struct s_file *, float *, float);
-struct s_goal *sol_goal_test(struct s_file *, float *, int);
int sol_jump_test(struct s_file *, float *, int);
int sol_swch_test(struct s_file *, int);
int sol_jump_test(struct s_file *, float *, int);
int sol_swch_test(struct s_file *, int);
+struct s_goal *sol_goal_test(struct s_file *, float *, int);
+struct s_item *sol_item_test(struct s_file *, float *, float);
+
/*---------------------------------------------------------------------------*/
void put_file_state(FILE *, struct s_file *);
/*---------------------------------------------------------------------------*/
void put_file_state(FILE *, struct s_file *);