Load the tileset immediatly at map creation time. Removed SelectTileset lua function. (Update your luas!)
This commit is contained in:
parent
b0039970f7
commit
316c626736
5 changed files with 4 additions and 38 deletions
|
@ -340,8 +340,6 @@
|
|||
<dd></dd>
|
||||
<dt><a href="config.html#SavePreferences">SavePreferences</a></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="mapsetup.html#SelectTileset">SelectTileset</a></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="game.html#Selection">Selection</a></dt>
|
||||
<dd></dd>
|
||||
<dt><a href="mapsetup.html#SetAiType">SetAiType</a></dt>
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
<a href="#SetStartView">SetStartView</a>
|
||||
<a href="#SetAiType">SetAiType</a>
|
||||
<a href="#SetHeightMap">SetHeightMap</a>
|
||||
<a href="#SelectTileset">SelectTileset</a>
|
||||
<a href="#SetTile">SetTile</a>
|
||||
<a href="#SetTileMap">SetTileMap</a>
|
||||
<hr>
|
||||
|
@ -69,9 +68,9 @@ Note: This is for the new map format. Not implemented yet.
|
|||
|
||||
<a name="SetStartView"></a>
|
||||
<h3>SetStartView(player, x, y)</h3>
|
||||
Set the location of the map where stratagus will show to the given
|
||||
player when starting. A little bit like a different CenterMap for each
|
||||
player.
|
||||
Set the location of the map stratagus will show to the given
|
||||
player when starting. This works a little bit like a special
|
||||
CenterMap for each player.
|
||||
<dl>
|
||||
<dt>player</dt>
|
||||
<dd>number of the player</dd>
|
||||
|
@ -132,26 +131,12 @@ Note: This is for the new map format. Not implemented yet.
|
|||
SetHeightMap("doomworld/doomworldheights.png")
|
||||
</pre>
|
||||
|
||||
<a name="SelectTileset"></a>
|
||||
<h3>SelectTileset(tileset)</h3>
|
||||
|
||||
Select the Tileset to use for this map.
|
||||
<p>
|
||||
Note: This is for the new map format. Not implemented yet.
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<pre>
|
||||
SelectTileset("desert")
|
||||
</pre>
|
||||
|
||||
<a name="SetTile"></a>
|
||||
<h3>SetTile(tilemodel, x, y)</h3>
|
||||
|
||||
Set a tile of the tilemodel given by tilename at the position defined
|
||||
by the x,y coordinates. SetTile can be called ingame for special effects.
|
||||
<p>
|
||||
Note: This is for the new map format. Not implemented yet.
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
|
|
|
@ -1963,8 +1963,6 @@ static void CreateEditor(void)
|
|||
TheMap.Visible[0] = calloc(TheMap.Info.MapWidth * TheMap.Info.MapHeight / 8, 1);
|
||||
InitUnitCache();
|
||||
|
||||
LoadTileset();
|
||||
|
||||
for (i = 0; i < TheMap.Info.MapWidth * TheMap.Info.MapHeight; ++i) {
|
||||
TheMap.Fields[i].Tile = TheMap.Fields[i].SeenTile = 0;
|
||||
TheMap.Fields[i].Tile = TheMap.Fields[i].SeenTile =
|
||||
|
|
|
@ -421,21 +421,6 @@ static int CclSetFogOfWarGraphics(lua_State* l)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
** Select the tileset when loading a map
|
||||
**
|
||||
** @param l Lua state.
|
||||
*/
|
||||
static int CclSelectTileset(lua_State* l)
|
||||
{
|
||||
if (lua_gettop(l) != 1) {
|
||||
LuaError(l, "incorrect argument");
|
||||
}
|
||||
LoadTileset();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
** Define Fog graphics
|
||||
**
|
||||
|
@ -542,7 +527,6 @@ void MapCclRegister(void)
|
|||
|
||||
lua_register(Lua, "SetForestRegeneration",CclSetForestRegeneration);
|
||||
|
||||
lua_register(Lua, "SelectTileset", CclSelectTileset);
|
||||
lua_register(Lua, "LoadTileModels", CclLoadTileModels);
|
||||
lua_register(Lua, "SetTile", CclSetTile);
|
||||
lua_register(Lua, "DefinePlayerTypes", CclDefinePlayerTypes);
|
||||
|
|
|
@ -589,6 +589,7 @@ static int CclDefineTileset(lua_State* l)
|
|||
LuaError(l, "Unsupported tag: %s" _C_ value);
|
||||
}
|
||||
}
|
||||
LoadTileset();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue