all repos — mgba @ 3ade5188db2c36c8ed850847d2925abdb5198bd5

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
31	GBRegisterLCDC lcdc;
32};
33
34void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
35
36#endif