// LordHavoc: HL sky textures are entirely different than quake
if (!loadmodel->brush.ishlbsp && !strncmp(tx->name, "sky", 3) && mtwidth == mtheight * 2)
{
- data = loadimagepixelsbgra(tx->name, false, false);
+ data = loadimagepixelsbgra(tx->name, false, false, r_texture_convertsRGB_skin.integer);
if (data && image_width == image_height * 2)
{
R_Q1BSP_LoadSplitSky(data, image_width, image_height, 4);
int i, j, k;
dheader_t *header;
dmodel_t *bm;
- mempool_t *mainmempool;
float dist, modelyawradius, modelradius;
msurface_t *surface;
int numshadowmeshtriangles;
mod->numframes = 2; // regular and alternate animation
mod->numskins = 1;
- mainmempool = mod->mempool;
-
// make a single combined shadow mesh to allow optimized shadow volume creation
numshadowmeshtriangles = 0;
for (j = 0, surface = loadmodel->data_surfaces;j < loadmodel->num_surfaces;j++, surface++)
static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump)
{
q3dlightmap_t *input_pointer;
- int i, j, k, count, power, power2, mask, endlightmap, mergewidth, mergeheight;
+ int i, j, k, count, power, power2, endlightmap, mergewidth, mergeheight;
unsigned char *c;
unsigned char *convertedpixels;
if (developer_loading.integer)
Con_Printf("Using external lightmaps\n");
FS_StripExtension(loadmodel->name, mapname, sizeof(mapname));
- inpixels[0] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, 0), false, false);
+ inpixels[0] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, 0), false, false, false);
if(!inpixels[0])
return;
for(count = 1; ; ++count)
{
- inpixels[count] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, count), false, false);
+ inpixels[count] = loadimagepixelsbgra(va("%s/lm_%04d", mapname, count), false, false, false);
if(!inpixels[count])
break; // we got all of them
if(image_width != size || image_height != size)
power = loadmodel->brushq3.num_lightmapmergepower;
power2 = power * 2;
- mask = (1 << power) - 1;
for (i = 0;i < count;i++)
{
// figure out which merged lightmap texture this fits into
{
VectorCopy(vertexhashdata[j].v, loadmodel->surfmesh.data_vertex3f + 3*j);
VectorCopy(vertexhashdata[j].vn, loadmodel->surfmesh.data_normal3f + 3*j);
- VectorCopy(vertexhashdata[j].vt, loadmodel->surfmesh.data_texcoordtexture2f + 2*j);
+ Vector2Copy(vertexhashdata[j].vt, loadmodel->surfmesh.data_texcoordtexture2f + 2*j);
}
// load the textures