all repos — mgba @ 9ad56b1b798d1df66eaab8b7099aac4f07d11ac0

mGBA Game Boy Advance Emulator

include/mgba/internal/ds/matrix.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_MATRIX_H
 7#define DS_MATRIX_H
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#define MTX_ONE 0x00001000
14
15struct DSGXMatrix {
16	int32_t m[16]; // 20.12
17};
18
19void DSGXMtxIdentity(struct DSGXMatrix*);
20void DSGXMtxMultiply(struct DSGXMatrix*, const struct DSGXMatrix*, const struct DSGXMatrix*);
21void DSGXMtxScale(struct DSGXMatrix*, const int32_t* m);
22void DSGXMtxTranslate(struct DSGXMatrix*, const int32_t* m);
23
24CXX_GUARD_END
25
26#endif