head 1.1; access ; symbols ; locks ; strict; comment @ * @; 1.1 date 89.03.13.09.36.43; author rsalz; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @#include "kernel.h" #ifdef RCSID static char RCS[] = "$Header$"; #endif /* RCSID */ convroom(x) int x; { int ct; for (ct = 0; ; ct++) { if (x == -room_data[ct].r_code) return ct; if (room_data[ct].r_code == 0) return -9999; } } char * sdesc(room) int room; { if (!exists(room)) return "Where no man has gone before"; return room_data[convroom(room)].r_short; } char * ldesc(room) int room; { if (!exists(room)) return ""; return room_data[convroom(room)].r_long; } getexit(room, ex) int room, ex; { return room_data[convroom(room)].r_exit[ex]; } exists(room) int room; { return convroom(room) != -9999; } locdir() { int locnum; int posync; int i; char rt[32]; char rs[32]; int ct; if (plev(mynum) < 10) { bprintf("Sorry ... not allowed\n"); return; } pbfr(); for (locnum = 0, posync = 0, ct = 0; room_data[ct].r_code; ct++) { i = findzone(-room_data[ct].r_code, rt); sprintf(rs, "%s%d", rt, i); bprintf("%-11s", rs); locnum++; posync++; if (posync % 7 == 6) bprintf("\n"); if (posync % 32 == 0) pbfr(); } if (posync % 32) bprintf("\n"); bprintf("Total of %d rooms.\n", locnum); } @