| 143 | igraph *ig = NULL; |
| 144 | glColor4ub(255, 255, 255, 255); |
| 145 | loopv(igraphbatch) |
| 146 | { |
| 147 | if(last != igraphbatch[i].key) ig = getusedigraph((last = igraphbatch[i].key)), ishc = last > 0 && last < 10 ? 1 : 0; |
| 148 | if(ig && ig->tex) |
| 149 | { |
| 150 | int &x = igraphbatch[i].val1, &y = igraphbatch[i].val2, fpos = ((totalmillis + x * x + VIRTW * y) % ig->frames.last() + ig->frames.last()) % ig->frames.last(), frame = 0; |
| 151 | float fw = min(1.0f, float(ig->tex->ys) / ig->tex->xs); |
| 152 | if(igraphanimate) loopvj(ig->frames) if(ig->frames[j] < fpos) frame++; |
| 153 | quad(ig->tex->id, x + offs[ishc], y + offs[ishc], w[ishc], (frame % max(1, ig->tex->xs / ig->tex->ys)) * fw, 0, fw, 1); |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | //stack[sp] is current color index |