* @brief Set the value of a single pixel in the back buffer, checks bounds * @param sx Back buffer coordinate * @param sy Back buffer coordinate * @param col Color index from current palette */
| 593 | * @param col Color index from current palette |
| 594 | */ |
| 595 | void ENG_set_pixel(int sx, int sy, BYTE col) |
| 596 | { |
| 597 | BYTE *dst; |
| 598 | |
| 599 | assert(gpBuffer); |
| 600 | |
| 601 | if (sy < 0 || sy >= SCREEN_HEIGHT + SCREEN_Y || sx < SCREEN_X || sx >= SCREEN_WIDTH + SCREEN_X) |
| 602 | return; |
| 603 | |
| 604 | dst = &gpBuffer[sx + BUFFER_WIDTH * sy]; |
| 605 | |
| 606 | if (dst < gpBufEnd && dst > gpBufStart) |
| 607 | *dst = col; |
| 608 | } |
| 609 | |
| 610 | /** |
| 611 | * @brief Set the value of a single pixel in the back buffer to that of gbPixelCol, checks bounds |