[Sep 13 2007] - Rumble Changed binary search functions (real_xxxx, real_zone_by_thing), except real_shop. (thanks Neme) script_proto list freed when exiting without saving in oedit/medit/redit. (thanks Neme) dg_olc.c, trigedit_save(): trig name and arg duping removed. (thanks Neme) genobj.c, update_all_obects(): object ID copied, no more 0 uid. (thanks Neme) CLEANUP_ALL in redit after saving a room. (thanks Neme) new function in genolc.c: free_save_list(), called during shutdown. (thanks Neme) Event_free_all() now frees all events. (thanks Neme) Fixed memory leak in perform_act(). (thanks Rhade) Changed NUM_BOARDS from 10 to 7 (the actual num of boards). (thanks Neme) Removed the Keywords option in hedit since they have to be in the body. [Sep 12 2007] - Rumble Fixed crash bug caused by olist with no objects. (Thanks Rhade) Several changes made to compile clean on older versions of GCC. (Thanks Neme) ?Sep 10 2007] - Rumble Fixed items with rnum = NOTHING or NOBODY being changed to rnum = 0. (Thanks Neme) Fixed memory leak in dg_olc.c trigedit save. (Thanks Neme) [Sep 04 2007] - Rumble Changed CLSOLC to LVL_BUILDER. removed delete_doubledollar from do_say. (thanks Rhade) [Sep 01 2007] - Rumble Made Puff a hidden mob since she is used on room entry trigs to do dg_cast. Fixed dg_affect to not add 1 to the desired affect duration. Fixed dg_affect to work with 128 bits.
55 lines
2.6 KiB
C
55 lines
2.6 KiB
C
/**************************************************************************
|
|
* File: boards.h Part of tbaMUD *
|
|
* Usage: header file for bulletin boards *
|
|
* *
|
|
* 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. *
|
|
**************************************************************************/
|
|
|
|
#define NUM_OF_BOARDS 7 /* change if needed! */
|
|
#define MAX_BOARD_MESSAGES 60 /* arbitrary -- change if needed */
|
|
#define MAX_MESSAGE_LENGTH 4096 /* arbitrary -- change if needed */
|
|
|
|
#define INDEX_SIZE ((NUM_OF_BOARDS*MAX_BOARD_MESSAGES) + 5)
|
|
|
|
#define BOARD_MAGIC 1048575 /* arbitrary number - see modify.c */
|
|
|
|
struct board_msginfo {
|
|
int slot_num; /* pos of message in "master index" */
|
|
char *heading; /* pointer to message's heading */
|
|
int level; /* level of poster */
|
|
int heading_len; /* size of header (for file write) */
|
|
int message_len; /* size of message text (for file write) */
|
|
};
|
|
|
|
struct board_info_type {
|
|
obj_vnum vnum; /* vnum of this board */
|
|
int read_lvl; /* min level to read messages on this board */
|
|
int write_lvl; /* min level to write messages on this board */
|
|
int remove_lvl; /* min level to remove messages from this board */
|
|
char filename[50]; /* file to save this board to */
|
|
obj_rnum rnum; /* rnum of this board */
|
|
};
|
|
|
|
#define BOARD_VNUM(i) (board_info[i].vnum)
|
|
#define READ_LVL(i) (board_info[i].read_lvl)
|
|
#define WRITE_LVL(i) (board_info[i].write_lvl)
|
|
#define REMOVE_LVL(i) (board_info[i].remove_lvl)
|
|
#define FILENAME(i) (board_info[i].filename)
|
|
#define BOARD_RNUM(i) (board_info[i].rnum)
|
|
|
|
#define NEW_MSG_INDEX(i) (msg_index[i][num_of_msgs[i]])
|
|
#define MSG_HEADING(i, j) (msg_index[i][j].heading)
|
|
#define MSG_SLOTNUM(i, j) (msg_index[i][j].slot_num)
|
|
#define MSG_LEVEL(i, j) (msg_index[i][j].level)
|
|
|
|
int board_display_msg(int board_type, struct char_data *ch, char *arg, struct obj_data *board);
|
|
int board_show_board(int board_type, struct char_data *ch, char *arg, struct obj_data *board);
|
|
int board_remove_msg(int board_type, struct char_data *ch, char *arg, struct obj_data *board);
|
|
int board_write_message(int board_type, struct char_data *ch, char *arg, struct obj_data *board);
|
|
void board_save_board(int board_type);
|
|
void board_load_board(int board_type);
|
|
void board_clear_all(void);
|