include/mgba/internal/ds/renderers/software.h (view raw)
1/* Copyright (c) 2013-2017 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 DS_VIDEO_SOFTWARE_H
7#define DS_VIDEO_SOFTWARE_H
8
9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <mgba/internal/ds/video.h>
14#include <mgba/internal/gba/renderers/video-software.h>
15
16struct DSVideoSoftwareRenderer {
17 struct DSVideoRenderer d;
18
19 struct GBAVideoSoftwareRenderer engA;
20 struct GBAVideoSoftwareRenderer engB;
21
22 DSRegisterDISPCNT dispcntA;
23 DSRegisterDISPCNT dispcntB;
24 DSRegisterPOWCNT1 powcnt;
25
26 color_t* outputBuffer;
27 int outputBufferStride;
28
29 color_t extPaletteA[16384];
30 color_t extPaletteB[16384];
31 color_t variantPaletteA[16384];
32 color_t variantPaletteB[16384];
33 color_t objExtPaletteA[4096];
34 color_t objExtPaletteB[4096];
35 color_t objVariantPaletteA[4096];
36 color_t objVariantPaletteB[4096];
37};
38
39void DSVideoSoftwareRendererCreate(struct DSVideoSoftwareRenderer* renderer);
40
41CXX_GUARD_END
42
43#endif