Newer
Older
ESP32-RetroPlay / main / tasks / game / game_drawing.h
#ifndef GAME_DRAWING_H
#define GAME_DRAWING_H

#include <stdbool.h>
#include "ssd1306.h" // For SSD1306_t

/**
 * @brief Draws a filled rectangle on the OLED display buffer.
 *
 * @param dev Pointer to the SSD1306 device structure.
 * @param x1 X-coordinate of the top-left corner.
 * @param y1 Y-coordinate of the top-left corner.
 * @param x2 X-coordinate of the bottom-right corner.
 * @param y2 Y-coordinate of the bottom-right corner.
 * @param color True for white, false for black.
 */
void draw_filled_rect(SSD1306_t *dev, int x1, int y1, int x2, int y2, bool color);

/**
 * @brief Draws an outline rectangle on the OLED display buffer.
 *
 * @param dev Pointer to the SSD1306 device structure.
 * @param x1 X-coordinate of the top-left corner.
 * @param y1 Y-coordinate of the top-left corner.
 * @param x2 X-coordinate of the bottom-right corner.
 * @param y2 Y-coordinate of the bottom-right corner.
 * @param color True for white, false for black.
 */
void draw_rectangle_outline(SSD1306_t *dev, int x1, int y1, int x2, int y2, bool color);

#endif // GAME_DRAWING_H