Sly is ready to be C++'ed.

But it's still not C++'ed yet.  I put it over in ilwrath space,
just to easily get to it (and it has enough planets to make the
right one a gas giant).
This commit is contained in:
2024-04-25 01:49:16 -04:00
parent 7c02232e46
commit 822e1c3004
3 changed files with 62 additions and 1 deletions
+1
View File
@@ -538,6 +538,7 @@ STAR_DESC starmap_array[] =
{{1937, 9979}, MAKE_STAR (DWARF_STAR, RED_BODY, -1), 0, 1, 103}, {{1937, 9979}, MAKE_STAR (DWARF_STAR, RED_BODY, -1), 0, 1, 103},
#endif #endif
{{1004, 1083}, MAKE_STAR (DWARF_STAR, GREEN_BODY, -1), SLYLANDRO_DEFINED, 2, 27},
{{1776, 1395}, MAKE_STAR (DWARF_STAR, YELLOW_BODY, -1), START_COLONY_DEFINED, 0, 98}, {{1776, 1395}, MAKE_STAR (DWARF_STAR, YELLOW_BODY, -1), START_COLONY_DEFINED, 0, 98},
{{1777, 1405}, MAKE_STAR (DWARF_STAR, YELLOW_BODY, -1), 0, 0, 99}, {{1777, 1405}, MAKE_STAR (DWARF_STAR, YELLOW_BODY, -1), 0, 0, 99},
+1 -1
View File
@@ -4,4 +4,4 @@ uqm_CFILES="gendefault.c genand.c genburv.c genchmmr.c gencol.c gendru.c
genthrad.c gentrap.c genutw.c genvault.c genvux.c genwreck.c genthrad.c gentrap.c genutw.c genvault.c genvux.c genwreck.c
genyeh.c genzfpscout.c genzoq.c" genyeh.c genzfpscout.c genzoq.c"
uqm_HFILES="genall.h gendefault.h" uqm_HFILES="genall.h gendefault.h"
uqm_CXXFILES="cxx-generator.cpp" uqm_CXXFILES="cxx-generator.cpp gensly-modern.cpp"
@@ -0,0 +1,60 @@
//Copyright Paul Reiche, Fred Ford. 1992-2002
// Adapted by ADAM David Alan Martin 2024
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "genall.h"
#include "../planets.h"
#include "../../comm.h"
namespace
{
using namespace Planets::exports;
class GenerateSlylandro
: public virtual DefaultGenerator
{
bool
generatePlanets( SolarSystem *const solarSys ) override
{
DefaultGenerator::generatePlanets( solarSys );
solarSys->PlanetDesc[ 3 ].data_index = RED_GAS_GIANT;
solarSys->PlanetDesc[ 3 ].NumPlanets = 1;
return true;
}
bool
generateOrbital( SolarSystem *const solarSys, PLANET_DESC *const world )
{
if( matchWorld( solarSys, world, 3, MATCH_PLANET ) )
{
InitCommunication( SLYLANDRO_HOME_CONVERSATION );
return true;
}
return DefaultGenerator::generateOrbital( solarSys, world );
}
};
}
extern "C" void *getSlyDef()
{
return static_cast< Generator * >( new GenerateSlylandro{} );
}