Esempio n. 1
0
/*
============
ProcessModels
============
*/
void ProcessModels (void)
{
	qboolean	oldVerbose;
	entity_t	*entity;

	oldVerbose = verbose;

	BeginBSPFile ();

	for ( entity_num=0 ; entity_num< num_entities ; entity_num++ ) {
		entity = &entities[entity_num];
	
		if ( !entity->brushes && !entity->patches ) {
			continue;
		}

		qprintf ("############### model %i ###############\n", nummodels);
		if (entity_num == 0)
			ProcessWorldModel ();
		else
			ProcessSubModel ();

		if (!verboseentities)
			verbose = qfalse;	// don't bother printing submodels
	}

	verbose = oldVerbose;
}
Esempio n. 2
0
File: bsp.c Progetto: otty/cake3
/*
============
ProcessModels
============
*/
void ProcessModels(void)
{
	int             i;
	entity_t       *entity;
	const char     *classname;
	const char     *model;

	BeginBSPFile();

	for(i = 0; i < numEntities; i++)
	{
		entity = &entities[i];

		classname = ValueForKey(entity, "classname");
		model = ValueForKey(entity, "model");

		if(entity->brushes || entity->patches ||
		   (!entity->brushes && !entity->patches && model[0] != '\0' && Q_stricmp("misc_model", classname)))
		{
			Sys_FPrintf(SYS_VRB, "############### model %i ###############\n", numModels);

			if(i == 0)
				ProcessWorldModel();
			else
				ProcessSubModel(i);
		}
	}
}
Esempio n. 3
0
void ProcessModels( void ){
	qboolean oldVerbose;
	entity_t    *entity;


	/* preserve -v setting */
	oldVerbose = verbose;

	/* start a new bsp */
	BeginBSPFile();

	/* create map fogs */
	CreateMapFogs();

	/* walk entity list */
	for ( mapEntityNum = 0; mapEntityNum < numEntities; mapEntityNum++ )
	{
		/* get entity */
		entity = &entities[ mapEntityNum ];
		if ( entity->brushes == NULL && entity->patches == NULL ) {
			continue;
		}

		/* process the model */
		Sys_FPrintf( SYS_VRB, "############### model %i ###############\n", numBSPModels );
		if ( mapEntityNum == 0 ) {
			ProcessWorldModel();
		}
		else{
			ProcessSubModel();
		}

		/* potentially turn off the deluge of text */
		verbose = verboseEntities;
	}

	/* restore -v setting */
	verbose = oldVerbose;

	/* write fogs */
	EmitFogs();

	/* vortex: emit meta stats */
	EmitMetaStats();
}
Esempio n. 4
0
/*
============
ProcessModels
============
*/
void ProcessModels (void)
{
	BeginBSPFile ();

	// Mark sides that have no dynamic shadows.
	MarkNoDynamicShadowSides();

	// emit the displacement surfaces
	EmitInitialDispInfos();

	// Clip occluder brushes against each other, 
	// Remove them from the list of models to process below
	EmitOccluderBrushes( );

	for ( entity_num=0; entity_num < num_entities; ++entity_num )
	{
		entity_t *pEntity = &entities[entity_num];
		if ( !pEntity->numbrushes )
			continue;

		qprintf ("############### model %i ###############\n", nummodels);

		BeginModel ();

		if (entity_num == 0)
		{
			ProcessWorldModel();
		}
		else
		{
			ProcessSubModel( );
		}

		EndModel ();

		if (!verboseentities)
		{
			verbose = false;	// don't bother printing submodels
		}
	}

	// Turn the skybox into a cubemap in case we don't build env_cubemap textures.
	Cubemap_CreateDefaultCubemaps();
	EndBSPFile ();
}
Esempio n. 5
0
/*
 * @brief
 */
static void ProcessModels(void) {
	BeginBSPFile();

	for (entity_num = 0; entity_num < num_entities; entity_num++) {
		if (!entities[entity_num].num_brushes)
			continue;

		Com_Verbose("############### model %i ###############\n", d_bsp.num_models);
		BeginModel();
		if (entity_num == 0)
			ProcessWorldModel();
		else
			ProcessSubModel();
		EndModel();
	}

	EndBSPFile();
}
Esempio n. 6
0
/*
============
ProcessModels
============
*/
void ProcessModels (void)
{
	BeginBSPFile ();

	for (entity_num=0 ; entity_num< num_entities ; entity_num++)
	{
		if (!entities[entity_num].numbrushes)
			continue;

		qprintf ("############### model %i ###############\n", nummodels);
		BeginModel ();
		if (entity_num == 0)
			ProcessWorldModel ();
		else
			ProcessSubModel ();
		EndModel ();

		if (!verboseentities)
			verbose = false;	// don't bother printing submodels
	}

	EndBSPFile ();
}
Esempio n. 7
0
/**
 * @sa ProcessWorldModel
 * @sa ProcessSubModel
 */
void ProcessModels (const char* filename)
{
    int entity_num;

    BeginBSPFile();

    for (entity_num = 0; entity_num < num_entities; entity_num++) {
        if (!entities[entity_num].numbrushes)
            continue;

        Verb_Printf(VERB_EXTRA, "############### model %i ###############\n", curTile->nummodels);

        if (entity_num == 0)
            ProcessWorldModel(entity_num);
        else
            ProcessSubModel(entity_num);

        if (!config.verboseentities)
            config.verbose = false;	/* don't bother printing submodels */
    }

    EndBSPFile(filename);
}