diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index 75c8b984c..eac313155 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -1130,7 +1130,7 @@ void GameSave::readOPS(const std::vector &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 &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 &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 &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; } } diff --git a/src/debug/ElementPopulation.cpp b/src/debug/ElementPopulation.cpp index 7b08afc08..ecfe30aee 100644 --- a/src/debug/ElementPopulation.cpp +++ b/src/debug/ElementPopulation.cpp @@ -55,7 +55,7 @@ void ElementPopulationDebug::Draw() auto barSize = int(count * scale - 0.5f); int barX = bars;//*2; - auto colour = RGB::Unpack(sim->elements[i].Colour); + RGB 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]) diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp index 38ffb381d..a04a9b51b 100644 --- a/src/graphics/Graphics.cpp +++ b/src/graphics/Graphics.cpp @@ -464,9 +464,9 @@ bool Graphics::GradientStop::operator <(const GradientStop &other) const return point < other.point; } -std::vector Graphics::Gradient(std::vector stops, int resolution) +std::vector> Graphics::Gradient(std::vector stops, int resolution) { - std::vector table(resolution, 0); + std::vector> table(resolution, 0x000000_rgb); if (stops.size() >= 2) { std::sort(stops.begin(), stops.end()); @@ -485,13 +485,7 @@ std::vector Graphics::Gradient(std::vector stops, int resol auto &left = stops[stop]; auto &right = stops[stop + 1]; auto f = (point - left.point) / (right.point - left.point); - auto leftColor = RGB::Unpack(left.color); - auto rightColor = RGB::Unpack(right.color); - table[i] = RGB( - 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; diff --git a/src/graphics/Graphics.h b/src/graphics/Graphics.h index 726b0b6fd..8ee6d7343 100644 --- a/src/graphics/Graphics.h +++ b/src/graphics/Graphics.h @@ -84,12 +84,12 @@ public: struct GradientStop { - pixel color; + RGB color; float point; bool operator <(const GradientStop &other) const; }; - static std::vector Gradient(std::vector stops, int resolution); + static std::vector> Gradient(std::vector stops, int resolution); //Font/text metrics [[deprecated("Use TextSize().X")]] diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 3cc41b193..8ca8edcfb 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -19,8 +19,8 @@ std::unique_ptr Renderer::WallIcon(int wallID, Vec2 size) return nullptr; wall_type const &wtype = wtypes[wallID]; - RGB primary = RGB::Unpack(wtype.colour); - RGB secondary = RGB::Unpack(wtype.eglow); + RGB primary = wtype.colour; + RGB secondary = wtype.eglow; auto texture = std::make_unique(size); switch (wtype.drawstyle) @@ -209,7 +209,7 @@ void Renderer::render_parts() //Defaults pixel_mode = 0 | PMODE_FLAT; cola = 255; - auto colour = RGB::Unpack(elements[t].Colour); + RGB 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::Unpack(heatTableAt(int((sim->parts[i].temp - min_temp) / (max_temp - min_temp) * 1024))); + RGB 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::Unpack(elements[cplayer->elem].Colour); + RGB 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(0, 0, 0); + auto c = 0x000000_rgb; for (y=0; y= UI_WALLCOUNT) continue; unsigned char powered = sim->emap[y][x]; - auto prgb = RGB::Unpack(sim->wtypes[wt].colour); - auto grgb = RGB::Unpack(sim->wtypes[wt].eglow); + RGB prgb = sim->wtypes[wt].colour; + RGB 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::Unpack(sim->wtypes[wt].eglow); + RGB 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::Unpack(Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024))); + RGB color = Renderer::heatTableAt(int((temp - min_temp) / (max_temp - min_temp) * 1024)); color.Red *= 0.7f; color.Green *= 0.7f; color.Blue *= 0.7f; diff --git a/src/graphics/Renderer.h b/src/graphics/Renderer.h index 9fc1206d0..92d057248 100644 --- a/src/graphics/Renderer.h +++ b/src/graphics/Renderer.h @@ -157,8 +157,8 @@ public: ~Renderer(); #define RENDERER_TABLE(name) \ - static std::vector name; \ - static inline pixel name ## At(int index) \ + static std::vector> name; \ + static inline RGB name ## At(int index) \ { \ auto size = int(name.size()); \ if (index < 0) index = 0; \ diff --git a/src/graphics/RendererBasic.cpp b/src/graphics/RendererBasic.cpp index de747a822..dd5fdb022 100644 --- a/src/graphics/RendererBasic.cpp +++ b/src/graphics/RendererBasic.cpp @@ -20,14 +20,7 @@ void Renderer::RenderBegin() { for (int i = 0; i < VIDXRES*YRES; i++) { - auto rgb = RGB::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::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::Unpack(dst[ny*(VIDXRES)+nx]); - t.Red += RGB::Unpack(src[ry*(VIDXRES)+rx]).Red; - t.Green += RGB::Unpack(src[gy*(VIDXRES)+gx]).Green; - t.Blue += RGB::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::Unpack(src[ry*(VIDXRES)+rx]).Red + t.Red); + t.Green = std::min(0xFF, (int)RGB::Unpack(src[gy*(VIDXRES)+gx]).Green + t.Green); + t.Blue = std::min(0xFF, (int)RGB::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 Renderer::flameTable; -std::vector Renderer::plasmaTable; -std::vector Renderer::heatTable; -std::vector Renderer::clfmTable; -std::vector Renderer::firwTable; +std::vector> Renderer::flameTable; +std::vector> Renderer::plasmaTable; +std::vector> Renderer::heatTable; +std::vector> Renderer::clfmTable; +std::vector> 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); } } diff --git a/src/gui/game/GameModel.cpp b/src/gui/game/GameModel.cpp index 595f75fcd..2d0f89e30 100644 --- a/src/gui/game/GameModel.cpp +++ b/src/gui/game/GameModel.cpp @@ -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::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::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::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::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::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::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::Unpack(sim->tools[i].Colour), + sim->tools[i].Colour, sim->tools[i].Identifier ); menuList[SC_TOOL]->AddTool(tempTool); diff --git a/src/gui/interface/Slider.cpp b/src/gui/interface/Slider.cpp index 250372c66..4d612eb3a 100644 --- a/src/gui/interface/Slider.cpp +++ b/src/gui/interface/Slider.cpp @@ -68,8 +68,8 @@ void Slider::SetColour(Colour col1, Colour col2) this->col1 = col1; this->col2 = col2; bgGradient = Graphics::Gradient({ - { RGB(col1.Red, col1.Green, col1.Blue).Pack(), 0.f }, - { RGB(col2.Red, col2.Green, col2.Blue).Pack(), 1.f }, + { RGB(col1.Red, col1.Green, col1.Blue), 0.f }, + { RGB(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::Unpack(bgGradient[i - 3]); + RGB color = bgGradient[i - 3]; g->blendpixel(screenPos.X+i+2, screenPos.Y+j+2, color.Red, color.Green, color.Blue, 255); } } diff --git a/src/gui/interface/Slider.h b/src/gui/interface/Slider.h index 19bcbeec7..25bee8b3d 100644 --- a/src/gui/interface/Slider.h +++ b/src/gui/interface/Slider.h @@ -10,7 +10,7 @@ class Slider : public ui::Component int sliderSteps; int sliderPosition; bool isMouseDown; - std::vector bgGradient; + std::vector> bgGradient; struct SliderAction { diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index a85286be8..a378a51be 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -1865,19 +1865,10 @@ int LuaScriptInterface::simulation_decoColor(lua_State * l) color = RGBA::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; diff --git a/src/simulation/BuiltinGOL.h b/src/simulation/BuiltinGOL.h index cb3158132..9a4f7c959 100644 --- a/src/simulation/BuiltinGOL.h +++ b/src/simulation/BuiltinGOL.h @@ -8,7 +8,7 @@ struct BuiltinGOL String name; int oldtype; int ruleset; - pixel colour, colour2; + RGB colour, colour2; int goltype; String description; }; diff --git a/src/simulation/Element.cpp b/src/simulation/Element.cpp index 2a0de039b..2ca1b3b22 100644 --- a/src/simulation/Element.cpp +++ b/src/simulation/Element.cpp @@ -4,7 +4,7 @@ Element::Element(): Identifier("DEFAULT_INVALID"), Name(""), - Colour(0xFF00FF_rgb .Pack()), + Colour(0xFF00FF_rgb), MenuVisible(0), MenuSection(0), Enabled(0), diff --git a/src/simulation/Element.h b/src/simulation/Element.h index 28f7fa2fd..8610273bd 100644 --- a/src/simulation/Element.h +++ b/src/simulation/Element.h @@ -15,7 +15,7 @@ class Element public: ByteString Identifier; String Name; - pixel Colour; + RGB Colour; int MenuVisible; int MenuSection; int Enabled; diff --git a/src/simulation/SimTool.cpp b/src/simulation/SimTool.cpp index a0e4629d4..e25f579ba 100644 --- a/src/simulation/SimTool.cpp +++ b/src/simulation/SimTool.cpp @@ -10,7 +10,7 @@ SimTool::SimTool(): Identifier("DEFAULT_TOOL_INVALID"), Name(""), -Colour(0xFFFFFF_rgb .Pack()), +Colour(0xFFFFFF_rgb), Description("NULL Tool, does NOTHING") { } diff --git a/src/simulation/SimTool.h b/src/simulation/SimTool.h index 4f0ef9248..e69f3bd3f 100644 --- a/src/simulation/SimTool.h +++ b/src/simulation/SimTool.h @@ -9,7 +9,7 @@ class SimTool public: ByteString Identifier; String Name; - pixel Colour; + RGB Colour; String Description; int (*Perform)(Simulation * sim, Particle * cpart, int x, int y, int brushX, int brushY, float strength); diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 238593256..7065e77dd 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -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::Unpack(elements[t].Colour); + RGB 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; } diff --git a/src/simulation/SimulationData.cpp b/src/simulation/SimulationData.cpp index 35261bfc0..db996a175 100644 --- a/src/simulation/SimulationData.cpp +++ b/src/simulation/SimulationData.cpp @@ -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 LoadWalls() { return std::vector{ - {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.")}, }; } diff --git a/src/simulation/WallType.h b/src/simulation/WallType.h index 87ef3eec7..62f19b63a 100644 --- a/src/simulation/WallType.h +++ b/src/simulation/WallType.h @@ -7,8 +7,8 @@ class VideoBuffer; struct wall_type { - pixel colour; - pixel eglow; // if emap set, add this to fire glow + RGB colour; + RGB eglow; // if emap set, add this to fire glow int drawstyle; std::unique_ptr (*textureGen)(int, Vec2); String name; diff --git a/src/simulation/elements/ACEL.cpp b/src/simulation/elements/ACEL.cpp index 5798d9783..042408633 100644 --- a/src/simulation/elements/ACEL.cpp +++ b/src/simulation/elements/ACEL.cpp @@ -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; diff --git a/src/simulation/elements/ACID.cpp b/src/simulation/elements/ACID.cpp index 4af694968..050ebf4c3 100644 --- a/src/simulation/elements/ACID.cpp +++ b/src/simulation/elements/ACID.cpp @@ -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; diff --git a/src/simulation/elements/AMTR.cpp b/src/simulation/elements/AMTR.cpp index 9a51de962..bb4648358 100644 --- a/src/simulation/elements/AMTR.cpp +++ b/src/simulation/elements/AMTR.cpp @@ -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; diff --git a/src/simulation/elements/ANAR.cpp b/src/simulation/elements/ANAR.cpp index 9e1595611..969038926 100644 --- a/src/simulation/elements/ANAR.cpp +++ b/src/simulation/elements/ANAR.cpp @@ -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; diff --git a/src/simulation/elements/ARAY.cpp b/src/simulation/elements/ARAY.cpp index 84bee6e2b..a7558d3df 100644 --- a/src/simulation/elements/ARAY.cpp +++ b/src/simulation/elements/ARAY.cpp @@ -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; diff --git a/src/simulation/elements/BANG.cpp b/src/simulation/elements/BANG.cpp index 61345c019..0f3c82592 100644 --- a/src/simulation/elements/BANG.cpp +++ b/src/simulation/elements/BANG.cpp @@ -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; diff --git a/src/simulation/elements/BCLN.cpp b/src/simulation/elements/BCLN.cpp index ef1cda296..2a1135b49 100644 --- a/src/simulation/elements/BCLN.cpp +++ b/src/simulation/elements/BCLN.cpp @@ -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; diff --git a/src/simulation/elements/BCOL.cpp b/src/simulation/elements/BCOL.cpp index 7bdf781b6..f950aeb7a 100644 --- a/src/simulation/elements/BCOL.cpp +++ b/src/simulation/elements/BCOL.cpp @@ -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; diff --git a/src/simulation/elements/BGLA.cpp b/src/simulation/elements/BGLA.cpp index b503dd928..9b02e3da6 100644 --- a/src/simulation/elements/BGLA.cpp +++ b/src/simulation/elements/BGLA.cpp @@ -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; diff --git a/src/simulation/elements/BHOL.cpp b/src/simulation/elements/BHOL.cpp index 56ba4a8e9..250ea082c 100644 --- a/src/simulation/elements/BHOL.cpp +++ b/src/simulation/elements/BHOL.cpp @@ -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; diff --git a/src/simulation/elements/BIZR.cpp b/src/simulation/elements/BIZR.cpp index edc3e51d5..350698ab1 100644 --- a/src/simulation/elements/BIZR.cpp +++ b/src/simulation/elements/BIZR.cpp @@ -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; diff --git a/src/simulation/elements/BIZRG.cpp b/src/simulation/elements/BIZRG.cpp index 8671e8119..012772f92 100644 --- a/src/simulation/elements/BIZRG.cpp +++ b/src/simulation/elements/BIZRG.cpp @@ -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; diff --git a/src/simulation/elements/BIZRS.cpp b/src/simulation/elements/BIZRS.cpp index c3258c499..a8d890991 100644 --- a/src/simulation/elements/BIZRS.cpp +++ b/src/simulation/elements/BIZRS.cpp @@ -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; diff --git a/src/simulation/elements/BMTL.cpp b/src/simulation/elements/BMTL.cpp index a005b40ac..2e00b8c25 100644 --- a/src/simulation/elements/BMTL.cpp +++ b/src/simulation/elements/BMTL.cpp @@ -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; diff --git a/src/simulation/elements/BOMB.cpp b/src/simulation/elements/BOMB.cpp index 8ec3140c5..d530067b7 100644 --- a/src/simulation/elements/BOMB.cpp +++ b/src/simulation/elements/BOMB.cpp @@ -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; diff --git a/src/simulation/elements/BOYL.cpp b/src/simulation/elements/BOYL.cpp index 0c7b33450..8adabe4cf 100644 --- a/src/simulation/elements/BOYL.cpp +++ b/src/simulation/elements/BOYL.cpp @@ -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; diff --git a/src/simulation/elements/BRAY.cpp b/src/simulation/elements/BRAY.cpp index f23bbbb31..24fecff21 100644 --- a/src/simulation/elements/BRAY.cpp +++ b/src/simulation/elements/BRAY.cpp @@ -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; diff --git a/src/simulation/elements/BRCK.cpp b/src/simulation/elements/BRCK.cpp index 786af0904..e8a60fcec 100644 --- a/src/simulation/elements/BRCK.cpp +++ b/src/simulation/elements/BRCK.cpp @@ -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; diff --git a/src/simulation/elements/BREC.cpp b/src/simulation/elements/BREC.cpp index 32b1db882..c577a8ceb 100644 --- a/src/simulation/elements/BREC.cpp +++ b/src/simulation/elements/BREC.cpp @@ -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; diff --git a/src/simulation/elements/BRMT.cpp b/src/simulation/elements/BRMT.cpp index 8f288af3c..19143a6f7 100644 --- a/src/simulation/elements/BRMT.cpp +++ b/src/simulation/elements/BRMT.cpp @@ -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; diff --git a/src/simulation/elements/BTRY.cpp b/src/simulation/elements/BTRY.cpp index d25da8beb..b007e1231 100644 --- a/src/simulation/elements/BTRY.cpp +++ b/src/simulation/elements/BTRY.cpp @@ -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; diff --git a/src/simulation/elements/BVBR.cpp b/src/simulation/elements/BVBR.cpp index 79ea3106a..3a1b26686 100644 --- a/src/simulation/elements/BVBR.cpp +++ b/src/simulation/elements/BVBR.cpp @@ -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; diff --git a/src/simulation/elements/C5.cpp b/src/simulation/elements/C5.cpp index d1fc2b443..2f9e278ba 100644 --- a/src/simulation/elements/C5.cpp +++ b/src/simulation/elements/C5.cpp @@ -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; diff --git a/src/simulation/elements/CAUS.cpp b/src/simulation/elements/CAUS.cpp index bdc73f74a..efa94055e 100644 --- a/src/simulation/elements/CAUS.cpp +++ b/src/simulation/elements/CAUS.cpp @@ -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; diff --git a/src/simulation/elements/CBNW.cpp b/src/simulation/elements/CBNW.cpp index c0f63fae4..83e9bfa48 100644 --- a/src/simulation/elements/CBNW.cpp +++ b/src/simulation/elements/CBNW.cpp @@ -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; diff --git a/src/simulation/elements/CFLM.cpp b/src/simulation/elements/CFLM.cpp index ee467b8b1..d34f9e043 100644 --- a/src/simulation/elements/CFLM.cpp +++ b/src/simulation/elements/CFLM.cpp @@ -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::Unpack(Renderer::clfmTableAt(cpart->life / 2)); + RGB color = Renderer::clfmTableAt(cpart->life / 2); *colr = color.Red; *colg = color.Green; *colb = color.Blue; diff --git a/src/simulation/elements/CLNE.cpp b/src/simulation/elements/CLNE.cpp index 78c0424ac..06c4e9844 100644 --- a/src/simulation/elements/CLNE.cpp +++ b/src/simulation/elements/CLNE.cpp @@ -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; diff --git a/src/simulation/elements/CLST.cpp b/src/simulation/elements/CLST.cpp index b085d97b0..623a54a2e 100644 --- a/src/simulation/elements/CLST.cpp +++ b/src/simulation/elements/CLST.cpp @@ -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; diff --git a/src/simulation/elements/CNCT.cpp b/src/simulation/elements/CNCT.cpp index 7e96b694f..0d56d4d8b 100644 --- a/src/simulation/elements/CNCT.cpp +++ b/src/simulation/elements/CNCT.cpp @@ -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; diff --git a/src/simulation/elements/CO2.cpp b/src/simulation/elements/CO2.cpp index 0b8c4390a..f1605e015 100644 --- a/src/simulation/elements/CO2.cpp +++ b/src/simulation/elements/CO2.cpp @@ -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; diff --git a/src/simulation/elements/COAL.cpp b/src/simulation/elements/COAL.cpp index 1892b98ca..6f8dafbb8 100644 --- a/src/simulation/elements/COAL.cpp +++ b/src/simulation/elements/COAL.cpp @@ -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; diff --git a/src/simulation/elements/CONV.cpp b/src/simulation/elements/CONV.cpp index 0a4448eb7..292fc49ab 100644 --- a/src/simulation/elements/CONV.cpp +++ b/src/simulation/elements/CONV.cpp @@ -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; diff --git a/src/simulation/elements/CRAY.cpp b/src/simulation/elements/CRAY.cpp index 4260bc98d..e68f9b31b 100644 --- a/src/simulation/elements/CRAY.cpp +++ b/src/simulation/elements/CRAY.cpp @@ -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; diff --git a/src/simulation/elements/CRMC.cpp b/src/simulation/elements/CRMC.cpp index b7bd8714a..dc2ae7fa8 100644 --- a/src/simulation/elements/CRMC.cpp +++ b/src/simulation/elements/CRMC.cpp @@ -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; diff --git a/src/simulation/elements/DCEL.cpp b/src/simulation/elements/DCEL.cpp index 88fe6b030..fb13fe891 100644 --- a/src/simulation/elements/DCEL.cpp +++ b/src/simulation/elements/DCEL.cpp @@ -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; diff --git a/src/simulation/elements/DESL.cpp b/src/simulation/elements/DESL.cpp index 07fc5d179..65789ffd4 100644 --- a/src/simulation/elements/DESL.cpp +++ b/src/simulation/elements/DESL.cpp @@ -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; diff --git a/src/simulation/elements/DEST.cpp b/src/simulation/elements/DEST.cpp index 859ebedd3..1f09a87db 100644 --- a/src/simulation/elements/DEST.cpp +++ b/src/simulation/elements/DEST.cpp @@ -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; diff --git a/src/simulation/elements/DEUT.cpp b/src/simulation/elements/DEUT.cpp index d35bd9803..969488d57 100644 --- a/src/simulation/elements/DEUT.cpp +++ b/src/simulation/elements/DEUT.cpp @@ -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; diff --git a/src/simulation/elements/DLAY.cpp b/src/simulation/elements/DLAY.cpp index 00ce16141..2f280f7fb 100644 --- a/src/simulation/elements/DLAY.cpp +++ b/src/simulation/elements/DLAY.cpp @@ -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; diff --git a/src/simulation/elements/DMG.cpp b/src/simulation/elements/DMG.cpp index 2d710e69d..37c29e186 100644 --- a/src/simulation/elements/DMG.cpp +++ b/src/simulation/elements/DMG.cpp @@ -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; diff --git a/src/simulation/elements/DMND.cpp b/src/simulation/elements/DMND.cpp index 570f862e0..b5a8438c1 100644 --- a/src/simulation/elements/DMND.cpp +++ b/src/simulation/elements/DMND.cpp @@ -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; diff --git a/src/simulation/elements/DRAY.cpp b/src/simulation/elements/DRAY.cpp index 4831536a9..78db8e0f6 100644 --- a/src/simulation/elements/DRAY.cpp +++ b/src/simulation/elements/DRAY.cpp @@ -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; diff --git a/src/simulation/elements/DRIC.cpp b/src/simulation/elements/DRIC.cpp index 4dc395246..90cb36b9c 100644 --- a/src/simulation/elements/DRIC.cpp +++ b/src/simulation/elements/DRIC.cpp @@ -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; diff --git a/src/simulation/elements/DSTW.cpp b/src/simulation/elements/DSTW.cpp index 156a7b2ef..b5d8d4b41 100644 --- a/src/simulation/elements/DSTW.cpp +++ b/src/simulation/elements/DSTW.cpp @@ -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; diff --git a/src/simulation/elements/DTEC.cpp b/src/simulation/elements/DTEC.cpp index e79ef3f79..5f0f382cc 100644 --- a/src/simulation/elements/DTEC.cpp +++ b/src/simulation/elements/DTEC.cpp @@ -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; diff --git a/src/simulation/elements/DUST.cpp b/src/simulation/elements/DUST.cpp index 615b09697..7448d3554 100644 --- a/src/simulation/elements/DUST.cpp +++ b/src/simulation/elements/DUST.cpp @@ -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; diff --git a/src/simulation/elements/DYST.cpp b/src/simulation/elements/DYST.cpp index 7ed0c873f..10a7260a8 100644 --- a/src/simulation/elements/DYST.cpp +++ b/src/simulation/elements/DYST.cpp @@ -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; diff --git a/src/simulation/elements/E116.cpp b/src/simulation/elements/E116.cpp index 2672447f3..60aefce9f 100644 --- a/src/simulation/elements/E116.cpp +++ b/src/simulation/elements/E116.cpp @@ -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; diff --git a/src/simulation/elements/E146.cpp b/src/simulation/elements/E146.cpp index fdd78e1f2..6339f1b8d 100644 --- a/src/simulation/elements/E146.cpp +++ b/src/simulation/elements/E146.cpp @@ -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; diff --git a/src/simulation/elements/ELEC.cpp b/src/simulation/elements/ELEC.cpp index ce2e4df79..3c9ce1825 100644 --- a/src/simulation/elements/ELEC.cpp +++ b/src/simulation/elements/ELEC.cpp @@ -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; diff --git a/src/simulation/elements/EMBR.cpp b/src/simulation/elements/EMBR.cpp index 869b566b5..8c0802f04 100644 --- a/src/simulation/elements/EMBR.cpp +++ b/src/simulation/elements/EMBR.cpp @@ -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; diff --git a/src/simulation/elements/EMP.cpp b/src/simulation/elements/EMP.cpp index 7fad5e054..ed78e55c3 100644 --- a/src/simulation/elements/EMP.cpp +++ b/src/simulation/elements/EMP.cpp @@ -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; diff --git a/src/simulation/elements/ETRD.cpp b/src/simulation/elements/ETRD.cpp index b9437b093..5fc3089fd 100644 --- a/src/simulation/elements/ETRD.cpp +++ b/src/simulation/elements/ETRD.cpp @@ -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; diff --git a/src/simulation/elements/EXOT.cpp b/src/simulation/elements/EXOT.cpp index 9a64ece13..f8ff425dc 100644 --- a/src/simulation/elements/EXOT.cpp +++ b/src/simulation/elements/EXOT.cpp @@ -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; diff --git a/src/simulation/elements/FIGH.cpp b/src/simulation/elements/FIGH.cpp index 40027e74b..1f1474862 100644 --- a/src/simulation/elements/FIGH.cpp +++ b/src/simulation/elements/FIGH.cpp @@ -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; diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp index 68a1bd981..d3b3209de 100644 --- a/src/simulation/elements/FILT.cpp +++ b/src/simulation/elements/FILT.cpp @@ -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; diff --git a/src/simulation/elements/FIRE.cpp b/src/simulation/elements/FIRE.cpp index e6b1ab011..b3df41eac 100644 --- a/src/simulation/elements/FIRE.cpp +++ b/src/simulation/elements/FIRE.cpp @@ -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::Unpack(Renderer::flameTableAt(cpart->life)); + RGB color = Renderer::flameTableAt(cpart->life); *colr = color.Red; *colg = color.Green; *colb = color.Blue; diff --git a/src/simulation/elements/FIRW.cpp b/src/simulation/elements/FIRW.cpp index 167e67462..e635cd819 100644 --- a/src/simulation/elements/FIRW.cpp +++ b/src/simulation/elements/FIRW.cpp @@ -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); diff --git a/src/simulation/elements/FOG.cpp b/src/simulation/elements/FOG.cpp index ec5649980..7cc87d951 100644 --- a/src/simulation/elements/FOG.cpp +++ b/src/simulation/elements/FOG.cpp @@ -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; diff --git a/src/simulation/elements/FRAY.cpp b/src/simulation/elements/FRAY.cpp index 3f78d40f1..f4dfc8a78 100644 --- a/src/simulation/elements/FRAY.cpp +++ b/src/simulation/elements/FRAY.cpp @@ -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; diff --git a/src/simulation/elements/FRME.cpp b/src/simulation/elements/FRME.cpp index 3e21711af..2b009faf4 100644 --- a/src/simulation/elements/FRME.cpp +++ b/src/simulation/elements/FRME.cpp @@ -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; diff --git a/src/simulation/elements/FRZW.cpp b/src/simulation/elements/FRZW.cpp index 8664a5064..e6f543841 100644 --- a/src/simulation/elements/FRZW.cpp +++ b/src/simulation/elements/FRZW.cpp @@ -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; diff --git a/src/simulation/elements/FRZZ.cpp b/src/simulation/elements/FRZZ.cpp index 7cd3426be..00fa61b6d 100644 --- a/src/simulation/elements/FRZZ.cpp +++ b/src/simulation/elements/FRZZ.cpp @@ -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; diff --git a/src/simulation/elements/FSEP.cpp b/src/simulation/elements/FSEP.cpp index f00c5f587..e117c01d6 100644 --- a/src/simulation/elements/FSEP.cpp +++ b/src/simulation/elements/FSEP.cpp @@ -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; diff --git a/src/simulation/elements/FUSE.cpp b/src/simulation/elements/FUSE.cpp index dff25cc8c..6a29db774 100644 --- a/src/simulation/elements/FUSE.cpp +++ b/src/simulation/elements/FUSE.cpp @@ -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; diff --git a/src/simulation/elements/FWRK.cpp b/src/simulation/elements/FWRK.cpp index e3ec3bbc9..6a444b666 100644 --- a/src/simulation/elements/FWRK.cpp +++ b/src/simulation/elements/FWRK.cpp @@ -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; diff --git a/src/simulation/elements/GAS.cpp b/src/simulation/elements/GAS.cpp index 5c740c080..0be47c378 100644 --- a/src/simulation/elements/GAS.cpp +++ b/src/simulation/elements/GAS.cpp @@ -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; diff --git a/src/simulation/elements/GBMB.cpp b/src/simulation/elements/GBMB.cpp index abc793bae..0bf40f5d5 100644 --- a/src/simulation/elements/GBMB.cpp +++ b/src/simulation/elements/GBMB.cpp @@ -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; diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp index 55ebe7575..262790a4b 100644 --- a/src/simulation/elements/GEL.cpp +++ b/src/simulation/elements/GEL.cpp @@ -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; diff --git a/src/simulation/elements/GLAS.cpp b/src/simulation/elements/GLAS.cpp index 85f9f2377..3034d94da 100644 --- a/src/simulation/elements/GLAS.cpp +++ b/src/simulation/elements/GLAS.cpp @@ -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; diff --git a/src/simulation/elements/GLOW.cpp b/src/simulation/elements/GLOW.cpp index b18362cb0..b0dfd9bc3 100644 --- a/src/simulation/elements/GLOW.cpp +++ b/src/simulation/elements/GLOW.cpp @@ -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; diff --git a/src/simulation/elements/GOLD.cpp b/src/simulation/elements/GOLD.cpp index 7b475d926..e58843d0c 100644 --- a/src/simulation/elements/GOLD.cpp +++ b/src/simulation/elements/GOLD.cpp @@ -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; diff --git a/src/simulation/elements/GOO.cpp b/src/simulation/elements/GOO.cpp index 93dada462..afdfdb436 100644 --- a/src/simulation/elements/GOO.cpp +++ b/src/simulation/elements/GOO.cpp @@ -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; diff --git a/src/simulation/elements/GPMP.cpp b/src/simulation/elements/GPMP.cpp index 85823d158..d9386749b 100644 --- a/src/simulation/elements/GPMP.cpp +++ b/src/simulation/elements/GPMP.cpp @@ -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; diff --git a/src/simulation/elements/GRAV.cpp b/src/simulation/elements/GRAV.cpp index e888beacf..08e1ee79c 100644 --- a/src/simulation/elements/GRAV.cpp +++ b/src/simulation/elements/GRAV.cpp @@ -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; diff --git a/src/simulation/elements/GRVT.cpp b/src/simulation/elements/GRVT.cpp index 3de2d9841..55fc9608a 100644 --- a/src/simulation/elements/GRVT.cpp +++ b/src/simulation/elements/GRVT.cpp @@ -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; diff --git a/src/simulation/elements/GUNP.cpp b/src/simulation/elements/GUNP.cpp index 83d680884..8f351b485 100644 --- a/src/simulation/elements/GUNP.cpp +++ b/src/simulation/elements/GUNP.cpp @@ -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; diff --git a/src/simulation/elements/H2.cpp b/src/simulation/elements/H2.cpp index 39c16eb3f..2b959c5f3 100644 --- a/src/simulation/elements/H2.cpp +++ b/src/simulation/elements/H2.cpp @@ -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; diff --git a/src/simulation/elements/HEAC.cpp b/src/simulation/elements/HEAC.cpp index f5587eb4b..9fdb10928 100644 --- a/src/simulation/elements/HEAC.cpp +++ b/src/simulation/elements/HEAC.cpp @@ -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; diff --git a/src/simulation/elements/HSWC.cpp b/src/simulation/elements/HSWC.cpp index 7e6085068..8e6fba41f 100644 --- a/src/simulation/elements/HSWC.cpp +++ b/src/simulation/elements/HSWC.cpp @@ -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; diff --git a/src/simulation/elements/ICEI.cpp b/src/simulation/elements/ICEI.cpp index f58d8a20c..8621adf38 100644 --- a/src/simulation/elements/ICEI.cpp +++ b/src/simulation/elements/ICEI.cpp @@ -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; diff --git a/src/simulation/elements/IGNT.cpp b/src/simulation/elements/IGNT.cpp index 01f7d3ae7..b52369e2b 100644 --- a/src/simulation/elements/IGNT.cpp +++ b/src/simulation/elements/IGNT.cpp @@ -6,7 +6,7 @@ void Element::Element_IGNT() { Identifier = "DEFAULT_PT_IGNT"; Name = "IGNC"; - Colour = 0xC0B050_rgb .Pack(); + Colour = 0xC0B050_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/INSL.cpp b/src/simulation/elements/INSL.cpp index 4e07cd862..65a48f12c 100644 --- a/src/simulation/elements/INSL.cpp +++ b/src/simulation/elements/INSL.cpp @@ -4,7 +4,7 @@ void Element::Element_INSL() { Identifier = "DEFAULT_PT_INSL"; Name = "INSL"; - Colour = 0x9EA3B6_rgb .Pack(); + Colour = 0x9EA3B6_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/INST.cpp b/src/simulation/elements/INST.cpp index 9688eba07..d93e05973 100644 --- a/src/simulation/elements/INST.cpp +++ b/src/simulation/elements/INST.cpp @@ -4,7 +4,7 @@ void Element::Element_INST() { Identifier = "DEFAULT_PT_INST"; Name = "INST"; - Colour = 0x404039_rgb .Pack(); + Colour = 0x404039_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/INVIS.cpp b/src/simulation/elements/INVIS.cpp index f135149f8..8966ab860 100644 --- a/src/simulation/elements/INVIS.cpp +++ b/src/simulation/elements/INVIS.cpp @@ -7,7 +7,7 @@ void Element::Element_INVIS() { Identifier = "DEFAULT_PT_INVIS"; Name = "INVS"; - Colour = 0x00CCCC_rgb .Pack(); + Colour = 0x00CCCC_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/INWR.cpp b/src/simulation/elements/INWR.cpp index 3800e125a..9c830fa44 100644 --- a/src/simulation/elements/INWR.cpp +++ b/src/simulation/elements/INWR.cpp @@ -4,7 +4,7 @@ void Element::Element_INWR() { Identifier = "DEFAULT_PT_INWR"; Name = "INWR"; - Colour = 0x544141_rgb .Pack(); + Colour = 0x544141_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/IRON.cpp b/src/simulation/elements/IRON.cpp index af5ad8344..b68a71618 100644 --- a/src/simulation/elements/IRON.cpp +++ b/src/simulation/elements/IRON.cpp @@ -6,7 +6,7 @@ void Element::Element_IRON() { Identifier = "DEFAULT_PT_IRON"; Name = "IRON"; - Colour = 0x707070_rgb .Pack(); + Colour = 0x707070_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/ISOZ.cpp b/src/simulation/elements/ISOZ.cpp index 8274e8c92..62c0cfc45 100644 --- a/src/simulation/elements/ISOZ.cpp +++ b/src/simulation/elements/ISOZ.cpp @@ -6,7 +6,7 @@ void Element::Element_ISOZ() { Identifier = "DEFAULT_PT_ISOZ"; Name = "ISOZ"; - Colour = 0xAA30D0_rgb .Pack(); + Colour = 0xAA30D0_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/ISZS.cpp b/src/simulation/elements/ISZS.cpp index f969f64c6..fc9146b18 100644 --- a/src/simulation/elements/ISZS.cpp +++ b/src/simulation/elements/ISZS.cpp @@ -6,7 +6,7 @@ void Element::Element_ISZS() { Identifier = "DEFAULT_PT_ISZS"; Name = "ISZS"; - Colour = 0x662089_rgb .Pack(); + Colour = 0x662089_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/LAVA.cpp b/src/simulation/elements/LAVA.cpp index 30a8fe453..0dcd4c3b5 100644 --- a/src/simulation/elements/LAVA.cpp +++ b/src/simulation/elements/LAVA.cpp @@ -8,7 +8,7 @@ void Element::Element_LAVA() { Identifier = "DEFAULT_PT_LAVA"; Name = "LAVA"; - Colour = 0xE05010_rgb .Pack(); + Colour = 0xE05010_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/LCRY.cpp b/src/simulation/elements/LCRY.cpp index f1aabb8d2..fa5708290 100644 --- a/src/simulation/elements/LCRY.cpp +++ b/src/simulation/elements/LCRY.cpp @@ -7,7 +7,7 @@ void Element::Element_LCRY() { Identifier = "DEFAULT_PT_LCRY"; Name = "LCRY"; - Colour = 0x505050_rgb .Pack(); + Colour = 0x505050_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/LDTC.cpp b/src/simulation/elements/LDTC.cpp index f2b2f37f0..f4ad432ee 100644 --- a/src/simulation/elements/LDTC.cpp +++ b/src/simulation/elements/LDTC.cpp @@ -7,7 +7,7 @@ void Element::Element_LDTC() { Identifier = "DEFAULT_PT_LDTC"; Name = "LDTC"; - Colour = 0x66ff66_rgb .Pack(); + Colour = 0x66ff66_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/LIFE.cpp b/src/simulation/elements/LIFE.cpp index 77449d48f..184df2f44 100644 --- a/src/simulation/elements/LIFE.cpp +++ b/src/simulation/elements/LIFE.cpp @@ -7,7 +7,7 @@ void Element::Element_LIFE() { Identifier = "DEFAULT_PT_LIFE"; Name = "LIFE"; - Colour = 0x0CAC00_rgb .Pack(); + Colour = 0x0CAC00_rgb; MenuVisible = 0; MenuSection = SC_LIFE; Enabled = 1; @@ -62,8 +62,8 @@ static int graphics(GRAPHICS_FUNC_ARGS) { if (!renderDeco || !ren->decorations_enable) { - colour1 = RGB::Unpack(builtinGol[ruleset].colour); - colour2 = RGB::Unpack(builtinGol[ruleset].colour2); + colour1 = builtinGol[ruleset].colour; + colour2 = builtinGol[ruleset].colour2; renderDeco = true; } ruleset = builtinGol[ruleset].ruleset; @@ -99,8 +99,8 @@ static void create(ELEMENT_CREATE_FUNC_ARGS) sim->parts[i].ctype = v; if (v < NGOL) { - sim->parts[i].dcolour = builtinGol[v].colour; - sim->parts[i].tmp = builtinGol[v].colour2; + sim->parts[i].dcolour = builtinGol[v].colour.Pack(); + sim->parts[i].tmp = builtinGol[v].colour2.Pack(); v = builtinGol[v].ruleset; } else if (!skipLookup) diff --git a/src/simulation/elements/LIGH.cpp b/src/simulation/elements/LIGH.cpp index 2d6d00a58..4869cc4b6 100644 --- a/src/simulation/elements/LIGH.cpp +++ b/src/simulation/elements/LIGH.cpp @@ -9,7 +9,7 @@ void Element::Element_LIGH() { Identifier = "DEFAULT_PT_LIGH"; Name = "LIGH"; - Colour = 0xFFFFC0_rgb .Pack(); + Colour = 0xFFFFC0_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/LITH.cpp b/src/simulation/elements/LITH.cpp index 55cca6eaf..e25ce10aa 100644 --- a/src/simulation/elements/LITH.cpp +++ b/src/simulation/elements/LITH.cpp @@ -7,7 +7,7 @@ void Element::Element_LITH() { Identifier = "DEFAULT_PT_LITH"; Name = "LITH"; - Colour = 0xB6AABF_rgb .Pack(); + Colour = 0xB6AABF_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/LNTG.cpp b/src/simulation/elements/LNTG.cpp index b6303933a..3b43a7878 100644 --- a/src/simulation/elements/LNTG.cpp +++ b/src/simulation/elements/LNTG.cpp @@ -4,7 +4,7 @@ void Element::Element_LNTG() { Identifier = "DEFAULT_PT_LNTG"; Name = "LN2"; - Colour = 0x80A0DF_rgb .Pack(); + Colour = 0x80A0DF_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/LO2.cpp b/src/simulation/elements/LO2.cpp index 41e975408..430512cb8 100644 --- a/src/simulation/elements/LO2.cpp +++ b/src/simulation/elements/LO2.cpp @@ -4,7 +4,7 @@ void Element::Element_LO2() { Identifier = "DEFAULT_PT_LO2"; Name = "LOXY"; - Colour = 0x80A0EF_rgb .Pack(); + Colour = 0x80A0EF_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/LOLZ.cpp b/src/simulation/elements/LOLZ.cpp index e35cdab89..aa9ee84ab 100644 --- a/src/simulation/elements/LOLZ.cpp +++ b/src/simulation/elements/LOLZ.cpp @@ -4,7 +4,7 @@ void Element::Element_LOLZ() { Identifier = "DEFAULT_PT_LOLZ"; Name = "LOLZ"; - Colour = 0x569212_rgb .Pack(); + Colour = 0x569212_rgb; MenuVisible = 1; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/LOVE.cpp b/src/simulation/elements/LOVE.cpp index d610588ba..f679b7999 100644 --- a/src/simulation/elements/LOVE.cpp +++ b/src/simulation/elements/LOVE.cpp @@ -4,7 +4,7 @@ void Element::Element_LOVE() { Identifier = "DEFAULT_PT_LOVE"; Name = "LOVE"; - Colour = 0xFF30FF_rgb .Pack(); + Colour = 0xFF30FF_rgb; MenuVisible = 1; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/LRBD.cpp b/src/simulation/elements/LRBD.cpp index 990644438..b1b46d502 100644 --- a/src/simulation/elements/LRBD.cpp +++ b/src/simulation/elements/LRBD.cpp @@ -4,7 +4,7 @@ void Element::Element_LRBD() { Identifier = "DEFAULT_PT_LRBD"; Name = "LRBD"; - Colour = 0xAAAAAA_rgb .Pack(); + Colour = 0xAAAAAA_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/LSNS.cpp b/src/simulation/elements/LSNS.cpp index 70f898493..6521ba8f4 100644 --- a/src/simulation/elements/LSNS.cpp +++ b/src/simulation/elements/LSNS.cpp @@ -6,7 +6,7 @@ void Element::Element_LSNS() { Identifier = "DEFAULT_PT_LSNS"; Name = "LSNS"; - Colour = 0x336699_rgb .Pack(); + Colour = 0x336699_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/MERC.cpp b/src/simulation/elements/MERC.cpp index 34ef379fc..b7d5e79a8 100644 --- a/src/simulation/elements/MERC.cpp +++ b/src/simulation/elements/MERC.cpp @@ -6,7 +6,7 @@ void Element::Element_MERC() { Identifier = "DEFAULT_PT_MERC"; Name = "MERC"; - Colour = 0x736B6D_rgb .Pack(); + Colour = 0x736B6D_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/METL.cpp b/src/simulation/elements/METL.cpp index 5633e14fe..bcb3656ef 100644 --- a/src/simulation/elements/METL.cpp +++ b/src/simulation/elements/METL.cpp @@ -4,7 +4,7 @@ void Element::Element_METL() { Identifier = "DEFAULT_PT_METL"; Name = "METL"; - Colour = 0x404060_rgb .Pack(); + Colour = 0x404060_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/MORT.cpp b/src/simulation/elements/MORT.cpp index af352fa71..b2ee36d3c 100644 --- a/src/simulation/elements/MORT.cpp +++ b/src/simulation/elements/MORT.cpp @@ -6,7 +6,7 @@ void Element::Element_MORT() { Identifier = "DEFAULT_PT_MORT"; Name = "MORT"; - Colour = 0xE0E0E0_rgb .Pack(); + Colour = 0xE0E0E0_rgb; MenuVisible = 1; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/MWAX.cpp b/src/simulation/elements/MWAX.cpp index 01621bf39..2a2c024fe 100644 --- a/src/simulation/elements/MWAX.cpp +++ b/src/simulation/elements/MWAX.cpp @@ -4,7 +4,7 @@ void Element::Element_MWAX() { Identifier = "DEFAULT_PT_MWAX"; Name = "MWAX"; - Colour = 0xE0E0AA_rgb .Pack(); + Colour = 0xE0E0AA_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/NBHL.cpp b/src/simulation/elements/NBHL.cpp index bd18cd665..1aa5a894b 100644 --- a/src/simulation/elements/NBHL.cpp +++ b/src/simulation/elements/NBHL.cpp @@ -6,7 +6,7 @@ void Element::Element_NBHL() { Identifier = "DEFAULT_PT_NBHL"; Name = "BHOL"; - Colour = 0x202020_rgb .Pack(); + Colour = 0x202020_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/NBLE.cpp b/src/simulation/elements/NBLE.cpp index f2bfbd115..e2b9daffe 100644 --- a/src/simulation/elements/NBLE.cpp +++ b/src/simulation/elements/NBLE.cpp @@ -6,7 +6,7 @@ void Element::Element_NBLE() { Identifier = "DEFAULT_PT_NBLE"; Name = "NBLE"; - Colour = 0xEB4917_rgb .Pack(); + Colour = 0xEB4917_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/NEUT.cpp b/src/simulation/elements/NEUT.cpp index dfccc6602..2e1289603 100644 --- a/src/simulation/elements/NEUT.cpp +++ b/src/simulation/elements/NEUT.cpp @@ -10,7 +10,7 @@ void Element::Element_NEUT() { Identifier = "DEFAULT_PT_NEUT"; Name = "NEUT"; - Colour = 0x20E0FF_rgb .Pack(); + Colour = 0x20E0FF_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/NICE.cpp b/src/simulation/elements/NICE.cpp index d6381e175..e1a86a877 100644 --- a/src/simulation/elements/NICE.cpp +++ b/src/simulation/elements/NICE.cpp @@ -4,7 +4,7 @@ void Element::Element_NICE() { Identifier = "DEFAULT_PT_NICE"; Name = "NICE"; - Colour = 0xC0E0FF_rgb .Pack(); + Colour = 0xC0E0FF_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/NITR.cpp b/src/simulation/elements/NITR.cpp index b9732fbd2..81b97f122 100644 --- a/src/simulation/elements/NITR.cpp +++ b/src/simulation/elements/NITR.cpp @@ -4,7 +4,7 @@ void Element::Element_NITR() { Identifier = "DEFAULT_PT_NITR"; Name = "NITR"; - Colour = 0x20E010_rgb .Pack(); + Colour = 0x20E010_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/NONE.cpp b/src/simulation/elements/NONE.cpp index 81ef2b18f..3e81aa35a 100644 --- a/src/simulation/elements/NONE.cpp +++ b/src/simulation/elements/NONE.cpp @@ -6,7 +6,7 @@ void Element::Element_NONE() { Identifier = "DEFAULT_PT_NONE"; Name = "NONE"; - Colour = 0x000000_rgb .Pack(); + Colour = 0x000000_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/NSCN.cpp b/src/simulation/elements/NSCN.cpp index 2d1849283..e73379189 100644 --- a/src/simulation/elements/NSCN.cpp +++ b/src/simulation/elements/NSCN.cpp @@ -4,7 +4,7 @@ void Element::Element_NSCN() { Identifier = "DEFAULT_PT_NSCN"; Name = "NSCN"; - Colour = 0x505080_rgb .Pack(); + Colour = 0x505080_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/NTCT.cpp b/src/simulation/elements/NTCT.cpp index 45b2a019b..47c219eb7 100644 --- a/src/simulation/elements/NTCT.cpp +++ b/src/simulation/elements/NTCT.cpp @@ -6,7 +6,7 @@ void Element::Element_NTCT() { Identifier = "DEFAULT_PT_NTCT"; Name = "NTCT"; - Colour = 0x505040_rgb .Pack(); + Colour = 0x505040_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/NWHL.cpp b/src/simulation/elements/NWHL.cpp index 178247313..091b0934b 100644 --- a/src/simulation/elements/NWHL.cpp +++ b/src/simulation/elements/NWHL.cpp @@ -6,7 +6,7 @@ void Element::Element_NWHL() { Identifier = "DEFAULT_PT_NWHL"; Name = "WHOL"; - Colour = 0xFFFFFF_rgb .Pack(); + Colour = 0xFFFFFF_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/O2.cpp b/src/simulation/elements/O2.cpp index a876b0f32..62a362bdc 100644 --- a/src/simulation/elements/O2.cpp +++ b/src/simulation/elements/O2.cpp @@ -6,7 +6,7 @@ void Element::Element_O2() { Identifier = "DEFAULT_PT_O2"; Name = "OXYG"; - Colour = 0x80A0FF_rgb .Pack(); + Colour = 0x80A0FF_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/OIL.cpp b/src/simulation/elements/OIL.cpp index 64843aa89..600b10cb4 100644 --- a/src/simulation/elements/OIL.cpp +++ b/src/simulation/elements/OIL.cpp @@ -4,7 +4,7 @@ void Element::Element_OIL() { Identifier = "DEFAULT_PT_OIL"; Name = "OIL"; - Colour = 0x404010_rgb .Pack(); + Colour = 0x404010_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/PBCN.cpp b/src/simulation/elements/PBCN.cpp index d16bd97ab..3ef66a158 100644 --- a/src/simulation/elements/PBCN.cpp +++ b/src/simulation/elements/PBCN.cpp @@ -8,7 +8,7 @@ void Element::Element_PBCN() { Identifier = "DEFAULT_PT_PBCN"; Name = "PBCN"; - Colour = 0x3B1D0A_rgb .Pack(); + Colour = 0x3B1D0A_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/PCLN.cpp b/src/simulation/elements/PCLN.cpp index 83bd84333..2b4e9363c 100644 --- a/src/simulation/elements/PCLN.cpp +++ b/src/simulation/elements/PCLN.cpp @@ -8,7 +8,7 @@ void Element::Element_PCLN() { Identifier = "DEFAULT_PT_PCLN"; Name = "PCLN"; - Colour = 0x3B3B0A_rgb .Pack(); + Colour = 0x3B3B0A_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/PHOT.cpp b/src/simulation/elements/PHOT.cpp index 6a01163b5..d5cbb8a98 100644 --- a/src/simulation/elements/PHOT.cpp +++ b/src/simulation/elements/PHOT.cpp @@ -9,7 +9,7 @@ void Element::Element_PHOT() { Identifier = "DEFAULT_PT_PHOT"; Name = "PHOT"; - Colour = 0xFFFFFF_rgb .Pack(); + Colour = 0xFFFFFF_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/PIPE.cpp b/src/simulation/elements/PIPE.cpp index c699bd85e..aa9b6e113 100644 --- a/src/simulation/elements/PIPE.cpp +++ b/src/simulation/elements/PIPE.cpp @@ -12,7 +12,7 @@ void Element::Element_PIPE() { Identifier = "DEFAULT_PT_PIPE"; Name = "PIPE"; - Colour = 0x444444_rgb .Pack(); + Colour = 0x444444_rgb; MenuVisible = 1; MenuSection = SC_FORCE; Enabled = 1; @@ -382,7 +382,7 @@ int Element_PIPE_graphics(GRAPHICS_FUNC_ARGS) cpart->tmp = tpart.tmp3; cpart->ctype = tpart.tmp4; - auto colour = RGB::Unpack(ren->sim->elements[t].Colour); + RGB colour = ren->sim->elements[t].Colour; *colr = colour.Red; *colg = colour.Green; *colb = colour.Blue; diff --git a/src/simulation/elements/PLEX.cpp b/src/simulation/elements/PLEX.cpp index b6bdfb372..33ead23bb 100644 --- a/src/simulation/elements/PLEX.cpp +++ b/src/simulation/elements/PLEX.cpp @@ -4,7 +4,7 @@ void Element::Element_PLEX() { Identifier = "DEFAULT_PT_PLEX"; Name = "C-4"; - Colour = 0xD080E0_rgb .Pack(); + Colour = 0xD080E0_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp index 4e56b31c7..abf9da4aa 100644 --- a/src/simulation/elements/PLNT.cpp +++ b/src/simulation/elements/PLNT.cpp @@ -8,7 +8,7 @@ void Element::Element_PLNT() { Identifier = "DEFAULT_PT_PLNT"; Name = "PLNT"; - Colour = 0x0CAC00_rgb .Pack(); + Colour = 0x0CAC00_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/PLSM.cpp b/src/simulation/elements/PLSM.cpp index e78d0af49..b737a8a0a 100644 --- a/src/simulation/elements/PLSM.cpp +++ b/src/simulation/elements/PLSM.cpp @@ -8,7 +8,7 @@ void Element::Element_PLSM() { Identifier = "DEFAULT_PT_PLSM"; Name = "PLSM"; - Colour = 0xBB99FF_rgb .Pack(); + Colour = 0xBB99FF_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; @@ -52,7 +52,7 @@ void Element::Element_PLSM() static int graphics(GRAPHICS_FUNC_ARGS) { - auto color = RGB::Unpack(Renderer::plasmaTableAt(cpart->life)); + RGB color = Renderer::plasmaTableAt(cpart->life); *colr = color.Red; *colg = color.Green; *colb = color.Blue; diff --git a/src/simulation/elements/PLUT.cpp b/src/simulation/elements/PLUT.cpp index 291149e1e..c6ccdc742 100644 --- a/src/simulation/elements/PLUT.cpp +++ b/src/simulation/elements/PLUT.cpp @@ -6,7 +6,7 @@ void Element::Element_PLUT() { Identifier = "DEFAULT_PT_PLUT"; Name = "PLUT"; - Colour = 0x407020_rgb .Pack(); + Colour = 0x407020_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/POLO.cpp b/src/simulation/elements/POLO.cpp index 2f9427db1..1a809417e 100644 --- a/src/simulation/elements/POLO.cpp +++ b/src/simulation/elements/POLO.cpp @@ -7,7 +7,7 @@ void Element::Element_POLO() { Identifier = "DEFAULT_PT_POLO"; Name = "POLO"; - Colour = 0x506030_rgb .Pack(); + Colour = 0x506030_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/PPIP.cpp b/src/simulation/elements/PPIP.cpp index 67246d9fe..e245dbbc7 100644 --- a/src/simulation/elements/PPIP.cpp +++ b/src/simulation/elements/PPIP.cpp @@ -7,7 +7,7 @@ void Element::Element_PPIP() { Identifier = "DEFAULT_PT_PPIP"; Name = "PPIP"; - Colour = 0x444466_rgb .Pack(); + Colour = 0x444466_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/PQRT.cpp b/src/simulation/elements/PQRT.cpp index 2694e5c26..7a2cfc8db 100644 --- a/src/simulation/elements/PQRT.cpp +++ b/src/simulation/elements/PQRT.cpp @@ -8,7 +8,7 @@ void Element::Element_PQRT() { Identifier = "DEFAULT_PT_PQRT"; Name = "PQRT"; - Colour = 0x88BBBB_rgb .Pack(); + Colour = 0x88BBBB_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/PROT.cpp b/src/simulation/elements/PROT.cpp index 029c18a9e..5d0c7a2a3 100644 --- a/src/simulation/elements/PROT.cpp +++ b/src/simulation/elements/PROT.cpp @@ -9,7 +9,7 @@ void Element::Element_PROT() { Identifier = "DEFAULT_PT_PROT"; Name = "PROT"; - Colour = 0x990000_rgb .Pack(); + Colour = 0x990000_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/PRTI.cpp b/src/simulation/elements/PRTI.cpp index 90ce48000..519457791 100644 --- a/src/simulation/elements/PRTI.cpp +++ b/src/simulation/elements/PRTI.cpp @@ -9,7 +9,7 @@ void Element::Element_PRTI() { Identifier = "DEFAULT_PT_PRTI"; Name = "PRTI"; - Colour = 0xEB5917_rgb .Pack(); + Colour = 0xEB5917_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/PRTO.cpp b/src/simulation/elements/PRTO.cpp index ca8de45ed..a701aa2fa 100644 --- a/src/simulation/elements/PRTO.cpp +++ b/src/simulation/elements/PRTO.cpp @@ -7,7 +7,7 @@ void Element::Element_PRTO() { Identifier = "DEFAULT_PT_PRTO"; Name = "PRTO"; - Colour = 0x0020EB_rgb .Pack(); + Colour = 0x0020EB_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/PSCN.cpp b/src/simulation/elements/PSCN.cpp index 3616a9dcf..f88e5d474 100644 --- a/src/simulation/elements/PSCN.cpp +++ b/src/simulation/elements/PSCN.cpp @@ -4,7 +4,7 @@ void Element::Element_PSCN() { Identifier = "DEFAULT_PT_PSCN"; Name = "PSCN"; - Colour = 0x805050_rgb .Pack(); + Colour = 0x805050_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/PSNS.cpp b/src/simulation/elements/PSNS.cpp index 1ae6b159f..2f92afa99 100644 --- a/src/simulation/elements/PSNS.cpp +++ b/src/simulation/elements/PSNS.cpp @@ -6,7 +6,7 @@ void Element::Element_PSNS() { Identifier = "DEFAULT_PT_PSNS"; Name = "PSNS"; - Colour = 0xDB2020_rgb .Pack(); + Colour = 0xDB2020_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/PSTE.cpp b/src/simulation/elements/PSTE.cpp index ada68fd02..11d01268a 100644 --- a/src/simulation/elements/PSTE.cpp +++ b/src/simulation/elements/PSTE.cpp @@ -4,7 +4,7 @@ void Element::Element_PSTE() { Identifier = "DEFAULT_PT_PSTE"; Name = "PSTE"; - Colour = 0xAA99AA_rgb .Pack(); + Colour = 0xAA99AA_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/PSTN.cpp b/src/simulation/elements/PSTN.cpp index 365122e83..225ade2f6 100644 --- a/src/simulation/elements/PSTN.cpp +++ b/src/simulation/elements/PSTN.cpp @@ -12,7 +12,7 @@ void Element::Element_PSTN() { Identifier = "DEFAULT_PT_PSTN"; Name = "PSTN"; - Colour = 0xAA9999_rgb .Pack(); + Colour = 0xAA9999_rgb; MenuVisible = 1; MenuSection = SC_FORCE; Enabled = 1; diff --git a/src/simulation/elements/PSTS.cpp b/src/simulation/elements/PSTS.cpp index 384cb8d17..2f15452e5 100644 --- a/src/simulation/elements/PSTS.cpp +++ b/src/simulation/elements/PSTS.cpp @@ -4,7 +4,7 @@ void Element::Element_PSTS() { Identifier = "DEFAULT_PT_PSTS"; Name = "PSTS"; - Colour = 0x776677_rgb .Pack(); + Colour = 0x776677_rgb; MenuVisible = 0; MenuSection = SC_CRACKER; Enabled = 1; diff --git a/src/simulation/elements/PTCT.cpp b/src/simulation/elements/PTCT.cpp index b892f1755..c85c51295 100644 --- a/src/simulation/elements/PTCT.cpp +++ b/src/simulation/elements/PTCT.cpp @@ -6,7 +6,7 @@ void Element::Element_PTCT() { Identifier = "DEFAULT_PT_PTCT"; Name = "PTCT"; - Colour = 0x405050_rgb .Pack(); + Colour = 0x405050_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/PTNM.cpp b/src/simulation/elements/PTNM.cpp index a883251d3..045d4a14a 100644 --- a/src/simulation/elements/PTNM.cpp +++ b/src/simulation/elements/PTNM.cpp @@ -8,7 +8,7 @@ void Element::Element_PTNM() { Identifier = "DEFAULT_PT_PTNM"; Name = "PTNM"; - Colour = 0xD5E0EB_rgb .Pack(); + Colour = 0xD5E0EB_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/PUMP.cpp b/src/simulation/elements/PUMP.cpp index a8420377e..c1dda5ab2 100644 --- a/src/simulation/elements/PUMP.cpp +++ b/src/simulation/elements/PUMP.cpp @@ -7,7 +7,7 @@ void Element::Element_PUMP() { Identifier = "DEFAULT_PT_PUMP"; Name = "PUMP"; - Colour = 0x0A0A3B_rgb .Pack(); + Colour = 0x0A0A3B_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/PVOD.cpp b/src/simulation/elements/PVOD.cpp index 1c4d621ff..98f039d81 100644 --- a/src/simulation/elements/PVOD.cpp +++ b/src/simulation/elements/PVOD.cpp @@ -7,7 +7,7 @@ void Element::Element_PVOD() { Identifier = "DEFAULT_PT_PVOD"; Name = "PVOD"; - Colour = 0x792020_rgb .Pack(); + Colour = 0x792020_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/QRTZ.cpp b/src/simulation/elements/QRTZ.cpp index 3f1109808..5acf98545 100644 --- a/src/simulation/elements/QRTZ.cpp +++ b/src/simulation/elements/QRTZ.cpp @@ -8,7 +8,7 @@ void Element::Element_QRTZ() { Identifier = "DEFAULT_PT_QRTZ"; Name = "QRTZ"; - Colour = 0xAADDDD_rgb .Pack(); + Colour = 0xAADDDD_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/RBDM.cpp b/src/simulation/elements/RBDM.cpp index 04392a288..911b006fb 100644 --- a/src/simulation/elements/RBDM.cpp +++ b/src/simulation/elements/RBDM.cpp @@ -4,7 +4,7 @@ void Element::Element_RBDM() { Identifier = "DEFAULT_PT_RBDM"; Name = "RBDM"; - Colour = 0xCCCCCC_rgb .Pack(); + Colour = 0xCCCCCC_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/RFGL.cpp b/src/simulation/elements/RFGL.cpp index 13a55f5a5..ee8372368 100644 --- a/src/simulation/elements/RFGL.cpp +++ b/src/simulation/elements/RFGL.cpp @@ -6,7 +6,7 @@ void Element::Element_RFGL() { Identifier = "DEFAULT_PT_RFGL"; Name = "RFGL"; - Colour = 0x84C2CF_rgb .Pack(); + Colour = 0x84C2CF_rgb; MenuVisible = 0; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/RFRG.cpp b/src/simulation/elements/RFRG.cpp index b4e72d6f8..0c728ef16 100644 --- a/src/simulation/elements/RFRG.cpp +++ b/src/simulation/elements/RFRG.cpp @@ -6,7 +6,7 @@ void Element::Element_RFRG() { Identifier = "DEFAULT_PT_RFRG"; Name = "RFRG"; - Colour = 0x72D2D4_rgb .Pack(); + Colour = 0x72D2D4_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/RIME.cpp b/src/simulation/elements/RIME.cpp index 12369e5fd..04f96f2c0 100644 --- a/src/simulation/elements/RIME.cpp +++ b/src/simulation/elements/RIME.cpp @@ -6,7 +6,7 @@ void Element::Element_RIME() { Identifier = "DEFAULT_PT_RIME"; Name = "RIME"; - Colour = 0xCCCCCC_rgb .Pack(); + Colour = 0xCCCCCC_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/ROCK.cpp b/src/simulation/elements/ROCK.cpp index a72bca961..adcb79dae 100644 --- a/src/simulation/elements/ROCK.cpp +++ b/src/simulation/elements/ROCK.cpp @@ -7,7 +7,7 @@ void Element::Element_ROCK() { Identifier = "DEFAULT_PT_ROCK"; Name = "ROCK"; - Colour = 0x727272_rgb .Pack(); + Colour = 0x727272_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/RPEL.cpp b/src/simulation/elements/RPEL.cpp index e2b5f8335..0bde82704 100644 --- a/src/simulation/elements/RPEL.cpp +++ b/src/simulation/elements/RPEL.cpp @@ -6,7 +6,7 @@ void Element::Element_RPEL() { Identifier = "DEFAULT_PT_RPEL"; Name = "RPEL"; - Colour = 0x99CC00_rgb .Pack(); + Colour = 0x99CC00_rgb; MenuVisible = 1; MenuSection = SC_FORCE; Enabled = 1; diff --git a/src/simulation/elements/SALT.cpp b/src/simulation/elements/SALT.cpp index 7e6d07b6a..1b7dd410e 100644 --- a/src/simulation/elements/SALT.cpp +++ b/src/simulation/elements/SALT.cpp @@ -4,7 +4,7 @@ void Element::Element_SALT() { Identifier = "DEFAULT_PT_SALT"; Name = "SALT"; - Colour = 0xFFFFFF_rgb .Pack(); + Colour = 0xFFFFFF_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/SAND.cpp b/src/simulation/elements/SAND.cpp index 418bf854f..6ce02d35c 100644 --- a/src/simulation/elements/SAND.cpp +++ b/src/simulation/elements/SAND.cpp @@ -4,7 +4,7 @@ void Element::Element_SAND() { Identifier = "DEFAULT_PT_SAND"; Name = "SAND"; - Colour = 0xFFD090_rgb .Pack(); + Colour = 0xFFD090_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/SAWD.cpp b/src/simulation/elements/SAWD.cpp index e8036178e..19ad799c4 100644 --- a/src/simulation/elements/SAWD.cpp +++ b/src/simulation/elements/SAWD.cpp @@ -4,7 +4,7 @@ void Element::Element_SAWD() { Identifier = "DEFAULT_PT_SAWD"; Name = "SAWD"; - Colour = 0xF0F0A0_rgb .Pack(); + Colour = 0xF0F0A0_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/SHLD1.cpp b/src/simulation/elements/SHLD1.cpp index d40083648..056fd1233 100644 --- a/src/simulation/elements/SHLD1.cpp +++ b/src/simulation/elements/SHLD1.cpp @@ -6,7 +6,7 @@ void Element::Element_SHLD1() { Identifier = "DEFAULT_PT_SHLD1"; Name = "SHLD"; - Colour = 0xAAAAAA_rgb .Pack(); + Colour = 0xAAAAAA_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/SHLD2.cpp b/src/simulation/elements/SHLD2.cpp index f8a882b4b..e1492507c 100644 --- a/src/simulation/elements/SHLD2.cpp +++ b/src/simulation/elements/SHLD2.cpp @@ -6,7 +6,7 @@ void Element::Element_SHLD2() { Identifier = "DEFAULT_PT_SHLD2"; Name = "SHD2"; - Colour = 0x777777_rgb .Pack(); + Colour = 0x777777_rgb; MenuVisible = 0; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/SHLD3.cpp b/src/simulation/elements/SHLD3.cpp index 9f4588c88..d41ea4fec 100644 --- a/src/simulation/elements/SHLD3.cpp +++ b/src/simulation/elements/SHLD3.cpp @@ -6,7 +6,7 @@ void Element::Element_SHLD3() { Identifier = "DEFAULT_PT_SHLD3"; Name = "SHD3"; - Colour = 0x444444_rgb .Pack(); + Colour = 0x444444_rgb; MenuVisible = 0; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/SHLD4.cpp b/src/simulation/elements/SHLD4.cpp index 73e1f9fbc..3169db74f 100644 --- a/src/simulation/elements/SHLD4.cpp +++ b/src/simulation/elements/SHLD4.cpp @@ -6,7 +6,7 @@ void Element::Element_SHLD4() { Identifier = "DEFAULT_PT_SHLD4"; Name = "SHD4"; - Colour = 0x212121_rgb .Pack(); + Colour = 0x212121_rgb; MenuVisible = 0; MenuSection = SC_CRACKER2; Enabled = 1; diff --git a/src/simulation/elements/SING.cpp b/src/simulation/elements/SING.cpp index 7431b1b61..69406656f 100644 --- a/src/simulation/elements/SING.cpp +++ b/src/simulation/elements/SING.cpp @@ -7,7 +7,7 @@ void Element::Element_SING() { Identifier = "DEFAULT_PT_SING"; Name = "SING"; - Colour = 0x242424_rgb .Pack(); + Colour = 0x242424_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/SLCN.cpp b/src/simulation/elements/SLCN.cpp index 2cf1f8fdc..efc7873bd 100644 --- a/src/simulation/elements/SLCN.cpp +++ b/src/simulation/elements/SLCN.cpp @@ -8,7 +8,7 @@ void Element::Element_SLCN() { Identifier = "DEFAULT_PT_SLCN"; Name = "SLCN"; - Colour = 0xBCCDDF_rgb .Pack(); + Colour = 0xBCCDDF_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; @@ -49,11 +49,11 @@ void Element::Element_SLCN() Create = &create; } -static const int SLCN_COLOUR[16] = { - 0x5A6679_rgb .Pack(), 0x6878A1_rgb .Pack(), 0xABBFDD_rgb .Pack(), 0x838490_rgb .Pack(), - 0xBCCDDF_rgb .Pack(), 0x82A0D2_rgb .Pack(), 0x5B6680_rgb .Pack(), 0x232C3B_rgb .Pack(), - 0x485067_rgb .Pack(), 0x8B9AB6_rgb .Pack(), 0xADB1C1_rgb .Pack(), 0xC3C6D1_rgb .Pack(), - 0x8594AD_rgb .Pack(), 0x262F47_rgb .Pack(), 0xA9AEBC_rgb .Pack(), 0xC2E1F7_rgb .Pack(), +static const RGB SLCN_COLOUR[16] = { + 0x5A6679_rgb, 0x6878A1_rgb, 0xABBFDD_rgb, 0x838490_rgb, + 0xBCCDDF_rgb, 0x82A0D2_rgb, 0x5B6680_rgb, 0x232C3B_rgb, + 0x485067_rgb, 0x8B9AB6_rgb, 0xADB1C1_rgb, 0xC3C6D1_rgb, + 0x8594AD_rgb, 0x262F47_rgb, 0xA9AEBC_rgb, 0xC2E1F7_rgb, }; static void initSparkles(Simulation *sim, Particle &part) @@ -108,10 +108,10 @@ static int update(UPDATE_FUNC_ARGS) static int graphics(GRAPHICS_FUNC_ARGS) { - auto curr_colour = RGB::Unpack(SLCN_COLOUR[(cpart->tmp >> 12) & 15]); + RGB curr_colour = SLCN_COLOUR[(cpart->tmp >> 12) & 15]; if (cpart->tmp & 0x800) // mix with next colour if phase is at least halfway there { - auto next_colour = RGB::Unpack(SLCN_COLOUR[(cpart->tmp >> 16) & 15]); + RGB next_colour = SLCN_COLOUR[(cpart->tmp >> 16) & 15]; curr_colour = RGB( (curr_colour.Red + next_colour.Red) / 2, (curr_colour.Green + next_colour.Green) / 2, diff --git a/src/simulation/elements/SLTW.cpp b/src/simulation/elements/SLTW.cpp index 572396426..420e781a6 100644 --- a/src/simulation/elements/SLTW.cpp +++ b/src/simulation/elements/SLTW.cpp @@ -6,7 +6,7 @@ void Element::Element_SLTW() { Identifier = "DEFAULT_PT_SLTW"; Name = "SLTW"; - Colour = 0x4050F0_rgb .Pack(); + Colour = 0x4050F0_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/SMKE.cpp b/src/simulation/elements/SMKE.cpp index da7401a8e..d3a1c4a86 100644 --- a/src/simulation/elements/SMKE.cpp +++ b/src/simulation/elements/SMKE.cpp @@ -6,7 +6,7 @@ void Element::Element_SMKE() { Identifier = "DEFAULT_PT_SMKE"; Name = "SMKE"; - Colour = 0x222222_rgb .Pack(); + Colour = 0x222222_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/SNOW.cpp b/src/simulation/elements/SNOW.cpp index dd78e1c3f..9745397fe 100644 --- a/src/simulation/elements/SNOW.cpp +++ b/src/simulation/elements/SNOW.cpp @@ -6,7 +6,7 @@ void Element::Element_SNOW() { Identifier = "DEFAULT_PT_SNOW"; Name = "SNOW"; - Colour = 0xC0E0FF_rgb .Pack(); + Colour = 0xC0E0FF_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/SOAP.cpp b/src/simulation/elements/SOAP.cpp index 9b4d017cc..e950a646d 100644 --- a/src/simulation/elements/SOAP.cpp +++ b/src/simulation/elements/SOAP.cpp @@ -8,7 +8,7 @@ void Element::Element_SOAP() { Identifier = "DEFAULT_PT_SOAP"; Name = "SOAP"; - Colour = 0xF5F5DC_rgb .Pack(); + Colour = 0xF5F5DC_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/SPAWN.cpp b/src/simulation/elements/SPAWN.cpp index 8ab3c0f42..051375ae8 100644 --- a/src/simulation/elements/SPAWN.cpp +++ b/src/simulation/elements/SPAWN.cpp @@ -7,7 +7,7 @@ void Element::Element_SPAWN() { Identifier = "DEFAULT_PT_SPAWN"; Name = "SPWN"; - Colour = 0xAAAAAA_rgb .Pack(); + Colour = 0xAAAAAA_rgb; MenuVisible = 0; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/SPAWN2.cpp b/src/simulation/elements/SPAWN2.cpp index bac9664a5..1606b86df 100644 --- a/src/simulation/elements/SPAWN2.cpp +++ b/src/simulation/elements/SPAWN2.cpp @@ -7,7 +7,7 @@ void Element::Element_SPAWN2() { Identifier = "DEFAULT_PT_SPAWN2"; Name = "SPWN2"; - Colour = 0xAAAAAA_rgb .Pack(); + Colour = 0xAAAAAA_rgb; MenuVisible = 0; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/SPNG.cpp b/src/simulation/elements/SPNG.cpp index 984905cc5..3dcc4aa83 100644 --- a/src/simulation/elements/SPNG.cpp +++ b/src/simulation/elements/SPNG.cpp @@ -7,7 +7,7 @@ void Element::Element_SPNG() { Identifier = "DEFAULT_PT_SPNG"; Name = "SPNG"; - Colour = 0xFFBE30_rgb .Pack(); + Colour = 0xFFBE30_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp index ff4e40544..c24c6a17e 100644 --- a/src/simulation/elements/SPRK.cpp +++ b/src/simulation/elements/SPRK.cpp @@ -8,7 +8,7 @@ void Element::Element_SPRK() { Identifier = "DEFAULT_PT_SPRK"; Name = "SPRK"; - Colour = 0xFFFF80_rgb .Pack(); + Colour = 0xFFFF80_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index 2a26b5ae5..79e758731 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -14,7 +14,7 @@ void Element::Element_STKM() { Identifier = "DEFAULT_PT_STKM"; Name = "STKM"; - Colour = 0xFFE0A0_rgb .Pack(); + Colour = 0xFFE0A0_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/STKM2.cpp b/src/simulation/elements/STKM2.cpp index e834250a0..2ee01e931 100644 --- a/src/simulation/elements/STKM2.cpp +++ b/src/simulation/elements/STKM2.cpp @@ -12,7 +12,7 @@ void Element::Element_STKM2() { Identifier = "DEFAULT_PT_STKM2"; Name = "STK2"; - Colour = 0x6464FF_rgb .Pack(); + Colour = 0x6464FF_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/STNE.cpp b/src/simulation/elements/STNE.cpp index ece1d7e50..b31311170 100644 --- a/src/simulation/elements/STNE.cpp +++ b/src/simulation/elements/STNE.cpp @@ -4,7 +4,7 @@ void Element::Element_STNE() { Identifier = "DEFAULT_PT_STNE"; Name = "STNE"; - Colour = 0xA0A0A0_rgb .Pack(); + Colour = 0xA0A0A0_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/elements/STOR.cpp b/src/simulation/elements/STOR.cpp index 68addc89c..1ef590ed5 100644 --- a/src/simulation/elements/STOR.cpp +++ b/src/simulation/elements/STOR.cpp @@ -9,7 +9,7 @@ void Element::Element_STOR() { Identifier = "DEFAULT_PT_STOR"; Name = "STOR"; - Colour = 0x50DFDF_rgb .Pack(); + Colour = 0x50DFDF_rgb; MenuVisible = 1; MenuSection = SC_POWERED; Enabled = 1; diff --git a/src/simulation/elements/SWCH.cpp b/src/simulation/elements/SWCH.cpp index 77014ecf3..1050ce7aa 100644 --- a/src/simulation/elements/SWCH.cpp +++ b/src/simulation/elements/SWCH.cpp @@ -7,7 +7,7 @@ void Element::Element_SWCH() { Identifier = "DEFAULT_PT_SWCH"; Name = "SWCH"; - Colour = 0x103B11_rgb .Pack(); + Colour = 0x103B11_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/TESC.cpp b/src/simulation/elements/TESC.cpp index fada2981e..136e8a3c0 100644 --- a/src/simulation/elements/TESC.cpp +++ b/src/simulation/elements/TESC.cpp @@ -6,7 +6,7 @@ void Element::Element_TESC() { Identifier = "DEFAULT_PT_TESC"; Name = "TESC"; - Colour = 0x707040_rgb .Pack(); + Colour = 0x707040_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/THDR.cpp b/src/simulation/elements/THDR.cpp index c02abe5ff..b420d6185 100644 --- a/src/simulation/elements/THDR.cpp +++ b/src/simulation/elements/THDR.cpp @@ -7,7 +7,7 @@ void Element::Element_THDR() { Identifier = "DEFAULT_PT_THDR"; Name = "THDR"; - Colour = 0xFFFFA0_rgb .Pack(); + Colour = 0xFFFFA0_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/THRM.cpp b/src/simulation/elements/THRM.cpp index 6cb9747fc..2a8eaf57b 100644 --- a/src/simulation/elements/THRM.cpp +++ b/src/simulation/elements/THRM.cpp @@ -4,7 +4,7 @@ void Element::Element_THRM() { Identifier = "DEFAULT_PT_THRM"; Name = "THRM"; - Colour = 0xA08090_rgb .Pack(); + Colour = 0xA08090_rgb; MenuVisible = 1; MenuSection = SC_EXPLOSIVE; Enabled = 1; diff --git a/src/simulation/elements/TRON.cpp b/src/simulation/elements/TRON.cpp index a5d5ad1fa..4c9c7a24f 100644 --- a/src/simulation/elements/TRON.cpp +++ b/src/simulation/elements/TRON.cpp @@ -12,7 +12,7 @@ void Element::Element_TRON() { Identifier = "DEFAULT_PT_TRON"; Name = "TRON"; - Colour = 0xA9FF00_rgb .Pack(); + Colour = 0xA9FF00_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/TSNS.cpp b/src/simulation/elements/TSNS.cpp index ff5cfc567..4f84ed540 100644 --- a/src/simulation/elements/TSNS.cpp +++ b/src/simulation/elements/TSNS.cpp @@ -6,7 +6,7 @@ void Element::Element_TSNS() { Identifier = "DEFAULT_PT_TSNS"; Name = "TSNS"; - Colour = 0xFD00D5_rgb .Pack(); + Colour = 0xFD00D5_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/TTAN.cpp b/src/simulation/elements/TTAN.cpp index 972f30a72..8fe4e4159 100644 --- a/src/simulation/elements/TTAN.cpp +++ b/src/simulation/elements/TTAN.cpp @@ -7,7 +7,7 @@ void Element::Element_TTAN() { Identifier = "DEFAULT_PT_TTAN"; Name = "TTAN"; - Colour = 0x909090_rgb .Pack(); + Colour = 0x909090_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/TUNG.cpp b/src/simulation/elements/TUNG.cpp index f676d44f8..29317aaa0 100644 --- a/src/simulation/elements/TUNG.cpp +++ b/src/simulation/elements/TUNG.cpp @@ -9,7 +9,7 @@ void Element::Element_TUNG() { Identifier = "DEFAULT_PT_TUNG"; Name = "TUNG"; - Colour = 0x505050_rgb .Pack(); + Colour = 0x505050_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/URAN.cpp b/src/simulation/elements/URAN.cpp index 245963378..13b7ed90c 100644 --- a/src/simulation/elements/URAN.cpp +++ b/src/simulation/elements/URAN.cpp @@ -6,7 +6,7 @@ void Element::Element_URAN() { Identifier = "DEFAULT_PT_URAN"; Name = "URAN"; - Colour = 0x707020_rgb .Pack(); + Colour = 0x707020_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/VIBR.cpp b/src/simulation/elements/VIBR.cpp index e0ef6523d..083352446 100644 --- a/src/simulation/elements/VIBR.cpp +++ b/src/simulation/elements/VIBR.cpp @@ -7,7 +7,7 @@ void Element::Element_VIBR() { Identifier = "DEFAULT_PT_VIBR"; Name = "VIBR"; - Colour = 0x005000_rgb .Pack(); + Colour = 0x005000_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/VINE.cpp b/src/simulation/elements/VINE.cpp index 1076b5597..68048c14a 100644 --- a/src/simulation/elements/VINE.cpp +++ b/src/simulation/elements/VINE.cpp @@ -8,7 +8,7 @@ void Element::Element_VINE() { Identifier = "DEFAULT_PT_VINE"; Name = "VINE"; - Colour = 0x079A00_rgb .Pack(); + Colour = 0x079A00_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/VIRS.cpp b/src/simulation/elements/VIRS.cpp index fa62ba294..4c01f0838 100644 --- a/src/simulation/elements/VIRS.cpp +++ b/src/simulation/elements/VIRS.cpp @@ -7,7 +7,7 @@ void Element::Element_VIRS() { Identifier = "DEFAULT_PT_VIRS"; Name = "VIRS"; - Colour = 0xFE11F6_rgb .Pack(); + Colour = 0xFE11F6_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/VOID.cpp b/src/simulation/elements/VOID.cpp index 04d47fcd4..fc64670c5 100644 --- a/src/simulation/elements/VOID.cpp +++ b/src/simulation/elements/VOID.cpp @@ -4,7 +4,7 @@ void Element::Element_VOID() { Identifier = "DEFAULT_PT_VOID"; Name = "VOID"; - Colour = 0x790B0B_rgb .Pack(); + Colour = 0x790B0B_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/VRSG.cpp b/src/simulation/elements/VRSG.cpp index 1b09d910f..11a204af2 100644 --- a/src/simulation/elements/VRSG.cpp +++ b/src/simulation/elements/VRSG.cpp @@ -7,7 +7,7 @@ void Element::Element_VRSG() { Identifier = "DEFAULT_PT_VRSG"; Name = "VRSG"; - Colour = 0xFE68FE_rgb .Pack(); + Colour = 0xFE68FE_rgb; MenuVisible = 0; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/VRSS.cpp b/src/simulation/elements/VRSS.cpp index 63281827c..6ba0fee9f 100644 --- a/src/simulation/elements/VRSS.cpp +++ b/src/simulation/elements/VRSS.cpp @@ -7,7 +7,7 @@ void Element::Element_VRSS() { Identifier = "DEFAULT_PT_VRSS"; Name = "VRSS"; - Colour = 0xD408CD_rgb .Pack(); + Colour = 0xD408CD_rgb; MenuVisible = 0; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/VSNS.cpp b/src/simulation/elements/VSNS.cpp index d5489f176..f4b8eccd5 100644 --- a/src/simulation/elements/VSNS.cpp +++ b/src/simulation/elements/VSNS.cpp @@ -6,7 +6,7 @@ void Element::Element_VSNS() { Identifier = "DEFAULT_PT_VSNS"; Name = "VSNS"; - Colour = 0x7C9C00_rgb .Pack(); + Colour = 0x7C9C00_rgb; MenuVisible = 1; MenuSection = SC_SENSOR; Enabled = 1; diff --git a/src/simulation/elements/WARP.cpp b/src/simulation/elements/WARP.cpp index 9057554a0..311566ce7 100644 --- a/src/simulation/elements/WARP.cpp +++ b/src/simulation/elements/WARP.cpp @@ -8,7 +8,7 @@ void Element::Element_WARP() { Identifier = "DEFAULT_PT_WARP"; Name = "WARP"; - Colour = 0x101010_rgb .Pack(); + Colour = 0x101010_rgb; MenuVisible = 1; MenuSection = SC_NUCLEAR; Enabled = 1; diff --git a/src/simulation/elements/WATR.cpp b/src/simulation/elements/WATR.cpp index 95b8fd695..1ed233189 100644 --- a/src/simulation/elements/WATR.cpp +++ b/src/simulation/elements/WATR.cpp @@ -6,7 +6,7 @@ void Element::Element_WATR() { Identifier = "DEFAULT_PT_WATR"; Name = "WATR"; - Colour = 0x2030D0_rgb .Pack(); + Colour = 0x2030D0_rgb; MenuVisible = 1; MenuSection = SC_LIQUID; Enabled = 1; diff --git a/src/simulation/elements/WAX.cpp b/src/simulation/elements/WAX.cpp index b89c775e5..95a345758 100644 --- a/src/simulation/elements/WAX.cpp +++ b/src/simulation/elements/WAX.cpp @@ -4,7 +4,7 @@ void Element::Element_WAX() { Identifier = "DEFAULT_PT_WAX"; Name = "WAX"; - Colour = 0xF0F0BB_rgb .Pack(); + Colour = 0xF0F0BB_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/WHOL.cpp b/src/simulation/elements/WHOL.cpp index 6557dc75a..1b775fa20 100644 --- a/src/simulation/elements/WHOL.cpp +++ b/src/simulation/elements/WHOL.cpp @@ -4,7 +4,7 @@ void Element::Element_WHOL() { Identifier = "DEFAULT_PT_WHOL"; Name = "VENT"; - Colour = 0xEFEFEF_rgb .Pack(); + Colour = 0xEFEFEF_rgb; MenuVisible = 1; MenuSection = SC_SPECIAL; Enabled = 1; diff --git a/src/simulation/elements/WIFI.cpp b/src/simulation/elements/WIFI.cpp index 172dba135..55f692a46 100644 --- a/src/simulation/elements/WIFI.cpp +++ b/src/simulation/elements/WIFI.cpp @@ -7,7 +7,7 @@ void Element::Element_WIFI() { Identifier = "DEFAULT_PT_WIFI"; Name = "WIFI"; - Colour = 0x40A060_rgb .Pack(); + Colour = 0x40A060_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/WIRE.cpp b/src/simulation/elements/WIRE.cpp index 34614f6a5..4d2653150 100644 --- a/src/simulation/elements/WIRE.cpp +++ b/src/simulation/elements/WIRE.cpp @@ -7,7 +7,7 @@ void Element::Element_WIRE() { Identifier = "DEFAULT_PT_WIRE"; Name = "WWLD"; - Colour = 0xFFCC00_rgb .Pack(); + Colour = 0xFFCC00_rgb; MenuVisible = 1; MenuSection = SC_ELEC; Enabled = 1; diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp index 5ae3d6edf..45f8231cc 100644 --- a/src/simulation/elements/WOOD.cpp +++ b/src/simulation/elements/WOOD.cpp @@ -8,7 +8,7 @@ void Element::Element_WOOD() { Identifier = "DEFAULT_PT_WOOD"; Name = "WOOD"; - Colour = 0xC0A040_rgb .Pack(); + Colour = 0xC0A040_rgb; MenuVisible = 1; MenuSection = SC_SOLIDS; Enabled = 1; diff --git a/src/simulation/elements/WTRV.cpp b/src/simulation/elements/WTRV.cpp index ef4025978..94df68002 100644 --- a/src/simulation/elements/WTRV.cpp +++ b/src/simulation/elements/WTRV.cpp @@ -6,7 +6,7 @@ void Element::Element_WTRV() { Identifier = "DEFAULT_PT_WTRV"; Name = "WTRV"; - Colour = 0xA0A0FF_rgb .Pack(); + Colour = 0xA0A0FF_rgb; MenuVisible = 1; MenuSection = SC_GAS; Enabled = 1; diff --git a/src/simulation/elements/YEST.cpp b/src/simulation/elements/YEST.cpp index 6226802a8..c6bf2e53a 100644 --- a/src/simulation/elements/YEST.cpp +++ b/src/simulation/elements/YEST.cpp @@ -6,7 +6,7 @@ void Element::Element_YEST() { Identifier = "DEFAULT_PT_YEST"; Name = "YEST"; - Colour = 0xEEE0C0_rgb .Pack(); + Colour = 0xEEE0C0_rgb; MenuVisible = 1; MenuSection = SC_POWDERS; Enabled = 1; diff --git a/src/simulation/simtools/AIR.cpp b/src/simulation/simtools/AIR.cpp index 6ee22504b..2115f6461 100644 --- a/src/simulation/simtools/AIR.cpp +++ b/src/simulation/simtools/AIR.cpp @@ -7,7 +7,7 @@ void SimTool::Tool_AIR() { Identifier = "DEFAULT_TOOL_AIR"; Name = "AIR"; - Colour = 0xFFFFFF_rgb .Pack(); + Colour = 0xFFFFFF_rgb; Description = "Air, creates airflow and pressure."; Perform = &perform; } diff --git a/src/simulation/simtools/AMBM.cpp b/src/simulation/simtools/AMBM.cpp index 8be5016ab..4cf928079 100644 --- a/src/simulation/simtools/AMBM.cpp +++ b/src/simulation/simtools/AMBM.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_AMBM() { Identifier = "DEFAULT_TOOL_AMBM"; Name = "AMBM"; - Colour = 0x00DDFF_rgb .Pack(); + Colour = 0x00DDFF_rgb; Description = "Decreases ambient air temperature."; Perform = &perform; } diff --git a/src/simulation/simtools/AMBP.cpp b/src/simulation/simtools/AMBP.cpp index 09178062f..abf26175b 100644 --- a/src/simulation/simtools/AMBP.cpp +++ b/src/simulation/simtools/AMBP.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_AMBP() { Identifier = "DEFAULT_TOOL_AMBP"; Name = "AMBP"; - Colour = 0xFFDD00_rgb .Pack(); + Colour = 0xFFDD00_rgb; Description = "Increases ambient air temperature."; Perform = &perform; } diff --git a/src/simulation/simtools/COOL.cpp b/src/simulation/simtools/COOL.cpp index 42832292f..0da7c002c 100644 --- a/src/simulation/simtools/COOL.cpp +++ b/src/simulation/simtools/COOL.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_COOL() { Identifier = "DEFAULT_TOOL_COOL"; Name = "COOL"; - Colour = 0x00DDFF_rgb .Pack(); + Colour = 0x00DDFF_rgb; Description = "Cools the targeted element."; Perform = &perform; } diff --git a/src/simulation/simtools/CYCL.cpp b/src/simulation/simtools/CYCL.cpp index c9fc7014a..f8a0b6aee 100644 --- a/src/simulation/simtools/CYCL.cpp +++ b/src/simulation/simtools/CYCL.cpp @@ -9,7 +9,7 @@ void SimTool::Tool_CYCL() { Identifier = "DEFAULT_TOOL_CYCL"; Name = "CYCL"; - Colour = 0x132f5b_rgb .Pack(); + Colour = 0x132f5b_rgb; Description = "Cyclone, produces swirling air currents"; Perform = &perform; } diff --git a/src/simulation/simtools/HEAT.cpp b/src/simulation/simtools/HEAT.cpp index 02fb6abca..02b5ecfcd 100644 --- a/src/simulation/simtools/HEAT.cpp +++ b/src/simulation/simtools/HEAT.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_HEAT() { Identifier = "DEFAULT_TOOL_HEAT"; Name = "HEAT"; - Colour = 0xFFDD00_rgb .Pack(); + Colour = 0xFFDD00_rgb; Description = "Heats the targeted element."; Perform = &perform; } diff --git a/src/simulation/simtools/MIX.cpp b/src/simulation/simtools/MIX.cpp index 71f0c08f2..2b79e15ee 100644 --- a/src/simulation/simtools/MIX.cpp +++ b/src/simulation/simtools/MIX.cpp @@ -9,7 +9,7 @@ void SimTool::Tool_MIX() { Identifier = "DEFAULT_TOOL_MIX"; Name = "MIX"; - Colour = 0xFFD090_rgb .Pack(); + Colour = 0xFFD090_rgb; Description = "Mixes particles."; Perform = &perform; } diff --git a/src/simulation/simtools/NGRV.cpp b/src/simulation/simtools/NGRV.cpp index 15ba3809a..c88505671 100644 --- a/src/simulation/simtools/NGRV.cpp +++ b/src/simulation/simtools/NGRV.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_NGRV() { Identifier = "DEFAULT_TOOL_NGRV"; Name = "NGRV"; - Colour = 0xAACCFF_rgb .Pack(); + Colour = 0xAACCFF_rgb; Description = "Creates a short-lasting negative gravity well."; Perform = &perform; } diff --git a/src/simulation/simtools/PGRV.cpp b/src/simulation/simtools/PGRV.cpp index 31aea7ad0..d70105c34 100644 --- a/src/simulation/simtools/PGRV.cpp +++ b/src/simulation/simtools/PGRV.cpp @@ -6,7 +6,7 @@ void SimTool::Tool_PGRV() { Identifier = "DEFAULT_TOOL_PGRV"; Name = "PGRV"; - Colour = 0xCCCCFF_rgb .Pack(); + Colour = 0xCCCCFF_rgb; Description = "Creates a short-lasting gravity well."; Perform = &perform; } diff --git a/src/simulation/simtools/VAC.cpp b/src/simulation/simtools/VAC.cpp index ab263bc55..71bb7a301 100644 --- a/src/simulation/simtools/VAC.cpp +++ b/src/simulation/simtools/VAC.cpp @@ -7,7 +7,7 @@ void SimTool::Tool_VAC() { Identifier = "DEFAULT_TOOL_VAC"; Name = "VAC"; - Colour = 0x303030_rgb .Pack(); + Colour = 0x303030_rgb; Description = "Vacuum, reduces air pressure."; Perform = &perform; }