Fix built-in GOL types
This commit is contained in:
parent
f57d503b41
commit
5a5eace691
@ -84,16 +84,19 @@ static int graphics(GRAPHICS_FUNC_ARGS)
|
||||
|
||||
static void create(ELEMENT_CREATE_FUNC_ARGS)
|
||||
{
|
||||
sim->parts[i].ctype = v & 0x1FFFFF;
|
||||
// * 0x200000: No need to look for colours, they'll be set later anyway.
|
||||
bool skipLookup = v & 0x200000;
|
||||
v &= 0x1FFFFF;
|
||||
sim->parts[i].ctype = v;
|
||||
if (v < NGOL)
|
||||
{
|
||||
sim->parts[i].dcolour = builtinGol[v].colour;
|
||||
sim->parts[i].tmp = builtinGol[v].colour2;
|
||||
v = builtinGol[v].ruleset;
|
||||
}
|
||||
else if (!(v & 0x200000)) // * 0x200000: No need to look for colours, they'll be set later anyway.
|
||||
else if (!skipLookup)
|
||||
{
|
||||
auto *cgol = sim->GetCustomGOLByRule(v & 0x1FFFFF);
|
||||
auto *cgol = sim->GetCustomGOLByRule(v);
|
||||
if (cgol)
|
||||
{
|
||||
sim->parts[i].dcolour = cgol->colour1;
|
||||
|
Loading…
Reference in New Issue
Block a user