Fission FSN
Loading...
Searching...
No Matches
gfIHogLevel.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 7/4/2014 13:32
4*
5* File: gfIHogLevel.h
6*
7* Author: Mick Waites
8*
9* Purpose: Create and control game entities.
10*
11*********************************************************************/
12
13#ifndef gfIHogLevelhdr
14#define gfIHogLevelhdr
15
16#include <vector>
17
18#include <fsCore/fsStr.h>
19
21
23{
24 friend class fsCComponentFactory;
26 friend class gfCHogCoreMain;
27 friend class gfCSimpleCoreMain;
28
29public:
30
31 fsCEntity* const parentGet() const;
32 fsStr levelNameGet() const;
33
34 void skip();
36
37 // As skip(), but collects the optional bonuses and isn't flagged as a
38 // skip, so achievements and star ratings see a played-out level.
39 void complete();
40
44 fsStr nextLevelGet() const;
45 const fsStr& levelNameFilenameGet() const { return mLevelName; }
46
47 void abort();
48
49 void levelStateSave();
50 void levelStateRestore(fsStr& pLoadStr);
51
52 virtual ~gfIHogLevel();
53
54 virtual fsStr sceneFolderGet() const;
55 virtual fsStr saveStateKeyGet();
56
57protected:
58
59 void levelCreate(const fsStr& pLevelName);
60
61 void bestRunningTimeSet();
62
63 virtual void skipDo(fsBool pCountAsSkip) { (void)pCountAsSkip; }
64
66 virtual void guiInitDo();
67
68 virtual void levelStateSaveDo();
69
70 fsBool mapLevelGet() const;
71
72 void listenersDeregisterDo() override;
73 void listenersRegisterDo() override;
74 fsBool messageProcessDo(const fsCUniqueId& pMessageType,
75 const fsIMessageDispatcher::sMessageParameters& pParam) override;
76
77 void resetDo() override;
78 void deserialiseDo() override;
79 void serialiseDo() override;
80 void updateDo(fsS32 pDeltaMs) override;
81
82 std::vector<fsCEntity*> minigameEntitiesGet();
83
84 void cheatMenuToggle();
85
86 virtual void abortDo() {}
87 virtual void doLevelCreate() {}
88 virtual void doLevelStateRestore() {}
89 virtual void doPostEntityCreation() {}
90
91 gfIHogLevel(fsCEntity* pParent);
92
93private:
94
95 void jigsawEntitiesBorderSet();
96 void cuttersCut(fsBool pFirstTime);
97 void cuttersStencilCreate();
98
99 void miniGameHelpSet();
100 void guiInit();
101 void guiLoad();
102
103 void entitiesCreateFromCoordsFile();
104
105
106 void tutorialGuiLinkToGui();
107
108 fsStr mLevelName;
109 fsS32 mLevelRunningTime; //total level running time - we can revisit a level
110 fsS32 mRunningTime; //running time for this visit to this level
111 fsS32 mBestTime; //best time to complete this level
112
113 fsBool mSkippedMiniGame;
114 fsBool mWaitingForInterstitialTransition;
115
116 enum eRUN_STATE
117 {
118 eWAITING,
119 eRUNNING,
120 eDONE
121 };
122
123 eRUN_STATE mRunning;
124};
125
126#endif
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
fsIMessageListenerComponent(fsCEntity *pParent)
Definition fsIMessageListenerComponent.cpp:9
Definition fsStr.h:23
void serialiseDo() override
Definition gfIHogLevel.cpp:148
fsS32 bestLevelRunningTimeGet() const
Definition gfIHogLevel.cpp:155
void resetDo() override
Definition gfIHogLevel.cpp:135
fsCEntity *const parentGet() const
Definition gfIHogLevel.cpp:171
void bestRunningTimeSet()
Definition gfIHogLevel.cpp:126
virtual void levelStateSaveDo()
Definition gfIHogLevel.cpp:359
fsS32 levelRunningTimeGet() const
Definition gfIHogLevel.cpp:160
void deserialiseDo() override
Definition gfIHogLevel.cpp:141
friend class gfCSimpleCoreMain
Definition gfIHogLevel.h:27
friend class fsCComponentFactory
Definition gfIHogLevel.h:24
void skippedEntitiesForceCollect()
Definition gfIHogLevel.cpp:68
void updateDo(fsS32 pDeltaMs) override
Definition gfIHogLevel.cpp:190
void listenersRegisterDo() override
Definition gfIHogLevel.cpp:398
friend class gfCHogCoreMain
Definition gfIHogLevel.h:26
void abort()
Definition gfIHogLevel.cpp:242
void skip()
Definition gfIHogLevel.cpp:55
void levelStateRestore(fsStr &pLoadStr)
Definition gfIHogLevel.cpp:377
gfIHogLevel(fsCEntity *pParent)
Definition gfIHogLevel.cpp:535
fsStr nextLevelGet() const
Definition gfIHogLevel.cpp:223
fsBool mapLevelGet() const
Definition gfIHogLevel.cpp:410
friend class gfCDebugJustCollectablesView
Definition gfIHogLevel.h:25
virtual void guiInitDo()
Definition gfIHogLevel.cpp:121
const fsStr & levelNameFilenameGet() const
Definition gfIHogLevel.h:45
virtual void doPostEntityCreation()
Definition gfIHogLevel.h:89
void bonusEntitiesForceCollect()
Definition gfIHogLevel.cpp:74
void levelStateSave()
Definition gfIHogLevel.cpp:366
std::vector< fsCEntity * > minigameEntitiesGet()
Definition gfIHogLevel.cpp:176
virtual fsStr saveStateKeyGet()
Definition gfIHogLevel.cpp:354
void cheatMenuToggle()
Definition gfIHogLevel.cpp:228
virtual ~gfIHogLevel()
Definition gfIHogLevel.cpp:547
fsBool messageProcessDo(const fsCUniqueId &pMessageType, const fsIMessageDispatcher::sMessageParameters &pParam) override
Definition gfIHogLevel.cpp:417
virtual void skipDo(fsBool pCountAsSkip)
Definition gfIHogLevel.h:63
virtual void abortDo()
Definition gfIHogLevel.h:86
void complete()
Definition gfIHogLevel.cpp:61
virtual fsStr sceneFolderGet() const
Definition gfIHogLevel.cpp:329
fsS32 totalGameRunningTimeGet() const
Definition gfIHogLevel.cpp:165
void listenersDeregisterDo() override
Definition gfIHogLevel.cpp:386
fsStr levelNameGet() const
Definition gfIHogLevel.cpp:102
void levelCreate(const fsStr &pLevelName)
Definition gfIHogLevel.cpp:449
virtual void doLevelStateRestore()
Definition gfIHogLevel.h:88
virtual void doLevelCreate()
Definition gfIHogLevel.h:87
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
Definition fsIMessageDispatcher.h:32