Added some missed .h files.

This commit is contained in:
Rumble 2008-04-13 23:02:15 +00:00
parent 7e2be30621
commit 9945fc2d02
10 changed files with 735 additions and 0 deletions

345
src/act.h Normal file
View file

@ -0,0 +1,345 @@
/**
* @file act.h
* Header file for the core act* c files.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @todo Utility functions that could easily be moved elsewhere have been
* marked. Suggest a review of all utility functions (aka. non ACMDs) and
* determine if the utility functions should be placed into a lower level
* (non-ACMD focused) shared module.
*
*/
#ifndef _ACT_H_
#define _ACT_H_
#include "utils.h" /* for the ACMD macro */
/*****************************************************************************
* Begin Functions and defines for act.comm.c
****************************************************************************/
/* functions with subcommands */
/* do_gen_comm */
ACMD(do_gen_comm);
#define SCMD_HOLLER 0
#define SCMD_SHOUT 1
#define SCMD_GOSSIP 2
#define SCMD_AUCTION 3
#define SCMD_GRATZ 4
#define SCMD_GEMOTE 5
/* do_qcomm */
ACMD(do_qcomm);
#define SCMD_QSAY 0
#define SCMD_QECHO 1
/* do_spec_com */
ACMD(do_spec_comm);
#define SCMD_WHISPER 0
#define SCMD_ASK 1
/* functions without subcommands */
ACMD(do_say);
ACMD(do_gsay);
ACMD(do_page);
ACMD(do_reply);
ACMD(do_tell);
ACMD(do_write);
/*****************************************************************************
* Begin Functions and defines for act.informative.c
****************************************************************************/
/* Utility Functions */
/** @todo Move to a utility library */
char *find_exdesc(char *word, struct extra_descr_data *list);
/** @todo Move to a mud centric string utility library */
void space_to_minus(char *str);
/** @todo Move to a help module? */
int search_help(char *argument, int level);
/* functions with subcommands */
/* do_commands */
ACMD(do_commands);
#define SCMD_COMMANDS 0
#define SCMD_SOCIALS 1
#define SCMD_WIZHELP 2
/* do_gen_ps */
ACMD(do_gen_ps);
#define SCMD_INFO 0
#define SCMD_HANDBOOK 1
#define SCMD_CREDITS 2
#define SCMD_NEWS 3
#define SCMD_WIZLIST 4
#define SCMD_POLICIES 5
#define SCMD_VERSION 6
#define SCMD_IMMLIST 7
#define SCMD_MOTD 8
#define SCMD_IMOTD 9
#define SCMD_CLEAR 10
#define SCMD_WHOAMI 11
/* do_look */
ACMD(do_look);
#define SCMD_LOOK 0
#define SCMD_READ 1
/* functions without subcommands */
ACMD(do_consider);
ACMD(do_diagnose);
ACMD(do_equipment);
ACMD(do_examine);
ACMD(do_exits);
ACMD(do_gold);
ACMD(do_help);
ACMD(do_history);
ACMD(do_inventory);
ACMD(do_levels);
ACMD(do_score);
ACMD(do_time);
ACMD(do_toggle);
ACMD(do_users);
ACMD(do_weather);
ACMD(do_where);
ACMD(do_who);
/*****************************************************************************
* Begin Functions and defines for act.item.c
****************************************************************************/
/* Utility Functions */
/** @todo Compare with needs of find_eq_pos_script. */
int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg);
void name_from_drinkcon(struct obj_data *obj);
void name_to_drinkcon(struct obj_data *obj, int type);
void weight_change_object(struct obj_data *obj, int weight);
/* functions with subcommands */
/* do_drop */
ACMD(do_drop);
#define SCMD_DROP 0
#define SCMD_JUNK 1
#define SCMD_DONATE 2
/* do_eat */
ACMD(do_eat);
#define SCMD_EAT 0
#define SCMD_TASTE 1
#define SCMD_DRINK 2
#define SCMD_SIP 3
/* do_pour */
ACMD(do_pour);
#define SCMD_POUR 0
#define SCMD_FILL 1
/* functions without subcommands */
ACMD(do_drink);
ACMD(do_get);
ACMD(do_give);
ACMD(do_grab);
ACMD(do_put);
ACMD(do_remove);
ACMD(do_sac);
ACMD(do_wear);
ACMD(do_wield);
/*****************************************************************************
* Begin Functions and defines for act.movement.c
****************************************************************************/
/* Functions with subcommands */
/* do_gen_door */
ACMD(do_gen_door);
#define SCMD_OPEN 0
#define SCMD_CLOSE 1
#define SCMD_UNLOCK 2
#define SCMD_LOCK 3
#define SCMD_PICK 4
/* Functions without subcommands */
ACMD(do_enter);
ACMD(do_follow);
ACMD(do_leave);
ACMD(do_move);
ACMD(do_rest);
ACMD(do_sit);
ACMD(do_sleep);
ACMD(do_stand);
ACMD(do_wake);
/* Global variables from act.movement.c */
#ifndef __ACT_MOVEMENT_C__
extern const char *cmd_door[];
#endif /* __ACT_MOVEMENT_C__ */
/*****************************************************************************
* Begin Functions and defines for act.offensive.c
****************************************************************************/
/* Functions with subcommands */
/* do_hit */
ACMD(do_hit);
#define SCMD_HIT 0
#define SCMD_MURDER 1
/* Functions without subcommands */
ACMD(do_assist);
ACMD(do_bash);
ACMD(do_backstab);
ACMD(do_flee);
ACMD(do_kick);
ACMD(do_kill);
ACMD(do_order);
ACMD(do_rescue);
/*****************************************************************************
* Begin Functions and defines for act.other.c
****************************************************************************/
/* Functions with subcommands */
/* do_gen_tog */
ACMD(do_gen_tog);
#define SCMD_NOSUMMON 0
#define SCMD_NOHASSLE 1
#define SCMD_BRIEF 2
#define SCMD_COMPACT 3
#define SCMD_NOTELL 4
#define SCMD_NOAUCTION 5
#define SCMD_NOSHOUT 6
#define SCMD_NOGOSSIP 7
#define SCMD_NOGRATZ 8
#define SCMD_NOWIZ 9
#define SCMD_QUEST 10
#define SCMD_SHOWVNUMS 11
#define SCMD_NOREPEAT 12
#define SCMD_HOLYLIGHT 13
#define SCMD_SLOWNS 14
#define SCMD_AUTOEXIT 15
#define SCMD_TRACK 16
#define SCMD_CLS 17
#define SCMD_BUILDWALK 18
#define SCMD_AFK 19
#define SCMD_COLOR 20
#define SCMD_SYSLOG 21
#define SCMD_WIMPY 22
#define SCMD_PAGELENGTH 23
#define SCMD_AUTOLOOT 24 /**< Placeholder, currently unused */
#define SCMD_AUTOGOLD 25 /**< Placeholder, currently unused */
#define SCMD_AUTOSPLIT 26 /**< Placeholder, currently unused */
#define SCMD_AUTOSAC 27 /**< Placeholder, currently unused */
#define SCMD_AUTOASSIST 28 /**< Placeholder, currently unused */
#define SCMD_SCREENWIDTH 29
#define SCMD_AUTOMAP 30
/* do_gen_write */
ACMD(do_gen_write);
#define SCMD_BUG 0
#define SCMD_TYPO 1
#define SCMD_IDEA 2
/* do_quit */
ACMD(do_quit);
#define SCMD_QUI 0
#define SCMD_QUIT 1
/* do_use */
ACMD(do_use);
#define SCMD_USE 0
#define SCMD_QUAFF 1
#define SCMD_RECITE 2
/* Functions without subcommands */
ACMD(do_display);
ACMD(do_group);
ACMD(do_hide);
ACMD(do_not_here);
ACMD(do_practice);
ACMD(do_report);
ACMD(do_save);
ACMD(do_sneak);
ACMD(do_split);
ACMD(do_steal);
ACMD(do_title);
ACMD(do_ungroup);
ACMD(do_visible);
/*****************************************************************************
* Begin Functions and defines for act.social.c
****************************************************************************/
/* Utility Functions */
void free_social_messages(void);
/** @todo free_action should be moved to a utility function module. */
void free_action(struct social_messg *mess);
/** @todo command list functions probably belong in interpreter */
void free_command_list(void);
/** @todo command list functions probably belong in interpreter */
void create_command_list(void);
/* Functions without subcommands */
ACMD(do_action);
ACMD(do_gmote);
/*****************************************************************************
* Begin Functions and defines for act.wizard.c
****************************************************************************/
/* Utility Functions */
/** @todo should probably be moved to a more general file handler module */
void clean_llog_entries(void);
/** @todo This should be moved to a more general utility file */
room_rnum find_target_room(struct char_data *ch, char *rawroomstr);
void perform_immort_vis(struct char_data *ch);
void snoop_check(struct char_data *ch);
/* Functions with subcommands */
/* do_date */
ACMD(do_date);
#define SCMD_DATE 0
#define SCMD_UPTIME 1
/* do_echo */
ACMD(do_echo);
#define SCMD_ECHO 0
#define SCMD_EMOTE 1
/* do_last */
ACMD(do_last);
#define SCMD_LIST_ALL 1
/* do_shutdown */
ACMD(do_shutdown);
#define SCMD_SHUTDOW 0
#define SCMD_SHUTDOWN 1
/* do_wizutil */
ACMD(do_wizutil);
#define SCMD_REROLL 0
#define SCMD_PARDON 1
#define SCMD_NOTITLE 2
#define SCMD_MUTE 3
#define SCMD_FREEZE 4
#define SCMD_THAW 5
#define SCMD_UNAFFECT 6
/* Functions without subcommands */
ACMD(do_advance);
ACMD(do_at);
ACMD(do_checkloadstatus);
ACMD(do_copyover);
ACMD(do_dc);
ACMD(do_changelog);
ACMD(do_file);
ACMD(do_force);
ACMD(do_gecho);
ACMD(do_goto);
ACMD(do_invis);
ACMD(do_links);
/** @todo function intentionally unused? */
ACMD(do_list_llog_entries);
ACMD(do_load);
ACMD(do_peace);
ACMD(do_plist);
ACMD(do_purge);
ACMD(do_restore);
ACMD(do_return);
ACMD(do_saveall);
ACMD(do_send);
ACMD(do_set);
ACMD(do_show);
ACMD(do_snoop);
ACMD(do_stat);
ACMD(do_switch);
ACMD(do_teleport);
ACMD(do_trans);
ACMD(do_vnum);
ACMD(do_vstat);
ACMD(do_wizlock);
ACMD(do_wiznet);
ACMD(do_wizupdate);
ACMD(do_zcheck);
ACMD(do_zpurge);
ACMD(do_zreset);
#endif /* _ACT_H_ */

23
src/asciimap.h Normal file
View file

@ -0,0 +1,23 @@
/**************************************************************************
* File: asciimap.h Part of tbaMUD *
* Usage: Generates an ASCII map of the player's surroundings. *
* *
* All rights reserved. See license for complete information. *
* *
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
**************************************************************************/
#ifndef ASCIIMAP_H_
#define ASCIIMAP_H_
/* Map options (settable in cedit) */
#define MAP_OFF 0
#define MAP_ON 1
#define MAP_IMM_ONLY 2
/* Exported function prototypes */
bool can_see_map(struct char_data *ch);
void str_and_map(char *str, struct char_data *ch );
ACMD(do_map);
#endif /* ASCIIMAP_H_*/

55
src/ban.h Normal file
View file

@ -0,0 +1,55 @@
/**
* @file boards.h
* Header file for the bulletin board system (boards.c).
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @todo Utility functions that could easily be moved elsewhere have been
* marked. Suggest a review of all utility functions (aka. non ACMDs) and
* determine if the utility functions should be placed into a lower level
* shared module.
*
*/
#ifndef _BAN_H_
#define _BAN_H_
/* don't change these */
#define BAN_NOT 0
#define BAN_NEW 1
#define BAN_SELECT 2
#define BAN_ALL 3
#define BANNED_SITE_LENGTH 50
struct ban_list_element {
char site[BANNED_SITE_LENGTH+1];
int type;
time_t date;
char name[MAX_NAME_LENGTH+1];
struct ban_list_element *next;
};
/* Global functions */
/* Utility Functions */
void load_banned(void);
int isbanned(char *hostname);
int valid_name(char *newname);
void read_invalid_list(void);
void free_invalid_list(void);
/* Command functions without subcommands */
ACMD(do_ban);
ACMD(do_unban);
/* Global buffering */
#ifndef __BAN_C__
extern struct ban_list_element *ban_list;
extern int num_invalid;
#endif /*__BAN_C__ */
#endif /* _BAN_H_*/

41
src/class.h Normal file
View file

@ -0,0 +1,41 @@
/**
* @file class.h
* Header file for class specific functions and variables.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
*/
#ifndef _CLASS_H_
#define _CLASS_H_
/* Functions available through class.c */
int backstab_mult(int level);
void do_start(struct char_data *ch);
bitvector_t find_class_bitvector(const char *arg);
int invalid_class(struct char_data *ch, struct obj_data *obj);
int level_exp(int chclass, int level);
int parse_class(char arg);
void roll_real_abils(struct char_data *ch);
byte saving_throws(int class_num, int type, int level);
int thaco(int class_num, int level);
const char *title_female(int chclass, int level);
const char *title_male(int chclass, int level);
/* Global variables */
#ifndef __CLASS_C__
extern const char *class_abbrevs[];
extern const char *pc_class_types[];
extern const char *class_menu;
extern int prac_params[][NUM_CLASSES];
extern struct guild_info_type guild_info[];
#endif /* __CLASS_C__ */
#endif /* _CLASS_H_*/

85
src/config.h Normal file
View file

@ -0,0 +1,85 @@
/**
* @file comm.h
* Configuration of various aspects of tbaMUD operation.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_
#ifndef __CONFIG_C__
/* Global variable declarations, all settable by cedit */
extern int pk_allowed;
extern int pt_allowed;
extern int level_can_shout;
extern int holler_move_cost;
extern int tunnel_size;
extern int max_exp_gain;
extern int max_exp_loss;
extern int max_npc_corpse_time;
extern int max_pc_corpse_time;
extern int idle_void;
extern int idle_rent_time;
extern int idle_max_level;
extern int dts_are_dumps;
extern int load_into_inventory;
extern const char *OK;
extern const char *NOPERSON;
extern const char *NOEFFECT;
extern int track_through_doors;
extern int no_mort_to_immort;
extern int free_rent;
extern int max_obj_save;
extern int min_rent_cost;
extern int auto_save;
extern int autosave_time;
extern int crash_file_timeout;
extern int rent_file_timeout;
/* Room Numbers */
extern room_vnum mortal_start_room;
extern room_vnum immort_start_room;
extern room_vnum frozen_start_room;
extern room_vnum donation_room_1;
extern room_vnum donation_room_2;
extern room_vnum donation_room_3;
/* Game Operation settings */
extern ush_int DFLT_PORT;
extern const char *DFLT_IP;
extern const char *DFLT_DIR;
extern const char *LOGNAME;
extern int max_playing;
extern int max_filesize;
extern int max_bad_pws;
extern int siteok_everyone;
extern int nameserver_is_slow;
extern int auto_save_olc;
extern int use_new_socials;
extern const char *MENU;
extern const char *WELC_MESSG;
extern const char *START_MESSG;
extern int use_autowiz;
extern int min_wizlist_lev;
extern int display_closed_doors;
/* Automap and map options */
extern int map_option;
extern int default_map_size;
extern int default_minimap_size;
/*
* Variables not controlled by cedit
*/
/* Game operation settings. */
extern int bitwarning;
extern int bitsavetodisk;
extern int auto_pwipe;
extern struct pclean_criteria_data pclean_criteria[];
extern int selfdelete_fastwipe;
#endif /* __CONFIG_C__ */
#endif /* _CONFIG_H_*/

47
src/fight.h Normal file
View file

@ -0,0 +1,47 @@
/**
* @file fight.h
* Fighting and violence functions and variables.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
*/
#ifndef _FIGHT_H_
#define _FIGHT_H_
/* Structures and defines */
/* Attacktypes with grammar */
struct attack_hit_type {
const char *singular;
const char *plural;
};
/* Functions available in fight.c */
void appear(struct char_data *ch);
void check_killer(struct char_data *ch, struct char_data *vict);
int compute_armor_class(struct char_data *ch);
int damage(struct char_data *ch, struct char_data *victim, int dam, int attacktype);
void death_cry(struct char_data *ch);
void die(struct char_data * ch, struct char_data * killer);
void free_messages(void);
void hit(struct char_data *ch, struct char_data *victim, int type);
void load_messages(void);
void perform_violence(void);
void raw_kill(struct char_data * ch, struct char_data * killer);
void set_fighting(struct char_data *ch, struct char_data *victim);
int skill_message(int dam, struct char_data *ch, struct char_data *vict,
int attacktype);
void stop_fighting(struct char_data *ch);
/* Global variables */
#ifndef __FIGHT_C__
extern struct attack_hit_type attack_hit_text[];
extern struct char_data *combat_list;
#endif /* __FIGHT_C__ */
#endif /* _FIGHT_H_*/

20
src/graph.h Normal file
View file

@ -0,0 +1,20 @@
/**
* @file graph.h
* Header file for Various graph algorithms.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @todo the functions here should perhaps be a part of another module?
*/
#ifndef _GRAPH_H_
#define _GRAPH_H_
ACMD(do_track);
void hunt_victim(struct char_data *ch);
#endif /* _GRAPH_H_*/

33
src/hedit.h Normal file
View file

@ -0,0 +1,33 @@
/**
* @file hedit.h
* Oasis OLC Help Editor.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* Author: Steve Wolfe, Scott Meisenholder, Rhade
* All rights reserved. See license.doc for complete information.
* Copyright (C) 2007 by Rhade
* InfoTechMUD is based on CircleMUD, Copyright (C) 1993, 1994.
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
*/
#ifndef _HEDIT_H_
#define _HEDIT_H_
#include "utils.h" /* for ACMD definition */
/* Functions made externally available */
/* Utility functions */
/*
* All the following functions are declared in oasis.h
void hedit_parse(struct descriptor_data *, char *);
void hedit_string_cleanup(struct descriptor_data *, int);
ACMD(do_oasis_hedit);
*/
/* Action fuctions */
ACMD(do_helpcheck);
ACMD(do_hindex);
#endif /* _HEDIT_H_*/

36
src/modify.h Normal file
View file

@ -0,0 +1,36 @@
/**
* @file modify.h
* Header file for the modify module.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
* @todo This module is originally defined as 'Run-time modification of game
* variables.' I believe it has digressed from the original intent. This
* header file is created to help redefine (over time) what the heck modify.h
* is. For example, publicly functions declared in comm.h but defined in modify.c
* should have their declarations moved here.
*
*/
#ifndef _MODIFY_H_
#define _MODIFY_H_
/* Public functions */
void show_string(struct descriptor_data *d, char *input);
void smash_tilde(char *str);
void paginate_string(char *str, struct descriptor_data *d);
/** @todo should this really be in modify.c? */
ACMD(do_skillset);
/* Following function prototypes moved here from comm.h */
void string_write(struct descriptor_data *d, char **txt, size_t len, long mailto, void *data);
void string_add(struct descriptor_data *d, char *str);
void page_string(struct descriptor_data *d, char *str, int keep_internal);
/* page string function & defines */
#define PAGE_LENGTH 22
#define PAGE_WIDTH 80
#endif /* _MODIFY_H_*/

50
src/spec_procs.h Normal file
View file

@ -0,0 +1,50 @@
/**
* @file spec_procs.h
* Header file for special procedure modules. This file groups a lot of the
* legacy special procedures found in spec_procs.c and castle.c.
*
* Part of the core tbaMUD source code distribution, which is a derivative
* of, and continuation of, CircleMUD.
*
* All rights reserved. See license for complete information.
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
*/
#ifndef _SPEC_PROCS_H_
#define _SPEC_PROCS_H_
/*****************************************************************************
* Begin Functions and defines for castle.c
****************************************************************************/
void assign_kings_castle(void);
/*****************************************************************************
* Begin Functions and defines for spec_assign.c
****************************************************************************/
void assign_mobiles(void);
void assign_objects(void);
void assign_rooms(void);
/*****************************************************************************
* Begin Functions and defines for spec_procs.c
****************************************************************************/
/* Utility functions */
void sort_spells(void);
void list_skills(struct char_data *ch);
/* Special functions */
SPECIAL(guild);
SPECIAL(dump);
SPECIAL(mayor);
SPECIAL(snake);
SPECIAL(thief);
SPECIAL(magic_user);
SPECIAL(guild_guard);
SPECIAL(puff);
SPECIAL(fido);
SPECIAL(janitor);
SPECIAL(cityguard);
SPECIAL(pet_shops);
SPECIAL(bank);
#endif /* _SPEC_PROCS_H_ */