nesemu/gui/nametable_window.h

45 lines
1.0 KiB
C
Raw Normal View History

2024-07-12 13:07:16 -04:00
//
// Created by william on 12/07/24.
//
#ifndef NES_EMULATOR_NAMETABLE_WINDOW_H
#define NES_EMULATOR_NAMETABLE_WINDOW_H
2024-09-01 15:54:41 -04:00
#include "components/window.h"
2024-07-12 13:07:16 -04:00
#include "../include/types.h"
#define NW_SCALE 1
2024-07-23 20:46:13 -04:00
#define NW_ROW_COUNT 60
#define NW_ROW_TILE_COUNT 64
2024-07-12 13:07:16 -04:00
typedef struct nes_nametable_window {
2024-09-01 15:54:41 -04:00
Window window;
2024-07-23 18:50:11 -04:00
SDL_Texture *texture;
} NametableWindow;
/**
* Creates a nametable window instance.
* @return A reference to the created window
*/
NametableWindow *nametable_window_create(int *window_id);
/**
* Destroys a nametable window instance.
* @param window A reference to the window to destroy
*/
void nametable_window_destroy(NametableWindow *window);
/**
* Updates the content of a nametable window with the current data of the PPU.
* @param window A reference to the window to update
*/
void nametable_window_update(NametableWindow *window);
/**
* Renders a nemtable window to the screen.
* @param window A reference to the window to render
*/
void nametable_window_render(NametableWindow *window);
2024-07-12 13:07:16 -04:00
#endif //NES_EMULATOR_NAMETABLE_WINDOW_H