From 69c3327ad5f53dd43e8d89a21935430a69d698bf Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 27 Jul 2024 14:25:01 +0200 Subject: [PATCH] Directly use files from libgui --- Dockerfile | 4 +- Makefile | 9 +- src/Application.cpp | 4 +- src/Application.h | 2 +- src/StorageUtils.cpp | 143 ++ src/StorageUtils.h | 3 + src/entry.cpp | 4 + src/fs/CFile.cpp | 53 +- src/fs/CFile.hpp | 12 +- src/gui/FreeTypeGX.cpp | 569 +++++ src/gui/FreeTypeGX.h | 163 ++ src/gui/GameBgImage.cpp | 40 + src/gui/GameBgImage.h | 24 + src/gui/GameIcon.cpp | 6 +- src/gui/GameIcon.h | 2 +- src/gui/GridBackground.cpp | 104 + src/gui/GridBackground.h | 33 + src/gui/Gui.h | 43 + src/gui/GuiButton.cpp | 275 +++ src/gui/GuiButton.h | 135 ++ src/gui/GuiCheckBox.cpp | 68 + src/gui/GuiCheckBox.h | 48 + src/gui/GuiController.h | 73 + src/gui/GuiDragListener.cpp | 80 + src/gui/GuiDragListener.h | 54 + src/gui/GuiElement.cpp | 289 +++ src/gui/GuiElement.h | 610 ++++++ src/gui/GuiFrame.cpp | 234 +++ src/gui/GuiFrame.h | 127 ++ src/gui/GuiIconGrid.cpp | 2 +- src/gui/GuiIconGrid.h | 2 +- src/gui/GuiImage.cpp | 270 +++ src/gui/GuiImage.h | 127 ++ src/gui/GuiImageAsync.cpp | 173 ++ src/gui/GuiImageAsync.h | 66 + src/gui/GuiImageData.cpp | 191 ++ src/gui/GuiImageData.h | 91 + src/gui/GuiParticleImage.cpp | 124 ++ src/gui/GuiParticleImage.h | 50 + src/gui/GuiScrollbar.cpp | 221 ++ src/gui/GuiScrollbar.h | 150 ++ src/gui/GuiSelectBox.cpp | 289 +++ src/gui/GuiSelectBox.h | 139 ++ src/gui/GuiSound.cpp | 180 ++ src/gui/GuiSound.h | 71 + src/gui/GuiSwitch.cpp | 80 + src/gui/GuiSwitch.h | 51 + src/gui/GuiText.cpp | 704 +++++++ src/gui/GuiText.h | 213 ++ src/gui/GuiToggle.cpp | 50 + src/gui/GuiToggle.h | 64 + src/gui/GuiTrigger.cpp | 143 ++ src/gui/GuiTrigger.h | 132 ++ src/gui/VPadController.h | 63 + src/gui/WPadController.h | 217 ++ src/gui/gx2_ext.h | 161 ++ src/gui/sigslot.h | 2452 ++++++++++++++++++++++ src/menu/GameSplashScreen.h | 4 +- src/menu/MainWindow.cpp | 15 +- src/sounds/BufferCircle.cpp | 136 ++ src/sounds/BufferCircle.hpp | 143 ++ src/sounds/Mp3Decoder.cpp | 213 ++ src/sounds/Mp3Decoder.hpp | 52 + src/sounds/OggDecoder.cpp | 133 ++ src/sounds/OggDecoder.hpp | 48 + src/sounds/SoundDecoder.cpp | 211 ++ src/sounds/SoundDecoder.hpp | 162 ++ src/sounds/SoundHandler.cpp | 330 +++ src/sounds/SoundHandler.hpp | 98 + src/sounds/Voice.h | 158 ++ src/sounds/WavDecoder.cpp | 148 ++ src/sounds/WavDecoder.hpp | 73 + src/system/CThread.h | 86 +- src/system/memory.cpp | 91 + src/system/memory.h | 47 + src/utils/utils.c | 41 - src/utils/utils.cpp | 41 + src/video/CVideo.cpp | 264 +++ src/video/CVideo.h | 213 ++ src/video/CursorDrawer.cpp | 83 + src/video/CursorDrawer.h | 64 + src/video/shaders/ColorShader.cpp | 171 ++ src/video/shaders/ColorShader.h | 98 + src/video/shaders/FXAAShader.cpp | 236 +++ src/video/shaders/FXAAShader.h | 84 + src/video/shaders/FetchShader.h | 57 + src/video/shaders/PixelShader.h | 152 ++ src/video/shaders/Shader.h | 72 + src/video/shaders/Shader3D.cpp | 276 +++ src/video/shaders/Shader3D.h | 116 + src/video/shaders/ShaderFractalColor.cpp | 384 ++++ src/video/shaders/ShaderFractalColor.h | 120 ++ src/video/shaders/Texture2DShader.cpp | 281 +++ src/video/shaders/Texture2DShader.h | 110 + src/video/shaders/VertexShader.h | 181 ++ 95 files changed, 14750 insertions(+), 129 deletions(-) create mode 100644 src/StorageUtils.cpp create mode 100644 src/StorageUtils.h create mode 100644 src/gui/FreeTypeGX.cpp create mode 100644 src/gui/FreeTypeGX.h create mode 100644 src/gui/GameBgImage.cpp create mode 100644 src/gui/GameBgImage.h create mode 100644 src/gui/GridBackground.cpp create mode 100644 src/gui/GridBackground.h create mode 100644 src/gui/Gui.h create mode 100644 src/gui/GuiButton.cpp create mode 100644 src/gui/GuiButton.h create mode 100644 src/gui/GuiCheckBox.cpp create mode 100644 src/gui/GuiCheckBox.h create mode 100644 src/gui/GuiController.h create mode 100644 src/gui/GuiDragListener.cpp create mode 100644 src/gui/GuiDragListener.h create mode 100644 src/gui/GuiElement.cpp create mode 100644 src/gui/GuiElement.h create mode 100644 src/gui/GuiFrame.cpp create mode 100644 src/gui/GuiFrame.h create mode 100644 src/gui/GuiImage.cpp create mode 100644 src/gui/GuiImage.h create mode 100644 src/gui/GuiImageAsync.cpp create mode 100644 src/gui/GuiImageAsync.h create mode 100644 src/gui/GuiImageData.cpp create mode 100644 src/gui/GuiImageData.h create mode 100644 src/gui/GuiParticleImage.cpp create mode 100644 src/gui/GuiParticleImage.h create mode 100644 src/gui/GuiScrollbar.cpp create mode 100644 src/gui/GuiScrollbar.h create mode 100644 src/gui/GuiSelectBox.cpp create mode 100644 src/gui/GuiSelectBox.h create mode 100644 src/gui/GuiSound.cpp create mode 100644 src/gui/GuiSound.h create mode 100644 src/gui/GuiSwitch.cpp create mode 100644 src/gui/GuiSwitch.h create mode 100644 src/gui/GuiText.cpp create mode 100644 src/gui/GuiText.h create mode 100644 src/gui/GuiToggle.cpp create mode 100644 src/gui/GuiToggle.h create mode 100644 src/gui/GuiTrigger.cpp create mode 100644 src/gui/GuiTrigger.h create mode 100644 src/gui/VPadController.h create mode 100644 src/gui/WPadController.h create mode 100644 src/gui/gx2_ext.h create mode 100644 src/gui/sigslot.h create mode 100644 src/sounds/BufferCircle.cpp create mode 100644 src/sounds/BufferCircle.hpp create mode 100644 src/sounds/Mp3Decoder.cpp create mode 100644 src/sounds/Mp3Decoder.hpp create mode 100644 src/sounds/OggDecoder.cpp create mode 100644 src/sounds/OggDecoder.hpp create mode 100644 src/sounds/SoundDecoder.cpp create mode 100644 src/sounds/SoundDecoder.hpp create mode 100644 src/sounds/SoundHandler.cpp create mode 100644 src/sounds/SoundHandler.hpp create mode 100644 src/sounds/Voice.h create mode 100644 src/sounds/WavDecoder.cpp create mode 100644 src/sounds/WavDecoder.hpp create mode 100644 src/system/memory.cpp create mode 100644 src/system/memory.h delete mode 100644 src/utils/utils.c create mode 100644 src/utils/utils.cpp create mode 100644 src/video/CVideo.cpp create mode 100644 src/video/CVideo.h create mode 100644 src/video/CursorDrawer.cpp create mode 100644 src/video/CursorDrawer.h create mode 100644 src/video/shaders/ColorShader.cpp create mode 100644 src/video/shaders/ColorShader.h create mode 100644 src/video/shaders/FXAAShader.cpp create mode 100644 src/video/shaders/FXAAShader.h create mode 100644 src/video/shaders/FetchShader.h create mode 100644 src/video/shaders/PixelShader.h create mode 100644 src/video/shaders/Shader.h create mode 100644 src/video/shaders/Shader3D.cpp create mode 100644 src/video/shaders/Shader3D.h create mode 100644 src/video/shaders/ShaderFractalColor.cpp create mode 100644 src/video/shaders/ShaderFractalColor.h create mode 100644 src/video/shaders/Texture2DShader.cpp create mode 100644 src/video/shaders/Texture2DShader.h create mode 100644 src/video/shaders/VertexShader.h diff --git a/Dockerfile b/Dockerfile index 312a02e..ce3ab5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -FROM wiiuenv/devkitppc:20211229 - -COPY --from=wiiuenv/libgui:20220109 /artifacts $DEVKITPRO +FROM ghcr.io/wiiu-env/devkitppc:20240704 WORKDIR project \ No newline at end of file diff --git a/Makefile b/Makefile index 42daa5a..18f7144 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,11 @@ SOURCES := src \ src/gui \ src/menu \ src/resources \ + src/sounds \ src/system \ - src/utils + src/utils \ + src/video \ + src/video/shaders DATA := data \ data/images \ data/sounds \ @@ -46,7 +49,7 @@ CXXFLAGS := $(CFLAGS) ASFLAGS := -g $(ARCH) LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -LIBS := -lgui -lfreetype -lgd -lpng -ljpeg -lz -lmad -lvorbisidec -logg -lbz2 -lwut +LIBS := -lfreetype -lgd -lpng -ljpeg -lz -lmad -lvorbisidec -logg -lbz2 -lwut #------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level @@ -105,7 +108,7 @@ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) all: $(BUILD) $(BUILD): - @[ -d $@ ] || mkdir -p $@ + @$(shell [ ! -d $(BUILD) ] && mkdir -p $(BUILD)) @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile #------------------------------------------------------------------------------- diff --git a/src/Application.cpp b/src/Application.cpp index 3fd94ac..9f47639 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -25,8 +25,8 @@ #include #include #include "resources/Resources.h" -#include -#include +#include +#include "system/memory.h" #include "utils/logger.h" #include "utils/AsyncExecutor.h" #include diff --git a/src/Application.h b/src/Application.h index 248e819..2102f54 100644 --- a/src/Application.h +++ b/src/Application.h @@ -18,7 +18,7 @@ #define _APPLICATION_H #include "menu/MainWindow.h" -#include +#include