Commit Graph

90 Commits

Author SHA1 Message Date
Paul Chote
b8b27f11af Remove stub map constructor. 2015-07-05 14:57:58 +01:00
Paul Chote
0dbbc00d0a Simplify editor/importer map creation. 2015-07-05 14:57:58 +01:00
Paul Chote
41fa77d12a Fix projected world coordinate calculation for Lua API. 2015-07-05 14:57:58 +01:00
Oliver Brakmann
fc7df415d7 Merge pull request #8394 from Mailaender/map-container-nre
Fixed a null reference exception in Map.Save
2015-06-20 21:06:00 +02:00
Matthias Mailänder
330982310c avoid a null reference exception 2015-06-20 15:56:26 +02:00
Paul Chote
da3abb4e2e Tweak shroud revealing logic
The per-actor visibility now tracks all cells
inside the map area (including those outside the
currently visible bounds), but the shroud/fog is
only cleared if the cell is inside the currently
visible bounds.
2015-06-15 18:06:42 +01:00
Paul Chote
ba2d499e5d Fix a bug in Map/CellLayer.Contains. 2015-06-11 21:27:35 +01:00
Paul Chote
d21b63ca04 Add some more coordinate utility functions. 2015-06-11 20:59:35 +01:00
Paul Chote
bf4722fb9f Distinguish between all map cells and cells inside map bounds. 2015-06-02 21:53:25 +01:00
David Jiménez
044b51742f Remove plumbing for trait unit tests. 2015-05-01 16:24:14 +12:00
Paul Chote
4b1f541f34 Reorganize actor and smudge loading.
The actor and smudge definitions are now stored
as raw MiniYamlNodes in the map.  It is now the
responsibility of the consumers to parse these
into real objects.
2015-04-30 07:06:14 +12:00
abcdefg30
c4a63eee30 Merge pull request #7875 from penev92/bleed_exposePlayerReferences
Add upgrade rules support for map PlayerReferences
2015-04-26 22:53:42 +02:00
penev92
2402b56da7 Reorganize PlayerReference loading to enable upgrade rules for them.
The PlayerReference definitions are now stored
as raw MiniYamlNodes in the map.
2015-04-26 23:16:20 +03:00
Paul Chote
ab7706073b Don’t crash when asking for the offset of an invalid subcell. 2015-04-19 15:20:45 +12:00
RoosterDragon
9c93001c84 Convert to 32bbp internally in FastCopyIntoSprite.
This avoids the need for callers to ensure the pixel format is correct, but ensures that the copying succeeds when the format is different.
2015-04-17 18:50:49 +01:00
RoosterDragon
84dffce7c1 Added an extension method to clone bitmaps with a 32bbpArgb pixel format. 2015-04-11 21:05:46 +01:00
RoosterDragon
5dfcc3e9d0 Convert custom map previews that are not using PixelFormat.Format32bppArgb. 2015-04-10 19:54:02 +01:00
Paul Chote
c68cb995f4 Move cell corner state into Map. 2015-03-31 20:59:52 +01:00
Paul Chote
2630537daf Fix a mistake in Map.CellContaining.
Fixes #6247.
2015-03-31 20:59:52 +01:00
penev92
5927e1080a Add ChooseClosestEdgeCell() method to the Map class 2015-03-22 16:58:11 +02:00
David Jiménez
54ae572303 - Introduced Unit Testing capabilities to the PathFinder trait and algorithm.
Introduced also a small Unit test project to prove it.

- Separated caching capabilities from PathFinder class to increase cohesion and maintainability.
Refactored the pathfinding algorithm by extracting methods based on responsibilities like
calculating costs and reordering functions. These changes should provide a in average a small increase in
pathfinding performance and maintainability.

- Optimized the pathfinder algorithm to reuse calculations like the
MovementCost and heuristics.

- Introduced base classes, IPathSearch and IPriorityQueue interfaces,
and restructured code to ease readability and testability

- Renamed the PathFinder related classes to more appropriate names. Made the
traits rely on the interface IPathfinder instead of concrete PathFinder
implementation.

- Massive performance improvements

- Solved error with harvesters' Heuristic

- Updated the heuristic to ease redability and adjustability. D can be
adjusted to offer best paths by decreasing and more performance by
increasing it

- Refactored the CellLayer<CellInfo> creation in its own Singleton class

- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
2015-03-03 20:11:11 +01:00
David Jiménez
8659a3e71e Introduced the interfaces IActor, ICacheStorage, ILog, IMap, IWorld a
nd IMobileInfo to separate concrete implementations and abstractions
2015-02-22 23:14:12 +01:00
Oliver Brakmann
7267a3afdb Merge pull request #6984 from DeadlySurprise/yamlFix
Fixed yaml bug with leading spaces
2015-01-20 21:42:22 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
DeadlySurprise
fbe6ab7f4e Fixed yaml bug with leading spaces 2015-01-07 22:16:15 +01:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Oliver Brakmann
de0a62eb42 Add a lobby option to control spawning creeps (viceroids/worms)
The lobby option is only exposed in d2k currently, not in TD or TS.
2014-12-28 19:26:39 +01:00
Paul Chote
dc211cc729 Fix an unrelated editor regression. 2014-12-23 10:00:23 +13:00
Paul Chote
2ed594fd86 Introduce map Visibility field.
This replaces the Selectable, UseAsShellmap, and special-cased Type = "Mission" fields.
2014-12-23 09:08:00 +13:00
Paul Chote
b4c9c19cce Don’t crash when saving automatically-upgraded maps. 2014-12-23 09:08:00 +13:00
Paul Chote
14deb1efdf Drop support for map format 5. 2014-12-23 09:08:00 +13:00
RoosterDragon
c37a691c33 Convert some keys users of CellLayer to index via map-coords for efficiency. 2014-12-20 23:39:03 +00:00
Paul Chote
5b011e6baf Merge pull request #7072 from obrakmann/fmv-overhaul
Move FMV playback from Lua scripts to widgets
2014-12-19 17:43:07 +13:00
Oliver Brakmann
280b30961f Add plumbing for short game option 2014-12-18 20:03:26 +01:00
Oliver Brakmann
e342619ac7 Add video support to legacy map importer
This enables the map importer to map the .ini video definitions to ours.

The mapping generally is as follows:

Intro => BackgroundInfo
Brief => Briefing
Action => GameStart
Win => GameWon
Lose => GameLost

An issue in some Red Alert maps means that this mapping is not always
quite correct. In those maps that do not have a 'Brief' video defined
(scg03a is an example), Westwood has assigned the video that should
probaby have been the 'Action' video to the 'Intro' slot instead. I can
only assume that that was done due to some limitation in the original
game code. Mappers will have to correct that assignment manually in
those cases.
2014-12-18 18:59:42 +01:00
Oliver Brakmann
04bd4627d4 Add yaml-defined FMV playback to GUI elements 2014-12-18 18:59:42 +01:00
Paul Chote
60420340fb Add height map support. 2014-11-07 18:18:41 +13:00
obrakmann
6a24b28f92 Merge pull request #6783 from pchote/consistent-map-uids
Update shipped map UIDs
2014-10-19 10:23:23 +02:00
Paul Chote
fa01808962 Save the preview video field when saving a map. 2014-10-19 21:06:28 +13:00
Paul Chote
50643b0cfe Fix the handling of maps with invalid rules. Fixes #6787. 2014-10-19 15:52:13 +13:00
Paul Chote
fad0215842 Merge pull request #6698 from RoosterDragon/memory-savings
Small memory savings
2014-10-12 11:43:08 +13:00
Paul Chote
5d32e97ef1 Add support for briefing videos in the mission menu. 2014-10-11 23:05:35 +13:00
RoosterDragon
59b3cd154d Change indexes into tile arrays to be stored as bytes to save memory.
The index value needs only be big enough to handle all defined terrain types. This is a low number so we can save memory by defining it as a byte. This particularly saves memory for the CustomTerrain field in the Map class, which defines a cell layer for the map using tile indexes, so we can reduce the size of that layer 4x as a result.
2014-10-09 20:03:01 +01:00
Paul Chote
41c296e5c2 Fix some bogus cell accesses in Map. 2014-10-07 09:55:50 +13:00
huwpascoe
488d2d57e0 Fix map.png lock 2014-10-04 01:18:18 +01:00
atlimit8
e29b9edfc1 Changes to map.cs, rename IPositionable.IsLeaving{ => Cell}, add IPositionable.GetValidSubCell 2014-08-29 23:30:16 -05:00
atlimit8
63c28ee4d7 Refactored in new enum SubCell 2014-08-29 23:00:53 -05:00