Just™ Game Engine
entry_point.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2022 Konstanty Misiak
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#pragma once
8#include "jng/core/engine.hpp"
9#include "jng/debug/log.hpp"
11
13
14int main(int argc, char* argv[])
15{
16 using namespace jng;
17
18 JNG_PROFILE_BEGIN_SESSION("profiling_init.json");
19 auto app = createApp();
21
22 JNG_PROFILE_BEGIN_SESSION("profiling_run.json");
23 app->run();
25
26 JNG_PROFILE_BEGIN_SESSION("profiling_shutdown.json");
27 delete app;
29
30 return 0;
31}
32
33#if defined(_WIN32)
34
35#define WINAPI __stdcall
36struct HINSTANCE__;
37typedef HINSTANCE__* HINSTANCE;
38typedef wchar_t* LPWSTR;
39typedef char* LPSTR;
40
41#if defined(UNICODE)
42
43int WINAPI wWinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPWSTR, _In_ int)
44{
45 return main(__argc, __argv);
46}
47
48#else
49
50int WINAPI WinMain(_In_ HINSTANCE, _In_opt_ HINSTANCE, _In_ LPSTR, _In_ int)
51{
52 return main(__argc, __argv);
53}
54
55#endif
56
57#endif
Main engine class from which all client applications derive.
Definition: engine.hpp:25
int main(int argc, char *argv[])
Definition: entry_point.hpp:14
jng::Engine * createApp()
Definition: base.hpp:11
#define JNG_PROFILE_END_SESSION()
Definition: profiling.hpp:113
#define JNG_PROFILE_BEGIN_SESSION(filepath)
Definition: profiling.hpp:112