Text Rendering
This commit is contained in:
@ -16,13 +16,14 @@
|
||||
|
||||
#include <AudioManager.hpp>
|
||||
#include <EventManager.hpp>
|
||||
#include <FontManager.hpp>
|
||||
#include <InputManager.hpp>
|
||||
#include <InternalEngine.hpp>
|
||||
#include <Physics.hpp>
|
||||
#include <Random.hpp>
|
||||
#include <Renderer/Renderer.hpp>
|
||||
#include <ResourceManager.hpp>
|
||||
#include <Time.hpp>
|
||||
#include <Physics.hpp>
|
||||
#include <WorldManager.hpp>
|
||||
|
||||
#include <IAEngine/Engine.hpp>
|
||||
@ -52,15 +53,14 @@ namespace ia::iae
|
||||
if (!SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMEPAD))
|
||||
THROW_UNKNOWN("Failed to intialize SDL: ", SDL_GetError());
|
||||
|
||||
if (!(g_windowHandle = SDL_CreateWindow(g_gameName.c_str(), config->ScreenWidth, config->ScreenHeight,
|
||||
if (!(g_windowHandle = SDL_CreateWindow(g_gameName.c_str(), config->WindowWidth, config->WindowHeight,
|
||||
SDL_WINDOW_RESIZABLE)))
|
||||
THROW_UNKNOWN("Failed to create the SDL window: ", SDL_GetError());
|
||||
|
||||
// SDL_SetWindowResizable(g_windowHandle, false);
|
||||
|
||||
const auto gameVersion = g_gameVersion;
|
||||
SDL_SetAppMetadata(g_gameName.c_str(), IA_STRINGIFY_VERSION(gameVersion).c_str(),
|
||||
g_gamePackageName.c_str());
|
||||
SDL_SetAppMetadata(g_gameName.c_str(), IA_STRINGIFY_VERSION(gameVersion).c_str(), g_gamePackageName.c_str());
|
||||
|
||||
Time::Initialize();
|
||||
Random::Initialize();
|
||||
@ -70,12 +70,13 @@ namespace ia::iae
|
||||
InputManager::Initialize();
|
||||
ResourceManager::Initialize();
|
||||
WorldManager::Initialize();
|
||||
FontManager::Initialize();
|
||||
UI::Initialize();
|
||||
Physics::Initialize();
|
||||
|
||||
Game_OnInitialize();
|
||||
|
||||
Engine::ResizeDisplay(config->ScreenWidth, config->ScreenHeight);
|
||||
Engine::ResizeDisplay(config->WindowWidth, config->WindowHeight);
|
||||
}
|
||||
|
||||
VOID __Internal_Engine::Terminate()
|
||||
@ -84,6 +85,7 @@ namespace ia::iae
|
||||
|
||||
Physics::Terminate();
|
||||
UI::Terminate();
|
||||
FontManager::Terminate();
|
||||
WorldManager::Terminate();
|
||||
ResourceManager::Terminate();
|
||||
InputManager::Terminate();
|
||||
@ -102,6 +104,7 @@ namespace ia::iae
|
||||
{
|
||||
UI::Update();
|
||||
Physics::Update();
|
||||
InputManager::Update();
|
||||
WorldManager::Update();
|
||||
WorldManager::FixedUpdate();
|
||||
Game_OnUpdate(Time::GetFrameDeltaTime());
|
||||
@ -110,6 +113,7 @@ namespace ia::iae
|
||||
Renderer::BeginFrame();
|
||||
WorldManager::Draw();
|
||||
UI::Draw();
|
||||
InputManager::Draw();
|
||||
Renderer::EndFrame();
|
||||
}
|
||||
|
||||
@ -132,7 +136,8 @@ namespace ia::iae
|
||||
return (FLOAT32) m_value + ((FLOAT32) m_value * (Random::Get() * m_randomAdjustment) / 100.0f);
|
||||
}
|
||||
|
||||
INT32 Run(IN CONST String& name, IN CONST String& packageName, IN CONST String& developerName, IN CONST String& publisherName, IN IA_VERSION_TYPE version)
|
||||
INT32 Run(IN CONST String &name, IN CONST String &packageName, IN CONST String &developerName,
|
||||
IN CONST String &publisherName, IN IA_VERSION_TYPE version)
|
||||
{
|
||||
g_gameName = name;
|
||||
g_gameVersion = version;
|
||||
|
||||
Reference in New Issue
Block a user