diff options
Diffstat (limited to '')
-rw-r--r-- | include/wrapsdl2.hpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/wrapsdl2.hpp b/include/wrapsdl2.hpp index 993a704..847ed99 100644 --- a/include/wrapsdl2.hpp +++ b/include/wrapsdl2.hpp @@ -1,9 +1,23 @@ #pragma once +extern "C" { +#include <SDL2/SDL.h> +} + namespace wrapsdl2 { bool initialize(void); void quit(void); + + namespace util { + constexpr bool sdl_bool(SDL_bool b) { + return b == SDL_TRUE; + } + + constexpr SDL_bool sdl_bool(bool b) { + return (b) ? SDL_TRUE : SDL_FALSE; + } + } // tool functions - void delay() + void delay(unsigned ms); }
\ No newline at end of file |