diff options
| author | jacob1 <jfu614@gmail.com> | 2012-12-18 00:41:32 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2012-12-18 01:08:46 (GMT) |
| commit | 2728cf852b41d6b015582bb4ad95772be58b277b (patch) | |
| tree | 04786972c7fce7cc66cd8f469bc87a6d37f9df13 /src | |
| parent | f08481a88e083c4cda2465dd74bf442915c395ae (diff) | |
| download | powder-2728cf852b41d6b015582bb4ad95772be58b277b.zip powder-2728cf852b41d6b015582bb4ad95772be58b277b.tar.gz | |
fix WARP being invisible, make it visible in heat display mode though
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/GameController.cpp | 10 | ||||
| -rw-r--r-- | src/graphics/Renderer.cpp | 10 | ||||
| -rw-r--r-- | src/simulation/Simulation.cpp | 4 | ||||
| -rw-r--r-- | src/simulation/elements/WARP.cpp | 2 |
4 files changed, 22 insertions, 4 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e56ae50..07d2e63 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -702,7 +702,15 @@ void GameController::Exit() void GameController::ResetAir() { - gameModel->GetSimulation()->air->Clear(); + Simulation * sim = gameModel->GetSimulation(); + sim->air->Clear(); + for (int i = 0; i < NPART; i++) + { + if (sim->parts[i].type == PT_QRTZ || sim->parts[i].type == PT_GLAS) + { + sim->parts[i].pavg[0] = sim->parts[i].pavg[1] = 0; + } + } } void GameController::ResetSpark() diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index eaec74c..98b94b1 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -1217,7 +1217,10 @@ void Renderer::render_parts() fireg = colg = (unsigned char)color_data[caddress+1]; fireb = colb = (unsigned char)color_data[caddress+2]; cola = 255; - if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) + pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + else if (!pixel_mode) + pixel_mode |= PMODE_FLAT; } else if(colour_mode & COLOUR_LIFE) { @@ -1228,7 +1231,10 @@ void Renderer::render_parts() q = sim->parts[i].life; colr = colg = colb = sin(gradv*q) * 100 + 128; cola = 255; - if(pixel_mode & (FIREMODE | PMODE_GLOW)) pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + if(pixel_mode & (FIREMODE | PMODE_GLOW)) + pixel_mode = (pixel_mode & ~(FIREMODE|PMODE_GLOW)) | PMODE_BLUR; + else if (!pixel_mode) + pixel_mode |= PMODE_FLAT; } else if(colour_mode & COLOUR_BASC) { diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 21f8109..afb50c5 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -136,6 +136,10 @@ int Simulation::Load(int fullX, int fullY, GameSave * save) } } } + if (parts[i].pavg[0] || parts[i].pavg[1]) + { + parts[i].pavg[0] = parts[i].pavg[1] = 0; + } } parts_lastActiveIndex = NPART-1; force_stacking_check = 1; diff --git a/src/simulation/elements/WARP.cpp b/src/simulation/elements/WARP.cpp index bb8f8e1..5dd19c5 100644 --- a/src/simulation/elements/WARP.cpp +++ b/src/simulation/elements/WARP.cpp @@ -43,7 +43,7 @@ Element_WARP::Element_WARP() HighTemperatureTransition = NT; Update = &Element_WARP::update; - + Graphics = &Element_WARP::graphics; } //#TPT-Directive ElementHeader Element_WARP static int update(UPDATE_FUNC_ARGS) |
