--- deliantra/server/include/object.h 2009/10/19 21:48:49 1.213 +++ deliantra/server/include/object.h 2009/11/08 20:55:39 1.216 @@ -30,6 +30,8 @@ #include "cfperl.h" #include "shstr.h" +//+GPL + typedef int tag_t; enum { @@ -87,6 +89,8 @@ shstr key, value; }; +//-GPL + struct UUID { uint64 seq; @@ -122,6 +126,8 @@ } }; +//+GPL + /* Definition for WILL_APPLY values. Replaces having harcoded values * sprinkled in the code. Note that some of these also replace fields * that were in the can_apply area. What is the point of having both @@ -335,6 +341,8 @@ void kv_del (shstr_tmp key); void kv_set (shstr_tmp key, shstr_tmp value); +//-GPL + // custom extra fields management struct key_value_access_proxy { @@ -525,7 +533,7 @@ && (subtype == SP_BULLET || subtype == SP_MAGIC_MISSILE)); } MTH bool is_range () const { return type == BOW || type == ROD || type == WAND || type == HORN; } - MTH bool has_active_speed () const { return FABS(speed) >= MIN_ACTIVE_SPEED; } + MTH bool has_active_speed () const { return fabs (speed) >= MIN_ACTIVE_SPEED; } // temporary: wether the object can be saved in a map file // contr => is a player @@ -639,6 +647,8 @@ // insert object at same map position as 'where' // handles both inventory and map "positions" MTH object *insert_at (object *where, object *originator = 0, int flags = 0); + // check whether we can put this into the map, respect max_nrof, max_volume, max_items + MTH bool can_drop_at (maptile *m, int x, int y, object *originator = 0); MTH void drop_unpaid_items (); MTH void activate (); @@ -754,7 +764,7 @@ // move this object to the top of its env's inventory to speed up // searches for it. -static object * +static inline object * splay (object *ob) { if (ob->above && ob->env) @@ -771,6 +781,8 @@ return ob; } +//+GPL + object *find_skill_by_name_fuzzy (object *who, const char *name); object *find_skill_by_name (object *who, shstr_cmp sh); object *find_skill_by_number (object *who, int skillno); @@ -784,6 +796,8 @@ * by the object structure */ +//-GPL + INTERFACE_CLASS (archetype) struct archetype : object { @@ -852,6 +866,8 @@ for (unsigned _i = 0; _i < archetypes.size (); ++_i) \ statementvar (archetype *, var, archetypes [_i]) +//+GPL + /* Used by update_object to know if the object being passed is * being added or removed. */ @@ -890,7 +906,7 @@ #define INS_ON_TOP 0x0008 #define INS_BELOW_ORIGINATOR 0x0010 -#define ARCH_DEPLETION "depletion" +//-GPL #endif