ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/cf.schmorp.de/dclient/src/backend/communicator/map.cpp
Revision: 1.3
Committed: Wed Oct 20 08:33:41 2010 UTC (15 years, 11 months ago) by sf-pippijn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +14 -0 lines
Log Message:
2 glyphs / map space

File Contents

# Content
1 #include "deliantra/data/map.h"
2
3 #include <string>
4
5 using data::map;
6
7 void
8 map::clear ()
9 {
10 x = 0;
11 y = 0;
12 foreach (auto &row, rows)
13 foreach (auto &cell, row)
14 cell.clear_all ();
15 }
16
17 void
18 map::ensure (int x, int y)
19 {
20 rows.ensure (y);
21 rows.at (y).ensure (x);
22 }
23
24 void
25 map::blank (int x0, int y0, int w, int h)
26 {
27 return;
28 for (int y = y0; y < y0 + h; y++)
29 if (y >= 0)
30 {
31 if (y >= rows.size ())
32 break;
33
34 rows.at (y);
35 }
36 }