nesemu/gui/pattern_window.h

31 lines
765 B
C
Raw Normal View History

2024-06-16 19:22:40 -04:00
//
// Created by william on 6/14/24.
//
#ifndef NES_EMULATOR_PATTERN_WINDOW_H
#define NES_EMULATOR_PATTERN_WINDOW_H
#include "../include/types.h"
2024-09-01 15:54:41 -04:00
#include "components/window.h"
2024-06-16 19:22:40 -04:00
2024-07-23 18:50:11 -04:00
#define PW_SCALE 2
2024-06-16 19:22:40 -04:00
#define PW_ROW_TILE_COUNT 16
#define PW_PALETTE_MAX 3
2024-06-16 19:22:40 -04:00
typedef struct nes_pattern_window {
2024-09-01 15:54:41 -04:00
Window window;
2024-07-21 16:41:38 -04:00
SDL_Texture *texture;
byte palette;
2024-06-16 19:22:40 -04:00
} NesPatternWindow;
2024-07-21 16:41:38 -04:00
void pattern_window_init(NesPatternWindow *window);
2024-06-16 19:22:40 -04:00
void pattern_window_uninit(NesPatternWindow *window);
2024-07-12 18:52:54 -04:00
void pattern_window_build_table(NesPatternWindow *window);
2024-06-16 19:22:40 -04:00
void pattern_window_key_up(NesPatternWindow *window, SDL_KeyCode keycode);
2024-06-16 19:22:40 -04:00
void pattern_window_render(NesPatternWindow *window);
void pattern_window_present(NesPatternWindow *window);
#endif //NES_EMULATOR_PATTERN_WINDOW_H