#include <AGameStateController.h>
Definition at line 10 of file AGameStateController.h.
◆ BaseClass
◆ ThisClass
◆ AGameStateController()
AGameStateController::AGameStateController |
( |
| ) |
|
Definition at line 18 of file AGameStateController.cpp.
19 : m_UnkVector( m_VectorData,
TARRAYSIZE( m_VectorData ), 0 )
20{
21
22 m_eFlags = 0;
23 m_fOverlayGoal = 0.0f;
24}
#define TARRAYSIZE(ARRAY)
◆ ~AGameStateController()
AGameStateController::~AGameStateController |
( |
| ) |
|
◆ CreateTObject()
Toshi::TObject * AGameStateController::CreateTObject |
( |
| ) |
|
|
static |
◆ CreateTObjectInPlace()
Toshi::TObject * AGameStateController::CreateTObjectInPlace |
( |
void * | a_pPtr | ) |
|
|
static |
◆ DeinitialiseClass()
void AGameStateController::DeinitialiseClass |
( |
| ) |
|
|
static |
◆ GetClass()
Toshi::TClass * AGameStateController::GetClass |
( |
| ) |
|
|
overridevirtual |
◆ GetClassStatic()
static __forceinline Toshi::TClass * AGameStateController::GetClassStatic |
( |
| ) |
|
|
inlinestatic |
◆ GetCurrentState()
AGameState * AGameStateController::GetCurrentState |
( |
| ) |
|
|
inline |
◆ GetOverlayParams()
◆ InitialiseClass()
void AGameStateController::InitialiseClass |
( |
| ) |
|
|
static |
◆ IsCurrentState()
TBOOL AGameStateController::IsCurrentState |
( |
Toshi::TClass * | a_pClass | ) |
|
|
inline |
◆ OnCreate()
TBOOL AGameStateController::OnCreate |
( |
| ) |
|
|
overridevirtual |
Definition at line 31 of file AGameStateController.cpp.
32{
33 InsertGameState( new AGameState );
34
36 AGUI2::GetSingleton()->GetDimensions( fWidth, fHeight );
37
38 m_oOverlay.SetDimensions( fWidth, fHeight );
40 m_oOverlay.SetInFront();
41 m_oOverlay.Hide();
42
44}
@ AGUI2ATTACHMENT_BOTTOMCENTER
◆ OnDestroy()
void AGameStateController::OnDestroy |
( |
| ) |
|
|
overridevirtual |
Definition at line 80 of file AGameStateController.cpp.
81{
82 TASSERT( m_oStates.Size() == 1 );
83
84 auto pGameState = *m_oStates.Back();
85 m_oStates.PopBack();
86
87 pGameState->Destroy();
88}
◆ OnUpdate()
TBOOL AGameStateController::OnUpdate |
( |
TFLOAT | a_fDeltaTime | ) |
|
|
overridevirtual |
Definition at line 46 of file AGameStateController.cpp.
47{
48 auto eFlags = m_eFlags;
49
50 if ( eFlags & 0x10 )
51 {
52 m_eFlags = eFlags & 0xffef;
53
55 {
56 TTODO(
"FUN_00424000(false)" );
58 }
59 else
60 {
61 TTODO(
"FUN_00423de0((TCHAR *)0x0,true,(TPooledString8 *)0x0)" );
63 }
64 }
65
66 if ( m_oStates.Size() > 1 )
67 {
68 TTODO(
"This section" );
69
71 {
72 ( *m_oStates.Back() )->OnUpdate( a_fDeltaTime );
73 }
74 }
75
78}
#define HASANYFLAG(STATE, FLAG)
void UpdateScreenOverlay()
◆ PopCurrentGameState()
void AGameStateController::PopCurrentGameState |
( |
| ) |
|
Definition at line 148 of file AGameStateController.cpp.
149{
150 TASSERT( m_oStates.Size() > 1 );
151
152 if ( m_oStates.Size() > 1 )
153 {
155 }
156}
void PopState(AGameState *a_pGameState)
◆ PopState()
void AGameStateController::PopState |
( |
AGameState * | a_pGameState | ) |
|
Definition at line 125 of file AGameStateController.cpp.
126{
127 auto pCurrentGameState = *m_oStates.Back();
128
129 TASSERT( a_pGameState == pCurrentGameState );
130 m_oStates.PopBack();
131
132 pCurrentGameState->Destroy();
133
134 if ( m_oStates.Size() == 1 && ARootTask::GetSingleton()->IsGameSystemCreated() )
135 {
137 return;
138 }
139
140 if ( m_oStates.Size() > 1 )
141 {
142 pCurrentGameState = *m_oStates.Back();
143 pCurrentGameState->OnResume( a_pGameState );
144 pCurrentGameState->Activate();
145 }
146}
◆ ProcessInput()
TBOOL AGameStateController::ProcessInput |
( |
const Toshi::TInputInterface::InputEvent * | a_pEvent | ) |
|
Definition at line 239 of file AGameStateController.cpp.
240{
241 if ( m_eFlags & 1 )
242 {
244 }
245
246 if ( m_oStates.Size() <= 1 )
247 {
249 }
250
251 if ( ACheatActivator::IsSingletonCreated() )
252 {
254 }
255
256 auto pGameState = *m_oStates.Back();
257
258 if ( pGameState->SendInputCommands( a_pEvent ) )
259 {
261 }
262 else
263 {
264 return pGameState->ProcessInput( a_pEvent );
265 }
266}
#define TIMPLEMENT_D(DESC)
◆ PushState()
void AGameStateController::PushState |
( |
AGameState * | a_pGameState | ) |
|
Definition at line 114 of file AGameStateController.cpp.
115{
116 if ( m_oStates.Size() > 1 )
117 {
118 ( *m_oStates.Back() )->Deactivate();
119 ( *m_oStates.Back() )->Suspend();
120 }
121
122 InsertGameState( a_pGameState );
123}
◆ ReplaceState()
void AGameStateController::ReplaceState |
( |
AGameState * | a_pGameState | ) |
|
Definition at line 101 of file AGameStateController.cpp.
102{
103 if ( m_oStates.Size() > 1 )
104 {
105 auto pCurrentGameState = *m_oStates.Back();
106 m_oStates.PopBack();
107
108 pCurrentGameState->Destroy();
109 }
110
111 InsertGameState( a_pGameState );
112}
◆ ResetStack()
void AGameStateController::ResetStack |
( |
| ) |
|
Definition at line 183 of file AGameStateController.cpp.
184{
186 m_eFlags = 0;
187
189
190 while ( 1 < m_oStates.Size() )
191 {
192 auto pGameState = *m_oStates.Back();
193 m_oStates.PopBack();
194
195 pGameState->Destroy( bIsFirst );
197 }
198}
◆ SetFlags()
void AGameStateController::SetFlags |
( |
TUINT16 | a_eFlags | ) |
|
Definition at line 200 of file AGameStateController.cpp.
201{
202 m_eFlags |= a_eFlags;
203 m_fSoundVolume = 1.0f;
204
205 if ( !( m_eFlags & 256 ) )
206 {
207 m_fOverlayGoal = 0.0f;
208 m_fOverlayAlpha = ( a_eFlags == 4 ) ? 1.0f : 0.0f;
209 }
210 else
211 {
212 m_fOverlayAlpha = m_fOverlayGoal;
213 m_eFlags &= 0xfeff;
214 }
215
218 oData.uiColorR = 0;
219 oData.uiColorG = 0;
220 oData.uiColorB = 0;
222
225}
void SetOverlayParams(AGameState::OVERLAY a_eOverlay, const OverlayData &a_rcParams)
◆ SetOverlayParams()
◆ UpdateScreenOverlay()
void AGameStateController::UpdateScreenOverlay |
( |
| ) |
|
Definition at line 158 of file AGameStateController.cpp.
159{
161
163 {
165 m_oOverlay.SetColour(
TCOLOR_ALPHA( pOverlay->uiColorR, pOverlay->uiColorG, pOverlay->uiColorB, pOverlay->uiColorA ) );
166
168 }
169
170 m_oOverlay.RemoveSelf();
171
172 if ( bAddOverlay )
173 {
175 m_oOverlay.Show();
176 }
177 else
178 {
179 m_oOverlay.Hide();
180 }
181}
#define TCOLOR_ALPHA(R, G, B, A)
OverlayData * GetOverlayParams(AGameState::OVERLAY a_eOverlay)
static AGUI2Element * GetRootElement()
void AddChildTail(AGUI2Element &a_rElement)
◆ ms_oClass
◆ PARENTCLASS
Toshi::TClass* AGameStateController::PARENTCLASS = & Toshi::TTask::ms_oClass |
|
staticconstexpr |
The documentation for this class was generated from the following files: