Commit Graph

3840 Commits

Author SHA1 Message Date
Paul Chote
f352aedf61 Merge pull request #7071 from RoosterDragon/deal-in-map-coords
Avoid redundant cell <-> map conversions
2014-12-22 14:08:30 +13:00
Paul Chote
acb29d74cd Merge pull request #7141 from RoosterDragon/sync-less-tostring
Generate sync reports faster
2014-12-22 09:01:08 +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
RoosterDragon
b728deb0e1 Added the ability to enumerate the map-coords of a CellRegion for performance. 2014-12-20 23:36:28 +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
RoosterDragon
3511fbbf2c Generate sync reports faster by delaying ToString calls until it is written to disk.
Values for the report are generated by calling ToString on members, we avoid calling this on value types for performance. By instead just copying the value we can delay calling ToString until later and avoid spending time and memory creating strings that usually go unused.
2014-12-16 18:39:02 +00:00
reaperrr
ee8e1f46c1 Move 'Activity' into its own namespace in OpenRA.Game. 2014-12-14 17:12:46 +01:00
RoosterDragon
f01f8d92b3 Cache the initial path layer for faster path search startups.
Reinitializing the initial cell info layer for the path search took a fair bit of time. We cache this initial setup so it only has to be done each time the map size changes. A CopyValuesFrom method in CellLayer is provided which copies values between layers by just copying the internal arrays for super speed.

This speeds up InitCellInfo 10x.
2014-12-13 21:44:32 +00:00
obrakmann
c8ad2d4911 Merge pull request #7093 from RoosterDragon/frozen-stream
Make FrozenActorsInBox a streaming enumerable.
2014-12-11 00:10:40 +01:00
obrakmann
2d5b41338e Merge pull request #7091 from RoosterDragon/buffer-copy-palettes
Block copy palettes
2014-12-10 22:57:37 +01:00
Chris Forbes
eec4f7171a Merge pull request #7057 from pchote/celllayerupdates
Improve radar rendering performance
2014-12-08 14:09:09 +13:00
Chris Forbes
522c63ff58 Merge pull request #7081 from Mailaender/ignore-missing-npc-objectives
Removed the need to give NPCs fake objectives to properly end the game
2014-12-08 14:05:59 +13:00
RoosterDragon
1116f578a3 Make FrozenActorsInBox a streaming enumerable.
Following the same layout as ActorsInBox, this streams the enumerable internally making it cheaper to call if only part of it is required, and also avoids building an intermediate list.
2014-12-07 21:36:56 +00:00
RoosterDragon
8c2fdb9097 Add CopyToArray method for IPalette.
By allowing a palette to be copied to an array, a speedup can be gained in HardwarePalette since palettes can be block copied using native magic rather than having to copy them item by item. We transpose the buffer in HardwarePalette in order to allow a contiguous block copy into this buffer, transposing again in the shader to keep everything correct.
2014-12-07 20:46:46 +00:00
Paul Chote
400cfb9713 Merge pull request #6904 from LipkeGu/fix_log_path_prefix
fix LogPathPrefix
2014-12-07 10:29:19 +13:00
Matthias Mailänder
e16bc064a0 fix the end game dialog not showing which objectives failed
- don't mark everything as failed just because one objective did
- remove fake objectives workarounds for non-playable factions
2014-12-06 21:04:46 +01:00
Paul Chote
5e402e95cb Update only dirty radar pixels and refresh every tick. 2014-12-04 21:18:45 +13:00
Paul Chote
e064593961 Add a CellEntryChanged event to CellLayer. 2014-12-04 21:18:45 +13:00
Matthias Mailänder
5361b920ca document various traits 2014-11-30 19:08:44 +01:00
obrakmann
0dd7d08974 Merge pull request #6756 from RoosterDragon/release-more-buffers
Release more sheet buffers
2014-11-29 17:47:06 +01:00
Matthias Mailänder
272682e53e Merge pull request #7010 from obrakmann/fix6990_cargo_on_radar
Do not show cargo on radar map
2014-11-29 16:08:57 +01:00
RoosterDragon
c2d86557f1 Use more locking to improve thread-safety in Sheet. 2014-11-29 12:04:51 +00:00
RoosterDragon
c2b7d9ca5b Release sheet buffers in SequenceProvider and MapCache.
The buffers in SequenceProvider can be freed if Preload is called, since we know everything is loaded. A SequenceProvider is created for each TileSet is use so this saves memory for however many tilesets had been used in the game. This will be at least one for the shellmap, and often more.

The MapCache loading thread is kept alive for 5 seconds after it last generated a map (in anticipation of more requests). Once this time expires the thread is allowed to die, as it is unlikely there will be more requests in the short term. At this time it is ideal to force the changes to be committed to the texture so we can release the buffer. As well as marking the buffer for release, we must access the texture to force the changes stored in the buffer to be written to the texture, after which the buffer can be reclaimed.

Additionally, when starting the MapCache loading thread we must ensure the buffer is created from the main thread since it may query the texture object which has thread affinity. After that the buffer may be modified freely on the loading thread until released.
2014-11-29 12:04:51 +00:00
RoosterDragon
a6f5a21ed4 Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
2014-11-29 12:04:50 +00:00
RoosterDragon
ff16690b86 Lazily generate buffer in Sheet.
The managed byte buffer is created on demand, meaning a newly allocated sheet will not waste memory holding onto the buffer until some changes are actually required to be written. This avoids a newly allocated sheet wasting memory on buffers that do not differ from their backing texture.
2014-11-29 12:04:00 +00:00
Matthijs Benschop
2d380c64bd Implementation of the automated D2k Carryall
Closes #2246
2014-11-29 12:17:11 +01:00
Paul Chote
da4599f621 Merge pull request #6638 from DeadlySurprise/tsVqa
Tiberian Sun .vqa support
2014-11-29 22:01:28 +13:00
atlimit8
bbd54cb32f Added IDisabledTrait & rewrote upgrade code using a level-based approach.
Upgradeable traits are notified whenever an upgrade of their declared types are granted or revoked.  The traits maintain their own internal level counter, which is then used to enable or disable the trait functionality.  A trait can register for multiple upgrade types which then all affect the internal level counter.

	IDisabledTrait for identifying (and filtering) disabled traits
	UpgradableTrait provides an abstract base for traits to support upgrade levels
	Added IDisabledTrait support to GlobalButtonOrderGenerator

	Includes rework by pchote with alterations.
2014-11-26 05:45:26 -06:00
Oliver Brakmann
867f7f777e Do not show cargo on radar map
Fixes #6990
2014-11-25 23:08:26 +01:00
Matthias Mailänder
f263579158 Merge pull request #6934 from abcdefg30/survival01
Ported Survival01 to Lua
2014-11-23 15:17:42 +01:00
Matthias Mailänder
7ad2a57517 Merge pull request #6927 from huwpascoe/actor-fixup
Actor properties consistency improved
2014-11-23 14:53:33 +01:00
Matthias Mailänder
b52dbe6c07 Merge pull request #6988 from RoosterDragon/enum-memory
Reduce enum memory
2014-11-23 14:48:20 +01:00
abcdefg30
e29adf5f4f Added proximity triggers 2014-11-23 13:31:39 +01:00
huwpascoe
d313317cf5 Cleaned up the server browser 2014-11-22 21:55:55 +00:00
RoosterDragon
35da7d8a6e Make the underlying types of TextureChannel and BlendMode enums a byte to save memory. 2014-11-22 18:12:46 +00:00
huwpascoe
a660bb95b5 Actor properties consistency improved 2014-11-21 02:44:05 +00:00
Guido L.
0806cca133 Prevent the creation of Logfiles in the Game Directory 2014-11-20 12:59:02 +01:00
DeadlySurprise
c504383d92 Changed aspect ratio implementation 2014-11-18 22:35:34 +01:00
DeadlySurprise
cdb05537f3 Added tiberian sun vqa file support 2014-11-18 22:35:33 +01:00
DeadlySurprise
b7e3dfc665 Fixed vqa crashes 2014-11-18 18:42:38 +01:00
Oliver Brakmann
4e3f565354 Fix broken orders when actors are selected.
Fixes an oversight in #6949.
2014-11-15 21:00:52 +01:00
obrakmann
2c3b812b26 Merge pull request #6949 from pchote/retire-classic-mouse
Retire classic mouse orders
2014-11-15 19:38:32 +01:00
Paul Chote
f5c09121ad Remove buggy classic mouse orders. Closes #3153. 2014-11-15 09:40:25 +13:00
Paul Chote
563efd678a Revert "DevEnableTech now displays from all factions"
This reverts commit 5d5f302d07.
2014-11-15 09:20:04 +13:00
obrakmann
22c2dc56fe Merge pull request #6931 from Happy0/mono310_workaround
Workarounds for a bug in certain versions of Mono (3.10 and certain versions of 3.8) which stops OpenRA building
2014-11-12 20:45:20 +01:00
Gordon Martin
04cbea3792 Desugaring a couple of ternary expressions which prevented OpenRA building on Mono 3.10 and certain versions of the 3.8 series due to a bug in Mono: https://bugzilla.xamarin.com/show_bug.cgi?id=23319 2014-11-11 21:43:33 +00:00
Chris Forbes
551000104d Merge pull request #6905 from LipkeGu/Dont_query_traits_on_dead_units
AnyUnitsAt: Ignore Units which are Destroyed
2014-11-12 08:06:58 +13:00