class Rooms
{
static String roomName = "None.";
static String roomShortDescription = "A void.";
static String roomLongDescription = "A really big void.";
static boolean shortDescription = true;
public static void setRoom(int zoneNumber, int roomNumber)
class Room : public Entity, Instance
{
private:
Room( const Room © );
Room operator=( const Room © );
public:
Room * next;
Room * next_sort;
Room *next_in_area;
Room *prev_in_area;
Character * first_person; /* people in the room */
Character * last_person; /* .. */
Object * first_content; /* objects on floor */
Object * last_content; /* .. */
ExtraDesc<Room *> * first_extradesc; /* extra descriptions */
ExtraDesc<Room *> * last_extradesc; /* .. */
Area * area;
Exit * first_exit; /* exits from the room */
Exit * last_exit; /* .. */
Affect * first_affect; /* effects on the room */
Affect * last_affect; /* .. */
MUDProgList * mpact; /* mudprogs */
int mpactnum; /* mudprogs */
MUDProg * mudprogs; /* mudprogs */
short mpscriptpos;
char * name;
char * description;
int vnum;
ExtBV room_flags;
ExtBV progtypes; /* mudprogs */
short light;
char sector;
int tele_vnum;
short tele_delay;
short tunnel; /* max people that will fit */
Map * omap;
short x;
short y;
short z;
Shop * shop;
Room( int v, Area *a );
Room( int v, Area *a, Room *clone );
char *getName();
char *getDesc();
bool isDark();
bool isPrivate();
long getSize( bool children = false );
~Room();
};
The breakdown: A zone will be a collection of rooms. A highway might be zone 1 and the forest adjacent to it might be zone 2. So whenever I call to change a room I would sent Rooms.setRoom(1,1); and I'll now be in Zone 1 and at "A Peaceful Meadow." Obviously, this file will become obscenely once I start writing rooms etc., but this seems to be one of the easiest alternatives. Is this going to become absurdly slow and god awful in a matter of 50-70 rooms?
I figured this was a better alternative than just reading from .dat files which would require objects and more files etc. etc. This allows for me to call whatever, whenever (not worrying about cursosrs), I don't need to make any objects and it's only one file. Suggestions?