OpenClonk
C4PlayerControl::CSync::ControlDownState Struct Reference

#include <C4PlayerControl.h>

Collaboration diagram for C4PlayerControl::CSync::ControlDownState:
[legend]

Public Member Functions

 ControlDownState (const C4KeyEventData &rDownState, int32_t iDownFrame, bool fDownByUser)
 
bool IsDown () const
 
 ControlDownState ()
 
void CompileFunc (StdCompiler *pComp)
 
bool operator== (const ControlDownState &cmp) const
 

Public Attributes

C4KeyEventData DownState
 
C4KeyEventData MovedState
 
int32_t iDownFrame {0}
 
int32_t iMovedFrame
 
bool fDownByUser {false}
 

Detailed Description

Definition at line 353 of file C4PlayerControl.h.

Constructor & Destructor Documentation

◆ ControlDownState() [1/2]

C4PlayerControl::CSync::ControlDownState::ControlDownState ( const C4KeyEventData rDownState,
int32_t  iDownFrame,
bool  fDownByUser 
)
inline

◆ ControlDownState() [2/2]

C4PlayerControl::CSync::ControlDownState::ControlDownState ( )
inline

Definition at line 362 of file C4PlayerControl.h.

362 : DownState() {}

Member Function Documentation

◆ CompileFunc()

void C4PlayerControl::CSync::ControlDownState::CompileFunc ( StdCompiler pComp)

Definition at line 877 of file C4PlayerControl.cpp.

878 {
879  pComp->Value(DownState);
880  pComp->Separator();
881  pComp->Value(MovedState);
882  pComp->Separator();
883  pComp->Value(iDownFrame);
884  pComp->Separator();
885  pComp->Value(iMovedFrame);
886  pComp->Separator();
887  pComp->Value(fDownByUser);
888 }
virtual bool Separator(Sep eSep=SEP_SEP)
Definition: StdCompiler.h:119
void Value(const T &rStruct)
Definition: StdCompiler.h:161

References DownState, fDownByUser, iDownFrame, iMovedFrame, MovedState, StdCompiler::Separator(), and StdCompiler::Value().

Here is the call graph for this function:

◆ IsDown()

bool C4PlayerControl::CSync::ControlDownState::IsDown ( ) const
inline

Definition at line 360 of file C4PlayerControl.h.

360 { return DownState.iStrength>0; }

References DownState, and C4KeyEventData::iStrength.

Referenced by C4PlayerControl::Execute(), and C4PlayerControl::CSync::ResetControlDownState().

Here is the caller graph for this function:

◆ operator==()

bool C4PlayerControl::CSync::ControlDownState::operator== ( const ControlDownState cmp) const

Definition at line 890 of file C4PlayerControl.cpp.

891 {
892  return DownState == cmp.DownState && MovedState == cmp.MovedState && iDownFrame == cmp.iDownFrame && iMovedFrame == cmp.iMovedFrame && fDownByUser == cmp.fDownByUser;
893 }

References DownState, fDownByUser, iDownFrame, iMovedFrame, and MovedState.

Member Data Documentation

◆ DownState

◆ fDownByUser

bool C4PlayerControl::CSync::ControlDownState::fDownByUser {false}

◆ iDownFrame

int32_t C4PlayerControl::CSync::ControlDownState::iDownFrame {0}

◆ iMovedFrame

int32_t C4PlayerControl::CSync::ControlDownState::iMovedFrame

◆ MovedState

C4KeyEventData C4PlayerControl::CSync::ControlDownState::MovedState

The documentation for this struct was generated from the following files: