src/ds/matrix.c (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#include <mgba/internal/ds/matrix.h>
7
8#define MTX_ONE 0x00001000
9
10void DSGXMtxIdentity(struct DSGXMatrix* mtx) {
11 memset(mtx, 0, sizeof(*mtx));
12 mtx->m[0] = MTX_ONE;
13 mtx->m[5] = MTX_ONE;
14 mtx->m[10] = MTX_ONE;
15 mtx->m[15] = MTX_ONE;
16}