ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/button.C
(Generate patch)

Comparing deliantra/server/common/button.C (file contents):
Revision 1.10 by root, Thu Sep 14 22:33:58 2006 UTC vs.
Revision 1.11 by root, Sat Sep 16 22:24:12 2006 UTC

187 * the connection was 'state' or 'released'. So that you can activate objects 187 * the connection was 'state' or 'released'. So that you can activate objects
188 * who have FLAG_ACTIVATE_ON_PUSH/RELEASE set properly. 188 * who have FLAG_ACTIVATE_ON_PUSH/RELEASE set properly.
189 * 189 *
190 */ 190 */
191void 191void
192activate_connection (mapstruct *map, long connection, bool state) 192activate_connection (maptile *map, long connection, bool state)
193{ 193{
194 if (INVOKE_MAP (TRIGGER, map, ARG_INT64 (connection), ARG_INT (state))) 194 if (INVOKE_MAP (TRIGGER, map, ARG_INT64 (connection), ARG_INT (state)))
195 return; 195 return;
196 196
197 oblinkpt *obp = get_connection_links (map, connection); 197 oblinkpt *obp = get_connection_links (map, connection);
281/* 281/*
282 * Updates every button on the map (by calling update_button() for them). 282 * Updates every button on the map (by calling update_button() for them).
283 */ 283 */
284 284
285void 285void
286update_buttons (mapstruct *m) 286update_buttons (maptile *m)
287{ 287{
288 objectlink *ol; 288 objectlink *ol;
289 oblinkpt *obp; 289 oblinkpt *obp;
290 290
291 for (obp = m->buttons; obp; obp = obp->next) 291 for (obp = m->buttons; obp; obp = obp->next)
595 return 0; 595 return 0;
596 } 596 }
597} 597}
598 598
599void 599void
600add_button_link (object *button, mapstruct *map, int connected) 600add_button_link (object *button, maptile *map, int connected)
601{ 601{
602 oblinkpt *obp; 602 oblinkpt *obp;
603 objectlink *ol = get_objectlink (); 603 objectlink *ol = get_objectlink ();
604 604
605 if (!map) 605 if (!map)
675 675
676/* 676/*
677 * Gets the objectlink for this connection from the map. 677 * Gets the objectlink for this connection from the map.
678 */ 678 */
679oblinkpt * 679oblinkpt *
680get_connection_links (mapstruct *map, long connection) 680get_connection_links (maptile *map, long connection)
681{ 681{
682 for (oblinkpt * obp = map->buttons; obp; obp = obp->next) 682 for (oblinkpt * obp = map->buttons; obp; obp = obp->next)
683 if (obp->value == connection) 683 if (obp->value == connection)
684 return obp; 684 return obp;
685 return 0; 685 return 0;
871/* This does a minimal check of the button link consistency for object 871/* This does a minimal check of the button link consistency for object
872 * map. All it really does it much sure the object id link that is set 872 * map. All it really does it much sure the object id link that is set
873 * matches what the object has. 873 * matches what the object has.
874 */ 874 */
875void 875void
876verify_button_links (const mapstruct *map) 876verify_button_links (const maptile *map)
877{ 877{
878 oblinkpt *obp; 878 oblinkpt *obp;
879 objectlink *ol; 879 objectlink *ol;
880 880
881 if (!map) 881 if (!map)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines