-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFieldOfView.h
More file actions
22 lines (19 loc) · 746 Bytes
/
FieldOfView.h
File metadata and controls
22 lines (19 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
#ifndef _FIELD_OF_VIEW_
#define _FIELD_OF_VIEW_
class GameMap;
#include "array2.h"
class FieldOfView: public array2<char> {
GameMap* m_pGameMap;
public:
FieldOfView(GameMap* pGameMap, char DefaultEl = -1);
FieldOfView(GameMap* game_map, char Height, char Width, char DefaultEl = -1);
FieldOfView(const FieldOfView&) = default;
FieldOfView(FieldOfView&&);
void operator = (FieldOfView&&);
void decrement(CellCoordinates where, const array2<bool>& LightMask, bool affect_gamemap = true);
void increment(CellCoordinates where, const array2<bool>& LightMask, bool affect_gamemap = true);
// for internal use, but not dangerous
char getRange(const array2<bool>& LightMask) const { return (LightMask.getM() - 1)/2; }
};
#endif