Fix some issues

This commit is contained in:
2025-12-08 22:20:33 +01:00
parent d85610a0bd
commit 38a1cad76a
4 changed files with 5 additions and 4 deletions

View File

@@ -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)

View File

@@ -9,6 +9,7 @@
#include <amethyst/iron.hpp>
#include <amethyst/renderer.hpp>
#include <amethyst/texture.hpp>
#include <amethyst/utils.hpp>
namespace Amy {
void RegisterCxxExceptionHandler();
@@ -17,4 +18,3 @@ void RegisterCxxExceptionHandler();
using Iron = Amy::Iron;
using C3D = Amy::C3D;
using GTrace = Amy::GTrace;
using Utils = Amy::Utils;

View File

@@ -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;

View File

@@ -3,7 +3,7 @@
namespace Amy {
// The Solution of the biggest performance issue
// A Simple Lookup table
static const std::map<char, int> HEX_DEC = {
static const std::unordered_map<char, int> 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},