summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2011-02-21 16:10:05 (GMT)
committer Simon <simon@hardwired.org.uk>2011-02-21 16:10:05 (GMT)
commit064579c9e42ef8743ac6c3b08e4250c118fbef3a (patch)
tree025c2a323465ef6c747b42ba48ae488ce1645b83 /src/main.c
parent9002a87d6128927e14f88cb09ff241b004cb0bf8 (diff)
parent6f2965d0d069e8586d9ca32d042ee6dd094cb0f0 (diff)
downloadpowder-064579c9e42ef8743ac6c3b08e4250c118fbef3a.zip
powder-064579c9e42ef8743ac6c3b08e4250c118fbef3a.tar.gz
Merge branch 'master' of github.com:FacialTurd/The-Powder-Toy
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/main.c b/src/main.c
index dfcc1d9..d014795 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1952,35 +1952,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;
@@ -2131,7 +2125,7 @@ int main(int argc, char *argv[])
if (!sdl_zoom_trig && zoom_en==1)
zoom_en = 0;
- if (sdl_key==Z_keysym && zoom_en==2)
+ if (sdl_key=='z' && zoom_en==2)
zoom_en = 1;
if (load_mode)