Fission FSN
Loading...
Searching...
No Matches
gfCAutoTestLevelPlayComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCAutoTestLevelPlayComponent.h
4*
5* Purpose: Auto play levels - fuzzes the input path, never resolves
6* the scene directly. Completion is auto-load's job.
7*
8*********************************************************************/
9
10#ifndef gfCAutoTestLevelPlayComponenthdr
11#define gfCAutoTestLevelPlayComponenthdr
12
14
16#include "gfCAutoTestAim.h"
17#include "gfCAutoTestOverlay.h"
18#include "gfCAutoTestPointer.h"
19#include "gfCAutoTestSweep.h"
20
21
23{
24 friend class fsCComponentFactory;
25
26public:
27
28 static const fsCUniqueId mTypeId;
29
31
32 // Random input: how much it collects measures the input path, it is not pass/fail.
33 fsBool collectionByInputGet() const override { return true; }
34
35protected:
36
37 void listenersRegisterDo() override;
38 void listenersDeregisterDo() override;
39 fsBool messageProcessDo(const fsCUniqueId& pMessageType,
40 const fsIMessageDispatcher::sMessageParameters& pParam) override;
41
42 void testUpdateDo(fsS32 pDeltaMs) override;
43 void pausedSetDo(fsBool pPaused) override;
44
45 void clearUpDo() override;
46
48
49 // One step of play, once the Gui layer had nothing to click.
50 virtual void levelInteractDo();
51
52 static fsIComponent* create(fsCEntity* pParent);
53
55
56private:
57
58 void newLevel();
59 void rndSeedApply();
60
61 // Forces locks open - only when aiming is off, so a blind fuzz is not walled out.
62 void locksAndKeysClear();
63
64 // Nothing collected for a while: the sweep cannot reach behind an unopened
65 // door, nor tap out of the sub-scene it is confined to.
66 fsBool stallEscalateTry();
67 fsBool subSceneOpenTry();
68 void subSceneExitTap(fsCEntity* pExitEnt);
69
70 // Releases a drag in flight, and forgets any verdict it owed.
71 void dragRelease();
72
73 void sequencedTap();
74 void randomTap();
75
76 // Interaction steps - a drag in flight is one step, however many frames it takes.
77 fsS32 mStepCount;
78 fsS32 mRunningTime;
79 const fsS32 mMaxRunningTime;
80
81 const fsS32 mDragEveryNth;
82 const fsS32 mRandomTapEveryNth;
83 // 0 turns aiming off, leaving a purely blind fuzz.
84 const fsS32 mAimEveryNth;
85 // Jigsaw pieces aim on their own cadence; 0 leaves them to blind drags.
86 const fsS32 mJigsawAimEveryNth;
87
88 fsS32 mSubSceneNavCursor;
89
90 // Time since anything was last collected, and how long before escalating.
91 fsS32 mStallMs;
92 const fsS32 mStallEscalateMs;
93
94 gfCAutoTestOverlay mOverlay;
95 gfCAutoTestSweep mSweep;
96 gfCAutoTestPointer mPointer;
97 gfCAutoTestAim mAim;
98};
99
100#endif
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
Definition fsIComponent.h:26
Definition gfCAutoTestAim.h:28
void listenersRegisterDo() override
Definition gfCAutoTestLevelPlayComponent.cpp:276
fsBool messageProcessDo(const fsCUniqueId &pMessageType, const fsIMessageDispatcher::sMessageParameters &pParam) override
Definition gfCAutoTestLevelPlayComponent.cpp:289
friend class fsCComponentFactory
Definition gfCAutoTestLevelPlayComponent.h:24
fsBool collectionByInputGet() const override
Definition gfCAutoTestLevelPlayComponent.h:33
void listenersDeregisterDo() override
Definition gfCAutoTestLevelPlayComponent.cpp:283
static fsIComponent * create(fsCEntity *pParent)
Definition gfCAutoTestLevelPlayComponent.cpp:398
void testUpdateDo(fsS32 pDeltaMs) override
Definition gfCAutoTestLevelPlayComponent.cpp:208
virtual ~gfCAutoTestLevelPlayComponent()
Definition gfCAutoTestLevelPlayComponent.cpp:434
static const fsCUniqueId mTypeId
Definition gfCAutoTestLevelPlayComponent.h:28
virtual void levelInteractDo()
Definition gfCAutoTestLevelPlayComponent.cpp:125
void pausedSetDo(fsBool pPaused) override
Definition gfCAutoTestLevelPlayComponent.cpp:259
gfCAutoTestLevelPlayComponent(fsCEntity *pParent)
Definition gfCAutoTestLevelPlayComponent.cpp:410
void clearUpDo() override
Definition gfCAutoTestLevelPlayComponent.cpp:403
fsBool doUserInputReplicate() override
Definition gfCAutoTestLevelPlayComponent.cpp:40
Definition gfCAutoTestOverlay.h:22
Definition gfCAutoTestPointer.h:26
Definition gfCAutoTestSweep.h:24
gfIAutoTestLevelUserInputComponent(fsCEntity *pParent)
Definition gfIAutoTestUserInputComponent.cpp:440
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
Definition fsIMessageDispatcher.h:32