亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rpg.h

?? 從編程到游戲從編程到游戲從編程到游戲從編程到游戲
?? H
?? 第 1 頁 / 共 2 頁
字號:
RGB_color color[256];
int sx=190;
int my_things[5]={0,0,0,0,0};
int pause_game=0;
int pause_bar=0;
void Fade_Lights(void)
{
int pal_reg,index;
RGB_color color;
for(index=0;index<30;index++)
{
for(pal_reg=1;pal_reg<255;pal_reg++)
{
Get_Palette_Register(pal_reg,(RGB_color_ptr)&color);
if(color.red>5)color.red-=3;
else
color.red=0;
if(color.green>5)color.green-=3;
else
color.green=0;
if(color.blue>5)color.blue-=3;
else
color.blue=0;
Set_Palette_Register(pal_reg,(RGB_color_ptr)&color);
}
Delay(2);
}
}

char *date(void)
{
  time_t t;

  t = time(NULL);

  return (ctime(&t));
}


void PCX_Grab_Bitmap_Screen(pcx_picture_ptr image,
		    sprite_ptr sprite,
		    int sprite_frame,
		    int grab_x, int grab_y)

{
// this function will grap a bitmap from the pcx frame buffer. it uses the
// convention that the 320x200 pixel matrix is sub divided into a smaller
// matrix of 12x8 adjacent squares each being a 24x24 pixel bitmap
// the caller sends the pcx picture along with the sprite to save the image
// into and the frame of the sprite.  finally, the position of the bitmap
// that should be grabbed is sent

int x_off,y_off, x,y, index;
char far *sprite_data;

// first allocate the memory for the sprite in the sprite structure

sprite->frames[sprite_frame] = (char far *)malloc(SPRITE_WIDTH * SPRITE_HEIGHT);

// create an alias to the sprite frame for ease of access

sprite_data = sprite->frames[sprite_frame];

// now load the sprite data into the sprite frame array from the pcx picture

// we need to find which bitmap to scan, remember the pcx picture is really a
// 12x8 matrix of bitmaps where each bitmap is 24x24 pixels. note:0,0 is upper
// left bitmap and 11,7 is the lower right bitmap.

x_off = (SPRITE_WIDTH) * grab_x;
y_off = (SPRITE_HEIGHT) * grab_y ;

// compute starting y address

y_off = y_off * 320;

for (y=0; y<SPRITE_HEIGHT; y++)
    {

    for (x=0; x<SPRITE_WIDTH; x++)
	{

	// get the next byte of current row and place into next position in
	// sprite frame data buffer

	sprite_data[y*SPRITE_WIDTH + x] = video_buffer[y_off + x_off + x];

	} // end for x

	// move to next line of picture buffer

	y_off+=320;

    } // end for y

// increment number of frames

sprite->num_frames++;

// done!, let's bail!

} // end PCX_Grap_Bitmap

//////////////////////////////////////////////////////////////////////////////
void PCX_Load_Screen_Size(char *filename, pcx_picture_ptr image,int enable_palette,int height,int width,int x_begin,int y_begin)
{
// this function loads a pcx file into a picture structure, the actual image
// data for the pcx file is decompressed and expanded into a secondary buffer
// within the picture structure, the separate images can be grabbed from this
// buffer later.  also the header and palette are loaded

FILE *fp;
int num_bytes,index,x,y;
unsigned int count;
unsigned char data;
char far *temp_buffer;

// open the file

fp = fopen(filename,"rb");

// load the header
temp_buffer = (char far *)image;

for (index=0; index<128; index++)
    {
    temp_buffer[index] = getc(fp);
    } // end for index

// load the data and decompress into buffer
count=0;


while(count<=(unsigned int)width*height)
	 {
	 // get the first piece of data

	 data = getc(fp);

	 // is this a rle?

     if (data>=192 && data<=255)
	{
	// how many bytes in run?

        num_bytes = data-192;

	// get the actual data for the run

	data  = getc(fp);

		// replicate data in buffer num_bytes times

        while(num_bytes-->0)
             {
//             image->buffer[count++] = data;
    y=y_begin+count/width;
    x=x_begin+count%width;
    video_buffer[x+y*SCREEN_WIDTH]=data;
    count++;
	     } // end while

	} // end if rle
     else
	{
	// actual data, just copy it into buffer at next location

	//image->buffer[count++] = data;
	    y=y_begin+count/width;
    x=x_begin+count%width;
	  video_buffer[x+y*SCREEN_WIDTH]=data;
	count++;
	} // end else not rle

     } // end while

// move to end of file then back up 768 bytes i.e. to begining of palette

fseek(fp,-768L,SEEK_END);

// load the pallete into the palette

for (index=0; index<256; index++)
    {
    // get the red component

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

    // get the green component

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

    // get the blue component

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

    } // end for index

fclose(fp);

// change the palette to newly loaded palette if commanded to do so

if (enable_palette)
   {

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

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

       } // end for index

   } // end if change palette

} // end PCX_Load

void PCX_Grab_Bitmap_Size_Screen(pcx_picture_ptr image,
		    sprite_ptr sprite,
		    int sprite_frame,
		    int grab_x, int grab_y,int height,int width)

{
// this function will grap a bitmap from the pcx frame buffer. it uses the
// convention that the 320x200 pixel matrix is sub divided into a smaller
// matrix of 12x8 adjacent squares each being a 24x24 pixel bitmap
// the caller sends the pcx picture along with the sprite to save the image
// into and the frame of the sprite.  finally, the position of the bitmap
// that should be grabbed is sent

int x_off,y_off, x,y, index;
char far *sprite_data;

// first allocate the memory for the sprite in the sprite structure

sprite->frames[sprite_frame] = (char far *)malloc(width * height);

// create an alias to the sprite frame for ease of access

sprite_data = sprite->frames[sprite_frame];

// now load the sprite data into the sprite frame array from the pcx picture

// we need to find which bitmap to scan, remember the pcx picture is really a
// 12x8 matrix of bitmaps where each bitmap is 24x24 pixels. note:0,0 is upper
// left bitmap and 11,7 is the lower right bitmap.

x_off = (width) * grab_x;
y_off = (height) * grab_y ;

// compute starting y address

y_off = y_off * 320;

for (y=0; y<height; y++)
    {

    for (x=0; x<width; x++)
	{

	// get the next byte of current row and place into next position in
	// sprite frame data buffer

	sprite_data[y*width + x] = video_buffer[y_off + x_off + x];

	} // end for x

	// move to next line of picture buffer

	y_off+=320;

    } // end for y

// increment number of frames

sprite->num_frames++;

// done!, let's bail!

} // end PCX_Grap_Bitmap

//////////////////////////////////////////////////////////////////////////////
void Sprite_Delete_Size(sprite_ptr sprite,int frame)
{
// this function deletes all the memory associated with a sprire

int index;

farfree(sprite->background);

// now de-allocate all the animation frames

for (index=0; index<frame; index++)
    farfree(sprite->frames[index]);

} // end Sprite_Delete

void Sprite_Init_Size(sprite_ptr sprite,int x,int y,int ac,int as,int mc,int ms,int height,int width,int frame)
{
// this function initializes a sprite with the sent data

int index;

sprite->x            = x;
sprite->y            = y;
sprite->x_old        = x;
sprite->y_old        = y;
sprite->width        = width;
sprite->height       = height;
sprite->anim_clock   = ac;
sprite->anim_speed   = as;
sprite->motion_clock = mc;
sprite->motion_speed = ms;
sprite->curr_frame   = 0;
sprite->state        = SPRITE_DEAD;
sprite->num_frames   = 0;
sprite->background   = (char far *)malloc(width * height+1);

// set all bitmap pointers to null

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

} // end Sprite_Init

void PCX_Load_Screen_Height(char *filename, pcx_picture_ptr image,int enable_palette,int height)
{
// this function loads a pcx file into a picture structure, the actual image
// data for the pcx file is decompressed and expanded into a secondary buffer
// within the picture structure, the separate images can be grabbed from this
// buffer later.  also the header and palette are loaded

FILE *fp;
int num_bytes,index;
unsigned int count;
unsigned char data;
char far *temp_buffer;

// open the file

fp = fopen(filename,"rb");

// load the header

temp_buffer = (char far *)image;

for (index=0; index<128; index++)
    {
    temp_buffer[index] = getc(fp);
    } // end for index

// load the data and decompress into buffer
count=0;


while(count<=(unsigned int)SCREEN_WIDTH1 * height)
	 {
	 // get the first piece of data

	 data = getc(fp);

	 // is this a rle?

     if (data>=192 && data<=255)
	{
	// how many bytes in run?

        num_bytes = data-192;

	// get the actual data for the run

	data  = getc(fp);

		// replicate data in buffer num_bytes times

        while(num_bytes-->0)
             {
//             image->buffer[count++] = data;
  video_buffer[count++]=data;
	     } // end while

	} // end if rle
     else
	{
	// actual data, just copy it into buffer at next location

	//image->buffer[count++] = data;
	  video_buffer[count++]=data;
	} // end else not rle

     } // end while

// move to end of file then back up 768 bytes i.e. to begining of palette

fseek(fp,-768L,SEEK_END);

// load the pallete into the palette

for (index=0; index<256; index++)
    {
    // get the red component

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

    // get the green component

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

    // get the blue component

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

    } // end for index

fclose(fp);

// change the palette to newly loaded palette if commanded to do so

if (enable_palette)
   {

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

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

       } // end for index

   } // end if change palette

} // end PCX_Load

void Draw_Sprite_Size(sprite_ptr sprite,int height,int width)
{

// this function draws a sprite on the screen row by row very quickly
// note the use of shifting to implement multplication

char far *work_sprite;
int work_offset=0,offset,x,y;
//unsigned char data;

// alias a pointer to sprite for ease of access

work_sprite = sprite->frames[sprite->curr_frame];

// compute offset of sprite in video buffer

offset = ((sprite->y) << 8) + ((sprite->y) << 6) + sprite->x;

for (y=0; y<height; y++)
    {
    // copy the next row into the screen buffer using memcpy for speed

    for (x=0; x<width; x++)
	{

	// test for transparent pixel i.e. 0, if not transparent then draw
      if(work_sprite[work_offset+x])

	 //data==(unsigned char)work_sprite[work_offset+x];
// if(data)
//	     video_buffer[offset+x] =data;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕不卡| 久久国产精品99久久久久久老狼| 国产夫妻精品视频| 国产片一区二区| 国产在线精品不卡| 中文一区二区完整视频在线观看| 成人亚洲一区二区一| 欧美经典三级视频一区二区三区| caoporn国产一区二区| 亚洲女人小视频在线观看| 色婷婷av久久久久久久| 亚洲人成在线播放网站岛国 | 亚洲色图在线视频| 在线精品亚洲一区二区不卡| 亚洲高清在线精品| 日韩一级免费一区| 成人在线视频一区| 亚洲国产精品一区二区www在线| 欧美一区二区三区婷婷月色| 国产大陆精品国产| 亚洲男人电影天堂| 欧美精品一区二区高清在线观看| 夫妻av一区二区| 午夜伊人狠狠久久| 欧美国产日产图区| 欧美亚洲综合色| 国产精品1区2区3区在线观看| 亚洲美女区一区| 日韩欧美综合在线| 色哟哟一区二区| 美洲天堂一区二卡三卡四卡视频| 国产精品国产三级国产普通话99| 欧美男女性生活在线直播观看| 精品一区二区三区香蕉蜜桃| 一级做a爱片久久| 久久久久久久久免费| 欧美亚洲综合一区| 成人aa视频在线观看| 免费的成人av| 亚洲少妇最新在线视频| 2020国产精品自拍| 欧美精品乱码久久久久久按摩| 国产99久久久国产精品潘金| 日本中文一区二区三区| 中文字幕在线不卡| 欧美videofree性高清杂交| 欧美在线视频全部完| 国产福利一区二区三区视频| 日本vs亚洲vs韩国一区三区二区| 亚洲精品国产无天堂网2021| 久久精品亚洲国产奇米99| 91精品免费在线观看| 91色婷婷久久久久合中文| 国产一区二区三区四区五区入口| 亚洲成av人片在线观看| 亚洲女同一区二区| 国产精品伦理在线| 久久精品人人爽人人爽| 精品久久久影院| 777色狠狠一区二区三区| 欧美午夜电影一区| 日本韩国精品一区二区在线观看| 国产成人午夜精品影院观看视频| 久久精品国产亚洲一区二区三区| 亚洲成a人片在线观看中文| 亚洲精品视频在线观看网站| 国产精品久久精品日日| 久久久国际精品| 久久久99精品免费观看| 日韩欧美一级片| 日韩精品一区二区三区蜜臀| 日韩三区在线观看| 日韩欧美国产1| 日韩一区二区三区四区五区六区| 欧美日韩高清影院| 欧美亚洲国产一区二区三区va| 在线观看一区二区精品视频| 91激情五月电影| 欧美在线免费播放| 欧美美女bb生活片| 日韩一区二区三区四区五区六区 | 色综合天天综合网天天狠天天| 99久久久久久99| av电影天堂一区二区在线观看| 国产福利一区二区三区| 成人av在线一区二区三区| 成人性色生活片免费看爆迷你毛片| 丁香六月综合激情| 一本色道久久综合狠狠躁的推荐 | 99国产精品久| 色噜噜狠狠色综合中国| 91网站最新地址| 欧美日韩一二三| 日韩精品一区二区三区swag| 久久综合久久久久88| 中文av一区二区| 亚洲国产精品久久一线不卡| 日欧美一区二区| 韩国av一区二区三区在线观看| 韩国一区二区视频| 成人深夜视频在线观看| 色噜噜狠狠一区二区三区果冻| 在线观看视频91| 日韩美女在线视频 | 26uuuu精品一区二区| 国产精品天干天干在线综合| 亚洲精品菠萝久久久久久久| 午夜精品福利在线| 国产一区免费电影| 99re视频精品| 欧美一区二区三区视频在线观看| 久久综合九色综合欧美亚洲| 综合久久久久久久| 日韩影视精彩在线| 成人午夜在线免费| 777亚洲妇女| 自拍偷拍欧美精品| 久久国产麻豆精品| 欧美中文字幕亚洲一区二区va在线 | 欧美三级一区二区| 久久久青草青青国产亚洲免观| 亚洲狼人国产精品| 国产一区二区视频在线| 在线免费视频一区二区| 久久久久久黄色| 亚洲18女电影在线观看| 国产91丝袜在线18| 宅男在线国产精品| 亚洲精品视频免费看| 久久成人久久爱| 欧美亚洲图片小说| 国产精品嫩草影院av蜜臀| 日韩高清国产一区在线| 一本色道久久综合亚洲精品按摩 | 国产视频一区不卡| 三级久久三级久久久| 91首页免费视频| 久久久国产午夜精品| 日韩不卡一区二区| 在线观看精品一区| 国产精品视频一二三| 久久99蜜桃精品| 91精品国产乱| 亚洲一区二区三区小说| 91一区一区三区| 中文字幕第一区综合| 极品少妇一区二区| 日韩一本二本av| 丝袜美腿亚洲一区| 欧美亚洲综合在线| 洋洋av久久久久久久一区| 99久久婷婷国产| 国产日韩欧美电影| 国产精品一区二区无线| 精品国产污网站| 蜜臀av亚洲一区中文字幕| 欧美精品国产精品| 日韩电影免费一区| 欧美日韩成人在线| 亚洲国产精品久久人人爱蜜臀 | 日韩三级电影网址| 蜜桃av一区二区三区电影| 欧美精品乱人伦久久久久久| 天天做天天摸天天爽国产一区| 欧美亚洲日本国产| 一区二区三区免费观看| 欧美在线免费观看亚洲| 午夜精品久久久久久久蜜桃app| 欧美专区日韩专区| 午夜av一区二区三区| 欧美肥妇free| 美女视频免费一区| 欧美v国产在线一区二区三区| 国产真实乱子伦精品视频| 26uuu色噜噜精品一区二区| 国模娜娜一区二区三区| 精品精品国产高清a毛片牛牛| 老司机精品视频在线| 国产亚洲va综合人人澡精品| 福利91精品一区二区三区| 国产精品成人免费在线| 在线观看国产一区二区| 丝袜美腿高跟呻吟高潮一区| 日韩欧美在线观看一区二区三区| 蜜桃视频在线一区| 国产精品丝袜在线| 色婷婷香蕉在线一区二区| 亚洲一区二区三区美女| 宅男噜噜噜66一区二区66| 韩国精品一区二区| 亚洲色图另类专区| 欧美日韩免费不卡视频一区二区三区 | 久久成人精品无人区| 久久久精品免费观看| 国产成人午夜精品5599| 亚洲在线视频一区| 日韩精品中文字幕一区二区三区 | 欧美三级资源在线| 激情深爱一区二区| 国产精品久久久久天堂|