00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GE_SURFACE_H
00023 #define GE_SURFACE_H
00024
00025 #include <Assert.h>
00026 #include <Windows.h>
00027
00028 #include "BaseType.h"
00029 #include "PtrTypes.h"
00030 #include "Vec3d.h"
00031 #include "DCommon.h"
00032
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036
00037
00038
00039
00040
00041
00042 typedef struct Surf_SurfInfo
00043 {
00044 DRV_LInfo LInfo;
00045
00046 geVec3d T2WVecs[2];
00047 geVec3d TexOrg;
00048
00049 geVec3d VMins;
00050 geVec3d VMaxs;
00051
00052 int32 VisFrame;
00053
00054 int32 TexInfo;
00055
00056 int32 XStep;
00057 int32 YStep;
00058 int32 XScale;
00059 int32 YScale;
00060
00061 geFloat ShiftU;
00062 geFloat ShiftV;
00063
00064 int32 NumLTypes;
00065 int32 DLightFrame;
00066 uint32 DLights;
00067 uint32 Flags;
00068
00069 } Surf_SurfInfo;
00070
00071 typedef struct Surf_TexVert
00072 {
00073 geFloat u, v;
00074 geFloat r, g, b, a;
00075 } Surf_TexVert;
00076
00077
00078 typedef struct
00079 {
00080 geFloat X, Y, Z;
00081 geFloat u, v;
00082 geFloat r, g, b, a;
00083 } Surf_LVertex;
00084
00085
00086 typedef struct
00087 {
00088 geFloat x, y, z;
00089 geFloat u, v;
00090 geFloat r, g, b, a;
00091 } Surf_TLVertex;
00092
00093
00094 #define SURFINFO_TRANS (1<<0) // Surface is transparent
00095 #define SURFINFO_LTYPED (1<<1) // This surface has more than one ltype
00096 #define SURFINFO_LIGHTMAP (1<<2) // This surface has a lightmap
00097 #define SURFINFO_WAVY (1<<3) // This surface is a wavy surface
00098
00099
00100
00101
00102 geBoolean Surf_EngineInit(geEngine *Engine);
00103 void Surf_EngineShutdown(geEngine *Engine);
00104 geBoolean Surf_SetEngine(geEngine *Engine);
00105 geBoolean Surf_SetWorld(geWorld *World);
00106 geBoolean Surf_SetGBSP(World_BSP *BSP);
00107 geBoolean Surf_WorldInit(geWorld *World);
00108 void Surf_WorldShutdown(geWorld *World);
00109
00110 BOOL Surf_InSurfBoundingBox(Surf_SurfInfo *Surf, geVec3d *Pos, geFloat Box);
00111
00112 #ifdef __cplusplus
00113 }
00114 #endif
00115
00116 #endif