Atrinik Server  4.0
Functions | Variables
object.c File Reference
#include <global.h>
#include <loader.h>
#include <toolkit/string.h>
#include <monster_data.h>
#include <plugin.h>
#include <arch.h>
#include <object.h>
#include <player.h>
#include <object_methods.h>
#include <door.h>

Go to the source code of this file.

Functions

static void object_debugger (object *op, char *buf, size_t size)
 
static bool object_validator (object *op)
 
void object_init (void)
 
void object_deinit (void)
 
static bool object_can_merge_key_values_one (const object *op, const object *cmp)
 
static bool object_can_merge_key_values (const object *ob1, const object *ob2)
 
bool object_can_merge (object *ob1, object *ob2)
 
objectobject_merge (object *op)
 
uint32_t object_weight_sum (object *op)
 
void object_weight_add (object *op, uint32_t weight)
 
void object_weight_sub (object *op, uint32_t weight)
 
objectobject_get_env (object *op)
 
bool object_is_in_inventory (const object *op, const object *inv)
 
void object_dump (const object *op, StringBuffer *sb)
 
void object_dump_rec (const object *op, StringBuffer *sb)
 
void object_owner_clear (object *op)
 
static void object_owner_set_internal (object *op, object *owner)
 
void object_owner_set (object *op, object *owner)
 
void object_owner_copy (object *op, object *src)
 
objectobject_owner (object *op)
 
void object_copy (object *op, const object *src, bool no_speed)
 
void object_copy_full (object *op, const object *src)
 
objectobject_get (void)
 
void object_update_turnable (object *op)
 
void object_update_speed (object *op)
 
void object_update (object *op, int action)
 
void object_drop_inventory (object *op)
 
void object_destroy_inv (object *op)
 
void object_destroy (object *op)
 
void object_destruct (object *op)
 
static int object_check_move_on (object *op, object *originator, int state)
 
void object_remove (object *op, int flags)
 
objectobject_insert_map (object *op, mapstruct *m, object *originator, int flag)
 
objectobject_stack_get (object *op, uint32_t nrof)
 
objectobject_stack_get_reinsert (object *op, uint32_t nrof)
 
objectobject_stack_get_removed (object *op, uint32_t nrof)
 
objectobject_decrease (object *op, uint32_t nrof)
 
objectobject_insert_into (object *op, object *where, int flag)
 
objectobject_find_arch (object *op, archetype_t *at)
 
objectobject_find_type (object *op, uint8_t type)
 
int object_dir_to_target (object *op, object *target)
 
bool object_can_pick (const object *op, const object *item)
 
objectobject_clone (const object *op)
 
objectobject_load_str (const char *str)
 
void object_free_key_values (object *op)
 
key_value_tobject_get_key_link (const object *op, shstr *key)
 
shstr * object_get_value (const object *op, const char *const key)
 
static bool object_set_value_s (object *op, shstr *key, const char *value, bool add_key)
 
bool object_set_value (object *op, const char *key, const char *value, bool add_key)
 
int object_matches_string (object *op, object *caller, const char *str)
 
int object_get_gender (const object *op)
 
void object_reverse_inventory (object *op)
 
bool object_enter_map (object *op, object *exit, mapstruct *m, int x, int y, bool fixed_pos)
 
const char * object_get_str (const object *op)
 
char * object_get_str_r (const object *op, char *buf, size_t bufsize)
 
int object_blocked (object *op, mapstruct *m, int x, int y)
 
objectobject_create_singularity (const char *name)
 
void object_save (const object *op, FILE *fp)
 

Variables

objectactive_objects
 
const char * gender_noun [GENDER_MAX]
 
const char * gender_subjective [GENDER_MAX]
 
const char * gender_subjective_upper [GENDER_MAX]
 
const char * gender_objective [GENDER_MAX]
 
const char * gender_possessive [GENDER_MAX]
 
const char * gender_reflexive [GENDER_MAX]
 
int freearr_x [SIZEOFFREE]
 
int freearr_y [SIZEOFFREE]
 
int maxfree [SIZEOFFREE]
 
int freedir [SIZEOFFREE]
 
static mempool_struct * pool_object
 
const char * object_flag_names [NUM_FLAGS+1]
 

Detailed Description

Object related code.

Definition in file object.c.

Function Documentation

int object_blocked ( object op,
mapstruct m,
int  x,
int  y 
)

Checks if the specified coordinates are blocked for the specified object.

Takes multi-part objects into account.

Parameters
opObject to check.
mMap.
xX coordinate.
yY coordinate.
Returns
0 if the tile is not blocked, a combination of Map look flags otherwise.

Definition at line 3224 of file object.c.

bool object_can_merge ( object ob1,
object ob2 
)

Examines two objects, and returns true if they can be merged together.

Parameters
ob1The first object.
ob2The second object.
Returns
True if the two object can merge, false otherwise.

Definition at line 299 of file object.c.

static bool object_can_merge_key_values ( const object ob1,
const object ob2 
)
inlinestatic

Check if two objects have the same key values and thus can be merged.

Parameters
ob1Object to check.
ob2Object to check.
Returns
True if ob1 has the same key_values as ob2.

Definition at line 279 of file object.c.

static bool object_can_merge_key_values_one ( const object op,
const object cmp 
)
inlinestatic

Compares value lists.

Parameters
opWhat to search.
cmpWhere to search.
Returns
True if every key_values in 'op' has a partner with the same value in 'cmp'.

Definition at line 245 of file object.c.

bool object_can_pick ( const object op,
const object item 
)

Finds out if an object can be picked up.

Note
This introduces a weight limitation for monsters.
Parameters
whoWho is trying to pick up. Can be a monster or a player.
itemItem we're trying to pick up.
Returns
True if it can be picked up, false otherwise.

Definition at line 2335 of file object.c.

static int object_check_move_on ( object op,
object originator,
int  state 
)
static

Checks if any objects has a movement type that matches objects that affect this object on this space. Calls object_move_on() to process these events.

Parameters
opObject that may trigger something.
originatorPlayer, monster or other object that caused 'op' to trigger the event.
state1 for move on events, 0 for move off events.
Returns
True if 'op' was destroyed, false otherwise.

Definition at line 1547 of file object.c.

object* object_clone ( const object op)

Create clone from one object to another.

Parameters
opObject to clone.
Returns
Clone of op, including inventory and 'more' body parts.

Definition at line 2385 of file object.c.

void object_copy ( object op,
const object src,
bool  no_speed 
)

Copy object first frees everything allocated by the second object, and then copies the contents of the first object into the second object, allocating what needs to be allocated.

Parameters
opObject to copy to.
srcObject to copy from.
no_speedIf set, do not touch the active list.

Definition at line 886 of file object.c.

void object_copy_full ( object op,
const object src 
)

Completely copy an object, duplicating the inventory too.

Parameters
opWhere to copy.
srcObject to copy.

Definition at line 970 of file object.c.

object* object_create_singularity ( const char *  name)

Creates a dummy object.

Parameters
nameName to give the dummy object. Can be NULL.
Returns
Object of specified name. It fill have the FLAG_NO_PICK flag set.

Definition at line 3281 of file object.c.

static void object_debugger ( object op,
char *  buf,
size_t  size 
)
static

Definition at line 186 of file object.c.

object* object_decrease ( object op,
uint32_t  nrof 
)

Decreases a specified number from the amount of an object. If the amount reaches 0, the object is subsequently removed and freed.

This function will send an update to client if op is in a player inventory.

Parameters
opObject to decrease.
nrofNumber to remove.
Returns
'op' if something is left, NULL if the amount reached 0.

Definition at line 2105 of file object.c.

void object_deinit ( void  )

Deinitialize the object API.

Definition at line 229 of file object.c.

void object_destroy ( object op)

Cleanups and frees everything allocated by an object and gives the memory back to the object mempool.

Note
The object must have been removed by object_remove() first.
Parameters
opThe object to destroy (free).

Definition at line 1441 of file object.c.

void object_destroy_inv ( object op)

Destroy (free) inventory of an object. Used internally by object_destroy() to recursively free the object's inventory.

Parameters
opObject to free the inventory of.

Definition at line 1414 of file object.c.

void object_destruct ( object op)

Drop op's inventory on the floor and remove op from the map.

Used mainly for physical destruction of normal objects and monsters.

Parameters
opObject to destruct.

Definition at line 1521 of file object.c.

int object_dir_to_target ( object op,
object target 
)

Get direction from one object to another.

Parameters
opThe first object.
targetThe target object.
range_vectorRange vector pointer to use.
Returns
The direction; zero if no direction can be computed.

Definition at line 2310 of file object.c.

void object_drop_inventory ( object op)

Drops the inventory of the specified object into its current environment.

Makes some decisions whether to actually drop or not, and/or to create a corpse for the stuff.

Parameters
opThe object to drop the inventory for.

Definition at line 1282 of file object.c.

void object_dump ( const object op,
StringBuffer *  sb 
)

Dumps an object.

Parameters
opObject to dump. Can be NULL.
sbBuffer that will contain object information. Must not be NULL.

Definition at line 680 of file object.c.

void object_dump_rec ( const object op,
StringBuffer *  sb 
)

Dump an object, complete with its inventory.

Parameters
opObject to dump.
sbBuffer that will contain object information.

Definition at line 711 of file object.c.

bool object_enter_map ( object op,
object exit,
mapstruct m,
int  x,
int  y,
bool  fixed_pos 
)

Make the specified object enter a map, using either an absolute position with a map pointer and coordinates, or using an exit object.

If neither 'm' nor 'exit' is specified, the object enters the emergency map.

Parameters
opObject entering a map.
exitExit object to use in order to ender the map.
mMap to enter.
xX coordinate.
yY coordinate.
fixed_posIf true, will not attempt to find an adjacency square if the original destination is blocked.
Returns
True on success, false on failure.

Definition at line 2956 of file object.c.

object* object_find_arch ( object op,
archetype_t at 
)

Searches for any object with a matching archetype in the inventory of the given object.

Parameters
opWhere to search.
atArchetype to search for.
Returns
First matching object, or NULL if none matches.

Definition at line 2258 of file object.c.

object* object_find_type ( object op,
uint8_t  type 
)

Searches for any object with a matching type variable in the inventory of the given object.

Parameters
opObject to search in.
typeType to search for.
Returns
First matching object, or NULL if none matches.

Definition at line 2284 of file object.c.

void object_free_key_values ( object op)

Zero the key_values on op, decrementing the shared-string refcounts and freeing the links.

Parameters
opObject to clear.

Definition at line 2456 of file object.c.

object* object_get ( void  )

Grabs an object from the list of unused objects, makes sure it is initialized, and returns it.

If there are no free objects, expand_objects() is called to get more.

Returns
The new object.

Definition at line 993 of file object.c.

object* object_get_env ( object op)

Acquire the outermost environment object for a given object.

Parameters
opObject we want the environment of.
Returns
The outermost environment object for a given object. Never NULL.

Definition at line 631 of file object.c.

int object_get_gender ( const object op)

Get object's gender ID, as defined in #GENDER_xxx.

Parameters
opObject to get gender ID of.
Returns
The gender ID.

Definition at line 2877 of file object.c.

key_value_t* object_get_key_link ( const object op,
shstr *  key 
)

Search for a field by key.

Parameters
opObject to search in.
keyKey to search. Must be a shared string.
Returns
The link from the list if pb has a field named key, NULL otherwise.

Definition at line 2487 of file object.c.

const char* object_get_str ( const object op)

Acquires a string representation of the object that is suitable for debugging purposes, as it includes the object's name, archname, map, environment, etc.

This function cycles through internal buffers to use as return values, and is safe to call up to ten times. After that, previously returned pointers will start getting overwritten.

Parameters
opObject. Can be NULL.
Returns
String representation of the object.

Definition at line 3151 of file object.c.

char* object_get_str_r ( const object op,
char *  buf,
size_t  bufsize 
)

Re-entrant version of object_get_str().

Parameters
opObject. Can be NULL.
bufBuffer to use.
bufsizeSize of 'buf'.
Returns
'buf'.

Definition at line 3175 of file object.c.

shstr* object_get_value ( const object op,
const char *const  key 
)

Get an extra value by key.

Parameters
opObject to search in.
keyKey of which to retrieve the value. Doesn't need to be a shared string.
Returns
The value if found, NULL otherwise.
Note
The returned string is shared.

Definition at line 2515 of file object.c.

void object_init ( void  )

Initialize the object API.

Definition at line 211 of file object.c.

object* object_insert_into ( object op,
object where,
int  flag 
)

This function inserts the object op in the linked list inside the object environment.

Parameters
opObject to insert. Must be removed. May become invalid after return, so use return value of the function.
whereObject to insert into.
flagCombination of INS_xxx values.
Returns
Pointer to inserted item, which will be different than op if object was merged.

Definition at line 2158 of file object.c.

object* object_insert_map ( object op,
mapstruct m,
object originator,
int  flag 
)

This function inserts the object in the two-way linked list which represents what is on a map.

Parameters
opObject to insert.
mMap to insert into.
originatorWhat caused op to be inserted.
flagCombination of INS_xxx values.
Returns
NULL if 'op' was destroyed, 'op' otherwise.

Definition at line 1741 of file object.c.

bool object_is_in_inventory ( const object op,
const object inv 
)

Check if the specified object is somewhere inside another object's inventory, regardless of the inventory nesting level.

Parameters
opThe object to check.
invInventory the object should be in.
Returns
True if the checked object is somewhere inside the specified inventory, false otherwise.

Definition at line 655 of file object.c.

object* object_load_str ( const char *  str)

Creates an object using a string representing its content.

Parameters
strString to load the object from.
Returns
The newly created object, NULL on failure.

Definition at line 2433 of file object.c.

int object_matches_string ( object op,
object caller,
const char *  str 
)

Checks if the specified object matches one of the keywords in the specified string. This is used for example by the /drop and /take commands, but also by the /apply command.

Calling function takes care of what action might need to be done and if it is valid (pickup, drop, etc).

Parameters
opThe item we're trying to match.
callerWho is trying to match the objects, for the purposes of functions like object_get_name_s().
strString we're searching.
Returns
Non-zero if we have a match. A higher value means a better match. Zero means no match.

Definition at line 2676 of file object.c.

object* object_merge ( object op)

Tries to merge 'op' with items above and below the object.

Parameters
opObject to merge.
Returns
'op', or the object 'op' was merged into.

Definition at line 479 of file object.c.

object* object_owner ( object op)

Returns the object which this object marks as being the owner.

An ID scheme is used to avoid pointing to objects which have been freed and are now reused. If this is detected, the owner is set to NULL, and NULL is returned.

Parameters
opThe object to get owner for.
Returns
Owner of the object if any, NULL if no owner.

Definition at line 857 of file object.c.

void object_owner_clear ( object op)

Clear pointer to owner of an object, including ownercount.

Parameters
opThe object to clear the owner for.

Definition at line 741 of file object.c.

void object_owner_copy ( object op,
object src 
)

Copies owner from a source object to the specified object.

Chosen skill object is set to that of the source object (typically the skill that was currently chosen at the time when the source object's owner was set and not the owner's current skill object).

Use this function if player created an object (e.g. fire bullet, swarm spell), and this object creates further objects whose kills should be accounted for the player's original skill, even if player has changed skills in the meanwhile.

Parameters
opThe object.
srcThe source object to copy the owner from.

Definition at line 824 of file object.c.

void object_owner_set ( object op,
object owner 
)

Sets the owner and sets the chosen skill pointer owner's current skill.

Parameters
opThe object.
ownerThe owner.

Definition at line 788 of file object.c.

static void object_owner_set_internal ( object op,
object owner 
)
static

Sets the owner of the object 'op' to the 'owner' object.

Parameters
opThe object to set the owner for.
ownerThe owner.
See Also
object_owner()

Definition at line 758 of file object.c.

void object_remove ( object op,
int  flags 
)

This function removes the object op from the linked list of objects which it is currently tied to. When this function is done, the object will have no environment. If the object previously had an environment, the map pointer and x/y coordinates will be updated to the previous environment.

Note
If you want to remove a lot of items in player's inventory, set FLAG_NO_FIX_PLAYER on the player first and then explicitly call living_update() on the player.
Parameters
opObject to remove.
flagsCombination of Object removal flags..

Definition at line 1623 of file object.c.

void object_reverse_inventory ( object op)

Reverses order of all the objects in the specified object's inventory.

Parameters
opObject to reverse the inventory of.

Definition at line 2901 of file object.c.

void object_save ( const object op,
FILE *  fp 
)

Dumps all variables in an object to a file.

Parameters
opObject to save.
fpWhere to save the object's text representation. Can be NULL, in which case this is a no-op.

Definition at line 3305 of file object.c.

bool object_set_value ( object op,
const char *  key,
const char *  value,
bool  add_key 
)

Updates the key in op to value.

Parameters
opObject to update.
keyKey to set or update. Doesn't need to be a shared string.
valueValue to set. Doesn't need to be a shared string. Can be NULL.
add_keyIf false, will not add the key if it doesn't exist in op.
Returns
True if key was updated or added, false otherwise.
Note
This function is merely a wrapper to object_set_value_s() to ensure the key is a shared string.

Definition at line 2635 of file object.c.

static bool object_set_value_s ( object op,
shstr *  key,
const char *  value,
bool  add_key 
)
static

Updates or sets a key value.

Parameters
opObject to update.
keyKey to set or update. Must be a shared string.
valueValue to set. Doesn't need to be a shared string. Can be NULL.
add_keyIf false, will not add the key if it doesn't exist in op.
Returns
True if key was updated or added, false otherwise.

Definition at line 2550 of file object.c.

object* object_stack_get ( object op,
uint32_t  nrof 
)

Split a stack of objects into another object with the specified quantity.

If 'nrof' is more or equal to the nrof of the specified object, the original object is returned instead and no extra work is done.

Parameters
opObject to split.
nrofNumber of items to split from the stack.
Returns
Split part of the stack. Can be the original object; never NULL.

Definition at line 2010 of file object.c.

object* object_stack_get_reinsert ( object op,
uint32_t  nrof 
)

Like object_stack_get(), but if a new object is created due to the split, it is inserted in the same environment as the original object.

Parameters
opObject to split.
nrofNumber of items to split from the stack.
Returns
Split part of the stack. Can be the original object; never NULL.

Definition at line 2046 of file object.c.

object* object_stack_get_removed ( object op,
uint32_t  nrof 
)

Like object_stack_get(), but if the original object is returned (no new stack is created), it is also removed from its environment.

Parameters
opObject to split.
nrofNumber of items to split from the stack.
Returns
Split part of the stack. Can be the original object; never NULL.

Definition at line 2078 of file object.c.

void object_update ( object op,
int  action 
)

Updates the various map square flags and values depending on 'action'.

Parameters
opObject to update.
actionHint of what the caller believes need to be done. One of Object update flags values.

Definition at line 1117 of file object.c.

void object_update_speed ( object op)

Updates the speed of an object. If the speed changes from 0 to another value, or vice versa, then add/remove the object from the active list.

This function needs to be called whenever the speed of an object changes.

Parameters
opThe object.

Definition at line 1043 of file object.c.

void object_update_turnable ( object op)

If an object with the FLAG_IS_TURNABLE flag needs to be updated due to a direction change, this function can be called to update the face variable.

Parameters
opThe object to update.

Definition at line 1021 of file object.c.

static bool object_validator ( object op)
static

Definition at line 202 of file object.c.

void object_weight_add ( object op,
uint32_t  weight 
)

Adds the specified weight to an object, and also updates how much the environment(s) is/are carrying.

Parameters
opThe object.
weightThe weight to add.

Definition at line 568 of file object.c.

void object_weight_sub ( object op,
uint32_t  weight 
)

Recursively (outwards) subtracts a number from the weight of an object (and what is carried by its environment(s)).

Parameters
opThe object.
weightThe weight to subtract.

Definition at line 600 of file object.c.

uint32_t object_weight_sum ( object op)

Recursive function to calculate the weight an object is carrying.

It goes through in figures out how much containers are carrying, and sums it up.

Parameters
opThe object to calculate the weight for
Returns
The calculated weight

Definition at line 523 of file object.c.

Variable Documentation

object* active_objects

List of active objects that need to be processed

Definition at line 42 of file object.c.

int freearr_x[SIZEOFFREE]
Initial value:
= {
0,
0, 1, 1, 1, 0, -1, -1, -1,
0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2, -2, -2, -2, -1,
0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3,
-3, -3, -3, -3, -3, -2, -1,
}

X offset when searching around a spot.

Definition at line 84 of file object.c.

int freearr_y[SIZEOFFREE]
Initial value:
= {
0,
-1, -1, 0, 1, 1, 1, 0, -1,
-2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2,
-3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3,
2, 1, 0, -1, -2, -3, -3, -3,
}

Y offset when searching around a spot.

Definition at line 99 of file object.c.

int freedir[SIZEOFFREE]
Initial value:
= {
0,
1, 2, 3, 4, 5, 6, 7, 8,
1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8,
1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8,
}

Direction we're pointing on this spot.

Definition at line 129 of file object.c.

const char* gender_noun[GENDER_MAX]
Initial value:
= {
"neuter", "male", "female", "hermaphrodite"
}

Gender nouns.

Definition at line 47 of file object.c.

const char* gender_objective[GENDER_MAX]
Initial value:
= {
"it", "him", "her", "it"
}

Objective pronouns.

Definition at line 65 of file object.c.

const char* gender_possessive[GENDER_MAX]
Initial value:
= {
"its", "his", "her", "its"
}

Possessive pronouns.

Definition at line 71 of file object.c.

const char* gender_reflexive[GENDER_MAX]
Initial value:
= {
"itself", "himself", "herself", "itself"
}

Reflexive pronouns.

Definition at line 77 of file object.c.

const char* gender_subjective[GENDER_MAX]
Initial value:
= {
"it", "he", "she", "it"
}

Subjective pronouns.

Definition at line 53 of file object.c.

const char* gender_subjective_upper[GENDER_MAX]
Initial value:
= {
"It", "He", "She", "It"
}

Subjective pronouns, with first letter in uppercase.

Definition at line 59 of file object.c.

int maxfree[SIZEOFFREE]
Initial value:
= {
0,
9, 10, 13, 14, 17, 18, 21, 22,
25, 26, 27, 30, 31, 32, 33, 36, 37, 39, 39, 42, 43, 44, 45, 48,
49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49,
}

Number of spots around a location, including that location (except for 0).

Definition at line 114 of file object.c.

const char* object_flag_names[NUM_FLAGS+1]
Initial value:
= {
"sleep", "confused", NULL, "scared", "is_blind",
"is_invisible", "is_ethereal", "is_good", "no_pick", "walk_on",
"no_pass", "is_animated", "slow_move", "flying", "monster",
"friendly", NULL, "been_applied", "auto_apply", NULL,
"is_neutral", "see_invisible", "can_roll", "connect_reset", "is_turnable",
"walk_off", "fly_on", "fly_off", "is_used_up", "identified",
"reflecting", "changing", "splitting", "hitback", "startequip",
"blocksview", "undead", "can_stack", "unaggressive", "reflect_missile",
"reflect_spell", "no_magic", "no_fix_player", "is_evil", "soulbound",
"run_away", "pass_thru", "can_pass_thru", "outdoor", "unique",
"no_drop", "is_indestructible", "can_cast_spell", NULL, "two_handed",
"can_use_bow", "can_use_armour", "can_use_weapon", "connect_no_push",
"connect_no_release", "has_ready_bow", "xrays", NULL, "is_floor",
"lifesave", "is_magical", NULL, "stand_still", "random_move", "only_attack",
NULL, "stealth", NULL, NULL, "cursed",
"damned", "is_buildable", "no_pvp", NULL, NULL,
"is_thrown", NULL, NULL, "is_male", "is_female",
"applied", "inv_locked", NULL, NULL, NULL,
"has_ready_weapon", "no_skill_ident", NULL, "can_see_in_dark", "is_cauldron",
"is_dust", NULL, "one_hit", "draw_double_always", "berserk",
"no_attack", "invulnerable", "quest_item", "is_trapped", NULL,
NULL, NULL, NULL, NULL, NULL,
"sys_object", "use_fix_pos", "unpaid", "hidden", "make_invisible",
"make_ethereal", "is_player", "is_named", NULL, "no_teleport",
"corpse", "corpse_forced", "player_only", NULL, "one_drop",
"cursed_perm", "damned_perm", "door_closed", "is_spell", "is_missile",
"draw_direction", "draw_double", "is_assassin", NULL, "no_save",
NULL
}

This is a list of pointers that correspond to the FLAG_.. values. This is a simple 1:1 mapping - if FLAG_FRIENDLY is 15, then the 15'th element of this array should match that name.

If an entry is NULL, that is a flag not to be loaded/saved.

See Also
Flag defines

Definition at line 153 of file object.c.

mempool_struct* pool_object
static

The object memory pool.

Definition at line 143 of file object.c.