_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
map.cpp File Reference
#include "stratagus.h"
#include "map.h"
#include "iolib.h"
#include "player.h"
#include "tileset.h"
#include "unit.h"
#include "unit_manager.h"
#include "ui.h"
#include "version.h"
#include "video.h"

map.cpp - The map.

CMap Map
 
int FlagRevealMap
 The current map. More...
 
int ReplayRevealMap
 Flag must reveal the map. More...
 
int ForestRegeneration
 Reveal Map is replay. More...
 
char CurrentMapPath [1024]
 Forest regeneration. More...
 
bool CheckedCanMoveToMask (const Vec2i &pos, int mask)
 Returns true, if the unit-type(mask can enter field with bounds check. More...
 
bool UnitTypeCanBeAt (const CUnitType &type, const Vec2i &pos)
 Returns true, if the unit-type can enter the field. More...
 
bool UnitCanBeAt (const CUnit &unit, const Vec2i &pos)
 Returns true, if the unit can enter the field. More...
 
void PreprocessMap ()
 Preprocess map, for internal use. More...
 
void LoadStratagusMapInfo (const std::string &mapname)
 Load map presentation. More...
 

Function Documentation

bool CheckedCanMoveToMask ( const Vec2i pos,
int  mask 
)

Returns true, if the unit-type(mask can enter field with bounds check.

Can move to this point, applying mask.

Parameters
posmap tile position.
maskMask for movement to apply.
Returns
True if could be entered, false otherwise.
void LoadStratagusMapInfo ( const std::string &  mapname)

Load map presentation.

Load the map presentation

Parameters
mapnamemap filename
void PreprocessMap ( )

Preprocess map, for internal use.

Fixes initially the wood and seen tiles.

bool UnitCanBeAt ( const CUnit unit,
const Vec2i pos 
)

Returns true, if the unit can enter the field.

Can a unit be placed to this point.

Parameters
unitunit to be checked.
posmap tile position.
Returns
True if could be placeded, false otherwise.
bool UnitTypeCanBeAt ( const CUnitType type,
const Vec2i pos 
)

Returns true, if the unit-type can enter the field.

Can a unit of unit-type be placed at this point.

Parameters
typeunit-type to be checked.
posmap tile position.
Returns
True if could be entered, false otherwise.

Variable Documentation

char CurrentMapPath[1024]

Forest regeneration.

The current map.

int FlagRevealMap

The current map.

Flag must reveal the map.

int ForestRegeneration

Reveal Map is replay.

Forest regeneration.

CMap Map
int ReplayRevealMap

Flag must reveal the map.

Flag must reveal map when in replay.

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.