mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-04-12 12:20:05 +03:00
159 lines
4.8 KiB
C#
159 lines
4.8 KiB
C#
using System.Runtime.InteropServices;
|
|
|
|
namespace Syroot.Worms.Armageddon
|
|
{
|
|
/// <summary>
|
|
/// Represents the required configuration for the land generator to create a map. This structure appears in LEV
|
|
/// files (being their only content), in BIT files (being the header) and in PNG maps stored by WA (being the data
|
|
/// of the w2lv or waLV chunks).
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct MapGeneratorSettings
|
|
{
|
|
// ---- MEMBERS ------------------------------------------------------------------------------------------------
|
|
|
|
/// <summary>
|
|
/// The random seed to generate the land shape (no effect in BIT files).
|
|
/// </summary>
|
|
public int LandSeed;
|
|
|
|
/// <summary>
|
|
/// The random seed to generate object placements.
|
|
/// </summary>
|
|
public int ObjectSeed;
|
|
|
|
/// <summary>
|
|
/// <c>true</c> treats the generated map as a cavern, otherwise as an island, depending on <see cref="Style"/>.
|
|
/// </summary>
|
|
[MarshalAs(UnmanagedType.Bool)]
|
|
public bool Cavern;
|
|
|
|
/// <summary>
|
|
/// The style of the land generated, dependending on <see cref="Cavern"/>
|
|
/// </summary>
|
|
public MapGeneratorStyle Style;
|
|
|
|
/// <summary>
|
|
/// <c>true</c> to disable an indestructible border being placed around the map.
|
|
/// </summary>
|
|
[MarshalAs(UnmanagedType.Bool)]
|
|
public bool NoIndestructibleBorders;
|
|
|
|
/// <summary>
|
|
/// The probability percentage of map objects to appear on the land, from 0-100.
|
|
/// </summary>
|
|
public int ObjectPercentage;
|
|
|
|
/// <summary>
|
|
/// The probability percentage of bridges to appear on the land, from 0-100.
|
|
/// </summary>
|
|
public int BridgePercentage;
|
|
|
|
/// <summary>
|
|
/// The height of the water in percent, from 0-99.
|
|
/// </summary>
|
|
public int WaterLevel;
|
|
|
|
/// <summary>
|
|
/// The version of the structure, determining the available <see cref="SoilTextureIndex"/> values in Worms
|
|
/// Armageddon.
|
|
/// </summary>
|
|
public MapGeneratorVersion Version;
|
|
|
|
/// <summary>
|
|
/// Represents the texture index determining the style of the generated map.
|
|
/// </summary>
|
|
public MapGeneratorSoil SoilTextureIndex;
|
|
|
|
/// <summary>
|
|
/// Represents the water color used for the map (deprecated, used only in Worms Armageddon 1.0).
|
|
/// </summary>
|
|
public int WaterColor;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents the possible land styles.
|
|
/// </summary>
|
|
public enum MapGeneratorStyle : int
|
|
{
|
|
/// <summary>
|
|
/// Represents a single island or a cavern.
|
|
/// </summary>
|
|
OneIslandOrCavern,
|
|
|
|
/// <summary>
|
|
/// Represents two islands or a double-layer cavern.
|
|
/// </summary>
|
|
TwoIslandsOrCaverns,
|
|
|
|
/// <summary>
|
|
/// Represents one flat island or a cavern open at the bottom.
|
|
/// </summary>
|
|
OneFlatIslandOrCavernOpenBottom,
|
|
|
|
/// <summary>
|
|
/// Represents two flat islands or a cavern open at the left or right.
|
|
/// </summary>
|
|
TwoFlatIslandsOrCavernOpenLeftRight
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents the possible versions which can be stored in the <see cref="MapGeneratorSettings.Version"/> field.
|
|
/// </summary>
|
|
public enum MapGeneratorVersion : short
|
|
{
|
|
/// <summary>
|
|
/// Game version 3.0. Last soil texture indices are 26 = Tribal, 27 = Tribal, 28 = Urban. Additionally, floor
|
|
/// and ceiling trimming is more severe.
|
|
/// </summary>
|
|
Version_3_0_0_0 = -1,
|
|
|
|
/// <summary>
|
|
/// Game version 3.5. Last soil texture indices are 26 = Tribal, 27 = Urban, 28 = undefined.
|
|
/// </summary>
|
|
Version_3_5_0_0 = 0,
|
|
|
|
/// <summary>
|
|
/// Game version 3.6.26.4. Last soil texture indices are 26 = Tools, 27 = Tribal, Urban = 28 (same as in WWP).
|
|
/// </summary>
|
|
Version_3_6_26_4 = 1
|
|
}
|
|
|
|
/// <summary>
|
|
/// Represents the possible soil styles. In case of Worms Armageddon, this list matches
|
|
/// <see cref="MapGeneratorVersion.Version_3_6_26_4"/>.
|
|
/// </summary>
|
|
public enum MapGeneratorSoil : short
|
|
{
|
|
ClassicBeach,
|
|
ClassicDesert,
|
|
ClassicFarm,
|
|
ClassicForest,
|
|
ClassicHell,
|
|
Art,
|
|
Cheese,
|
|
Construction,
|
|
Desert,
|
|
Dungeon,
|
|
Easter,
|
|
Forest,
|
|
Fruit,
|
|
Gulf,
|
|
Hell,
|
|
Hospital,
|
|
Jungle,
|
|
Manhattan,
|
|
Medieval,
|
|
Music,
|
|
Pirate,
|
|
Snow,
|
|
Space,
|
|
Sports,
|
|
Tentacle,
|
|
Time,
|
|
Tools,
|
|
Tribal,
|
|
Urban
|
|
}
|
|
}
|