* Draws a half-transparent rectangle by blacking out odd pixels on odd lines, * even pixels on even lines. * @brief Render a transparent black rectangle * @param sx Screen coordinate * @param sy Screen coordinate * @param width Rectangle width * @param height Rectangle height */
| 292 | * @param height Rectangle height |
| 293 | */ |
| 294 | void trans_rect(int sx, int sy, int width, int height) |
| 295 | { |
| 296 | int row, col; |
| 297 | BYTE *pix = &gpBuffer[SCREENXY(sx, sy)]; |
| 298 | for (row = 0; row < height; row++) { |
| 299 | for (col = 0; col < width; col++) { |
| 300 | if ((row & 1 && col & 1) || (!(row & 1) && !(col & 1))) |
| 301 | *pix = 0; |
| 302 | pix++; |
| 303 | } |
| 304 | pix += BUFFER_WIDTH - width; |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | DEVILUTION_END_NAMESPACE |
no outgoing calls
no test coverage detected