_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          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
script_map.cpp File Reference
#include "stratagus.h"
#include "map.h"
#include "iolib.h"
#include "script.h"
#include "tileset.h"
#include "translate.h"
#include "ui.h"
#include "unit.h"
#include "version.h"
#include "video.h"

Functions

script_map.cpp - The map ccl functions.
static int CclStratagusMap (lua_State *l)
 
static int CclRevealMap (lua_State *l)
 
static int CclCenterMap (lua_State *l)
 
static int CclSetStartView (lua_State *l)
 
static int CclShowMapLocation (lua_State *l)
 
static int CclSetFogOfWar (lua_State *l)
 
static int CclGetFogOfWar (lua_State *l)
 
static int CclSetMinimapTerrain (lua_State *l)
 
static int CclSetFogOfWarOpacity (lua_State *l)
 
static int CclSetForestRegeneration (lua_State *l)
 
static int CclSetFogOfWarColor (lua_State *l)
 
static int CclSetFogOfWarGraphics (lua_State *l)
 
void SetTile (unsigned int tileIndex, const Vec2i &pos, int value)
 Set a tile. More...
 
static int CclDefinePlayerTypes (lua_State *l)
 
static int CclLoadTileModels (lua_State *l)
 
static int CclDefineTileset (lua_State *l)
 
static int CclBuildTilesetTables (lua_State *l)
 
static int CclSetTileFlags (lua_State *l)
 
static int CclGetTileTerrainName (lua_State *l)
 
static int CclGetTileTerrainHasFlag (lua_State *l)
 
void MapCclRegister ()
 register ccl features More...
 

Function Documentation

static int CclBuildTilesetTables ( lua_State *  l)
static

Build tileset tables like humanWallTable or mixedLookupTable

Called after DefineTileset and only for tilesets that have wall, trees and rocks. This function will be deleted when removing support of walls and alike in the tileset.

static int CclCenterMap ( lua_State *  l)
static

Center the map.

Parameters
lLua state.
static int CclDefinePlayerTypes ( lua_State *  l)
static

Define the type of each player available for the map

Parameters
lLua state.
static int CclDefineTileset ( lua_State *  l)
static

Define tileset

Parameters
lLua state.
static int CclGetFogOfWar ( lua_State *  l)
static
static int CclGetTileTerrainHasFlag ( lua_State *  l)
static

Check if the tile's terrain has a particular flag.

Parameters
lLua state.
Returns
True if has the flag, false if not.
static int CclGetTileTerrainName ( lua_State *  l)
static

Get the name of the terrain of the tile.

Parameters
lLua state.
Returns
The name of the terrain of the tile.
static int CclLoadTileModels ( lua_State *  l)
static

Load the lua file which will define the tile models

Parameters
lLua state.
static int CclRevealMap ( lua_State *  l)
static

Reveal the complete map.

Parameters
lLua state.
static int CclSetFogOfWar ( lua_State *  l)
static

Set fog of war on/off.

Parameters
lLua state.
static int CclSetFogOfWarColor ( lua_State *  l)
static

Set Fog color.

Parameters
lLua state.
static int CclSetFogOfWarGraphics ( lua_State *  l)
static

Define Fog graphics

Parameters
lLua state.
static int CclSetFogOfWarOpacity ( lua_State *  l)
static

Fog of war opacity.

Parameters
lLua state.
static int CclSetForestRegeneration ( lua_State *  l)
static

Set forest regeneration speed.

Parameters
lLua state.
Returns
Old speed
static int CclSetMinimapTerrain ( lua_State *  l)
static

Enable display of terrain in minimap.

Parameters
lLua state.
static int CclSetStartView ( lua_State *  l)
static

Define the starting viewpoint for a given player.

Parameters
lLua state.
static int CclSetTileFlags ( lua_State *  l)
static

Set the flags like "water" for a tile of a tileset

Parameters
lLua state.
static int CclShowMapLocation ( lua_State *  l)
static

Show Map Location

Parameters
lLua state.
static int CclStratagusMap ( lua_State *  l)
static

Parse a map.

Parameters
lLua state.
void MapCclRegister ( )

register ccl features

Register CCL features for map.

void SetTile ( unsigned int  tileIndex,
const Vec2i pos,
int  value 
)

Set a tile.

Set a tile

Parameters
tileIndexTile number
poscoordinate
valueValue of the tile
(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.