summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/FILT.cpp7
-rw-r--r--src/simulation/elements/VIRS.cpp1
-rw-r--r--src/simulation/elements/VRSG.cpp16
-rw-r--r--src/simulation/elements/VRSS.cpp9
4 files changed, 27 insertions, 6 deletions
diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp
index 8ece142..36ea414 100644
--- a/src/simulation/elements/FILT.cpp
+++ b/src/simulation/elements/FILT.cpp
@@ -106,10 +106,9 @@ int Element_FILT::interactWavelengths(Particle* cpart, int origWl)
return (~origWl) & mask; // Invert colours
case 9:
{
- int t1, t2, t3, r;
- t1 = (origWl & 0x0000FF)+(rand()%5)-2;
- t1 = ((origWl & 0x00FF00)>>8)+(rand()%5)-2;
- t3 = ((origWl & 0xFF0000)>>16)+(rand()%5)-2;
+ int t1 = (origWl & 0x0000FF)+(rand()%5)-2;
+ int t2 = ((origWl & 0x00FF00)>>8)+(rand()%5)-2;
+ int t3 = ((origWl & 0xFF0000)>>16)+(rand()%5)-2;
return (origWl & 0xFF000000) | (t3<<16) | (t2<<8) | t1;
}
default:
diff --git a/src/simulation/elements/VIRS.cpp b/src/simulation/elements/VIRS.cpp
index b30eecf..92ef220 100644
--- a/src/simulation/elements/VIRS.cpp
+++ b/src/simulation/elements/VIRS.cpp
@@ -153,6 +153,7 @@ int Element_VIRS::update(UPDATE_FUNC_ARGS)
//#TPT-Directive ElementHeader Element_VIRS static int graphics(GRAPHICS_FUNC_ARGS)
int Element_VIRS::graphics(GRAPHICS_FUNC_ARGS)
{
+ *pixel_mode |= PMODE_BLUR;
*pixel_mode |= NO_DECO;
return 1;
}
diff --git a/src/simulation/elements/VRSG.cpp b/src/simulation/elements/VRSG.cpp
index e787bfe..76fba44 100644
--- a/src/simulation/elements/VRSG.cpp
+++ b/src/simulation/elements/VRSG.cpp
@@ -43,7 +43,21 @@ Element_VRSG::Element_VRSG()
HighTemperatureTransition = NT;
Update = &Element_VIRS::update;
- Graphics = &Element_VIRS::graphics;
+ Graphics = &Element_VRSG::graphics;
+}
+
+
+//#TPT-Directive ElementHeader Element_VRSG static int graphics(GRAPHICS_FUNC_ARGS)
+int Element_VRSG::graphics(GRAPHICS_FUNC_ARGS)
+{
+ *pixel_mode &= ~PMODE;
+ *pixel_mode |= FIRE_BLEND;
+ *firer = *colr/2;
+ *fireg = *colg/2;
+ *fireb = *colb/2;
+ *firea = 125;
+ *pixel_mode |= NO_DECO;
+ return 1;
}
Element_VRSG::~Element_VRSG() {}
diff --git a/src/simulation/elements/VRSS.cpp b/src/simulation/elements/VRSS.cpp
index 808fc93..3bfb529 100644
--- a/src/simulation/elements/VRSS.cpp
+++ b/src/simulation/elements/VRSS.cpp
@@ -43,7 +43,14 @@ Element_VRSS::Element_VRSS()
HighTemperatureTransition = PT_VIRS;
Update = &Element_VIRS::update;
- Graphics = &Element_VIRS::graphics;
+ Graphics = &Element_VRSS::graphics;
+}
+
+//#TPT-Directive ElementHeader Element_VRSS static int graphics(GRAPHICS_FUNC_ARGS)
+int Element_VRSS::graphics(GRAPHICS_FUNC_ARGS)
+{
+ *pixel_mode |= NO_DECO;
+ return 1;
}
Element_VRSS::~Element_VRSS() {}