mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-19 07:51:03 +00:00
refresh: Sync lightmap function names
This commit is contained in:
parent
a180fd3086
commit
bd86f646da
11 changed files with 83 additions and 83 deletions
|
@ -233,7 +233,7 @@ calcTexinfoAndFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *tl
|
|||
|
||||
// R_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
||||
// for each (pot. recursive) call to R_SubdividePolygon():
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(gl3_3D_vtx_t)
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(mvtx_t)
|
||||
|
||||
// this is tricky, how much is allocated depends on the size of the surface
|
||||
// which we don't know (we'd need the vertices etc to know, but we can't load
|
||||
|
@ -309,7 +309,7 @@ calcTexinfoAndQFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *t
|
|||
|
||||
// R_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
||||
// for each (pot. recursive) call to R_SubdividePolygon():
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(gl3_3D_vtx_t)
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(mvtx_t)
|
||||
|
||||
// this is tricky, how much is allocated depends on the size of the surface
|
||||
// which we don't know (we'd need the vertices etc to know, but we can't load
|
||||
|
@ -804,7 +804,7 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash)
|
|||
strcpy(mod->name, name);
|
||||
|
||||
/* load the file */
|
||||
modfilelen = Mod_LoadFile (mod->name, &buf);
|
||||
modfilelen = Mod_LoadFile(mod->name, &buf);
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
|
|
|
@ -33,13 +33,13 @@
|
|||
extern gl3lightmapstate_t gl3_lms;
|
||||
|
||||
void
|
||||
GL3_LM_InitBlock(void)
|
||||
LM_InitBlock(void)
|
||||
{
|
||||
memset(gl3_lms.allocated, 0, sizeof(gl3_lms.allocated));
|
||||
}
|
||||
|
||||
void
|
||||
GL3_LM_UploadBlock(void)
|
||||
LM_UploadBlock(void)
|
||||
{
|
||||
int map;
|
||||
|
||||
|
@ -71,7 +71,7 @@ GL3_LM_UploadBlock(void)
|
|||
* returns a texture number and the position inside it
|
||||
*/
|
||||
qboolean
|
||||
GL3_LM_AllocBlock(int w, int h, int *x, int *y)
|
||||
LM_AllocBlock(int w, int h, int *x, int *y)
|
||||
{
|
||||
int i, j;
|
||||
int best, best2;
|
||||
|
@ -117,7 +117,7 @@ GL3_LM_AllocBlock(int w, int h, int *x, int *y)
|
|||
}
|
||||
|
||||
void
|
||||
GL3_LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa)
|
||||
LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa)
|
||||
{
|
||||
int i, lindex, lnumverts;
|
||||
medge_t *pedges, *r_pedge;
|
||||
|
@ -200,7 +200,7 @@ GL3_LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa)
|
|||
}
|
||||
|
||||
void
|
||||
GL3_LM_CreateSurfaceLightmap(msurface_t *surf)
|
||||
LM_CreateSurfaceLightmap(msurface_t *surf)
|
||||
{
|
||||
int smax, tmax;
|
||||
|
||||
|
@ -212,12 +212,12 @@ GL3_LM_CreateSurfaceLightmap(msurface_t *surf)
|
|||
smax = (surf->extents[0] >> surf->lmshift) + 1;
|
||||
tmax = (surf->extents[1] >> surf->lmshift) + 1;
|
||||
|
||||
if (!GL3_LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
if (!LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
{
|
||||
GL3_LM_UploadBlock();
|
||||
GL3_LM_InitBlock();
|
||||
LM_UploadBlock();
|
||||
LM_InitBlock();
|
||||
|
||||
if (!GL3_LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
if (!LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
{
|
||||
Com_Error(ERR_FATAL,
|
||||
"%s: Consecutive calls to LM_AllocBlock(%d,%d) failed\n",
|
||||
|
@ -231,7 +231,7 @@ GL3_LM_CreateSurfaceLightmap(msurface_t *surf)
|
|||
}
|
||||
|
||||
void
|
||||
GL3_LM_BeginBuildingLightmaps(gl3model_t *m)
|
||||
LM_BeginBuildingLightmaps(gl3model_t *m)
|
||||
{
|
||||
|
||||
static lightstyle_t lightstyles[MAX_LIGHTSTYLES];
|
||||
|
@ -260,8 +260,8 @@ GL3_LM_BeginBuildingLightmaps(gl3model_t *m)
|
|||
}
|
||||
|
||||
void
|
||||
GL3_LM_EndBuildingLightmaps(void)
|
||||
LM_EndBuildingLightmaps(void)
|
||||
{
|
||||
GL3_LM_UploadBlock();
|
||||
LM_UploadBlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ calcTexinfoAndFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *tl
|
|||
}
|
||||
else
|
||||
{
|
||||
// GL3_LM_BuildPolygonFromSurface(out);
|
||||
// LM_BuildPolygonFromSurface(out);
|
||||
// => poly = Hunk_Alloc(sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t));
|
||||
int polySize = sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t);
|
||||
polySize = (polySize + 31) & ~31;
|
||||
|
@ -316,7 +316,7 @@ calcTexinfoAndQFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *t
|
|||
}
|
||||
else
|
||||
{
|
||||
// GL3_LM_BuildPolygonFromSurface(out);
|
||||
// LM_BuildPolygonFromSurface(out);
|
||||
// => poly = Hunk_Alloc(sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t));
|
||||
int polySize = sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t);
|
||||
polySize = (polySize + 31) & ~31;
|
||||
|
@ -355,7 +355,7 @@ Mod_LoadFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
||||
GL3_LM_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -430,16 +430,16 @@ Mod_LoadFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
GL3_LM_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
GL3_LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
GL3_LM_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -464,7 +464,7 @@ Mod_LoadQFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
||||
GL3_LM_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -539,16 +539,16 @@ Mod_LoadQFaces(gl3model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
GL3_LM_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
GL3_LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
GL3_LM_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -705,7 +705,7 @@ Mod_LoadBrushModel(gl3model_t *mod, const void *buffer, int modfilelen)
|
|||
* Loads in a model for the given name
|
||||
*/
|
||||
static gl3model_t *
|
||||
Mod_ForName (const char *name, gl3model_t *parent_model, qboolean crash)
|
||||
Mod_ForName(const char *name, gl3model_t *parent_model, qboolean crash)
|
||||
{
|
||||
gl3model_t *mod;
|
||||
void *buf;
|
||||
|
|
|
@ -460,13 +460,13 @@ extern void GL3_BuildLightMap(msurface_t *surf, int offsetInLMbuf, int stride);
|
|||
// gl3_lightmap.c
|
||||
#define GL_LIGHTMAP_FORMAT GL_RGBA
|
||||
|
||||
extern void GL3_LM_InitBlock(void);
|
||||
extern void GL3_LM_UploadBlock(void);
|
||||
extern qboolean GL3_LM_AllocBlock(int w, int h, int *x, int *y);
|
||||
extern void GL3_LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa);
|
||||
extern void GL3_LM_CreateSurfaceLightmap(msurface_t *surf);
|
||||
extern void GL3_LM_BeginBuildingLightmaps(gl3model_t *m);
|
||||
extern void GL3_LM_EndBuildingLightmaps(void);
|
||||
extern void LM_InitBlock(void);
|
||||
extern void LM_UploadBlock(void);
|
||||
extern qboolean LM_AllocBlock(int w, int h, int *x, int *y);
|
||||
extern void LM_BuildPolygonFromSurface(gl3model_t *currentmodel, msurface_t *fa);
|
||||
extern void LM_CreateSurfaceLightmap(msurface_t *surf);
|
||||
extern void LM_BeginBuildingLightmaps(gl3model_t *m);
|
||||
extern void LM_EndBuildingLightmaps(void);
|
||||
|
||||
// gl3_warp.c
|
||||
extern void GL3_EmitWaterPolys(msurface_t *fa);
|
||||
|
|
|
@ -33,13 +33,13 @@
|
|||
extern gl4lightmapstate_t gl4_lms;
|
||||
|
||||
void
|
||||
GL4_LM_InitBlock(void)
|
||||
LM_InitBlock(void)
|
||||
{
|
||||
memset(gl4_lms.allocated, 0, sizeof(gl4_lms.allocated));
|
||||
}
|
||||
|
||||
void
|
||||
GL4_LM_UploadBlock(void)
|
||||
LM_UploadBlock(void)
|
||||
{
|
||||
int map;
|
||||
|
||||
|
@ -71,7 +71,7 @@ GL4_LM_UploadBlock(void)
|
|||
* returns a texture number and the position inside it
|
||||
*/
|
||||
qboolean
|
||||
GL4_LM_AllocBlock(int w, int h, int *x, int *y)
|
||||
LM_AllocBlock(int w, int h, int *x, int *y)
|
||||
{
|
||||
int i, j;
|
||||
int best, best2;
|
||||
|
@ -117,7 +117,7 @@ GL4_LM_AllocBlock(int w, int h, int *x, int *y)
|
|||
}
|
||||
|
||||
void
|
||||
GL4_LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa)
|
||||
LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa)
|
||||
{
|
||||
int i, lindex, lnumverts;
|
||||
medge_t *pedges, *r_pedge;
|
||||
|
@ -200,7 +200,7 @@ GL4_LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa)
|
|||
}
|
||||
|
||||
void
|
||||
GL4_LM_CreateSurfaceLightmap(msurface_t *surf)
|
||||
LM_CreateSurfaceLightmap(msurface_t *surf)
|
||||
{
|
||||
int smax, tmax;
|
||||
|
||||
|
@ -212,12 +212,12 @@ GL4_LM_CreateSurfaceLightmap(msurface_t *surf)
|
|||
smax = (surf->extents[0] >> surf->lmshift) + 1;
|
||||
tmax = (surf->extents[1] >> surf->lmshift) + 1;
|
||||
|
||||
if (!GL4_LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
if (!LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
{
|
||||
GL4_LM_UploadBlock();
|
||||
GL4_LM_InitBlock();
|
||||
LM_UploadBlock();
|
||||
LM_InitBlock();
|
||||
|
||||
if (!GL4_LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
if (!LM_AllocBlock(smax, tmax, &surf->light_s, &surf->light_t))
|
||||
{
|
||||
Com_Error(ERR_FATAL,
|
||||
"%s: Consecutive calls to LM_AllocBlock(%d,%d) failed\n",
|
||||
|
@ -231,7 +231,7 @@ GL4_LM_CreateSurfaceLightmap(msurface_t *surf)
|
|||
}
|
||||
|
||||
void
|
||||
GL4_LM_BeginBuildingLightmaps(gl4model_t *m)
|
||||
LM_BeginBuildingLightmaps(gl4model_t *m)
|
||||
{
|
||||
|
||||
static lightstyle_t lightstyles[MAX_LIGHTSTYLES];
|
||||
|
@ -260,8 +260,8 @@ GL4_LM_BeginBuildingLightmaps(gl4model_t *m)
|
|||
}
|
||||
|
||||
void
|
||||
GL4_LM_EndBuildingLightmaps(void)
|
||||
LM_EndBuildingLightmaps(void)
|
||||
{
|
||||
GL4_LM_UploadBlock();
|
||||
LM_UploadBlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ calcTexinfoAndFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *tl
|
|||
}
|
||||
else
|
||||
{
|
||||
// GL4_LM_BuildPolygonFromSurface(out);
|
||||
// LM_BuildPolygonFromSurface(out);
|
||||
// => poly = Hunk_Alloc(sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t));
|
||||
int polySize = sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t);
|
||||
polySize = (polySize + 31) & ~31;
|
||||
|
@ -314,7 +314,7 @@ calcTexinfoAndQFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *t
|
|||
}
|
||||
else
|
||||
{
|
||||
// GL3_LM_BuildPolygonFromSurface(out);
|
||||
// LM_BuildPolygonFromSurface(out);
|
||||
// => poly = Hunk_Alloc(sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t));
|
||||
int polySize = sizeof(mpoly_t) + (numverts - 4) * sizeof(mvtx_t);
|
||||
polySize = (polySize + 31) & ~31;
|
||||
|
@ -353,7 +353,7 @@ Mod_LoadFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
||||
GL4_LM_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -428,16 +428,16 @@ Mod_LoadFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
GL4_LM_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
GL4_LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
GL4_LM_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -462,7 +462,7 @@ Mod_LoadQFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
||||
GL4_LM_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -537,16 +537,16 @@ Mod_LoadQFaces(gl4model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
GL4_LM_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
GL4_LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
GL4_LM_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -460,13 +460,13 @@ extern void GL4_BuildLightMap(msurface_t *surf, int offsetInLMbuf, int stride);
|
|||
// gl4_lightmap.c
|
||||
#define GL_LIGHTMAP_FORMAT GL_RGBA
|
||||
|
||||
extern void GL4_LM_InitBlock(void);
|
||||
extern void GL4_LM_UploadBlock(void);
|
||||
extern qboolean GL4_LM_AllocBlock(int w, int h, int *x, int *y);
|
||||
extern void GL4_LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa);
|
||||
extern void GL4_LM_CreateSurfaceLightmap(msurface_t *surf);
|
||||
extern void GL4_LM_BeginBuildingLightmaps(gl4model_t *m);
|
||||
extern void GL4_LM_EndBuildingLightmaps(void);
|
||||
extern void LM_InitBlock(void);
|
||||
extern void LM_UploadBlock(void);
|
||||
extern qboolean LM_AllocBlock(int w, int h, int *x, int *y);
|
||||
extern void LM_BuildPolygonFromSurface(gl4model_t *currentmodel, msurface_t *fa);
|
||||
extern void LM_CreateSurfaceLightmap(msurface_t *surf);
|
||||
extern void LM_BeginBuildingLightmaps(gl4model_t *m);
|
||||
extern void LM_EndBuildingLightmaps(void);
|
||||
|
||||
// gl4_warp.c
|
||||
extern void GL4_EmitWaterPolys(msurface_t *fa);
|
||||
|
|
|
@ -201,7 +201,7 @@ Mod_LoadFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
}
|
||||
|
||||
count = l->filelen / sizeof(*in);
|
||||
out = Hunk_Alloc((count + EXTRA_LUMP_FACES) * sizeof(*out)); // extra for skybox
|
||||
out = Hunk_Alloc((count + EXTRA_LUMP_FACES) * sizeof(*out));
|
||||
|
||||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
@ -310,7 +310,7 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
}
|
||||
|
||||
count = l->filelen / sizeof(*in);
|
||||
out = Hunk_Alloc((count + EXTRA_LUMP_FACES) * sizeof(*out)); // extra for skybox
|
||||
out = Hunk_Alloc((count + EXTRA_LUMP_FACES) * sizeof(*out));
|
||||
|
||||
loadmodel->surfaces = out;
|
||||
loadmodel->numsurfaces = count;
|
||||
|
@ -623,7 +623,7 @@ Mod_ForName(const char *name, model_t *parent_model, qboolean crash)
|
|||
strcpy(mod->name, name);
|
||||
|
||||
/* load the file */
|
||||
modfilelen = Mod_LoadFile (mod->name, &buf);
|
||||
modfilelen = Mod_LoadFile(mod->name, &buf);
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
|
|
|
@ -226,10 +226,10 @@ void Vk_TextureMode( char *string );
|
|||
void Vk_LmapTextureMode( char *string );
|
||||
void Vk_ImageList_f (void);
|
||||
|
||||
void Vk_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa);
|
||||
void Vk_CreateSurfaceLightmap (msurface_t *surf);
|
||||
void Vk_EndBuildingLightmaps (void);
|
||||
void Vk_BeginBuildingLightmaps (model_t *m);
|
||||
void LM_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa);
|
||||
void LM_CreateSurfaceLightmap (msurface_t *surf);
|
||||
void LM_EndBuildingLightmaps (void);
|
||||
void LM_BeginBuildingLightmaps (model_t *m);
|
||||
|
||||
void Vk_InitImages (void);
|
||||
void Vk_ShutdownImages (void);
|
||||
|
|
|
@ -117,7 +117,7 @@ LM_AllocBlock(int w, int h, int *x, int *y)
|
|||
}
|
||||
|
||||
void
|
||||
Vk_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa)
|
||||
LM_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa)
|
||||
{
|
||||
int i, lnumverts;
|
||||
medge_t *pedges, *r_pedge;
|
||||
|
@ -203,7 +203,7 @@ Vk_BuildPolygonFromSurface(model_t *currentmodel, msurface_t *fa)
|
|||
}
|
||||
|
||||
void
|
||||
Vk_CreateSurfaceLightmap(msurface_t *surf)
|
||||
LM_CreateSurfaceLightmap(msurface_t *surf)
|
||||
{
|
||||
int smax, tmax;
|
||||
byte *base;
|
||||
|
@ -241,7 +241,7 @@ Vk_CreateSurfaceLightmap(msurface_t *surf)
|
|||
}
|
||||
|
||||
void
|
||||
Vk_BeginBuildingLightmaps(model_t *m)
|
||||
LM_BeginBuildingLightmaps(model_t *m)
|
||||
{
|
||||
static lightstyle_t lightstyles[MAX_LIGHTSTYLES];
|
||||
int i;
|
||||
|
@ -294,7 +294,7 @@ Vk_BeginBuildingLightmaps(model_t *m)
|
|||
}
|
||||
|
||||
void
|
||||
Vk_EndBuildingLightmaps(void)
|
||||
LM_EndBuildingLightmaps(void)
|
||||
{
|
||||
LM_UploadBlock();
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ calcTexinfoAndQFacesSize(const byte *mod_base, const lump_t *fl, const lump_t *t
|
|||
|
||||
// R_SubdivideSurface(out, loadmodel); /* cut up polygon for warps */
|
||||
// for each (pot. recursive) call to R_SubdividePolygon():
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(gl3_3D_vtx_t)
|
||||
// sizeof(mpoly_t) + ((numverts - 4) + 2) * sizeof(mvtx_t)
|
||||
|
||||
// this is tricky, how much is allocated depends on the size of the surface
|
||||
// which we don't know (we'd need the vertices etc to know, but we can't load
|
||||
|
@ -337,7 +337,7 @@ Mod_LoadFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
lminfos = NULL;
|
||||
}
|
||||
|
||||
Vk_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -421,16 +421,16 @@ Mod_LoadFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
Vk_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
Vk_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
Vk_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -463,7 +463,7 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
lminfos = NULL;
|
||||
}
|
||||
|
||||
Vk_BeginBuildingLightmaps(loadmodel);
|
||||
LM_BeginBuildingLightmaps(loadmodel);
|
||||
|
||||
for (surfnum = 0; surfnum < count; surfnum++, in++, out++)
|
||||
{
|
||||
|
@ -533,7 +533,7 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
}
|
||||
|
||||
R_SubdivideSurface(loadmodel->surfedges, loadmodel->vertexes,
|
||||
loadmodel->edges, out); // cut up polygon for warps
|
||||
loadmodel->edges, out); /* cut up polygon for warps */
|
||||
}
|
||||
|
||||
if (r_fixsurfsky->value)
|
||||
|
@ -547,16 +547,16 @@ Mod_LoadQFaces(model_t *loadmodel, const byte *mod_base, const lump_t *l,
|
|||
/* create lightmaps and polygons */
|
||||
if (!(out->texinfo->flags & (SURF_SKY | SURF_TRANSPARENT | SURF_WARP)))
|
||||
{
|
||||
Vk_CreateSurfaceLightmap(out);
|
||||
LM_CreateSurfaceLightmap(out);
|
||||
}
|
||||
|
||||
if (!(out->texinfo->flags & SURF_WARP))
|
||||
{
|
||||
Vk_BuildPolygonFromSurface(loadmodel, out);
|
||||
LM_BuildPolygonFromSurface(loadmodel, out);
|
||||
}
|
||||
}
|
||||
|
||||
Vk_EndBuildingLightmaps();
|
||||
LM_EndBuildingLightmaps();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue