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 color_t bgPalette[4];
28 color_t objPalette[2][4];
29
30 uint32_t* temporaryBuffer;
31
32 GBRegisterLCDC lcdc;
33};
34
35void GBVideoSoftwareRendererCreate(struct GBVideoSoftwareRenderer*);
36
37#endif