al::ReplayController class

Base classes

class sead::ControllerWrapper

Public types

enum class HeapNullOption { AlwaysUseSpecifiedHeap = 0, UseSpecifiedOrContainHeap = 1, DoNotAppendDisposerIfNoHeapSpecified = 2, UseSpecifiedOrCurrentHeap = 3 }

Public static variables

static const u8 cPadConfigDefault
static const f32 cStickHoldThresholdDefault
static const f32 cStickReleaseThresholdDefault
static const Vector2f cInvalidPointer
static const Vector2i cInvalidPointerS32

Public static functions

static auto getListNodeOffset() -> u32

Constructors, destructors, conversion operators

ReplayController(sead::Controller* controller)
~ReplayController() override

Public functions

void unregist()
void startReplay()
void pauseReplay()
void endReplay()
auto isReplaying() const -> bool
auto isRecording() const -> bool
auto getReplayRemainFrame() const -> s32
void calc(u32 prevHold, bool prevPointerOn) override
void startRecord()
void endRecord()
void setPadDataReader(IUsePadDataReader* reader)
void setPadDataWriter(IUsePadDataWriter* writer)
auto createPadMaskFromControllerPadMask_(u32 controller_mask) const -> u32
void setPadConfig(s32 padbit_max, const u8* pad_config, bool enable_stickcross_emulation)
void setIdle() virtual
void registerWith(Controller* controller, bool copy_repeat_setting)
void unregister()
void copyRepeatSetting(const Controller* controller)
void setEnable(bool enable)
void setEnableOtherWrappers(bool enable) const
auto getHoldMask() const -> u32
auto getTrigMask() const -> u32
auto getReleaseMask() const -> u32
auto getRepeatMask() const -> u32
auto getPadHoldCount(s32 bit) const -> u32
auto getLeftStick() const -> const Vector2f&
auto getRightStick() const -> const Vector2f&
auto getLeftAnalogTrigger() const -> f32
auto getRightAnalogTrigger() const -> f32
auto getPointer() const -> const Vector2f&
auto getPointerPrev() const -> const Vector2i&
auto isPointerOn() const -> bool
auto isPointerOnNow() const -> bool
auto isPointerOffNow() const -> bool
auto isPointerUnkFlag3() const -> bool
auto isHold(u32 mask) const -> bool
auto isTrig(u32 mask) const -> bool
auto isHoldAll(u32 mask) const -> bool
auto isRelease(u32 mask) const -> bool
auto isRepeat(u32 mask) const -> bool
auto isTrigWithRepeat(u32 mask) const -> bool
void setPadRepeat(u32 mask, u8 delay_frame, u8 pulse_frame)
void setLeftStickCrossThreshold(f32 hold, f32 release)
void setRightStickCrossThreshold(f32 hold, f32 release)
void setPointerBound(const BoundBox2f& bound)
auto getPointerBound() const -> const BoundBox2f&

Protected types

enum (anonymous) { cPadIdx_MaxBase = 32 }
enum PointerFlagMask { cPointerOn = 1 << 0, cPointerOnNow = 1 << 1, cPointerOffNow = 1 << 2, cPointerUnkFlag3 = 1 << 3 }
enum (anonymous) { cCrossUp, cCrossDown, cCrossLeft, cCrossRight }

Protected functions

auto isIdle_() -> bool virtual
auto isIdleBase_() -> bool
void setIdleBase_()
void setPointerWithBound_(bool is_on, bool touchkey_hold, const Vector2f& pos)
void updateDerivativeParams_(u32 prev_hold, bool prev_pointer_on)
auto getStickHold_(u32 prev_hold, const Vector2f& stick, f32 hold_threshold, f32 release_threshold, s32 start_bit) -> u32
auto createStickCrossMask_() -> u32
auto getDisposerHeap_() const -> Heap*

Protected variables

u8 mPadConfig
Controller* mController
bool mIsEnable
ListNode mListNode
BitFlag32 mPadTrig
BitFlag32 mPadRelease
BitFlag32 mPadRepeat
BitFlag32 mPointerFlag
Vector2i mPointerS32
BoundBox2f mPointerBound
u32 mPadHoldCounts
u8 mPadRepeatDelays
u8 mPadRepeatPulses
f32 mLeftStickHoldThreshold
f32 mRightStickHoldThreshold
f32 mLeftStickReleaseThreshold
f32 mRightStickReleaseThreshold
s32 mPadBitMax
s32 mLeftStickCrossStartBit
s32 mRightStickCrossStartBit
s32 mTouchKeyBit
s32 mIdleFrame
BitFlag32 mPadHold
Vector2f mPointer
Vector2f mLeftStick
Vector2f mRightStick
f32 mLeftAnalogTrigger
f32 mRightAnalogTrigger

Enum documentation

enum class al::ReplayController::HeapNullOption

enum al::ReplayController::(anonymous) protected

enum al::ReplayController::PointerFlagMask protected

enum al::ReplayController::(anonymous) protected

Function documentation

static u32 al::ReplayController::getListNodeOffset()

u32 al::ReplayController::createPadMaskFromControllerPadMask_(u32 controller_mask) const

void al::ReplayController::setPadConfig(s32 padbit_max, const u8* pad_config, bool enable_stickcross_emulation)

void al::ReplayController::setIdle() virtual

void al::ReplayController::registerWith(Controller* controller, bool copy_repeat_setting)

void al::ReplayController::unregister()

void al::ReplayController::copyRepeatSetting(const Controller* controller)

void al::ReplayController::setEnable(bool enable)

void al::ReplayController::setEnableOtherWrappers(bool enable) const

u32 al::ReplayController::getHoldMask() const

u32 al::ReplayController::getTrigMask() const

u32 al::ReplayController::getReleaseMask() const

u32 al::ReplayController::getRepeatMask() const

u32 al::ReplayController::getPadHoldCount(s32 bit) const

const Vector2f& al::ReplayController::getLeftStick() const

const Vector2f& al::ReplayController::getRightStick() const

f32 al::ReplayController::getLeftAnalogTrigger() const

f32 al::ReplayController::getRightAnalogTrigger() const

const Vector2f& al::ReplayController::getPointer() const

const Vector2i& al::ReplayController::getPointerPrev() const

bool al::ReplayController::isPointerOn() const

bool al::ReplayController::isPointerOnNow() const

bool al::ReplayController::isPointerOffNow() const

bool al::ReplayController::isPointerUnkFlag3() const

bool al::ReplayController::isHold(u32 mask) const

bool al::ReplayController::isTrig(u32 mask) const

bool al::ReplayController::isHoldAll(u32 mask) const

bool al::ReplayController::isRelease(u32 mask) const

bool al::ReplayController::isRepeat(u32 mask) const

bool al::ReplayController::isTrigWithRepeat(u32 mask) const

void al::ReplayController::setPadRepeat(u32 mask, u8 delay_frame, u8 pulse_frame)

void al::ReplayController::setLeftStickCrossThreshold(f32 hold, f32 release)

void al::ReplayController::setRightStickCrossThreshold(f32 hold, f32 release)

void al::ReplayController::setPointerBound(const BoundBox2f& bound)

const BoundBox2f& al::ReplayController::getPointerBound() const

bool al::ReplayController::isIdle_() virtual protected

bool al::ReplayController::isIdleBase_() protected

void al::ReplayController::setIdleBase_() protected

void al::ReplayController::setPointerWithBound_(bool is_on, bool touchkey_hold, const Vector2f& pos) protected

void al::ReplayController::updateDerivativeParams_(u32 prev_hold, bool prev_pointer_on) protected

u32 al::ReplayController::getStickHold_(u32 prev_hold, const Vector2f& stick, f32 hold_threshold, f32 release_threshold, s32 start_bit) protected

u32 al::ReplayController::createStickCrossMask_() protected

Heap* al::ReplayController::getDisposerHeap_() const protected

Variable documentation

static const u8 al::ReplayController::cPadConfigDefault

static const f32 al::ReplayController::cStickHoldThresholdDefault

static const f32 al::ReplayController::cStickReleaseThresholdDefault

static const Vector2f al::ReplayController::cInvalidPointer

static const Vector2i al::ReplayController::cInvalidPointerS32

u8 al::ReplayController::mPadConfig protected

Controller* al::ReplayController::mController protected

bool al::ReplayController::mIsEnable protected

ListNode al::ReplayController::mListNode protected

BitFlag32 al::ReplayController::mPadTrig protected

BitFlag32 al::ReplayController::mPadRelease protected

BitFlag32 al::ReplayController::mPadRepeat protected

BitFlag32 al::ReplayController::mPointerFlag protected

Vector2i al::ReplayController::mPointerS32 protected

BoundBox2f al::ReplayController::mPointerBound protected

u32 al::ReplayController::mPadHoldCounts protected

u8 al::ReplayController::mPadRepeatDelays protected

u8 al::ReplayController::mPadRepeatPulses protected

f32 al::ReplayController::mLeftStickHoldThreshold protected

f32 al::ReplayController::mRightStickHoldThreshold protected

f32 al::ReplayController::mLeftStickReleaseThreshold protected

f32 al::ReplayController::mRightStickReleaseThreshold protected

s32 al::ReplayController::mPadBitMax protected

s32 al::ReplayController::mLeftStickCrossStartBit protected

s32 al::ReplayController::mRightStickCrossStartBit protected

s32 al::ReplayController::mTouchKeyBit protected

s32 al::ReplayController::mIdleFrame protected

BitFlag32 al::ReplayController::mPadHold protected

Vector2f al::ReplayController::mPointer protected

Vector2f al::ReplayController::mLeftStick protected

Vector2f al::ReplayController::mRightStick protected

f32 al::ReplayController::mLeftAnalogTrigger protected

f32 al::ReplayController::mRightAnalogTrigger protected