Mercurial > audlegacy-plugins
comparison src/xsf/desmume/matrix.h @ 2961:70b0973e7b70
Merge xsf plugin.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 16 Oct 2008 14:45:41 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2960:fe2ba1a712cd | 2961:70b0973e7b70 |
---|---|
1 /* | |
2 Copyright (C) 2006-2007 shash | |
3 | |
4 This file is part of DeSmuME | |
5 | |
6 DeSmuME is free software; you can redistribute it and/or modify | |
7 it under the terms of the GNU General Public License as published by | |
8 the Free Software Foundation; either version 2 of the License, or | |
9 (at your option) any later version. | |
10 | |
11 DeSmuME is distributed in the hope that it will be useful, | |
12 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 GNU General Public License for more details. | |
15 | |
16 You should have received a copy of the GNU General Public License | |
17 along with DeSmuME; if not, write to the Free Software | |
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
19 */ | |
20 | |
21 #ifndef MATRIX_H | |
22 #define MATRIX_H | |
23 | |
24 typedef struct MatrixStack | |
25 { | |
26 float *matrix; | |
27 int position; | |
28 int size; | |
29 } MatrixStack; | |
30 | |
31 void MatrixInit (float *matrix); | |
32 void MatrixMultVec3x3 (float *matrix, float *vecPtr); | |
33 void MatrixMultVec4x4 (float *matrix, float *vecPtr); | |
34 void MatrixIdentity (float *matrix); | |
35 void MatrixMultiply (float *matrix, float *rightMatrix); | |
36 float MatrixGetMultipliedIndex(int index, float *matrix, float *rightMatrix); | |
37 void MatrixSet (float *matrix, int x, int y, float value); | |
38 void MatrixCopy (float *matrixDST, float *matrixSRC); | |
39 void MatrixTranslate (float *matrix, float *ptr); | |
40 void MatrixScale (float *matrix, float *ptr); | |
41 | |
42 void MatrixStackInit (MatrixStack *stack); | |
43 void MatrixStackSetMaxSize (MatrixStack *stack, int size); | |
44 void MatrixStackSetStackPosition (MatrixStack *stack, int pos); | |
45 void MatrixStackPushMatrix (MatrixStack *stack, float *ptr); | |
46 float* MatrixStackPopMatrix (MatrixStack *stack, int size); | |
47 float* MatrixStackGetPos (MatrixStack *stack, int pos); | |
48 float* MatrixStackGet (MatrixStack *stack); | |
49 void MatrixStackLoadMatrix (MatrixStack *stack, int pos, float *ptr); | |
50 | |
51 #endif |