From f242566e30831963eee287b7dbe944b715457dae Mon Sep 17 00:00:00 2001 From: Cracker64 Date: Mon, 10 Jan 2011 09:43:16 -0500 Subject: [PATCH] fix QRTZ spot saving, rotate should change FAN vector as well --- includes/defines.h | 2 +- src/graphics.c | 2 +- src/main.c | 2 +- src/powder.c | 23 +++++++++++++++++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/includes/defines.h b/includes/defines.h index 9f12cb930..af414718a 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -8,7 +8,7 @@ #endif #define SAVE_VERSION 45 -#define MINOR_VERSION 1 +#define MINOR_VERSION 2 #define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter. //#define BETA diff --git a/src/graphics.c b/src/graphics.c index b0d532d7f..ef8fb15eb 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1667,7 +1667,7 @@ void draw_parts(pixel *vid) } else if(t==PT_QRTZ || t==PT_PQRT) { - int z = parts[i].tmp; + int z = parts[i].tmp - 5; if(parts[i].temp>(pstates[t].ltemp-800.0f)) { float frequency = 3.1415/(2*pstates[t].ltemp-(pstates[t].ltemp-800.0f)); diff --git a/src/main.c b/src/main.c index 97e73829c..557673c58 100644 --- a/src/main.c +++ b/src/main.c @@ -1756,7 +1756,7 @@ int main(int argc, char *argv[]) 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,tmp: %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,parts[cr>>8].tmp); //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", ptypes[cr&0xFF].name, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f); diff --git a/src/powder.c b/src/powder.c index 440c0c297..5f6a78a48 100644 --- a/src/powder.c +++ b/src/powder.c @@ -648,9 +648,9 @@ inline int create_part(int p, int x, int y, int t) if(t==PT_SING) parts[i].life = rand()%50+60; if(t==PT_QRTZ) - parts[i].tmp = (rand()%11) -5; + parts[i].tmp = (rand()%11); if(t==PT_PQRT) - parts[i].tmp = (rand()%11) -5; + parts[i].tmp = (rand()%11); if(t==PT_FSEP) parts[i].life = 50; if(t==PT_COAL) { @@ -5785,16 +5785,25 @@ void rotate_area(int area_x, int area_y, int area_w, int area_h, int invert) unsigned rtpmap[area_w][area_h]; unsigned char tbmap[area_h/CELL][area_w/CELL]; unsigned char rtbmap[area_w/CELL][area_h/CELL]; + float tfvy[area_h/CELL][area_w/CELL]; + float tfvx[area_h/CELL][area_w/CELL]; for(cy=0; cy>8].y = area_y +cy; } bmap[(area_y+cy)/CELL][(area_x+cx)/CELL] = rtbmap[cy/CELL][cx/CELL]; + fvy[(area_y+cy)/CELL][(area_x+cx)/CELL] = tfvy[cy/CELL][cx/CELL]; + fvx[(area_y+cy)/CELL][(area_x+cx)/CELL] = tfvx[cy/CELL][cx/CELL]; } } }