ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/define.h
(Generate patch)

Comparing deliantra/server/include/define.h (file contents):
Revision 1.78 by root, Sat Mar 15 13:52:37 2008 UTC vs.
Revision 1.82 by root, Tue May 6 16:55:25 2008 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2003-2005,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2003-2005,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify 8 * Deliantra is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
299// maximum supported subtype number + 1, can be increased to 256 299// maximum supported subtype number + 1, can be increased to 256
300// currently (2007-09) in use: 50 300// currently (2007-09) in use: 50
301#define NUM_SUBTYPES 64 301#define NUM_SUBTYPES 64
302 302
303/* Subtypes for BUILDER */ 303/* Subtypes for BUILDER */
304#define ST_BD_BUILD 1 /* Builds an item */ 304#define ST_BD_BUILD 1 /* Builds an item */
305#define ST_BD_REMOVE 2 /* Removes an item */ 305#define ST_BD_REMOVE 2 /* Removes an item */
306 306
307/* Subtypes for MATERIAL */ 307/* Subtypes for MATERIAL */
308#define ST_MAT_FLOOR 1 /* Floor */ 308#define ST_MAT_FLOOR 1 /* Floor */
309#define ST_MAT_WALL 2 /* Wall */ 309#define ST_MAT_WALL 2 /* Wall */
310#define ST_MAT_ITEM 3 /* All other items, including doors & such */ 310#define ST_MAT_ITEM 3 /* All other items, including doors & such */
586 * 586 *
587 */ 587 */
588#define OB_TYPE_MOVE_BLOCK(ob1, type) \ 588#define OB_TYPE_MOVE_BLOCK(ob1, type) \
589 ((type) && (ob1->move_type & type) == ob1->move_type) 589 ((type) && (ob1->move_type & type) == ob1->move_type)
590 590
591#define SET_GENERATE_TYPE(xyz,va) (xyz)->stats.sp=(va)
592#define GENERATE_TYPE(xyz) ((xyz)->stats.sp)
593#define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */ 591#define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */
594 592
595#define EXIT_PATH(xyz) (xyz)->slaying 593#define EXIT_PATH(xyz) (xyz)->slaying
596#define EXIT_LEVEL(xyz) (xyz)->stats.food 594#define EXIT_LEVEL(xyz) (xyz)->stats.food
597#define EXIT_X(xyz) (xyz)->stats.hp 595#define EXIT_X(xyz) (xyz)->stats.hp
759// also make sure that this is a float, not double, constant 757// also make sure that this is a float, not double, constant
760#define MIN_ACTIVE_SPEED (1.f / 65536.f) 758#define MIN_ACTIVE_SPEED (1.f / 65536.f)
761 759
762#define RANDOM() (rndm.next () & 0xffffffU) 760#define RANDOM() (rndm.next () & 0xffffffU)
763 761
764/* Returns the weight of the given object. Note: it does not take the number of
765 * items (nrof) into account.
766 * (this looks rather bogus, schmorp)
767 */
768#define WEIGHT(op) ((op)->nrof ? (op)->weight : (op)->weight + (op)->carrying)
769
770/* 762/*
771 * Warning! 763 * Warning!
772 * If you add message types here, don't forget 764 * If you add message types here, don't forget
773 * to keep the client up to date too! 765 * to keep the client up to date too!
774 */ 766 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines