From 38a1cad76a6c7958a2c0c33843d2e379bd0a6409 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Mon, 8 Dec 2025 22:20:33 +0100 Subject: [PATCH] Fix some issues --- CMakeLists.txt | 2 +- include/amethyst.hpp | 4 ++-- include/amethyst/c3d.hpp | 1 + source/color.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa7c16b..8f27833 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED true) option(AMY_GOD_DEV "Turn this on if you think you are god" OFF) # THis option should be disabled if you use STB_IMAGE in you main project -set(AMY_BUILD_STB_IMAGE 1) +set(AMY_BUILD_STB_IMAGE 0) set(AMY_BUILD_STB_TRUETYPE 1) set(AMY_WITH_MPG123 "Include MP3 Support" CACHE BOOL 1) diff --git a/include/amethyst.hpp b/include/amethyst.hpp index a20b1c1..88f34bc 100755 --- a/include/amethyst.hpp +++ b/include/amethyst.hpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace Amy { void RegisterCxxExceptionHandler(); @@ -16,5 +17,4 @@ void RegisterCxxExceptionHandler(); using Iron = Amy::Iron; using C3D = Amy::C3D; -using GTrace = Amy::GTrace; -using Utils = Amy::Utils; \ No newline at end of file +using GTrace = Amy::GTrace; \ No newline at end of file diff --git a/include/amethyst/c3d.hpp b/include/amethyst/c3d.hpp index 74db475..ab95364 100755 --- a/include/amethyst/c3d.hpp +++ b/include/amethyst/c3d.hpp @@ -30,6 +30,7 @@ class C3D { ivec2 Size() const { return ivec2(pWidth, pHeight); } void Clear() { C3D_RenderTargetClear(pTarget, C3D_CLEAR_ALL, 0, 0); } void Use() { C3D_FrameDrawOn(pTarget); } + C3D_RenderTarget* Ptr() { return pTarget; } private: C3D_RenderTarget* pTarget = nullptr; diff --git a/source/color.cpp b/source/color.cpp index 1cc5603..4b1bdf8 100644 --- a/source/color.cpp +++ b/source/color.cpp @@ -3,7 +3,7 @@ namespace Amy { // The Solution of the biggest performance issue // A Simple Lookup table -static const std::map HEX_DEC = { +static const std::unordered_map HEX_DEC = { {'0', 0}, {'1', 1}, {'2', 2}, {'3', 3}, {'4', 4}, {'5', 5}, {'6', 6}, {'7', 7}, {'8', 8}, {'9', 9}, {'a', 10}, {'b', 11}, {'c', 12}, {'d', 13}, {'e', 14}, {'f', 15}, {'A', 10}, {'B', 11},