- for (int i = 1; i <= NOBJECTS; i++) {
- int k = NOBJECTS + 1 - i;
- game.fixed[k] = objects[k].fixd;
- if (objects[k].plac != 0 && objects[k].fixd <= 0)
- drop(k, objects[k].plac);
- }
+ /* Set up the game.locs atloc and game.link arrays.
+ * We'll use the DROP subroutine, which prefaces new objects on the
+ * lists. Since we want things in the other order, we'll run the
+ * loop backwards. If the object is in two locs, we drop it twice.
+ * Also, since two-placed objects are typically best described
+ * last, we'll drop them first. */
+ for (int i = NOBJECTS; i >= 1; i--) {
+ if (objects[i].fixd > 0) {
+ drop(i + NOBJECTS, objects[i].fixd);
+ drop(i, objects[i].plac);
+ }
+ }