summary refs log tree commit diff stats
path: root/src/map.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-14 21:31:43 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-14 21:31:43 -0400
commit83ac4c41bc447a3372769f2b3ef6e3119d2717a2 (patch)
tree77a8e7db49b22d3672b398a94f919b5ca78e2e4a /src/map.h
parentc3055098edaec16f844fc21731ecf391c8fefe33 (diff)
downloadether-83ac4c41bc447a3372769f2b3ef6e3119d2717a2.tar.gz
ether-83ac4c41bc447a3372769f2b3ef6e3119d2717a2.tar.bz2
ether-83ac4c41bc447a3372769f2b3ef6e3119d2717a2.zip
window starts in centre of screen
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/map.h b/src/map.h index d35b632..2235b07 100644 --- a/src/map.h +++ b/src/map.h
@@ -128,31 +128,6 @@ public:
128 return loaded_; 128 return loaded_;
129 } 129 }
130 130
131 /*void resize(int newLeft, int newTop, int newWidth, int newHeight)
132 {
133 std::vector<T> newData(newWidth * newHeight);
134
135 int winTop = std::max(top_, newTop);
136 int winBottom = std::min(top_ + height_, newTop + newHeight);
137 int winLeft = std::max(left_, newLeft);
138 int winRight = std::min(left_ + width_, newLeft + newWidth);
139
140 for (int y = winTop; y < winBottom; y++)
141 {
142 std::move(
143 std::next(std::begin(data_), (winLeft - left_) + width_ * (y - top_)),
144 std::next(std::begin(data_), (winRight - left_) + width_ * (y - top_)),
145 std::next(std::begin(newData),
146 (winLeft - newLeft) + newWidth * (y - newTop)));
147 }
148
149 left_ = newLeft;
150 top_ = newTop;
151 width_ = newWidth;
152 height_ = newHeight;
153 data_.swap(newData);
154 }*/
155
156 void load(int newLeftChunk, int newTopChunk, int newWidthChunks, int newHeightChunks, std::mt19937& rng) { 131 void load(int newLeftChunk, int newTopChunk, int newWidthChunks, int newHeightChunks, std::mt19937& rng) {
157 // Flush the currently loaded data as long as there is any (this isn't the first load). 132 // Flush the currently loaded data as long as there is any (this isn't the first load).
158 if (!loaded_.empty()) { 133 if (!loaded_.empty()) {