Windows.



Tombstone - 5


image->buffer[count++] = data;

} //

} // while

// , 768

fseek(fp,-768L,SEEK_END) ;

//

for (index=0; index<256; index++)

{

//

image->palette[index].red = (getc(fp) >> 2);

//

image->palette[index].green = (getc(fp) >> 2);

//

image->palette[index].blue = (getc(fp) >> 2) ;

} //

for

fclose(fp);

// enable_palette,

if (enable_palette)

{

for (index=0; index<256; index++)

{

Set_Palette_Register(index,

(RGB_color_ptr)&image->palette[index]);

} // for

} //

} //

//////////////////////////////////////////

void PCX_Show_Buffer (pcx_picture_ptr image)

{ // , PCX-,

//

_fmemcpy(char far *)video_buffer,

(char far *) image->buffer,SCREEN_WIDTH*SCREEN__HEIGHT);

} //

////////////////////////////////////////////////////

void Sprite_Init(sprite_ptr sprite, int x,int y, int ac, int as,int mc,int ms)

{

//

int index;

sprite->x = x;

sprite->y = ;

sprite->x_old = x;

sprite->y_old = ;

sprite->width = SPRITE_WIDTH;

sprite->height = SPRITE_HEIGHT;

sprite->anim_clock = ac;

sprite->anim_speed = as;

sprite->motion_clock = me;

sprite->motion_speed = ms;

sprite->curr frame = 0;

sprite->state = SPRITE_DEAD;

sprite->num_frames = 0;

sprite->background = (char far *)malloc (SPRITE_WIDTH * SPRITE_HEIGHT+1);

// NULL

for (index=0; index<MAX_SPRITE_FRAMES; index++) sprite->frames[index] = NULL;

} //

////////////////////////////////////////////////////////