#pragma once

#include "GameCore.h"
#include "dinput.h"

class KeyboardManager
{
public:
	KeyboardManager(void);
	~KeyboardManager(void);
	// initialize
	HRESULT Initialize( HWND g_hWndMain );
	// is given key pressed
	BOOL IsKeyDown( int Key );
	// is given key not pressed
	BOOL IsKeyUp( int Key );

	// close input
	HRESULT ShutdownInput();
	// initialize input
	HRESULT InitializeInput( HINSTANCE hInstance );
	// check the state of input - reaquire if neccisary
	HRESULT CheckState();

	bool movement();
    // wich movement are you doing
    bool movementUp();
    bool movementUpRight();
    bool movementRight();
    bool movementDownRight();
    bool movementDown();
    bool movementDownLeft();
    bool movementLeft();
    bool movementUpLeft();

private:
	LPDIRECTINPUT8 g_pDI;
protected:
	LPDIRECTINPUTDEVICE8 m_pKeyDev;
	char m_KeyBuffer[ 256 ];  // key buffer

	bool initialized;         // is the keyboard initialized
};

