mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[model] Remove empty brush model functions
It seems better to check for a null pointer and just not call.
This commit is contained in:
parent
c7b2843c0e
commit
9b53d7d4e2
7 changed files with 15 additions and 53 deletions
|
@ -132,11 +132,6 @@ glsl_Mod_ProcessTexture (texture_t *tx)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
glsl_Mod_LoadExternalTextures (model_t *mod)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
glsl_Mod_LoadLighting (bsp_t *bsp)
|
||||
{
|
||||
|
@ -150,8 +145,3 @@ glsl_Mod_LoadLighting (bsp_t *bsp)
|
|||
loadmodel->lightdata = Hunk_AllocName (bsp->lightdatasize, loadname);
|
||||
memcpy (loadmodel->lightdata, bsp->lightdata, bsp->lightdatasize);
|
||||
}
|
||||
|
||||
void
|
||||
glsl_Mod_SubdivideSurface (msurface_t *fa)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ Mod_LoadTextures (bsp_t *bsp)
|
|||
|
||||
if (!strncmp (mt->name, "sky", 3))
|
||||
loadmodel->skytexture = tx;
|
||||
if (mod_funcs)
|
||||
if (mod_funcs && mod_funcs->Mod_ProcessTexture)
|
||||
mod_funcs->Mod_ProcessTexture (tx);
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ Mod_LoadFaces (bsp_t *bsp)
|
|||
if (!strncmp (out->texinfo->texture->name, "sky", 3)) { // sky
|
||||
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
|
||||
if (gl_sky_divide && gl_sky_divide->int_val)
|
||||
if (mod_funcs)
|
||||
if (mod_funcs && mod_funcs->Mod_SubdivideSurface)
|
||||
mod_funcs->Mod_SubdivideSurface (out);
|
||||
continue;
|
||||
}
|
||||
|
@ -552,8 +552,10 @@ Mod_LoadFaces (bsp_t *bsp)
|
|||
out->extents[i] = 16384;
|
||||
out->texturemins[i] = -8192;
|
||||
}
|
||||
if (mod_funcs) // cut up polygon for warps
|
||||
if (mod_funcs && mod_funcs->Mod_SubdivideSurface) {
|
||||
// cut up polygon for warps
|
||||
mod_funcs->Mod_SubdivideSurface (out);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -915,8 +917,9 @@ Mod_LoadBrushModel (model_t *mod, void *buffer)
|
|||
Mod_LoadEdges (bsp);
|
||||
Mod_LoadSurfedges (bsp);
|
||||
Mod_LoadTextures (bsp);
|
||||
if (mod_funcs)
|
||||
if (mod_funcs && mod_funcs->Mod_LoadLighting) {
|
||||
mod_funcs->Mod_LoadLighting (bsp);
|
||||
}
|
||||
Mod_LoadPlanes (bsp);
|
||||
Mod_LoadTexinfo (bsp);
|
||||
Mod_LoadFaces (bsp);
|
||||
|
|
|
@ -40,22 +40,6 @@
|
|||
|
||||
#include "mod_internal.h"
|
||||
|
||||
|
||||
void
|
||||
sw_Mod_SubdivideSurface (msurface_t *fa)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
sw_Mod_ProcessTexture (texture_t *tx)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
sw_Mod_LoadExternalTextures (model_t *mod)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
sw_Mod_LoadLighting (bsp_t *bsp)
|
||||
{
|
||||
|
|
|
@ -48,26 +48,11 @@ Mod_LoadSpriteModel (model_t *mod, void *buf)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
Mod_ProcessTexture (texture_t *tx)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Mod_LoadExternalSkins (model_t *mod)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Mod_LoadExternalTextures (model_t *mod)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
Mod_SubdivideSurface (msurface_t *fa)
|
||||
{
|
||||
}
|
||||
|
||||
viddef_t vid;
|
||||
|
||||
VISIBLE void
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
gl_ctx_t *glsl_ctx;
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
glsl_Mod_LoadExternalTextures,
|
||||
0,//Mod_LoadExternalTextures,
|
||||
glsl_Mod_LoadLighting,
|
||||
glsl_Mod_SubdivideSurface,
|
||||
0,//Mod_SubdivideSurface,
|
||||
glsl_Mod_ProcessTexture,
|
||||
|
||||
Mod_LoadIQM,
|
||||
|
|
|
@ -39,10 +39,10 @@
|
|||
sw_ctx_t *sw_ctx;
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
sw_Mod_LoadExternalTextures,
|
||||
0,//Mod_LoadExternalTextures,
|
||||
sw_Mod_LoadLighting,
|
||||
sw_Mod_SubdivideSurface,
|
||||
sw_Mod_ProcessTexture,
|
||||
0,//Mod_SubdivideSurface,
|
||||
0,//Mod_ProcessTexture,
|
||||
|
||||
Mod_LoadIQM,
|
||||
Mod_LoadAliasModel,
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
sw_ctx_t *sw32_ctx;
|
||||
|
||||
static vid_model_funcs_t model_funcs = {
|
||||
sw_Mod_LoadExternalTextures,
|
||||
0,//Mod_LoadExternalTextures,
|
||||
sw_Mod_LoadLighting,
|
||||
sw_Mod_SubdivideSurface,
|
||||
sw_Mod_ProcessTexture,
|
||||
0,//Mod_SubdivideSurface,
|
||||
0,//Mod_ProcessTexture,
|
||||
|
||||
Mod_LoadIQM,
|
||||
Mod_LoadAliasModel,
|
||||
|
|
Loading…
Reference in a new issue