-/****************************************************************************************/\r
-/* Genesis.h */\r
-/* */\r
-/* Description: The master header for Genesis */\r
-/* */\r
-/* The contents of this file are subject to the Genesis3D Public License */\r
-/* Version 1.01 (the "License"); you may not use this file except in */\r
-/* compliance with the License. You may obtain a copy of the License at */\r
-/* http://www.genesis3d.com */\r
-/* */\r
-/* Software distributed under the License is distributed on an "AS IS" */\r
-/* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See */\r
-/* the License for the specific language governing rights and limitations */\r
-/* under the License. */\r
-/* */\r
-/* The Original Code is Genesis3D, released March 25, 1999. */\r
-/* Genesis3D Version 1.1 released November 15, 1999 */\r
-/* Copyright (C) 1999 WildTangent, Inc. All Rights Reserved */\r
-/* */\r
-/****************************************************************************************/\r
-#ifndef GENESIS_H\r
-#define GENESIS_H\r
-\r
-#include "BaseType.h"\r
-#include "Vec3d.h"\r
-#include "XForm3d.h"\r
-#include "GETypes.h"\r
-#include "ExtBox.h"\r
-#include "vfile.h"\r
-#include "Bitmap.h"\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-//================================================================================\r
-// Constants / Defines / TypDefs\r
-//================================================================================\r
-\r
-typedef struct geEngine geEngine;\r
-\r
-typedef struct geDriver_System geDriver_System;\r
-typedef struct geDriver geDriver;\r
-typedef struct geDriver_Mode geDriver_Mode;\r
-\r
-typedef struct geSound_System geSound_System;\r
-typedef struct geSound_Cfg geSound_Cfg;\r
-typedef struct geSound_Def geSound_Def;\r
-typedef struct geSound geSound;\r
- \r
-typedef struct geActor geActor;\r
-typedef struct geActor_Def geActor_Def; // the definition of an actor's geometry/bone structure\r
-\r
-typedef struct geWorld geWorld;\r
-\r
-typedef struct geWorld_Model geWorld_Model;\r
-\r
-typedef struct geEntity geEntity;\r
-typedef struct geEntity_EntitySet geEntity_EntitySet;\r
-\r
-typedef struct geCamera geCamera;\r
-\r
-typedef struct geCSNetMgr geCSNetMgr;\r
-\r
-typedef struct gePoly gePoly;\r
-\r
-typedef struct geLight geLight; \r
-\r
-typedef struct geFog geFog;\r
-\r
-typedef struct geMesh_Def geMesh_Def; // Mesh def\r
-typedef struct geMesh geMesh; \r
-\r
-#define GE_VERSION_MAJOR (1UL)\r
-#define GE_VERSION_MINOR (3UL)\r
-#define GE_VERSION_MINOR_MIN (3UL)\r
-\r
-#define GE_VERSION_MAJOR_SHIFT (16)\r
-#define GE_VERSION_MAJOR_MASK ((uint32)0xFFFF0000)\r
-\r
-#define GE_VERSION ( (GE_VERSION_MAJOR << GE_VERSION_MAJOR_SHIFT) + GE_VERSION_MINOR )\r
-\r
-// From here down, still needs to be fixed up for July4\r
-typedef struct GE_ModelMotion GE_ModelMotion;\r
-typedef float GE_TimeType;\r
-\r
-// Polys\r
-typedef enum\r
-{\r
- GE_TEXTURED_POLY,\r
- GE_GOURAUD_POLY,\r
- GE_TEXTURED_POINT \r
-} gePoly_Type;\r
-\r
-// Poly Fx flags\r
-#define GE_RENDER_DO_NOT_OCCLUDE_OTHERS (1<<0) // Poly will not occlude others\r
-#define GE_RENDER_DO_NOT_OCCLUDE_SELF (1<<1) // Renders under any condition. Useful for halos, etc...\r
-#define GE_RENDER_BACKFACED (1<<2) // Poly should be backfaced from the Camera's Pov\r
-#define GE_RENDER_DEPTH_SORT_BF (1<<3) // Sorts relative to camera position, from back to front\r
-#define GE_RENDER_CLAMP_UV (1<<4) // Clamp UV's in both directions\r
-#define GE_RENDER_NO_FOG (1<<5)\r
-#define GE_RENDER_NO_CLIP (1<<6)\r
-\r
-// World Add flags\r
-#define GE_WORLD_RENDER (1<<0)\r
-#define GE_WORLD_COLLIDE (1<<1)\r
-\r
-\r
-\r
-#ifndef GE_CONTENTS_TYPES\r
-#define GE_CONTENTS_TYPES\r
-\r
-//\r
-// Content types in GE_Contents structure (multiple contents can be mixed...)\r
-//\r
-//*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\r
-// IF THESE FLAGS CHANGE, THEY MUST CHANGE IN GBSPFILE.H in Genesis AND GBSPLIB, and Genesis.H!!!!!\r
-//*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\r
-#define GE_CONTENTS_SOLID (1<<0) // Solid (Visible)\r
-#define GE_CONTENTS_WINDOW (1<<1) // Window (Visible)\r
-#define GE_CONTENTS_EMPTY (1<<2) // Empty but Visible (water, lava, etc...)\r
-\r
-#define GE_CONTENTS_TRANSLUCENT (1<<3) // Vis will see through it\r
-#define GE_CONTENTS_WAVY (1<<4) // Wavy (Visible)\r
-#define GE_CONTENTS_DETAIL (1<<5) // Won't be included in vis oclusion\r
-\r
-#define GE_CONTENTS_CLIP (1<<6) // Structural but not visible\r
-#define GE_CONTENTS_HINT (1<<7) // Primary splitter (Non-Visible)\r
-#define GE_CONTENTS_AREA (1<<8) // Area seperator leaf (Non-Visible)\r
-\r
-#define GE_CONTENTS_FLOCKING (1<<9)\r
-#define GE_CONTENTS_SHEET (1<<10)\r
-#define GE_CONTENTS_AIR (1<<11) // No brush lives in this leaf\r
-#define GE_RESERVED4 (1<<12)\r
-#define GE_RESERVED5 (1<<13)\r
-#define GE_RESERVED6 (1<<14)\r
-#define GE_RESERVED7 (1<<15)\r
-\r
-// 16-31 reserved for user contents\r
-#define GE_CONTENTS_USER1 (1<<16)\r
-#define GE_CONTENTS_USER2 (1<<17)\r
-#define GE_CONTENTS_USER3 (1<<18)\r
-#define GE_CONTENTS_USER4 (1<<19)\r
-#define GE_CONTENTS_USER5 (1<<20)\r
-#define GE_CONTENTS_USER6 (1<<21)\r
-#define GE_CONTENTS_USER7 (1<<22)\r
-#define GE_CONTENTS_USER8 (1<<23)\r
-#define GE_CONTENTS_USER9 (1<<24)\r
-#define GE_CONTENTS_USER10 (1<<25)\r
-#define GE_CONTENTS_USER11 (1<<26)\r
-#define GE_CONTENTS_USER12 (1<<27)\r
-#define GE_CONTENTS_USER13 (1<<28)\r
-#define GE_CONTENTS_USER14 (1<<29)\r
-#define GE_CONTENTS_USER15 (1<<30)\r
-#define GE_CONTENTS_USER16 (1<<31)\r
-// 16-31 reserved for user contents\r
-\r
-\r
-// These contents are all solid types\r
-#define GE_CONTENTS_SOLID_CLIP (GE_CONTENTS_SOLID | GE_CONTENTS_WINDOW | GE_CONTENTS_CLIP)\r
-#define GE_CONTENTS_CANNOT_OCCUPY GE_CONTENTS_SOLID_CLIP\r
-\r
-// These contents are all visible types\r
-#define GE_VISIBLE_CONTENTS ( GE_CONTENTS_SOLID | \\r
- GE_CONTENTS_EMPTY | \\r
- GE_CONTENTS_WINDOW | \\r
- GE_CONTENTS_WAVY)\r
-\r
-#endif\r
-//*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\r
-//*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=\r
-\r
-// NOTES - Fills in first Model/Mesh hit\r
-// Exceptions:\r
-// Returns the last solid model hit...\r
-typedef struct\r
-{\r
- geMesh *Mesh;\r
- geWorld_Model *Model;\r
- geActor *Actor;\r
- int32 Contents;\r
-} GE_Contents;\r
-\r
-typedef geBoolean GE_CollisionCB(geWorld_Model *Model, geActor *Actor, void *Context);\r
-\r
-// Collision\r
-typedef struct\r
-{\r
- geVec3d Normal; // Orientation of plane\r
- geFloat Dist; // Distance from origin\r
-} GE_Plane;\r
-\r
-typedef struct\r
-{\r
- geWorld_Model *Model; // Pointer to what model was hit (if any)\r
- geMesh *Mesh; // Pointer to what mesh was hit (if any)\r
- geActor *Actor; // Pointer to what actor was hit (if any) \r
- geVec3d Impact; // Impact Point\r
- geFloat Ratio; // Percent from 0 to 1.0, how far along the line for the impact point\r
- GE_Plane Plane; // Impact Plane\r
-} GE_Collision;\r
-\r
-// If these render states change, they must change in DCommon.h too!!!\r
-// These are still under construction, and are for debug purposes only.\r
-// They are merely means of overriding ways the engine normally renders primitives, etc...\r
-//\r
-// RenderState States\r
-//\r
-#define GE_RENDERSTATE_ZWRITE 0 // Z Writes\r
-#define GE_RENDERSTATE_ZCMP 1 // Z Compares\r
-#define GE_RENDERSTATE_BILINEAR 2 // Bilinear filtering\r
-#define GE_RENDERSTATE_ANTI_ALIAS 3 // Anti-Aliasing\r
-#define GE_RENDERSTATE_POLYMODE 4 // Normal, Gouraud only, Lines only, etc\r
-\r
-//\r
-// RenderState Flags\r
-//\r
-#define GE_RENDERFLAG_OFF 0\r
-#define GE_RENDERFLAG_ON 1\r
-\r
-//\r
-// PolyMode flags (A method to override how polys are drawn for debugging purposes...)\r
-//\r
-#define GE_POLYMODE_NORMAL 1 // Draw as is\r
-#define GE_POLYMODE_GOURAUD 2 // Gouraud only\r
-#define GE_POLYMODE_LINES 3 // Outlines only\r
-\r
-//================================================================================\r
-// Engine Management functions\r
-//================================================================================\r
-\r
-\r
-#ifdef _INC_WINDOWS \r
- // Windows.h must be included before genesis.h for this api to be exposed.\r
- \r
-\r
-GENESISAPI geEngine *geEngine_CreateWithVersion(HWND hWnd, const char *AppName, const char *DriverDirectory, uint32 Version);\r
- // use geEngine_Create, rather than calling this directly.\r
-\r
-#define geEngine_Create( hWnd, AppName, DriverDirectory) geEngine_CreateWithVersion(hWnd,AppName,DriverDirectory,GE_VERSION)\r
-\r
-#endif\r
-\r
-GENESISAPI void geEngine_Free(geEngine *Engine);\r
-\r
-GENESISAPI geBoolean geEngine_AddWorld(geEngine *Engine, geWorld *World);\r
-GENESISAPI geBoolean geEngine_RemoveWorld(geEngine *Engine, geWorld *World);\r
-\r
-GENESISAPI geBoolean geEngine_AddBitmap(geEngine *Engine, geBitmap *Bitmap);\r
-GENESISAPI geBoolean geEngine_RemoveBitmap(geEngine *Engine, geBitmap *Bitmap);\r
-\r
-GENESISAPI geDriver_System *geEngine_GetDriverSystem(geEngine *Engine);\r
-\r
-GENESISAPI geBoolean geEngine_SetDriverAndMode( geEngine *Engine, \r
- geDriver *Driver, \r
- geDriver_Mode *DriverMode);\r
-\r
-GENESISAPI geBoolean geEngine_ShutdownDriver(geEngine *Engine);\r
-\r
-GENESISAPI geBoolean geEngine_BeginFrame(geEngine *Engine, geCamera *Camera, geBoolean ClearScreen);\r
-GENESISAPI geBoolean geEngine_EndFrame(geEngine *Engine);\r
-\r
-GENESISAPI geBoolean geEngine_RenderWorld(geEngine *Engine, geWorld *World, geCamera *Camera, geFloat Time);\r
-GENESISAPI geBoolean geEngine_Printf(geEngine *Engine, int32 x, int32 y, const char *String, ...);\r
-\r
-GENESISAPI void GENESISCC geEngine_RenderPoly(const geEngine *Engine, const GE_TLVertex *Points, int NumPoints, const geBitmap *Texture, uint32 Flags);\r
- //RenderPoly : if Texture is null, we Gouraud shade\r
-\r
-GENESISAPI void GENESISCC geEngine_RenderPolyArray(const geEngine *Engine, const GE_TLVertex ** pPoints, int * pNumPoints, int NumPolys, \r
- const geBitmap *Texture, uint32 Flags);\r
-\r
-GENESISAPI geBoolean GENESISCC geEngine_DrawAlphaBitmap( \r
- geEngine * Engine,\r
- geBitmap * pBitmap,\r
- geVec3d * VertUVArray,\r
- geCamera * ClipCamera, // if null, uses full screen\r
- GE_Rect * PixelRect, // pixels in the "camera" view\r
- GE_Rect * PercentRect, // percent of the "camera" view\r
- geFloat Alpha,\r
- GE_RGBA * RGBA_Array\r
- );\r
-\r
-GENESISAPI geBoolean GENESISCC geEngine_DrawBitmap(const geEngine *Engine,const geBitmap *Bitmap,\r
- const geRect * Source, uint32 x, uint32 y);\r
- //DrawBitmap & RenderPoly : must Engine_AddBitmap first!\r
-\r
-\r
-GENESISAPI void geEngine_FillRect(geEngine *Engine, const GE_Rect *Rect, const GE_RGBA *Color);\r
-\r
-GENESISAPI geBoolean geEngine_SetGamma(geEngine *Engine, geFloat Gamma);\r
-GENESISAPI geBoolean geEngine_GetGamma(geEngine *Engine, geFloat *Gamma);\r
-\r
-GENESISAPI geBoolean geEngine_SetFogEnable(geEngine *Engine, geBoolean Enable, geFloat r, geFloat g, geFloat b, geFloat Start, geFloat End);\r
- // enables/disables distance fogging. (based on Enable)\r
- // r,g,b is the color of the fog\r
- // Start is how far out from the camera is not fogged - this is where the fog begins\r
- // End is how far out from the camera where the fog fully obscures things\r
- \r
-\r
-GENESISAPI geBoolean geEngine_ScreenShot(geEngine *Engine, const char *FileName);\r
-\r
-GENESISAPI void geEngine_EnableFrameRateCounter(geEngine *Engine, geBoolean Enabled);\r
-\r
-GENESISAPI geBoolean geEngine_Activate(geEngine *Engine, geBoolean bActive);\r
-\r
-#ifdef _INC_WINDOWS\r
- // Windows.h must be included before genesis.h for this api to be exposed.\r
-GENESISAPI geBoolean geEngine_UpdateWindow(geEngine *Engine);\r
-#endif\r
-\r
-// geDriver\r
-GENESISAPI geDriver *geDriver_SystemGetNextDriver(geDriver_System *DriverSystem, geDriver *Start);\r
-GENESISAPI geDriver_Mode *geDriver_GetNextMode(geDriver *Driver, geDriver_Mode *Start);\r
-GENESISAPI geBoolean geDriver_GetName(geDriver *Driver, const char **Name);\r
-GENESISAPI geBoolean geDriver_ModeGetName(geDriver_Mode *Mode, const char **Name);\r
-GENESISAPI geBoolean geDriver_ModeGetWidthHeight(geDriver_Mode *Mode, int32 *Width, int32 *Height);\r
-\r
-//================================================================================\r
-// Sound Management functions\r
-//================================================================================\r
-#ifdef _INC_WINDOWS\r
- // Windows.h must be included before genesis.h for this api to be exposed.\r
-GENESISAPI geSound_System *geSound_CreateSoundSystem(HWND hWnd);\r
-#endif\r
-\r
-\r
-GENESISAPI void geSound_DestroySoundSystem(geSound_System *Sound);\r
-\r
-\r
-GENESISAPI geSound_Def *geSound_LoadSoundDef(geSound_System *SoundS, geVFile *File);\r
-GENESISAPI void geSound_FreeSoundDef(geSound_System *SoundS, geSound_Def *SoundDef);\r
-\r
-GENESISAPI geSound *geSound_PlaySoundDef(geSound_System *SoundS, \r
- geSound_Def *SoundDef, \r
- geFloat Volume, \r
- geFloat Pan, \r
- geFloat Frequency, \r
- geBoolean Loop);\r
-GENESISAPI geBoolean geSound_StopSound(geSound_System *SoundS, geSound *Sound);\r
-GENESISAPI geBoolean geSound_ModifySound(geSound_System *SoundS, \r
- geSound *Sound, \r
- geFloat Volume, \r
- geFloat Pan, \r
- geFloat Frequency);\r
-GENESISAPI geBoolean geSound_SoundIsPlaying(geSound_System *SoundS, geSound *Sound);\r
-GENESISAPI geBoolean geSound_SetMasterVolume( geSound_System *SoundS, geFloat Volume );\r
-\r
-GENESISAPI void geSound3D_GetConfig(\r
- const geWorld *World, \r
- const geXForm3d *CameraTransform, \r
- const geVec3d *SoundPos, \r
- geFloat Min, \r
- geFloat Ds,\r
- geFloat *Volume,\r
- geFloat *Pan,\r
- geFloat *Frequency);\r
-\r
-GENESISAPI void geSound3D_GetConfigIgnoreObstructions(\r
- const geWorld *World, \r
- const geXForm3d *MXForm, \r
- const geVec3d *SndPos, \r
- geFloat Min, \r
- geFloat Ds,\r
- geFloat *Volume,\r
- geFloat *Pan,\r
- geFloat *Frequency);\r
-\r
-// Added 11/08/1999 Ed Averill API call to return DSOUND object\r
-GENESISAPI void *geSound_GetDSound(void);\r
-// End 11/08/1999 modification\r
-\r
-//================================================================================\r
-// Path Support\r
-//================================================================================\r
-#include "Path.h"\r
-//================================================================================\r
-// Motion Support\r
-//================================================================================\r
-#include "Motion.h"\r
-//================================================================================\r
-// Actor Support\r
-//================================================================================\r
-#include "Actor.h"\r
-\r
-//MRB BEGIN\r
-//geSprite\r
-//================================================================================\r
-// Sprite Support\r
-//================================================================================\r
-#include "Sprite.h"\r
-//MRB END\r
-\r
-\r
-//================================================================================\r
-// World Management functions\r
-//================================================================================\r
-GENESISAPI geWorld *geWorld_Create(geVFile *File);\r
-GENESISAPI void geWorld_Free(geWorld *World);\r
-\r
-// World Actors\r
-GENESISAPI geBoolean geWorld_RemoveActor (geWorld *World, geActor *Actor);\r
-GENESISAPI geBoolean geWorld_AddActor (geWorld *World, geActor *Actor, uint32 Flags, uint32 UserFlags);\r
-GENESISAPI geBoolean geWorld_SetActorFlags (geWorld *World, geActor *Actor, uint32 Flags);\r
-\r
-//MRB BEGIN\r
-//geSprite\r
-GENESISAPI geBoolean geWorld_RemoveSprite (geWorld *World, geSprite *Sprite);\r
-GENESISAPI geBoolean geWorld_AddSprite (geWorld *World, geSprite *Sprite, uint32 Flags, uint32 UserFlags);\r
-GENESISAPI geBoolean geWorld_SetSpriteFlags (geWorld *World, geSprite *Sprite, uint32 Flags);\r
-//MRB END\r
-\r
-// World Bitmaps\r
-GENESISAPI geBoolean geWorld_AddBitmap( geWorld *World, geBitmap *Bitmap);\r
-GENESISAPI geBoolean geWorld_RemoveBitmap( geWorld *World, geBitmap *Bitmap);\r
-GENESISAPI geBoolean geWorld_HasBitmap(const geWorld *World, const geBitmap *Bitmap);\r
-GENESISAPI geBitmap *geWorld_GetBitmapByName(geWorld *World, const char *BitmapName);\r
-GENESISAPI geBoolean geWorld_BitmapIsVisible(geWorld *World, const geBitmap *Bitmap);\r
-\r
-// World BModels\r
-GENESISAPI geWorld_Model *geWorld_GetNextModel(geWorld *World, geWorld_Model *Start);\r
-GENESISAPI geBoolean geWorld_SetModelXForm(geWorld *World, geWorld_Model *Model, const geXForm3d *XForm);\r
-GENESISAPI geBoolean geWorld_GetModelXForm(const geWorld *World, const geWorld_Model *Model, geXForm3d *XForm);\r
-GENESISAPI geBoolean geWorld_OpenModel(geWorld *World, geWorld_Model *Model, geBoolean Open);\r
-GENESISAPI geBoolean geWorld_GetModelRotationalCenter(const geWorld *World, const geWorld_Model *Model, geVec3d *Center);\r
-GENESISAPI geBoolean geWorld_ModelGetBBox(const geWorld *World, const geWorld_Model *Model, geVec3d *Mins, geVec3d *Maxs);\r
-GENESISAPI geMotion * geWorld_ModelGetMotion(geWorld_Model *Model);\r
-// eaa3 07/28/2000\r
-\r
-GENESISAPI void geWorld_ModelGetCenter(geWorld_Model *Model, geVec3d *Center);\r
-\r
-GENESISAPI void *geWorld_ModelGetUserData(const geWorld_Model *Model);\r
-GENESISAPI void geWorld_ModelSetUserData(geWorld_Model *Model, void *UserData);\r
-GENESISAPI void geWorld_ModelSetFlags(geWorld_Model *Model, uint32 ModelFlags);\r
-GENESISAPI uint32 geWorld_ModelGetFlags(geWorld_Model *Model);\r
-\r
-// World Lights\r
-GENESISAPI geLight *geWorld_AddLight(geWorld *World);\r
-GENESISAPI void geWorld_RemoveLight(geWorld *World, geLight *Light);\r
-GENESISAPI geBoolean geWorld_SetLightAttributes( geWorld *World,\r
- geLight *Light, \r
- const geVec3d *Pos, \r
- const GE_RGBA *RGBA, \r
- geFloat Radius,\r
- geBoolean CastShadow);\r
-GENESISAPI geBoolean geWorld_SetLTypeTable(geWorld *World, int32 LType, const char *Table);\r
-\r
-// World fog\r
-GENESISAPI geFog *geWorld_AddFog(geWorld *World);\r
-GENESISAPI geBoolean geWorld_RemoveFog(geWorld *World, geFog *Fog);\r
-\r
-GENESISAPI geBoolean geFog_SetAttributes( geFog *Fog, \r
- const geVec3d *Pos, \r
- GE_RGBA *Color,\r
- geFloat LightBrightness, \r
- geFloat VolumeBrightness, \r
- geFloat VolumeRadius);\r
-\r
-// World Classes/Entities\r
-GENESISAPI geEntity_EntitySet *geWorld_GetEntitySet(geWorld *World, const char *ClassName);\r
-GENESISAPI geEntity *geEntity_EntitySetGetNextEntity(geEntity_EntitySet *EntitySet, geEntity *Entity);\r
-GENESISAPI void *geEntity_GetUserData(geEntity *Entity);\r
-GENESISAPI void geEntity_GetName(const geEntity *Entity, char *Buff, int MaxLen);\r
-\r
-// World collision\r
-GENESISAPI geBoolean geWorld_ModelCollision( geWorld *World, \r
- geWorld_Model *Model, \r
- const geXForm3d *DXForm, \r
- GE_Collision *Collision);\r
-GENESISAPI geBoolean geWorld_TestModelMove( geWorld *World, \r
- geWorld_Model *Model, \r
- const geXForm3d *DXForm, \r
- const geVec3d *Mins, const geVec3d *Maxs,\r
- const geVec3d *In, geVec3d *Out);\r
-\r
-GENESISAPI geBoolean geWorld_Collision( geWorld *World, // World to collide with\r
- const geVec3d *Mins, // Mins of object (in object-space). This CAN be NULL\r
- const geVec3d *Maxs, // Maxs of object (in object-space). This CAN be NULL\r
- const geVec3d *Front, // Front of line (in world-space)\r
- const geVec3d *Back, // Back of line (in world-space)\r
- uint32 Contents, // Contents to collide with (use GE_CONTENTS_SOLID_CLIP for default)\r
- uint32 CollideFlags, // To mask out certain object types (GE_COLLIDE_ALL, etc...)\r
- uint32 UserFlags, // To mask out actors (refer to geActor_SetUserFlags)\r
- GE_CollisionCB *CollisionCB, // A callback to allow user to reject collisions with certain objects)\r
- void *Context, // User data passed through above callback\r
- GE_Collision *Col); // Structure filled with info about what was collided with\r
- // NOTE - Mins/Maxs CAN be NULL. If you are just testing a point, then use NULL (it's faster!!!).\r
-\r
-GENESISAPI geBoolean geWorld_GetContents(geWorld *World, const geVec3d *Pos, const geVec3d *Mins, const geVec3d *Maxs, uint32 Flags, uint32 UserFlags, GE_CollisionCB *CollisionCB, void *Context, GE_Contents *Contents);\r
-// changed texture name\r
-GENESISAPI geBoolean geWorld_GetTextureName(geWorld *World, const geVec3d *Pos, const geVec3d *Mins, const geVec3d *Maxs, char *TexName);\r
-// end change texture name\r
-\r
-// World Polys\r
-GENESISAPI gePoly *geWorld_AddPolyOnce(geWorld *World, \r
- GE_LVertex *Verts, \r
- int32 NumVerts, \r
- geBitmap *Bitmap,\r
- gePoly_Type Type, \r
- uint32 RenderFlags,\r
- geFloat Scale);\r
-GENESISAPI gePoly *geWorld_AddPoly(geWorld *World, \r
- GE_LVertex *Verts, \r
- int32 NumVerts, \r
- geBitmap *Bitmap,\r
- gePoly_Type Type,\r
- uint32 RenderFlags,\r
- geFloat Scale);\r
-\r
-GENESISAPI void geWorld_RemovePoly(geWorld *World, gePoly *Poly);\r
-GENESISAPI geBoolean gePoly_GetLVertex(gePoly *Poly, int32 Index, GE_LVertex *LVert);\r
-GENESISAPI geBoolean gePoly_SetLVertex(gePoly *Poly, int32 Index, const GE_LVertex *LVert);\r
-\r
-// World visibility\r
-GENESISAPI geBoolean geWorld_GetLeaf(const geWorld *World, const geVec3d *Pos, int32 *Leaf);\r
-GENESISAPI geBoolean geWorld_MightSeeLeaf(const geWorld *World, int32 Leaf);\r
-\r
-GENESISAPI geBoolean geWorld_LeafMightSeeLeaf(const geWorld *World, int32 Leaf1, int32 Leaf2, uint32 VisFlags);\r
- // Checks to see if Leaf1 can see Leaf2\r
- // Currently VisFlags is not used yet. It could be used for checking against areas, etc...\r
- // Eventually you could also pass in a VisObject, that is manipulated with a camera...\r
-\r
-GENESISAPI geBoolean GENESISCC geWorld_IsActorPotentiallyVisible(const geWorld *World, const geActor *Actor, const geCamera *Camera);\r
-\r
-//MRB BEGIN\r
-//geSprite\r
-GENESISAPI geBoolean GENESISCC geWorld_IsSpritePotentiallyVisible(const geWorld *World, const geSprite *Sprite, const geCamera *Camera);\r
-\r
-//================================================================================\r
-// Camera Management functions\r
-//================================================================================\r
-\r
-GENESISAPI geCamera *GENESISCC geCamera_Create(geFloat Fov, const geRect *Rect);\r
-GENESISAPI void GENESISCC geCamera_Destroy(geCamera **pCamera);\r
-GENESISAPI void GENESISCC geCamera_SetZScale(geCamera *Camera, geFloat ZScale);\r
-GENESISAPI geFloat GENESISCC geCamera_GetZScale(const geCamera *Camera);\r
-GENESISAPI void GENESISCC geCamera_SetFarClipPlane(geCamera *Camera, geBoolean Enable, geFloat ZFar);\r
- // sets a far clipping plane. The world and objects aren't drawn if they lie beyond ZFar. \r
- // Zfar is the distance out from the camera.\r
- // Polygons crossing the line are not nesessarily clipped exactly to the line.\r
-GENESISAPI void GENESISCC geCamera_GetFarClipPlane(const geCamera *Camera, geBoolean *Enable, geFloat *ZFar);\r
-GENESISAPI void GENESISCC geCamera_SetAttributes(geCamera *Camera,geFloat Fov, const geRect *Rect);\r
-GENESISAPI void GENESISCC geCamera_GetClippingRect(const geCamera *Camera, geRect *Rect);\r
-\r
-GENESISAPI void GENESISCC geCamera_ScreenPointToWorld(const geCamera *Camera,\r
- int32 ScreenX,\r
- int32 ScreenY,\r
- geVec3d *Vector );\r
-GENESISAPI void GENESISCC geCamera_Project(const geCamera *Camera, \r
- const geVec3d *PointInCameraSpace, \r
- geVec3d *ProjectedPoint);\r
-GENESISAPI void GENESISCC geCamera_Transform(const geCamera *Camera, \r
- const geVec3d *WorldSpacePoint, \r
- geVec3d *CameraSpacePoint);\r
-\r
-GENESISAPI void GENESISCC geCamera_TransformArray(const geCamera *Camera, \r
- const geVec3d *WorldSpacePointPtr, \r
- geVec3d *CameraSpacePointPtr,\r
- int count);\r
-\r
-GENESISAPI void GENESISCC geCamera_TransformAndProject(const geCamera *Camera,\r
- const geVec3d *Point, \r
- geVec3d *ProjectedPoint);\r
-\r
-GENESISAPI void GENESISCC geCamera_TransformAndProjectArray(const geCamera *Camera, \r
- const geVec3d *WorldSpacePointPtr, \r
- geVec3d *ProjectedSpacePointPtr,\r
- int count);\r
- \r
-GENESISAPI void GENESISCC geCamera_TransformAndProjectL(const geCamera *Camera,\r
- const GE_LVertex *Point, \r
- GE_TLVertex *ProjectedPoint);\r
- \r
-GENESISAPI void GENESISCC geCamera_TransformAndProjectLArray(const geCamera *Camera, \r
- const GE_LVertex *WorldSpacePointPtr, \r
- GE_TLVertex *ProjectedSpacePointPtr,\r
- int count);\r
-\r
-\r
-GENESISAPI geBoolean GENESISCC geCamera_SetWorldSpaceXForm(geCamera *Camera, const geXForm3d *XForm);\r
-GENESISAPI geBoolean GENESISCC geCamera_SetWorldSpaceVisXForm(geCamera *Camera, const geXForm3d *XForm);\r
-GENESISAPI const geXForm3d *GENESISCC geCamera_GetWorldSpaceXForm( const geCamera *Camera);\r
-GENESISAPI const geXForm3d * GENESISCC geCamera_GetCameraSpaceXForm( const geCamera *Camera);\r
-GENESISAPI const geXForm3d * GENESISCC geCamera_GetWorldSpaceVisXForm( const geCamera *Camera);\r
-GENESISAPI geBoolean GENESISCC geCamera_ConvertWorldSpaceToCameraSpace(const geXForm3d *WXForm, geXForm3d *CXForm);\r
-GENESISAPI const geVec3d *GENESISCC geCamera_GetPov(const geCamera *Camera);\r
-\r
-\r
-\r
-GENESISAPI void GENESISCC geTClip_SetupEdges(geEngine *Engine,\r
- geFloat LeftEdge, \r
- geFloat RightEdge,\r
- geFloat TopEdge ,\r
- geFloat BottomEdge,\r
- geFloat BackEdge);\r
-\r
-GENESISAPI geBoolean GENESISCC geTClip_Push(void);\r
-GENESISAPI geBoolean GENESISCC geTClip_Pop(void);\r
-\r
-GENESISAPI geBoolean GENESISCC geTClip_SetTexture(const geBitmap * Bitmap);\r
-GENESISAPI void GENESISCC geTClip_Triangle(const GE_LVertex TriVertex[3]);\r
-\r
-GENESISAPI void GENESISCC geTClip_SetRenderFlags(uint32 newflags); // LA\r
-GENESISAPI void GENESISCC geTClip_UnclippedTriangle(const GE_LVertex TriVertex[3]); // LA\r
-\r
-\r
-//================================================================================\r
-// NetPlay Management functions\r
-//================================================================================\r
-\r
-typedef uint32 geCSNetMgr_NetID;\r
-#define MAX_CLIENT_NAME 256\r
-\r
-// Types for messages received from GE_ReceiveSystemMessage\r
-typedef enum \r
-{\r
- NET_MSG_NONE, // No msg\r
- NET_MSG_USER, // User message\r
- NET_MSG_CREATE_CLIENT, // A new client has joined in\r
- NET_MSG_DESTROY_CLIENT, // An existing client has left\r
- NET_MSG_HOST, // We are the server now\r
- NET_MSG_SESSIONLOST, // Connection was lost\r
- NET_MSG_SERVER_ID, // Internal, for hand shaking process\r
-} geCSNetMgr_NetMsgType;\r
-\r
-\r
-typedef struct\r
-{\r
- char Name[MAX_CLIENT_NAME];\r
- geCSNetMgr_NetID Id;\r
-} geCSNetMgr_NetClient;\r
-\r
-#ifdef _INC_WINDOWS\r
- // Windows.h must be included before genesis.h for this api to be exposed.\r
- typedef struct geCSNetMgr_NetSession\r
- {\r
- char SessionName[200]; // Description of Service provider\r
- GUID Guid; // Service Provider GUID\r
- } geCSNetMgr_NetSession;\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_FindSession(geCSNetMgr *M, const char *IPAdress, geCSNetMgr_NetSession **SessionList, int32 *SessionNum );\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_JoinSession(geCSNetMgr *M, const char *Name, const geCSNetMgr_NetSession* Session);\r
-#endif\r
-\r
-\r
-GENESISAPI geCSNetMgr * GENESISCC geCSNetMgr_Create(void);\r
-GENESISAPI void GENESISCC geCSNetMgr_Destroy(geCSNetMgr **ppM);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveFromServer(geCSNetMgr *M, geCSNetMgr_NetMsgType *Type, int32 *Size, uint8 **Data);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveFromClient(geCSNetMgr *M, geCSNetMgr_NetMsgType *Type, geCSNetMgr_NetID *IdClient, int32 *Size, uint8 **Data);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveSystemMessage(geCSNetMgr *M, geCSNetMgr_NetID IdFor, geCSNetMgr_NetMsgType *Type, geCSNetMgr_NetClient *Client);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_ReceiveAllMessages(geCSNetMgr *M, geCSNetMgr_NetID *IdFrom, geCSNetMgr_NetID *IdTo, geCSNetMgr_NetMsgType *Type, int32 *Size, uint8 **Data);\r
-GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetServerID(geCSNetMgr *M);\r
-GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetOurID(geCSNetMgr *M);\r
-GENESISAPI geCSNetMgr_NetID GENESISCC geCSNetMgr_GetAllPlayerID(geCSNetMgr *M);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_WeAreTheServer(geCSNetMgr *M);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_StartSession(geCSNetMgr *M, const char *SessionName, const char *PlayerName );\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_StopSession(geCSNetMgr *M);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_SendToServer(geCSNetMgr *M, geBoolean Guaranteed, uint8 *Data, int32 DataSize);\r
-GENESISAPI geBoolean GENESISCC geCSNetMgr_SendToClient(geCSNetMgr *M, geCSNetMgr_NetID To, geBoolean Guaranteed, uint8 *Data, int32 DataSize);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif\r
-\r