… | |
… | |
3694 | int x, y; |
3694 | int x, y; |
3695 | |
3695 | |
3696 | if (m == NULL) |
3696 | if (m == NULL) |
3697 | return; |
3697 | return; |
3698 | |
3698 | |
3699 | for (x = 0; x < MAP_WIDTH (m); x++) |
3699 | for (x = 0; x < m->width; x++) |
3700 | for (y = 0; y < MAP_HEIGHT (m); y++) |
3700 | for (y = 0; y < m->height; y++) |
3701 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = above) |
3701 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = above) |
3702 | { |
3702 | { |
3703 | above = tmp->above; |
3703 | above = tmp->above; |
3704 | |
3704 | |
3705 | if (tmp->inv) |
3705 | if (tmp->inv) |
… | |
… | |
3777 | create_treasure (tmp->randomitems, tmp, GT_APPLY, m->difficulty, 0); |
3777 | create_treasure (tmp->randomitems, tmp, GT_APPLY, m->difficulty, 0); |
3778 | tmp->randomitems = NULL; |
3778 | tmp->randomitems = NULL; |
3779 | } |
3779 | } |
3780 | } |
3780 | } |
3781 | |
3781 | |
3782 | for (x = 0; x < MAP_WIDTH (m); x++) |
3782 | for (x = 0; x < m->width; x++) |
3783 | for (y = 0; y < MAP_HEIGHT (m); y++) |
3783 | for (y = 0; y < m->height; y++) |
3784 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above) |
3784 | for (tmp = GET_MAP_OB (m, x, y); tmp != NULL; tmp = tmp->above) |
3785 | if (tmp->above && (tmp->type == TRIGGER_BUTTON || tmp->type == TRIGGER_PEDESTAL)) |
3785 | if (tmp->above && (tmp->type == TRIGGER_BUTTON || tmp->type == TRIGGER_PEDESTAL)) |
3786 | check_trigger (tmp, tmp->above); |
3786 | check_trigger (tmp, tmp->above); |
3787 | } |
3787 | } |
3788 | |
3788 | |