resonance 1.0.1
Loading...
Searching...
No Matches
InputPoller Class Reference

Reader of the physical controllers. More...

#include <inputpoller.h>

Public Member Functions

 InputPoller ()
virtual ~InputPoller ()
void SetVibration (int nPort, int nSmallMotor, int nBigMotor)
 Drive the vibration motors of the controller on one port.
void SetController (RawController *pController)
 Set the controller the readings go to.
void SetActive (int bActive)
 Set the word at +0x3c, which the constructor starts at 1.
void SetPaused (int bPaused)
 Set the paused flag.
void DetachController (RawController *pController)
 Clear the controller the readings go to, if it is pController.
void Poll ()
 Read the controllers once.
void SetGameInputEnabled (int bEnabled)
 Set mGameInputEnabled.
void SetUnusedFlag ()
 Set mUnusedFlag to 1, the value the constructor starts it at.
void ClearUnusedFlag ()
 Clear mUnusedFlag.
void EmptyStubA ()
 Do nothing.
void EmptyStubB ()
 Do nothing.
int GetBusyJoypadSeen ()
 Report mBusyJoypadSeen.
int GetPressedThisPoll ()
 Report whether the last Poll() sent a reading out.

Public Attributes

int mPressedThisPoll
 Non-zero when the last Poll() sent a reading out.

Detailed Description

Reader of the physical controllers.

Its RTTI descriptor is at 0x0086f6d8. It has no base. The vptr lands after the data at +0x58, and the class is 0x5c bytes. Its vtable at 0x007e69b8 has two entries and a zero terminator at index 2, the type function and the destructor at 0x001df080. The destructor is the only virtual the class declares. The size comes from the allocation in the GameManagerImpl constructor.

The translation unit is InputPollerPS2.cpp, which the anonymous-namespace marker Q235_GLOBAL_$N$InputPollerPS2.cppXFKhgb24FindJoypadConnectionsCmd at 0x007e6ae8 records. That same marker names one file-private class, FindJoypadConnectionsCmd. The file is therefore the PlayStation 2 implementation, and a reconstructed implementation belongs at that basename rather than at a portable one. The string pool of the unit also holds the InputCheatDetector family and the cheat phrases, so the cheat decoder shares the file.

The member map comes from the constructor at 0x001ded98, the destructor, and the setup routine at 0x001df248 together, and it accounts for every byte up to the vptr. The purpose of each member is mostly unrecovered, so those members are private.

The constructor finishes in Init(), and the destructor begins with Shutdown().

Constructor & Destructor Documentation

◆ InputPoller()

InputPoller::InputPoller ( )
Ghidra address:
NTSC-U/C: 0x001ded98
Ghidra address:
PAL: 0x001e4e18

◆ ~InputPoller()

virtual InputPoller::~InputPoller ( )
virtual
Ghidra address:
NTSC-U/C: 0x001df080
Ghidra address:
PAL: 0x001e5100

Member Function Documentation

◆ SetVibration()

void InputPoller::SetVibration ( int nPort,
int nSmallMotor,
int nBigMotor )

Drive the vibration motors of the controller on one port.

The JoypadPS2 whose player is nPort receives both levels, and a player with no JoypadPS2 is ignored. ForceFeedbackMgr::ApplyMotors() is the recovered caller.

Parameters
nPortThe player, from 1.
nSmallMotorThe small motor's state, 0 or 1.
nBigMotorThe big motor's level.
Ghidra address:
NTSC-U/C: 0x001e1b78
Ghidra address:
PAL: 0x001e7c60

◆ SetController()

void InputPoller::SetController ( RawController * pController)

Set the controller the readings go to.

GameManagerImpl passes the MetaGameWorld in the front end and the game world's RawController part during a game, or null where it has no world. The title is inferred.

Parameters
pControllerThe receiver of the readings, or null.
Ghidra address:
NTSC-U/C: 0x001e1998
Ghidra address:
PAL: 0x001e7a60

◆ SetActive()

void InputPoller::SetActive ( int bActive)

Set the word at +0x3c, which the constructor starts at 1.

GameManagerImpl::Start() passes 1, and the begin-game and end-game handlers pass 0. The title is inferred.

Parameters
bActiveThe flag.
Ghidra address:
NTSC-U/C: 0x001e1a80
Ghidra address:
PAL: 0x001e7b68

◆ SetPaused()

void InputPoller::SetPaused ( int bPaused)

Set the paused flag.

GameManagerImpl's pause handler passes 1 and its unpause handler 0. The title is inferred.

Parameters
bPausedThe flag.
Ghidra address:
NTSC-U/C: 0x001e1c18
Ghidra address:
PAL: 0x001e7d00

◆ DetachController()

void InputPoller::DetachController ( RawController * pController)

Clear the controller the readings go to, if it is pController.

GameManagerImpl::EndGame() and the routine at 0x0010c050 run it before deleting the game world. The title is inferred.

Parameters
pControllerThe controller being withdrawn.
Ghidra address:
NTSC-U/C: 0x001e19a0
Ghidra address:
PAL: 0x001e7a68

◆ Poll()

void InputPoller::Poll ( )

Read the controllers once.

Runs ReadControllers() and then FinishPoll(). GameManagerImpl::PollPlayback() is the caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e1c28
Ghidra address:
PAL: 0x001e7d10

◆ SetGameInputEnabled()

void InputPoller::SetGameInputEnabled ( int bEnabled)
inline

Set mGameInputEnabled.

GameManagerImpl::OnBeginGameLocal() passes 1 outside jukebox mode, and GameManagerImpl::Load() passes 0. The title is inferred.

Parameters
bEnabledThe flag.
Ghidra address:
NTSC-U/C: 0x001e1c20
Ghidra address:
PAL: 0x001e7d08

◆ SetUnusedFlag()

void InputPoller::SetUnusedFlag ( )
inline

Set mUnusedFlag to 1, the value the constructor starts it at.

The body is inline. The one out-of-line copy has no caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e1958
Ghidra address:
PAL: 0x001e7a18

◆ ClearUnusedFlag()

void InputPoller::ClearUnusedFlag ( )
inline

Clear mUnusedFlag.

The body is inline. GameManagerImpl's constructor expands it at 0x00106024, and the one out-of-line copy has no caller. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e1968
Ghidra address:
PAL: 0x001e7a28

◆ EmptyStubA()

void InputPoller::EmptyStubA ( )
inline

Do nothing.

The body is inline, and the one out-of-line copy has no caller. Its place between the other InputPoller accessor copies is the only evidence for the class. The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e1970
Ghidra address:
PAL: 0x001e7a30

◆ EmptyStubB()

void InputPoller::EmptyStubB ( )
inline

Do nothing.

Recorded on the same evidence as EmptyStubA(). The title is inferred.

Ghidra address:
NTSC-U/C: 0x001e1978
Ghidra address:
PAL: 0x001e7a38

◆ GetBusyJoypadSeen()

int InputPoller::GetBusyJoypadSeen ( )
inline

Report mBusyJoypadSeen.

The body is inline, and the one out-of-line copy has no caller. The title is inferred.

Returns
Non-zero when the last read found a JoypadPS2 still at the digital setup level.
Ghidra address:
NTSC-U/C: 0x001e1980
Ghidra address:
PAL: 0x001e7a40

◆ GetPressedThisPoll()

int InputPoller::GetPressedThisPoll ( )
inline

Report whether the last Poll() sent a reading out.

The body is inline. GameManagerImpl::PollPlayback() expands it, and the one out-of-line copy has no caller. The title is inferred.

Returns
mPressedThisPoll.
Ghidra address:
NTSC-U/C: 0x001e1988
Ghidra address:
PAL: 0x001e7a48

Member Data Documentation

◆ mPressedThisPoll

int InputPoller::mPressedThisPoll

Non-zero when the last Poll() sent a reading out.

ReadControllers() clears it on entry and sets it for each press it sends. Public because MetLogoScreen's slot 26 at 0x002bac40 reads it directly to restart the attract-mode idle count. +0x38


The documentation for this class was generated from the following file: