| 2541 | } |
| 2542 | |
| 2543 | static void TexIdsOverlay_BuildText(struct TexIdsOverlay* s, struct VertexTextured** ptr) { |
| 2544 | struct TextAtlas* idAtlas; |
| 2545 | struct VertexTextured* beg; |
| 2546 | int xOffset, size, row; |
| 2547 | int x, y, id = 0; |
| 2548 | |
| 2549 | size = s->tileSize; |
| 2550 | xOffset = s->xOffset; |
| 2551 | idAtlas = &s->idAtlas; |
| 2552 | beg = *ptr; |
| 2553 | |
| 2554 | for (row = 0; row < Atlas2D.RowsCount; row += TEXIDS_MAX_ROWS_PER_PAGE) { |
| 2555 | idAtlas->tex.y = s->yOffset + (size - idAtlas->tex.height); |
| 2556 | |
| 2557 | for (y = 0; y < ATLAS2D_TILES_PER_ROW; y++) { |
| 2558 | for (x = 0; x < ATLAS2D_TILES_PER_ROW; x++) { |
| 2559 | idAtlas->curX = xOffset + size * x + 3; /* offset text by 3 pixels */ |
| 2560 | TextAtlas_AddInt(idAtlas, id++, ptr); |
| 2561 | } |
| 2562 | idAtlas->tex.y += size; |
| 2563 | } |
| 2564 | xOffset += size * ATLAS2D_TILES_PER_ROW; |
| 2565 | } |
| 2566 | s->textVertices = (int)(*ptr - beg); |
| 2567 | } |
| 2568 | |
| 2569 | static void TexIdsOverlay_BuildMesh(void* screen) { |
| 2570 | struct TexIdsOverlay* s = (struct TexIdsOverlay*)screen; |
no test coverage detected