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

src/map/map.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "map.h"
#include "tileset.h"
#include "minimap.h"
#include "ui.h"
#include "script.h"

map.cpp - The map.

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

Function Documentation

bool CheckedCanMoveToMask ( const Vec2i pos,
int  mask 
)

Can move to this point, applying mask.

Parameters:
pos map tile position.
mask Mask 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:
mapname map filename

void PreprocessMap (  ) 

Preprocess map, for internal use.

Fixes initially the wood and seen tiles.

bool UnitCanBeAt ( const CUnit unit,
const Vec2i pos 
)

Can a unit be placed to this point.

Parameters:
unit unit to be checked.
pos map tile position.
Returns:
True if could be placeded, false otherwise.

bool UnitTypeCanBeAt ( const CUnitType type,
const Vec2i pos 
)

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

Parameters:
type unit-type to be checked.
pos map tile position.
Returns:
True if could be entered, false otherwise.


Variable Documentation

char CurrentMapPath[1024]

Forest regeneration.

The current map.

The current map.

Flag must reveal the map.

Reveal Map is replay.

Forest regeneration.

Flag must reveal the map.

Flag must reveal map when in replay.

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