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

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

?? demo12_3.cpp

?? 游戲的聲音圖像演示程序
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
PAINTSTRUCT	ps;		   // used in WM_PAINT
HDC			hdc;	   // handle to a device context

// what is the message 
switch(msg)
	{	
	case WM_CREATE: 
        {
		// do initialization stuff here


		return(0);
		} break;

    case WM_PAINT:
         {
         // start painting
         hdc = BeginPaint(hwnd,&ps);

         // end painting
         EndPaint(hwnd,&ps);
         return(0);
        } break;


	case WM_DESTROY: 
		{

		// kill the application			
		PostQuitMessage(0);
		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

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

int WINAPI WinMain(	HINSTANCE hinstance,
					HINSTANCE hprevinstance,
					LPSTR lpcmdline,
					int ncmdshow)
{
// this is the winmain function

WNDCLASS winclass;	// this will hold the class we create
HWND	 hwnd;		// generic window handle
MSG		 msg;		// generic message
HDC      hdc;       // generic dc
PAINTSTRUCT ps;     // generic paintstruct

// first fill in the window class stucture
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;

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

// create the window, note the use of WS_POPUP
if (!(hwnd = CreateWindow(WINDOW_CLASS_NAME, // class
						  "Vector tracking demo",	 // title
						  WS_POPUP | WS_VISIBLE,
					 	  0,0,	   // x,y
						  WINDOW_WIDTH,  // width
                          WINDOW_HEIGHT, // height
						  NULL,	   // handle to parent 
						  NULL,	   // handle to menu
						  hinstance,// instance
						  NULL)))	// creation parms
return(0);

// save the window handle and instance in a global
main_window_handle = hwnd;
main_instance      = hinstance;

// perform all game console specific initialization
Game_Init();

// enter main event loop
while(1)
	{
	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


// shutdown game and release all resources
Game_Shutdown();

// return to Windows like this
return(msg.wParam);

} // end WinMain

//////////////////////////////////////////////////////////////////////////////
   
void Load_Andre(void)
{
// this function loads all the buttons for the interface

// load image
Load_Bitmap_File(&bitmap8bit, "OUTART/ENEMYAI.DAT");

// save the palette
Copy_Palette(andre_palette, bitmap8bit.palette);

Create_Bitmap(&andre,320-216/2,240-166/2,216,166);
Load_Image_Bitmap(&andre,&bitmap8bit,0,0,BITMAP_EXTRACT_MODE_ABS);

// unload object bitmap
Unload_Bitmap_File(&bitmap8bit);

} // end Load_Andre

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

void Init_Reset_Particles(void)
{
// this function serves as both an init and reset for the particles

// loop thru and reset all the particles to dead
for (int index=0; index<MAX_PARTICLES; index++)
    {
    particles[index].state = PARTICLE_STATE_DEAD;
    particles[index].type  = PARTICLE_TYPE_FADE;
    particles[index].x     = 0;
    particles[index].y     = 0;
    particles[index].xv    = 0;
    particles[index].yv    = 0;
    particles[index].start_color = 0;
    particles[index].end_color   = 0;
    particles[index].curr_color  = 0;
    particles[index].counter     = 0;
    particles[index].max_count   = 0;
    } // end if

} // end Init_Reset_Particles

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

void Start_Particle(int type, int color, int count, int x, int y, int xv, int yv)
{
// this function starts a single particle

int pindex = -1; // index of particle

// first find open particle
for (int index=0; index < MAX_PARTICLES; index++)
    if (particles[index].state == PARTICLE_STATE_DEAD)
       {
       // set index
       pindex = index; 
       break;
       } // end if    

// did we find one
if (pindex==-1)
   return;

// set general state info
particles[pindex].state = PARTICLE_STATE_ALIVE;
particles[pindex].type  = type;
particles[pindex].x     = x;
particles[pindex].y     = y;
particles[pindex].xv    = xv;
particles[pindex].yv    = yv;
particles[pindex].counter     = 0;
particles[pindex].max_count   = count;     

// set color ranges, always the same
   switch(color)
         {
         case PARTICLE_COLOR_RED:
              {
              particles[pindex].start_color = COLOR_RED_START;
              particles[pindex].end_color   = COLOR_RED_END;
              } break;

         case PARTICLE_COLOR_GREEN:
              {
              particles[pindex].start_color = COLOR_GREEN_START;
              particles[pindex].end_color   = COLOR_GREEN_END;
              } break;

         case PARTICLE_COLOR_BLUE:
              {
              particles[pindex].start_color = COLOR_BLUE_START;
              particles[pindex].end_color   = COLOR_BLUE_END;
              } break;

         case PARTICLE_COLOR_WHITE:
              {
              particles[pindex].start_color = COLOR_WHITE_START;
              particles[pindex].end_color   = COLOR_WHITE_END;
              } break;

         break;

         } // end switch

// what type of particle is being requested
if (type == PARTICLE_TYPE_FLICKER)
   {
    // set current color
    particles[index].curr_color  = RAND_RANGE(particles[index].start_color, particles[index].end_color);

   } // end if
else
   {
   // particle is fade type
   // set current color
   particles[index].curr_color  = particles[index].start_color;
   } // end if

} // end Start_Particle

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

void Start_Particle_Explosion(int type, int color, int count, 
                              int x, int y, int xv, int yv, int num_particles)
{
// this function starts a particle explosion at the given position and velocity

while(--num_particles >=0)
    {
    // compute random trajectory angle
    int ang = rand()%16;

    // compute random trajectory velocity
    float vel = 2+rand()%4;

    Start_Particle(type,color,count,
                   x+RAND_RANGE(-4,4),y+RAND_RANGE(-4,4), 
                   xv+cos_look16[ang]*vel, yv+sin_look16[ang]*16);        

    } // end while

} // end Start_Particle_Explosion

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

void Draw_Particles(void)
{
// this function draws all the particles

// lock back surface
DDraw_Lock_Back_Surface();

for (int index=0; index<MAX_PARTICLES; index++)
    {
    // test if particle is alive
    if (particles[index].state==PARTICLE_STATE_ALIVE)
       {
       // render the particle, perform world to screen transform
       int x = particles[index].x - player_x + (SCREEN_WIDTH/2);
       int y = particles[index].y - player_y + (SCREEN_HEIGHT/2);

       // test for clip
       if (x >= SCREEN_WIDTH || x < 0 || y >= SCREEN_HEIGHT || y < 0)
          continue;

       // draw the pixel
       Draw_Pixel(x,y,particles[index].curr_color, back_buffer, back_lpitch);
    
      } // end if

    } // end for index

// unlock the secondary surface
DDraw_Unlock_Back_Surface(); 

} // end Draw_Particles

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

void Move_Particles(void)
{
// this function moves and animates all particles

for (int index=0; index<MAX_PARTICLES; index++)
    {
    // test if this particle is alive
    if (particles[index].state == PARTICLE_STATE_ALIVE)
       {
       // translate particle
       particles[index].x+=particles[index].xv;
       particles[index].y+=particles[index].yv;

       // now based on type of particle perform proper animation
       if (particles[index].type==PARTICLE_TYPE_FLICKER)
          {
          // simply choose a color in the color range and assign it to the current color
          particles[index].curr_color = RAND_RANGE(particles[index].start_color, particles[index].end_color);

          // now update counter
          if (++particles[index].counter >= particles[index].max_count)
             {
             // kill the particle
             particles[index].state = PARTICLE_STATE_DEAD;             

             } // end if

          } // end if
      else
          {
          // must be a fade, be careful!
          // test if it's time to update color
          if (++particles[index].counter >= particles[index].max_count)
             {
              // reset counter
              particles[index].counter = 0;

             // update color
             if (++particles[index].curr_color>particles[index].end_color)
                {
                // transition is complete, terminate particle
                particles[index].state = PARTICLE_STATE_DEAD;  
 
                } // end if

             } // end if

          } // end else
             
       } // end if 

    } // end for index

} // end Move_Particles

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

void Init_Stars(void)
{
// this function initializes all the stars in the star field

int index; // looping variable

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

    // select plane that star will be in

    switch(rand()%3)
          {
          case STAR_PLANE_0:
               {
               stars[index].color = STAR_COLOR_0;
               stars[index].plane = STAR_PLANE_0;
               } break;

          case STAR_PLANE_1:
               {
               stars[index].color = STAR_COLOR_1;
               stars[index].plane = STAR_PLANE_1;
               } break;

          case STAR_PLANE_2:
               {
               stars[index].color = STAR_COLOR_2;
               stars[index].plane = STAR_PLANE_2;
               } break;

          default:break;

          } // end switch

     // set fields that aren't plane specific
     stars[index].x = rand()%SCREEN_WIDTH;   // change this latter to reflect clipping
     stars[index].y = rand()%SCREEN_HEIGHT;  // region

    } // end for index

} // end Init_Stars

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

void Move_Stars(void)
{
// this function moves the star field, note that the star field is always
// in screen coordinates, otherwise, we would need thousands of stars to
// fill up the universe instead of 50!

int index,   // looping variable
    star_x,  // used as fast aliases to star position
    star_y,
    plane_0_dx,
    plane_0_dy,
    plane_1_dx,
    plane_1_dy,
    plane_2_dx,
    plane_2_dy;

// pre-compute plane translations
plane_0_dx = -int(player_xv) >> 2;
plane_0_dy = -int(player_yv) >> 2;

plane_1_dx = -int(player_xv) >> 1;
plane_1_dy = -int(player_yv) >> 1;

plane_2_dx = -int(player_xv);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产乱码精品一区二区三区av | 国产麻豆9l精品三级站| 综合久久久久久久| 精品少妇一区二区三区在线播放 | 国产久卡久卡久卡久卡视频精品| 亚洲五码中文字幕| 亚洲色欲色欲www在线观看| 久久色在线观看| 日韩欧美另类在线| 91精品国产欧美一区二区| 在线观看欧美精品| 欧美亚洲一区二区在线观看| 一本大道久久a久久综合婷婷| 国产91露脸合集magnet| 国产精品中文有码| 丝袜美腿一区二区三区| 亚洲一区二区高清| 一区二区三区免费在线观看| 久久久不卡网国产精品一区| 久久综合色天天久久综合图片| 欧美一区二区精品| 91精品国产综合久久香蕉麻豆| 欧美日韩一级黄| 91社区在线播放| 成人av资源下载| 91在线视频在线| gogo大胆日本视频一区| 高清av一区二区| 国产在线视视频有精品| 免费成人av在线播放| 亚洲图片一区二区| 日韩国产在线观看一区| 日本欧美一区二区| 美女免费视频一区| 国产麻豆午夜三级精品| 国产a区久久久| 99视频一区二区| 一本大道av一区二区在线播放| 一本大道久久a久久综合| 欧美色网一区二区| 日韩一区二区三区电影在线观看| 日韩免费福利电影在线观看| 久久久一区二区| 国产精品久久免费看| 亚洲一区二区三区四区在线观看| 亚洲成年人影院| 久久精品国产澳门| 懂色av一区二区夜夜嗨| 91亚洲午夜精品久久久久久| 在线精品视频免费播放| 欧美成人欧美edvon| 欧美激情在线免费观看| 一区二区三区高清| 蜜臀av一区二区在线免费观看| 国产成人免费视频一区| 91久久奴性调教| 日韩一区二区三区四区| 国产女人水真多18毛片18精品视频 | 国产v综合v亚洲欧| 在线观看国产一区二区| 精品久久久久99| 日韩美女视频一区二区| 婷婷中文字幕综合| 国产精品亚洲午夜一区二区三区 | 久久蜜桃香蕉精品一区二区三区| 国产精品亲子乱子伦xxxx裸| 亚洲影视在线播放| 精品一区二区成人精品| 一本久道久久综合中文字幕| 日韩欧美色综合| 亚洲欧洲制服丝袜| 紧缚奴在线一区二区三区| 色一区在线观看| 久久精品亚洲精品国产欧美| 一区在线中文字幕| 美腿丝袜亚洲一区| 成人免费视频app| 日韩精品自拍偷拍| 亚洲欧美日韩在线不卡| 国产一区二区三区四区在线观看| 在线观看亚洲专区| 中文字幕欧美国产| 全国精品久久少妇| 91久久国产最好的精华液| 亚洲精品在线免费观看视频| 亚洲国产日日夜夜| 成人av网在线| 久久日韩粉嫩一区二区三区| 三级欧美韩日大片在线看| 成人性色生活片| 欧美zozo另类异族| 天堂va蜜桃一区二区三区漫画版| 成人app在线观看| 久久午夜国产精品| 日本特黄久久久高潮| 91成人免费在线视频| 国产精品人人做人人爽人人添| 午夜欧美电影在线观看| 一本大道av伊人久久综合| 国产欧美日韩一区二区三区在线观看| 亚洲人成人一区二区在线观看 | 国产伦精品一区二区三区免费| 欧美久久久久中文字幕| 亚洲另类中文字| 91成人国产精品| 欧美激情综合网| 国产精品 欧美精品| 欧美精品一区二区蜜臀亚洲| 免费观看在线色综合| 制服丝袜激情欧洲亚洲| 亚洲影视资源网| 在线观看网站黄不卡| 亚洲精品五月天| 97精品国产露脸对白| 中文字幕av资源一区| 成人激情动漫在线观看| 久久久99久久| 国产激情一区二区三区四区| 久久久99精品久久| 国产福利一区二区三区视频在线| 精品国产一区二区三区久久久蜜月| 视频一区二区不卡| 日韩一区二区电影网| 美女精品自拍一二三四| 欧美一二三区在线| 国内精品视频一区二区三区八戒| 日韩欧美电影一区| 国产一区二区调教| 欧美激情综合在线| www.爱久久.com| 亚洲国产成人在线| 国产91在线观看| 久久女同性恋中文字幕| 精品一区二区国语对白| 欧美岛国在线观看| 激情欧美一区二区| 一区二区三区久久久| 欧美一区二区视频在线观看2020| 日韩中文字幕区一区有砖一区| 欧美一级日韩不卡播放免费| 九九九精品视频| 国产精品乱人伦| 91麻豆蜜桃一区二区三区| 亚洲成人免费观看| 日韩欧美国产一区在线观看| 极品少妇一区二区| 国产精品区一区二区三| 91久久精品网| 日本欧美在线看| 国产日产欧产精品推荐色 | 日韩理论在线观看| 欧美丝袜自拍制服另类| 日本午夜精品一区二区三区电影| 26uuu精品一区二区 | 欧美午夜一区二区三区 | www..com久久爱| 亚洲超碰精品一区二区| 日韩精品中午字幕| 成人激情免费电影网址| 亚洲国产精品综合小说图片区| 欧美一级片在线| 成人在线视频一区| 午夜伊人狠狠久久| 国产欧美日韩综合| 欧美视频一区二区三区在线观看 | 91在线视频在线| 美女视频一区在线观看| 国产精品乱码一区二三区小蝌蚪| 欧美日韩久久久一区| 久久精品国产精品青草| ㊣最新国产の精品bt伙计久久| 欧美日韩国产综合草草| 国产伦精品一区二区三区免费迷| 一区二区三区免费| 久久网站最新地址| 欧美日韩你懂的| 国产成人综合自拍| 偷拍一区二区三区| 亚洲欧美自拍偷拍色图| 91精品国产美女浴室洗澡无遮挡| 成人国产精品免费观看| 亚洲成va人在线观看| 欧美国产乱子伦| 日韩欧美一区二区视频| 91捆绑美女网站| 国产精品一区二区在线观看网站| 亚洲一区二区三区四区在线免费观看| 精品少妇一区二区三区免费观看| 91网上在线视频| 国产精品一区久久久久| 日韩电影一二三区| 亚洲激情在线激情| 欧美国产欧美综合| 精品国免费一区二区三区| 欧美色倩网站大全免费| 97se亚洲国产综合自在线| 国产一区二区导航在线播放| 日韩国产欧美在线观看| 一区二区三区蜜桃网| 国产精品国产三级国产aⅴ入口 |