]> git.localhorst.tv Git - space.git/blob - src/world/Sector.cpp
dynamic zoom
[space.git] / src / world / Sector.cpp
1 #include "Sector.h"
2
3 #include <cstring>
4
5
6 namespace space {
7
8 Sector::Sector(Vector<int> size, int numres)
9 : size(size)
10 , numres(numres)
11 , total(size.x * size.y * numres)
12 , res_begin(new int[total])
13 , res_end(res_begin + total) {
14         std::memset(res_begin, 0, total * sizeof(int));
15 }
16
17 Sector::~Sector() {
18         delete[] res_begin;
19 }
20
21 }