|
resonance 1.0.1
|
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 |
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.
| 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 :.
| stream | The stream to write to. |
| int MetControllerReading::mTag |
Four characters, joy , key , mous, or none. +0x00
| int MetControllerReading::mPadIndex |
Which controller produced the reading. +0x04
| int MetControllerReading::mButton |
Raw button identifier, which the jump table indexes by less one. +0x08
| float MetControllerReading::mValue |
Reading value. A button is pressed while the value is above zero. +0x0c