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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? outofmouth.cpp

?? 考驗?zāi)愕挠^察力和判斷力的時候到了
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
// clear ddsd and set size
DDRAW_INIT_STRUCT(ddsd); 

// enable valid fields
ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;

// set the backbuffer count field to 1, use 2 for triple buffering
ddsd.dwBackBufferCount = 1;

// request a complex, flippable
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;

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

// now query for attached surface from the primary surface

// this line is needed by the call
ddsd.ddsCaps.dwCaps = DDSCAPS_BACKBUFFER;

// get the attached back buffer surface
if (FAILED(lpddsprimary->GetAttachedSurface(&ddsd.ddsCaps, &lpddsback)))
  return(0);

// build up the palette data array
for (int color=1; color < 255; color++)
    {
    // fill with random RGB values
    palette[color].peRed   = rand()%256;
    palette[color].peGreen = rand()%256;
    palette[color].peBlue  = rand()%256;

    // set flags field to PC_NOCOLLAPSE
    palette[color].peFlags = PC_NOCOLLAPSE;
    } // end for color

// now fill in entry 0 and 255 with black and white
palette[0].peRed     = 0;
palette[0].peGreen   = 0;
palette[0].peBlue    = 0;
palette[0].peFlags   = PC_NOCOLLAPSE;

palette[255].peRed   = 255;
palette[255].peGreen = 255;
palette[255].peBlue  = 255;
palette[255].peFlags = PC_NOCOLLAPSE;

// create the palette object
if (FAILED(lpdd->CreatePalette(DDPCAPS_8BIT | DDPCAPS_ALLOW256 | 
                                DDPCAPS_INITIALIZE, 
                                palette,&lpddpal, NULL)))
return(0);

// finally attach the palette to the primary surface
if (FAILED(lpddsprimary->SetPalette(lpddpal)))
   return(0);

// set clipper up on back buffer since that's where well clip
RECT screen_rect= {0,0,SCREEN_WIDTH-1,SCREEN_HEIGHT-1};
lpddclipper = DDraw_Attach_Clipper(lpddsback,1,&screen_rect);

// load the 8-bit image
if (!Load_Bitmap_File(&bitmap,"b1.bmp"))
   return(0);

// load it's palette into directdraw
if (FAILED(lpddpal->SetEntries(0,0,MAX_COLORS_PALETTE,bitmap.palette)))
   return(0);

// clean the surfaces
DDraw_Fill_Surface(lpddsprimary,0);
DDraw_Fill_Surface(lpddsback,0);

// create the buffer to hold the background
lpddsbackground = DDraw_Create_Surface(1024,768,0,-1);

// copy the background bitmap image to the background surface 

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

// get video pointer to primary surfce
UCHAR *image_buffer = (UCHAR *)ddsd.lpSurface;       

// test if memory is linear
if (ddsd.lPitch == SCREEN_WIDTH)
   {
   // copy memory from double buffer to primary buffer
   memcpy((void *)image_buffer, (void *)bitmap.buffer, SCREEN_WIDTH*SCREEN_HEIGHT);
   } // end if
else
   { // non-linear

   // make copy of source and destination addresses
   UCHAR *dest_ptr = image_buffer;
   UCHAR *src_ptr  = bitmap.buffer;

   // memory is non-linear, copy line by line
   for (int y=0; y < SCREEN_HEIGHT; y++)
       {
       // copy line
       memcpy((void *)dest_ptr, (void *)src_ptr, SCREEN_WIDTH);

       // advance pointers to next line
       dest_ptr+=ddsd.lPitch;
       src_ptr +=SCREEN_WIDTH;
       } // end for

   } // end else

// now unlock the primary surface
if (FAILED(lpddsbackground->Unlock(NULL)))
   return(0);

// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);

// seed random number generator
srand(GetTickCount());

// initialize all the aliens

// alien on level 1 of complex

aliens[0].x              = rand()%SCREEN_WIDTH;
aliens[0].y              = 116 - 72;                  
aliens[0].velocity       = 2+rand()%4;
aliens[0].current_frame  = 0;             
aliens[0].counter        = 0;       

// alien on level 2 of complex

aliens[1].x              = rand()%SCREEN_WIDTH;
aliens[1].y              = 246 - 72;                  
aliens[1].velocity       = 2+rand()%4;
aliens[1].current_frame  = 0;             
aliens[1].counter        = 0;  

// alien on level 3 of complex

aliens[2].x              = rand()%SCREEN_WIDTH;
aliens[2].y              = 382 - 72;                  
aliens[2].velocity       = 2+rand()%4;
aliens[2].current_frame  = 0;             
aliens[2].counter        = 0;  

// now load the bitmap containing the alien imagery
// then scan the images out into the surfaces of alien[0]
// and copy then into the other two, be careful of reference counts!

// load the 8-bit image
if (!Load_Bitmap_File(&bitmap,"d1.bmp"))
   return(0);

// create each surface and load bits
for (int index = 0; index < 3; index++)
    {
    // create surface to hold image
    aliens[0].frames[index] = DDraw_Create_Surface(72,80,0);

    // now load bits...
    Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      aliens[0].frames[index], // surface to hold data
                      index, 0);               // cell to scan image from    

    } // end for index

// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);

// now for the tricky part. There is no need to create more surfaces with the same
// data, so I'm going to copy the surface pointers member for member to each alien
// however, be careful, since the reference counts do NOT go up, you still only need
// to release() each surface once!

for (index = 0; index < 3; index++)
    aliens[1].frames[index] = aliens[2].frames[index] = aliens[0].frames[index];
//init bow//////////////////////////////////
bow.x=400;
bow.y=350;
bow.current_frame=0;
bow.counter=0;

if (!Load_Bitmap_File(&bitmap,"e8.bmp"))
   return(0);

for (index = 0; index < ALL_BOW; index++)
{
    // create surface to hold image
	bow.frames[index] = DDraw_Create_Surface(BOW_WIDTH,BOW_HEIGHT,0);
	
	if(index>=6)
	{
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow.frames[index], // surface to hold data
                      index-6, 1);
	}
	else if(index>=12)
	{
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow.frames[index], // surface to hold data
                      index-12, 2);
	}
	else
	{
		    // now load bits...
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow.frames[index], // surface to hold data
                      index, 0);               // cell to scan image from
	}

} // end for index


// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);

//init bow2//////////////////////////////////
bow2.x=400;
bow2.y=350;
bow2.current_frame=0;
bow2.counter=0;

if (!Load_Bitmap_File(&bitmap,"eb8.bmp"))
   return(0);

for (index = 0; index < ALL_BOW2; index++)
{
    // create surface to hold image
	bow2.frames[index] = DDraw_Create_Surface(BOW2_WIDTH,BOW2_HEIGHT,0);
	
	if(index>=6)
	{
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow2.frames[index], // surface to hold data
                      index-6, 1);
	}
	else if(index>=12)
	{
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow2.frames[index], // surface to hold data
                      index-12, 2);
	}
	else
	{
		    // now load bits...
		Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      bow2.frames[index], // surface to hold data
                      index, 0);               // cell to scan image from
	}

} // end for index


// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);

//load tooth/////////////////////////
if (!Load_Bitmap_File(&bitmap,"tooth.bmp"))
   return(0);

for (index = 0; index < ALL_SHAPE_NUM; index++)
    {
    // create surface to hold image
    tooth[index].frames[0] = DDraw_Create_Surface(TOOTH_WIDTH,TOOTH_HEIGHT,0);

    // now load bits...
    Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      tooth[index].frames[0], // surface to hold data
                      index, 0);               // cell to scan image from    

    } // end for index


// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);
//build map//////////

if(!Build_Map())
{
	return(0);
}

if (!Load_Bitmap_File(&bitmap,"small.bmp"))
   return(0);

for (index = 0; index < 2; index++)
    {
    // create surface to hold image
    smallone.frames[index] = DDraw_Create_Surface(TOOTH_WIDTH,TOOTH_HEIGHT,0);

    // now load bits...
    Scan_Image_Bitmap(&bitmap,                 // bitmap file to scan image data from
                      smallone.frames[index], // surface to hold data
                      index, 0);               // cell to scan image from    

    } // end for index

// unload the bitmap file, we no longer need it
Unload_Bitmap_File(&bitmap);



// return success or failure or your own return code here
return(1);

} // end Game_Init

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

int Game_Shutdown(void *parms = NULL, int num_parms = 0)
{
// this is called after the game is exited and the main event
// loop while is exited, do all you cleanup and shutdown here

// kill all the surfaces


// first the palette
if (lpddpal)
   {
   lpddpal->Release();
   lpddpal = NULL;
   } // end if

// now the primary surface
if (lpddsprimary)
   {
   lpddsprimary->Release();
   lpddsprimary = NULL;
   } // end if

// now blow away the IDirectDraw4 interface
if (lpdd)
   {
   lpdd->Release();
   lpdd = NULL;
   } // end if

// return success or failure or your own return code here
return(1);

} // end Game_Shutdown

// WINMAIN ////////////////////////////////////////////////

int WINAPI WinMain(	HINSTANCE hinstance,
					HINSTANCE hprevinstance,
					LPSTR lpcmdline,
					int ncmdshow)
{

WNDCLASSEX winclass; // this will hold the class we create
HWND	   hwnd;	 // generic window handle
MSG		   msg;		 // generic message
HDC        hdc;      // graphics device context

// first fill in the window class stucture
winclass.cbSize         = sizeof(WNDCLASSEX);
winclass.style			= CS_DBLCLKS | CS_OWNDC | 
                          CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc	= WindowProc;
winclass.cbClsExtra		= 0;
winclass.cbWndExtra		= 0;
winclass.hInstance		= hinstance;
winclass.hIcon			= LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor		= LoadCursor(NULL, IDC_ARROW); 
winclass.hbrBackground	= (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName	= NULL;
winclass.lpszClassName	= WINDOW_CLASS_NAME;
winclass.hIconSm        = LoadIcon(NULL, IDI_APPLICATION);

// save hinstance in global
hinstance_app = hinstance;

// register the window class
if (!RegisterClassEx(&winclass))
	return(0);

// create the window
if (!(hwnd = CreateWindowEx(NULL,                  // extended style
                            WINDOW_CLASS_NAME,     // class
						    "OutofMouth Demo", // title
						    WS_POPUP | WS_VISIBLE,
					 	    0,0,	  // initial x,y
						    SCREEN_WIDTH,SCREEN_HEIGHT,  // initial width, height
						    NULL,	  // handle to parent 
						    NULL,	  // handle to menu
						    hinstance,// instance of this application
						    NULL)))	// extra creation parms
return(0);

// hide mouse
ShowCursor(FALSE);

// save main window handle
main_window_handle = hwnd;

// initialize game here
Game_Init();

// enter main event loop
while(TRUE)
	{
    // test if there is a message in queue, if so get it
	if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
	   { 
	   // test if this is a quit
       if (msg.message == WM_QUIT)
           break;
	
	   // translate any accelerator keys
	   TranslateMessage(&msg);

	   // send the message to the window proc
	   DispatchMessage(&msg);
	   } // end if
    
       // main game processing goes here
       Game_Main();
       
	} // end while

// closedown game here
Game_Shutdown();

// show mouse
ShowCursor(TRUE);
// return to Windows like this
return(msg.wParam);

} // end WinMain

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

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文幕一区二区三区久久蜜桃| 91精品在线观看入口| 久久精品夜色噜噜亚洲aⅴ| 裸体在线国模精品偷拍| 日韩写真欧美这视频| 激情五月激情综合网| 精品国产免费人成在线观看| 国产老肥熟一区二区三区| 欧美国产一区二区在线观看| www.成人网.com| 一片黄亚洲嫩模| 欧美久久婷婷综合色| 精品一区在线看| 日本一区二区三区久久久久久久久不| 成人h动漫精品一区二| 亚洲精品成人a在线观看| 51久久夜色精品国产麻豆| 国内精品久久久久影院色 | 色综合网色综合| 日韩精彩视频在线观看| 91精品国产欧美日韩| 国产一区二区三区四区五区入口| 日本一区二区三区dvd视频在线| 99r国产精品| 日韩av一区二区在线影视| 久久精品一区二区| 色婷婷综合久久久| 欧美aaa在线| 国产精品免费人成网站| 欧美天堂一区二区三区| 激情文学综合丁香| 樱花影视一区二区| 亚洲精品一区二区三区四区高清 | 亚洲国产精品一区二区www在线 | 欧美性猛片aaaaaaa做受| 日韩精品乱码免费| 中文字幕一区在线| 日韩网站在线看片你懂的| jlzzjlzz亚洲女人18| 首页国产欧美久久| 亚洲免费看黄网站| 欧美tk丨vk视频| 欧美日韩在线播| 成人午夜在线视频| 麻豆传媒一区二区三区| 中文字幕综合网| 久久综合999| 欧美美女一区二区| 色综合 综合色| 国内精品久久久久影院色| 香蕉久久一区二区不卡无毒影院 | 日韩免费在线观看| 欧美最新大片在线看 | 91亚洲国产成人精品一区二三 | 国产99久久久久| 日本欧美大码aⅴ在线播放| ...xxx性欧美| 久久精品亚洲国产奇米99| 91精品国模一区二区三区| 色av成人天堂桃色av| 丰满白嫩尤物一区二区| 精品系列免费在线观看| 天使萌一区二区三区免费观看| 亚洲欧美视频一区| 国产精品免费网站在线观看| 久久一区二区三区国产精品| 91精品国产综合久久精品app| 在线一区二区三区做爰视频网站| 国产suv精品一区二区883| 狠狠色狠狠色合久久伊人| 日韩中文字幕91| 天使萌一区二区三区免费观看| 亚洲最大成人网4388xx| 亚洲精品中文在线影院| ...xxx性欧美| 亚洲精品国产无天堂网2021| 综合欧美一区二区三区| 最新日韩av在线| 中文字幕综合网| 夜夜爽夜夜爽精品视频| 亚洲老司机在线| 亚洲综合色网站| 亚洲小少妇裸体bbw| 一级特黄大欧美久久久| 一区二区三区四区在线播放 | 欧美日韩久久一区二区| 91 com成人网| 欧美电视剧免费全集观看 | 久久精品一区二区| 中文一区二区在线观看| 亚洲日本va在线观看| 一区二区三区四区精品在线视频| 亚洲综合色视频| 日韩精品一级二级 | 7777精品伊人久久久大香线蕉最新版| 欧美乱熟臀69xxxxxx| 欧美va日韩va| 中文字幕 久热精品 视频在线 | 国产二区国产一区在线观看| 国产福利精品一区二区| 色哟哟亚洲精品| 欧美精品 日韩| 久久亚洲一区二区三区明星换脸| 中文乱码免费一区二区| 一区二区三区自拍| 日本亚洲视频在线| 高清视频一区二区| 在线观看日韩精品| 日韩欧美国产综合一区| 国产女人水真多18毛片18精品视频| 亚洲欧洲成人自拍| 午夜视频一区二区三区| 国产综合色在线视频区| av中文字幕不卡| 在线电影欧美成精品| 亚洲精品一区二区三区影院 | 婷婷激情综合网| 国产91综合网| 欧美日韩mp4| 欧美激情一区二区三区全黄| 亚洲国产色一区| 国产伦理精品不卡| 欧美日韩中文国产| 国产三级三级三级精品8ⅰ区| 玉足女爽爽91| 国产剧情av麻豆香蕉精品| 日本韩国欧美一区二区三区| 日韩欧美国产1| 亚洲自拍偷拍综合| 国产精品小仙女| 91精品国产综合久久小美女| 成人欧美一区二区三区| 狠狠色丁香婷婷综合久久片| 91久久精品一区二区二区| 久久午夜免费电影| 午夜欧美大尺度福利影院在线看 | 99免费精品在线| 日韩欧美在线观看一区二区三区| 国产精品久久久久影院老司| 日本亚洲视频在线| 欧美中文字幕不卡| 亚洲欧洲www| 国产激情一区二区三区| 91精品国产一区二区三区蜜臀| 一区二区三区四区蜜桃| 福利一区福利二区| 精品第一国产综合精品aⅴ| 亚洲1区2区3区视频| 91同城在线观看| 一色桃子久久精品亚洲| 豆国产96在线|亚洲| 久久嫩草精品久久久精品| 日本免费新一区视频| 欧美日韩精品专区| 亚洲高清免费视频| 欧洲一区二区三区在线| 亚洲精品五月天| heyzo一本久久综合| 国产精品美女久久久久av爽李琼| 国产精一区二区三区| 日韩欧美成人激情| 美女视频网站久久| 日韩欧美一区二区在线视频| 午夜精品视频一区| 欧美精品亚洲一区二区在线播放| 夜夜嗨av一区二区三区四季av| 91毛片在线观看| 一区二区三区国产| 精品视频一区三区九区| 亚洲一区成人在线| 欧美日韩成人综合在线一区二区| 亚洲一二三四在线| 欧美日韩精品欧美日韩精品| 亚洲国产精品一区二区久久 | 久久综合色综合88| 国产成人av资源| 中文字幕一区三区| 欧洲国内综合视频| 天天综合网 天天综合色| 91精品国产美女浴室洗澡无遮挡| 奇米777欧美一区二区| 日韩精品中文字幕一区| 麻豆精品视频在线观看| 精品国产伦一区二区三区免费| 国产乱子伦视频一区二区三区| 久久久www成人免费无遮挡大片 | 色婷婷综合五月| 图片区日韩欧美亚洲| 91精品在线一区二区| 韩国午夜理伦三级不卡影院| 中国色在线观看另类| 91麻豆国产福利在线观看| 亚洲一区二区三区小说| 欧美一区二区视频观看视频| 久久国产三级精品| 国产精品久线观看视频| 欧美日韩中文精品| 国产精品自拍av| 一区二区三区高清不卡| 精品免费日韩av|