Commit Graph

12951 Commits

Author SHA1 Message Date
Paul Chote
c58d737400 Merge pull request #5597 from Happy0/mouse_window_focus
Removing requirement to restart game after applying changes to mouse focus option
2014-06-14 17:30:02 +12:00
Paul Chote
f115dda5df Merge pull request #5550 from pavlos256/reload-chrome
Add developer shortcut to reload chrome files
2014-06-14 17:25:18 +12:00
Paul Chote
5e986b3079 Merge pull request #5615 from RoosterDragon/minor-alloc
Minor allocation tweaks
2014-06-14 12:26:39 +12:00
Paul Chote
0cf2d608e4 Merge pull request #5463 from pavlos256/perf-terrain-movement
Change terrain type from string based dictionaries to arrays
2014-06-13 21:19:29 +12:00
Pavlos Touboulidis
db53f8e648 Add developer shortcut to reload chrome files
Hitting Ctrl+Shift+C will re-initialize the chrome provider,
reloading all chrome files instantly. Useful when changing the
UI.

Note: A new "RootWidget" was created to trap top-level (global)
shortcuts instead of putting everything in Widget.
2014-06-13 11:31:09 +03:00
Pavlos Touboulidis
092352729f Change terrain type from string based dictionaries to arrays 2014-06-13 11:20:54 +03:00
Paul Chote
ea276d466d Merge pull request #5621 from chrisforbes/travis-update-before-installing
Adjust travis config to update package lists before installing dependencies
2014-06-13 10:45:11 +12:00
Chris Forbes
83fc5085e3 Adjust travis config to update package lists before installing dependencies 2014-06-13 10:29:22 +12:00
Gordon Martin
89c9499909 Removing requirement to restart game after applying changes to mouse focus option. The setting now defaults to 'false' as it is likely to be disruptive to players who are used to the usual behaviour in windowed mode. 2014-06-12 22:57:25 +01:00
Paul Chote
b8cdb224d1 Merge pull request #5540 from RoosterDragon/begin-frame-cache-viewport
Avoid redundancy in BeginFrame.
2014-06-12 18:15:47 +12:00
Paul Chote
f6f366c4b3 Merge pull request #5401 from RoosterDragon/nodesdict
Changed MiniYaml.NodesDict property into a method.
2014-06-12 17:34:59 +12:00
RoosterDragon
b8b8b1e2df Minor changes to reduce allocation.
- Cache a predicate in ActorMap.
- Use short circuiting to skip a call to HasTrait in AttackBase.
- In AutoTarget.ScanForTarget, move the check for the scan time above the calculations since we can skip them if it's not time yet.
- In AutoTarget.ChooseTarget, merge four Where calls into one.
2014-06-12 05:32:44 +01:00
Paul Chote
e0c59511fb Merge pull request #5152 from Mailaender/auto-l10n
Automated translation string extraction
2014-06-12 10:31:07 +12:00
Chris Forbes
1c5c2b576c Merge pull request #5601 from RoosterDragon/sheet-perf
Speed up some loops with Marshal.Copy
2014-06-12 10:07:29 +12:00
Chris Forbes
ecb7b5056c Merge pull request #5602 from RoosterDragon/perfsample-streamline
Streamline PerfSample
2014-06-12 10:05:31 +12:00
RoosterDragon
4ce8a4a648 Use Marshal.Copy for faster array copying.
- Rewrite several methods to use Marshal.Copy to copy data faster and more succinctly compared to doing it manually.
- Rewrite Sheet.AsBitmap(TextureChannel, Palette) with a faster and more self descriptive loop.
2014-06-11 05:02:38 +01:00
RoosterDragon
783fd8eb32 Streamline PerfSample.
- Avoid memory allocations by making PerfSample a struct, and tracking ticks manually rather than creating a Stopwatch instance.
2014-06-11 03:52:16 +01:00
Paul Chote
e347cdfb32 Merge pull request #5410 from RoosterDragon/IDisposable
Disposable fixup
2014-06-11 10:55:44 +12:00
RoosterDragon
a2ed4fd5f9 Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
2014-06-10 17:06:25 +01:00
Paul Chote
ccb34adb04 Merge pull request #5503 from RoosterDragon/map-preview-perf
Faster map preview generation.
2014-06-11 00:05:10 +12:00
RoosterDragon
9dbbc23967 Make map preview generation fast.
- Change Map.LoadMapTiles and Map.LoadResourceTiles to read the whole stream into memory before processing individual bytes. This removes the cost of significant overhead from repeated calls to ReadUInt8/16.
- Remove significant UI jank caused by the map chooser by not including the placeholder widget. The maps render fast enough that it is no longer worthwhile and it was causing a lot of flushes which were the source of the jank.
- Trigger async generation for all maps when the chooser is loaded. This means in practice all previews will be ready by the time the user begins to scroll the selection. Since generation is fast, there is no issue with scrolling straight to the bottom and having to wait for the backlog to clear.
2014-06-10 11:46:39 +01:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
Matthias Mailänder
8093942913 fix bogus label descriptors 2014-06-10 09:24:35 +02:00
Matthias Mailänder
69d86cfcf2 add automated language string extraction to utility 2014-06-10 09:24:28 +02:00
Matthias Mailänder
c9a49538d6 translatable tooltips 2014-06-10 09:18:46 +02:00
Paul Chote
ee7573d01c Merge pull request #5484 from RoosterDragon/startup-efficiency
Improved efficiency of startup methods.
2014-06-10 18:28:25 +12:00
Paul Chote
373529e110 Merge pull request #5505 from pavlos256/map-preview-generation
Map preview generation
2014-06-10 17:56:21 +12:00
Chris Forbes
00b95f754f Merge pull request #5593 from RobotCaleb/misc_fixes
Expanded credits window a bit
2014-06-10 10:39:50 +12:00
Caleb Anderson
3b9f1ed43c expand credits window a bit to fit the text better. 2014-06-09 16:06:45 -06:00
Caleb Anderson
49def655c9 add sublime text project/workspace to ignore 2014-06-09 16:06:44 -06:00
Matthias Mailänder
9df00ad8f9 Merge pull request #5590 from Happy0/sd2windowgrab
Closes #4977
2014-06-09 20:29:29 +02:00
Gordon Martin
5eab479c34 Adding SDL2 window grab on loading the game. Made this behaviour configurable in the 'Input' tab of the Settings menu
Updated settings file for TD to expose the new 'Lock mouse to window' display configuration option

A text label notes that modifying the 'Lock mouse' check box requires a restart
2014-06-09 19:10:05 +01:00
RoosterDragon
e63f330717 Improved efficiency of startup methods.
- ShpReader will copy the input stream into memory just once rather than for every header.
- ShpReader.CopyImageData switched to use Array.Copy since that uses some unsafe magic for speed.
- In ActorInfo, cache a GetType call and prevent needless materialization in PrerequisitesOf.
- In ObjectCreator, cache type and ctor lookups since these are expensive and often repeated.
- Implement IReadOnlyDictionary<T, U> on Cache<T, U> to provide some supplementary functions.
- In TechTree.GatherOwnedPrerequisites, rearrange a Boolean 'and' expression to evaluate expensive functions later in the chain, and use ContainsKey to speed up name check.
2014-06-09 17:13:01 +01:00
RoosterDragon
2e992a7310 Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
Matthias Mailänder
334a210231 Merge pull request #5564 from Kanar/MinibibsRework
Adds/reworks some minibibs
2014-06-09 16:54:35 +02:00
Matthias Mailänder
13fad65c19 Merge pull request #5539 from deniz1a/repair-pause
Closes #5322
2014-06-09 16:24:34 +02:00
Matthias Mailänder
7216688baf Merge pull request #5567 from ScottNZ/perf
Refactor AutoTarget scan and GPS interaction
2014-06-09 12:01:05 +02:00
Paul Chote
decdcf44d4 Merge pull request #5504 from RoosterDragon/frozen-fog-lookup-locals
Cache some dictionary lookups
2014-06-09 17:50:38 +12:00
Paul Chote
d8e5177a36 Merge pull request #5405 from RoosterDragon/min-max
Added MinBy, MaxBy, etc.
2014-06-09 17:42:01 +12:00
Chris Forbes
033f631f28 Merge pull request #5508 from pavlos256/read-only-list
Add IReadOnlyList
2014-06-09 17:36:40 +12:00
Paul Chote
1c8a8ca6ff Merge pull request #5400 from RoosterDragon/equatable
Implemented IEquatable<T>
2014-06-09 17:32:17 +12:00
Paul Chote
ea9601b128 Merge pull request #5509 from RoosterDragon/stream-exts-fixes
Fixes to StreamExts.
2014-06-09 17:25:25 +12:00
Chris Forbes
1051728790 Merge pull request #5541 from RoosterDragon/enumerate-armaments-once
Avoid repeated work in AttackBase.
2014-06-09 17:07:51 +12:00
Matthias Mailänder
bc103f8ffd Merge pull request #5577 from pchote/production-fix
Don’t queue rallypoint move if MoveIntoWorld:false.
2014-06-08 10:38:12 +02:00
Paul Chote
2c5f1de780 Don’t queue rallypoint move if MoveIntoWorld:false. Fixes #5576. 2014-06-08 11:52:39 +12:00
Paul Chote
9762ef8119 Merge pull request #5573 from Mailaender/replay-hotkeys
Fixed pixel doubling and health bar hotkeys unavailable in spectator mode
2014-06-07 23:24:02 +12:00
Matthias Mailänder
3a1c41c8ce move pixel doubling and health bar hotkeys to shared widget
closes #5572
2014-06-07 12:26:58 +02:00
Paul Chote
f06cbfa5fe Merge pull request #5571 from Mailaender/invisible-gems
Fixed single resources being spawned at 0 density
2014-06-07 22:08:46 +12:00
Matthias Mailänder
0dee8208a8 never spawn with density 0 because that is not rendered 2014-06-07 11:56:54 +02:00
Matthias Mailänder
1c92737798 Merge pull request #5570 from pchote/arch-packaging
Fix arch packaging (attempt two).
2014-06-07 11:02:13 +02:00