MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / VisEffectLink

Function VisEffectLink

Descent3/viseffect.cpp:722–743  ·  view source on GitHub ↗

link the viseffect into the list for its room Does nothing for effects over terrain

Source from the content-addressed store, hash-verified

720// link the viseffect into the list for its room
721// Does nothing for effects over terrain
722void 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

Callers 3

LGSVisEffectsFunction · 0.85
VisEffectCreateFunction · 0.85
VisEffectRelinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected