00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
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
00049
00050
00051
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
00059
00060
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
00076 geBoolean geEngine_DoSplashScreen(geEngine *Engine, geDriver_Mode *DriverMode);
00077
00078
00079 geBoolean geEngine_InitFonts(geEngine *Engine);
00080 geBoolean geEngine_ShutdownFonts(geEngine *Engine);
00081
00082
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
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,
00102 GE_Rect * PixelRect,
00103 GE_Rect * PercentRect,
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
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