aboutsummaryrefslogtreecommitdiff
path: root/commands/commands.h
blob: 5513790c63848b6114f63e491a6a03bfb1c836dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef COMMANDS_H
#define COMMANDS_H

#include <iostream>
#include <vector>

#define SDL_MAIN_HANDLED
#include <SDL2/SDL.h>

class Commands_sdl {
    public:
    Commands_sdl ();
    ~Commands_sdl ();
    bool process_events ();
    void process_clicks ();
    void process_keys ();
    bool check_keydown(SDL_Scancode key);
    bool check_key(SDL_Scancode key);
    int mx, my;
    int mclick[3];
    int mheld[3];
    
    int resx, resy;
    
    private:
    std::vector<SDL_Scancode> keys;
    std::vector<SDL_Scancode> keysdown;
};

#endif