summaryrefslogtreecommitdiff
path: root/graphics.c
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-09-11 21:11:05 (GMT)
committer Simon <simon@hardwired.org.uk>2010-09-11 21:11:05 (GMT)
commit812cf13ed22ff195be6c5bdaa90286b562c7e9cc (patch)
tree650e9e7d2bac94e4acb866543fb35d9e24d8f427 /graphics.c
parent42ec12d02f99bba736b8743ab8b78b2acc98d63d (diff)
downloadpowder-812cf13ed22ff195be6c5bdaa90286b562c7e9cc.zip
powder-812cf13ed22ff195be6c5bdaa90286b562c7e9cc.tar.gz
Half-Implemented history
Diffstat (limited to 'graphics.c')
-rw-r--r--graphics.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics.c b/graphics.c
index eeb0d50..cc0e491 100644
--- a/graphics.c
+++ b/graphics.c
@@ -2114,13 +2114,16 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
{
unsigned char *d,*c=save;
int i,j,k,x,y,rx,ry,p=0;
- int bw,bh,w,h;
+ int bw,bh,w,h,new_format = 0;
pixel *fb;
if(size<16)
return NULL;
- if(c[2]!=0x43 || c[1]!=0x75 || c[0]!=0x66)
+ if(!(c[2]==0x43 && c[1]==0x75 && c[0]==0x66) && !(c[2]==0x76 && c[1]==0x53 && c[0]==0x50))
return NULL;
+ if(c[2]==0x43 && c[1]==0x75 && c[0]==0x66){
+ new_format = 1;
+ }
if(c[4]>SAVE_VERSION)
return NULL;