|
DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
|
#include <gamepad.hpp>
Public Member Functions | |
| void | Init () |
| void | UpDate () |
| int | On (int mask) |
| int | On2 (int mask) |
| int | Down (int mask) |
| int | Down2 (int mask) |
| int | GetPadOn () |
| int | GetPadDown () |
| int | GetPadUp () |
| int | GetLX () |
| int | GetLY () |
| int | GetRX () |
| int | GetRY () |
| int | GetLX2 () |
| int | GetLY2 () |
| int | GetRX2 () |
| int | GetRY2 () |
| int | AllOn () |
| float | GetRXf () |
| float | GetRYf () |
| float | GetLXf () |
| float | GetLYf () |
| float | GetLXf2 () |
| float | GetLYf2 () |
| void | KeyLock (int mask) |
| void | KeyLock2 (int mask) |
| void | StopVibration () |
| void | VibrationEnable (int enable) |
| void | Step () |
| void | AutoRepeatOff () |
| void | MenuModeOff () |
| void | MenuModeOn (int threshold) |
| void | SetAutoRepeat (int mask, int initial_delay, int repeat_delay) |
| void | CancelAutoRepeat (int mask) |
| void | SetVibration (int motor, int intensity, int duration) |
Private Attributes | |
| PAD_DATA | pad [2] |
| PAD_DATA | previous_pad [2] |
| int | unk_130 [5] |
| PAD_REPEAT | repeat [2] |
| int | axis_threshold [2] |
| int | key_lock |
| int | key_lock2 |
| int | vibration_enabled |
Manages both game controllers.
Definition at line 124 of file gamepad.hpp.
| void CGamePad::Init | ( | ) |
Initializes the controller library and both controller ports.
Definition at line 16 of file gamepad.cpp.
| void CGamePad::UpDate | ( | ) |
Reads both controllers and updates derived button states.
Definition at line 261 of file gamepad.cpp.
| int CGamePad::On | ( | int | mask | ) |
Tests whether the first controller presses any requested button.
Definition at line 557 of file gamepad.cpp.
| int CGamePad::On2 | ( | int | mask | ) |
Tests whether the second controller presses any requested button.
Definition at line 575 of file gamepad.cpp.
| int CGamePad::Down | ( | int | mask | ) |
Tests whether the first controller newly presses any requested button.
Definition at line 583 of file gamepad.cpp.
| int CGamePad::Down2 | ( | int | mask | ) |
Tests whether the second controller newly presses any requested button.
Definition at line 601 of file gamepad.cpp.
| int CGamePad::GetPadOn | ( | ) |
Gets the buttons pressed on the first controller.
Definition at line 509 of file gamepad.cpp.
| int CGamePad::GetPadDown | ( | ) |
Gets the buttons newly pressed on the first controller.
Definition at line 517 of file gamepad.cpp.
| int CGamePad::GetPadUp | ( | ) |
Gets the buttons newly released on the first controller.
Definition at line 525 of file gamepad.cpp.
| int CGamePad::GetLX | ( | ) |
Gets the calibrated first-controller left stick horizontal position.
Definition at line 441 of file gamepad.cpp.
| int CGamePad::GetLY | ( | ) |
Gets the calibrated first-controller left stick vertical position.
Definition at line 445 of file gamepad.cpp.
| int CGamePad::GetRX | ( | ) |
Gets the calibrated first-controller right stick horizontal position.
Definition at line 433 of file gamepad.cpp.
| int CGamePad::GetRY | ( | ) |
Gets the calibrated first-controller right stick vertical position.
Definition at line 437 of file gamepad.cpp.
| int CGamePad::GetLX2 | ( | ) |
Gets the calibrated second-controller left stick horizontal position.
Definition at line 457 of file gamepad.cpp.
| int CGamePad::GetLY2 | ( | ) |
Gets the calibrated second-controller left stick vertical position.
Definition at line 461 of file gamepad.cpp.
| int CGamePad::GetRX2 | ( | ) |
Gets the calibrated second-controller right stick horizontal position.
Definition at line 449 of file gamepad.cpp.
| int CGamePad::GetRY2 | ( | ) |
Gets the calibrated second-controller right stick vertical position.
Definition at line 453 of file gamepad.cpp.
| int CGamePad::AllOn | ( | ) |
Combines the button and stick states of both controllers.
Definition at line 465 of file gamepad.cpp.
| float CGamePad::GetRXf | ( | ) |
Gets the normalized first-controller right stick horizontal position.
Definition at line 533 of file gamepad.cpp.
| float CGamePad::GetRYf | ( | ) |
Gets the normalized first-controller right stick vertical position.
Definition at line 537 of file gamepad.cpp.
| float CGamePad::GetLXf | ( | ) |
Gets the normalized first-controller left stick horizontal position.
Definition at line 541 of file gamepad.cpp.
| float CGamePad::GetLYf | ( | ) |
Gets the normalized first-controller left stick vertical position.
Definition at line 545 of file gamepad.cpp.
| float CGamePad::GetLXf2 | ( | ) |
Gets the normalized second-controller left stick horizontal position.
Definition at line 549 of file gamepad.cpp.
| float CGamePad::GetLYf2 | ( | ) |
Gets the normalized second-controller left stick vertical position.
Definition at line 553 of file gamepad.cpp.
| void CGamePad::KeyLock | ( | int | mask | ) |
Sets the first controller input lock mask.
Definition at line 501 of file gamepad.cpp.
| void CGamePad::KeyLock2 | ( | int | mask | ) |
Sets the second controller input lock mask.
Definition at line 505 of file gamepad.cpp.
| void CGamePad::StopVibration | ( | ) |
Stops both vibration actuators immediately.
Definition at line 643 of file gamepad.cpp.
| void CGamePad::VibrationEnable | ( | int | enable | ) |
Enables or disables controller vibration.
Definition at line 639 of file gamepad.cpp.
| void CGamePad::Step | ( | ) |
Updates vibration timers and sends actuator values.
Definition at line 392 of file gamepad.cpp.
| void CGamePad::AutoRepeatOff | ( | ) |
Disables automatic repeat for every button.
Definition at line 609 of file gamepad.cpp.
| void CGamePad::MenuModeOff | ( | ) |
Disables analog-stick menu direction conversion.
Definition at line 617 of file gamepad.cpp.
| void CGamePad::MenuModeOn | ( | int | threshold | ) |
Enables analog-stick menu direction conversion at a threshold.
Definition at line 613 of file gamepad.cpp.
| void CGamePad::SetAutoRepeat | ( | int | mask, |
| int | initial_delay, | ||
| int | repeat_delay | ||
| ) |
Configures automatic repeat for selected buttons.
Definition at line 485 of file gamepad.cpp.
| void CGamePad::CancelAutoRepeat | ( | int | mask | ) |
Cancels automatic repeat for selected buttons.
Definition at line 469 of file gamepad.cpp.
| void CGamePad::SetVibration | ( | int | motor, |
| int | intensity, | ||
| int | duration | ||
| ) |
Starts one vibration actuator for a limited time.
Definition at line 621 of file gamepad.cpp.
|
private |
Specifies the current controller data.
Definition at line 125 of file gamepad.hpp.
|
private |
Specifies the previous controller data.
Definition at line 126 of file gamepad.hpp.
|
private |
Definition at line 127 of file gamepad.hpp.
|
private |
Specifies automatic repeat state for both controllers.
Definition at line 128 of file gamepad.hpp.
|
private |
Specifies analog-stick menu thresholds.
Definition at line 129 of file gamepad.hpp.
|
private |
Specifies the first controller input lock.
Definition at line 130 of file gamepad.hpp.
|
private |
Specifies the second controller input lock.
Definition at line 131 of file gamepad.hpp.
|
private |
Specifies whether vibration can run.
Definition at line 132 of file gamepad.hpp.