Crossfire Server, Branch 1.12  R12190
Data Structures | Defines
book.h File Reference

Describes fundental parameters of 'books' - objects with type==BOOK. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  readable_message_type
 Struct to store the message_type and message_subtype for signs and books used by the player. More...

Defines

#define BASE_BOOK_BUF   700
 Defines the base value that BOOKSIZE should return for books with no weight.
#define BOOK_BUF   HUGE_BUF-10
 Maximum message buf size for books.
#define BOOKSIZE(xyz)
 Get the book buffer size for an individual book object.

Detailed Description

Describes fundental parameters of 'books' - objects with type==BOOK.

Definition in file book.h.


Define Documentation

#define BASE_BOOK_BUF   700

Defines the base value that BOOKSIZE should return for books with no weight.

Note:
If little books arent getting enough text generated, enlarge this.

Definition at line 46 of file book.h.

#define BOOK_BUF   HUGE_BUF-10

Maximum message buf size for books.

If this is changed, keep in mind that big strings may be unreadable by the player as the tail of the message can scroll over the beginning (as of v0.92.2).

Note:
Note that the book messages are stored in the msg buf, which is limited by 'HUGE_BUF' in the loader.

Definition at line 39 of file book.h.

Referenced by artifact_msg(), book_overflow(), god_info_msg(), init_msgfile(), make_formula_book(), msgfile_msg(), tailor_readable_ob(), and write_note().

#define BOOKSIZE (   xyz)
Value:
BASE_BOOK_BUF+((xyz)->weight/10) > BOOK_BUF ? \
                                BOOK_BUF : BASE_BOOK_BUF+((xyz)->weight/10);

Get the book buffer size for an individual book object.

Make heavy books hold more text but never let a book msg buffer exceed the max. size (BOOK_BUF)

Parameters:
xyzThe book object to calculate the buffer size for.

Definition at line 54 of file book.h.

Referenced by tailor_readable_ob().