/
roa/
roa/lib/boards/
roa/lib/config/
roa/lib/edits/
roa/lib/help/
roa/lib/misc/
roa/lib/plrobjs/
roa/lib/quests/
roa/lib/socials/
roa/lib/www/
roa/lib/www/LEDSign/
roa/lib/www/LEDSign/fonts/
roa/lib/www/LEDSign/scripts/
roa/src/s_inc/
roa/src/sclient/
roa/src/sclient/binary/
roa/src/sclient/text/
roa/src/util/
/************************************************************************
	Realms of Aurealis 		James Rhone aka Vall of RoA

global.h				Header file for global.c

		******** 100% Completely Original Code ********
		*** BE AWARE OF ALL RIGHTS AND RESERVATIONS ***
		******** 100% Completely Original Code ********
		        All rights reserved henceforth. 

    Please note that no guarantees are associated with any code from
Realms of Aurealis.  All code which has been released to the general
public has been done so with an 'as is' pretense.  RoA is based on both
Diku and CircleMUD and ALL licenses from both *MUST* be adhered to as well
as the RoA license.   *** Read, Learn, Understand, Improve ***
*************************************************************************/
#ifndef ROA_GLOBAL_H
#define ROA_GLOBAL_H

#include "plshop.h"
#include "quest.h"
#include "interpreter.h"
#include "magic.h"

#ifdef __ROA_GLOBAL_C__
  #define EXTERN 
  #define EQ_ZERO = 0
  #define EQ_ONE = 1
#else
  #define EXTERN extern
  #define EQ_ZERO 
  #define EQ_ONE 
#endif /* __ROA_GLOBAL_C__ */

#define MAIN_CONFIG_FILE	"config/roa.cfg"

// function prototypes
int load_configuration(BOOL first);
int save_configuration(void);

// G L O B A L  V A R I A B L E S

// the spell_info array from magic
EXTERN struct spell_info_type spell_info[MAX_SPELLS];

// global list of skill names, assigned by spello() in sparse
EXTERN char skill_names[MAX_SKILLS][30];
EXTERN char gskill_names[MAX_GSKILLS+1][30];
#define languages gskill_names
EXTERN gskill gs_array[MAX_GSKILLS+1];

// for races and their associated info...
EXTERN rcinfo rcarray[NUM_RACES+1];

// for classes and their associated info...
EXTERN clinfo clarray[NUM_CLASSES+1];

// the memory file ptr
EXTERN FILE *memfp EQ_ZERO;

// the current top of the command table
EXTERN int top_of_cmds EQ_ZERO;
EXTERN struct command_info cmd_info[MAX_CMD_LIST];

EXTERN char local_sockname[64];				// name for local client socket...
EXTERN pid_t cli_router_pid EQ_ZERO;

EXTERN qslot qarray[NUM_QUESTS];		       // global quest array

EXTERN clpid_info *cl_pids;                            // global client PID info

EXTERN struct  time_info_data time_info;               // global time info
EXTERN struct  global_weather_type  global_weather;    // global weather info

// RoA olc structures used for OLCable help and socials
EXTERN struct roa_social_data  roa_socials[MAX_SOCIALS];
EXTERN struct roa_help_data    roa_help[MAX_HELPFILES];
EXTERN struct roa_help_data    roa_wizhelp[MAX_WIZHELPFILES];

// RoAOLC flag for zone resetting and purging
EXTERN BOOL zlock_reset EQ_ZERO;

// Use/update the wizlist?
EXTERN int use_autowiz EQ_ONE;

EXTERN struct  arena_data arena_info;              // global Arena info
EXTERN int     global_auc_id EQ_ZERO;              // global auction id counter
EXTERN aucdata *auction_ptr;                       // global ptr to auction info list
EXTERN plshop  *pls_global;                        // global ptr to plshop LL

EXTERN struct goss_data latest_gossip[GOSSIP_PAGE_LENGTH]; /* for www gossip */
EXTERN struct who_data who_list[MAX_PLAYERS];  /* struct to store who for sorting */
EXTERN struct message_list fight_messages[MAX_MESSAGES]; /* fighting messages  */

// zone globals
EXTERN zndata  zone_table[NUM_ZONES];          // array (pre allocated) of zones
EXTERN int     zone_levels[NUM_ZONES];         // average levels for each zone
EXTERN struct reset_q_type reset_q;            // the reset queue for zone resets

// world/Room globals
EXTERN rmdata  *world EQ_ZERO;                     // list/array of rooms
EXTERN int     top_of_sorted_world EQ_ZERO;        // top of world loaded at boot time
EXTERN int     top_of_world EQ_ZERO;               // top of world during runtime

// character globals
EXTERN chdata          *character_list EQ_ZERO;    // global list of characters

// mobile (npc) globals
EXTERN chdata          *mob_proto EQ_ZERO;     // list/array of mobile prototypes
EXTERN indexdata       *mob_index EQ_ZERO;     // indexual data for the mob proto list
EXTERN int             top_of_sorted_mobt EQ_ZERO; // top of mob_proto loaded at bootup
EXTERN int             top_of_mobt EQ_ZERO;    // top of mob_proto list during runtime

EXTERN struct pc_special_data dummy_mob;     // filler pc_special struct for mobs
                                             // all mob_protos point to this dummy

// object globals
EXTERN obdata          *object_list EQ_ZERO;    // global list of objects
EXTERN obdata          *obj_proto EQ_ZERO;      // list/array of object prototypes
EXTERN indexdata       *obj_index EQ_ZERO;      // indexual data for the obj proto list
EXTERN int             top_of_sorted_objt EQ_ZERO; // top of obj_proto loaded at bootup
EXTERN int             top_of_objt EQ_ZERO;     // top of obj_protos during runtime

// player file globals
EXTERN struct player_index_element *player_table EQ_ZERO; /* index to player file  */
EXTERN FILE    *player_fl EQ_ZERO;              /* file desc of player file     */
EXTERN int     top_of_p_table EQ_ZERO;          /* ref to top of table          */
EXTERN int     top_of_p_file EQ_ZERO;           /* ref of size of p file        */
EXTERN long    top_idnum EQ_ZERO;               /* highest idnum in use         */

// runtime globals
EXTERN int     no_mail EQ_ONE;                 /* mail disabled?               */
EXTERN int     mini_mud EQ_ZERO;               /* mini-mud mode?               */
EXTERN int     no_rent_check EQ_ZERO;          /* skip rent check on boot?     */
EXTERN long    boot_time EQ_ZERO;              /* time of mud boot             */
EXTERN int     restrict EQ_ZERO;               /* level of game restriction    */
EXTERN int     max_on EQ_ZERO;                 /* max # ppl on this boot       */

// default start rooms for people (RNUMs)
EXTERN int  r_mortal_start_room;            /* rnum of mortal start room    */
EXTERN int  r_immort_start_room;            /* rnum of immort start room    */
EXTERN int  r_frozen_start_room;            /* rnum of frozen start room    */
EXTERN int  r_newbie_start_room;            /* rnum of newbie start room    */
EXTERN int  mortal_start_room;            /* rnum of mortal start room    */
EXTERN int  immort_start_room;            /* rnum of immort start room    */
EXTERN int  frozen_start_room;            /* rnum of frozen start room    */
EXTERN int  newbie_start_room;            /* rnum of newbie start room    */

// various global string values, allocated in this file
// some are OLCable now via the RoAOLC texedit code
EXTERN char    *credits EQ_ZERO;               /* game credits                 */
EXTERN char    *credit_sequence EQ_ZERO;       /* game credit sequence         */
EXTERN char    *races EQ_ZERO;                 // small help file on races
EXTERN char    *title0 EQ_ZERO;                // mud title screen
EXTERN char    *title1 EQ_ZERO;                // mud title screen
EXTERN char    *title2 EQ_ZERO;                // mud title screen
EXTERN char    *title3 EQ_ZERO;                // mud title screen
EXTERN char    *title4 EQ_ZERO;                // mud title screen
EXTERN char    *title5 EQ_ZERO;                // mud title screen
EXTERN char    *news EQ_ZERO;                  /* mud news                     */
EXTERN char    *motd EQ_ZERO;                  /* message of the day - mortals */
EXTERN char    *imotd EQ_ZERO;                 /* message of the day - immorts */
EXTERN char    *info EQ_ZERO;                  /* info page                    */
EXTERN char    *wizlist EQ_ZERO;               /* list of higher gods          */
EXTERN char    *immlist EQ_ZERO;               /* list of peon gods            */
EXTERN char    *background EQ_ZERO;            /* background story             */
EXTERN char    *handbook EQ_ZERO;              /* handbook for new immortals   */
EXTERN char    *policies EQ_ZERO;              /* policies page                */
EXTERN char    *welcome EQ_ZERO;               /* per login welcome msg        */
EXTERN char    *start EQ_ZERO;                 /* newbie 1st time msg          */
EXTERN char    *VTMENU EQ_ZERO;                /* vt100 entrance menu	       */
EXTERN char    *MENU EQ_ZERO;                  /* normal entrance menu	       */

// globals initialized by init_globals in global.c
EXTERN int  level_can_shout;
EXTERN int  holler_move_cost;
EXTERN int  max_npc_corpse_time;
EXTERN int  max_pc_corpse_time;
EXTERN int  auto_save;
EXTERN int  autosave_time;
EXTERN int  nameserver_is_slow;
EXTERN int  bin_socials;
EXTERN int  min_wizlist_lev;
EXTERN int  requirelongdesc;

EXTERN int mailcost;
EXTERN int maxnewbielevel;
EXTERN int minforarenawin;
EXTERN int maxfleeexploss;
EXTERN int maxdeathexploss;
EXTERN int max_aliases;
EXTERN int train_pracs;
EXTERN int useglobals;			       // use global channels?

EXTERN char *shortmudname;
EXTERN char *longmudname;
EXTERN char *currency_name;
EXTERN char *currency_name_plural;
EXTERN char *impname;
EXTERN char *cimpname;
EXTERN char *aimpname;
EXTERN char *godname;
EXTERN char *avtrname;
EXTERN char *trustedname;
EXTERN char *ambassname;

// for external editor
EXTERN char *spico_path;

// version info
EXTERN char *RoA_version;
EXTERN char *OLC_version;

// WWW info
EXTERN char *www_page;
EXTERN char *www_mailto;
EXTERN char *www_contact_name;

#undef EXTERN

#endif /* ROA_GLOBAL_H */