/*
 * Copyright 2023 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#include <jasper/world/worldstatic.hpp>

namespace jasper::world {

void resize(WorldDoc &doc, ox::Size const &sz) noexcept {
	doc.columns = sz.width;
	doc.rows = sz.height;
	for (auto &layer : doc.tiles) {
		layer.resize(static_cast<size_t>(sz.height));
		for (auto &row : layer) {
			row.resize(static_cast<size_t>(sz.width));
		}
	}
}

}
