Black decorations only in thumbnails
This commit is contained in:
parent
1fb544815f
commit
92f3ad5814
@ -1128,6 +1128,17 @@ void Renderer::render_parts()
|
||||
decg = (sim->parts[i].dcolour>>8)&0xFF;
|
||||
decb = (sim->parts[i].dcolour)&0xFF;
|
||||
|
||||
if(decorations_enable && blackDecorations)
|
||||
{
|
||||
if(deca < 250 || decr > 5 || decg > 5 || decb > 5)
|
||||
deca = 0;
|
||||
else
|
||||
{
|
||||
deca = 255;
|
||||
decr = decg = decb = 0;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
if (graphicscache[t].isready)
|
||||
{
|
||||
@ -1226,16 +1237,16 @@ void Renderer::render_parts()
|
||||
}
|
||||
|
||||
//Apply decoration colour
|
||||
if(!(colour_mode & ~COLOUR_GRAD))
|
||||
if(!(colour_mode & ~COLOUR_GRAD) && decorations_enable && deca)
|
||||
{
|
||||
if(!(pixel_mode & NO_DECO) && decorations_enable)
|
||||
if(!(pixel_mode & NO_DECO))
|
||||
{
|
||||
colr = (deca*decr + (255-deca)*colr) >> 8;
|
||||
colg = (deca*decg + (255-deca)*colg) >> 8;
|
||||
colb = (deca*decb + (255-deca)*colb) >> 8;
|
||||
}
|
||||
|
||||
if((pixel_mode & DECO_FIRE) && decorations_enable)
|
||||
if(pixel_mode & DECO_FIRE)
|
||||
{
|
||||
firer = (deca*decr + (255-deca)*firer) >> 8;
|
||||
fireg = (deca*decg + (255-deca)*fireg) >> 8;
|
||||
@ -2299,7 +2310,8 @@ Renderer::Renderer(Graphics * g, Simulation * sim):
|
||||
display_mode(0),
|
||||
render_mode(0),
|
||||
colour_mode(0),
|
||||
gridSize(0)
|
||||
gridSize(0),
|
||||
blackDecorations(false)
|
||||
{
|
||||
this->g = g;
|
||||
this->sim = sim;
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
bool gravityZonesEnabled;
|
||||
bool gravityFieldEnabled;
|
||||
int decorations_enable;
|
||||
bool blackDecorations;
|
||||
Simulation * sim;
|
||||
Graphics * g;
|
||||
gcache_item *graphicscache;
|
||||
|
@ -17,7 +17,8 @@ SaveRenderer::SaveRenderer(){
|
||||
g = new Graphics();
|
||||
sim = new Simulation();
|
||||
ren = new Renderer(g, sim);
|
||||
ren->decorations_enable = false;
|
||||
ren->decorations_enable = true;
|
||||
ren->blackDecorations = true;
|
||||
|
||||
#if defined(OGLR) || defined(OGLI)
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
@ -52,7 +53,8 @@ Thumbnail * SaveRenderer::Render(GameSave * save, bool decorations)
|
||||
|
||||
if(!sim->Load(save))
|
||||
{
|
||||
ren->decorations_enable = decorations;
|
||||
ren->decorations_enable = true;
|
||||
ren->blackDecorations = !decorations;
|
||||
#if defined(OGLR) || defined(OGLI)
|
||||
pixel * pData = NULL;
|
||||
unsigned char * texData = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user