X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=main.c;h=92f4206f89981493c89904188fe26b7b90da898f;hb=0bab67e106175e5ccd0a1428c5c37856087ba574;hp=a8fbfc35c1239b6e4f4e563957189ce47e46e8ec;hpb=d612b0e6ca7b7cf81daaac830d7a7ed9ddc16874;p=open-adventure.git diff --git a/main.c b/main.c index a8fbfc3..92f4206 100644 --- a/main.c +++ b/main.c @@ -303,11 +303,11 @@ static bool spotted_by_pirate(int i) int snarfed = 0; bool movechest = false, robplayer = false; for (int treasure = 1; treasure <= NOBJECTS; treasure++) { - if (!object_descriptions[treasure].is_treasure) + if (!objects[treasure].is_treasure) continue; /* Pirate won't take pyramid from plover room or dark * room (too easy!). */ - if (treasure == PYRAMID && (game.loc == object_descriptions[PYRAMID].plac || game.loc == object_descriptions[EMERALD].plac)) { + if (treasure == PYRAMID && (game.loc == objects[PYRAMID].plac || game.loc == objects[EMERALD].plac)) { continue; } if (TOTING(treasure) || HERE(treasure)) @@ -339,9 +339,9 @@ static bool spotted_by_pirate(int i) if (robplayer) { rspeak(PIRATE_POUNCES); for (int treasure = 1; treasure <= NOBJECTS; treasure++) { - if (!object_descriptions[treasure].is_treasure) + if (!objects[treasure].is_treasure) continue; - if (!(treasure == PYRAMID && (game.loc == object_descriptions[PYRAMID].plac || game.loc == object_descriptions[EMERALD].plac))) { + if (!(treasure == PYRAMID && (game.loc == objects[PYRAMID].plac || game.loc == objects[EMERALD].plac))) { if (AT(treasure) && game.fixed[treasure] == 0) carry(treasure, game.loc); if (TOTING(treasure)) @@ -417,7 +417,7 @@ static bool dwarfmove(void) if (game.dloc[i] == 0) continue; /* Fill tk array with all the places this dwarf might go. */ - int j = 1; + unsigned int j = 1; kk = TKEY[game.dloc[i]]; if (kk != 0) do { @@ -709,13 +709,13 @@ static bool playermove(token_t verb, int motion) game.prop[TROLL] = 0; move(TROLL2, 0); move(TROLL2 + NOBJECTS, 0); - move(TROLL, object_descriptions[TROLL].plac); - move(TROLL + NOBJECTS, object_descriptions[TROLL].fixd); + move(TROLL, objects[TROLL].plac); + move(TROLL + NOBJECTS, objects[TROLL].fixd); juggle(CHASM); game.newloc = game.loc; return true; } else { - game.newloc = object_descriptions[TROLL].plac + object_descriptions[TROLL].fixd - game.loc; + game.newloc = objects[TROLL].plac + objects[TROLL].fixd - game.loc; if (game.prop[TROLL] == 0)game.prop[TROLL] = 1; if (!TOTING(BEAR)) return true; rspeak(BRIDGE_COLLAPSE); @@ -788,8 +788,8 @@ static bool closecheck(void) } move(TROLL, 0); move(TROLL + NOBJECTS, 0); - move(TROLL2, object_descriptions[TROLL].plac); - move(TROLL2 + NOBJECTS, object_descriptions[TROLL].fixd); + move(TROLL2, objects[TROLL].plac); + move(TROLL2 + NOBJECTS, objects[TROLL].fixd); juggle(CHASM); if (game.prop[BEAR] != 3)DESTROY(BEAR); game.prop[CHAIN] = 0;