diff --git a/include/c2d/base.h b/include/c2d/base.h index 00d3dd8..a98e0e9 100644 --- a/include/c2d/base.h +++ b/include/c2d/base.h @@ -309,7 +309,7 @@ static inline void C2D_SceneBegin(C3D_RenderTarget* target) * the rendered pixels will all have the fading color. Everything inbetween is * rendered as a blend of the original pixel color and the fading color. */ -void C2D_Fade(u32 color); +bool C2D_Fade(u32 color); /** @brief Configures the formula used to calculate the tinted texture color * @param[in] mode Tinting mode @@ -318,7 +318,7 @@ void C2D_Fade(u32 color); * This function can be used to change how the tinted texture color is precisely * calculated, refer to \ref C2D_TintMode for a list of available tinting modes. */ -void C2D_SetTintMode(C2D_TintMode mode); +bool C2D_SetTintMode(C2D_TintMode mode); /** @} */ diff --git a/source/base.c b/source/base.c index 1a6d2b0..7ecf6c3 100755 --- a/source/base.c +++ b/source/base.c @@ -299,7 +299,7 @@ void C2D_TargetClear(C3D_RenderTarget* target, u32 color) C3D_RenderTargetClear(target, C3D_CLEAR_ALL, __builtin_bswap32(color), 0); } -void C2D_Fade(u32 color) +bool C2D_Fade(u32 color) { C2Di_Context* ctx = C2Di_GetContext(); if (!(ctx->flags & C2DiF_Active)) @@ -307,9 +307,10 @@ void C2D_Fade(u32 color) ctx->flags |= C2DiF_DirtyFade; ctx->fadeClr = color; + return true; } -void C2D_SetTintMode(C2D_TintMode mode) +bool C2D_SetTintMode(C2D_TintMode mode) { C2Di_Context* ctx = C2Di_GetContext(); if (!(ctx->flags & C2DiF_Active)) @@ -331,6 +332,7 @@ void C2D_SetTintMode(C2D_TintMode mode) } ctx->flags = (ctx->flags &~ C2DiF_TintMode_Mask) | (new_mode << (C2DiF_TintMode_Shift - C2DiF_Mode_Shift)); + return true; } static inline void C2Di_RotatePoint(float* point, float rsin, float rcos)