-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed IMapCell, moved IMap to DefaultMap and removed interface on M…
…ap.cs, and added interfaces for Height, Ramp, and Tiles properties.
- Loading branch information
1 parent
265dce0
commit 892f19a
Showing
244 changed files
with
1,115 additions
and
1,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using OpenRA.FileSystem; | ||
using OpenRA.Primitives; | ||
using OpenRA.Support; | ||
using OpenRA.Traits; | ||
|
||
namespace OpenRA | ||
{ | ||
public interface IMap | ||
{ | ||
short InvalidCachedTerrainIndex { get; } | ||
string RequiresMod { get; set; } | ||
string Title { get; } | ||
string Author { get; } | ||
bool LockPreview { get; } | ||
Dictionary<CPos, TerrainTile> ReplacedInvalidTerrainTiles { get; } | ||
MapGrid Grid { get; } | ||
int2 MapSize { get; } | ||
string Tileset { get; } | ||
Ruleset Rules { get; } | ||
CellRegion AllCells { get; } | ||
List<CPos> AllEdgeCells { get; } | ||
WDist CellHeightStep { get; } | ||
CellLayer<byte> CustomTerrain { get; } | ||
WPos ProjectedBottomRight { get; } | ||
PPos[] ProjectedCells { get; } | ||
WPos ProjectedTopLeft { get; } | ||
Rectangle Bounds { get; } | ||
MapVisibility Visibility { get; } | ||
string[] Categories { get; } | ||
string[] Translations { get; } | ||
int MapFormat { get; } | ||
byte GetTerrainIndex(CPos cell); | ||
TerrainTypeInfo GetTerrainInfo(CPos cell); | ||
void NewSize(Size size, ITerrainInfo terrainInfo); | ||
WVec Offset(CVec delta, int dz); | ||
WAngle FacingBetween(CPos cell, CPos towards, WAngle fallbackfacing); | ||
IEnumerable<CPos> FindTilesInAnnulus(CPos center, int minRange, int maxRange, bool allowOutsideBounds = false); | ||
IEnumerable<CPos> FindTilesInCircle(CPos center, int maxRange, bool allowOutsideBounds = false); | ||
CPos CellContaining(WPos pos); | ||
PPos ProjectedCellCovering(WPos pos); | ||
WDist DistanceAboveTerrain(WPos pos); | ||
WPos CenterOfCell(CPos cell); | ||
WPos CenterOfSubCell(CPos cell, SubCell subCell); | ||
CPos ChooseClosestEdgeCell(CPos cell); | ||
MPos ChooseClosestEdgeCell(MPos uv); | ||
CPos ChooseClosestMatchingEdgeCell(CPos cell, Func<CPos, bool> match); | ||
CPos ChooseRandomCell(MersenneTwister rand); | ||
CPos ChooseRandomEdgeCell(MersenneTwister rand); | ||
CPos Clamp(CPos cell); | ||
MPos Clamp(MPos uv); | ||
PPos Clamp(PPos puv); | ||
bool Contains(CPos cell); | ||
bool Contains(MPos uv); | ||
bool Contains(PPos puv); | ||
WDist DistanceToEdge(WPos pos, in WVec dir); | ||
PPos[] ProjectedCellsCovering(MPos uv); | ||
|
||
int2 MapSize { get; } | ||
List<MiniYamlNode> PlayerDefinitions { get; set; } | ||
List<MiniYamlNode> ActorDefinitions { get; set; } | ||
event Action<CPos> CellProjectionChanged; | ||
byte ProjectedHeight(PPos puv); | ||
void Resize(int width, int height); | ||
void SetBounds(PPos tl, PPos br); | ||
WRot TerrainOrientation(CPos cell); | ||
List<MPos> Unproject(PPos puv); | ||
(Color Left, Color Right) GetTerrainColorPair(MPos uv); | ||
byte[] SavePreview(); | ||
} | ||
|
||
MiniYaml RuleDefinitions { get; } | ||
MiniYaml SequenceDefinitions { get; } | ||
MiniYaml ModelSequenceDefinitions { get; } | ||
MiniYaml WeaponDefinitions { get; } | ||
MiniYaml VoiceDefinitions { get; } | ||
MiniYaml MusicDefinitions { get; } | ||
MiniYaml NotificationDefinitions { get; } | ||
bool InvalidCustomRules { get; } | ||
Exception InvalidCustomRulesException { get; } | ||
IReadOnlyPackage Package { get; } | ||
Ruleset Rules { get; } | ||
string Uid { get; } | ||
bool Exists(string filename); | ||
bool IsExternalModFile(string filename); | ||
Stream Open(string filename); | ||
void Save(IReadWritePackage package); | ||
string Translate(string key, IDictionary<string, object> args = null); | ||
bool TryGetPackageContaining(string path, out IReadOnlyPackage package, out string filename); | ||
bool TryOpen(string filename, out Stream s); | ||
public interface IMapElevation : IMap | ||
{ | ||
CellLayer<byte> Ramp { get; } | ||
CellLayer<byte> Height { get; } | ||
} | ||
|
||
public interface IMapTiles : IMap | ||
{ | ||
CellLayer<TerrainTile> Tiles { get; } | ||
} | ||
|
||
public interface IMapResource : IMap | ||
{ | ||
CellLayer<ResourceTile> Resources { get; } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.