view oldchsool/sprites.h @ 71:a87eb778f225

Improvements to the MinGW crossbuild. Should now build with default tools from Debian mingw packages, though you need Win32 version of libSDL with the necessary headers and so on in addition. 64-bit builds not tested and probably won't work. Tested on Debian 7.0, earlier won't work. binutils-mingw-w64-i686 gcc-mingw-w64-i686 mingw-w64-i686-dev
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 14 Aug 2012 03:08:10 +0300
parents acb5694e93d9
children
line wrap: on
line source

u8*oldsk_pict,oldsk_mask;
u8 oldsk_cmpr[]={
0xe8,0x00,0xff,0xe6,0x67,0x00,0xf,0xe3,0x78,0x00,0x26,0xd,0x44,0x26,0x41,0x21,0x7,0x21,0x2,0x41,
0x29,0x43,0x21,0x2,0x21,0x2,0x25,0xe6,0xff,0x00,0x31,0x61,0x24,0x61,0x21,0x66,
0x24,0x1,0x24,0x1,0x61,0x21,0x62,0x21,0x61,0x21,0x61,0x24,0x61,0x23,
0x3,0x22,0x2,0x61,0x24,0x61,0x21,0x61,0x21,0x62,0x21,0x61,0x22,0x8,
0x66,0x21,0x61,0x24,0x61,0xc,0x25,0x66,0xb,0x2a,0xc,0x43,0x21,0xe1,
0x88,0x00,0x21,0x81,0x22,0x43,0xb,0x4d,0xb,0x4a,0xe,0x49,0xe,0x48,0x10,0x42,
0x1,0x44,0x10,0x42,0x1,0x43,0x14,0x42,0x15,0x41,0xb,};
sprite oldsk ={ 23,20,(char*)105,oldsk_cmpr};

u8*bdash0_pict,bdash0_mask;
u8 bdash0_cmpr[]={
0xff,0x00,0xff,0x7,0xe4,
0x55,0x00,0xa,0x28,0x6,0x22,0x2,0x26,0x6,0x22,0x2,0x26,0x8,0x26,0xc,0x24,
0xc,0xe4,0x77,0x00,0xa,0x42,0x24,0xc,0x44,0xa,0xe2,0x6e,0x00,0x24,0x64,0x4,0x62,0xa,
0x22,0x2,0x62,0xa,0x26,0xc,};
sprite bdash0 ={ 16,15,(char*)45,bdash0_cmpr};

u8*bdash1_pict,bdash1_mask;
u8 bdash1_cmpr[]={
0xfc,0x00,0xff,0xe4,0x55,0x00,0x6,0x28,0x2,0x22,0x2,0x26,
0x2,0x22,0x2,0x26,0x4,0x26,0x8,0x24,0x8,0xe4,0x77,0x00,0x6,0x42,0x24,0x8,
0x44,0x6,0xe2,0x6e,0x00,0x24,0x62,0x4,0x62,0x4,0x62,0x4,0x62,0x4,0x62,0x26,
0x6,0x22,};
sprite bdash1 ={ 12,15,(char*)46,bdash1_cmpr};

u8*bdash2_pict,bdash2_mask;
u8 bdash2_cmpr[]={
0xff,0x00,0xff,0xb,0xe4,0x55,0x00,0x6,0x28,0x2,0x22,0x2,0x26,0x2,0x22,0x2,
0x26,0x4,0x26,0x8,0x24,0x8,0xe4,0x77,0x00,0x6,0x42,0x24,0x8,0x44,0x8,0x24,
0x8,0xe4,0x6e,0x00,0x8,0x64,0x22,0x4,0x24,0x2,0x22,};
sprite bdash2 ={ 12,16,(char*)43,bdash2_cmpr};

u8*bdash3_pict,bdash3_mask;
u8 bdash3_cmpr[]={
0xff,0x00,0xff,0x11,0xe4,0x55,0x00,0x8,0x28,
0x4,0x22,0x2,0x26,0x4,0x22,0x2,0x26,0x6,0x26,0xa,0x24,0xa,0xe4,
0x77,0x00,0x8,0x42,0x24,0xa,0x44,0xa,0x24,0x8,0xe8,0x6e,0x00,0x6,0x66,0x2,0x22,0x2,
0x24,0x6,0x22,};
sprite bdash3 ={ 14,16,(char*)44,bdash3_cmpr};

u8*bdash4_pict,bdash4_mask;
u8 bdash4_cmpr[]={
0xff,0x00,0xff,0x1,0xe2,0x55,0x00,0x4,0x22,0x6,0x22,0x4,0x22,0x4,0x22,
0x2,0x24,0x2,0x22,0x2,0x22,0x2,0x24,0x2,0x22,0x4,0x28,0x8,0x24,
0x8,0x28,0x4,0x22,0x2,0xe4,0x77,0x00,0x2,0x22,0x2,0x42,0x2,0x24,0x2,0x42,
0x6,0x44,0xa,0x24,0x8,0xe2,0x6e,0x00,0x44,0x62,0x6,0x62,0x4,0x62,0x6,0x22,
0x4,0x62,0x4,0x24,0x4,0x24,};
sprite bdash4 ={ 14,17,(char*)67,bdash4_cmpr};

u8*brick0_pict,brick0_mask;
u8 brick0_cmpr[]={
0xff,0x93,0x00,0x3,0xe4,0x00,0x00,0x4,0x24,0x6,0x22,0x6,
0x22,0x4,0xe2,0x77,0x00,0x22,0x4,0x42,0x22,0x1f,0x1f,0x1f,0x7,0x24,0x4,0x24,
0x6,0x22,0x6,0x22,0x4,0x42,0x22,0x4,0x42,0x22,0x1f,0x3,};
sprite brick0 ={ 16,16,(char*)40,brick0_cmpr};

u8*brick1_pict,brick1_mask;
u8 brick1_cmpr[]={
0xe3,0xff,0x00,0xe3,
0x00,0x00,0xa,0xe2,0x77,0x00,0xe1,0x88,0x00,0x23,0x2,0x49,0x62,0x23,0x2,0x41,0x63,0x42,0x62,0x3f,
0x21,0xa,0x23,0x3,0x49,0x1,0x23,0x2,0x41,0x62,0x41,0x62,0x42,0x63,
0x23,0x2,0x41,0x3f,0x21,0x6,0x23,0x7,0x45,0x61,0x23,0x2,0x4a,0x61,
0x23,0x2,0x46,0x62,0x41,0x62,0x23,0x2,0x41,0x63,0x41,};
sprite brick1 ={ 16,14,(char*)63,brick1_cmpr};

u8*pelush1_pict,pelush1_mask;
u8 pelush1_cmpr[]={
0xe3,0x00,0xff,0xe8,0x38,0x00,0xb,
0x22,0xa,0xe9,0x44,0x00,0x6,0x4e,0x2,0xe6,0x66,0x00,0xe5,0x11,0x00,0x4,0xe6,0x77,0x00,0x83,0xa2,0x81,0x4,
0xa7,0x85,0x4,0xac,0x4,0xae,0x2,0xb6,0xa,0xa8,0x8,0xab,0x2,0x42,
0x2,0xae,0x3,0xaa,0x8,0xa6,0x6,};
sprite pelush1 ={ 16,16,(char*)50,pelush1_cmpr};

u8*pelush0_pict,pelush0_mask;
u8 pelush0_cmpr[]={
0xe4,0x00,0xff,0xe6,0x38,0x00,0xc,0x22,0xa,0xe9,0x44,0x00,0x6,
0x4e,0x2,0xe6,0x66,0x00,0xe5,0x11,0x00,0x4,0xe6,0x77,0x00,0x83,0xa2,0x81,0x4,0xa7,0x85,0x4,0xac,
0x4,0xae,0x2,0xb6,0xa,0xa6,0xa,0xa7,0xa,0xa7,0x5,0x42,0x2,0xae,
0x3,0xab,0x3,};
sprite pelush0 ={ 16,16,(char*)50,pelush0_cmpr};

u8*pelush2_pict,pelush2_mask;
u8 pelush2_cmpr[]={
0xe4,0x00,0xff,0xe4,0x38,0x00,0xc,0x22,0xa,0xe8,0x44,0x00,0x6,0x4d,0x2,0xea,0x66,0x00,0x4,
0xe5,0x77,0x00,0xe6,0x11,0x00,0x4,0x8b,0x4,0x8b,0x4,0x8d,0x2,0x94,0xa,0x9d,0x2,0x8b,
0x5,0x87,0x15,};
sprite pelush2 ={ 15,16,(char*)40,pelush2_cmpr};

u8*boulder_pict,boulder_mask;
u8 boulder_cmpr[]={
0xf6,0x00,0xff,0xe5,0x33,0x00,0xa,0x27,0x8,0x23,0xe4,0x37,0x00,0x22,0x6,0x27,0x41,
0x22,0x6,0xe1,0x88,0x00,0x26,0x43,0x21,0x4,0x2a,0x41,0x21,0x4,0x2d,0x2,0x2e,
0x2,0x2e,0x2,0x61,0x27,0x41,0x21,0x41,0x21,0x41,0x21,0x2,0x61,0x28,
0x41,0x21,0x41,0x21,0x4,0x61,0x28,0x41,0x21,0x41,0x4,0x61,0x27,0x41,
0x21,0x41,0x6,0x61,0x27,0x41,0x21,0x7,0x61,0x27,0x4,};
sprite boulder ={ 16,16,(char*)72,boulder_cmpr};

u8*splat0_pict,splat0_mask;
u8 splat0_cmpr[]={
0xff,0x00,0xff,0x18,0xe2,
0x44,0x00,0x18,0x25,0x5,0x22,0x3,0x22,0xc,0x25,0x8,0x22,0xe5,0x4c,0x00,0x22,0x6,0x22,
0x46,0x22,0x1,0x21,0x4,0x28,0x1,0x21,0x4,0x28,0x9,0x24,0x8,0x24,
0x18,0x22,0xd,};
sprite splat0 ={ 15,16,(char*)40,splat0_cmpr};

u8*splat1_pict,splat1_mask;
u8 splat1_cmpr[]={
0xe4,0x44,0x00,0xfe,0x00,0xff,0x3,0x2d,0x6,0x28,0x7,0x27,0x9,0x24,0x2,
0xe1,0xcc,0x00,0x3,0x41,0x4,0x25,0x6,0x41,0x4,0x24,0x3,0x45,0x4,0x23,0x1,
0x48,0x4,0x22,0x41,0x1,0x45,0x4,0x23,0x4,0x43,0x4,0x24,0xa,0x26,
0x8,0x25,};
sprite splat1 ={ 15,14,(char*)47,splat1_cmpr};

u8*splat2_pict,splat2_mask;
u8 splat2_cmpr[]={
0xe3,0x00,0xff,0xe6,0x4c,0x00,0x8,0x25,0xe1,0xee,0x00,0x23,0x5,0x2b,0x4,0x26,0x41,0xe2,
0xce,0x00,0x23,0x3,0x24,0x62,0x41,0x62,0x23,0x2,0x24,0x63,0x41,0x61,0x25,0x1,
0x23,0x41,0x62,0x43,0x22,0x41,0x22,0x1,0x21,0x41,0x21,0x41,0x61,0x43,
0x23,0x41,0x21,0x2,0x25,0x62,0x41,0x62,0x24,0x1,0x23,0x64,0x41,0x63,
0x24,0x1,0x21,0x61,0x21,0x63,0x41,0x61,0x24,0x3,0x24,0x63,0x25,0x3,
0x2b,0x5,0x25,0x41,0x22,0x9,0x24,0x7,};
sprite splat2 ={ 15,15,(char*)84,splat2_cmpr};

u8*splat3_pict,splat3_mask;
u8 splat3_cmpr[]={
0xe3,0x00,0xff,0xe6,0x6e,0x00,0x6,0x2a,0x3,0x2d,
0x1,0x26,0x2,0xe2,0x66,0x00,0x28,0x5,0x21,0x1,0x27,0x6,0x27,0xe1,0xee,0x00,0x6,0x21,
0x61,0x23,0x61,0x21,0x7,0x22,0x61,0x25,0x7,0x26,0x42,0x4,0x27,0x41,
0x21,0x43,0x61,0x41,0x32,0x2,0x2b,0x4,0x25,0x61,0x22,0x8,0x25,0x5,
};
sprite splat3 ={ 14,15,(char*)56,splat3_cmpr};

u8*splat4_pict,splat4_mask;
u8 splat4_cmpr[]={
0xe3,0x00,0xff,0xe3,0x40,0x00,0x1,0x22,0x6,0x21,0x2,0x22,0x1,0x22,0x5,0x23,0x7,0x22,
0xb,0x21,0x4,0x22,0x6,0x21,0x1,0x23,0x1,0x22,0xa,0x22,0xb,0x22,
0xf,0x21,0xb,0x22,0x2,0x21,0x7,0x23,0x1,0x21,0x2,0x21,0x2,0x21,
0x4,0x22,0x1,0x24,0x4,0x22,0x1,0x22,0x7,0x24,0x6,0x25,0xe1,0x04,0x00,0x22,
0x8,0x25,0x5,};
sprite splat4 ={ 14,15,(char*)65,splat4_cmpr};

u8*tietzka_pict,tietzka_mask;
u8 tietzka_cmpr[]={
0xff,0x00,0xff,0xe8,0x77,0xff,0x7,0x21,0xe6,0x99,0xff,0x21,0x7,0x21,0x46,0x21,0x1,
0x24,0x2,0x21,0x46,0x21,0x1,0x21,0xe2,0xff,0xff,0x21,0x2,0x28,0x1,0x24,0x3,
0x26,0x2,0x24,0x4,0x24,0x3,0x24,0x1,0xef,0x66,0xff,0x1,0x85,0x2,0x85,0x4,
0x83,0x4,0x83,0x5,0x83,0x4,0x83,0x3,};
sprite tietzka ={ 15,13,(char*)57,tietzka_cmpr};

u8*pelu_pict,pelu_mask;
u8 pelu_cmpr[]={
0xff,0x00,0xff,0x1,0xea,0x00,0xff,0xeb,0x44,0x00,0x39,0x42,
0x3e,0x42,0x35,0xed,0x44,0x00,0x37,0x6a,0x36,0xe4,0x11,0x82,0xe6,0xe6,0x00,0x36,0x85,0xe5,0x87,0x00,0x36,0x81,
0xe1,0xff,0x00,0x83,0xc5,0x36,0x84,0xc7,0x35,0xcb,0x33,0xcd,0x31,0xcf,0x3a,0xc4,
0x33,0x62,0x24,0xc7,0x33,0xcd,0x35,0xcb,0x37,0xc9,0x37,0xc9,0x39,0xc6,
0x3b,0xc5,0x3c,0xc4,0x2f,};
sprite pelu ={ 32,22,(char*)69,pelu_cmpr};

void decompress_bitmap(u8*dpic,u8*dmask,u8*s,int count)
{
   u8 pal[7],palm[7],palidx=0;
   u8 col,msk,rep,*s1=s+count;

   while(s<s1)
   {
      u8 a=*s++;

      rep=a&31;
      col=a>>5;
      
      if(col==7){pal[palidx]=col=*s++;palm[palidx]=msk=*s++;palidx++;if(palidx==7)palidx=0;}
            else{msk=palm[col];col=pal[col];}

      if(rep)
      for(;rep;rep--){*dpic++=col;*dmask++=msk;}
   }
}
sprite*allbmps[]={&oldsk,&bdash0,&bdash1,&bdash2,&bdash3,&bdash4,&brick0,&brick1,&pelush1,&pelush0,&pelush2,&boulder,&splat0,&splat1,&splat2,&splat3,&splat4,&tietzka,&pelu,NULL };
void decompress_allbmp()
{
   u8*d,*d2;
   sprite**s=allbmps;
   while(*s)
   {
      d=malloc((*s)->width*(*s)->height*sizeof(u8));
      d2=malloc((*s)->width*(*s)->height*sizeof(u8));
      decompress_bitmap(d,d2,(*s)->mask,(int)((*s)->pict));
      (*s)->pict=d;
      (*s)->mask=d2;
      s++;
   }
}