link the viseffect into the list for its room Does nothing for effects over terrain
| 720 | // link the viseffect into the list for its room |
| 721 | // Does nothing for effects over terrain |
| 722 | void VisEffectLink(int visnum, int roomnum) { |
| 723 | vis_effect *vis = &VisEffects[visnum]; |
| 724 | |
| 725 | ASSERT(visnum != -1); |
| 726 | |
| 727 | if (!ROOMNUM_OUTSIDE(vis->roomnum)) |
| 728 | ASSERT(roomnum >= 0 && roomnum <= Highest_room_index); |
| 729 | |
| 730 | vis->roomnum = roomnum; |
| 731 | |
| 732 | if (ROOMNUM_OUTSIDE(vis->roomnum)) |
| 733 | return; |
| 734 | |
| 735 | vis->next = Rooms[roomnum].vis_effects; |
| 736 | Rooms[roomnum].vis_effects = visnum; |
| 737 | ASSERT(vis->next != visnum); |
| 738 | |
| 739 | vis->prev = -1; |
| 740 | |
| 741 | if (vis->next != -1) |
| 742 | VisEffects[vis->next].prev = visnum; |
| 743 | } |
| 744 | |
| 745 | // Unlinks a viseffect from a room |
| 746 | // Does nothing for terrain |
no outgoing calls
no test coverage detected