… | |
… | |
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 | */ |
191 | void |
191 | void |
192 | activate_connection (mapstruct *map, long connection, bool state) |
192 | activate_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 | |
285 | void |
285 | void |
286 | update_buttons (mapstruct *m) |
286 | update_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 | |
599 | void |
599 | void |
600 | add_button_link (object *button, mapstruct *map, int connected) |
600 | add_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 | */ |
679 | oblinkpt * |
679 | oblinkpt * |
680 | get_connection_links (mapstruct *map, long connection) |
680 | get_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 | */ |
875 | void |
875 | void |
876 | verify_button_links (const mapstruct *map) |
876 | verify_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) |