diff --git a/sc2/src/uqm/gendef.c b/sc2/src/uqm/gendef.c index ccc0cde28..589b0700d 100644 --- a/sc2/src/uqm/gendef.c +++ b/sc2/src/uqm/gendef.c @@ -58,9 +58,10 @@ extern struct GeneratorBase cxxDefaultPlanetGen; const GenerateFunctions * -getGenerateFunctions (STAR_DESC *const star, void **sup ) +getGenerateFunctions (STAR_DESC *const star, void **sup, const char **supArg ) { *sup= star->supplement; + *supArg= 0; switch (star->Index) { @@ -95,6 +96,7 @@ getGenerateFunctions (STAR_DESC *const star, void **sup ) return &generateTrapFunctions; case BURVIXESE_DEFINED: return &generateBurvixeseFunctions; + abort(); case DRUUGE_DEFINED: return &generateDruugeFunctions; case BOMB_DEFINED: diff --git a/sc2/src/uqm/gendef.h b/sc2/src/uqm/gendef.h index 52e61ce9f..3d1d099c7 100644 --- a/sc2/src/uqm/gendef.h +++ b/sc2/src/uqm/gendef.h @@ -8,7 +8,7 @@ extern "C" { #endif -const GenerateFunctions *getGenerateFunctions (STAR_DESC *star, void **sup); +const GenerateFunctions *getGenerateFunctions (STAR_DESC *star, void **sup, const char **arg ); enum { diff --git a/sc2/src/uqm/planets/planets.h b/sc2/src/uqm/planets/planets.h index 462039fda..45ad9b926 100644 --- a/sc2/src/uqm/planets/planets.h +++ b/sc2/src/uqm/planets/planets.h @@ -143,6 +143,7 @@ struct star_desc BYTE Postfix; void *supplement; // The CXX builder's pointer gets put here. + void *supArg; // Extra info for the CXX builder goes here. }; struct node_info @@ -269,6 +270,7 @@ struct solarsys_state // Since everything else probably ignores it... we can probably // avoid setting it to `nullptr`, for now... void *genSupplement; + const char *supArgument; }; extern SOLARSYS_STATE *pSolarSysState; diff --git a/sc2/src/uqm/planets/solarsys.c b/sc2/src/uqm/planets/solarsys.c index 9118db4f0..c02accd2f 100644 --- a/sc2/src/uqm/planets/solarsys.c +++ b/sc2/src/uqm/planets/solarsys.c @@ -1735,7 +1735,8 @@ ExploreSolarSys (void) memset (pSolarSysState, 0, sizeof (*pSolarSysState)); - SolarSysState.genFuncs = getGenerateFunctions (CurStarDescPtr, &SolarSysState.genSupplement); + SolarSysState.genFuncs = getGenerateFunctions (CurStarDescPtr, &SolarSysState.genSupplement, + &SolarSysState.supArgument); InitSolarSys (); SetMenuSounds (MENU_SOUND_NONE, MENU_SOUND_NONE); diff --git a/sc2/src/uqm/uqmdebug.c b/sc2/src/uqm/uqmdebug.c index 4fc540dd6..7dc8fba84 100644 --- a/sc2/src/uqm/uqmdebug.c +++ b/sc2/src/uqm/uqmdebug.c @@ -645,7 +645,8 @@ starRecurse (STAR_DESC *star, void *arg) SolarSysState.SunDesc[0].location.x = 0; SolarSysState.SunDesc[0].location.y = 0; //SolarSysState.SunDesc[0].radius = MIN_ZOOM_RADIUS; - SolarSysState.genFuncs = getGenerateFunctions (star, &SolarSysState.genSupplement); + SolarSysState.genFuncs = getGenerateFunctions (star, &SolarSysState.genSupplement, + &SolarSysState.supArgument); pSolarSysState = &SolarSysState; (*SolarSysState.genFuncs->generatePlanets) (&SolarSysState);