summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-12-22 18:17:06 (GMT)
committer Simon <simon@hardwired.org.uk>2010-12-22 18:17:06 (GMT)
commitbd9b01c3e21bde2065193a48bd7d4f9678de765e (patch)
tree14e4800b2a4e5a3ea7ed627f6eb201f85a06b7f2 /src
parent69b0aa9eccbdbf947b84d2a4e09a18e68e947664 (diff)
parent321c57058105a473b59e858c67cfa878a6e20d41 (diff)
downloadpowder-bd9b01c3e21bde2065193a48bd7d4f9678de765e.zip
powder-bd9b01c3e21bde2065193a48bd7d4f9678de765e.tar.gz
Cracker Merge
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c2
-rw-r--r--src/main.c10
-rw-r--r--src/powder.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 3ea4c9c..3eb7e18 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -1641,7 +1641,7 @@ void draw_parts(pixel *vid)
cg = sin(frequency*q + 2) * 127 + 128;
cb = sin(frequency*q + 4) * 127 + 128;
blendpixel(vid, nx, ny, cr, cg, cb, 255);
- if(mousex==(nx) && mousey==(ny))
+ if(mousex==(nx) && mousey==(ny) && DEBUG_MODE)
{
int z;
for(z = 0; z<NPART; z++) {
diff --git a/src/main.c b/src/main.c
index 3e5bfb5..e6d191e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1668,6 +1668,14 @@ int main(int argc, char *argv[])
if(!((cr>>8)>=NPART || !cr))
{
#ifdef BETA
+ if(DEBUG_MODE)
+ {
+ int tctype = parts[cr>>8].ctype;
+ if(tctype>=PT_NUM)
+ tctype = 0;
+ sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[tctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
+ //sprintf(heattext, "%s (%s), Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, ptypes[parts[cr>>8].ctype].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
+ } else
sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C, Life: %d", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life);
#else
if(DEBUG_MODE)
@@ -2333,7 +2341,7 @@ int main(int argc, char *argv[])
}
#ifdef BETA
- sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS);
+ sprintf(uitext, "Version %d Beta %d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION);
#else
if(DEBUG_MODE)
sprintf(uitext, "Version %d.%d FPS:%d Parts:%d Generation:%d", SAVE_VERSION, MINOR_VERSION, FPSB, NUM_PARTS,GENERATION);
diff --git a/src/powder.c b/src/powder.c
index be1c7cd..71dee15 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -2794,7 +2794,7 @@ void update_particles_i(pixel *vid, int start, int inc)
{
create_part(-1, x , y-1 , PT_FWRK);
r = pmap[y-1][x];
- if(parts[r>>8].type==PT_FWRK)
+ if((r&0xFF)==PT_FWRK)
{
parts[r>>8].vy = rand()%8-22;
parts[r>>8].vx = rand()%20-rand()%20;
@@ -3054,7 +3054,7 @@ void update_particles_i(pixel *vid, int start, int inc)
r = pmap[y+ny][x+nx];
if((r>>8)>=NPART || !r)
continue;
- else if(parts[r>>8].type==PT_SPRK&&(parts[r>>8].ctype==PT_PSCN)&&(parts[r>>8].life>=3)&&parts[i].life%4==0)
+ else if(parts[r>>8].type==PT_SPRK&&(parts[r>>8].ctype==PT_PSCN)&&(parts[r>>8].life>=3)&&parts[i].life%4==0&&parts_avg(i,r>>8,PT_INSL)!=PT_INSL)
{
flood_parts(x,y,PT_SPRK,PT_INST,-1);//add life
parts[r>>8].type==parts[r>>8].ctype;