forked from ACreTeam/ac-decomp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix slices order, match some gu funcs
- Loading branch information
Showing
10 changed files
with
92 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef GU_H | ||
#define GU_H | ||
#include "types.h" | ||
#include "libultra/u64types.h" | ||
|
||
|
||
inline void guTranslateF(float m[4][4], float x, float y, float z){ | ||
guMtxIdentF(m); | ||
m[3][0] = x; | ||
m[3][1] = y; | ||
m[3][2] = z; | ||
} | ||
|
||
inline void guScaleF(float mf[4][4], float x, float y, float z) { | ||
guMtxIdentF(mf); | ||
mf[0][0] = x; | ||
mf[1][1] = y; | ||
mf[2][2] = z; | ||
mf[3][3] = 1.0; | ||
} | ||
|
||
void guMtxF2L(float mf[4][4], Mtx *m); | ||
void guMtxIdentF(float mf[4][4]); | ||
void guTranslate(Mtx *m, float x, float y, float z); | ||
void guScale(Mtx *m, float x, float y, float z); | ||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,8 @@ typedef union { | |
rgba8888_t c; | ||
} rgba8888; | ||
|
||
typedef struct { | ||
float m[4][4]; | ||
} Mtx; | ||
|
||
#endif |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "libultra/gu.h" | ||
|
||
void guScale(Mtx *m, float x, float y, float z) { | ||
float mf[4][4]; | ||
guScaleF(mf, x, y, z); | ||
guMtxF2L(mf, m); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "libultra/gu.h" | ||
|
||
void guTranslate(Mtx *m, float x, float y, float z) { | ||
float mf[4][4]; | ||
guTranslateF(mf, x, y, z); | ||
guMtxF2L(mf, m); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters