mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Renamed numerous functions more sensibly and moved all single protos from .h to appropriate .c
This commit is contained in:
parent
6e584e104e
commit
5e5ad41afc
33 changed files with 1626 additions and 689 deletions
72
ChangeLog
72
ChangeLog
|
@ -1,11 +1,68 @@
|
|||
CircleMUD 3.5 is currently being developed by The Builder Academy. If you need
|
||||
any help stop by: builderacademy.net 9091
|
||||
tbaMUD is currently being developed by The Builder Academy. If you need any
|
||||
help or find any bugs please stop by: builderacademy.net 9091
|
||||
|
||||
Unfortunately this changelog is far from complete since TBA has not kept a
|
||||
record of every change in the last 4 years:
|
||||
todo:
|
||||
- Change numerous SYSERR logs to Warnings.
|
||||
- Change all doc/pdf's to .txt.
|
||||
|
||||
- Moved numerous protos only used once from .h files to appropriate .c file.
|
||||
- Renamed numerous functions for clarity (mostly shop functions like copy_list
|
||||
to copy_shop_list, etc).
|
||||
- Renamed update_objects to update_all_objects so it wouldn't be confused with
|
||||
update_object.
|
||||
- Renamed data to dg_data in function queue_head in dg_event.c for clarity.
|
||||
- Moved function log_death_trap to a log since that is all it did anyways.
|
||||
- Renamed unmatched gettimeofday protos.
|
||||
- Renamed oasis_copy.o and oasis_list.o to appropriate .c for CXREF_FILES.
|
||||
- Fixed a bunch of strange bugs in objsave.c and altered build_player_index()
|
||||
to conform to gcc 4.1 standards. This mainly consisted of removing a cast
|
||||
which was not needed.
|
||||
- Replaced kill_ems() with strip_cr(), for consistency.
|
||||
- Updated Makefile.*.
|
||||
- Removed redundant olc.c, oasis_delete.c, olc.h and tedit.h files from the
|
||||
build. Added prototypes for the new variable save functions to players.c
|
||||
- DG script variables now save to the player file instead of their own file.
|
||||
The load function has been kept for backwards compatibility.
|
||||
- Moved alias saving to Ascii pflies by default. Aliases in the old files will
|
||||
still be read (once per char).
|
||||
- do_toggle actually toggles everything now (thanks to Rhade). Moved slowns,
|
||||
track, syslog, pagelength, wimpy, and color to toggle <option> <arg>. Keeping
|
||||
do_gen_tog so the old command toggles still work.
|
||||
- Immortals no longer have to pay to mudmail.
|
||||
- Autosaved aliases.
|
||||
- Added afk to do_set.
|
||||
- Removed unused olc_bitvector and save_etext functions.
|
||||
- Added min_level check to hindex.
|
||||
- Fixed zlist and index files
|
||||
- Changed PRF_ROOMFLAGS to PRF_SHOWVNUMS.
|
||||
- Mini world zone 0, 12, 30 error free (Added 1.trg to index.mini for examples)
|
||||
- Updated errors for no time/config files.
|
||||
- Added -l(eader) and -g(rouped) options to do_who (thanks Rhade).
|
||||
- Added MERC license and help entry.
|
||||
- Spellchecked stock.hlp.
|
||||
- Updated fixes from 3.1 CVS snapshot.
|
||||
- Fixed permissions on numerous files.
|
||||
- Moved do_cheat into do_return.
|
||||
- Renamed shit, no really in zmalloc.c unsigned char * shit;
|
||||
- Spellchecked help.hlp.
|
||||
- Updated /doc/README.Cygwin.
|
||||
- Updated /doc/syserr.txt (much more to do though, along with all /doc,
|
||||
submissions welcome).
|
||||
- Modified all comments referring to old playerfile and removed obsolete code.
|
||||
- Removed .accepted, conf.h, and Makefile.
|
||||
- Moved text/hedit to text/help directory. Now 2 help files to choose from
|
||||
help.hlp (TBA's helpfiles) and stock.hlp.
|
||||
- Fixed error from adding poofs to do_stat and not checking !IS_NPC.
|
||||
- Fixed help search so it checks player level so HELP AC can exist as a mortal
|
||||
helpfile and an immortal helpfile.
|
||||
- Fixed hindex to check help entry level.
|
||||
- Added house saving call to do_saveall.
|
||||
|
||||
CircleMUD 3.5
|
||||
- New do_who by Rhade.
|
||||
- Core files generated with unique time stamp.
|
||||
- Updated README, FAQ, news.
|
||||
- Removed all CIRCLEMUD_VERSION checks.
|
||||
- Removed all CIRCLEMUD_VERSION and #IF 0 debugging checks.
|
||||
- Renamed _DEAF to _NOSHOUT.
|
||||
- Added greetings, ihelp, wizlist, and immlist to tedit.
|
||||
- Changed all usage of dscr to desc for standardization.
|
||||
|
@ -18,7 +75,7 @@ record of every change in the last 4 years:
|
|||
level specified in do_cheat. IDNUM 1 advanced to IMPL
|
||||
- Changed OLC to default to off, again.
|
||||
- Added Ascii Pfiles V3.0.1
|
||||
- Added pagelength (needs to be moved to toggle).
|
||||
- Added pagelength to toggle.
|
||||
- Update to list_obj_to_char for object stacking and iedit objects.
|
||||
- Increased MAX_STRING_LENGTH to 49152.
|
||||
- Moved poofin/out to set self poofin/out.
|
||||
|
@ -169,7 +226,8 @@ record of every change in the last 4 years:
|
|||
- Added buildwalk and dig.
|
||||
|
||||
Release history:
|
||||
Version 3.5 release: December 2006
|
||||
Version 3.51 release: January, 2007
|
||||
Version 3.5 release: December 11, 2006
|
||||
Version 3.1 (yes, no beta pl): November 18, 2002
|
||||
Version 3.00 beta pl22 release: October 4, 2002
|
||||
Version 3.00 beta pl21 release: April 15, 2002
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -42,8 +42,8 @@ CXREF_FILES = act.comm.c act.informative.c act.item.c act.movement.c \
|
|||
boards.c castle.c cedit.c class.c comm.c config.c constants.c db.c \
|
||||
fight.c genmob.c genobj.c genolc.c genshp.c genwld.c genzon.c graph.c \
|
||||
handler.c house.c improved-edit.c interpreter.c limits.c magic.c mail.c \
|
||||
medit.c mobact.c modify.c oasis.c oasis_copy.o oasis_delete.c \
|
||||
oasis_list.o objsave.c oedit.c olc.c random.c redit.c sedit.c \
|
||||
medit.c mobact.c modify.c oasis.c oasis_copy.c oasis_delete.c \
|
||||
oasis_list.c objsave.c oedit.c olc.c random.c redit.c sedit.c \
|
||||
shop.c spec_assign.c spec_procs.c spell_parser.c spells.c tedit.c \
|
||||
utils.c weather.c zedit.c hedit.c bsd-snprintf.c players.c
|
||||
|
||||
|
|
|
@ -4131,7 +4131,7 @@ ACMD(do_zpurge)
|
|||
for (vroom = zone_table[zone].bot; vroom <= zone_table[zone].top; vroom++) {
|
||||
purge_room(real_room(vroom));
|
||||
}
|
||||
send_to_char(ch, "Purged zone %d (#%d): %s.\r\n", zone, zone_table[zone].number, zone_table[zone].name);
|
||||
send_to_char(ch, "Purged zone #%d: %s.\r\n", zone_table[zone].number, zone_table[zone].name);
|
||||
mudlog(NRM, MAX(LVL_GRGOD, GET_INVIS_LEV(ch)), TRUE, "(GC) %s purged zone %d (%s)", GET_NAME(ch), zone, zone_table[zone].name);
|
||||
}
|
||||
else {
|
||||
|
|
5
src/db.h
5
src/db.h
|
@ -130,6 +130,8 @@ void save_mud_time(struct time_info_data *when);
|
|||
void free_text_files(void);
|
||||
void free_help_table(void);
|
||||
void free_player_index(void);
|
||||
void load_help(FILE *fl, char *name);
|
||||
void clean_pfiles(void);
|
||||
|
||||
zone_rnum real_zone(zone_vnum vnum);
|
||||
room_rnum real_room(room_vnum vnum);
|
||||
|
@ -146,7 +148,8 @@ void clear_char(struct char_data *ch);
|
|||
void reset_char(struct char_data *ch);
|
||||
void free_char(struct char_data *ch);
|
||||
void save_player_index(void);
|
||||
long get_ptable_by_name(const char *name);
|
||||
long get_ptable_by_name(const char *name);
|
||||
void remove_player(int pfilepos);
|
||||
|
||||
struct obj_data *create_obj(void);
|
||||
void clear_object(struct obj_data *obj);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "dg_olc.h"
|
||||
#include "dg_event.h"
|
||||
|
||||
/* prototype externally defined functions */
|
||||
/* external functions */
|
||||
extern const char *trig_types[], *otrig_types[], *wtrig_types[];
|
||||
zone_rnum real_zone_by_thing(room_vnum vznum);
|
||||
|
||||
|
@ -36,6 +36,8 @@ void trigedit_save(struct descriptor_data *d);
|
|||
void trigedit_create_index(int znum, char *type);
|
||||
void trigedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
int format_script(struct descriptor_data *d);
|
||||
void trigedit_setup_existing(struct descriptor_data *d, int rtrg_num);
|
||||
void trigedit_setup_new(struct descriptor_data *d);
|
||||
|
||||
/* ***********************************************************************
|
||||
* trigedit
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#include "genzon.h"
|
||||
#include "dg_olc.h"
|
||||
|
||||
/* local functions */
|
||||
void extract_mobile_all(mob_vnum vnum);
|
||||
|
||||
int add_mobile(struct char_data *mob, mob_vnum vnum)
|
||||
{
|
||||
int rnum, i, found = FALSE, shop, cmd_no;
|
||||
|
@ -162,7 +165,7 @@ int delete_mobile(mob_rnum refpt)
|
|||
for (zone = 0; zone <= top_of_zone_table; zone++)
|
||||
for (cmd_no = 0; ZCMD(zone, cmd_no).command != 'S'; cmd_no++)
|
||||
if (ZCMD(zone, cmd_no).command == 'M' && ZCMD(zone, cmd_no).arg1 == refpt)
|
||||
delete_command(&zone_table[zone], cmd_no);
|
||||
delete_zone_command(&zone_table[zone], cmd_no);
|
||||
|
||||
/*
|
||||
* Update shop keepers.
|
||||
|
|
|
@ -11,7 +11,6 @@ int copy_mob_strings(struct char_data *to, struct char_data *from);
|
|||
int free_mob_strings(struct char_data *);
|
||||
int free_mobile(struct char_data *mob);
|
||||
int save_mobiles(zone_rnum rznum);
|
||||
void extract_mobile_all(mob_vnum vnum);
|
||||
int update_mobile_strings(struct char_data *t, struct char_data *f);
|
||||
void check_mobile_strings(struct char_data *mob);
|
||||
void check_mobile_string(mob_vnum i, char **string, const char *desc);
|
||||
|
|
12
src/genobj.c
12
src/genobj.c
|
@ -23,6 +23,8 @@ extern struct board_info_type board_info[];
|
|||
|
||||
/* local functions */
|
||||
void free_object_strings_proto(struct obj_data *obj);
|
||||
int update_all_objects(struct obj_data *obj);
|
||||
void copy_object_strings(struct obj_data *to, struct obj_data *from);
|
||||
|
||||
obj_rnum add_object(struct obj_data *newobj, obj_vnum ovnum)
|
||||
{
|
||||
|
@ -34,7 +36,7 @@ obj_rnum add_object(struct obj_data *newobj, obj_vnum ovnum)
|
|||
*/
|
||||
if ((newobj->item_number = real_object(ovnum)) != NOTHING) {
|
||||
copy_object(&obj_proto[newobj->item_number], newobj);
|
||||
update_objects(&obj_proto[newobj->item_number]);
|
||||
update_all_objects(&obj_proto[newobj->item_number]);
|
||||
add_to_save_list(zone_table[rznum].number, SL_OBJ);
|
||||
return newobj->item_number;
|
||||
}
|
||||
|
@ -54,7 +56,7 @@ obj_rnum add_object(struct obj_data *newobj, obj_vnum ovnum)
|
|||
* if object is pointing to this prototype, then we need to replace it
|
||||
* with the new one.
|
||||
*/
|
||||
int update_objects(struct obj_data *refobj)
|
||||
int update_all_objects(struct obj_data *refobj)
|
||||
{
|
||||
struct obj_data *obj, swap;
|
||||
int count = 0;
|
||||
|
@ -483,7 +485,7 @@ int delete_object(obj_rnum rnum)
|
|||
switch (ZCMD(zone, cmd_no).command) {
|
||||
case 'P':
|
||||
if (ZCMD(zone, cmd_no).arg3 == rnum) {
|
||||
delete_command(&zone_table[zone], cmd_no);
|
||||
delete_zone_command(&zone_table[zone], cmd_no);
|
||||
} else
|
||||
ZCMD(zone, cmd_no).arg3 -= (ZCMD(zone, cmd_no).arg3 > rnum);
|
||||
break;
|
||||
|
@ -491,13 +493,13 @@ int delete_object(obj_rnum rnum)
|
|||
case 'G':
|
||||
case 'E':
|
||||
if (ZCMD(zone, cmd_no).arg1 == rnum) {
|
||||
delete_command(&zone_table[zone], cmd_no);
|
||||
delete_zone_command(&zone_table[zone], cmd_no);
|
||||
} else
|
||||
ZCMD(zone, cmd_no).arg1 -= (ZCMD(zone, cmd_no).arg1 > rnum);
|
||||
break;
|
||||
case 'R':
|
||||
if (ZCMD(zone, cmd_no).arg2 == rnum) {
|
||||
delete_command(&zone_table[zone], cmd_no);
|
||||
delete_zone_command(&zone_table[zone], cmd_no);
|
||||
} else
|
||||
ZCMD(zone, cmd_no).arg2 -= (ZCMD(zone, cmd_no).arg2 > rnum);
|
||||
break;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
* Copyright 1997-2001 by George Greer (greerga@circlemud.org) *
|
||||
************************************************************************/
|
||||
|
||||
void copy_object_strings(struct obj_data *to, struct obj_data *from);
|
||||
void free_object_strings(struct obj_data *obj);
|
||||
int copy_object(struct obj_data *to, struct obj_data *from);
|
||||
int copy_object_preserve(struct obj_data *to, struct obj_data *from);
|
||||
|
|
32
src/genshp.c
32
src/genshp.c
|
@ -19,6 +19,12 @@
|
|||
* as the other editors with regard to updates or style.
|
||||
*/
|
||||
|
||||
/* local functions */
|
||||
void copy_shop_list(IDXTYPE **tlist, IDXTYPE *flist);
|
||||
void copy_shop_type_list(struct shop_buy_data **tlist, struct shop_buy_data *flist);
|
||||
void free_shop_strings(struct shop_data *shop);
|
||||
void free_shop_type_list(struct shop_buy_data **list);
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void copy_shop(struct shop_data *tshop, struct shop_data *fshop, int free_old_strings)
|
||||
|
@ -44,9 +50,9 @@ void copy_shop(struct shop_data *tshop, struct shop_data *fshop, int free_old_st
|
|||
/*
|
||||
* Copy lists over.
|
||||
*/
|
||||
copy_list(&(S_ROOMS(tshop)), S_ROOMS(fshop));
|
||||
copy_list(&(S_PRODUCTS(tshop)), S_PRODUCTS(fshop));
|
||||
copy_type_list(&(tshop->type), fshop->type);
|
||||
copy_shop_list(&(S_ROOMS(tshop)), S_ROOMS(fshop));
|
||||
copy_shop_list(&(S_PRODUCTS(tshop)), S_PRODUCTS(fshop));
|
||||
copy_shop_type_list(&(tshop->type), fshop->type);
|
||||
|
||||
/*
|
||||
* Copy notification strings over.
|
||||
|
@ -68,7 +74,7 @@ void copy_shop(struct shop_data *tshop, struct shop_data *fshop, int free_old_st
|
|||
/*
|
||||
* Copy a 'NOTHING' terminated integer array list.
|
||||
*/
|
||||
void copy_list(IDXTYPE **tlist, IDXTYPE *flist)
|
||||
void copy_shop_list(IDXTYPE **tlist, IDXTYPE *flist)
|
||||
{
|
||||
int num_items, i;
|
||||
|
||||
|
@ -99,12 +105,12 @@ void copy_list(IDXTYPE **tlist, IDXTYPE *flist)
|
|||
* Copy a -1 terminated (in the type field) shop_buy_data
|
||||
* array list.
|
||||
*/
|
||||
void copy_type_list(struct shop_buy_data **tlist, struct shop_buy_data *flist)
|
||||
void copy_shop_type_list(struct shop_buy_data **tlist, struct shop_buy_data *flist)
|
||||
{
|
||||
int num_items, i;
|
||||
|
||||
if (*tlist)
|
||||
free_type_list(tlist);
|
||||
free_shop_type_list(tlist);
|
||||
|
||||
/*
|
||||
* Count number of entries.
|
||||
|
@ -129,7 +135,7 @@ void copy_type_list(struct shop_buy_data **tlist, struct shop_buy_data *flist)
|
|||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void remove_from_type_list(struct shop_buy_data **list, int num)
|
||||
void remove_shop_from_type_list(struct shop_buy_data **list, int num)
|
||||
{
|
||||
int i, num_items;
|
||||
struct shop_buy_data *nlist;
|
||||
|
@ -155,7 +161,7 @@ void remove_from_type_list(struct shop_buy_data **list, int num)
|
|||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void add_to_type_list(struct shop_buy_data **list, struct shop_buy_data *newl)
|
||||
void add_shop_to_type_list(struct shop_buy_data **list, struct shop_buy_data *newl)
|
||||
{
|
||||
int i, num_items;
|
||||
struct shop_buy_data *nlist;
|
||||
|
@ -185,7 +191,7 @@ void add_to_type_list(struct shop_buy_data **list, struct shop_buy_data *newl)
|
|||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void add_to_int_list(IDXTYPE **list, IDXTYPE newi)
|
||||
void add_shop_to_int_list(IDXTYPE **list, IDXTYPE newi)
|
||||
{
|
||||
IDXTYPE i, num_items, *nlist;
|
||||
|
||||
|
@ -214,7 +220,7 @@ void add_to_int_list(IDXTYPE **list, IDXTYPE newi)
|
|||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
void remove_from_int_list(IDXTYPE **list, IDXTYPE num)
|
||||
void remove_shop_from_int_list(IDXTYPE **list, IDXTYPE num)
|
||||
{
|
||||
IDXTYPE i, num_items, *nlist;
|
||||
|
||||
|
@ -282,7 +288,7 @@ void free_shop_strings(struct shop_data *shop)
|
|||
/*
|
||||
* Free a type list and all the strings it contains.
|
||||
*/
|
||||
void free_type_list(struct shop_buy_data **list)
|
||||
void free_shop_type_list(struct shop_buy_data **list)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -302,7 +308,7 @@ void free_type_list(struct shop_buy_data **list)
|
|||
void free_shop(struct shop_data *shop)
|
||||
{
|
||||
free_shop_strings(shop);
|
||||
free_type_list(&(S_NAMELISTS(shop)));
|
||||
free_shop_type_list(&(S_NAMELISTS(shop)));
|
||||
free(S_ROOMS(shop));
|
||||
free(S_PRODUCTS(shop));
|
||||
free(shop);
|
||||
|
@ -340,7 +346,7 @@ shop_rnum real_shop(shop_vnum vnum)
|
|||
/*
|
||||
* Generic string modifier for shop keeper messages.
|
||||
*/
|
||||
void modify_string(char **str, char *new_s)
|
||||
void modify_shop_string(char **str, char *new_s)
|
||||
{
|
||||
|
||||
char buf[MAX_STRING_LENGTH];
|
||||
|
|
14
src/genshp.h
14
src/genshp.h
|
@ -5,17 +5,13 @@
|
|||
************************************************************************/
|
||||
|
||||
void copy_shop(struct shop_data *tshop, struct shop_data *fshop, int free_old_strings);
|
||||
void copy_list(IDXTYPE **tlist, IDXTYPE *flist);
|
||||
void copy_type_list(struct shop_buy_data **tlist, struct shop_buy_data *flist);
|
||||
void remove_from_type_list(struct shop_buy_data **list, int num);
|
||||
void remove_from_int_list(IDXTYPE **list, IDXTYPE num);
|
||||
void add_to_type_list(struct shop_buy_data **list, struct shop_buy_data *newl);
|
||||
void add_to_int_list(IDXTYPE **tlist, IDXTYPE newi);
|
||||
void remove_shop_from_type_list(struct shop_buy_data **list, int num);
|
||||
void remove_shop_from_int_list(IDXTYPE **list, IDXTYPE num);
|
||||
void add_shop_to_type_list(struct shop_buy_data **list, struct shop_buy_data *newl);
|
||||
void add_shop_to_int_list(IDXTYPE **tlist, IDXTYPE newi);
|
||||
void free_shop_string(struct shop_data *shop);
|
||||
void free_type_list(struct shop_buy_data **list);
|
||||
void free_shop(struct shop_data *shop);
|
||||
void free_shop_strings(struct shop_data *shop);
|
||||
void modify_string(char **str, char *newstr);
|
||||
void modify_shop_string(char **str, char *newstr);
|
||||
int add_shop(struct shop_data *shop);
|
||||
int save_shops(zone_rnum zone_num);
|
||||
shop_rnum real_shop(shop_vnum vnum);
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
#include "genzon.h"
|
||||
#include "dg_scripts.h"
|
||||
|
||||
/* local functions */
|
||||
void create_world_index(int znum, const char *type);
|
||||
void remove_cmd_from_list(struct reset_com **list, int pos);
|
||||
|
||||
/* real zone of room/mobile/object/shop given */
|
||||
zone_rnum real_zone_by_thing(room_vnum vznum)
|
||||
{
|
||||
|
@ -579,7 +583,7 @@ int new_command(struct zone_data *zone, int pos)
|
|||
/*
|
||||
* Error check user input and then remove command
|
||||
*/
|
||||
void delete_command(struct zone_data *zone, int pos)
|
||||
void delete_zone_command(struct zone_data *zone, int pos)
|
||||
{
|
||||
int subcmd = 0;
|
||||
|
||||
|
|
|
@ -5,14 +5,12 @@
|
|||
************************************************************************/
|
||||
|
||||
zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top, const char **error);
|
||||
void create_world_index(int znum, const char *type);
|
||||
void remove_room_zone_commands(zone_rnum zone, room_rnum room_num);
|
||||
int save_zone(zone_rnum zone_num);
|
||||
int count_commands(struct reset_com *list);
|
||||
void add_cmd_to_list(struct reset_com **list, struct reset_com *newcmd, int pos);
|
||||
void remove_cmd_from_list(struct reset_com **list, int pos);
|
||||
int new_command(struct zone_data *zone, int pos);
|
||||
void delete_command(struct zone_data *zone, int pos);
|
||||
void delete_zone_command(struct zone_data *zone, int pos);
|
||||
zone_rnum real_zone_by_thing(room_vnum vznum);
|
||||
|
||||
/* Make delete_zone() */
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "conf.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
|
||||
#include "structs.h"
|
||||
#include "utils.h"
|
||||
#include "comm.h"
|
||||
|
@ -31,6 +30,7 @@ extern struct char_data *combat_list;
|
|||
int apply_ac(struct char_data *ch, int eq_pos);
|
||||
void update_object(struct obj_data *obj, int use);
|
||||
void update_char_objects(struct char_data *ch);
|
||||
void affect_modify(struct char_data *ch, byte loc, sbyte mod, bitvector_t bitv, bool add);
|
||||
|
||||
/* external functions */
|
||||
int invalid_class(struct char_data *ch, struct obj_data *obj);
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
/* handling the affected-structures */
|
||||
void affect_total(struct char_data *ch);
|
||||
void affect_modify(struct char_data *ch, byte loc, sbyte mod, bitvector_t bitv, bool add);
|
||||
void affect_to_char(struct char_data *ch, struct affected_type *af);
|
||||
void affect_remove(struct char_data *ch, struct affected_type *af);
|
||||
void affect_from_char(struct char_data *ch, int type);
|
||||
|
@ -18,7 +17,6 @@ bool affected_by_spell(struct char_data *ch, int type);
|
|||
void affect_join(struct char_data *ch, struct affected_type *af,
|
||||
bool add_dur, bool avg_dur, bool add_mod, bool avg_mod);
|
||||
|
||||
|
||||
/* utility */
|
||||
const char *money_desc(int amount);
|
||||
struct obj_data *create_money(int amount);
|
||||
|
|
17
src/hedit.c
17
src/hedit.c
|
@ -19,19 +19,12 @@
|
|||
#include "handler.h"
|
||||
#include "improved-edit.h"
|
||||
|
||||
/* List each help entry saved, was used for debugging. */
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* External data structures.
|
||||
*/
|
||||
|
||||
/* external data structures */
|
||||
extern struct descriptor_data *descriptor_list;
|
||||
extern void strip_string(char *buffer);
|
||||
void hedit_disp_menu(struct descriptor_data *d);
|
||||
|
||||
/* 'global' vars */
|
||||
/* external variables */
|
||||
struct help_index_element *help_table;
|
||||
int top_of_h_table = 0; /* ref to top of help table */
|
||||
int top_of_h_file = 0; /* ref of size of help file */
|
||||
|
@ -40,6 +33,12 @@ void get_one_line(FILE *fl, char *buf);
|
|||
int search_help(struct char_data *ch, char *argument);
|
||||
ACMD(do_reboot);
|
||||
|
||||
/* local functions */
|
||||
void hedit_save_internally(struct descriptor_data *d);
|
||||
void hedit_save_to_disk(struct descriptor_data *d);
|
||||
void hedit_setup_new(struct descriptor_data *d, char *new_key);
|
||||
void hedit_setup_existing(struct descriptor_data *d, int rnum);
|
||||
|
||||
void load_help(FILE *fl, char *name)
|
||||
{
|
||||
char key[READ_SIZE + 1], next_key[READ_SIZE + 1], entry[32384];
|
||||
|
|
|
@ -40,6 +40,7 @@ void hcontrol_list_houses(struct char_data *ch);
|
|||
void hcontrol_build_house(struct char_data *ch, char *arg);
|
||||
void hcontrol_destroy_house(struct char_data *ch, char *arg);
|
||||
void hcontrol_pay_house(struct char_data *ch, char *arg);
|
||||
void House_listrent(struct char_data *ch, room_vnum vnum);
|
||||
ACMD(do_hcontrol);
|
||||
ACMD(do_house);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#define HOUSE_PRIVATE 0
|
||||
|
||||
|
||||
struct house_control_rec {
|
||||
room_vnum vnum; /* vnum of this house */
|
||||
room_vnum atrium; /* vnum of atrium */
|
||||
|
@ -24,13 +23,9 @@ struct house_control_rec {
|
|||
long spare7;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#define TOROOM(room, dir) (world[room].dir_option[dir] ? \
|
||||
world[room].dir_option[dir]->to_room : NOWHERE)
|
||||
|
||||
void House_listrent(struct char_data *ch, room_vnum vnum);
|
||||
void House_boot(void);
|
||||
void House_save_all(void);
|
||||
int House_can_enter(struct char_data *ch, room_vnum house);
|
||||
|
|
|
@ -49,40 +49,40 @@ int improved_editor_execute(struct descriptor_data *d, char *str)
|
|||
write_to_output(d, "Current buffer empty.\r\n");
|
||||
break;
|
||||
case 'd':
|
||||
parse_action(PARSE_DELETE, actions, d);
|
||||
parse_edit_action(PARSE_DELETE, actions, d);
|
||||
break;
|
||||
case 'e':
|
||||
parse_action(PARSE_EDIT, actions, d);
|
||||
parse_edit_action(PARSE_EDIT, actions, d);
|
||||
break;
|
||||
case 'f':
|
||||
if (*(d->str))
|
||||
parse_action(PARSE_FORMAT, actions, d);
|
||||
parse_edit_action(PARSE_FORMAT, actions, d);
|
||||
else
|
||||
write_to_output(d, "Current buffer empty.\r\n");
|
||||
break;
|
||||
case 'i':
|
||||
if (*(d->str))
|
||||
parse_action(PARSE_INSERT, actions, d);
|
||||
parse_edit_action(PARSE_INSERT, actions, d);
|
||||
else
|
||||
write_to_output(d, "Current buffer empty.\r\n");
|
||||
break;
|
||||
case 'h':
|
||||
parse_action(PARSE_HELP, actions, d);
|
||||
parse_edit_action(PARSE_HELP, actions, d);
|
||||
break;
|
||||
case 'l':
|
||||
if (*d->str)
|
||||
parse_action(PARSE_LIST_NORM, actions, d);
|
||||
parse_edit_action(PARSE_LIST_NORM, actions, d);
|
||||
else
|
||||
write_to_output(d, "Current buffer empty.\r\n");
|
||||
break;
|
||||
case 'n':
|
||||
if (*d->str)
|
||||
parse_action(PARSE_LIST_NUM, actions, d);
|
||||
parse_edit_action(PARSE_LIST_NUM, actions, d);
|
||||
else
|
||||
write_to_output(d, "Current buffer empty.\r\n");
|
||||
break;
|
||||
case 'r':
|
||||
parse_action(PARSE_REPLACE, actions, d);
|
||||
parse_edit_action(PARSE_REPLACE, actions, d);
|
||||
break;
|
||||
case 's':
|
||||
return STRINGADD_SAVE;
|
||||
|
@ -96,7 +96,7 @@ int improved_editor_execute(struct descriptor_data *d, char *str)
|
|||
/*
|
||||
* Handle some editor commands.
|
||||
*/
|
||||
void parse_action(int command, char *string, struct descriptor_data *d)
|
||||
void parse_edit_action(int command, char *string, struct descriptor_data *d)
|
||||
{
|
||||
int indent = 0, rep_all = 0, flags = 0, replaced, i, line_low, line_high, j = 0;
|
||||
unsigned int total_len;
|
||||
|
@ -497,7 +497,7 @@ void parse_action(int command, char *string, struct descriptor_data *d)
|
|||
break;
|
||||
default:
|
||||
write_to_output(d, "Invalid option.\r\n");
|
||||
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: invalid command passed to parse_action");
|
||||
mudlog(BRF, LVL_IMPL, TRUE, "SYSERR: invalid command passed to parse_edit_action");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
|
||||
#define using_improved_editor CONFIG_IMPROVED_EDITOR
|
||||
|
||||
void parse_action(int command, char *string, struct descriptor_data *d);
|
||||
void parse_edit_action(int command, char *string, struct descriptor_data *d);
|
||||
int improved_editor_execute(struct descriptor_data *d, char *string);
|
||||
int format_text(char **ptr_string, int mode, struct descriptor_data *d, unsigned int maxlen, int low, int high);
|
||||
int replace_str(char **string, char *pattern, char *replacement, int rep_all, unsigned int max_size);
|
||||
void send_editor_help(struct descriptor_data *d);
|
||||
|
||||
/*
|
||||
* Action modes for parse_action().
|
||||
* Action modes for parse_edit_action().
|
||||
*/
|
||||
#define PARSE_FORMAT 0
|
||||
#define PARSE_REPLACE 1
|
||||
|
|
14
src/limits.c
14
src/limits.c
|
@ -23,20 +23,20 @@
|
|||
/* local functions */
|
||||
int graf(int grafage, int p0, int p1, int p2, int p3, int p4, int p5, int p6);
|
||||
void run_autowiz(void);
|
||||
|
||||
void Crash_rentsave(struct char_data *ch, int cost);
|
||||
int level_exp(int chclass, int level);
|
||||
char *title_male(int chclass, int level);
|
||||
char *title_female(int chclass, int level);
|
||||
void update_char_objects(struct char_data *ch); /* handler.c */
|
||||
void reboot_wizlists(void);
|
||||
void check_idling(struct char_data *ch);
|
||||
|
||||
/* When age < 15 return the value p0 */
|
||||
/* When age in 15..29 calculate the line between p1 & p2 */
|
||||
/* When age in 30..44 calculate the line between p2 & p3 */
|
||||
/* When age in 45..59 calculate the line between p3 & p4 */
|
||||
/* When age in 60..79 calculate the line between p4 & p5 */
|
||||
/* When age >= 80 return the value p6 */
|
||||
/* When age < 15 return the value p0
|
||||
When age is 15..29 calculate the line between p1 & p2
|
||||
When age is 30..44 calculate the line between p2 & p3
|
||||
When age is 45..59 calculate the line between p3 & p4
|
||||
When age is 60..79 calculate the line between p4 & p5
|
||||
When age >= 80 return the value p6 */
|
||||
int graf(int grafage, int p0, int p1, int p2, int p3, int p4, int p5, int p6)
|
||||
{
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ void postmaster_send_mail(struct char_data *ch, struct char_data *mailman, int c
|
|||
void postmaster_check_mail(struct char_data *ch, struct char_data *mailman, int cmd, char *arg);
|
||||
void postmaster_receive_mail(struct char_data *ch, struct char_data *mailman, int cmd, char *arg);
|
||||
int mail_recip_ok(const char *name);
|
||||
void write_mail_record(FILE *mail_file, struct mail_t *record);
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
char *decrypt_hex(char *string, size_t len)
|
||||
|
|
40
src/medit.c
40
src/medit.c
|
@ -24,37 +24,37 @@
|
|||
#include "dg_olc.h"
|
||||
#include "screen.h"
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* External variable declarations.
|
||||
*/
|
||||
/* external variables */
|
||||
extern struct attack_hit_type attack_hit_text[];
|
||||
#if CONFIG_OASIS_MPROG
|
||||
extern const char *mobprog_types[];
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
/* local functions */
|
||||
#if CONFIG_OASIS_MPROG
|
||||
void medit_disp_mprog(struct descriptor_data *d);
|
||||
void medit_disp_mprog_types(struct descriptor_data *d);
|
||||
void medit_change_mprog(struct descriptor_data *d);
|
||||
const char *medit_get_mprog_type(struct mob_prog_data *mprog);
|
||||
#endif
|
||||
void medit_setup_new(struct descriptor_data *d);
|
||||
void medit_setup_existing(struct descriptor_data *d, int rmob_num);
|
||||
void init_mobile(struct char_data *mob);
|
||||
void medit_save_internally(struct descriptor_data *d);
|
||||
void medit_save_to_disk(zone_vnum zone_num);
|
||||
void medit_disp_positions(struct descriptor_data *d);
|
||||
void medit_disp_sex(struct descriptor_data *d);
|
||||
void medit_disp_attack_types(struct descriptor_data *d);
|
||||
void medit_disp_mob_flags(struct descriptor_data *d);
|
||||
void medit_disp_aff_flags(struct descriptor_data *d);
|
||||
void medit_disp_menu(struct descriptor_data *d);
|
||||
|
||||
/*
|
||||
* Handy internal macros.
|
||||
*/
|
||||
/* handy macros */
|
||||
#if CONFIG_OASIS_MPROG
|
||||
#define GET_MPROG(mob) (mob_index[(mob)->nr].mobprogs)
|
||||
#define GET_MPROG_TYPE(mob) (mob_index[(mob)->nr].progtypes)
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Function prototypes.
|
||||
*/
|
||||
#if CONFIG_OASIS_MPROG
|
||||
void medit_disp_mprog(struct descriptor_data *d);
|
||||
void medit_change_mprog(struct descriptor_data *d);
|
||||
const char *medit_get_mprog_type(struct mob_prog_data *mprog);
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------*\
|
||||
utility functions
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
|
77
src/oasis.h
77
src/oasis.h
|
@ -455,90 +455,24 @@ void clear_screen(struct descriptor_data *);
|
|||
int can_edit_zone(struct char_data *ch, zone_rnum rnum);
|
||||
ACMD(do_oasis);
|
||||
|
||||
/*
|
||||
* Prototypes, to be moved later.
|
||||
*/
|
||||
void medit_setup_new(struct descriptor_data *d);
|
||||
void medit_setup_existing(struct descriptor_data *d, int rmob_num);
|
||||
void init_mobile(struct char_data *mob);
|
||||
void medit_save_internally(struct descriptor_data *d);
|
||||
void medit_save_to_disk(zone_vnum zone_num);
|
||||
void medit_disp_positions(struct descriptor_data *d);
|
||||
void medit_disp_mprog(struct descriptor_data *d);
|
||||
void medit_change_mprog(struct descriptor_data *d);
|
||||
void medit_disp_mprog_types(struct descriptor_data *d);
|
||||
void medit_disp_sex(struct descriptor_data *d);
|
||||
void medit_disp_attack_types(struct descriptor_data *d);
|
||||
void medit_disp_mob_flags(struct descriptor_data *d);
|
||||
void medit_disp_aff_flags(struct descriptor_data *d);
|
||||
void medit_disp_menu(struct descriptor_data *d);
|
||||
void medit_parse(struct descriptor_data *d, char *arg);
|
||||
void medit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
ACMD(do_oasis_medit);
|
||||
|
||||
void oedit_setup_new(struct descriptor_data *d);
|
||||
void oedit_setup_existing(struct descriptor_data *d, int real_num);
|
||||
void oedit_save_internally(struct descriptor_data *d);
|
||||
void oedit_save_to_disk(int zone_num);
|
||||
void oedit_disp_container_flags_menu(struct descriptor_data *d);
|
||||
void oedit_disp_extradesc_menu(struct descriptor_data *d);
|
||||
void oedit_disp_prompt_apply_menu(struct descriptor_data *d);
|
||||
void oedit_liquid_type(struct descriptor_data *d);
|
||||
void oedit_disp_apply_menu(struct descriptor_data *d);
|
||||
void oedit_disp_weapon_menu(struct descriptor_data *d);
|
||||
void oedit_disp_spells_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val1_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val2_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val3_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val4_menu(struct descriptor_data *d);
|
||||
void oedit_disp_type_menu(struct descriptor_data *d);
|
||||
void oedit_disp_extra_menu(struct descriptor_data *d);
|
||||
void oedit_disp_wear_menu(struct descriptor_data *d);
|
||||
void oedit_disp_menu(struct descriptor_data *d);
|
||||
void oedit_parse(struct descriptor_data *d, char *arg);
|
||||
void oedit_disp_perm_menu(struct descriptor_data *d);
|
||||
void oedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
ACMD(do_oasis_oedit);
|
||||
|
||||
void redit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
void redit_setup_new(struct descriptor_data *d);
|
||||
void redit_setup_existing(struct descriptor_data *d, int real_num);
|
||||
void redit_save_internally(struct descriptor_data *d);
|
||||
void redit_save_to_disk(zone_vnum zone_num);
|
||||
void redit_disp_extradesc_menu(struct descriptor_data *d);
|
||||
void redit_disp_exit_menu(struct descriptor_data *d);
|
||||
void redit_disp_exit_flag_menu(struct descriptor_data *d);
|
||||
void redit_disp_flag_menu(struct descriptor_data *d);
|
||||
void redit_disp_sector_menu(struct descriptor_data *d);
|
||||
void redit_disp_menu(struct descriptor_data *d);
|
||||
void redit_parse(struct descriptor_data *d, char *arg);
|
||||
void free_room(struct room_data *room);
|
||||
ACMD(do_oasis_redit);
|
||||
|
||||
void sedit_setup_new(struct descriptor_data *d);
|
||||
void sedit_setup_existing(struct descriptor_data *d, int rshop_num);
|
||||
void sedit_save_internally(struct descriptor_data *d);
|
||||
void sedit_save_to_disk(int zone_num);
|
||||
void sedit_products_menu(struct descriptor_data *d);
|
||||
void sedit_compact_rooms_menu(struct descriptor_data *d);
|
||||
void sedit_rooms_menu(struct descriptor_data *d);
|
||||
void sedit_namelist_menu(struct descriptor_data *d);
|
||||
void sedit_shop_flags_menu(struct descriptor_data *d);
|
||||
void sedit_no_trade_menu(struct descriptor_data *d);
|
||||
void sedit_types_menu(struct descriptor_data *d);
|
||||
void sedit_disp_menu(struct descriptor_data *d);
|
||||
void sedit_parse(struct descriptor_data *d, char *arg);
|
||||
ACMD(do_oasis_sedit);
|
||||
|
||||
void zedit_setup(struct descriptor_data *d, int room_num);
|
||||
void zedit_new_zone(struct char_data *ch, zone_vnum vzone_num, room_vnum bottom, room_vnum top);
|
||||
void zedit_save_internally(struct descriptor_data *d);
|
||||
void zedit_save_to_disk(int zone_num);
|
||||
void zedit_disp_menu(struct descriptor_data *d);
|
||||
void zedit_disp_comtype(struct descriptor_data *d);
|
||||
void zedit_disp_arg1(struct descriptor_data *d);
|
||||
void zedit_disp_arg2(struct descriptor_data *d);
|
||||
void zedit_disp_arg3(struct descriptor_data *d);
|
||||
void zedit_parse(struct descriptor_data *d, char *arg);
|
||||
ACMD(do_oasis_zedit);
|
||||
|
||||
|
@ -547,17 +481,12 @@ void cedit_string_cleanup(struct descriptor_data *d, int terminator);
|
|||
ACMD(do_oasis_cedit);
|
||||
|
||||
void trigedit_parse(struct descriptor_data *d, char *arg);
|
||||
void trigedit_setup_existing(struct descriptor_data *d, int rtrg_num);
|
||||
void trigedit_setup_new(struct descriptor_data *d);
|
||||
ACMD(do_oasis_trigedit);
|
||||
|
||||
void aedit_parse(struct descriptor_data * d, char *arg);
|
||||
void free_action(struct social_messg *mess);
|
||||
ACMD(do_oasis_aedit);
|
||||
|
||||
void hedit_save_to_disk(struct descriptor_data *d);
|
||||
void hedit_setup_new(struct descriptor_data *d, char *new_key);
|
||||
void hedit_setup_existing(struct descriptor_data *d, int rnum);
|
||||
void hedit_parse(struct descriptor_data *d, char *arg);
|
||||
void hedit_string_cleanup(struct descriptor_data *d, int terminator);
|
||||
void free_help(struct help_index_element *help);
|
||||
|
@ -572,12 +501,6 @@ int free_strings(void *data, int type);
|
|||
/* oasis_list.c */
|
||||
ACMD(do_oasis_list);
|
||||
ACMD(do_oasis_links);
|
||||
void list_triggers(struct char_data *ch, zone_rnum rnum, trig_vnum vmin, trig_vnum vmax);
|
||||
void list_rooms(struct char_data *ch , zone_rnum rnum, room_vnum vmin, room_vnum vmax);
|
||||
void list_mobiles(struct char_data *ch, zone_rnum rnum, mob_vnum vmin , mob_vnum vmax );
|
||||
void list_objects(struct char_data *ch, zone_rnum rnum, obj_vnum vmin , obj_vnum vmax );
|
||||
void list_shops(struct char_data *ch , zone_rnum rnum, shop_vnum vmin, shop_vnum vmax);
|
||||
void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zone_vnum vmax);
|
||||
void print_zone(struct char_data *ch, zone_rnum rnum);
|
||||
|
||||
#define CONTEXT_HELP_STRING "help"
|
||||
|
|
|
@ -22,6 +22,14 @@
|
|||
#include "constants.h"
|
||||
#include "dg_scripts.h"
|
||||
|
||||
/* local functions */
|
||||
void list_triggers(struct char_data *ch, zone_rnum rnum, trig_vnum vmin, trig_vnum vmax);
|
||||
void list_rooms(struct char_data *ch , zone_rnum rnum, room_vnum vmin, room_vnum vmax);
|
||||
void list_mobiles(struct char_data *ch, zone_rnum rnum, mob_vnum vmin , mob_vnum vmax );
|
||||
void list_objects(struct char_data *ch, zone_rnum rnum, obj_vnum vmin , obj_vnum vmax );
|
||||
void list_shops(struct char_data *ch , zone_rnum rnum, shop_vnum vmin, shop_vnum vmax);
|
||||
void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zone_vnum vmax);
|
||||
|
||||
/******************************************************************************/
|
||||
/** Ingame Commands **/
|
||||
/******************************************************************************/
|
||||
|
|
32
src/oedit.c
32
src/oedit.c
|
@ -23,18 +23,34 @@
|
|||
#include "improved-edit.h"
|
||||
#include "dg_olc.h"
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* External variable declarations.
|
||||
*/
|
||||
/* external variables */
|
||||
extern struct attack_hit_type attack_hit_text[];
|
||||
extern struct spell_info_type spell_info[];
|
||||
extern struct board_info_type board_info[];
|
||||
|
||||
/*
|
||||
* Handy macros.
|
||||
*/
|
||||
/* local functions */
|
||||
void oedit_setup_new(struct descriptor_data *d);
|
||||
void oedit_setup_existing(struct descriptor_data *d, int real_num);
|
||||
void oedit_save_internally(struct descriptor_data *d);
|
||||
void oedit_save_to_disk(int zone_num);
|
||||
void oedit_disp_container_flags_menu(struct descriptor_data *d);
|
||||
void oedit_disp_extradesc_menu(struct descriptor_data *d);
|
||||
void oedit_disp_prompt_apply_menu(struct descriptor_data *d);
|
||||
void oedit_liquid_type(struct descriptor_data *d);
|
||||
void oedit_disp_apply_menu(struct descriptor_data *d);
|
||||
void oedit_disp_weapon_menu(struct descriptor_data *d);
|
||||
void oedit_disp_spells_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val1_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val2_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val3_menu(struct descriptor_data *d);
|
||||
void oedit_disp_val4_menu(struct descriptor_data *d);
|
||||
void oedit_disp_type_menu(struct descriptor_data *d);
|
||||
void oedit_disp_extra_menu(struct descriptor_data *d);
|
||||
void oedit_disp_wear_menu(struct descriptor_data *d);
|
||||
void oedit_disp_menu(struct descriptor_data *d);
|
||||
void oedit_disp_perm_menu(struct descriptor_data *d);
|
||||
|
||||
/* handy macro */
|
||||
#define S_PRODUCT(s, i) ((s)->producing[(i)])
|
||||
|
||||
/*------------------------------------------------------------------------*\
|
||||
|
|
10
src/redit.c
10
src/redit.c
|
@ -22,6 +22,16 @@
|
|||
#include "dg_olc.h"
|
||||
#include "constants.h"
|
||||
|
||||
/* local functions */
|
||||
void redit_setup_new(struct descriptor_data *d);
|
||||
void redit_setup_existing(struct descriptor_data *d, int real_num);
|
||||
void redit_disp_extradesc_menu(struct descriptor_data *d);
|
||||
void redit_disp_exit_menu(struct descriptor_data *d);
|
||||
void redit_disp_exit_flag_menu(struct descriptor_data *d);
|
||||
void redit_disp_flag_menu(struct descriptor_data *d);
|
||||
void redit_disp_sector_menu(struct descriptor_data *d);
|
||||
void redit_disp_menu(struct descriptor_data *d);
|
||||
|
||||
/*------------------------------------------------------------------------*\
|
||||
Utils and exported functions.
|
||||
\*------------------------------------------------------------------------*/
|
||||
|
|
54
src/sedit.c
54
src/sedit.c
|
@ -18,19 +18,27 @@
|
|||
#include "oasis.h"
|
||||
#include "constants.h"
|
||||
|
||||
/*
|
||||
* External functions.
|
||||
*/
|
||||
/* external functions */
|
||||
SPECIAL(shop_keeper);
|
||||
|
||||
/*
|
||||
* External variables
|
||||
*/
|
||||
/* external variables */
|
||||
extern const char *trade_letters[];
|
||||
extern const char *shop_bits[];
|
||||
/*
|
||||
* Should check more things.
|
||||
*/
|
||||
|
||||
/* local functions */
|
||||
void sedit_setup_new(struct descriptor_data *d);
|
||||
void sedit_setup_existing(struct descriptor_data *d, int rshop_num);
|
||||
void sedit_save_internally(struct descriptor_data *d);
|
||||
void sedit_save_to_disk(int zone_num);
|
||||
void sedit_products_menu(struct descriptor_data *d);
|
||||
void sedit_compact_rooms_menu(struct descriptor_data *d);
|
||||
void sedit_rooms_menu(struct descriptor_data *d);
|
||||
void sedit_namelist_menu(struct descriptor_data *d);
|
||||
void sedit_shop_flags_menu(struct descriptor_data *d);
|
||||
void sedit_no_trade_menu(struct descriptor_data *d);
|
||||
void sedit_types_menu(struct descriptor_data *d);
|
||||
void sedit_disp_menu(struct descriptor_data *d);
|
||||
|
||||
void sedit_save_internally(struct descriptor_data *d)
|
||||
{
|
||||
OLC_SHOP(d)->vnum = OLC_NUM(d);
|
||||
|
@ -690,31 +698,31 @@ void sedit_parse(struct descriptor_data *d, char *arg)
|
|||
*/
|
||||
case SEDIT_NOITEM1:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_NOITEM1(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_NOITEM1(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_NOITEM2:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_NOITEM2(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_NOITEM2(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_NOCASH1:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_NOCASH1(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_NOCASH1(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_NOCASH2:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_NOCASH2(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_NOCASH2(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_NOBUY:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_NOBUY(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_NOBUY(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_BUY:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_BUY(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_BUY(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_SELL:
|
||||
if (genolc_checkstring(d, arg))
|
||||
modify_string(&S_SELL(OLC_SHOP(d)), arg);
|
||||
modify_shop_string(&S_SELL(OLC_SHOP(d)), arg);
|
||||
break;
|
||||
case SEDIT_NAMELIST:
|
||||
if (genolc_checkstring(d, arg)) {
|
||||
|
@ -722,7 +730,7 @@ void sedit_parse(struct descriptor_data *d, char *arg)
|
|||
|
||||
BUY_TYPE(new_entry) = OLC_VAL(d);
|
||||
BUY_WORD(new_entry) = strdup(arg);
|
||||
add_to_type_list(&(S_NAMELISTS(OLC_SHOP(d))), &new_entry);
|
||||
add_shop_to_type_list(&(S_NAMELISTS(OLC_SHOP(d))), &new_entry);
|
||||
}
|
||||
sedit_namelist_menu(d);
|
||||
return;
|
||||
|
@ -771,7 +779,7 @@ void sedit_parse(struct descriptor_data *d, char *arg)
|
|||
OLC_MODE(d) = SEDIT_NAMELIST;
|
||||
return;
|
||||
case SEDIT_DELETE_TYPE:
|
||||
remove_from_type_list(&(S_NAMELISTS(OLC_SHOP(d))), atoi(arg));
|
||||
remove_shop_from_type_list(&(S_NAMELISTS(OLC_SHOP(d))), atoi(arg));
|
||||
sedit_namelist_menu(d);
|
||||
return;
|
||||
case SEDIT_NEW_PRODUCT:
|
||||
|
@ -781,11 +789,11 @@ void sedit_parse(struct descriptor_data *d, char *arg)
|
|||
return;
|
||||
}
|
||||
if (i > 0)
|
||||
add_to_int_list(&(S_PRODUCTS(OLC_SHOP(d))), i);
|
||||
add_shop_to_int_list(&(S_PRODUCTS(OLC_SHOP(d))), i);
|
||||
sedit_products_menu(d);
|
||||
return;
|
||||
case SEDIT_DELETE_PRODUCT:
|
||||
remove_from_int_list(&(S_PRODUCTS(OLC_SHOP(d))), atoi(arg));
|
||||
remove_shop_from_int_list(&(S_PRODUCTS(OLC_SHOP(d))), atoi(arg));
|
||||
sedit_products_menu(d);
|
||||
return;
|
||||
case SEDIT_NEW_ROOM:
|
||||
|
@ -795,11 +803,11 @@ void sedit_parse(struct descriptor_data *d, char *arg)
|
|||
return;
|
||||
}
|
||||
if (i >= 0)
|
||||
add_to_int_list(&(S_ROOMS(OLC_SHOP(d))), atoi(arg));
|
||||
sedit_rooms_menu(d);
|
||||
add_shop_to_int_list(&(S_ROOMS(OLC_SHOP(d))), atoi(arg));
|
||||
sedit_rooms_menu(d);
|
||||
return;
|
||||
case SEDIT_DELETE_ROOM:
|
||||
remove_from_int_list(&(S_ROOMS(OLC_SHOP(d))), atoi(arg));
|
||||
remove_shop_from_int_list(&(S_ROOMS(OLC_SHOP(d))), atoi(arg));
|
||||
sedit_rooms_menu(d);
|
||||
return;
|
||||
case SEDIT_SHOP_FLAGS:
|
||||
|
|
|
@ -91,7 +91,6 @@ void set_title(struct char_data *ch, char *title);
|
|||
void gain_exp(struct char_data *ch, int gain);
|
||||
void gain_exp_regardless(struct char_data *ch, int gain);
|
||||
void gain_condition(struct char_data *ch, int condition, int value);
|
||||
void check_idling(struct char_data *ch);
|
||||
void point_update(void);
|
||||
void update_pos(struct char_data *victim);
|
||||
|
||||
|
|
13
src/zedit.c
13
src/zedit.c
|
@ -26,8 +26,17 @@
|
|||
#define OLC_CMD(d) (OLC_ZONE(d)->cmd[OLC_VAL(d)])
|
||||
#define MAX_DUPLICATES 100
|
||||
|
||||
/* Prototypes. */
|
||||
/* local functions */
|
||||
int start_change_command(struct descriptor_data *d, int pos);
|
||||
void zedit_setup(struct descriptor_data *d, int room_num);
|
||||
void zedit_new_zone(struct char_data *ch, zone_vnum vzone_num, room_vnum bottom, room_vnum top);
|
||||
void zedit_save_internally(struct descriptor_data *d);
|
||||
void zedit_save_to_disk(int zone_num);
|
||||
void zedit_disp_menu(struct descriptor_data *d);
|
||||
void zedit_disp_comtype(struct descriptor_data *d);
|
||||
void zedit_disp_arg1(struct descriptor_data *d);
|
||||
void zedit_disp_arg2(struct descriptor_data *d);
|
||||
void zedit_disp_arg3(struct descriptor_data *d);
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
|
||||
|
@ -900,7 +909,7 @@ void zedit_parse(struct descriptor_data *d, char *arg)
|
|||
*/
|
||||
pos = atoi(arg);
|
||||
if (isdigit(*arg)) {
|
||||
delete_command(OLC_ZONE(d), pos);
|
||||
delete_zone_command(OLC_ZONE(d), pos);
|
||||
OLC_ZONE(d)->age = 1;
|
||||
}
|
||||
zedit_disp_menu(d);
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
|
||||
|
||||
|
||||
/*
|
||||
** Zmalloc, a simple memory-allocation monitor.
|
||||
**
|
||||
|
@ -33,6 +30,8 @@
|
|||
**
|
||||
*/
|
||||
|
||||
/* local functions */
|
||||
void zfree_special (int *, char *, int);
|
||||
|
||||
/* protect our calloc() and free() calls from recursive redefinition: */
|
||||
#define ZMALLOC_H
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
int *zmalloc(int, char *, int);
|
||||
void zfree(int *, char *, int);
|
||||
void zfree_special (int *, char *, int);
|
||||
int zmalloc_check();
|
||||
char *zstrdup(const char*, char*, int);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue