… | |
… | |
937 | op->destroy (); |
937 | op->destroy (); |
938 | } |
938 | } |
939 | } |
939 | } |
940 | |
940 | |
941 | /* |
941 | /* |
942 | * Updates every button on the map (by calling update_button() for them). |
|
|
943 | */ |
|
|
944 | void |
|
|
945 | maptile::update_buttons () |
|
|
946 | { |
|
|
947 | for (oblinkpt *obp = buttons; obp; obp = obp->next) |
|
|
948 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
|
|
949 | { |
|
|
950 | if (!ol->ob) |
|
|
951 | { |
|
|
952 | LOG (llevError, "Internal error in update_button (%s (%dx%d), connected %ld).\n", |
|
|
953 | ol->ob ? (const char *) ol->ob->name : "null", ol->ob ? ol->ob->x : -1, ol->ob ? ol->ob->y : -1, obp->value); |
|
|
954 | continue; |
|
|
955 | } |
|
|
956 | |
|
|
957 | if (ol->ob->type == BUTTON || ol->ob->type == PEDESTAL) |
|
|
958 | { |
|
|
959 | update_button (ol->ob); |
|
|
960 | break; |
|
|
961 | } |
|
|
962 | } |
|
|
963 | } |
|
|
964 | |
|
|
965 | /* |
|
|
966 | * This routine is supposed to find out the difficulty of the map. |
942 | * This routine is supposed to find out the difficulty of the map. |
967 | * difficulty does not have a lot to do with character level, |
943 | * difficulty does not have a lot to do with character level, |
968 | * but does have a lot to do with treasure on the map. |
944 | * but does have a lot to do with treasure on the map. |
969 | * |
945 | * |
970 | * Difficulty can now be set by the map creator. If the value stored |
946 | * Difficulty can now be set by the map creator. If the value stored |