Input processor interface and sdl implementation added, now frees text textures after displaying text, need to look into caching so we can let manager handle it

This commit is contained in:
2021-12-06 14:54:11 -05:00
parent 26b341ee63
commit 994a128c14
11 changed files with 619 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
//
// Created by m on 12/6/21.
//
#ifndef RLA_IIPP_SDLINPUTPROCESSOR_HPP
#define RLA_IIPP_SDLINPUTPROCESSOR_HPP
#include "inputprocessor.hpp"
#include <SDL.h>
#include <unordered_map>
class SdlInputProcessor : public InputProcessor {
InputResult process_input() override;
public:
SdlInputProcessor();
private:
std::unordered_map<SDL_Keycode,InputProcessorKeycode> keycode_map;
InputProcessorKeycode get_keycode(SDL_Keycode keycode);
};
#endif //RLA_IIPP_SDLINPUTPROCESSOR_HPP