Crossfire Server, Trunk
book.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GeneralMessage
 
struct  readable_message_type
 

Macros

#define BASE_BOOK_BUF   750
 
#define BOOK_BUF   HUGE_BUF-10
 
#define BOOKSIZE(xyz)
 

Detailed Description

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

Definition in file book.h.

Macro Definition Documentation

◆ BASE_BOOK_BUF

#define BASE_BOOK_BUF   750

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 23 of file book.h.

◆ BOOK_BUF

#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 16 of file book.h.

◆ BOOKSIZE

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

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 31 of file book.h.

BASE_BOOK_BUF
#define BASE_BOOK_BUF
Definition: book.h:23
BOOK_BUF
#define BOOK_BUF
Definition: book.h:16