diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics.c | 24 | ||||
| -rw-r--r-- | src/interface.c | 24 | ||||
| -rw-r--r-- | src/main.c | 4 | ||||
| -rw-r--r-- | src/powder.c | 4 |
4 files changed, 36 insertions, 20 deletions
diff --git a/src/graphics.c b/src/graphics.c index adc0c18..6d6ebbf 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1451,13 +1451,13 @@ void draw_parts(pixel *vid) } else { - cr = PIXR(ptypes[t].pcolors); - cg = PIXG(ptypes[t].pcolors); - cb = PIXB(ptypes[t].pcolors); - blendpixel(vid, nx, ny, cr, cg, cb, 255); + cr = PIXR(ptypes[t].pcolors); + cg = PIXG(ptypes[t].pcolors); + cb = PIXB(ptypes[t].pcolors); + blendpixel(vid, nx, ny, cr, cg, cb, 255); } - } - else if(cmode==CM_GRAD) + } + else if(cmode==CM_GRAD)//forgot to put else, broke nothing view { float frequency = 0.05; int q = parts[i].temp-40; @@ -3074,12 +3074,12 @@ pixel *prerender_save(void *save, int size, int *width, int *height) if(!(j%2) && !(i%2)) fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0); break; - case 4: - for(j=0; j<CELL; j+=2) - for(i=(j>>1)&1; i<CELL; i+=2) - fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF); - k++; - break; + case 4: + for(j=0; j<CELL; j+=2) + for(i=(j>>1)&1; i<CELL; i+=2) + fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF); + k++; + break; case 6: for(j=0; j<CELL; j+=2) for(i=(j>>1)&1; i<CELL; i+=2) diff --git a/src/interface.c b/src/interface.c index fef6445..b37c3e9 100644 --- a/src/interface.c +++ b/src/interface.c @@ -1853,20 +1853,36 @@ void set_cmode(int cm) strcpy(itc_msg, "Persistent Display"); } else if(cmode==CM_PRESS) + { strcpy(itc_msg, "Pressure Display"); + } else if(cmode==CM_NOTHING) + { strcpy(itc_msg, "Nothing Display"); + } else if(cmode==CM_CRACK) + { strcpy(itc_msg, "Alternate Velocity Display"); + } else if(cmode==CM_GRAD) + { strcpy(itc_msg, "Heat Gradient Display"); + } else if(cmode==CM_LIFE) - if(DEBUG_MODE) - strcpy(itc_msg, "Life Display"); - else - set_cmode(CM_CRACK); + { + if(DEBUG_MODE) + { + strcpy(itc_msg, "Life Display"); + } + else + { + set_cmode(CM_CRACK); + } + } else + { strcpy(itc_msg, "Velocity Display"); + } } char *download_ui(pixel *vid_buf, char *uri, int *len) @@ -1232,7 +1232,7 @@ int main(int argc, char *argv[]) if(!sys_pause||framerender) { - update_air(); + update_air(); } #ifdef OpenGL ClearScreen(); @@ -1649,7 +1649,7 @@ int main(int argc, char *argv[]) bsx = 1180; if(bsx<0) bsx = 0; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsy<0) bsy = 0; diff --git a/src/powder.c b/src/powder.c index 84d129b..c9af76a 100644 --- a/src/powder.c +++ b/src/powder.c @@ -504,7 +504,7 @@ inline int create_part(int p, int x, int y, int t) (pmap[y][x]&0xFF)!=PT_BRMT && (pmap[y][x]&0xFF)!=PT_NBLE && (pmap[y][x]&0xFF)!=PT_IRON && - (pmap[y][x]&0xFF)!=PT_INST && + (pmap[y][x]&0xFF)!=PT_INST && (pmap[y][x]&0xFF)!=PT_INWR) return -1; if(parts[pmap[y][x]>>8].life!=0) @@ -2152,7 +2152,7 @@ void update_particles_i(pixel *vid, int start, int inc) { t = parts[i].type = PT_PLNT; parts[r>>8].type = PT_PLNT; - parts[r>>8].life = 0; + parts[r>>8].life = 0; } else if((r&0xFF)==PT_LAVA && 1>(rand()%250)) { |
