aboutsummaryrefslogtreecommitdiff
path: root/src/ppu/types.h
blob: d7605a57612d6cba6642501af21b7a4c70d22186 (plain)
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
34
35
36
37
38
39
40
#pragma once

#include <stdint.h>
#include <stdbool.h>

#include "consts.h"

typedef uint16_t hh_ppu_addr_t;
typedef uint16_t hh_ppu_data_t;

typedef uint8_t hh_ppu_loc_sprite_data_t[HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT];
typedef uint8_t hh_ppu_loc_palette_data_t[HH_PPU_PALETTE_COLOR_COUNT];

typedef hh_ppu_loc_sprite_data_t hh_s_ppu_loc_sprite;
typedef hh_ppu_loc_palette_data_t hh_s_ppu_loc_palette;

typedef struct {
	bool horizontal_flip;
	bool vertical_flip;
	uint8_t palette_index;
	uint8_t tilemap_index;
} hh_s_ppu_loc_bam_entry;

typedef struct {
	bool horizontal_flip;
	bool vertical_flip;
	uint16_t position_x;
	uint16_t position_y;
	uint8_t palette_index;
	uint8_t tilemap_index;
} hh_s_ppu_loc_fam_entry;

typedef struct {
	bool sysreset;
	bool fg_fetch;
	uint16_t bg_shift_x;
	uint16_t bg_shift_y;
} hh_s_ppu_loc_aux;

typedef uint16_t hh_ppu_native_color_t;