Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9f21cf7b38 | ||
![]() |
00396e8a99 | ||
![]() |
66a0594e5d | ||
![]() |
e8825650c6 | ||
![]() |
e2992d276f |
2
Makefile
2
Makefile
@ -10,7 +10,7 @@ include $(DEVKITARM)/3ds_rules
|
|||||||
|
|
||||||
export CITRO3D_MAJOR := 1
|
export CITRO3D_MAJOR := 1
|
||||||
export CITRO3D_MINOR := 7
|
export CITRO3D_MINOR := 7
|
||||||
export CITRO3D_PATCH := 0
|
export CITRO3D_PATCH := 1
|
||||||
|
|
||||||
VERSION := $(CITRO3D_MAJOR).$(CITRO3D_MINOR).$(CITRO3D_PATCH)
|
VERSION := $(CITRO3D_MAJOR).$(CITRO3D_MINOR).$(CITRO3D_PATCH)
|
||||||
|
|
||||||
|
@ -77,6 +77,14 @@ enum
|
|||||||
void C3D_LightEnvFresnel(C3D_LightEnv* env, GPU_FRESNELSEL selector);
|
void C3D_LightEnvFresnel(C3D_LightEnv* env, GPU_FRESNELSEL selector);
|
||||||
void C3D_LightEnvBumpMode(C3D_LightEnv* env, GPU_BUMPMODE mode);
|
void C3D_LightEnvBumpMode(C3D_LightEnv* env, GPU_BUMPMODE mode);
|
||||||
void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit);
|
void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Configures whether to use the z component of the normal map.
|
||||||
|
* @param[out] env Pointer to light environment structure.
|
||||||
|
* @param[in] enable false if the z component is reconstructed from the xy components
|
||||||
|
* of the normal map, true if the z component is taken from the normal map.
|
||||||
|
*/
|
||||||
|
void C3D_LightEnvBumpNormalZ(C3D_LightEnv *env, bool enable);
|
||||||
void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode);
|
void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode);
|
||||||
void C3D_LightEnvShadowSel(C3D_LightEnv* env, int texUnit);
|
void C3D_LightEnvShadowSel(C3D_LightEnv* env, int texUnit);
|
||||||
void C3D_LightEnvClampHighlights(C3D_LightEnv* env, bool clamp);
|
void C3D_LightEnvClampHighlights(C3D_LightEnv* env, bool clamp);
|
||||||
|
@ -13,7 +13,12 @@
|
|||||||
* The one true circumference-to-radius ratio.
|
* The one true circumference-to-radius ratio.
|
||||||
* See http://tauday.com/tau-manifesto
|
* See http://tauday.com/tau-manifesto
|
||||||
*/
|
*/
|
||||||
#define M_TAU (2*M_PI)
|
#define M_TAU (6.28318530717958647692528676655900576)
|
||||||
|
|
||||||
|
// Define the legacy circle constant as well
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI (M_TAU/2)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert an angle from revolutions to radians
|
* @brief Convert an angle from revolutions to radians
|
||||||
|
@ -41,7 +41,7 @@ typedef struct
|
|||||||
};
|
};
|
||||||
} C3D_Tex;
|
} C3D_Tex;
|
||||||
|
|
||||||
typedef struct ALIGN(8)
|
typedef struct CTR_ALIGN(8)
|
||||||
{
|
{
|
||||||
u16 width;
|
u16 width;
|
||||||
u16 height;
|
u16 height;
|
||||||
|
@ -38,7 +38,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Subtexture
|
/** @brief Subtexture
|
||||||
* @note If top > bottom, the subtexture is rotated 1/4 revolution counter-clockwise
|
* @note If top < bottom, the subtexture is rotated 1/4 revolution counter-clockwise
|
||||||
*/
|
*/
|
||||||
typedef struct Tex3DS_SubTexture
|
typedef struct Tex3DS_SubTexture
|
||||||
{
|
{
|
||||||
|
@ -250,6 +250,14 @@ void C3D_LightEnvBumpSel(C3D_LightEnv* env, int texUnit)
|
|||||||
env->flags |= C3DF_LightEnv_Dirty;
|
env->flags |= C3DF_LightEnv_Dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void C3D_LightEnvBumpNormalZ(C3D_LightEnv *env, bool usez) {
|
||||||
|
if (usez)
|
||||||
|
env->conf.config[0] |= BIT(30);
|
||||||
|
else
|
||||||
|
env->conf.config[0] &= ~BIT(30);
|
||||||
|
env->flags |= C3DF_LightEnv_Dirty;
|
||||||
|
}
|
||||||
|
|
||||||
void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode)
|
void C3D_LightEnvShadowMode(C3D_LightEnv* env, u32 mode)
|
||||||
{
|
{
|
||||||
mode &= 0xF<<16;
|
mode &= 0xF<<16;
|
||||||
|
Loading…
Reference in New Issue
Block a user