OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77d7451
)
[Fix] term_what で描画オフセットが考慮されていない
author
Habu
<habu1010+github@gmail.com>
Sun, 22 Jan 2023 05:01:42 +0000
(14:01 +0900)
committer
Habu
<habu1010+github@gmail.com>
Sun, 22 Jan 2023 05:01:42 +0000
(14:01 +0900)
term_what 関数で描画オフセットが考慮されていないため、オフセットが設定されている時に
表示されている内容が正しく取得できていない。
正しくオフセットを考慮するように修正する。
src/term/z-term.cpp
patch
|
blob
|
history
diff --git
a/src/term/z-term.cpp
b/src/term/z-term.cpp
index
ecb6caa
..
cb635ef
100644
(file)
--- a/
src/term/z-term.cpp
+++ b/
src/term/z-term.cpp
@@
-1874,6
+1874,9
@@
errr term_what(TERM_LEN x, TERM_LEN y, TERM_COLOR *a, char *c)
TERM_LEN w = game_term->wid;
TERM_LEN h = game_term->hgt;
+ x += game_term->offset_x;
+ y += game_term->offset_y;
+
if ((x < 0) || (x >= w)) {
return -1;
}