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

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

?? shadow.cpp

?? 一本外國人寫的關于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"},

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合久久久| 99国产一区二区三精品乱码| 99re在线视频这里只有精品| 久久99精品国产.久久久久| 91麻豆精品国产无毒不卡在线观看 | 精品美女在线播放| 国内精品写真在线观看| 国产精品久久三区| 91九色02白丝porn| 亚洲亚洲人成综合网络| 精品国产百合女同互慰| caoporen国产精品视频| 日韩精品电影在线| 久久久国际精品| 91麻豆高清视频| 极品销魂美女一区二区三区| 国产在线观看一区二区| 亚洲成av人片一区二区| 国产精品三级久久久久三级| 欧美人xxxx| av网站一区二区三区| av一区二区三区在线| 91久久久免费一区二区| 91精品国产综合久久精品图片| 日韩一区二区在线播放| 99v久久综合狠狠综合久久| 91福利国产成人精品照片| 在线播放中文字幕一区| 99久久国产免费看| 欧美日韩精品是欧美日韩精品| 日韩一区二区高清| 国产精品久久久久aaaa| 亚洲小说春色综合另类电影| 国产在线精品不卡| 色综合久久九月婷婷色综合| 黄页视频在线91| 粉嫩av亚洲一区二区图片| 久久精品国产免费| 日本美女一区二区三区视频| 亚洲影视在线观看| 精品亚洲成av人在线观看| 成人综合婷婷国产精品久久| 国产综合成人久久大片91| 99re成人在线| 欧美成人女星排行榜| 国产精品国产三级国产普通话蜜臀 | 亚洲精品国产精华液| 国产日产欧美一区| 国产日韩欧美综合在线| 亚洲一区二区欧美| 岛国一区二区在线观看| 91精品一区二区三区久久久久久| 中文成人av在线| 麻豆精品新av中文字幕| 久久av资源站| 欧美日韩高清一区二区| 国产精品拍天天在线| 精品中文字幕一区二区小辣椒 | 一区二区三区中文字幕在线观看| 亚洲另类在线视频| 国产精品77777| 成人h动漫精品| 97精品电影院| 国产午夜精品理论片a级大结局 | 色婷婷国产精品久久包臀| 国产视频一区二区在线| 久久狠狠亚洲综合| 欧美精品在线一区二区三区| 亚洲欧美一区二区久久| 五月婷婷激情综合| 国产精品123区| 色婷婷av一区二区三区大白胸| 日本一区二区免费在线| 国产精品一级二级三级| 久久日韩粉嫩一区二区三区 | 色乱码一区二区三区88| 国产精品国产三级国产aⅴ无密码| 激情综合网av| 久久亚洲一级片| 精东粉嫩av免费一区二区三区| 日韩一区二区麻豆国产| 蜜桃一区二区三区在线观看| 在线成人免费视频| 美女免费视频一区| 日韩视频不卡中文| 久久99热这里只有精品| 欧美成人一区二区三区在线观看| 久久99最新地址| 久久久久久电影| av激情亚洲男人天堂| 亚洲乱码中文字幕| 在线亚洲一区二区| 91麻豆精品国产91久久久资源速度| 亚洲午夜久久久| 欧美精品在线观看一区二区| 蜜臀久久久久久久| 色欧美片视频在线观看| 亚洲成人一区在线| 欧美日韩精品一区二区天天拍小说| 日本成人在线电影网| 久久久综合视频| 91丨九色丨国产丨porny| 亚洲精品精品亚洲| 欧美大片国产精品| 偷窥少妇高潮呻吟av久久免费| 日韩欧美一区二区不卡| 国产福利91精品一区二区三区| 久久久亚洲国产美女国产盗摄 | 国产精品一区专区| 亚洲成av人片在线| 亚洲aaa精品| 亚洲午夜久久久| 亚洲曰韩产成在线| 亚洲一区二区三区四区在线观看| 樱桃国产成人精品视频| 亚洲三级理论片| 欧美日韩黄色一区二区| 色婷婷av一区二区三区之一色屋| 91美女福利视频| 91免费版在线看| 91美女在线视频| 91成人在线精品| 欧美精品粉嫩高潮一区二区| 91麻豆精品国产91久久久久| 欧美日韩成人在线| 91麻豆精品国产91久久久久久久久| 777奇米成人网| 欧美精品1区2区3区| 欧美日韩美少妇| 欧美日韩精品欧美日韩精品| 日韩国产欧美三级| 秋霞午夜鲁丝一区二区老狼| 丝袜脚交一区二区| 美女尤物国产一区| 日韩电影在线观看一区| 亚洲国产日韩一区二区| 一区二区免费在线| 热久久一区二区| 蜜桃精品在线观看| 亚州成人在线电影| 日韩在线一区二区三区| 紧缚奴在线一区二区三区| 免费人成网站在线观看欧美高清| 免费成人av在线播放| 蜜臀精品久久久久久蜜臀| 精品一二线国产| caoporen国产精品视频| 日本高清无吗v一区| 在线免费不卡视频| 欧洲在线/亚洲| 色又黄又爽网站www久久| 制服丝袜av成人在线看| 欧美大片拔萝卜| 久久久欧美精品sm网站| 成人免费在线播放视频| 亚洲福利视频一区| 极品尤物av久久免费看| 成人动漫一区二区三区| 91蝌蚪porny| 日韩视频不卡中文| 国产精品污www在线观看| 亚洲人快播电影网| 日韩电影免费一区| 日韩电影免费在线看| av在线不卡电影| 欧美精品一卡二卡| 国产三级一区二区| 国产精品视频一二三区| 日韩中文字幕1| 成人18视频在线播放| 色8久久精品久久久久久蜜| 91精品国产综合久久久久久漫画| 日韩一区中文字幕| 美国毛片一区二区三区| 成人免费高清在线| 在线电影院国产精品| 久久综合中文字幕| 国产精品区一区二区三| 午夜av区久久| 91亚洲精品久久久蜜桃网站| 欧美精品在线一区二区| 国产精品国产三级国产aⅴ中文 | 国产精品一二三四区| 欧美亚日韩国产aⅴ精品中极品| 麻豆国产精品777777在线| 国产成人在线观看| 欧美一级在线免费| 成人免费一区二区三区视频| 久久国产三级精品| 播五月开心婷婷综合| 国产亲近乱来精品视频| 蜜臀av性久久久久av蜜臀妖精| 国产成人精品亚洲午夜麻豆| 色av成人天堂桃色av| 亚洲欧洲av在线| 国产精品一色哟哟哟| 日韩限制级电影在线观看| 亚洲一区二区三区爽爽爽爽爽| 成人av在线播放网址| 在线综合视频播放|