Returns the efxnum given an id & screen, -1 if not found
| 646 | |
| 647 | // Returns the efxnum given an id & screen, -1 if not found |
| 648 | int 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 |
| 664 | int FindButtonEffectByXY(int x, int y, int screen) { |