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

One controller reading, as RawControllerMsg carries it. More...

#include <metcontrollerreading.h>

Public Member Functions

void Print (std::ostream &stream) const
 Write the reading to a diagnostic stream as the device label, the pad index, the button, and the value.

Public Attributes

int mTag
int mPadIndex
int mButton
float mValue

Detailed Description

One controller reading, as RawControllerMsg carries it.

The four fields are recovered rather than inferred. RawControllerMsg::Clone() at 0x003da200 copies them, RawController's one virtual receives them as three ints followed by a float in this order, and MetRenderer::DispatchPriv() passes the address of the first of them to MetCommandMap::Translate(). The record sits at +0x04 of the message, so the three words MetRenderer reads at message offsets 4, 8, and 0x0c are mTag, mPadIndex, and mButton.

The name is inferred, because the record has no RTTI. Its three routines sit together at 0x00100f40 through 0x00101120, directly after the Sequencer template's members and in the same translation unit.

Every member is public, because MetRenderer, MetCommandMap, GrooveWorld, and ControllerCmd all read the record directly and the image exposes no accessor.

Member Function Documentation

◆ Print()

void MetControllerReading::Print ( std::ostream & stream) const

Write the reading to a diagnostic stream as the device label, the pad index, the button, and the value.

The label is key, joy, mouse, or none for the four tags the routine recognises, and nothing for any other tag. The three numbers follow separated by ., ., and :.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00100f40
Ghidra address:
PAL: 0x00100f40

Member Data Documentation

◆ mTag

int MetControllerReading::mTag

Four characters, joy , key , mous, or none. +0x00

◆ mPadIndex

int MetControllerReading::mPadIndex

Which controller produced the reading. +0x04

◆ mButton

int MetControllerReading::mButton

Raw button identifier, which the jump table indexes by less one. +0x08

◆ mValue

float MetControllerReading::mValue

Reading value. A button is pressed while the value is above zero. +0x0c


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