OSDN Git Service

一時的に視界範囲を単純円形化。 / Sight becomes simple round temporarily.
authorDeskull <desull@users.sourceforge.jp>
Wed, 14 Jan 2015 14:16:35 +0000 (23:16 +0900)
committerDeskull <desull@users.sourceforge.jp>
Wed, 14 Jan 2015 14:16:35 +0000 (23:16 +0900)
Deeangband/Field.cpp

index 467100d..3ec171d 100644 (file)
@@ -254,8 +254,17 @@ namespace Deeangband
 
                for(s = 0 ; s < allocSize; s++) coordVec[s] = false;
                coordVec[size * sideWidth + size] = true;
-               
 
+               for(y = -size; y <= size; y++)
+               {
+                       for(x = -size; x <= +size; x++)
+                       {
+                               if(Coordinates::Distance(0, 0, x, y) <= size) coordVec[(y+size) * sideWidth + (x+size)] = true;
+                       }
+               }
+
+               
+               /*
                for(s = size; s >= 1; s--)
                {
                        for(x = baseX - s; x <= baseX + s; x++)
@@ -403,6 +412,7 @@ namespace Deeangband
                        }
 
                }
+               */
        }
 
        bool Field::HaveSight(int bx, int by, int tx, int ty)