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

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

?? outofmouth.cpp

?? 考驗你的觀察力和判斷力的時候到了
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
// return success
return(1);

} // end Flip_Bitmap

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

LPDIRECTDRAWCLIPPER DDraw_Attach_Clipper(LPDIRECTDRAWSURFACE7 lpdds,
                                         int num_rects,
                                         LPRECT clip_list)

{
// this function creates a clipper from the sent clip list and attaches
// it to the sent surface

int index;                         // looping var
LPDIRECTDRAWCLIPPER lpddclipper;   // pointer to the newly created dd clipper
LPRGNDATA region_data;             // pointer to the region data that contains
                                   // the header and clip list

// first create the direct draw clipper
if (FAILED(lpdd->CreateClipper(0,&lpddclipper,NULL)))
   return(NULL);

// now create the clip list from the sent data

// first allocate memory for region data
region_data = (LPRGNDATA)malloc(sizeof(RGNDATAHEADER)+num_rects*sizeof(RECT));

// now copy the rects into region data
memcpy(region_data->Buffer, clip_list, sizeof(RECT)*num_rects);

// set up fields of header
region_data->rdh.dwSize          = sizeof(RGNDATAHEADER);
region_data->rdh.iType           = RDH_RECTANGLES;
region_data->rdh.nCount          = num_rects;
region_data->rdh.nRgnSize        = num_rects*sizeof(RECT);

region_data->rdh.rcBound.left    =  64000;
region_data->rdh.rcBound.top     =  64000;
region_data->rdh.rcBound.right   = -64000;
region_data->rdh.rcBound.bottom  = -64000;

// find bounds of all clipping regions
for (index=0; index<num_rects; index++)
    {
    // test if the next rectangle unioned with the current bound is larger
    if (clip_list[index].left < region_data->rdh.rcBound.left)
       region_data->rdh.rcBound.left = clip_list[index].left;

    if (clip_list[index].right > region_data->rdh.rcBound.right)
       region_data->rdh.rcBound.right = clip_list[index].right;

    if (clip_list[index].top < region_data->rdh.rcBound.top)
       region_data->rdh.rcBound.top = clip_list[index].top;

    if (clip_list[index].bottom > region_data->rdh.rcBound.bottom)
       region_data->rdh.rcBound.bottom = clip_list[index].bottom;

    } // end for index

// now we have computed the bounding rectangle region and set up the data
// now let's set the clipping list

if (FAILED(lpddclipper->SetClipList(region_data, 0)))
   {
   // release memory and return error
   free(region_data);
   return(NULL);
   } // end if

// now attach the clipper to the surface
if (FAILED(lpdds->SetClipper(lpddclipper)))
   {
   // release memory and return error
   free(region_data);
   return(NULL);
   } // end if

// all is well, so release memory and send back the pointer to the new clipper
free(region_data);
return(lpddclipper);

} // end DDraw_Attach_Clipper

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

int DDraw_Fill_Surface(LPDIRECTDRAWSURFACE7 lpdds,int color)
{
DDBLTFX ddbltfx; // this contains the DDBLTFX structure

// clear out the structure and set the size field 
DDRAW_INIT_STRUCT(ddbltfx);

// set the dwfillcolor field to the desired color
ddbltfx.dwFillColor = color; 

// ready to blt to surface
lpdds->Blt(NULL,       // ptr to dest rectangle
           NULL,       // ptr to source surface, NA            
           NULL,       // ptr to source rectangle, NA
           DDBLT_COLORFILL | DDBLT_WAIT,   // fill and wait                   
           &ddbltfx);  // ptr to DDBLTFX structure

// return success
return(1);
} // end DDraw_Fill_Surface

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

int DDraw_Draw_Surface(LPDIRECTDRAWSURFACE7 source, // source surface to draw
                      int x, int y,                 // position to draw at
                      int width, int height,        // size of source surface
                      LPDIRECTDRAWSURFACE7 dest,    // surface to draw the surface on
                      int transparent = 1)          // transparency flag
{
// draw a bob at the x,y defined in the BOB
// on the destination surface defined in dest

RECT dest_rect,   // the destination rectangle
     source_rect; // the source rectangle                             

// fill in the destination rect
dest_rect.left   = x;
dest_rect.top    = y;
dest_rect.right  = x+width-1;
dest_rect.bottom = y+height-1;

// fill in the source rect
source_rect.left    = 0;
source_rect.top     = 0;
source_rect.right   = width-1;
source_rect.bottom  = height-1;

// test transparency flag

if (transparent)
   {
   // enable color key blit
   // blt to destination surface
   if (FAILED(dest->Blt(&dest_rect, source,
                     &source_rect,(DDBLT_WAIT | DDBLT_KEYSRC),
                     NULL)))
           return(0);

   } // end if
else
   {
   // perform blit without color key
   // blt to destination surface
   if (FAILED(dest->Blt(&dest_rect, source,
                     &source_rect,(DDBLT_WAIT),
                     NULL)))
           return(0);

   } // end if

// return success
return(1);

} // end DDraw_Draw_Surface

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

int Scan_Image_Bitmap(BITMAP_FILE_PTR bitmap,     // bitmap file to scan image data from
                      LPDIRECTDRAWSURFACE7 lpdds, // surface to hold data
                      int cx, int cy)             // cell to scan image from
{
// this function extracts a bitmap out of a bitmap file

UCHAR *source_ptr,   // working pointers
      *dest_ptr;

DDSURFACEDESC2 ddsd;  //  direct draw surface description 

// get the addr to destination surface memory

// set size of the structure
ddsd.dwSize = sizeof(ddsd);

// lock the display surface
lpdds->Lock(NULL,
            &ddsd,
            DDLOCK_WAIT | DDLOCK_SURFACEMEMORYPTR,
            NULL);

// compute position to start scanning bits from
cx = cx*(ddsd.dwWidth+1) + 1;
cy = cy*(ddsd.dwHeight+1) + 1;

gwidth  = ddsd.dwWidth;
gheight = ddsd.dwHeight;

// extract bitmap data
source_ptr = bitmap->buffer + cy*bitmap->bitmapinfoheader.biWidth+cx;

// assign a pointer to the memory surface for manipulation
dest_ptr = (UCHAR *)ddsd.lpSurface;

// iterate thru each scanline and copy bitmap
for (int index_y=0; index_y < ddsd.dwHeight; index_y++)
    {
    // copy next line of data to destination
    memcpy(dest_ptr, source_ptr, ddsd.dwWidth);

    // advance pointers
    dest_ptr   += (ddsd.lPitch); // (ddsd.dwWidth);
    source_ptr += bitmap->bitmapinfoheader.biWidth;
    } // end for index_y

// unlock the surface 
lpdds->Unlock(NULL);

// return success
return(1);

} // end Scan_Image_Bitmap

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

LPDIRECTDRAWSURFACE7 DDraw_Create_Surface(int width, int height, int mem_flags, int color_key = 0)
{
// this function creates an offscreen plain surface

DDSURFACEDESC2 ddsd;         // working description
LPDIRECTDRAWSURFACE7 lpdds;  // temporary surface
    
// set to access caps, width, and height
memset(&ddsd,0,sizeof(ddsd));
ddsd.dwSize  = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;

// set dimensions of the new bitmap surface
ddsd.dwWidth  =  width;
ddsd.dwHeight =  height;

// set surface to offscreen plain
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | mem_flags;

// create the surface
if (FAILED(lpdd->CreateSurface(&ddsd,&lpdds,NULL)))
   return(NULL);

// test if user wants a color key
if (color_key >= 0)
   {
   // set color key to color 0
   DDCOLORKEY color_key; // used to set color key
   color_key.dwColorSpaceLowValue  = 253;
   color_key.dwColorSpaceHighValue = 253;

   // now set the color key for source blitting
   lpdds->SetColorKey(DDCKEY_SRCBLT, &color_key);
   } // end if

// return surface
return(lpdds);
} // end DDraw_Create_Surface


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

LRESULT CALLBACK WindowProc(HWND hwnd, 
						    UINT msg, 
                            WPARAM wparam, 
                            LPARAM lparam)
{
// this is the main message handler of the system
PAINTSTRUCT		ps;		// used in WM_PAINT
HDC				hdc;	// handle to a device context
char buffer[80];        // used to print strings

// what is the message 
switch(msg)
	{	
	case WM_CREATE: 
        {
		// do initialization stuff here
        // return success
		return(0);
		} break;
   
	case WM_PAINT: 
		{
		// simply validate the window 
   	    hdc = BeginPaint(hwnd,&ps);	 
        
        // end painting
        EndPaint(hwnd,&ps);

        // return success
		return(0);
   		} break;

	case WM_DESTROY: 
		{

		// kill the application, this sends a WM_QUIT message 
		PostQuitMessage(0);

        // return success
		return(0);
		} break;

	default:break;

    } // end switch

// process any messages that we didn't take care of 
return (DefWindowProc(hwnd, msg, wparam, lparam));

} // end WinProc

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

int Draw_Text_GDI(char *text, int x,int y,COLORREF color, LPDIRECTDRAWSURFACE7 lpdds)
{
// this function draws the sent text on the sent surface 
// using color index as the color in the palette

HDC xdc; // the working dc

// get the dc from surface
if (FAILED(lpdds->GetDC(&xdc)))
   return(0);

// set the colors for the text up
SetTextColor(xdc,color);

// set background mode to transparent so black isn't copied
SetBkMode(xdc, TRANSPARENT);

// draw the text a
TextOut(xdc,x,y,text,strlen(text));

// release the dc
lpdds->ReleaseDC(xdc);

// return success
return(1);
} // end Draw_Text_GDI

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

int Game_Main(void *parms = NULL, int num_parms = 0)
{
// this is the main loop of the game, do all your processing
// here
//操作延遲計時
if(!delayflag)
{
	iTimeCounter++;
}
if(iTimeCounter>=DELAY)
{
	iTimeCounter=0;
	delayflag=1;
}
//死亡延遲計時
if(!iDeathDelayFlag)
{
	iDeathTimeCounter++;
}
if(iDeathTimeCounter>=DEATH_DELAY)
{
	iDeathTimeCounter=0;
	iDeathDelayFlag=1;
}
//模式檢測
if(KEYDOWN(VK_RETURN)&&delayflag)
{
	delayflag=0;
	iScore=0;
	iLevel=0;
	iFrame=0;
	delayflag=0;
	iDistance=DISTANCE;
	if(!Build_Map())
	{
		return(0);
	}
	iDeathFlag=0;

}
if(KEYDOWN(VK_F1)&&delayflag)
{
	iGameMode=0;
//
	delayflag=0;
	iScore=0;
	iLevel=0;
	iFrame=0;
	delayflag=0;
	iDistance=DISTANCE;
	if(!Build_Map())
	{
		return(0);
	}
	iDeathFlag=0;
}
if(KEYDOWN(VK_F2)&&delayflag)
{
	iGameMode=1;
//
	delayflag=0;
	iScore=0;
	iLevel=0;
	iFrame=0;
	delayflag=0;
	iDistance=DISTANCE;
	if(!Build_Map())
	{
		return(0);
	}
	iDeathFlag=0;
}
if(KEYDOWN(VK_F3)&&delayflag)
{
	iGameMode=2;
	//
	delayflag=0;
	iScore=0;
	iLevel=0;
	iFrame=0;
	delayflag=0;
	iDistance=DISTANCE;
	if(!Build_Map())
	{
		return(0);
	}
	iDeathFlag=0;
}
if(KEYDOWN(VK_F4)&&delayflag)
{
	iGameMode=3;
    //
	delayflag=0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美欧美午夜aⅴ在线观看| 国产女主播在线一区二区| 日韩精品一区二区三区四区| 国产欧美日韩综合精品一区二区| 亚洲激情自拍视频| 韩国av一区二区三区| 在线观看91精品国产入口| 久久你懂得1024| 婷婷丁香激情综合| 色综合色综合色综合色综合色综合 | 午夜成人免费视频| 成人免费视频播放| 精品三级av在线| 亚洲高清三级视频| 99在线精品免费| 久久久久久97三级| 久久国产精品第一页| 欧美日韩亚洲高清一区二区| 亚洲人123区| 成人av免费网站| 日本一区二区三区高清不卡| 精品一区二区成人精品| 91精品国产一区二区三区| 亚洲国产婷婷综合在线精品| 色综合中文字幕国产| 国产亚洲精品中文字幕| 看片的网站亚洲| 欧美一区二区三区免费大片| 视频一区在线播放| 欧美日韩成人激情| 亚洲成av人片一区二区梦乃| 欧美三级欧美一级| 亚洲一区二区欧美| 欧美电影一区二区| 青青青伊人色综合久久| 日韩视频永久免费| 美日韩一区二区三区| 欧美mv和日韩mv的网站| 国内精品嫩模私拍在线| www久久精品| 国产91精品一区二区麻豆网站| 国产亚洲一区二区三区四区| 高清在线成人网| 一色屋精品亚洲香蕉网站| 97精品久久久久中文字幕| 国产精品久久久久一区二区三区 | 午夜伊人狠狠久久| 欧美精品aⅴ在线视频| 日本伊人色综合网| 精品国精品自拍自在线| 成人一区二区三区在线观看| 1024成人网| 欧美日韩国产精品自在自线| 青青草国产成人av片免费| 久久综合狠狠综合久久激情 | 久久久久青草大香线综合精品| 国产成人在线色| 夜夜精品浪潮av一区二区三区| 欧美乱妇15p| 国产精品一区免费视频| 亚洲欧美视频在线观看视频| 欧美日韩一区不卡| 国产一区二区三区在线观看免费 | 欧美日韩国产美| 国产精品自拍在线| 亚洲精品免费在线| 欧美电影免费观看高清完整版在线 | 视频一区二区三区中文字幕| 欧美一区二区三区电影| 岛国av在线一区| 亚洲地区一二三色| 久久免费精品国产久精品久久久久| a美女胸又www黄视频久久| 亚洲va韩国va欧美va精品| 国产午夜精品久久久久久免费视| 色噜噜狠狠一区二区三区果冻| 蜜臀av国产精品久久久久| 国产精品九色蝌蚪自拍| 日韩一区二区麻豆国产| 99精品视频在线观看免费| 蜜臀久久99精品久久久画质超高清 | 久久久久久久久99精品| 欧美视频在线观看一区| 久久99久国产精品黄毛片色诱| 亚洲另类在线视频| 欧美极品另类videosde| 欧美成人一级视频| 欧美少妇bbb| www.日韩在线| 国产在线一区观看| 日韩黄色一级片| 亚洲免费电影在线| 国产精品狼人久久影院观看方式| 日韩欧美国产高清| 欧美久久久久免费| 91极品美女在线| 成人av在线一区二区| 国产精品一区二区91| 免费成人在线视频观看| 亚洲国产精品一区二区www在线| 中文字幕精品三区| 国产亚洲成年网址在线观看| 日韩免费看网站| 日韩一级片网站| 欧美精品一卡二卡| 欧美精品视频www在线观看| 色婷婷综合久久久中文字幕| 成人免费av在线| 成人免费视频caoporn| 国产传媒欧美日韩成人| 久久不见久久见免费视频1| 日韩va亚洲va欧美va久久| 亚洲成精国产精品女| 亚洲自拍偷拍网站| 亚洲成人在线观看视频| 亚洲成在线观看| 亚洲成人av一区二区三区| 亚洲国产精品嫩草影院| 亚洲国产视频一区| 亚洲成人黄色影院| 日韩精品一二三四| 美女视频黄 久久| 国产在线精品一区二区| 国产成人精品一区二| 波多野结衣中文字幕一区| 色婷婷精品久久二区二区蜜臀av| 一本一本大道香蕉久在线精品| 在线免费一区三区| 欧美色涩在线第一页| 91精品国产综合久久精品| 欧美成人精品福利| 国产午夜精品一区二区| 亚洲国产岛国毛片在线| 国产精品国产三级国产aⅴ原创| 国产精品电影院| 亚洲欧美国产毛片在线| 午夜久久电影网| 久草在线在线精品观看| 国产91精品一区二区麻豆网站 | 亚洲人成电影网站色mp4| 亚洲国产日韩精品| 久久草av在线| av一区二区三区在线| 欧美系列在线观看| 日韩欧美久久一区| 国产精品视频线看| 婷婷综合久久一区二区三区| 国产一区二区成人久久免费影院| 9i在线看片成人免费| 3751色影院一区二区三区| 欧美精品一区二区三区视频| 亚洲欧美综合另类在线卡通| 午夜视频在线观看一区| 国产精品88av| 欧美日韩一级黄| 中文字幕久久午夜不卡| 午夜日韩在线观看| 国产成人超碰人人澡人人澡| 欧美日本不卡视频| 国产精品麻豆视频| 五月婷婷激情综合| 成人av在线网| 欧美成人艳星乳罩| 亚洲国产色一区| www.日韩精品| 精品日韩一区二区| 亚洲一区二区黄色| 国产成a人亚洲精品| 91精品国产91综合久久蜜臀| 综合激情网...| 国产美女久久久久| 日韩一区二区三区三四区视频在线观看| 国产精品美女视频| 久久99精品久久久久久国产越南| 色婷婷狠狠综合| 国产精品三级视频| 激情五月播播久久久精品| 欧美在线看片a免费观看| 国产精品水嫩水嫩| 精品一区二区在线观看| 欧美亚洲一区二区在线| 自拍偷拍欧美精品| 懂色av中文一区二区三区| 日韩一区二区视频| 日韩激情av在线| 欧美日韩一区中文字幕| 亚洲毛片av在线| 97国产精品videossex| 中文字幕免费不卡| 国产成人在线色| 国产日韩亚洲欧美综合| 国产一区二区三区黄视频| 欧美精品一区二区三区视频| 久久国产日韩欧美精品| 日韩视频国产视频| 日本中文字幕不卡| 日韩欧美中文字幕公布| 久久精品国产99国产精品| 日韩欧美一级在线播放| 男人操女人的视频在线观看欧美 |