JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Macros
main.hpp File Reference

Defines macros for the main entry point. More...

#include "Finally.hpp"
#include "other.hpp"
#include "window.hpp"
Include dependency graph for main.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE
 
#define JNGL_MAIN_BEGIN
 
#define JNGL_MAIN_END   }
 

Detailed Description

Defines macros for the main entry point.

Definition in file main.hpp.

Macro Definition Documentation

◆ JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE

#define JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE

Definition at line 42 of file main.hpp.

◆ JNGL_MAIN_BEGIN

#define JNGL_MAIN_BEGIN
Value:
/* NOLINT */ int main(int argc, char** argv) { \
JNGL_CATCH_EXCEPTION_TO_ERROR_MESSAGE \
{ \
std::vector<std::string> tmp(argc - 1); \
for (int i = 1; i < argc; ++i) { \
tmp[i - 1] = argv[i]; \
} \
jngl::setArgs(tmp); \
} \
jngl::Finally _ZtzNg47T5XSjogv(jngl::hideWindow);
Helper class which calls a function when being destroyed.
Definition Finally.hpp:22
void hideWindow()
Cleans up the window and unloads everything.

Definition at line 44 of file main.hpp.

◆ JNGL_MAIN_END

#define JNGL_MAIN_END   }

Definition at line 61 of file main.hpp.