X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fsetup.c;h=7e1b65257f96120f2971be5b66d7f5c486743548;hb=b167d4be7ad2e751c5b90bffa75d8227840ff201;hp=06ff22ac3f8e7271cc1263e8c5ca3d1bb5734c1f;hpb=4bc011b7554580ae94eefab1067cefd30b20be48;p=super-star-trek.git diff --git a/src/setup.c b/src/setup.c index 06ff22a..7e1b652 100644 --- a/src/setup.c +++ b/src/setup.c @@ -175,8 +175,8 @@ static void setup_names(void) /* Sets up some arrays with localized names. * Must be done after iostart() for localization to work. */ { - char *tmp1[] = SYSTEM_NAMES; - char *tmp2[] = DEVICE_NAMES; + char *tmp1[ARRAY_SIZE(systnames)] = SYSTEM_NAMES; + char *tmp2[ARRAY_SIZE(device)] = DEVICE_NAMES; memcpy(systnames, tmp1, sizeof(systnames)); memcpy(device, tmp2, sizeof(device)); @@ -324,7 +324,8 @@ void setup(bool needprompt) game.state.galaxy[w.x][w.y].klingons > 8); // check for duplicate for (j = 1; j < i; j++) - if (game.state.kcmdr[j].x==w.x && game.state.kcmdr[j].y==w.y) break; + if (same(game.state.kcmdr[j], w)) + break; } while (j < i); game.state.galaxy[w.x][w.y].klingons++; game.state.kcmdr[i] = w; @@ -407,7 +408,7 @@ void setup(bool needprompt) waitfor(); newqad(false); if (game.nenhere-iqhere-game.ithere) game.shldup = true; - if (game.neutz) attack(0); // bad luck to start in a Romulan Neutral Zone + if (game.neutz) attack(false); // bad luck to start in a Romulan Neutral Zone } bool choose(bool needprompt) @@ -560,7 +561,6 @@ void newqad(bool shutup) coord w; struct quadrant *q; - game.iattak = 1; game.justin = true; game.base.x = game.base.y = 0; game.klhere = 0;