Files
ReCaveGame/ClientApp/main.cpp
2025-06-09 20:50:23 -05:00

62 lines
1.6 KiB
C++

/// CaveGame - A procedural 2D platformer sandbox.
/// Created by Josh O'Leary @ Redacted Software, 2020-2024
/// Contact: josh@redacted.cc
/// Contributors: william@redacted.cc maxi@redacted.cc
/// This work is dedicated to the public domain.
/// @file main.cpp
/// @desc The Client App's main file. Creates and runs the Client App window.
/// @edit 11/1/2024
/// @auth Josh O'Leary
#ifdef STEAM_BUILD
#include <steam_api.h>
#endif
#include <iostream>
#include <JGL/JGL.h>
#include <ClientApp/CaveGameWindow.hpp>
#include <Core/Loggers.hpp>
#include <ReWindow/Logger.h>
#include <Core/Tile.hpp>
#include <JGL/logger/logger.h>
#include <JJX/JSON.hpp>
int main(int argc, char** argv) {
mcolor::windowsSaneify();
// Hide logs from engine components so we can focus on CaveGame.
JGL::Logger::Warning.EnableConsole(false);
JGL::Logger::Debug.EnableConsole(false);
ReWindow::Logger::Debug.EnableConsole(false);
//ReWindow::Logger::Debug.EnableFile(false);
// Reduce verbosity of our base logger.
CaveGame::Logs::Info.IncludeLocation(false);
// Let 'em know we're coming.
CaveGame::Logs::Info("Starting client program.");
// If we compiled with steam, poke the system for the steam API, and launch with it, if we have it.
#ifdef STEAM_BUILD
CaveGame::Logs::Info.Log("Running steam build.");
bool steam_success = SteamAPI_Init();
#endif
auto* window = new CaveGame::ClientApp::CaveGameWindow("Re-CaveGame", 800, 600);
//window->SetResizable(true);
window->Run();
delete window;
#ifdef STEAM_BUILD
SteamAPI_Shutdown();
#endif
CaveGame::Logs::Info.Log("Exiting client program.");
return 0;
}