Commits

rmtew  committed 605256a

Reformatting change.

  • Participants
  • Parent commits f2d06f4

Comments (0)

Files changed (1)

File src/MakeLev.cpp

         MapIterate(Above,t,i)
             if (t->Type == T_PORTAL)
                 if (((Portal*)t)->isDownStairs()) {
-                    /* Paranoia, such as for the not-impossible case of two or
-                    more staircases on the same panel. */
+                    /* Paranoia, such as for the not-impossible case of two or more staircases on the same panel. */
 #if WEIMER_TUNNEL
                     if (At(t->x,t->y).Solid) {
                         do {
                             dx = random(sizeX);
                             dy = random(sizeY);
-                        }
-                        while(At(dx,dy).Solid);
+                        } while(At(dx,dy).Solid);
                         Tunnel(t->x,t->y,dx,dy,true,random(2) ? NORTH : EAST,TU_NORMAL);
+
                         /* Make it not a dead-end at the stairs. */
                         if (random(3)) {
                             do {
                                 dx = random(sizeX);
                                 dy = random(sizeY);
-                            }
-                            while(At(dx,dy).Solid);
+                            } while(At(dx,dy).Solid);
                             Tunnel(t->x,t->y,dx,dy,true,random(2) ? SOUTH : WEST,TU_NORMAL);
                         }
                     }
                         WriteAt(r,t->x,t->y,FIND("floor"),RegionAt(t->x,t->y),PRIO_FEATURE_FLOOR);
                         ASSERT(At(t->x,t->y).Solid == 0);
                         for (j=0;j<8;j++)
-                            WriteAt(r,t->x+DirX[j],t->y+DirY[j],
-                            FIND("dungeon wall"),RegionAt(t->x,t->y),PRIO_CORRIDOR_WALL);
+                            WriteAt(r,t->x+DirX[j],t->y+DirY[j],FIND("dungeon wall"),RegionAt(t->x,t->y),PRIO_CORRIDOR_WALL);
                     } 
                     st->PlaceAt(this,t->x,t->y);
                     if (RegionAt(t->x,t->y))  {
                     }
                 }
 
-
-
     /* Step 5: Final, Fix-Up Tunneling */
     { 
         struct P {
 
     if ((int16)Con[MAX_STAIRS] && Depth < (int16)Con[DUN_DEPTH]) {
         j = (int16)Con[MIN_STAIRS] + random((int16)(Con[MAX_STAIRS] - Con[MIN_STAIRS]));
-        for (i=0;i!=j;i++)
-        {
+        for (i=0;i!=j;i++) {
             Tries = 0;
             do {
                 x = random((int16)Con[LEVEL_SIZEX]);
                 TTER(TerrainAt(x,y))->HasFlag(TF_FALL));
             st = new Portal(Con[STAIRS_DOWN]);
             ASSERT(st)
-                st->PlaceAt(this,x,y);
+            st->PlaceAt(this,x,y);
         }
     }