00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GE_USER_H
00023 #define GE_USER_H
00024
00025 #include <Assert.h>
00026 #include <Windows.h>
00027
00028 #include "BaseType.h"
00029 #include "Vec3d.h"
00030 #include "XForm3d.h"
00031 #include "Camera.h"
00032 #include "Genesis.h"
00033 #include "World.h"
00034 #include "Surface.h"
00035
00036 #include "DCommon.h"
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042 #define MAX_USER_VERTS 4
00043 #define USER_MAX_SORTED_POLYS 1024
00044
00045
00046
00047
00048
00049 typedef struct gePoly
00050 {
00051 #ifdef _DEBUG
00052 struct gePoly *Self1;
00053 #endif
00054
00055 geWorld *World;
00056 GE_LVertex Verts[MAX_USER_VERTS];
00057
00058 geWorld_Leaf *LeafData;
00059 geFloat ZOrder;
00060
00061 int32 NumVerts;
00062
00063 geBitmap *Bitmap;
00064
00065 gePoly_Type Type;
00066 int32 RenderFlags;
00067
00068 geFloat Scale;
00069
00070 struct gePoly *Prev;
00071 struct gePoly *Next;
00072
00073 struct gePoly *AddOnceNext;
00074
00075 #ifdef _DEBUG
00076 struct gePoly *Self2;
00077 #endif
00078 } gePoly;
00079
00080 typedef struct User_Info
00081 {
00082 gePoly *AddPolyOnceList;
00083 } User_Info;
00084
00085
00086
00087
00088 geBoolean User_EngineInit(geEngine *Engine);
00089 void User_EngineShutdown(geEngine *Engine);
00090 geBoolean User_WorldInit(geWorld *World);
00091 void User_WorldShutdown(geWorld *World);
00092
00093 geBoolean User_RenderPolyList(gePoly *PolyList);
00094
00095 GENESISAPI gePoly *geWorld_AddPolyOnce( geWorld *World,
00096 GE_LVertex *Verts,
00097 int32 NumVerts,
00098 geBitmap *Bitmap,
00099 gePoly_Type Type,
00100 uint32 RenderFlags,
00101 geFloat Scale);
00102 GENESISAPI gePoly *geWorld_AddPoly( geWorld *World,
00103 GE_LVertex *Verts,
00104 int32 NumVerts,
00105 geBitmap *Bitmap,
00106 gePoly_Type Type,
00107 uint32 RenderFlags,
00108 geFloat Scale);
00109
00110 GENESISAPI void geWorld_RemovePoly(geWorld *World, gePoly *Poly);
00111 GENESISAPI geBoolean gePoly_GetLVertex(gePoly *Poly, int32 Index, GE_LVertex *LVert);
00112 GENESISAPI geBoolean gePoly_SetLVertex(gePoly *Poly, int32 Index, const GE_LVertex *LVert);
00113
00114 geBoolean User_SetCameraInfo(geEngine *Engine, geWorld *World, geCamera *Camera, Frustum_Info *Fi);
00115 geBoolean User_DestroyOncePolys(geWorld *World);
00116 void User_DestroyPolyList(geWorld *World, gePoly *List);
00117
00118 void User_EngineFillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);
00119
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123
00124 #endif