1 /****************************************************************************************/
\r
4 /* Author: John Pollard */
\r
5 /* Description: Creates the surfaces for a BSP from the GFX data */
\r
7 /* The contents of this file are subject to the Genesis3D Public License */
\r
8 /* Version 1.01 (the "License"); you may not use this file except in */
\r
9 /* compliance with the License. You may obtain a copy of the License at */
\r
10 /* http://www.genesis3d.com */
\r
12 /* Software distributed under the License is distributed on an "AS IS" */
\r
13 /* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See */
\r
14 /* the License for the specific language governing rights and limitations */
\r
15 /* under the License. */
\r
17 /* The Original Code is Genesis3D, released March 25, 1999. */
\r
18 /* Genesis3D Version 1.1 released November 15, 1999 */
\r
19 /* Copyright (C) 1999 WildTangent, Inc. All Rights Reserved */
\r
21 /****************************************************************************************/
\r
22 #ifndef GE_SURFACE_H
\r
23 #define GE_SURFACE_H
\r
26 #include <Windows.h>
\r
28 #include "BaseType.h"
\r
29 #include "PtrTypes.h"
\r
31 #include "DCommon.h"
\r
37 //================================================================================
\r
38 // Structure defines
\r
39 //================================================================================
\r
41 // Surface info carries extra info about a face thats not in GFX_Face (File format face)
\r
42 typedef struct Surf_SurfInfo
\r
44 DRV_LInfo LInfo; // For RDriver use only...
\r
56 int32 XStep; // Lightmap step values (1:21:10 fixed)
\r
64 int32 NumLTypes; // Number of lightmap types this face has...
\r
65 int32 DLightFrame; // == Globals->CurFrame if dlighted
\r
66 uint32 DLights; // Bit set for each DLight
\r
67 uint32 Flags; // Surface Flags (NOTE - This is not the flags from the utilities)
\r
71 typedef struct Surf_TexVert
\r
80 geFloat X, Y, Z; // 3d vertex
\r
81 geFloat u, v; // Uv's
\r
82 geFloat r, g, b, a; // color
\r
85 // Transformed Lit vertex
\r
88 geFloat x, y, z; // screen points
\r
89 geFloat u, v; // Uv's
\r
90 geFloat r, g, b, a; // color
\r
94 #define SURFINFO_TRANS (1<<0) // Surface is transparent
\r
95 #define SURFINFO_LTYPED (1<<1) // This surface has more than one ltype
\r
96 #define SURFINFO_LIGHTMAP (1<<2) // This surface has a lightmap
\r
97 #define SURFINFO_WAVY (1<<3) // This surface is a wavy surface
\r
99 //================================================================================
\r
100 // Function defines
\r
101 //================================================================================
\r
102 geBoolean Surf_EngineInit(geEngine *Engine);
\r
103 void Surf_EngineShutdown(geEngine *Engine);
\r
104 geBoolean Surf_SetEngine(geEngine *Engine);
\r
105 geBoolean Surf_SetWorld(geWorld *World);
\r
106 geBoolean Surf_SetGBSP(World_BSP *BSP);
\r
107 geBoolean Surf_WorldInit(geWorld *World);
\r
108 void Surf_WorldShutdown(geWorld *World);
\r
110 BOOL Surf_InSurfBoundingBox(Surf_SurfInfo *Surf, geVec3d *Pos, geFloat Box);
\r