32 #define SMACKER_PAL 0x01
33 #define SMACKER_FLAG_RING_FRAME 0x01
82 0x00, 0x04, 0x08, 0x0C, 0x10, 0x14, 0x18, 0x1C,
83 0x20, 0x24, 0x28, 0x2C, 0x30, 0x34, 0x38, 0x3C,
84 0x41, 0x45, 0x49, 0x4D, 0x51, 0x55, 0x59, 0x5D,
85 0x61, 0x65, 0x69, 0x6D, 0x71, 0x75, 0x79, 0x7D,
86 0x82, 0x86, 0x8A, 0x8E, 0x92, 0x96, 0x9A, 0x9E,
87 0xA2, 0xA6, 0xAA, 0xAE, 0xB2, 0xB6, 0xBA, 0xBE,
88 0xC3, 0xC7, 0xCB, 0xCF, 0xD3, 0xD7, 0xDB, 0xDF,
89 0xE3, 0xE7, 0xEB, 0xEF, 0xF3, 0xF7, 0xFB, 0xFF
95 if(p->
buf[0] ==
'S' && p->
buf[1] ==
'M' && p->
buf[2] ==
'K'
96 && (p->
buf[3] ==
'2' || p->
buf[3] ==
'4'))
121 for(i = 0; i < 7; i++)
135 for(i = 0; i < 7; i++) {
141 if(smk->
frames > 0xFFFFFF) {
151 for(i = 0; i < smk->
frames; i++) {
154 for(i = 0; i < smk->
frames; i++) {
179 for(i = 0; i < 7; i++) {
262 memcpy(oldpal, pal, 768);
265 if(size + 1 > frame_size)
274 sz += (t & 0x7F) + 1;
275 pal += ((t & 0x7F) + 1) * 3;
279 if (off + j - 1 > 0xff) {
281 "Invalid palette update, offset=%d length=%d extends beyond palette size\n",
286 while(j-- && sz < 256) {
287 *pal++ = oldpal[off + 0];
288 *pal++ = oldpal[off + 1];
289 *pal++ = oldpal[off + 2];
306 for(i = 0; i < 7; i++) {
312 if(size + 4
L > frame_size)
335 pkt->
data[0] = palchange;
336 memcpy(pkt->
data + 1, smk->
pal, 768);
338 if(ret != frame_size)
341 pkt->
size = ret + 769;
363 for(i = 0; i < 7; i++)