-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCREEN.h
33 lines (25 loc) · 836 Bytes
/
SCREEN.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "memory.h"
#define SCREEN_LINE_CLKS 114
#define SCREEN_ROWS 154
#define SCREEN_CLKS (SCREEN_LINE_CLKS * SCREEN_ROWS)
typedef struct {
bool enabled;
} Window;
typedef struct {
bool originalColors;
Window screen, background, window, tiles;
uint8_t wy, delay, *IO, visibleSprites, currPalette[3];
const uint8_t *VRAM;
const Sprite *OAM;
Sprite sprites[10];
bool enabled;
uint16_t physicalCycles;
uint64_t cycles;
uint8_t pixelBatch;
} Screen;
Screen initScreen(uint8_t *IO, const uint8_t *VRAM, const Sprite *OAM, const uint8_t pixelBatch) WARN_UNUSED_RESULT;
void deleteScreen(Screen *screen);
void setTitle(Screen *screen, const char *title);
void setPalette(Screen *screen, const bool originalColors);
bool nextPixels(Screen *screen, const bool draw);