wavelength 1.0.0
Loading...
Searching...
No Matches
Joypad.h
Go to the documentation of this file.
1#pragma once
2
3#include "os/JoypadData.h"
5#include "utl/Data.h"
6#include "utl/MsgSink.h"
7
9const int kNumJoypads = 8;
10
12const int kNumPlayers = 4;
13
20
27
34
42
51
59
67
75void JoypadAssignPadToPlayer(int iPlayerNum, int iPadNum);
76
83
const int kNumPlayers
Number of players.
Definition Joypad.h:12
void JoypadSubscribe(MsgSink *sink)
Send the controller messages to a sink.
void JoypadUnsubscribe(MsgSink *sink)
Stop sending the controller messages to a sink.
void JoypadTerminate()
Release the joysticks and DirectInput.
void JoypadInit()
Create DirectInput and a DIJoypad for each attached joystick, giving joystick n to player n.
void JoypadAssignPadToPlayer(int iPlayerNum, int iPadNum)
Give a controller to a player, or take it from its player.
void JoypadConfigInit(DataArray *config)
Apply the joypad configuration array, the press threshold of every controller.
const int kNumJoypads
Number of controllers.
Definition Joypad.h:9
JoypadData * JoypadGetPlayerData(int iPlayerNum)
Report the state of a player's controller.
JoypadMsgSource gJoypadMsgSource
Source of the controller messages.
JoypadData gJoypadData[kNumJoypads]
State of each controller.
int gPlayerNumToPadNum[kNumPlayers]
Controller of each player.
Reference-counted array of script data nodes.
Definition dataarray.h:20
State of one controller.
Definition JoypadData.h:10
Source of the controller messages.
Definition JoypadMsgSource.h:10
Receiver of engine messages.
Definition msgsink.h:21