|
18 | 18 | ****************************************************************************/ |
19 | 19 | #pragma once |
20 | 20 |
|
| 21 | +#include <Spore\Graphics\cCubeMapIndex.h> |
21 | 22 | #include <Spore\Simulator\SubSystem\cStrategy.h> |
22 | 23 | #include <Spore\Simulator\cCity.h> |
23 | | -#include <Spore\Terrain\ITerrain.h> |
| 24 | +#include <Spore\Terrain\cTerrainSphere.h> |
24 | 25 | #include <Spore\MathUtils.h> |
25 | 26 |
|
26 | 27 | /// Access the active Simulator planet manager. |
|
29 | 30 | namespace Simulator |
30 | 31 | { |
31 | 32 | using namespace Math; |
| 33 | + |
| 34 | + struct cPoliticalZone |
| 35 | + { |
| 36 | + uint32_t mPoliticalID; |
| 37 | + Vector3 mCenter; |
| 38 | + bool mCityZone; |
| 39 | + bool mVisible; |
| 40 | + cCity* mCity; |
| 41 | + }; |
32 | 42 |
|
33 | 43 | //sizeof 0x13208 |
34 | 44 | class cPlanetModel |
35 | 45 | : public App::IMessageListener |
36 | 46 | , public cStrategy |
37 | 47 | { |
38 | 48 | public: |
| 49 | + struct cLandTradeRoute |
| 50 | + { |
| 51 | + cCity* city1; |
| 52 | + cCity* city2; |
| 53 | + eastl::vector<Vector3> path; |
| 54 | + }; |
| 55 | + |
| 56 | + struct cBoundaryPointInfo |
| 57 | + { |
| 58 | + Vector3 mDisplacedPoint; |
| 59 | + int8_t mZoneIdxs[4]; |
| 60 | + bool mVisited[4]; |
| 61 | + }; |
| 62 | + |
| 63 | + struct cCubeCornerHash |
| 64 | + { |
| 65 | + size_t operator()(const Graphics::cCubeMapIndex& c) const |
| 66 | + { |
| 67 | + return c.mFace * 0xfd + c.mCol * 0x25 + c.mRow; |
| 68 | + } |
| 69 | + }; |
| 70 | + |
| 71 | + struct cCubeMapIndexEqual |
| 72 | + { |
| 73 | + bool operator()(const Graphics::cCubeMapIndex& a, const Graphics::cCubeMapIndex& b) const |
| 74 | + { |
| 75 | + return (a.mFace == b.mFace) && (a.mCol == b.mCol) && (a.mRow == b.mRow); |
| 76 | + } |
| 77 | + }; |
| 78 | + |
39 | 79 | //TODO PLACEHOLDER |
40 | 80 |
|
41 | 81 | // B7DC40 Get water level? |
@@ -63,19 +103,30 @@ namespace Simulator |
63 | 103 |
|
64 | 104 | public: |
65 | 105 | //TODO |
66 | | - /* 1Ch */ int field_1C; // not initialized |
67 | | - // one of these is cTerrainSphere*? |
68 | | - /* 20h */ ITerrainPtr mpTerrain; |
69 | | - /* 24h */ Terrain::ITerrain* mpTerrain2; |
70 | | - /* 28h */ float field_28; |
| 106 | + /* 20h */ cTerrainSpherePtr mpSphere; |
| 107 | + /* 24h */ ITerrainPtr mpTerrain; |
| 108 | + /* 28h */ float mWaterFraction; |
71 | 109 | /* 2Ch */ ResourceKey mPlanetKey; |
72 | | - /* 38h */ eastl::string16 field_38; |
| 110 | + /* 38h */ eastl::string16 mPlanetName; |
73 | 111 | /* 48h */ bool mbAddedMessageListeners; |
74 | | - /* 4Ch */ void* mpPlanetAStarInfo; |
75 | | - |
76 | | - /* 7Ch */ void* mpPlanetObstacles; |
| 112 | + /* 4Ch */ uint32_t* mContinentMap; |
| 113 | + /* 50h */ eastl::vector<uint32_t> mContinentAreas; |
| 114 | + /* 64h */ eastl::vector<bool> mContinentAboveWater; |
| 115 | + /* 78h */ bool mContinentMapDirty; |
| 116 | + /* 7Ch */ uint8_t* mObstacleBitMap; |
| 117 | + /* 80h */ eastl::vector<cPoliticalZone> mPoliticalZones; |
| 118 | + /* 94h */ eastl::vector<int8_t> mPoliticalZoneIdxMap; |
| 119 | + /* A8h */ void* mPlanetRibbonGfx; // cPlanetRibbonGfx |
| 120 | + /* ACh */ eastl::vector<eastl::pair<cCity*, cCity*>> mSeaTradeRoutes; |
| 121 | + /* C0h */ eastl::vector<eastl::pair<cCity*, cCity*>> mAirTradeRoutes; |
| 122 | + /* D4h */ eastl::vector<cLandTradeRoute> mLandTradeRoutes; |
| 123 | + /* E8h */ bool mSeaTradeRoutesDirty; |
| 124 | + /* E9h */ bool mAirTradeRoutesDirty; |
| 125 | + /* EAh */ bool mLandTradeRoutesDirty; |
| 126 | + /* ECh */ uint32_t mGameMode; |
| 127 | + // eastl::fixed_hash_map<Graphics::cCubeMapIndex, cBoundaryPointInfo, 2048, 512, true, cCubeCornerHash, cCubeMapIndexEqual, false> mPoliticalBoundaryPoints; |
| 128 | + // Graphics::cCubeMapIndex mPoliticalBoundaryStartCorner[15]; |
77 | 129 |
|
78 | | - /* A8h */ void* mpPlanetRibbonGfx; |
79 | 130 | //PLACEHODER more things |
80 | 131 | }; |
81 | 132 |
|
|
0 commit comments