lua/wrappers/game/lua_tile.cpp
/**
	 * Adds a transitional tile graphic.
	 * This tile graphic should have 32 texture windows to represent the different
	 * edges and corner types.
	 * Only texture level animation is supported, so the asset must have multiple textures
	 * in order to be animated.
	 *
	 * The optional overlap_tile defines if this transitional graphic should only be used
	 * when overlapping the specific overlap_tile. An overlap tile of nil indicates default overlap.
	 *
	 * @param string asset_name The name of the asset to use for transitional overlapping.
	 * @param am.tile [nil] overlap_tile When not nil, this specifies that the asset is only to be used
	 *  when overlapping this tile. Otherwise it is used for all overlappings.
	 * @returns am.tile This
	 */
Adds a transitional tile graphic.
This tile graphic should have 32 texture windows to represent the different
edges and corner types.
Only texture level animation is supported, so the asset must have multiple textures
in order to be animated.

The optional overlap_tile defines if this transitional graphic should only be used
when overlapping the specific overlap_tile. An overlap tile of nil indicates default overlap.

@param string asset_name The name of the asset to use for transitional overlapping.
@param am.tile [nil] overlap_tile When not nil, this specifies that the asset is only to be used
when overlapping this tile. Otherwise it is used for all overlappings.
Adds a transitional tile graphic . This tile graphic should have 32 texture windows to represent the different edges and corner types . Only texture level animation is supported so the asset must have multiple textures in order to be animated . The optional overlap_tile defines if this transitional graphic should only be used when overlapping the specific overlap_tile . An overlap tile of nil indicates default overlap . @param string asset_name The name of the asset to use for transitional overlapping . @param am . tile [ nil ] overlap_tile When not nil this specifies that the asset is only to be used when overlapping this tile . Otherwise it is used for all overlappings .
int Tile_add_transitional(lua_State *lua)
	{
		Tile *tile = castUData<Tile>(lua, 1);
		if (tile)
		{
			Tile *overlapTile = castUData<Tile>(lua, 3);
			if (lua_isstr(lua, 2))
			{
				Asset *asset = GfxEngine::getEngine()->getAsset(lua_tostring(lua, 2));
				if (!asset)
				{
					std::stringstream ss;
					ss << "Unable to load asset '" << lua_tostring(lua, 2) << "'";
					LuaState::warning(lua, ss.str().c_str());
				}
				else
				{
					tile->addTransitionalAsset(asset, overlapTile);
				}
				lua_first(lua);
			}
			Asset *asset = castUData<Asset>(lua, 2);
			if (asset || lua_isnil(lua, 2))
			{
				tile->addTransitionalAsset(asset, overlapTile);
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "add_transitional", 2, "string asset_name, am.tile [nil] overlap_tile", "am.asset asset, am.tile [nil] overlap_tile");
		}
		return LuaState::expectedContext(lua, "add_transitional", "am.tile");
	}
int Tile_add_transitional ( lua_State * lua ) { Tile * tile = castUData < Tile > ( lua , 1 ) ; if ( tile ) { Tile * overlapTile = castUData < Tile > ( lua , 3 ) ; if ( lua_isstr ( lua , 2 ) ) { Asset * asset = GfxEngine :: getEngine ( ) -> getAsset ( lua_tostring ( lua , 2 ) ) ; if ( ! asset ) { std :: stringstream ss ; ss << " " << lua_tostring ( lua , 2 ) << " " ; LuaState :: warning ( lua , ss . str ( ) . c_str ( ) ) ; } else { tile -> addTransitionalAsset ( asset , overlapTile ) ; } lua_first ( lua ) ; } Asset * asset = castUData < Asset > ( lua , 2 ) ; if ( asset || lua_isnil ( lua , 2 ) ) { tile -> addTransitionalAsset ( asset , overlapTile ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , 2 , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Adds a transitional tile graphic.
Adds a transitional tile graphic .