| 155 | } |
| 156 | |
| 157 | void ui_DrawRect(ddgr_color color, int l, int t, int r, int b) { |
| 158 | if (color == TRANSPARENT_COLOR32) |
| 159 | return; |
| 160 | |
| 161 | g3Point *pntlist[4], points[4]; |
| 162 | int i; |
| 163 | |
| 164 | // Set our four corners to cover the screen |
| 165 | points[0].p3_sx = l; |
| 166 | points[0].p3_sy = t; |
| 167 | points[1].p3_sx = r; |
| 168 | points[1].p3_sy = t; |
| 169 | points[2].p3_sx = r; |
| 170 | points[2].p3_sy = b; |
| 171 | points[3].p3_sx = l; |
| 172 | points[3].p3_sy = b; |
| 173 | |
| 174 | for (i = 0; i < 4; i++) { |
| 175 | points[i].p3_z = 0; |
| 176 | points[i].p3_flags = PF_PROJECTED; |
| 177 | pntlist[i] = &points[i]; |
| 178 | } |
| 179 | |
| 180 | rend_SetZBufferState(0); |
| 181 | rend_SetTextureType(TT_FLAT); |
| 182 | rend_SetAlphaType(AT_CONSTANT); |
| 183 | rend_SetLighting(LS_NONE); |
| 184 | rend_SetFlatColor(color); |
| 185 | rend_SetAlphaValue(m_UIDrawAlpha); |
| 186 | rend_DrawPolygon2D(0, pntlist, 4); |
| 187 | } |
| 188 | |
| 189 | // draws all textures derived from ui_bm_handle. |
| 190 | void ui_DrawBitmap(UIBitmapItem *bi, int x, int y, uint8_t alpha) { |
no test coverage detected