Rise
The Vieneo Province
Loading...
Searching...
No Matches
joystick.h
Go to the documentation of this file.
1#pragma once
2
3#define DIRECTINPUT_VERSION 0x0800
4
5#include <WinSock2.h>
6#include <WS2tcpip.h>
7#include <Windows.h>
9#include "../Logger.h"
10#include <dinput.h>
11#include <vector>
13#include "../Networking.h"
14
15class Viewscreen;
16
18{
19public:
20 joystick(Viewscreen* ptr);
21
22 HRESULT Poll(InputConfig* config, long* value);
23 void Update(float fElapsedTime);
24 void InitializeDevice(InputConfig* config, std::string control) const;
25 void Initialize(HWND prmHWND);
27 bool IsGameController(WCHAR* deviceName) const;
28
29 std::vector<DIDEVICEINSTANCE> deviceList;
30 const int nullzone = 50;
31
32private:
35 HWND hDlg;
36
43
44 static BOOL CALLBACK EnumAxesCallback(const DIDEVICEOBJECTINSTANCE* pdidoi, VOID* pContext);
45 static BOOL CALLBACK EnumDevicesCallback(const DIDEVICEINSTANCE* pInst, VOID* pContext);
46
47 std::vector<GUID> polledGuids;
48 std::vector<DIJOYSTATE> polledDeviceStates;
49
50 //HRESULT SetDeviceForcesXY() const;
51
52 /*
53
54 LPDIRECTINPUTEFFECT g_pEffectCF; // Constant-forces
55 LPDIRECTINPUTEFFECT g_pEffectSS; // Stick-shaker
56 DWORD g_dwNumForceFeedbackAxis;
57 int g_nXForce;
58 int g_nYForce;
59
60 */
61};
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
SCRIPT_CONTROL SCRIPT_STATE const void SCRIPT_CONTROL SCRIPT_STATE const int SCRIPT_TABDEF const BYTE SCRIPT_STRING_ANALYSIS BOOL
HWND hDlg
Definition joystick.h:35
bool IsGameController(WCHAR *deviceName) const
std::vector< DIDEVICEINSTANCE > deviceList
Definition joystick.h:29
joystick(Viewscreen *ptr)
Definition joystick.cpp:130
static BOOL CALLBACK EnumDevicesCallback(const DIDEVICEINSTANCE *pInst, VOID *pContext)
void InitializeDevice(InputConfig *config, std::string control) const
Definition joystick.cpp:581
void Update(float fElapsedTime)
Definition joystick.cpp:271
std::vector< GUID > polledGuids
Definition joystick.h:47
static BOOL CALLBACK EnumAxesCallback(const DIDEVICEOBJECTINSTANCE *pdidoi, VOID *pContext)
HRESULT Poll(InputConfig *config, long *value)
Definition joystick.cpp:137
const int nullzone
Definition joystick.h:30
HRESULT EnumDevices()
Definition joystick.cpp:554
std::vector< DIJOYSTATE > polledDeviceStates
Definition joystick.h:48
Viewscreen * viewscreen
Definition joystick.h:33
void Initialize(HWND prmHWND)
Definition joystick.cpp:529
Logger * logger
Definition joystick.h:34
Logger * logger
Definition joystick.h:40
InputConfig * config
Definition joystick.h:39
GameClass * game
Definition joystick.h:41