nesemu/gui/pattern_window.h

31 lines
765 B
C

//
// Created by william on 6/14/24.
//
#ifndef NES_EMULATOR_PATTERN_WINDOW_H
#define NES_EMULATOR_PATTERN_WINDOW_H
#include "../include/types.h"
#include "components/window.h"
#define PW_SCALE 2
#define PW_ROW_TILE_COUNT 16
#define PW_PALETTE_MAX 3
typedef struct nes_pattern_window {
Window window;
SDL_Texture *texture;
byte palette;
} NesPatternWindow;
void pattern_window_init(NesPatternWindow *window);
void pattern_window_uninit(NesPatternWindow *window);
void pattern_window_build_table(NesPatternWindow *window);
void pattern_window_key_up(NesPatternWindow *window, SDL_KeyCode keycode);
void pattern_window_render(NesPatternWindow *window);
void pattern_window_present(NesPatternWindow *window);
#endif //NES_EMULATOR_PATTERN_WINDOW_H