all repos — mgba @ 5fb2cfde1db99c351986488955301bfb7766d224

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 "gb/video.h"
12
13#ifdef COLOR_16_BIT
14typedef uint16_t color_t;
15#else
16typedef uint32_t color_t;
17#endif
18
19struct GBVideoSoftwareRenderer {
20	struct GBVideoRenderer d;
21
22	color_t* outputBuffer;
23	int outputBufferStride;
24
25	uint32_t row[GB_VIDEO_HORIZONTAL_PIXELS];
26
27	uint32_t* temporaryBuffer;
28};
29
30void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
31
32#endif