Fix some issues
This commit is contained in:
@@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED true)
|
|||||||
|
|
||||||
option(AMY_GOD_DEV "Turn this on if you think you are god" OFF)
|
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
|
# 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_BUILD_STB_TRUETYPE 1)
|
||||||
set(AMY_WITH_MPG123 "Include MP3 Support" CACHE BOOL 1)
|
set(AMY_WITH_MPG123 "Include MP3 Support" CACHE BOOL 1)
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#include <amethyst/iron.hpp>
|
#include <amethyst/iron.hpp>
|
||||||
#include <amethyst/renderer.hpp>
|
#include <amethyst/renderer.hpp>
|
||||||
#include <amethyst/texture.hpp>
|
#include <amethyst/texture.hpp>
|
||||||
|
#include <amethyst/utils.hpp>
|
||||||
|
|
||||||
namespace Amy {
|
namespace Amy {
|
||||||
void RegisterCxxExceptionHandler();
|
void RegisterCxxExceptionHandler();
|
||||||
@@ -16,5 +17,4 @@ void RegisterCxxExceptionHandler();
|
|||||||
|
|
||||||
using Iron = Amy::Iron;
|
using Iron = Amy::Iron;
|
||||||
using C3D = Amy::C3D;
|
using C3D = Amy::C3D;
|
||||||
using GTrace = Amy::GTrace;
|
using GTrace = Amy::GTrace;
|
||||||
using Utils = Amy::Utils;
|
|
||||||
@@ -30,6 +30,7 @@ class C3D {
|
|||||||
ivec2 Size() const { return ivec2(pWidth, pHeight); }
|
ivec2 Size() const { return ivec2(pWidth, pHeight); }
|
||||||
void Clear() { C3D_RenderTargetClear(pTarget, C3D_CLEAR_ALL, 0, 0); }
|
void Clear() { C3D_RenderTargetClear(pTarget, C3D_CLEAR_ALL, 0, 0); }
|
||||||
void Use() { C3D_FrameDrawOn(pTarget); }
|
void Use() { C3D_FrameDrawOn(pTarget); }
|
||||||
|
C3D_RenderTarget* Ptr() { return pTarget; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
C3D_RenderTarget* pTarget = nullptr;
|
C3D_RenderTarget* pTarget = nullptr;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
namespace Amy {
|
namespace Amy {
|
||||||
// The Solution of the biggest performance issue
|
// The Solution of the biggest performance issue
|
||||||
// A Simple Lookup table
|
// 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},
|
{'0', 0}, {'1', 1}, {'2', 2}, {'3', 3}, {'4', 4}, {'5', 5},
|
||||||
{'6', 6}, {'7', 7}, {'8', 8}, {'9', 9}, {'a', 10}, {'b', 11},
|
{'6', 6}, {'7', 7}, {'8', 8}, {'9', 9}, {'a', 10}, {'b', 11},
|
||||||
{'c', 12}, {'d', 13}, {'e', 14}, {'f', 15}, {'A', 10}, {'B', 11},
|
{'c', 12}, {'d', 13}, {'e', 14}, {'f', 15}, {'A', 10}, {'B', 11},
|
||||||
|
|||||||
Reference in New Issue
Block a user