#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "merc.h"
#include "olc.h"
Include dependency graph for map.c:

Go to the source code of this file.
Defines | |
| #define | MAX_MAP 160 |
| #define | MAX_MAP_DIR 4 |
Functions | |
| void | do_map (CHAR_DATA *ch, char *argument) |
| void | do_printmap (CHAR_DATA *ch, char *argument) |
| void | do_smallmap (CHAR_DATA *ch, char *argument) |
| int * | get_exit_sectors (int *exit_sectors) |
| char * | get_sector_name (int sector) |
| void | MapArea (ROOM_INDEX_DATA *room, CHAR_DATA *ch, int x, int y, int min, int max) |
| void | ShowHalfMap (CHAR_DATA *ch, int min, int max) |
| void | ShowMap (CHAR_DATA *ch, int min, int max) |
| void | ShowRoom (CHAR_DATA *ch, int min, int max) |
Variables | |
| int | map [MAX_MAP][MAX_MAP] |
| int | offsets [4][2] = { {-1, 0},{ 0, 1},{ 1, 0},{ 0,-1} } |
|
|
Definition at line 41 of file map.c. Referenced by do_map(), do_printmap(), and do_smallmap(). |
|
|
Definition at line 42 of file map.c. Referenced by get_exit_sectors(), and MapArea(). |
|
||||||||||||
|
Definition at line 425 of file map.c. References IS_IMMORTAL, IS_NPC, IS_SET, map, MapArea(), MAX_MAP, one_argument(), room_is_dark(), ROOM_WILDERNESS, SECT_MAX, send_to_char(), ShowMap(), ShowRoom(), and URANGE. 00426 {
00427 int size,center,x,y,min,max;
00428 char arg1[10];
00429
00430 one_argument( argument, arg1 );
00431 size = atoi (arg1);
00432
00433 size=URANGE(6,size,MAX_MAP);
00434 center=MAX_MAP/2;
00435
00436 min = MAX_MAP/2-size/2;
00437 max = MAX_MAP/2+size/2;
00438
00439 for (x = 0; x < MAX_MAP; ++x)
00440 for (y = 0; y < MAX_MAP; ++y)
00441 map[x][y]=SECT_MAX;
00442
00443 /* starts the mapping with the center room */
00444 MapArea(ch->in_room, ch, center, center, min-1, max-1);
00445
00446 /* marks the center, where ch is */
00447 map[center][center]=SECT_MAX+2; /* can be any number above SECT_MAX+1 */
00448 /* switch default will print out the * */
00449
00450 if ( (!IS_IMMORTAL(ch))||(IS_NPC(ch)) )
00451 {
00452 if ( !IS_SET(ch->in_room->room_flags, ROOM_WILDERNESS) )
00453 {send_to_char("{CYou can not do that here{x.\n\r",ch);return;}
00454 if ( room_is_dark( ch->in_room ) )
00455 {send_to_char( "{bThe wilderness is pitch black at night... {x\n\r", ch );return;}
00456 else
00457 {ShowRoom(ch,MAX_MAP/2-3,MAX_MAP/2+3);return;}
00458 }
00459 /* mortals not in city, enter or inside will always get a ShowRoom */
00460 if (IS_IMMORTAL(ch)) {
00461 if (arg1[0]=='\0') ShowRoom (ch, min, max);
00462 else ShowMap (ch, min, max);
00463 return;
00464 }
00465
00466 send_to_char("{CHuh?{x\n\r",ch);
00467 return;
00468 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 245 of file map.c. References fpReserve, map, MapArea(), MAX_MAP, SECT_AIR, SECT_CITY, SECT_DESERT, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_INSIDE, SECT_MAX, SECT_MOUNTAIN, SECT_UNUSED, SECT_WATER_NOSWIM, SECT_WATER_SWIM, and send_to_char(). 00246 {
00247 int x,y,min=-1,max=MAX_MAP-1;
00248 FILE *fp;
00249
00250 if (strcmp(ch->name,"Kroudar"))
00251 {
00252 send_to_char("Curiousity is a disease...",ch);
00253 return;
00254 }
00255
00256 for (x = 0; x < MAX_MAP; ++x)
00257 for (y = 0; y < MAX_MAP; ++y)
00258 map[x][y]=SECT_MAX;
00259
00260 MapArea(ch->in_room, ch, 80, 80, min, max);
00261
00262 fclose (fpReserve);
00263
00264 fp = fopen("WILDERNESS_MAP","w");
00265 for (x = min; x < max; ++x)
00266 { /* every row */
00267 for (y = min; y < max; ++y)
00268 { /* every column */
00269 switch(map[x][y])
00270 {
00271 case SECT_MAX: fprintf(fp," "); break;
00272 case SECT_FOREST: fprintf(fp,"@"); break;
00273 case SECT_FIELD: fprintf(fp,"\""); break;
00274 case SECT_HILLS: fprintf(fp,"^"); break;
00275 //case SECT_ROAD: fprintf(fp,"+"); break;
00276 case SECT_MOUNTAIN: fprintf(fp,"^"); break;
00277 case SECT_WATER_SWIM: fprintf(fp,":"); break;
00278 case SECT_WATER_NOSWIM: fprintf(fp,":"); break;
00279 case SECT_UNUSED: fprintf(fp,"X"); break;
00280 case SECT_AIR: fprintf(fp,"~"); break;
00281 case SECT_DESERT: fprintf(fp,"="); break;
00282 //case SECT_ENTER: fprintf(fp,"$"); break;
00283 case SECT_INSIDE: fprintf(fp,"I"); break;
00284 case SECT_CITY: fprintf(fp,"#"); break;
00285 /*case SECT_ROCK_MOUNTAIN:fprintf(fp,"^"); break;
00286 case SECT_SNOW_MOUNTAIN:fprintf(fp,"^"); break;
00287 case SECT_SWAMP: fprintf(fp,"&"); break;
00288 case SECT_JUNGLE: fprintf(fp,"&"); break;
00289 case SECT_RUINS: fprintf(fp,"#"); break;*/
00290 case (SECT_MAX+1): fprintf(fp,"?"); break;
00291 default: fprintf(fp,"*");
00292 } /* end switch2 */
00293 } /* every column */
00294
00295 fprintf(fp,"\n");
00296 } /*every row*/
00297
00298 fclose(fp);
00299 fpReserve = fopen( NULL_FILE, "r" );
00300
00301 return;
00302 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 470 of file map.c. References IS_IMMORTAL, map, MapArea(), MAX_MAP, one_argument(), SECT_MAX, send_to_char(), ShowHalfMap(), and URANGE. 00471 {
00472 int size,center,x,y,min,max;
00473 char arg1[10];
00474
00475 one_argument( argument, arg1 );
00476 size = atoi (arg1);
00477
00478 size=URANGE(6,size,MAX_MAP);
00479 center=MAX_MAP/2;
00480
00481 min = MAX_MAP/2-size/2;
00482 max = MAX_MAP/2+size/2;
00483
00484 for (x = 0; x < MAX_MAP; ++x)
00485 for (y = 0; y < MAX_MAP; ++y)
00486 map[x][y]=SECT_MAX;
00487
00488 /* starts the mapping with the center room */
00489 MapArea(ch->in_room, ch, center, center, min-1, max-1);
00490
00491 /* marks the center, where ch is */
00492 map[center][center]=SECT_MAX+2; /* can be any number above SECT_MAX+1 */
00493 /* switch default will print out the * */
00494
00495 if (IS_IMMORTAL(ch)) {
00496 ShowHalfMap (ch, min, max);
00497 return;
00498 }
00499
00500 send_to_char("{CHuh?{x\n\r",ch);
00501 return;
00502 }
|
Here is the call graph for this function:

|
|
Definition at line 544 of file map.c. References room_index_data::exit, get_room_index(), MAX_MAP_DIR, room_index_data::sector_type, exit_data::to_room, and exit_data::u1. 00545 {
00546 ROOM_INDEX_DATA *room;
00547 EXIT_DATA *pexit;
00548 int door;
00549
00550 room=get_room_index(exit_sectors[0]);
00551 exit_sectors[4]=0;
00552
00553 for ( door = 0; door < MAX_MAP_DIR; door++ )
00554 { /* cycles through for each exit */
00555 if (
00556 (pexit = room->exit[door]) != NULL
00557 && pexit->u1.to_room != NULL
00558 )
00559 {
00560 exit_sectors[door]=pexit->u1.to_room->sector_type;
00561 if ((pexit->u1.to_room->sector_type)==(room->sector_type))
00562 exit_sectors[4]+=1;
00563 }
00564 else
00565 exit_sectors[door]=-1;
00566 }
00567
00568 return(exit_sectors);
00569 }
|
Here is the call graph for this function:

|
|
Definition at line 506 of file map.c. References SECT_AIR, SECT_CITY, SECT_DESERT, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_INSIDE, SECT_MOUNTAIN, SECT_WATER_NOSWIM, and SECT_WATER_SWIM. 00507 {
00508 char *sector_name;
00509
00510 sector_name="movement";
00511
00512 switch (sector)
00513 {
00514 case SECT_FOREST: sector_name="some trees";break;
00515 case SECT_FIELD: sector_name="a field";break;
00516 case SECT_HILLS: sector_name="some rolling hills";break;
00517 //case SECT_ROAD: sector_name="a road";break;
00518 case SECT_WATER_SWIM: sector_name="shallow water";break;
00519 case SECT_WATER_NOSWIM: sector_name="deep water";break;
00520 case SECT_AIR: sector_name="the sky";break;
00521 case SECT_DESERT: sector_name="a lot of sand";break;
00522 case SECT_MOUNTAIN: sector_name="some mountainous terrain";break;
00523 /*case SECT_ROCK_MOUNTAIN:sector_name="a rocky mountain";break;
00524 case SECT_SNOW_MOUNTAIN:sector_name="snow covered mountains";break;
00525 case SECT_SWAMP: sector_name="bleak swampland";break;
00526 case SECT_JUNGLE: sector_name="thick jungle";break;
00527 case SECT_RUINS: sector_name="ruins of some sort";break;*/
00528 case SECT_INSIDE: sector_name="movement";break;
00529 case SECT_CITY: sector_name="movement";break;
00530 //case SECT_ENTER: sector_name="movement";break;
00531 } /*switch1*/
00532
00533 return(strdup(sector_name));
00534 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 48 of file map.c. References can_see_room(), EX_CLOSED, room_index_data::exit, exit_data::exit_info, IS_SET, map, MAX_MAP_DIR, offsets, rev_dir, SECT_CITY, SECT_HILLS, SECT_INSIDE, SECT_MAX, SECT_MOUNTAIN, room_index_data::sector_type, exit_data::to_room, and exit_data::u1. Referenced by do_map(), do_printmap(), and do_smallmap(). 00049 {
00050 ROOM_INDEX_DATA *prospect_room;
00051 EXIT_DATA *pexit;
00052 int door;
00053
00054 /* marks the room as visited */
00055 map[x][y]=room->sector_type;
00056
00057 for ( door = 0; door < MAX_MAP_DIR; door++ )
00058 { /* cycles through for each exit */
00059 if (
00060 (pexit = room->exit[door]) != NULL
00061 && pexit->u1.to_room != NULL
00062 && can_see_room(ch,pexit->u1.to_room) /* optional */
00063 && !IS_SET(pexit->exit_info, EX_CLOSED)
00064 )
00065 { /* if exit there */
00066
00067 if ((x<min)||(y<min)||(x>max)||(y>max)) return;
00068
00069 prospect_room = pexit->u1.to_room;
00070
00071 if ( prospect_room->exit[rev_dir[door]] &&
00072 prospect_room->exit[rev_dir[door]]->u1.to_room!=room)
00073 { /* if not two way */
00074 map[x][y]=SECT_MAX+1; /* one way into area OR maze */
00075 return;
00076 } /* end two way */
00077
00078 /* if ( IS_NPC(ch)
00079 ||(!IS_SET(ch->act,PLR_HOLYLIGHT))
00080 ||(!IS_IMMORTAL(ch))
00081 ) */
00082 if( (prospect_room->sector_type==SECT_MOUNTAIN)
00083 ||(prospect_room->sector_type==SECT_HILLS)
00084 ||(prospect_room->sector_type==SECT_CITY)
00085 ||(prospect_room->sector_type==SECT_INSIDE)
00086
00087 )
00088 { /* players cant see past these */
00089 map[x+offsets[door][0]][y+offsets[door][1]]=prospect_room->sector_type;
00090 /* ^--two way into area */
00091 /*if (door!=0) return;*//*not needed for my mud becuz of euclid world map*/
00092 /* ^--takes care of stopping when north is one of sectors you cant see past */
00093 }
00094
00095 if (map[x+offsets[door][0]][y+offsets[door][1]]==SECT_MAX) {
00096 MapArea (pexit->u1.to_room,ch,
00097 x+offsets[door][0], y+offsets[door][1],min,max);
00098 }
00099
00100 } /* end if exit there */
00101 }
00102 return;
00103 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 173 of file map.c. References map, SECT_AIR, SECT_CITY, SECT_DESERT, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_INSIDE, SECT_MAX, SECT_MOUNTAIN, SECT_UNUSED, SECT_WATER_NOSWIM, SECT_WATER_SWIM, and send_to_char(). Referenced by do_smallmap(). 00174 {
00175 int x,y;
00176
00177 for (x = min; x < max; x+=2)
00178 { /* every row */
00179 for (y = min; y < max; y+=2)
00180 { /* every column */
00181
00182 /* mlk prioritizes*/
00183 //if (map[x][y-1]==SECT_ROAD) map[x][y]=SECT_ROAD;
00184 //if (map[x][y-1]==SECT_ENTER) map[x][y]=SECT_ENTER;
00185
00186 if ( (y==min) || (map[x][y-2]!=map[x][y]) )
00187 switch(map[x][y])
00188 {
00189 case SECT_MAX: send_to_char(" ",ch); break;
00190 case SECT_FOREST: send_to_char("{g@",ch); break;
00191 case SECT_FIELD: send_to_char("{G\"",ch); break;
00192 case SECT_HILLS: send_to_char("{G^",ch); break;
00193 //case SECT_ROAD: send_to_char("{m+",ch); break;
00194 case SECT_MOUNTAIN: send_to_char("{y^",ch); break;
00195 case SECT_WATER_SWIM: send_to_char("{B:",ch); break;
00196 case SECT_WATER_NOSWIM: send_to_char("{b:",ch); break;
00197 case SECT_UNUSED: send_to_char("{DX",ch); break;
00198 case SECT_AIR: send_to_char("{C%",ch); break;
00199 case SECT_DESERT: send_to_char("{Y=",ch); break;
00200 //case SECT_ENTER: send_to_char("{W@",ch); break;
00201 case SECT_INSIDE: send_to_char("{W%",ch); break;
00202 case SECT_CITY: send_to_char("{W#",ch); break;
00203 //case SECT_ROCK_MOUNTAIN:send_to_char("{D^",ch); break;
00204 //case SECT_SNOW_MOUNTAIN:send_to_char("{W^",ch); break;
00205 //case SECT_SWAMP: send_to_char("{D&",ch); break;
00206 //case SECT_JUNGLE: send_to_char("{g&",ch); break;
00207 //case SECT_RUINS: send_to_char("{D#",ch); break;
00208 case (SECT_MAX+1): send_to_char("{D?",ch); break;
00209 default: send_to_char("{R*",ch);
00210 } /* end switch1 */
00211 else
00212 switch(map[x][y])
00213 {
00214 case SECT_MAX: send_to_char(" ",ch); break;
00215 case SECT_FOREST: send_to_char("@",ch); break;
00216 case SECT_FIELD: send_to_char("\"",ch); break;
00217 case SECT_HILLS: send_to_char("^",ch); break;
00218 //case SECT_ROAD: send_to_char("+",ch); break;
00219 case SECT_MOUNTAIN: send_to_char("^",ch); break;
00220 case SECT_WATER_SWIM: send_to_char(":",ch); break;
00221 case SECT_WATER_NOSWIM: send_to_char(":",ch); break;
00222 case SECT_UNUSED: send_to_char("X",ch); break;
00223 case SECT_AIR: send_to_char("%",ch); break;
00224 case SECT_DESERT: send_to_char("=",ch); break;
00225 //case SECT_ENTER: send_to_char("@",ch); break;
00226 case SECT_INSIDE: send_to_char("%",ch); break;
00227 case SECT_CITY: send_to_char("#",ch); break;
00228 /*case SECT_ROCK_MOUNTAIN:send_to_char("^",ch); break;
00229 case SECT_SNOW_MOUNTAIN:send_to_char("^",ch); break;
00230 case SECT_SWAMP: send_to_char("&",ch); break;
00231 case SECT_JUNGLE: send_to_char("&",ch); break;
00232 case SECT_RUINS: send_to_char("#",ch); break;*/
00233 case (SECT_MAX+1): send_to_char("?",ch); break;
00234 default: send_to_char("*",ch);
00235 } /* end switch2 */
00236 } /* every column */
00237
00238 send_to_char("\n\r",ch);
00239 } /*every row*/
00240
00241 return;
00242 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 106 of file map.c. References map, SECT_AIR, SECT_CITY, SECT_DESERT, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_INSIDE, SECT_MAX, SECT_MOUNTAIN, SECT_UNUSED, SECT_WATER_NOSWIM, SECT_WATER_SWIM, and send_to_char(). Referenced by do_map(). 00107 {
00108 int x,y;
00109
00110 for (x = min; x < max; ++x)
00111 { /* every row */
00112 for (y = min; y < max; ++y)
00113 { /* every column */
00114 if ( (y==min) || (map[x][y-1]!=map[x][y]) )
00115 switch(map[x][y])
00116 {
00117 case SECT_MAX: send_to_char(" ",ch); break;
00118 case SECT_FOREST: send_to_char("{g@",ch); break;
00119 case SECT_FIELD: send_to_char("{G\"",ch); break;
00120 case SECT_HILLS: send_to_char("{G^",ch); break;
00121 //case SECT_ROAD: send_to_char("{m+",ch); break;
00122 case SECT_MOUNTAIN: send_to_char("{y^",ch); break;
00123 case SECT_WATER_SWIM: send_to_char("{B:",ch); break;
00124 case SECT_WATER_NOSWIM: send_to_char("{b:",ch); break;
00125 case SECT_UNUSED: send_to_char("{DX",ch); break;
00126 case SECT_AIR: send_to_char("{C%",ch); break;
00127 case SECT_DESERT: send_to_char("{Y=",ch); break;
00128 //case SECT_ENTER: send_to_char("{W@",ch); break;
00129 case SECT_INSIDE: send_to_char("{W%",ch); break;
00130 case SECT_CITY: send_to_char("{W#",ch); break;
00131 //case SECT_ROCK_MOUNTAIN:send_to_char("{D^",ch); break;
00132 //case SECT_SNOW_MOUNTAIN:send_to_char("{W^",ch); break;
00133 //case SECT_SWAMP: send_to_char("{D&",ch); break;
00134 //case SECT_JUNGLE: send_to_char("{g&",ch); break;
00135 //case SECT_RUINS: send_to_char("{D#",ch); break;
00136 case (SECT_MAX+1): send_to_char("{D?",ch); break;
00137 default: send_to_char("{R*",ch);
00138 } /* end switch1 */
00139 else
00140 switch(map[x][y])
00141 {
00142 case SECT_MAX: send_to_char(" ",ch); break;
00143 case SECT_FOREST: send_to_char("@",ch); break;
00144 case SECT_FIELD: send_to_char("\"",ch); break;
00145 case SECT_HILLS: send_to_char("^",ch); break;
00146 //case SECT_ROAD: send_to_char("+",ch); break;
00147 case SECT_MOUNTAIN: send_to_char("^",ch); break;
00148 case SECT_WATER_SWIM: send_to_char(":",ch); break;
00149 case SECT_WATER_NOSWIM: send_to_char(":",ch); break;
00150 case SECT_UNUSED: send_to_char("X",ch); break;
00151 case SECT_AIR: send_to_char("%",ch); break;
00152 case SECT_DESERT: send_to_char("=",ch); break;
00153 //case SECT_ENTER: send_to_char("@",ch); break;
00154 case SECT_INSIDE: send_to_char("%",ch); break;
00155 case SECT_CITY: send_to_char("#",ch); break;
00156 //case SECT_ROCK_MOUNTAIN:send_to_char("^",ch); break;
00157 //case SECT_SNOW_MOUNTAIN:send_to_char("^",ch); break;
00158 //case SECT_SWAMP: send_to_char("&",ch); break;
00159 //case SECT_JUNGLE: send_to_char("&",ch); break;
00160 //case SECT_RUINS: send_to_char("#",ch); break;
00161 case (SECT_MAX+1): send_to_char("?",ch); break;
00162 default: send_to_char("*",ch);
00163 } /* end switch2 */
00164 } /* every column */
00165
00166 send_to_char("\n\r",ch);
00167 } /*every row*/
00168
00169 return;
00170 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 305 of file map.c. References IS_IMMORTAL, IS_NPC, IS_SET, map, PLR_HOLYLIGHT, SECT_AIR, SECT_CITY, SECT_DESERT, SECT_FIELD, SECT_FOREST, SECT_HILLS, SECT_INSIDE, SECT_MAX, SECT_MOUNTAIN, SECT_UNUSED, SECT_WATER_NOSWIM, SECT_WATER_SWIM, and send_to_char(). Referenced by do_map(). 00306 {
00307 int x,y,str_pos=0,desc_pos=0,start;
00308 char buf[500];
00309 char desc[500];
00310 char line[100];
00311
00312 strcpy(desc,ch->in_room->description);
00313
00314 map[min][min]=SECT_MAX;map[max-1][max-1]=SECT_MAX; /* mlk :: rounds edges */
00315 map[min][max-1]=SECT_MAX;map[max-1][min]=SECT_MAX;
00316
00317 for (x = min; x < max; ++x)
00318 { /* every row */
00319 for (y = min; y < max; ++y)
00320 { /* every column */
00321 if ( (y==min) || (map[x][y-1]!=map[x][y]) )
00322 switch(map[x][y])
00323 {
00324 case SECT_MAX: send_to_char(" ",ch); break;
00325 case SECT_FOREST: send_to_char("{g@",ch); break;
00326 case SECT_FIELD: send_to_char("{G\"",ch); break;
00327 case SECT_HILLS: send_to_char("{G^",ch); break;
00328 //case SECT_ROAD: send_to_char("{m+",ch); break;
00329 case SECT_MOUNTAIN: send_to_char("{y^",ch); break;
00330 case SECT_WATER_SWIM: send_to_char("{B:",ch); break;
00331 case SECT_WATER_NOSWIM: send_to_char("{b:",ch); break;
00332 case SECT_UNUSED: send_to_char("{DX",ch); break;
00333 case SECT_AIR: send_to_char("{C%",ch); break;
00334 case SECT_DESERT: send_to_char("{Y=",ch); break;
00335 //case SECT_ENTER: send_to_char("{W@",ch); break;
00336 case SECT_INSIDE: send_to_char("{W%",ch); break;
00337 case SECT_CITY: send_to_char("{W#",ch); break;
00338 /*case SECT_ROCK_MOUNTAIN:send_to_char("{D^",ch); break;
00339 case SECT_SNOW_MOUNTAIN:send_to_char("{W^",ch); break;
00340 case SECT_SWAMP: send_to_char("{D&",ch); break;
00341 case SECT_JUNGLE: send_to_char("{g&",ch); break;
00342 case SECT_RUINS: send_to_char("{D#",ch); break;*/
00343 case (SECT_MAX+1): send_to_char("{D?",ch); break;
00344 default: send_to_char("{R*",ch);
00345 } /* end switch1 */
00346 else
00347 switch(map[x][y])
00348 {
00349 case SECT_MAX: send_to_char(" ",ch); break;
00350 case SECT_FOREST: send_to_char("@",ch); break;
00351 case SECT_FIELD: send_to_char("\"",ch); break;
00352 case SECT_HILLS: send_to_char("^",ch); break;
00353 //case SECT_ROAD: send_to_char("+",ch); break;
00354 case SECT_MOUNTAIN: send_to_char("^",ch); break;
00355 case SECT_WATER_SWIM: send_to_char(":",ch); break;
00356 case SECT_WATER_NOSWIM: send_to_char(":",ch); break;
00357 case SECT_UNUSED: send_to_char("X",ch); break;
00358 case SECT_AIR: send_to_char("%",ch); break;
00359 case SECT_DESERT: send_to_char("=",ch); break;
00360 //case SECT_ENTER: send_to_char("@",ch); break;
00361 case SECT_INSIDE: send_to_char("%",ch); break;
00362 case SECT_CITY: send_to_char("#",ch); break;
00363 /*case SECT_ROCK_MOUNTAIN:send_to_char("^",ch); break;
00364 case SECT_SNOW_MOUNTAIN:send_to_char("^",ch); break;
00365 case SECT_SWAMP: send_to_char("&",ch); break;
00366 case SECT_JUNGLE: send_to_char("&",ch); break;
00367 case SECT_RUINS: send_to_char("#",ch); break;*/
00368 case (SECT_MAX+1): send_to_char("?",ch); break;
00369 default: send_to_char("*",ch);
00370 } /* end switch2 */
00371 } /* every column */
00372
00373 if (x==min) {
00374 sprintf(buf,"{x {C%s{x",ch->in_room->name);
00375 send_to_char(buf,ch);
00376
00377 /* mlk :: no brief in wilderness, ascii map is automatic, autoexits off too
00378 if ( !IS_NPC(ch) && IS_SET(ch->act, PLR_AUTOEXIT) ) {
00379 send_to_char( " {b",ch);do_exits( ch, "auto" );send_to_char( "{x",ch);
00380 } */
00381
00382 if (IS_IMMORTAL(ch) && (IS_NPC(ch) || IS_SET(ch->act,PLR_HOLYLIGHT)))
00383 { /* for showing certain people room vnum */
00384 sprintf(buf," {c[Room %d]{x",ch->in_room->vnum);
00385 send_to_char(buf,ch);
00386 }
00387 }
00388 else
00389 {
00390 start=str_pos;
00391 for (desc_pos = desc_pos ; desc[desc_pos]!='\0' ; desc_pos++)
00392 {
00393 if (desc[desc_pos]=='\n') {
00394 line[str_pos-start]='\0';str_pos+=3;
00395 desc_pos += 2;
00396 break;
00397 }
00398 else if (desc[desc_pos]=='\r') {
00399 line[str_pos-start]='\0';str_pos+=2;
00400 break;
00401 }
00402 else {
00403 line[str_pos-start]=desc[desc_pos];
00404 str_pos+=1;
00405 }
00406 }
00407 /* set the final character to \0 for descs that are longer than 5 lines? */
00408 line[str_pos-start]='\0'; /* best way to clear string? */
00409 /* maybe do strcpy(line," "); instead? */
00410 /* not needed here because the for loops stop at \0 ?? */
00411 if (x==min+1) send_to_char(" ",ch);
00412 send_to_char(" {c",ch);
00413 send_to_char(line,ch);
00414 send_to_char("{x",ch);
00415
00416 } /*else*/
00417
00418 send_to_char("\n\r",ch);
00419 } /*every row*/
00420
00421 send_to_char("\n\r",ch); /* puts a line between contents/people */
00422 return;
00423 }
|
Here is the call graph for this function:

|
|
Definition at line 44 of file map.c. Referenced by do_map(), do_printmap(), do_smallmap(), MapArea(), ShowHalfMap(), ShowMap(), and ShowRoom(). |
|
|
Definition at line 45 of file map.c. Referenced by MapArea(). |
1.4.0