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

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

?? deb1d2~1.cpp

?? 游戲的聲音圖像演示程序
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
Load_Bitmap_File(&bitmap16bit, "BOTS24.BMP");

// create bat bob
Create_BOB(&bot,320,200,116,60,16,BOB_ATTR_MULTI_ANIM | BOB_ATTR_VISIBLE, DDSCAPS_SYSTEMMEMORY,0,16);
Set_Anim_Speed_BOB(&bot, 2);

// load the bot in 
for (index=0; index < 16; index++)
    Load_Frame_BOB16(&bot, &bitmap16bit, index, index%2, index/2, BITMAP_EXTRACT_MODE_CELL);

// unload bot
Unload_Bitmap_File(&bitmap16bit);

// create animations for bot
for (index=0; index<8; index++)
    {
    // generate the animation on the fly
    bot_anim[0] = index*2;
    bot_anim[1] = bot_anim[0]+1;

    // load the generated animation
    Load_Animation_BOB(&bot, index, 2, bot_anim);
    } // end for index

// set the animation to right direction
Set_Animation_BOB(&bot,0);

// initialize directinput
DInput_Init();

// acquire the keyboard only
DInput_Init_Keyboard();

// initilize DirectSound
DSound_Init();

// load background sounds
engines_id = DSound_Load_WAV("ENGINES.WAV");

// start the sounds
DSound_Play(engines_id, DSBPLAY_LOOPING);

// hide the mouse
if (!WINDOWED_APP)
   ShowCursor(FALSE);

// seed random number generate
srand(Start_Clock());

// return success
return(1);

} // end Game_Init

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

int Game_Shutdown(void *parms)
{
// this function is where you shutdown your game and
// release all resources that you allocated

// shut everything down

// kill all the bobs
Destroy_BOB(&bot);

// shutdown directdraw last
DDraw_Shutdown();

// now directsound
DSound_Stop_All_Sounds();
DSound_Shutdown();

// shut down directinput
DInput_Shutdown();

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

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

void Bot_AI(void)
{
// this function controls the ai of the bot and the pattern
// processing

static int opcode,  // current pattern opcode
           operand; // current operand 

// test if it's time to process a new instruction
if (curr_pattern==NULL)
   {
   // select a random pattern in pattern bank
   bot_pattern_index = rand()%NUM_PATTERNS;
   curr_pattern = patterns[bot_pattern_index];
   
   // now reset instuction pointer
   bot_ip = 0;

   // reset counter
   bot_counter = 0;
 
   } // end if

// process next instruction if it's time
if (--bot_counter <= 0)
    {
    // get next instruction
    opcode  = curr_pattern[bot_ip++];
    operand = curr_pattern[bot_ip++];

    // test what the opcode is
    switch(opcode)
        {
        case OPC_E:
            {
            // set direction to east
            Set_Vel_BOB(&bot,6,0);
  
            // set animation to east
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;

        case OPC_NE:
            {
            // set direction to northeast
            Set_Vel_BOB(&bot,6,-6);
  
            // set animation to northeast
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;

        case OPC_N: 
            {
            // set direction to north
            Set_Vel_BOB(&bot,0,-6);
  
            // set animation to north
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;            

        case OPC_NW:
            {
            // set direction to northwest
            Set_Vel_BOB(&bot,-6,-6);
  
            // set animation to northwest
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;            

        case OPC_W: 
            {
            // set direction to west
            Set_Vel_BOB(&bot,-6,0);
  
            // set animation to west
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;
			 
            } break;            

        case OPC_SW:
            {
            // set direction to southwest
            Set_Vel_BOB(&bot,-6,6);
  
            // set animation to southwest
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;            

        case OPC_S: 
            {
            // set direction to south
            Set_Vel_BOB(&bot,0,6);
  
            // set animation to south
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;            

        case OPC_SE:
            {
            // set direction to southeast
            Set_Vel_BOB(&bot,6,6);
  
            // set animation to southeast
            Set_Animation_BOB(&bot,opcode);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;            

        case OPC_STOP: 
            {
            // stop motion
            Set_Vel_BOB(&bot,0,0);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;

        case OPC_RAND:
            {
            // set direction randomly
            Set_Vel_BOB(&bot,-4+rand()%9,-4+rand()%9);
  
            // set animation to south
            Set_Animation_BOB(&bot,OPC_S);
            
            // set counter to instuction operand
            bot_counter = operand;

            } break;

        case OPC_END: 
            {
            // stop motion
            Set_Vel_BOB(&bot,0,0);
            
            // select a random pattern in pattern bank
            bot_pattern_index = rand()%NUM_PATTERNS;
            curr_pattern = patterns[bot_pattern_index];
   
            // now reset instuction pointer
            bot_ip = 0;

            // reset counter
            bot_counter = 0;

            } break;
        
        default: break;

        } // end switch

    } // end if


// draw stats
sprintf(buffer,"Pattern #%d",bot_pattern_index);
Draw_Text_GDI(buffer,10, 400,RGB(0,255,0), lpddsback);

sprintf(buffer,"Opcode=%s Operand=%d",opcode_names[opcode],operand);
Draw_Text_GDI(buffer,10, 416,RGB(0,255,0), lpddsback);

sprintf(buffer,"Instruction Ptr=%d ", bot_ip);
Draw_Text_GDI(buffer,10, 432,RGB(0,255,0), lpddsback);

sprintf(buffer,"Counter=%d ", bot_counter);
Draw_Text_GDI(buffer,10, 448,RGB(0,255,0), lpddsback);

} // end Bot_AI

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

int Game_Main(void *parms)
{
// this is the workhorse of your game it will be called
// continuously in real-time this is like main() in C
// all the calls for you game go here!

int index; // looping var

// start the timing clock
Start_Clock();

// clear the drawing surface
DDraw_Fill_Surface(lpddsback, 0);

// lock back buffer and copy background into it
DDraw_Lock_Back_Surface();

// draw background
Draw_Bitmap16(&background_bmp, back_buffer, back_lpitch,0);

// unlock back surface
DDraw_Unlock_Back_Surface();

// read keyboard
DInput_Read_Keyboard();

// do the ai on bot
Bot_AI();

// the animate the bot
Animate_BOB(&bot);

// move bot
Move_BOB(&bot);

// test if bot is off screen, if so wrap around
if (bot.x >= SCREEN_WIDTH)
   bot.x = -bot.width;
else
if (bot.x < -bot.width)
   bot.x = SCREEN_WIDTH;

if (bot.y >= SCREEN_HEIGHT)
   bot.y = -bot.height;
else
if (bot.y < -bot.height)
   bot.y = SCREEN_HEIGHT;

// draw the bot
Draw_BOB16(&bot, lpddsback);

// draw title
Draw_Text_GDI("(16-Bit Version) I-ROBOT 3D - Pattern Demo",10, 10,RGB(0,255,255), lpddsback);

// flip the surfaces
DDraw_Flip();

// sync to 30ish fps
Wait_Clock(30);

// check of user is trying to exit
if (KEY_DOWN(VK_ESCAPE) || keyboard_state[DIK_ESCAPE])
    {
    PostMessage(main_window_handle, WM_DESTROY,0,0);

    // stop all sounds
    DSound_Stop_All_Sounds();

    } // end if

// return success
return(1);

} // end Game_Main

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久九九国产精品| www.爱久久.com| 宅男在线国产精品| 蜜臀99久久精品久久久久久软件| 欧美电影一区二区三区| 麻豆一区二区99久久久久| 欧美xxxx老人做受| 懂色av噜噜一区二区三区av| 亚洲欧美一区二区三区孕妇| 欧美综合在线视频| 久久99精品视频| 国产精品卡一卡二| 欧美女孩性生活视频| 国产自产视频一区二区三区| 国产精品久久久久久久久图文区 | 亚洲国产一二三| 欧美一区二区在线观看| 国产aⅴ综合色| 亚洲综合成人在线视频| 日韩欧美国产成人一区二区| 国产一区二区伦理| 亚洲国产精品天堂| 久久久久成人黄色影片| 在线视频国内自拍亚洲视频| 国产一区三区三区| 一区二区三区美女视频| wwww国产精品欧美| 91国产视频在线观看| 黄网站免费久久| 亚洲在线一区二区三区| 亚洲精品一区在线观看| 91福利在线导航| 国产激情一区二区三区四区| 亚洲一区中文日韩| 国产午夜精品一区二区三区嫩草| 欧美视频完全免费看| 国产精品综合在线视频| 天天综合色天天综合色h| 国产精品久久久久四虎| 精品日韩av一区二区| 欧美三级中文字幕在线观看| 国产精品一二三| 奇米影视一区二区三区| 亚洲精选免费视频| 国产午夜一区二区三区| 91精品国产色综合久久不卡蜜臀| 99久久精品国产网站| 国内成人免费视频| 日韩中文字幕av电影| 国产精品久久久爽爽爽麻豆色哟哟| 91精品在线观看入口| 在线一区二区三区四区| 粉嫩嫩av羞羞动漫久久久| 九九视频精品免费| 蜜桃一区二区三区在线观看| 亚洲精品综合在线| 国产精品欧美一区二区三区| 久久伊99综合婷婷久久伊| 91精品免费在线观看| 欧美色爱综合网| 欧美性生活一区| 91福利在线看| 欧美性生活大片视频| 91久久精品国产91性色tv| av在线播放不卡| 99久久国产综合精品女不卡| 国产剧情av麻豆香蕉精品| 黄页网站大全一区二区| 黄页视频在线91| 国产精品亚洲专一区二区三区| 麻豆一区二区在线| 老司机免费视频一区二区三区| 日本欧美一区二区| 日韩在线a电影| 视频精品一区二区| 午夜精品视频在线观看| 一区二区三区在线观看国产| 亚洲精品五月天| 一区二区三区国产| 亚洲bt欧美bt精品| 日av在线不卡| 久草中文综合在线| 韩国理伦片一区二区三区在线播放| 久久成人羞羞网站| 国产91精品入口| 成人午夜私人影院| 91色porny蝌蚪| 欧美午夜精品久久久久久超碰| 欧美日韩一区二区在线观看视频| 欧美午夜精品免费| 日韩一级高清毛片| 久久无码av三级| 最新中文字幕一区二区三区| 亚洲精品老司机| 亚洲国产精品久久久久婷婷884| 婷婷成人激情在线网| 精品一区精品二区高清| 国产99久久久国产精品| 91一区二区三区在线观看| 91福利精品视频| 欧美电影免费观看完整版| 欧美一区二区三区免费视频| 久久午夜电影网| 亚洲男同性恋视频| 蜜桃av一区二区三区| 国产很黄免费观看久久| 色香色香欲天天天影视综合网| 色欧美片视频在线观看在线视频| 在线播放日韩导航| 久久亚洲精华国产精华液| 国产精品久久福利| 视频一区中文字幕| 国产91综合一区在线观看| 欧美亚洲自拍偷拍| 精品国产区一区| 一二三区精品福利视频| 久久99久久久久| www.av亚洲| 欧美成人伊人久久综合网| 自拍偷自拍亚洲精品播放| 美国av一区二区| 色老汉一区二区三区| 欧美videofree性高清杂交| 亚洲色图欧洲色图| 精品亚洲国内自在自线福利| 色婷婷久久久久swag精品| 精品久久久久久久久久久院品网| 亚洲视频狠狠干| 国产一区二区三区黄视频 | 91精品国产免费| 国产精品国产三级国产aⅴ原创 | 26uuu色噜噜精品一区| 樱花影视一区二区| 国产aⅴ综合色| 91精品国产91久久久久久一区二区 | 一区二区三区在线观看视频 | 国产精品天干天干在线综合| 天堂影院一区二区| 99久久综合精品| 久久久精品免费观看| 美女视频黄 久久| 欧美猛男gaygay网站| 中文字幕日韩一区| 国产成人午夜精品影院观看视频 | 一区二区三区欧美日| 国产成人精品影视| 欧美sm极限捆绑bd| 奇米一区二区三区| 欧美精品在线一区二区三区| 亚洲视频在线一区| 99久久99久久精品免费观看| 国产精品色哟哟网站| 国产精品一区免费视频| 亚洲精品一区二区三区99| 精品一区二区在线视频| 日韩欧美在线影院| 久久99蜜桃精品| 欧美精品一区二区三区四区 | 成人av先锋影音| 国产婷婷色一区二区三区四区| 久久精品99国产精品| 日韩一区二区在线观看视频 | 激情欧美一区二区三区在线观看| 欧美精品在线观看一区二区| 午夜电影一区二区| 欧美日本乱大交xxxxx| 天天av天天翘天天综合网 | 久久精品亚洲国产奇米99 | 懂色av一区二区夜夜嗨| 国产日韩影视精品| 成人av网站在线观看| 国产精品美女www爽爽爽| a美女胸又www黄视频久久| 1000部国产精品成人观看| 成+人+亚洲+综合天堂| 亚洲欧洲色图综合| 欧美性生活久久| 蜜乳av一区二区| 久久久不卡网国产精品二区| 国产精品一区二区三区四区| 欧美国产日韩精品免费观看| 99精品国产热久久91蜜凸| 亚洲精品久久久蜜桃| 在线亚洲精品福利网址导航| 视频一区视频二区中文| 久久综合久久综合久久综合| 成人午夜又粗又硬又大| 一区2区3区在线看| 欧美不卡一区二区| 成人高清在线视频| 亚洲一区在线观看视频| 欧美一区二区在线免费观看| 国产盗摄一区二区| 亚洲精品国产精华液| 日韩亚洲欧美综合| 成人三级伦理片| 亚洲bdsm女犯bdsm网站| 久久噜噜亚洲综合| 欧美性极品少妇| 国产激情一区二区三区|