-
Notifications
You must be signed in to change notification settings - Fork 21
Rework MTX #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vabold
wants to merge
1
commit into
doldecomp:master
Choose a base branch
from
vabold:mtx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rework MTX #136
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,61 @@ | ||
| #ifndef RVL_SDK_MTX_GEO_TYPES_H | ||
| #define RVL_SDK_MTX_GEO_TYPES_H | ||
| #include <types.h> | ||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| typedef struct { | ||
| f32 x, y, z; | ||
| } Vec; | ||
| typedef Vec* VecPtr; | ||
| typedef const Vec* CVecPtr; | ||
| typedef Vec Point3d; | ||
| typedef Vec* Point3dPtr; | ||
| typedef const Vec* CPoint3dPtr; | ||
|
|
||
| typedef struct { | ||
| s16 x, y, z; | ||
| } S16Vec; | ||
| typedef S16Vec* S16VecPtr; | ||
| typedef const S16Vec* CS16VecPtr; | ||
|
|
||
| typedef struct { | ||
| f32 x, y; | ||
| } Vec2; | ||
| typedef Vec2* Vec2Ptr; | ||
| typedef const Vec2* CVec2Ptr; | ||
|
|
||
| typedef struct { | ||
| f32 x, y, z, w; | ||
| } Quaternion; | ||
| typedef Quaternion* QuaternionPtr; | ||
| typedef const Quaternion* CQuaternionPtr; | ||
| typedef Quaternion Qtrn; | ||
| typedef Quaternion* QtrnPtr; | ||
| typedef const Quaternion* CQtrnPtr; | ||
|
|
||
| typedef f32 Mtx[3][4]; | ||
| typedef f32 (*MtxPtr)[4]; | ||
| typedef const f32 (*CMtxPtr)[4]; | ||
|
|
||
| typedef f32 ROMtx[4][3]; | ||
| typedef f32 (*ROMtxPtr)[3]; | ||
| typedef const f32 (*CROMtxPtr)[3]; | ||
|
|
||
| typedef f32 Mtx44[4][4]; | ||
| typedef f32 (*Mtx44Ptr)[4]; | ||
| typedef const f32 (*CMtx44Ptr)[4]; | ||
|
|
||
| typedef struct { | ||
| u32 numMtx; // at 0x0 | ||
| MtxPtr stackBase; // at 0x4 | ||
| MtxPtr stackPtr; // at 0x8 | ||
| } MtxStack; | ||
| typedef MtxStack* MtxStackPtr; | ||
| typedef const MtxStack* CMtxStackPtr; | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
| #endif |
This file contains hidden or 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,17 @@ | ||
| #ifndef RVL_SDK_MTX44_EXT_ASSERT_H | ||
| #define RVL_SDK_MTX44_EXT_ASSERT_H | ||
|
|
||
| #include <revolution/MTX/internal/mtxAssert.h> | ||
|
|
||
| /****************************************************************************** | ||
| * | ||
| * Mtx44 | ||
| * | ||
| ******************************************************************************/ | ||
|
|
||
| #define Mtx_30 0x30 | ||
| #define Mtx_31 0x34 | ||
| #define Mtx_32 0x38 | ||
| #define Mtx_33 0x3C | ||
|
|
||
| #endif |
This file contains hidden or 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,65 @@ | ||
| #ifndef RVL_SDK_MTX_ASSERT_H | ||
| #define RVL_SDK_MTX_ASSERT_H | ||
|
|
||
| /****************************************************************************** | ||
| * | ||
| * Mtx | ||
| * | ||
| ******************************************************************************/ | ||
|
|
||
| #define Mtx_00 0x0 | ||
| #define Mtx_01 0x4 | ||
| #define Mtx_02 0x8 | ||
| #define Mtx_03 0xC | ||
| #define Mtx_10 0x10 | ||
| #define Mtx_11 0x14 | ||
| #define Mtx_12 0x18 | ||
| #define Mtx_13 0x1C | ||
| #define Mtx_20 0x20 | ||
| #define Mtx_21 0x24 | ||
| #define Mtx_22 0x28 | ||
| #define Mtx_23 0x2C | ||
|
|
||
| /****************************************************************************** | ||
| * | ||
| * ROMtx | ||
| * | ||
| ******************************************************************************/ | ||
|
|
||
| #define ROMtx_00 0x0 | ||
| #define ROMtx_01 0x4 | ||
| #define ROMtx_02 0x8 | ||
| #define ROMtx_10 0xC | ||
| #define ROMtx_11 0x10 | ||
| #define ROMtx_12 0x14 | ||
| #define ROMtx_20 0x18 | ||
| #define ROMtx_21 0x1C | ||
| #define ROMtx_22 0x20 | ||
| #define ROMtx_30 0x24 | ||
| #define ROMtx_31 0x28 | ||
| #define ROMtx_32 0x2C | ||
|
|
||
| /****************************************************************************** | ||
| * | ||
| * General use | ||
| * | ||
| ******************************************************************************/ | ||
|
|
||
| #define DEG2RAD 0.017453292f | ||
|
|
||
| /****************************************************************************** | ||
| * | ||
| * Probably not defined here | ||
| * | ||
| ******************************************************************************/ | ||
|
|
||
| #define qr0 0 | ||
| #define qr1 1 | ||
| #define qr2 2 | ||
| #define qr3 3 | ||
| #define qr4 4 | ||
| #define qr5 5 | ||
| #define qr6 6 | ||
| #define qr7 7 | ||
|
|
||
| #endif | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we
#include <math.h>and define this as(M_PI / 180.0f)does this still match?