summary refs log tree commit diff stats
path: root/src/map.h
diff options
context:
space:
mode:
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()) {