summaryrefslogtreecommitdiffstats
path: root/include/wrapsdl2.hpp
blob: 847ed990e805102c5769986273fabee48dccb1c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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(unsigned ms);
}