My Project
 
Loading...
Searching...
No Matches
fogofwar.h
Go to the documentation of this file.
1#pragma once
2
3#include "image.h"
4
5class FogOfWar :public Image{
6private:
7 class FogTexture :public SmartTexture{
8 public:
9 FogOfWar* fow;
10 FogTexture(FogOfWar* fowp);
11 //virtual void reload();
12 };
13private:
14 static const int VISIBLE = 0x00000000;
15 static const int VISITED = 0xcc111111;
16 static const int MAPPED = 0xcc442211;
17 static const int INVISIBLE = 0xFF000000;
18
19 std::vector<int> pixels;
20
21 int pWidth;
22 int pHeight;
23
24 int width2;
25 int height2;
26
27public:
28 FogOfWar(int mapWidth, int mapHeight);
29
30 void updateVisibility(const std::vector<bool>& visible, const std::vector<bool>& visited, const std::vector<bool>& mapped);
31};
void updateVisibility(const std::vector< bool > &visible, const std::vector< bool > &visited, const std::vector< bool > &mapped)
Definition fogofwar.cpp:35
FogOfWar(int mapWidth, int mapHeight)
Definition fogofwar.cpp:7