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

map.cpp File Reference
#include "stratagus.h"
#include "map.h"
#include "fov.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
 
MapRevealModes FlagRevealMap
 The current map. More...
 
int ReplayRevealMap
 Flag must reveal the map. More...
 
unsigned int ForestRegeneration
 Reveal Map is replay. More...
 
int ForestRegenerationFrequency
 Forest regeneration. More...
 
char CurrentMapPath [1024]
 Forest regeneration frequency (every how many seconds we apply 1 point of 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...
 
bool LoadStratagusMapInfo (const std::string &mapname)
 Load map presentation. More...
 

Function Documentation

◆ CheckedCanMoveToMask()

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.

◆ LoadStratagusMapInfo()

bool LoadStratagusMapInfo ( const std::string &  mapname)

Load map presentation.

Load the map presentation

Parameters
mapnamemap filename
Returns
true on successful load, else false

◆ PreprocessMap()

void PreprocessMap ( )

Preprocess map, for internal use.

Fixes initially the wood and seen tiles.

◆ UnitCanBeAt()

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.

◆ UnitTypeCanBeAt()

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

◆ CurrentMapPath

char CurrentMapPath[1024]

Forest regeneration frequency (every how many seconds we apply 1 point of regeneration)

The current map.

◆ FlagRevealMap

MapRevealModes FlagRevealMap

The current map.

Flag must reveal the map.

◆ ForestRegeneration

unsigned int ForestRegeneration

Reveal Map is replay.

Path to the current map.

◆ ForestRegenerationFrequency

int ForestRegenerationFrequency

Forest regeneration.

◆ Map

CMap Map

◆ ReplayRevealMap

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.