Defines | Functions | Variables

o_init.c File Reference

#include "hack.h"
#include "lev.h"
Include dependency graph for o_init.c:

Defines

#define COPY_OBJ_DESCR(o_dst, o_src)   o_dst.oc_descr_idx = o_src.oc_descr_idx

Functions

STATIC_DCL void FDECL (setgemprobs,(d_level *))
STATIC_DCL void FDECL (shuffle,(int, int, BOOLEAN_P))
STATIC_DCL void NDECL (shuffle_all)
STATIC_DCL boolean FDECL (interesting_to_discover,(int))
STATIC_DCL void FDECL (swap_armor,(int, int, int))
STATIC_OVL void setgemprobs (d_level *dlev)
STATIC_OVL void shuffle (int o_low, int o_high, boolean domaterial)
void init_objects ()
STATIC_OVL void shuffle_all ()
void swap_armor (int old_relative_position, int new_relative_position, int first)
int find_skates ()
void oinit ()
void savenames (int fd, int mode)
void restnames (int fd)
void discover_object (int oindx, boolean mark_as_known, boolean credit_hero)
void undiscover_object (int oindx)
STATIC_OVL boolean interesting_to_discover (int i)
int dodiscovered ()
void dragons_init ()

Variables

static NEARDATA short disco [NUM_OBJECTS] = DUMMY
static short uniq_objs []

Define Documentation

#define COPY_OBJ_DESCR (   o_dst,
  o_src 
)    o_dst.oc_descr_idx = o_src.oc_descr_idx

Referenced by init_objects().


Function Documentation

void discover_object ( int  oindx,
boolean  mark_as_known,
boolean  credit_hero 
)

References A_WIS, bases, Dragon_mail_to_scales, Dragon_scales_to_mail, exercise(), FALSE, Is_dragon_mail, Is_dragon_scales, moves, objects, objclass::oc_class, TRUE, and update_inventory.

Referenced by docall(), ini_inv(), and knows_object().

Here is the call graph for this function:

Here is the caller graph for this function:

int dodiscovered (  )
void dragons_init (  )

Shuffles the properties of dragons according to the order of the dragons scales. Currently name, color are shuffled.

References GRAY_DRAGON_SCALES, permonst::mname, mons, objects, objclass::oc_descr_idx, PM_BABY_GRAY_DRAGON, PM_GRAY_DRAGON, and YELLOW_DRAGON_SCALES.

Referenced by moveloop().

Here is the caller graph for this function:

STATIC_DCL boolean FDECL ( interesting_to_discover  ,
(int)   
)
STATIC_DCL void FDECL ( shuffle  ,
(int, int, BOOLEAN_P)   
)
STATIC_DCL void FDECL ( swap_armor  ,
(int, int, int)   
)
STATIC_DCL void FDECL ( setgemprobs  ,
(d_level *)   
)
int find_skates (  )

References LEVITATION_BOOTS, OBJ_DESCR, objects, and SPEED_BOOTS.

Referenced by domove().

Here is the caller graph for this function:

void init_objects (  )

References AQUAMARINE, bases, COPY_OBJ_DESCR, DIAMOND, EMERALD, FLUORITE, GEM_CLASS, MAXOCLASSES, NUM_OBJECTS, objects, objclass::oc_class, obj::oclass, rn2(), SAPPHIRE, setgemprobs(), shuffle_all(), and TURQUOISE.

Referenced by newgame().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL boolean interesting_to_discover ( int  i )

References OBJ_DESCR, objects, and objclass::oc_uname.

Referenced by dodiscovered().

Here is the caller graph for this function:

STATIC_DCL void NDECL ( shuffle_all   )
void oinit (  )

References setgemprobs(), u, and you::uz.

Referenced by makelevel().

Here is the call graph for this function:

Here is the caller graph for this function:

void restnames ( int  fd )

References bases, mread(), NUM_OBJECTS, objects, and objclass::oc_uname.

Referenced by restgamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

void savenames ( int  fd,
int  mode 
)

References bases, bwrite(), NUM_OBJECTS, objects, objclass::oc_uname, perform_bwrite, and release_data.

Referenced by savegamestate().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void setgemprobs ( d_level dlev )

References bases, GEM_CLASS, LAST_GEM, ledger_no(), maxledgerno(), OBJ_NAME, objects, and wait_synch.

Referenced by init_objects(), and oinit().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void shuffle ( int  o_low,
int  o_high,
boolean  domaterial 
)

References color, objects, objclass::oc_color, objclass::oc_descr_idx, and rn2().

Referenced by shuffle_all().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void shuffle_all (  )
void swap_armor ( int  old_relative_position,
int  new_relative_position,
int  first 
)

Swaps two items of the same armor class. Currently name, color and price are swapped.

References objects, objclass::oc_color, objclass::oc_cost, and objclass::oc_descr_idx.

Referenced by shuffle_all().

Here is the caller graph for this function:

void undiscover_object ( int  oindx )

References bases, FALSE, OBJ_NAME, objects, objclass::oc_class, TRUE, and update_inventory.

Referenced by docall(), and forget_single_object().

Here is the caller graph for this function:


Variable Documentation

NEARDATA short disco[NUM_OBJECTS] = DUMMY [static]
short uniq_objs[] [static]