Preserve GoL deco in older saves; deco on builtin GoL no longer renders when decorations are off

This commit is contained in:
jacob1
2021-07-14 00:26:21 -04:00
parent 943f9d6c03
commit e80dc7b114
2 changed files with 5 additions and 3 deletions

View File

@@ -1335,7 +1335,8 @@ void GameSave::readOPS(char * data, int dataLength)
if (particles[newIndex].ctype >= 0 && particles[newIndex].ctype < NGOL)
{
particles[newIndex].tmp2 = particles[newIndex].tmp;
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour;
if (!particles[newIndex].dcolour)
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour;
particles[newIndex].tmp = builtinGol[particles[newIndex].ctype].colour2;
}
}
@@ -1902,7 +1903,8 @@ void GameSave::readPSv(char * saveDataChar, int dataLength)
particles[i-1].tmp = 0;
if (particles[i-1].ctype >= 0 && particles[i-1].ctype < NGOL)
{
particles[i-1].dcolour = builtinGol[particles[i-1].ctype].colour;
if (!particles[i-1].dcolour)
particles[i-1].dcolour = builtinGol[particles[i-1].ctype].colour;
particles[i-1].tmp = builtinGol[particles[i-1].ctype].colour2;
}
}

View File

@@ -60,7 +60,7 @@ static int graphics(GRAPHICS_FUNC_ARGS)
bool renderDeco = !ren->blackDecorations;
if (ruleset >= 0 && ruleset < NGOL)
{
if (!renderDeco)
if (!renderDeco || !ren->decorations_enable)
{
colour1 = builtinGol[ruleset].colour;
colour2 = builtinGol[ruleset].colour2;