all repos — mgba @ 245a13af63adec5b26e087950e1bb5f649f872fb

mGBA Game Boy Advance Emulator

src/gb/renderers/software.h (view raw)

 1/* Copyright (c) 2013-2016 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef GB_RENDERER_SOFTWARE_H
 7#define GB_RENDERER_SOFTWARE_H
 8
 9#include "util/common.h"
10
11#include "core/core.h"
12#include "gb/gb.h"
13#include "gb/video.h"
14
15struct GBVideoSoftwareRenderer {
16	struct GBVideoRenderer d;
17
18	color_t* outputBuffer;
19	int outputBufferStride;
20
21	uint8_t row[GB_VIDEO_HORIZONTAL_PIXELS + 8];
22
23	color_t palette[128];
24
25	uint32_t* temporaryBuffer;
26
27	uint8_t scy;
28	uint8_t scx;
29	uint8_t wy;
30	uint8_t wx;
31	uint8_t currentWy;
32
33	GBRegisterLCDC lcdc;
34	enum GBModel model;
35};
36
37void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
38
39#endif