Fission FSN
Loading...
Searching...
No Matches
gfCHogLevelLoaderComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* Created: 7/4/2014 17:19
4*
5* File: gfCHogLevelLoaderComponent.h
6*
7* Author: Mick Waites
8*
9* Purpose: Helper component used to create HOG entities upon
10* scene loading.
11*
12*********************************************************************/
13
14#ifndef gfCHogLevelLoaderComponenthdr
15#define gfCHogLevelLoaderComponenthdr
16
17#include <vector>
18
20
22
24
25
27{
28 friend class fsCComponentFactory;
29
30public:
31
32 void levelLoad(const fsStr& pLevelName, const fsStr& pLevelFolder);
33
34 static const fsCUniqueId mTypeId;
36
37protected:
38
39 void collectablEntitiesInitialiseDo(std::vector<fsCEntity*>& pNewEnts) override;
40
41 static fsIComponent* create(fsCEntity* pParent);
43
44private:
45
46#if defined fsCollision
47 void collisionTestSetup(std::vector< fsCEntity* >& pNewEnts);
48#endif
49
50 static void cutterEntitiesInitialise(std::vector<fsCEntity*>& pNewEnts, const fsStr& pLevelFolder,
51 fsCEntity* pParent);
52
53 static fsStr parseJsonToCsv(const fsStr& pJsonString);
54 static fsStr preprocessJson(const fsStr& pJsonString);
55
56 void parallaxLayerInit(fsCEntity* pParallaxEnt) const;
57 void entitesAddToParallax(std::vector<fsCEntity*>& pNewEnts) const;
58 void minigameEntitiesAddToLogic(std::vector<fsCEntity*>& pNewEnts) const;
59
60 std::vector<fsCEntity*> entitiesCreateFromCoordsFile(const fsStr& pSplitFolderPath);
61
62 void subSceneNavigateMarkersBringToFront(std::vector<fsCEntity*>& pNewEnts);
63
64 fsStr imageFileNameGet(fsCEntity* const pEntity, const fsStr& pSceneFolderPath) override;
65
66 // Resolve a JSON scene layer's real image extension (which the export omits) by
67 // probing .webp / the guessed format / the other raster format against the atlas and disk.
68 static fsStr sceneImageNameResolve(const fsStr& pSceneFolderPath, const fsStr& pGuessedName);
69
70 fsBool mJsonLevelFile;
71};
72
73
74#endif
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
fsIComponent(fsCEntity *pParent)
Definition fsIComponent.cpp:86
Definition fsISpriteComponent.h:23
Definition fsStr.h:23
friend class fsCComponentFactory
Definition gfCHogLevelLoaderComponent.h:28
void levelLoad(const fsStr &pLevelName, const fsStr &pLevelFolder)
Definition gfCHogLevelLoaderComponent.cpp:69
static fsIComponent * create(fsCEntity *pParent)
Definition gfCHogLevelLoaderComponent.cpp:506
static const fsCUniqueId mTypeId
Definition gfCHogLevelLoaderComponent.h:34
void collectablEntitiesInitialiseDo(std::vector< fsCEntity * > &pNewEnts) override
Definition gfCHogLevelLoaderComponent.cpp:40
gfCHogLevelLoaderComponent(fsCEntity *pParent)
Definition gfCHogLevelLoaderComponent.cpp:511
virtual ~gfCHogLevelLoaderComponent()
Definition gfCHogLevelLoaderComponent.cpp:517
gfILevelLoaderComponent(fsCEntity *pParent)
Definition gfILevelLoaderComponent.cpp:240
bool fsBool
Definition fsBaseTypes.h:26