all repos — mgba @ 060ae364b5558885fdfc9514fd3641d1c4d56f53

mGBA Game Boy Advance Emulator

src/gba/renderers/video-software.h (view raw)

 1#ifndef VIDEO_SOFTWARE_H
 2#define VIDEO_SOFTWARE_H
 3
 4#include "gba-video.h"
 5
 6#include <pthread.h>
 7
 8struct GBAVideoSoftwareBackground {
 9	int index;
10	int enabled;
11	int priority;
12	uint32_t charBase;
13	int mosaic;
14	int multipalette;
15	uint32_t screenBase;
16	int overflow;
17	int size;
18	uint16_t x;
19	uint16_t y;
20	uint32_t refx;
21	uint32_t refy;
22	uint16_t dx;
23	uint16_t dmx;
24	uint16_t dy;
25	uint16_t dmy;
26	uint32_t sx;
27	uint32_t sy;
28	uint16_t internalBuffer[VIDEO_HORIZONTAL_PIXELS];
29};
30
31struct GBAVideoSoftwareRenderer {
32	struct GBAVideoRenderer d;
33
34	uint16_t* outputBuffer;
35	unsigned outputBufferStride;
36
37	union GBARegisterDISPCNT dispcnt;
38
39	struct GBAVideoSoftwareBackground bg[4];
40	struct GBAVideoSoftwareBackground* sortedBg[4];
41
42	pthread_mutex_t mutex;
43	pthread_cond_t cond;
44};
45
46void GBAVideoSoftwareRendererCreate(struct GBAVideoSoftwareRenderer* renderer);
47
48#endif