lua/wrappers/game/lua_map_region.cpp
/**
	 * Sets the width and height of the map region.
	 * Existing map region values are maintained if the new size is larger.
	 *
	 * @param integer width The new width.
	 * @param integer height The new height.
	 * @returns am.map_region This.
	 */
Sets the width and height of the map region.
Existing map region values are maintained if the new size is larger.

@param integer width The new width.
@param integer height The new height.
Sets the width and height of the map region . Existing map region values are maintained if the new size is larger . @param integer width The new width . @param integer height The new height .
int MapRegion_size(lua_State *lua)
	{
		MapRegion *region = castUData<MapRegion>(lua, 1);
		if (region)
		{
			int args = lua_gettop(lua);
			if (args == 1)
			{
				lua_pushinteger(lua, region->getWidth());
				lua_pushinteger(lua, region->getHeight());
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3) && (args == 2 || (args >= 3 && lua_isnum(lua, 4))))
			{
				int width = lua_tointeger(lua, 2);
				int height = lua_tointeger(lua, 3);
				if (args == 2)
				{
					region->setSize(width, height);
				}
				else
				{
					region->setSize(width, height, lua_tointeger(lua, 4));
				}
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "size", "integer width, integer height, integer [0] fill_value");
		}
		return LuaState::expectedContext(lua, "size", "am.map_region");
	}
int MapRegion_size ( lua_State * lua ) { MapRegion * region = castUData < MapRegion > ( lua , 1 ) ; if ( region ) { int args = lua_gettop ( lua ) ; if ( args == 1 ) { lua_pushinteger ( lua , region -> getWidth ( ) ) ; lua_pushinteger ( lua , region -> getHeight ( ) ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) && ( args == 2 || ( args >= 3 && lua_isnum ( lua , 4 ) ) ) ) { int width = lua_tointeger ( lua , 2 ) ; int height = lua_tointeger ( lua , 3 ) ; if ( args == 2 ) { region -> setSize ( width , height ) ; } else { region -> setSize ( width , height , lua_tointeger ( lua , 4 ) ) ; } lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets the width and height of the map region.
Sets the width and height of the map region .