1 /****************************************************************************************/
\r
4 /* Author: John Pollard */
\r
5 /* Description: User poly's */
\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
26 #include <Windows.h>
\r
28 #include "BaseType.h"
\r
30 #include "XForm3d.h"
\r
32 #include "Genesis.h"
\r
34 #include "Surface.h"
\r
36 #include "DCommon.h"
\r
42 #define MAX_USER_VERTS 4
\r
43 #define USER_MAX_SORTED_POLYS 1024
\r
45 //================================================================================
\r
46 // Structure defines
\r
47 //================================================================================
\r
49 typedef struct gePoly
\r
52 struct gePoly *Self1;
\r
56 GE_LVertex Verts[MAX_USER_VERTS]; // Copy of user verts
\r
58 geWorld_Leaf *LeafData;
\r
65 gePoly_Type Type; // Type of poly
\r
66 int32 RenderFlags; // Fx of poly
\r
68 geFloat Scale; // Currently only used for TexturedPoint
\r
70 struct gePoly *Prev;
\r
71 struct gePoly *Next;
\r
73 struct gePoly *AddOnceNext;
\r
76 struct gePoly *Self2;
\r
80 typedef struct User_Info
\r
82 gePoly *AddPolyOnceList;
\r
85 //================================================================================
\r
86 // Function ProtoTypes
\r
87 //================================================================================
\r
88 geBoolean User_EngineInit(geEngine *Engine);
\r
89 void User_EngineShutdown(geEngine *Engine);
\r
90 geBoolean User_WorldInit(geWorld *World);
\r
91 void User_WorldShutdown(geWorld *World);
\r
93 geBoolean User_RenderPolyList(gePoly *PolyList);
\r
95 GENESISAPI gePoly *geWorld_AddPolyOnce( geWorld *World,
\r
100 uint32 RenderFlags,
\r
102 GENESISAPI gePoly *geWorld_AddPoly( geWorld *World,
\r
103 GE_LVertex *Verts,
\r
107 uint32 RenderFlags,
\r
110 GENESISAPI void geWorld_RemovePoly(geWorld *World, gePoly *Poly);
\r
111 GENESISAPI geBoolean gePoly_GetLVertex(gePoly *Poly, int32 Index, GE_LVertex *LVert);
\r
112 GENESISAPI geBoolean gePoly_SetLVertex(gePoly *Poly, int32 Index, const GE_LVertex *LVert);
\r
114 geBoolean User_SetCameraInfo(geEngine *Engine, geWorld *World, geCamera *Camera, Frustum_Info *Fi);
\r
115 geBoolean User_DestroyOncePolys(geWorld *World);
\r
116 void User_DestroyPolyList(geWorld *World, gePoly *List);
\r
118 void User_EngineFillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);
\r