/home/leaf/crossfire/server/branches/1.12/include/global.h File Reference

#include "includes.h"
#include "face.h"
#include "attack.h"
#include "material.h"
#include "living.h"
#include "object.h"
#include "map.h"
#include "tod.h"
#include "skills.h"
#include "newserver.h"
#include "player.h"
#include "treasure.h"
#include "commands.h"
#include "book.h"
#include "ob_methods.h"
#include "ob_types.h"
#include "artifact.h"
#include "god.h"
#include "race.h"
#include "recipe.h"
#include "spells.h"
#include "stringbuffer.h"
#include "libproto.h"
#include "sockproto.h"
#include "typesproto.h"
#include "plugin.h"

Include dependency graph for global.h:

Go to the source code of this file.

Data Structures

struct  linked_char
struct  Settings
struct  Statistics

Defines

#define EXTERN   extern
#define UINT32_MAX   4294967295U
#define SINT32_MAX   2147483647
#define UINT16_MAX   65535
#define SINT16_MAX   32767
#define UINT8_MAX   255
#define SINT8_MAX   127
#define NROF_COMPRESS_METHODS   4
#define ROTATE_RIGHT(c)   if ((c)&01) (c) = ((c)>>1)+0x80000000; else (c) >>= 1;
#define SET_ANIMATION(ob, newanim)   { if (ob->temp_animation_id) { ob->face = &new_faces[animations[ob->temp_animation_id].faces[newanim]]; } else { ob->face = &new_faces[animations[ob->animation_id].faces[newanim]]; } }
#define GET_ANIMATION(ob, anim)   (ob->temp_animation_id ? animations[ob->temp_animation_id].faces[anim] : animations[ob->animation_id].faces[anim])
#define GET_ANIM_ID(ob)   (ob->temp_animation_id ? ob->temp_animation_id : ob->animation_id)
#define NUM_ANIMATIONS(ob)   (ob->temp_animation_id ? animations[ob->temp_animation_id].num_animations : animations[ob->animation_id].num_animations)
#define NUM_FACINGS(ob)   (ob->temp_animation_id ? animations[ob->temp_animation_id].facings : animations[ob->animation_id].facings)
#define decrease_ob(xyz)   decrease_ob_nr(xyz, 1)
#define FREE_AND_CLEAR(xyz)   { free((void *)xyz); xyz = NULL; }
#define FREE_AND_CLEAR_STR(xyz)   { free_string(xyz); xyz = NULL; }
#define FREE_AND_COPY(sv, nv)   { if (sv) free_string(sv); sv = add_string(nv); }
#define CALLOC(x, y)   calloc(x, y)
#define CFREE(x)   free(x)
#define dirent   direct
#define NAMLEN(dirent)   (dirnet)->d_namlen
#define GETTIMEOFDAY(last_time)   gettimeofday(last_time);
#define SCRIPT_FIX_ACTIVATOR   2
#define SCRIPT_FIX_ALL   1
#define SCRIPT_FIX_NOTHING   0

Typedefs

typedef unsigned int uint32
typedef signed int sint32
typedef unsigned short uint16
typedef signed short sint16
typedef unsigned char uint8
typedef signed char sint8
typedef const char * sstring
typedef unsigned short Fontindex

Variables

New_Facenew_faces
EXTERN playerfirst_player
EXTERN mapstructfirst_map
EXTERN regionfirst_region
EXTERN treasurelistfirst_treasurelist
EXTERN artifactlistfirst_artifactlist
EXTERN archetypefirst_archetype
EXTERN objectlinkfirst_friendly_object
EXTERN godlinkfirst_god
EXTERN racelinkfirst_race
const char * uncomp [NROF_COMPRESS_METHODS][3]
EXTERN long warn_archetypes
EXTERN long init_done
EXTERN long trying_emergency_save
EXTERN long nroferrors
uint32 pticks
EXTERN FILE * logfile
int reopen_logfile
EXTERN int exiting
EXTERN long nroftreasures
EXTERN long nrofartifacts
EXTERN long nrofallowedstr
EXTERN archetypeempty_archetype
EXTERN archetypemap_archeytpe
EXTERN char first_map_path [MAX_BUF]
EXTERN char first_map_ext_path [MAX_BUF]
EXTERN long ob_count
EXTERN archetypering_arch
EXTERN archetypeamulet_arch
EXTERN archetypestaff_arch
EXTERN archetypecrown_arch
EXTERN const char * undead_name
EXTERN Animationsanimations
EXTERN int num_animations
EXTERN int animations_allocated
EXTERN int bmaps_checksum
short freearr_x [SIZEOFFREE]
short freearr_y [SIZEOFFREE]
int maxfree [SIZEOFFREE]
int freedir [SIZEOFFREE]
int rightof_x [9]
int rightof_y [9]
int leftof_x [9]
int leftof_y [9]
New_Faceblank_face
New_Faceempty_face
New_Facesmooth_face
uint32 max_time
socket_structinit_sockets
Settings settings
Statistics statistics


Detailed Description

Global definitions: u/sint8, things like that.

Definition in file global.h.


Define Documentation

#define CALLOC ( x,
 )     calloc(x, y)

Definition at line 295 of file global.h.

#define CFREE (  )     free(x)

Definition at line 296 of file global.h.

#define decrease_ob ( xyz   )     decrease_ob_nr(xyz, 1)

Definition at line 276 of file global.h.

#define dirent   direct

Definition at line 307 of file global.h.

#define EXTERN   extern

Definition at line 38 of file global.h.

#define FREE_AND_CLEAR ( xyz   )     { free((void *)xyz); xyz = NULL; }

Definition at line 282 of file global.h.

#define FREE_AND_CLEAR_STR ( xyz   )     { free_string(xyz); xyz = NULL; }

Definition at line 283 of file global.h.

#define FREE_AND_COPY ( sv,
nv   )     { if (sv) free_string(sv); sv = add_string(nv); }

Definition at line 288 of file global.h.

#define GET_ANIM_ID ( ob   )     (ob->temp_animation_id ? ob->temp_animation_id : ob->animation_id)

Definition at line 249 of file global.h.

#define GET_ANIMATION ( ob,
anim   )     (ob->temp_animation_id ? animations[ob->temp_animation_id].faces[anim] : animations[ob->animation_id].faces[anim])

Definition at line 248 of file global.h.

#define GETTIMEOFDAY ( last_time   )     gettimeofday(last_time);

Definition at line 442 of file global.h.

#define NAMLEN ( dirent   )     (dirnet)->d_namlen

Definition at line 308 of file global.h.

#define NROF_COMPRESS_METHODS   4

Definition at line 201 of file global.h.

#define NUM_ANIMATIONS ( ob   )     (ob->temp_animation_id ? animations[ob->temp_animation_id].num_animations : animations[ob->animation_id].num_animations)

Definition at line 255 of file global.h.

#define NUM_FACINGS ( ob   )     (ob->temp_animation_id ? animations[ob->temp_animation_id].facings : animations[ob->animation_id].facings)

Definition at line 256 of file global.h.

#define ROTATE_RIGHT (  )     if ((c)&01) (c) = ((c)>>1)+0x80000000; else (c) >>= 1;

Definition at line 245 of file global.h.

#define SCRIPT_FIX_ACTIVATOR   2

Definition at line 449 of file global.h.

#define SCRIPT_FIX_ALL   1

Definition at line 450 of file global.h.

#define SCRIPT_FIX_NOTHING   0

Definition at line 451 of file global.h.

#define SET_ANIMATION ( ob,
newanim   )     { if (ob->temp_animation_id) { ob->face = &new_faces[animations[ob->temp_animation_id].faces[newanim]]; } else { ob->face = &new_faces[animations[ob->animation_id].faces[newanim]]; } }

Definition at line 247 of file global.h.

#define SINT16_MAX   32767

Definition at line 73 of file global.h.

#define SINT32_MAX   2147483647

Definition at line 65 of file global.h.

#define SINT8_MAX   127

Definition at line 81 of file global.h.

#define UINT16_MAX   65535

Definition at line 69 of file global.h.

#define UINT32_MAX   4294967295U

Definition at line 61 of file global.h.

#define UINT8_MAX   255

Definition at line 77 of file global.h.


Typedef Documentation

typedef unsigned short Fontindex

Definition at line 86 of file global.h.

typedef signed short sint16

Definition at line 72 of file global.h.

typedef signed int sint32

Definition at line 64 of file global.h.

typedef signed char sint8

Definition at line 80 of file global.h.

typedef const char* sstring

Strings that should be manipulated through add_string() and free_string().

Definition at line 84 of file global.h.

typedef unsigned short uint16

Definition at line 67 of file global.h.

typedef unsigned int uint32

Definition at line 58 of file global.h.

typedef unsigned char uint8

Definition at line 75 of file global.h.


Variable Documentation

Definition at line 238 of file global.h.

Definition at line 241 of file global.h.

Definition at line 242 of file global.h.

Following can just as easily be pointers, but it is easier to keep them like this.

Definition at line 66 of file image.c.

EXTERN int bmaps_checksum

Definition at line 242 of file global.h.

Definition at line 238 of file global.h.

Definition at line 66 of file image.c.

short freearr_x[SIZEOFFREE]

X offset when searching around a spot.

Definition at line 75 of file object.c.

short freearr_y[SIZEOFFREE]

Y offset when searching around a spot.

Definition at line 81 of file object.c.

int freedir[SIZEOFFREE]

Direction we're pointing on this spot.

Definition at line 93 of file object.c.

EXTERN long init_done

Ignores signals until init_done is true.

Definition at line 210 of file global.h.

Established connections for clients not yet playing. See the page on the login process for a description of its use.

Definition at line 68 of file init.c.

int leftof_x[9]

int leftof_y[9]

Gloabal variables:

Definition at line 46 of file time.c.

int maxfree[SIZEOFFREE]

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

Definition at line 87 of file object.c.

Definition at line 38 of file image.c.

EXTERN long nroferrors

If it exceeds MAX_ERRORS, call fatal()

Definition at line 212 of file global.h.

EXTERN int num_animations

Definition at line 242 of file global.h.

Used by various function to determine how often to save the character

?

Definition at line 56 of file time.c.

int rightof_x[9]

int rightof_y[9]

Definition at line 238 of file global.h.

You unforunately need to looking in include/global.h to see what these correspond to.

Definition at line 48 of file init.c.

Definition at line 66 of file image.c.

Definition at line 238 of file global.h.

Definition at line 119 of file init.c.

EXTERN long trying_emergency_save

True when emergency_save() is reached.

Definition at line 211 of file global.h.

const char* uncomp[NROF_COMPRESS_METHODS][3]

This is a list of the suffix, uncompress and compress functions. Thus, if you have some other compress program you want to use, the only thing that needs to be done is to extended this. The first entry must be NULL - this is what is used for non compressed files.

Definition at line 593 of file porting.c.

EXTERN const char* undead_name

Definition at line 239 of file global.h.

EXTERN long warn_archetypes

If true, write warnings when failing to find archetypes when loading from file.

Definition at line 208 of file global.h.


Generated on Thu Mar 25 23:06:15 2010 for Crossfire Server, Branch 1.12 by  doxygen 1.5.8