diff options
| author | Simon <simon@hardwired.org.uk> | 2010-12-07 21:05:26 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2010-12-07 21:05:26 (GMT) |
| commit | 76b6a886b3f99672d2894c4c12384b0feaa14852 (patch) | |
| tree | 5aa0ae3c16f9dc46b744948b79fea266207a9db2 /src | |
| parent | 7968e37b4ee0cf834439651c5623bff01c4cf415 (diff) | |
| download | powder-76b6a886b3f99672d2894c4c12384b0feaa14852.zip powder-76b6a886b3f99672d2894c4c12384b0feaa14852.tar.gz | |
Fix BCLN saving
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -340,7 +340,7 @@ void *build_save(int *size, int x0, int y0, int w, int h) for(j=0; j<w*h; j++) { i = m[j]; - if(i && (parts[i-1].type==PT_CLNE || parts[i-1].type==PT_PCLN || parts[i-1].type==PT_PCLN || parts[i-1].type==PT_SPRK || parts[i-1].type==PT_LAVA || parts[i-1].type==PT_PIPE)) + if(i && (parts[i-1].type==PT_CLNE || parts[i-1].type==PT_PCLN || parts[i-1].type==PT_BCLN || parts[i-1].type==PT_SPRK || parts[i-1].type==PT_LAVA || parts[i-1].type==PT_PIPE)) d[p++] = parts[i-1].ctype; } @@ -726,7 +726,7 @@ int parse_save(void *save, int size, int replace, int x0, int y0) { i = m[j]; ty = d[pty+j]; - if(i && (ty==PT_CLNE || (ty==PT_PCLN && ver>=43) || (ty==PT_BCLN && ver>=43) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43))) + if(i && (ty==PT_CLNE || (ty==PT_PCLN && ver>=43) || (ty==PT_BCLN && ver>=44) || (ty==PT_SPRK && ver>=21) || (ty==PT_LAVA && ver>=34) || (ty==PT_PIPE && ver>=43))) { if(p >= size) goto corrupt; @@ -1391,18 +1391,18 @@ int main(int argc, char *argv[]) { bsy -= 1; } - else + else { - bsx -= ceil((bsx/5)+0.5f); + bsx -= ceil((bsx/5)+0.5f); bsy -= ceil((bsy/5)+0.5f); } if(bsx>1180) bsx = 1180; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsx<0) bsx = 0; - if(bsy<0) + if(bsy<0) bsy = 0; } } @@ -1418,7 +1418,7 @@ int main(int argc, char *argv[]) } else { - if(sdl_mod & (KMOD_LALT|KMOD_RALT) && !(sdl_mod & (KMOD_SHIFT|KMOD_CTRL))) + if(sdl_mod & (KMOD_LALT|KMOD_RALT) && !(sdl_mod & (KMOD_SHIFT|KMOD_CTRL))) { bsx += 1; bsy += 1; @@ -1431,18 +1431,18 @@ int main(int argc, char *argv[]) { bsy += 1; } - else + else { - bsx += ceil((bsx/5)+0.5f); + bsx += ceil((bsx/5)+0.5f); bsy += ceil((bsy/5)+0.5f); } if(bsx>1180) bsx = 1180; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsx<0) bsx = 0; - if(bsy<0) + if(bsy<0) bsy = 0; } } @@ -1550,7 +1550,7 @@ int main(int argc, char *argv[]) bsx = 1180; if(bsx<0) bsx = 0; - if(bsy>1180) + if(bsy>1180) bsy = 1180; if(bsy<0) bsy = 0; |
