From f94986a3bacc60bc3b571209130611437fe9dabc Mon Sep 17 00:00:00 2001 From: Phil Date: Sat, 11 Sep 2010 20:17:52 -0400 Subject: [PATCH] updated to simon's latest --- defines.h | 2 +- graphics.c | 59 +++++++++++++++++- interface.c | 115 +++++++++++++++++++++++++++++----- interface.h | 1 + main.c | 175 ++++++++++++++++++++++++++++++---------------------- powder.c | 11 +++- powder.h | 14 ++--- 7 files changed, 273 insertions(+), 104 deletions(-) diff --git a/defines.h b/defines.h index 558217ab3..d6642c122 100644 --- a/defines.h +++ b/defines.h @@ -8,7 +8,7 @@ #endif #define SAVE_VERSION 42 -#define MINOR_VERSION 0 +#define MINOR_VERSION 1 #define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter. #define BETA diff --git a/graphics.c b/graphics.c index 44af5fff5..f52f5042e 100644 --- a/graphics.c +++ b/graphics.c @@ -971,6 +971,15 @@ inline void blendpixel(pixel *vid, int x, int y, int r, int g, int b, int a) #endif { #ifdef OpenGL + if(x<0 || y<0 || x>=XRES || r>=YRES) + return; + if(a!=255) + { + glBegin (GL_QUADS); + glColor4ub(r,g,b,a); + glVertex2i(x, y); + } + vid[y*(XRES+BARSIZE)+x] = PIXRGB(r,g,b); #else pixel t; if(x<0 || y<0 || x>=XRES || y>=YRES) @@ -1171,6 +1180,48 @@ void draw_parts(pixel *vid) float pt = R_TEMP; for(i = 0; iSAVE_VERSION) return NULL; - + if(c[2]==0x43 && c[1]==0x75 && c[0]==0x66){ + new_format = 1; + } bw = c[6]; bh = c[7]; w = bw*CELL; diff --git a/interface.c b/interface.c index c3d2e051e..6bb0c563d 100644 --- a/interface.c +++ b/interface.c @@ -35,6 +35,7 @@ void *svf_last = NULL; int svf_lsize; char *search_ids[GRID_X*GRID_Y]; +char *search_dates[GRID_X*GRID_Y]; int search_votes[GRID_X*GRID_Y]; int search_publish[GRID_X*GRID_Y]; int search_scoredown[GRID_X*GRID_Y]; @@ -1609,11 +1610,11 @@ int sdl_poll(void) sdl_zoom_trig = 1; Z_keysym = event.key.keysym.sym; } - if( event.key.keysym.sym == SDLK_PLUS || event.key.keysym.sym == SDLK_RIGHTBRACKET) + if( event.key.keysym.sym == SDLK_PLUS) { sdl_wheel++; } - if( event.key.keysym.sym == SDLK_MINUS || event.key.keysym.sym == SDLK_LEFTBRACKET) + if( event.key.keysym.sym == SDLK_MINUS) { sdl_wheel--; } @@ -1834,6 +1835,7 @@ int search_ui(pixel *vid_buf) memset(img_id, 0, sizeof(img_id)); memset(search_ids, 0, sizeof(search_ids)); + memset(search_dates, 0, sizeof(search_dates)); memset(search_names, 0, sizeof(search_names)); memset(search_scoreup, 0, sizeof(search_scoreup)); memset(search_scoredown, 0, sizeof(search_scoredown)); @@ -2008,7 +2010,7 @@ int search_ui(pixel *vid_buf) } else pos = gi+GRID_X*gj; - if(!search_ids[pos]) + if(!search_dates[pos]) break; gx = ((XRES/GRID_X)*gi) + (XRES/GRID_X-XRES/GRID_S)/2; gy = ((((YRES-(MENUSIZE-20))+15)/GRID_Y)*gj) + ((YRES-(MENUSIZE-20))/GRID_Y-(YRES-(MENUSIZE-20))/GRID_S+10)/2 + 18; @@ -2048,6 +2050,9 @@ int search_ui(pixel *vid_buf) dp = pos; } } + drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, YRES/GRID_S+3, 128, 128, 128, 255); + fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2, 6, 1+(YRES/GRID_S+3)/2, 0, 107, 10, 255); + fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2), 6, 1+(YRES/GRID_S+3)/2, 107, 10, 0, 255); if(mp==pos && !st) drawrect(vid_buf, gx-2, gy-2, XRES/GRID_S+3, YRES/GRID_S+3, 160, 160, 192, 255); else @@ -2106,11 +2111,10 @@ int search_ui(pixel *vid_buf) nyd = search_scoredown[pos]/ry; } - fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 0, 187, 40, 255); - fillrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)+1, 4, nyd, 187, 40, 0, 255); - - drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 0, 107, 10, 255); - drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)+1, 4, nyd, 107, 10, 0, 255); + fillrect(vid_buf, gx-1+(XRES/GRID_S)+5, gy-1+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 57, 187, 57, 255); + fillrect(vid_buf, gx-1+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2), 4, nyd, 187, 57, 57, 255); + //drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)-nyu, 4, nyu, 0, 107, 10, 255); + // drawrect(vid_buf, gx-2+(XRES/GRID_S)+5, gy-2+((YRES/GRID_S+3)/2)+1, 4, nyd, 107, 10, 0, 255); } } @@ -2202,9 +2206,17 @@ int search_ui(pixel *vid_buf) fillrect(vid_buf, 0, 0, XRES+BARSIZE, YRES+MENUSIZE, 0, 0, 0, 255); info_box(vid_buf, "Loading..."); - uri = malloc(strlen(search_ids[mp])*3+strlen(SERVER)+64); - strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID="); - strcaturl(uri, search_ids[mp]); + if(search_dates[mp]){ + uri = malloc(strlen(search_ids[mp])*3+strlen(search_dates[mp])*3+strlen(SERVER)+71); + strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID="); + strcaturl(uri, search_ids[mp]); + strcaturl(uri, "&Date="); + strcaturl(uri, search_dates[mp]); + } else { + uri = malloc(strlen(search_ids[mp])*3+strlen(SERVER)+64); + strcpy(uri, "http://" SERVER "/Get.api?Op=save&ID="); + strcaturl(uri, search_ids[mp]); + } data = http_simple_get(uri, &status, &dlen); free(uri); @@ -2481,7 +2493,7 @@ finish: int search_results(char *str, int votes) { int i,j; - char *p,*q,*r,*s,*vu,*vd,*pu; + char *p,*q,*r,*s,*vu,*vd,*pu,*sd; for(i=0; i=GRID_X*GRID_Y) + break; + if(votes) + { + sd = strchr(str+8, ' '); + if(!sd) + return i; + *(sd++) = 0; + pu = strchr(sd, ' '); + if(!pu) + return i; + *(pu++) = 0; + s = strchr(pu, ' '); + if(!s) + return i; + *(s++) = 0; + vu = strchr(s, ' '); + if(!vu) + return i; + *(vu++) = 0; + vd = strchr(vu, ' '); + if(!vd) + return i; + *(vd++) = 0; + q = strchr(vd, ' '); + } + else + { + sd = strchr(str+8, ' '); + if(!sd) + return i; + *(sd++) = 0; + pu = strchr(sd, ' '); + if(!pu) + return i; + *(pu++) = 0; + vu = strchr(pu, ' '); + if(!vu) + return i; + *(vu++) = 0; + vd = strchr(vu, ' '); + if(!vd) + return i; + *(vd++) = 0; + q = strchr(vd, ' '); + } + if(!q) + return i; + *(q++) = 0; + r = strchr(q, ' '); + if(!r) + return i; + *(r++) = 0; + search_ids[i] = mystrdup(str+8); + search_dates[i] = mystrdup(sd); + search_publish[i] = atoi(pu); + search_scoreup[i] = atoi(vu); + search_scoredown[i] = atoi(vd); + search_owners[i] = mystrdup(q); + search_names[i] = mystrdup(r); + + if(s) + search_votes[i] = atoi(s); + thumb_cache_find(str+8, search_thumbs+i, search_thsizes+i); i++; } else if(!strncmp(str, "TAG ", 4)) diff --git a/interface.h b/interface.h index 5c4e415a3..4afa7a262 100644 --- a/interface.h +++ b/interface.h @@ -101,6 +101,7 @@ extern void *svf_last; extern int svf_lsize; extern char *search_ids[GRID_X*GRID_Y]; +extern char *search_dates[GRID_X*GRID_Y]; extern int search_votes[GRID_X*GRID_Y]; extern int search_publish[GRID_X*GRID_Y]; extern int search_scoredown[GRID_X*GRID_Y]; diff --git a/main.c b/main.c index 15eed7c5d..6c8f0e292 100644 --- a/main.c +++ b/main.c @@ -232,7 +232,7 @@ void *build_thumb(int *size, int bzip2) void *build_save(int *size, int x0, int y0, int w, int h) { - unsigned char *d=calloc(1,3*(XRES/CELL)*(YRES/CELL)+(XRES*YRES)*7+MAXSIGNS*262), *c; + unsigned char *d=calloc(1,3*(XRES/CELL)*(YRES/CELL)+(XRES*YRES)*8+MAXSIGNS*262), *c; int i,j,x,y,p=0,*m=calloc(XRES*YRES, sizeof(int)); int bx0=x0/CELL, by0=y0/CELL, bw=(w+CELL-1)/CELL, bh=(h+CELL-1)/CELL; @@ -311,30 +311,10 @@ void *build_save(int *size, int x0, int y0, int w, int h) i = m[j]; if(i) { - if(cracker) - { - int z; - int temp1 = 0; - int temp = parts[i-1].temp; - int temp2 = temp; - for(z = 15;z>=8;z--) - { - if(temp>0&&temp>=powf(2,z)) - { - temp1 += powf(2,z-8); - temp -= powf(2,z); - } - } - d[p++] = (char)temp1; - d[p++] = (char)temp2; - } - else - { - unsigned char tttemp = (unsigned char)((parts[i-1].temp+(-MIN_TEMP))/((MAX_TEMP+(-MIN_TEMP))/255)); - d[p++] = tttemp; - } - //if(tttemp<0) tttemp=0; - //if(tttemp>255) tttemp=255; + //New Temperature saving uses a 16bit unsigned int for temperatures, giving a precision of 1 degree versus 36 for the old format + int tttemp = (int)parts[i-1].temp; + d[p++] = ((tttemp&0xFF00)>>8); + d[p++] = (tttemp&0x00FF); } } for(j=0; jSAVE_VERSION) - return 2; - ver = c[4]; + if(size<16) + return 1; + if(!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50)) + return 1; + if(c[2]==0x76 && c[1]==0x53 && c[0]==0x50){ + new_format = 1; + } + if(c[4]>SAVE_VERSION) + return 2; + ver = c[4]; - if(ver<34) - { + if(ver<34) + { legacy_enable = 1; } else @@ -636,40 +623,34 @@ int parse_save(void *save, int size, int replace, int x0, int y0) { if(ver>=34&&legacy_beta==0) { - if(p >= size) - { - goto corrupt; - } - if(i <= NPART) + if(p >= size) { - if(cracker) - { - int z; - int q = 0; - int temp1 = d[p++]; - int temp2 = d[p++]; - for(z = 7;z>=0;z--) - { - if(temp1>0&&temp1>=powf(2,z)) - { - q += powf(2,z+8); - temp1 -= powf(2,z); - } - } + goto corrupt; + } + if(i <= NPART) + { + if(ver>=42){ + if(new_format){ + ttv = (d[p++])<<8; + ttv |= (d[p++]); + parts[i-1].temp = ttv; + } else { - parts[i-1].temp = temp2 + q + 0.15; + parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP; + } } - else if(ver>=42){ - parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP; - } else { + else { parts[i-1].temp = ((d[p++]*((O_MAX_TEMP+(-O_MIN_TEMP))/255))+O_MIN_TEMP)+273.15; } - } - else - { - p += 2; - } - } + } + else + { + p ++; + if(new_format){ + p++; + } + } + } else { parts[i-1].temp = ptypes[parts[i-1].type].heat; @@ -1301,13 +1282,57 @@ int main(int argc, char *argv[]) { set_cmode(5); } - if(sdl_key=='7') - { - set_cmode(6); - } - if(sdl_key==SDLK_SPACE) - sys_pause = !sys_pause; - if(sdl_key=='h') + if(sdl_key=='7') + { + set_cmode(6); + } + if(sdl_key==SDLK_LEFTBRACKET){ + if(sdl_zoom_trig==1) + { + ZSIZE -= 1; + if(ZSIZE>32) + ZSIZE = 32; + if(ZSIZE<2) + ZSIZE = 2; + ZFACTOR = 256/ZSIZE; + } + else + { + if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL)) + bs -= 1; + else + bs -= ceil((bs/5)+0.5f); + if(bs>1224) + bs = 1224; + if(bs<0) + bs = 0; + } + } + if(sdl_key==SDLK_RIGHTBRACKET){ + if(sdl_zoom_trig==1) + { + ZSIZE += 1; + if(ZSIZE>32) + ZSIZE = 32; + if(ZSIZE<2) + ZSIZE = 2; + ZFACTOR = 256/ZSIZE; + } + else + { + if(sdl_mod & (KMOD_LCTRL|KMOD_RCTRL)) + bs += 1; + else + bs += ceil((bs/5)+0.5f); + if(bs>1224) + bs = 1224; + if(bs<0) + bs = 0; + } + } + if(sdl_key==SDLK_SPACE) + sys_pause = !sys_pause; + if(sdl_key=='h') hud_enable = !hud_enable; if(sdl_key=='p') dump_frame(vid_buf, XRES, YRES, XRES); diff --git a/powder.c b/powder.c index 9495c16a6..e185b0eae 100644 --- a/powder.c +++ b/powder.c @@ -63,7 +63,7 @@ int try_move(int i, int x, int y, int nx, int ny) { return 1; } - if(bmap[ny/CELL][nx/CELL]==20 && ptypes[parts[i].type].falldown!=0 && parts[i].type!=PT_FIRE) + if(bmap[ny/CELL][nx/CELL]==20 && ptypes[parts[i].type].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) { return 0; } @@ -247,6 +247,8 @@ inline int create_part(int p, int x, int y, int t) parts[i].life = rand()%120+240; if(t==PT_NBLE) parts[i].life = 0; + if(t==PT_ICEI) + parts[i].ctype = PT_WATR; if(t==PT_NEUT) { float r = (rand()%128+128)/127.0f; @@ -526,6 +528,7 @@ void update_particles_i(pixel *vid, int start, int inc) (bmap[y/CELL][x/CELL]==9) || (bmap[y/CELL][x/CELL]==8 && ptypes[t].falldown!=2) || (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=1) || + (bmap[y/CELL][x/CELL]==13 && ptypes[t].falldown!=0 && parts[i].type!=PT_FIRE && parts[i].type!=PT_SMKE) || (bmap[y/CELL][x/CELL]==4 && (t==PT_METL || t==PT_SPRK)) || (bmap[y/CELL][x/CELL]==3 && !emap[y/CELL][x/CELL])) && (t!=PT_STKM))) { @@ -712,6 +715,8 @@ void update_particles_i(pixel *vid, int start, int inc) int ctemp = pv[y/CELL][x/CELL]*2; c_heat = 0.0f; h_count = 0; + if(t==PT_ICEI && !parts[i].ctype) + parts[i].ctype = PT_WATR; if(ptypes[t].hconduct>(rand()%250)) { for(nx=-1; nx<2; nx++) @@ -833,11 +838,11 @@ void update_particles_i(pixel *vid, int start, int inc) pt = parts[i].temp = restrict_flt(parts[i].temp, MIN_TEMP, MAX_TEMP); } } - if(t==PT_PTCT&&parts[i].temp>249.0f) + if(t==PT_PTCT&&parts[i].temp>295.0f) { pt = parts[i].temp -= 2.5f; } - if(t==PT_NTCT&&parts[i].temp>249.0f) + if(t==PT_NTCT&&parts[i].temp>295.0f) { pt = parts[i].temp -= 2.5f; } diff --git a/powder.h b/powder.h index 63ac2b79a..af3d4ffe7 100644 --- a/powder.h +++ b/powder.h @@ -224,7 +224,7 @@ static const part_type ptypes[PT_NUM] = {"MWAX", PIXPACK(0xE0E0AA), 0.3f, 0.02f * CFDS, 0.95f, 0.80f, 0.0f, 0.15f, 0.00f, 0.000001f* CFDS,2, 5, 0, 0, 2, 1, SC_LIQUID, R_TEMP+28.0f+273.15f, 44, "Liquid Wax."}, {"PSCN", PIXPACK(0x805050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "P-Type Silicon, Will transfer current to any conductor."}, {"NSCN", PIXPACK(0x505080), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "N-Type Silicon, Will only transfer current to P-Type Silicon."}, - {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, SC_LIQUID, -205.0f +273.15f, 70, "Liquid Nitrogen. Very cold."}, + {"LN2", PIXPACK(0x80A0DF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 0, 1, SC_LIQUID, 70.15f, 70, "Liquid Nitrogen. Very cold."}, {"INSL", PIXPACK(0x9EA3B6), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 7, 0, 0, 10, 1, SC_SPECIAL, R_TEMP+0.0f +273.15f, 0, "Insulator, does not conduct heat or electricity."}, {"BHOL", PIXPACK(0x202020), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, -0.01f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP+70.0f+273.15f, 255, "Black hole, sucks in other particles and heats up."}, {"WHOL", PIXPACK(0xEFEFEF), 0.0f, 0.00f * CFDS, 0.95f, 0.00f, 0.0f, 0.0f, 0.00f, 0.010f * CFDS, 0, 0, 0, 0, 0, 1, SC_SPECIAL, R_TEMP+-16.0f+273.15f, 255, "White hole, pushes other particles away."}, @@ -235,10 +235,10 @@ static const part_type ptypes[PT_NUM] = {"GLAS", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 150, "Solid. Meltable. Shatters under pressure"}, {"PTCT", PIXPACK(0x405050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Semi-conductor. Only conducts electricity when cold (Less than 120C)"}, {"BGLA", PIXPACK(0x606060), 0.4f, 0.04f * CFDS, 0.94f, 0.95f, -0.1f, 0.3f, 0.00f, 0.000f * CFDS, 1, 0, 0, 5, 2, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 150, "Broken Glass, Heavy particles. Meltable. Bagels."}, - {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, SC_ELEC, 3500.0f +273.15f, 251, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."}, - {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, SC_GAS, 3500.0f +273.15f, 115, "Plasma, extremely hot."}, + {"THDR", PIXPACK(0xFFFFA0), 0.0f, 0.00f * CFDS, 1.0f, 0.30f, -0.99f, 0.6f, 0.62f, 0.000f * CFDS, 0, 0, 0, 0, 0, 1, SC_ELEC, 9000.0f, 251, "Lightning! Very hot, inflicts damage upon most materials, transfers current to metals."}, + {"PLSM", PIXPACK(0xBB99FF), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.30f, 0.001f * CFDS, 0, 0, 0, 0, 0, 1, SC_GAS, 9000.0f, 115, "Plasma, extremely hot."}, {"ETRD", PIXPACK(0x404040), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Electrode. Creates a surface that allows Plasma arcs. (Use sparingly)"}, - {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, -250.0f +273.15f, 46, "Nitrogen Ice."}, + {"NICE", PIXPACK(0xC0E0FF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, SC_SOLIDS, 35.0f, 46, "Nitrogen Ice."}, {"NBLE", PIXPACK(0xEB4917), 1.0f, 0.01f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 0.75f, 0.001f * CFDS, 0, 0, 0, 0, 1, 1, SC_GAS, R_TEMP+2.0f +273.15f, 106, "Noble Gas. Diffuses. Conductive. Ionizes into plasma when intruduced to electricity"}, {"BTRY", PIXPACK(0x858505), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Solid. Generates Electricity."}, {"LCRY", PIXPACK(0x505050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Liquid Crystal. Changes colour when charged. (PSCN Charges, NSCN Discharges)"}, @@ -247,7 +247,7 @@ static const part_type ptypes[PT_NUM] = {"SMKE", PIXPACK(0x222222), 0.9f, 0.04f * CFDS, 0.97f, 0.20f, 0.0f, -0.1f, 0.00f, 0.001f * CFDS, 1, 0, 0, 0, 1, 1, SC_GAS, R_TEMP+400.0f+273.15f, 88, "Smoke"}, {"DESL", PIXPACK(0x440000), 1.0f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.0f, 0.0f * CFDS, 2, 2, 0, 0, 5, 1, SC_LIQUID, R_TEMP+0.0f +273.15f, 42, "Liquid. Vaporises under low pressure, explodes under high pressure and temperatures"}, {"COAL", PIXPACK(0x222222), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.0f, 0.0f * CFDS, 0, 10, 0, 0, 20, 1, SC_SOLIDS, R_TEMP+0.0f +273.15f, 200, "Solid. Burns slowly."}, - {"LO2", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, SC_LIQUID, -210.0f +273.15f, 70, "Liquid Oxygen. Very cold. Reacts with fire"}, + {"LO2", PIXPACK(0x80A0EF), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 5000, 0, 0, 0, 1, SC_LIQUID, -80.0f, 70, "Liquid Oxygen. Very cold. Reacts with fire"}, {"O2", PIXPACK(0x80A0FF), 2.0f, 0.00f * CFDS, 0.99f, 0.30f, -0.1f, 0.0f, 3.0f, 0.000f * CFDS, 0, 1000, 0, 0, 0, 1, SC_GAS, R_TEMP+0.0f +273.15f, 70, "Gas. Ignites easily."}, {"INWR", PIXPACK(0x544141), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 1, 1, 1, SC_ELEC, R_TEMP+0.0f +273.15f, 251, "Insulated Wire. Doesn't conduct to metal or semiconductors."}, {"YEST", PIXPACK(0xEEE0C0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 15, 0, 0, 30, 1, SC_POWDERS, R_TEMP+0.0f +273.15f, 70, "Yeast, grows when warm (~37C)."}, @@ -301,7 +301,7 @@ static part_state pstates[PT_NUM] = /* MWAX */ {ST_LIQUID, PT_WAX, 318.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_FIRE, 673.0f}, /* PSCN */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* NSCN */ {ST_SOLID, PT_NONE, 0.0f, PT_LAVA, 1687.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, - /* LNTG */ {ST_SOLID, PT_NICE, 63.0f, PT_NONE, 0.0f, PT_NONE, 78.0f, PT_NONE, 0.0f}, + /* LNTG */ {ST_SOLID, PT_NICE, 63.0f, PT_NONE, 0.0f, PT_NONE, 77.0f, PT_NONE, 0.0f}, /* FOAM */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* BHOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* WHOL */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, @@ -315,7 +315,7 @@ static part_state pstates[PT_NUM] = /* THDR */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* PLSM */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* ETRD */ {ST_NONE, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, - /* NICE */ {ST_SOLID, PT_NONE, 0.0f, PT_LNTG, 64.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, + /* NICE */ {ST_SOLID, PT_NONE, 0.0f, PT_LNTG, 63.1f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* NBLE */ {ST_GAS, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f}, /* BTRY */ {ST_SOLID, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_NONE, 0.0f, PT_PLSM, 2273.0f}, /* LCRY */ {ST_SOLID, PT_NONE, 0.0f, PT_BGLA, 1273.0f, PT_NONE, 0.0f, PT_NONE, 0.0f},