@@ -153,6 +153,8 @@ namespace Simulator
153153 kPlanetFlagHasRings = 0x2 , // 1 << 1
154154 kPlanetFlagIsMoon = 0x4 , // 1 << 2
155155
156+ kPlanetFlagIsDestroyed = 0x100 , // 1 << 8
157+
156158 kPlanetFlagRedOrbit = 0x1000 , // 1 << 12
157159 kPlanetFlagBlueOrbit = 0x2000 , // 1 << 13
158160 };
@@ -175,6 +177,13 @@ namespace Simulator
175177 PlanetID GetID () const ;
176178 TechLevel GetTechLevel () const ;
177179
180+ inline bool IsMoon () const {
181+ return (mFlags & kPlanetFlagIsMoon ) != 0 ;
182+ }
183+ inline bool IsDestroyed () const {
184+ return (mFlags & kPlanetFlagIsDestroyed ) != 0 ;
185+ }
186+
178187 void SetGeneratedTerrainKey (const ResourceKey& key);
179188 ResourceKey& GetGeneratedTerrainKey ();
180189
@@ -183,6 +192,8 @@ namespace Simulator
183192 // / @returns
184193 static ResourceKey GenerateTerrainKey ();
185194
195+ ResourceKey GetTerrainScriptSource () const ;
196+
186197 // / Returns the distance of the perihelion, which is the planet's closest point to the parent object
187198 // / in its orbit (the parent object is either a sun, or another planet if this planet is a moon).
188199 // / @param pRecord The planet
@@ -267,6 +278,12 @@ namespace Simulator
267278 };
268279 ASSERT_SIZE (cPlanetRecord, 0x1B0 );
269280
281+ // / Returns the key to the image file that represents this planet main species,
282+ // / for planets in tribe, civilization, or space tech level.
283+ // / @param planetRecord
284+ ResourceKey GetMainSpeciesImageKey (cPlanetRecord* planetRecord);
285+
286+
270287 // ///////////////////////////////
271288 // // INTERNAL IMPLEMENTATION ////
272289 // ///////////////////////////////
@@ -278,6 +295,7 @@ namespace Simulator
278295 DeclareAddress (FillPlanetDataForTechLevel); // 0xB96820 0xB97090
279296 DeclareAddress (CalculateSpiceProduction); // 0xC6F920 0xC70760
280297 DeclareAddress (CalculateDeltaSpiceProduction); // 0xC71200 0xC720A0
298+ DeclareAddress (GetTerrainScriptSource); // 0xB8D690 0xB8DEB0
281299 }
282300
283301 inline ResourceKey cPlanetRecord::GenerateTerrainKey ()
@@ -295,4 +313,8 @@ namespace Simulator
295313 {
296314 return mGeneratedTerrainKey ;
297315 }
316+ }
317+
318+ namespace Addresses ( Simulator) {
319+ DeclareAddress (GetMainSpeciesImageKey); // 0x1066AF0 0x1065F10
298320}
0 commit comments