Wizard Engine
2D cross-platform game engine built around SDL2
 
Loading...
Searching...
No Matches
wizard_engine.hpp File Reference

Interface header of the Wizard Engine. More...

Go to the source code of this file.

Macros

#define __WIZARD_ENGINE__
 Wizard Engine macro.
 
#define wze_main(title, width, height)
 Main function of the Wizard Engine.
 
#define wze_while(condition)
 Game loop of the Wizard Engine.
 

Detailed Description

Interface header of the Wizard Engine.

See also
export.hpp

Definition in file wizard_engine.hpp.

Macro Definition Documentation

◆ __WIZARD_ENGINE__

#define __WIZARD_ENGINE__

Wizard Engine macro.

Definition at line 36 of file wizard_engine.hpp.

◆ wze_main

#define wze_main ( title,
width,
height )
Value:
[[nodiscard]] int32_t __wze_main__(int32_t argc, char** argv); \
int32_t main(int32_t argc, char* argv[]) noexcept(false) { \
wze::engine::initialize((title), (width), (height)); \
return __wze_main__(argc, argv); \
} \
int32_t __wze_main__([[maybe_unused]] int32_t argc, \
[[maybe_unused]] char** argv)

Main function of the Wizard Engine.

Command line arguments are accessible.

Parameters
titleTitle of the game window.
widthWidth of the game window.
heightHeight of the game window.
Returns
Exit code.
Warning
Do not initialize the engine manually.

Definition at line 79 of file wizard_engine.hpp.

79#define wze_main(title, width, height) \
80 [[nodiscard]] int32_t __wze_main__(int32_t argc, char** argv); \
81 int32_t main(int32_t argc, char* argv[]) noexcept(false) { \
82 wze::engine::initialize((title), (width), (height)); \
83 return __wze_main__(argc, argv); \
84 } \
85 int32_t __wze_main__([[maybe_unused]] int32_t argc, \
86 [[maybe_unused]] char** argv)

◆ wze_while

#define wze_while ( condition)
Value:
while (wze::engine::update() && (condition))

Game loop of the Wizard Engine.

Parameters
Trueif the game should continue, false otherwise.
Warning
Do not update the engine manually.

Definition at line 95 of file wizard_engine.hpp.