X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=share%2Fsolid.h;h=4e694b0faaeccbafa951f10f0ed03c6f0a67fea6;hb=b59159d7319a4b8d51146b96b67f130bc56b967d;hp=707dcf520bff26aecd8769e420e6dc525c791071;hpb=e89f217d330f82472ce13647c9bffa0f3d5681b4;p=neverball diff --git a/share/solid.h b/share/solid.h index 707dcf5..4e694b0 100644 --- a/share/solid.h +++ b/share/solid.h @@ -85,13 +85,15 @@ #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 +#define B_NOFACE 8 /* Lump flags. */ @@ -104,15 +106,20 @@ #define ITEM_GROW 2 #define ITEM_SHRINK 3 +/* Path flags. */ + +#define P_ORIENTED 1 + /*---------------------------------------------------------------------------*/ struct s_mtrl { - float a[4]; /* ambient 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 angle; int fl; /* material flags */ @@ -171,10 +178,16 @@ struct s_node struct s_path { float p[3]; /* starting position */ + float e[4]; /* orientation (quaternion) */ float t; /* travel time */ int pi; int f; /* enable flag */ + int s; /* smooth flag */ + + int fl; /* flags */ + + /* TODO: merge enable and smooth into flags. */ }; struct s_body @@ -234,6 +247,8 @@ struct s_bill float rx[3]; /* X rotation coefficients */ float ry[3]; /* Y rotation coefficients */ float rz[3]; /* Z rotation coefficients */ + + float p[3]; }; struct s_jump @@ -249,6 +264,8 @@ struct s_ball 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 */ }; @@ -311,28 +328,11 @@ struct s_file /*---------------------------------------------------------------------------*/ -void sol_body_p(float p[3], const struct s_file *, const struct s_body *); - -/*---------------------------------------------------------------------------*/ - int sol_load_only_file(struct s_file *, const char *); int sol_load_only_head(struct s_file *, const char *); int sol_stor(struct s_file *, const char *); void sol_free(struct s_file *); -float sol_step(struct s_file *, const float *, float, int, 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 get_file_state(FILE *, struct s_file *); - /*---------------------------------------------------------------------------*/ #endif