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

Function GetEfxNumFromID

Descent3/TelComEffects.cpp:648–661  ·  view source on GitHub ↗

Returns the efxnum given an id & screen, -1 if not found

Source from the content-addressed store, hash-verified

646
647// Returns the efxnum given an id & screen, -1 if not found
648int GetEfxNumFromID(int id, int screen) {
649 ASSERT(screen >= 0 && screen < MAX_TELCOM_SCREENS);
650
651 int node = Screen_roots[screen];
652
653 while (node != -1) {
654 if (TCEffects[node].id == id) {
655 return node;
656 }
657
658 node = TCEffects[node].next;
659 }
660 return -1;
661}
662
663// returns the efxnum of the button that contains the X,Y on the given monitor/screen, -1 if none
664int FindButtonEffectByXY(int x, int y, int screen) {

Callers 1

RenderButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected