#pragma once

#include <Arduino.h>
#include <UTFT.h>
#include <stdint.h>

#define TRANSPARENT 0xF81F

class DrawUtils {
  private:
    UTFT lcd;
    bool _sdReady = false;

  public:
    DrawUtils();
    void initLCD();
    void changeBackground(uint8_t r, uint8_t g, uint8_t b);
    void drawSpriteSimple(int x, int y, int w, int h, const uint16_t *sprite,
                          float scale);
    void moveSprite(int x_old, int y_old, int x_new, int y_new, int w, int h,
                    const uint16_t *sprite, uint16_t bgColor);
    void drawBullet(int16_t x, int16_t y, uint16_t color);
    void eraseEntity(int16_t x, int16_t y, int16_t w, int16_t h);
    void drawTextBig(int16_t x, int16_t y, int16_t font_size, char *text,
                     uint16_t color);
    void drawTextSmall(int16_t x, int16_t y, int16_t font_size, char *text,
                       uint16_t color);
    void drawTextSegs(int16_t x, int16_t y, int16_t font_size, char *text,
                      uint16_t color);
    void clearRect(int16_t x, int16_t, int16_t w, int16_t h);
};
