Defines | Functions | Variables

questpgr.c File Reference

#include "hack.h"
#include "dlb.h"
#include "qtext.h"
Include dependency graph for questpgr.c:

Defines

#define QTEXT_FILE   "quest.dat"

Functions

static void FDECL (Fread,(genericptr_t, int, int, dlb *))
STATIC_DCL struct qtmsgFDECL (construct_qtlist,(long))
STATIC_DCL const char * NDECL (intermed)
STATIC_DCL const char * NDECL (creatorname)
STATIC_DCL const char * NDECL (neminame)
STATIC_DCL const char * NDECL (guardname)
STATIC_DCL const char * NDECL (homebase)
STATIC_DCL struct qtmsgFDECL (msg_in,(struct qtmsg *, int))
STATIC_DCL void FDECL (convert_arg,(CHAR_P))
STATIC_DCL void NDECL (convert_line)
STATIC_DCL void FDECL (deliver_by_pline,(struct qtmsg *))
STATIC_DCL void FDECL (deliver_by_window,(struct qtmsg *, int))
static void Fread (genericptr_t ptr, int size, int nitems, dlb *stream)
STATIC_OVL struct qtmsgconstruct_qtlist (long hdr_offset)
void load_qtlist ()
void unload_qtlist ()
short quest_info (int typ)
const char * ldrname ()
STATIC_OVL const char * intermed ()
boolean is_quest_artifact (struct obj *otmp)
STATIC_OVL const char * neminame ()
STATIC_OVL const char * guardname ()
STATIC_OVL const char * homebase ()
STATIC_OVL struct qtmsgmsg_in (struct qtmsg *qtm_list, int msgnum)
STATIC_OVL void convert_arg (char c)
STATIC_OVL void convert_line ()
char * string_subst (char *str)
STATIC_OVL void deliver_by_pline (struct qtmsg *qt_msg)
STATIC_OVL void deliver_by_window (struct qtmsg *qt_msg, int how)
void qt_com_firstline (int msgnum, char *msgbuf)
void com_pager (int msgnum)
void qt_pager (int msgnum)
STATIC_OVL const char * creatorname ()

Variables

static char in_line [80]
static char cvt_buf [64]
static char out_line [128]
static struct qtlists qt_list
static dlb * msg_file
static char nambuf [sizeof cvt_buf]
static const char * creator_names []

Define Documentation

#define QTEXT_FILE   "quest.dat"

Referenced by load_qtlist().


Function Documentation

void com_pager ( int  msgnum )

References qtlists::common, deliver_by_pline(), deliver_by_window(), qtmsg::delivery, dlb_fseek, msg_in(), NHW_MENU, NHW_TEXT, qtmsg::offset, qt_list, and SEEK_SET.

Referenced by chat_with_leader(), check_tutorial_message(), cuss(), finish_quest(), goto_level(), newgame(), and tutorial_redisplay().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct qtmsg* construct_qtlist ( long  hdr_offset ) [read]

References dlb_fseek, Fread(), and SEEK_SET.

Referenced by load_qtlist().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void convert_arg ( char  c )
STATIC_OVL void convert_line (  )

References an(), An(), convert_arg(), highc(), makeplural(), out_line, s_suffix(), Strcat, Strcpy, and strncmpi().

Referenced by deliver_by_pline(), deliver_by_window(), qt_com_firstline(), and string_subst().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL const char* creatorname (  )

Return the name of the creator deity. The name stays the same for the running game.

References index, SIZE, u, and you::ubirthday.

Referenced by convert_arg().

Here is the caller graph for this function:

STATIC_OVL void deliver_by_pline ( struct qtmsg qt_msg )

References BUFSZ, convert_line(), dlb_fgets, pline(), qtmsg::size, and xcrypt().

Referenced by com_pager(), and qt_pager().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void deliver_by_window ( struct qtmsg qt_msg,
int  how 
)

References BUFSZ, convert_line(), create_nhwindow, destroy_nhwindow, display_nhwindow, dlb_fgets, putstr, qtmsg::size, TRUE, and xcrypt().

Referenced by com_pager(), and qt_pager().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL struct qtmsg* FDECL ( construct_qtlist  ,
(long)   
) [read]
STATIC_DCL struct qtmsg* FDECL ( msg_in  ,
(struct qtmsg *, int)   
) [read]
STATIC_DCL void FDECL ( convert_arg  ,
(CHAR_P)   
)
STATIC_DCL void FDECL ( deliver_by_pline  ,
(struct qtmsg *)   
)
static void FDECL ( Fread  ,
(genericptr_t, int, int, dlb *)   
) [static]
STATIC_DCL void FDECL ( deliver_by_window  ,
(struct qtmsg *, int)   
)
static void Fread ( genericptr_t  ptr,
int  size,
int  nitems,
dlb *  stream 
) [static]

References dlb_fread.

Referenced by construct_qtlist(), and load_qtlist().

Here is the caller graph for this function:

STATIC_OVL const char* guardname (  )

References Role::guardnum, mons, and urole.

Referenced by convert_arg().

Here is the caller graph for this function:

STATIC_OVL const char* homebase (  )

References Role::homebase, and urole.

Referenced by convert_arg().

Here is the caller graph for this function:

STATIC_OVL const char* intermed (  )

References Role::intermed, and urole.

Referenced by convert_arg().

Here is the caller graph for this function:

boolean is_quest_artifact ( struct obj otmp )
const char* ldrname (  )

References Role::ldrnum, mons, nambuf, Sprintf, type_is_pname, and urole.

Referenced by convert_arg().

Here is the caller graph for this function:

void load_qtlist (  )

References qtlists::chrole, qtlists::common, COMMON_ID, construct_qtlist(), dlb_fopen, Race::filecode, Role::filecode, Fread(), LEN_HDR, N_HDR, qt_list, QTEXT_FILE, RDBMODE, urace, and urole.

Referenced by dorecover(), and newgame().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct qtmsg* msg_in ( struct qtmsg qtm_list,
int  msgnum 
) [read]

References qtmsg::msgnum.

Referenced by com_pager(), qt_com_firstline(), and qt_pager().

Here is the caller graph for this function:

STATIC_DCL const char* NDECL ( creatorname   )
STATIC_DCL void NDECL ( convert_line   )
STATIC_DCL const char* NDECL ( guardname   )
STATIC_DCL const char* NDECL ( neminame   )
STATIC_DCL const char* NDECL ( intermed   )
STATIC_DCL const char* NDECL ( homebase   )
STATIC_OVL const char* neminame (  )

References mons, nambuf, Role::neminum, Sprintf, type_is_pname, and urole.

Referenced by convert_arg().

Here is the caller graph for this function:

void qt_com_firstline ( int  msgnum,
char *  msgbuf 
)

References BUFSZ, qtlists::common, convert_line(), dlb_fgets, dlb_fseek, msg_in(), qtmsg::offset, qt_list, SEEK_SET, and xcrypt().

Referenced by tutorial_redisplay().

Here is the call graph for this function:

Here is the caller graph for this function:

void qt_pager ( int  msgnum )
short quest_info ( int  typ )

References Role::guardnum, Role::ldrnum, MS_GUARDIAN, MS_LEADER, MS_NEMESIS, Role::neminum, Role::questarti, and urole.

Referenced by do_class_genocide(), onscary(), and setmangry().

Here is the caller graph for this function:

char* string_subst ( char *  str )

References convert_line(), and out_line.

Referenced by dosounds(), and spo_message().

Here is the call graph for this function:

Here is the caller graph for this function:

void unload_qtlist (  )

References qtlists::chrole, qtlists::common, dlb_fclose, and qt_list.

Referenced by freedynamicdata().

Here is the caller graph for this function:


Variable Documentation

const char* creator_names[] [static]
Initial value:
 {
        "Marduk", 
        "Apsu", 
        "Aeon", 
        "Gaia", 
        "Khronos", 
        "Atum", 
        "Khepri", 
        "Kamui", 
        "Mbombo", 
        "Unkulunkulu", 
        "Vishvakarman", 
        "Brahma", 
        "Coatlique", 
        "Viracocha", 
        "Tepeu", 
        "Pangu", 
        "Bulaing", 
        "Ahura Mazda", 
        "Demiourgos", 
}

The names of creator deities from different cultures.

char cvt_buf[64]
char in_line[80] [static]

Referenced by m_move(), and parse().

dlb* msg_file [static]
char nambuf[sizeof cvt_buf] [static]
char out_line[128]

Referenced by convert_line(), and string_subst().

struct qtlists qt_list [static]