Given current index, gets index of next texture in use
| 835 | |
| 836 | // Given current index, gets index of next texture in use |
| 837 | int GetNextTexture(int n) { |
| 838 | int i; |
| 839 | |
| 840 | if (Num_textures == 0) |
| 841 | return -1; |
| 842 | |
| 843 | for (i = n + 1; i < MAX_TEXTURES; i++) { |
| 844 | if (GameTextures[i].used) |
| 845 | return i; |
| 846 | } |
| 847 | for (i = 0; i < n; i++) { |
| 848 | if (GameTextures[i].used) |
| 849 | return i; |
| 850 | } |
| 851 | |
| 852 | return n; |
| 853 | } |
| 854 | // Given current index, gets index of prev texture in use |
| 855 | int GetPreviousTexture(int n) { |
| 856 | int i; |
no outgoing calls
no test coverage detected