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

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

?? shadow.cpp

?? 一本外國人寫的關(guān)于3D游戲編程的書的源碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:

                 } break;

            case DIR_2_LEFT:     // parry left
                 {
                 // compute translation factors using look up tables

                 dx = left_x[you.direction];
                 dy = left_y[you.direction];

                 } break;

            } // end switch direction of motion

      // based on the translation factors move the player

      you.x+=dx;
      you.y+=dy;

      // test for collision with a wall

      if (universe_geometry[you.y][you.x]==WALL_ID)
         {
         // let' user know he hit a wall
         printf("\nOuch! that hurt. Can't you see this wall %s?\n",you.name);

         // back player up

         you.x-=dx;
         you.y-=dy;

         } // end collision detection
      else
         {
         printf("\nYou take a few steps.\n");

         } // end else ok

      return(1);

      } // end if direction is valid
   else
      {
      printf("\n%\"%s\" is an invalid sentence.",global_input);
      printf("\nI don't understand the direction you wish me to move in?");
      return(0);

      } // end else invalid direction

} // end Verb_MOVE

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

int Verb_TURN(void)
{
// this function will figure out which way the player wants to turn,
// then turn the player and test for syntax errors

int token_index;

// if the player look in general then give him the full view, otherwise
// look for walls and objects

token_index=0;

// first test for a direction

if (num_tokens==1)
   {
   // no direction, so tell user to give one next time

   printf("\n%s, I don't know which way to turn?\n",you.name);
   return(0);

   } // end if only turn
else
   {
   // check if the next word is a direction and if so turn in that
   // direction

   // first test if the words 'to' or 'to the' are inserted bewteen action
   // verb and noun (object)

   token_index=1;

   if (Check_For_Phrase(PHRASE_TO_THE,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to directon

      token_index=3;

      } // end if prep and article
   else
   if (Check_For_Phrase(PHRASE_TO,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to directon

      token_index=2;

      } // end if prep

   // at this point the token_index is pointing to the direction

   if (sentence[token_index] >= DIR_1_START &&
       sentence[token_index] <= DIR_1_END)
      {
      // at this point we finally know what the user is asking for, so
      // let's do it

      // update the players direction based on new direction

      you.direction = sentence[token_index]-DIR_1_START;

      printf("\nYou turn...");

      return(1);

      } // end if direction is valid
   else
      {
      printf("\n%\"%s\" is an invalid sentence.",global_input);
      printf("\nI don't understand the direction you wish me to turn to?");
      return(0);
      } // end else invalid direction

   } // end else

} // end Verb_TURN

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

int Verb_SMELL(void)
{
// this function will just smell without paying attention to the rest
// of the sentence

if (num_tokens==1)
   {

   Print_Info_Strings(smells,universe_geometry[you.y][you.x]);
   return(1);
   } // end if smell
else
   {

   printf("\n%\"%s\" is an invalid sentence.",global_input);
   printf("\nI don't understand what you want me to smell?");
   return(0);
   } // end else invalid

} // end Verb_SMELL

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

int Verb_LOOK(void)
{
// this function will look in the direction commanded to

int token_index,   // current word being processed
    direction,     // direction player wants to look
    num_items,     // number of objects seen during vision scan
    index;         // used as look index

object objects[8]; // holds the objects

// if the player look in general then give him the full view, otherwise
// look for walls and objects

token_index=0;

// first test for a direction

if (num_tokens==1)
   {
   // no direction, so give long version

   Print_Info_Strings(views,universe_geometry[you.y][you.x]);
   return(1);
   } // end if only look
else
   {
   // check if the next word is a direction and if so look in that
   // direction

   // first test if the words 'to' or 'to the' are inserted bewteen action
   // verb and noun (object)

   token_index=1;

   if (Check_For_Phrase(PHRASE_TO_THE,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to directon

      token_index=3;

      } // end if prep and article
   else
   if (Check_For_Phrase(PHRASE_TO,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to directon

      token_index=2;

      } // end if prep

   // at this point the token_index is pointing to the direction

   if (sentence[token_index] >= DIR_1_START &&
       sentence[token_index] <= DIR_1_END)
      {
      // at this point we finally know what the user is asking for, so
      // let's do it

      printf("\nYou see walls");

      // compute direction

      direction = sentence[token_index] - DIR_1_START;

      // test if there are any objects in sight

      if (Vision_System(24,direction,objects,&num_items))
         {

         // print out what was seen

         printf(" and,");

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

             // print out the correct description

             switch(objects[index].thing)
                   {

                   case LAMP_ID:
                        {
                        printf("\na torch lamp.");
                        } break;

                   case KEYS_ID:
                        {
                        printf("\na set of car keys.");
                        } break;

                   case SANDWICH_ID:
                        {
                        printf("\na turkey sandwich.");
                        } break;

                   default:break;

                   } // end switch

             } // end for index

         } // end if we saw something

      return(1);

      } // end if direction is valid
   else
      {
      printf("\n%\"%s\" is an invalid sentence.",global_input);
      printf("\nI don't understand the direction you wish me to look in?");
      return(0);
      } // end else invalid direction

   } // end else

} // end Verb_LOOK

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

int Verb_LISTEN(void)
{
// this function will just listen without paying attention to the rest of
// the sentence


if (num_tokens==1)
   {

   Print_Info_Strings(sounds,universe_geometry[you.y][you.x]);
   return(1);
   } // end if sound
else
   {

   printf("\n%\"%s\" is an invalid sentence.",global_input);
   printf("\nI don't understand what you want me to listen to?");
   return(0);
   } // end else invalid

} // end Verb_LISTEN

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

int Verb_PUT(void)
{
// this function will put down the object requested

// this look up table is used to convert object token numbers into object id's

static char object_to_id[]={'l','s','k'};

int token_index, // current toek nbeing precessed
          index; // loop index

char object;     // object we are currently looking at

token_index=0;

// first test for a object

if (num_tokens==1)
   {
   // no object, so tell user to give one next time

   printf("\n%s, I don't know what you want me to put down?\n",you.name);
   return(0);

   } // end if only put
else
   {
   // check if the next word is an object, if so put is down
   // direction

   // first test if the words 'down' or 'down the' are inserted bewteen action
   // verb and noun (object)

   token_index=1;

   if (Check_For_Phrase(PHRASE_DOWN_THE,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to object

      token_index=3;

      } // end if prep and article
   else
   if (Check_For_Phrase(PHRASE_DOWN,token_index))
      {
      // consume preposition since it has to bearing on the final
      // meaning sentence

      // index token scan to object

      token_index=2;

      } // end if prep

   // at this point the token_index is pointing to the object

   if (sentence[token_index] >= OBJECT_START &&
       sentence[token_index] <= OBJECT_END)
      {
      // at this point we finally know what the user is asking for, so
      // let's do it

      // check to see if object is in inventory..if so then put it down
      // in the current square

      // first convert object token to object id

      object = object_to_id[sentence[token_index]-OBJECT_START];

      // do scan in pockets

      for (index=0; index<you.num_objects; index++)
          {
          // test if this pocket has the object we are looking for

          if (you.inventory[index]==object)
             {
             // take object out of pocket

             you.inventory[index] = EMPTY_ID;

             // decrement number of objects

             you.num_objects--;

             // place the object back into object universe

             universe_objects[you.y][you.x] = object;

             // say something

             printf("\nPutting down the ");

             switch(object)
                   {
                   case LAMP_ID:
                        {printf("torch lamp.\n");}break;

                   case SANDWICH_ID:
                        {printf("sandwich.\n");}break;

                   case KEYS_ID:
                        {printf("keys.\n");}break;

                   default:break;

                   } // end switch

             // **************************************************************
             // if the player puts the keys in the kitchen where they should be
             // then he will win! Test that condition here

             if (object==KEYS_ID && universe_geometry[you.y][you.x]=='k')
                {

                printf("\nCongratulation %s! You have solved the game.\n",you.name);

                } // end if win

             // **************************************************************

             return(1);

             } // end if found object

          } // end for index

      // if we get this far then the player wasn't carrying the requested
      // object to be dropped

      printf("\n%s, you don't have that to drop!\n",you.name);

      return(1);

      } // end if object is valid
   else
      {
      printf("\n%\"%s\" is an invalid sentence.",global_input);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精选一区二区| 国产一区二区电影| 国产精品久久99| 日韩免费性生活视频播放| 欧美色图天堂网| 国产成人av电影在线| 精品一区二区日韩| 日本亚洲欧美天堂免费| 一二三四社区欧美黄| 国产精品萝li| 中文字幕在线一区免费| 国产精品国产三级国产专播品爱网| 成人国产精品免费网站| 国产一区二区三区最好精华液| 日韩av不卡在线观看| 午夜精品久久久久影视| 亚洲成a人v欧美综合天堂下载 | 欧美久久久久中文字幕| 99久久综合99久久综合网站| 国产一区二区成人久久免费影院 | 秋霞电影一区二区| 亚洲影院免费观看| 亚洲国产视频一区| 亚洲欧洲日韩综合一区二区| 国产精品久久影院| 18成人在线观看| 亚洲免费大片在线观看| 一区二区在线免费| 国产网站一区二区| 国产精品久久久久影院亚瑟| 成人免费一区二区三区视频 | 99久久99久久精品国产片果冻| 亚洲va中文字幕| 奇米色一区二区| 国产另类ts人妖一区二区| 日本免费在线视频不卡一不卡二| 男男gaygay亚洲| 国产一区91精品张津瑜| 成人激情免费网站| 色婷婷综合久久久中文一区二区| 欧美日韩一区二区三区在线| 在线不卡中文字幕| 2024国产精品视频| 自拍偷拍欧美激情| 亚洲一区精品在线| 亚洲一区二区三区爽爽爽爽爽| 午夜精品成人在线| 国产精品自拍一区| 日本韩国欧美在线| 欧美刺激午夜性久久久久久久| 日韩精品资源二区在线| 国产精品色婷婷久久58| 午夜亚洲福利老司机| 国产成人午夜电影网| 91国在线观看| 久久久亚洲欧洲日产国码αv| 日韩毛片高清在线播放| 免费成人在线影院| 91女神在线视频| 538在线一区二区精品国产| 国产午夜精品在线观看| 亚洲一区二区在线观看视频| 国产麻豆一精品一av一免费| 欧美日韩在线亚洲一区蜜芽| 91精品国产91综合久久蜜臀| 中文字幕一区二区三区在线观看| 青青国产91久久久久久| 91视频在线看| 制服丝袜亚洲精品中文字幕| 国产喂奶挤奶一区二区三区| 视频一区二区中文字幕| 99久久精品免费| 欧美刺激午夜性久久久久久久| 国产精品福利一区二区| 美女视频一区二区三区| 欧美性淫爽ww久久久久无| 国产清纯在线一区二区www| 日韩avvvv在线播放| av午夜一区麻豆| 久久综合色鬼综合色| 日韩不卡在线观看日韩不卡视频| av网站一区二区三区| 精品久久久久久亚洲综合网| 婷婷成人激情在线网| 91福利精品第一导航| 亚洲精品免费播放| 99vv1com这只有精品| 1区2区3区国产精品| 成人爽a毛片一区二区免费| 精品处破学生在线二十三| 免费观看日韩av| 日韩一区二区免费在线电影| 国产精品一级片| 久久99久久99小草精品免视看| 欧美三级电影在线观看| 一区二区成人在线| 色就色 综合激情| 亚洲男人的天堂网| 欧美视频在线观看一区二区| 日韩精品一区二区三区四区视频 | 欧美日韩一卡二卡三卡| 91一区二区三区在线观看| 国产精品综合在线视频| 久久66热偷产精品| 久久国产人妖系列| 美女一区二区在线观看| 免费的国产精品| 另类综合日韩欧美亚洲| 美女免费视频一区二区| 日本女人一区二区三区| 日本欧美一区二区三区乱码| 天天综合日日夜夜精品| 天堂av在线一区| 日韩电影免费一区| 免费精品视频最新在线| 麻豆成人久久精品二区三区红| 美女视频黄频大全不卡视频在线播放| 午夜精品久久久久久久久久久 | 欧美电影在哪看比较好| 91精品婷婷国产综合久久| 欧美精品乱人伦久久久久久| 欧美久久一区二区| 日韩你懂的电影在线观看| 欧美一级国产精品| 久久嫩草精品久久久精品| 国产视频在线观看一区二区三区| 久久久国产精品午夜一区ai换脸| 国产欧美精品在线观看| 国产精品毛片a∨一区二区三区| 综合欧美一区二区三区| 亚洲成人精品在线观看| 久久av中文字幕片| 国产成人综合网站| 99热国产精品| 制服.丝袜.亚洲.另类.中文| 欧美成人一区二区| 亚洲国产成人一区二区三区| 亚洲欧美日本在线| 日韩不卡一区二区三区 | 日日欢夜夜爽一区| 国产老肥熟一区二区三区| 91片在线免费观看| 欧美一激情一区二区三区| 国产亚洲短视频| 悠悠色在线精品| 狠狠色丁香久久婷婷综合丁香| 国产成人99久久亚洲综合精品| 91福利区一区二区三区| 欧美不卡一区二区三区四区| 国产精品美女久久久久久| 亚洲成人免费看| 成人一区二区三区| 69久久夜色精品国产69蝌蚪网| 日本一区二区不卡视频| 免费人成在线不卡| 天天色综合成人网| 精品一区二区久久| 91在线精品一区二区三区| 欧美日韩国产三级| 国产精品视频在线看| 免费观看日韩电影| 色综合天天综合网国产成人综合天 | 中文字幕中文乱码欧美一区二区 | 国产精品初高中害羞小美女文| 日产国产欧美视频一区精品 | 国产精品白丝jk白祙喷水网站 | 精品av综合导航| 亚洲电影激情视频网站| jvid福利写真一区二区三区| 日韩一区二区三| 一区二区三区四区亚洲| 天天av天天翘天天综合网| 成人教育av在线| 精品国产一区二区三区久久久蜜月 | 国产日本欧美一区二区| 久久国产三级精品| 欧美日产在线观看| 亚洲精品网站在线观看| 成人一区二区三区中文字幕| 日韩精品一区二区三区视频播放| 亚洲天堂免费看| 国产成人免费在线视频| 在线成人av网站| 亚洲va韩国va欧美va| 91福利视频久久久久| 成人免费一区二区三区视频| 国产不卡在线视频| 国产日韩欧美综合在线| 国产乱对白刺激视频不卡| 欧美zozozo| 九九久久精品视频| 日韩欧美国产1| 麻豆国产欧美一区二区三区| 日韩一区二区三| 蜜桃视频一区二区| 日韩视频一区二区三区在线播放 | 亚洲午夜电影网| 欧洲激情一区二区| 亚洲国产精品影院| 欧美图区在线视频|