static bool GenerateAndrosynth_generateOrbital (SOLARSYS_STATE *solarSys, PLANET_DESC *world) { if (matchWorld (solarSys, world, 1, MATCH_PLANET)) { COUNT i; COUNT visits = 0; LoadStdLanderFont (&solarSys->SysInfo.PlanetInfo); solarSys->PlanetSideFrame[1] = CaptureDrawable (LoadGraphic (RUINS_MASK_PMAP_ANIM)); solarSys->SysInfo.PlanetInfo.DiscoveryString = CaptureStringTable ( LoadStringTable (ANDROSYNTH_RUINS_STRTAB)); // Androsynth ruins are a special case. The DiscoveryString contains // several lander reports which form a story. Each report is given // when the player collides with a new city ruin. Ruins previously // visited are marked in the upper 16 bits of ScanRetrieveMask, and // the lower bits are cleared to keep the ruin nodes on the map. for (i = 16; i < 32; ++i) { if (isNodeRetrieved (&solarSys->SysInfo.PlanetInfo, ENERGY_SCAN, i)) ++visits; } if (visits >= GetStringTableCount ( solarSys->SysInfo.PlanetInfo.DiscoveryString)) { // All the reports were already given DestroyStringTable (ReleaseStringTable ( solarSys->SysInfo.PlanetInfo.DiscoveryString)); solarSys->SysInfo.PlanetInfo.DiscoveryString = 0; } else { // Advance the report sequence to the first unread solarSys->SysInfo.PlanetInfo.DiscoveryString = SetRelStringTableIndex ( solarSys->SysInfo.PlanetInfo.DiscoveryString, visits); } } GenerateDefault_generateOrbital (solarSys, world); if (matchWorld (solarSys, world, 1, MATCH_PLANET)) { solarSys->SysInfo.PlanetInfo.AtmoDensity = EARTH_ATMOSPHERE * 144 / 100; solarSys->SysInfo.PlanetInfo.SurfaceTemperature = 28; solarSys->SysInfo.PlanetInfo.Weather = 1; solarSys->SysInfo.PlanetInfo.Tectonics = 1; } return true; }
void GetAllianceName (UNICODE *buf, RESPONSE_REF name_1) { COUNT i; STRING S; i = GET_GAME_STATE (NEW_ALLIANCE_NAME); S = SetAbsStringTableIndex (CommData.ConversationPhrases, (name_1 - 1) + i); // XXX: this should someday be changed so that the function takes // the buffer size as an argument strcpy (buf, (UNICODE *)GetStringAddress (S)); if (i == 3) { strcat (buf, GLOBAL_SIS (CommanderName)); strcat (buf, (UNICODE *)GetStringAddress (SetRelStringTableIndex (S, 1))); } }