Remove deprecated PIXPACK/RGB/R/G/B functions

This commit is contained in:
catsoften 2023-04-11 17:49:16 -04:00 committed by Tamás Bálint Misius
parent 5fc8770ee2
commit bc085705a8
216 changed files with 432 additions and 445 deletions

View File

@ -55,20 +55,22 @@ void ElementPopulationDebug::Draw()
auto barSize = int(count * scale - 0.5f);
int barX = bars;//*2;
g->draw_line(xStart+barX, yBottom+3, xStart+barX, yBottom+2, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour), 255);
auto colour = RGB<uint8_t>::Unpack(sim->elements[i].Colour);
g->draw_line(xStart+barX, yBottom+3, xStart+barX, yBottom+2, colour.Red, colour.Green, colour.Blue, 255);
if(sim->elementCount[i])
{
if(barSize > 256)
{
barSize = 256;
g->blendpixel(xStart+barX, yBottom-barSize-3, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour), 255);
g->blendpixel(xStart+barX, yBottom-barSize-5, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour), 255);
g->blendpixel(xStart+barX, yBottom-barSize-7, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour), 255);
g->blendpixel(xStart+barX, yBottom-barSize-3, colour.Red, colour.Green, colour.Blue, 255);
g->blendpixel(xStart+barX, yBottom-barSize-5, colour.Red, colour.Green, colour.Blue, 255);
g->blendpixel(xStart+barX, yBottom-barSize-7, colour.Red, colour.Green, colour.Blue, 255);
} else {
g->draw_line(xStart+barX, yBottom-barSize-3, xStart+barX, yBottom-barSize-2, 255, 255, 255, 180);
}
g->draw_line(xStart+barX, yBottom-barSize, xStart+barX, yBottom, PIXR(sim->elements[i].Colour), PIXG(sim->elements[i].Colour), PIXB(sim->elements[i].Colour), 255);
g->draw_line(xStart+barX, yBottom-barSize, xStart+barX, yBottom, colour.Red, colour.Green, colour.Blue, 255);
}
bars++;
}

View File

@ -485,11 +485,13 @@ std::vector<pixel> Graphics::Gradient(std::vector<GradientStop> stops, int resol
auto &left = stops[stop];
auto &right = stops[stop + 1];
auto f = (point - left.point) / (right.point - left.point);
table[i] = PIXRGB(
int(int(PIXR(left.color)) + (int(PIXR(right.color)) - int(PIXR(left.color))) * f),
int(int(PIXG(left.color)) + (int(PIXG(right.color)) - int(PIXG(left.color))) * f),
int(int(PIXB(left.color)) + (int(PIXB(right.color)) - int(PIXB(left.color))) * f)
);
auto leftColor = RGB<uint8_t>::Unpack(left.color);
auto rightColor = RGB<uint8_t>::Unpack(right.color);
table[i] = RGB<uint8_t>(
int(int(leftColor.Red ) + (int(rightColor.Red ) - int(leftColor.Red )) * f),
int(int(leftColor.Green) + (int(rightColor.Green) - int(leftColor.Green)) * f),
int(int(leftColor.Blue ) + (int(rightColor.Blue ) - int(leftColor.Blue )) * f)
).Pack();
}
}
return table;

View File

@ -16,32 +16,6 @@ constexpr int PIXELCHANNELS = 3;
// Use sparingly, e.g. when passing packed data to a third party library.
typedef uint32_t pixel_rgba;
[[deprecated("Use 0x######_rgb .Pack()")]]
constexpr pixel PIXPACK(int x)
{
return x;
}
[[deprecated("Use RGB(...).Pack()")]]
constexpr pixel PIXRGB(int r, int g, int b)
{
return (r << 16) | (g << 8) | b;
}
[[deprecated("Use RGB<uint8_t>::Unpack(...).Red")]]
constexpr int PIXR(pixel x)
{
return (x >> 16) & 0xFF;
}
[[deprecated("Use RGB<uint8_t>::Unpack(...).Green")]]
constexpr int PIXG(pixel x)
{
return (x >> 8) & 0xFF;
}
[[deprecated("Use RGB<uint8_t>::Unpack(...).Blue")]]
constexpr int PIXB(pixel x)
{
return x & 0xFF;
}
template<typename T, typename = std::enable_if_t<std::is_arithmetic_v<T>>>
struct RGBA;

View File

@ -209,9 +209,10 @@ void Renderer::render_parts()
//Defaults
pixel_mode = 0 | PMODE_FLAT;
cola = 255;
colr = PIXR(elements[t].Colour);
colg = PIXG(elements[t].Colour);
colb = PIXB(elements[t].Colour);
auto colour = RGB<uint8_t>::Unpack(elements[t].Colour);
colr = colour.Red;
colg = colour.Green;
colb = colour.Blue;
firer = fireg = fireb = firea = 0;
deca = (sim->parts[i].dcolour>>24)&0xFF;
@ -287,10 +288,10 @@ void Renderer::render_parts()
constexpr float min_temp = MIN_TEMP;
constexpr float max_temp = MAX_TEMP;
firea = 255;
auto color = heatTableAt(int((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024));
firer = colr = PIXR(color);
fireg = colg = PIXG(color);
fireb = colb = PIXB(color);
auto color = RGB<uint8_t>::Unpack(heatTableAt(int((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024)));
firer = colr = color.Red;
fireg = colg = color.Green;
fireb = colb = color.Blue;
cola = 255;
if(pixel_mode & (FIREMODE | PMODE_GLOW))
pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR;
@ -317,9 +318,9 @@ void Renderer::render_parts()
}
else if(colour_mode & COLOUR_BASC)
{
colr = PIXR(elements[t].Colour);
colg = PIXG(elements[t].Colour);
colb = PIXB(elements[t].Colour);
colr = colour.Red;
colg = colour.Green;
colb = colour.Blue;
pixel_mode = PMODE_FLAT;
}
@ -428,15 +429,17 @@ void Renderer::render_parts()
{
if (cplayer->fan)
{
colr = PIXR(0x8080FF);
colg = PIXG(0x8080FF);
colb = PIXB(0x8080FF);
auto fanColor = 0x8080FF_rgb;
colr = fanColor.Red;
colg = fanColor.Green;
colb = fanColor.Blue;
}
else if (cplayer->elem < PT_NUM && cplayer->elem > 0)
{
colr = PIXR(elements[cplayer->elem].Colour);
colg = PIXG(elements[cplayer->elem].Colour);
colb = PIXB(elements[cplayer->elem].Colour);
auto elemColour = RGB<uint8_t>::Unpack(elements[cplayer->elem].Colour);
colr = elemColour.Red;
colg = elemColour.Green;
colb = elemColour.Blue;
}
else
{
@ -524,7 +527,7 @@ void Renderer::render_parts()
}
if(pixel_mode & PMODE_FLAT)
{
vid[ny*(VIDXRES)+nx] = PIXRGB(colr,colg,colb);
vid[ny*(VIDXRES)+nx] = RGB<uint8_t>(colr, colg, colb).Pack();
}
if(pixel_mode & PMODE_BLEND)
{
@ -536,7 +539,7 @@ void Renderer::render_parts()
}
if(pixel_mode & PMODE_BLOB)
{
vid[ny*(VIDXRES)+nx] = PIXRGB(colr,colg,colb);
vid[ny*(VIDXRES)+nx] = RGB<uint8_t>(colr, colg, colb).Pack();
blendpixel(nx+1, ny, colr, colg, colb, 223);
blendpixel(nx-1, ny, colr, colg, colb, 223);
@ -823,29 +826,29 @@ void Renderer::draw_air()
float (*hv)[XCELLS] = sim->air->hv;
float (*vx)[XCELLS] = sim->air->vx;
float (*vy)[XCELLS] = sim->air->vy;
pixel c = 0;
auto c = RGB<uint8_t>(0, 0, 0);
for (y=0; y<YCELLS; y++)
for (x=0; x<XCELLS; x++)
{
if (display_mode & DISPLAY_AIRP)
{
if (pv[y][x] > 0.0f)
c = PIXRGB(clamp_flt(pv[y][x], 0.0f, 8.0f), 0, 0);//positive pressure is red!
c = RGB<uint8_t>(clamp_flt(pv[y][x], 0.0f, 8.0f), 0, 0);//positive pressure is red!
else
c = PIXRGB(0, 0, clamp_flt(-pv[y][x], 0.0f, 8.0f));//negative pressure is blue!
c = RGB<uint8_t>(0, 0, clamp_flt(-pv[y][x], 0.0f, 8.0f));//negative pressure is blue!
}
else if (display_mode & DISPLAY_AIRV)
{
c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red
c = RGB<uint8_t>(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red
clamp_flt(pv[y][x], 0.0f, 8.0f),//pressure adds green
clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue
}
else if (display_mode & DISPLAY_AIRH)
{
c = HeatToColour(hv[y][x]);
//c = PIXRGB(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red
c = RGB<uint8_t>::Unpack(HeatToColour(hv[y][x]));
//c = RGB<uint8_t>(clamp_flt(fabsf(vx[y][x]), 0.0f, 8.0f),//vx adds red
// clamp_flt(hv[y][x], 0.0f, 1600.0f),//heat adds green
// clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f));//vy adds blue
// clamp_flt(fabsf(vy[y][x]), 0.0f, 8.0f)).Pack();//vy adds blue
}
else if (display_mode & DISPLAY_AIRC)
{
@ -865,7 +868,7 @@ void Renderer::draw_air()
g=255;
if (b>255)
b=255;
c = PIXRGB(r, g, b);
c = RGB<uint8_t>(r, g, b);
}
else
{
@ -876,14 +879,18 @@ void Renderer::draw_air()
g=255;
if (b>255)
b=255;
c = PIXRGB(r, g, b);
c = RGB<uint8_t>(r, g, b);
}
}
if (findingElement)
c = PIXRGB(PIXR(c)/10,PIXG(c)/10,PIXB(c)/10);
{
c.Red /= 10;
c.Green /= 10;
c.Blue /= 10;
}
for (j=0; j<CELL; j++)//draws the colors
for (i=0; i<CELL; i++)
vid[(x*CELL+i) + (y*CELL+j)*(VIDXRES)] = c;
vid[(x*CELL+i) + (y*CELL+j)*(VIDXRES)] = c.Pack();
}
}
@ -897,15 +904,22 @@ void Renderer::DrawWalls()
if (wt >= UI_WALLCOUNT)
continue;
unsigned char powered = sim->emap[y][x];
pixel pc = PIXPACK(sim->wtypes[wt].colour);
pixel gc = PIXPACK(sim->wtypes[wt].eglow);
auto prgb = RGB<uint8_t>::Unpack(sim->wtypes[wt].colour);
auto grgb = RGB<uint8_t>::Unpack(sim->wtypes[wt].eglow);
if (findingElement)
{
pc = PIXRGB(PIXR(pc)/10,PIXG(pc)/10,PIXB(pc)/10);
gc = PIXRGB(PIXR(gc)/10,PIXG(gc)/10,PIXB(gc)/10);
prgb.Red /= 10;
prgb.Green /= 10;
prgb.Blue /= 10;
grgb.Red /= 10;
grgb.Green /= 10;
grgb.Blue /= 10;
}
pixel pc = prgb.Pack();
pixel gc = grgb.Pack();
switch (sim->wtypes[wt].drawstyle)
{
case 0:
@ -935,7 +949,7 @@ void Renderer::DrawWalls()
if (!((y*CELL+j)%2) && !((x*CELL+i)%2))
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = pc;
else
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x808080);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x808080_rgb .Pack();
}
}
else if (wt == WL_EHOLE)
@ -944,16 +958,16 @@ void Renderer::DrawWalls()
{
for (int j = 0; j < CELL; j++)
for (int i = 0; i < CELL; i++)
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x242424);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x242424_rgb .Pack();
for (int j = 0; j < CELL; j += 2)
for (int i = 0; i < CELL; i += 2)
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x000000);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x000000_rgb .Pack();
}
else
{
for (int j = 0; j < CELL; j += 2)
for (int i =0; i < CELL; i += 2)
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x242424);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x242424_rgb .Pack();
}
}
else if (wt == WL_STREAM)
@ -1023,7 +1037,7 @@ void Renderer::DrawWalls()
else if (i == j+1 || (i == 0 && j == CELL-1))
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = gc;
else
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x202020);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x202020_rgb .Pack();
break;
}
@ -1041,14 +1055,14 @@ void Renderer::DrawWalls()
for (int j = 0; j < CELL; j++)
for (int i =0; i < CELL; i++)
if (i&j&1)
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
}
else
{
for (int j = 0; j < CELL; j++)
for (int i = 0; i < CELL; i++)
if (!(i&j&1))
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
}
}
else if (wt == WL_WALLELEC)
@ -1057,7 +1071,7 @@ void Renderer::DrawWalls()
for (int i =0; i < CELL; i++)
{
if (!((y*CELL+j)%2) && !((x*CELL+i)%2))
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
else
drawblob((x*CELL+i), (y*CELL+j), 0x80, 0x80, 0x80);
}
@ -1072,7 +1086,7 @@ void Renderer::DrawWalls()
for (int j = 0; j < CELL; j += 2)
for (int i = 0; i < CELL; i += 2)
// looks bad if drawing black blobs
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x000000);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x000000_rgb .Pack();
}
else
{
@ -1085,28 +1099,28 @@ void Renderer::DrawWalls()
case 1:
for (int j = 0; j < CELL; j += 2)
for (int i = (j>>1)&1; i < CELL; i += 2)
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
break;
case 2:
for (int j = 0; j < CELL; j += 2)
for (int i = 0; i < CELL; i+=2)
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
break;
case 3:
for (int j = 0; j < CELL; j++)
for (int i = 0; i < CELL; i++)
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
break;
case 4:
for (int j = 0; j < CELL; j++)
for (int i = 0; i < CELL; i++)
if (i == j)
drawblob((x*CELL+i), (y*CELL+j), PIXR(pc), PIXG(pc), PIXB(pc));
drawblob((x*CELL+i), (y*CELL+j), prgb.Red, prgb.Green, prgb.Blue);
else if (i == j+1 || (i == 0 && j == CELL-1))
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = gc;
else
// looks bad if drawing black blobs
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = PIXPACK(0x202020);
vid[(y*CELL+j)*(VIDXRES)+(x*CELL+i)] = 0x202020_rgb .Pack();
break;
}
}
@ -1114,11 +1128,11 @@ void Renderer::DrawWalls()
if (sim->wtypes[wt].eglow && powered)
{
// glow if electrified
pixel glow = sim->wtypes[wt].eglow;
auto glow = RGB<uint8_t>::Unpack(sim->wtypes[wt].eglow);
int alpha = 255;
int cr = (alpha*PIXR(glow) + (255-alpha)*fire_r[y/CELL][x/CELL]) >> 8;
int cg = (alpha*PIXG(glow) + (255-alpha)*fire_g[y/CELL][x/CELL]) >> 8;
int cb = (alpha*PIXB(glow) + (255-alpha)*fire_b[y/CELL][x/CELL]) >> 8;
int cr = (alpha*glow.Red + (255-alpha)*fire_r[y/CELL][x/CELL]) >> 8;
int cg = (alpha*glow.Green + (255-alpha)*fire_g[y/CELL][x/CELL]) >> 8;
int cb = (alpha*glow.Blue + (255-alpha)*fire_b[y/CELL][x/CELL]) >> 8;
if (cr > 255)
cr = 255;
@ -1177,6 +1191,9 @@ int HeatToColour(float temp)
{
constexpr float min_temp = MIN_TEMP;
constexpr float max_temp = MAX_TEMP;
auto color = Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024));
return PIXRGB((int)(PIXR(color)*0.7f), (int)(PIXG(color)*0.7f), (int)(PIXB(color)*0.7f));
auto color = RGB<uint8_t>::Unpack(Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024)));
color.Red *= 0.7f;
color.Green *= 0.7f;
color.Blue *= 0.7f;
return color.Pack();
}

View File

@ -18,19 +18,16 @@ void Renderer::RenderBegin()
if(display_mode & DISPLAY_PERS)
{
int i,r,g,b;
for (i = 0; i < VIDXRES*YRES; i++)
for (int i = 0; i < VIDXRES*YRES; i++)
{
r = PIXR(vid[i]);
g = PIXG(vid[i]);
b = PIXB(vid[i]);
if (r>0)
r--;
if (g>0)
g--;
if (b>0)
b--;
persistentVid[i] = PIXRGB(r,g,b);
auto rgb = RGB<uint8_t>::Unpack(vid[i]);
if (rgb.Red > 0)
rgb.Red--;
if (rgb.Green > 0)
rgb.Green--;
if (rgb.Blue > 0)
rgb.Blue--;
persistentVid[i] = rgb.Pack();
}
}
@ -126,7 +123,6 @@ void Renderer::render_gravlensing(pixel * source)
{
int nx, ny, rx, ry, gx, gy, bx, by, co;
int r, g, b;
pixel t;
pixel *src = source;
pixel *dst = vid;
if (!dst)
@ -144,17 +140,17 @@ void Renderer::render_gravlensing(pixel * source)
by = (int)(ny-sim->gravy[co]+0.5f);
if(rx >= 0 && rx < XRES && ry >= 0 && ry < YRES && gx >= 0 && gx < XRES && gy >= 0 && gy < YRES && bx >= 0 && bx < XRES && by >= 0 && by < YRES)
{
t = dst[ny*(VIDXRES)+nx];
r = PIXR(src[ry*(VIDXRES)+rx]) + PIXR(t);
g = PIXG(src[gy*(VIDXRES)+gx]) + PIXG(t);
b = PIXB(src[by*(VIDXRES)+bx]) + PIXB(t);
if (r>255)
r = 255;
if (g>255)
g = 255;
if (b>255)
b = 255;
dst[ny*(VIDXRES)+nx] = PIXRGB(r,g,b);
auto t = RGB<uint8_t>::Unpack(dst[ny*(VIDXRES)+nx]);
t.Red += RGB<uint8_t>::Unpack(src[ry*(VIDXRES)+rx]).Red;
t.Green += RGB<uint8_t>::Unpack(src[gy*(VIDXRES)+gx]).Green;
t.Blue += RGB<uint8_t>::Unpack(src[by*(VIDXRES)+bx]).Blue;
if (t.Red > 255)
t.Red = 255;
if (t.Green > 255)
t.Green = 255;
if (t.Blue > 255)
t.Blue = 255;
dst[ny*(VIDXRES)+nx] = t.Pack();
}
}
}

View File

@ -54,11 +54,11 @@ void DecorationTool::DrawRect(Simulation * sim, Brush const &brush, ui::Point po
void DecorationTool::DrawFill(Simulation * sim, Brush const &brush, ui::Point position)
{
pixel loc = ren.vid[position.X+position.Y*WINDOWW];
auto loc = RGB<uint8_t>::Unpack(ren.vid[position.X+position.Y*WINDOWW]);
if (ToolID == DECO_CLEAR)
// TODO: this is actually const-correct
sim->ApplyDecorationFill(const_cast<Renderer *>(&ren), position.X, position.Y, 0, 0, 0, 0, PIXR(loc), PIXG(loc), PIXB(loc));
sim->ApplyDecorationFill(const_cast<Renderer *>(&ren), position.X, position.Y, 0, 0, 0, 0, loc.Red, loc.Green, loc.Blue);
else
sim->ApplyDecorationFill(const_cast<Renderer *>(&ren), position.X, position.Y, Colour.Red, Colour.Green, Colour.Blue, Colour.Alpha, PIXR(loc), PIXG(loc), PIXB(loc));
sim->ApplyDecorationFill(const_cast<Renderer *>(&ren), position.X, position.Y, Colour.Red, Colour.Green, Colour.Blue, Colour.Alpha, loc.Red, loc.Green, loc.Blue);
}

View File

@ -68,8 +68,8 @@ void Slider::SetColour(Colour col1, Colour col2)
this->col1 = col1;
this->col2 = col2;
bgGradient = Graphics::Gradient({
{ pixel(PIXRGB(col1.Red, col1.Green, col1.Blue)), 0.f },
{ pixel(PIXRGB(col2.Red, col2.Green, col2.Blue)), 1.f },
{ RGB<uint8_t>(col1.Red, col1.Green, col1.Blue).Pack(), 0.f },
{ RGB<uint8_t>(col2.Red, col2.Green, col2.Blue).Pack(), 1.f },
}, Size.X-7);
}
@ -112,8 +112,8 @@ void Slider::Draw(const Point& screenPos)
{
for (int i = 3; i < Size.X-7; i++)
{
auto color = bgGradient[i - 3];
g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, PIXR(color), PIXG(color), PIXB(color), 255);
auto color = RGB<uint8_t>::Unpack(bgGradient[i - 3]);
g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, color.Red, color.Green, color.Blue, 255);
}
}
}

View File

@ -437,8 +437,8 @@ void OptionsView::UpdateAmbientAirTempPreview(float airTemp, bool isValid)
{
if (isValid)
{
int c = HeatToColour(airTemp);
ambientAirTempPreview->Appearance.BackgroundInactive = ui::Colour(PIXR(c), PIXG(c), PIXB(c));
auto c = RGB<uint8_t>::Unpack(HeatToColour(airTemp));
ambientAirTempPreview->Appearance.BackgroundInactive = ui::Colour(c.Red, c.Green, c.Blue);
ambientAirTempPreview->SetText("");
}
else

View File

@ -1853,36 +1853,33 @@ int LuaScriptInterface::simulation_decoBox(lua_State * l)
int LuaScriptInterface::simulation_decoColor(lua_State * l)
{
int acount = lua_gettop(l);
unsigned int color;
RGBA<uint8_t> color(0, 0, 0, 0);
if (acount == 0)
{
ui::Colour tempColor = luacon_model->GetColourSelectorColour();
unsigned int color = (tempColor.Alpha << 24) | PIXRGB(tempColor.Red, tempColor.Green, tempColor.Blue);
unsigned int color = (tempColor.Alpha << 24) | RGB<uint8_t>(tempColor.Red, tempColor.Green, tempColor.Blue).Pack();
lua_pushnumber(l, color);
return 1;
}
else if (acount == 1)
color = (unsigned int)luaL_optnumber(l, 1, 0xFFFF0000);
color = RGBA<uint8_t>::Unpack(luaL_optnumber(l, 1, 0xFFFF0000));
else
{
int r, g, b, a;
r = luaL_optint(l, 1, 255);
g = luaL_optint(l, 2, 255);
b = luaL_optint(l, 3, 255);
a = luaL_optint(l, 4, 255);
color.Red = luaL_optint(l, 1, 255);
color.Green = luaL_optint(l, 2, 255);
color.Blue = luaL_optint(l, 3, 255);
color.Alpha = luaL_optint(l, 4, 255);
if (r < 0) r = 0;
if (r > 255) r = 255;
if (g < 0) g = 0;
if (g > 255) g = 255;
if (b < 0) b = 0;
if (b > 255) b = 255;
if (a < 0) a = 0;
if (a > 255) a = 255;
color = (a << 24) + PIXRGB(r, g, b);
if (color.Red < 0) color.Red = 0;
if (color.Red > 255) color.Red = 255;
if (color.Green < 0) color.Green = 0;
if (color.Green > 255) color.Green = 255;
if (color.Blue < 0) color.Blue = 0;
if (color.Blue > 255) color.Blue = 255;
if (color.Alpha < 0) color.Alpha = 0;
if (color.Alpha > 255) color.Alpha = 255;
}
luacon_model->SetColourSelectorColour(ui::Colour(PIXR(color), PIXG(color), PIXB(color), color >> 24));
luacon_model->SetColourSelectorColour(ui::Colour(color.Red, color.Green, color.Blue, color.Alpha));
return 0;
}
@ -1899,8 +1896,8 @@ int LuaScriptInterface::simulation_floodDeco(lua_State * l)
return luaL_error(l, "coordinates out of range (%d,%d)", x, y);
// hilariously broken, intersects with console and all Lua graphics
pixel loc = luacon_ren->vid[x + y * WINDOWW];
luacon_sim->ApplyDecorationFill(luacon_ren, x, y, r, g, b, a, PIXR(loc), PIXG(loc), PIXB(loc));
auto loc = RGB<uint8_t>::Unpack(luacon_ren->vid[x + y * WINDOWW]);
luacon_sim->ApplyDecorationFill(luacon_ren, x, y, r, g, b, a, loc.Red, loc.Green, loc.Blue);
return 0;
}

View File

@ -702,10 +702,10 @@ void Simulation::ApplyDecorationBox(int x1, int y1, int x2, int y2, int colR, in
bool Simulation::ColorCompare(Renderer *ren, int x, int y, int replaceR, int replaceG, int replaceB)
{
pixel pix = ren->vid[x+y*WINDOWW];
int r = PIXR(pix);
int g = PIXG(pix);
int b = PIXB(pix);
auto pix = RGB<uint8_t>::Unpack(ren->vid[x+y*WINDOWW]);
int r = pix.Red;
int g = pix.Green;
int b = pix.Blue;
int diff = std::abs(replaceR-r) + std::abs(replaceG-g) + std::abs(replaceB-b);
return diff < 15;
}

View File

@ -4,7 +4,7 @@
Element::Element():
Identifier("DEFAULT_INVALID"),
Name(""),
Colour(PIXPACK(0xFF00FF)),
Colour(0xFF00FF_rgb .Pack()),
MenuVisible(0),
MenuSection(0),
Enabled(0),

View File

@ -10,7 +10,7 @@
SimTool::SimTool():
Identifier("DEFAULT_TOOL_INVALID"),
Name(""),
Colour(PIXPACK(0xFFFFFF)),
Colour(0xFFFFFF_rgb .Pack()),
Description("NULL Tool, does NOTHING")
{
}

View File

@ -2134,10 +2134,11 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
if((elements[t].Properties & TYPE_PART) && pretty_powder)
{
int colr, colg, colb;
auto sandcolourToUse = p == -2 ? sandcolour_interface : sandcolour;
colr = PIXR(elements[t].Colour) + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
colg = PIXG(elements[t].Colour) + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
colb = PIXB(elements[t].Colour) + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
int sandcolourToUse = p == -2 ? sandcolour_interface : sandcolour;
auto colour = RGB<uint8_t>::Unpack(elements[t].Colour);
colr = colour.Red + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
colg = colour.Green + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
colb = colour.Blue + int(sandcolourToUse * 1.3) + rng.between(-20, 20) + rng.between(-15, 15);
colr = colr>255 ? 255 : (colr<0 ? 0 : colr);
colg = colg>255 ? 255 : (colg<0 ? 0 : colg);
colb = colb>255 ? 255 : (colb<0 ? 0 : colb);

View File

@ -21,55 +21,55 @@ const BuiltinGOL builtinGol[NGOL] = {
// * the ruleset constants below look 20-bit, but rulesets actually consist of 21
// bits of data; bit 20 just happens to not be set for any of the built-in types,
// as none of them have 10 or more states
{ "GOL", GT_GOL , 0x0080C, PIXPACK(0x0CAC00), PIXPACK(0x0CAC00), NGT_GOL, String("Game Of Life: Begin 3/Stay 23") },
{ "HLIF", GT_HLIF, 0x0480C, PIXPACK(0xFF0000), PIXPACK(0xFF0000), NGT_HLIF, String("High Life: B36/S23") },
{ "ASIM", GT_ASIM, 0x038F0, PIXPACK(0x0000FF), PIXPACK(0x0000FF), NGT_ASIM, String("Assimilation: B345/S4567") },
{ "2X2", GT_2x2 , 0x04826, PIXPACK(0xFFFF00), PIXPACK(0xFFFF00), NGT_2x2, String("2X2: B36/S125") },
{ "DANI", GT_DANI, 0x1C9D8, PIXPACK(0x00FFFF), PIXPACK(0x00FFFF), NGT_DANI, String("Day and Night: B3678/S34678") },
{ "AMOE", GT_AMOE, 0x0A92A, PIXPACK(0xFF00FF), PIXPACK(0xFF00FF), NGT_AMOE, String("Amoeba: B357/S1358") },
{ "MOVE", GT_MOVE, 0x14834, PIXPACK(0xFFFFFF), PIXPACK(0xFFFFFF), NGT_MOVE, String("'Move' particles. Does not move things.. it is a life type: B368/S245") },
{ "PGOL", GT_PGOL, 0x0A90C, PIXPACK(0xE05010), PIXPACK(0xE05010), NGT_PGOL, String("Pseudo Life: B357/S238") },
{ "DMOE", GT_DMOE, 0x1E9E0, PIXPACK(0x500000), PIXPACK(0x500000), NGT_DMOE, String("Diamoeba: B35678/S5678") },
{ "3-4", GT_34 , 0x01818, PIXPACK(0x500050), PIXPACK(0x500050), NGT_34, String("3-4: B34/S34") },
{ "LLIF", GT_LLIF, 0x03820, PIXPACK(0x505050), PIXPACK(0x505050), NGT_LLIF, String("Long Life: B345/S5") },
{ "STAN", GT_STAN, 0x1C9EC, PIXPACK(0x5000FF), PIXPACK(0x5000FF), NGT_STAN, String("Stains: B3678/S235678") },
{ "SEED", GT_SEED, 0x00400, PIXPACK(0xFBEC7D), PIXPACK(0xFBEC7D), NGT_SEED, String("Seeds: B2/S") },
{ "MAZE", GT_MAZE, 0x0083E, PIXPACK(0xA8E4A0), PIXPACK(0xA8E4A0), NGT_MAZE, String("Maze: B3/S12345") },
{ "COAG", GT_COAG, 0x189EC, PIXPACK(0x9ACD32), PIXPACK(0x9ACD32), NGT_COAG, String("Coagulations: B378/S235678") },
{ "WALL", GT_WALL, 0x1F03C, PIXPACK(0x0047AB), PIXPACK(0x0047AB), NGT_WALL, String("Walled cities: B45678/S2345") },
{ "GNAR", GT_GNAR, 0x00202, PIXPACK(0xE5B73B), PIXPACK(0xE5B73B), NGT_GNAR, String("Gnarl: B1/S1") },
{ "REPL", GT_REPL, 0x0AAAA, PIXPACK(0x259588), PIXPACK(0x259588), NGT_REPL, String("Replicator: B1357/S1357") },
{ "MYST", GT_MYST, 0x139E1, PIXPACK(0x0C3C00), PIXPACK(0x0C3C00), NGT_MYST, String("Mystery: B3458/S05678") },
{ "LOTE", GT_LOTE, 0x48938, PIXPACK(0xFF0000), PIXPACK(0xFFFF00), NGT_LOTE, String("Living on the Edge: B37/S3458/4") },
{ "FRG2", GT_FRG2, 0x20816, PIXPACK(0x006432), PIXPACK(0x00FF5A), NGT_FRG2, String("Like Frogs rule: B3/S124/3") },
{ "STAR", GT_STAR, 0x98478, PIXPACK(0x000040), PIXPACK(0x0000E6), NGT_STAR, String("Like Star Wars rule: B278/S3456/6") },
{ "FROG", GT_FROG, 0x21806, PIXPACK(0x006400), PIXPACK(0x00FF00), NGT_FROG, String("Frogs: B34/S12/3") },
{ "BRAN", GT_BRAN, 0x25440, PIXPACK(0xFFFF00), PIXPACK(0x969600), NGT_BRAN, String("Brian 6: B246/S6/3" )}
{ "GOL", GT_GOL , 0x0080C, 0x0CAC00_rgb .Pack(), 0x0CAC00_rgb .Pack(), NGT_GOL, String("Game Of Life: Begin 3/Stay 23") },
{ "HLIF", GT_HLIF, 0x0480C, 0xFF0000_rgb .Pack(), 0xFF0000_rgb .Pack(), NGT_HLIF, String("High Life: B36/S23") },
{ "ASIM", GT_ASIM, 0x038F0, 0x0000FF_rgb .Pack(), 0x0000FF_rgb .Pack(), NGT_ASIM, String("Assimilation: B345/S4567") },
{ "2X2", GT_2x2 , 0x04826, 0xFFFF00_rgb .Pack(), 0xFFFF00_rgb .Pack(), NGT_2x2, String("2X2: B36/S125") },
{ "DANI", GT_DANI, 0x1C9D8, 0x00FFFF_rgb .Pack(), 0x00FFFF_rgb .Pack(), NGT_DANI, String("Day and Night: B3678/S34678") },
{ "AMOE", GT_AMOE, 0x0A92A, 0xFF00FF_rgb .Pack(), 0xFF00FF_rgb .Pack(), NGT_AMOE, String("Amoeba: B357/S1358") },
{ "MOVE", GT_MOVE, 0x14834, 0xFFFFFF_rgb .Pack(), 0xFFFFFF_rgb .Pack(), NGT_MOVE, String("'Move' particles. Does not move things.. it is a life type: B368/S245") },
{ "PGOL", GT_PGOL, 0x0A90C, 0xE05010_rgb .Pack(), 0xE05010_rgb .Pack(), NGT_PGOL, String("Pseudo Life: B357/S238") },
{ "DMOE", GT_DMOE, 0x1E9E0, 0x500000_rgb .Pack(), 0x500000_rgb .Pack(), NGT_DMOE, String("Diamoeba: B35678/S5678") },
{ "3-4", GT_34 , 0x01818, 0x500050_rgb .Pack(), 0x500050_rgb .Pack(), NGT_34, String("3-4: B34/S34") },
{ "LLIF", GT_LLIF, 0x03820, 0x505050_rgb .Pack(), 0x505050_rgb .Pack(), NGT_LLIF, String("Long Life: B345/S5") },
{ "STAN", GT_STAN, 0x1C9EC, 0x5000FF_rgb .Pack(), 0x5000FF_rgb .Pack(), NGT_STAN, String("Stains: B3678/S235678") },
{ "SEED", GT_SEED, 0x00400, 0xFBEC7D_rgb .Pack(), 0xFBEC7D_rgb .Pack(), NGT_SEED, String("Seeds: B2/S") },
{ "MAZE", GT_MAZE, 0x0083E, 0xA8E4A0_rgb .Pack(), 0xA8E4A0_rgb .Pack(), NGT_MAZE, String("Maze: B3/S12345") },
{ "COAG", GT_COAG, 0x189EC, 0x9ACD32_rgb .Pack(), 0x9ACD32_rgb .Pack(), NGT_COAG, String("Coagulations: B378/S235678") },
{ "WALL", GT_WALL, 0x1F03C, 0x0047AB_rgb .Pack(), 0x0047AB_rgb .Pack(), NGT_WALL, String("Walled cities: B45678/S2345") },
{ "GNAR", GT_GNAR, 0x00202, 0xE5B73B_rgb .Pack(), 0xE5B73B_rgb .Pack(), NGT_GNAR, String("Gnarl: B1/S1") },
{ "REPL", GT_REPL, 0x0AAAA, 0x259588_rgb .Pack(), 0x259588_rgb .Pack(), NGT_REPL, String("Replicator: B1357/S1357") },
{ "MYST", GT_MYST, 0x139E1, 0x0C3C00_rgb .Pack(), 0x0C3C00_rgb .Pack(), NGT_MYST, String("Mystery: B3458/S05678") },
{ "LOTE", GT_LOTE, 0x48938, 0xFF0000_rgb .Pack(), 0xFFFF00_rgb .Pack(), NGT_LOTE, String("Living on the Edge: B37/S3458/4") },
{ "FRG2", GT_FRG2, 0x20816, 0x006432_rgb .Pack(), 0x00FF5A_rgb .Pack(), NGT_FRG2, String("Like Frogs rule: B3/S124/3") },
{ "STAR", GT_STAR, 0x98478, 0x000040_rgb .Pack(), 0x0000E6_rgb .Pack(), NGT_STAR, String("Like Star Wars rule: B278/S3456/6") },
{ "FROG", GT_FROG, 0x21806, 0x006400_rgb .Pack(), 0x00FF00_rgb .Pack(), NGT_FROG, String("Frogs: B34/S12/3") },
{ "BRAN", GT_BRAN, 0x25440, 0xFFFF00_rgb .Pack(), 0x969600_rgb .Pack(), NGT_BRAN, String("Brian 6: B246/S6/3" )}
};
std::vector<wall_type> LoadWalls()
{
return
std::vector<wall_type>{
{PIXPACK(0x808080), PIXPACK(0x000000), 0, Renderer::WallIcon, String("ERASE"), "DEFAULT_WL_ERASE", String("Erases walls.")},
{PIXPACK(0xC0C0C0), PIXPACK(0x101010), 0, Renderer::WallIcon, String("CONDUCTIVE WALL"), "DEFAULT_WL_CNDTW", String("Blocks everything. Conductive.")},
{PIXPACK(0x808080), PIXPACK(0x808080), 0, Renderer::WallIcon, String("EWALL"), "DEFAULT_WL_EWALL", String("E-Wall. Becomes transparent when electricity is connected.")},
{PIXPACK(0xFF8080), PIXPACK(0xFF2008), 1, Renderer::WallIcon, String("DETECTOR"), "DEFAULT_WL_DTECT", String("Detector. Generates electricity when a particle is inside.")},
{PIXPACK(0x808080), PIXPACK(0x000000), 0, Renderer::WallIcon, String("STREAMLINE"), "DEFAULT_WL_STRM", String("Streamline. Set start point of a streamline.")},
{PIXPACK(0x8080FF), PIXPACK(0x000000), 1, Renderer::WallIcon, String("FAN"), "DEFAULT_WL_FAN", String("Fan. Accelerates air. Use the line tool to set direction and strength.")},
{PIXPACK(0xC0C0C0), PIXPACK(0x101010), 2, Renderer::WallIcon, String("LIQUID WALL"), "DEFAULT_WL_LIQD", String("Allows liquids, blocks all other particles. Conductive.")},
{PIXPACK(0x808080), PIXPACK(0x000000), 1, Renderer::WallIcon, String("ABSORB WALL"), "DEFAULT_WL_ABSRB", String("Absorbs particles but lets air currents through.")},
{PIXPACK(0x808080), PIXPACK(0x000000), 3, Renderer::WallIcon, String("WALL"), "DEFAULT_WL_WALL", String("Basic wall, blocks everything.")},
{PIXPACK(0x3C3C3C), PIXPACK(0x000000), 1, Renderer::WallIcon, String("AIRONLY WALL"), "DEFAULT_WL_AIR", String("Allows air, but blocks all particles.")},
{PIXPACK(0x575757), PIXPACK(0x000000), 1, Renderer::WallIcon, String("POWDER WALL"), "DEFAULT_WL_POWDR", String("Allows powders, blocks all other particles.")},
{PIXPACK(0xFFFF22), PIXPACK(0x101010), 2, Renderer::WallIcon, String("CONDUCTOR"), "DEFAULT_WL_CNDTR", String("Conductor. Allows all particles to pass through and conducts electricity.")},
{PIXPACK(0x242424), PIXPACK(0x101010), 0, Renderer::WallIcon, String("EHOLE"), "DEFAULT_WL_EHOLE", String("E-Hole. absorbs particles, releases them when powered.")},
{PIXPACK(0x579777), PIXPACK(0x000000), 1, Renderer::WallIcon, String("GAS WALL"), "DEFAULT_WL_GAS", String("Allows gases, blocks all other particles.")},
{PIXPACK(0xFFEE00), PIXPACK(0xAA9900), 4, Renderer::WallIcon, String("GRAVITY WALL"), "DEFAULT_WL_GRVTY", String("Gravity wall. Newtonian Gravity has no effect inside a box drawn with this.")},
{PIXPACK(0xFFAA00), PIXPACK(0xAA5500), 4, Renderer::WallIcon, String("ENERGY WALL"), "DEFAULT_WL_ENRGY", String("Allows energy particles, blocks all other particles.")},
{PIXPACK(0xDCDCDC), PIXPACK(0x000000), 1, Renderer::WallIcon, String("AIRBLOCK WALL"), "DEFAULT_WL_NOAIR", String("Allows all particles, but blocks air.")},
{PIXPACK(0x808080), PIXPACK(0x000000), 0, Renderer::WallIcon, String("ERASEALL"), "DEFAULT_WL_ERASEA", String("Erases walls, particles, and signs.")},
{PIXPACK(0x800080), PIXPACK(0x000000), 0, Renderer::WallIcon, String("STASIS WALL"), "DEFAULT_WL_STASIS", String("Freezes particles inside the wall in place until powered.")},
{0x808080_rgb .Pack(), 0x000000_rgb .Pack(), 0, Renderer::WallIcon, String("ERASE"), "DEFAULT_WL_ERASE", String("Erases walls.")},
{0xC0C0C0_rgb .Pack(), 0x101010_rgb .Pack(), 0, Renderer::WallIcon, String("CONDUCTIVE WALL"), "DEFAULT_WL_CNDTW", String("Blocks everything. Conductive.")},
{0x808080_rgb .Pack(), 0x808080_rgb .Pack(), 0, Renderer::WallIcon, String("EWALL"), "DEFAULT_WL_EWALL", String("E-Wall. Becomes transparent when electricity is connected.")},
{0xFF8080_rgb .Pack(), 0xFF2008_rgb .Pack(), 1, Renderer::WallIcon, String("DETECTOR"), "DEFAULT_WL_DTECT", String("Detector. Generates electricity when a particle is inside.")},
{0x808080_rgb .Pack(), 0x000000_rgb .Pack(), 0, Renderer::WallIcon, String("STREAMLINE"), "DEFAULT_WL_STRM", String("Streamline. Set start point of a streamline.")},
{0x8080FF_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("FAN"), "DEFAULT_WL_FAN", String("Fan. Accelerates air. Use the line tool to set direction and strength.")},
{0xC0C0C0_rgb .Pack(), 0x101010_rgb .Pack(), 2, Renderer::WallIcon, String("LIQUID WALL"), "DEFAULT_WL_LIQD", String("Allows liquids, blocks all other particles. Conductive.")},
{0x808080_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("ABSORB WALL"), "DEFAULT_WL_ABSRB", String("Absorbs particles but lets air currents through.")},
{0x808080_rgb .Pack(), 0x000000_rgb .Pack(), 3, Renderer::WallIcon, String("WALL"), "DEFAULT_WL_WALL", String("Basic wall, blocks everything.")},
{0x3C3C3C_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("AIRONLY WALL"), "DEFAULT_WL_AIR", String("Allows air, but blocks all particles.")},
{0x575757_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("POWDER WALL"), "DEFAULT_WL_POWDR", String("Allows powders, blocks all other particles.")},
{0xFFFF22_rgb .Pack(), 0x101010_rgb .Pack(), 2, Renderer::WallIcon, String("CONDUCTOR"), "DEFAULT_WL_CNDTR", String("Conductor. Allows all particles to pass through and conducts electricity.")},
{0x242424_rgb .Pack(), 0x101010_rgb .Pack(), 0, Renderer::WallIcon, String("EHOLE"), "DEFAULT_WL_EHOLE", String("E-Hole. absorbs particles, releases them when powered.")},
{0x579777_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("GAS WALL"), "DEFAULT_WL_GAS", String("Allows gases, blocks all other particles.")},
{0xFFEE00_rgb .Pack(), 0xAA9900_rgb .Pack(), 4, Renderer::WallIcon, String("GRAVITY WALL"), "DEFAULT_WL_GRVTY", String("Gravity wall. Newtonian Gravity has no effect inside a box drawn with this.")},
{0xFFAA00_rgb .Pack(), 0xAA5500_rgb .Pack(), 4, Renderer::WallIcon, String("ENERGY WALL"), "DEFAULT_WL_ENRGY", String("Allows energy particles, blocks all other particles.")},
{0xDCDCDC_rgb .Pack(), 0x000000_rgb .Pack(), 1, Renderer::WallIcon, String("AIRBLOCK WALL"), "DEFAULT_WL_NOAIR", String("Allows all particles, but blocks air.")},
{0x808080_rgb .Pack(), 0x000000_rgb .Pack(), 0, Renderer::WallIcon, String("ERASEALL"), "DEFAULT_WL_ERASEA", String("Erases walls, particles, and signs.")},
{0x800080_rgb .Pack(), 0x000000_rgb .Pack(), 0, Renderer::WallIcon, String("STASIS WALL"), "DEFAULT_WL_STASIS", String("Freezes particles inside the wall in place until powered.")},
};
}

View File

@ -7,7 +7,7 @@ void Element::Element_ACEL()
{
Identifier = "DEFAULT_PT_ACEL";
Name = "ACEL";
Colour = PIXPACK(0x0099CC);
Colour = 0x0099CC_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_ACID()
{
Identifier = "DEFAULT_PT_ACID";
Name = "ACID";
Colour = PIXPACK(0xED55FF);
Colour = 0xED55FF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_AMTR()
{
Identifier = "DEFAULT_PT_AMTR";
Name = "AMTR";
Colour = PIXPACK(0x808080);
Colour = 0x808080_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_ANAR()
{
Identifier = "DEFAULT_PT_ANAR";
Name = "ANAR";
Colour = PIXPACK(0xFFFFEE);
Colour = 0xFFFFEE_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_ARAY()
{
Identifier = "DEFAULT_PT_ARAY";
Name = "ARAY";
Colour = PIXPACK(0xFFBB00);
Colour = 0xFFBB00_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BANG()
{
Identifier = "DEFAULT_PT_BANG";
Name = "TNT";
Colour = PIXPACK(0xC05050);
Colour = 0xC05050_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BCLN()
{
Identifier = "DEFAULT_PT_BCLN";
Name = "BCLN";
Colour = PIXPACK(0xFFD040);
Colour = 0xFFD040_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BCOL()
{
Identifier = "DEFAULT_PT_BCOL";
Name = "BCOL";
Colour = PIXPACK(0x333333);
Colour = 0x333333_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_BGLA()
{
Identifier = "DEFAULT_PT_BGLA";
Name = "BGLA";
Colour = PIXPACK(0x606060);
Colour = 0x606060_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_BHOL()
{
Identifier = "DEFAULT_PT_BHOL";
Name = "VACU";
Colour = PIXPACK(0x303030);
Colour = 0x303030_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BIZR()
{
Identifier = "DEFAULT_PT_BIZR";
Name = "BIZR";
Colour = PIXPACK(0x00FF77);
Colour = 0x00FF77_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BIZRG()
{
Identifier = "DEFAULT_PT_BIZRG";
Name = "BIZG";
Colour = PIXPACK(0x00FFBB);
Colour = 0x00FFBB_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_CRACKER2;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BIZRS()
{
Identifier = "DEFAULT_PT_BIZRS";
Name = "BIZS";
Colour = PIXPACK(0x00E455);
Colour = 0x00E455_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_CRACKER2;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BMTL()
{
Identifier = "DEFAULT_PT_BMTL";
Name = "BMTL";
Colour = PIXPACK(0x505070);
Colour = 0x505070_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BOMB()
{
Identifier = "DEFAULT_PT_BOMB";
Name = "BOMB";
Colour = PIXPACK(0xFFF288);
Colour = 0xFFF288_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BOYL()
{
Identifier = "DEFAULT_PT_BOYL";
Name = "BOYL";
Colour = PIXPACK(0x0A3200);
Colour = 0x0A3200_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BRAY()
{
Identifier = "DEFAULT_PT_BRAY";
Name = "BRAY";
Colour = PIXPACK(0xFFFFFF);
Colour = 0xFFFFFF_rgb .Pack();
MenuVisible = 0;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BRCK()
{
Identifier = "DEFAULT_PT_BRCK";
Name = "BRCK";
Colour = PIXPACK(0x808080);
Colour = 0x808080_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BREC()
{
Identifier = "DEFAULT_PT_BREC";
Name = "BREL";
Colour = PIXPACK(0x707060);
Colour = 0x707060_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BRMT()
{
Identifier = "DEFAULT_PT_BRMT";
Name = "BRMT";
Colour = PIXPACK(0x705060);
Colour = 0x705060_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_BTRY()
{
Identifier = "DEFAULT_PT_BTRY";
Name = "BTRY";
Colour = PIXPACK(0x858505);
Colour = 0x858505_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_BVBR()
{
Identifier = "DEFAULT_PT_BVBR";
Name = "BVBR";
Colour = PIXPACK(0x005000);
Colour = 0x005000_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_C5()
{
Identifier = "DEFAULT_PT_C5";
Name = "C-5";
Colour = PIXPACK(0x2050E0);
Colour = 0x2050E0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_CAUS()
{
Identifier = "DEFAULT_PT_CAUS";
Name = "CAUS";
Colour = PIXPACK(0x80FFA0);
Colour = 0x80FFA0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_CBNW()
{
Identifier = "DEFAULT_PT_CBNW";
Name = "BUBW";
Colour = PIXPACK(0x2030D0);
Colour = 0x2030D0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_CFLM()
{
Identifier = "DEFAULT_PT_HFLM";
Name = "CFLM";
Colour = PIXPACK(0x8080FF);
Colour = 0x8080FF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;
@ -50,10 +50,10 @@ void Element::Element_CFLM()
static int graphics(GRAPHICS_FUNC_ARGS)
{
auto color = Renderer::clfmTableAt(cpart->life / 2);
*colr = PIXR(color);
*colg = PIXG(color);
*colb = PIXB(color);
auto color = RGB<uint8_t>::Unpack(Renderer::clfmTableAt(cpart->life / 2));
*colr = color.Red;
*colg = color.Green;
*colb = color.Blue;
*firea = 255;
*firer = *colr;

View File

@ -6,7 +6,7 @@ void Element::Element_CLNE()
{
Identifier = "DEFAULT_PT_CLNE";
Name = "CLNE";
Colour = PIXPACK(0xFFD010);
Colour = 0xFFD010_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_CLST()
{
Identifier = "DEFAULT_PT_CLST";
Name = "CLST";
Colour = PIXPACK(0xE4A4A4);
Colour = 0xE4A4A4_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_CNCT()
{
Identifier = "DEFAULT_PT_CNCT";
Name = "CNCT";
Colour = PIXPACK(0xC0C0C0);
Colour = 0xC0C0C0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_CO2()
{
Identifier = "DEFAULT_PT_CO2";
Name = "CO2";
Colour = PIXPACK(0x666666);
Colour = 0x666666_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_COAL()
{
Identifier = "DEFAULT_PT_COAL";
Name = "COAL";
Colour = PIXPACK(0x222222);
Colour = 0x222222_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_CONV()
{
Identifier = "DEFAULT_PT_CONV";
Name = "CONV";
Colour = PIXPACK(0x0AAB0A);
Colour = 0x0AAB0A_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_CRAY()
{
Identifier = "DEFAULT_PT_CRAY";
Name = "CRAY";
Colour = PIXPACK(0xBBFF00);
Colour = 0xBBFF00_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_CRMC()
{
Identifier = "DEFAULT_PT_CRMC";
Name = "CRMC";
Colour = PIXPACK(0xD6D1D4);
Colour = 0xD6D1D4_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_DCEL()
{
Identifier = "DEFAULT_PT_DCEL";
Name = "DCEL";
Colour = PIXPACK(0x99CC00);
Colour = 0x99CC00_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_DESL()
{
Identifier = "DEFAULT_PT_DESL";
Name = "DESL";
Colour = PIXPACK(0x440000);
Colour = 0x440000_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_DEST()
{
Identifier = "DEFAULT_PT_DEST";
Name = "DEST";
Colour = PIXPACK(0xFF3311);
Colour = 0xFF3311_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_DEUT()
{
Identifier = "DEFAULT_PT_DEUT";
Name = "DEUT";
Colour = PIXPACK(0x00153F);
Colour = 0x00153F_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_DLAY()
{
Identifier = "DEFAULT_PT_DLAY";
Name = "DLAY";
Colour = PIXPACK(0x753590);
Colour = 0x753590_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWERED;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_DMG()
{
Identifier = "DEFAULT_PT_DMG";
Name = "DMG";
Colour = PIXPACK(0x88FF88);
Colour = 0x88FF88_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_DMND()
{
Identifier = "DEFAULT_PT_DMND";
Name = "DMND";
Colour = PIXPACK(0xCCFFFF);
Colour = 0xCCFFFF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_DRAY()
{
Identifier = "DEFAULT_PT_DRAY";
Name = "DRAY";
Colour = PIXPACK(0xFFAA22);
Colour = 0xFFAA22_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_DRIC()
{
Identifier = "DEFAULT_PT_DRIC";
Name = "DRIC";
Colour = PIXPACK(0xE0E0E0);
Colour = 0xE0E0E0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_DSTW()
{
Identifier = "DEFAULT_PT_DSTW";
Name = "DSTW";
Colour = PIXPACK(0x1020C0);
Colour = 0x1020C0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_DTEC()
{
Identifier = "DEFAULT_PT_DTEC";
Name = "DTEC";
Colour = PIXPACK(0xFD9D18);
Colour = 0xFD9D18_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SENSOR;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_DUST()
{
Identifier = "DEFAULT_PT_DUST";
Name = "DUST";
Colour = PIXPACK(0xFFE0A0);
Colour = 0xFFE0A0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_DYST()
{
Identifier = "DEFAULT_PT_DYST";
Name = "DYST";
Colour = PIXPACK(0xBBB0A0);
Colour = 0xBBB0A0_rgb .Pack();
MenuVisible = 0;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_E116()
{
Identifier = "DEFAULT_PT_116";
Name = "EQVE";
Colour = PIXPACK(0xFFE0A0);
Colour = 0xFFE0A0_rgb .Pack();
MenuVisible = 0;
MenuSection = SC_CRACKER2;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_E146()
{
Identifier = "DEFAULT_PT_146";
Name = "BRAN";
Colour = PIXPACK(0xCCCC00);
Colour = 0xCCCC00_rgb .Pack();
MenuVisible = 0;
MenuSection = SC_LIFE;
Enabled = 0;

View File

@ -8,7 +8,7 @@ void Element::Element_ELEC()
{
Identifier = "DEFAULT_PT_ELEC";
Name = "ELEC";
Colour = PIXPACK(0xDFEFFF);
Colour = 0xDFEFFF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_EMBR()
{
Identifier = "DEFAULT_PT_EMBR";
Name = "EMBR";
Colour = PIXPACK(0xFFF288);
Colour = 0xFFF288_rgb .Pack();
MenuVisible = 0;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_EMP()
{
Identifier = "DEFAULT_PT_EMP";
Name = "EMP";
Colour = PIXPACK(0x66AAFF);
Colour = 0x66AAFF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_ETRD()
{
Identifier = "DEFAULT_PT_ETRD";
Name = "ETRD";
Colour = PIXPACK(0x404040);
Colour = 0x404040_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_EXOT()
{
Identifier = "DEFAULT_PT_EXOT";
Name = "EXOT";
Colour = PIXPACK(0x247BFE);
Colour = 0x247BFE_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -15,7 +15,7 @@ void Element::Element_FIGH()
{
Identifier = "DEFAULT_PT_FIGH";
Name = "FIGH";
Colour = PIXPACK(0xFFE0A0);
Colour = 0xFFE0A0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled = 1;

View File

@ -9,7 +9,7 @@ void Element::Element_FILT()
{
Identifier = "DEFAULT_PT_FILT";
Name = "FILT";
Colour = PIXPACK(0x000056);
Colour = 0x000056_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -10,7 +10,7 @@ void Element::Element_FIRE()
{
Identifier = "DEFAULT_PT_FIRE";
Name = "FIRE";
Colour = PIXPACK(0xFF1000);
Colour = 0xFF1000_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;
@ -353,10 +353,10 @@ static int updateLegacy(UPDATE_FUNC_ARGS)
static int graphics(GRAPHICS_FUNC_ARGS)
{
auto color = Renderer::flameTableAt(cpart->life);
*colr = PIXR(color);
*colg = PIXG(color);
*colb = PIXB(color);
auto color = RGB<uint8_t>::Unpack(Renderer::flameTableAt(cpart->life));
*colr = color.Red;
*colg = color.Green;
*colb = color.Blue;
*firea = 255;
*firer = *colr;

View File

@ -7,7 +7,7 @@ void Element::Element_FIRW()
{
Identifier = "DEFAULT_PT_FIRW";
Name = "FIRW";
Colour = PIXPACK(0xFFA040);
Colour = 0xFFA040_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FOG()
{
Identifier = "DEFAULT_PT_FOG";
Name = "FOG";
Colour = PIXPACK(0xAAAAAA);
Colour = 0xAAAAAA_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FRAY()
{
Identifier = "DEFAULT_PT_FRAY";
Name = "FRAY";
Colour = PIXPACK(0x00BBFF);
Colour = 0x00BBFF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FRME()
{
Identifier = "DEFAULT_PT_FRME";
Name = "FRME";
Colour = PIXPACK(0x999988);
Colour = 0x999988_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FRZW()
{
Identifier = "DEFAULT_PT_FRZW";
Name = "FRZW";
Colour = PIXPACK(0x1020C0);
Colour = 0x1020C0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_CRACKER2;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FRZZ()
{
Identifier = "DEFAULT_PT_FRZZ";
Name = "FRZZ";
Colour = PIXPACK(0xC0E0FF);
Colour = 0xC0E0FF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FSEP()
{
Identifier = "DEFAULT_PT_FSEP";
Name = "FSEP";
Colour = PIXPACK(0x63AD5F);
Colour = 0x63AD5F_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_FUSE()
{
Identifier = "DEFAULT_PT_FUSE";
Name = "FUSE";
Colour = PIXPACK(0x0A5706);
Colour = 0x0A5706_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_FWRK()
{
Identifier = "DEFAULT_PT_FWRK";
Name = "FWRK";
Colour = PIXPACK(0x666666);
Colour = 0x666666_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_GAS()
{
Identifier = "DEFAULT_PT_GAS";
Name = "GAS";
Colour = PIXPACK(0xE0FF20);
Colour = 0xE0FF20_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_GBMB()
{
Identifier = "DEFAULT_PT_GBMB";
Name = "GBMB";
Colour = PIXPACK(0x1144BB);
Colour = 0x1144BB_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_FORCE;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_GEL()
{
Identifier = "DEFAULT_PT_GEL";
Name = "GEL";
Colour = PIXPACK(0xFF9900);
Colour = 0xFF9900_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_GLAS()
{
Identifier = "DEFAULT_PT_GLAS";
Name = "GLAS";
Colour = PIXPACK(0x404040);
Colour = 0x404040_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_GLOW()
{
Identifier = "DEFAULT_PT_GLOW";
Name = "GLOW";
Colour = PIXPACK(0x445464);
Colour = 0x445464_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_LIQUID;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_GOLD()
{
Identifier = "DEFAULT_PT_GOLD";
Name = "GOLD";
Colour = PIXPACK(0xDCAD2C);
Colour = 0xDCAD2C_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_GOO()
{
Identifier = "DEFAULT_PT_GOO";
Name = "GOO";
Colour = PIXPACK(0x804000);
Colour = 0x804000_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_GPMP()
{
Identifier = "DEFAULT_PT_GPMP";
Name = "GPMP";
Colour = PIXPACK(0x0A3B3B);
Colour = 0x0A3B3B_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWERED;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_GRAV()
{
Identifier = "DEFAULT_PT_GRAV";
Name = "GRAV";
Colour = PIXPACK(0x202020);
Colour = 0x202020_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWDERS;
Enabled = 1;

View File

@ -8,7 +8,7 @@ void Element::Element_GRVT()
{
Identifier = "DEFAULT_PT_GRVT";
Name = "GRVT";
Colour = PIXPACK(0x00EE76);
Colour = 0x00EE76_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_NUCLEAR;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_GUNP()
{
Identifier = "DEFAULT_PT_GUNP";
Name = "GUN";
Colour = PIXPACK(0xC0C0D0);
Colour = 0xC0C0D0_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_H2()
{
Identifier = "DEFAULT_PT_H2";
Name = "HYGN";
Colour = PIXPACK(0x5070FF);
Colour = 0x5070FF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_GAS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_HEAC()
{
Identifier = "DEFAULT_PT_HEAC";
Name = "HEAC";
Colour = PIXPACK(0xCB6351);
Colour = 0xCB6351_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_HSWC()
{
Identifier = "DEFAULT_PT_HSWC";
Name = "HSWC";
Colour = PIXPACK(0x3B0A0A);
Colour = 0x3B0A0A_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_POWERED;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_ICEI()
{
Identifier = "DEFAULT_PT_ICEI";
Name = "ICE";
Colour = PIXPACK(0xA0C0FF);
Colour = 0xA0C0FF_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SOLIDS;
Enabled = 1;

View File

@ -6,7 +6,7 @@ void Element::Element_IGNT()
{
Identifier = "DEFAULT_PT_IGNT";
Name = "IGNC";
Colour = PIXPACK(0xC0B050);
Colour = 0xC0B050_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_EXPLOSIVE;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_INSL()
{
Identifier = "DEFAULT_PT_INSL";
Name = "INSL";
Colour = PIXPACK(0x9EA3B6);
Colour = 0x9EA3B6_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_INST()
{
Identifier = "DEFAULT_PT_INST";
Name = "INST";
Colour = PIXPACK(0x404039);
Colour = 0x404039_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

View File

@ -7,7 +7,7 @@ void Element::Element_INVIS()
{
Identifier = "DEFAULT_PT_INVIS";
Name = "INVS";
Colour = PIXPACK(0x00CCCC);
Colour = 0x00CCCC_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_SENSOR;
Enabled = 1;

View File

@ -4,7 +4,7 @@ void Element::Element_INWR()
{
Identifier = "DEFAULT_PT_INWR";
Name = "INWR";
Colour = PIXPACK(0x544141);
Colour = 0x544141_rgb .Pack();
MenuVisible = 1;
MenuSection = SC_ELEC;
Enabled = 1;

Some files were not shown because too many files have changed in this diff Show More