fix WARP being invisible, make it visible in heat display mode though

This commit is contained in:
jacob1 2012-12-17 19:41:32 -05:00
parent f08481a88e
commit 2728cf852b
4 changed files with 22 additions and 4 deletions

View File

@ -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()

View File

@ -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)
{

View File

@ -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;

View File

@ -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)