/* @@@@@@@@@@@@@@@@@@@@@ R_BeginRegistration Specifies the model that will be used as the world @@@@@@@@@@@@@@@@@@@@@ */ void R_BeginRegistration (char *model) { char fullname[MAX_QPATH]; cvar_t *flushmap; r_registering = true; #ifdef RB_IMAGE_CACHE EmptyImageCache(); #endif registration_sequence++; r_oldviewcluster = -1; // force markleafs Com_sprintf (fullname, sizeof(fullname), "maps/%s.bsp", model); // explicitly free the old map if different // this guarantees that mod_known[0] is the world map flushmap = Cvar_Get ("flushmap", "0", 0); if ( strcmp(mod_known[0].name, fullname) || flushmap->intvalue) Mod_Free (&mod_known[0]); r_worldmodel = Mod_ForName(fullname, true); r_viewcluster = -1; }
/* * Specifies the model that will be used as the world */ void RI_BeginRegistration(char *model) { char fullname[MAX_QPATH]; cvar_t *flushmap; registration_sequence++; r_oldviewcluster = -1; /* force markleafs */ Com_sprintf(fullname, sizeof(fullname), "maps/%s.bsp", model); /* explicitly free the old map if different this guarantees that mod_known[0] is the world map */ flushmap = ri.Cvar_Get("flushmap", "0", 0); if (strcmp(mod_known[0].name, fullname) || flushmap->value) { Mod_Free(&mod_known[0]); } r_worldmodel = Mod_ForName(fullname, true); r_viewcluster = -1; }
/* ================ Mod_FreeAll ================ */ void Mod_FreeAll (void) { int i; for (i=0 ; i<mod_numknown ; i++) { Mod_Free (&mod_known[i]); } }
/* ================ Mod_FreeAll ================ */ void Mod_FreeAll(void) { int i; for (i = 0; i < mod_numknown; i++) { if (mod_known[i].extradatasize) Mod_Free(&mod_known[i]); } }
/* @@@@@@@@@@@@@@@@@@@@@ R_EndRegistration @@@@@@@@@@@@@@@@@@@@@ */ void R_EndRegistration (void) { int i; model_t *mod; for (i=0, mod=mod_known ; i<mod_numknown ; i++, mod++) { if (!mod->name[0]) continue; if (mod->registration_sequence != registration_sequence) { // don't need this model Mod_Free (mod); } } GL_FreeUnusedImages (); }
/* @@@@@@@@@@@@@@@@@@@@@ R_BeginRegistration Specifies the model that will be used as the world @@@@@@@@@@@@@@@@@@@@@ */ void R_BeginRegistration (char *model) { char fullname[MAX_QPATH]; cvar_t *flushmap; registration_sequence++; r_oldviewcluster = -1; // force markleafs Com_sprintf (fullname, sizeof(fullname), "maps/%s.bsp", model); D_FlushCaches (); // explicitly free the old map if different // this guarantees that mod_known[0] is the world map flushmap = ri.Cvar_Get ("flushmap", "0", 0); if ( strcmp(mod_known[0].name, fullname) || flushmap->value) Mod_Free (&mod_known[0]); r_worldmodel = R_RegisterModel (fullname); R_NewMap (); }
/* @@@@@@@@@@@@@@@@@@@@@ R_EndRegistration @@@@@@@@@@@@@@@@@@@@@ */ void R_EndRegistration (void) { int i; model_t *mod; for (i=0, mod=mod_known ; i<mod_numknown ; i++, mod++) { if (!mod->name[0]) continue; if (mod->registration_sequence != registration_sequence) { // don't need this model Mod_Free (mod); } } GL_FreeUnusedImages (); // jkrige - anisotropic filtering GL_RunTextureMode (); }
void GL3_EndRegistration(void) { int i; gl3model_t *mod; for (i = 0, mod = mod_known; i < mod_numknown; i++, mod++) { if (!mod->name[0]) { continue; } if (mod->registration_sequence != registration_sequence) { /* don't need this model */ Mod_Free(mod); } } GL3_FreeUnusedImages(); }