2024-05-17 11:40:02 -04:00
|
|
|
//
|
|
|
|
// Created by william on 17/05/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef NES_EMULATOR_WINDOW_H
|
|
|
|
#define NES_EMULATOR_WINDOW_H
|
|
|
|
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "canvas.h"
|
|
|
|
|
2024-05-17 13:16:21 -04:00
|
|
|
typedef struct nes_window {
|
2024-05-17 11:40:02 -04:00
|
|
|
SDL_Renderer *renderer;
|
|
|
|
SDL_Window *window;
|
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
2024-05-17 13:16:21 -04:00
|
|
|
int scaling;
|
2024-05-17 11:40:02 -04:00
|
|
|
Canvas canvas;
|
|
|
|
} NesWindow;
|
|
|
|
|
2024-05-17 13:16:21 -04:00
|
|
|
NesWindow window_init(int width, int height, int scaling, char *title);
|
2024-05-17 11:40:02 -04:00
|
|
|
void window_uninit(NesWindow *window);
|
|
|
|
|
|
|
|
void window_render(NesWindow *window);
|
|
|
|
void window_present(NesWindow *window);
|
|
|
|
|
|
|
|
#endif //NES_EMULATOR_WINDOW_H
|