29 #include "../idlib/precompiled.h"
52 for ( portal = area->
portals ; portal ; portal = nextPortal ) {
53 nextPortal = portal->
next;
60 common->
Error(
"FreeWorld: unexpected remaining lightRefs" );
63 common->
Error(
"FreeWorld: unexpected remaining entityRefs" );
134 if ( numSurfaces < 0 ) {
135 src->
Error(
"R_ParseModel: bad numSurfaces" );
138 for ( i = 0 ; i < numSurfaces ; i++ ) {
154 for ( j = 0 ; j < tri->
numVerts ; j++ ) {
219 for ( j = 0 ; j < tri->
numVerts ; j++ ) {
279 src->
Error(
"R_ParseInterAreaPortals: bad numPortalAreas" );
290 src->
Error(
"R_ParseInterAreaPortals: bad numInterAreaPortals" );
298 int numPoints, a1, a2;
308 for ( j = 0 ; j < numPoints ; j++ ) {
355 src->
Error(
"R_ParseNodes: bad numAreaNodes" );
380 for (
int i = 0 ;
i < 2 ;
i++ ) {
389 if ( nums[0] == AREANUM_SOLID ) {
392 if ( nums[1] == AREANUM_SOLID ) {
397 if ( nums[0] == nums[1] ) {
400 common = CHILDREN_HAVE_MULTIPLE_AREAS;
453 if ( light && light->
world ==
this ) {
464 if ( mod && mod->
world ==
this ) {
486 if ( !name || !name[0] ) {
500 ID_TIME_T currentTimeStamp;
504 if ( currentTimeStamp != FILE_NOT_FOUND_TIMESTAMP && currentTimeStamp ==
mapTimeStamp ) {
505 common->
Printf(
"idRenderWorldLocal::InitFromMap: retaining existing map\n" );
512 common->
Printf(
"idRenderWorldLocal::InitFromMap: timestamp has changed, reloading.\n" );
519 common->
Printf(
"idRenderWorldLocal::InitFromMap: %s not found\n", filename.
c_str() );
545 if ( token ==
"model" ) {
556 if ( token ==
"shadowModel" ) {
567 if ( token ==
"interAreaPortals" ) {
572 if ( token ==
"nodes" ) {
577 src->
Error(
"idRenderWorldLocal::InitFromMap: bad token \"%s\"", token.
c_str() );
612 for ( j = 0 ; j < NUM_PORTAL_ATTRIBUTES ; j++ ) {
649 common->
Error(
"idRenderWorldLocal::InitFromMap: bad area model lookup" );
idRenderWorldLocal * world
int numShadowIndexesNoFrontCaps
void AddEntityRefToArea(idRenderEntityLocal *def, portalArea_t *area)
idStr & SetFileExtension(const char *extension)
idList< idRenderModel * > localModels
assert(prefInfo.fullscreenBtn)
virtual bool IsStaticWorldModel() const =0
areaReference_t lightRefs
bool generateAllInteractionsCalled
virtual void FinishSurfaces()=0
virtual int ReadFile(const char *relativePath, void **buffer, ID_TIME_T *timestamp=NULL)=0
int Parse1DMatrix(int x, float *m)
idList< idRenderEntityLocal * > entityDefs
idFileSystem * fileSystem
const idMaterial * shader
void TouchWorldModels(void)
virtual void AddSurface(modelSurface_t surface)=0
const float * ToFloatPtr(void) const
virtual bool InitFromMap(const char *mapName)
const char * GetName(void) const
idWinding * Reverse(void) const
virtual const idMaterial * FindMaterial(const char *name, bool makeDefault=true)=0
srfTriangles_t * R_AllocStaticTriSurf(void)
int Icmp(const char *text) const
idList< idRenderLightLocal * > lightDefs
int ExpectAnyToken(idToken *token)
virtual void InitEmpty(const char *name)=0
virtual void AddModel(idRenderModel *model)=0
doublePortal_t * doublePortals
bool AddPoint(const idVec3 &v)
void Error(const char *str,...) id_attribute((format(printf
idInteraction ** interactionTable
virtual void FreeLightDef(qhandle_t lightHandle)
GLubyte GLubyte GLubyte GLubyte w
idRenderWorldLocal * world
idRenderModel * ParseModel(idLexer *src)
srfTriangles_t * geometry
virtual idRenderModel * FindModel(const char *modelName)=0
virtual const modelSurface_t * Surface(int surfaceNum) const =0
void GetPlane(idVec3 &normal, float &dist) const
void R_AllocStaticTriSurfShadowVerts(srfTriangles_t *tri, int numVerts)
idBlockAlloc< areaReference_t, 1024 > areaReferenceAllocator
shadowCache_t * shadowVertexes
virtual void Printf(const char *fmt,...) id_attribute((format(printf
struct portal_s * portals[2]
virtual idBounds Bounds(const struct renderEntity_s *ent=NULL) const =0
idBlockAlloc< areaNumRef_t, 1024 > areaNumRefAllocator
virtual bool CheckAreaForPortalSky(int areaNum)
idDeclManager * declManager
int CommonChildrenArea_r(areaNode_t *node)
void FloodConnectedAreas(portalArea_t *area, int portalAttributeIndex)
int numShadowIndexesNoCaps
void AddWorldModelEntities()
int ExpectTokenString(const char *string)
int Append(const type &obj)
idRenderModelManager * renderModelManager
virtual bool IsDefaultModel() const =0
virtual void RemoveModel(idRenderModel *model)=0
void * R_ClearedStaticAlloc(int bytes)
portalArea_t * portalAreas
idRenderModel * ParseShadowModel(idLexer *src)
struct portalArea_s * area
idRenderEntityLocal * entity
const char * c_str(void) const
areaReference_t entityRefs
struct areaReference_s * areaNext
const idVec3 & ToVec3(void) const
void R_AllocStaticTriSurfIndexes(srfTriangles_t *tri, int numIndexes)
virtual idRenderModel * CheckModel(const char *modelName)=0
struct doublePortal_s * doublePortal
char * va(const char *fmt,...)
void ParseInterAreaPortals(idLexer *src)
void ParseNodes(idLexer *src)
void R_StaticFree(void *data)
virtual void Error(const char *fmt,...) id_attribute((format(printf
void R_AxisToModelMatrix(const idMat3 &axis, const idVec3 &origin, float modelMatrix[16])
idScreenRect * areaScreenRect
void R_AllocStaticTriSurfVerts(srfTriangles_t *tri, int numVerts)
virtual void FreeEntityDef(qhandle_t entityHandle)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
int ReadToken(idToken *token)
idBlockAlloc< idInteraction, 256 > interactionAllocator
const idMaterial * defaultMaterial
struct areaReference_s * areaPrev
virtual idRenderModel * AllocModel()=0
virtual int NumSurfaces() const =0