Crossfire Server, Trunk
R21670
|
#include "global.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "book.h"
#include "living.h"
#include "output_file.h"
#include "spells.h"
Go to the source code of this file.
Data Structures | |
struct | GeneralMessage |
struct | namebytype |
struct | titleliststruct |
struct | titlestruct |
Macros | |
#define | arraysize(arrayname) (sizeof(arrayname)/sizeof(*(arrayname))) |
#define | MAX_TITLE_CHECK 20 |
#define | MSGTYPE_ALCHEMY 4 |
#define | MSGTYPE_ARTIFACT 2 |
#define | MSGTYPE_GODS 5 |
#define | MSGTYPE_LIB 0 |
#define | MSGTYPE_MONSTER 1 |
#define | MSGTYPE_MSGFILE 6 |
#define | MSGTYPE_SPELLPATH 3 |
Typedefs | |
typedef struct namebytype | arttypename |
typedef struct titlestruct | title |
typedef struct titleliststruct | titlelist |
Functions | |
static void | add_author (object *op, int msgtype) |
static void | add_book (title *book, int type, const char *fname, int lineno) |
static void | add_book_to_list (const object *book, int msgtype) |
static StringBuffer * | artifact_describe (const artifact *art, const artifactlist *al, int message, int art_name, int separator) |
static StringBuffer * | artifact_msg (unsigned int level, size_t booksize) |
int | book_overflow (const char *buf1, const char *buf2, size_t booksize) |
static void | change_book (object *book, int msgtype) |
static title * | find_title (const object *book, int msgtype) |
void | free_all_readable (void) |
static title * | get_empty_book (void) |
static titlelist * | get_empty_booklist (void) |
sstring | get_message_body (const GeneralMessage *message) |
const Face * | get_message_face (const GeneralMessage *message) |
const GeneralMessage * | get_message_from_identifier (const char *identifier) |
sstring | get_message_title (const GeneralMessage *message) |
static object * | get_next_mon (const object *tmp) |
object * | get_random_mon (int level) |
const readable_message_type * | get_readable_message_type (object *readable) |
static titlelist * | get_titlelist (int i) |
static StringBuffer * | god_info_msg (int level, size_t booksize, object *book) |
static void | init_book_archive (void) |
static void | init_mon_info (void) |
static void | init_msgfile (void) |
void | init_readable (void) |
static void | make_formula_book (object *book, int level) |
static StringBuffer * | mon_desc (const object *mon) |
static StringBuffer * | mon_info_msg (int level, size_t booksize, object *book) |
static StringBuffer * | msgfile_msg (object *book, size_t booksize) |
static void | new_text_name (object *book, int msgtype) |
int | nstrtok (const char *buf1, const char *buf2) |
static StringBuffer * | spellpath_msg (int level, size_t booksize, StringBuffer *buf) |
char * | strtoktolin (const char *buf1, const char *buf2, char *retbuf, size_t size) |
void | tailor_readable_ob (object *book, int msg_type) |
static int | unique_book (const object *book, int msgtype) |
void | write_book_archive (void) |
Variables | |
static const char *const | art_author [] |
static const char *const | art_book_name [] |
static const arttypename | art_name_array [] |
static const char *const | book_author [] |
static const char *const | book_descrpt [] |
static titlelist * | booklist = NULL |
static objectlink * | first_mon_info = NULL |
static GeneralMessage * | first_msg = NULL |
static const char *const | formula_author [] |
static const char *const | formula_book_name [] |
static const char *const | gods_author [] |
static const char *const | gods_book_name [] |
static const char *const | heavy_book_name [] |
static const int | last_readable_subtype = arraysize(readable_message_types) |
static const char *const | light_book_name [] |
static const int | max_titles [6] |
static const char *const | mon_author [] |
static const char *const | mon_book_name [] |
static int | msg_total_chance = 0 |
static int | need_to_write_bookarchive = 0 |
static int | nrofmon = 0 |
static const char *const | path_author [] |
static const char *const | path_book_name [] |
static const readable_message_type | readable_message_types [] |
static const uint32_t | spellpathdef [NRSPELLPATHS] |
This file contains code relevant to the BOOKS hack – designed to allow randomly occuring messages in non-magical texts.
Definition in file readable.c.
#define arraysize | ( | arrayname | ) | (sizeof(arrayname)/sizeof(*(arrayname))) |
Returns the element size of an array.
arrayname | the array's name |
Definition at line 96 of file readable.c.
Referenced by add_author(), artifact_msg(), change_book(), get_titlelist(), init_book_archive(), make_formula_book(), new_text_name(), and tailor_readable_ob().
#define MAX_TITLE_CHECK 20 |
How many times to try to generate a unique name for a book.
Definition at line 74 of file readable.c.
Referenced by change_book().
#define MSGTYPE_ALCHEMY 4 |
Alchemy-related information.
Definition at line 85 of file readable.c.
Referenced by add_author(), make_formula_book(), new_text_name(), and tailor_readable_ob().
#define MSGTYPE_ARTIFACT 2 |
Artifact-related information.
Definition at line 81 of file readable.c.
Referenced by add_author(), new_text_name(), and tailor_readable_ob().
#define MSGTYPE_GODS 5 |
God-related information.
Definition at line 87 of file readable.c.
Referenced by add_author(), new_text_name(), and tailor_readable_ob().
#define MSGTYPE_LIB 0 |
Message from the lib/messages file.
Definition at line 77 of file readable.c.
Referenced by tailor_readable_ob().
#define MSGTYPE_MONSTER 1 |
Monster-related information.
Definition at line 79 of file readable.c.
Referenced by add_author(), new_text_name(), and tailor_readable_ob().
#define MSGTYPE_MSGFILE 6 |
Message from the lib/messages file.
Definition at line 89 of file readable.c.
Referenced by add_author(), and new_text_name().
#define MSGTYPE_SPELLPATH 3 |
Spellpath-related information.
Definition at line 83 of file readable.c.
Referenced by add_author(), new_text_name(), and tailor_readable_ob().
typedef struct namebytype arttypename |
special structure, used only by art_name_array[]
typedef struct titlestruct title |
Information on one title. 'title' and 'titlelist' are used by the readable code
typedef struct titleliststruct titlelist |
Titles for one message type.
|
static |
A lot like new_text_name() above, but instead chooses an author and sets op->title to that value
op | book to alter. |
msgtype | information we want. |
Definition at line 1153 of file readable.c.
References add_string(), arraysize, art_author, book_author, formula_author, gods_author, MAX_BUF, mon_author, obj::msg, MSGTYPE_ALCHEMY, MSGTYPE_ARTIFACT, MSGTYPE_GODS, MSGTYPE_MONSTER, MSGTYPE_MSGFILE, MSGTYPE_SPELLPATH, titlestruct::name, path_author, RANDOM, snprintf, and obj::title.
Referenced by change_book(), and make_formula_book().
|
static |
Appends a book to the booklist.
book | the book to add |
type | the book type |
fname | the file name; for error messages |
lineno | the line number; for error messages |
Definition at line 983 of file readable.c.
References titleliststruct::first_book, get_titlelist(), llevInfo, LOG(), titlestruct::next, and titleliststruct::number.
Referenced by init_book_archive().
|
static |
Adds a book to the list of existing books.
book | book to add. |
msgtype | what information the book contains. |
Definition at line 1225 of file readable.c.
References add_string(), obj::arch, titlestruct::archname, titlestruct::authour, titleliststruct::first_book, get_empty_book(), get_titlelist(), titlestruct::level, obj::level, llevDebug, llevError, LOG(), obj::msg, titlestruct::msg_index, titlestruct::name, obj::name, archt::name, need_to_write_bookarchive, titlestruct::next, titleliststruct::number, titlestruct::size, strtoint(), and obj::title.
Referenced by change_book().
|
static |
Describe an artifact.
art | artifact to describe. |
al | list art is part of. |
message | if non zero, and the artifact has a suitable message, add it to the description. |
art_name | index in art_name_array the artifact is in. |
separator | if non zero, a separator is inserted at the start of the description. |
Definition at line 1565 of file readable.c.
References add_abilities(), artifactstruct::allowed, artifactstruct::allowed_size, BOOK_BUF, artifactstruct::chance, archt::clone, describe_item(), find_archetype_by_object_name(), FLAG_IDENTIFIED, artifactstruct::item, llevError, LOG(), obj::msg, linked_char::name, titlestruct::name, obj::name, obj::name_pl, linked_char::next, object_free_drop_inventory(), object_new(), RANDOM, SET_FLAG, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_append_stringbuffer(), stringbuffer_finish(), stringbuffer_length(), stringbuffer_new(), artifactliststruct::total_chance, try_find_archetype(), artifactliststruct::type, obj::type, and obj::value.
Referenced by artifact_msg().
|
static |
Generate a message detailing the properties of 1-6 artifacts drawn sequentially from the artifact list.
level | level of the book. |
booksize | maximum length of the book. |
Definition at line 1660 of file readable.c.
References arraysize, artifact_describe(), find_artifactlist(), artifactstruct::item, artifactliststruct::items, titlestruct::level, obj::msg, artifactstruct::next, RANDOM, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_append_stringbuffer(), stringbuffer_delete(), stringbuffer_length(), stringbuffer_new(), and namebytype::type.
Referenced by tailor_readable_ob().
int book_overflow | ( | const char * | buf1, |
const char * | buf2, | ||
size_t | booksize | ||
) |
Checks if buf1 and buf2 can be combined.
buf1 | |
buf2 | buffer we plan on combining. |
booksize | maximum book size. |
Definition at line 722 of file readable.c.
References BOOK_BUF, and buf_overflow().
Referenced by write_note().
|
static |
Give a new, fancier name to generated objects of type BOOK and SPELLBOOK. Aug 96 I changed this so we will attempt to create consistent authour/title and message content for BOOKs. Also, we will alter books that match archive entries to the archival levels and architypes. -b.t.
book | book to alter. Should be of type BOOK. |
msgtype | what information the book contains. |
Definition at line 1267 of file readable.c.
References add_author(), add_book_to_list(), add_string(), titlestruct::archname, arraysize, titlestruct::authour, BOOK, book_descrpt, create_archetype(), find_title(), free_string(), get_titlelist(), titlestruct::level, obj::level, llevDebug, llevError, LOG(), MAX_BUF, MAX_TITLE_CHECK, max_titles, obj::msg, titlestruct::name, obj::name, new_text_name(), titleliststruct::number, object_copy(), object_free_drop_inventory(), object_get_value(), object_set_msg(), object_set_value(), RANDOM, snprintf, obj::title, obj::type, and unique_book().
Referenced by tailor_readable_ob().
Search the titlelist (based on msgtype) to see if book matches something already there. IF so, return that title.
book | book we're searching. |
msgtype | message type. |
Definition at line 1065 of file readable.c.
References titlestruct::authour, titleliststruct::first_book, get_titlelist(), llevDebug, LOG(), obj::msg, titlestruct::msg_index, titlestruct::name, titlestruct::next, titlestruct::size, and strtoint().
Referenced by change_book().
void free_all_readable | ( | void | ) |
Free all readable-related information.
Definition at line 2134 of file readable.c.
References titlestruct::archname, titlestruct::authour, titleliststruct::first_book, free_string(), GeneralMessage::identifier, llevDebug, LOG(), GeneralMessage::message, titlestruct::name, titlestruct::next, titleliststruct::next, GeneralMessage::next, oblnk::next, GeneralMessage::quest_code, and GeneralMessage::title.
Referenced by cleanup().
|
static |
Creates a title.
Definition at line 606 of file readable.c.
References titlestruct::archname, titlestruct::authour, fatal(), titlestruct::level, titlestruct::msg_index, titlestruct::name, titlestruct::next, OUT_OF_MEMORY, and titlestruct::size.
Referenced by add_book_to_list(), and init_book_archive().
|
static |
Creates a titlelist.
Definition at line 586 of file readable.c.
References fatal(), titleliststruct::first_book, titleliststruct::next, titleliststruct::number, and OUT_OF_MEMORY.
Referenced by get_titlelist(), and init_book_archive().
sstring get_message_body | ( | const GeneralMessage * | message | ) |
Get a message's body.
message | message, must not be NULL. |
Definition at line 2268 of file readable.c.
References GeneralMessage::message.
Referenced by knowledge_message_detail().
const Face* get_message_face | ( | const GeneralMessage * | message | ) |
Get a message's face.
message | message, must not be NULL. |
Definition at line 2277 of file readable.c.
References GeneralMessage::face.
Referenced by knowledge_message_face().
const GeneralMessage* get_message_from_identifier | ( | const char * | identifier | ) |
Find the message from its identifier.
identifier | message's identifier. |
Definition at line 2246 of file readable.c.
References first_msg, GeneralMessage::identifier, and GeneralMessage::next.
Referenced by init_msgfile(), knowledge_message_detail(), knowledge_message_face(), knowledge_message_summary(), and knowledge_message_validate().
sstring get_message_title | ( | const GeneralMessage * | message | ) |
Get a message's title.
message | message, must not be NULL. |
Definition at line 2259 of file readable.c.
References GeneralMessage::title.
Referenced by knowledge_message_summary().
This function returns the next monster after 'tmp' in the monster list.
tmp | monster. |
Definition at line 1480 of file readable.c.
References mon, oblnk::next, and oblnk::ob.
Referenced by mon_info_msg().
object* get_random_mon | ( | int | level | ) |
Returns a random monster selected from linked list of all monsters in the current game. Changed 971225 to be greater than equal to level passed. Also made choosing by level more random.
level | if non-zero, then only monsters greater than that level will be returned. |
Definition at line 1399 of file readable.c.
References obj::level, llevError, LOG(), mon, oblnk::next, nrofmon, oblnk::ob, and RANDOM.
Referenced by alchemy_failure_effect(), and mon_info_msg().
const readable_message_type* get_readable_message_type | ( | object * | readable | ) |
Get the readable type for an object (hopefully book).
readable | object for which we want the readable type. |
Definition at line 2233 of file readable.c.
References last_readable_subtype, and obj::subtype.
Referenced by apply_sign(), book_type_apply(), and spellbook_type_apply().
|
static |
Gets the ith titlelist.
Will create items if they don't exist.
i | index to get. |
Definition at line 631 of file readable.c.
References arraysize, booklist, get_empty_booklist(), llevInfo, LOG(), max_titles, and titleliststruct::next.
Referenced by add_book(), add_book_to_list(), change_book(), find_title(), unique_book(), and write_book_archive().
|
static |
Generate a message detailing the properties of a random god. Used by the book hack. b.t.
level | number of elements to give. |
booksize | desired length of the book. |
book | book we're writing the information to, for knowledge management. |
Definition at line 1982 of file readable.c.
References BOOK_BUF, describe_god(), get_rand_god(), GOD_BLESSED, GOD_ENEMY, GOD_HOLYWORD, GOD_IMMUNITIES, GOD_PATHS, GOD_RESISTANCES, GOD_SACRED, llevError, LOG(), obj::name, object_set_value(), pntr_to_god_obj(), RANDOM, snprintf, stringbuffer_delete(), stringbuffer_length(), and stringbuffer_new().
Referenced by tailor_readable_ob().
|
static |
If not called before, initialize the info list.
This reads in the bookarch file into memory. bookarch is the file created and updated across multiple runs of the program.
Definition at line 865 of file readable.c.
References add_book(), add_string(), titlestruct::archname, arraysize, titlestruct::authour, get_empty_book(), get_empty_booklist(), titlestruct::level, llevDebug, llevInfo, Settings::localdir, LOG(), MAX_BUF, max_titles, titlestruct::msg_index, titlestruct::name, titleliststruct::next, titleliststruct::number, settings, titlestruct::size, and snprintf.
Referenced by init_readable().
|
static |
Creates the linked list of pointers to monster archetype objects if not called previously.
Definition at line 1001 of file readable.c.
References archt::clone, first_archetype, first_mon_info, FLAG_CHANGING, FLAG_MONSTER, FLAG_UNAGGRESSIVE, oblnk::id, llevDebug, llevError, LOG(), mon, oblnk::next, archt::next, nrofmon, oblnk::ob, and QUERY_FLAG.
Referenced by init_readable().
|
static |
If not called before, initialize the info list.
Reads the messages file into the list pointed to by first_msg
Definition at line 740 of file readable.c.
References add_string(), BOOK_BUF, buf_overflow(), GeneralMessage::chance, Settings::datadir, GeneralMessage::face, fatal(), find_face(), first_msg, get_message_from_identifier(), HUGE_BUF, GeneralMessage::identifier, llevDebug, llevError, llevInfo, LOG(), MAX_BUF, GeneralMessage::message, msg_total_chance, GeneralMessage::next, GeneralMessage::quest_code, SEE_LAST_ERROR, settings, snprintf, and GeneralMessage::title.
Referenced by init_readable().
void init_readable | ( | void | ) |
Initialize linked lists utilized by message functions in tailor_readable_ob()
This is the function called by the main routine to initialize all the readable information.
Definition at line 1033 of file readable.c.
References init_book_archive(), init_mon_info(), init_msgfile(), llevDebug, and LOG().
Referenced by generate_map(), init_beforeplay(), and main().
|
static |
Generate a message detailing the properties of a randomly selected alchemical formula.
book | book we write to. |
level | level for formulaes and such. |
knowledge marker
Definition at line 1796 of file readable.c.
References add_author(), recipestruct::arch_name, recipestruct::arch_names, arraysize, recipestruct::cauldron, recipestruct::chance, archt::clone, find_archetype(), formula_book_name, free_string(), get_formulalist(), recipestruct::index, recipestruct::ingred, recipestruct::is_combination, recipeliststruct::items, llevError, LOG(), MAX_BUF, MSGTYPE_ALCHEMY, linked_char::name, titlestruct::name, obj::name, new_text_name(), recipestruct::next, linked_char::next, titlestruct::next, object_set_msg(), object_set_value(), query_name(), RANDOM, recipestruct::skill, snprintf, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_finish(), stringbuffer_finish_shared(), stringbuffer_new(), recipestruct::title, obj::title, and recipeliststruct::total_chance.
Referenced by tailor_readable_ob().
|
static |
Returns a description of the monster. This really needs to be redone, as describe_item really gives a pretty internal description.
mon | monster to describe. |
Definition at line 1462 of file readable.c.
References describe_item(), obj::name, stringbuffer_append_printf(), and stringbuffer_new().
Referenced by mon_info_msg().
|
static |
Generate a message detailing the properties of randomly monster(s), and add relevant knowledge markers.
level | book level. |
booksize | size (in characters) of the book we want. |
book | book in which we will put the information. |
Definition at line 1508 of file readable.c.
References obj::arch, free_string(), get_next_mon(), get_random_mon(), mon, mon_desc(), archt::name, object_set_value(), stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_append_stringbuffer(), stringbuffer_delete(), stringbuffer_finish_shared(), stringbuffer_length(), and stringbuffer_new().
Referenced by tailor_readable_ob().
|
static |
Generate a message drawn randomly from lib/messages.
book | book to fill. |
booksize | length of the book we want. |
knowledge marker
Definition at line 1924 of file readable.c.
References GeneralMessage::chance, find_archetype(), first_msg, FREE_AND_COPY, HUGE_BUF, GeneralMessage::identifier, GeneralMessage::message, msg_total_chance, GeneralMessage::next, object_create_arch(), object_insert_in_ob(), object_set_value(), GeneralMessage::quest_code, RANDOM, snprintf, stringbuffer_append_string(), and stringbuffer_new().
Referenced by tailor_readable_ob().
|
static |
Only for objects of type BOOK. SPELLBOOK stuff is handled directly in change_book_name(). Names are based on text msgtype
This sets book book->name based on msgtype given. What name is given is based on various criteria
book | book we want to alter. |
msgtype | what information we want in the book. |
Definition at line 1104 of file readable.c.
References add_string(), arraysize, art_book_name, BOOK, formula_book_name, free_string(), gods_book_name, heavy_book_name, light_book_name, mon_book_name, MSGTYPE_ALCHEMY, MSGTYPE_ARTIFACT, MSGTYPE_GODS, MSGTYPE_MONSTER, MSGTYPE_MSGFILE, MSGTYPE_SPELLPATH, titlestruct::name, obj::name, path_book_name, RANDOM, obj::type, and obj::weight.
Referenced by change_book(), and make_formula_book().
int nstrtok | ( | const char * | buf1, |
const char * | buf2 | ||
) |
Simple routine to return the number of list items in buf1 as separated by the value of buf2
buf1 | items we want to split. |
buf2 | what to split by. |
Definition at line 662 of file readable.c.
References MAX_BUF, and strlcpy().
Referenced by describe_god(), and strtoktolin().
|
static |
Generate a message detailing the member incantations/prayers (and some of their properties) belonging to a random spellpath.
level | level of the book. |
booksize | maximumlength of the book. |
buf | where to store the message. If not NULL, it is supposed to contain the message header. |
Definition at line 1745 of file readable.c.
References archt::clone, first_archetype, liv::grace, obj::level, obj::name, archt::next, NRSPELLPATHS, obj::path_attuned, RANDOM, liv::sp, SPELL, spellpathdef, spellpathnames, obj::stats, stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_length(), stringbuffer_new(), and obj::type.
Referenced by tailor_readable_ob().
char* strtoktolin | ( | const char * | buf1, |
const char * | buf2, | ||
char * | retbuf, | ||
size_t | size | ||
) |
Takes a string in buf1 and separates it into a list of strings delimited by buf2. Then returns a comma separated string w/ decent punctuation.
buf1 | buffer to split. |
buf2 | what to split buf1 by. |
retbuf | where to write the resulting string. |
size | length of retbuf. |
Definition at line 692 of file readable.c.
References MAX_BUF, nstrtok(), snprintf, and strlcpy().
Referenced by describe_god().
void tailor_readable_ob | ( | object * | book, |
int | msg_type | ||
) |
The main routine. This chooses a random message to put in given readable object (type==BOOK) which will be referred hereafter as a 'book'. We use the book level to de- termine the value of the information we will insert. Higher values mean the book will (generally) have better/more info. See individual cases as to how this will be utilized. "Book" name/content length are based on the weight of the document. If the value of msg_type is negative, we will randomly choose the kind of message to generate. -b.t. thoma s@as tro.p su.e du
book | the object we are creating into. Must be a book, can have a level. |
msg_type | if it is a positive value, we use that to determine the message type - otherwise a random value is used. |
Definition at line 2052 of file readable.c.
References arraysize, artifact_msg(), BOOK, BOOK_BUF, BOOKSIZE, change_book(), god_info_msg(), titlestruct::level, obj::level, make_formula_book(), max_titles, mon_info_msg(), msgfile_msg(), MSGTYPE_ALCHEMY, MSGTYPE_ARTIFACT, MSGTYPE_GODS, MSGTYPE_LIB, MSGTYPE_MONSTER, MSGTYPE_SPELLPATH, object_set_msg(), RANDOM, spellpath_msg(), stringbuffer_append_string(), stringbuffer_finish(), and obj::type.
Referenced by fix_generated_item().
|
static |
Check to see if the book title/msg is unique. We go through the entire list of possibilities each time. If we find a match, then unique_book returns true (because inst unique).
book | book we're searching. |
msgtype | type of information contained. |
Definition at line 1201 of file readable.c.
References titlestruct::authour, get_titlelist(), titlestruct::name, obj::name, titlestruct::next, and obj::title.
Referenced by change_book().
void write_book_archive | ( | void | ) |
Write out the updated book archive to bookarch file.
Definition at line 2183 of file readable.c.
References titlestruct::archname, titlestruct::authour, titleliststruct::first_book, get_titlelist(), titlestruct::level, llevDebug, llevError, Settings::localdir, LOG(), MAX_BUF, titlestruct::msg_index, titlestruct::name, need_to_write_bookarchive, titlestruct::next, titleliststruct::next, of_close(), of_open(), SAVE_MODE, settings, titlestruct::size, and snprintf.
Referenced by cleanup(), and do_specials().
|
static |
Used by artifact texts
Definition at line 268 of file readable.c.
Referenced by add_author().
|
static |
Book titles for artifact information.
Definition at line 252 of file readable.c.
Referenced by new_text_name().
|
static |
Artiface/item information.
if it isnt listed here, then art_attr_msg() will never generate a message for this type of artifact. -b.t.
Definition at line 232 of file readable.c.
|
static |
|
static |
Book descriptions.
Definition at line 468 of file readable.c.
Referenced by change_book().
|
static |
Buffer of books read in from the bookarch file. It's element size does not exceed arraysize(max_titles).
Definition at line 151 of file readable.c.
Referenced by get_titlelist().
|
static |
|
static |
First message from data read from the messages file. Note that this points to the last message in the file, as messages are added to the start of the list.
Definition at line 164 of file readable.c.
Referenced by get_message_from_identifier(), init_msgfile(), and msgfile_msg().
|
static |
This isn't used except for empty books.
Definition at line 366 of file readable.c.
Referenced by add_author().
|
static |
Alchemy (formula) information.
Definition at line 352 of file readable.c.
Referenced by make_formula_book(), and new_text_name().
|
static |
Used by gods texts.
Definition at line 334 of file readable.c.
Referenced by add_author().
|
static |
God book information.
Definition at line 319 of file readable.c.
Referenced by new_text_name().
|
static |
Name for big books.
Definition at line 407 of file readable.c.
Referenced by new_text_name().
|
static |
Number of elements in readable_message_types.
Definition at line 559 of file readable.c.
Referenced by get_readable_message_type().
|
static |
Generic book informationUsed by msg file and 'generic' books.
Definition at line 388 of file readable.c.
Referenced by new_text_name().
|
static |
Number of titles for different name lists.
Definition at line 562 of file readable.c.
Referenced by change_book(), get_titlelist(), init_book_archive(), and tailor_readable_ob().
|
static |
Used by monster beastuary texts.
Definition at line 300 of file readable.c.
Referenced by add_author().
|
static |
Monster book information.
Definition at line 282 of file readable.c.
Referenced by new_text_name().
|
static |
Total chance of messages (GeneralMessage), to randomly select one.
Definition at line 169 of file readable.c.
Referenced by init_msgfile(), and msgfile_msg().
|
static |
If set then we have information to save.
Definition at line 157 of file readable.c.
Referenced by add_book_to_list(), and write_book_archive().
|
static |
Number of monsters in the first_mon_info list.
Definition at line 156 of file readable.c.
Referenced by get_random_mon(), and init_mon_info().
|
static |
Used by spellpath texts.
Definition at line 208 of file readable.c.
Referenced by add_author().
|
static |
Book names for path information.
Definition at line 198 of file readable.c.
Referenced by new_text_name().
|
static |
Each line of this array is a readable subtype. Be careful to keep the order. If you add readable subtype, add them at the bottom of the list. Never delete a subtype because index is used as subtype parameter in arch files!
Definition at line 495 of file readable.c.
|
static |
Spellpath information.
Definition at line 174 of file readable.c.
Referenced by spellpath_msg().