~ubuntu-branches/ubuntu/raring/lordsawar/raring

« back to all changes in this revision

Viewing changes to src/FogMap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese, Gonéri Le Bouder
  • Date: 2008-06-17 11:15:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617111526-yjyvu9df50zmpdo0
Tags: 0.0.9-1
[ Barry deFreese ]
* New upstream release.
  + Fixes gcc-4.3 builds so drop ftbfs_gcc-4.3_fix.diff.
  + Add new build-dependency for libgnet-dev.
* Add simple man page for new lordsawar-tile-editor.
* Add desktop file for lordsawar-tile-editor.
* Remove French translation on install.

[ Gonéri Le Bouder ]
* bump Debian Policy to 3.8.0. No change needed.
* fix wording in the 0.0.8-3 entry of the Debian changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 2007, 2008 Ben Asselstine
 
2
//
1
3
//  This program is free software; you can redistribute it and/or modify
2
4
//  it under the terms of the GNU General Public License as published by
3
5
//  the Free Software Foundation; either version 2 of the License, or
10
12
//
11
13
//  You should have received a copy of the GNU General Public License
12
14
//  along with this program; if not, write to the Free Software
13
 
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
 
16
//  02110-1301, USA.
14
17
 
15
18
#include <iostream>
16
19
#include <sstream>
19
22
 
20
23
#include "playerlist.h"
21
24
#include "xmlhelper.h"
 
25
#include "GameScenario.h"
22
26
 
23
27
using namespace std;
24
28
 
189
193
    }
190
194
}
191
195
 
 
196
bool FogMap::isFogged(Vector <int> pos)
 
197
{
 
198
  //is this tile visible, or not?
 
199
  FogMap *fogmap = Playerlist::getActiveplayer()->getFogMap();
 
200
  if (fogmap->getFogTile(pos) == FogMap::CLOSED)
 
201
    return true;
 
202
  if (Playerlist::getActiveplayer())
 
203
    if (Playerlist::getActiveplayer()->getType() != Player::HUMAN &&
 
204
        GameScenario::s_hidden_map == true)
 
205
      return true;
 
206
                
 
207
  if (fogmap->isLoneFogTile(pos) == true)
 
208
    return false;
 
209
 
 
210
  return false;
 
211
}
192
212
// End of file