summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-02-20 20:55:47 (GMT)
committer FacialTurd <simon@hardwired.org.uk>2011-02-21 16:08:20 (GMT)
commit1419337374ad254eddab69fa1bff11204abca69d (patch)
tree51b008efb720056fd1b0001060568df18fa05410 /src
parentdc35feeac9e692191b99ba44122dbab203d1cd6c (diff)
downloadpowder-1419337374ad254eddab69fa1bff11204abca69d.zip
powder-1419337374ad254eddab69fa1bff11204abca69d.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 2f3a641..6667f77 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1935,35 +1935,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;