// 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 . #include #include #include #include EXTERN GameFunctionTable g_gameFunctions; namespace ia::iae { BOOL Engine::IsDebugMode() { #if defined(__DEBUG_MODE__) return true; #else return false; #endif } VOID Engine::ResizeDisplay(IN INT32 newWidth, IN INT32 newHeight) { Renderer::OnScreenResize(newWidth, newHeight); g_gameFunctions.OnResize(newWidth, newHeight); } Handle Engine::CreateImageFromFile(IN CONST String &path) { const auto data = File::ReadToVector(path.c_str()); return CreateImage(data.data(), data.size()); } Handle Engine::CreateSoundFromFile(IN CONST String &path) { const auto data = File::ReadToVector(path.c_str()); return CreateSound(data.data(), data.size()); } Handle Engine::CreateSceneFromFile(IN CONST String &path) { const auto data = File::ReadToString(path.c_str()); return CreateScene(data); } } // namespace ia::iae