Rise
The Vieneo Province
Toggle main menu visibility
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>
8
#include "
../Rendering/ClientRuntime11.h
"
9
#include "
../Logger.h
"
10
#include <dinput.h>
11
#include <vector>
12
#include "
../Config/InputConfig.h
"
13
#include "
../Networking.h
"
14
15
class
Viewscreen
;
16
17
class
joystick
18
{
19
public
:
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);
26
HRESULT
EnumDevices
();
27
bool
IsGameController
(WCHAR* deviceName)
const
;
28
29
std::vector<DIDEVICEINSTANCE>
deviceList
;
30
const
int
nullzone
= 50;
31
32
private
:
33
Viewscreen
*
viewscreen
;
34
Logger
*
logger
;
35
HWND
hDlg
;
36
37
struct
Wrapper
38
{
39
InputConfig
*
config
;
40
Logger
*
logger
;
41
GameClass
*
game
;
42
};
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
};
ClientRuntime11.h
HRESULT
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
BOOL
SCRIPT_CONTROL SCRIPT_STATE const void SCRIPT_CONTROL SCRIPT_STATE const int SCRIPT_TABDEF const BYTE SCRIPT_STRING_ANALYSIS BOOL
Definition
Controls.cpp:5035
InputConfig.h
Logger.h
Networking.h
GameClass
Definition
GameClass.h:44
Logger
Definition
Logger.h:11
Viewscreen
Definition
Viewscreen.h:48
joystick::hDlg
HWND hDlg
Definition
joystick.h:35
joystick::IsGameController
bool IsGameController(WCHAR *deviceName) const
joystick::deviceList
std::vector< DIDEVICEINSTANCE > deviceList
Definition
joystick.h:29
joystick::joystick
joystick(Viewscreen *ptr)
Definition
joystick.cpp:130
joystick::EnumDevicesCallback
static BOOL CALLBACK EnumDevicesCallback(const DIDEVICEINSTANCE *pInst, VOID *pContext)
Definition
joystick.cpp:1314
joystick::InitializeDevice
void InitializeDevice(InputConfig *config, std::string control) const
Definition
joystick.cpp:581
joystick::Update
void Update(float fElapsedTime)
Definition
joystick.cpp:271
joystick::polledGuids
std::vector< GUID > polledGuids
Definition
joystick.h:47
joystick::EnumAxesCallback
static BOOL CALLBACK EnumAxesCallback(const DIDEVICEOBJECTINSTANCE *pdidoi, VOID *pContext)
Definition
joystick.cpp:1263
joystick::Poll
HRESULT Poll(InputConfig *config, long *value)
Definition
joystick.cpp:137
joystick::nullzone
const int nullzone
Definition
joystick.h:30
joystick::EnumDevices
HRESULT EnumDevices()
Definition
joystick.cpp:554
joystick::polledDeviceStates
std::vector< DIJOYSTATE > polledDeviceStates
Definition
joystick.h:48
joystick::viewscreen
Viewscreen * viewscreen
Definition
joystick.h:33
joystick::Initialize
void Initialize(HWND prmHWND)
Definition
joystick.cpp:529
joystick::logger
Logger * logger
Definition
joystick.h:34
InputConfig
Definition
InputConfig.h:12
joystick::Wrapper
Definition
joystick.h:38
joystick::Wrapper::logger
Logger * logger
Definition
joystick.h:40
joystick::Wrapper::config
InputConfig * config
Definition
joystick.h:39
joystick::Wrapper::game
GameClass * game
Definition
joystick.h:41
Viewscreen
joystick.h
Generated on
for Rise by
1.18.0