Sets up a font character to draw. We draw our fonts as pieces of textures
| 151 | |
| 152 | // Sets up a font character to draw. We draw our fonts as pieces of textures |
| 153 | void rend_DrawFontCharacter(int bm_handle, int x1, int y1, int x2, int y2, float u, float v, float w, float h) { |
| 154 | g3Point *ptr_pnts[4]; |
| 155 | g3Point pnts[4]; |
| 156 | for (int i = 0; i < 4; i++) { |
| 157 | pnts[i].p3_z = 1; // Make REALLY close! |
| 158 | pnts[i].p3_flags = PF_PROJECTED; |
| 159 | ptr_pnts[i] = &pnts[i]; |
| 160 | } |
| 161 | pnts[0].p3_sx = x1; |
| 162 | pnts[0].p3_sy = y1; |
| 163 | pnts[0].p3_u = u; |
| 164 | pnts[0].p3_v = v; |
| 165 | pnts[1].p3_sx = x2; |
| 166 | pnts[1].p3_sy = y1; |
| 167 | pnts[1].p3_u = u + w; |
| 168 | pnts[1].p3_v = v; |
| 169 | pnts[2].p3_sx = x2; |
| 170 | pnts[2].p3_sy = y2; |
| 171 | pnts[2].p3_u = u + w; |
| 172 | pnts[2].p3_v = v + h; |
| 173 | pnts[3].p3_sx = x1; |
| 174 | pnts[3].p3_sy = y2; |
| 175 | pnts[3].p3_u = u; |
| 176 | pnts[3].p3_v = v + h; |
| 177 | rend_DrawPolygon2D(bm_handle, ptr_pnts, 4); |
| 178 | } |
| 179 | |
| 180 | // Sets the alpha value for constant alpha |
| 181 | void rend_SetAlphaValue(uint8_t val) { |
no test coverage detected