mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-12 11:24:04 +02:00
Fix a bunch of LDTC and DTEC issues
Namely: LDTC GoL detection, ctype-drawing and HUD rendering, alongside DTEC HUD rendering.
This commit is contained in:
@@ -2180,9 +2180,9 @@ void GameView::OnDraw()
|
|||||||
if (wavelengthGfx)
|
if (wavelengthGfx)
|
||||||
sampleInfo << " (" << ctype << ")";
|
sampleInfo << " (" << ctype << ")";
|
||||||
// Some elements store extra LIFE info in upper bits of ctype, instead of tmp/tmp2
|
// Some elements store extra LIFE info in upper bits of ctype, instead of tmp/tmp2
|
||||||
else if (type == PT_CRAY || type == PT_DRAY || type == PT_CONV)
|
else if (type == PT_CRAY || type == PT_DRAY || type == PT_CONV || type == PT_LDTC)
|
||||||
sampleInfo << " (" << c->ElementResolve(TYP(ctype), ID(ctype)) << ")";
|
sampleInfo << " (" << c->ElementResolve(TYP(ctype), ID(ctype)) << ")";
|
||||||
else if (type == PT_CLNE || type == PT_BCLN || type == PT_PCLN || type == PT_PBCN)
|
else if (type == PT_CLNE || type == PT_BCLN || type == PT_PCLN || type == PT_PBCN || type == PT_DTEC)
|
||||||
sampleInfo << " (" << c->ElementResolve(ctype, sample.particle.tmp) << ")";
|
sampleInfo << " (" << c->ElementResolve(ctype, sample.particle.tmp) << ")";
|
||||||
else if (c->IsValidElement(ctype))
|
else if (c->IsValidElement(ctype))
|
||||||
sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")";
|
sampleInfo << " (" << c->ElementResolve(ctype, -1) << ")";
|
||||||
|
@@ -44,7 +44,7 @@ void Element::Element_LDTC()
|
|||||||
HighTemperatureTransition = NT;
|
HighTemperatureTransition = NT;
|
||||||
|
|
||||||
Update = &update;
|
Update = &update;
|
||||||
CtypeDraw = &Element::ctypeDrawVInTmp;
|
CtypeDraw = &Element::ctypeDrawVInCtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr int FLAG_INVERT_FILTER = 0x1;
|
constexpr int FLAG_INVERT_FILTER = 0x1;
|
||||||
@@ -123,7 +123,7 @@ static int update(UPDATE_FUNC_ARGS)
|
|||||||
|
|
||||||
// If ctype isn't set (no type restriction), or ctype matches what we found
|
// If ctype isn't set (no type restriction), or ctype matches what we found
|
||||||
// Can use .tmp2 flag to invert this
|
// Can use .tmp2 flag to invert this
|
||||||
bool matchesCtype = parts[i].ctype == TYP(rr) && (ctype != PT_LIFE || parts[ID(rr)].ctype == ctypeExtra);
|
bool matchesCtype = ctype == TYP(rr) && (ctype != PT_LIFE || parts[ID(rr)].ctype == ctypeExtra);
|
||||||
bool matchesFilter = !ctype || (invertFilter ^ (int)matchesCtype);
|
bool matchesFilter = !ctype || (invertFilter ^ (int)matchesCtype);
|
||||||
if (!matchesFilter)
|
if (!matchesFilter)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user