--- deliantra/server/include/global.h 2007/11/08 19:43:24 1.67 +++ deliantra/server/include/global.h 2009/10/12 14:00:58 1.77 @@ -1,22 +1,23 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * - * Deliantra is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * Deliantra is free software: you can redistribute it and/or modify it under + * the terms of the Affero GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * You should have received a copy of the Affero GNU General Public License + * and the GNU General Public License along with this program. If not, see + * . * * The authors can be reached via e-mail to */ @@ -120,8 +121,6 @@ /* Now for recipe/alchemy */ #include "recipe.h" -#include "funcpoint.h" - /***************************************************************************** * GLOBAL VARIABLES: * *****************************************************************************/ @@ -146,39 +145,27 @@ /* * Misc global variables: */ -EXTERN FILE *logfile; /* Used by server/daemon.c */ - -EXTERN archetype *empty_archetype; /* Nice to have fast access to it */ -EXTERN archetype *map_archeytpe; EXTERN shstr first_map_path; /* The start-level */ EXTERN shstr first_map_ext_path; /* Path used for per-race start maps */ EXTERN char errmsg[HUGE_BUF]; EXTERN long ob_count; -/* - * Used in treasure.c - */ -EXTERN archetype *ring_arch, *amulet_arch, *staff_arch, *crown_arch; -#define SET_ANIMATION(ob,newanim) ob->face = animations [ob->animation_id].faces [newanim] -#define GET_ANIMATION(ob,anim) animations [ob->animation_id].faces [anim] -#define GET_ANIM_ID(ob) (ob->animation_id) -/* NUM_ANIMATIONS returns the number of animations allocated. The last - * usuable animation will be NUM_ANIMATIONS-1 (for example, if an object - * has 8 animations, NUM_ANIMATIONS will return 8, but the values will - * range from 0 through 7. - */ -#define NUM_ANIMATIONS(ob) (animations[ob->animation_id].num_animations) -#define NUM_FACINGS(ob) (animations[ob->animation_id].facings) +extern dynbuf_text msg_dynbuf; // a dynbuf for text messages and other temporary data + +/* do not use these in new code, see object.h::animation */ +#define SET_ANIMATION(ob,frame) ob->set_anim_frame (frame) +#define NUM_ANIMATIONS(ob) (ob)->anim_frames () +#define NUM_FACINGS(ob) (ob)->anim_facings () + +// used only by treasure.C, does not handle null arch ptrs +#define IS_ARCH(arch,name) ((arch)->archname == shstr_ ## name) extern void emergency_save (); -extern void cleanup (const char *cause, bool make_core = false); #include "libproto.h" #include "sockproto.h" -#define decrease_ob(xyz) decrease_ob_nr(xyz,1) - INTERFACE_CLASS (Settings) struct Settings { const char *ACC (RO, logfilename); /* logfile to use */ @@ -246,5 +233,9 @@ void reset_signals (); +#ifdef DEVEL +# include "devel.h" +#endif + #endif /* GLOBAL_H */