- and again a round of name and include corrections
[genesis3d.git] / G3D / World / USER.H
1 /****************************************************************************************/\r
2 /*  User.h                                                                              */\r
3 /*                                                                                      */\r
4 /*  Author: John Pollard                                                                */\r
5 /*  Description: User poly's                                                            */\r
6 /*                                                                                      */\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
11 /*                                                                                      */\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
16 /*                                                                                      */\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
20 /*                                                                                      */\r
21 /****************************************************************************************/\r
22 #ifndef GE_USER_H\r
23 #define GE_USER_H\r
24 \r
25 #include <Assert.h>\r
26 #include <Windows.h>\r
27 \r
28 #include "BaseType.h"\r
29 #include "Vec3d.h"\r
30 #include "XForm3d.h"\r
31 #include "Camera.h"\r
32 #include "Genesis.h"\r
33 #include "World.h"\r
34 #include "Surface.h"\r
35 \r
36 #include "DCommon.h"\r
37 \r
38 #ifdef __cplusplus\r
39 extern "C" {\r
40 #endif\r
41 \r
42 #define MAX_USER_VERTS                          4                       \r
43 #define USER_MAX_SORTED_POLYS           1024\r
44 \r
45 //================================================================================\r
46 //      Structure defines\r
47 //================================================================================\r
48 \r
49 typedef struct  gePoly\r
50 {\r
51 #ifdef _DEBUG\r
52         struct gePoly   *Self1;\r
53 #endif\r
54 \r
55         geWorld                 *World;\r
56         GE_LVertex              Verts[MAX_USER_VERTS];  // Copy of user verts                                   \r
57 \r
58         geWorld_Leaf    *LeafData;\r
59         geFloat                 ZOrder;\r
60 \r
61         int32                   NumVerts;\r
62 \r
63         geBitmap                *Bitmap;\r
64 \r
65         gePoly_Type             Type;                                   // Type of poly\r
66         int32                   RenderFlags;                    // Fx of poly\r
67 \r
68         geFloat                 Scale;                                  // Currently only used for TexturedPoint\r
69 \r
70         struct gePoly   *Prev;\r
71         struct gePoly   *Next;\r
72 \r
73         struct gePoly   *AddOnceNext;\r
74 \r
75 #ifdef _DEBUG\r
76         struct gePoly   *Self2;\r
77 #endif\r
78 } gePoly;\r
79 \r
80 typedef struct User_Info\r
81 {\r
82         gePoly          *AddPolyOnceList;\r
83 } User_Info;\r
84 \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
92 \r
93 geBoolean User_RenderPolyList(gePoly *PolyList);\r
94 \r
95 GENESISAPI      gePoly *geWorld_AddPolyOnce(    geWorld *World, \r
96                                                                                 GE_LVertex *Verts, \r
97                                                                                 int32 NumVerts, \r
98                                                                                 geBitmap *Bitmap,\r
99                                                                                 gePoly_Type Type, \r
100                                                                                 uint32 RenderFlags,\r
101                                                                                 geFloat Scale);\r
102 GENESISAPI      gePoly *geWorld_AddPoly(        geWorld *World, \r
103                                                                         GE_LVertex *Verts, \r
104                                                                         int32 NumVerts, \r
105                                                                         geBitmap *Bitmap,\r
106                                                                         gePoly_Type Type,\r
107                                                                         uint32 RenderFlags,\r
108                                                                         geFloat Scale);\r
109 \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
113 \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
117 \r
118 void            User_EngineFillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);\r
119 \r
120 #ifdef __cplusplus\r
121 }\r
122 #endif\r
123 \r
124 #endif\r