diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f2e03..3369548 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 (pkgrel 1 and 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 bb2cf50..034fb13 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ at the top of your .c/.cpp file and use the functions as required You will need to add ```make --lgrrlib -lfreetype -lbz2 -lfat -ljpeg -lpngu -lpng -lz +-lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat ``` to the libs line in your makefile @@ -183,13 +183,13 @@ 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: ```make -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat ``` Since GRRLIB and libpngu are now installed into the porlibs folder, make sure you don't have any leftovers from previous installations. diff --git a/examples/3D_CubedTileDemo/Makefile b/examples/3D_CubedTileDemo/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_CubedTileDemo/Makefile +++ b/examples/3D_CubedTileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light1/Makefile b/examples/3D_Light1/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light1/Makefile +++ b/examples/3D_Light1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light2/Makefile b/examples/3D_Light2/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light2/Makefile +++ b/examples/3D_Light2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light3/Makefile b/examples/3D_Light3/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_Light3/Makefile +++ b/examples/3D_Light3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_Light4/Makefile b/examples/3D_Light4/Makefile index 843b158..c62800a 100644 --- a/examples/3D_Light4/Makefile +++ b/examples/3D_Light4/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm diff --git a/examples/3D_sample1/Makefile b/examples/3D_sample1/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample1/Makefile +++ b/examples/3D_sample1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample2/Makefile b/examples/3D_sample2/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample2/Makefile +++ b/examples/3D_sample2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample3/Makefile b/examples/3D_sample3/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample3/Makefile +++ b/examples/3D_sample3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample4/Makefile b/examples/3D_sample4/Makefile index c6517d1..26ad04d 100644 --- a/examples/3D_sample4/Makefile +++ b/examples/3D_sample4/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/3D_sample5/Makefile b/examples/3D_sample5/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/3D_sample5/Makefile +++ b/examples/3D_sample5/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/NEED_GRRLIB_FUNCTION/Makefile b/examples/NEED_GRRLIB_FUNCTION/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/NEED_GRRLIB_FUNCTION/Makefile +++ b/examples/NEED_GRRLIB_FUNCTION/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/TileDemo/Makefile b/examples/TileDemo/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/TileDemo/Makefile +++ b/examples/TileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/basic_drawing/Makefile b/examples/basic_drawing/Makefile index 33f88fb..90b5b97 100644 --- a/examples/basic_drawing/Makefile +++ b/examples/basic_drawing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/bitmap_fx/Makefile b/examples/bitmap_fx/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/bitmap_fx/Makefile +++ b/examples/bitmap_fx/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/blending/Makefile b/examples/blending/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/blending/Makefile +++ b/examples/blending/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/compositing/Makefile b/examples/compositing/Makefile index 88b3d6e..572e2c2 100644 --- a/examples/compositing/Makefile +++ b/examples/compositing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/funsin/Makefile b/examples/funsin/Makefile index de822b1..661aced 100644 --- a/examples/funsin/Makefile +++ b/examples/funsin/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_CubedTileDemo/Makefile b/examples/gamecube/3D_CubedTileDemo/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_CubedTileDemo/Makefile +++ b/examples/gamecube/3D_CubedTileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light1/Makefile b/examples/gamecube/3D_Light1/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light1/Makefile +++ b/examples/gamecube/3D_Light1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light2/Makefile b/examples/gamecube/3D_Light2/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light2/Makefile +++ b/examples/gamecube/3D_Light2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light3/Makefile b/examples/gamecube/3D_Light3/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_Light3/Makefile +++ b/examples/gamecube/3D_Light3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_Light4/Makefile b/examples/gamecube/3D_Light4/Makefile index 26d41a9..eb145d8 100644 --- a/examples/gamecube/3D_Light4/Makefile +++ b/examples/gamecube/3D_Light4/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/3D_sample1/Makefile b/examples/gamecube/3D_sample1/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample1/Makefile +++ b/examples/gamecube/3D_sample1/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample2/Makefile b/examples/gamecube/3D_sample2/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample2/Makefile +++ b/examples/gamecube/3D_sample2/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample3/Makefile b/examples/gamecube/3D_sample3/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample3/Makefile +++ b/examples/gamecube/3D_sample3/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample4/Makefile b/examples/gamecube/3D_sample4/Makefile index 91187dc..bd664cd 100644 --- a/examples/gamecube/3D_sample4/Makefile +++ b/examples/gamecube/3D_sample4/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/3D_sample5/Makefile b/examples/gamecube/3D_sample5/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/3D_sample5/Makefile +++ b/examples/gamecube/3D_sample5/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/TileDemo/Makefile b/examples/gamecube/TileDemo/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/TileDemo/Makefile +++ b/examples/gamecube/TileDemo/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/basic_drawing/Makefile b/examples/gamecube/basic_drawing/Makefile index 81d2a35..14197c5 100644 --- a/examples/gamecube/basic_drawing/Makefile +++ b/examples/gamecube/basic_drawing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/bitmap_fx/Makefile b/examples/gamecube/bitmap_fx/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/bitmap_fx/Makefile +++ b/examples/gamecube/bitmap_fx/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/compositing/Makefile b/examples/gamecube/compositing/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/compositing/Makefile +++ b/examples/gamecube/compositing/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/funsin/Makefile b/examples/gamecube/funsin/Makefile index 096d10c..826a13d 100644 --- a/examples/gamecube/funsin/Makefile +++ b/examples/gamecube/funsin/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/template/Makefile b/examples/gamecube/template/Makefile index 26d41a9..eb145d8 100644 --- a/examples/gamecube/template/Makefile +++ b/examples/gamecube/template/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/ttf/Makefile b/examples/gamecube/ttf/Makefile index d6bbcd5..32a0e4e 100644 --- a/examples/gamecube/ttf/Makefile +++ b/examples/gamecube/ttf/Makefile @@ -34,9 +34,8 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -LIBS += -lfreetype -lbz2 -LIBS += -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu +LIBS += `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat #LIBS += -lmodplay -laesnd LIBS += -logc -lm diff --git a/examples/gamecube/unlimited2d/Makefile b/examples/gamecube/unlimited2d/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/unlimited2d/Makefile +++ b/examples/gamecube/unlimited2d/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/gamecube/unlimited3d/Makefile b/examples/gamecube/unlimited3d/Makefile index 1a18e66..a387bf6 100644 --- a/examples/gamecube/unlimited3d/Makefile +++ b/examples/gamecube/unlimited3d/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/particle/Makefile b/examples/particle/Makefile index f0a40ce..63c23c8 100644 --- a/examples/particle/Makefile +++ b/examples/particle/Makefile @@ -33,7 +33,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing 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)); } diff --git a/examples/template/Makefile b/examples/template/Makefile index 843b158..c62800a 100644 --- a/examples/template/Makefile +++ b/examples/template/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm diff --git a/examples/ttf/Makefile b/examples/ttf/Makefile index d023477..d866d51 100644 --- a/examples/ttf/Makefile +++ b/examples/ttf/Makefile @@ -34,9 +34,8 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map # any extra libraries we wish to link with the project # the order can-be/is critical #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -LIBS += -lfreetype -lbz2 -LIBS += -lpngu -lpng -ljpeg -lz -lfat +LIBS := -lgrrlib -lpngu +LIBS += `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat LIBS += -lwiiuse #LIBS += -lmodplay -laesnd LIBS += -lbte -logc -lm diff --git a/examples/unlimited2d/Makefile b/examples/unlimited2d/Makefile index eacb378..8f4e170 100644 --- a/examples/unlimited2d/Makefile +++ b/examples/unlimited2d/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81 #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing diff --git a/examples/unlimited3d/Makefile b/examples/unlimited3d/Makefile index eacb378..8f4e170 100644 --- a/examples/unlimited3d/Makefile +++ b/examples/unlimited3d/Makefile @@ -34,7 +34,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81 #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project #--------------------------------------------------------------------------------- -LIBS := -lgrrlib -lfreetype -lbz2 -lpngu -lpng -ljpeg -lz -lfat -lwiiuse -lbte -logc -lm +LIBS := -lgrrlib -lpngu `$(PREFIX)pkg-config freetype2 libpng libjpeg --libs` -lfat -lwiiuse -lbte -logc -lm #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing