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 354 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 363 of file C4PlayerControl.h.

References C4PlayerControlDef::CompileFunc(), and C4PlayerControlDef::operator==().

Here is the call graph for this function:

Member Function Documentation

◆ CompileFunc()

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

Definition at line 877 of file C4PlayerControl.cpp.

References StdCompiler::Separator(), and StdCompiler::Value().

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
Here is the call graph for this function:

◆ IsDown()

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

Definition at line 361 of file C4PlayerControl.h.

References C4KeyEventData::iStrength.

Referenced by C4PlayerControl::Execute(), C4PlayerControl::ExecuteControlPacket(), 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.

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

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

Member Data Documentation

◆ DownState

C4KeyEventData C4PlayerControl::CSync::ControlDownState::DownState

◆ fDownByUser

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

Definition at line 358 of file C4PlayerControl.h.

Referenced by operator==(), and C4PlayerControl::CSync::SetControlDownState().

◆ iDownFrame

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

◆ iMovedFrame

int32_t C4PlayerControl::CSync::ControlDownState::iMovedFrame

Definition at line 357 of file C4PlayerControl.h.

Referenced by operator==(), and C4PlayerControl::CSync::SetControlMovedState().

◆ MovedState

C4KeyEventData C4PlayerControl::CSync::ControlDownState::MovedState

Definition at line 356 of file C4PlayerControl.h.

Referenced by operator==(), and C4PlayerControl::CSync::SetControlMovedState().


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