1 
2 #define MAT_IGN    1
3 #define MAT_CRASH  2
4 #define MAT_ZIP    4
5 #define MAT_RESET  8
6 
7 struct Material
8 {
9 public:
10   ssgSimpleState **gst ;
11 
12   char *texture_map  ;
13   int   clamp_tex    ;
14   int   transparency ;
15   float alpha_ref    ;
16   int   lighting     ;
17   float friction     ;
18   unsigned int flags ;
19 
isNullMaterial20   int  isNull ()    { return gst == NULL ; } ;
isIgnoreMaterial21   int  isIgnore()   { return flags & MAT_IGN   ; }
isCrashableMaterial22   int  isCrashable(){ return flags & MAT_CRASH ; }
isZipperMaterial23   int  isZipper()   { return flags & MAT_ZIP   ; }
isResetMaterial24   int  isReset()    { return flags & MAT_RESET ; }
25   void install ( int index ) ;
26 
getStateMaterial27   ssgState *getState    () { return *gst ; }
getTexFnameMaterial28   char     *getTexFname () { return texture_map ; }
29 } ;
30 
31 
32 void initMaterials () ;
33 Material *getMaterial ( ssgState *s ) ;
34 Material *getMaterial ( ssgLeaf  *l ) ;
35 
36 ssgState *getAppState ( char *fname ) ;
37 
38 extern ssgSimpleState *default_gst ;
39 extern ssgSimpleState *fuzzy_gst   ;
40 extern ssgSimpleState *herring_gst ;
41 extern ssgSimpleState *herringbones_gst ;
42 extern ssgSimpleState *spark_gst   ;
43 extern ssgSimpleState *flamemissile_gst ;
44 extern ssgSimpleState *missile_gst ;
45 extern ssgSimpleState *magnet_gst  ;
46 extern ssgSimpleState *players_gst ;
47 extern ssgSimpleState *zipper_gst  ;
48 
49