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