summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-18 13:43:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-18 13:43:09 (GMT)
commit82a19334001969af688cd52eb48509d4b91cef59 (patch)
treec33006ba70b35a76aaf46fe11f84371b3a5bd017 /src
parentdf2d698ed5e6d824b6fb4a50eaaf4ecadf78f65b (diff)
downloadpowder-82a19334001969af688cd52eb48509d4b91cef59.zip
powder-82a19334001969af688cd52eb48509d4b91cef59.tar.gz
TPT: Old nothing display mode in the form of Basic colour mode fe82685257
Diffstat (limited to 'src')
-rw-r--r--src/Renderer.cpp9
-rw-r--r--src/render/RenderView.cpp5
-rw-r--r--src/simulation/ElementGraphics.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/Renderer.cpp b/src/Renderer.cpp
index 10a9205..c8f301f 100644
--- a/src/Renderer.cpp
+++ b/src/Renderer.cpp
@@ -701,7 +701,7 @@ void Renderer::render_parts()
fireg = graphicscache[t].fireg;
fireb = graphicscache[t].fireb;
}
- else
+ else if(!(colour_mode & COLOUR_BASC))
{
if (ptypes[t].graphics_func)
{
@@ -789,6 +789,13 @@ void Renderer::render_parts()
colb = sin(frequency*q) * 16 + colb;
if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR;
}
+ else if(colour_mode & COLOUR_BASC)
+ {
+ colr = PIXR(ptypes[t].pcolors);
+ colg = PIXG(ptypes[t].pcolors);
+ colb = PIXB(ptypes[t].pcolors);
+ pixel_mode = PMODE_FLAT;
+ }
//Apply decoration colour
if(!colour_mode)
diff --git a/src/render/RenderView.cpp b/src/render/RenderView.cpp
index 3c9811d..e44c72f 100644
--- a/src/render/RenderView.cpp
+++ b/src/render/RenderView.cpp
@@ -157,6 +157,11 @@ RenderView::RenderView():
colourModes.push_back(tCheckbox);
tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_GRAD));
AddComponent(tCheckbox);
+
+ tCheckbox = new ui::Checkbox(ui::Point(536, YRES+4), ui::Point(50, 16), "Basic");
+ colourModes.push_back(tCheckbox);
+ tCheckbox->SetActionCallback(new ColourModeAction(this, COLOUR_BASC));
+ AddComponent(tCheckbox);
}
void RenderView::OnMouseDown(int x, int y, unsigned button)
diff --git a/src/simulation/ElementGraphics.h b/src/simulation/ElementGraphics.h
index 2f0946b..e84db94 100644
--- a/src/simulation/ElementGraphics.h
+++ b/src/simulation/ElementGraphics.h
@@ -37,6 +37,7 @@
#define COLOUR_HEAT 0x00000001
#define COLOUR_LIFE 0x00000002
#define COLOUR_GRAD 0x00000004
+#define COLOUR_BASC 0x00000008
#define COLOUR_DEFAULT 0x00000000