X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fsetup.c;h=852212b0739732cc5d6a0ca0a017d7d52bb18123;hp=8963b6ce383866edb28c38655fcabe4aa35bb2e4;hb=74121a21cca010c891ef19a178f9b9acf4d473eb;hpb=9ae916e9144e84ef1de4a86ea73a45a2bc4cc1be diff --git a/src/setup.c b/src/setup.c index 8963b6c..852212b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -192,7 +192,8 @@ void setup(bool needprompt) setup_names(); // Decide how many of everything - if (choose(needprompt)) return; // frozen game + if (choose(needprompt)) + return; // frozen game // Prepare the Enterprise game.alldone = game.gamewon = false; game.ship = IHE; @@ -335,17 +336,17 @@ void setup(bool needprompt) for (i = 0; i < game.inplan; i++) { do w = randplace(GALSIZE); while (game.state.galaxy[w.x][w.y].planet != NOPLANET); - game.state.plnets[i].w = w; + game.state.planets[i].w = w; if (i < NINHAB) { - game.state.plnets[i].pclass = M; // All inhabited planets are class M - game.state.plnets[i].crystals = absent; - game.state.plnets[i].known = known; - game.state.plnets[i].inhabited = i; + game.state.planets[i].pclass = M; // All inhabited planets are class M + game.state.planets[i].crystals = absent; + game.state.planets[i].known = known; + game.state.planets[i].inhabited = i; } else { - game.state.plnets[i].pclass = Rand()*3.0; // Planet class M N or O - game.state.plnets[i].crystals = Rand()*1.5; // 1 in 3 chance of crystals - game.state.plnets[i].known = unknown; - game.state.plnets[i].inhabited = UNINHABITED; + game.state.planets[i].pclass = Rand()*3.0; // Planet class M N or O + game.state.planets[i].crystals = Rand()*1.5; // 1 in 3 chance of crystals + game.state.planets[i].known = unknown; + game.state.planets[i].inhabited = UNINHABITED; } if ((game.options & OPTION_WORLDS) || i >= NINHAB) game.state.galaxy[w.x][w.y].planet = i; @@ -427,7 +428,8 @@ bool choose(bool needprompt) if (needprompt) /* Can start with command line options */ proutn(_("Would you like a regular, tournament, or saved game? ")); scan(); - if (strlen(citem)==0) continue; // Try again + if (strlen(citem)==0) // Try again + continue; if (isit("tournament")) { while (scan() == IHEOL) { proutn(_("Type in tournament number-")); @@ -657,7 +659,7 @@ void newqad(bool shutup) // If quadrant needs a planet, put it in if (q->planet != NOPLANET) { game.iplnet = q->planet; - if (game.state.plnets[q->planet].inhabited == UNINHABITED) + if (game.state.planets[q->planet].inhabited == UNINHABITED) game.plnet = dropin(IHP); else game.plnet = dropin(IHW); @@ -669,7 +671,7 @@ void newqad(bool shutup) dropin(IHSTAR); // Check for RNZ - if (game.irhere > 0 && game.klhere == 0 && (q->planet == NOPLANET || game.state.plnets[q->planet].inhabited == UNINHABITED)) { + if (game.irhere > 0 && game.klhere == 0 && (q->planet == NOPLANET || game.state.planets[q->planet].inhabited == UNINHABITED)) { game.neutz = true; if (!damaged(DRADIO)) { skip(1);