-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The dolsdk2001 repo contains a bunch of files for the sdk, albeit the wrong version, but a ton of stuff still matches up pretty nicely, so I have imported all parts of it used by sms with some fixes here and there. Further work on matching is obviously required.
- Loading branch information
Showing
196 changed files
with
28,196 additions
and
1,406 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
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,7 @@ | ||
#ifndef _DOLPHIN_CMATH_H_ | ||
#define _DOLPHIN_CMATH_H_ | ||
|
||
f32 powf(f32 x, f32 y); | ||
f32 tanf(f32); | ||
|
||
#endif // _DOLPHIN_CMATH_H_ |
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,80 @@ | ||
#ifndef _DOLPHIN_G2D_H_ | ||
#define _DOLPHIN_G2D_H_ | ||
|
||
#include <dolphin/gx.h> | ||
|
||
typedef enum G2DMatCtg { | ||
G2D_CTG_TEXTURE, | ||
G2D_CTG_RGB_DIRECT, | ||
G2D_CTG_RGBA_INDEX8, | ||
G2D_CTG_EMPTY, | ||
} G2DMatCtg; | ||
|
||
typedef struct G2DSprite { | ||
u16 nTlcS; // "Top Left Corner" | ||
u16 nTlcT; | ||
u16 nWidth; | ||
u16 nHeight; | ||
GXTexObj* to; | ||
f32 rS0; | ||
f32 rT0; | ||
f32 rS1; | ||
f32 rT1; | ||
} G2DSprite; | ||
|
||
typedef struct G2DPosOri { | ||
f32 rPosX; | ||
f32 rPosY; | ||
f32 rOriX; | ||
f32 rOriY; | ||
} G2DPosOri; | ||
|
||
typedef struct G2DGlob { | ||
u16 nViewportTlcX; | ||
u16 nViewportTlcY; | ||
u16 nViewportWidth; | ||
u16 nViewportHeight; | ||
G2DPosOri poCam; | ||
f32 rWorldX; | ||
f32 rWorldY; | ||
f32 rHalfX; | ||
f32 rHalfY; | ||
} G2DGlob; | ||
|
||
typedef struct G2DMatDesc { | ||
s32 nReserved; | ||
G2DMatCtg nCategory; | ||
GXColor* color; | ||
GXTexObj* to; | ||
u8* clut; // Color Look-Up Table | ||
} G2DMatDesc; | ||
|
||
typedef struct G2DTileDesc { | ||
u8 nMaterial; | ||
u8 nS; | ||
u8 nT; | ||
u8 nCI; // Color Index | ||
u8 aUser[4]; | ||
} G2DTileDesc; | ||
|
||
typedef struct G2DLayer { | ||
void* map; | ||
s8 nHS; | ||
s8 nVS; | ||
s8 nBPI; | ||
s16 nTileWidth; | ||
s16 nTileHeight; | ||
s8 bWrap; | ||
u8 nNumMaterials; | ||
G2DTileDesc* tileDesc; | ||
G2DMatDesc* matDesc; | ||
} G2DLayer; | ||
|
||
void G2DInitSprite(G2DSprite* sprite); | ||
void G2DDrawSprite(G2DSprite* sprite, G2DPosOri* po); | ||
void G2DDrawLayer(G2DLayer* layer, s8* aSortBuffer); | ||
void G2DSetCamera(G2DPosOri* po); | ||
void G2DInitWorld(u32 nWorldX, u32 nWorldY); | ||
void G2DSetViewport(u16 nLeft, u16 nTop, u16 nWidth, u16 nHeight); | ||
|
||
#endif // _DOLPHIN_G2D_H_ |
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
Oops, something went wrong.