diff options
| author | Simon <simon@hardwired.org.uk> | 2010-09-05 17:34:25 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-09-05 17:34:25 (GMT) |
| commit | a8e1e336053156e5e4f4339af8a8d18a211d5fb6 (patch) | |
| tree | d431cc5c4a8b6726b226bd00f0b6775219000bb0 | |
| parent | 6409b2ae2cd57674848cadc401ed0a9121e3817c (diff) | |
| download | powder-a8e1e336053156e5e4f4339af8a8d18a211d5fb6.zip powder-a8e1e336053156e5e4f4339af8a8d18a211d5fb6.tar.gz | |
Heat fix
| -rw-r--r-- | main.c | 3 | ||||
| -rw-r--r-- | powder.h | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -592,7 +592,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0) if(ver>=42){ parts[i-1].temp = (d[p++]*((MAX_TEMP+(-MIN_TEMP))/255))+MIN_TEMP; } else { - parts[i-1].temp = ((d[p++]*(((3500.0f)+(-(-273)))/255))+(-273)) + 273.15f; + parts[i-1].temp = ((d[p++]*((O_MAX_TEMP+(-O_MIN_TEMP))/255))+O_MIN_TEMP)+273; } } else @@ -1985,6 +1985,7 @@ int main(int argc, char *argv[]) { #ifdef BETA sprintf(uitext, "Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS); + //printf("%s\n", uitext); #else sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS); #endif @@ -109,6 +109,8 @@ #define R_TEMP 22 #define MAX_TEMP 9999 #define MIN_TEMP 0 +#define O_MAX_TEMP 3500 +#define O_MIN_TEMP -273 #define ST_NONE 0 #define ST_SOLID 1 |
