summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-02-20 20:55:47 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2011-02-20 20:55:47 (GMT)
commit317ddab6176b2727673e9b1fefbd05a8539d1f2b (patch)
tree28be9a1cb0956245aa2bb9aff44fea858b16fa99 /src
parentb3278cf8883d93d8f16e537658b5536d374eb432 (diff)
downloadpowder-317ddab6176b2727673e9b1fefbd05a8539d1f2b.zip
powder-317ddab6176b2727673e9b1fefbd05a8539d1f2b.tar.gz
Reduce overlap of HUD text when in debug/beta mode
Also reduce duplication of some HUD code
Diffstat (limited to 'src')
-rw-r--r--src/main.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/main.c b/src/main.c
index 946d87b..32a89dd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1945,35 +1945,29 @@ 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, #%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, cr>>8);
- //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 (%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(coordtext, "#%d, X:%d Y:%d", cr>>8, x/sdl_scale, y/sdl_scale);
+ } 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);
#else
- 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, #%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 ,cr>>8);
- //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);
- }
#endif
+ }
}
else
{
sprintf(heattext, "Empty, Pressure: %3.2f", pv[(y/sdl_scale)/CELL][(x/sdl_scale)/CELL]);
+ if (DEBUG_MODE)
+ {
+ sprintf(coordtext, "X:%d Y:%d", x/sdl_scale, y/sdl_scale);
+ }
}
- if (DEBUG_MODE)
- sprintf(coordtext, "X:%d Y:%d", x/sdl_scale, y/sdl_scale);
}
mx = x;
my = y;