all repos — mgba @ d6a45781f0ea2c12e6e785f5b01a22c37e55c355

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/video.h"
13
14struct GBVideoSoftwareRenderer {
15	struct GBVideoRenderer d;
16
17	color_t* outputBuffer;
18	int outputBufferStride;
19
20	uint8_t row[GB_VIDEO_HORIZONTAL_PIXELS + 8];
21
22	color_t palette[128];
23
24	uint32_t* temporaryBuffer;
25
26	uint8_t scy;
27	uint8_t scx;
28	uint8_t wy;
29	uint8_t wx;
30	uint8_t currentWy;
31
32	GBRegisterLCDC lcdc;
33};
34
35void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
36
37#endif