Use RGB for constants and gradients, other misc changes
This commit is contained in:
parent
bc085705a8
commit
a715f5d71a
@ -1130,7 +1130,7 @@ void GameSave::readOPS(const std::vector<char> &data)
|
||||
if (particles[newIndex].tmp>=2 && savedVersion < 81)
|
||||
{
|
||||
particles[newIndex].type = PT_EMBR;
|
||||
particles[newIndex].ctype = Renderer::firwTableAt(particles[newIndex].tmp - 4);
|
||||
particles[newIndex].ctype = Renderer::firwTableAt(particles[newIndex].tmp - 4).Pack();
|
||||
particles[newIndex].tmp = 1;
|
||||
}
|
||||
break;
|
||||
@ -1224,8 +1224,8 @@ void GameSave::readOPS(const std::vector<char> &data)
|
||||
{
|
||||
particles[newIndex].tmp2 = particles[newIndex].tmp;
|
||||
if (!particles[newIndex].dcolour)
|
||||
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour;
|
||||
particles[newIndex].tmp = builtinGol[particles[newIndex].ctype].colour2;
|
||||
particles[newIndex].dcolour = builtinGol[particles[newIndex].ctype].colour.Pack();
|
||||
particles[newIndex].tmp = builtinGol[particles[newIndex].ctype].colour2.Pack();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1807,8 +1807,8 @@ void GameSave::readPSv(const std::vector<char> &dataVec)
|
||||
if (particles[i-1].ctype >= 0 && particles[i-1].ctype < NGOL)
|
||||
{
|
||||
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;
|
||||
particles[i-1].dcolour = builtinGol[particles[i-1].ctype].colour.Pack();
|
||||
particles[i-1].tmp = builtinGol[particles[i-1].ctype].colour2.Pack();
|
||||
}
|
||||
}
|
||||
if(ty==PT_LCRY){
|
||||
@ -1856,7 +1856,7 @@ void GameSave::readPSv(const std::vector<char> &dataVec)
|
||||
if (particles[i-1].type==PT_FIRW && particles[i-1].tmp>=2)
|
||||
{
|
||||
particles[i-1].type = PT_EMBR;
|
||||
particles[i-1].ctype = Renderer::firwTableAt(particles[i-1].tmp-4);
|
||||
particles[i-1].ctype = Renderer::firwTableAt(particles[i-1].tmp-4).Pack();
|
||||
particles[i-1].tmp = 1;
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void ElementPopulationDebug::Draw()
|
||||
auto barSize = int(count * scale - 0.5f);
|
||||
int barX = bars;//*2;
|
||||
|
||||
auto colour = RGB<uint8_t>::Unpack(sim->elements[i].Colour);
|
||||
RGB<uint8_t> colour = 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])
|
||||
|
@ -464,9 +464,9 @@ bool Graphics::GradientStop::operator <(const GradientStop &other) const
|
||||
return point < other.point;
|
||||
}
|
||||
|
||||
std::vector<pixel> Graphics::Gradient(std::vector<GradientStop> stops, int resolution)
|
||||
std::vector<RGB<uint8_t>> Graphics::Gradient(std::vector<GradientStop> stops, int resolution)
|
||||
{
|
||||
std::vector<pixel> table(resolution, 0);
|
||||
std::vector<RGB<uint8_t>> table(resolution, 0x000000_rgb);
|
||||
if (stops.size() >= 2)
|
||||
{
|
||||
std::sort(stops.begin(), stops.end());
|
||||
@ -485,13 +485,7 @@ 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);
|
||||
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();
|
||||
table[i] = left.color.Blend(right.color.WithAlpha(f * 0xFF));
|
||||
}
|
||||
}
|
||||
return table;
|
||||
|
@ -84,12 +84,12 @@ public:
|
||||
|
||||
struct GradientStop
|
||||
{
|
||||
pixel color;
|
||||
RGB<uint8_t> color;
|
||||
float point;
|
||||
|
||||
bool operator <(const GradientStop &other) const;
|
||||
};
|
||||
static std::vector<pixel> Gradient(std::vector<GradientStop> stops, int resolution);
|
||||
static std::vector<RGB<uint8_t>> Gradient(std::vector<GradientStop> stops, int resolution);
|
||||
|
||||
//Font/text metrics
|
||||
[[deprecated("Use TextSize().X")]]
|
||||
|
@ -19,8 +19,8 @@ std::unique_ptr<VideoBuffer> Renderer::WallIcon(int wallID, Vec2<int> size)
|
||||
return nullptr;
|
||||
wall_type const &wtype = wtypes[wallID];
|
||||
|
||||
RGB<uint8_t> primary = RGB<uint8_t>::Unpack(wtype.colour);
|
||||
RGB<uint8_t> secondary = RGB<uint8_t>::Unpack(wtype.eglow);
|
||||
RGB<uint8_t> primary = wtype.colour;
|
||||
RGB<uint8_t> secondary = wtype.eglow;
|
||||
|
||||
auto texture = std::make_unique<VideoBuffer>(size);
|
||||
switch (wtype.drawstyle)
|
||||
@ -209,7 +209,7 @@ void Renderer::render_parts()
|
||||
//Defaults
|
||||
pixel_mode = 0 | PMODE_FLAT;
|
||||
cola = 255;
|
||||
auto colour = RGB<uint8_t>::Unpack(elements[t].Colour);
|
||||
RGB<uint8_t> colour = elements[t].Colour;
|
||||
colr = colour.Red;
|
||||
colg = colour.Green;
|
||||
colb = colour.Blue;
|
||||
@ -288,7 +288,7 @@ void Renderer::render_parts()
|
||||
constexpr float min_temp = MIN_TEMP;
|
||||
constexpr float max_temp = MAX_TEMP;
|
||||
firea = 255;
|
||||
auto color = RGB<uint8_t>::Unpack(heatTableAt(int((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024)));
|
||||
RGB<uint8_t> color = 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;
|
||||
@ -436,7 +436,7 @@ void Renderer::render_parts()
|
||||
}
|
||||
else if (cplayer->elem < PT_NUM && cplayer->elem > 0)
|
||||
{
|
||||
auto elemColour = RGB<uint8_t>::Unpack(elements[cplayer->elem].Colour);
|
||||
RGB<uint8_t> elemColour = elements[cplayer->elem].Colour;
|
||||
colr = elemColour.Red;
|
||||
colg = elemColour.Green;
|
||||
colb = elemColour.Blue;
|
||||
@ -826,7 +826,7 @@ void Renderer::draw_air()
|
||||
float (*hv)[XCELLS] = sim->air->hv;
|
||||
float (*vx)[XCELLS] = sim->air->vx;
|
||||
float (*vy)[XCELLS] = sim->air->vy;
|
||||
auto c = RGB<uint8_t>(0, 0, 0);
|
||||
auto c = 0x000000_rgb;
|
||||
for (y=0; y<YCELLS; y++)
|
||||
for (x=0; x<XCELLS; x++)
|
||||
{
|
||||
@ -904,8 +904,8 @@ void Renderer::DrawWalls()
|
||||
if (wt >= UI_WALLCOUNT)
|
||||
continue;
|
||||
unsigned char powered = sim->emap[y][x];
|
||||
auto prgb = RGB<uint8_t>::Unpack(sim->wtypes[wt].colour);
|
||||
auto grgb = RGB<uint8_t>::Unpack(sim->wtypes[wt].eglow);
|
||||
RGB<uint8_t> prgb = sim->wtypes[wt].colour;
|
||||
RGB<uint8_t> grgb = sim->wtypes[wt].eglow;
|
||||
|
||||
if (findingElement)
|
||||
{
|
||||
@ -1125,10 +1125,10 @@ void Renderer::DrawWalls()
|
||||
}
|
||||
}
|
||||
|
||||
if (sim->wtypes[wt].eglow && powered)
|
||||
if (sim->wtypes[wt].eglow.Pack() && powered)
|
||||
{
|
||||
// glow if electrified
|
||||
auto glow = RGB<uint8_t>::Unpack(sim->wtypes[wt].eglow);
|
||||
RGB<uint8_t> glow = sim->wtypes[wt].eglow;
|
||||
int alpha = 255;
|
||||
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;
|
||||
@ -1191,7 +1191,7 @@ int HeatToColour(float temp)
|
||||
{
|
||||
constexpr float min_temp = MIN_TEMP;
|
||||
constexpr float max_temp = MAX_TEMP;
|
||||
auto color = RGB<uint8_t>::Unpack(Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024)));
|
||||
RGB<uint8_t> color = Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024));
|
||||
color.Red *= 0.7f;
|
||||
color.Green *= 0.7f;
|
||||
color.Blue *= 0.7f;
|
||||
|
@ -157,8 +157,8 @@ public:
|
||||
~Renderer();
|
||||
|
||||
#define RENDERER_TABLE(name) \
|
||||
static std::vector<pixel> name; \
|
||||
static inline pixel name ## At(int index) \
|
||||
static std::vector<RGB<uint8_t>> name; \
|
||||
static inline RGB<uint8_t> name ## At(int index) \
|
||||
{ \
|
||||
auto size = int(name.size()); \
|
||||
if (index < 0) index = 0; \
|
||||
|
@ -20,14 +20,7 @@ void Renderer::RenderBegin()
|
||||
{
|
||||
for (int i = 0; i < VIDXRES*YRES; i++)
|
||||
{
|
||||
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();
|
||||
persistentVid[i] = RGB<uint8_t>::Unpack(vid[i]).Decay().Pack();
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,15 +134,9 @@ void Renderer::render_gravlensing(pixel * source)
|
||||
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)
|
||||
{
|
||||
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;
|
||||
t.Red = std::min(0xFF, (int)RGB<uint8_t>::Unpack(src[ry*(VIDXRES)+rx]).Red + t.Red);
|
||||
t.Green = std::min(0xFF, (int)RGB<uint8_t>::Unpack(src[gy*(VIDXRES)+gx]).Green + t.Green);
|
||||
t.Blue = std::min(0xFF, (int)RGB<uint8_t>::Unpack(src[by*(VIDXRES)+bx]).Blue + t.Blue);
|
||||
dst[ny*(VIDXRES)+nx] = t.Pack();
|
||||
}
|
||||
}
|
||||
@ -198,11 +185,11 @@ pixel Renderer::GetPixel(int x, int y)
|
||||
return vid[(y*VIDXRES)+x];
|
||||
}
|
||||
|
||||
std::vector<pixel> Renderer::flameTable;
|
||||
std::vector<pixel> Renderer::plasmaTable;
|
||||
std::vector<pixel> Renderer::heatTable;
|
||||
std::vector<pixel> Renderer::clfmTable;
|
||||
std::vector<pixel> Renderer::firwTable;
|
||||
std::vector<RGB<uint8_t>> Renderer::flameTable;
|
||||
std::vector<RGB<uint8_t>> Renderer::plasmaTable;
|
||||
std::vector<RGB<uint8_t>> Renderer::heatTable;
|
||||
std::vector<RGB<uint8_t>> Renderer::clfmTable;
|
||||
std::vector<RGB<uint8_t>> Renderer::firwTable;
|
||||
static bool tablesPopulated = false;
|
||||
static std::mutex tablesPopulatedMx;
|
||||
void Renderer::PopulateTables()
|
||||
@ -212,47 +199,47 @@ void Renderer::PopulateTables()
|
||||
{
|
||||
tablesPopulated = true;
|
||||
flameTable = Graphics::Gradient({
|
||||
{ 0x000000, 0.00f },
|
||||
{ 0x60300F, 0.50f },
|
||||
{ 0xDFBF6F, 0.90f },
|
||||
{ 0xAF9F0F, 1.00f },
|
||||
{ 0x000000_rgb, 0.00f },
|
||||
{ 0x60300F_rgb, 0.50f },
|
||||
{ 0xDFBF6F_rgb, 0.90f },
|
||||
{ 0xAF9F0F_rgb, 1.00f },
|
||||
}, 200);
|
||||
plasmaTable = Graphics::Gradient({
|
||||
{ 0x000000, 0.00f },
|
||||
{ 0x301040, 0.25f },
|
||||
{ 0x301060, 0.50f },
|
||||
{ 0xAFFFFF, 0.90f },
|
||||
{ 0xAFFFFF, 1.00f },
|
||||
{ 0x000000_rgb, 0.00f },
|
||||
{ 0x301040_rgb, 0.25f },
|
||||
{ 0x301060_rgb, 0.50f },
|
||||
{ 0xAFFFFF_rgb, 0.90f },
|
||||
{ 0xAFFFFF_rgb, 1.00f },
|
||||
}, 200);
|
||||
heatTable = Graphics::Gradient({
|
||||
{ 0x2B00FF, 0.00f },
|
||||
{ 0x003CFF, 0.01f },
|
||||
{ 0x00C0FF, 0.05f },
|
||||
{ 0x00FFEB, 0.08f },
|
||||
{ 0x00FF14, 0.19f },
|
||||
{ 0x4BFF00, 0.25f },
|
||||
{ 0xC8FF00, 0.37f },
|
||||
{ 0xFFDC00, 0.45f },
|
||||
{ 0xFF0000, 0.71f },
|
||||
{ 0xFF00DC, 1.00f },
|
||||
{ 0x2B00FF_rgb, 0.00f },
|
||||
{ 0x003CFF_rgb, 0.01f },
|
||||
{ 0x00C0FF_rgb, 0.05f },
|
||||
{ 0x00FFEB_rgb, 0.08f },
|
||||
{ 0x00FF14_rgb, 0.19f },
|
||||
{ 0x4BFF00_rgb, 0.25f },
|
||||
{ 0xC8FF00_rgb, 0.37f },
|
||||
{ 0xFFDC00_rgb, 0.45f },
|
||||
{ 0xFF0000_rgb, 0.71f },
|
||||
{ 0xFF00DC_rgb, 1.00f },
|
||||
}, 1024);
|
||||
clfmTable = Graphics::Gradient({
|
||||
{ 0x000000, 0.00f },
|
||||
{ 0x0A0917, 0.10f },
|
||||
{ 0x19163C, 0.20f },
|
||||
{ 0x28285E, 0.30f },
|
||||
{ 0x343E77, 0.40f },
|
||||
{ 0x49769A, 0.60f },
|
||||
{ 0x57A0B4, 0.80f },
|
||||
{ 0x5EC4C6, 1.00f },
|
||||
{ 0x000000_rgb, 0.00f },
|
||||
{ 0x0A0917_rgb, 0.10f },
|
||||
{ 0x19163C_rgb, 0.20f },
|
||||
{ 0x28285E_rgb, 0.30f },
|
||||
{ 0x343E77_rgb, 0.40f },
|
||||
{ 0x49769A_rgb, 0.60f },
|
||||
{ 0x57A0B4_rgb, 0.80f },
|
||||
{ 0x5EC4C6_rgb, 1.00f },
|
||||
}, 200);
|
||||
firwTable = Graphics::Gradient({
|
||||
{ 0xFF00FF, 0.00f },
|
||||
{ 0x0000FF, 0.20f },
|
||||
{ 0x00FFFF, 0.40f },
|
||||
{ 0x00FF00, 0.60f },
|
||||
{ 0xFFFF00, 0.80f },
|
||||
{ 0xFF0000, 1.00f },
|
||||
{ 0xFF00FF_rgb, 0.00f },
|
||||
{ 0x0000FF_rgb, 0.20f },
|
||||
{ 0x00FFFF_rgb, 0.40f },
|
||||
{ 0x00FF00_rgb, 0.60f },
|
||||
{ 0xFFFF00_rgb, 0.80f },
|
||||
{ 0xFF0000_rgb, 1.00f },
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
@ -270,19 +270,19 @@ void GameModel::BuildMenus()
|
||||
Tool * tempTool;
|
||||
if(i == PT_LIGH)
|
||||
{
|
||||
tempTool = new Element_LIGH_Tool(i, sim->elements[i].Name, sim->elements[i].Description, RGB<uint8_t>::Unpack(sim->elements[i].Colour), sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
tempTool = new Element_LIGH_Tool(i, sim->elements[i].Name, sim->elements[i].Description, sim->elements[i].Colour, sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
}
|
||||
else if(i == PT_TESC)
|
||||
{
|
||||
tempTool = new Element_TESC_Tool(i, sim->elements[i].Name, sim->elements[i].Description, RGB<uint8_t>::Unpack(sim->elements[i].Colour), sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
tempTool = new Element_TESC_Tool(i, sim->elements[i].Name, sim->elements[i].Description, sim->elements[i].Colour, sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
}
|
||||
else if(i == PT_STKM || i == PT_FIGH || i == PT_STKM2)
|
||||
{
|
||||
tempTool = new PlopTool(i, sim->elements[i].Name, sim->elements[i].Description, RGB<uint8_t>::Unpack(sim->elements[i].Colour), sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
tempTool = new PlopTool(i, sim->elements[i].Name, sim->elements[i].Description, sim->elements[i].Colour, sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
}
|
||||
else
|
||||
{
|
||||
tempTool = new ElementTool(i, sim->elements[i].Name, sim->elements[i].Description, RGB<uint8_t>::Unpack(sim->elements[i].Colour), sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
tempTool = new ElementTool(i, sim->elements[i].Name, sim->elements[i].Description, sim->elements[i].Colour, sim->elements[i].Identifier, sim->elements[i].IconGenerator);
|
||||
}
|
||||
|
||||
if (sim->elements[i].MenuSection >= 0 && sim->elements[i].MenuSection < SC_TOTAL && sim->elements[i].MenuVisible)
|
||||
@ -300,7 +300,7 @@ void GameModel::BuildMenus()
|
||||
//Build menu for GOL types
|
||||
for(int i = 0; i < NGOL; i++)
|
||||
{
|
||||
Tool * tempTool = new ElementTool(PT_LIFE|PMAPID(i), builtinGol[i].name, builtinGol[i].description, RGB<uint8_t>::Unpack(builtinGol[i].colour), "DEFAULT_PT_LIFE_"+builtinGol[i].name.ToAscii());
|
||||
Tool * tempTool = new ElementTool(PT_LIFE|PMAPID(i), builtinGol[i].name, builtinGol[i].description, builtinGol[i].colour, "DEFAULT_PT_LIFE_"+builtinGol[i].name.ToAscii());
|
||||
menuList[SC_LIFE]->AddTool(tempTool);
|
||||
}
|
||||
{
|
||||
@ -362,7 +362,7 @@ void GameModel::BuildMenus()
|
||||
//Build other menus from wall data
|
||||
for(int i = 0; i < UI_WALLCOUNT; i++)
|
||||
{
|
||||
Tool * tempTool = new WallTool(i, sim->wtypes[i].descs, RGB<uint8_t>::Unpack(sim->wtypes[i].colour), sim->wtypes[i].identifier, sim->wtypes[i].textureGen);
|
||||
Tool * tempTool = new WallTool(i, sim->wtypes[i].descs, sim->wtypes[i].colour, sim->wtypes[i].identifier, sim->wtypes[i].textureGen);
|
||||
menuList[SC_WALL]->AddTool(tempTool);
|
||||
//sim->wtypes[i]
|
||||
}
|
||||
@ -374,7 +374,7 @@ void GameModel::BuildMenus()
|
||||
i,
|
||||
sim->tools[i].Name,
|
||||
sim->tools[i].Description,
|
||||
RGB<uint8_t>::Unpack(sim->tools[i].Colour),
|
||||
sim->tools[i].Colour,
|
||||
sim->tools[i].Identifier
|
||||
);
|
||||
menuList[SC_TOOL]->AddTool(tempTool);
|
||||
|
@ -68,8 +68,8 @@ void Slider::SetColour(Colour col1, Colour col2)
|
||||
this->col1 = col1;
|
||||
this->col2 = col2;
|
||||
bgGradient = Graphics::Gradient({
|
||||
{ RGB<uint8_t>(col1.Red, col1.Green, col1.Blue).Pack(), 0.f },
|
||||
{ RGB<uint8_t>(col2.Red, col2.Green, col2.Blue).Pack(), 1.f },
|
||||
{ RGB<uint8_t>(col1.Red, col1.Green, col1.Blue), 0.f },
|
||||
{ RGB<uint8_t>(col2.Red, col2.Green, col2.Blue), 1.f },
|
||||
}, Size.X-7);
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ void Slider::Draw(const Point& screenPos)
|
||||
{
|
||||
for (int i = 3; i < Size.X-7; i++)
|
||||
{
|
||||
auto color = RGB<uint8_t>::Unpack(bgGradient[i - 3]);
|
||||
RGB<uint8_t> color = bgGradient[i - 3];
|
||||
g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, color.Red, color.Green, color.Blue, 255);
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ class Slider : public ui::Component
|
||||
int sliderSteps;
|
||||
int sliderPosition;
|
||||
bool isMouseDown;
|
||||
std::vector<pixel> bgGradient;
|
||||
std::vector<RGB<uint8_t>> bgGradient;
|
||||
|
||||
struct SliderAction
|
||||
{
|
||||
|
@ -1865,19 +1865,10 @@ int LuaScriptInterface::simulation_decoColor(lua_State * l)
|
||||
color = RGBA<uint8_t>::Unpack(luaL_optnumber(l, 1, 0xFFFF0000));
|
||||
else
|
||||
{
|
||||
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 (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;
|
||||
color.Red = std::clamp(luaL_optint(l, 1, 255), 0, 255);
|
||||
color.Green = std::clamp(luaL_optint(l, 2, 255), 0, 255);
|
||||
color.Blue = std::clamp(luaL_optint(l, 3, 255), 0, 255);
|
||||
color.Alpha = std::clamp(luaL_optint(l, 4, 255), 0, 255);
|
||||
}
|
||||
luacon_model->SetColourSelectorColour(ui::Colour(color.Red, color.Green, color.Blue, color.Alpha));
|
||||
return 0;
|
||||
|
@ -8,7 +8,7 @@ struct BuiltinGOL
|
||||
String name;
|
||||
int oldtype;
|
||||
int ruleset;
|
||||
pixel colour, colour2;
|
||||
RGB<uint8_t> colour, colour2;
|
||||
int goltype;
|
||||
String description;
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
Element::Element():
|
||||
Identifier("DEFAULT_INVALID"),
|
||||
Name(""),
|
||||
Colour(0xFF00FF_rgb .Pack()),
|
||||
Colour(0xFF00FF_rgb),
|
||||
MenuVisible(0),
|
||||
MenuSection(0),
|
||||
Enabled(0),
|
||||
|
@ -15,7 +15,7 @@ class Element
|
||||
public:
|
||||
ByteString Identifier;
|
||||
String Name;
|
||||
pixel Colour;
|
||||
RGB<uint8_t> Colour;
|
||||
int MenuVisible;
|
||||
int MenuSection;
|
||||
int Enabled;
|
||||
|
@ -10,7 +10,7 @@
|
||||
SimTool::SimTool():
|
||||
Identifier("DEFAULT_TOOL_INVALID"),
|
||||
Name(""),
|
||||
Colour(0xFFFFFF_rgb .Pack()),
|
||||
Colour(0xFFFFFF_rgb),
|
||||
Description("NULL Tool, does NOTHING")
|
||||
{
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ class SimTool
|
||||
public:
|
||||
ByteString Identifier;
|
||||
String Name;
|
||||
pixel Colour;
|
||||
RGB<uint8_t> Colour;
|
||||
String Description;
|
||||
|
||||
int (*Perform)(Simulation * sim, Particle * cpart, int x, int y, int brushX, int brushY, float strength);
|
||||
|
@ -2135,13 +2135,13 @@ int Simulation::create_part(int p, int x, int y, int t, int v)
|
||||
{
|
||||
int colr, colg, colb;
|
||||
int sandcolourToUse = p == -2 ? sandcolour_interface : sandcolour;
|
||||
auto colour = RGB<uint8_t>::Unpack(elements[t].Colour);
|
||||
RGB<uint8_t> colour = 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);
|
||||
colr = std::clamp(colr, 0, 255);
|
||||
colg = std::clamp(colg, 0, 255);
|
||||
colb = std::clamp(colb, 0, 255);
|
||||
parts[i].dcolour = (rng.between(0, 149)<<24) | (colr<<16) | (colg<<8) | colb;
|
||||
}
|
||||
|
||||
|
@ -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, 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" )}
|
||||
{ "GOL", GT_GOL , 0x0080C, 0x0CAC00_rgb, 0x0CAC00_rgb, NGT_GOL, String("Game Of Life: Begin 3/Stay 23") },
|
||||
{ "HLIF", GT_HLIF, 0x0480C, 0xFF0000_rgb, 0xFF0000_rgb, NGT_HLIF, String("High Life: B36/S23") },
|
||||
{ "ASIM", GT_ASIM, 0x038F0, 0x0000FF_rgb, 0x0000FF_rgb, NGT_ASIM, String("Assimilation: B345/S4567") },
|
||||
{ "2X2", GT_2x2 , 0x04826, 0xFFFF00_rgb, 0xFFFF00_rgb, NGT_2x2, String("2X2: B36/S125") },
|
||||
{ "DANI", GT_DANI, 0x1C9D8, 0x00FFFF_rgb, 0x00FFFF_rgb, NGT_DANI, String("Day and Night: B3678/S34678") },
|
||||
{ "AMOE", GT_AMOE, 0x0A92A, 0xFF00FF_rgb, 0xFF00FF_rgb, NGT_AMOE, String("Amoeba: B357/S1358") },
|
||||
{ "MOVE", GT_MOVE, 0x14834, 0xFFFFFF_rgb, 0xFFFFFF_rgb, NGT_MOVE, String("'Move' particles. Does not move things.. it is a life type: B368/S245") },
|
||||
{ "PGOL", GT_PGOL, 0x0A90C, 0xE05010_rgb, 0xE05010_rgb, NGT_PGOL, String("Pseudo Life: B357/S238") },
|
||||
{ "DMOE", GT_DMOE, 0x1E9E0, 0x500000_rgb, 0x500000_rgb, NGT_DMOE, String("Diamoeba: B35678/S5678") },
|
||||
{ "3-4", GT_34 , 0x01818, 0x500050_rgb, 0x500050_rgb, NGT_34, String("3-4: B34/S34") },
|
||||
{ "LLIF", GT_LLIF, 0x03820, 0x505050_rgb, 0x505050_rgb, NGT_LLIF, String("Long Life: B345/S5") },
|
||||
{ "STAN", GT_STAN, 0x1C9EC, 0x5000FF_rgb, 0x5000FF_rgb, NGT_STAN, String("Stains: B3678/S235678") },
|
||||
{ "SEED", GT_SEED, 0x00400, 0xFBEC7D_rgb, 0xFBEC7D_rgb, NGT_SEED, String("Seeds: B2/S") },
|
||||
{ "MAZE", GT_MAZE, 0x0083E, 0xA8E4A0_rgb, 0xA8E4A0_rgb, NGT_MAZE, String("Maze: B3/S12345") },
|
||||
{ "COAG", GT_COAG, 0x189EC, 0x9ACD32_rgb, 0x9ACD32_rgb, NGT_COAG, String("Coagulations: B378/S235678") },
|
||||
{ "WALL", GT_WALL, 0x1F03C, 0x0047AB_rgb, 0x0047AB_rgb, NGT_WALL, String("Walled cities: B45678/S2345") },
|
||||
{ "GNAR", GT_GNAR, 0x00202, 0xE5B73B_rgb, 0xE5B73B_rgb, NGT_GNAR, String("Gnarl: B1/S1") },
|
||||
{ "REPL", GT_REPL, 0x0AAAA, 0x259588_rgb, 0x259588_rgb, NGT_REPL, String("Replicator: B1357/S1357") },
|
||||
{ "MYST", GT_MYST, 0x139E1, 0x0C3C00_rgb, 0x0C3C00_rgb, NGT_MYST, String("Mystery: B3458/S05678") },
|
||||
{ "LOTE", GT_LOTE, 0x48938, 0xFF0000_rgb, 0xFFFF00_rgb, NGT_LOTE, String("Living on the Edge: B37/S3458/4") },
|
||||
{ "FRG2", GT_FRG2, 0x20816, 0x006432_rgb, 0x00FF5A_rgb, NGT_FRG2, String("Like Frogs rule: B3/S124/3") },
|
||||
{ "STAR", GT_STAR, 0x98478, 0x000040_rgb, 0x0000E6_rgb, NGT_STAR, String("Like Star Wars rule: B278/S3456/6") },
|
||||
{ "FROG", GT_FROG, 0x21806, 0x006400_rgb, 0x00FF00_rgb, NGT_FROG, String("Frogs: B34/S12/3") },
|
||||
{ "BRAN", GT_BRAN, 0x25440, 0xFFFF00_rgb, 0x969600_rgb, NGT_BRAN, String("Brian 6: B246/S6/3" )}
|
||||
};
|
||||
|
||||
std::vector<wall_type> LoadWalls()
|
||||
{
|
||||
return
|
||||
std::vector<wall_type>{
|
||||
{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.")},
|
||||
{0x808080_rgb, 0x000000_rgb, 0, Renderer::WallIcon, String("ERASE"), "DEFAULT_WL_ERASE", String("Erases walls.")},
|
||||
{0xC0C0C0_rgb, 0x101010_rgb, 0, Renderer::WallIcon, String("CONDUCTIVE WALL"), "DEFAULT_WL_CNDTW", String("Blocks everything. Conductive.")},
|
||||
{0x808080_rgb, 0x808080_rgb, 0, Renderer::WallIcon, String("EWALL"), "DEFAULT_WL_EWALL", String("E-Wall. Becomes transparent when electricity is connected.")},
|
||||
{0xFF8080_rgb, 0xFF2008_rgb, 1, Renderer::WallIcon, String("DETECTOR"), "DEFAULT_WL_DTECT", String("Detector. Generates electricity when a particle is inside.")},
|
||||
{0x808080_rgb, 0x000000_rgb, 0, Renderer::WallIcon, String("STREAMLINE"), "DEFAULT_WL_STRM", String("Streamline. Set start point of a streamline.")},
|
||||
{0x8080FF_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("FAN"), "DEFAULT_WL_FAN", String("Fan. Accelerates air. Use the line tool to set direction and strength.")},
|
||||
{0xC0C0C0_rgb, 0x101010_rgb, 2, Renderer::WallIcon, String("LIQUID WALL"), "DEFAULT_WL_LIQD", String("Allows liquids, blocks all other particles. Conductive.")},
|
||||
{0x808080_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("ABSORB WALL"), "DEFAULT_WL_ABSRB", String("Absorbs particles but lets air currents through.")},
|
||||
{0x808080_rgb, 0x000000_rgb, 3, Renderer::WallIcon, String("WALL"), "DEFAULT_WL_WALL", String("Basic wall, blocks everything.")},
|
||||
{0x3C3C3C_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("AIRONLY WALL"), "DEFAULT_WL_AIR", String("Allows air, but blocks all particles.")},
|
||||
{0x575757_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("POWDER WALL"), "DEFAULT_WL_POWDR", String("Allows powders, blocks all other particles.")},
|
||||
{0xFFFF22_rgb, 0x101010_rgb, 2, Renderer::WallIcon, String("CONDUCTOR"), "DEFAULT_WL_CNDTR", String("Conductor. Allows all particles to pass through and conducts electricity.")},
|
||||
{0x242424_rgb, 0x101010_rgb, 0, Renderer::WallIcon, String("EHOLE"), "DEFAULT_WL_EHOLE", String("E-Hole. absorbs particles, releases them when powered.")},
|
||||
{0x579777_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("GAS WALL"), "DEFAULT_WL_GAS", String("Allows gases, blocks all other particles.")},
|
||||
{0xFFEE00_rgb, 0xAA9900_rgb, 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, 0xAA5500_rgb, 4, Renderer::WallIcon, String("ENERGY WALL"), "DEFAULT_WL_ENRGY", String("Allows energy particles, blocks all other particles.")},
|
||||
{0xDCDCDC_rgb, 0x000000_rgb, 1, Renderer::WallIcon, String("AIRBLOCK WALL"), "DEFAULT_WL_NOAIR", String("Allows all particles, but blocks air.")},
|
||||
{0x808080_rgb, 0x000000_rgb, 0, Renderer::WallIcon, String("ERASEALL"), "DEFAULT_WL_ERASEA", String("Erases walls, particles, and signs.")},
|
||||
{0x800080_rgb, 0x000000_rgb, 0, Renderer::WallIcon, String("STASIS WALL"), "DEFAULT_WL_STASIS", String("Freezes particles inside the wall in place until powered.")},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,8 @@ class VideoBuffer;
|
||||
|
||||
struct wall_type
|
||||
{
|
||||
pixel colour;
|
||||
pixel eglow; // if emap set, add this to fire glow
|
||||
RGB<uint8_t> colour;
|
||||
RGB<uint8_t> eglow; // if emap set, add this to fire glow
|
||||
int drawstyle;
|
||||
std::unique_ptr<VideoBuffer> (*textureGen)(int, Vec2<int>);
|
||||
String name;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_ACEL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ACEL";
|
||||
Name = "ACEL";
|
||||
Colour = 0x0099CC_rgb .Pack();
|
||||
Colour = 0x0099CC_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_ACID()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ACID";
|
||||
Name = "ACID";
|
||||
Colour = 0xED55FF_rgb .Pack();
|
||||
Colour = 0xED55FF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_AMTR()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_AMTR";
|
||||
Name = "AMTR";
|
||||
Colour = 0x808080_rgb .Pack();
|
||||
Colour = 0x808080_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_ANAR()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ANAR";
|
||||
Name = "ANAR";
|
||||
Colour = 0xFFFFEE_rgb .Pack();
|
||||
Colour = 0xFFFFEE_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_ARAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ARAY";
|
||||
Name = "ARAY";
|
||||
Colour = 0xFFBB00_rgb .Pack();
|
||||
Colour = 0xFFBB00_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BANG()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BANG";
|
||||
Name = "TNT";
|
||||
Colour = 0xC05050_rgb .Pack();
|
||||
Colour = 0xC05050_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BCLN()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BCLN";
|
||||
Name = "BCLN";
|
||||
Colour = 0xFFD040_rgb .Pack();
|
||||
Colour = 0xFFD040_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BCOL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BCOL";
|
||||
Name = "BCOL";
|
||||
Colour = 0x333333_rgb .Pack();
|
||||
Colour = 0x333333_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_BGLA()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BGLA";
|
||||
Name = "BGLA";
|
||||
Colour = 0x606060_rgb .Pack();
|
||||
Colour = 0x606060_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_BHOL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BHOL";
|
||||
Name = "VACU";
|
||||
Colour = 0x303030_rgb .Pack();
|
||||
Colour = 0x303030_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BIZR()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BIZR";
|
||||
Name = "BIZR";
|
||||
Colour = 0x00FF77_rgb .Pack();
|
||||
Colour = 0x00FF77_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BIZRG()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BIZRG";
|
||||
Name = "BIZG";
|
||||
Colour = 0x00FFBB_rgb .Pack();
|
||||
Colour = 0x00FFBB_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_CRACKER2;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BIZRS()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BIZRS";
|
||||
Name = "BIZS";
|
||||
Colour = 0x00E455_rgb .Pack();
|
||||
Colour = 0x00E455_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_CRACKER2;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BMTL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BMTL";
|
||||
Name = "BMTL";
|
||||
Colour = 0x505070_rgb .Pack();
|
||||
Colour = 0x505070_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BOMB()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BOMB";
|
||||
Name = "BOMB";
|
||||
Colour = 0xFFF288_rgb .Pack();
|
||||
Colour = 0xFFF288_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BOYL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BOYL";
|
||||
Name = "BOYL";
|
||||
Colour = 0x0A3200_rgb .Pack();
|
||||
Colour = 0x0A3200_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BRAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BRAY";
|
||||
Name = "BRAY";
|
||||
Colour = 0xFFFFFF_rgb .Pack();
|
||||
Colour = 0xFFFFFF_rgb;
|
||||
MenuVisible = 0;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BRCK()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BRCK";
|
||||
Name = "BRCK";
|
||||
Colour = 0x808080_rgb .Pack();
|
||||
Colour = 0x808080_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BREC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BREC";
|
||||
Name = "BREL";
|
||||
Colour = 0x707060_rgb .Pack();
|
||||
Colour = 0x707060_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BRMT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BRMT";
|
||||
Name = "BRMT";
|
||||
Colour = 0x705060_rgb .Pack();
|
||||
Colour = 0x705060_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_BTRY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BTRY";
|
||||
Name = "BTRY";
|
||||
Colour = 0x858505_rgb .Pack();
|
||||
Colour = 0x858505_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_BVBR()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_BVBR";
|
||||
Name = "BVBR";
|
||||
Colour = 0x005000_rgb .Pack();
|
||||
Colour = 0x005000_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_C5()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_C5";
|
||||
Name = "C-5";
|
||||
Colour = 0x2050E0_rgb .Pack();
|
||||
Colour = 0x2050E0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_CAUS()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CAUS";
|
||||
Name = "CAUS";
|
||||
Colour = 0x80FFA0_rgb .Pack();
|
||||
Colour = 0x80FFA0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_CBNW()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CBNW";
|
||||
Name = "BUBW";
|
||||
Colour = 0x2030D0_rgb .Pack();
|
||||
Colour = 0x2030D0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_CFLM()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_HFLM";
|
||||
Name = "CFLM";
|
||||
Colour = 0x8080FF_rgb .Pack();
|
||||
Colour = 0x8080FF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
@ -50,7 +50,7 @@ void Element::Element_CFLM()
|
||||
|
||||
static int graphics(GRAPHICS_FUNC_ARGS)
|
||||
{
|
||||
auto color = RGB<uint8_t>::Unpack(Renderer::clfmTableAt(cpart->life / 2));
|
||||
RGB<uint8_t> color = Renderer::clfmTableAt(cpart->life / 2);
|
||||
*colr = color.Red;
|
||||
*colg = color.Green;
|
||||
*colb = color.Blue;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_CLNE()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CLNE";
|
||||
Name = "CLNE";
|
||||
Colour = 0xFFD010_rgb .Pack();
|
||||
Colour = 0xFFD010_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_CLST()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CLST";
|
||||
Name = "CLST";
|
||||
Colour = 0xE4A4A4_rgb .Pack();
|
||||
Colour = 0xE4A4A4_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_CNCT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CNCT";
|
||||
Name = "CNCT";
|
||||
Colour = 0xC0C0C0_rgb .Pack();
|
||||
Colour = 0xC0C0C0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_CO2()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CO2";
|
||||
Name = "CO2";
|
||||
Colour = 0x666666_rgb .Pack();
|
||||
Colour = 0x666666_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_COAL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_COAL";
|
||||
Name = "COAL";
|
||||
Colour = 0x222222_rgb .Pack();
|
||||
Colour = 0x222222_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_CONV()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CONV";
|
||||
Name = "CONV";
|
||||
Colour = 0x0AAB0A_rgb .Pack();
|
||||
Colour = 0x0AAB0A_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_CRAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CRAY";
|
||||
Name = "CRAY";
|
||||
Colour = 0xBBFF00_rgb .Pack();
|
||||
Colour = 0xBBFF00_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_CRMC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_CRMC";
|
||||
Name = "CRMC";
|
||||
Colour = 0xD6D1D4_rgb .Pack();
|
||||
Colour = 0xD6D1D4_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_DCEL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DCEL";
|
||||
Name = "DCEL";
|
||||
Colour = 0x99CC00_rgb .Pack();
|
||||
Colour = 0x99CC00_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_DESL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DESL";
|
||||
Name = "DESL";
|
||||
Colour = 0x440000_rgb .Pack();
|
||||
Colour = 0x440000_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_DEST()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DEST";
|
||||
Name = "DEST";
|
||||
Colour = 0xFF3311_rgb .Pack();
|
||||
Colour = 0xFF3311_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_DEUT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DEUT";
|
||||
Name = "DEUT";
|
||||
Colour = 0x00153F_rgb .Pack();
|
||||
Colour = 0x00153F_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_DLAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DLAY";
|
||||
Name = "DLAY";
|
||||
Colour = 0x753590_rgb .Pack();
|
||||
Colour = 0x753590_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWERED;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_DMG()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DMG";
|
||||
Name = "DMG";
|
||||
Colour = 0x88FF88_rgb .Pack();
|
||||
Colour = 0x88FF88_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_DMND()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DMND";
|
||||
Name = "DMND";
|
||||
Colour = 0xCCFFFF_rgb .Pack();
|
||||
Colour = 0xCCFFFF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_DRAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DRAY";
|
||||
Name = "DRAY";
|
||||
Colour = 0xFFAA22_rgb .Pack();
|
||||
Colour = 0xFFAA22_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_DRIC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DRIC";
|
||||
Name = "DRIC";
|
||||
Colour = 0xE0E0E0_rgb .Pack();
|
||||
Colour = 0xE0E0E0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_DSTW()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DSTW";
|
||||
Name = "DSTW";
|
||||
Colour = 0x1020C0_rgb .Pack();
|
||||
Colour = 0x1020C0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_DTEC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DTEC";
|
||||
Name = "DTEC";
|
||||
Colour = 0xFD9D18_rgb .Pack();
|
||||
Colour = 0xFD9D18_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SENSOR;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_DUST()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DUST";
|
||||
Name = "DUST";
|
||||
Colour = 0xFFE0A0_rgb .Pack();
|
||||
Colour = 0xFFE0A0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_DYST()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_DYST";
|
||||
Name = "DYST";
|
||||
Colour = 0xBBB0A0_rgb .Pack();
|
||||
Colour = 0xBBB0A0_rgb;
|
||||
MenuVisible = 0;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_E116()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_116";
|
||||
Name = "EQVE";
|
||||
Colour = 0xFFE0A0_rgb .Pack();
|
||||
Colour = 0xFFE0A0_rgb;
|
||||
MenuVisible = 0;
|
||||
MenuSection = SC_CRACKER2;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_E146()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_146";
|
||||
Name = "BRAN";
|
||||
Colour = 0xCCCC00_rgb .Pack();
|
||||
Colour = 0xCCCC00_rgb;
|
||||
MenuVisible = 0;
|
||||
MenuSection = SC_LIFE;
|
||||
Enabled = 0;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_ELEC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ELEC";
|
||||
Name = "ELEC";
|
||||
Colour = 0xDFEFFF_rgb .Pack();
|
||||
Colour = 0xDFEFFF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_EMBR()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_EMBR";
|
||||
Name = "EMBR";
|
||||
Colour = 0xFFF288_rgb .Pack();
|
||||
Colour = 0xFFF288_rgb;
|
||||
MenuVisible = 0;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_EMP()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_EMP";
|
||||
Name = "EMP";
|
||||
Colour = 0x66AAFF_rgb .Pack();
|
||||
Colour = 0x66AAFF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_ETRD()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ETRD";
|
||||
Name = "ETRD";
|
||||
Colour = 0x404040_rgb .Pack();
|
||||
Colour = 0x404040_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_ELEC;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_EXOT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_EXOT";
|
||||
Name = "EXOT";
|
||||
Colour = 0x247BFE_rgb .Pack();
|
||||
Colour = 0x247BFE_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -15,7 +15,7 @@ void Element::Element_FIGH()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FIGH";
|
||||
Name = "FIGH";
|
||||
Colour = 0xFFE0A0_rgb .Pack();
|
||||
Colour = 0xFFE0A0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SPECIAL;
|
||||
Enabled = 1;
|
||||
|
@ -9,7 +9,7 @@ void Element::Element_FILT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FILT";
|
||||
Name = "FILT";
|
||||
Colour = 0x000056_rgb .Pack();
|
||||
Colour = 0x000056_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -10,7 +10,7 @@ void Element::Element_FIRE()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FIRE";
|
||||
Name = "FIRE";
|
||||
Colour = 0xFF1000_rgb .Pack();
|
||||
Colour = 0xFF1000_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
@ -353,7 +353,7 @@ static int updateLegacy(UPDATE_FUNC_ARGS)
|
||||
|
||||
static int graphics(GRAPHICS_FUNC_ARGS)
|
||||
{
|
||||
auto color = RGB<uint8_t>::Unpack(Renderer::flameTableAt(cpart->life));
|
||||
RGB<uint8_t> color = Renderer::flameTableAt(cpart->life);
|
||||
*colr = color.Red;
|
||||
*colg = color.Green;
|
||||
*colb = color.Blue;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_FIRW()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FIRW";
|
||||
Name = "FIRW";
|
||||
Colour = 0xFFA040_rgb .Pack();
|
||||
Colour = 0xFFA040_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
@ -87,7 +87,7 @@ static int update(UPDATE_FUNC_ARGS)
|
||||
}
|
||||
else //if (parts[i].tmp>=2)
|
||||
{
|
||||
unsigned col = Renderer::firwTableAt(sim->rng.between(0, 199));
|
||||
unsigned col = Renderer::firwTableAt(sim->rng.between(0, 199)).Pack();
|
||||
for (int n=0; n<40; n++)
|
||||
{
|
||||
np = sim->create_part(-3, x, y, PT_EMBR);
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FOG()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FOG";
|
||||
Name = "FOG";
|
||||
Colour = 0xAAAAAA_rgb .Pack();
|
||||
Colour = 0xAAAAAA_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FRAY()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FRAY";
|
||||
Name = "FRAY";
|
||||
Colour = 0x00BBFF_rgb .Pack();
|
||||
Colour = 0x00BBFF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FRME()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FRME";
|
||||
Name = "FRME";
|
||||
Colour = 0x999988_rgb .Pack();
|
||||
Colour = 0x999988_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FRZW()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FRZW";
|
||||
Name = "FRZW";
|
||||
Colour = 0x1020C0_rgb .Pack();
|
||||
Colour = 0x1020C0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_CRACKER2;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FRZZ()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FRZZ";
|
||||
Name = "FRZZ";
|
||||
Colour = 0xC0E0FF_rgb .Pack();
|
||||
Colour = 0xC0E0FF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FSEP()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FSEP";
|
||||
Name = "FSEP";
|
||||
Colour = 0x63AD5F_rgb .Pack();
|
||||
Colour = 0x63AD5F_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_FUSE()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FUSE";
|
||||
Name = "FUSE";
|
||||
Colour = 0x0A5706_rgb .Pack();
|
||||
Colour = 0x0A5706_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_FWRK()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_FWRK";
|
||||
Name = "FWRK";
|
||||
Colour = 0x666666_rgb .Pack();
|
||||
Colour = 0x666666_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_GAS()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GAS";
|
||||
Name = "GAS";
|
||||
Colour = 0xE0FF20_rgb .Pack();
|
||||
Colour = 0xE0FF20_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_GBMB()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GBMB";
|
||||
Name = "GBMB";
|
||||
Colour = 0x1144BB_rgb .Pack();
|
||||
Colour = 0x1144BB_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_FORCE;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_GEL()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GEL";
|
||||
Name = "GEL";
|
||||
Colour = 0xFF9900_rgb .Pack();
|
||||
Colour = 0xFF9900_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_GLAS()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GLAS";
|
||||
Name = "GLAS";
|
||||
Colour = 0x404040_rgb .Pack();
|
||||
Colour = 0x404040_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_GLOW()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GLOW";
|
||||
Name = "GLOW";
|
||||
Colour = 0x445464_rgb .Pack();
|
||||
Colour = 0x445464_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_LIQUID;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_GOLD()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GOLD";
|
||||
Name = "GOLD";
|
||||
Colour = 0xDCAD2C_rgb .Pack();
|
||||
Colour = 0xDCAD2C_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_GOO()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GOO";
|
||||
Name = "GOO";
|
||||
Colour = 0x804000_rgb .Pack();
|
||||
Colour = 0x804000_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_GPMP()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GPMP";
|
||||
Name = "GPMP";
|
||||
Colour = 0x0A3B3B_rgb .Pack();
|
||||
Colour = 0x0A3B3B_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWERED;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_GRAV()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GRAV";
|
||||
Name = "GRAV";
|
||||
Colour = 0x202020_rgb .Pack();
|
||||
Colour = 0x202020_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWDERS;
|
||||
Enabled = 1;
|
||||
|
@ -8,7 +8,7 @@ void Element::Element_GRVT()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GRVT";
|
||||
Name = "GRVT";
|
||||
Colour = 0x00EE76_rgb .Pack();
|
||||
Colour = 0x00EE76_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_NUCLEAR;
|
||||
Enabled = 1;
|
||||
|
@ -4,7 +4,7 @@ void Element::Element_GUNP()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_GUNP";
|
||||
Name = "GUN";
|
||||
Colour = 0xC0C0D0_rgb .Pack();
|
||||
Colour = 0xC0C0D0_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_EXPLOSIVE;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_H2()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_H2";
|
||||
Name = "HYGN";
|
||||
Colour = 0x5070FF_rgb .Pack();
|
||||
Colour = 0x5070FF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_GAS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_HEAC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_HEAC";
|
||||
Name = "HEAC";
|
||||
Colour = 0xCB6351_rgb .Pack();
|
||||
Colour = 0xCB6351_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
@ -7,7 +7,7 @@ void Element::Element_HSWC()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_HSWC";
|
||||
Name = "HSWC";
|
||||
Colour = 0x3B0A0A_rgb .Pack();
|
||||
Colour = 0x3B0A0A_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_POWERED;
|
||||
Enabled = 1;
|
||||
|
@ -6,7 +6,7 @@ void Element::Element_ICEI()
|
||||
{
|
||||
Identifier = "DEFAULT_PT_ICEI";
|
||||
Name = "ICE";
|
||||
Colour = 0xA0C0FF_rgb .Pack();
|
||||
Colour = 0xA0C0FF_rgb;
|
||||
MenuVisible = 1;
|
||||
MenuSection = SC_SOLIDS;
|
||||
Enabled = 1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user