X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fsetup.c;h=44e378b28dcaae0a25da6a1dade0c4b13734baa9;hb=4207ce95e80fe7e2d5114079fa4255e0ad506618;hp=7e1b65257f96120f2971be5b66d7f5c486743548;hpb=b167d4be7ad2e751c5b90bffa75d8227840ff201;p=super-star-trek.git diff --git a/src/setup.c b/src/setup.c index 7e1b652..44e378b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -212,7 +212,7 @@ void setup(bool needprompt) for (i=0; i < NDEVICES; i++) game.damage[i] = 0.0; // Set up assorted game parameters - game.battle.x = game.battle.y = 0; + invalidate(game.battle); game.state.date = game.indate = 100.0*(int)(31.0*Rand()+20.0); game.nkinks = game.nhelp = game.casual = game.abandoned = 0; game.iscate = game.resting = game.imine = game.icrystl = game.icraft = false; @@ -337,12 +337,12 @@ void setup(bool needprompt) game.state.plnets[i].w = w; if (i < NINHAB) { game.state.plnets[i].pclass = M; // All inhabited planets are class M - game.state.plnets[i].crystals = 0; + game.state.plnets[i].crystals = absent; game.state.plnets[i].known = known; game.state.plnets[i].inhabited = i; } else { game.state.plnets[i].pclass = Rand()*3.0; // Planet class M N or O - game.state.plnets[i].crystals = 1.5*Rand(); // 1 in 3 chance of crystals + 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; } @@ -366,7 +366,7 @@ void setup(bool needprompt) thing = randplace(GALSIZE); } else - thing.x = thing.y = 0; + invalidate(thing); skip(2); game.state.snap = false; @@ -562,10 +562,10 @@ void newqad(bool shutup) struct quadrant *q; game.justin = true; - game.base.x = game.base.y = 0; + invalidate(game.base); game.klhere = 0; game.comhere = false; - game.plnet.x = game.plnet.y = 0; + invalidate(game.plnet); game.ishere = false; game.irhere = 0; game.iplnet = 0;