Fix for prerender save and fan drawing

This commit is contained in:
Simon 2010-12-07 21:48:03 +00:00
parent 9486b96368
commit 4355b8b2d5
2 changed files with 15 additions and 9 deletions

View File

@ -8,7 +8,7 @@
#endif #endif
#define SAVE_VERSION 44 #define SAVE_VERSION 44
#define MINOR_VERSION 4 #define MINOR_VERSION 5
#define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter. #define IDENT_VERSION "G" //Change this if you're not Simon! It should be a single letter.
//#define BETA //#define BETA

View File

@ -2795,12 +2795,18 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
if(!(j%2) && !(i%2)) if(!(j%2) && !(i%2))
fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0); fb[(ry+j)*w+(rx+i)] = PIXPACK(0xC0C0C0);
break; break;
case 4: case 4:
for(j=0; j<CELL; j+=2) for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2) for(i=(j>>1)&1; i<CELL; i+=2)
fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF); fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF);
k++; k++;
break; break;
case WL_FAN:
for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2)
fb[(ry+j)*w+(rx+i)] = PIXPACK(0x8080FF);
k++;
break;
case 6: case 6:
for(j=0; j<CELL; j+=2) for(j=0; j<CELL; j+=2)
for(i=(j>>1)&1; i<CELL; i+=2) for(i=(j>>1)&1; i<CELL; i+=2)
@ -2835,7 +2841,7 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
j=d[p++]; j=d[p++];
if(j<PT_NUM && j>0) if(j<PT_NUM && j>0)
{ {
/*if(j==PT_STKM) //Stickman should be drawed another way //Was crashing TODO: FIX if(j==PT_STKM)
{ {
//Stickman drawing //Stickman drawing
for(k=-2; k<=1; k++) for(k=-2; k<=1; k++)
@ -2850,7 +2856,7 @@ pixel *prerender_save(void *save, int size, int *width, int *height)
draw_line(fb , x, y+3, x+1, y+6, 255, 255, 255, w); draw_line(fb , x, y+3, x+1, y+6, 255, 255, 255, w);
draw_line(fb , x+1, y+6, x+3, y+12, 255, 255, 255, w); draw_line(fb , x+1, y+6, x+3, y+12, 255, 255, 255, w);
} }
else*/ else
fb[y*w+x] = ptypes[j].pcolors; fb[y*w+x] = ptypes[j].pcolors;
} }
} }