//
// Created by bruno on 17.2.2025.
//

#ifndef RISCB_SEVENSEG_H
#define RISCB_SEVENSEG_H

#include <SDL_rect.h>
#include <SDL2/SDL_render.h>

typedef struct {
    unsigned char value;
    unsigned char oldValue;
    SDL_Rect *rect;
    SDL_Rect *outRect;
    SDL_Texture *texture;
} SevenSegment;

//
// Created by bruno on 17.2.2025.
//


void render_segment(SDL_Renderer *renderer, SevenSegment *display);

void update_display_texture(SDL_Renderer *renderer, SevenSegment *display);

void init_seven_segment(SevenSegment *display, SDL_Renderer *renderer, int x, int y, int width, int height);

void render_seven_segment(SevenSegment *display, SDL_Renderer *renderer);

void destroy_seven_segment(SevenSegment *display);

#endif //RISCB_SEVENSEG_H
