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

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

?? shadow.cpp

?? 一本外國人寫的關(guān)于3D游戲編程的書的源碼
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
// SHADOW.CPP
// Compile as a CONSOLE application or straight DOS16/32 application
// make sure to enable the ANSI.SYS color driver by adding the line:
//  DEVICE=C:\WINDOWS\COMMAND\ANSI.SYS
// to your config.sys file

// I N C L U D E S ///////////////////////////////////////////////////////////

#include <io.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <fcntl.h>
#include <memory.h>
#include <malloc.h>
#include <math.h>
#include <string.h>
#include <ctype.h>

// D E F I N E S /////////////////////////////////////////////////////////////

// size of universe in blocks

#define NUM_ROWS               32
#define NUM_COLUMNS            32

// id's for objects and geometry in universe

#define EMPTY_ID               ' '
#define WALL_ID                '*'

#define LAMP_ID                'l'
#define SANDWICH_ID            's'
#define KEYS_ID                'k'

// general directions

#define EAST                   0
#define WEST                   1
#define NORTH                  2
#define SOUTH                  3

// language details

#define MAX_TOKENS             64
#define NUM_TOKENS             28

#define FIRST_WORD             0
#define SECOND_WORD            1
#define THIRD_WORD             2
#define FOURTH_WORD            3
#define FIFTH_WORD             4

#define OBJECT_START           50

#define OBJECT_LAMP            50
#define OBJECT_SANDWICH        51
#define OBJECT_KEYS            52

#define OBJECT_END             52

// directions (adjectives)

#define DIR_1_START            100

#define DIR_1_EAST             100
#define DIR_1_WEST             101
#define DIR_1_NORTH            102
#define DIR_1_SOUTH            103

#define DIR_1_END              103



#define DIR_2_START            150

#define DIR_2_FORWARD          150
#define DIR_2_BACKWARD         151
#define DIR_2_RIGHT            152
#define DIR_2_LEFT             153

#define DIR_2_END              153


// define actions (verbs)

#define ACTION_START           200

#define ACTION_MOVE            200
#define ACTION_TURN            201
#define ACTION_SMELL           202
#define ACTION_LOOK            203
#define ACTION_LISTEN          204
#define ACTION_PUT             205
#define ACTION_GET             206
#define ACTION_EAT             207
#define ACTION_INVENTORY       208
#define ACTION_WHERE           209
#define ACTION_EXIT            210

#define ACTION_END             210

// articles

#define ART_START              300

#define ART_THE                300

#define ART_END                300

// prepositions

#define PREP_START             325

#define PREP_IN                325
#define PREP_ON                326
#define PREP_TO                327
#define PREP_DOWN              328

#define PREP_END               328

// the phrases that add meaning to us, but not to the computer

#define PHRASE_TO              0
#define PHRASE_THE             1
#define PHRASE_TO_THE          2
#define PHRASE_DOWN            3
#define PHRASE_DOWN_THE        4

// S T R U C T U R E S ///////////////////////////////////////////////////////

// this is the structure for a single token

typedef struct token_typ
        {

        char symbol[16];   // the string that represents the token
        int value;         // the integer value of the token

        } token, *token_ptr;

// this is the structure used to hold a single string that is used to
// describe something in the game like a smell, sight, sound...

typedef struct info_string_typ
        {
        char type;        // the type of info string i.e. what does it describe
        char string[100]; // the actual description string

        } info_string, *info_string_ptr;

// this structure holds everything pertaining to the player

typedef struct player_typ
        {
        char name[16];   // name of player
        int x,y;         // postion of player
        int direction;   // direction of player, east,west north,south

        char inventory[8]; // objects player is holding (like pockets)
        int num_objects;   // number of objects player is holding

        } player, *player_ptr;

// this structure holds an object

typedef struct object_typ
        {
        char thing;     // the actual object
        int x,y;        // position of object in universe

        } object, *object_ptr;

// P R O T O T Y P E S //////////////////////////////////////////////////////

void Introduction();

int Vision_System(int depth,
                  int direction,
                  object *stuff,
                  int *num_objects);

int Check_For_Phrase(int phrase,int index);

void Print_Info_Strings(info_string strings[],char where);

char *Get_Line(char *buffer);

int Get_Token(char *input,char *output,int *current_pos);

int Extract_Tokens(char *string);

void Verb_Parser(void);

int Verb_MOVE(void);

int Verb_TURN(void);

int Verb_SMELL(void);

int Verb_LOOK(void);

int Verb_LISTEN(void);

int Verb_PUT(void);

int Verb_GET(void);

int Verb_EAT(void);

int Verb_INVENTORY(void);

int Verb_EXIT(void);

int Verb_WHERE(void);

// G L O B A L S //////////////////////////////////////////////////////////////

// this is the entire "language" of the language.

token language[MAX_TOKENS] = {

 {"LAMP",      OBJECT_LAMP     },
 {"SANDWICH",  OBJECT_SANDWICH },
 {"KEYS",      OBJECT_KEYS     },
 {"EAST",      DIR_1_EAST      },
 {"WEST",      DIR_1_WEST      },
 {"NORTH",     DIR_1_NORTH     },
 {"SOUTH",     DIR_1_SOUTH     },
 {"FORWARD",   DIR_2_FORWARD   },
 {"BACKWARD",  DIR_2_BACKWARD  },
 {"RIGHT",     DIR_2_RIGHT     },
 {"LEFT",      DIR_2_LEFT      },
 {"MOVE",      ACTION_MOVE     },
 {"TURN",      ACTION_TURN     },
 {"SMELL",     ACTION_SMELL    },
 {"LOOK",      ACTION_LOOK     },
 {"LISTEN",    ACTION_LISTEN   },
 {"PUT",       ACTION_PUT      },
 {"GET",       ACTION_GET      },
 {"EAT",       ACTION_EAT      },
 {"INVENTORY", ACTION_INVENTORY},
 {"WHERE",     ACTION_WHERE    },
 {"EXIT",      ACTION_EXIT     },
 {"THE",       ART_THE         },
 {"IN",        PREP_IN         },
 {"ON",        PREP_ON         },
 {"TO",        PREP_TO         },
 {"DOWN",      PREP_DOWN       },

};

// now for the definition of the universe and the objects within it

// this array holds the geometry of the universe

// l - living room
// b - bedroom
// k - kitchen
// w - washroom
// h - hall way
// r - restroom
// e - entry way
// o - office

//           ^
//         NORTH
//
// < WEST           EAST >
//
//         SOUTH
//           v

char *universe_geometry[NUM_ROWS]={"********************************",
                                   "*lllllllll*bbbbbbbbbbbbbbbbbbbb*",
                                   "*llllllllll*bbbbbbbbbbbbbbbbbbb*",
                                   "*lllllllllll*bbbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbbbbbbbbbbbbbbb*",
                                   "*llllllllllll*bbbb*rrr**********",
                                   "*lllllllllllhhhhhh*rrrrrrrrrrrr*",
                                   "*lllllllllllhhhhhh*rrrrrrrrrrrr*",
                                   "*lllllllllhhh******rrrrrrrrrrrr*",
                                   "*********hhhh*rrrrrrrrrrrrrrrrr*",
                                   "*kkkkkkk*hhhh*rrrrrrrrrrrrrrrrr*",
                                   "*kkkkkkk*hhhh*rrrrrrrrrrrrrrrrr*",
                                   "*kkkkkkk*hhhh*rrrrrrrrrrrrrrrrr*",
                                   "*kkkkkkkhhhhh*******************",
                                   "*kkkkkkkhhhhhhhhhhhwwwwwwwwwwww*",
                                   "*kkkkkkkhhhhhhhhhhhwwwwwwwwwwww*",
                                   "*kkkkkkk*hhhhhhhhhhwwwwwwwwwwww*",
                                   "*kkkkkkk*hhhh*ooooo*************",
                                   "*kkkkkkk*hhhh*ooooooooooooooooo*",
                                   "*kkkkkkk*hhhh*ooooooooooooooooo*",
                                   "*kkkkkk*hhhhh*ooooooooooooooooo*",
                                   "*******hhhhhh*ooooooooooooooooo*",
                                   "*eeeeeeeeeeee*ooooooooooooooooo*",
                                   "*eeeeeeeeeeee*ooooooooooooooooo*",
                                   "*eeeeeeeeeeee*ooooooooooooooooo*",
                                   "********************************",};

// this array holds the objects within the universe

// l - lamp
// s - sandwich
// k - keys

//           ^
//         NORTH
//
// < WEST           EAST >
//
//         SOUTH
//           v

char *universe_objects[NUM_ROWS]={"                                ",
                                  " l                            k ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  " l                              ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "  s                             ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "                                ",
                                  "          s                     ",
                                  "                             l  ",
                                  "                                ",
                                  "                                ",};

// these info strings hold the views in each room

info_string views[]={

{'l',"You see an expansive white room with a vaulted ceiling. The walls are adorned "},
{'l',"with medieval art.  To the North, is a plate glass window through which colored"},
{'l',"strands of light pierce. They reflect off the carpeted floor and create a     "},
{'l',"silhouette of the towering pines just outdside. In the Northeast corner of    "},
{'l',"the room, you see a fire place with a half burnt log in it. Finally, against  "},
{'l',"the West wall there's a white leather couch and in each corner of the room    "},
{'l',"are large green palms potted in hexogonal black pots.                         "},

{'b',"You see a black lacquer bedroom set surrounding a king size platform bed."},
{'b',"On the walls, you see pictures of mystical landscapes and underwater cities.   "},
{'b',"To the North there is a window thru which you see a group of large trees just  "},
{'b',"beyond a small pond. On the floor of the room you see black silk stockings     "},
{'b',"and lingerie thrown with abandon about the area.                               "},

{'k',"You are surrounded by stone washed granite counters. On the counters are the"},
{'k',"normal appliances found in a kitchen. To the West there is a large glass    "},
{'k',"door refrigerator with a varitable plethora of food. Against the South wall"},
{'k',"there is a small nook with a white refuge container. Above your head dangle"},
{'k',"down many cooking utensils and exotic pans suspended from a anodized        "},
{'k',"aluminum structure.                                                         "},

{'w',"There is a large vanity mirror and a black porcellin wash basin. To the East"},
{'w',"is a rack of black and white towels hung on brass rails. On the counter     "},
{'w',"surrounding the walls there are small spherically shaped soap balls in a    "},
{'w',"myriad of colors set in cyrstal dishes. The floor is made of black and white"},
{'w',"marble with a hint of grey running thru it.                                 "},

{'h',"You see an ordinary hallway with track lighting above head. "},

{'r',"You see a large wash area with two basins. To the West through a glass  "},
{'r',"enclosure you see the outline of a young woman apperantly bathing... To "},
{'r',"the East you see a second smaller room with many plants hanging from the"},
{'r',"celing along with the shadow of a dark,muscular man moving around. On   "},
{'r',"the floor below you are plush tapestries of Egyption origin.            "},

{'e',"To the West you see a small opening into what appears to be a kitchen.        "},
{'e',"The lights are low and you can't make out much more in this direction.        "},
{'e',"Under your feet is a large black rectangular cut of carpet. Lastly, leading to"},
{'e',"the East and North are hallways to the remainder of the house.                "},

{'o',"You are astounded by the amount of computer equipment in every corner of the "},
{'o',"room. To the South is a Silicon Graphics OYNX Super Computer, the screen of  "},
{'o',"which seems to displaying a mesmorizing array of mathematical equations. To  "},
{'o',"the North you are faced with literally hundreds of books on every topic from "},
{'o',"quantum mechanics to molecular bio-chemistry. Against the East wall there    "},
{'o',"is a full collection of electrical engineering equipment with a oscilloscope "},
{'o',"displaying a curious waveform apparently an input from a black box resting on"},
{'o',"the floor. As you look around the walls of the room, you see schematics of   "},
{'o',"digital hardware and paintings of great scientific pioneers such as Einstein,"},
{'o',"Newton and Maxwell. Strewn about the floor are small electronic              "},
{'o',"components and pieces of paper with scribbles upon them.                     "},
{'X',""},  // terminate

};

// these info strings hold the smells in each room

info_string smells[]={

{'l',"You smell the sweet odor of Jasmine with an undertone of potpourri. "},

{'b',"The sweet smell of perfume dances within your nostrils...Realities possibly. "},

{'k',"You take a deep breath and your senses are tantallized with the smell of"},
{'k',"tender breasts of chicken marinating in a garlic sauce. Also, there is "},
{'k',"a sweet berry smell emanating from the oven.                          "},

{'w',"You are almost overwhelmed by the smell of bathing fragrance as you"},
{'w',"inhale.                                                              "},

{'h',"You smell nothing to make note of. "},

{'r',"Your nose is filled with steam and the smell of baby oil... "},

{'e',"You smell pine possibly from the air coming thru a small orifice near"},
{'e',"the front door.                                                            "},

{'o',"You are greeted with the familiar odor of burning electronics. As you inhale"},
{'o',"a second time, you can almost taste the rustic smell of aging books.        "},
{'X',""}, // terminate

};

// these info strings hold the sounds in each room

info_string sounds[]={

{'l',"You hear the faint sounds of Enigma playing in the background along with"},
{'l',"the wind howling against the exterior of the room.                      "},

{'b',"You hear the wind rubbing against the window making a sound similar to"},
{'b',"sheets being pulled off a bed.                                        "},

{'k',"You hear expansion of the hot ovens along with the relaxing sounds produced"},

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91美女片黄在线观看91美女| 夜夜嗨av一区二区三区四季av | 国产福利一区在线观看| 欧美xxx久久| 国产综合色在线视频区| 国产日韩一级二级三级| 成人不卡免费av| 亚洲精品福利视频网站| 欧美日韩久久一区| 久草精品在线观看| 国产色91在线| 色综合中文字幕国产 | 国产精品久久久久aaaa| jlzzjlzz欧美大全| 一区二区三区 在线观看视频| 欧美亚洲尤物久久| 免费观看在线综合色| 国产日韩欧美精品综合| 色综合夜色一区| 青草av.久久免费一区| 久久精品夜夜夜夜久久| 91视频在线看| 天堂av在线一区| 久久久国产一区二区三区四区小说| 成人午夜免费av| 亚洲福利视频一区| 2021中文字幕一区亚洲| 色综合网站在线| 麻豆精品在线视频| 亚洲乱码国产乱码精品精的特点| 欧美日韩第一区日日骚| 懂色av中文字幕一区二区三区| 亚洲激情欧美激情| 精品国产免费久久| 在线看国产一区二区| 久久精品国产亚洲aⅴ| 18欧美乱大交hd1984| 欧美一卡在线观看| 91麻豆精品在线观看| 久草中文综合在线| 夜夜精品浪潮av一区二区三区| 精品对白一区国产伦| 欧美图区在线视频| 国产经典欧美精品| 午夜视频一区二区三区| 中文字幕一区二区三区视频| 欧美一级高清大全免费观看| 91麻豆swag| 国产精品一区专区| 麻豆精品国产91久久久久久| 亚洲欧美日韩国产手机在线| xfplay精品久久| 777亚洲妇女| 色综合网站在线| 成人黄色在线视频| 蓝色福利精品导航| 午夜电影网亚洲视频| 国产精品久久久久久久午夜片| 日韩欧美色综合网站| 欧美视频一区二区三区在线观看| 国产大陆a不卡| 久久国产精品99精品国产 | 欧美一级爆毛片| 欧美日韩亚洲综合一区| 91色porny在线视频| 国产一区二区三区四区在线观看| 午夜成人免费视频| 午夜成人免费电影| 一区二区三区在线视频播放 | 精品久久久久久久久久久久包黑料| 99精品视频一区| www.亚洲精品| av亚洲精华国产精华精华| 国产伦精品一区二区三区免费| 蜜桃91丨九色丨蝌蚪91桃色| 日韩精品欧美成人高清一区二区| 五月婷婷久久综合| 天天做天天摸天天爽国产一区| 亚洲成av人片一区二区| 亚洲电影在线免费观看| 亚洲线精品一区二区三区八戒| 一区二区三区视频在线看| 亚洲人成小说网站色在线 | 五月综合激情婷婷六月色窝| 亚洲二区视频在线| 日韩精品视频网站| 免费看欧美女人艹b| 美国三级日本三级久久99| 久久超碰97中文字幕| 国模少妇一区二区三区| 国产乱理伦片在线观看夜一区| 国产精品性做久久久久久| 成人性生交大片免费看在线播放 | 国产在线视频一区二区三区| 国产在线精品免费| 成人黄色一级视频| 91视频免费看| 欧美色精品在线视频| 日韩视频一区二区三区| 久久午夜电影网| 国产精品久久久久婷婷| 亚洲第一福利一区| 久久精工是国产品牌吗| 丰满放荡岳乱妇91ww| 91猫先生在线| 91精品婷婷国产综合久久| 26uuu精品一区二区在线观看| 国产精品国产三级国产普通话三级| 亚洲美女视频一区| 日本成人在线不卡视频| 久久国产精品第一页| 99久久免费精品高清特色大片| 欧美日韩一级二级三级| 亚洲精品一区二区三区蜜桃下载 | eeuss鲁一区二区三区| 在线国产亚洲欧美| 精品国产sm最大网站| 国产精品第五页| 日韩av电影免费观看高清完整版在线观看| 极品少妇一区二区| 97精品国产露脸对白| 精品久久久三级丝袜| 亚洲女女做受ⅹxx高潮| 精品在线免费视频| 在线观看区一区二| 欧美精品一区二区在线播放| 亚洲综合另类小说| 国产精品自在在线| 欧美精品一卡二卡| 国产精品免费视频一区| 日本欧美一区二区在线观看| 成人av影视在线观看| 欧美一区二区黄色| 亚洲九九爱视频| 国产乱码精品一区二区三| 欧美群妇大交群的观看方式| 国产精品国产自产拍在线| 精久久久久久久久久久| 欧美综合天天夜夜久久| 国产清纯美女被跳蛋高潮一区二区久久w| 午夜私人影院久久久久| 国产剧情一区在线| 91精品国产综合久久福利| 一区二区三区精品视频| 丁香六月综合激情| 精品国精品国产| 午夜激情综合网| 日本黄色一区二区| 国产精品福利电影一区二区三区四区| 免费观看成人av| 欧美日产在线观看| 亚洲精品日日夜夜| 成人av在线网| 中文一区二区在线观看| 黄色资源网久久资源365| 欧美男同性恋视频网站| 亚洲国产成人精品视频| 一本大道av一区二区在线播放| 中文幕一区二区三区久久蜜桃| 激情图片小说一区| 日韩欧美aaaaaa| 日韩高清不卡在线| 欧美久久一二三四区| 亚洲一区二区三区四区五区中文 | 欧美日韩一区二区三区在线看| 亚洲欧美日韩国产一区二区三区| 成人av综合在线| 中文天堂在线一区| 成人毛片老司机大片| 国产精品丝袜久久久久久app| 国产不卡在线一区| 国产日韩欧美一区二区三区乱码| 国产凹凸在线观看一区二区| 国产喷白浆一区二区三区| 丁香六月久久综合狠狠色| 国产精品午夜春色av| 99精品视频一区二区三区| 亚洲美女区一区| 欧美视频一区二区在线观看| 日韩高清不卡一区二区三区| 日韩美女视频在线| 国产一区二区三区四区五区美女| 久久香蕉国产线看观看99| 国产不卡视频在线播放| 国产精品乱码人人做人人爱| 99riav久久精品riav| 亚洲一区在线视频观看| 7777女厕盗摄久久久| 国内精品久久久久影院色| 国产精品久久久久久久第一福利| 91亚洲国产成人精品一区二区三| 一区二区欧美在线观看| 91精品国产乱| 国产a视频精品免费观看| 亚洲激情图片qvod| 日韩女优视频免费观看| 成人av午夜电影| 亚洲va欧美va天堂v国产综合| 精品国产一区二区三区久久久蜜月| 成人午夜免费av|