nesemu/gui/main_window.h

41 lines
898 B
C
Raw Normal View History

2024-06-16 19:22:40 -04:00
//
// Created by william on 6/8/24.
//
#ifndef NES_EMULATOR_MAIN_WINDOW_H
#define NES_EMULATOR_MAIN_WINDOW_H
#include <SDL.h>
#include "../include/ppu.h"
2024-09-01 15:54:41 -04:00
#include "components/window.h"
2024-06-16 19:22:40 -04:00
2024-06-21 13:47:28 -04:00
#define MAIN_WINDOW_WIDTH 256
#define MAIN_WINDOW_HEIGHT 240
2024-08-17 17:38:15 -04:00
#define MAIN_WINDOW_SCALE 3
2024-06-16 19:22:40 -04:00
typedef struct nes_main_window {
2024-09-01 15:54:41 -04:00
Window window;
2024-06-16 19:22:40 -04:00
SDL_Texture *texture;
} MainWindow;
2024-06-16 19:22:40 -04:00
/**
* Creates an instance of the main window.
* @return A reference to the created main window instance
*/
MainWindow *main_window_create(int *window_id);
2024-06-16 19:22:40 -04:00
/**
* Destroys an instance of the main window.
* @param window A reference to the window to destroy
*/
void main_window_destroy(MainWindow *window);
void main_window_render(MainWindow *window, pixel *pixels);
void main_window_mouse_motion(MainWindow *window, int x, int y);
void main_window_mouse_click(MainWindow *window);
2024-06-16 19:22:40 -04:00
#endif //NES_EMULATOR_MAIN_WINDOW_H