29 lines
639 B
C
29 lines
639 B
C
//
|
|
// 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"
|
|
#include "window.h"
|
|
|
|
#define MAIN_WINDOW_WIDTH 256
|
|
#define MAIN_WINDOW_HEIGHT 240
|
|
#define MAIN_WINDOW_SCALE 2
|
|
|
|
typedef struct nes_main_window {
|
|
NesSdlContext sdl_context;
|
|
|
|
SDL_Texture *texture;
|
|
} NesMainWindow;
|
|
|
|
void main_window_init(NesMainWindow *window, TTF_Font *font);
|
|
void main_window_uninit(NesMainWindow *window);
|
|
|
|
void main_window_render(NesMainWindow *window, PPUPixel* pixels);
|
|
void main_window_present(NesMainWindow *window);
|
|
|
|
#endif //NES_EMULATOR_MAIN_WINDOW_H
|