summaryrefslogtreecommitdiff
path: root/src/simulation/elements/NONE.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-04 14:26:55 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-04 14:26:55 (GMT)
commit055832270979cdb027c0c30a74cf82c23df13689 (patch)
treeb2ee525f713764c020b8668fe5776f4aa3d60643 /src/simulation/elements/NONE.cpp
parentf32cd872ca2214b670b1ed4efa0b5b12a9c1ed30 (diff)
downloadpowder-055832270979cdb027c0c30a74cf82c23df13689.zip
powder-055832270979cdb027c0c30a74cf82c23df13689.tar.gz
Add icons for erase, improve icons for certain walls, fix issue #45
Diffstat (limited to 'src/simulation/elements/NONE.cpp')
-rw-r--r--src/simulation/elements/NONE.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/simulation/elements/NONE.cpp b/src/simulation/elements/NONE.cpp
index d271c90..95d9d3e 100644
--- a/src/simulation/elements/NONE.cpp
+++ b/src/simulation/elements/NONE.cpp
@@ -43,7 +43,24 @@ Element_NONE::Element_NONE()
HighTemperatureTransition = NT;
Update = NULL;
-
+ IconGenerator = &Element_NONE::iconGen;
}
+//#TPT-Directive ElementHeader Element_NONE static VideoBuffer * iconGen(int, int, int)
+VideoBuffer * Element_NONE::iconGen(int wallID, int width, int height)
+{
+ VideoBuffer * newTexture = new VideoBuffer(width, height);
+
+ for (int j=3; j<(width-4)/2; j++)
+ {
+ newTexture->SetPixel(j+6, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(j+7, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(-j+19, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(-j+20, j, 0xFF, 0, 0, 255);
+ }
+
+ return newTexture;
+}
+
+
Element_NONE::~Element_NONE() {} \ No newline at end of file