// 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/Engine.hpp>

using namespace ia;
using namespace ia::iae;

struct GameRequestedConfig
{
    INT32 ScreenWidth{};
    INT32 ScreenHeight{};
};

C_DECL(GameRequestedConfig* Game_GetConfigRequest());
C_DECL(VOID Game_OnInitialize());
C_DECL(VOID Game_OnTerminate());
C_DECL(VOID Game_OnDebugDraw());
C_DECL(VOID Game_OnFixedUpdate());
C_DECL(VOID Game_OnUpdate(IN FLOAT32 deltaTime));
C_DECL(VOID Game_OnResize(IN INT32 newWidth, IN INT32 newHeight));

namespace ia::iae
{
    INT32 Run(IN CONST String& name, IN CONST String& packageName, IN CONST String& developerName, IN CONST String& publisherName, IN IA_VERSION_TYPE version);
} // namespace ia::iae

#if defined(__ANDROID__)
#define IAENGINE_RUN(name, packageName, developerName, publisherName, versionMajor, versionMinor, versionPatch) extern "C" int SDL_main(int argc, char *argv[]) { return ia::iae::Run(name, packageName, developerName, publisherName, IA_MAKE_VERSION(versionMajor, versionMinor, versionPatch)); }
#else
#define IAENGINE_RUN(name, packageName, developerName, publisherName, versionMajor, versionMinor, versionPatch) int main(int argc, char *argv[]) { return ia::iae::Run(name, packageName, developerName, publisherName, IA_MAKE_VERSION(versionMajor, versionMinor, versionPatch)); }
#endif
