From f754f25c9748ece1c26787a2d8aae6d232923e05 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Wed, 7 Feb 2024 01:42:08 -0500 Subject: [PATCH] Update documentation --- CHANGELOG.md | 1 + GRRLIB/GRRLIB/grrlib.h | 2 +- README.md | 4 ++-- examples/particle/source/main.cpp | 10 ++-------- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f2e03..b713fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased][] - Fixed compatibility issues with devkitPPC release 39. +- Fixed linking problem in examples with FreeType 2.13.2. - Added `GRRLIB_LoadTTFFromFile()` to load a TTF from a file. - Added `GRRLIB_Ellipse()` to draw an ellipse. - Changed `GRRLIB_PrintfTTF()` and `GRRLIB_PrintfTTFW()` so they use the alpha channel from the `color` parameter. diff --git a/GRRLIB/GRRLIB/grrlib.h b/GRRLIB/GRRLIB/grrlib.h index de8c4d1..9fbcd0d 100644 --- a/GRRLIB/GRRLIB/grrlib.h +++ b/GRRLIB/GRRLIB/grrlib.h @@ -1,5 +1,5 @@ /*------------------------------------------------------------------------------ -Copyright (c) 2009-2021 The GRRLIB Team +Copyright (c) 2009-2024 The GRRLIB Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9206b79..034fb13 100644 --- a/README.md +++ b/README.md @@ -183,8 +183,8 @@ Now it needs to be like this: LIBDIRS := $(PORTLIBS) ``` -The FreeType library is now compiled with a dependency on bzip2, -so lbz2 needs to be added after lfreetype in your makefile. +The FreeType library is now compiled with dependencies, +so freetype2 must be added to pkg-config in your makefile. For example: diff --git a/examples/particle/source/main.cpp b/examples/particle/source/main.cpp index e918d26..37318f0 100644 --- a/examples/particle/source/main.cpp +++ b/examples/particle/source/main.cpp @@ -7,6 +7,7 @@ ============================================*/ #include +#include #include #include #include @@ -280,12 +281,5 @@ static u8 CalculateFrameRate() { */ static constexpr u8 ClampVar8 (f32 Value) { Value = std::roundf(Value); - if (Value < 0) { - Value = 0; - } - else if (Value > 255) { - Value = 255; - } - - return static_cast(Value); + return static_cast(std::clamp(Value, 0.0f, 255.0f)); }