//--------------------------------------------------------------------------- const rpatch_t *R_CacheTextureCompositePatchNum(int id) { const int locks = 1; if (!texture_composites) I_Error("R_CacheTextureCompositePatchNum: Composite patches not initialized"); #ifdef RANGECHECK if (id >= numtextures) I_Error("createTextureCompositePatch: %i >= numtextures", id); #endif if (!texture_composites[id].data) createTextureCompositePatch(id); /* cph - if wasn't locked but now is, tell z_zone to hold it */ if (!texture_composites[id].locks && locks) { Z_ChangeTag(texture_composites[id].data,PU_STATIC); #ifdef TIMEDIAG texture_composites[id].locktic = gametic; #endif } texture_composites[id].locks += locks; #ifdef SIMPLECHECKS if (!((texture_composites[id].locks+1) & 0xf)) lprintf(LO_DEBUG, "R_CacheTextureCompositePatchNum: High lock on %8s (%d)\n", textures[id]->name, texture_composites[id].locks); #endif return &texture_composites[id]; }
rpatch_t *R_CacheTextureCompositePatchNum(int id) { if (!texture_composites) I_Error("R_CacheTextureCompositePatchNum: Composite patches not initialized"); if (!texture_composites[id].data) createTextureCompositePatch(id); // cph - if wasn't locked but now is, tell z_zone to hold it if (!texture_composites[id].locks) Z_ChangeTag(texture_composites[id].data, PU_STATIC); texture_composites[id].locks++; return &texture_composites[id]; }