Embedded Resources
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
set(SRC_FILES
|
||||
"imp/cpp/IAEngine.cpp"
|
||||
|
||||
"imp/cpp/EmbeddedResources.cpp"
|
||||
)
|
||||
|
||||
add_library(IAEngine STATIC ${SRC_FILES})
|
||||
|
||||
60
Src/IAEngine/imp/cpp/EmbeddedResources.cpp
Normal file
60
Src/IAEngine/imp/cpp/EmbeddedResources.cpp
Normal file
File diff suppressed because one or more lines are too long
34
Src/IAEngine/imp/hpp/EmbeddedResources.hpp
Normal file
34
Src/IAEngine/imp/hpp/EmbeddedResources.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
// IAEngine: 2D Game Engine by IA
|
||||
// Copyright (C) 2025 IASoft (PVT) LTD (oss@iasoft.dev)
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IAEngine/Base.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
class EmbeddedResources
|
||||
{
|
||||
public:
|
||||
STATIC VOID Initialize();
|
||||
STATIC VOID Terminate();
|
||||
|
||||
STATIC CONST Vector<UINT8>& GetResource(IN CONST String& name);
|
||||
|
||||
private:
|
||||
STATIC Map<String, Vector<UINT8>> s_resources;
|
||||
};
|
||||
}
|
||||
@ -16,7 +16,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <IACore/Exception.hpp>
|
||||
#include <IACore/Logger.hpp>
|
||||
#include <IACore/Map.hpp>
|
||||
#include <IACore/Memory.hpp>
|
||||
#include <IACore/String.hpp>
|
||||
#include <IACore/Vector.hpp>
|
||||
|
||||
#define IAE_LOG_TAG "IAE"
|
||||
|
||||
#define IAE_LOG_INFO(...) ia::Logger::Info(IAE_LOG_TAG, __VA_ARGS__)
|
||||
#define IAE_LOG_WARN(...) ia::Logger::Warn(IAE_LOG_TAG, __VA_ARGS__)
|
||||
#define IAE_LOG_ERROR(...) ia::Logger::Error(IAE_LOG_TAG, __VA_ARGS__)
|
||||
#define IAE_LOG_SUCCESS(...) ia::Logger::Success(IAE_LOG_TAG, __VA_ARGS__)
|
||||
|
||||
namespace ia::iae
|
||||
{
|
||||
|
||||
using Handle = INT64;
|
||||
STATIC CONSTEXPR Handle INVALID_HANDLE = -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user