Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

engine.h

Go to the documentation of this file.
00001 /****************************************************************************************/
00002 /*  Engine.h                                                                            */
00003 /*                                                                                      */
00004 /*  Author: Charles Bloom/John Pollard                                                  */
00005 /*  Description: Maintains the driver interface, as well as the bitmaps attached                */
00006 /*                                      to the driver.                                                                                                          */
00007 /*                                                                                      */
00008 /*  The contents of this file are subject to the Genesis3D Public License               */
00009 /*  Version 1.01 (the "License"); you may not use this file except in                   */
00010 /*  compliance with the License. You may obtain a copy of the License at                */
00011 /*  http://www.genesis3d.com                                                            */
00012 /*                                                                                      */
00013 /*  Software distributed under the License is distributed on an "AS IS"                 */
00014 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */
00015 /*  the License for the specific language governing rights and limitations              */
00016 /*  under the License.                                                                  */
00017 /*                                                                                      */
00018 /*  The Original Code is Genesis3D, released March 25, 1999.                            */
00019 /*  Genesis3D Version 1.1 released November 15, 1999                                 */
00020 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */
00021 /*                                                                                      */
00022 /****************************************************************************************/
00023 #ifndef GE_ENGINE_H
00024 #define GE_ENGINE_H
00025 
00026 #include "Genesis.h"
00027 #include "System.h"
00028 #include "world.h"
00029 #include "bitmap.h"
00030 #include "BitmapList.h"
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 //-------------------------------------------------
00037 // fake out windows include
00038 //-------------------------------------------------
00039 #ifndef WINVER // if you want windows, you must include it first!
00040 #ifdef STRICT
00041 typedef struct HINSTANCE__ * HINSTANCE;
00042 #else // STRICT
00043 typedef void * HINSTANCE;
00044 #endif // STRICT
00045 #endif
00046 
00047 //-------------------------------------------------
00048 // Engine Functions
00049 //-------------------------------------------------
00050 
00051 //-------- engine world list funcs
00052 GENESISAPI geBoolean geEngine_AddWorld(geEngine *Engine, geWorld *World);
00053 GENESISAPI geBoolean geEngine_RemoveWorld(geEngine *Engine, geWorld *World);
00054 geBoolean geEngine_RemoveAllWorlds(geEngine *Engine);
00055 geBoolean geEngine_HasWorld(const geEngine *Engine, const geWorld *World);
00056 void geEngine_SetAllWorldChangedFlag(geEngine *Engine, geBoolean Flag);
00057 
00058 //-------- engine attach/detach thandle funcs
00059 
00060 // call updategamma when drivers change
00061 GENESISAPI geBoolean geEngine_SetGamma(geEngine *Engine, geFloat Gamma);
00062 GENESISAPI geBoolean geEngine_GetGamma(geEngine *Engine, geFloat *Gamma);
00063 GENESISAPI geBoolean geEngine_SetFogEnable(geEngine *Engine, geBoolean Enable, geFloat r, geFloat g, geFloat b, geFloat Start, geFloat End);
00064 void geEngine_UpdateGamma(geEngine *Engine);
00065 
00066 geBoolean geEngine_BitmapListInit(geEngine *Engine);
00067 geBoolean geEngine_BitmapListShutdown(geEngine *Engine);
00068 geBoolean geEngine_DetachAllWorlds(geEngine *Engine);
00069 geBoolean geEngine_CreateWorldLightmapTHandles(geEngine *Engine, geWorld *World);
00070 geBoolean geEngine_DestroyWorldLightmapTHandles(geEngine *Engine, geWorld *World);
00071 geBoolean geEngine_AttachAllWorlds(geEngine *Engine);
00072 geBoolean geEngine_AttachAll(geEngine *Engine);
00073 geBoolean geEngine_DetachAll(geEngine *Engine);
00074 
00075 //-------- the splash screen
00076 geBoolean geEngine_DoSplashScreen(geEngine *Engine, geDriver_Mode *DriverMode);
00077 
00078 //-------- engine fonts
00079 geBoolean geEngine_InitFonts(geEngine *Engine);
00080 geBoolean geEngine_ShutdownFonts(geEngine *Engine);
00081 
00082 //-------- engine drivers
00083 HINSTANCE geEngine_LoadLibrary( const char * lpLibFileName, const char *DriverDirectory);
00084 geBoolean geEngine_ResetDriver(geEngine *Engine);
00085 GENESISAPI geDriver_System *geEngine_GetDriverSystem(geEngine *Engine);
00086 
00087 GENESISAPI geBoolean geEngine_SetDriverAndMode( geEngine *Engine, 
00088                                                                                                 geDriver *Driver, 
00089                                                                                                 geDriver_Mode *DriverMode);
00090 
00091 //-------- drawing with the engine (Decals & Misc Polys)
00092 
00093 GENESISAPI geBoolean GENESISCC geEngine_DrawBitmap(const geEngine *Engine,
00094         const geBitmap *Bitmap,
00095         const geRect * Source, uint32 x, uint32 y);
00096 
00097 GENESISAPI geBoolean GENESISCC geEngine_DrawAlphaBitmap(        
00098                 geEngine * Engine,
00099                 geBitmap * pBitmap,
00100                 geVec3d * VertUVArray,
00101                 geCamera * ClipCamera,  // if null, uses full screen
00102                 GE_Rect * PixelRect,            // pixels in the "camera" view
00103                 GE_Rect * PercentRect,  // percent of the "camera" view
00104                 geFloat   Alpha,
00105                 GE_RGBA * RGBA_Array
00106                 );
00107 
00108 GENESISAPI void GENESISCC geEngine_RenderPoly(const geEngine *Engine, const GE_TLVertex *Points, 
00109                                                 int NumPoints, const geBitmap *Texture, uint32 Flags);
00110 
00111 GENESISAPI void GENESISCC geEngine_RenderPolyArray(const geEngine *Engine, const GE_TLVertex ** pPoints, int * pNumPoints, int NumPolys, 
00112                                                                 const geBitmap *Texture, uint32 Flags);
00113 
00114 //-------- temporary pre-geBitmap hacks
00115 geBoolean Engine_UploadBitmap(geEngine *Engine, DRV_Bitmap *Bitmap, DRV_Bitmap *ABitmap, geFloat Gamma);
00116 geBoolean Engine_SetupPixelFormats(geEngine *Engine);
00117 geRDriver_THandle * Engine_CreateTHandle(geEngine *Engine,int Width,int Height,int Mips, int EngineTexType);
00118 void Engine_DestroyTHandle(geEngine *Engine,geRDriver_THandle * THandle);
00119 
00120 #ifdef __cplusplus
00121 }
00122 #endif
00123 
00124 #endif // GE_ENGINE_H

Generated on Tue Sep 30 12:35:42 2003 for GTestAndEngine by doxygen 1.3.2