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

Comparing deliantra/server/include/object.h (file contents):
Revision 1.195 by root, Tue Jan 6 19:17:06 2009 UTC vs.
Revision 1.196 by root, Thu Jan 8 03:03:24 2009 UTC

136{ 136{
137 signed char info:4; /* body info as loaded from the file */ 137 signed char info:4; /* body info as loaded from the file */
138 signed char used:4; /* Calculated value based on items equipped */ 138 signed char used:4; /* Calculated value based on items equipped */
139}; 139};
140 140
141typedef struct oblnk
142{ /* Used to link together several objects */
143 object_ptr ob;
144 struct oblnk *next;
145} objectlink;
146
147typedef struct oblinkpt
148{ /* Used to link together several object links */
149 struct oblnk *link;
150 struct oblinkpt *next;
151 shstr id; /* Used as connected value in buttons/gates */
152} oblinkpt;
153
141INTERFACE_CLASS (object) 154INTERFACE_CLASS (object)
142// these are being copied 155// these are being copied
143struct object_copy : attachable 156struct object_copy : attachable
144{ 157{
145 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */ 158 sint16 ACC (RW, x), ACC (RW, y); /* Position in the map for this object */
414 open_container (0); 427 open_container (0);
415 } 428 }
416 429
417 MTH object *force_find (shstr_tmp name); 430 MTH object *force_find (shstr_tmp name);
418 MTH object *force_add (shstr_tmp name, int duration = 0); 431 MTH object *force_add (shstr_tmp name, int duration = 0);
432
433 oblinkpt *find_link () const;
434 MTH void add_link (maptile *map, shstr_tmp id);
435 MTH void remove_link ();
419 436
420 // overwrite the attachable should_invoke function with a version that also checks ev_want_type 437 // overwrite the attachable should_invoke function with a version that also checks ev_want_type
421 bool should_invoke (event_type event) 438 bool should_invoke (event_type event)
422 { 439 {
423 return ev_want_event [event] || ev_want_type [type] || cb; 440 return ev_want_event [event] || ev_want_type [type] || cb;
696 ob->env->inv = ob; 713 ob->env->inv = ob;
697 } 714 }
698 715
699 return ob; 716 return ob;
700} 717}
701
702typedef struct oblnk
703{ /* Used to link together several objects */
704 object_ptr ob;
705 struct oblnk *next;
706} objectlink;
707
708typedef struct oblinkpt
709{ /* Used to link together several object links */
710 struct oblnk *link;
711 sint32 value; /* Used as connected value in buttons/gates */
712 struct oblinkpt *next;
713} oblinkpt;
714 718
715object *find_skill_by_name_fuzzy (object *who, const char *name); 719object *find_skill_by_name_fuzzy (object *who, const char *name);
716object *find_skill_by_name (object *who, shstr_cmp sh); 720object *find_skill_by_name (object *who, shstr_cmp sh);
717object *find_skill_by_number (object *who, int skillno); 721object *find_skill_by_number (object *who, int skillno);
718 722

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines