diff options
| author | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-08-29 17:24:44 (GMT) |
|---|---|---|
| committer | jacksonmj <mj-pt@jacksonmj.co.uk> | 2013-08-29 17:24:44 (GMT) |
| commit | 268158f1ddbdfe6067542bae0bd3fbd425a2c8f6 (patch) | |
| tree | ad07d1bf62fe655c7f3e125a63036e4e07082089 | |
| parent | bebe9bd8fd0e4b73fdeb9ea0218bda704e0a6fad (diff) | |
| download | powder-268158f1ddbdfe6067542bae0bd3fbd425a2c8f6.zip powder-268158f1ddbdfe6067542bae0bd3fbd425a2c8f6.tar.gz | |
More FILT modes: XOR and NOT
| -rw-r--r-- | src/gui/game/GameView.cpp | 4 | ||||
| -rw-r--r-- | src/simulation/elements/FILT.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp index 01ba39c..9d4295c 100644 --- a/src/gui/game/GameView.cpp +++ b/src/gui/game/GameView.cpp @@ -2071,8 +2071,8 @@ void GameView::OnDraw() else if (sample.particle.type == PT_FILT) { sampleInfo << c->ElementResolve(sample.particle.type, sample.particle.ctype); - const char* filtModes[] = {"set colour", "AND", "OR", "subtract colour", "red shift", "blue shift", "no effect"}; - if (sample.particle.tmp>=0 && sample.particle.tmp<=6) + const char* filtModes[] = {"set colour", "AND", "OR", "subtract colour", "red shift", "blue shift", "no effect", "XOR", "NOT"}; + if (sample.particle.tmp>=0 && sample.particle.tmp<=8) sampleInfo << " (" << filtModes[sample.particle.tmp] << ")"; else sampleInfo << " (unknown mode)"; diff --git a/src/simulation/elements/FILT.cpp b/src/simulation/elements/FILT.cpp index 62c3afc..9c7615f 100644 --- a/src/simulation/elements/FILT.cpp +++ b/src/simulation/elements/FILT.cpp @@ -100,6 +100,10 @@ int Element_FILT::interactWavelengths(Particle* cpart, int origWl) } case 6: return origWl; // No change + case 7: + return origWl ^ filtWl; // XOR colours + case 8: + return (~origWl) & mask; // Invert colours default: return filtWl; } |
