OSDN Git Service
(root)
/
deeangband
/
Deeangband-new.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e548f12
)
一時的に視界範囲を単純円形化。 / Sight becomes simple round temporarily.
author
Deskull
<desull@users.sourceforge.jp>
Wed, 14 Jan 2015 14:16:35 +0000
(23:16 +0900)
committer
Deskull
<desull@users.sourceforge.jp>
Wed, 14 Jan 2015 14:16:35 +0000
(23:16 +0900)
Deeangband/Field.cpp
patch
|
blob
|
history
diff --git
a/Deeangband/Field.cpp
b/Deeangband/Field.cpp
index
467100d
..
3ec171d
100644
(file)
--- a/
Deeangband/Field.cpp
+++ b/
Deeangband/Field.cpp
@@
-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)