diff --git a/src/main.c b/src/main.c index 1d46a5594..d96f8d9bc 100644 --- a/src/main.c +++ b/src/main.c @@ -2631,6 +2631,7 @@ int main(int argc, char *argv[]) if (y>0 && y0 && x>8)>=NPART || !cr)) { - if (DEBUG_MODE) + if ((cr&0xFF)==PT_LIFE && parts[cr>>8].ctype>=0 && parts[cr>>8].ctype>8].ctype].name); + } + else if (DEBUG_MODE) { int tctype = parts[cr>>8].ctype; if ((cr&0xFF)==PT_PIPE) @@ -2648,13 +2653,23 @@ int main(int argc, char *argv[]) } if (tctype>=PT_NUM || tctype<0 || (cr&0xFF)==PT_PHOT) 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(nametext, "%s (%s)", ptypes[cr&0xFF].name, ptypes[tctype].name); + } + else + { + strcpy(nametext, ptypes[cr&0xFF].name); + } + if (DEBUG_MODE) + { + sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C, Life: %d", nametext, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f, parts[cr>>8].life); sprintf(coordtext, "#%d, X:%d Y:%d", cr>>8, x/sdl_scale, y/sdl_scale); - } else { + } + else + { #ifdef BETA - 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); + sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C, Life: %d", nametext, 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); + sprintf(heattext, "%s, Pressure: %3.2f, Temp: %4.2f C", nametext, pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL], parts[cr>>8].temp-273.15f); #endif } if ((cr&0xFF)==PT_PHOT) wavelength_gfx = parts[cr>>8].ctype; @@ -3211,6 +3226,8 @@ int main(int argc, char *argv[]) if (!((cr>>8)>=NPART || !cr)) { c = sl = cr&0xFF; + if (c==PT_LIFE) + c = sl = (parts[cr>>8].ctype << 8) | c; } else {