Compare commits

...

2286 Commits

Author SHA1 Message Date
Paul Chote
84c021f861 Merge pull request #5512 from Mailaender/d2k-repair-indicator-offset
Fixed the Dune 2000 repair indicator offset
2014-06-01 21:52:06 +12:00
Paul Chote
395aa5d29a Merge pull request #5515 from Mailaender/tolower-invariant
Fixed Dune 2000 crashing when placing buildings and using strange locale settings in latest playtest
2014-06-01 21:50:01 +12:00
Matthias Mailänder
75e19ca281 use ToLowerInvariant everywhere 2014-06-01 11:24:39 +02:00
Paul Chote
193325fbfa Merge pull request #5514 from Mailaender/d2k-arrakis-categories
Recatorized 3 tiles from Rock-Cliff-Sand to Rock-Cliff-Rock
2014-06-01 20:42:08 +12:00
Matthias Mailänder
e69e2b856b these don't show any sand 2014-06-01 10:12:16 +02:00
Paul Chote
adf8df5303 Merge pull request #5506 from Mailaender/openra.net
Replaced open-ra.org with openra.net in-game
2014-06-01 19:34:55 +12:00
Matthias Mailänder
9f0c7ea4d1 set repair indicator offset
fixes #5423
2014-06-01 09:15:18 +02:00
Paul Chote
7d33b353b7 Merge pull request #5511 from Mailaender/d2k-preview
Updated preview picture for Dune 2000
2014-06-01 19:12:50 +12:00
Paul Chote
104272cee5 Merge pull request #5476 from Mailaender/production-rallypoint-cache
Moved RallyPoint trait lookup into the constructor of Production
2014-06-01 19:04:58 +12:00
Matthias Mailänder
918fa879b6 update preview for d2k 2014-06-01 08:44:37 +02:00
Paul Chote
6dc83cf325 Merge pull request #5497 from Mailaender/map-rule-status-after-download
Fixed automatic map upload not refreshing map rule status
2014-06-01 18:29:39 +12:00
Paul Chote
1cc01a3a96 Merge pull request #5460 from Mailaender/system-libraries
Added support for SDL2 and Lua 5.1 system libraries
2014-06-01 18:14:05 +12:00
Matthias Mailänder
8a008447b3 Merge pull request #5489 from pchote/transport-fix
Simplify MoveAdjacentTo logic. Fixes #4449
2014-06-01 07:12:36 +02:00
Matthias Mailänder
00662fe391 also do a local rule check after map download 2014-06-01 06:01:41 +02:00
Matthias Mailänder
778f03baea add the new Lua API to make docs 2014-06-01 05:17:22 +02:00
Matthias Mailänder
e5c746df15 remove OpenRA.TilesetBuilder.exe from Linux packages 2014-06-01 05:16:53 +02:00
Matthias Mailänder
fe859c6fef rename everything freedesktop.org related install-linux-* 2014-06-01 05:15:30 +02:00
Matthias Mailänder
9e4713dc0a simplify startup scripts and configurable install directory 2014-06-01 05:10:25 +02:00
Matthias Mailänder
ff5ac155eb bring back install-shortcuts and add install-startup-scripts 2014-06-01 05:10:25 +02:00
Matthias Mailänder
b85610fcdd rename libexecdir to libdir 2014-06-01 05:10:25 +02:00
Matthias Mailänder
8e05243097 separate into icons and desktop from install-shortcuts 2014-06-01 05:10:25 +02:00
Matthias Mailänder
7c6cba889f strip unused dll map entries 2014-06-01 05:10:25 +02:00
Matthias Mailänder
77ed2ca331 add support for Debian multiarch 2014-06-01 05:10:25 +02:00
Matthias Mailänder
25933b012e add a hard-coded bundled library dllmap config to osx 2014-06-01 05:10:24 +02:00
Matthias Mailänder
3e53e84c1a abort earlier and harden against syntax errors 2014-06-01 05:10:24 +02:00
Matthias Mailänder
14429f6c11 be more verbose about success and handle failure with an error 2014-06-01 05:10:24 +02:00
Matthias Mailänder
dedafd1c22 also search /usr/local/lib and /opt/lib 2014-06-01 05:10:24 +02:00
Matthias Mailänder
99f6fce526 ralint is core and crashdialog (winform) tools 2014-06-01 05:10:24 +02:00
Matthias Mailänder
6c762f9c55 separate make dependencies into CLI and bundled native ones 2014-06-01 05:10:24 +02:00
Matthias Mailänder
6dfd89ce0d add configure script to workaround library naming differences 2014-06-01 05:10:24 +02:00
Paul Chote
883837a83c Merge pull request #5498 from Mailaender/invalid-map-key-download
Fixed KeyNotFoundException in ServerBrowser
2014-06-01 14:05:08 +12:00
Paul Chote
40eff95a10 Simplify MoveAdjacentTo logic. Fixes #5445. 2014-06-01 10:58:44 +12:00
Matthias Mailänder
5b86a8a6a8 open-ra.org → openra.net
closes #5500
2014-05-31 17:14:33 +02:00
Matthias Mailänder
a900f24466 calculate exitLocation before FrameEndTask
and add more null and dead checks to be safe
2014-05-31 16:11:50 +02:00
Matthias Mailänder
61d576ec6e harden map search preview against invalid data
fixes #5492
2014-05-31 15:19:22 +02:00
Matthias Mailänder
bb57ccd5bb update MapRuleStatus after download
fixes #5479
2014-05-31 13:14:53 +02:00
Matthias Mailänder
266240a3c1 Merge pull request #5502 from pchote/support-beacons
Support beacon polish fixes.
2014-05-31 10:35:48 +02:00
Paul Chote
e1501d5b7c Add clock overlay to support power beacons. 2014-05-31 18:41:02 +12:00
Paul Chote
91126b9c48 Move support power beacons into Airstrike/Nuke.
This allows each instance to close over the individual beacons. Fixes #5455.
2014-05-31 17:10:46 +12:00
Paul Chote
67f1207ef5 Merge pull request #5408 from RoosterDragon/perftimer-tick
Changed logging in DoTimed/RunActivity to create less overhead
2014-05-31 16:55:47 +12:00
Phrohdoh
4ef82f2863 Merge pull request #5488 from aaroncampf/bleed
Fixing issue #5308
2014-05-29 20:35:46 -05:00
Aaron Campf
6223b0f97d Fixing issue #5308 2014-05-29 18:16:34 -07:00
Matthias Mailänder
922c935d1a Merge pull request #5483 from obrakmann/some-map
Add a lua-powered single-player mission
2014-05-29 13:55:56 +02:00
Oliver Brakmann
e9e32b703e Add single-player mission 'Intervention' 2014-05-29 11:51:48 +02:00
Phrohdoh
8be4f02847 Merge pull request #5480 from Mailaender/d2k-concrete-color
Fixed concrete having the same radar color as sand.
2014-05-28 15:03:03 -05:00
RoosterDragon
d1b3d77662 Changed logging in DoTimed/RunActivity to create less overhead.
- Refactored PerfTimer to use less memory.
- Avoid using the PerfTimer in highly called methods DoTimed and RunActivity, instead tracking long ticks manually to reduce overhead and avoid memory allocations.
- Added some helper methods in PerfTimer to output information when a tick takes too long.
- Changed PerfTimer logging to output the time at the start of the line, and no longer truncate output per line.
- Settings.LongTickThreshold changed from TimeSpan to float and renamed to LongTickThresholdMs.
2014-05-28 16:38:05 +01:00
Matthias Mailänder
446884fec2 Merge pull request #5481 from Generalcamo/patch-8
Small Correction to one of the music names.
2014-05-28 16:18:48 +02:00
Cody Brittain
9a789a1e76 Small Correction to one of the music names.
Taken from Frank Klepacki's Website
2014-05-28 09:38:52 -04:00
Matthias Mailänder
4adaf9fa2d give concrete a color that is distinguishing from sand 2014-05-28 14:03:19 +02:00
Matthias Mailänder
c1f8a8e315 move RallyPoint lookup into a Lazy 2014-05-28 10:51:53 +02:00
Paul Chote
7eb2244f4b Merge pull request #5412 from RoosterDragon/formatting
Formatting
2014-05-28 12:09:47 +12:00
Paul Chote
ae7ab8f9e0 Merge pull request #5449 from Mailaender/nsis-lua-outpath-breakage
Fixed the OpenRA.Game.exe start menu link
2014-05-28 11:45:27 +12:00
Paul Chote
409e3a5ffc Merge pull request #5456 from Mailaender/travis-next-master
Adjustments to Travis CI
2014-05-28 11:32:41 +12:00
Paul Chote
59292e5b88 Merge pull request #5461 from Mailaender/sle-libraries
Replaced libraries with SUSE Linux Enterprise 11 SP3 binaries
2014-05-28 11:32:06 +12:00
Matthias Mailänder
4c50757b18 catch trait lookup in constructor
closes #5472
2014-05-27 17:17:02 +02:00
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
obrakmann
d6fe3c5fc3 Merge pull request #5447 from Mailaender/pickany-snow
Fixed broken random tiles in map editor for RA snow tileset
2014-05-26 17:03:34 +02:00
Matthias Mailänder
af9e85b18a Merge pull request #5462 from obrakmann/gdi04
Add remaining alternative gdi04 missions
2014-05-26 16:18:31 +02:00
Matthias Mailänder
baca227940 replace libraries with SUSE Linux Enterprise 11 SP3 binaries 2014-05-26 12:33:14 +02:00
Matthias Mailänder
87c506f241 Merge pull request #5420 from NukemBro/bleed
New Maps
2014-05-26 08:23:04 +02:00
Matthias Mailänder
1d2bde3a01 Merge pull request #5453 from Kanar/AirStopVoices
Small Polish: Adds voices for aircraft's stop-orders
2014-05-26 07:59:01 +02:00
Matthias Mailänder
b304f4754c we don't support SDL 1.2 anymore 2014-05-26 07:50:12 +02:00
Matthias Mailänder
f6657b3049 also watch master and next for deployment 2014-05-26 07:49:54 +02:00
Kanar
b6a758494b Small Polish: Adds voices for aircraft's stop-orders 2014-05-26 03:28:51 +02:00
Matthias Mailänder
3cc8c31d36 remove tile templates for non-existing sprites 2014-05-25 21:36:41 +02:00
Matthias Mailänder
76b7b3b18e add unused sprites to rv05 tile 2014-05-25 21:36:14 +02:00
Matthias Mailänder
1926588349 unbreak the OpenRA.Game.exe start menu link
fixes #5448
2014-05-25 17:39:04 +02:00
Matthias Mailänder
a585ce5f17 fix broken random tiles in map editor for RA snow tileset 2014-05-25 15:59:36 +02:00
Matthias Mailänder
4d933481ce Merge pull request #5444 from ScottNZ/bleed
Closes #5439
2014-05-25 14:10:57 +02:00
ScottNZ
40e9fb93d6 Revert project file changes by RoosterDragon which would cause the TD mod to fail to load for some reason on Windows (de7a837d94, #5403).
VS will also generate a warning if it tries to source an icon from somewhere not in the project directory, so added it to the CrashDialog folder.
2014-05-26 00:07:30 +12:00
Paul Chote
a7aa5bebe5 Merge pull request #5429 from psydev/map
fixed a tib tree in Rogue States + polish
2014-05-25 23:38:04 +12:00
Paul Chote
cde015ec4d Merge pull request #5442 from Mailaender/frozen-actor-regression
Fixed frozen actors not visible under fog
2014-05-25 23:33:13 +12:00
Matthias Mailänder
fd185a5ca0 Merge pull request #5441 from ScottNZ/news
Closes #5438
2014-05-25 09:14:06 +02:00
Matthias Mailänder
683edd2c37 fix frozen actors not visible under fog 2014-05-25 09:07:25 +02:00
ScottNZ
157a42a3d5 Revert "Move cnc perf graph out of the way of the news button"
This reverts commit 8fc3870656.
2014-05-25 15:13:05 +12:00
Grant H.
0f49b402ef Map fixes
-Fixed/balanced "Man to Man" 1v1 map.
-Made minor alterations to "Singles" 1v1 map.
2014-05-24 21:30:58 -05:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12:00
Chris Forbes
51b70777bd Merge pull request #5432 from Mailaender/replay-filter-nre
Fixed NullReferenceException when there are no replays
2014-05-25 10:56:02 +12:00
Chris Forbes
2d90032ce9 Merge pull request #5404 from RoosterDragon/remove-as-hashset
Changed removeActorPosition field in ActorMap into a set.
2014-05-25 10:53:19 +12:00
Chris Forbes
f7c91a9932 Merge pull request #5433 from RoosterDragon/main-loop-alloc
Reduce memory allocations in the main loop.
2014-05-25 10:38:27 +12:00
Matthias Mailänder
7cb8d0fef0 Merge pull request #5435 from reaperrr/ra-polish
Fixed RA camo pillbox desert art and aircraft selection boxes
2014-05-24 21:25:46 +02:00
reaperrr
0c109ed3ea Tweaks aircraft selection box bounds.
Closes #5208.
2014-05-24 20:45:37 +02:00
reaperrr
b3aaa6b1f1 Fixes camo box desert art.
Removes swimming pixel effect and bogus remap pixels. Closes #4796.
2014-05-24 20:44:24 +02:00
Matthias Mailänder
f83e27ae9a Merge pull request #5403 from RoosterDragon/solution-config
Unify settings for solution and project setups.
2014-05-24 17:13:43 +02:00
Matthias Mailänder
ca0fe59c41 make sure replays is always initialized
fixes #5431
2014-05-24 17:10:13 +02:00
Oliver Brakmann
d6f3d1035e Add port of scg04wb mission 2014-05-24 14:35:45 +02:00
Oliver Brakmann
668e5318fb Add port of scg04wa mission 2014-05-24 14:35:44 +02:00
Matthias Mailänder
5a3e333570 Merge pull request #5426 from pchote/replayfix
Save the replay metadata block when quitting.
2014-05-24 13:55:24 +02:00
Matthias Mailänder
2b555623fb Merge pull request #5425 from pchote/pingfix
Separate ping lifetime from beacons.
2014-05-24 13:51:08 +02:00
Matthias Mailänder
b33dbe2f7c Merge pull request #5396 from reaperrr/ts-update
TS mod fixes and additions
2014-05-24 13:36:17 +02:00
Paul Chote
910db14ee8 Save the replay metadata block when quitting. 2014-05-24 23:13:19 +12:00
Psydev
81c72e622d fixed a tib tree in Rogue States + polish 2014-05-24 04:12:46 -07:00
reaperrr
e1b78bc728 Tweaks Mammoth Mk.2 firing offsets 2014-05-24 13:12:32 +02:00
reaperrr
4aafd4ecf4 Adds TODO comments to GDI placeholder defenses 2014-05-24 13:12:31 +02:00
reaperrr
ee77be25d6 adds disabled voxel sequences for various unused voxels for possible use later on 2014-05-24 13:12:31 +02:00
reaperrr
37f831ca9c Adds defenses and advanced Nod power plant, fixes GDI radar dish animation
Additionally tweaks offsets for deployed artillery and tick tank.
2014-05-24 13:12:30 +02:00
Paul Chote
cb13335b8d Separate ping lifetime from beacons. Fixes #5424. 2014-05-24 23:05:22 +12:00
Paul Chote
f5badcfc98 Merge pull request #5415 from pavlos256/replayrecorder-disposing-crash
Fix #5414
2014-05-24 20:55:38 +12:00
Matthias Mailänder
5826c41741 Merge pull request #5422 from pchote/but-I-do-have-shroud
Avoid a loop closure issue that caused incorrect sequence lookups.
2014-05-24 10:48:14 +02:00
Paul Chote
51c5797a42 Avoid a loop closure issue that caused incorrect sequence lookups. 2014-05-24 20:32:42 +12:00
Matthias Mailänder
aed5c0d4ce Merge pull request #5419 from pchote/news
Ingame news tweaks
2014-05-24 10:19:20 +02:00
Paul Chote
59993653aa Point news url at the website. 2014-05-24 20:08:48 +12:00
Paul Chote
932765d0c4 Adjust news dialog layout. 2014-05-24 20:08:48 +12:00
Grant H.
260966649f New Maps
-Added Updated/Balanced version of Doubles
-Added "Singles," 1v1 version of Doubles
-Added "Synergy," 3v3 Ground, Naval, and Air
2014-05-24 01:17:46 -05:00
Paul Chote
ccd9797caf Fix TD spawn dialog dropdown background. 2014-05-24 18:06:40 +12:00
Matthias Mailänder
cb1a222fd5 Merge pull request #5418 from pchote/bullet-contrails
Remove contrails from AA Gun and Sniper.
2014-05-24 06:52:41 +02:00
Paul Chote
6cdd89a2e6 Remove contrails from AA Gun and Sniper. Fixes #5417. 2014-05-24 16:34:58 +12:00
Paul Chote
83f742c679 Merge pull request #5399 from Squiggles211/spawn_choices
Fixes #5394 Spawnpoint dropdown count
2014-05-24 16:13:31 +12:00
Paul Chote
0c44ae0265 Merge pull request #5413 from psydev/patch-1
Reduce Grenadier dmg vs. heavy from 50% -> 35%
2014-05-24 16:10:57 +12:00
RoosterDragon
e07c9fc791 Deduplicate OpenRA.ico.
Use a path with backslashes to satisfy VS2012.
2014-05-23 21:22:06 +01:00
Matthias Mailänder
9ff1a317fd Merge pull request #5402 from RoosterDragon/traitdictionary-contains
Fixed TraitDictionary.Contains to use Any() rather than Count() != 0.
2014-05-23 19:43:48 +02:00
Matthias Mailänder
dea15a0ffe Merge pull request #5407 from psydev/maps
Maps: 1 new map, 2 map updates
2014-05-23 19:30:41 +02:00
Pavlos Touboulidis
5a286ef15e Fix #5414 2014-05-23 19:08:45 +03:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
psydev
6c46f9d198 Reduce Grenadier dmg vs. heavy from 50% -> 35%
Grenadier is a wee bit too powerful vs. everything. 
This will keep its value vs. heavy armor still very high, but not OP like it is for the cost. 
(Grenadier will still have highest DPS vs. heavy as a function of cost, after this nerf).
2014-05-23 07:20:41 -07:00
RoosterDragon
a0db80cb6a Changes to reduce allocations in the main loop.
Targeted some methods that generated allocated a lot of memory in the main game loop:
- Actor.Render - Changed LINQ calls into equivalent loops. No allocation for delegates.
- Animation.Render - Returned an array rather than a yield expression. The array uses less memory than the complier generated enumerable.
- FrozenActor and FrozenUnderFog - Materialize the footprint into an array: The enumerable is not-trivial to evaluate is and evaluated many times inside the Tick function. The memory needed is minimal. Changed LINQ into equivalent loops to prevent delegate allocation. Should result in overall much faster calls.
- Widget.GetEventBounds - Changed LINQ calls into equivalent loops.
- MobileInfo.CanEnterCell - Changed LINQ calls into equivalent loops. Don't materialize list of blocking actors every time, instead enumerate them and only when they need to be checked.
- FrozenUnderFog.TickRender - Generate the renderables lazily and also remove a no-op Select call.
2014-05-23 14:48:11 +01:00
Psydev
11a3b3d4fc minor: removed "C&C" from the title of Haos Ridges 2014-05-23 06:14:12 -07:00
Psydev
fd0287cec0 improved "Deterring Democracy". Better tib.
Changed layout of tiberium, especially blue tib.
Removed hospitals.
2014-05-23 06:12:09 -07:00
Psydev
13483f797a new map: "Profit Over People" (1vs1) 2014-05-23 05:23:57 -07:00
Psydev
15e7b098d1 re-add 8-player version of HoS, with "8P" title
Includes same minor aesthetic fixes as 4P version.
2014-05-23 05:22:28 -07:00
Psydev
5c38fcee27 fix + replace Hegemony or Survival with 4p version
There were a few leftover minor aesthetic issues with the map which I
quickly fixed.
I decided that not many people would play the 8P version of this map, so I
made the 4P version the one included. It's actually fun.
2014-05-23 05:20:56 -07:00
reaperrr
467d1b6137 Adds Scorch and Crater marks to world, adds Heavy start unit support for testing purposes 2014-05-23 13:39:51 +02:00
reaperrr
06fc2a31d6 Fixes offsets, adds muzzles and Turret ROT values for several vehicles.
Adds cloak sound to stealth tank.
2014-05-23 13:39:50 +02:00
reaperrr
21625f5650 Fixes bounds, offsets, FireDelays and weapons for some infantry 2014-05-23 13:39:50 +02:00
reaperrr
425d02e86b Adds several previously missing weapons, resets Versus values to original TS values
Fixes flameall.shp to cover 8 directions instead of only 4
2014-05-23 13:39:49 +02:00
RoosterDragon
2bd8778c55 Changed removeActorPosition field in ActorMap into a set.
This is because it's purpose is to be queried via Contains when actors needed to be removed.
2014-05-23 08:30:45 +01:00
RoosterDragon
da6b5c1ce4 Fixed TraitDictionary.Contains to use Any() rather than Count() != 0.
This means it can bail early if a match is found.
2014-05-23 08:25:47 +01:00
RoosterDragon
de7a837d94 Unify settings for solution and project setups.
Create a single solution platform named x86.
Ensure both Debug and Release configs build to the root for all projects.
Ensure all Release configs generate pdbs.
2014-05-23 08:16:09 +01:00
Squiggles211
7e2599c898 Fixes #5394 Spawnpoint dropdown count
Fixes where the spawn point dropdown would show the same number of spawn
points as the number of players rather than the actual number of
available spawn points.
2014-05-23 02:14:16 -05:00
Paul Chote
db08357e36 Merge pull request #5215 from pavlos256/replay-meta
Replay meta
2014-05-23 11:30:12 +12:00
reaperrr
9d5228d141 Set Tick value for various TS infantry sequences to 80 2014-05-22 22:27:55 +02:00
reaperrr
887ec938cc adds muzzle sequences for vehicles 2014-05-22 22:27:54 +02:00
reaperrr
dc143d0967 Adds sequences for flameall, scorch and crater marks, and smoke placeholder 2014-05-22 22:27:53 +02:00
reaperrr
3fcd77eb41 Adds various crate effect sequences, removes levelup ra backfall. 2014-05-22 21:50:05 +02:00
reaperrr
077efb5884 Fixes two music track titles 2014-05-22 21:46:11 +02:00
reaperrr
e4b37c1b5d Reduce speed penalty for vehicles on certain terrain types.
The old one were a bit harsh.
2014-05-22 21:36:24 +02:00
reaperrr
a5eb398840 Merge pull request #5379 from Mailaender/alpha-lamb
Added the Tiberian Sun light post
2014-05-22 21:20:48 +02:00
Pavlos Touboulidis
b8bbd55598 Misc changes
* Use Pair instead of KeyValuePair
* double -> var
* Butcher XML comments
* Change WinState default to Undefined and use it instead of the new GameOutcome
* Other changes
2014-05-22 21:57:07 +03:00
Pavlos Touboulidis
fe1eb1f3e0 Use the stream extensions instead of the BinaryReader/Writer 2014-05-22 21:54:15 +03:00
Pavlos Touboulidis
39cc4cc014 Use "debug" channel to report loading exceptions 2014-05-22 21:54:15 +03:00
Pavlos Touboulidis
38a5e326f6 Fix crash when trying to read empty replay files
It was crashing because it tried to seek 8 bytes before the end
of a file that was empty (zero length).

I also added a few more checks and another try/catch to prevent
any more crashes related to damaged files.
2014-05-22 21:54:15 +03:00
Pavlos Touboulidis
f4c52eefae Change date labels
Change "Last Week" to "Last 7 days" and "Last Month" to "Last 30 days".
Also added a "Last 14 days" option.
2014-05-22 21:54:15 +03:00
Pavlos Touboulidis
de0a5ebd43 Improve replay metadata and the replay browser
List of changes:

* Better and more filters with new layout, for both mods.

* Rename/Delete/Detele all functionality.

* Simplified ReplayMetadata class considerably by introducing a new
GameInformation data object. The new GameInformation class contains
more information than previously available so the new solution is not
compatible with old replays, meaning it can't read old replays.

* Better and cleaner game information gathering in order to be written
at the end of the replay file.

* Revert changes to ReplayConnection, no longer necessary.

* Better exception message on missing sprites and fonts.

* New "SpawnOccupant" class that holds all the information needed by the
MapPreviewWidget to visualize a spawn point. It was using Session.Client
before and it was necessary to separate it to be able to show information
not available at lobby time.

* Fix keyboard focus UI bug when closing a window would not remove focus.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
042910bd5e New common dialog: TextInputPrompt to get a string from the user
For both ra and cnc
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
713141cf4d Support for input validation on TextFieldWidgets
See OnTextEdited(), IsValid(), TextColorInvalid (with the default in metrics.yaml).
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
ce8c42b552 Style & nit fixes 2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
a80c4f086a Add filters to the replay browser dialog
This closes issue #2152. The filters added are:

* Game type (singleplayer / multiplayer)
* Date
* Duration
* Outcome
* Player name

Other changes:

* Added a 'CollapseHiddenChildren' option to the ScrollPanelWidget to
make hidden children take up no space.
* Removed the extension (.rep) from the replay filenames in the
replay browser.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
98a05b61b3 Add metadata block to replays
The replay files are just streams all network communication so to
get any info out of them it is necessary to play back the stream
until the wanted information is reached.

This introduces a new metadata block placed at the end of the
replay files and logic to read the new block, or fall back to
playing back the stream for older files.

The replay browser is also updated to use the metadata information
instead of reading the replay stream directly.
2014-05-22 21:54:14 +03:00
Matthias Mailänder
20a441a1f4 add the Tiberian Sun light post 2014-05-22 14:59:43 +02:00
Paul Chote
4454c0c2f8 Merge pull request #5372 from Mailaender/desert-tree-exclude
Fixed temperat trees showing up in the Tiberian Dawn DESERT tileset
2014-05-23 00:57:27 +12:00
Paul Chote
d252d1cf18 Merge pull request #5366 from Mailaender/rpmlint-duplicates
Removed duplicates identified by RPMlint
2014-05-23 00:56:01 +12:00
Matthias Mailänder
4eaeff8ccb Merge pull request #5393 from pchote/palettehax
Support per-animation palettes in RenderSprites.
2014-05-22 14:54:39 +02:00
Paul Chote
892f3c834c Merge pull request #5365 from Mailaender/tools-shortcuts
Separated tools and /usr/bin shortcuts
2014-05-23 00:53:42 +12:00
Paul Chote
ab1ce4554d Fix star port and repair depot lights. 2014-05-23 00:37:21 +12:00
Paul Chote
8e18e34a8b Fix D2K construction yard overlays. 2014-05-23 00:37:20 +12:00
Paul Chote
46a7c9c469 Add custom palette support to With*Overlay. 2014-05-23 00:37:20 +12:00
Paul Chote
900f5bffb5 Change Bib to use RenderSprites. 2014-05-23 00:37:20 +12:00
Paul Chote
4c92c5da99 Support per-animation palettes. 2014-05-23 00:37:20 +12:00
Paul Chote
15f63fb5ea RenderSprites.anims is finally private.
Followup to #3348.
2014-05-23 00:37:20 +12:00
Paul Chote
4aa7376994 Add wrappers for RenderSprites anims dictionary. 2014-05-22 23:35:10 +12:00
Paul Chote
475aa93271 Merge pull request #5373 from Mailaender/repair-overlay
Added the Dune 2000 repair depot active overlay
2014-05-22 23:29:53 +12:00
Paul Chote
2b5667d5b0 Merge pull request #5376 from Mailaender/airdrop-overlay
Added the Dune 2000 starport lights
2014-05-22 23:27:32 +12:00
Matthias Mailänder
ecf199560a Merge pull request #5392 from reaperrr/levelup-palette
Adds separate LevelUpPalette to GainsExperience
2014-05-22 13:19:14 +02:00
reaperrr
61edd6bc89 Adds separate LevelUpPalette to GainsExperience.
Needed for TS mod, as TS veteran crate effect anim uses a different palette than the rank chevrons.
2014-05-22 13:01:35 +02:00
Matthias Mailänder
e80eb7e0ee Merge pull request #5353 from pchote/map-validation
Disable maps with invalid rules
2014-05-22 09:55:06 +02:00
Matthias Mailänder
6081a4f16b Merge pull request #5390 from Squiggles211/hpad_reserved
Fixes #4955 aircraft reservation crash
2014-05-22 09:50:08 +02:00
Matthias Mailänder
7fad385d8c Merge pull request #5381 from Squiggles211/bridge_targeting
Lower BridgeHut Selectable Priority
2014-05-22 09:09:59 +02:00
Squiggles211
0e4b1d28aa Fixes #4955 aircraft reservation crash
Fixes the specific cause of the crash reported in #4955 with HeliReturn
and adds an UnReserve call while attempting to reserve spawn building in
Aircraft.cs
2014-05-22 01:38:08 -05:00
Paul Chote
a040abd539 Merge pull request #5389 from pavlos256/preload-sequences
Preload sequences
2014-05-22 17:45:38 +12:00
Pavlos Touboulidis
531338a955 Preload sequences and fix #5382 2014-05-22 03:45:28 +03:00
Pavlos Touboulidis
df0d1360dd Give PerfTimer the ability to write only slow operations to the log
This is useful to ignore fast operations that just spam the log.

The class had to be reworked because it couldn't properly handle cases
where all of a node's children where below the threshold.

Also changed DoTimed() and RunActivity() to use PerfTimer.
2014-05-22 03:40:36 +03:00
Paul Chote
df7e82ee96 Merge pull request #5388 from reaperrr/shp-fixes
Various RA/TD mod shp fixes
2014-05-22 11:09:00 +12:00
reaperrr
a8cf41dba3 Compressed/re-compressed cnc mod shps. 2014-05-21 22:35:03 +02:00
reaperrr
40baf8e450 Compressed some more uncompressed shps in ra bits folder. 2014-05-21 21:51:50 +02:00
reaperrr
e01596034b Minor shp fixes.
Removed green pixels from mine.int, fixed a few non-remapable red pixels on afldidle.shp.
2014-05-21 21:50:34 +02:00
Matthias Mailänder
ad2ee2e75f Merge pull request #5385 from reaperrr/sniper-fix
Replaces uncompressed sniper.shp with a  XCC-Mixer-compressed version
2014-05-21 19:50:48 +02:00
Matthias Mailänder
daa58e150b Merge pull request #5367 from psydev/mapfix
Updated 2 of psydev's recent TD maps -- minor fixes
2014-05-21 19:27:36 +02:00
reaperrr
ada6df279b Replaces uncompressed sniper.shp with a XCC-Mixer-compressed version. 2014-05-21 18:26:56 +02:00
Psydev
ab7a3bd986 updated pirates & emperors - no TEMPERAT trees
All trees are from the original C&C Desert tileset. Made a few tiny
changes to layout as a result.

The dense tree/cactus/rock areas near the bases have been thinned out
slightly.
2014-05-21 03:55:35 -07:00
Squiggles211
099d2a5400 Lower BridgeHut Selectable Priority
Fixes #4738 where player was unable unable to attack units/buildings that
are next to or on a bridge.
2014-05-21 00:40:48 -05:00
Chris Forbes
65c990c274 Merge pull request #5380 from pavlos256/strategic-replay-crash
Fix strategic map replay exception
2014-05-21 16:32:10 +12:00
Pavlos Touboulidis
b38542643d Fix strategic map replay exception 2014-05-21 00:57:21 +03:00
Matthias Mailänder
d80edcd4e8 add Tiberian Sun repair depot 2014-05-20 20:52:47 +02:00
Matthias Mailänder
5274776d55 add the Dune 2000 repair depot active overlay 2014-05-20 11:48:52 +02:00
Matthias Mailänder
ddb0d70fd2 add the starport active animation 2014-05-20 11:41:41 +02:00
Matthias Mailänder
d4a64386c3 exclude temperat trees in the desert tileset 2014-05-20 08:36:03 +02:00
Matthias Mailänder
4dda29a138 removed duplicates identified by rpmlint 2014-05-20 07:18:47 +02:00
Paul Chote
f1d144bfe8 Merge pull request #5370 from pavlos256/lua-dispose-crash
Possible fix for lua crash #5269
2014-05-20 12:38:40 +12:00
Paul Chote
72095c7fef Merge pull request #5280 from WolfGaming/techleveltraits
TechTreeTrait system has been made
2014-05-20 12:35:26 +12:00
Paul Chote
791d4c9e9e Merge pull request #5342 from ScottNZ/winmake
Use MSBuild to improve make.ps1's clean function
2014-05-20 12:19:44 +12:00
Paul Chote
7cc78c1dcd Merge pull request #5345 from Squiggles211/ammo_reload_timing
Fixes inconsistency in reload times for Cnc Aircraft
2014-05-20 12:04:11 +12:00
Paul Chote
32373e84c8 Merge pull request #5346 from reaperrr/heli-watercrash
Changed Combat WaterExplosion check to trigger below 0 as well
2014-05-20 11:51:15 +12:00
Paul Chote
66398d85f7 Merge pull request #5339 from Mailaender/tesla-instant-kill-hack-removal
Removed TeslaInstantKills
2014-05-20 11:49:07 +12:00
Pavlos Touboulidis
a8b2187d93 Possible fix for lua crash #5269
Check if this instance has been disposed and don't call 'tick'
if it has.

Also remove the finalizer that was broken and wrong anyway.
'runtime' would never become null because it's readonly and
managed resources are freed automatically or may have already
been freed by then.
2014-05-19 23:37:23 +03:00
reaperrr
b85ea7cb3a Changes isWater check to trigger at pos.Z at or below 0, not just at 0. 2014-05-19 18:00:40 +02:00
Psydev
77c355422f updated pirates_and_emperors
Moved start location, added many trees.
2014-05-19 05:13:54 -07:00
Psydev
956b5db8af fixed letters_from_lexington and narrowed map 2014-05-19 05:12:03 -07:00
Matthias Mailänder
67b6d1dbda separate tools and /usr/bin shortcuts 2014-05-19 11:32:18 +02:00
Matthias Mailänder
638b0d8008 Merge pull request #5334 from ForNeVeR/encoding-patch
Closes #5261
2014-05-19 08:17:35 +02:00
Matthias Mailänder
111fcdb86e Merge pull request #5354 from pchote/fading
Add TD fade to/from black behavior to other mods.
2014-05-19 08:11:44 +02:00
Matthias Mailänder
04991cca78 Merge pull request #5362 from pchote/td-ui-polish
Update TD chrome.svg (again)
2014-05-19 07:42:53 +02:00
WolfGaming
c873cac6e7 Added needed yaml files 2014-05-19 04:29:29 +00:00
WolfGaming
75e13592b2 Adding to the Authors file 2014-05-19 03:29:25 +00:00
WolfGaming
00698cefff Added in code for Tech Levels using prereqs
and fixed up some kinks of the old system
2014-05-19 03:29:25 +00:00
Paul Chote
f7c0416b2e Merge pull request #5359 from Mailaender/mersenne-twister
Renamed OpenRA.Support.Random aka XRandom to MersenneTwister
2014-05-19 11:07:21 +12:00
Paul Chote
2995a7dd55 Merge pull request #5341 from Mailaender/travis-deploy
Setup Travis CI to deploy GitHub releases
2014-05-19 10:52:36 +12:00
Paul Chote
cfdbc06a31 Add fade in/out effects to RA and TS.
The palette effect interacts badly with the multiplicative blending in D2K.
2014-05-19 10:32:51 +12:00
Paul Chote
b3313be217 Remove the now-redundant CncWidgetUtils.cs 2014-05-19 10:24:22 +12:00
Paul Chote
05eb56b1e2 Simplify MenuPaletteEffect activation. 2014-05-19 10:24:09 +12:00
Paul Chote
eb840d868c Update chrome.svg to match the generated png. 2014-05-19 10:19:55 +12:00
Matthias Mailänder
187362e80e rename OpenRA.Support.Random aka XRandom to MersenneTwister 2014-05-18 21:53:21 +02:00
Matthias Mailänder
c674fc2f72 Merge pull request #5357 from pchote/td-ui-polish
UI polish fixup
2014-05-18 12:16:42 +02:00
Paul Chote
52e9c58d1a Update colorpicker circle to match spawn points. 2014-05-18 21:40:53 +12:00
Matthias Mailänder
9a609099bf Merge pull request #5343 from Saticmotion/bleed
Fixes #5050
2014-05-18 11:02:15 +02:00
Matthias Mailänder
ff5ec00edc Merge pull request #5348 from reaperrr/ra-shroud-cheatlabel
Closes #5167
2014-05-18 10:52:23 +02:00
Matthias Mailänder
2d56376705 Merge pull request #5356 from pchote/td-ui-polish
TD UI Polish
2014-05-18 10:37:05 +02:00
Paul Chote
417736cdac Merge pull request #5355 from Mailaender/missing-bot-slot-sync
Fixed closing slots not removing bots properly
2014-05-18 20:05:59 +12:00
Paul Chote
2e2a264c22 Use smaller spawn points. 2014-05-18 19:53:06 +12:00
Matthias Mailänder
1147a572da fix closing slots not removing bots properly 2014-05-18 09:49:29 +02:00
Paul Chote
411964c1c2 Go back to the smaller circle for the colorpicker. 2014-05-18 19:14:42 +12:00
Paul Chote
948b10aca1 Fix incorrect font in spawn selector. 2014-05-18 19:09:42 +12:00
Paul Chote
d548b88a57 Adjust the singleplayer menu button positions to remove unnecessary mouse movement. 2014-05-18 19:07:22 +12:00
Matthias Mailänder
09e5cf2d03 whitespace cleanup 2014-05-18 08:16:51 +02:00
Matthias Mailänder
09fb435d45 automatic rule upgrade 2014-05-18 08:12:22 +02:00
Matthias Mailänder
2c38f3ede9 remove TeslaInstantKills 2014-05-18 08:09:56 +02:00
Paul Chote
69e87b0057 Disable maps with broken rules in the lobby. Fixes #4334. 2014-05-18 17:41:36 +12:00
Paul Chote
657ade7221 Add map folder types. Fixes #4635. 2014-05-18 17:29:42 +12:00
Paul Chote
e6d1f30cf0 Use an IReadOnlyDictionary for package definitions. 2014-05-18 17:29:42 +12:00
Paul Chote
d7c445b117 Merge pull request #5352 from Squiggles211/mp_lobby_fix
Fixes lobby crash when joining MP game
2014-05-18 17:29:09 +12:00
Squiggles211
5a60dc6a56 Fixes crash when joining multiplayer lobby
Fixes crash when joining a multiplayer lobby caused by recent spawn
choice changes.
2014-05-17 23:37:54 -05:00
reaperrr
63641bb4d9 Renamed Developer Mode to Cheats for consistency.
Added notion that it disables FoW as well to Disable Shroud cheat option.
2014-05-18 01:32:35 +02:00
Paul Chote
3beabfd205 Merge pull request #5335 from Mailaender/travis-cache
Try to cache the build dependencies for Travis CI
2014-05-18 11:02:06 +12:00
Paul Chote
53be4e36ea Merge pull request #5344 from obrakmann/remove-lua-deprecation-notice
Remove the deprecation notice from the old Lua interface
2014-05-18 11:01:28 +12:00
reaperrr
52816dcc3b Adds WaterExplosion and WaterImpactSound to UnitExplodeSmall.
Fixes #4515.
2014-05-18 00:29:34 +02:00
Saticmotion
1ead9bb7fd Added a description to the pillbox 2014-05-17 22:17:59 +02:00
Squiggles211
0503ed7119 Fixes inconsistency in reload times for Cnc Aircraft
Fixes reload time inconsistency caused by always running the reload
counter even when not needing to reload.  Also adds the ability to
specify that the reload counter restarts when firing a shot.
2014-05-17 13:52:52 -05:00
Oliver Brakmann
b90e6ccae5 Remove the deprecation notice from the old Lua interface
Fixes #5332.  The impending deprecation should probably still be
mentioned in the release notes.
2014-05-17 19:34:57 +02:00
obrakmann
a15564f54d Merge pull request #5337 from Mailaender/explodes-infdeath-null
Fixed Explodes never triggering
2014-05-17 19:25:21 +02:00
Matthias Mailänder
a0ac95ebf7 Merge pull request #5340 from obrakmann/fix5338
Check proc's health before (un)docking. Fixes #5338
2014-05-17 18:05:49 +02:00
ScottNZ
1f34e40b14 Use MSBuild to improve make.ps1's clean function 2014-05-18 03:28:23 +12:00
Matthias Mailänder
96d39d4dee use Travis CI to deploy GitHub releases
closes #3775
2014-05-17 17:24:55 +02:00
Oliver Brakmann
062e7f5298 Check proc's health before (un)docking. Fixes #5338 2014-05-17 17:09:46 +02:00
Matthias Mailänder
0f15274151 don't require InfDeath for Explodes
closes #5336
2014-05-17 16:31:08 +02:00
Matthias Mailänder
83034845ef Update README.md
https://github.com/OpenRA/OpenRA-Resources
2014-05-17 15:25:15 +02:00
Matthias Mailänder
7769a3a0e9 try to cache the build dependencies 2014-05-17 14:29:23 +02:00
Paul Chote
578b071fd4 Merge pull request #5318 from WolfGaming/cloak
Added UncloakOnAttack variable to Cloak
2014-05-18 00:28:50 +12:00
Paul Chote
9a0248bbb9 Merge pull request #5302 from Mailaender/console-commands
Added pause and surrender console commands
2014-05-18 00:28:10 +12:00
Matthias Mailänder
8e79879ee8 merged Pause/Surrender into PlayerCommands 2014-05-17 14:13:44 +02:00
Matthias Mailänder
98c2a7e591 Merge pull request #5331 from obrakmann/mission-fixes
Mission fixes
2014-05-17 14:02:23 +02:00
Paul Chote
31ac2340fe Merge pull request #5234 from pavlos256/startup
Improve startup speed
2014-05-17 23:50:45 +12:00
Pavlos Touboulidis
f651cb3677 Final style & rebase fixes 2014-05-17 14:34:52 +03:00
Pavlos Touboulidis
df6159f12b Do not use the map's rules when rendering the minimap in the map chooser
Using the mod's rules is *a lot* faster because we don't have to load
each map's rules.
2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
ca44be7b2e Only update the loading screen from the main thread
Fixes the crash experienced by pchote. It's a hack but it's easy
to get rid of and it will have to do for now, until the messy
LoadScreen gets fixed.
2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
a845947e0f Minor style & nit fixes 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
d2ba50fe19 Add null perf channel to Editor 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
0eac2afff4 Assign world from the constructor and make the field readonly 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
e0628b5f24 Change IngameChatLogic & MusicPlayerLogic to use the mod's rules, not the map's 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
6f3d9e9c97 Remove unused "Manifest" argument from World constructor 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
b560268495 Change animations to use the proper SequenceProvider
Remove references to the global "Game" and use the SequenceProvider
of the current world/map.
2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
6eabc6adf5 Remove one line of forgotten commented-out code 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
49ec533481 Better distinction between Widgets using the mod's DefaultRules or the map's Rules 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
3eefcc69f8 Use proper map rules in ProductionTooltipLogic.cs 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
d9db1c1854 Revert replacing generic Ui.OpenWindow with static method in MusicPlayerLogic 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
10b8093d5a Rename ModInformation to ModMetadata 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
0e15ce1b88 Replace catch(KeyNotFoundException) with TryGetValue() 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
5bbf442cd0 Remove reference to Game.modData 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
cb30553000 Remove stray newlines 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
894db95d58 Move Ruleset.cs from Map/ to GameRules/ 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
44c01bbaa2 Remove TileSetData and separate TileSet from Sequences 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
750fc4e02c Merge ModRuleset and MapRuleset into Ruleset 2014-05-17 14:33:16 +03:00
Pavlos Touboulidis
48d1dde8a7 Change comment about delayed actions 2014-05-17 14:32:03 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Pavlos Touboulidis
c68427eaa6 Less aggressive rules caching
ActorInfo instances depend on the whole set of ActorInfos
2014-05-17 14:26:54 +03:00
Pavlos Touboulidis
693186e1eb Fix caching by making the tileset part of the key 2014-05-17 14:26:54 +03:00
Pavlos Touboulidis
495ad989d8 Add dummy "perf" log channel to Utility 2014-05-17 14:26:54 +03:00
Pavlos Touboulidis
2b3d5f1544 Better caching for Rules and Sequences
Refactored the Rules and SequenceProvider classes to be parts of ModData and
maintain a cache of the instances used in the mod.

The caching reduced the load times a lot, especially after the first load.
Some lazy loading in sequences also helped lower the startup time..

Note: The static classes were left behind to redirect the existing code's
calls.
2014-05-17 14:26:53 +03:00
Pavlos Touboulidis
77d0199384 Convert ActorReference field to Lazy
Makes LoadMaps 40% faster
2014-05-17 14:26:53 +03:00
Paul Chote
2acba2ce47 Merge pull request #5242 from reaperrr/deathsounds-followup
Made DeathSounds and their InfDeath relation fully customizable
2014-05-17 23:24:44 +12:00
Paul Chote
1619df77a8 Merge pull request #5252 from Mailaender/zenity
Added native Gtk+ crash dialogs on Linux
2014-05-17 22:45:05 +12:00
Matthias Mailänder
fcc49b2cf4 clean up old Changelog files 2014-05-17 12:13:59 +02:00
Matthias Mailänder
c17aa2f467 don't ship OpenRA.CrashDialog.exe on Mac/Linux 2014-05-17 12:13:58 +02:00
Matthias Mailänder
991ddf035a put all remaining WinForms targets together
so it is easier to get rid of them
2014-05-17 12:13:58 +02:00
Matthias Mailänder
65829bb58c GitHub URLs have changed
https://developer.github.com/changes/2014-04-25-user-content-security/
2014-05-17 12:13:58 +02:00
Matthias Mailänder
a9664691e6 always spawn the native error dialog 2014-05-17 12:13:58 +02:00
Matthias Mailänder
0a5d78bbf1 fix missing hard-coded native deps after make install 2014-05-17 12:13:58 +02:00
Matthias Mailänder
8dd0c34a56 document the launch scripts 2014-05-17 12:13:58 +02:00
Matthias Mailänder
73704a2a84 copy launch scripts during Linux make install 2014-05-17 12:13:58 +02:00
Matthias Mailänder
46230e2a81 condense into one graphical crash dialog
make it more robust against missing dependencies
2014-05-17 12:13:58 +02:00
Matthias Mailänder
bae47ff3c9 use native Gtk2 crash dialogs on Linux
closes #3872
closes #3849
2014-05-17 12:13:50 +02:00
ForNeVeR
06671c8aa4 Fix encoding problems with ZipFile.
Without setting the DefaultCodePage it may cause problems on systems without 866 code page installed.
2014-05-17 17:11:29 +07:00
Oliver Brakmann
c0610ad1e7 Various fixes to gdi04a
* Remove support for difficulty levels
* Fix victory conditions for the enemy player
* Adjust difficulty due to the recent balance changes
2014-05-17 11:00:33 +02:00
Oliver Brakmann
b1c0a1fb11 Fix gunboat/turret battle in gdi01 2014-05-17 10:17:47 +02:00
Paul Chote
97ac0c494b Merge pull request #5266 from pavlos256/utility-globbing
Fixes #4615: OpenRA.Utility should expand wildcards in paths
2014-05-17 18:42:09 +12:00
Paul Chote
0458b932a0 Merge pull request #5115 from Mailaender/split-lobby-sync
Splitted LobbyInfo updates into smaller chunks
2014-05-17 18:37:36 +12:00
Paul Chote
2c0c56b6b4 Merge pull request #5327 from Mailaender/idle-orderlines
Removed flickering order lines when selecting idle actors
2014-05-17 18:19:44 +12:00
Paul Chote
12767b7f21 Merge pull request #5328 from Mailaender/superpower-cleanup
IronCurtain/ChronoShift code cleanup
2014-05-17 18:05:43 +12:00
Matthias Mailänder
7b90d321a7 don't show order lines when selecting idle (attackmoving) actors
closes #5039
2014-05-17 08:03:48 +02:00
Paul Chote
28c0310357 Merge pull request #5192 from matija-hustic/spawnchoice
Spawnchoice
2014-05-17 17:53:00 +12:00
Paul Chote
ce7fb707b2 Merge pull request #5297 from Saticmotion/betterScrolling
Better scrolling
2014-05-17 17:43:38 +12:00
Paul Chote
e3e7d35812 Merge pull request #5326 from Mailaender/wall-types
Fixed sandbags connecting to concrete walls
2014-05-17 17:36:48 +12:00
WolfGaming
ff313a3886 Added UncloakOnAttack variable to Cloak 2014-05-17 00:42:45 +00:00
Matthias Mailänder
f265201fa8 Merge pull request #5329 from reaperrr/nuke-ion-fix
Closes #5239
2014-05-16 20:35:41 +02:00
reaperrr
d5023e376d Fixes units hunting Advanced Comm. Center after being damaged by Ion Cannon.
Additionally made weapon, effect animation and effect palette customizable.
2014-05-16 18:38:12 +02:00
Pavlos Touboulidis
5fc7ef02bf Fixes #4615: OpenRA.Utility should expand wildcards in paths
The path to be expanded. It can be a relative or an absolute path.
Wildcards can appear as part of the path and as part of the file name/extension.

Example:

	Expand("./mods/*/mod.?aml");
2014-05-16 19:36:05 +03:00
reaperrr
bbf2364bba Fixes AI units hunting down Missile Silo/Temple of Nod after being damaged by nuke 2014-05-16 17:43:22 +02:00
Matthias Mailänder
db77c7b45d code cleanup 2014-05-16 17:27:49 +02:00
Matthias Mailänder
86c0614558 fix neighbored walls connecting to everyhing
closes #5232
2014-05-16 16:39:04 +02:00
Saticmotion
1bf3f3e03e The engine now uses the SDL2.0 scroll events properly.
Scroll speed is now a user preference.
2014-05-16 13:56:22 +02:00
matija-hustic
6eac7a3e05 Smaller spawns+letters. Map dialog width. Unavailable spawns disabled. 2014-05-16 11:23:23 +01:00
Matthias Mailänder
bad6a99caf Merge pull request #5324 from Squiggles211/apc_load_crash
Fixes #4790
Fixes #5270
2014-05-16 09:00:03 +02:00
Squiggles211
03e2c77b09 Minor style nit fix
Minor style nit fix
2014-05-16 00:22:00 -05:00
Squiggles211
a0458eeb24 Fix crashes related to transports
Fixes two specific causes of transport related crashes, one prevents
infantry from continuing to take damage by Tiberium if loaded into the
transport over Tiberium, and one fixes the edge case where an infantry
dies in the same tick cycle as it was loaded into the transport.
2014-05-15 20:27:44 -05:00
Matthias Mailänder
86271c3dd1 use List<MiniYamlNode> instead of System.Text.StringBuilder
add Deserialize methods for everything in Network.Session
2014-05-15 11:36:24 +02:00
Matthias Mailänder
c7fad3a693 StyleCop and TODO 2014-05-15 10:04:21 +02:00
Matthias Mailänder
f68a6bbd76 split latency from Client into ClientPing
closes #4282
2014-05-15 10:04:21 +02:00
Matthias Mailänder
f365f9da2b split lobby SyncInfo order into smaller chunks
closes #4594
2014-05-15 10:04:03 +02:00
Matthias Mailänder
0f591bb3ba Merge pull request #5316 from reaperrr/int-mine-fix
Add ore mine graphics to interior tileset
2014-05-15 08:07:55 +02:00
reaperrr
e59d4568b0 Adds ore mine graphics to interior tileset 2014-05-14 20:04:59 +02:00
Matthias Mailänder
667f92bc75 add a console command to surrender the game 2014-05-14 15:59:53 +02:00
Matthias Mailänder
83a3835802 add a new /pause command 2014-05-14 15:59:53 +02:00
Matthias Mailänder
e647712003 move all console traits into one folder 2014-05-14 15:59:53 +02:00
reaperrr
98e48ae991 Converts InfDeath from integer to string.
Wire up updated DeathSounds for all mods.
2014-05-14 15:24:06 +02:00
reaperrr
12b3bc37f3 Fixes PlayVoiceLocal so it actually works as intended, bring DeathSounds in line with suggestions. 2014-05-14 15:24:05 +02:00
Paul Chote
b471e02776 Merge pull request #5312 from WolfGaming/CamoFix
Fixes #5049 Camo Pillbox not decloaking when attacking
2014-05-15 00:44:29 +12:00
Paul Chote
14df5a3bc3 Merge pull request #5279 from ScottNZ/news
Add news
2014-05-15 00:20:35 +12:00
Paul Chote
e8896be1c0 Merge pull request #5315 from reaperrr/patch-2
Make Reset button font bold in RA Settings menu
2014-05-14 23:55:02 +12:00
ScottNZ
8fc3870656 Move cnc perf graph out of the way of the news button 2014-05-14 23:51:46 +12:00
ScottNZ
c7d8024522 Add a news panel to each mod 2014-05-14 23:51:41 +12:00
reaperrr
698b326378 Make Reset button font bold in RA settings
Fixes #5314.
2014-05-14 13:48:01 +02:00
Paul Chote
5f5cc10c96 Merge pull request #5307 from pavlos256/lobby-chat-scroll
Fixes #3036
2014-05-14 23:34:56 +12:00
Paul Chote
bca006934a Merge pull request #5313 from WolfGaming/BugFixes
Fixes #5059 force fire not working on pillboxes
2014-05-14 23:23:06 +12:00
WolfGaming
018c2f0c63 Fixes force fire not working on pillboxes 2014-05-14 10:55:46 +00:00
WolfGaming
5496636933 Fixes Camo Pillbox not decloaking when attacking 2014-05-14 10:54:29 +00:00
Paul Chote
a420fa7d28 Merge pull request #5119 from Mailaender/spice-smoke-overlay
Added smoke to the spice refineries
2014-05-14 22:20:27 +12:00
Matthias Mailänder
ba309a3367 add spice refinery smoke overlay when harvester docked 2014-05-14 09:39:45 +02:00
ScottNZ
6218fedbae Merge pull request #5296 from Unit158/win-make-test-fix
Added "make test" to Windows' make script.
2014-05-14 19:08:13 +12:00
Matthias Mailänder
18bbf3c603 Merge pull request #5306 from reaperrr/ra-proc-husk
Fixes #5087
2014-05-14 08:33:51 +02:00
Matthias Mailänder
cce7cdd36c Merge pull request #5309 from pavlos256/sam-site-starting-state
Fixes #5278: SAM site on the TD shellmap starts open
2014-05-14 08:25:58 +02:00
Matthias Mailänder
a69ac2eb68 Merge pull request #5310 from Unit158/console
Patched the console PR as requested by xanax`
2014-05-14 08:20:44 +02:00
Chicken man
d84a6e5897 Patched the console PR as requested by xanax` 2014-05-13 19:29:35 -04:00
Pavlos Touboulidis
558924f265 Fixes #5278: SAM site on the TD shellmap starts open 2014-05-14 00:17:24 +03:00
Pavlos Touboulidis
03a5be4f0d Fixes #3036
See also #5149, #5191
2014-05-13 23:08:00 +03:00
Chicken man
84cb2e921d Added "make test" to Windows' make script. 2014-05-13 15:46:19 -04:00
reaperrr
edceb4e502 Fixes harvester husk Z sorting on refinery. 2014-05-13 20:29:12 +02:00
Matthias Mailänder
6029890ed8 Merge pull request #5303 from reaperrr/win-warnings
Fixes warning message when compiling under Windows (MSBuild/VS)
2014-05-13 16:04:17 +02:00
reaperrr
f7506b8a79 Fix warning message when compiling under Windows (MSBuild/VS). 2014-05-13 14:45:53 +02:00
Paul Chote
b4298982a0 Merge pull request #5262 from Mailaender/parse-invariant-culture
Added checks for NumberFormatInfo.InvariantInfo everywhere
2014-05-14 00:20:35 +12:00
Matthias Mailänder
59ace5d01b new shorthand Exts.(Try)ParseIntegerInvariant 2014-05-13 14:16:41 +02:00
Paul Chote
c1e94489f8 Merge pull request #5233 from Squiggles211/BuildLimitTech
Fix TechTree prerequisite bug for buildings with a build limit.
2014-05-13 20:43:55 +12:00
Matthias Mailänder
12bc472cc6 Merge pull request #5253 from Unit158/console
Closes #4131
2014-05-13 09:09:47 +02:00
Matthias Mailänder
9de070c7fd Merge pull request #5289 from psydev/tiles
Fix rock passability in snow, winter, temperat
2014-05-13 08:30:55 +02:00
Matthias Mailänder
ad08d17f01 Merge pull request #5275 from psydev/maps
4 new maps; some map updates
2014-05-13 08:12:03 +02:00
Psydev
287721dc11 fixed many blemishes on Hegemony or Survival 2014-05-12 21:02:32 -07:00
Matthias Mailänder
18621aefb5 Merge pull request #5260 from JordanGlue/bleed
closes #4779 Deploy hotkey F not repairing orcas/apaches in cnc/td
2014-05-12 22:35:21 +02:00
Chicken man
1389313e46 Added default behaviour to all mods 2014-05-12 16:30:54 -04:00
Chicken man
fa4b157b42 Added ConsoleCommand, and an example to go with it 2014-05-12 16:30:53 -04:00
Matthias Mailänder
0783f60ba1 Merge pull request #5285 from pavlos256/d2k-theater-slow
Fix strange d2k loading slowness
2014-05-12 20:23:24 +02:00
Matthias Mailänder
f8ce8fd90f Merge pull request #5286 from psydev/patch-1
Balance adjust: Return LTNK dmg. vs. wood to 75%
2014-05-12 19:54:10 +02:00
Squiggles211
ce69ea2237 Fix sold tech bug on build limited structures
Fixes where if a structure with a build limit was sold, it was not
properly removed from the buildables prerequisite list until next
update.
2014-05-12 08:42:44 -05:00
psydev
0d9b84af51 Fixed the rocks in desert tileset
They were all set to inherit defaults, few of them were set properly. You could drive through most of them.
2014-05-12 02:05:48 -07:00
Psydev
186e49aaee did same changes to desert tileset 2014-05-11 23:34:03 -07:00
Psydev
687e3bff87 applied same changes to winter.yaml 2014-05-11 23:15:37 -07:00
Psydev
42b56de4b8 did same changes as snow tile, except 1 rock
(the rock is different in the snow tile, which is why it looked funny)
2014-05-11 23:07:54 -07:00
Psydev
e9fabbe955 fix template 14 (snow) 2014-05-11 23:01:20 -07:00
Psydev
da048fffe4 fix template 35 (snow) passability 2014-05-11 22:45:03 -07:00
Psydev
ba85d33e09 fix passability of Template 49 (snow) 2014-05-11 22:38:55 -07:00
Psydev
6264784c1a fix template 84 (rock) 2014-05-11 22:30:13 -07:00
psydev
e3b56db21e Reduce grenadier vs. wood 75% -> 50%
Grenadiers actually do more damage than flamethrowers vs. buildings, which is counter-intuitive and not in keeping with flavour and design intent. They should be good vs. buildings, but not quite this good, especially given that they are cheaper than flamethrowers. This nerf still allows them to be effective at taking out buildings, but not quite as blindingly fast at destroying them.
2014-05-11 16:47:54 -07:00
Psydev
04468725c7 fixed map name of Year_501 2014-05-11 16:32:26 -07:00
psydev
1aef5ea115 Balance adjust: Return LTNK dmg. vs. wood to 75%
It seemed that the tanks were inept at hurting buildings and needed a boost. However, after playtesting, it's clear that Nod's flame tank is already exceptional at destroying buildings, and the recon bikes are quite decent at it, too. Thus, the light tank's effectiveness at killing buildings is overlapping with the flame tank (same tech level & cost), making most Nod units effective at hurting buildings. So, I think this is in order to preserve distinct roles among the vehicles.
2014-05-11 15:59:38 -07:00
Psydev
aadad6256e New map: Pirates_and_Emperors (1vs1) 2014-05-11 15:41:46 -07:00
Psydev
aa97b96a74 New map: Letters_from_Lexington (1vs1) 2014-05-11 15:41:11 -07:00
Psydev
02a4a0613f removed original dead_in_motion map
This map is a bit out of date, especially because of the build radius
which makes the starting positions a bit impractical. All the tiberium is
also in the middle, making this map a "rush for the middle". Since it's so
small, this limits gameplay considerably.
Dead_in_motion_2 addresses these issues and spreads the tiberium out a
bit, while also putting starting locations to one corner of the map. It
also adds blue tiberium.
I will add the old map on Resource.openra.net if anyone still wants to
play it.
2014-05-11 14:30:47 -07:00
Psydev
2ab36b0f08 renamed and updated credits for dead_in_motion_2 2014-05-11 14:29:42 -07:00
Psydev
060644bd6f updated credits for dettering_democracy maps 2014-05-11 14:26:39 -07:00
Psydev
437e50ec47 updated map credits for Nullpeter by Petrenko 2014-05-11 14:20:03 -07:00
Psydev
8446f2ddc6 updated map credits for Llamas 2 2014-05-11 14:18:28 -07:00
Psydev
7c64b0b862 updated map credits for minus_two by petrenko 2014-05-11 14:17:14 -07:00
Pavlos Touboulidis
2ec6df9680 Fix strange d2k loading slowness
There is a strange issue that appears* when Theater calls
ISpriteFrame.Frames on the R8Reader. The R8Reader uses
IEnumerable.Cast<> which behaves slower and slower, which
makes map loading become 10+ times slower.

The changes here simply avoid the casting.

[*] This happens at least on Linux x86_64 with Mono 3.2.8.

See https://bugzilla.xamarin.com/show_bug.cgi?id=19668
2014-05-11 06:38:19 +03:00
Matthias Mailänder
17d3bc27ce Update ingame-player.yaml
followup of 4c4f7ab31f
2014-05-10 14:48:41 +02:00
Paul Chote
80477b65ff Merge pull request #5246 from psydev/patch-1
tweaks to balance: artillery min. range & more
2014-05-11 00:17:26 +12:00
Paul Chote
e55d53626e Merge pull request #5277 from Ripsn/authorfix
Authors file Typo fixed
2014-05-10 19:09:51 +12:00
Ripsn
713586b7f6 Authors file Typo fixed 2014-05-10 18:25:10 +12:00
psydev
68c7976966 Simplified chem warrior description. 2014-05-09 16:09:28 -07:00
Psydev
499df0e088 tiny fix to road for Dead in Motion redux 2014-05-09 16:00:04 -07:00
Psydev
d109453b2d New map: White Acres. 2vs2, FFA. 2014-05-09 15:54:15 -07:00
Psydev
ad4a066eea Updated hegemony_or_survival map.
More tiberium in middle, less in base.
2014-05-09 15:51:54 -07:00
Psydev
e7dd0c7244 New map: Year 501 (3vs3) 2014-05-09 15:50:48 -07:00
Paul Chote
ac99afaaec Merge pull request #5248 from Mailaender/sdl2-opentk
Ported Tao.OpenAL/OpenGL to SDL2/OpenTK
2014-05-09 20:24:40 +12:00
Paul Chote
71f0913da0 Merge pull request #5273 from Mailaender/support-random-bitrot
OpenRA.Thirdparty is now OpenRA.Support
2014-05-09 20:14:58 +12:00
Matthias Mailänder
1124d55224 OpenRA.Thirdparty is now OpenRA.Support 2014-05-09 10:04:16 +02:00
Paul Chote
fab1c9e7b9 Merge pull request #4843 from Mailaender/local-mirrors
Moved mirror selection to the client
2014-05-09 19:51:52 +12:00
Matthias Mailänder
bd55ffc10d StyleCop 2014-05-09 08:44:50 +02:00
Matthias Mailänder
aace818f43 remove unused OpenRA.Server extensions 2014-05-09 08:44:37 +02:00
Matthias Mailänder
f01db755b8 Merge pull request #5256 from Unit158/winforms-patch-2
Fixed removal of winforms for x86
2014-05-08 19:16:36 +02:00
Matthias Mailänder
f8bb956496 check for OpenGL version 2.0+ 2014-05-08 06:38:09 +02:00
Matthias Mailänder
ce78683782 give a hint when someone forgot to install drivers on Windows 2014-05-08 06:38:09 +02:00
Matthias Mailänder
a5422feced only query for the extension we need 2014-05-08 06:38:09 +02:00
Matthias Mailänder
dc2d1287a7 port Tao.OpenGl to OpenTK.Graphics.OpenGL and avoid Arb
closes #4540
2014-05-08 06:38:05 +02:00
Paul Chote
37849b7d31 Merge pull request #5254 from psydev/patch-3
buff HeliGun vs. light armor 50% -> 75%
2014-05-07 18:48:06 +12:00
Paul Chote
a6e79bb732 Merge pull request #5155 from Mailaender/ts-tiberium
Added Tiberium crystals and refinery to Tiberian Sun
2014-05-07 18:30:27 +12:00
psydev
98c7741907 Updated vehicle descriptions. Changed AA desc.
"Weak vs. Aircraft" is kind of ambiguous, so I replaced it. Instead, I specified which units can attack aircraft by giving them a separate line reading "Can attack Aircraft". All entries of "weak vs. aircraft" have been removed.
2014-05-06 19:27:29 -07:00
psydev
2a2ad267c1 Updated structure descriptions
Provided more explanation, eliminated ambiguity.

Where necessary, I wrote "cannot target aircraft" instead of "weak vs. aircraft", since the latter is ambiguous.
2014-05-06 19:14:40 -07:00
psydev
931fa9233e Updated infantry unit descriptions
There were a few misconceptions.
2014-05-06 18:45:27 -07:00
psydev
345e77a284 Increase ScanRadius of Commando & Rocket Soldiers
Making ScanRadius value equal their range (6).
2014-05-06 18:36:03 -07:00
psydev
be5c35aab8 Nerf Chem warrior vs. Wood, 50% -> 35%
Since Chem warriors are awesome vs. everything, I think it would make sense to make them not quite as awesome vs. buildings. There is a bit of a lack of dinstinction between chem and flamers, and right now it doesn't appear to players like it makes much sense to build flamers when you can build chems instead. This will keep "burning buildings down" as the forte of the flame throwers. 
The chems will still be decent vs. wood, but not as crazy as they have been.
2014-05-06 18:23:10 -07:00
psydev
134403fcee Reduce RangeLimit of Rockets, BikeRockets
To give some units a chance to escape, limiting RangeLimit of these rockets. Basically it is because if you get within range with a vehicle, but then quickly turn around to get out of range, the missile will follow you for quite a long ways, well beyond its initial range. There is currently no way to escape the missile. This allows a unit which is very fast to stand a chance of escaping a shot instead of having no chance.
2014-05-06 18:17:38 -07:00
Chicken man
704ae5fa2e Fixed removal of winforms for x86 2014-05-06 17:37:13 -04:00
Matthias Mailänder
f5093522cd fix trailing comma 2014-05-06 18:31:51 +02:00
Matthias Mailänder
b19d286f56 parse with NumberFormatInfo.InvariantInfo everywhere
closes #5240
2014-05-06 18:31:48 +02:00
Matthias Mailänder
4c8ce8afc0 StyleCop 2014-05-06 07:13:43 +02:00
Matthias Mailänder
fdf108a879 port Tao.OpenAl to OpenTK.Audio.OpenAL 2014-05-06 07:13:43 +02:00
Jordan Glue
2379d6167b closes #4779 Deploy hotkey F not repairing helis 2014-05-05 22:28:27 +10:00
Matthias Mailänder
bf9d3a8082 Merge pull request #5259 from JordanGlue/bleed
Fixing Helis taking off after rearmed but before repaired
2014-05-05 13:47:28 +02:00
Jordan Glue
84030fd3c0 Fixing Helis taking off after rearmed but before repaired 2014-05-05 20:51:44 +10:00
Matthias Mailänder
b1045dfce6 Update Command.cs
WRange is actually a 1D world distance with 1024 units = 1 cell.
2014-05-05 12:03:01 +02:00
Matthias Mailänder
7587e80484 Merge pull request #5250 from JordanGlue/bleed
Have Helis take off after repair/rearm
2014-05-05 11:37:20 +02:00
Matthias Mailänder
11f8ba0fe7 Merge pull request #5258 from psydev/patch-4
fixing some trees
2014-05-05 11:35:06 +02:00
Jordan Glue
ea32390700 closes #3091 Have Helis take off after repair/rearm 2014-05-05 19:31:57 +10:00
psydev
a21c181e2d fixing tree cluster
This tree cluster looks like it should be passable through in this cell. Looks fine in testing, even though looked like it might be wrong in map editor.
2014-05-05 01:13:09 -07:00
psydev
dcb3460267 fixing some trees
A couple of trees have a footprint that is too big. It looks like you should be able to drive by them, but you can't. They have been set overly-large.
2014-05-05 01:08:59 -07:00
psydev
3993d64ba2 Slight buff HeliGun vs. light
Apache, for all its greatness, doesn't do very well at one of the things it's supposed to do well, namely take out light vehicles quickly (humvee, artillery, MLRS, etc.). Apache is required for Nod as a reliable way to take out MLRS, but currently it doesn't do enough damage to take it out with its entire payload (which takes 4 seconds to unload, to boot). A single Apache should be able to destroy an MLRS, if it gets the chance.

If anyone thinks the Apache needs nerfing, I would suggest looking in other areas besides its damage vs. light armor. 

Also, does anyone object to removing the AG/AA distinctions for helicopters? They don't seem needed anymore.
2014-05-04 13:28:41 -07:00
Matthias Mailänder
61fbf73e2e Merge pull request #5244 from pchote/bye-bye-winforms
Remove X11 dependency from OSX.
Closes #3872
Closes #4348
2014-05-04 07:02:28 +02:00
Matthias Mailänder
1bd052d43b Merge pull request #5238 from reaperrr/more-palettes02
More palette un-hardcoding
2014-05-04 06:58:39 +02:00
psydev
a58a353915 tweak: artillery min. range slight increase
Artillery was recently buffed, but I think this makes the fact that they can currently fire at close range is not appropriate. I think artillery should be vulnerable to units that are able to get quite close, instead of being able to fire at them and do massive damage.

The reason min. range of 2c896 was picked is that when you set min. range to 3c0, it is not able to fire exactly 3 cells away. Perhaps the behaviour should change so that 3c0 = 3 cells away. 

(For comparison, MLRS has minimum range of 3).
2014-05-03 18:03:32 -07:00
Paul Chote
3965535f3f Remove Windows.Forms dependencies from game and utility. Fixes #4348. 2014-05-04 09:37:25 +12:00
Paul Chote
6b8bd47143 Add a native crash dialog for OSX. 2014-05-04 09:37:25 +12:00
Paul Chote
fe6831a095 Move winforms crash dialog into an external helper. 2014-05-04 09:37:25 +12:00
matija-hustic
ae149c420e Bigger spawn points, numbers within. 2014-05-03 19:08:56 +01:00
reaperrr
7ba00ced5a Make MuzzleFlash palette customizable. 2014-05-03 15:38:34 +02:00
reaperrr
9f0f11db54 Make TeslaZap color palette customizable. 2014-05-03 15:19:36 +02:00
Matthias Mailänder
8b3f15155e remappable resource types 2014-05-03 09:02:19 +02:00
Paul Chote
5b8b01950f Reference mono's libfreetype under osx. 2014-05-03 12:20:14 +12:00
Paul Chote
401e7cf1b2 Remove an outdated hack from Renderer. 2014-05-03 11:40:55 +12:00
Matthias Mailänder
26ae11c155 Merge pull request #5235 from pchote/sdl2
Remove SDL 1.2 and Cg support
2014-05-02 18:30:44 +02:00
Matthias Mailänder
2b3f75d073 Merge pull request #5236 from reaperrr/deathsound
Closes #2392
Closes #4680
2014-05-02 16:38:08 +02:00
Matthias Mailänder
fd4cb59799 add Tiberium to Tiberian Sun 2014-05-02 15:35:10 +02:00
Matthias Mailänder
c6663f7505 add Tiberian Sun refinery 2014-05-02 15:35:09 +02:00
Squiggles211
a495d9d552 Rewrite for better efficiency
uses a single, more concise statement rather than an if statement, and
checks buildLimit before attempting to check if the buildables cache
contains the key.
2014-05-02 08:26:36 -05:00
reaperrr
3fe20a1520 Removes rank signs from ships on desert shellmap.
Closes #4963.
2014-05-02 15:16:12 +02:00
reaperrr
18e37e4216 Drags death sounds out of RenderInfantry into a separate DeathSounds trait.
Play death sounds with a new PlayVoiceLocal so they don't use full volume regardless of position relative to camera.
Adds option for alternative burn and zap death sounds.
Renames RenderInfantry's UseInfantryDeath trait to SpawnsCorpse.

Removes hack from ra desert shellmap.
2014-05-02 15:14:29 +02:00
Paul Chote
03c3c3ae9b Remove legacy renderers. 2014-05-02 23:38:47 +12:00
Paul Chote
189f23e442 Switch linux to packaged SDL2 2.0.2. Fixes #5228. 2014-05-02 23:38:47 +12:00
Paul Chote
39daddfc4c Switch windows to SDL2. Fixes #4945. 2014-05-02 23:38:46 +12:00
Matthias Mailänder
1a432e9e9e Merge pull request #5190 from pchote/new-lua
New Lua API.
2014-05-02 13:29:28 +02:00
Paul Chote
aa8695dd24 Merge pull request #5191 from pavlos256/chat-window-improvements
Chat window improvements
2014-05-02 22:56:39 +12:00
Paul Chote
e0e79fc84c Merge pull request #5212 from psydev/patch-1
Some minor tweaks
2014-05-02 22:37:09 +12:00
Paul Chote
91fc04b2fd Merge pull request #5213 from Mailaender/unl10n-cnc-requires-tooltip
Fixed missing un-l10n of C&C Requires: production tooltip
2014-05-02 22:28:49 +12:00
Paul Chote
7356654d8b Merge pull request #5231 from Mailaender/nsis-dotnet4
Fixed the .NET version check failing
2014-05-02 22:27:21 +12:00
Paul Chote
bbd5d7a1e6 Fix deb dependencies. 2014-05-02 22:18:35 +12:00
Paul Chote
d1c2c6b745 move windows-specific deps to thirdparty/windows. 2014-05-02 22:18:35 +12:00
Paul Chote
c61c9592b1 Include platform-specific dependencies under osx/linux. 2014-05-02 22:18:35 +12:00
Paul Chote
ab06e6998c Replace OSX SDL with i386-only non-framework build.
Compiled using ./configure CFLAGS="-m32 -mmacosx-version-min=10.5" LDFLAGS="-m32 -mmacosx-version-min=10.5" --without-x
2014-05-02 22:18:35 +12:00
Paul Chote
18af74f745 Package Lua 5.1.5 for all platforms. 2014-05-02 22:18:35 +12:00
Paul Chote
af83a1b341 Update lua docs when packaging a new build. 2014-05-02 22:18:35 +12:00
Paul Chote
06f162ad57 Add initial standard library, and port shellmaps. 2014-05-02 22:18:34 +12:00
Paul Chote
d73af0190f Add a new native-lua implementation. 2014-05-02 22:18:34 +12:00
Paul Chote
f6efc9c5bc Add deprecation notice to the original api. 2014-05-02 22:08:42 +12:00
Paul Chote
fdd4437c52 Re-enable shellmaps. 2014-05-02 22:08:41 +12:00
Paul Chote
e83a21808f Produce actors in a FrameEndTask. 2014-05-02 22:08:41 +12:00
Paul Chote
097d6ad47c Merge pull request #5163 from Mailaender/prettify-trait-documentation
Beautified the trait documentation
2014-05-02 21:32:24 +12:00
Chris Forbes
b05297d350 Merge pull request #5227 from Phrohdoh/MultiEnumYaml
Enum yaml fix.
2014-05-02 12:55:38 +12:00
Squiggles211
11c9bd7bc8 Fix TechTree prerequisite bug for buildings with a build limit.
Fixes where a building/unit whose prereq is a build limited structure
was always available to be built even when the prereq was not satisfied.
2014-05-01 18:28:21 -05:00
Matthias Mailänder
0e96dc75ff check for .NET 4 Client or Full profile
fixes #5224
2014-05-01 07:12:54 +02:00
Matthias Mailänder
f28edf9d89 Merge pull request #5226 from pchote/changelog-fix
Fix changelog url in the packaging script.
2014-05-01 06:55:09 +02:00
Paul Chote
afa194dfb2 Fix ubuntu packages dependencies for .NET4. 2014-05-01 09:56:27 +12:00
Matthias Mailänder
066168fdb9 Merge pull request #5223 from obrakmann/fix5210
Repaired gdi03 mission. Fixes #5210.
2014-04-30 21:44:57 +02:00
Taryn
e828541dc9 Allow multiple enum values to be parsed from yaml with the same syntax as a string[]. 2014-04-30 07:15:09 -05:00
Paul Chote
6015bbeaf6 Fix changelog url in the packaging script. 2014-04-30 23:51:28 +12:00
Oliver Brakmann
801b38dd52 Repaired gdi03 mission. Fixes #5210.
I opted to lower the power consumption for SAM instead of restoring the
original power values for FACT and PROC since those two are available to
the player as well and they would behave slightly different in this
mission than in other ones.
2014-04-30 11:40:46 +02:00
Matthias Mailänder
fa150db4a7 Merge pull request #5221 from reaperrr/ts-camerapitch
Fix voxel angle of TS units
2014-04-29 21:03:23 +02:00
reaperrr
e885a7195e Adjusts TS unit CameraPitch to align voxels with perspective. 2014-04-29 19:25:18 +02:00
Matthias Mailänder
cb93e8cb70 Merge pull request #5218 from reaperrr/crateeffect-palette
Made CrateEffect color palette customizable
2014-04-29 11:17:57 +02:00
Matthias Mailänder
e456368ed5 Merge pull request #5219 from ScottNZ/balance
Closes #5179
2014-04-29 11:01:01 +02:00
Matthias Mailänder
be5b50abae Merge pull request #5217 from reaperrr/pip-palette
Un-hardcoded pip/tag/group palettes
2014-04-29 10:59:08 +02:00
ScottNZ
b0610e39fb Make ra 4tnk weapons work more similarly to how they did in the original 2014-04-29 17:32:42 +12:00
ScottNZ
d545759ca1 Nerf ra 4tnk a bit; it was too unstoppable 2014-04-29 17:08:50 +12:00
reaperrr
a422f03c0a Makes CrateEffect color palette customizable.
CrateAction can now define a custom Palette, levelup effect of GainsExperience uses ChevronPalette.
2014-04-28 21:03:59 +02:00
reaperrr
c8815e1413 Un-hardcodes pip/tag/group palettes.
-Palette for decorations can now be defined under SelectionDecorations trait.
-Adds pip types Ammo and AmmoEmpty.
-LimitedAmmo PipTypes are now customizable.
-Adds art, sequences and rules entries for TS mod decorations that were missing/using a wrong palette.
-Adds PrimaryBuilding trait to TS weapon factories and helipads.
2014-04-28 20:03:00 +02:00
Matthias Mailänder
589c7642d1 add a table of contents 2014-04-28 10:28:17 +02:00
Matthias Mailänder
abf5c5a0eb remove brackets from float2.ToString conversion 2014-04-28 09:41:24 +02:00
Matthias Mailänder
e861e7c07e port harvester documentation to the new inline Desc format 2014-04-28 09:41:24 +02:00
Matthias Mailänder
5120cdf6d4 more non-technical type names 2014-04-28 09:41:22 +02:00
Matthias Mailänder
d9bd5f4d7f tabular view, sorted by namespace and given headers 2014-04-28 09:38:11 +02:00
Matthias Mailänder
8ba9f3dea7 fix missing un-l10n of C&C Requires: production tooltip
closes #5209
2014-04-28 08:30:12 +02:00
Matthias Mailänder
0162cac91a Merge pull request #5207 from reaperrr/ts-weapon-pal-fix1
Fixed palette of all TS weapons that don't use the effect palette
2014-04-28 08:01:05 +02:00
Matthias Mailänder
41f6318413 Merge pull request #5206 from reaperrr/ts-mechfix1
Added UseInfantryDeath option to RenderInfantry trait
2014-04-28 07:56:52 +02:00
psydev
a42886c952 Small buff for Humvee/buggy machine gun
Machine gun seems to be under-performing vs. infantry
Give it 5 bursts instead of 4. Will allow it to kill E3s more effectively.

Despite this change, overall damage vs. Light armor is not increased since Release.
2014-04-27 19:36:41 -07:00
psydev
e9ba43faaa Reducing spread of GrenadierExplode
GrenadierExplode is a good idea, but right now its damage is too high.
Reducing spread from 8 -> 6.
2014-04-27 18:20:58 -07:00
psydev
f9675b2d15 Grenade slightly faster again. 100% vs. none.
After playtesting, it seems the grenade is a *bit* too slow. Keeping it slow, but bringing its speed from 5 -> 7. (Original value was 12)

Looks reasonable.

Also giving 100% vs. infantry instead of 90%.
2014-04-27 16:57:09 -07:00
psydev
d6aba2e6af Make MCV crush infantry 2014-04-27 15:54:27 -07:00
reaperrr
e0c6ef1030 Fixes palette of all TS weapons that don't use the effect palette. 2014-04-27 23:32:22 +02:00
reaperrr
49b35dca6e Add UseInfantryDeath option to RenderInfantry trait.
This allows the use of RenderInfantry for units that do not have a Die voice or die sequences.

Additionally fixed Wolverine stand and shoot sequences.
2014-04-27 22:56:23 +02:00
Matthias Mailänder
7517cbb941 Merge pull request #5197 from pavlos256/minor-cleanup
Minor cleanup
2014-04-27 18:33:13 +02:00
Matthias Mailänder
34bdb504c6 Merge pull request #5194 from psydev/patch-8
Certain units can no longer target walls
2014-04-27 18:22:11 +02:00
Matthias Mailänder
c8d9609400 Merge pull request #5198 from reaperrr/tibtree-fix
Closes #3107
2014-04-27 18:16:00 +02:00
Matthias Mailänder
0da6ab6c20 Merge pull request #5185 from reaperrr/rank-palette
Makes rank chevron palette customizable
2014-04-27 18:04:20 +02:00
Matthias Mailänder
8da0d3fac8 Merge pull request #5199 from reaperrr/shok-fix
Closes #5195
2014-04-27 17:46:40 +02:00
reaperrr
8f09a2d6e0 Adds work-in-progress test map to TS mod.
Creeps-owned units and buildings can be used to test rank signs etc.
2014-04-27 13:49:45 +02:00
reaperrr
ce2809c7a0 Adds die-crushed sequence to Shock Trooper. 2014-04-27 13:37:09 +02:00
reaperrr
b62c43a90f TD Blossom Trees now emit tiberium from base.
Dimension set to 1x1, art position fixed via sequence Offsets.
2014-04-27 13:31:54 +02:00
Paul Chote
9cf923343f Merge pull request #5186 from psydev/patch-7
balance tweak - make turret armor heavy
2014-04-27 12:57:01 +12:00
Paul Chote
0822d1ce11 Merge pull request #5181 from psydev/maps
Updated psydev's maps
2014-04-27 12:56:00 +12:00
Paul Chote
cd1fcfabd7 Merge pull request #5188 from obrakmann/buildlimit+shift-click-fix
Fix build palette showing too many queued items when BuildLimit is reached
2014-04-27 12:52:24 +12:00
Pavlos Touboulidis
45944a053c Replace (and remove) custom Set<T> with HashSet<T> 2014-04-27 00:01:33 +03:00
Pavlos Touboulidis
c28faffa45 Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality)
and replace it with the familiar System.Diagnostics.Stopwatch.
2014-04-26 23:58:18 +03:00
Pavlos Touboulidis
275f6683c6 Remove unused and obsolete Cached.cs
This was similar to Lazy<T>
2014-04-26 23:28:23 +03:00
psydev
b0dcdf81a4 Adjust air strike so it kills turret
The recent armor change for turrets made airstrike no longer killed it. 

Made Napalm do more damage to Heavy (and light); made Vulcan do less damage to Heavy so that airstrikes don't do too much damage to advanced towers, obelisks and SAM sites.
2014-04-26 10:03:45 -07:00
psydev
5867bb3985 Certain units can no longer target walls
Units which cannot target walls (sandbags, chain-link fence or concrete) any longer:
Minigunner
Flamethrower
Hum-vee/Nod Buggy 
Flame Tank (can still run over sand bags and chain-link fences)
Civilian
[sniper--already so]
2014-04-26 09:25:47 -07:00
psydev
a624afe739 Make Wall its own TargetType
Going to make some units (machineguns, etc.) unable to fire at walls.
2014-04-26 09:19:09 -07:00
Oliver Brakmann
63f4a0646f Fix build palette showing too many queued items when BuildLimit is reached
When a BuildLimit on an actor type is set and nearly reached, you could
shift-click the build palette and it would show it had five more items
queued when really less are allowed to be built. This fixes it so that
only the allowed number of items is enqueued, and thus showing the
correct number on the build palette.
2014-04-26 16:27:02 +02:00
Pavlos Touboulidis
af48626020 Fix scroll offsets
This is not a full fix, it merely restores the functionality
already present. The ScrollPanelWidget does not work right if
Align is set to Bottom but ScrollToBottom() isn't called after
adding items and there's not enough content to scroll.
2014-04-26 17:21:42 +03:00
Pavlos Touboulidis
c099e6d09b Fix overlay chat lines expiration
It wasn't working right when the widget was hidden because it
wasn't receiving any Ticks. Instead of counting, we're now using
Game.LocalTick as the tick source.
2014-04-26 03:18:46 +03:00
Pavlos Touboulidis
ddabe080cd Style fixes 2014-04-26 03:18:12 +03:00
Paul Chote
e572c0dcb6 Merge pull request #5184 from pavlos256/loading-perf
Loading performance measurements
2014-04-26 11:17:21 +12:00
Pavlos Touboulidis
e6dddf3704 Style fixes 2014-04-26 02:05:06 +03:00
Matija H
a0f6038ea6 Facilitated spawn choice at game setup screen. 2014-04-25 23:27:16 +01:00
Pavlos Touboulidis
e5e97c9a11 Fix issue #5149: Make chat window not autoscroll
It will autoscroll unless the chat window is open and the scroll
position is not at the bottom.
2014-04-25 16:16:54 +03:00
Pavlos Touboulidis
ef066560ad Fix text-wrapping special case
If a line of text contained a whole word that was longer than the
allotted space, it would fail to wrap that line completely, even
if it was possible to wrap at other locations.

Fixing this uncovered a second issue, where it would drop the last
line if the input had more than one lines and one of the first ones
was wider than the specified width.
2014-04-25 13:54:14 +03:00
Pavlos Touboulidis
4f12882706 Minor clean up 2014-04-25 10:50:28 +03:00
Pavlos Touboulidis
fa5c8d083e Fix chat line expiration
The chat display overlay would remove one chat line every X ticks.
It will now keep track of the time each chat line has to be removed
and act accordingly.

For example, if 3 chat lines are added with 1 second difference
from each other, they will be removed one after the other, with the
same 1 second difference.
2014-04-25 10:34:23 +03:00
Sebastien Kerguen
a7c77d4155 Fixes the speed of the blinking READY text (in RA & TD). 2014-04-24 20:22:22 +02:00
reaperrr
6ae4b74535 Makes rank chevron palette customizable.
Adds levelup crate-effect and art.
2014-04-24 19:25:30 +02:00
Pavlos Touboulidis
603dd1d866 Style fixes 2014-04-24 13:46:06 +03:00
psydev
db544a6ca9 balance tweak - make turret armor heavy
Since turrets have wood armor, they can get killed by flame tanks uber fast. It might be best if turrets are a counter to flame tanks, rather than their prey. If they have heavy armor, they will take far less damage, and not die instantly to a flame tank rush, making them able to contribute to some defense.
2014-04-23 18:14:32 -07:00
Psydev
3910e54aa1 fixed tiberium tree in lessons_from_kosovo 2014-04-23 08:55:56 -07:00
Pavlos Touboulidis
c17f706772 Prettier PerfTimer output 2014-04-23 16:52:52 +03:00
Pavlos Touboulidis
36a660385c Fix OpenRA.Lint throwing because "perf" log channel does not exist
Slightly modified the Log class to allow dummy channels that don't
write anywhere, then use it on Lint because map loading writes to
the "perf" channel.
2014-04-23 13:22:14 +03:00
Pavlos Touboulidis
9dc2b3cd76 Optimize ComputeHash by removing Concat() and ToArray() calls 2014-04-23 03:48:49 +03:00
Pavlos Touboulidis
2d8cd8299f Add more perf measurements 2014-04-23 03:43:46 +03:00
Pavlos Touboulidis
c44d73d581 Improve PerfTimer output 2014-04-23 03:42:27 +03:00
Pavlos Touboulidis
60732bd9bd Repurpose unused Timer.cs and add some loading perf metrics 2014-04-23 01:58:30 +03:00
Pavlos Touboulidis
035834978d Make Stopwatch.ElapsedTime() a property and TimeSpan 2014-04-23 00:56:07 +03:00
Matthias Mailänder
082667eeea Merge pull request #5180 from pavlos256/abort-mission-confirmation
Closes #4650
2014-04-22 22:09:48 +02:00
Pavlos Touboulidis
e3a12f0f97 Update license headers 2014-04-22 22:49:51 +03:00
Pavlos Touboulidis
6ed6288e53 Hide ingame menu before showing the confirmation dialog
As a bonus, don't show the confirmation dialog if the game is over.
2014-04-22 22:20:45 +03:00
Pavlos Touboulidis
a4b5e25087 Add confirmation-dialogs.yaml to d2k's and ts's mod.yaml or they crash 2014-04-22 21:50:15 +03:00
Matthias Mailänder
ae481bc748 Merge pull request #5178 from pchote/get-blinkin-ready
Make the ready overlay blink.
2014-04-22 18:27:27 +02:00
Psydev
dbb8f7af71 Adding "pressure" map. 2014-04-22 08:45:42 -07:00
Psydev
84b9e797c7 renamed skull valley. now 4p. bridges fixed. 2014-04-22 08:23:25 -07:00
Psydev
0837279d66 Updated & renamed no_escapism. added trees. 2014-04-22 08:17:53 -07:00
Pavlos Touboulidis
12e3ee9fda Issue #4650: Abort Mission Confirmation
Adapted the confirmation dialog from the CnC mod and wired it to
the "Abort" and "Surrender" buttons.
2014-04-22 17:42:24 +03:00
Psydev
b8b5ff5cc1 Renamed slippery_slopes. Added blue tib markers. 2014-04-22 07:37:14 -07:00
Psydev
07efd377bc Updated Manufacturing Consent map. Fewer start loc 2014-04-22 07:17:40 -07:00
Psydev
0acc3e9bab Updated Lessons From Kosovo map 2014-04-22 07:17:14 -07:00
Psydev
751e799750 Updated map Dead_in_Motion_redux. Now 2p. 2014-04-22 07:16:19 -07:00
Psydev
938215e4ce Updated Deterring Democracy Plus map 2014-04-22 07:15:30 -07:00
Psydev
79e8391189 Updated Deterring Democracy map. Now 2p. 2014-04-22 07:14:30 -07:00
Paul Chote
1a69118f02 Make the ready overlay blink. Fixes #3032. 2014-04-22 23:49:24 +12:00
Paul Chote
bef3439055 Merge pull request #5160 from porzell/bleed
* Fixed Bug #5072: RenderLandingCraft doesn't do an IsInMap check
2014-04-22 22:57:33 +12:00
Paul Chote
18359c56b1 Merge pull request #5177 from ScottNZ/bleed
Remove support for .NET 3.5 from make.ps1 since we need .NET 4 now
2014-04-22 22:54:18 +12:00
ScottNZ
09c8fe43a5 Remove support for .NET 3.5 from make.ps1 since we need .NET 4 now 2014-04-22 22:22:10 +12:00
Paul Chote
a5fb437d07 Merge pull request #5170 from Smilex/issue5169
Added SupportsMapsFrom to mod.yaml for all mods
2014-04-22 11:32:33 +12:00
Paul Chote
3c6993f7fa Merge pull request #5162 from Mailaender/pre-auto-l10n
Prerequisites to automated translation string extraction
2014-04-22 11:29:23 +12:00
Ian T. Jacobsen
1de3b20b90 Added SupportsMapsFrom to mod.yaml for all mods 2014-04-21 20:50:09 +01:00
Matthias Mailänder
5632265d36 Merge pull request #5161 from reaperrr/ts-fixes02
Fixed Cyborg Commando walk/crawl sequences
2014-04-21 15:02:24 +02:00
Matthias Mailänder
ef07cdeaa8 unambigitous naming 2014-04-21 13:49:00 +02:00
Matthias Mailänder
27a73d810f auto reformatting to key: value 2014-04-21 13:49:00 +02:00
Matthias Mailänder
4c4f7ab31f revert back to untranslated for uniform auto-generation 2014-04-21 13:49:00 +02:00
reaperrr
59d3a7faf4 Converted electro.shp to correct palette. 2014-04-21 13:46:31 +02:00
reaperrr
a40159bdf0 Fixed Cyborg Commando walk/crawl sequence. 2014-04-21 13:37:59 +02:00
Paul Chote
e7a16b0c75 Merge pull request #5154 from Mailaender/production-edge-fixes
Added the production bar edge fixes
2014-04-21 23:05:03 +12:00
Paul Chote
b595001364 Merge pull request #5096 from Cr0s/bleed
Fixed #3826
2014-04-21 22:48:11 +12:00
Paul Chote
24374b1394 Merge pull request #5132 from psydev/patch-6
Nerfing guard towers & other balance changes
2014-04-21 22:43:17 +12:00
Paul Chote
ae7b5e9f3c Merge pull request #4613 from Mailaender/bot-cleanup
Reduced the amount of redundant AI definitions
2014-04-21 22:34:29 +12:00
Matthias Mailänder
d9626597b3 removed unmaintained AI definitions optimized for legacy AI code
closes #4543
2014-04-21 11:30:19 +02:00
Matthias Mailänder
1dfdeb8d8b bring it in line with the other naming 2014-04-21 11:26:26 +02:00
Matthias Mailänder
2320a7d571 avoid easy/hard classification as they are identical 2014-04-21 11:24:04 +02:00
Matthias Mailänder
dc74ce9678 backported the edge fixes to XCF source files 2014-04-21 10:50:31 +02:00
Peter Orzell
115df0a828 * Fixed whitespace issue. 2014-04-20 23:12:47 -04:00
Peter Orzell
27ab36d266 * Fixed Bug #5072: RenderLandingCraft doesn't do an IsInMap check
https://github.com/OpenRA/OpenRA/issues/5072
2014-04-20 22:05:33 -04:00
psydev
43c05b4c94 Minor: adjusting tiberium storage in refinery/silo
It seemed from playing noobs that lack of tiberium storage was an issue for them, because I saw them often building silos, often many of them, and they were usually full. Granted, an experienced player should spend that money faster, but I think it's reasonable to give them $2000 worth of storage in their refinery. 

It seems that how pips are displayed has changed from before, so someone set silos to have 10 pips instead of 12 so that it fits the reticle. That's fine. But maybe it would make sense to just change that to an even $2000 capacity also.
2014-04-20 10:16:29 -07:00
psydev
7bd6c01096 Speed up Orca missiles
Orca missiles are quite slow, travelling about the same speed as them. 

Their speed is now up to the same as Bazookas, BikeRockets, and TowerMissiles.
2014-04-20 08:00:04 -07:00
psydev
6929a1ab21 Low power slowdown reduced for ConYard
Since C&C has no power-down button (and since price of power plant went up), low-power is extra painful in TD vs. RA. Also, since the cost is higher for power plants now, it means you will be in low-power mode longer since you cannot build a power plant as fast.

So, the solution is to make the low power slowdown 1/2 speed instead of 1/3 speed for Conyard. 

This does not apply to the support queue, only the building queue.
2014-04-20 07:41:55 -07:00
Matthias Mailänder
7e31637fd1 production bar edge fixes by @MicroGraphics
followup of #5107
2014-04-20 15:44:54 +02:00
Paul Chote
44d57204d0 Merge pull request #4999 from Mailaender/start-game-notification
Moved StartGameNotification into its own trait
2014-04-21 01:32:29 +12:00
Paul Chote
a3ae84bfdc Merge pull request #5134 from Mailaender/production-overlay
Fixed welding animations playing when there are no vehicles produced
2014-04-21 01:27:42 +12:00
Matthias Mailänder
f19fbb1794 StyleCop 2014-04-20 15:26:33 +02:00
Matthias Mailänder
a8a3036bc4 moved StartGameNotification into its own trait 2014-04-20 15:25:43 +02:00
Paul Chote
595e56c08b Merge pull request #5143 from Mailaender/skirmish-bots-forbidden-slots
Fixed bots being added when the map disallows it
2014-04-21 01:13:03 +12:00
Matthias Mailänder
e53fee7d0c added production overlay to Tiberian Sun factories 2014-04-20 15:07:44 +02:00
Matthias Mailänder
eb6d9f6f69 only show welding overlays when factories are producing
closes #3756
2014-04-20 15:07:22 +02:00
Matthias Mailänder
fcca5a7683 StyleCop 2014-04-20 15:05:43 +02:00
Paul Chote
048289e6a9 Merge pull request #5138 from Mailaender/disable-idle-overlay
Fixed the Dune 2000 outpost radar dish rotating when powered down
2014-04-21 00:59:38 +12:00
Matthias Mailänder
ab3dc92554 only add bots when the map allows it
fixes #5110
2014-04-20 14:58:57 +02:00
Paul Chote
17889c3729 Merge pull request #5128 from Mailaender/force-clean
Don't spit errors if directories to be cleaned are missing
2014-04-21 00:50:40 +12:00
Matthias Mailänder
a229e224d1 stop spinning the radar dishes in Tiberian Sun on low power 2014-04-20 14:50:00 +02:00
Matthias Mailänder
01a3162725 allow animations to pause on low power
closes #2949
2014-04-20 14:47:53 +02:00
Paul Chote
8e05cc9171 Merge pull request #5124 from Mailaender/crane-overlay
Added crane build animation to construction yards in Dune 2000 and Tiberian Sun
2014-04-21 00:46:23 +12:00
Paul Chote
adff453927 Merge pull request #5146 from reaperrr/mbd-fix
Removed MustBeDestroyed from CnC Civ/Tech buildings
2014-04-21 00:28:08 +12:00
Paul Chote
e125e4ab26 Merge pull request #5142 from Mailaender/pixeldouble-hotkey
Added a new hotkey to trigger pixel doubling
2014-04-21 00:15:25 +12:00
Paul Chote
f75e0bc929 Merge pull request #5150 from Mailaender/mv-changelog-wiki
Moved CHANGELOG into GitHub wiki
2014-04-20 23:39:59 +12:00
Matthias Mailänder
9d02118e51 don't rotate the radar dish when it is powered down
closes #3755
2014-04-20 13:30:22 +02:00
Matthias Mailänder
4beceb3403 Update README.md
PNG → SVG
2014-04-20 08:08:25 +02:00
psydev
5e9f9c1792 Increase Barracks cost from $300 -> $500
I've been trying to increase the diversity of available early-game build order choices. To do this, I've increased the cost of early-game buildings like Power Plant and Barracks, while increasing the power consumption of the Refinery. This forces players to make choices with more significant consequences. The cost (money=time spent building) of power and barracks are so low right now that the time you spend building them is totally inconsequential to the build order. This leaves very few options, and most people simply pick Barracks, Refinery, Refinery.

Giving some non-trivial time cost to Power and Barracks will allow people to have more possibilities for different openings.
2014-04-19 22:28:02 -07:00
psydev
a60e7472c0 Reduce chem warrior damage vs. wood
The Chem Warrior still does good damage vs. wood, but this will allow more distinction between Flamethrower infantry and Chems. People have been complaining there's no reason not to use chem warriors, which is a claim that has some merit.

Currently, the Chem actually does more damage than Flamethrower vs. wood, which doesn't make a lot of sense. This will make the Flamer do a bit more. Chem damage will be at the level of Bazooka now.

After this change, Flamethrower will have double the economic efficiency in damage per dollar vs. wood. (It already had superior efficiency, but not by much).
2014-04-19 21:09:06 -07:00
psydev
1e9cc41dd7 TowerMissle only fires at ground now. Adjust ROF.
SAM Missile will fire at air targets now.

Adjusting ROF to match SAMMissile's; adjusting damage to keep DPS roughly the same.
2014-04-19 06:11:41 -07:00
psydev
0aad37396d Give ATWR the SAM Missile
This is so that the Advanced Guard Tower can have separate values for range and damage for ground-based and anti-air missiles.
2014-04-19 06:03:42 -07:00
psydev
6fc5c061be Increase spread on Artillery a bit.
It really needs the boost, given that it is slow and inaccurate.
When it finally hits, it will at least do some damage to infantry. 256 is inadequate.
2014-04-19 04:24:07 -07:00
psydev
3176b731a5 Minor: increasing missile rotation speed
So they don't spin around in circles around an unmoving target.
2014-04-19 04:15:30 -07:00
Matthias Mailänder
00ca5516fc add crane animation to Dune 2000 and Tiberian Sun
closes #3754
2014-04-19 13:12:32 +02:00
Matthias Mailänder
b1fe497197 fixed a packaging regression during the GeoIP2 update
followup of #4666
2014-04-19 11:58:33 +02:00
Matthias Mailänder
9839d433aa fixed packaging regressions from upgrade to SDL 2.0.3
followup of #5073
2014-04-19 11:58:33 +02:00
Matthias Mailänder
1c32b7d529 moved CHANGELOG into GitHub wiki 2014-04-19 11:58:10 +02:00
Paul Chote
f532c743fa Merge pull request #5148 from Mailaender/install-markdown
Converted INSTALL to Markdown
2014-04-19 19:56:24 +12:00
Matthias Mailänder
3daa02ece5 converted INSTALL to Markdown
moved licensing information to the README
2014-04-19 09:40:42 +02:00
Paul Chote
48753bdae8 Merge pull request #5133 from ScottNZ/new-menu
Add singleplayer mission menu to ra/td
2014-04-19 19:38:36 +12:00
Paul Chote
f63a6bce64 Merge pull request #5137 from reaperrr/gravitybomb-palette
Made GravityBomb palette customizable
2014-04-19 19:23:53 +12:00
Paul Chote
754efaf3af Merge pull request #5144 from Mailaender/cnc-lowpower-buildtime-tooltip
Fixed C&C build palette tooltip not taking low power slowdown into account
2014-04-19 19:03:32 +12:00
Matthias Mailänder
b6f2c119a7 take low power slowdown into account
fixes #4840
2014-04-19 08:58:47 +02:00
Paul Chote
326d28a084 Merge pull request #5140 from Mailaender/enemy-controlgroups
Added checks to prevent adding enemy units to control groups
2014-04-19 18:52:36 +12:00
Paul Chote
2b65af13c4 Merge pull request #5141 from Mailaender/production-locationinit
Fixed 0,0 shroud reveal when producing units on maps with tiny cordons
2014-04-19 18:46:02 +12:00
Matthias Mailänder
9f386e81a5 disallow adding actors from other players to control groups
closes #4949
2014-04-19 08:39:41 +02:00
ScottNZ
22dd2b0a92 Add singleplayer mission menu to ra/td 2014-04-19 15:54:55 +12:00
reaperrr
1a530ec39b Added a ^BaseBuilding default that Inherits ^Building to CnC mod.
Moved some traits, including MustBeDestroyed, from ^Building to ^BaseBuilding.

Removed some now superflous traits and trait negations from ^CivBuilding.

Changed Inheritances of all buildable structures to ^BaseBuilding.
2014-04-19 02:52:38 +02:00
reaperrr
9115395fb8 GravityBomb palette can now be customized the same way as for Bullets and Missiles.
Update CHANGELOG.

Also mentioned Bullets and Missiles since it seems there wasn't an entry for that before.
2014-04-18 23:53:03 +02:00
Matthias Mailänder
9c483a912e added a new hotkey to trigger pixel doubling
closes #5122
2014-04-18 17:49:55 +02:00
Matthias Mailänder
cce7d6d7e6 fixed missing LocationInit
closes #5076
2014-04-18 17:30:04 +02:00
psydev
edb9a488f8 Minor: HPAD only requires PROC instead of barracks
Not everyone will necessarily want to build a barracks early, so this gives some flexibility.
2014-04-18 07:58:20 -07:00
psydev
b336ae89f7 Infantry run 90% speed on clear terrain again
This was the old default setting.
2014-04-18 07:55:48 -07:00
psydev
88af1bca57 Grenade range/speed/spread adjustment
Grenade range reduced from 5 -> 4
Grenade speed reduced considerably, from 204 -> 85 (this was its old speed, long ago).
Grenade spread increased to compensate.

Grenadiers are now the fastest infantry. Their weapon is quite powerful but they cannot hit moving targets well. You will have to plan your tactics accordingly.
2014-04-18 07:52:47 -07:00
psydev
72a2946299 Buff tank guns, esp. vs. buildings
Tanks are a bit underwhelming in their ability to take down turrets and buildings during an attack. Their ROF has been upped, and their damage vs. wood has been increased.

Their damage % vs. infantry has been lowered to keep it the same DPS. 

Light tank bullet speed reduced a bit to make it possible to miss. It's now the same speed as the turret, and still faster than MTNK/HTNK's bullets.
2014-04-18 07:48:09 -07:00
psydev
6aa1b37563 Minor: adjust building HP for airstrike/ion
Nuke power plants and HPAD made more resilient vs. airstrike.

Communications Centre made more vulnerable to Ion Cannon. (Used to blow it up, but no more due to spread issue).
2014-04-18 07:38:26 -07:00
Matthias Mailänder
c7693b0e10 don't spit errors if directories to be cleaned are missing
closes #5126
2014-04-18 16:38:23 +02:00
psydev
bb149cb3e6 Updating Airstrike - destroys guard tower/turret
Airstrike now destroys basic turrets/GT.
Should not destroy most buildings, though. (Apparently some people were complaining about it being usde for "sniping" buildings too much).
To make damage vs. buildings relatively consistent regardless of how many tiles they occupy, napalm has far less spread now, but much more damage.

Vulcan cannon does more damage vs. heavy armor, but does not damage buildings much. This is because damage it did to buildings varied too much based on building footprint.
2014-04-18 07:35:48 -07:00
psydev
02d7f99005 Increase Ion Cannon spread
Ion Cannon has been a little weak lately. Increasing its spread to make it more effective.

This should maybe be revisited if/when #5120 gets looked at.
2014-04-18 07:30:41 -07:00
psydev
cfeeea4d64 Fix Nuke
Nuke was nerfed into oblivion. Bringing it back.
These values are approximately right. One might ask how much the nuke should be able to destroy adjacent buildings, rather than ones it doesn't hit.
2014-04-18 07:29:37 -07:00
Matthias Mailänder
bf4f58b5c7 StyleCop 2014-04-18 15:38:42 +02:00
psydev
2be06945c0 Buff stealth tank rockets vs. Wood
The Stealth Tank does pretty poor damage vs. buildings, especially for its price/tech level, and compared to recon bikes. Buffing a bit.
2014-04-18 06:24:23 -07:00
psydev
585800c953 Fix Obelisk Laser's ROF
The ROF specified in Laser: is cumulative with the delays specified in structures.yaml.
Removing the delay here because it is redundant and interferes, making the ROF slower than intended.
2014-04-18 06:21:19 -07:00
psydev
26f076ffd3 Minor: Chem warriors walk @ normal speed thru tib
This is to make it so that other units are not faster than them through tib or same speed.
2014-04-18 06:19:36 -07:00
psydev
66ea585f5f Increase Guard Tower cost from $500 -> $600 2014-04-18 06:18:09 -07:00
psydev
5d0ee09f74 Fix Obelisk ROF
Obelisk ROF wasn't working properly. Its delay between shots was far higher than the 90 intended.
I think the programming for AttackCharge doesn't work as whoever put the data in thought. It works now. 
It now has a ROF of 90 ticks, as intended. For its first shot in a series, the delay is only 50 ticks. 

I think the problem might be that FireDelay and ReloadTime were counted cumulatively.
2014-04-18 06:10:55 -07:00
psydev
918ac2d64c Minor: ConYard no longer produces 15 power
This is kind of useless and doesn't make much sense. Cutting it out in order to make intended early build order design possibilities fit better.
2014-04-18 05:59:54 -07:00
psydev
cc0d9d4a2c Increase cost of power plant from $300 -> $500
To give a fair shot to other early build orders, this will make it take a bit longer to build your second refinery by increasing the cost of building a power plant.
2014-04-18 05:58:27 -07:00
psydev
2c94615814 Increase PROC power consumption 30 -> 50
Refinery costs more energy, forcing player to build a 2nd power plant before second refinery (unless they built nothing else but their first refinery).
This makes other build orders possible early game instead of building 2 refineries + barracks being the only sensible one.
2014-04-18 05:47:16 -07:00
psydev
b22569e810 Increasing tower sight range +1
Tower weapon ranges shouldn't be too high, but I like the idea of them providing far vision.
The visual range of Guard Tower, Advanced Guard Tower and Obelisk is now +1 more than their weapon range. (8, 8, and 7 respectively).
2014-04-18 05:44:24 -07:00
psydev
52a91c23fa Minor: chg PROC sale value due to harv price chg
Harvesters now $1000, so this is to reflect that.
2014-04-18 05:41:05 -07:00
psydev
235e188692 Minor: increase SAM site vision
SAM didn't seem to be firing at targets all the time, even when they were visible. Increasing its visual range to match its weapon range.
2014-04-18 05:39:43 -07:00
psydev
163b1e2af2 Reduce DetectCloaked range on towers, HQ
The detect cloaked range is too high, especially for simple guard towers.

The HQ and Advanced Comm. Ctr.'s range of 8 is also absurdly high, and many players don't know about it. The Stealth Tanks ought to be able to sneak through a gap in a base's defenses. Towers should not have unbeatable detection range.
2014-04-18 05:38:38 -07:00
psydev
9510e9caaf Reduce Flamethrower speed to match rifle infantry
Given that Flamethrowers are quite powerful and tough (90 HP), I don't see why it makes sense to also have them be super fast. It seems they should walk at normal speed, especially given how much of a threat to buildings they are.

Reducing their speed will give Grenadiers the distinction of being a fast infantry unit.

If you think this hurts them too much, then their range should be increased, not their speed.
2014-04-18 05:35:11 -07:00
psydev
cbd88d0bd4 Minor: increase E3 scanradius to match vision 2014-04-18 05:32:35 -07:00
psydev
64c631fa2b Minor: remove DetectCloaked for individual units
Now set by default in ^Infantry.

Range is supposed to be 1 as well, not 2.
2014-04-18 05:31:01 -07:00
psydev
658525a169 Minor: increase odds infantry will survive crush
Someone complained that infantry are crushed too easily.
So they will have a 2/3rds chance to escape now.
2014-04-18 05:28:15 -07:00
psydev
41ce58ace2 Minor: ^Infantry detect cloaked by default 2014-04-18 05:27:03 -07:00
psydev
e0c3bc67cd Make infantry more likely to walk through Tiberium
Reduced pathing cost so that units will sometimes walk through tiberium if it's a valuable shortcut. This was done since the damage Tiberium does now has been reduced.
2014-04-18 05:23:05 -07:00
psydev
be2355bcc5 Fix Tiberium & make do slightly more damage
Tiberium wasn't hurting veteran units. I think it was because it only did 1 damage at a time. Set to do 2 damage now.

Increased the net rate of tiberium damage slightly. It still doesn't do that much compared to before though, and it typically won't kill your infantry.
2014-04-18 05:21:09 -07:00
Matthias Mailänder
657141bce0 Merge pull request #5135 from pchote/production-bar
Improve ProductionBar performance.
2014-04-18 14:13:14 +02:00
psydev
693668e977 Minor: reduce recoil for Mammoth Missiles 2014-04-18 05:08:37 -07:00
psydev
69b848d2e2 Make refineries unload harvesters faster
The values for loading and unloading time for harvesters are swapped.
This will keep the total amount of time for the harvest/unload cycle, but they will spend less time at the refinery. This will allow a refinery to support 3 harvesters operating from a nearby field, instead of the current 2. 

One effect of this is that it will make buying a factory early game a bit more economical  (though still a bit less so than buying only refineries with no factory), since more harvesters can be used per refinery, increasing demand for harvester production.
2014-04-18 05:07:21 -07:00
psydev
c26c4a45d7 Buffing Light/Med. tank HP
Tanks seem to die quickly in this game.
Giving them a buff in HP to increase their usefulness in the role of "tank".
2014-04-18 05:03:46 -07:00
psydev
6c7da795a7 Minor: adjusting sight ranges
Artillery, MLRS and Mobile SAM all have visual range capped at 8. This makes scouts more useful to fire beyond visual range.
Buggy given visual range of 8 to match Humvee and Bike.
2014-04-18 05:02:32 -07:00
Paul Chote
59da851d71 Improve ProductionBar performance.
Also adds an explicit second bar for construction yards.
2014-04-19 00:01:59 +12:00
psydev
271a5b78b8 Minor: Adjusting ROT speeds
Capping light vehicle rotation speeds at 10.
Light Tank turret rotation will match vehicle rotation.
Stealth Tank rotation increased to keep it maneuverable vs. tough enemies like Mammoth.
2014-04-18 04:59:29 -07:00
psydev
ec29cc61b0 Mammoth Tank HP reduced from 900 -> 800.
Mammoth was a bit OP and kind of impossible to kill. This keeps it tough but makes it possible to defeat.
2014-04-18 04:55:07 -07:00
psydev
3e3e0471de Flame Tank armor now Heavy. Cost reduced to $600.
HP reduced to 300 to compensate for new Heavy armor.
Flame tank does good damage but often dies before it can be cost-effective.
Since it is supposed to hunt infantry and light vehicles, this will help it do its job better. It will also be more resistant to flame infantry, which seems fitting. ;)
2014-04-18 04:53:58 -07:00
psydev
6153ad1d9f Reduce Harvester cost from $1200 to $1000
This is to make opening with a factory instead of more refineries a bit more feasible. 

Given that there is a maximum limit of how many harvesters can operate from a refinery in TD, lowering the price shouldn't be a problem, since there can't be harvester spam. How many refineries you have will limit how many harvesters you can effectively use. 
By comparison, RA harvester is $1100.
2014-04-18 04:49:56 -07:00
psydev
cc841f3ceb A10 is no longer a targetable unit.
Units on the ground were pursuing A10s until they left the map. Seems inappropriate.
2014-04-18 04:46:59 -07:00
psydev
a1e1f296cf Reduce Orca reload speed, from 24s -> 12s
Orca's reloading is so slow it can barely do anything. It's painful. 

This will make it non-useless in smaller groups. 
I am not concerned that this will make Orca OP, since air defense power has generally been buffed in the last year considerably.
2014-04-18 04:45:07 -07:00
psydev
ca8dd073b6 Increase Chinook sight range 8 -> 10 2014-04-18 04:42:21 -07:00
psydev
6c342cd04e Buff Orca dmg. vs. Heavy. Nerf vs. Air
Orca damage vs. heavy currently is pretty abysmal. Needs buff to define unit as anti-vehicle (instead of being equal to Apache vs. vehicles/armor).

Orca nerfed a bit vs. air to put it on even footing with Apache in air-to-air combat.

ROF slightly increased.
2014-04-18 04:41:02 -07:00
psydev
1558c23c18 Nerf mammoth missiles
Mammoth missiles are a bit crazy, especially vs. buildings. Nerfing them a bit.
To compensate, increasing their spread a bit.

To increase missile efficiency (avoid extra missiles being wasted on overkill), their damage has been reduced from 75 to 45. They can still kill orcas in 2 shots.
To further avoid wasteful firing of missiles, the burst delay was increased, and the speed of the missiles was increased.
2014-04-18 04:30:58 -07:00
psydev
3d69931912 MLRS buff vs. buildings, infantry
Artillery is weak vs. buildings in CNC, so this needs a slight buff (ARTY also buffed). 
MLRS needs a slight boost vs. infantry, since GDI relies on it to. 
Spread increased from 15 to 16.
2014-04-18 04:18:09 -07:00
psydev
7a890aeda6 Nerf APC gun.
Reducing damage vs. light vehicles & buildings, since APCs are kind of hard to kill early game.
Increasing damage vs. heavy slightly so they are non-useless.
2014-04-18 04:13:46 -07:00
psydev
bdeaf3a194 Flamethrower buff vs. vehicles
Flamethrower should be good vs. light  vehicles. Buffing them vs. light, and changing damage to kill most vehicles with 3 hits instead of 4. 
They are also getting an increase vs. infantry from 90% to 100%.
Their speed will be getting reduced to normal infantry, so I dont think we have to worry about them being OP. 
Slight nerf to damage vs. heavy to better define the unit as not a mid-game anti-armor unit.
2014-04-18 03:42:10 -07:00
psydev
00404c1a3a Mobile SAM: Damage buffed. Range reduced -1.
Given that SAM sites have range of 8, that it would be appropriate if mobile SAMs also had a range reduction. Choosing 9 for now, since battlefield conditions are a bit different than for static defenses, and because turrets sometimes behave funny with respect to range and firing.
2014-04-18 03:36:47 -07:00
psydev
ef072c6041 Nod Artillery buffed. Esp. vs. Heavy armor
If you want to consider increasing the price as a result of this, that might be OK.
But as far as the unit's tactical effectiveness is concerned, I think these changes are necessary, vs. buildings and heavy armor in particular.

In order to keep Arty from being OP, its gun remains inaccurate. It's also slow and vulnerable to exploding.
2014-04-18 03:33:36 -07:00
psydev
bb6e97700f BikeRockets buff vs. wood. Nerf vs. infantry. 2014-04-18 03:28:02 -07:00
psydev
f2fdbe4e77 Flame Tank damage vs. light increased 2014-04-18 03:23:06 -07:00
psydev
12827b27bf Improve Hum-vee/Buggy machine gun vs. infantry
Hum-vee/buggy machinegun buffed to make them more useful vs. infantry. Currently they are rather weak. 
Damage vs. other types of armor reduced to compensate.
2014-04-18 03:13:02 -07:00
psydev
0c117775b3 Nerfing guard towers
Range of obelisk, Adv. Guard Tower and SAM site reduced.
Damage of Guard Tower reduced vs. infantry and light vehicles; spread increased to compensate a bit.
Damage of Advanced Guard Tower nerfed, especially against light vehicles. Damage vs. infantry increased (though it's still low DPS). Spread also increased to compensate for its lack of power vs. infantry.
Turret damage mostly unchanged, but does less damage per shot. Damage vs. light vehicles increased to match damage vs. heavy armor. Damage vs. infantry slightly reduced.
2014-04-18 03:03:39 -07:00
Paul Chote
abe06b24b4 Merge pull request #5129 from Mailaender/csproj-reference-xml-error
Fixed Reference is expected Line 89 position 6
2014-04-18 20:25:23 +12:00
Matthias Mailänder
a7b401e981 Mods.RA also requires MaxMind.GeoIP2 2014-04-18 09:44:00 +02:00
Matthias Mailänder
5d6b26b971 fixed Reference is expected Line 89 position 6 2014-04-18 09:36:22 +02:00
Matthias Mailänder
c825cb6aca Merge pull request #5066 from pchote/weapon-cameras
Superweapon tweaks
2014-04-18 09:00:49 +02:00
Paul Chote
4f070cd0fc Update changelog. 2014-04-18 18:55:35 +12:00
Paul Chote
7c166449c3 Fix GDI03 airstrike power. 2014-04-18 18:55:34 +12:00
Paul Chote
86f5a39d86 Persist the nuke beacon until detonation. 2014-04-18 18:55:34 +12:00
Paul Chote
3ad35cb803 Support indefinite beacon duration for support powers that remove the beacon on completion. 2014-04-18 18:55:34 +12:00
Paul Chote
b74a0734c8 Change D2K airstrike shroud reveal to match TD. 2014-04-18 18:55:34 +12:00
Paul Chote
56586cb4b5 Add a camera to the nuke. 2014-04-18 18:55:34 +12:00
Paul Chote
51363fd724 Make nuke flight time independent from map size. 2014-04-18 18:55:34 +12:00
Paul Chote
84a346d4b6 Merge pull request #4666 from Mailaender/geoip2
Updated to GeoIP2
2014-04-18 18:52:28 +12:00
Matthias Mailänder
9099e987d3 update to GeoIP2 and parse the database only once
closes #4227
2014-04-18 07:48:13 +02:00
Paul Chote
14eab38f0b Add a camera to the Ion Cannon. Fixes #5058. 2014-04-18 14:17:15 +12:00
Paul Chote
c5ccb0ef4a Merge pull request #5125 from reaperrr/explosion-palette
Added ExplosionPalette and WaterExplosionPalette traits to Warheads
2014-04-18 14:04:32 +12:00
Paul Chote
45507d4b3b Merge pull request #5123 from Mailaender/clean-openra-game-dll
Additions to Makefile for cleaning up OpenRA.Game/*.dll left-overs
2014-04-18 13:38:22 +12:00
reaperrr
c9b162ec3c Added ExplosionPalette and WaterExplosionPalette traits to Warheads.
This is needed for TS water splashes, for example (they use unit*.pal instead of anim.pal).
Defaults to "effect".
2014-04-18 01:23:09 +02:00
Matthias Mailänder
6a31e2cc14 clean up OpenRA.Game/*.dll left-overs 2014-04-17 17:12:10 +02:00
Matthias Mailänder
18381f178b Merge pull request #5114 from reaperrr/ts-fixes01
Lots of TS mod fixes & additions
2014-04-17 06:58:49 +02:00
reaperrr
9fa3a1cc1f Fix uppercase prerequisites. 2014-04-16 21:50:34 +02:00
Matthias Mailänder
dcfd0c0b5d Merge pull request #5112 from pchote/fileformats
Merge FileFormats dll into Game and reorganise namespaces.
2014-04-16 20:52:04 +02:00
reaperrr
04220f50a1 Tweaked build palette positions of some GDI units. 2014-04-16 19:02:58 +02:00
reaperrr
1f26fa0389 Made InfDeath less arbitrary.
Rule of thumb:
Small calibers = InfDeath 1
Anti-tank weapons = InfDeath 2
Explosive weapons = InfDeath 3
2014-04-16 19:02:14 +02:00
reaperrr
c204fd0b26 Tons of sequence fixes for infantry.
Added a fixed version of infdie.shp, converted to unit*.pal.
Added an infexpl.shp for Cyborg Commando death 3, converted to unit*.pal.
2014-04-16 19:00:27 +02:00
reaperrr
e5a4eadb37 Added Radars, Tech Centers and Walls to both sides.
Added idle animations to weapon factories.
Added some general prerequisites (FACTORY, RADAR, TECH).
2014-04-16 18:56:58 +02:00
reaperrr
0f79022ed0 Changed Cyborg armor type to Light, to make it less OP against other infantry. 2014-04-16 18:38:19 +02:00
reaperrr
f7e627f653 Added build/deploy, damage and destruction sounds to buildings and MCV.
Moved ^Wall default right below ^Building inside defaults.yaml.
2014-04-16 18:37:05 +02:00
reaperrr
ff0efd89ac Added some notifications, fixed Cyborg/Cyborg Commando death sounds. 2014-04-16 18:33:32 +02:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
MicroGraphics
5a698d612f Fixed dialog.png for RedAlert 2014-04-15 08:00:39 +02:00
Matthias Mailänder
5e1e45631a Merge pull request #5102 from pchote/volume-slider-fix
Fix volume slider order in the settings panel.
2014-04-14 08:07:12 +02:00
Paul Chote
1178910aa1 Fix volume slider order in the settings panel. Fixes #5088. 2014-04-14 17:00:02 +12:00
Paul Chote
0651f02827 Merge pull request #5089 from Mailaender/clean-msbuild
Enhanced Makefile to clean up after IDE mess
2014-04-14 12:15:59 +12:00
Paul Chote
415a5bbddd Merge pull request #5093 from Mailaender/beacon-buttons
Added the Beacon button artwork for Red Alert, Dune 2000 and Tiberian Sun
2014-04-14 12:06:15 +12:00
Cr0s
f5f9436c8b Update structures.yaml
Removed CanPowerDown trait
2014-04-13 11:11:21 -07:00
Matthias Mailänder
2f14dca378 Merge pull request #5073 from pchote/sdl-spaces-yaaaaaaay
Upgrade to SDL 2.0.3
2014-04-13 08:05:43 +02:00
Paul Chote
ad9d4c0c85 Add changelog entry. 2014-04-13 12:05:38 +12:00
Paul Chote
a92cf920c6 Fix a visual glitch in OSX. 2014-04-13 12:05:38 +12:00
Paul Chote
f62721bdd6 Upgrade to SDL 2.0.3 and latest SDL2-CS (e8731ef). 2014-04-13 12:05:37 +12:00
Cr0s
b7241924f9 Fixed #3826 2014-04-12 20:38:12 +04:00
Matthias Mailänder
27d78574f8 Merge pull request #5091 from reaperrr/ra-vehicle-explosions
Add RA vehicle explosions
Fixes #5077
2014-04-12 15:05:58 +02:00
reaperrr
fd0d97e55d Fix typos in vehicles.yaml 2014-04-12 12:50:43 +02:00
reaperrr
5576e72b65 Fix stupid typo, use UnitExplodeSubmarine for MSUB. 2014-04-12 12:10:43 +02:00
Matthias Mailänder
5b016997e9 add the beacon button artwork to RA, D2k and TS
thanks to @xanax
2014-04-12 09:20:49 +02:00
Matthias Mailänder
7366c0b7b0 don't play crumble sound when placing concrete 2014-04-12 09:14:02 +02:00
Matthias Mailänder
6f22ba4811 fixed Dune 2000 powerdown cursor palette 2014-04-12 09:13:43 +02:00
reaperrr
87fa857a60 Adds Explosions to all vehicles that didn't have one. 2014-04-12 01:52:46 +02:00
reaperrr
ae700bf6bf Adds visible explosions to ships and submarines 2014-04-12 01:49:33 +02:00
reaperrr
4245766b8d Adds Explode weapons for ships and submarines 2014-04-12 01:48:43 +02:00
reaperrr
98fe3e6d65 Minor explosion weapon sound fixes 2014-04-12 01:47:51 +02:00
Matthias Mailänder
cf09ecc4de Update INSTALL
we now require a .NET 4.0 compatible compiler
2014-04-11 20:05:00 +02:00
Matthias Mailänder
40b805046f Update INSTALL
* .NET 4.0 #5082
* SDL 2 #3315
* avoid trademarks
2014-04-11 20:03:15 +02:00
Matthias Mailänder
50f194b96f clean up after MonoDevelop/Visual Studio 2014-04-11 19:45:13 +02:00
Matthias Mailänder
900ec08cdf Merge pull request #5086 from ScottNZ/balance
More RA balance tweaks
2014-04-11 19:43:36 +02:00
Matthias Mailänder
771638c8e8 decide which mirror to choose locally and display result
closes #3904
2014-04-11 10:30:12 +02:00
ScottNZ
2e3293dba8 Increase ra husk hp from 140 to 280 and increase burn damage 2014-04-11 19:35:04 +12:00
Matthias Mailänder
9c499cc9e5 Merge pull request #5082 from pchote/dotnetfour
Upgrade to .NET 4.0
2014-04-11 09:17:50 +02:00
ScottNZ
d66c005253 Reduce hijacker hp from 80 to 50 2014-04-11 18:14:48 +12:00
Paul Chote
81d7c3a038 Merge pull request #5069 from cjshmyr/shok
Revert removing TakeCover from Shock Trooper and make them Crushable
2014-04-09 20:34:23 +12:00
Paul Chote
257147df27 Merge pull request #5070 from ScottNZ/mrj
Make mrj not jam allied missiles
2014-04-09 20:33:40 +12:00
Paul Chote
9706b1cfc3 Merge pull request #5071 from ScottNZ/winmake
Added a counterpart to the Makefile for Windows users
2014-04-09 20:33:09 +12:00
Paul Chote
e9a14291a3 Merge pull request #5048 from Unit158/shrapnel
Shrapnel
2014-04-09 20:29:07 +12:00
Paul Chote
1b2a90c00c Migrate to System.Lazy. 2014-04-09 20:20:41 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
Chicken man
bcde32f7c4 Edited CHANGLOG 2014-04-08 20:21:05 -04:00
Chicken man
e6c0a00604 Closes #4463. Added Shrapnel, as well as variable velocity and arc for bullets 2014-04-07 17:09:52 -04:00
ScottNZ
e47bd5d85f Added a counterpart to the Makefile for Windows users 2014-04-07 23:12:54 +12:00
ScottNZ
c9d81934a5 Make mrj not jam allied missiles 2014-04-07 11:24:11 +12:00
Curtis Shmyr
8a660b5ed6 Revert removing TakeCover from Shock Trooper and make them Crushable 2014-04-06 11:52:06 -06:00
Paul Chote
4d08093d1d Merge pull request #5044 from Mailaender/better-rule-naming
Renamed old system.yaml descendened files
2014-04-06 20:23:24 +12:00
Paul Chote
a010a0b914 Merge pull request #5065 from Mailaender/hey-bale-unboom
Made hay bales non C4 targetable
2014-04-06 20:21:55 +12:00
Matthias Mailänder
8de154573b renamed old system.yaml descendened files 2014-04-06 08:15:13 +02:00
Matthias Mailänder
bad4ee0d38 non-explosive hay-bales 2014-04-06 07:58:38 +02:00
Matthias Mailänder
4195e683a6 Merge pull request #5063 from pchote/commando-fix
Restrict commando weapon to infantry
2014-04-06 07:51:55 +02:00
Matthias Mailänder
6afc05e5f6 Merge pull request #5056 from pchote/makefile-fix
Set the modchooser version during packaging.
2014-04-06 07:38:23 +02:00
Paul Chote
21f44c22fb Merge pull request #5045 from Mailaender/d2k-map-players
Reduced player numbers in Dune 2000 maps with too few space to build
2014-04-06 16:38:06 +12:00
Paul Chote
098e802a24 Merge pull request #5046 from Mailaender/ra-maps-metadata-overflow
Shortened map titles and author credits to combat overflow
2014-04-06 16:31:12 +12:00
Paul Chote
9b27cac69b Remove redundant versus from ion cannon weapon. 2014-04-06 16:07:55 +12:00
Paul Chote
ce785da592 Limit the commando's sniper rifle to infantry only. 2014-04-06 16:07:55 +12:00
Paul Chote
4280835439 Add additional TargetTypes to C&C. 2014-04-06 16:07:47 +12:00
Paul Chote
b94b48c843 Set the modchooser version during packaging. Fixes #5055. 2014-04-06 11:39:07 +12:00
Matthias Mailänder
7562540a2e shorter Map.Name and Map.Author fields 2014-04-05 19:56:30 +02:00
Matthias Mailänder
2484e0b779 Merge pull request #5042 from cjshmyr/seasidefix
Fix missing ore well on bottom right spawn of Seaside 2
2014-04-05 19:48:35 +02:00
Matthias Mailänder
8fc6fe10f2 Death Depths: 6 players to 2 2014-04-05 19:41:33 +02:00
Matthias Mailänder
1eabbdf8b9 Merge pull request #5043 from cjshmyr/gemmines
Fix Gem Mine footprint
2014-04-05 19:32:52 +02:00
Matthias Mailänder
c5be6b9877 Venac Ditch: 4 players to 2 players 2014-04-05 19:28:59 +02:00
Curtis Shmyr
a15e4f675b Fix Gem Mine footprint 2014-04-05 11:05:07 -06:00
Curtis Shmyr
1eea9d5efc Fix missing ore well on bottom right spawn of seaside 2 2014-04-05 10:39:55 -06:00
Paul Chote
c594e31c43 Merge pull request #5038 from Mailaender/modchooser-pkg
Packaged the modchooser
2014-04-05 23:50:45 +13:00
Matthias Mailänder
0caeb28abd package modchooser 2014-04-05 12:42:40 +02:00
Matthias Mailänder
967128a14c Merge pull request #5037 from pchote/range-revert
Restore old defence range values.
2014-04-05 12:12:12 +02:00
Paul Chote
1f82b13d0d Restore old defence range values.
This reverts commit 9e35e01e3a.
2014-04-05 22:53:09 +13:00
Matthias Mailänder
8eefff1127 Merge pull request #5035 from pchote/wall-concrete-fix
Wall concrete fix
2014-04-05 10:24:56 +02:00
Paul Chote
19caf7b6f2 Fix walls not being buildable on concrete. Fixes #5031. 2014-04-05 20:47:16 +13:00
Paul Chote
d4dc1b49e1 Update changelog. 2014-04-05 20:28:24 +13:00
Matthias Mailänder
6a879cda8c Merge pull request #5029 from ScottNZ/mechanic
Fix some AttackMedic/mech bugs/regressions
2014-04-05 09:25:26 +02:00
ScottNZ
4ae72f5f5d Fix the wrong cursor being used for AttackMedic when out of range 2014-04-05 19:51:02 +13:00
ScottNZ
f6dd2c2c68 Fix mechanics being able to repair husks and defensive buildings 2014-04-05 19:50:59 +13:00
Matthias Mailänder
e13d213098 Merge pull request #5033 from pchote/wonderwall
Wall and D2K turret polish
2014-04-05 08:29:45 +02:00
Matthias Mailänder
1be67ec4d3 Merge pull request #5024 from ScottNZ/balance
Closes #3272
2014-04-05 08:09:46 +02:00
Paul Chote
4025db45a3 Fix turret muzzleflash. 2014-04-05 18:09:20 +13:00
Paul Chote
15c2930eeb Allow turrets to connect to walls in D2K. Fixes #5032. 2014-04-05 18:09:06 +13:00
Paul Chote
82ac8d8d80 Support multiple wall-type connections for D2K. 2014-04-05 17:05:42 +13:00
Paul Chote
52b4ac0aed Update neighbours when walls are destroyed or sold. Fixes #2351. 2014-04-05 16:36:34 +13:00
ScottNZ
a29111a9a8 Add a missing sequence to thf 2014-04-05 15:42:18 +13:00
ScottNZ
5eb91d2811 Add hijacker 2014-04-05 13:58:40 +13:00
ScottNZ
d4bc4ac827 Rename BuildingCaptureNotification.cs to CaptureNotification.cs 2014-04-05 13:58:19 +13:00
ScottNZ
f8e1779f24 Add an option to cancel activities when captured to Capturable 2014-04-05 13:58:02 +13:00
Matthias Mailänder
1ac4c6d1e1 Merge pull request #5023 from cjshmyr/mech
RA - moved husk capturing from engineer to mechanic
2014-04-04 17:53:34 +02:00
Matthias Mailänder
b8831bb59d Merge pull request #5025 from Ripsn/eventbounds
Closes #4987
2014-04-04 12:43:03 +02:00
Ripsn
c8547d6004 Update CHANGELOG for Eventbounds 2014-04-04 19:22:55 +13:00
Ripsn
59a1cfe914 Fixed - Small portion of Production tab on Right side unresponsive 2014-04-04 19:09:56 +13:00
Curtis Shmyr
1be6339590 RA - moved husk capturing from engineer to mechanic 2014-04-03 22:46:23 -06:00
Matthias Mailänder
b8646f98ab Merge pull request #5016 from obrakmann/disable-shellmaps
Disable shellmaps temporarily
2014-04-03 17:56:23 +02:00
Oliver Brakmann
4d71e37ab0 Disable shellmaps temporarily 2014-04-03 17:24:01 +02:00
Paul Chote
94b2debaa4 Merge pull request #4941 from Mailaender/kill-husks
Made husks targetable with force fire only
2014-04-04 03:56:33 +13:00
Matthias Mailänder
c76ebbdc46 exclusive force fire on husks and bridges 2014-04-03 15:57:41 +02:00
Matthias Mailänder
db19846972 Merge pull request #5021 from pchote/msam-icon
Fix mobile SAM icon override.
2014-04-03 15:53:15 +02:00
Paul Chote
70c2156325 Fix mobile SAM icon override. Fixes #5004. 2014-04-04 02:30:15 +13:00
Paul Chote
5265366287 Merge pull request #4872 from Mailaender/password-hotkeys
Mapped password field Enter/ESC to buttons
2014-04-04 02:23:57 +13:00
Paul Chote
d7f3128978 Merge pull request #5012 from Mailaender/cnc-powerdown-regression
Fixed missing disabled overlay for TD defenses
2014-04-03 21:31:58 +13:00
Matthias Mailänder
718ba1f1d1 Merge pull request #5020 from cjshmyr/balancing
Various balance changes
2014-04-03 09:13:26 +02:00
Matthias Mailänder
e8601d8df9 Merge pull request #5019 from cjshmyr/newmap
Add RA map - Seaside 2
2014-04-03 09:05:36 +02:00
Matthias Mailänder
4f9f258413 automatic upgrade rules for new DisabledOverlay 2014-04-03 07:22:39 +02:00
Curtis Shmyr
ae5a3ca548 Chronotank teleport distance increased and teleport cooldown decreased 2014-04-02 21:37:45 -06:00
Curtis Shmyr
dde4923e7b Buff shock trooper 2014-04-02 21:33:45 -06:00
Curtis Shmyr
af1801cfb2 Decrease MRJ cost 2014-04-02 21:28:31 -06:00
Curtis Shmyr
cb2a3fe1fe Added ra map - seaside 2 2014-04-02 21:09:55 -06:00
Matthias Mailänder
95d8d1d45d show disabled overlay when TD defenses power down
closes #5005
2014-04-02 21:24:40 +02:00
Matthias Mailänder
c9d1431987 Merge pull request #4953 from pchote/modchooser
Overhauled mod selector.
2014-04-02 20:59:42 +02:00
Paul Chote
38f1aff0bb Update changelog. 2014-04-03 07:21:56 +13:00
Paul Chote
c720cb0b41 Extract mod selector into its own mod. 2014-04-03 07:21:56 +13:00
Paul Chote
fa775a88c1 Replace ra logo psd with svg. 2014-04-03 07:15:03 +13:00
Paul Chote
de4898badf Add RGBASpriteWidget. 2014-04-03 07:15:03 +13:00
Paul Chote
3f63eb4ec6 Allow SheetBuilder to be used from mod code. 2014-04-03 07:15:03 +13:00
Paul Chote
b5c63175e2 Allow button tooltip labels to be set by UI logic. 2014-04-03 07:15:03 +13:00
Paul Chote
8694698a1a Fix tooltips not displaying in the pre-shellmap environment. 2014-04-03 07:15:03 +13:00
Paul Chote
a5223a519c Allow custom button types. 2014-04-03 07:15:02 +13:00
Paul Chote
aa77536e96 Support borderless panel types. 2014-04-03 07:15:02 +13:00
Matthias Mailänder
31991c3679 Merge pull request #5011 from pchote/psydev-changelog
Update changelog for recent C&C merges.
2014-04-02 19:16:38 +02:00
Paul Chote
1acede6041 Update changelog for recent C&C changes. 2014-04-02 22:23:36 +13:00
Matthias Mailänder
a4e3d7ee5f Merge pull request #5008 from pchote/spritewidget
Split ShpImageWidget into SpriteWidget and SpriteSequenceWidget.
2014-04-02 09:56:06 +02:00
Paul Chote
13f6075638 Merge pull request #5007 from psydev/patch-4
Allow Chinook to land in tiberium
2014-04-02 20:32:41 +13:00
Paul Chote
ff9c0f693b Merge pull request #5006 from psydev/patch-3
Give ARTY a 75% chance of exploding
2014-04-02 20:32:25 +13:00
Paul Chote
6be25468bb Animate the C&C color picker preview. 2014-04-02 19:24:07 +13:00
Paul Chote
143d3aa083 Replace ShpImageWidget -> SpriteSequenceWidget. 2014-04-02 19:24:07 +13:00
Paul Chote
bf0c7297e2 Clean up the AssetBrowser logic. 2014-04-02 19:24:07 +13:00
psydev
6b8fd4efd9 Allow Chinook to land in tiberium
Seems to not make sense that it can't land in tiberium, especially since Chem Troopers can walk through it undamaged, and since tiberium is not quite as deadly in recent patches.
2014-04-01 04:03:41 -07:00
psydev
296d9c5072 Give ARTY a 75% chance of exploding
The odds of exploding should be high, but not 100%, I think.
2014-04-01 03:12:21 -07:00
Paul Chote
1ea48b0167 Add a lighter-weight SpriteWidget to eventually replace ShpWidget. 2014-04-01 22:16:10 +13:00
Paul Chote
146b49e251 Merge pull request #5003 from Mailaender/valid-c4-target
Added checks for valid targets to C4 demolition
2014-04-01 19:14:00 +13:00
Matthias Mailänder
3d6086187e don't crash when C4 target.Actor is null
closes #4975
2014-04-01 07:41:28 +02:00
Paul Chote
b82510023f Merge pull request #5001 from Mailaender/fly-valid-target
Added checks for valid targets when flying
2014-04-01 18:25:51 +13:00
Paul Chote
ecb5b71d3e Merge pull request #4971 from Mailaender/dpkg-copyright
Tweak the DEBIAN copyright file
2014-04-01 18:09:52 +13:00
Paul Chote
e41fca3d47 Merge pull request #5002 from Mailaender/server-browser-inner-nre
Catched null reference exception in RefreshServerListInner
2014-04-01 18:08:05 +13:00
Paul Chote
b3e3b1bd7c Merge pull request #4986 from Mailaender/scroll-velocity
Scroll velocity polish
2014-04-01 18:06:09 +13:00
Paul Chote
bdfac27d14 Merge pull request #4984 from Mailaender/tileset-fixes
Tileset YAML improvements
2014-04-01 17:53:01 +13:00
Matthias Mailänder
c7ed2aacaf check for valid targets when flying
closes #4972
2014-03-31 13:45:13 +02:00
Matthias Mailänder
7fb53e336a catch null reference exception in RefreshServerListInner
closes #4964
2014-03-31 13:27:50 +02:00
Matthias Mailänder
c4b28b9016 Merge pull request #4996 from obrakmann/fix4991
Remove husks from radar
2014-03-30 21:07:55 +02:00
Matthias Mailänder
043b02ebf8 adhere more to DEBIAN packaging guidelines 2014-03-30 21:03:32 +02:00
Oliver Brakmann
031461e188 Make husks not appear on radar. Fixes #4991. 2014-03-30 12:56:02 +02:00
Matthias Mailänder
98a3d7d55d scroll the game server list faster
closes #3462
2014-03-29 20:06:17 +01:00
Matthias Mailänder
64b4f62af0 hard-coded TooltipTemplate to YAML 2014-03-29 20:02:52 +01:00
Matthias Mailänder
d514689ec7 hard-coded ScrollVelocity to YAML 2014-03-29 19:50:31 +01:00
Matthias Mailänder
f7551016c4 setup editor categories for INTERIOR 2014-03-29 19:33:55 +01:00
Matthias Mailänder
af5eed22a8 fixed the ant hill tile 2014-03-29 19:33:55 +01:00
Matthias Mailänder
153aba469d Merge pull request #4970 from Phrohdoh/LineBuild
Added LineBuildNode trait to filter which structure(s) a LineBuild actor can be attached to.
Closes #2248
2014-03-29 12:55:07 +01:00
Matthias Mailänder
9c92980635 Merge pull request #4974 from ihptru/legacy-maps-fix
Adds spawn points to imported legacy maps
Fixes #4794
2014-03-29 09:30:30 +01:00
Igor Popov
647dc749f0 Legacy map import fix spawn slots definition 2014-03-28 17:19:49 +04:00
Taryn
61749e145d Added LineBuildNode trait to filter which structure(s) a LineBuild actor can be attached to. 2014-03-27 20:47:46 -05:00
Matthias Mailänder
758babcad4 Merge pull request #4899 from obrakmann/gdi04a
Add port of scg04ea mission
2014-03-25 19:01:49 +01:00
Matthias Mailänder
c1f936b24c Merge pull request #4914 from Kanar/MB
Minibibs for CNC and RA
2014-03-25 18:36:34 +01:00
Kanar
fc2d0510d8 Adds minibibs for bibless buildings in RA and C&C. 2014-03-25 13:23:05 +01:00
Matthias Mailänder
5f31fbb009 Merge pull request #4962 from obrakmann/fix4954
Fix missing ZOffset in FIX's damaged-idle sequence. Fixes #4954
2014-03-25 07:51:43 +01:00
Oliver Brakmann
4c00b73818 Fix missing ZOffset in FIX's damaged-idle sequence. Fixes #4954 2014-03-24 21:28:42 +01:00
Matthias Mailänder
951e441ff9 Merge pull request #4959 from ScottNZ/beacon
Add atom bomb beacon poster to ra
2014-03-24 20:57:15 +01:00
Matthias Mailänder
096ce9e9a3 Merge pull request #4960 from ScottNZ/balance
Buff ftrk a bit
2014-03-24 20:40:29 +01:00
ScottNZ
ee05bd20fc Buff ftrk a bit. Primarily addresses its weakness against aircraft 2014-03-24 20:31:47 +13:00
ScottNZ
b9fdf6b66a Add atom bomb beacon poster to ra 2014-03-24 20:08:54 +13:00
Oliver Brakmann
c0a3a8d09a Add port of scg04ea mission 2014-03-23 14:16:05 +01:00
Oliver Brakmann
7b3974d688 Add Reinforcements.ReinforceWithCargo 2014-03-23 14:16:05 +01:00
Matthias Mailänder
af1db08503 Merge pull request #4948 from pchote/replay-browser
Show player and spawn details in the replay browser.
closes #4879
2014-03-23 08:45:23 +01:00
Paul Chote
55ad12d9a3 Show player and spawn details in the replay browser. 2014-03-23 13:00:53 +13:00
Matthias Mailänder
272e872357 Merge pull request #4942 from pchote/more-replays
Overhaul observer shroud selector.
2014-03-22 12:20:40 +01:00
Paul Chote
71357950f7 Update changelog. 2014-03-22 23:20:29 +13:00
Paul Chote
3a8c94d8f8 Hook up observer view keybindings. Fixes #4435.
Uses 0-9 to select view (plus shift to cycle backwards), '-' for                 combined shroud and '=' for world view.
2014-03-22 23:18:52 +13:00
Paul Chote
a31cdec87a Move control group logic into its own logic class. 2014-03-22 22:32:41 +13:00
Paul Chote
8beb9ffc57 Add LogicKeyListenerWidget for binding keys to UI logic. 2014-03-22 22:32:41 +13:00
Matthias Mailänder
8b207274ee Merge pull request #4854 from obrakmann/lua
More Lua updates
2014-03-22 09:28:23 +01:00
Matthias Mailänder
f744939530 Merge pull request #4918 from cjshmyr/ctnk
Chronotank group teleportation with hotkey, closes #2500
2014-03-22 09:08:11 +01:00
Paul Chote
2c8fc4603a Add flags and player colours to the observer selector. 2014-03-22 20:01:09 +13:00
Curtis Shmyr
6ced7b274c Chronotank teleporation by holding SHIFT or ALT and issuing a move order 2014-03-22 00:13:24 -06:00
Paul Chote
104b520b21 Divide the shroud selector into groups. 2014-03-22 16:02:11 +13:00
Curtis Shmyr
21544ce235 Merge pull request #4938 from pchote/map-derp
Isolate gameplay map state from the map cache.
2014-03-21 18:33:54 -06:00
Paul Chote
37101ba88e Isolate gameplay map state from the map cache. Fixes #4937. 2014-03-22 13:03:45 +13:00
Oliver Brakmann
ca786f6039 Add Production.BuildTeamFromTemplate
Production.BuildTeamFromTemplate allows the production of teams from a
list of
actor types, assigning a function to that team once it is complete.

A 'template' in this case looks like this:
template = { {factory, {list of units to build using aforementioned factory}} }
e.g. template = { {barracks, {"e1", "e1", "e1", "e3", "e3"}} }

You can also build teams using multiple factories like this:
template = { {barracks, {"e3", "e3", "e3"}}, {war_factory, {"3tnk", "3tnk"}} }

Before using Production.BTFT you need to call
Production.EventHandlers.Setup once.
2014-03-21 23:22:01 +01:00
Oliver Brakmann
0eb1e2cc6d Actor.Patrol*: make sure that the actor is still alive 2014-03-21 23:22:01 +01:00
Matthias Mailänder
3f2ca8d9d3 Merge pull request #4932 from ihptru/slash-fix
get rid of double slash in path to maps and content in support dir
2014-03-21 20:26:49 +01:00
Igor Popov
6cb9b3afda get rid of double slash in path to maps and content in support dir 2014-03-21 22:57:01 +04:00
Matthias Mailänder
333d7ee7be Merge pull request #4930 from pchote/more-beacons
More beacon polish
2014-03-21 12:55:12 +01:00
Paul Chote
28efe99f21 Restrict beacon placement to explored regions. 2014-03-22 00:12:28 +13:00
Paul Chote
9fce6dd310 Change beacon hotkey to F9 to be consistent with sell / power / repair. 2014-03-22 00:12:28 +13:00
Paul Chote
9541686de3 Add an order button for beacon placement. 2014-03-22 00:12:28 +13:00
Matthias Mailänder
ccbe4f3768 Merge pull request #4929 from pchote/orderbuttons
Unify all mods on the C&C order button logic.
2014-03-21 12:11:09 +01:00
Paul Chote
0bc3a68e9f Unify all mods on the C&C order button logic. 2014-03-22 00:02:41 +13:00
Matthias Mailänder
255bfc70d1 Merge pull request #4901 from pchote/async-maps
Asynchronous map downloading.
2014-03-21 12:01:11 +01:00
Paul Chote
595ef7bfae Update changelog. 2014-03-21 23:33:15 +13:00
Paul Chote
6538f696fa Use the resource site to fill in missing details in the server browser. 2014-03-21 23:33:15 +13:00
Paul Chote
c3ba27ef6c Reimplement ingame map downloading. 2014-03-21 23:33:15 +13:00
Paul Chote
6b199d3376 Add bindings to ProgressBarWidget. 2014-03-21 23:33:15 +13:00
Paul Chote
e2e0728e20 Add a force start warning dialog. 2014-03-21 23:33:15 +13:00
Paul Chote
fcb3d7347a Kick clients who don't have the map when the host force-starts. 2014-03-21 23:33:14 +13:00
Paul Chote
f5f84244eb Remove map download support. 2014-03-21 23:33:14 +13:00
Paul Chote
c5ba8548c4 Move C&C chrome definitions to more closely match the other mods. 2014-03-21 23:33:14 +13:00
Paul Chote
1020d45664 Split lobby map preview into its own logic class. 2014-03-21 23:33:14 +13:00
ScottNZ
491fbcfef6 Merge pull request #4900 from pchote/garrison
Add garrison support for player-owned transports
2014-03-21 23:23:26 +13:00
Paul Chote
793f4a9d55 Add changelog. 2014-03-21 10:07:30 +13:00
Paul Chote
de9ddc4716 Port RA pillbox to new garrison system. 2014-03-21 10:07:30 +13:00
Paul Chote
9993eacf65 Add upgrade rules. 2014-03-21 10:07:28 +13:00
Paul Chote
3f9e89a746 Fix retaliation against garrisoned actors. 2014-03-21 10:03:54 +13:00
Paul Chote
4f7f0b7a55 Don't draw combat debug for actors outside the world. 2014-03-21 10:03:54 +13:00
Paul Chote
4555157ed2 Display fire ports in the combat debug overlay. 2014-03-21 10:03:54 +13:00
Paul Chote
1878713866 Allow RenderRangeCircle to specify a fallback range. 2014-03-21 10:03:54 +13:00
Paul Chote
387a5ded4b Add AttackGarrisoned for allowing passengers to shoot outside. Fixes #4483. 2014-03-21 10:03:53 +13:00
Paul Chote
d7d00fffef Move MuzzleFlash definition onto Armament. 2014-03-21 10:03:53 +13:00
Paul Chote
11d4567b5d Allow maps to define custom initial cargo and fix initial notification. 2014-03-21 10:03:53 +13:00
Paul Chote
ea79eb28fc Allow Attack* to control a subset of armaments. 2014-03-21 10:03:53 +13:00
Paul Chote
9d1526f4e7 Clean up Attack*. 2014-03-21 10:03:53 +13:00
Paul Chote
96cc1276c2 Add BuildComplete property to Building and start initially locked. 2014-03-21 10:03:53 +13:00
Paul Chote
0ca7ee280f Move unwanted AttackBase logic to the individual Armaments. 2014-03-21 10:03:53 +13:00
Matthias Mailänder
b31240ccc5 Merge pull request #4919 from pchote/mine-fixup
Remove duplication between Immobile and Mine.
2014-03-20 13:40:31 +01:00
Matthias Mailänder
400bb26e94 Merge pull request #4912 from pchote/exits
Clean up mobile world insertion.
2014-03-20 11:58:46 +01:00
Matthias Mailänder
88e1ecd2a4 Merge pull request #4920 from pchote/beacon-posters
Add beacon posters to TD
2014-03-20 11:46:22 +01:00
Matthias Mailänder
468df7986a Merge pull request #4921 from pchote/mod-browser-fix
Remove incorrect padding from the top of the mod browser list.
2014-03-20 11:40:12 +01:00
Matthias Mailänder
c0f10dc5c1 Merge pull request #4923 from pchote/td-ui-consistency
TD menu layout improvements.
2014-03-20 11:36:38 +01:00
Paul Chote
8535e8d257 Add settings tab to TD lobby. Partially fixes #4770. 2014-03-20 22:53:19 +13:00
Paul Chote
48f3d8f3c0 Make the TD menu button positions consistent. Fixes #4735. 2014-03-20 22:46:27 +13:00
Paul Chote
3355add49d Remove incorrect padding from the top of the mod browser list. 2014-03-20 22:34:42 +13:00
Paul Chote
725f690aaa Add posters for TD airstrike and nuke. 2014-03-20 22:13:11 +13:00
Paul Chote
94e30503a7 Allow support powers to define a poster image for beacons. 2014-03-20 22:13:11 +13:00
Paul Chote
4b09ecd630 Remove duplication between Immobile and Mine. 2014-03-20 21:54:06 +13:00
Paul Chote
715e0299bf Fix UpgradeRules not upgrading maps. 2014-03-20 21:29:29 +13:00
Matthias Mailänder
ef2aff3fa5 Merge pull request #4915 from pchote/ui-tick-fixup
Fix start-game UI acceleration.
2014-03-19 10:15:23 +01:00
Matthias Mailänder
121d3339b9 Merge pull request #4910 from pchote/menu-fix
Fixes #4902
2014-03-19 10:06:51 +01:00
Matthias Mailänder
ceea851436 Merge pull request #4909 from reaperrr/remap-engineer
Remap fixes for RA Engineer and SAM site
Closes #4862
Closes #4876
2014-03-19 09:59:22 +01:00
Paul Chote
e4ca66ab31 Fix start-game UI acceleration. 2014-03-19 20:01:56 +13:00
Paul Chote
c223e23572 Remove RenderInfantry dependency on Mobile. 2014-03-19 14:28:38 +13:00
Paul Chote
2b3e116f74 Remove RenderLandingCraft dependency on Mobile. 2014-03-19 14:28:38 +13:00
Paul Chote
de735fbd27 Use MoveIntoWorld for transports. Fixes #4758. 2014-03-19 14:28:38 +13:00
Paul Chote
262e0fc484 Use MoveIntoWorld for Enter activities. 2014-03-19 13:40:33 +13:00
Paul Chote
8b3b894fc5 Use MoveIntoWorld for production. 2014-03-19 13:40:33 +13:00
Paul Chote
ac5a4589ea Add IMove.MoveIntoWorld and IMove.VisualMove. 2014-03-19 13:40:32 +13:00
Paul Chote
dfbce62024 Don't show the main menu when returning to the server browser.
Fixes #4902.
2014-03-19 12:25:30 +13:00
reaperrr
6db8952ce2 Added some remap to bottom platform edge of sam site. 2014-03-19 00:16:51 +01:00
reaperrr
1b0708eedc RA Engineer now uses team colors just like in C&C1. 2014-03-19 00:15:59 +01:00
Matthias Mailänder
1f9dd53b4d Merge pull request #4905 from pchote/upgrade-fixup
Fix UpgradeRules for upgrading mods targeting release-20131223.
2014-03-18 10:31:28 +01:00
Paul Chote
5151161d78 Fix UpgradeRules for upgrading mods targeting release-20131223. 2014-03-18 22:07:56 +13:00
Matthias Mailänder
6392d62f2e Merge pull request #4903 from ihptru/dedicated-fix
dedicated fix: do not restart anymore with 1 client
2014-03-18 09:39:00 +01:00
Matthias Mailänder
d59f9b3c72 Merge pull request #4883 from pchote/concrete
Add buildable concrete to D2K.
2014-03-18 09:36:15 +01:00
Matthias Mailänder
f9b1c75cf9 Merge pull request #4904 from pchote/replay-fix
Fix replays for network games.
2014-03-18 09:18:13 +01:00
Paul Chote
538a25ae6c Fix replays for network games. Fixes #4866. 2014-03-18 20:37:10 +13:00
Igor Popov
9145ef0ad3 dedicated fix: do not restart anymore with 1 client 2014-03-18 11:31:44 +04:00
Paul Chote
90519a37a9 Update changelog. 2014-03-18 15:46:07 +13:00
Paul Chote
c01c5ff72d Actors outside the world can't grant buildable area. 2014-03-18 15:46:07 +13:00
Paul Chote
972f3ae8dc Don't stomp over other building's influence. 2014-03-18 15:46:07 +13:00
Paul Chote
e367ce4457 Fix BuildingInfluence style nits. 2014-03-18 15:46:07 +13:00
Paul Chote
52e27f036a Add buildable concrete and weathering to D2k. Fixes #2249. 2014-03-18 15:46:07 +13:00
Paul Chote
9f31304743 Don't notify when the world attacks your base. 2014-03-18 15:28:49 +13:00
Paul Chote
e6c041e53f Fix PBOG and Building to support concrete placement. 2014-03-18 15:28:49 +13:00
Paul Chote
cc34a40ebc Add RemoveImmediately trait for things that should only exist for one tick. 2014-03-18 15:28:49 +13:00
Paul Chote
50d89629a2 Add BuildableTerrainLayer and LaysTerrain traits. 2014-03-18 15:28:49 +13:00
Paul Chote
c098f85e6f Add DamagedWithoutFoundation trait for building weathering. 2014-03-18 15:28:49 +13:00
Paul Chote
3050cff67c Support concrete bibs in D2K. 2014-03-18 15:28:48 +13:00
Oliver Brakmann
64a18389b7 Allow for incremental team assembly 2014-03-17 22:20:04 +01:00
Oliver Brakmann
00bc3f71fe Make Production.SetRallyPoint and .SetPrimaryBuilding more robust 2014-03-17 22:20:04 +01:00
Oliver Brakmann
800665579b Add Actor.RepairBuilding 2014-03-17 22:20:03 +01:00
Matthias Mailänder
d6673d9ae8 Merge pull request #4895 from ihptru/removemymap
remove free-coasts.oramap
2014-03-17 21:14:56 +01:00
Matthias Mailänder
9209c52cb5 Merge pull request #4891 from cjshmyr/spy-health
Fix enemy spies showing an enemy health bar when disguised as an ally - closes #4780
2014-03-17 20:55:58 +01:00
Matthias Mailänder
7cfe18d332 Merge pull request #4878 from pchote/mapcache
Reorganize map management and preview generation
2014-03-17 20:49:58 +01:00
Igor Popov
b5679a55fb remove free-coasts.oramap 2014-03-17 23:48:27 +04:00
Curtis Shmyr
cc8284740c Fixed team health colors and spy disguise interaction 2014-03-16 19:37:45 -06:00
Curtis Shmyr
76f7e87633 Add Actor.IsDisguised 2014-03-16 19:37:38 -06:00
Matthias Mailänder
77c0d4b7fb Merge pull request #4881 from joncloud/bleed
Fixed #4697 disconnect button label in single-player
2014-03-16 22:30:57 +01:00
joncloud
cd43bf118b Fixed #4697 - Added lobby disconnect hotkey, and renamed the button for single player.
Fixed #4697 - Corrected a misspelled hotkey.
2014-03-16 13:45:01 -07:00
Paul Chote
8cd643e06a Fix editor compilation. 2014-03-16 21:46:21 +13:00
Paul Chote
f528ff5c6f Update changelog. 2014-03-16 21:46:20 +13:00
Paul Chote
8fc78603bc Support custom map previews.
Add map.png to the map archive.
2014-03-16 21:46:00 +13:00
Paul Chote
2106393122 Simplify the server browser code. 2014-03-16 21:46:00 +13:00
Paul Chote
a4a285bef5 Add data support to Download. 2014-03-16 21:45:59 +13:00
Paul Chote
a501828660 Simplify the map chooser code. 2014-03-16 21:45:59 +13:00
Paul Chote
4c4783262f Simplify the replay browser code. 2014-03-16 21:45:59 +13:00
Paul Chote
c30b18a9d6 Introduce MapCache and MapPreview for improved UI map previews. 2014-03-16 21:45:59 +13:00
Paul Chote
63068d5a7c Fix Map.GetSpawnPoints to return CPos. 2014-03-16 21:45:59 +13:00
Paul Chote
3392d00294 More style fixes.
Also fixes bogus recursive storage of OnGameStart
when a player is disconnected from the server.
2014-03-16 21:45:59 +13:00
Matthias Mailänder
e4d5404c6c StyleCop 2014-03-16 21:45:59 +13:00
Matthias Mailänder
634567f98e don't display headers when player panel is invisible 2014-03-16 21:45:58 +13:00
Matthias Mailänder
fafd9e81a9 convert to Unix line endings 2014-03-16 21:45:58 +13:00
Matthias Mailänder
c1453791d0 Merge pull request #4858 from cjshmyr/spyfix
Spy class refactoring
2014-03-16 09:04:16 +01:00
Curtis Shmyr
a5d5067f7a Update CHANGELOG 2014-03-15 14:21:05 -06:00
Curtis Shmyr
f8f60e52bc Replace Spy* with Disguise* for certain classes 2014-03-15 14:20:57 -06:00
Matthias Mailänder
4768c3d6a5 map password field Enter/ESC to buttons
closes #4869
2014-03-15 12:37:47 +01:00
Curtis Shmyr
8576c24988 Add IEffectiveOwner trait 2014-03-14 19:36:51 -06:00
Paul Chote
26e75621c3 Merge pull request #4864 from Mailaender/overlay-fix
Fixed husk flames
2014-03-15 10:38:30 +13:00
Paul Chote
baf3c55f26 A simple fix for BelowUnits breaking z-offsets. 2014-03-14 18:52:47 +01:00
Matthias Mailänder
90c8072591 render smoke above units 2014-03-14 18:52:47 +01:00
Matthias Mailänder
716fce4462 fixed ZOffset for burning husks
closes #4762
2014-03-14 18:52:45 +01:00
Matthias Mailänder
5d9b2d8b6e Merge pull request #4855 from ScottNZ/phase-transport
Improve cloaking logic and add phase transport
2014-03-14 11:40:18 +01:00
Paul Chote
5daef851e8 Merge pull request #4822 from Mailaender/map-test
Added checks for all map.yaml with Travis
2014-03-14 23:01:26 +13:00
Matthias Mailänder
bc7c4ea6cd don't check map.yaml with empty Rules: section 2014-03-14 10:53:03 +01:00
Paul Chote
d785cc04a2 Merge pull request #4402 from Mailaender/gdi03
Added the 3rd GDI mission
2014-03-14 22:52:15 +13:00
ScottNZ
104fb2d7c6 Update CHANGELOG for cloak fixes and phase transport addition 2014-03-14 22:41:46 +13:00
Paul Chote
67cbc1db1b Merge pull request #4233 from Mailaender/replay-timestep
Enabled a Timestep controller for replays and only there
2014-03-14 22:38:16 +13:00
ScottNZ
3980b6b7f2 Change submarine default stance to ReturnFire 2014-03-14 22:33:39 +13:00
ScottNZ
8af0310686 Let submarines detect other submarines 2014-03-14 22:33:39 +13:00
ScottNZ
34d1ccb82c Let hboxes detect cloaked units 2014-03-14 22:33:38 +13:00
ScottNZ
fc2c46a2c2 Let spy plane detect cloaked units 2014-03-14 22:33:38 +13:00
ScottNZ
4c1b70e28d Let only mine layers detect enemy mines 2014-03-14 22:33:38 +13:00
ScottNZ
5a5ed657d4 Let sniper detect cloaked units 2014-03-14 22:33:37 +13:00
ScottNZ
acea219f55 Remove actor generation increment when entering cloak 2014-03-14 22:33:37 +13:00
ScottNZ
70dea5303f Change sniper to use ReturnFire instead of HoldFire stance by default 2014-03-14 22:33:36 +13:00
ScottNZ
687f1f9bcd Implement phase transport 2014-03-14 22:33:36 +13:00
ScottNZ
704c4c17f8 Adjust tooltip description for gunboat to mention its cloak detection ability 2014-03-14 22:33:36 +13:00
ScottNZ
15019d5b06 Add CloakTypes to prevent ships from detecting cloaked non-submarine units etc 2014-03-14 22:33:35 +13:00
ScottNZ
5df88cb186 Remove cloak detection from ca and lst. Increase pt's cloak detection range to 4 and render a cloak detection range circle for it 2014-03-14 22:33:35 +13:00
ScottNZ
963db53b7b Adjust tooltip description for destroyer to mention its cloak detection ability 2014-03-14 22:33:34 +13:00
ScottNZ
f80710ac7a Let cloaked units optionally uncloak when unloading 2014-03-14 22:33:34 +13:00
ScottNZ
9f69d13336 Let mobile radar jammer detect cloaked units 2014-03-14 22:33:34 +13:00
ScottNZ
58c648daa9 Let attack dog detect cloaked units 2014-03-14 22:33:33 +13:00
ScottNZ
5deb5e6686 Let radar dome detect cloaked units 2014-03-14 22:33:33 +13:00
Paul Chote
7e9793fa90 Fix the timestep jank threshold. 2014-03-14 10:07:54 +01:00
Paul Chote
d5edbc2bc7 Tick the game timer status independently of the game rate. 2014-03-14 10:07:54 +01:00
Paul Chote
45ad52f737 Adjust C&C replay UI. 2014-03-14 10:07:54 +01:00
Paul Chote
c21b27cddb Add some more robustness against UI-introduced desyncs. 2014-03-14 10:07:54 +01:00
Matthias Mailänder
0d6517ec25 keep the catch up for small delays and truncate larger ones 2014-03-14 10:07:54 +01:00
Matthias Mailänder
3b78d6f343 use relative tick time intervals 2014-03-14 10:07:54 +01:00
Matthias Mailänder
212cf93ca4 separate World and Ui LastTickTime 2014-03-14 10:07:54 +01:00
Matthias Mailänder
0c20e38443 add a pause/slowdown/play/fastforward button for replays
closes #4633
2014-03-14 10:07:54 +01:00
Matthias Mailänder
c5ef9cbfb2 moved internal time step setting to Game
player should not be able change it as it is not synced yet
2014-03-14 10:07:32 +01:00
Paul Chote
ba79e33d40 Merge pull request #4656 from Mailaender/everyone-shroud
Added a spectator player that shares shroud with everyone
2014-03-14 21:50:02 +13:00
Matthias Mailänder
fbf408b886 add a spectator player that shares shroud with everyone
closes #4607
2014-03-13 21:57:59 +01:00
Matthias Mailänder
987f285714 Merge pull request #4857 from pchote/ra-balance-changelog
Add changelog entry for Radar Dome cost tweak.
2014-03-13 21:40:55 +01:00
Paul Chote
d65ec5a4da Add changelog entry for Radar Dome cost tweak. 2014-03-14 09:28:01 +13:00
Paul Chote
5dd5e90175 Merge pull request #4810 from chrisforbes/delay-dome-balance
Adjust RA balance
2014-03-14 09:26:23 +13:00
Matthias Mailänder
ee6eac2436 removed bogus rules for the immobile bombs 2014-03-12 19:28:24 +01:00
Matthias Mailänder
4ce31f39c6 lint check maps, too
closes #4187
2014-03-12 19:05:55 +01:00
Matthias Mailänder
1f18374733 Merge pull request #4853 from pchote/airstrike-fixup
Airstrike improvements
2014-03-12 15:42:08 +01:00
Paul Chote
acda996227 Remove airstrike beacon when the attack begins. 2014-03-13 01:03:24 +13:00
Paul Chote
d7d12ef799 Rework airstrike flare and camera spawning. 2014-03-13 01:03:24 +13:00
Paul Chote
91ea2d978f Don't render GravityBombs that are obscured by fog. 2014-03-13 00:59:36 +13:00
Paul Chote
2d80a8d0d8 Use Immobile for cameras and flares. 2014-03-13 00:59:35 +13:00
Paul Chote
0a4423a9b8 Rename Waypoint -> Immobile and move it into Mods.RA. 2014-03-13 00:59:35 +13:00
Matthias Mailänder
daf106ddb3 Merge pull request #4814 from pchote/descriptions
Update RA production tooltips.
2014-03-12 12:53:00 +01:00
Matthias Mailänder
27d49f48d2 Merge pull request #4828 from pchote/cursors
Cursor improvements
2014-03-12 12:52:01 +01:00
Paul Chote
1d95f5331d Update changelog. 2014-03-12 23:50:40 +13:00
Pizzaoverhead
ce49d5df5e Display an "outside range" cursor for attacks. 2014-03-12 23:50:08 +13:00
Paul Chote
2fd47ee743 Remove some unnecessary trait/info lookups from AttackBase. 2014-03-12 23:50:08 +13:00
Paul Chote
113bfe5311 Make Attack*Info plumbing consistent. 2014-03-12 23:50:08 +13:00
Paul Chote
116e4acda3 Fix style nits in other Attack traits (no logic changes). 2014-03-12 23:50:08 +13:00
Paul Chote
a8bd25a6a5 Clean up AttackPopupTurreted. 2014-03-12 23:50:08 +13:00
Paul Chote
93c8be4e79 Clean up AttackOmni. 2014-03-12 23:50:07 +13:00
Paul Chote
6d95c93bea Clean up AttackCharge. 2014-03-12 23:50:07 +13:00
Paul Chote
b28ba09728 Remove TD dependency on the RA cursors. 2014-03-12 23:50:07 +13:00
Paul Chote
059ba575ee Add a new attackoutsiderange cursor to TD. 2014-03-12 23:50:07 +13:00
Paul Chote
cf75240c7e Add new TD goldwrench / capture cursors. 2014-03-12 23:50:07 +13:00
Paul Chote
865f6ed0d5 Add a new TD guard cursor. 2014-03-12 23:50:07 +13:00
Paul Chote
b5b3043811 Add a new TD AttackMove cursor. 2014-03-12 23:50:07 +13:00
Paul Chote
8063e25f3b Add a new RA AttackMove cursor by @pizzaoverhead. 2014-03-12 23:50:06 +13:00
Matthias Mailänder
53479d1ac6 Merge pull request #4827 from ScottNZ/balance
Make Allied/Soviet factions use general-purpose mines
2014-03-12 11:24:20 +01:00
Chris Forbes
32c2e001b6 Merge pull request #4852 from pchote/timer-fixup
Overhaul ingame timer displays.
2014-03-12 22:40:21 +13:00
Paul Chote
37bf88f5a5 Fix Sound coding style nits. 2014-03-12 17:31:26 +13:00
Paul Chote
20b88fd904 Remove World.FrameNumber. 2014-03-12 17:19:29 +13:00
Paul Chote
a7d6f717c4 Overhaul ingame timer displays. Fixes #3062. 2014-03-12 17:19:06 +13:00
ScottNZ
c724558b75 Update CHANGELOG for mine changes 2014-03-12 14:58:08 +13:00
ScottNZ
9287fd1a76 Make Allied and Soviet factions build general-purpose mines instead of AT and AP mines. 2014-03-12 14:58:06 +13:00
epicelite
3d2dceba61 Updated building descriptions. 2014-03-12 13:53:30 +13:00
Paul Chote
cba19ffaa9 Merge pull request #4830 from Mailaender/music-button-mouseover
Fixed music player image button mouse over highlight
2014-03-12 13:48:02 +13:00
Matthias Mailänder
1079f37a68 Update CHANGELOG
#4836
2014-03-09 12:14:32 +01:00
Matthias Mailänder
31525c90c3 Merge pull request #4836 from s1ww/bleed
RA adding blitzkrieg & burlesca balanced maps
2014-03-09 12:13:25 +01:00
Matthias Mailänder
623452a884 Merge pull request #4838 from stecman/production-time-fix
Set unit/structure build time when building starts instead of when added to queue
2014-03-09 12:03:19 +01:00
Stephen Holdaway
bd077d337f Set ProductionItem build time when building starts
The build time for a unit/structure was previously set at the time that
item was added to a production queue. This meant modifiers of the
production time (multiple production facilities in ClassicProductionQueue
or "instant build" in debug) were not applied to items already in a queue.

This change modifies ProductionQueue so that build time is set at the
instant an item starts building (reaches the front of it's queue). This was
done primarily to make the production bonuses in ClassicProductionQueue
more apparent, though it also makes the "instant build" debug option more
responsive when items are queued prior to enabling.
2014-03-09 14:56:54 +13:00
s1ww
b4bb268f45 RA adding blitzkrieg & burlesca balanced maps 2014-03-08 16:33:38 +01:00
Matthias Mailänder
c95114deff Update CHANGELOG
#4835
2014-03-08 15:36:50 +01:00
Matthias Mailänder
2720261eae Merge pull request #4835 from Mknsri/spyfix
Fix #4350 - Spy not disappearing
2014-03-08 15:28:58 +01:00
Mknsri
2ea184e89e Fix #4350 - Spy not disappearing
Spy now calls .Destroy() and is removed from minnimap upon infiltration
2014-03-08 16:18:31 +02:00
Matthias Mailänder
6190b7794b Merge pull request #4832 from ScottNZ/guard-og-fix
Fix Guard OG crash #4821
2014-03-08 12:33:08 +01:00
ScottNZ
c777c621e0 Update CHANGELOG for Guard OG fix 2014-03-08 22:56:59 +13:00
ScottNZ
d36dc41429 Fix GuardOrderGenerator's GetCursor crash. Closes #4821. 2014-03-08 22:56:32 +13:00
Matthias Mailänder
274fee2156 fixed music player image button mouse over highlight 2014-03-08 07:47:39 +01:00
Matthias Mailänder
19ac138275 Merge pull request #4792 from pchote/replays
Fix chat synchronization in replays.
2014-03-08 06:36:32 +01:00
Paul Chote
306271e93f Update changelog. 2014-03-08 11:47:55 +13:00
Paul Chote
bce0a7b39e Overhaul replay parsing. Fixes #4608. 2014-03-08 11:47:55 +13:00
Paul Chote
6385e7ebaa Stylecop ReplayConnection. 2014-03-08 11:47:55 +13:00
Matthias Mailänder
fd4aa222f7 Merge pull request #4803 from reaperrr/obelisk-fix2
Building charge improvements
2014-03-07 18:54:17 +01:00
Matthias Mailänder
e2a33dbc10 Merge pull request #4817 from ScottNZ/mapcull
Map cull
2014-03-07 17:15:50 +01:00
Matthias Mailänder
36a1992d31 Merge pull request #4812 from cjshmyr/ftrk
Renamed Flak Truck to Mobile Flak
2014-03-07 17:06:01 +01:00
Matthias Mailänder
6dbe28cdbe Merge pull request #4815 from pchote/beacons
Remove beacon from ion cannon and add to airstrike.
2014-03-07 17:04:01 +01:00
reaperrr
2293453b8f Adds UpgradeRule for AttackTesla -> AttackCharge. 2014-03-07 14:28:49 +01:00
reaperrr
c1954f498b Fixes unused fields. 2014-03-07 14:28:22 +01:00
ScottNZ
a91741ebfa Update CHANGELOG for removed maps 2014-03-08 00:32:38 +13:00
ScottNZ
9720b7a966 Remove some RA maps 2014-03-08 00:31:20 +13:00
ScottNZ
bba0e20ef5 Update CHANGELOG for removal of hardcoded missions 2014-03-08 00:26:49 +13:00
ScottNZ
856120f2b2 Remove hardcoded missions 2014-03-08 00:26:09 +13:00
Paul Chote
1d9681a1d2 Merge pull request #4768 from Mailaender/map-sequences
Fixed map.yaml sequences being ignored
2014-03-07 22:19:31 +13:00
Paul Chote
2566eea1c5 Merge pull request #4805 from reaperrr/chinook-rotor
Makes Chinook rotors counter-rotate
2014-03-07 22:13:07 +13:00
Curtis Shmyr
5c436e32e1 Renamed Flak Truck to Mobile Flak 2014-03-06 23:07:47 -07:00
Chris Forbes
34e6773005 Increase cost of DOME from 1600 to 1800
Just move this slightly later, and make DOME-first rushes a bit more
risky.
2014-03-07 18:05:33 +13:00
reaperrr
6483fc571f CHANGELOG entry for counter-rotating chinook rotor blades. 2014-03-06 21:27:02 +01:00
reaperrr
525b4eee93 Chinook rotors now counter-rotate as intended. 2014-03-06 21:25:55 +01:00
reaperrr
8a318cad9b Un-hardcodes charge sequence name. 2014-03-06 20:31:58 +01:00
reaperrr
82cd2b9520 Adapts Tesla Coil and Obelisk to AttackTesla -> AttackCharge changes.
Fine-tunes Obelisk charge delay, adds changelog entry.
2014-03-06 20:30:24 +01:00
reaperrr
2319709749 Renamed AttackTesla into AttackCharge and improved it.
Delay for initial charge is no longer hard-coded and can be customized now.
Same for delay between each charge.
Changed default MaxCharges to 1.
Added descriptions (except for MaxCharges since it's self-explanatory).
2014-03-06 20:26:48 +01:00
Matthias Mailänder
a980d82162 Merge pull request #4694 from Unit158/fix
Changed things to do with Shroud to WRange. Updated Utility. Closes #4679
2014-03-06 08:51:45 +01:00
Matthias Mailänder
6480fd7601 Merge pull request #4761 from ScottNZ/lua-desert-shellmap
Port the desert shellmap to Lua
2014-03-06 08:11:34 +01:00
ScottNZ
f74fb2d60e Update CHANGELOG for desert shellmap changes 2014-03-06 19:27:41 +13:00
ScottNZ
7d43ecc33f Remove the temperate RA shellmap and port the desert shellmap to Lua. 2014-03-06 19:27:29 +13:00
ScottNZ
79d1a944bc Fix weapon speeds of ants/zombies/dinos 2014-03-06 18:19:50 +13:00
Chicken man
a538914d6c Updated maps to work with changes. 2014-03-05 17:30:35 -05:00
Chicken man
718ddf9afd Updated mods to work with changes. 2014-03-05 17:30:34 -05:00
Chicken man
efb718a109 Updated CHANGELOG 2014-03-05 17:30:34 -05:00
Chicken man
cf3cc43a28 Changed things to do with Shroud to WRange. Updated Utility. 2014-03-05 17:30:33 -05:00
Paul Chote
9e1f15448d Merge pull request #4673 from Mailaender/scorched-husks
Scorched Husks
2014-03-06 11:23:18 +13:00
Matthias Mailänder
56470b918b use the disabled palette to render husks
closes #4631
2014-03-05 23:18:14 +01:00
Matthias Mailänder
2165518418 Merge pull request #4393 from cjshmyr/nametag
Added RenderNameTag trait for actors
2014-03-05 23:00:11 +01:00
Matthias Mailänder
1bb0b41293 Update CHANGELOG
#4638
2014-03-05 22:53:48 +01:00
Matthias Mailänder
7867aea4dc Merge pull request #4638 from AgentAAA/patch-1
update weapons.yaml so that Laser damage is set to 360
2014-03-05 22:52:17 +01:00
Matthias Mailänder
72ccbca84b Merge pull request #4537 from pizzaoverhead/bleed
Fixes order lines not being shown after reselect. Also fixes #4546
2014-03-05 22:29:50 +01:00
Matthias Mailänder
7a478dbcd5 Update voices.yaml
indention cleanup
2014-03-05 22:05:37 +01:00
Matthias Mailänder
51c1fc53de Merge pull request #4733 from ihptru/mapapi
map api: use new site and fallbacks
2014-03-05 22:01:40 +01:00
Igor Popov
ec50906296 map api: use new site and fallbacks 2014-03-06 00:39:49 +04:00
Pizzaoverhead
ed6147ce0b Fixes order lines not being shown after reselect once their lifetime has expired.
Adds INotifyBecomingIdle.
2014-03-05 18:14:57 +00:00
ScottNZ
10e8a44151 Merge pull request #4795 from Mailaender/desert-kilkakon
Added a desert variation of TENT and MSLO
2014-03-05 22:32:43 +13:00
Matthias Mailänder
c11a6c13a6 added a desert variation of TENT and MSLO 2014-03-05 10:25:46 +01:00
ScottNZ
cf3493be6d Merge pull request #4763 from Mailaender/snow-tent
Added a snow variation of TENT by Kilkakon
2014-03-05 22:16:54 +13:00
Matthias Mailänder
9ce25bd400 added a snow variation of TENT by Kilkakon
http://kilkakon.com/kocb/tent.zip
2014-03-05 08:56:36 +01:00
Matthias Mailänder
b3adb032fa Merge pull request #4766 from cjshmyr/balance
Aircraft defence balance changes
2014-03-04 08:42:09 +01:00
Curtis Shmyr
2f5947fffc Aircraft defence balance changes 2014-03-03 17:12:53 -07:00
Matthias Mailänder
cb43581c91 also check map.yaml Sequences:
closes #4765
2014-03-03 15:52:56 +01:00
Matthias Mailänder
9a8c9d1985 Update CHANGELOG
fix commit b5b98feadb
2014-03-02 02:27:52 +01:00
Paul Chote
f28fed01c9 Merge pull request #4745 from Iamgoofball/bleed
Changes to Tiberium and Viceroids
2014-03-02 14:06:00 +13:00
Iamgoofball
2c649f0eaf Rebalanced Viceroids and Tiberium. PR number 4745. 2014-03-01 16:55:18 -08:00
Matthias Mailänder
b5b98feadb Update CHANGELOG
#4724
2014-03-01 19:39:40 +01:00
Matthias Mailänder
28e672fcf8 Merge pull request #4724 from RiderRockon/bleed
Reduced range and increased build time of static defense
2014-03-01 19:38:46 +01:00
Matthias Mailänder
5ab7b26fbf Merge pull request #4756 from ScottNZ/aagun
AA gun polish
2014-03-01 18:52:49 +01:00
ScottNZ
b0c1e40609 Adjusted AA Guns to fire their guns alternately at a high fire rate, and added contrails to their bullets. 2014-03-02 02:41:53 +13:00
Paul Chote
3c3a047c21 Remove beacon from ion cannon and add to airstrike. Fixes #4732. 2014-03-01 12:54:22 +13:00
Paul Chote
5343fe1700 Merge pull request #4750 from Mailaender/demo-mix
Removed demo.mix
2014-03-01 11:59:47 +13:00
Matthias Mailänder
ca2f68ab32 removed demo.mix 2014-02-28 19:41:51 +01:00
Paul Chote
ed92111c2a Merge pull request #4714 from Mailaender/tile-export-nre
Fixed a NullReferenceException on TilesetBuilder export
2014-02-25 10:26:43 +13:00
Matthias Mailänder
405061e05b Update CHANGELOG
#4721
2014-02-24 22:14:32 +01:00
Matthias Mailänder
2072f48ef7 Merge pull request #4721 from Smilex/A10_vision
closes #4696
closes #4687
2014-02-24 22:11:17 +01:00
Ian T. Jacobsen
394e230545 Added INotifyKilled to AttackBomber 2014-02-24 19:43:01 +00:00
Ian T. Jacobsen
6d4eada679 Added a camera to the A10. That spawns as they attack, and is destroyed as they leave 2014-02-24 19:36:38 +00:00
Matthias Mailänder
2ea5e3df04 Update CHANGELOG
#4470 and #4592
2014-02-24 09:33:09 +01:00
Matthias Mailänder
f12be6f0ce Update CHANGELOG
#4726
2014-02-24 09:28:10 +01:00
Matthias Mailänder
a487bee148 Merge pull request #4726 from dan9550/rmbo-fix
closes #4648
2014-02-24 09:11:12 +01:00
Dan9550
0e905a39eb R3moved C4 target type from walls in D2K
D2K Destructable trait, walls
2014-02-24 18:27:22 +11:00
Matthias Mailänder
4d86792b76 Merge pull request #4725 from ScottNZ/orderlag
Move order lag change announcements to server.log
2014-02-24 08:17:43 +01:00
Dan9550
fefb43eb8e Commando fixes for walls
Removed commented lines
2014-02-24 16:45:57 +11:00
ScottNZ
39484bdd45 Move order lag change announcements to server.log 2014-02-24 13:33:04 +13:00
Rider Rockon
232f0da14a Reduce turret vision & Increase Build Time
Guard Tower
- Reduced vision from 7 to 6
- Increased buildtime from 12s to 24s

Gun Turret
- Reduced vision from 7 to 6
- Increased buildtime from 15s to 30s

SAM Site
- Increased buildtime from 18s to 36s

Advanced Guard Tower
- Reduced vision from 9 to 7
- Increased buildtime from 24s to 48s

Obelisk of Light
- Reduced vision from 8 to 7
- Increased buildtime from 36s to 52s
2014-02-24 00:18:00 +01:00
Rider Rockon
9e35e01e3a Reduced turret range values
Reduced Guard Tower weapon range from 6 to 5
Reduced Gun Turret weapon range from 6 to 5
Reduced Sam Site weapon range from 10 to 7
Reduced Advanced Guard Tower weapon range from 8 to 6
Reduced Obelisk of Light weapon range from 8.5 to 6.5
2014-02-24 00:11:04 +01:00
Matthias Mailänder
e00a6933cc fixed a NullReferenceException on TilesetBuilder export
closes #4506
2014-02-23 10:47:15 +01:00
Matthias Mailänder
d7b891d995 Merge pull request #4682 from ScottNZ/beacon
closes #2320
closes #3767
closes #3810
2014-02-23 09:55:23 +01:00
Matthias Mailänder
38eeb42ff8 Merge pull request #4668 from MUzzell/feature-3367
included a spectator toggle in the server admin dropdown
2014-02-23 09:25:18 +01:00
ScottNZ
b469351f8f Update CHANGELOG for map beacons/radar pings 2014-02-23 13:15:06 +13:00
ScottNZ
338fb38bd3 Add beacon/radar ping placements for nukes/ion cannons/chronospheres/iron curtains. 2014-02-23 13:14:00 +13:00
Matthew Uzzell
c6b0e37f7e updated the AllowSpectate variable to be AllowSpectators
added KickSpectatorsLogic for a confimation of kicking spectators & changed the toggle buttons to be a checkbox
2014-02-22 21:55:35 +00:00
Matthew Uzzell
88121b272d edited the LobbyLogic to include a spectator toggle in the server admin dropdown. 2014-02-22 21:55:34 +00:00
Matthias Mailänder
4075742d19 Merge pull request #4712 from Phrohdoh/RenderLandingCraft
closes #4641
2014-02-22 21:34:18 +01:00
Taryn
3d7815d8c1 Added a TraitOrDefault for Mobile and with that a check for mobile.IsMoving to RenderLandingCraft. 2014-02-22 12:45:25 -06:00
Paul Chote
89ca2686d0 Merge pull request #4710 from Mailaender/grenadier-die6
Fixed a crash when the grenadier is sonic tank zapped
2014-02-23 01:17:38 +13:00
Paul Chote
4912a6cdb0 Merge pull request #4709 from Mailaender/hovercraft-icon
Added an icon for the Tiberian Dawn hovercraft
2014-02-23 01:13:38 +13:00
Matthias Mailänder
b8c3ceee59 buildable hovercraft in developer mode 2014-02-22 12:58:53 +01:00
Matthias Mailänder
a4569d3b35 fixed a crash when the grenadier is sonic tank zapped 2014-02-22 12:48:56 +01:00
Matthias Mailänder
666f9b4e47 added an icon for the hovercraft 2014-02-22 12:41:20 +01:00
Matthias Mailänder
0c4aeb8398 Merge pull request #4704 from cjshmyr/editor
closes #4695
2014-02-22 08:48:30 +01:00
Matthias Mailänder
c2d534f527 Merge pull request #4392 from cjshmyr/crates
closes #4634
2014-02-22 08:44:32 +01:00
Matthias Mailänder
b97a082c84 Merge pull request #4705 from Phrohdoh/DisabledStances
closes #4555
2014-02-22 08:22:41 +01:00
Curtis Shmyr
1faf5abd90 Update CHANGELOG 2014-02-21 21:03:04 -07:00
Curtis Shmyr
71a5ddc176 Add upgrade rule for CrateSpawner to Utility 2014-02-21 21:02:53 -07:00
Curtis Shmyr
aa6e970611 Added RenderNameTag trait for actors 2014-02-21 20:36:36 -07:00
Taryn
d5f4813bc4 Actors with EnableStances set to false should now ignore stance change commands. 2014-02-21 19:14:22 -06:00
Curtis Shmyr
0052000f7b Flood fill now treats similar grass/snow/desert tiles as the same - fixes #4695 2014-02-21 17:54:27 -07:00
Paul Chote
cd26a4e5fc Merge pull request #4702 from ScottNZ/utility
Fix OpenRA.Utility not being able to locate mod assemblies
2014-02-22 13:34:36 +13:00
ScottNZ
945a7121e4 Fix OpenRA.Utility not being able to locate mod assemblies on Windows. Fixes #4498 2014-02-22 13:17:40 +13:00
Matthias Mailänder
dcac88b27b Merge pull request #4699 from reaperrr/patch-1
Fixes Obelisk Charge anim and sound
2014-02-21 23:00:08 +01:00
reaperrr
578d2363b3 Match Obelisk charge anim speed with original
Without a high tick value the charge anim plays way too fast.
2014-02-21 22:27:06 +01:00
reaperrr
8c5957d0d8 Enable Obelisk charge anim and sound
Enables Obeliks charge anim and sound by using AttackTesla instead of AttackTurreted.
2014-02-21 22:24:45 +01:00
ScottNZ
0a9a959ecf Change spacebar key to move to the last visible radar ping location 2014-02-22 00:07:54 +13:00
ScottNZ
06caf7f156 Add radar pings to BaseAttackNotifier and HarvesterAttackNotifier 2014-02-22 00:07:54 +13:00
ScottNZ
2a8efde8e6 Add map beacons and radar pings 2014-02-22 00:07:53 +13:00
Matthias Mailänder
1e1eea9619 Merge pull request #4556 from pizzaoverhead/SelectUnitsByType
Select units by type
2014-02-21 10:20:56 +01:00
Pizzaoverhead
7be3078115 Adds selecting of all units matching the current type across the screen or map using Ctrl + T. 2014-02-20 21:59:23 +00:00
Matthias Mailänder
3ed2053d4a Merge pull request #4683 from Temeez/pillbox-fix
closes #4681
2014-02-20 17:47:06 +01:00
Temeez
8bcb2e15c7 removed CurrentAdjacentCells from ctor 2014-02-20 08:08:58 +02:00
Temeez
864c4bc03a Pillbox unload fix 2014-02-19 14:19:52 +02:00
Matthias Mailänder
5418441bb5 Merge pull request #4662 from obrakmann/lua
Add Actor.Guard, Actor.OnDamaged and constants for facing values to Lua interface
2014-02-19 00:09:38 +01:00
Matthias Mailänder
fae9bf2c2c Merge pull request #4678 from dan9550/td_medtank
Fixes for TD Husks and unit labels
2014-02-18 21:57:02 +01:00
Oliver Brakmann
e65626cc6b Add Actor.Guard 2014-02-17 19:16:47 +01:00
Oliver Brakmann
bfc34df581 Add Actor.OnDamaged
Allows the AI to react to its units being attacked.
2014-02-17 19:16:47 +01:00
Oliver Brakmann
ba1558259b Add constants for the 8 main facing values to Lua. Fixes #4490 2014-02-17 19:16:47 +01:00
Matthias Mailänder
2931f9dfcb Merge pull request #4676 from cjshmyr/capturing-cursors
Swap cursors used for sabotaging and capturing buildings
2014-02-17 14:09:00 +01:00
Dan9550
a742362a26 Fixes for TD Husks and unit labels
Fixes fixes fixes!

done :|

cgfchjbjkvf
2014-02-17 22:39:08 +11:00
Curtis Shmyr
7f4c1addb3 Update CHANGELOG 2014-02-16 18:42:09 -07:00
Curtis Shmyr
873a8d8287 Swap cursors used for sabotaging and capturing buildings 2014-02-16 18:10:47 -07:00
Matthias Mailänder
7ac65d2909 Merge pull request #4670 from ScottNZ/selection-fix
Fix selection persistence for invisible units
2014-02-16 19:06:58 +01:00
ScottNZ
38c1a68be6 Update CHANGELOG for selection changes 2014-02-17 03:55:05 +13:00
ScottNZ
18fe8e93fa Fix unit selection persisting/control groups working when the unit isn't visible 2014-02-17 03:53:52 +13:00
Paul Chote
d51fd0587f Merge pull request #4663 from Mailaender/html-doc-win
Added the HTML documentation to the Windows Setup.exe
2014-02-16 12:41:06 +13:00
Matthias Mailänder
2ec3d2c3a5 update CHANGELOG 2014-02-16 00:18:10 +01:00
Paul Chote
fb5c238475 Merge pull request #4661 from Mailaender/allies04-bitrot
Saved Allies04 from bit rotting
2014-02-16 11:54:50 +13:00
Paul Chote
7f73a49c3e Merge pull request #4524 from Mailaender/c4-tanks
Added tank demolition with C4
2014-02-16 11:47:15 +13:00
Matthias Mailänder
e7874b850d never allow C4 on barrels 2014-02-15 23:46:18 +01:00
Matthias Mailänder
b014af11b0 allow vehicle demolition with C4 in ra and d2k 2014-02-15 23:46:18 +01:00
Matthias Mailänder
de574910e5 removed portable install from setup
as it became a common problem when installed to %ProgramFiles
2014-02-15 23:32:11 +01:00
Paul Chote
f47f65e9c4 Merge pull request #4579 from pizzaoverhead/GrowResources
Added RAmod debug cheat option to grow resources.
2014-02-16 11:26:02 +13:00
Matthias Mailänder
dc8605825b link the README.html in the start menu 2014-02-15 18:42:04 +01:00
Matthias Mailänder
7596876d45 ship documentation 2014-02-15 18:41:47 +01:00
Pizzaoverhead
e0b40e2088 Added debug cheat button to grow map resources. 2014-02-15 17:30:36 +00:00
Matthias Mailänder
28df2d6982 lst is now using it's own render trait 2014-02-15 15:39:00 +01:00
Matthias Mailänder
d18b657bfd tooltips are now defined in sequences
closes #4573
2014-02-15 15:38:59 +01:00
Matthias Mailänder
d1d29d0fad Merge pull request #4657 from Temeez/fixTanyaChronoBug
closes #4569
2014-02-15 15:09:42 +01:00
Temeez
5b7db7ed68 Chrono tanya fix and CHANGELOG entry for it 2014-02-15 13:44:08 +02:00
Chris Forbes
e4e6af6536 Merge pull request #4652 from Temeez/fixedDinoCratePickup
Fixed dino not crushing crates
2014-02-15 13:45:00 +13:00
Temeez
cf19429eea Update CHANGELOG for dino fix 2014-02-15 00:11:22 +02:00
Temeez
878c1bd80b Fixed dino not crushing crates 2014-02-14 23:46:09 +02:00
Paul Chote
04481cb958 Merge pull request #4445 from Mailaender/miss-sprites
Set up all MISS sprites
2014-02-14 18:14:37 +13:00
Paul Chote
1ac4de9260 Merge pull request #4616 from ScottNZ/transport
Fix cargo loading/unloading
2014-02-13 23:31:16 +13:00
Paul Chote
2b674f71cd Merge pull request #4592 from Mailaender/rpm-sdl2
Cleaned up RPM macros, description, dependencies
2014-02-13 23:30:42 +13:00
AgentAAA
5305e8398b update weapons.yaml so that Laser damage is set to 360
balance change to make obelisk's damage fall more in line with the AGT's
2014-02-12 17:21:02 -07:00
ScottNZ
98b158e370 Add map upgrade code for UnloadFacing removal 2014-02-12 20:34:39 +13:00
ScottNZ
3d42dc8e0f Update CHANGELOG for cargo changes 2014-02-12 20:07:47 +13:00
ScottNZ
881d17a996 Update rules for cargo changes 2014-02-12 20:07:46 +13:00
ScottNZ
025de83d3a Fix cargo loading/unloading.
- Fix the unloading subcell bug, letting us have units move to directly adjacent cells.
- Have the cursor change to a deploy-blocked cursor if the transport can't unload due to terrain type.
- Add RenderTransport for transport door opening.
- Remove turning/opening in general.
2014-02-12 20:07:44 +13:00
Chris Forbes
b996d4cf7b Merge pull request #4629 from ScottNZ/sln-upgrade
Upgrade the sln to VS 2012
2014-02-12 13:17:47 +13:00
ScottNZ
1020dc0e55 Upgrade the sln to VS 2012 2014-02-11 22:12:54 +13:00
Paul Chote
c3b5495177 Merge pull request #4626 from Angusm3/patch-2
Update CHANGELOG
2014-02-11 14:33:22 +13:00
Paul Chote
8b99ecb721 Merge pull request #4526 from Angusm3/patch-1
obelisk health upgrade to same level as ATWR
2014-02-11 14:32:49 +13:00
Angusm3
af61a48ac7 Update CHANGELOG 2014-02-10 18:29:26 -07:00
ScottNZ
ea1d1320be Make RenderUnit.PlayCustomAnimBackwards not crash if the callback is null 2014-02-10 22:44:35 +13:00
Chris Forbes
74e72cfc01 Merge pull request #4611 from Mailaender/imove-crash
Fixed a crash in IMove
2014-02-10 20:13:41 +13:00
Matthias Mailänder
6dc02c3b26 StyleCop 2014-02-09 18:27:25 +01:00
Matthias Mailänder
35bf03aade movement can be null here and lead to a crash 2014-02-09 18:27:22 +01:00
Matthias Mailänder
449fe81bf0 Merge pull request #4568 from Smilex/issue4547
closes #4547
2014-02-09 18:17:42 +01:00
Ian T. Jacobsen
bb29723332 Added entry to CHANGELOG and AUTHORS. Small fix in Mobile.cs 2014-02-09 15:54:06 +00:00
Ian T. Jacobsen
3c80024113 Made Move::NotifyBlocker handle traits appropriately 2014-02-09 15:50:49 +00:00
Ian T. Jacobsen
91908c560d Small cleanup in Harvester::OnNotifyBlockingMove 2014-02-09 15:47:02 +00:00
Ian T. Jacobsen
eba8e8f33f Added a blocking check to Production::CanUseExit 2014-02-09 13:52:42 +00:00
Ian T. Jacobsen
2f2afd9fc5 Added OnNotifyBlockingMove to Mobile 2014-02-09 13:52:40 +00:00
Matthias Mailänder
ba5e835035 clean up RPM macros, description, dependencies
* bring back FreeType2
* also require SDL2
* don't depend on -devel packages
* assigned packaging reponsibilities to myself
2014-02-08 20:57:44 +01:00
Matthias Mailänder
4fc9e0e288 launch a Nod attack after 15 seconds 2014-02-07 15:33:50 +01:00
Matthias Mailänder
5581e6c4d9 third GDI mission recreated in Lua 2014-02-07 15:00:49 +01:00
Paul Chote
9dcf5c3dbb Merge pull request #4530 from obrakmann/lua
Added a few Lua functions, attempt 2
2014-02-08 00:05:23 +13:00
Paul Chote
54e09edd2c Merge pull request #4538 from Phrohdoh/MobilityChanges
Transfer code from overused Mobile to IMove (and IMoveInfo)
2014-02-07 23:54:18 +13:00
Paul Chote
dd103ddc60 Merge pull request #4518 from Mailaender/hectic-mech
Slower mechanic repair animation
2014-02-07 23:16:33 +13:00
Paul Chote
5bdc047c5a Merge pull request #4499 from Mailaender/gdi02-fixes
GDI02 fixes
2014-02-07 23:13:13 +13:00
Paul Chote
c9514e37fc Merge pull request #4566 from Mailaender/raed-tile0
Added RAED tile ID 0 support
2014-02-07 10:11:22 +13:00
Paul Chote
e7be3a8dc9 Merge pull request #4572 from steelphase/bleed
#4570
2014-02-04 20:46:16 -08:00
steelphase
643f8282ba #4570
C4Demolition.cs change order.TargetActor to target.Actor
2014-02-04 23:16:49 -05:00
Matthias Mailänder
5e8a1710dc convert tile ID 0 for RAED compatibility 2014-02-04 21:46:09 +01:00
Matthias Mailänder
6bf66fbfc4 don't just crash when map IDs are missing
spit out a warning
2014-02-04 21:21:30 +01:00
Paul Chote
39fac0dce3 Merge pull request #4558 from Mailaender/unselectable-walls
Unselectable Walls
2014-02-04 02:17:48 -08:00
Matthias Mailänder
030fb92140 update CHANGELOG 2014-02-04 10:36:27 +01:00
Matthias Mailänder
a2579aadd0 unselectable walls for Tiberian Dawn 2014-02-04 10:33:03 +01:00
epicelite
a0f9a81ea7 unselectable walls for Red Alert
closes #4544
2014-02-04 10:28:35 +01:00
Oliver Brakmann
2f9b1459a8 Fix OpenRA.GetRandomInteger crashing under certain circumstances
OpenRA.GetRandomInteger crashes when the supplied high value is less or
equal to the low value.  A situation where this might occur is when you
try to get a random member of a dynamically generated array that
happens to have only a single member.
2014-02-02 23:37:22 +01:00
Oliver Brakmann
6be0a26353 Fix OpenRA.RunAfterDelay queuing a null action. Fixes #4512. 2014-02-02 23:37:22 +01:00
Oliver Brakmann
886efd0b97 Add production-related Lua functions 2014-02-02 23:37:22 +01:00
Oliver Brakmann
42532efd8f Replace Lua's for loops with Utils.Do/Team.Do
Besides fitting in better with the OpenRA coding style, this also gets
rid of some weird timing-related errors I have seen when creating teams
with a larger number (6+) of members. (The script would just print
'Error: function' in Team.AddActorEventHandlers. Adding a strategically
placed print statement fixed that. Replacing the original for loop with
Team.Do did as well)
2014-02-02 23:37:22 +01:00
Oliver Brakmann
b3323869cb Add Map.FindActorsInCircle and ...InBox, plus related shortcuts 2014-02-02 23:37:22 +01:00
Oliver Brakmann
5322096dc4 Add Team.Patrol and Actor.Patrol. Fixes #4491. 2014-02-02 23:37:22 +01:00
Oliver Brakmann
43e386a48d Add Utils.Seconds and Utils.Minutes 2014-02-02 22:30:36 +01:00
Oliver Brakmann
9500a11689 Add Actor.ReturnToBase 2014-02-02 22:30:36 +01:00
Taryn
9c4ad15d1e Changed most references of trait Mobile -> IMove.
In Mobile.cs IsMoving now has a public set as opposed to the initial internal. 
Added IMoveInfo interface to go with *Info classes that require IMove.
WithRotor now uses IMove.IsMoving instead of (self.CenterPosition.Z > 0) as part of a check.
2014-02-02 15:13:49 -06:00
Matthias Mailänder
6f3617361e Merge pull request #4535 from ScottNZ/bleed
Fix Lua script filename typo in OpenRA.sln
2014-02-02 03:33:59 -08:00
ScottNZ
3b2517ab8e Fix Lua script filename typo in OpenRA.sln 2014-02-02 22:12:15 +13:00
Paul Chote
4b38390907 Merge pull request #4534 from Mailaender/cnc-assetbrowser
Added the Asset Browser for Tiberian Dawn
2014-02-01 03:21:03 -08:00
Matthias Mailänder
477e486054 update CHANGELOG 2014-02-01 12:17:02 +01:00
Matthias Mailänder
aae1e7e134 set up the asset browser for Tiberian Dawn 2014-02-01 12:17:01 +01:00
Matthias Mailänder
d6ca396b73 slow down the medic heal animation 2014-02-01 10:28:52 +01:00
Matthias Mailänder
0bca2bf882 slow down the mechanic toolbox repair animation 2014-02-01 10:28:51 +01:00
Matthias Mailänder
e4effd0125 Merge pull request #4478 from pchote/aircraft-follow
Add Guard and AttackMove to RA and C&C aircraft.
2014-02-01 00:38:21 -08:00
Matthias Mailänder
16ddecdcbf StyleCop 2014-02-01 09:13:14 +01:00
Matthias Mailänder
e344b95a6f simplified Lua syntax for GDI02 2014-02-01 09:13:14 +01:00
Paul Chote
1d8e785d0d Merge pull request #4448 from Mailaender/test-files
TestFile to TestFiles in mod.yaml
2014-01-31 20:17:56 -08:00
Paul Chote
efd0b5c189 Merge pull request #4474 from Mailaender/monodevelop-luabinding
Set up project files for the MonoDevelop LuaBinding
2014-01-31 20:04:11 -08:00
Paul Chote
ff1c4ae44b Merge pull request #4517 from Mailaender/reactivate-husks
Capturable husks for all mods
2014-01-31 20:03:21 -08:00
Paul Chote
e58053cb69 Make aircraft guardable. 2014-02-01 10:57:56 +13:00
Paul Chote
fae9611d27 Fix HeliFly lua bindings. 2014-02-01 10:56:06 +13:00
Paul Chote
697b50c149 Add Guard support to Aircraft. 2014-02-01 10:56:04 +13:00
Paul Chote
1759d73ed7 Add following to IMove. 2014-02-01 10:55:05 +13:00
Paul Chote
9147e1f778 Ensure that planes circle after being ordered via IMove. 2014-02-01 10:55:05 +13:00
Paul Chote
db9ebd4a61 Add range support to Fly. 2014-02-01 10:55:05 +13:00
Paul Chote
4eaaa052cc Simplify Fly interface. 2014-02-01 10:55:04 +13:00
Paul Chote
c781d4c2fe Add range support to HeliFly. 2014-02-01 10:55:04 +13:00
Paul Chote
8d26d5e3fa Simplify HeliFly interface. 2014-02-01 10:55:04 +13:00
Paul Chote
d13e7ed432 Add AttackMove support to RA aircraft. 2014-02-01 10:55:04 +13:00
Paul Chote
61f5ab7167 Remove redundant AttackMove definitions. 2014-02-01 10:55:04 +13:00
Paul Chote
85500c0ec7 Tidy AutoTarget code. 2014-02-01 10:55:04 +13:00
Matthias Mailänder
3aad269ac2 added a hospital icon by Allen262
http://cnc-comm.com/community/?topic=1685.msg8393#msg8393
2014-01-31 19:04:24 +01:00
Matthias Mailänder
60bda58538 update CHANGELOG 2014-01-31 13:17:52 +01:00
Matthias Mailänder
0de1e20651 capturable husks for Dune 2000 2014-01-31 13:17:27 +01:00
Matthias Mailänder
a0e50762ad capturable husks for Red Alert 2014-01-31 13:17:27 +01:00
Matthias Mailänder
018f30c86e capturable husks for Tiberian Dawn 2014-01-31 13:17:26 +01:00
Matthias Mailänder
7a77f3a755 Merge pull request #4520 from ScottNZ/new-menu
Unify ra and cnc main menu logic
2014-01-31 03:02:22 -08:00
ScottNZ
255945076c Update CHANGELOG: add entries for new menus and reword some existing entries 2014-01-31 23:55:51 +13:00
Angusm3
d77614bf8b obelisk health upgrade to same level as ATWR 2014-01-31 03:55:18 -07:00
ScottNZ
1a3ec26a1e Unify ra and cnc main menu logic and clean up the main menus.
Move a bunch of buttons into an Extras submenu and the server browser.
Move CncMenuPaletteEffect to ra so it can be used elsewhere and rename it to MenuPaletteEffect.
2014-01-31 23:47:15 +13:00
Matthias Mailänder
81ec978a61 Merge pull request #4523 from pchote/disconnect-dialog
Show an error dialog if disconnected from the server.
2014-01-31 01:07:17 -08:00
Matthias Mailänder
7b84b10a16 Merge pull request #4519 from pchote/network-crash
Catch IOExceptions in Connection.cs.
2014-01-31 00:55:33 -08:00
Paul Chote
dda39ff14d Update changelog. 2014-01-31 20:57:10 +13:00
Paul Chote
a32d440b05 Show an error dialog if disconnected from the server. 2014-01-31 20:52:40 +13:00
Paul Chote
06be4d3efd Catch IOExceptions in Connection.cs. Closes #4083. Closes #4423. 2014-01-31 15:41:32 +13:00
Matthias Mailänder
7e8e427449 Merge pull request #4514 from ihptru/fix3877
do not create empty map on fail to download
2014-01-30 04:03:08 -08:00
Igor Popov
9b7233ebd1 fix #3877; 2014-01-30 15:50:27 +04:00
Matthias Mailänder
7ef9c99221 Merge pull request #4510 from ihptru/cleanup
cleanup map downloading
2014-01-30 03:30:01 -08:00
Igor Popov
9d9807b23a cleanup 2014-01-28 11:02:23 +04:00
Matthias Mailänder
f897b57f4c Merge pull request #4505 from Kanar/SoundFixes
New Try: Enables "insufficient power"-speech in RA and C&C when powered-down supp...
2014-01-27 13:16:49 -08:00
Kanar
17cf890dce Enables "insufficient power"-speech in RA and C&C when powered-down supportpowerwidget is clicked 2014-01-27 04:29:32 +01:00
Matthias Mailänder
8685ec64ae Merge pull request #4481 from obrakmann/linux-packaging
Fix build of Debian package
2014-01-25 10:44:49 -08:00
Oliver Brakmann
87c7968795 More cleanups, leave AUTHORS file in the libdir 2014-01-25 19:22:43 +01:00
Paul Chote
bc205f0a5c Merge pull request #4473 from chrisforbes/authors
Add Ripley` to AUTHORS
2014-01-22 17:59:13 -08:00
Oliver Brakmann
8d76d8e4e0 Fix build of Debian package
The build of the Debian package had the following issues:
* AUTHORS, CHANGELOG and COPYRIGHT files were placed in /usr/lib/openra
* /usr/share/doc/openra/changelog.gz did not contain the changelog
2014-01-21 20:37:23 +01:00
Matthias Mailänder
b8740a3a47 test for a list of files when loading mods
don't cache test file string arrays
2014-01-21 08:30:03 +01:00
Matthias Mailänder
1a77180a5d Merge pull request #4480 from Phrohdoh/AUTHORS
Updated AUTHORS.
2014-01-20 13:47:34 -08:00
Taryn
85a4a1e272 Added myself to AUTHORS list. 2014-01-20 09:54:43 -06:00
Matthias Mailänder
18d8034153 added mods/cnc Lua scripts 2014-01-19 11:18:35 +01:00
Matthias Mailänder
2433b6d6df added mods/common/lua scripts 2014-01-19 11:11:41 +01:00
Chris Forbes
417a1f5419 Merge pull request #4471 from Kanar/SoundFixes
Disables "building"-speech when nothing more can be built
2014-01-18 18:38:37 -08:00
Chris Forbes
00631e5da3 Add Ripley` to AUTHORS 2014-01-19 15:35:32 +13:00
Kanar
aace7ca607 Disables "building"-speech when nothing more can be built 2014-01-18 22:42:05 +01:00
Chris Forbes
d28992c054 Merge pull request #4470 from Mailaender/fedora-freetype
Fixed missing Requires: freetype2 for Fedora
2014-01-17 12:35:58 -08:00
Matthias Mailänder
d812872d91 fixed missing Requires: freetype2 on Red Hat & friends 2014-01-17 10:30:01 +01:00
Matthias Mailänder
44f00dc48e setup all hospital frames 2014-01-17 08:18:42 +01:00
Matthias Mailänder
da59468fa5 setup all biolab frames 2014-01-17 08:18:42 +01:00
Matthias Mailänder
493de23527 use all tech center frames 2014-01-17 08:18:37 +01:00
Paul Chote
617012bd36 Merge pull request #4427 from Mailaender/d2k-tileset-cleanup
ARRAKIS tileset cleanup
2014-01-16 22:03:07 -08:00
Matthias Mailänder
151f7dc9c6 Merge pull request #4464 from pchote/attackmove
Add AttackMove to C&C helicopters
2014-01-16 12:12:27 -08:00
Matthias Mailänder
8217a1c161 Merge pull request #4461 from chrisforbes/master-ping-thread-safety
fixes #4459
2014-01-16 12:01:03 -08:00
Matthias Mailänder
d939d5183c fixed a crash in the actor border rendering 2014-01-16 20:59:18 +01:00
Matthias Mailänder
ecca689f34 categorize everything 2014-01-16 20:59:18 +01:00
Matthias Mailänder
e496f2a36d randomized bricks 2014-01-16 20:59:16 +01:00
Matthias Mailänder
c6db460291 remove building bibs to avoid confusion 2014-01-16 20:50:51 +01:00
Matthias Mailänder
dd581e0135 identical to the right two tiles from 443
BLOXICE and BLOXTREE redundancy
2014-01-16 20:50:51 +01:00
Matthias Mailänder
b3e0632e25 category resorting 2014-01-16 20:50:50 +01:00
Matthias Mailänder
d5039e1ddb also a dead worm 2014-01-16 20:50:50 +01:00
Matthias Mailänder
ca770e89c3 merged the bottom of the big rock 2014-01-16 20:50:50 +01:00
Matthias Mailänder
b9cdbaebbf merged the giant crater into one tile 2014-01-16 20:50:50 +01:00
Matthias Mailänder
211bcedb95 stich the black wreck together 2014-01-16 20:50:50 +01:00
Matthias Mailänder
c6c47ccfcd English please 2014-01-16 20:50:50 +01:00
Paul Chote
d2d29269d6 Add AttackMove to C&C helicopters.
The other mods don't allow aircraft to AutoTarget.
2014-01-16 19:02:39 +13:00
Paul Chote
99cb698424 Generalise AttackMove to support anything with IMove and AutoTarget.
Also removes the unnecessary JustMove parameter.
2014-01-16 18:47:29 +13:00
Chris Forbes
abaed4e8be fix client join/leave race with master server ping 2014-01-16 09:36:12 +13:00
Chris Forbes
f053379458 Merge pull request #4453 from Mailaender/sniper-contrails
Added contrail effects to sniper shots
2014-01-13 11:21:29 -08:00
Matthias Mailänder
e07453bb7f Merge pull request #4454 from ScottNZ/lua
Move lua logs to lua.log
2014-01-12 06:31:36 -08:00
ScottNZ
d34de25495 Move lua logs to lua.log 2014-01-12 23:28:50 +13:00
Matthias Mailänder
c4220a42dc Merge pull request #4437 from pchote/moveadjacent
Fix EnterTransport pathing.
2014-01-12 01:53:53 -08:00
Paul Chote
13ccfa0b34 Update change log. 2014-01-12 22:37:32 +13:00
Paul Chote
d2fa1a12f9 Use DomainIndex to fix naval transport path perf. 2014-01-12 22:35:06 +13:00
Paul Chote
29e689178d Make EnterTransport more consistent with MoveAdjacentTo. 2014-01-12 22:09:11 +13:00
Paul Chote
3cdeea009b Make MoveAdjacentTo aware of moving targets.
Units moving toward another actor (passengers, hijackers, etc) will now repath if their target moves.
Fixes excessive repathing if the target cannot be reached.
2014-01-12 22:09:11 +13:00
Paul Chote
c333b59eb9 Cache trait lookups in MoveAdjacentTo. 2014-01-12 22:09:11 +13:00
Paul Chote
27ef3352f4 Fix AttackMove nits.
Clears StyleCop warnings and adds GetTargets implementation for the unit path debug.
2014-01-12 22:09:04 +13:00
Matthias Mailänder
3a57c18154 added contrail effects to sniper shots 2014-01-11 18:13:09 +01:00
Matthias Mailänder
14b264e553 Merge pull request #4432 from ihptru/download-map-with-name
closes #4405
2014-01-11 02:54:04 -08:00
Matthias Mailänder
69c97a6e39 Merge pull request #4441 from xaionaro/bleed
closes #4425
2014-01-11 02:31:16 -08:00
Dmitry Yu Okunev
0083e60590 Permit black color (S=0.0, V=0.2) 2014-01-11 14:06:53 +04:00
Matthias Mailänder
51ef37fc02 Merge pull request #4428 from dan9550/nod03b
Added nod03b
2014-01-11 01:16:56 -08:00
Chris Forbes
0c67bce545 Merge pull request #4447 from Mailaender/fps-limit-opt
Optimized frame limit sleep
2014-01-11 00:56:00 -08:00
Matthias Mailänder
589f5297d9 optimized frame limit sleep
* calculate idealFrameTime only when needed
* only create a new Stopwatch when needed
* disallow wait times > 1 second
2014-01-11 09:14:31 +01:00
Matthias Mailänder
dd6b1f877d Merge pull request #4433 from reaperrr/laserzap-improvement
LaserZap improvements
2014-01-06 13:46:17 -08:00
reaperrr
fe47907024 changelog entry for LaserZap's HitAnimPalette 2014-01-06 18:15:03 +01:00
reaperrr
0763fc0167 Added HitAnimPalette trait to LaserZap projectile, LaserZap HitAnim can now use other palettes than the default effect palette. 2014-01-06 18:14:19 +01:00
reaperrr
26013c21f9 Added descriptions for LaserZap Color and HitAnim traits 2014-01-06 18:11:34 +01:00
Igor Popov
ca61536c15 map-downloading: use filename served by content-disposition as saving location 2014-01-06 13:41:12 +04:00
Paul Chote
9ec7f32473 Merge pull request #4419 from Mailaender/snipericon-fix
Fixed transparency glitches in the sniper icon.
2014-01-05 12:58:09 -08:00
Paul Chote
191c797de3 Merge pull request #4430 from reaperrr/system-yaml-split1
Divided system.yaml of all shipping mods into multiple yamls
2014-01-05 12:40:11 -08:00
reaperrr
a6610d8e9c changelog entry for system.yaml split 2014-01-05 19:23:34 +01:00
reaperrr
9ca3361c2f Split TS system.yaml into four files 2014-01-05 19:22:51 +01:00
reaperrr
8046bb60f0 Split D2k system.yaml into four files 2014-01-05 19:20:35 +01:00
Dan9550
9c13f0dfc3 added nod03b
Finished off nod03b

fixed indentation & inf in front of trees

fixed oil derrick
2014-01-06 05:17:27 +11:00
reaperrr
ad2cf62c45 Split RA system.yaml into four files 2014-01-05 19:16:57 +01:00
reaperrr
ab021f9868 Merge RA music-cs.yaml and music-am.yaml with music.yaml 2014-01-05 19:16:13 +01:00
reaperrr
c5b7d268b3 Split TD system.yaml into four yamls 2014-01-05 18:56:01 +01:00
Matthias Mailänder
2b07bd0f1c Update CHANGELOG
followup of #4421
2014-01-05 14:38:58 +01:00
Matthias Mailänder
dcd83db15e replaced 000000 color with 100c0c
closes #3254
2014-01-05 12:11:53 +01:00
Matthias Mailänder
bc3c4163ab Merge pull request #4408 from dan9550/nod03-lua
Added OnCapture lua trigger and begun work on nod03a
2014-01-05 01:29:36 -08:00
Dan9550
91050ba458 OnCapture lua trigger & nod03a
Cleaned up nod03a, spaces -> tabs

nod03a and OnCapture lua trigger
2014-01-05 20:19:13 +11:00
Paul Chote
197c583ea6 Merge pull request #4422 from Mailaender/d2k-bloxxmas
Added the Dune 2000 BLOXXMAS terrain tiles
2014-01-04 14:32:49 -08:00
Paul Chote
f3c58570f7 Merge pull request #4421 from reaperrr/hackyai-uhc-polish
Fixed/precised some descriptions of #4415
2014-01-04 13:18:25 -08:00
Matthias Mailänder
888bceaa80 update CHANGELOG 2014-01-04 15:09:23 +01:00
Matthias Mailänder
09335f839d added the BLOXXMAS terrain special tiles 2014-01-04 15:09:22 +01:00
Matthias Mailänder
74b24c0f8d display TMP files in the asset browser 2014-01-04 14:41:07 +01:00
reaperrr
55c1a93bf5 Follow-up on #4415. Fixed/precised some descriptions. 2014-01-04 14:31:29 +01:00
Matthias Mailänder
b2a8763d06 tex → tmp to avoid confusion with TeX markup files
closes github/linguist#883
2014-01-04 13:53:44 +01:00
Paul Chote
84b4456a3a Merge pull request #4413 from Mailaender/d2k-buildradius
Removed the build radius restrictions for Dune 2000
2014-01-04 01:53:26 -08:00
Paul Chote
1103d63f70 Merge pull request #4399 from Mailaender/gdi02
Recreated the second GDI mission in Lua
2014-01-04 01:52:53 -08:00
Matthias Mailänder
4c05d98e9b removed the build radius restrictions 2014-01-04 10:51:56 +01:00
Matthias Mailänder
2b56c0eb2f Update CHANGELOG
for #4415
2014-01-04 10:38:47 +01:00
Matthias Mailänder
cb3861b6de Merge pull request #4415 from reaperrr/hackyai-unhardcoding-rev2
Un-hardcoded several HackyAI aspects
2014-01-04 01:36:20 -08:00
Paul Chote
81791b15fe Merge pull request #4414 from Mailaender/d2k-shroud
Display shroud by default again in Dune 2000
2014-01-04 01:34:18 -08:00
Paul Chote
a58c0f66cd Merge pull request #4407 from Mailaender/torpedo-bridges
Made torpedos not travel through land, but destroy bridges
2014-01-04 01:31:58 -08:00
Matthias Mailänder
ddf7c15c6a display shroud by default again 2014-01-04 10:16:30 +01:00
Matthias Mailänder
7e437c620c remove unused interior terrain types
no smudges on high walls
2014-01-04 09:57:17 +01:00
Matthias Mailänder
3ced83e94e temperate roads should be brown in the minimap 2014-01-04 09:57:17 +01:00
Matthias Mailänder
a6c5b80731 this is not just ShowMuzzles anymore 2014-01-04 09:57:17 +01:00
Matthias Mailänder
4d99f9ce53 allow to C4 intact bridges that have taken some damage 2014-01-04 09:57:17 +01:00
Matthias Mailänder
3de1516747 allow invalid terrain targets for Air/Water bound weapons
made terrain targeting consistent with actors
2014-01-04 09:57:09 +01:00
Matthias Mailänder
e3a2addca0 new Bridge terrain type with grey minimap color 2014-01-04 09:39:43 +01:00
Matthias Mailänder
9730b41162 update CHANGELOG 2014-01-04 09:39:43 +01:00
Matthias Mailänder
027a281ae3 define torpedoes in a more generic way
fixes #3252 and closes #2097
2014-01-04 09:39:43 +01:00
Matthias Mailänder
4b43bb1cad replace misleading Underwater bool with what it really does 2014-01-04 09:39:43 +01:00
Matthias Mailänder
3a6989ce24 removed redundant default mini bridges 2014-01-04 09:39:43 +01:00
Paul Chote
87d544fd26 Merge pull request #4229 from Mailaender/default-motd
Shared MOTD between all mods and a default motd.txt
2014-01-04 00:38:15 -08:00
Matthias Mailänder
e367cea840 one MOTD for all mods and create a default motd.txt 2014-01-04 09:34:17 +01:00
Paul Chote
b823356842 Merge pull request #4238 from Mailaender/replay-args
Added a new Launch.Replay=$FILEPATH parameter
2014-01-04 00:28:09 -08:00
Matthias Mailänder
fc5185d552 added a bash script to test open-with on .rep files 2014-01-04 09:20:08 +01:00
Matthias Mailänder
c2df142df4 don't hardcode the default mod here 2014-01-04 09:20:08 +01:00
Matthias Mailänder
10cf992265 update CHANGELOG 2014-01-04 09:20:06 +01:00
Matthias Mailänder
3bf385b485 added a new Launch.Replay=$FilePath parameter
that does not persist in settings.yaml
2014-01-04 09:19:20 +01:00
Matthias Mailänder
62ffe4aeaf StyleCop 2014-01-04 09:19:20 +01:00
Paul Chote
5c290c949f Merge pull request #4418 from ScottNZ/bleed
Fix the editor painting black squares. Closes #4416
2014-01-04 00:00:25 -08:00
ScottNZ
411b1650a0 Fix the editor painting black squares. Closes #4416 2014-01-04 17:57:50 +13:00
Paul Chote
4d1551c7d6 Merge pull request #4417 from ScottNZ/bleed
Remove Nod01Script.cs reference from csproj
2014-01-03 17:41:34 -08:00
ScottNZ
f7fb05891a Remove Nod01Script.cs reference from csproj following the port of it to Lua in #4397 2014-01-04 14:34:37 +13:00
reaperrr
16fd5559e9 Un-hardcoded several radiuses and production-related count for units hanging around base 2014-01-04 01:19:03 +01:00
reaperrr
98f7995d00 Un-hardcoded excess power factor and excess power minimum 2014-01-04 01:16:00 +01:00
Paul Chote
c75aafee14 Merge pull request #4397 from Mailaender/nod01-lua
Ported first Nod mission to Lua
2014-01-03 14:04:54 -08:00
Paul Chote
10876eb773 Merge pull request #4411 from Mailaender/d2k-terrain-polish
Randomized sand and rock for Dune 2000
2014-01-03 13:48:06 -08:00
Paul Chote
902fc3dc35 Merge pull request #4412 from xanax/patch-1
Update AUTHORS
2014-01-03 13:44:45 -08:00
Paul Chote
bdc593c8ea Merge pull request #4235 from Mailaender/map-preview-crash
Don't crash map preview when loading a map with bogus tileset
2014-01-03 13:43:54 -08:00
Matthias Mailänder
c1aa85bba6 update CHANGELOG 2014-01-03 22:32:53 +01:00
Matthias Mailänder
9e49652488 add missing dash and avoid brackets 2014-01-03 22:27:49 +01:00
Matthias Mailänder
bfa7421e40 English please 2014-01-03 22:27:49 +01:00
Matthias Mailänder
40834d1701 fixed and randomized the rock and sand tiles on all maps 2014-01-03 22:27:49 +01:00
Matthias Mailänder
dc89c54c14 mark legacy tiles as black in minimap 2014-01-03 22:27:49 +01:00
Matthias Mailänder
bc176c56ed workaround Tileset ARRAKIS lacks terraintype Clear 2014-01-03 22:27:49 +01:00
Matthias Mailänder
5bb101b9a5 workaround Warning: Unknown or excluded actor: spicebloom 2014-01-03 22:27:49 +01:00
Matthias Mailänder
7797ee910c stick to one randomized rock tile 2014-01-03 22:27:49 +01:00
Matthias Mailänder
1933ca0edc add missing dash 2014-01-03 22:27:49 +01:00
Matthias Mailänder
8738692259 keep all but one randomized sand tile
render tiles that should be replaced black
2014-01-03 22:27:49 +01:00
Matthias Mailänder
bce9626962 simpler category description for rotten base 2014-01-03 22:27:13 +01:00
Matthias Mailänder
a774e33e14 remove left-overs from initial spice render experiments 2014-01-03 22:27:13 +01:00
Paul Chote
f8576ab05d Merge pull request #4394 from Mailaender/legacy-map-import
Moved the LegacyMapImport into Utility
2014-01-03 13:25:00 -08:00
xanax
42231f5009 Update AUTHORS 2014-01-03 22:01:09 +01:00
Matthias Mailänder
9e0ac761f1 Merge pull request #4398 from bkero/patch-1
add libmono-winforms2.0-cil dep for debian/ubuntu
2014-01-03 08:18:56 -08:00
Matthias Mailänder
be2d600810 Merge pull request #4401 from dderevjanik/bleed
D2k terrain expansion
2014-01-03 08:18:43 -08:00
Matthias Mailänder
a941bc567b more verbose output on ignored player reference values 2014-01-03 16:46:41 +01:00
Matthias Mailänder
48f153ed47 default to filename instead of "(null)" when the map has no name 2014-01-03 16:46:41 +01:00
Matthias Mailänder
c6d9574d52 automatically fix open areas
and don't hard-code the tiles no more
2014-01-03 16:46:38 +01:00
Matthias Mailänder
9cea5f96cd selectable maps by default 2014-01-03 16:45:43 +01:00
Matthias Mailänder
50bc073791 move legacy map import into the command line utility
closes #4368
2014-01-03 16:45:40 +01:00
Matthias Mailänder
147fb64185 don't crash map preview when the tileset can not be found
fixes #3033
2014-01-03 16:07:01 +01:00
Matthias Mailänder
752562dca7 added a description that can be displayed as mission briefing 2014-01-02 17:43:16 +01:00
Matthias Mailänder
7af935469d hide GDI soldiers behind trees 2014-01-02 16:15:07 +01:00
Matthias Mailänder
93da201b81 added the second GDI mission 2013-12-31 20:03:31 +01:00
Daniel
af7fb5f69b d2k tex files 2013-12-31 17:51:39 +01:00
Daniel
4a037fd751 update arrakis.yaml for tex 2013-12-31 17:02:25 +01:00
Daniel
74ba22ce0f Update d2k mod.yaml for tex 2013-12-31 17:01:12 +01:00
Matthias Mailänder
4a4885a905 ported first Nod mission to Lua 2013-12-31 12:53:24 +01:00
Chris Forbes
d20a47d37a Merge pull request #4396 from Mailaender/reject-move-fix
Fixed RejectsOrders for "Move"
2013-12-30 22:00:39 -08:00
Paul Chote
ffaa2698b2 Merge pull request #4016 from Mailaender/highlight-start
Blinking ready box when all slots are taken
2013-12-30 19:25:22 -08:00
Paul Chote
abfe972dc2 Merge pull request #4383 from cjshmyr/levelup
Initial support for unit upgrade crates
2013-12-30 19:22:40 -08:00
Paul Chote
45894a9fe4 Merge pull request #4386 from Mailaender/gdi01-lua
Ported first GDI mission to Lua
2013-12-30 19:19:24 -08:00
Paul Chote
220b1bb073 Merge pull request #4395 from Mailaender/lua-reinforce-fix
Fixed NLua.Exceptions.LuaScriptException: [string "mods/common/lua/openra.lua"]:9
2013-12-30 18:51:40 -08:00
bkero
7b2a801c8c add libmono-winforms2.0-cil dep for debian/ubuntu 2013-12-30 19:19:27 +01:00
Matthias Mailänder
ec3f44e536 remove redundant MissionIsOver check in Tick 2013-12-30 09:28:40 +01:00
Matthias Mailänder
4bf5f62ed4 use the original hovercraft art 2013-12-30 09:28:38 +01:00
Paul Chote
512358eb72 Disable Move OrderTargeter if the Move order is rejected. 2013-12-30 08:54:02 +01:00
Matthias Mailänder
7d6d484afd recreated GDI01 in Lua 2013-12-30 08:52:15 +01:00
Matthias Mailänder
7d19e25627 don't crash on empty orders 2013-12-30 08:44:14 +01:00
Matthias Mailänder
da8341e336 InitialAltitude is now part of CenterPositition in Lua, too
followup of #4371
2013-12-30 08:38:39 +01:00
Curtis Shmyr
193fc72708 Update CHANGELOG 2013-12-29 19:33:22 -07:00
Curtis Shmyr
8ada3d34ec Initial support for individual unit upgrade crates 2013-12-29 19:10:50 -07:00
Matthias Mailänder
d87810a29c Merge pull request #4391 from pchote/rectangular-tiles
Add support for TS terrain sprites and non-square cell sizes.
2013-12-29 14:34:52 -08:00
Paul Chote
e9151e3749 Fall back to square tiles for the editor. 2013-12-30 11:11:24 +13:00
Paul Chote
e6faa86570 Update changelog. 2013-12-29 14:20:15 +13:00
Paul Chote
b8e461a901 Add three additional spawn points 2013-12-29 14:16:21 +13:00
Matthias Mailänder
2df7dec72b Replace the placeholder tile. 2013-12-29 14:16:20 +13:00
Paul Chote
0143e8bfb8 Support rectangular tiles. 2013-12-29 14:16:20 +13:00
Paul Chote
1e792fa58b Add limited Tmp(TS) support.
Supports basic tile data, but not z or extra data.
2013-12-29 14:16:20 +13:00
Paul Chote
1cb4d11dc0 Sort asset browser list by filename. 2013-12-29 14:16:20 +13:00
Paul Chote
d116f8a1ce Add FieldLoader support for Size. 2013-12-29 14:16:20 +13:00
Paul Chote
ef77ec21d0 Merge pull request #4384 from reaperrr/visceroid-icon
Changes text on visceroid icon to 'Visceroid' instead of 'Viceroid'.
2013-12-28 14:40:50 -08:00
reaperrr
119cfbd671 Changes text on visceroid icon to 'Visceroid' instead of 'Viceroid'. 2013-12-28 14:15:54 +01:00
Chris Forbes
a5316a488f Merge pull request #4360 from cjshmyr/crates
CrateSpawner changes
2013-12-27 19:11:12 -08:00
Matthias Mailänder
f35400ad3e blinking ready checkbox when all slots are taken 2013-12-27 23:36:58 +01:00
Matthias Mailänder
6e5b5d430f Merge pull request #4358 from s1ww/bleed
Adding detailed 5 players ffa conquest map (format 6)
2013-12-27 13:48:23 -08:00
Chris Forbes
bb37d90781 Merge pull request #4376 from pchote/kid-artsrc
Pixel art helpers by Kaito-Kid
2013-12-26 16:40:58 -08:00
Curtis Shmyr
fa9e98d844 Use add and remove world notifications on Crate to maintain the CrateSpawner list of crates 2013-12-26 16:22:31 -07:00
Curtis Shmyr
9baa2d004a Merge pull request #4377 from pchote/crate-tooltip-fix
Fix crate tooltips
2013-12-26 13:55:01 -08:00
Paul Chote
fd235f11cf Remove redundant AddInfluence. 2013-12-27 10:22:26 +13:00
Paul Chote
f251f64c11 Add explicit bounds for Crate. Fixes #4362. 2013-12-27 10:17:55 +13:00
Kaito-Kid
195fc55496 OpenRA Iconmaker 3.3 + Icon-Font + PS-Actions (by Kaito-Kid) 2013-12-27 09:51:06 +13:00
Kaito-Kid
9afffb2473 Add photoshop palettes for RA temperat. 2013-12-27 09:50:38 +13:00
Paul Chote
9d221b85e4 Merge pull request #3666 from Mailaender/c4-bridges
Allow bridges to be demolished with C4
2013-12-26 12:28:25 -08:00
Matthias Mailänder
ed19969afe obey force move commands on bridge demolition and repair 2013-12-26 21:23:26 +01:00
Matthias Mailänder
83915eefb4 completely destroy long bridges in a chain reaction 2013-12-26 21:23:23 +01:00
Matthias Mailänder
c08335b7b2 made fields non-explodable 2013-12-26 21:22:50 +01:00
Matthias Mailänder
c78a856894 C4 demolishable bridges 2013-12-26 21:22:47 +01:00
Paul Chote
9d09f82393 Merge pull request #4373 from reaperrr/patch-1
Fix visceroid health radius and name
2013-12-26 12:12:10 -08:00
Curtis Shmyr
59c674a427 Fix style issues in CrateSpawner / convert altitude to world coords 2013-12-26 12:24:50 -07:00
Curtis Shmyr
f8dca4b834 Replaced references of CrateDrop with CrateSpawner in RA maps 2013-12-26 12:14:51 -07:00
Curtis Shmyr
fe0c34c8ef CrateSpawner - combine DeliverByAircraft and DeliveryAircraft properties 2013-12-26 12:14:51 -07:00
Curtis Shmyr
a65358f191 Add support for multiple crate actors to be spawned from CrateSpawner 2013-12-26 12:14:50 -07:00
Curtis Shmyr
0c77dab922 Remove CrateDrop and move all crate spawning logic into CrateSpawner 2013-12-26 12:14:50 -07:00
Matthias Mailänder
61ef48585c Merge pull request #4374 from MicroGraphics/rushouse
fixed yaml for rushouse and snowhut
2013-12-26 06:57:00 -08:00
MicroGraphics
16a3f38a11 fixed yaml for rushouse and snowhut 2013-12-26 15:46:56 +01:00
Matthias Mailänder
c92155cd84 Update CHANGELOG
#4317
2013-12-26 14:55:04 +01:00
reaperrr
4ba664da47 Fix visceroid health radius and name
Visceroids are vehicle-sized (in-game at least), so their health radius should reflect that.

And yes, I'm pretty sure it should be Visceroid and not Viceroid. The majority of Westwood documents and Tiberian Suns' rules.ini clearly spell it with an 's' added before the 'c'.
2013-12-26 13:16:09 +01:00
Matthias Mailänder
3a4c4eb481 Merge pull request #4371 from pchote/more-world-coords
Convert remaining yaml definitions to world coordinates
2013-12-26 03:22:07 -08:00
Paul Chote
e8d1b9b9e5 Update changelog. 2013-12-26 20:44:21 +13:00
Paul Chote
996877d9e5 Upgrade mod rules to match engine changes. 2013-12-26 20:42:13 +13:00
Paul Chote
bd334a6295 Introduce a mod/map upgrade tool. 2013-12-26 19:58:23 +13:00
Paul Chote
0b8dafcdf0 Convert actor speed to world coordinates. 2013-12-26 19:45:13 +13:00
Paul Chote
c7914ec68f Convert Exit to world coordinates. 2013-12-26 19:45:13 +13:00
Paul Chote
f116c516ce Add FieldLoader support for CPos and CVec. 2013-12-26 19:45:13 +13:00
Paul Chote
7a034a6609 Move CPos and CVec into FileFormats. 2013-12-26 19:45:13 +13:00
Paul Chote
ecdae4cbbe Convert weapons to world coords. 2013-12-26 19:45:12 +13:00
Paul Chote
aca897fa76 Implement IComparable on WRange. 2013-12-26 19:45:12 +13:00
Paul Chote
c49b06fdde Convert Health Radius to world coordinates. 2013-12-26 19:44:50 +13:00
Paul Chote
aa2f865d5d Convert Altitude to world coords.
Removes the obsolete AltitudeInit: use CenterPositionInit instead.
2013-12-26 17:25:07 +13:00
Paul Chote
c42a6f8386 Convert terrain rendering to world coords. 2013-12-26 17:23:13 +13:00
Paul Chote
1a31368953 Convert range circle rendering to world coords. 2013-12-26 17:23:12 +13:00
Paul Chote
253349e3eb Merge pull request #4317 from Mailaender/d2k-grenadier
Added the Atreides grenadier
2013-12-25 14:16:11 -08:00
Paul Chote
d71a0c3e5d Merge pull request #4369 from Mailaender/chmod-x-brimstone
Removed executable bits from brimstone map
2013-12-25 13:41:55 -08:00
Matthias Mailänder
4f17209260 Merge pull request #4364 from ihptru/freshing-maps
re-InitializeLoaders on Dedicated server restart, will fresh list of maps too
2013-12-25 11:30:31 -08:00
Matthias Mailänder
50fb67cb60 Merge pull request #4367 from ScottNZ/editor
Fix legacy map importer NRE. Closes #4366
2013-12-25 11:23:15 -08:00
MicroGraphics
f00c82a110 polished rushouse , changed footprint
made it smaller and worked with a blurring-tool, so it fits better to
the westwood-stuff
2013-12-25 16:32:17 +01:00
Matthias Mailänder
9db32178b3 remove executable bits from brimstone map 2013-12-25 09:39:43 +01:00
ScottNZ
5e42554b2b Fix legacy map importer NRE. Closes #4366 2013-12-25 12:52:07 +13:00
Igor Popov
88ee768bc7 more reasonable message when map was not found on server 2013-12-24 22:30:08 +04:00
Igor Popov
12199da97f re-InitializeLoaders on Dedicated server restart, will fresh list of maps too 2013-12-24 22:23:57 +04:00
s1ww
3c769d6579 Adding detailed 5 players ffa conquest map (format 6) 2013-12-23 17:47:58 +01:00
Matthias Mailänder
35e906c606 Merge pull request #4347 from ihptru/battle-lake
update battle-lake.oramap, fixes #3245;
2013-12-23 00:39:29 -08:00
Matthias Mailänder
63f3a9e611 Merge pull request #4346 from MicroGraphics/bleed
Added a Snowhut and new map "Snow Town"
2013-12-23 00:34:28 -08:00
Matthias Mailänder
99a559c202 Merge pull request #4353 from ihptru/patch-1
Update launch-dedicated.sh
2013-12-23 00:19:10 -08:00
Igor Popov
75372ff706 Update launch-dedicated.sh
do not hardcode Map
2013-12-23 09:03:20 +03:00
Matthias Mailänder
be56f1ebeb update CHANGELOG 2013-12-22 22:31:49 +01:00
MicroGraphics
43586a1178 New Map Snow Town 2013-12-21 20:16:09 +01:00
Igor Popov
04b3387f0e update battle-lake.oramap, fixes #3245; 2013-12-21 21:17:47 +04:00
MicroGraphics
8e9364e5a4 snowhut 2013-12-21 13:52:38 +01:00
Matthias Mailänder
6a0c0ae202 Merge pull request #4340 from pchote/harv-delivery
Allow DeliveryBuildings: to be specified on Harvester
2013-12-20 13:52:31 -08:00
Matthias Mailänder
b6d5f53465 Merge pull request #4321 from ScottNZ/lua
Lua fixes/polish
2013-12-20 13:46:56 -08:00
Chris Forbes
b55b64e86c Allow DeliveryBuildings: to be specified on Harvester
This allows multiple harv/proc type pairs, requested in #4323.
2013-12-21 10:27:46 +13:00
Paul Chote
15f9a6a0a4 Merge pull request #4339 from Mailaender/download-content
More generic OpenRA download redirect URL
2013-12-20 13:25:25 -08:00
Matthias Mailänder
5ebeb1b077 use the new OpenRA download redirect URL 2013-12-20 22:20:53 +01:00
Matthias Mailänder
c86d7b85a4 updated the Bountysource link 2013-12-20 14:55:35 +01:00
Matthias Mailänder
639cf857af Merge pull request #4337 from ihptru/editor-fix
Editor fix of #4333;
2013-12-20 05:49:46 -08:00
ScottNZ
7ca5d56c1f Move the TraitInfo stuff into rules.lua 2013-12-20 22:53:37 +13:00
Paul Chote
883b014888 Generalize reinforcement insertion / extraction. 2013-12-20 20:32:42 +13:00
ScottNZ
09b694095c Add Map.GetNamedActor for map actor lookup 2013-12-20 19:20:56 +13:00
Igor Popov
613262d597 add xaionaro to AUTHORS at last 2013-12-20 01:53:46 +04:00
Igor Popov
a8074ea23a initialize Options in Editor for a new map; fix when trying to add custom assets for map which does not exist yet; ( fixes #4333 ) 2013-12-20 01:46:13 +04:00
ScottNZ
3cf06119f7 Update packaging scripts for mods/common 2013-12-19 19:26:59 +13:00
ScottNZ
061eb412ca Rename SupportPowers.Parabomb to SupportPowers.Airstrike 2013-12-19 19:26:58 +13:00
ScottNZ
a4f3caa6e7 Moved mods/ra/lua to mods/common/lua 2013-12-19 19:26:58 +13:00
ScottNZ
23cb4defa3 Update KopiLua.dll with some more dangerous bits removed, and remove strong naming from KopiLua/NLua 2013-12-19 19:26:58 +13:00
ScottNZ
e8fb96c55f Add Lua cargo insertion code and Utils.Skip. Needed for Allies 03 Classic. 2013-12-19 19:26:58 +13:00
ScottNZ
b2e9de810e Add CPos.New etc functions to Lua standard library and helpers to LuaScriptInterface.cs. Rename Team.Create to Team.New. 2013-12-19 19:26:57 +13:00
ScottNZ
8e9835f2fa Merge pull request #4331 from pchote/requires-fix
Allow mods to define a list of compatible map sources.
2013-12-18 19:22:09 -08:00
Paul Chote
6406e1d052 Allow mods to define a list of compatible map sources. Fixes #4319. 2013-12-19 14:44:20 +13:00
Matthias Mailänder
58fd9b8d1d Merge pull request #4327 from pchote/map-upgrade-fix
Persist custom map package contents on save. Fixes #4318.
2013-12-18 14:47:50 -08:00
Matthias Mailänder
29b3d790b2 Merge pull request #4328 from pchote/crate-palette-fix
Polish crate rendering
2013-12-18 14:46:53 -08:00
Matthias Mailänder
0a24aa0ac6 Merge pull request #4326 from pchote/renderer-fix
Throw a sensible exception when no renderers are available.
2013-12-18 14:35:15 -08:00
ScottNZ
fbefebfb93 Merge pull request #4330 from MicroGraphics/patch-1
Update AUTHORS
2013-12-18 14:06:27 -08:00
MicroGraphics
1f2ec0932a Update AUTHORS 2013-12-18 23:02:50 +01:00
Paul Chote
83bb3f97f6 Update changelog. 2013-12-19 09:25:16 +13:00
Paul Chote
c1b894959e Fix RA crate artwork. 2013-12-19 09:22:10 +13:00
Paul Chote
d4ab156352 Fix C&C crate artwork. 2013-12-19 09:21:52 +13:00
Paul Chote
1b41848623 Fix palette modifiers and the effect palette. 2013-12-18 22:48:09 +13:00
Paul Chote
56894f811a Use effect palette for crates. Fixes #4316. 2013-12-18 22:27:20 +13:00
Paul Chote
9ef971a159 Update CHANGELOG. 2013-12-18 22:22:24 +13:00
Paul Chote
50ad3b64d8 Persist custom map package contents on save. Fixes #4318. 2013-12-18 22:14:49 +13:00
Paul Chote
b96c36f38f Fix most of the style violations in Game.cs. 2013-12-18 21:45:04 +13:00
Paul Chote
ff5cbc65c5 Throw a sensible exception when no renderers are available. Fixes #4322. 2013-12-18 21:42:45 +13:00
Matthias Mailänder
37ea791841 added the Atreides grenadier 2013-12-15 13:07:26 +01:00
Matthias Mailänder
9acfbc30e5 this is now sprite to PNG 2013-12-15 12:03:21 +01:00
Matthias Mailänder
dfc56f6201 document where we ripped it from
off by one
2013-12-15 12:03:21 +01:00
ScottNZ
7ae831381a Merge pull request #4315 from pchote/cnc-shellmap-fix
C&C shellmap polish fix.
2013-12-15 01:18:04 -08:00
Paul Chote
7e89763eb9 Fix initial HTNK turret facing in C&C shellmap. 2013-12-15 22:12:02 +13:00
Paul Chote
d63dcc5dd1 Add a lua actor facing helper. 2013-12-15 22:12:02 +13:00
ScottNZ
49ba44fbaa Merge pull request #4313 from pchote/gifts
Change crate graphics for christmas.
2013-12-14 21:17:23 -08:00
Paul Chote
e9e2e353f7 Change crate graphics for christmas. Closes #4296. 2013-12-15 18:16:15 +13:00
ScottNZ
74461f91bc Merge pull request #4306 from Mailaender/ra-aircraft-husk-sight
Reveal shroud for RA aircraft husks
2013-12-14 19:51:27 -08:00
Matthias Mailänder
b6753fb076 update CHANGELOG 2013-12-14 10:41:57 +01:00
Paul Chote
f1372acf3f Merge pull request #4305 from Mailaender/rpm-freetype
Fixed broken FreeType 2 RPM dependency on Fedora
2013-12-14 01:33:15 -08:00
Matthias Mailänder
58f8b7228f reveal shroud for aircraft husks falling down 2013-12-13 15:23:42 +01:00
Matthias Mailänder
f99dd6748b Merge pull request #4301 from pchote/cnc-helicopter-husk-sight
Add sight to helicopter husks.
2013-12-13 06:12:58 -08:00
Matthias Mailänder
1aa95ab8a4 Merge pull request #4303 from pchote/batch-fix
Fix two serious perf regressions.
2013-12-13 05:54:06 -08:00
Matthias Mailänder
d14fd27ac1 fix broken FreeType 2 RPM dependency
* http://pkgs.org/download/freetype on Fedora
* http://pkgs.org/download/freetype2 on everything else
2013-12-13 14:38:16 +01:00
Paul Chote
393b1bbc0a Remove ContrailFader when complete. Fixes #4302. 2013-12-13 22:36:30 +13:00
Paul Chote
45ccf0035e Only render the frozen actors that are visible. Fixes #4300. 2013-12-13 22:36:25 +13:00
Paul Chote
d0752736fc Add sight to helicopter husks. Fixes #4298. 2013-12-13 21:30:11 +13:00
Matthias Mailänder
88c9b6d73b Merge pull request #4299 from pchote/shroud-fix
Always initialise the fog palette.
2013-12-13 00:01:35 -08:00
Paul Chote
e424d7c6c1 Always initialise the fog palette. Fixes #4297. 2013-12-13 17:49:31 +13:00
Matthias Mailänder
1bbe200e32 Merge pull request #4295 from pchote/utility-fix
Fix bitrotted utility description.
2013-12-11 23:48:09 -08:00
Paul Chote
ffcfe051e0 Fix bitrotted command descriptions. 2013-12-12 20:30:48 +13:00
Paul Chote
8f71861a6b Remove mod argument from GenerateMinimap.
It is redundant now that we enforce v6 maps.
2013-12-12 20:30:48 +13:00
Matthias Mailänder
f76caa5fb7 Merge pull request #4290 from pchote/text-fix
Attempt to parse unexpected key events as text.
2013-12-11 09:17:28 -08:00
Matthias Mailänder
0c199126cc Merge pull request #4289 from pchote/ore-spawn-fix
Don't spawn resources at maximum density.
2013-12-11 09:09:34 -08:00
Matthias Mailänder
0b73478869 Merge pull request #4291 from pchote/fix-the-frelling-editor
Fixes #4269.
2013-12-11 09:05:18 -08:00
Matthias Mailänder
bdd6c29539 Merge pull request #4271 from pchote/smudges
Use original D2K craters.
2013-12-11 04:39:07 -08:00
Paul Chote
c09e4ff541 Fixes #4269. 2013-12-11 23:13:46 +13:00
Paul Chote
e15637ad7f Fix typos spelling in changelog. 2013-12-11 22:55:46 +13:00
Paul Chote
f984dd16eb Update CHANGELOG. 2013-12-11 22:54:32 +13:00
Paul Chote
3abadd1ec6 Use the original D2K craters. 2013-12-11 22:54:00 +13:00
Paul Chote
8c7f77d2c7 Convert SmudgeLayer to sequences. 2013-12-11 22:53:33 +13:00
Paul Chote
719c9c1cd2 Attempt to parse unexpected key events as text. Fixes #4232. 2013-12-11 22:42:56 +13:00
Matthias Mailänder
f5123981fa Merge pull request #4287 from pchote/shroud
Rewrite shroud renderer.
2013-12-11 01:28:22 -08:00
Paul Chote
efd1f7f621 Merge pull request #4286 from ScottNZ/bleed
Fix cnc's nuke not damaging air units (a regression from a recent commit...
2013-12-11 01:27:56 -08:00
Paul Chote
0e33f5d3d9 Merge pull request #4288 from Mailaender/stats-fix
Fix death count in observer stats
2013-12-11 01:24:28 -08:00
Paul Chote
439d800f03 Don't spawn resources at maximum density. Fixes #4278. 2013-12-11 22:20:17 +13:00
Matthias Mailänder
a15e73a699 don't count units twice and forget about buildings
closes #4283
2013-12-11 09:43:02 +01:00
Paul Chote
186cc55d6e Update CHANGELOG. 2013-12-11 20:54:40 +13:00
Paul Chote
4d70996012 New shroud renderer. Fixes #2162. Fixes #3024. Fixes #4034.
Uses the original tile sprites in C&C and D2K and uses a smoother transition in all mods.
2013-12-11 20:51:49 +13:00
Paul Chote
4e814a8c2e Move ShroudRenderer into a trait. 2013-12-11 19:22:55 +13:00
Paul Chote
089973280d Add Multiply blend mode for D2K move-flash and shroud. 2013-12-11 19:22:54 +13:00
ScottNZ
f4d2e7cd6f Fix cnc's nuke not damaging air units (a regression from a recent commit to remove its PerCell damage model) 2013-12-11 17:45:33 +13:00
Matthias Mailänder
89d1d17b80 Merge pull request #4279 from ScottNZ/balance
Rework ra nuke to deal more damage to vehicles
2013-12-10 04:16:52 -08:00
ScottNZ
8bd05909e4 Update CHANGELOG for atom bomb changes 2013-12-10 23:19:09 +13:00
ScottNZ
e1c14cc114 Rework ra nuke to deal more damage to vehicles. Fixes #4220 2013-12-10 23:11:45 +13:00
ScottNZ
06a26e19ab Merge pull request #4277 from pchote/ore-fix
Remove custom terrain when clearing resources.
2013-12-10 01:01:51 -08:00
Paul Chote
fa067fa905 Remove custom terrain when clearing resources. Fixes #4272. 2013-12-10 16:52:41 +13:00
Matthias Mailänder
653155eda3 Merge pull request #4276 from pchote/initial-map
Improved automatic map selection.
2013-12-09 14:22:47 -08:00
Paul Chote
b8e492eda6 Attempt to pick a more sensible starting map. Fixes #4273. 2013-12-10 09:15:56 +13:00
Paul Chote
7b01b74ffc Save the map choice from the Skirmish button. 2013-12-10 09:12:42 +13:00
Matthias Mailänder
4d6c21d4c4 Merge pull request #4268 from pchote/d2k-palette-fix
D2K palette fixes
2013-12-09 01:22:52 -08:00
Paul Chote
844a1355c7 Disable shadow on terrain palette.
Fixes black spots on cliffs.
2013-12-09 19:50:47 +13:00
Paul Chote
ef28f4eb94 Clamp texture coordinates. Fixes #2343. 2013-12-09 19:49:39 +13:00
Paul Chote
18ccb50054 Merge pull request #4147 from Mailaender/cycle-hotkeys
Fixed and improved cycle hotkeys
2013-12-08 11:15:10 -08:00
Matthias Mailänder
e0efa00d95 StyleCop 2013-12-08 12:04:50 +01:00
Matthias Mailänder
2e6646bd73 cycle production buildings ordered by products 2013-12-08 12:02:44 +01:00
Matthias Mailänder
c19a739ae9 Merge pull request #4264 from pchote/cnc-nuke
Remove PerCell damage from C&C.
2013-12-08 01:59:16 -08:00
Paul Chote
a4ef4124ce Merge pull request #4253 from Mailaender/enforce-requiresmod
Enforce Map.RequiresMod
2013-12-08 01:55:05 -08:00
Matthias Mailänder
5794e69d52 enforce Map.RequiresMod so we don't get suprised by breakages 2013-12-08 10:46:55 +01:00
Paul Chote
0a13633036 Merge pull request #4265 from Mailaender/allies04-quickfix
Fixed crash when disguising the spy as an infantry without stand2 animations
2013-12-08 01:43:41 -08:00
Matthias Mailänder
4d77e961b5 Merge pull request #4262 from pchote/prereq-crash-fix
Prerequisites crash fix.
2013-12-08 01:42:31 -08:00
Matthias Mailänder
cbffc7ca09 fixed crash when disguising the spy 2013-12-08 10:34:56 +01:00
Paul Chote
e0eff775e2 Merge pull request #4263 from ScottNZ/lua
Small Lua cleanup
2013-12-08 01:34:33 -08:00
Paul Chote
ca83a82ba3 Remove PerCell damage from C&C.
Fixes bogus nuke damage.
2013-12-08 22:29:46 +13:00
Paul Chote
f30622a885 Merge pull request #4258 from Mailaender/packaging-corrections
Packaging Script Corrections
2013-12-08 00:44:39 -08:00
Paul Chote
bbc19df512 Fix StyleCop issues in TechTree. 2013-12-08 21:40:59 +13:00
ScottNZ
11b9c3ad80 Return useful requested things in supportpowers.lua 2013-12-08 21:39:45 +13:00
ScottNZ
6e7229f97f Clean up reinforcements.lua 2013-12-08 21:39:37 +13:00
Paul Chote
e76dbcd4bf Silently ignore bogus prerequisites instead of crashing. Fixes #4225. 2013-12-08 21:34:49 +13:00
Matthias Mailänder
9923d162c5 we don't ship non-managed code anymore 2013-12-08 09:33:49 +01:00
Matthias Mailänder
660c0c74b2 add missing FreeType 2 dependency to RPM
http://pkgs.org/download/freetype2
2013-12-08 09:33:49 +01:00
Matthias Mailänder
10736a7a6c make install SDL2 2013-12-08 09:33:49 +01:00
Matthias Mailänder
404dd70e9e only tab-indent hierarchy
don't align because this differs per editor configuration
2013-12-08 09:33:49 +01:00
Matthias Mailänder
8c2670916c credit all thirdparty libraries 2013-12-08 09:33:46 +01:00
Matthias Mailänder
2ba6b481ee Merge pull request #4261 from pchote/rank-fix
Veterency fixes
2013-12-08 00:27:04 -08:00
Matthias Mailänder
3fa5aef8d4 Merge pull request #4260 from pchote/editor-fix
Fix editor parsing templates.
2013-12-08 00:15:48 -08:00
Paul Chote
708c549d27 Improve rank chevron positioning. Closes #4196. 2013-12-08 21:12:25 +13:00
Paul Chote
943156aed3 Fix initial experience granting. 2013-12-08 21:11:43 +13:00
Matthias Mailänder
269b7e25c1 Merge pull request #4257 from pchote/map-format
Fix map format incompatibilities
2013-12-08 00:11:08 -08:00
Paul Chote
a13de137e7 Fix editor parsing templates. Fixes #4247. 2013-12-08 17:51:18 +13:00
Paul Chote
2e785df6c7 Update CHANGELOG. 2013-12-08 11:33:11 +13:00
Paul Chote
cd2a1cb30f Upgrade shipped maps to format 6. 2013-12-08 11:33:04 +13:00
Paul Chote
8f737719fd Rename utility --minimap to --map-preview. 2013-12-08 11:26:07 +13:00
Paul Chote
250a7cb349 Move map upgrading to OpenRA.Utility. 2013-12-08 11:25:54 +13:00
Paul Chote
73f4f880cc Fix map Options serialisation. Fixes #4107. 2013-12-08 11:18:58 +13:00
Paul Chote
510e812c02 Bump the map format 5 -> 6.
Version 6 ensures that maps define RequiresMod.
2013-12-08 11:18:58 +13:00
Paul Chote
f5f6f1e7aa Allow maps to be saved during initialisation. 2013-12-08 10:38:35 +13:00
Matthias Mailänder
127c9bb98c update CHANGELOG 2013-12-07 12:20:10 +01:00
Matthias Mailänder
b72ea8c227 added a new hotkey to cycle production buildings except conyards 2013-12-07 12:20:10 +01:00
Matthias Mailänder
316161a3e0 add audio feedback on mouse-wheel and hotkey build palette cycle 2013-12-07 12:20:07 +01:00
Matthias Mailänder
bcba26a04e don't hardcode SHIFT modifier for backwards tab cycle
closes #4144
2013-12-07 12:19:32 +01:00
Matthias Mailänder
28cf6d36f4 Merge pull request #4250 from ihptru/updatemaps
Update distributed maps with RequiresMod where it's missing
2013-12-07 01:19:06 -08:00
Matthias Mailänder
b06784dfdd Merge pull request #4252 from ScottNZ/lua
Delete LuaInterface code
2013-12-07 01:15:41 -08:00
ScottNZ
dfba973690 Delete LuaInterface code 2013-12-07 18:55:34 +13:00
Igor Popov
f5d5a3ca8e Update distributed maps with RequiresMod where it's missing 2013-12-07 03:50:41 +04:00
Matthias Mailänder
c293474c79 Merge pull request #4249 from ihptru/requiresmod
fix #4236; Editor has to add RequiresMod to map.yaml
2013-12-06 13:57:36 -08:00
Igor Popov
1434d4ae8f fix 4236; Editor has to add RequiresMod to map.yaml 2013-12-07 01:37:48 +04:00
Paul Chote
af17cb2c0c Merge pull request #4234 from Mailaender/minimap-utility
Added a minimap renderer to OpenRA.Utility.exe
2013-12-06 11:52:19 -08:00
Paul Chote
f3243de08b Merge pull request #4244 from Mailaender/fps-settings
Made the FPS settings fool proof
2013-12-06 11:51:25 -08:00
Paul Chote
ec157f7811 Merge pull request #4245 from Mailaender/nod01-bridge
Enforce a non-destructible bridge in Nod01
2013-12-06 11:46:29 -08:00
Matthias Mailänder
4c5c0974ad don't attack neutral world owner plus invulnerable bridge
closes #4230
2013-12-06 15:10:07 +01:00
Matthias Mailänder
784284969e clamp the max framerate setting to useful borders
and update on the fly
2013-12-06 14:49:12 +01:00
Matthias Mailänder
173b99c76a don't crash if max framerate is 0
fixes #4221
2013-12-06 14:48:32 +01:00
Matthias Mailänder
afb83e3007 Merge pull request #4241 from pchote/spice
Polish D2K spice rendering.
2013-12-06 02:43:23 -08:00
Paul Chote
001dc88dc9 Merge pull request #4239 from ScottNZ/lua-new
Move to a managed Lua implementation
2013-12-06 02:37:04 -08:00
Paul Chote
b1eb083746 Merge pull request #4240 from Mailaender/select-all-hotkey
Added the Select All units on screen hotkey
2013-12-06 02:33:57 -08:00
Paul Chote
c3e4cb5069 Remove spice1.shp. 2013-12-06 23:28:26 +13:00
Matthias Mailänder
4b70448823 reorder hotkeys
the way they appear in the GUI and similiar ones together
2013-12-06 11:26:54 +01:00
Matthias Mailänder
08166c0a64 added a new hotkey to select all units on screen
closes #4182
2013-12-06 11:26:52 +01:00
Paul Chote
3ca220ef17 Merge pull request #4237 from Mailaender/map-lint
Allow map.yaml checks with OpenRA.Lint.exe
2013-12-06 02:12:55 -08:00
ScottNZ
1a4888b050 PerfSample Lua Tick execution 2013-12-06 23:11:33 +13:00
ScottNZ
5799cfdcf2 Split mission.lua into mission.lua, reinforcements.lua and supportpowers.lua. Fixes #4204 2013-12-06 23:11:32 +13:00
ScottNZ
df7487ec01 Add KopiLua/NLua words to AUTHORS 2013-12-06 23:11:32 +13:00
ScottNZ
0d0de71840 Add KopiLua/NLua to packaging scripts 2013-12-06 23:11:25 +13:00
Matthias Mailänder
e65cfe00c1 update CHANGELOG 2013-12-06 11:07:56 +01:00
Paul Chote
fc8063a223 Merge pull request #4231 from Mailaender/visceroid-habitat
Made visceroids feel at home in Tiberium
2013-12-06 02:04:34 -08:00
Matthias Mailänder
3e2690a1ad Update CHANGELOG 2013-12-06 11:00:39 +01:00
Paul Chote
f7eb6a29d5 Merge pull request #4228 from Mailaender/pak-folder-fix
Moved Pak.cs to the correct directory
2013-12-06 01:53:36 -08:00
Paul Chote
1b898d5b31 Merge pull request #4242 from ScottNZ/bleed
Update CHANGELOG for recent ra oil derrick change
2013-12-06 01:48:48 -08:00
ScottNZ
dcace8924e Update CHANGELOG for recent ra oil derrick change 2013-12-06 22:44:46 +13:00
Paul Chote
9eaf496d72 Update CHANGELOG. 2013-12-06 22:31:39 +13:00
Paul Chote
ca2749dcc0 Support soft edges on D2K spice tiles. Fixes #2247. 2013-12-06 22:27:51 +13:00
Paul Chote
410cd1c7b1 Reorganise ResourceLayer implementation. 2013-12-06 22:24:07 +13:00
ScottNZ
3315c43295 Remove old Lua/LuaInterface installation/packaging 2013-12-06 21:53:08 +13:00
ScottNZ
452a0c0e25 Add Lua reserved name checking and exception hooks 2013-12-06 21:53:07 +13:00
ScottNZ
c39bd53e2a Override Lua's print function with Internal.Debug 2013-12-06 21:53:07 +13:00
ScottNZ
aca618ceef Introduce LuaScriptContext function cache 2013-12-06 21:53:06 +13:00
ScottNZ
4ea217ef7b Provide an empty table to Internal.New if args is nil to keep NLua happy 2013-12-06 21:53:06 +13:00
ScottNZ
1cf1086122 Swap LuaInterface for NLua and KopiLua 2013-12-06 21:52:59 +13:00
Matthias Mailänder
16edd98300 self-document it 2013-12-05 21:01:27 +01:00
Matthias Mailänder
e05e17c22e optionally lint check a mod + map.yaml
closes #3850
2013-12-05 21:01:27 +01:00
Matthias Mailänder
60f6a07014 verbose RALint for make test 2013-12-05 21:01:23 +01:00
Matthias Mailänder
8d9282811b fixed System.IO.InvalidDataException`: Non-power-of-two array 2013-12-05 19:31:24 +01:00
Matthias Mailänder
52ecac7336 allow mod override
e.g. useful for legacy maps where RequiresMod: is not set
2013-12-05 19:27:40 +01:00
Matthias Mailänder
5a4fc712a9 added --minimap to OpenRA Utility
closes #4195
2013-12-05 17:41:03 +01:00
Matthias Mailänder
06b0ce621f mixed line endings → Unix line endings 2013-12-05 17:14:55 +01:00
Matthias Mailänder
2d17ec41b6 speed up visceroids on Tiberium
slow them down everywhere else
2013-12-05 13:10:04 +01:00
Matthias Mailänder
e6eb7a9768 heal visceroids on tiberium
closes #3302
2013-12-05 13:09:13 +01:00
Matthias Mailänder
989165d71c move Pak.cs to the correct directory
case-sensitive OS require it to compile using MonoDevelop
2013-12-05 09:43:22 +01:00
Matthias Mailänder
0b5b3b22b4 Merge pull request #4223 from ScottNZ/lua-missions
Add back the smudge that was missing in allies-02-classic
2013-12-03 14:07:34 -08:00
Matthias Mailänder
dafd68b392 Merge pull request #4222 from pchote/brimstone-polish
Start with a construction yard on the D2K Brimstone map.
2013-12-03 14:02:51 -08:00
ScottNZ
84b99687c9 Add back the smudge that was missing in allies-02-classic 2013-12-04 10:57:05 +13:00
Paul Chote
2fd2167665 Merge pull request #4191 from Mailaender/MD4.2-tabs
Fixed tabs instead of spaces for MonoDevelop >= 4.2
2013-12-03 13:53:30 -08:00
ScottNZ
983409037c Merge pull request #4212 from pchote/crater-fix
Fix an off-by-one error in SmudgeLayer.
2013-12-03 13:52:07 -08:00
Paul Chote
2016448471 Fix Brimstone starting configuration.
Starting with a walled MCV is terrible for polish.
This gives the player a construction yard instead.
2013-12-04 10:24:55 +13:00
Paul Chote
19ddb61d18 Don't show make animations for starting actors. 2013-12-04 10:24:55 +13:00
Matthias Mailänder
14df1ac6df Merge pull request #4214 from pchote/framelimiter-focus
Remove TextField focus when becoming disabled.
2013-12-03 12:02:18 -08:00
Paul Chote
701e9e2684 Remove TextField focus when becoming disabled. Fixes #4153. 2013-12-04 08:53:29 +13:00
Matthias Mailänder
3895d79e5c Merge pull request #4215 from pchote/mcv-fix
Obey order.Queued in DeployTransform.
2013-12-03 06:35:43 -08:00
Matthias Mailänder
93bec5e14b Merge pull request #4216 from pchote/cnc-shellmap
Rewrite C&C shellmap in lua
2013-12-03 06:33:06 -08:00
Matthias Mailänder
efdc14e1d5 Merge pull request #4218 from ScottNZ/balance
Increase ra oil derrick cash trickler period to 375. Closes #4217
2013-12-03 05:00:27 -08:00
ScottNZ
42961b9dd5 Increase ra oil derrick cash trickler period to 375 2013-12-04 00:26:56 +13:00
Paul Chote
568988b435 Rewrite C&C shellmap script in lua. 2013-12-03 23:45:59 +13:00
Paul Chote
79b52e4c66 Add ScriptedMove and Teleport functions to lua library. 2013-12-03 23:26:37 +13:00
Paul Chote
0948c353e5 Obey order.Queued in DeployTransform. Fixes #4211. 2013-12-03 18:52:47 +13:00
Paul Chote
473f8dfbb8 Fix an off-by-one error in SmudgeLayer. Fixes #4139. 2013-12-03 18:16:40 +13:00
Matthias Mailänder
599faba94e Merge pull request #4208 from pchote/sprite-fix
SpriteReader fixes
2013-12-02 12:33:05 -08:00
Paul Chote
29fcb3dc35 Fix dune 2 shp parsing. 2013-12-02 20:49:36 +13:00
Paul Chote
c2413b63f7 Remove duplicated Format2 implementation. 2013-12-02 20:44:39 +13:00
Paul Chote
4d12ea0941 Style clean Format80. 2013-12-02 20:43:29 +13:00
Paul Chote
b6cce50ccc Fix crash when loading 0x0 shps. Fixes #4192. 2013-12-02 20:43:29 +13:00
ScottNZ
863e368ff5 Merge pull request #4207 from chrisforbes/deferred-lua-dispose
defer disposal of lua context to main thread
2013-12-01 21:51:52 -08:00
Chris Forbes
870685995d defer disposal of lua context to main thread 2013-12-02 17:50:09 +13:00
Matthias Mailänder
3d47fd503d Merge pull request #4193 from pchote/pak
Add a Pak parser for Dune II archives.
2013-12-01 01:33:32 -08:00
Paul Chote
57c2e75a59 Add a Pak parser for Dune II archives. 2013-12-01 22:09:32 +13:00
Matthias Mailänder
7fac962c09 Merge pull request #4185 from pchote/frame-rework
Rewrite sprite handling.
2013-11-30 14:46:54 -08:00
Paul Chote
8cfd3756c4 Fix d2k asset browser on case sensitive filesystems. 2013-12-01 11:28:50 +13:00
Paul Chote
867d4cd096 Remove mod dll dependency on OpenRA.Utility. Fixes #3298. 2013-12-01 11:28:50 +13:00
Paul Chote
1e7f436448 Overhaul asset browser. 2013-12-01 11:28:50 +13:00
Paul Chote
30f150fc91 Fix mod chooser list 2013-12-01 10:12:56 +13:00
Paul Chote
e3e2758bfb Remove --userdir argument from Utility --extract. 2013-12-01 09:59:15 +13:00
Paul Chote
6881dcc710 Fix UI rendering of offset sprites. 2013-12-01 09:49:27 +13:00
Paul Chote
21f2e88d83 Update CHANGELOG. 2013-12-01 09:49:27 +13:00
Paul Chote
314f819940 Load terrain from any SpriteSource. 2013-12-01 09:49:25 +13:00
Paul Chote
bfd50b97e2 Clean up ShpTSReader code. 2013-12-01 09:48:45 +13:00
Paul Chote
3f2be59056 Clean up ShpReader code. 2013-12-01 09:48:44 +13:00
Paul Chote
ed163aea82 Fix D2 shp parsing and make it a proper frame source. 2013-12-01 09:48:44 +13:00
Paul Chote
246c5e4526 Update Utility --shp to match. 2013-12-01 09:48:44 +13:00
Paul Chote
e636f99c48 Change Utility --png to accept all ISpriteSources. 2013-12-01 09:48:44 +13:00
Paul Chote
e4fe2b49f4 Make terrain tiles ISpriteSources. 2013-12-01 09:48:42 +13:00
Paul Chote
f92ce8bf51 Define a consistent interface for sprite loading. Fixes #4176. 2013-12-01 09:47:49 +13:00
Paul Chote
20a6c75ba4 Rewrite ShpTSReader. Closes #3746. 2013-12-01 09:47:49 +13:00
Paul Chote
5b947090f4 Use the normal extension checking rules for .r8. 2013-12-01 09:47:49 +13:00
Paul Chote
f153516151 Introduce proper support for non-shp sprites in cursors and ShpImageWidget. 2013-12-01 09:47:48 +13:00
Paul Chote
01155a655a Allow empty sprites to be allocated. 2013-12-01 09:47:48 +13:00
Matthias Mailänder
152c5d2049 fix tabs instead of spaces for MonoDevelop >= 4.2 2013-11-30 17:52:13 +01:00
Matthias Mailänder
cebc77085f Merge pull request #4189 from pchote/health-lookups
Move HealthExts.IsDead and Kill to Actor.
2013-11-30 07:18:47 -08:00
Paul Chote
0fe839add0 Move HealthExts.IsDead and Kill to Actor. 2013-12-01 00:14:47 +13:00
Paul Chote
9acba84acc Merge pull request #4188 from Mailaender/lonestar-oilb
Fixed crash in Fort Lonestar on map load
2013-11-30 01:58:23 -08:00
Matthias Mailänder
68b9fbf796 don't crash Fort Lonestar on map load 2013-11-30 09:44:48 +01:00
Matthias Mailänder
4f0c35b848 Merge pull request #4184 from pchote/changelog-fix
Fix changelog entry.
2013-11-29 23:56:44 -08:00
Paul Chote
244f573197 Remove reference to server browser. 2013-11-30 11:51:26 +13:00
Matthias Mailänder
5577d38129 Merge pull request #4183 from pchote/label-crash-fix
Fix C&C tooltip crash (regression from #4156).
2013-11-29 14:21:11 -08:00
Paul Chote
925d53484f Merge pull request #4179 from ScottNZ/lua
Lua stuffs
2013-11-29 14:17:17 -08:00
Paul Chote
afecaf6d54 Fix C&C tooltip crash (regression from #4156). 2013-11-30 10:53:11 +13:00
ScottNZ
aa5ea1a3ce Fix bots not deploying their mcv as a result of the DeployTransform change 2013-11-30 09:59:22 +13:00
ScottNZ
e640122d3f Update CHANGELOG 2013-11-29 23:49:49 +13:00
ScottNZ
0ca8f41114 Add two Lua-powered single player missions 2013-11-29 23:49:41 +13:00
ScottNZ
1c09d4434b Fix Einstein's voice 2013-11-29 23:49:29 +13:00
ScottNZ
f7c39aaf3b Add some additional mission notifications to ra's notifications.yaml 2013-11-29 23:49:14 +13:00
ScottNZ
e4d477b0e0 Add Lua standard library and supporting C#/yaml 2013-11-29 23:48:44 +13:00
ScottNZ
6a14434cff Add a CenterPosition helper to Viewport 2013-11-29 23:01:50 +13:00
ScottNZ
e4e6169f7f Add a function to World for setting just the local pause state, and add a lock variable to prevent further pause state changes 2013-11-29 23:01:18 +13:00
ScottNZ
b69508fb6b Remove MustBeDestroyed from ^TechBuilding 2013-11-29 22:58:04 +13:00
ScottNZ
0527c883b9 Move DeployTransform logic into its own method, and remove its CancelActivity call so it works properly when queued 2013-11-29 22:56:24 +13:00
ScottNZ
9312a7e03a Add husk for V19 (oil pump) 2013-11-29 22:54:42 +13:00
Matthias Mailänder
6e4187cca1 Merge pull request #4177 from pchote/disable-stuff
Remove language selector and IRC chat from the visible game UI.
2013-11-29 01:19:14 -08:00
Paul Chote
c861d7a930 Add server filter checkboxes to C&C. 2013-11-28 22:17:08 +13:00
Paul Chote
76c332acca Disable IRC chat in the server browser. 2013-11-28 22:14:29 +13:00
Paul Chote
a99d7fee82 Disable language selector. 2013-11-28 22:05:14 +13:00
Paul Chote
54c81eb2c7 Merge pull request #4156 from reaperrr/widgets04
Improved Widget text customizability rev.2
2013-11-27 00:47:00 -08:00
Matthias Mailänder
58bf488ad0 Merge pull request #4054 from cjshmyr/healthbars
Added 2 new settings for unit health bars (fixes #3867)
2013-11-24 13:08:50 -08:00
Curtis Shmyr
d30f60809b Added 2 settings for unit health bars: always show unit health, and team health bar colors 2013-11-24 12:12:52 -07:00
reaperrr
1f789b4296 var instead of SpriteFont on TimerWidget. 2013-11-22 13:49:18 +01:00
reaperrr
f743cedb10 Adds improved UI customizability to changelog. 2013-11-22 13:36:55 +01:00
reaperrr
09606e8ffd Moved duplicate float2 before if as suggested. 2013-11-22 13:36:22 +01:00
reaperrr
4c92280b7e Moved duplicated int2 in ButtonWidget before if as suggested. 2013-11-22 13:34:46 +01:00
Paul Chote
90fa7743c3 Merge pull request #4166 from Mailaender/minor-fixes
Minor fixes to yet unused artwork
2013-11-22 01:40:33 -08:00
Paul Chote
bad95a3652 Merge pull request #4159 from reaperrr/camobox-cloaksound-fix
Disables cloak sound on camouflaged pillbox.
2013-11-22 00:07:35 -08:00
Paul Chote
3e74e224c3 Merge pull request #4149 from Mailaender/speedup-array-bounds
Fixed crash when the last production building was killed while the mouse was still hovering over the build palette
2013-11-21 23:57:23 -08:00
Paul Chote
7777a3673e Merge pull request #4148 from Mailaender/rank-hardening
Hardened the new Rank effect against crashes
2013-11-21 23:53:21 -08:00
Matthias Mailänder
2c889af346 fixed neutral tech center remap in make animation 2013-11-21 22:00:20 +01:00
reaperrr
703145fc14 Changelog entry for removed cloak sounds on camo pillbox. 2013-11-21 21:54:19 +01:00
Matthias Mailänder
07c9c70426 use the TS move flash instead of the RA one 2013-11-21 21:38:53 +01:00
Chris Forbes
593a1ff0d6 Merge pull request #4151 from Mailaender/assetbrowser-renovation
Asset Browser Renovation
2013-11-21 12:15:40 -08:00
reaperrr
60e861e6e4 Sets cloak and uncloak sound defaults to null. 2013-11-21 16:33:56 +01:00
Matthias Mailänder
f5f6545ba0 Merge pull request #4160 from reaperrr/desert-church-fix
Makes desert church garrisonable by Sniper.
2013-11-20 13:53:45 -08:00
reaperrr
4664e3ed2b Makes desert church garrisonable by Sniper. Closes #4152. 2013-11-20 16:27:25 +01:00
reaperrr
45afbcb38e Disables cloak sound on camouflaged pillbox. Closes #4154. 2013-11-20 16:18:02 +01:00
Paul Chote
9883658d0f Merge pull request #4140 from ScottNZ/lua-wip
Add map scripting support
2013-11-19 16:25:07 -08:00
reaperrr
701c5b6aac Disables ButtonWidget contrast default (accidental left-over from testing). 2013-11-19 15:53:13 +01:00
reaperrr
f9c2e90c6b Moves TextFieldWidget defaults to metrics.yaml. 2013-11-19 01:42:16 +01:00
reaperrr
e73b3705c6 Moves defaults for HotkeyEntryWidget to global settings in metrics.yaml. 2013-11-19 01:41:32 +01:00
reaperrr
394a2b5166 Makes ButtonWidget and Widgets based on it more customizable, sets defaults in metrics.yaml. 2013-11-19 01:39:57 +01:00
reaperrr
915bf2cff0 Makes TimerWidget LabelWidget-based for better customizability. Sets defaults for LabelWidget in metrics.yaml. 2013-11-19 01:37:01 +01:00
ScottNZ
6327a88b68 Update CHANGELOG for Lua support and 'make install' changes 2013-11-18 20:59:25 +13:00
Matthias Mailänder
94d1936286 fix shortcut on Linux 2013-11-18 20:56:04 +13:00
Matthias Mailänder
fcd8997c25 break RPM auto dependency generation completely apart
so it installs this noarch
which is in fact x86_64 (because of the build server)
even on i586
2013-11-18 20:56:04 +13:00
Matthias Mailänder
5f92b69211 don't terminate the RPM build because we ship .so in noarch
TODO: this is horrible!
2013-11-18 20:56:03 +13:00
Matthias Mailänder
c257b3e74b fix duplicate / 2013-11-18 20:56:03 +13:00
Matthias Mailänder
2062a1bf9b install openra to /usr/lib now that we ship native libraries 2013-11-18 20:56:02 +13:00
Matthias Mailänder
1d60b86b9b fix indentions 2013-11-18 20:56:02 +13:00
Matthias Mailänder
a0d0bc9830 clean up exe laying around elsewhere 2013-11-18 20:56:02 +13:00
Matthias Mailänder
17a024202b we now have .so and .dylib 2013-11-18 20:56:01 +13:00
Matthias Mailänder
6498e0ec7a moved KDE stuff into local git ignore 2013-11-18 20:56:01 +13:00
Matthias Mailänder
3e5255d619 remove old and misleading note 2013-11-18 20:56:00 +13:00
Matthias Mailänder
acd7efd957 install the Lua libraries on Mac OS and Linux 2013-11-18 20:56:00 +13:00
ScottNZ
d01ee2a75e Update build, package and installer scripts for LuaInterface 2013-11-18 20:56:00 +13:00
ScottNZ
e730580030 Add LuaInterface dependencies 2013-11-18 20:55:59 +13:00
ScottNZ
cd0b3d8862 Add map scripting support 2013-11-18 20:55:59 +13:00
ScottNZ
b2f46a56ea Add FindType method to ObjectCreator 2013-11-18 20:55:58 +13:00
ScottNZ
0a50371a37 Add LuaInterface project 2013-11-18 20:55:58 +13:00
ScottNZ
55423b159a Move RASpecialPowers into OpenRA.Mods.RA.Scripting 2013-11-18 20:55:57 +13:00
Matthias Mailänder
d9148edc8d updated CHANGELOG 2013-11-17 23:37:31 +01:00
Matthias Mailänder
da235d7aee .IsDead() includes the .Destroyed check 2013-11-17 23:32:32 +01:00
Matthias Mailänder
8a13cd6c6a additional checks to avoid giving dead actors a rank sign
closes #4134
2013-11-17 23:28:02 +01:00
Matthias Mailänder
dd848ddd11 PaulCop clean 2013-11-17 22:43:59 +01:00
Matthias Mailänder
9e50f577a0 fixed index outside bounds of the array when 0 productions left
closes #4137
2013-11-17 22:16:31 +01:00
Matthias Mailänder
e981275cb1 added a palette chooser and colorpicker dropdown to the browser 2013-11-17 21:27:47 +01:00
Matthias Mailänder
d9ac907315 abbreviate the user support folder as in mod.yaml 2013-11-17 17:22:20 +01:00
Matthias Mailänder
6171ea7cf3 harden asset browser against invalid user input and allow R8
closes #3980
2013-11-17 17:19:47 +01:00
Matthias Mailänder
f6bd53c15e StyleCop 2013-11-17 16:09:23 +01:00
Matthias Mailänder
d973ed307f don't crash the asset browser when loading sprites with 1 frame
closes #4125
2013-11-17 16:07:32 +01:00
Matthias Mailänder
5d3987dee3 Update CHANGELOG
side effect from #3676
2013-11-17 08:37:23 +01:00
Matthias Mailänder
a8a5a88e8f Merge pull request #4138 from pchote/remove-mod-merging
Remove runtime mod merging
2013-11-16 11:04:44 -08:00
Paul Chote
8026b6ded6 Merge pull request #4141 from Mailaender/proximity
Removed Proxmity trait everywhere
2013-11-15 22:48:56 -08:00
Matthias Mailänder
b875e9f0a2 remove bit-rotted Proxmity trait 2013-11-15 14:32:18 +01:00
Paul Chote
d6f1debe22 Stylecop clean Manifest. 2013-11-15 09:54:42 +13:00
Paul Chote
a08dbdba05 Stylecop clean Mod. 2013-11-15 09:54:42 +13:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
Chris Forbes
4d893cb1f2 Merge pull request #4129 from ScottNZ/refactor
Refactor
2013-11-12 00:06:01 -08:00
Chris Forbes
e8f961b13c Merge pull request #4130 from ScottNZ/lua-wip
Rewrite our Equals implementations
2013-11-12 00:05:51 -08:00
ScottNZ
3f117d751b Fix HackyAI confusing an empty sequence for null 2013-11-12 20:27:36 +13:00
ScottNZ
74e2baeb48 Fix a few spelling errors 2013-11-12 19:39:41 +13:00
ScottNZ
49b1e69f44 Fix a stack overflow 2013-11-12 19:39:40 +13:00
ScottNZ
dfd19187fe Fix closure removal in Download.cs 2013-11-12 19:39:40 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
8197f29606 Rename type parameter "ValueType" to "T" in HackyAI.cs 2013-11-12 19:39:39 +13:00
ScottNZ
f1f1a2b166 Add missing license notice to ResourceClaim.cs 2013-11-12 19:39:38 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
ScottNZ
86a3e14f2d Remove constructor base() redundancies 2013-11-12 17:31:55 +13:00
ScottNZ
7c5f3cc0f1 Replace some Where-FirstOrDefault chains with a single call to FirstOrDefault 2013-11-12 17:21:31 +13:00
ScottNZ
c373bc22e8 Rewrite our Equals implementations so they don't crash when comparing incompatible objects 2013-11-12 17:12:56 +13:00
Chris Forbes
9643609c31 Merge pull request #4128 from pchote/deb-fix
Fix debian package and packaging.
2013-11-11 13:19:33 -08:00
Matthias Mailänder
b659d83239 Fix debian package and packaging. 2013-11-12 10:15:37 +13:00
Paul Chote
eb46b5a131 Merge pull request #4126 from ScottNZ/flashtarget-crash
Fix FlashTarget crash
2013-11-11 03:20:16 -08:00
ScottNZ
fb4e1b4805 Fix FlashTarget crash 2013-11-11 23:49:00 +13:00
Paul Chote
1959326c4d Merge pull request #4117 from Mailaender/nsis-mods-hotfix
Install mods to OpenRA\mods sub-folder using NSIS!
2013-11-11 02:20:47 -08:00
Matthias Mailänder
43a878887c hotfix broken mods folder 2013-11-10 12:27:53 +01:00
Matthias Mailänder
963b3804ca Merge pull request #4116 from pchote/lobby-fix
Fix the auto-team options.
2013-11-10 01:39:59 -08:00
Paul Chote
a2f16ea781 Fix the auto-team options. 2013-11-10 22:34:09 +13:00
Paul Chote
326079f1e1 Merge pull request #4109 from Mailaender/spectator-team-suffix
Added Player (Spectator) or Player (Team 1) has disconnected message
2013-11-10 01:20:49 -08:00
Paul Chote
b11373dbe8 Merge pull request #4115 from Mailaender/framerate-cap-default
Cap the frame rate by default
2013-11-10 01:16:59 -08:00
Matthias Mailänder
0acec989bf cap the frame rate by default 2013-11-10 10:05:23 +01:00
Paul Chote
c9d26b6333 Merge pull request #4114 from ScottNZ/madtank
Fix MAD Tank damage model
2013-11-10 00:52:45 -08:00
ScottNZ
1aebf27abd Create a new damage model for the MAD Tank. Fixes #4105 2013-11-10 21:38:48 +13:00
Matthias Mailänder
bc133d199e StyleCop cleanup 2013-11-10 07:34:52 +01:00
Matthias Mailänder
7de2dd7083 add suffix to the player has disconnected message in-game
closes #3864
2013-11-10 07:31:26 +01:00
Paul Chote
4f91c22fed Merge pull request #4038 from Mailaender/fallbacks
Fallback to no sound and OpenGL renderer
2013-11-09 14:06:18 -08:00
Paul Chote
c6a52e0d37 Merge pull request #4103 from Mailaender/capture-voice-cleanup
BuildingCapture cleanup
2013-11-09 13:58:33 -08:00
Paul Chote
28cdf0537a Merge pull request #4108 from Mailaender/unknown-hosts
Allow the display of unknown IP addresses
2013-11-09 13:48:31 -08:00
Paul Chote
dc198f6616 Merge pull request #4111 from Mailaender/intelligent-teamchat
Intelligent Team Chat Switch
2013-11-09 13:40:02 -08:00
Paul Chote
12b9334500 Merge pull request #4110 from Mailaender/spectator-bot-spawns
Fixed spectating hosts being unable to select AI spawn points
2013-11-09 13:35:20 -08:00
Matthias Mailänder
445b0518ef disable team-chat when there are no allies listening
closes #4033
2013-11-09 22:34:12 +01:00
Paul Chote
408d7a67a0 Merge pull request #4106 from Mailaender/build-hotkey-fix
Fixed broken build palette hotkeys
2013-11-09 13:30:59 -08:00
Paul Chote
cb84fe3cde Merge pull request #4102 from Mailaender/only-stable-mods
Only ship stable mods
2013-11-09 13:24:27 -08:00
Paul Chote
fd1b151bd5 Merge pull request #4101 from Mailaender/regular-dropdowns
Use regular font for lobby dropdowns
2013-11-09 13:24:02 -08:00
Matthias Mailänder
c50df9798d Update README.md
comma
2013-11-09 20:43:41 +01:00
Matthias Mailänder
668d053aa2 Merge pull request #4104 from ScottNZ/camerashakes
Shake improvements
2013-11-09 09:51:21 -08:00
Matthias Mailänder
c8f7d9e714 allow spectators to still select bot spawn points
closes #2137
2013-11-09 18:02:29 +01:00
Matthias Mailänder
21a607a43e StyleCop cleanup 2013-11-09 17:23:33 +01:00
Matthias Mailänder
ce5331e462 display unknown ip addresses
closes #3833
2013-11-09 17:05:11 +01:00
Matthias Mailänder
3c3d43a827 resolve conflicting hotkeys for grenadier and sniper 2013-11-09 12:18:21 +01:00
Matthias Mailänder
a6f06a5dfd fixed broken build palette hotkeys
support modifiers for build palette hotkeys
2013-11-09 12:18:07 +01:00
Matthias Mailänder
6c11ae36c7 Merge pull request #4098 from pchote/changelog
Update changelog. Fixes #4085.
2013-11-09 02:35:30 -08:00
Matthias Mailänder
0f17b03d7e try all available renderers from a prioritized list 2013-11-09 11:06:16 +01:00
Matthias Mailänder
5d35dc0cc0 reflect that renderers are input + rendering in console output 2013-11-09 11:06:16 +01:00
Matthias Mailänder
eed38b3da4 fallback to defaults when something goes wrong 2013-11-09 11:06:16 +01:00
ScottNZ
1a5df86329 Apply a simple constraint to ScreenShaker's multiplier to stop it shaking the game too much 2013-11-09 22:53:32 +13:00
ScottNZ
9f65bc7d6b Tone down our barrel explosions to be on par with the original game 2013-11-09 22:33:56 +13:00
Matthias Mailänder
fb6bb63b29 removed BuildingCapture redundancy 2013-11-09 10:32:36 +01:00
Matthias Mailänder
bfcef9df45 Merge pull request #4097 from pchote/rotor-fix
Support custom helicopter rotors. Fixes #4072.
2013-11-09 01:08:25 -08:00
Matthias Mailänder
3392e9d437 Merge pull request #4096 from pchote/selection-priority
Use selection priority in double-click selection logic. Fixes #4053.
2013-11-09 01:06:16 -08:00
Matthias Mailänder
3886d2cf68 Merge pull request #4095 from pchote/bogus-replay-fix
SyncInfo is only valid during the initial lobby phase. Fixes #3973.
2013-11-09 00:55:26 -08:00
Matthias Mailänder
98afaa666c Merge pull request #4094 from pchote/slot-dropdown-polish
Remove "Humans vs Bots" auto-team if bots are disabled. Fixes #4074.
2013-11-09 00:49:56 -08:00
Matthias Mailänder
bb361db81a don't ship the ts mod yet 2013-11-09 09:18:05 +01:00
Paul Chote
33d4be40bc Remove bitrotted example mod. 2013-11-09 09:17:15 +01:00
Matthias Mailänder
73382c7dd9 Merge pull request #4093 from pchote/all-the-dlls
Load the main mod dlls for all mods. Fixes #4029.
2013-11-09 00:15:51 -08:00
Matthias Mailänder
3daddde72c Merge pull request #4092 from pchote/vice-fix
Fix viceroids and add contrails to C&C rockets.
2013-11-09 00:12:07 -08:00
Matthias Mailänder
d03889dec8 Merge pull request #4091 from pchote/crashception-fix
Fix a NRE in the exception handler.
2013-11-09 00:01:04 -08:00
Matthias Mailänder
a47a07c8f0 Merge pull request #4099 from ScottNZ/balance
Enable build speedup for ra
2013-11-08 23:59:27 -08:00
Matthias Mailänder
7f306b6188 bold → regular for lobby dropdowns 2013-11-09 08:53:45 +01:00
Matthias Mailänder
9e5a689c61 Merge pull request #4100 from pchote/checkbox-font
Use non-bold checkbox labels in C&C.
2013-11-08 23:45:41 -08:00
ScottNZ
07030f4b09 Enable build speedup for ra 2013-11-09 20:11:02 +13:00
Paul Chote
bfdb5e0631 Use non-bold checkbox labels in C&C. 2013-11-09 17:57:42 +13:00
Paul Chote
dce6e401d2 Update changelog. Fixes #4085. 2013-11-09 17:42:59 +13:00
Paul Chote
5cec1fe4fb Support custom helicopter rotors. Fixes #4072. 2013-11-09 17:14:25 +13:00
Paul Chote
a1f876b13c Use selection priority in double-click selection logic. Fixes #4053. 2013-11-09 16:39:30 +13:00
Paul Chote
142db86acd SyncInfo is only valid during the initial lobby phase. Fixes #3973.
Existing broken replays can be fixed manually by removing the SyncInfo order at the end of the file.
2013-11-09 16:30:32 +13:00
Paul Chote
727557f50c Remove "Humans vs Bots" auto-team if bots are disabled. Fixes #4074. 2013-11-09 16:14:58 +13:00
Paul Chote
9355ffb51d Load the main mod dlls for all mods. Fixes #4029. 2013-11-09 16:02:47 +13:00
Paul Chote
4e35c2051b Add contrails to C&C rocket weapons. 2013-11-09 15:58:30 +13:00
Paul Chote
5e5b8d6d49 Fix orca missile trails. 2013-11-09 15:49:33 +13:00
Paul Chote
5c8b0b9b35 Fix viceroid muzzle offsets and missing traits. 2013-11-09 15:48:09 +13:00
Paul Chote
6aee253c94 Fix a NRE in the exception handler. 2013-11-09 15:24:58 +13:00
Paul Chote
20f88387b6 Merge pull request #4089 from Mailaender/nsis-consolidation
Consolidated Windows installer options
2013-11-08 12:53:16 -08:00
Matthias Mailänder
3998ca68a7 Merge pull request #4090 from pchote/cnc-flame-muzzles
Use the original flame and chem muzzle flashes.
2013-11-07 07:08:36 -08:00
Matthias Mailänder
ca6deac2c3 recursivly copy the mods folder for NSIS 2013-11-07 10:03:52 +01:00
Paul Chote
db49fe8c22 Use the original flame and chem muzzle flashes. 2013-11-07 17:38:14 +13:00
Matthias Mailänder
6bf17f0644 merged mods and engine for the Windows installer
closes #4052
2013-11-06 22:41:21 +01:00
Matthias Mailänder
99affd46eb Merge pull request #4082 from pchote/keyboard-fix
Fix SDL2 keyboard input.
2013-11-06 11:46:16 -08:00
Matthias Mailänder
f8170c1a5f Merge pull request #4086 from pchote/percell-damage-fix
Fix PerCell damage calculation.
2013-11-06 11:35:20 -08:00
Paul Chote
74cbc39c22 Fix PerCell damage calculation. 2013-11-06 17:33:24 +13:00
Paul Chote
c77d360f2a Merge pull request #4081 from Mailaender/cnc-bits-tidy
Removed some duplicates in ./mods/cnc/bits
2013-11-05 12:32:33 -08:00
Matthias Mailänder
cc94ea14ff clean up the cnc bits 2013-11-05 08:01:20 +01:00
Paul Chote
0f972fc853 Remove forced upper case hotkey display.
The default SDL2 names have fixed capitalisation.
2013-11-05 18:01:35 +13:00
Paul Chote
db83db5b51 Map (most) SDL1 keys -> SDL2. 2013-11-05 18:01:35 +13:00
Paul Chote
78fe3fb702 Convert Keycode to match SDL2. Fixes #4055. 2013-11-05 18:01:35 +13:00
Paul Chote
4b8b7fb75f Simplify Hotkey parsing. 2013-11-05 18:01:35 +13:00
Paul Chote
38668c1d8d Merge pull request #4076 from Mailaender/rank-crash
Additional checks to avoid ranks on destroyed actors
2013-11-04 00:34:25 -08:00
Matthias Mailänder
22fec9faa7 don't add ranks for destroyed actors in the first place 2013-11-03 12:01:34 +01:00
Paul Chote
133b79e2c2 Merge pull request #4045 from Mailaender/pilot-nudge
Cleanup EjectOnDeath and nudge pilots
2013-11-02 15:42:29 -07:00
Paul Chote
2921473166 Merge pull request #3999 from Mailaender/moveflash
Brought back the MoveFlash
2013-11-02 15:35:29 -07:00
Matthias Mailänder
15c5761c8c update changelog 2013-11-02 23:25:42 +01:00
Matthias Mailänder
4012ca7d17 added trait documentation 2013-11-02 23:22:37 +01:00
Matthias Mailänder
ad25631d11 nudge the grounded pilots after ejections 2013-11-02 23:22:37 +01:00
Matthias Mailänder
17e15e1f3e don't ignore bools 2013-11-02 23:22:32 +01:00
Matthias Mailänder
6f8e78761c StyleCop cleanup 2013-11-02 23:18:23 +01:00
Matthias Mailänder
21b7d0eadb loop all orders only once 2013-11-02 23:18:19 +01:00
Paul Chote
a284cdb523 Merge pull request #4050 from Mailaender/usr-games-deb
Fixed broken start scripts for DEB packages
2013-11-02 15:11:48 -07:00
Matthias Mailänder
ff8a4a7f90 correct the bindir for Debian launcher scripts
fixes #4048
2013-11-02 22:45:05 +01:00
Paul Chote
6a206b5449 Merge pull request #4049 from Mailaender/make-docs-fix
Fixed make docs for downstream packagers
2013-11-02 14:21:33 -07:00
Matthias Mailänder
6b0238a6cc don't stack flashes and filter non unit actor related orders 2013-11-02 18:29:54 +01:00
Matthias Mailänder
e0e3f1155a avoid additional layers of abstraction 2013-11-02 18:12:46 +01:00
Matthias Mailänder
05eae2c890 only use Self for internal self references 2013-11-02 18:03:55 +01:00
Matthias Mailänder
be1ab707c5 separate TargetFlash from DrawLineToTarget 2013-11-02 18:03:55 +01:00
Matthias Mailänder
40d71812f2 removed unused Iron Curtain palette 2013-11-02 18:03:55 +01:00
Matthias Mailänder
73750f5a7c StyleCop cleanup 2013-11-02 18:03:55 +01:00
Matthias Mailänder
b1c3ac20bf brought back the MoveFlash
closes #2592
2013-11-02 18:03:49 +01:00
Matthias Mailänder
48b03577e9 one / too much in the end 2013-11-02 16:22:03 +01:00
Matthias Mailänder
ebd5a6a5dc don't mount the mod folders at all for make docs
fixes #3873
2013-11-02 16:16:19 +01:00
Matthias Mailänder
0e239f892d fixed undefined $OUTPUTDIR
updated build.open-ra.org
2013-11-02 14:00:43 +01:00
Paul Chote
3ba6db999d Merge pull request #4047 from Mailaender/no-apt-update
Let's see if we can live without sudo apt-get update
2013-11-02 05:37:45 -07:00
Matthias Mailänder
d7170cad89 try to remove the sudo apt-get update 2013-11-02 13:30:34 +01:00
Matthias Mailänder
55b848f071 Merge pull request #4046 from ScottNZ/bleed
Update CHANGELOG
2013-11-02 05:27:15 -07:00
Paul Chote
5f49e95b7d Merge pull request #3961 from Mailaender/travis-package
Test the packaging scripts with Travis
2013-11-02 05:23:47 -07:00
Matthias Mailänder
9226073eb0 don't mount packages for make docs 2013-11-02 13:17:31 +01:00
Matthias Mailänder
da27860d82 move source download from package-all.sh for Travis 2013-11-02 13:17:31 +01:00
Matthias Mailänder
3d3b2f8dc4 test run packaging/package-all.sh 2013-11-02 13:17:26 +01:00
ScottNZ
c62cce301a Update CHANGELOG 2013-11-03 01:03:17 +13:00
Matthias Mailänder
611a2da697 remove xbuild as it does not work properly 2013-11-02 11:58:58 +01:00
Matthias Mailänder
f00e4254fc Merge pull request #4005 from ScottNZ/madtank
Add MAD Tank
2013-11-02 03:13:06 -07:00
Paul Chote
f4e570a95c Merge pull request #4017 from Mailaender/ranks-zoffset
Fixed veterancy icons drawn below actor SHP
2013-11-02 02:53:56 -07:00
Matthias Mailänder
291910cec7 Merge pull request #4044 from pchote/osx-packaging
Replace the OSX binary launcher.
2013-11-02 02:51:47 -07:00
Paul Chote
9b6f145c8b Replace the OSX binary launcher with a simple script using the SDL2 renderer. 2013-11-02 22:44:05 +13:00
Matthias Mailänder
14b15b5ba1 Merge pull request #4042 from pchote/dog-fix
A simple fix for dogs vs barrels.
2013-11-02 00:58:24 -07:00
Matthias Mailänder
8545216cbd StyleCop clean 2013-11-02 08:53:31 +01:00
Matthias Mailänder
bb57caef8d separate Rank effect from GainsExperience
fixes #3957
2013-11-02 08:53:31 +01:00
ScottNZ
9eff54c217 Add MAD Tank and InvalidTargets field to WeaponInfo 2013-11-02 17:19:08 +13:00
ScottNZ
d74c54d9f7 Add shake multiplier value to ScreenShaker 2013-11-02 17:19:08 +13:00
ScottNZ
aec50426d5 Fix some broken logic in AI air targeting code 2013-11-02 17:19:07 +13:00
Paul Chote
e30d8cb817 Remove redundant CanAttackGround flag. 2013-11-02 12:49:26 +13:00
Paul Chote
da2e9682c5 Prevent dogs from attacking non-infantry. Fixes #4039. 2013-11-02 12:48:33 +13:00
Matthias Mailänder
fc808fe069 Merge pull request #4036 from pchote/aircraft-polish
C&C aircraft polish.
2013-11-01 14:17:23 -07:00
Paul Chote
2f5ff30184 Add strafing to C&C airstrike. 2013-11-02 10:08:26 +13:00
Paul Chote
8d07d14e4d Add contrails to C17 too. 2013-11-02 10:08:26 +13:00
Paul Chote
06fb8bf707 Change the C&C Airstrike to be more support than sniper.
Slight buff to total damage dealt, but no longer 1-shots buildings.
2013-11-02 10:08:18 +13:00
Paul Chote
911716fb18 Fix GravityBomb explosion position. 2013-11-01 17:47:30 +13:00
Paul Chote
47209f5848 CarpetBomb -> AttackBomber. 2013-11-01 17:47:30 +13:00
Paul Chote
d7effe71da Add squad and quantisation support to AirstrikePower. 2013-11-01 17:45:21 +13:00
Paul Chote
f1f032dbb8 Don't crash if trying to check targets outside the map. 2013-11-01 17:45:21 +13:00
Matthias Mailänder
c62788a9a6 Merge pull request #4031 from pchote/sdl2
Add a SDL2-GL renderer.
2013-10-31 11:48:50 -07:00
Matthias Mailänder
cf1f7e0d1e Merge pull request #4037 from Phrohdoh/EngineerFalseAttackWarning
Fixes #3963
2013-10-31 10:58:34 -07:00
Taryn Hill
dd17a99ab5 Checks to make sure Attacker is not null.
Ignores self-attacking.
Ignores friendly-fire that does <= 0 damage (repairs).
2013-10-31 11:56:01 -04:00
Paul Chote
4754a8019a Support CenterPositionInit for Aircraft. 2013-10-31 21:30:13 +13:00
Paul Chote
212f07f890 Add a helper for finding the map edge in a given direction. 2013-10-31 21:29:50 +13:00
Matthias Mailänder
094d5929b1 Merge pull request #4023 from pchote/map-fixes
Map changes
2013-10-30 15:45:37 -07:00
Matthias Mailänder
9146efa0ed compressed regular maps without custom rules to oramap 2013-10-31 08:46:30 +13:00
Paul Chote
1870e31662 Double clicking a map in the chooser now selects it. 2013-10-31 08:46:16 +13:00
Paul Chote
773c0a0356 Fix player spawns in Deterring Democracy. 2013-10-31 08:46:16 +13:00
Paul Chote
dea5bf852f Add Haos Ridges C&C map.
Includes minor tweaks to the description and Options.
2013-10-31 08:46:15 +13:00
Paul Chote
b1a60eface Add SDL2 renderer based on SDL2# wrapper. Closes #3315.
SDL2# binary was built from commit 70af91f84493a924a3c1da46ae6209bb5f7222e3.
2013-10-30 22:52:18 +13:00
Paul Chote
71c6124c10 Tidy renderer dependencies. 2013-10-30 22:31:34 +13:00
Paul Chote
d1c9c6d76d Split text input into its own event. 2013-10-30 20:08:02 +13:00
Paul Chote
ae8475620d Tidy IInputHandler. 2013-10-30 20:07:04 +13:00
Paul Chote
5722d2226a Merge pull request #4021 from cjshmyr/capturing
Renamed Capture traits to ExternalCapture & LegacyCapture traits to Capture
2013-10-27 23:10:42 -07:00
Paul Chote
d9b6106da5 Merge pull request #4022 from cjshmyr/infantrytab
Move Zombie up in the RA infantry tab build palette order
2013-10-27 23:06:02 -07:00
Paul Chote
7deb34e625 Merge pull request #3917 from Mailaender/map-folders
Removed hard-coded map folders
2013-10-27 23:03:14 -07:00
Curtis Shmyr
888bab8753 Move Zombie up in the infantry tab build palette order 2013-10-27 18:02:20 -06:00
Curtis Shmyr
2229bbf985 Rename LegacyCapture related traits to Capture 2013-10-27 17:25:44 -06:00
Curtis Shmyr
c1e5be380e Rename Capture related traits to ExternalCapture 2013-10-27 17:25:44 -06:00
Matthias Mailänder
b86ddbf66b Merge pull request #4019 from cjshmyr/tilesetfix
Fixes #3865
2013-10-27 12:32:39 -07:00
Curtis Shmyr
0eaf1bb289 Use proper tile ID for RA anthills 2013-10-27 13:20:50 -06:00
Matthias Mailänder
74692bde66 load maps only from MapFolders defined separately in mod.yaml 2013-10-27 09:22:10 +01:00
Matthias Mailänder
b5186c00b7 Merge pull request #4015 from pchote/weapon-polish
C&C weapon polish
2013-10-27 01:08:29 -07:00
Paul Chote
e4bc965776 Add grenade toss sound (from C&C demo). 2013-10-27 20:38:40 +13:00
Paul Chote
686ea378dd Remove building explosion sound from MLRS. 2013-10-27 20:38:40 +13:00
Paul Chote
c66a0d2cca Split MLRS damage across 8 rockets for nicer visuals. 2013-10-27 20:38:40 +13:00
Matthias Mailänder
c87c4cfda2 translate ^ and ~ as FileSystem.Mount does 2013-10-27 08:02:05 +01:00
Matthias Mailänder
166b727c0b StyleCop cleanup 2013-10-27 08:02:05 +01:00
Matthias Mailänder
0b73491e3f CamelCase for FileSystem folder 2013-10-27 08:02:05 +01:00
Matthias Mailänder
32851e624c specify map folders in mod.yaml
closes #3544
2013-10-27 08:02:05 +01:00
Matthias Mailänder
ee9b64595a Merge pull request #4014 from pchote/engineer-buildings
Allow engineers to repair buildings (C&C)
2013-10-26 23:52:18 -07:00
Paul Chote
2241fa851b Allow engineers to repair structures. 2013-10-27 18:11:04 +13:00
Paul Chote
e57cc2b250 Fix biolab ownership in East vs West 3.
Change Creeps -> Neutral to prevent units from attacking it by default.
2013-10-27 18:10:54 +13:00
Paul Chote
d478ae462a Merge pull request #4009 from Mailaender/deb-rm-fail
cleaned up the DEB packaging script
2013-10-26 13:43:38 -07:00
Paul Chote
6eef03227f Merge pull request #4011 from Mailaender/uibits
Additional polishing for UI buttons
2013-10-26 13:42:01 -07:00
Matthias Mailänder
3f708aea3f replaced the yellow highlighted placeholder everywhere 2013-10-26 12:07:09 +02:00
Matthias Mailänder
a71f861638 darker wine red for the highlighted button 2013-10-26 12:07:09 +02:00
Matthias Mailänder
83dffd2720 disabled art for textfields 2013-10-26 12:06:59 +02:00
Matthias Mailänder
afc5db6843 Merge pull request #4008 from pchote/r8-fix
Improved R8 support.
2013-10-26 01:19:43 -07:00
Matthias Mailänder
4132c6f9a9 Merge pull request #4006 from pchote/alternate-stand-animations
Alternate stand animations
2013-10-26 00:54:13 -07:00
Matthias Mailänder
dfb4b1c54c removed pointless sed for .desktop for DEB
we don't hard-code the path to the binaries anymore
2013-10-26 09:20:11 +02:00
Paul Chote
536013f2d2 Rescale the custom palette from 0-128. 2013-10-26 19:15:05 +13:00
Paul Chote
ff21ec1605 Add PaletteFromR8 for loading embedded palettes.
The frames that define a custom palette are:
Frame range ->  offset (mem offset)
         38 ->   12007 (22063136)
        178 ->  159947 (21859680)
3494 - 3501 -> 2437846 (23366680)
3502 - 3509 -> 2443858 (23422744)
3510 - 3511 -> 2459105 (23363608)
3621 - 3625 -> 2572352 (23550488)
3739 - 3742 -> 2676956 (23534796)
2013-10-26 17:54:56 +13:00
Paul Chote
3fe3b4d088 Fieldloader support for longs. 2013-10-26 17:54:56 +13:00
Paul Chote
84ffb0de05 Add Subtractive blend mode for d2k move-flash. 2013-10-26 17:54:56 +13:00
Paul Chote
5cd29f999d Palette header comes *after* the frame. Fixes #3728. 2013-10-26 17:54:56 +13:00
Paul Chote
5af03db4e1 Merge pull request #4007 from pchote/fixes
Fix playtest breakages.
2013-10-25 16:46:12 -07:00
Paul Chote
cc3ca217af Fix RPM build. 2013-10-26 12:23:53 +13:00
Paul Chote
f2a0614622 Fix chat for defeated players. 2013-10-26 12:20:50 +13:00
Paul Chote
11b131e70b Hook up RA infantry. 2013-10-26 11:05:08 +13:00
Paul Chote
7f0922b034 Hook up C&C infantry. 2013-10-26 11:05:07 +13:00
Paul Chote
ae86e20bc7 Add support for multiple stand animations. 2013-10-26 11:05:07 +13:00
Paul Chote
d0c5ab0ca3 Clean up style nits in RenderInfantry. 2013-10-26 11:05:07 +13:00
Matthias Mailänder
67bca1fe8c Merge pull request #4004 from pchote/osx-ten-point-fail
Fix OSX 10.9 startup crash.
2013-10-25 13:58:11 -07:00
Paul Chote
23eb28f24a Change the .config instead of relying on DYLD_LIBRARY_PATH to find SDL. Fixes #3992. 2013-10-26 09:48:10 +13:00
Paul Chote
5cb96a053a Update packaged SDL to 1.2.15. 2013-10-26 09:31:57 +13:00
Paul Chote
2cd7554214 Merge pull request #4002 from Mailaender/buttons
Cleaned up RA button colors
2013-10-25 13:07:27 -07:00
Matthias Mailänder
34cc78924f more subtle highlighted button 2013-10-25 18:48:52 +02:00
Sébastien Kerguen
46364acaf5 RA dialog.png file updated (-disabled more grey)
RA dialog.png file updated (-disabled is now more grey)
2013-10-25 18:43:26 +02:00
Matthias Mailänder
0c63c4067b Merge pull request #3991 from pchote/new-settings-menu
closes #2243
2013-10-25 09:39:54 -07:00
Paul Chote
131583a1e9 Remove legacy settings panel. 2013-10-25 08:31:34 +13:00
Paul Chote
b278880ef6 Rewrite C&C Settings panel. 2013-10-25 08:31:34 +13:00
Paul Chote
64a229d339 Polish SliderWidget:
- Keep thumb within the EventBounds.
- Fix tick rendering.
2013-10-25 08:31:34 +13:00
Paul Chote
94554d7678 Support nested scissor rectangles. 2013-10-25 08:31:34 +13:00
Paul Chote
b31daf23ca Blink the KeyboardEntryWidget on focus. 2013-10-25 08:31:34 +13:00
Paul Chote
359d71b5db Merge pull request #3994 from Mailaender/svg-icon
Added an SVG desktop icon for Linux
2013-10-24 12:30:56 -07:00
Matthias Mailänder
69ce9bf8fa this is not ra and cnc only anymore 2013-10-24 20:11:57 +02:00
Matthias Mailänder
e09163ff36 added a scalable desktop icon (from the website) 2013-10-24 20:11:57 +02:00
Matthias Mailänder
e912aa63ed Merge pull request #3983 from pchote/polish-chat-input
Polish chat input.
2013-10-24 10:25:23 -07:00
Paul Chote
11b34884cc Use the newly polished text entry in C&C. 2013-10-24 20:02:17 +13:00
Paul Chote
15de893cec Clean up chat input.
- Team chat by default; use tab key or button to change.
- Removed "Use RETURN key..." prompt.
- Remove jarring transition between display and entry modes.
- Scroll to bottom on opening entry mode.
- Disable any/team toggle for spectators.
- Minor spacing/padding tweaks.
- Code cleanup.
2013-10-24 20:02:17 +13:00
Matthias Mailänder
a7e03020e5 Update mod.yaml
removed invalid tab
2013-10-23 19:56:13 +02:00
Matthias Mailänder
aba12a9a88 Merge pull request #3989 from pchote/cash-ticks
Improve cash ticks.
2013-10-23 08:35:59 -07:00
Matthias Mailänder
88b6c4b2de Merge pull request #3990 from pchote/cnc-menu-improvements
C&C main menu polish.
2013-10-23 08:24:04 -07:00
Paul Chote
08b2d59821 Re-enable cash ticks in C&C. 2013-10-23 19:37:09 +13:00
Paul Chote
4814c0541e Replace cash tick options with a simple on/off. 2013-10-23 19:37:09 +13:00
Paul Chote
bc174f1e82 C&C main menu improvements:
- Disable target reticle when a window is open.
- Show the faction logos when the shellmap is disabled.
2013-10-23 19:22:25 +13:00
Paul Chote
cd84ac92b4 Fix misnamed install image. 2013-10-23 19:22:24 +13:00
Matthias Mailänder
878e03adb9 Update README.md
minor changes
2013-10-22 21:59:40 +02:00
Matthias Mailänder
688ba8a6ac Merge pull request #3984 from pchote/desync-fix
Remove desync from WPos.LerpQuadratic.
2013-10-22 09:44:25 -07:00
Paul Chote
76c8c8806e Remove desyncing fp from WPos.LerpQuadratic. Fixes #3966. 2013-10-22 22:22:09 +13:00
Paul Chote
cfb6e149b3 Support bottom-aligned scroll panels. 2013-10-22 21:51:23 +13:00
Matthias Mailänder
c5c518dbce Merge pull request #3969 from pchote/hotkeys
Improved hotkey support
2013-10-21 13:53:43 -07:00
Paul Chote
7ffbfb9b7e Add a Hotkey class for user-configurable keys. Fixes #3779.
Users can now define and use hotkeys that include modifiers (ctrl/meta/shift/alt).
2013-10-22 09:14:05 +13:00
Matthias Mailänder
5803661d83 Merge pull request #3974 from pchote/frozen-actor-fix
Fix bogus screen-map queries.
2013-10-21 11:43:41 -07:00
Matthias Mailänder
b3cceb792d Merge pull request #3975 from pchote/contrail-fix
Extract contrail fading for dead projectiles into an IEffect.
2013-10-21 11:30:35 -07:00
Matthias Mailänder
03cf2a3072 Merge pull request #3976 from pchote/scale-fix
Use scale in RenderSimple.RenderPreview.
2013-10-21 11:19:23 -07:00
Matthias Mailänder
ab86b3308e Merge pull request #3977 from pchote/travis-fix
Re-enable travis notices without joining.
2013-10-21 10:48:06 -07:00
Paul Chote
aab6fec68b Remove VirtKey and KeyName. 2013-10-21 20:24:24 +13:00
Paul Chote
e5f93ec39e Introduce Keycode to simplify key checks. 2013-10-21 20:24:24 +13:00
Paul Chote
477d045e0a Re-enable travis notices without joining.
This reverts commit dbb38e3a42.
2013-10-21 18:54:05 +13:00
Paul Chote
03c4c476f1 Use scale in RenderSimple.RenderPreview. Fixes #3970. 2013-10-21 18:52:29 +13:00
Paul Chote
7ecf84dc61 Extract contrail fading for dead projectiles into an IEffect. 2013-10-21 18:27:37 +13:00
Paul Chote
33f514001e Fix viewport-px / world-px confusion in ScreenMap. Fixes #3964. 2013-10-21 17:57:53 +13:00
Matthias Mailänder
dbb38e3a42 Update .travis.yml
the channel does not allow notices from outside
2013-10-21 00:09:58 +02:00
Matthias Mailänder
31aa1bf421 Update README.md 2013-10-20 23:18:21 +02:00
Paul Chote
9a540e0536 Merge pull request #3971 from Mailaender/silent-travis
Made Travis CI bot IRC notifications less noisy
2013-10-20 13:11:05 -07:00
Matthias Mailänder
06f06ffbb1 a less noisy Travis CI bot IRC notification 2013-10-20 14:35:33 +02:00
Matthias Mailänder
3ed6faed62 Update OpenRA.nsi
fixed "no files found"
2013-10-19 13:46:20 +02:00
Matthias Mailänder
1198ed9fe8 Delete HACKING
unmaintained,
moved to https://github.com/OpenRA/OpenRA/wiki/Hacking
2013-10-19 13:37:38 +02:00
Matthias Mailänder
8b8d3edea2 Merge pull request #3958 from Mailaender/docs
Ship COPYING and CHANGELOG on all platforms
2013-10-19 04:30:31 -07:00
Matthias Mailänder
d1a43a45f1 Merge pull request #3960 from Mailaender/rpm-revert
Simplified the RPM build scripts again
2013-10-19 04:30:20 -07:00
Matthias Mailänder
3db703a7ed Merge pull request #3959 from Mailaender/makefile
Removed TilesetBuilder from core
2013-10-19 04:29:53 -07:00
Matthias Mailänder
20837c3776 cleaned packaging comments 2013-10-19 13:22:36 +02:00
Matthias Mailänder
807dc8b392 silenced curl 2013-10-19 13:22:36 +02:00
Matthias Mailänder
af0f8d09d6 simplify RPM buildpackage script for the build server
hard-code everything outside /usr/share/openra
2013-10-19 13:22:36 +02:00
Matthias Mailänder
5d2254aeee fixed md5sum file not found global mix database.dat 2013-10-19 13:22:32 +02:00
Matthias Mailänder
e54fd9f582 remove the tileset builder from core
not required anymore for d2k
it is also not shipped because it won't work standalone
2013-10-19 12:50:58 +02:00
Matthias Mailänder
797f30446d ship license and changelog on all platforms
keep INSTALL & HACKING in the source code only
2013-10-19 12:35:38 +02:00
Matthias Mailänder
9ecf678b04 Update OpenRA.nsi
fixed Error: unterminated string parsing line at OpenRA.nsi:144
2013-10-19 12:20:43 +02:00
Matthias Mailänder
431c956932 Update OpenRA.nsi
added languages and sorted alphabetically
2013-10-19 12:13:12 +02:00
Matthias Mailänder
52ff778881 Update buildpackage.sh
Fixed make: *** [install-shortcuts] Error 1
2013-10-19 11:24:19 +02:00
Matthias Mailänder
3181c46d27 Update Makefile
Fixed  make: *** No rule to make target `shortcuts', needed by `install-shortcuts'.
2013-10-19 11:12:54 +02:00
Paul Chote
fa2439f03e Merge pull request #3956 from ScottNZ/bleed
Update CHANGELOG
2013-10-19 00:44:18 -07:00
ScottNZ
349ee8cfbf Update CHANGELOG 2013-10-19 18:53:09 +13:00
Paul Chote
bb8f4494f5 Merge pull request #3938 from Mailaender/game-id
Added a Game ID and print it to syncreport.log
2013-10-17 22:51:27 -07:00
Paul Chote
88b8dd6c3e Merge pull request #3948 from Mailaender/replay-duration
Replay duration cleanup
2013-10-17 22:44:41 -07:00
Matthias Mailänder
eff943b3eb added OS and Mono/.NET runtime version to syncreport.log 2013-10-17 20:54:58 +02:00
Matthias Mailänder
70ba7fe5f6 added OpenRA, OS and .NET/Mono runtime version to exception.log 2013-10-17 20:39:41 +02:00
Matthias Mailänder
8c8df3bda9 expose Game ID and client player name to syncreport.log 2013-10-17 20:36:17 +02:00
Matthias Mailänder
353393571f added a Game ID
closes #2570
2013-10-17 20:36:17 +02:00
Matthias Mailänder
39076c98ac Merge pull request #3950 from xanax/bleed
Added -disabled in chrome.yaml & dialog.png files
2013-10-17 11:26:17 -07:00
Sébastien Kerguen
8b9f7a12fa Added -disabled in chrome.yaml & dialog.png files
Added -disabled in chrome.yaml & dialog.png files
2013-10-16 23:34:27 +02:00
Matthias Mailänder
f21f314bfe avoid magic number for replay duration calculation 2013-10-16 21:09:45 +02:00
Matthias Mailänder
f51bd87332 Merge pull request #3943 from pchote/wall-fix
Fix projectiles vs walls.
2013-10-16 08:03:47 -07:00
Matthias Mailänder
39c7843654 Merge pull request #3944 from pchote/sound-fix
Fix bogus sound attenuation.
2013-10-16 07:54:13 -07:00
Matthias Mailänder
4cacd074d7 Merge pull request #3945 from pchote/zoom-fix
Prevent pixel doubling of group / pip / tag / chevron decorations.
2013-10-16 07:47:23 -07:00
Matthias Mailänder
d79b3d32d9 Merge pull request #3946 from wuschel/bleed
fix/balance RA map Athena (koth)
2013-10-16 07:32:46 -07:00
wuschel
cc2bedc454 fix/balance RA map Athena
1. Reduced strategic victory timer from 10 to 3 minutes to increase
pressure on players.
2. Increased the size of the starting islands in order to give a player
more strategic options.

Removed *Options: OpenRA.MapOptions* as seen in
https://github.com/OpenRA/OpenRA/pull/3939. Checked all starting
positions in-Game.
2013-10-16 13:13:27 +02:00
Paul Chote
1ab4b9b72c Fix the rank chevron size when zooming. 2013-10-16 19:12:59 +13:00
Paul Chote
59f5c8ed52 Fix the pip/tag/group decoration size when zooming. 2013-10-16 19:12:59 +13:00
Paul Chote
3ef6a8317a Remove Game.Zoom. 2013-10-16 18:21:46 +13:00
Paul Chote
96d37df4b3 Restore original sound parameters. Fixes #3919. 2013-10-16 17:53:40 +13:00
Paul Chote
8aa76b07cb Use the current position for projectile explosions. Fixes #3795. 2013-10-16 17:31:28 +13:00
Matthias Mailänder
32673344a8 Merge pull request #3933 from pchote/zoom-lines
Don't zoom UI lines when pixel doubling.
2013-10-15 08:28:30 -07:00
Matthias Mailänder
2c198e5d5c Merge pull request #3939 from wuschel/bleed
fix/balance on RA map Apollo
2013-10-15 08:25:24 -07:00
Matthias Mailänder
691602a5a1 Merge pull request #3941 from ScottNZ/bleed
Add missing [Translate]s to support power widgets
2013-10-15 08:19:49 -07:00
ScottNZ
a7b7b68a2e Add missing [Translate]s to support power widgets 2013-10-15 14:40:50 +13:00
wuschel
5a5bf8a8cc RA map Apollo / update map.yaml / remove Options: ...
For some reason the editor in release-20130915 added *Options: OpenRA.MapOptions* into the map.yaml file. I removed that entry.
2013-10-15 02:11:12 +02:00
wuschel
635f634b71 fix/balance on RA map Apollo
Southern side of map lacked 1 oil derrick and 1 oil patch / added to
southern side of map.
2013-10-15 00:27:10 +02:00
Paul Chote
84bb78060f Don't zoom UI lines when pixel doubling. 2013-10-15 11:19:16 +13:00
Paul Chote
44dd801f16 Extract shared constants in Draw*Bar and DrawSelectionBox. 2013-10-15 10:45:51 +13:00
Paul Chote
483120ea20 Extract DrawTargetMarker to WorldRenderer. 2013-10-15 10:45:51 +13:00
Paul Chote
839419635d Improve contrasted range circle rendering. 2013-10-15 10:45:51 +13:00
Paul Chote
d2d73a32a2 Automatically flush line renderer when changing width. 2013-10-15 10:45:51 +13:00
Matthias Mailänder
24b33891a7 Merge pull request #3935 from xanax/bleed
Fixed spawnpoints in chrome.yaml (D2K, TS, RA)
2013-10-14 12:48:51 -07:00
Chris Forbes
623ef971bf Merge pull request #3936 from Mailaender/mini-base
Added BaseProvider to mini-games
2013-10-14 12:46:09 -07:00
Matthias Mailänder
aa7972755b Merge pull request #3937 from reaperrr/patch-1
Gives ant adequate health radius and fixes instant turn
2013-10-14 12:45:45 -07:00
reaperrr
a873f099ff Gives ant adequate health radius and fixes instant turn
Ant was using the same tiny health radius as other infantry. Additionally, I gave it a ROT value so it no longer insta-turns up to 180° without the slightest delay.
2013-10-14 21:35:11 +02:00
Sébastien Kerguen
7fb0c0cf8c Fixed colorpicker coordinates in chrome.yaml
Fixed colorpicker coordinates in chrome.yaml
2013-10-14 20:06:30 +02:00
Matthias Mailänder
c1af43da7f added BaseProvider to mini-games
fixes #3934
2013-10-14 19:45:28 +02:00
Sébastien Kerguen
76c81b610a Fixed spawnpoints in chrome.yaml (D2K, TS, RA)
Fixed spawnpoints in chrome.yaml (D2K, TS, RA)
Fixes #3931
2013-10-14 18:43:51 +02:00
Matthias Mailänder
f4959853fa Merge pull request #3836 from Mailaender/rpm-filesystem
List files again to avoid owning standard dirs in RPM
2013-10-14 08:44:11 -07:00
Matthias Mailänder
676db9753c Merge pull request #3932 from pchote/health-vis
Improve debug overlays
2013-10-14 08:42:33 -07:00
Paul Chote
d864989c19 Tidy PathfinderDebugOverlay. 2013-10-14 21:18:50 +13:00
Paul Chote
68cd537c9b Rename DebugOverlay -> PathfinderDebugOverlay. 2013-10-14 21:16:46 +13:00
Paul Chote
97a42e7d43 Fix A* debug overlay in D2K. 2013-10-14 21:14:21 +13:00
Paul Chote
f3c7c0e957 Update ingame label to match new behaviour. 2013-10-14 21:01:47 +13:00
Paul Chote
d2eb42fbd2 Add Health radius to CombatDebugOverlay. Fixes #3862. 2013-10-14 20:57:41 +13:00
Paul Chote
5da2c319c1 Fix inconsistent naming in DebugMuzzlePositions. 2013-10-14 20:57:20 +13:00
Paul Chote
9f1f6eae9d Merge pull request #3929 from ScottNZ/translation
Add translation support
2013-10-13 23:57:12 -07:00
ScottNZ
3769b845b6 Make tooltip names/descriptions translatable 2013-10-14 19:38:21 +13:00
ScottNZ
42a4d30162 Set up English translation for requires/on-hold/ready texts 2013-10-14 19:38:21 +13:00
ScottNZ
6598f0382a Add support for game translation 2013-10-14 19:38:18 +13:00
Paul Chote
19eb685ecb Merge pull request #3930 from xanax/bleed
chrome.yaml updated (scrollthumb-hover & -pressed)
2013-10-13 23:01:43 -07:00
Paul Chote
7ff2e9d004 Merge pull request #3926 from Phrohdoh/EjectOnDeath
EjectOnDeath - updated and 100% working
2013-10-13 22:51:36 -07:00
Paul Chote
efa306a111 Merge pull request #3928 from Mailaender/double-click-watch
Start Replay on double click
2013-10-13 22:29:53 -07:00
Taryn Hill
e3e7d0b38c Add ignoreActor and checkTransientActors to IPositionable.CanEnterCell
Improved 'return' checks
Removed unnecessary 'using'
Fixed defaults.yaml spelling error
2013-10-13 20:24:29 -04:00
Taryn Hill
e9652db486 EjectOnDeath works with air & ground vehicles, updated defaults.yaml 2013-10-13 20:13:55 -04:00
Taryn Hill
61a26a636b Moved EjectOnDeath to Mods.RA root 2013-10-13 20:13:55 -04:00
Sébastien Kerguen
209443d062 Small chrome.yaml update (D2K, RA, TS)
Small chrome.yaml update (D2K, RA, TS):
- new comments
- fixed scrollthumb-hover & -pressed
2013-10-13 21:55:00 +02:00
Sébastien Kerguen
2062d26fea chrome.yaml updated (scrollthumb-hover & -pressed)
scrollthumb-hover & scrollthumb-pressed updated in chrome.yaml (TS, D2K,
RA)
2013-10-13 10:54:54 +02:00
ScottNZ
104a2d23cf Split FieldSaver out into its own file 2013-10-13 16:49:19 +13:00
Matthias Mailänder
24fdb489b9 start replay on double click 2013-10-12 23:51:27 +02:00
Paul Chote
d8c6acad45 Merge pull request #3903 from Mailaender/gameinit-redundancy
Removed the now redundant per mod Install/DownloadPackagesLogic
2013-10-12 14:38:13 -07:00
Paul Chote
d437b0949a Merge pull request #3920 from Mailaender/tidy
Minor cleanup of the main folder
2013-10-12 14:20:32 -07:00
Matthias Mailänder
d55ee5e037 remove unused icon 2013-10-12 10:54:57 +02:00
Matthias Mailänder
0dea1d1471 renamed and relocated fonts 2013-10-12 10:41:18 +02:00
Paul Chote
1cca6f8fe5 Merge pull request #3649 from Mailaender/passwords
Completed support for password protected games
2013-10-09 22:13:20 -07:00
Matthias Mailänder
e4666f3af3 Merge pull request #3921 from xanax/bleed
Updated chrome.yaml and dialog.png (RA,D2K,TS)
2013-10-09 11:45:40 -07:00
Sébastien Kerguen
6bbff98057 Reuse previous D2K graphics for dialog.png
Reuse previous D2K graphics but with a re-arranged dialog.png file.
2013-10-09 20:39:05 +02:00
Sébastien Kerguen
8df4f7b3dd Updated chrome.yaml and dialog.png (RA,D2K,TS)
I have updated chrome.yaml and dialog.png files for RA, D2K, TS mods.
Featuring "button-hover" and "textfield-hover" states.
2013-10-08 23:19:00 +02:00
Paul Chote
f5d26bebb7 Don't crash if the server mods don't match.
This allows the ingame dialog to be displayed.
2013-10-07 19:37:15 +02:00
Matthias Mailänder
3af1e47744 separate connection and direct connect dialog from serverbrowser 2013-10-07 19:37:15 +02:00
Matthias Mailänder
b618fc7cc2 complete password protected servers
closes #2290
2013-10-07 19:37:12 +02:00
Matthias Mailänder
a6cdcea414 reorder checkboxes more intuitively
port forwarding under ports
2013-10-07 19:31:18 +02:00
Matthias Mailänder
cdfc21af2c remove redundant install and download logic 2013-10-06 10:52:55 +02:00
Chris Forbes
89a6d4f98e Merge pull request #3909 from pchote/project-fix
Fix Mods.RA project file
2013-10-05 15:23:27 -07:00
Paul Chote
2d0028396a Fix DefaultLoadScreen coding style. 2013-10-06 11:04:15 +13:00
Paul Chote
7604a60894 Fix Mods.RA csproj. 2013-10-06 10:58:05 +13:00
Chris Forbes
70b5cc8281 Merge pull request #3905 from Mailaender/splashscreens
Removed Loadscreen redundancy
2013-10-05 13:21:10 -07:00
Chris Forbes
4a3847be65 Merge pull request #3906 from Mailaender/d2k-idle-infantry
Fixed D2k infantry stopping during a firing animation with muzzle flash
2013-10-05 13:20:27 -07:00
Chris Forbes
c532a98333 Merge pull request #3907 from Mailaender/passable-cliffs
Fixed passable cliffs on Arrakis
2013-10-05 13:20:07 -07:00
Chris Forbes
fab6ada8b9 Merge pull request #3908 from Mailaender/explode-in-world
Fixed cargos exploding where they were loaded
2013-10-05 13:19:41 -07:00
Matthias Mailänder
ebda91631e also don't leave a husk somewhere when loaded as cargo 2013-10-05 21:52:33 +02:00
Matthias Mailänder
cec348c462 don't explode when not in world
fixes #3895
StyleCop cleanup
2013-10-05 21:47:23 +02:00
Matthias Mailänder
983697c70b made more cliffs unpassable to avoid glitches
fixes #3701
2013-10-05 21:22:57 +02:00
Matthias Mailänder
f81982d607 removed unused tileset builder templates 2013-10-05 21:22:34 +02:00
Matthias Mailänder
14cf20aad5 add fake idle animations to avoid endless muzzle sprites
fixes #3852
2013-10-05 21:09:55 +02:00
Matthias Mailänder
19b649ba60 unify D2k, RA, TS loadscreens to avoid redundancy
load text comments from mod.yaml (comma separated)
2013-10-05 18:37:22 +02:00
Matthias Mailänder
72a53808ed Merge pull request #3902 from pchote/helicopter-fix
Fix helicopter reloading
2013-10-05 03:58:15 -07:00
Paul Chote
9ee9de01b1 Use cell positioning to look up resupply actors. Fixes #3901.
FindActorsInBox only checks against the centre of
actors, so testing two points is rarely going to
work.
2013-10-05 23:28:46 +13:00
Matthias Mailänder
86ad0e63e4 Merge pull request #3887 from pchote/viewport-cleanup
Viewport cleanup
2013-10-05 02:23:18 -07:00
Paul Chote
e09a7f4682 Merge pull request #3888 from Mailaender/ts-asset-download
Added Auto-Download for Tiberian Sun assets
2013-10-05 01:33:57 -07:00
Matthias Mailänder
9b5b019a36 Merge pull request #3894 from ScottNZ/balance
More RA balance work
2013-10-05 01:16:59 -07:00
Paul Chote
919181e04d Clean up viewport internals. 2013-10-05 21:01:22 +13:00
Paul Chote
936bf98496 Move Viewport inside WorldRenderer. 2013-10-05 21:01:22 +13:00
Paul Chote
fe8c80aca6 Add Game.Zoom for remaining engine stuff. 2013-10-05 21:01:22 +13:00
Paul Chote
3ae75362bb Remove WorldUtils.FindFrozenActorsAtMouse. 2013-10-05 21:01:22 +13:00
Paul Chote
1ca9c90565 Add ScreenMap.ActorsAt(MouseInput) overload. 2013-10-05 21:01:21 +13:00
Paul Chote
0b560bfc6e Move more viewport lookups to WorldRenderer. 2013-10-05 21:01:21 +13:00
Paul Chote
f575c20d38 Route viewport centering via WorldRenderer. 2013-10-05 21:01:21 +13:00
Paul Chote
b3d608092c Tidy WorldCommandWidget. 2013-10-05 21:01:21 +13:00
Paul Chote
b7123cda7d Route screen size queries via Game.Renderer. 2013-10-05 21:01:21 +13:00
Matthias Mailänder
65bbfbaef2 Merge pull request #3859 from ScottNZ/irc
Add IRC client to the serverbrowser
2013-10-05 00:43:49 -07:00
Matthias Mailänder
89da26a35a package URL should be good to go now
adapt test file as tibsun.mix is just a container not included
2013-10-05 08:57:05 +02:00
Matthias Mailänder
ecf9c260b6 minor StyleCop cleanups 2013-10-05 08:57:04 +02:00
Matthias Mailänder
98e1fe852a isometry is now WIP ;) 2013-10-05 08:57:04 +02:00
Matthias Mailänder
dee3a27328 made Firestorm expansion optional 2013-10-05 08:57:04 +02:00
Matthias Mailänder
dfc5afd1cd Merge pull request #3899 from pchote/viewport-regression-fixes
Viewport regression fixes
2013-10-04 23:54:59 -07:00
Matthias Mailänder
a503345c16 Merge pull request #3900 from pchote/website-packaging-fix
Update packaging for recent website changes.
2013-10-04 23:26:32 -07:00
Paul Chote
44503323f1 Upload the source package to the /source/ directory on the server. 2013-10-05 13:49:09 +13:00
Paul Chote
3ff71d5982 Fix asset downloader NRE. Fixes #3898. 2013-10-05 13:29:39 +13:00
Paul Chote
4f354e1474 Batch ActorMap add/removes and filter invalid ActorsInBox. Fixes #3897. 2013-10-05 13:19:47 +13:00
Paul Chote
85f854ccde Clean up ActorMap. 2013-10-05 12:59:54 +13:00
ScottNZ
faee82654f Add OpenRA.Irc to packaging scripts 2013-10-05 12:05:28 +13:00
ScottNZ
c6dc0e8c8b Add IRC interface to ra/cnc server browsers 2013-10-05 12:05:28 +13:00
ScottNZ
5bdd0705b2 Add main IRC logic 2013-10-05 12:05:27 +13:00
ScottNZ
3ee1628b13 Add databinding support to ScrollPanelWidget 2013-10-05 12:05:21 +13:00
Matthias Mailänder
47e036e1b2 Merge pull request #3893 from reaperrr/ra-fixes
Fixes two cosmetical issues with RA mod
2013-10-03 09:43:41 -07:00
reaperrr
8a23f63f1b Corrects paradrop description. It actually drops two rocket soldiers as well. 2013-10-03 17:37:23 +02:00
reaperrr
79b989b560 Downsize ant selection box. Fixes #3885 2013-10-03 17:36:10 +02:00
ScottNZ
d15a53d88b Reduce prices of medi and mech 2013-10-03 19:13:48 +13:00
ScottNZ
903e85bc38 Double hellfire ROT 2013-10-01 14:59:15 +13:00
ScottNZ
da14de15e0 Increase hellfire aa/ag burst delay 2013-10-01 14:58:43 +13:00
ScottNZ
e897212a3d Increase projectile speed for grenadier 2013-10-01 01:07:52 +13:00
ScottNZ
0aaf636273 Increase light/heavy damage multipliers for v2rl 2013-09-30 23:01:28 +13:00
ScottNZ
37bd2f4e54 Increase longbow AG hellfire damage to 60 2013-09-30 23:01:21 +13:00
ScottNZ
e100d525b9 Increase longbow health to 150 2013-09-30 20:34:49 +13:00
ScottNZ
782f17e218 Make hind do more damage, especially against infantry 2013-09-30 20:17:01 +13:00
ScottNZ
58dd8b9026 Decrease v2rl damage and increase rof 2013-09-30 19:57:47 +13:00
ScottNZ
55a792b929 Increase arty hp to 100 2013-09-30 19:55:54 +13:00
ScottNZ
62acd78b35 Increase v2rl hp to 200 2013-09-30 19:55:43 +13:00
ScottNZ
ac148afd6e Reduce v2rl speed to 6 2013-09-30 19:34:43 +13:00
ScottNZ
4280f18c4c Increase price of v2rl to $900 2013-09-30 19:33:16 +13:00
ScottNZ
4ada54064d Increase price of arty to $800 2013-09-30 19:32:32 +13:00
Paul Chote
638c23098b Merge pull request #3890 from Mailaender/d2k-walls
Brought back concrete walls in D2k
2013-09-29 14:14:36 -07:00
Paul Chote
d2128d8e2a Merge pull request #3868 from Mailaender/nsis-shortcuts
Added an optional desktop shortcut for Windows
2013-09-29 14:06:52 -07:00
Paul Chote
5a1abe7692 Merge pull request #3889 from Mailaender/sync-report-available
Avoid misleading "No sync report available!" messages
2013-09-29 14:06:23 -07:00
Matthias Mailänder
bb5a6e0155 Hotkey: O for concrete walls in d2k 2013-09-29 22:35:33 +02:00
Matthias Mailänder
b2c05b5779 bring back player buildable walls in d2k 2013-09-29 22:35:24 +02:00
Matthias Mailänder
f4a8a99d87 avoid misleading no sync report available messages 2013-09-29 21:29:17 +02:00
Matthias Mailänder
5591154ae7 Merge pull request #3883 from dan9550/ts-install-logic
Tiberian Sun CD Install Logic
2013-09-29 07:45:23 -07:00
ScottNZ
9ccdf629f6 Reduce mcv build time to 32s 2013-09-30 00:01:19 +13:00
Matthias Mailänder
20e8f6385b Merge pull request #3886 from pchote/ppos-cleanup
Remove legacy PPos type.
2013-09-29 02:13:23 -07:00
Paul Chote
8241718d01 Fix double-rendering regression. 2013-09-29 21:29:10 +13:00
Paul Chote
5f0bb4b6c2 Fix some style nits in WorldRenderer. 2013-09-29 21:15:46 +13:00
Chris Forbes
f87796df21 Merge pull request #3878 from Mailaender/rotten-maps
Fixed map Training Camp
2013-09-28 19:53:58 -07:00
Chris Forbes
263849789f Merge pull request #3861 from pchote/spatialbins-cleanup
Overhaul spatial caching
2013-09-28 19:53:31 -07:00
ScottNZ
749965acd1 Use baseprovider in ra 2013-09-29 13:50:15 +13:00
ScottNZ
f7d46b8ca1 Reduce price of shok to $400 2013-09-29 12:59:41 +13:00
ScottNZ
0c75c8de18 Increase speeds of e3, e4 and shok to match e1's speed 2013-09-29 12:51:26 +13:00
ScottNZ
a1ddbf78f8 Reduce prices of gap to $800 and mgg to $1200 2013-09-29 12:44:08 +13:00
ScottNZ
70e22a89d5 Increase MGG shroud generation range from 4 to 6 2013-09-29 12:42:16 +13:00
ScottNZ
ec80d82fbc Uparmour MGG 2013-09-29 12:38:24 +13:00
ScottNZ
0f9b2041ae Make fact sellable again 2013-09-29 11:22:14 +13:00
ScottNZ
3225899a20 Reduce mcv crate no base selection shares to 100 (~70% chance of getting mcv with no mcv or fact) 2013-09-29 11:22:03 +13:00
ScottNZ
be523e2a38 Uparmour MRJ 2013-09-28 23:10:31 +12:00
Dan9550
e9e8c3fe49 Basic Tiberian Sun install logic 2013-09-28 19:38:33 +10:00
Dan9550
e5e7cdb427 TS Installer logic, tibsun.mix encrypted 2013-09-28 04:49:22 +10:00
Paul Chote
19e0c2a83f Remove PPos and PVecInt. 2013-09-27 15:58:56 +12:00
Paul Chote
b96c430f84 Remove PVecInt from Viewport. 2013-09-27 15:54:37 +12:00
Paul Chote
68a0070fa6 Remove PPos hack from ScreenShaker. 2013-09-27 15:50:45 +12:00
Paul Chote
90ab2477b4 Convert Sound to world coordinates. 2013-09-27 15:41:33 +12:00
Paul Chote
2303d8064a Remove Sprite.DrawAt. 2013-09-27 15:41:33 +12:00
Paul Chote
f94c7034bf Use SpriteRenderables for selection decorations. 2013-09-27 15:41:33 +12:00
Paul Chote
3002c4b77d Use SpriteRenderables for tile overlays. 2013-09-27 15:41:33 +12:00
Paul Chote
8c0da26ae1 Remove PPos from GainsExperience. 2013-09-27 15:41:33 +12:00
Paul Chote
1a1d5ede19 Remove PPos from TeslaZapRenderable. 2013-09-27 15:41:33 +12:00
Paul Chote
7320493a21 Fix radar cursor fake mouse event location. 2013-09-27 15:41:33 +12:00
Paul Chote
b100b4131c Remove PPos hacks from WorldInteractionController. 2013-09-27 15:41:32 +12:00
Paul Chote
2e0e4b0bc5 Add WorldRenderer.Position for screen -> world conversion. 2013-09-27 15:41:32 +12:00
Paul Chote
27e4bbf1cb Replace CenterLocationInit -> CenterPositionInit. 2013-09-27 15:41:32 +12:00
Paul Chote
4df9fc1acc Render minefield targeting using PBOG-style overlay. 2013-09-27 15:41:32 +12:00
Paul Chote
aed7f2ace6 Remove PPos and tidy DebugOverlay. 2013-09-27 15:41:32 +12:00
Paul Chote
0dc50c65f5 Remove unnecessary int2 -> PPos -> int2 conversions. 2013-09-27 15:41:32 +12:00
Paul Chote
b335d67ce3 Remove PPos hacks from RadarWidget. 2013-09-27 15:41:32 +12:00
Paul Chote
ad44610e5a Replace dynamic Actor.Bounds with the (unchanging) relative rect. 2013-09-27 15:39:57 +12:00
Paul Chote
3f8d75a1ac Remove SpatialBins. 2013-09-27 15:36:51 +12:00
Paul Chote
e03ec690ff Track actor positions in ActorMap. 2013-09-27 15:36:51 +12:00
Paul Chote
b00cc6108d Make ActorMap addition explicit. 2013-09-27 15:36:51 +12:00
Paul Chote
4a2a747556 Pull ActorMap back out into a trait. 2013-09-27 15:36:49 +12:00
Paul Chote
dfd51c0caa Introduce ScreenMap trait for caching screen-coord queries. 2013-09-27 15:36:25 +12:00
Paul Chote
cad46e43c5 Add WorldRenderer parameter to WorldLoaded. 2013-09-27 15:29:44 +12:00
Matthias Mailänder
f8316af454 Documented Gentoo build dependencies
closes #3869
2013-09-24 22:23:48 +02:00
Matthias Mailänder
96276514f3 removed bit-rotting in training-camp map
- crash because Tooltip: Icon: is used in legacy ways
- unbuildable sniper/demo-truck
- no need for custom demo truck with mine layer icon
2013-09-24 20:53:01 +02:00
Matthias Mailänder
e67ff1da7e Update INSTALL
copy-dependencies.bat did not make it
2013-09-23 19:55:24 +02:00
Matthias Mailänder
bcb9acb14b Add an optional desktop shortcut for Windows
closes #3853
2013-09-22 19:08:34 +02:00
ScottNZ
8b89952d59 Add observable collections 2013-09-22 19:22:07 +12:00
ScottNZ
f3fa81b8f1 Fix ActionQueue.PerformActions executing actions out of order 2013-09-22 19:22:06 +12:00
Sam Hegarty
954b070736 Use quotes around rpm file names to prevent issues with spaces. 2013-09-22 09:10:31 +02:00
Paul Chote
c26a0cb222 Merge pull request #3837 from Mailaender/makefile-fixes
Use the Makefile install rules for our packaging
2013-09-22 00:06:45 -07:00
Matthias Mailänder
29d93f7d9d separate Linux only shortcuts and icons from make install 2013-09-22 09:01:23 +02:00
Paul Chote
94e0a30904 Merge pull request #3858 from Mailaender/replay-folders
Save Replays in per Mod and Version folders
2013-09-21 21:50:30 -07:00
Paul Chote
5ebde33256 Merge pull request #3860 from Mailaender/heal-allies-only
Added IsAlliedWith check to Heal
2013-09-21 21:45:57 -07:00
Matthias Mailänder
a5b954a563 never heal enemies
fixes #3597
2013-09-21 07:37:20 +02:00
Matthias Mailänder
7a4f29afc6 apt-get update in before_install 2013-09-20 18:27:52 +02:00
Matthias Mailänder
5f27b05103 update documentation 2013-09-20 18:27:52 +02:00
Matthias Mailänder
80179a19c2 spaces to tabs 2013-09-20 18:27:52 +02:00
Matthias Mailänder
fb91b81dd5 rename RALint → OpenRA.Lint 2013-09-20 18:27:47 +02:00
Matthias Mailänder
de4c224b5c separate RALint tests from regular builds 2013-09-20 18:27:46 +02:00
Matthias Mailänder
83669dd50b install icons, desktop shortcuts and launchers in Makefile
avoid redundancy with package build scripts
add uninstall rules
2013-09-20 18:27:46 +02:00
Matthias Mailänder
9d3b93f717 save replays in per mod and version folders
StyleCop cleanups
2013-09-20 17:12:22 +02:00
Paul Chote
38dcd857dd Merge pull request #3825 from Mailaender/tm-removal
Renamed some project files for IP clearance
2013-09-19 22:08:57 -07:00
Chris Forbes
66688d05b0 Merge pull request #3840 from Mailaender/mtm-fix
Fixed Unresolved=InfiltrateForCashInfo Missing=InfiltratableInfo in Monster Tank Madness
2013-09-19 20:30:26 -07:00
Chris Forbes
f6ad5dd0b0 Merge pull request #3843 from Mailaender/chmod-x
Removed executable bits for some maps
2013-09-19 20:26:25 -07:00
Matthias Mailänder
7d6b0310da removed executable bits 2013-09-15 16:23:03 +02:00
Matthias Mailänder
b28c05d904 Merge pull request #3842 from ckorn/patch-1
Makefile: Add geoip so it gets installed, fixes #3834
2013-09-15 06:45:12 -07:00
Christoph Korn
0f3212f65b Makefile: Add geoip so it gets installed
Without adding it to CORE it does not get installed and the game crashes.
2013-09-15 15:34:09 +02:00
Matthias Mailänder
92a09720b0 Fixed Unresolved=InfiltrateForCashInfo Missing=InfiltratableInfo
closes #3835
2013-09-15 11:38:36 +02:00
Matthias Mailänder
eff4e80877 fix Bountysource url 2013-09-15 10:32:05 +02:00
Sam Hegarty
3c497e638e Use a combination of find xargs and read to prevent file/dir name problems. 2013-09-15 10:19:50 +02:00
Matthias Mailänder
b9c226bc18 cope with with data file names that contain spaces 2013-09-15 10:19:50 +02:00
Matthias Mailänder
c880e47add list files again to avoid owning standard dirs in RPM
reverts commit 9d256d93a5

fixes file /usr/bin from install of openra-release.20130915-1.noarch
conflicts with file from package filesystem-3.2-13.fc19.x86_64
2013-09-15 10:19:49 +02:00
Matthias Mailänder
62616eba14 rename C&C to TD 2013-09-14 23:08:08 +02:00
1710 changed files with 68819 additions and 68383 deletions

14
.gitignore vendored
View File

@@ -14,11 +14,14 @@ _ReSharper.*/
# binaries
mods/*/*.dll
mods/*/*.mdb
/*.dll
/*.dll.config
*.pdb
*.mdb
*.exe
/*.so
/*.dylib
/*.pdb
/*.mdb
/*.exe
# backup files by various editors
*~
@@ -47,12 +50,9 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.perspectivev3
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
*.resources
# KDE
*.kate-swp
*.directory
# auto-generated documentation
DOCUMENTATION.md
Lua-API.md
*.html
# StyleCop

View File

@@ -6,18 +6,46 @@ language: c
# Make sure build dependencies are installed.
install:
- sudo apt-get update && sudo apt-get install mono-gmcs cli-common-dev libsdl1.2debian libgl1-mesa-glx libopenal1 libfreetype6
- sudo apt-get install mono-gmcs cli-common-dev libgl1-mesa-glx libopenal1 libfreetype6 dpkg rpm nsis markdown
cache: apt
# Run the build script which will automatically call RALint and ensure that the IDE project files are still valid.
# Run the build script
# call RALint to check for YAML errors
script:
- make dependencies
- make all
- xbuild
- make test
# Only watch the development branch.
# Only watch the development and release branches.
branches:
only:
- master
- next
- bleed
# Notify developers when build passed/failed.
notifications:
irc: "irc.freenode.net#openra"
irc:
template:
- "%{repository}#%{build_number} %{commit} %{author}: %{message} %{build_url}"
channels:
- "irc.freenode.net#openra"
use_notice: true
skip_join: true
before_deploy: cd packaging && mkdir build && ./package-all.sh $TRAVIS_TAG build
deploy:
provider: releases
api_key:
secure: XBjG29ypu7Ay+ISR7AIf5Uclm+1ZVvfc472Exr7GTP0qoE67k7ItXeoLsqMYgY6nxfWfAzOZHUTqfFpVD78/wZp6Z2LsLZazGAk4vVNf6SunZGn1GsyDSTE82mj9HYFg5QaNLOiVEjeSswx9WZQkhiVuo40JIZCSZq+KaxzPRFw=
file:
- packaging/build/OpenRA-$TRAVIS_TAG.exe
- packaging/build/OpenRA-$TRAVIS_TAG.zip
- packaging/build/openra-$TRAVIS_TAG-1-any.pkg.tar.xz
- packaging/build/openra-$TRAVIS_TAG-1-noarch.rpm
- packaging/build/openra_$TRAVIS_TAG_all.deb
skip_cleanup: true
on:
all_branches: true
tags: true
repo: OpenRA/OpenRA

60
AUTHORS
View File

@@ -34,13 +34,14 @@ Also thanks to:
* Erasmus Schroder (rasco)
* Fahrradkette
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Igor Popov (ihptru)
* Iran
* James Dunne (jsd)
* Jeff Harris (jeff_1amstudios)
* Jes
* Joakim Lindberg (booom3)
* JOo
* Kanar
* Kenny Hoxworth (hoxworth)
* Krishnakanth Mallik
* Kyrre Soerensen (zypres)
@@ -49,31 +50,76 @@ Also thanks to:
* Maarten Meuris (Nyerguds)
* Mark Olson (markolson)
* Matthew Gatland (mgatland)
* Matthew Uzzell (MUzzell)
* Max621
* Max Ugrumov (katzsmile)
* Nukem
* Okunev Yu Dmitry (xaionaro)
* Olaf van der Spek
* Paolo Chiodi (paolochiodi)
* Paul Dovydaitis (pdovy)
* Pavlos Touboulidis (pav)
* Pizzaoverhead
* Psydev
* Raymond Bedrossian (Squiggles211)
* Raymond Martineau (mart0258)
* Reaperrr
* Riderr3
* Rikhardur Bjarni Einarsson (WolfGaming)
* Sascha Biedermann (bidifx)
* Sebastien Kerguen (xanax)
* Simon Verbeke (Saticmotion)
* Taryn Hill (Phrohdoh)
* Teemu Nieminen (Temeez)
* Tim Mylemans (gecko)
* Tirili
* Tristan Keating (Kilkakon)
* Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov)
* Wuschel
* Ian T. Jacobsen (Smilex)
Using GeoLite data created by MaxMind and
Using Simple DirectMedia Layer distributed under
the terms of the zlib license.
Using FreeType distributed under the terms of the
FreeType License.
Using OpenAL Soft distributed under the GNU LGPL.
Using MaxMind GeoIP2 .NET API distributed under
the Apache 2.0 license.
Using GeoLite2 data created by MaxMind and
distributed under the CC BY-SA 3.0 license.
Using KopiLua created by Mark Feldman and
maintained by Vinicius Jarina and distributed
under the MIT license.
Using NLua created by Vinicius Jarina and
distributed under the MIT license.
Using SharpFont created by Robert Rouhani and
distributed under the MIT license.
Using the Open Toolkit distributed under the
MIT license.
Using SDL2# created by Ethan Lee and released
under the zlib license.
Using FuzzyLogicLibrary (fuzzynet) by Dmitry
Kaluzhny and released under the GNU GPL terms.
Using Mono.Nat by Alan McGovern and Ben
Motmans and distributed under the MIT license.
Using ICSharpCode.SharpZipLib initially by Mike
Krueger and distributed under the GNU GPL terms.
Finally, special thanks goes to the original teams
at Westwood Studios and EA for creating the classic
games that inspired the creation of OpenRA.
Red Alert, Command and Conquer, and related
trademarks belong to Electronic Arts Inc. and are
used without permission.
games which OpenRA aims to reimagine.

1383
CHANGELOG

File diff suppressed because it is too large Load Diff

View File

@@ -16,4 +16,6 @@ Please `git rebase` to the latest revision of the bleed branch.
Don't forget to add youself to [AUTHORS](https://github.com/OpenRA/OpenRA/blob/bleed/AUTHORS).
Please propose a [CHANGELOG](https://github.com/OpenRA/OpenRA/wiki/CHANGELOG) entry in the pull-request comments.
While your pull-request is in review it will be helpful if you join [IRC](irc://chat.freenode.net/openra) to discuss the changes.

BIN
GeoIP.dat

Binary file not shown.

View File

@@ -1,165 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

@@ -1,63 +0,0 @@
#region Copyright & License Information
/*
* Copyright (C) 2008 MaxMind Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using System.IO;
namespace GeoIP
{
public class Country
{
String code;
String name;
/*
* Creates a new Country.
*
* @param code the country code.
* @param name the country name.
*/
public Country(String code, String name)
{
this.code = code;
this.name = name;
}
/*
* Returns the ISO two-letter country code of this country.
*
* @return the country code.
*/
public String getCode()
{
return code;
}
/*
* Returns the name of this country.
*
* @return the country name.
*/
public String getName()
{
return name;
}
}
}

View File

@@ -1,106 +0,0 @@
#region Copyright & License Information
/*
* Copyright (C) 2008 MaxMind Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using System.IO;
namespace GeoIP
{
public class DatabaseInfo
{
public static int COUNTRY_EDITION = 1;
public static int REGION_EDITION_REV0 = 7;
public static int REGION_EDITION_REV1 = 3;
public static int CITY_EDITION_REV0 = 6;
public static int CITY_EDITION_REV1 = 2;
public static int ORG_EDITION = 5;
public static int ISP_EDITION = 4;
public static int PROXY_EDITION = 8;
public static int ASNUM_EDITION = 9;
public static int NETSPEED_EDITION = 10;
public static int DOMAIN_EDITION = 11;
public static int COUNTRY_EDITION_V6 = 12;
public static int ASNUM_EDITION_V6 = 21;
public static int ISP_EDITION_V6 = 22;
public static int ORG_EDITION_V6 = 23;
public static int DOMAIN_EDITION_V6 = 24;
public static int CITY_EDITION_REV1_V6 = 30;
public static int CITY_EDITION_REV0_V6 = 31;
public static int NETSPEED_EDITION_REV1 = 32;
public static int NETSPEED_EDITION_REV1_V6 = 33;
private String info;
/**
* Creates a new DatabaseInfo object given the database info String.
* @param info
*/
public DatabaseInfo(String info)
{
this.info = info;
}
public int getType()
{
if ((info == null) | (info == ""))
{
return COUNTRY_EDITION;
}
else
{
// Get the type code from the database info string and then
// subtract 105 from the value to preserve compatability with
// databases from April 2003 and earlier.
return Convert.ToInt32(info.Substring(4, 3)) - 105;
}
}
/**
* Returns the date of the database.
*
* @return the date of the database.
*/
public DateTime getDate()
{
for (int i=0; i<info.Length-9; i++)
{
if (Char.IsWhiteSpace(info[i]) == true)
{
var dateString = info.Substring(i+1, 8);
try
{
return DateTime.ParseExact(dateString,"yyyyMMdd",null);
}
catch (Exception e)
{
Console.Write(e.Message);
}
break;
}
}
return DateTime.Now;
}
public String toString()
{
return info;
}
}
}

View File

@@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{021DDD6A-A608-424C-9A9A-252D8A9989E0}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>GeoIP</RootNamespace>
<AssemblyName>GeoIP</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>..</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="Country.cs" />
<Compile Include="DatabaseInfo.cs" />
<Compile Include="Location.cs" />
<Compile Include="LookupService.cs" />
<Compile Include="Region.cs" />
<Compile Include="RegionName.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,67 +0,0 @@
#region Copyright & License Information
/*
* Copyright (C) 2008 MaxMind Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using System.IO;
namespace GeoIP
{
public class Location
{
public String countryCode;
public String countryName;
public String region;
public String city;
public String postalCode;
public double latitude;
public double longitude;
public int dma_code;
public int area_code;
public String regionName;
public int metro_code;
private static double EARTH_DIAMETER = 2 * 6378.2;
private static double PI = 3.14159265;
private static double RAD_CONVERT = PI / 180;
public double distance (Location loc)
{
double delta_lat, delta_lon;
double temp;
double lat1 = latitude;
double lon1 = longitude;
double lat2 = loc.latitude;
double lon2 = loc.longitude;
// convert degrees to radians
lat1 *= RAD_CONVERT;
lat2 *= RAD_CONVERT;
// find the deltas
delta_lat = lat2 - lat1;
delta_lon = (lon2 - lon1) * RAD_CONVERT;
// Find the great circle distance
temp = Math.Pow(Math.Sin(delta_lat/2), 2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Pow(Math.Sin(delta_lon/2), 2);
return EARTH_DIAMETER * Math.Atan2(Math.Sqrt(temp), Math.Sqrt(1-temp));
}
}
}

View File

@@ -1,999 +0,0 @@
#region Copyright & License Information
/*
* Copyright (C) 2008 MaxMind Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using System.IO;
using System.Net;
using System.Runtime.CompilerServices;
namespace GeoIP
{
public class LookupService
{
private FileStream file = null;
private DatabaseInfo databaseInfo = null;
private Object ioLock = new Object();
byte databaseType = Convert.ToByte(DatabaseInfo.COUNTRY_EDITION);
int[] databaseSegments;
int recordLength;
int dboptions;
byte[] dbbuffer;
private static Country UNKNOWN_COUNTRY = new Country("--", "Unknown Location");
private static int COUNTRY_BEGIN = 16776960;
private static int STRUCTURE_INFO_MAX_SIZE = 20;
private static int DATABASE_INFO_MAX_SIZE = 100;
private static int FULL_RECORD_LENGTH = 100;//???
private static int SEGMENT_RECORD_LENGTH = 3;
private static int STANDARD_RECORD_LENGTH = 3;
private static int ORG_RECORD_LENGTH = 4;
private static int MAX_RECORD_LENGTH = 4;
private static int MAX_ORG_RECORD_LENGTH = 1000;//???
private static int FIPS_RANGE = 360;
private static int STATE_BEGIN_REV0 = 16700000;
private static int STATE_BEGIN_REV1 = 16000000;
private static int US_OFFSET = 1;
private static int CANADA_OFFSET = 677;
private static int WORLD_OFFSET = 1353;
public static int GEOIP_STANDARD = 0;
public static int GEOIP_MEMORY_CACHE = 1;
public static int GEOIP_UNKNOWN_SPEED = 0;
public static int GEOIP_DIALUP_SPEED = 1;
public static int GEOIP_CABLEDSL_SPEED = 2;
public static int GEOIP_CORPORATE_SPEED = 3;
private static String[] countryCode = {
"--",
"AP", "EU", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "CW",
"AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB",
"BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO",
"BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD",
"CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR",
"CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO",
"DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ",
"FK", "FM", "FO", "FR", "SX", "GA", "GB", "GD", "GE", "GF",
"GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT",
"GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID",
"IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO",
"JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW",
"KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT",
"LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML",
"MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV",
"MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI",
"NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF",
"PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW",
"PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD",
"SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO",
"SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH",
"TJ", "TK", "TM", "TN", "TO", "TL", "TR", "TT", "TV", "TW",
"TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE",
"VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "RS", "ZA",
"ZM", "ME", "ZW", "A1", "A2", "O1", "AX", "GG", "IM", "JE",
"BL", "MF", "BQ", "SS", "O1" };
private static String[] countryName = {
"Unknown Location",
"Asia/Pacific Region", "Europe", "Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Curacao",
"Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Azerbaijan", "Bosnia and Herzegovina", "Barbados",
"Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Bermuda", "Brunei Darussalam", "Bolivia",
"Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos (Keeling) Islands", "Congo, The Democratic Republic of the",
"Central African Republic", "Congo", "Switzerland", "Cote D'Ivoire", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica",
"Cuba", "Cape Verde", "Christmas Island", "Cyprus", "Czech Republic", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic",
"Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji",
"Falkland Islands (Malvinas)", "Micronesia, Federated States of", "Faroe Islands", "France", "Sint Maarten (Dutch part)", "Gabon", "United Kingdom", "Grenada", "Georgia", "French Guiana",
"Ghana", "Gibraltar", "Greenland", "Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala",
"Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia",
"Ireland", "Israel", "India", "British Indian Ocean Territory", "Iraq", "Iran, Islamic Republic of", "Iceland", "Italy", "Jamaica", "Jordan",
"Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait",
"Cayman Islands", "Kazakhstan", "Lao People's Democratic Republic", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania",
"Luxembourg", "Latvia", "Libya", "Morocco", "Monaco", "Moldova, Republic of", "Madagascar", "Marshall Islands", "Macedonia", "Mali",
"Myanmar", "Mongolia", "Macau", "Northern Mariana Islands", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives",
"Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger", "Norfolk Island", "Nigeria", "Nicaragua",
"Netherlands", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia",
"Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn Islands", "Puerto Rico", "Palestinian Territory", "Portugal", "Palau",
"Paraguay", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan",
"Sweden", "Singapore", "Saint Helena", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname",
"Sao Tome and Principe", "El Salvador", "Syrian Arab Republic", "Swaziland", "Turks and Caicos Islands", "Chad", "French Southern Territories", "Togo", "Thailand",
"Tajikistan", "Tokelau", "Turkmenistan", "Tunisia", "Tonga", "Timor-Leste", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan",
"Tanzania, United Republic of", "Ukraine", "Uganda", "United States Minor Outlying Islands", "United States", "Uruguay", "Uzbekistan", "Holy See (Vatican City State)", "Saint Vincent and the Grenadines", "Venezuela",
"Virgin Islands, British", "Virgin Islands, U.S.", "Vietnam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte", "Serbia", "South Africa",
"Zambia", "Montenegro", "Zimbabwe", "Anonymous Proxy", "Satellite Provider", "Other", "Aland Islands", "Guernsey", "Isle of Man", "Jersey",
"Saint Barthelemy", "Saint Martin", "Bonaire, Saint Eustatius and Saba", "South Sudan", "Other" };
public LookupService(String databaseFile, int options)
{
try
{
lock (ioLock)
this.file = new FileStream(databaseFile, FileMode.Open, FileAccess.Read);
dboptions = options;
init();
}
catch(System.SystemException)
{
Console.WriteLine("cannot open file " + databaseFile);
}
}
public LookupService(String databaseFile):this(databaseFile, GEOIP_STANDARD) { }
private void init()
{
int i, j;
byte[] delim = new byte[3];
byte[] buf = new byte[SEGMENT_RECORD_LENGTH];
databaseType = (byte)DatabaseInfo.COUNTRY_EDITION;
recordLength = STANDARD_RECORD_LENGTH;
lock (ioLock)
{
file.Seek(-3,SeekOrigin.End);
for (i = 0; i < STRUCTURE_INFO_MAX_SIZE; i++)
{
file.Read(delim,0,3);
if (delim[0] == 255 && delim[1] == 255 && delim[2] == 255)
{
databaseType = Convert.ToByte(file.ReadByte());
if (databaseType >= 106)
{
// Backward compatibility with databases from April 2003 and earlier
databaseType -= 105;
}
// Determine the database type.
if (databaseType == DatabaseInfo.REGION_EDITION_REV0)
{
databaseSegments = new int[1];
databaseSegments[0] = STATE_BEGIN_REV0;
recordLength = STANDARD_RECORD_LENGTH;
}
else if (databaseType == DatabaseInfo.REGION_EDITION_REV1)
{
databaseSegments = new int[1];
databaseSegments[0] = STATE_BEGIN_REV1;
recordLength = STANDARD_RECORD_LENGTH;
}
else if (databaseType == DatabaseInfo.CITY_EDITION_REV0 ||
databaseType == DatabaseInfo.CITY_EDITION_REV1 ||
databaseType == DatabaseInfo.ORG_EDITION ||
databaseType == DatabaseInfo.ORG_EDITION_V6 ||
databaseType == DatabaseInfo.ISP_EDITION ||
databaseType == DatabaseInfo.ISP_EDITION_V6 ||
databaseType == DatabaseInfo.ASNUM_EDITION ||
databaseType == DatabaseInfo.ASNUM_EDITION_V6 ||
databaseType == DatabaseInfo.NETSPEED_EDITION_REV1 ||
databaseType == DatabaseInfo.NETSPEED_EDITION_REV1_V6 ||
databaseType == DatabaseInfo.CITY_EDITION_REV0_V6 ||
databaseType == DatabaseInfo.CITY_EDITION_REV1_V6)
{
databaseSegments = new int[1];
databaseSegments[0] = 0;
if (databaseType == DatabaseInfo.CITY_EDITION_REV0 ||
databaseType == DatabaseInfo.CITY_EDITION_REV1 ||
databaseType == DatabaseInfo.ASNUM_EDITION_V6 ||
databaseType == DatabaseInfo.NETSPEED_EDITION_REV1 ||
databaseType == DatabaseInfo.NETSPEED_EDITION_REV1_V6 ||
databaseType == DatabaseInfo.CITY_EDITION_REV0_V6 ||
databaseType == DatabaseInfo.CITY_EDITION_REV1_V6 ||
databaseType == DatabaseInfo.ASNUM_EDITION)
{
recordLength = STANDARD_RECORD_LENGTH;
}
else
{
recordLength = ORG_RECORD_LENGTH;
}
file.Read(buf,0,SEGMENT_RECORD_LENGTH);
for (j = 0; j < SEGMENT_RECORD_LENGTH; j++)
databaseSegments[0] += (unsignedByteToInt(buf[j]) << (j * 8));
}
break;
}
else
{
file.Seek(-4,SeekOrigin.Current);
}
}
if ((databaseType == DatabaseInfo.COUNTRY_EDITION) ||
(databaseType == DatabaseInfo.COUNTRY_EDITION_V6) ||
(databaseType == DatabaseInfo.PROXY_EDITION) ||
(databaseType == DatabaseInfo.NETSPEED_EDITION))
{
databaseSegments = new int[1];
databaseSegments[0] = COUNTRY_BEGIN;
recordLength = STANDARD_RECORD_LENGTH;
}
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
{
int l = (int) file.Length;
dbbuffer = new byte[l];
file.Seek(0,SeekOrigin.Begin);
file.Read(dbbuffer,0,l);
}
}
}
public void close()
{
try
{
lock (ioLock) { file.Close(); }
file = null;
}
catch (Exception) { }
}
public Country getCountry(IPAddress ipAddress)
{
return getCountry(bytestoLong(ipAddress.GetAddressBytes()));
}
public Country getCountryV6(String ipAddress)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(ipAddress);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return UNKNOWN_COUNTRY;
}
return getCountryV6(addr);
}
public Country getCountry(String ipAddress)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(ipAddress);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return UNKNOWN_COUNTRY;
}
return getCountry(bytestoLong(addr.GetAddressBytes()));
}
public Country getCountryV6(IPAddress ipAddress)
{
if (file == null)
{
throw new Exception("Database has been closed.");
}
if ((databaseType == DatabaseInfo.CITY_EDITION_REV1) |
(databaseType == DatabaseInfo.CITY_EDITION_REV0))
{
var l = getLocation(ipAddress);
if (l == null)
return UNKNOWN_COUNTRY;
else
return new Country(l.countryCode, l.countryName);
}
else
{
int ret = SeekCountryV6(ipAddress) - COUNTRY_BEGIN;
if (ret == 0)
return UNKNOWN_COUNTRY;
else
return new Country(countryCode[ret], countryName[ret]);
}
}
public Country getCountry(long ipAddress)
{
if (file == null)
throw new Exception("Database has been closed.");
if ((databaseType == DatabaseInfo.CITY_EDITION_REV1) |
(databaseType == DatabaseInfo.CITY_EDITION_REV0))
{
var l = getLocation(ipAddress);
if (l == null)
return UNKNOWN_COUNTRY;
else
return new Country(l.countryCode, l.countryName);
}
else
{
var ret = SeekCountry(ipAddress) - COUNTRY_BEGIN;
if (ret == 0)
return UNKNOWN_COUNTRY;
else
return new Country(countryCode[ret], countryName[ret]);
}
}
public int getID(String ipAddress)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(ipAddress);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return 0;
}
return getID(bytestoLong(addr.GetAddressBytes()));
}
public int getID(IPAddress ipAddress)
{
return getID(bytestoLong(ipAddress.GetAddressBytes()));
}
public int getID(long ipAddress)
{
if (file == null)
throw new Exception("Database has been closed.");
int ret = SeekCountry(ipAddress) - databaseSegments[0];
return ret;
}
public DatabaseInfo getDatabaseInfo()
{
if (databaseInfo != null)
return databaseInfo;
try
{
// Synchronize since we're accessing the database file.
lock (ioLock)
{
bool hasStructureInfo = false;
byte [] delim = new byte[3];
// Advance to part of file where database info is stored.
file.Seek(-3,SeekOrigin.End);
for (int i=0; i<STRUCTURE_INFO_MAX_SIZE; i++)
{
file.Read(delim,0,3);
if (delim[0] == 255 && delim[1] == 255 && delim[2] == 255)
{
hasStructureInfo = true;
break;
}
file.Seek(-4,SeekOrigin.Current);
}
if (hasStructureInfo)
file.Seek(-6,SeekOrigin.Current);
else
{
// No structure info, must be pre Sep 2002 database, go back to end.
file.Seek(-3,SeekOrigin.End);
}
// Find the database info string.
for (int i=0; i<DATABASE_INFO_MAX_SIZE; i++)
{
file.Read(delim,0,3);
if (delim[0]==0 && delim[1]==0 && delim[2]==0)
{
byte[] dbInfo = new byte[i];
char[] dbInfo2 = new char[i];
file.Read(dbInfo,0,i);
for (int a0 = 0;a0 < i;a0++)
dbInfo2[a0] = Convert.ToChar(dbInfo[a0]);
// Create the database info object using the string.
this.databaseInfo = new DatabaseInfo(new String(dbInfo2));
return databaseInfo;
}
file.Seek(-4,SeekOrigin.Current);
}
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
return new DatabaseInfo("");
}
public Region getRegion(IPAddress ipAddress)
{
return getRegion(bytestoLong(ipAddress.GetAddressBytes()));
}
public Region getRegion(String str)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
return getRegion(bytestoLong(addr.GetAddressBytes()));
}
[MethodImpl(MethodImplOptions.Synchronized)]
public Region getRegion(long ipnum)
{
Region record = new Region();
int seek_region = 0;
if (databaseType == DatabaseInfo.REGION_EDITION_REV0)
{
seek_region = SeekCountry(ipnum) - STATE_BEGIN_REV0;
char [] ch = new char[2];
if (seek_region >= 1000)
{
record.countryCode = "US";
record.countryName = "United States";
ch[0] = (char)(((seek_region - 1000)/26) + 65);
ch[1] = (char)(((seek_region - 1000)%26) + 65);
record.region = new String(ch);
}
else
{
record.countryCode = countryCode[seek_region];
record.countryName = countryName[seek_region];
record.region = "";
}
}
else if (databaseType == DatabaseInfo.REGION_EDITION_REV1)
{
seek_region = SeekCountry(ipnum) - STATE_BEGIN_REV1;
char [] ch = new char[2];
if (seek_region < US_OFFSET)
{
record.countryCode = "";
record.countryName = "";
record.region = "";
} else if (seek_region < CANADA_OFFSET)
{
record.countryCode = "US";
record.countryName = "United States";
ch[0] = (char)(((seek_region - US_OFFSET)/26) + 65);
ch[1] = (char)(((seek_region - US_OFFSET)%26) + 65);
record.region = new String(ch);
} else if (seek_region < WORLD_OFFSET)
{
record.countryCode = "CA";
record.countryName = "Canada";
ch[0] = (char)(((seek_region - CANADA_OFFSET)/26) + 65);
ch[1] = (char)(((seek_region - CANADA_OFFSET)%26) + 65);
record.region = new String(ch);
}
else
{
record.countryCode = countryCode[(seek_region - WORLD_OFFSET) / FIPS_RANGE];
record.countryName = countryName[(seek_region - WORLD_OFFSET) / FIPS_RANGE];
record.region = "";
}
}
return record;
}
public Location getLocation(IPAddress addr)
{
return getLocation(bytestoLong(addr.GetAddressBytes()));
}
public Location getLocationV6(String str)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
return getLocationV6(addr);
}
public Location getLocation(String str)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
return getLocation(bytestoLong(addr.GetAddressBytes()));
}
[MethodImpl(MethodImplOptions.Synchronized)]
public Location getLocationV6(IPAddress addr)
{
int record_pointer;
byte[] record_buf = new byte[FULL_RECORD_LENGTH];
char[] record_buf2 = new char[FULL_RECORD_LENGTH];
int record_buf_offset = 0;
Location record = new Location();
int str_length = 0;
int j, Seek_country;
double latitude = 0, longitude = 0;
try
{
Seek_country = SeekCountryV6(addr);
if (Seek_country == databaseSegments[0])
return null;
record_pointer = Seek_country + ((2 * recordLength - 1) * databaseSegments[0]);
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
Array.Copy(dbbuffer, record_pointer, record_buf, 0, Math.Min(dbbuffer.Length - record_pointer, FULL_RECORD_LENGTH));
else
{
lock (ioLock)
{
file.Seek(record_pointer,SeekOrigin.Begin);
file.Read(record_buf,0,FULL_RECORD_LENGTH);
}
}
for (int a0 = 0;a0 < FULL_RECORD_LENGTH;a0++)
record_buf2[a0] = Convert.ToChar(record_buf[a0]);
// get country
record.countryCode = countryCode[unsignedByteToInt(record_buf[0])];
record.countryName = countryName[unsignedByteToInt(record_buf[0])];
record_buf_offset++;
// get region
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.region = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += str_length + 1;
str_length = 0;
// get region_name
record.regionName = RegionName.getRegionName( record.countryCode, record.region );
// get city
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.city = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += (str_length + 1);
str_length = 0;
// get postal code
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.postalCode = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += (str_length + 1);
// get latitude
for (j = 0; j < 3; j++)
latitude += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.latitude = (float)latitude/10000 - 180;
record_buf_offset += 3;
// get longitude
for (j = 0; j < 3; j++)
longitude += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.longitude = (float)longitude/10000 - 180;
record.metro_code = record.dma_code = 0;
record.area_code = 0;
if (databaseType == DatabaseInfo.CITY_EDITION_REV1
||databaseType == DatabaseInfo.CITY_EDITION_REV1_V6)
{
// get metro_code
int metroarea_combo = 0;
if (record.countryCode == "US")
{
record_buf_offset += 3;
for (j = 0; j < 3; j++)
metroarea_combo += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.metro_code = record.dma_code = metroarea_combo/1000;
record.area_code = metroarea_combo % 1000;
}
}
}
catch (IOException)
{
Console.WriteLine("IO Exception while seting up segments");
}
return record;
}
[MethodImpl(MethodImplOptions.Synchronized)]
public Location getLocation(long ipnum)
{
int record_pointer;
byte[] record_buf = new byte[FULL_RECORD_LENGTH];
char[] record_buf2 = new char[FULL_RECORD_LENGTH];
int record_buf_offset = 0;
Location record = new Location();
int str_length = 0;
int j, Seek_country;
double latitude = 0, longitude = 0;
try
{
Seek_country = SeekCountry(ipnum);
if (Seek_country == databaseSegments[0])
return null;
record_pointer = Seek_country + ((2 * recordLength - 1) * databaseSegments[0]);
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
Array.Copy(dbbuffer, record_pointer, record_buf, 0, Math.Min(dbbuffer.Length - record_pointer, FULL_RECORD_LENGTH));
else
{
lock (ioLock)
{
file.Seek(record_pointer,SeekOrigin.Begin);
file.Read(record_buf,0,FULL_RECORD_LENGTH);
}
}
for (int a0 = 0;a0 < FULL_RECORD_LENGTH;a0++)
record_buf2[a0] = Convert.ToChar(record_buf[a0]);
// get country
record.countryCode = countryCode[unsignedByteToInt(record_buf[0])];
record.countryName = countryName[unsignedByteToInt(record_buf[0])];
record_buf_offset++;
// get region
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.region = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += str_length + 1;
str_length = 0;
// get region_name
record.regionName = RegionName.getRegionName(record.countryCode, record.region);
// get city
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.city = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += (str_length + 1);
str_length = 0;
// get postal code
while (record_buf[record_buf_offset + str_length] != '\0')
str_length++;
if (str_length > 0)
record.postalCode = new String(record_buf2, record_buf_offset, str_length);
record_buf_offset += (str_length + 1);
// get latitude
for (j = 0; j < 3; j++)
latitude += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.latitude = (float) latitude/10000 - 180;
record_buf_offset += 3;
// get longitude
for (j = 0; j < 3; j++)
longitude += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.longitude = (float) longitude/10000 - 180;
record.metro_code = record.dma_code = 0;
record.area_code = 0;
if (databaseType == DatabaseInfo.CITY_EDITION_REV1)
{
// get metro_code
int metroarea_combo = 0;
if (record.countryCode == "US"){
record_buf_offset += 3;
for (j = 0; j < 3; j++)
metroarea_combo += (unsignedByteToInt(record_buf[record_buf_offset + j]) << (j * 8));
record.metro_code = record.dma_code = metroarea_combo/1000;
record.area_code = metroarea_combo % 1000;
}
}
}
catch (IOException)
{
Console.WriteLine("IO Exception while seting up segments");
}
return record;
}
public String getOrg(IPAddress addr)
{
return getOrg(bytestoLong(addr.GetAddressBytes()));
}
public String getOrgV6(String str)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
return getOrgV6(addr);
}
public String getOrg(String str)
{
IPAddress addr;
try
{
addr = IPAddress.Parse(str);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return null;
}
return getOrg(bytestoLong(addr.GetAddressBytes()));
}
[MethodImpl(MethodImplOptions.Synchronized)]
public String getOrgV6( IPAddress addr)
{
int Seek_org;
int record_pointer;
int str_length = 0;
byte[] buf = new byte[MAX_ORG_RECORD_LENGTH];
char[] buf2 = new char[MAX_ORG_RECORD_LENGTH];
String org_buf;
try
{
Seek_org = SeekCountryV6(addr);
if (Seek_org == databaseSegments[0])
return null;
record_pointer = Seek_org + (2 * recordLength - 1) * databaseSegments[0];
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
Array.Copy(dbbuffer, record_pointer, buf, 0, Math.Min(dbbuffer.Length - record_pointer, MAX_ORG_RECORD_LENGTH));
else
{
lock (ioLock)
{
file.Seek(record_pointer,SeekOrigin.Begin);
file.Read(buf,0,MAX_ORG_RECORD_LENGTH);
}
}
while (buf[str_length] != 0)
{
buf2[str_length] = Convert.ToChar(buf[str_length]);
str_length++;
}
buf2[str_length] = '\0';
org_buf = new String(buf2,0,str_length);
return org_buf;
}
catch (IOException)
{
Console.WriteLine("IO Exception");
return null;
}
}
[MethodImpl(MethodImplOptions.Synchronized)]
public String getOrg(long ipnum)
{
int Seek_org;
int record_pointer;
int str_length = 0;
byte [] buf = new byte[MAX_ORG_RECORD_LENGTH];
char [] buf2 = new char[MAX_ORG_RECORD_LENGTH];
String org_buf;
try
{
Seek_org = SeekCountry(ipnum);
if (Seek_org == databaseSegments[0])
return null;
record_pointer = Seek_org + (2 * recordLength - 1) * databaseSegments[0];
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
Array.Copy(dbbuffer, record_pointer, buf, 0, Math.Min(dbbuffer.Length - record_pointer, MAX_ORG_RECORD_LENGTH));
else
{
lock (ioLock)
{
file.Seek(record_pointer,SeekOrigin.Begin);
file.Read(buf,0,MAX_ORG_RECORD_LENGTH);
}
}
while (buf[str_length] != 0)
{
buf2[str_length] = Convert.ToChar(buf[str_length]);
str_length++;
}
buf2[str_length] = '\0';
org_buf = new String(buf2, 0, str_length);
return org_buf;
}
catch (IOException)
{
Console.WriteLine("IO Exception");
return null;
}
}
[MethodImpl(MethodImplOptions.Synchronized)]
int SeekCountryV6(IPAddress ipAddress)
{
byte [] v6vec = ipAddress.GetAddressBytes();
byte [] buf = new byte[2 * MAX_RECORD_LENGTH];
int [] x = new int[2];
int offset = 0;
for (int depth = 127; depth >= 0; depth--)
{
try
{
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
{
for (int i = 0;i < (2 * MAX_RECORD_LENGTH);i++)
buf[i] = dbbuffer[i+(2 * recordLength * offset)];
}
else
{
lock (ioLock)
{
file.Seek(2 * recordLength * offset,SeekOrigin.Begin);
file.Read(buf,0,2 * MAX_RECORD_LENGTH);
}
}
}
catch (IOException)
{
Console.WriteLine("IO Exception");
}
for (int i = 0; i<2; i++)
{
x[i] = 0;
for (int j = 0; j<recordLength; j++)
{
int y = buf[(i*recordLength)+j];
if (y < 0)
{
y+= 256;
}
x[i] += (y << (j * 8));
}
}
int bnum = 127 - depth;
int idx = bnum >> 3;
int b_mask = 1 << ( bnum & 7 ^ 7 );
if ((v6vec[idx] & b_mask) > 0)
{
if (x[1] >= databaseSegments[0])
{
return x[1];
}
offset = x[1];
}
else
{
if (x[0] >= databaseSegments[0])
{
return x[0];
}
offset = x[0];
}
}
// shouldn't reach here
Console.WriteLine("Error Seeking country while Seeking " + ipAddress);
return 0;
}
[MethodImpl(MethodImplOptions.Synchronized)]
int SeekCountry(long ipAddress)
{
byte [] buf = new byte[2 * MAX_RECORD_LENGTH];
int [] x = new int[2];
int offset = 0;
for (int depth = 31; depth >= 0; depth--)
{
try
{
if ((dboptions & GEOIP_MEMORY_CACHE) == 1)
{
for (int i = 0;i < (2 * MAX_RECORD_LENGTH);i++)
{
buf[i] = dbbuffer[i+(2 * recordLength * offset)];
}
}
else
{
lock (ioLock)
{
file.Seek(2 * recordLength * offset,SeekOrigin.Begin);
file.Read(buf, 0, 2 * MAX_RECORD_LENGTH);
}
}
}
catch (IOException)
{
Console.WriteLine("IO Exception");
}
for (int i = 0; i<2; i++)
{
x[i] = 0;
for (int j = 0; j<recordLength; j++)
{
int y = buf[(i*recordLength)+j];
if (y < 0)
y+= 256;
x[i] += (y << (j * 8));
}
}
if ((ipAddress & (1 << depth)) > 0)
{
if (x[1] >= databaseSegments[0])
return x[1];
offset = x[1];
}
else
{
if (x[0] >= databaseSegments[0])
return x[0];
offset = x[0];
}
}
// shouldn't reach here
Console.WriteLine("Error Seeking country while Seeking " + ipAddress);
return 0;
}
static long swapbytes(long ipAddress)
{
return (((ipAddress>>0) & 255) << 24) | (((ipAddress>>8) & 255) << 16)
| (((ipAddress>>16) & 255) << 8) | (((ipAddress>>24) & 255) << 0);
}
static long bytestoLong(byte [] address)
{
long ipnum = 0;
for (int i = 0; i < 4; ++i)
{
long y = address[i];
if (y < 0)
y += 256;
ipnum += y << ((3-i)*8);
}
return ipnum;
}
static int unsignedByteToInt(byte b)
{
return (int) b & 0xFF;
}
}
}

View File

@@ -1,53 +0,0 @@
#region Copyright & License Information
/*
* Copyright (C) 2008 MaxMind Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#endregion
using System;
using System.IO;
public class Region
{
public String countryCode;
public String countryName;
public String region;
public Region() { }
public Region(String countryCode,String countryName,String region)
{
this.countryCode = countryCode;
this.countryName = countryName;
this.region = region;
}
public String getcountryCode()
{
return countryCode;
}
public String getcountryName()
{
return countryName;
}
public String getregion()
{
return region;
}
}

File diff suppressed because it is too large Load Diff

BIN
GeoLite2-Country.mmdb Normal file

Binary file not shown.

82
HACKING
View File

@@ -1,82 +0,0 @@
HACKING
There are n main sections to OpenRA: UI, Rendering, unit behaviour, ...
All units/structures/most things in the map are Actors. Actors contain a collection of traits.
Traits consist of an info class and a class that does stuff. There is one instance of the infoclass shared across all actors of the same type. Each actor gets its own instance of the trait class itself. Infoclasses are responsible for instantiating their corresponding trait class -- see ITraitInfo, and TraitInfo<T> for the trivial implementation of this. In some cases the trait class's constructor needs some args, in which case TraitInfo<T> can't be used. This is a limitation of C# generics.
Actor assembly is done via the mod's yaml files. A section exists for each actor type,
and within that section we list the traits the actor should have.
These get looked up in the loaded mod DLLs. Each trait can contain properties,
which are automatically loaded into the corresponding fields on the trait's ITraitInfo.
- Traits: look at TraitInterfaces.cs
We've tried to make individual traits implement as self-contained a unit of functionality
as possible - all cross-trait references should be in terms of an interface from
TraitInterfaces.cs.
- Things an actor can be *doing* are represented as Activity subclasses.
Actor has a queue of these. The standard set of activities are in OpenRA.Mods.RA/Activities. Ground vehicle movement is more complex, and has bits in OpenRA.Mods.RA/Move. Aircraft use different bits again, in OpenRA.Mods.RA/Air. There are some bits elsewhere for custom infantry behaviors, etc. In some cases, a trait or activity will maintain an internal subqueue of activities. This works exactly the same way as the actor's main activity queue -- its state is evolved by Util.RunActivity().
- Units offer orders they can perform (given context) through traits that implement IIssueOrder. There are two parts to this -- an Orders collection, which exposes IOrderTargeter objects, which describe orders that the actor *could* generate, and the rules for choosing which to perform when the "default action" button is pressed (RMB). The second part is IssueOrder() itself, which resolves an IOrderTargeter into an actual order object to be sent.
- For more complex things that require modal UI (like special abilities,
RA-style sell/repair buttons, etc) we have IOrderGenerator implementations. This can
completely replace the normal actors-provide-orders model temporarily. IOGs wiring is
provided through OpenRa.Game/Controller.cs (ToggleInputMode<T>, CancelInputMode)
- Things that don't affect gameplay, or (increasingly) are just transient are implemented as
IEffect, rather than real Actors. This is similar to the temp ents mechanism in many other
game engines.
- Most player-level or global-level game behavior is implemented as traits on special Player
and World actors. These are accessible via Player.PlayerActor and World.WorldActor. This
includes production queue support, ore/tiberium growth, various palette manipulation magic.
- Many traits can be modified by adding an appropriate IFooModifier implementation to the unit.
This includes rendering, where IRenderModifier allows you to define an arbitrary transform on
the Renderables emitted by the actor's IRender implementation(s). Examples are things like
cloaking, invisibility to certain players, flying units with shadows, etc. Other modifiers
can affect movement speed, damage taken, weapon firepower, etc.
Game code is collected into "Mod" units. Mods can be added prior to starting the game.
Currently there is no dependancy mechanism, but provided you are doing additions or overrides
you can add multiple mods without problem.
Everything is a mod (including RA - which is loaded by default).
The contents of the mod is defined in a manifest file mod.yaml. This lists the packages
containing art assets (typically .mix files), yaml files defining actor defintions,
and ini files containing legacy information that have yet to be ported over to
the (relatively new) yaml system.
The unit artwork itself must be defined in one or more sequences files. These are specified in the manifest. RA puts everything in mods/ra/sequences.yaml.
check mod.yaml for a list of what the mod uses); the format is self explanatory.
Chrome artwork is similarly defined in Chrome.xml. Chrome is already mod dependent. Sortof ;)
mod-dependent *behavior* would be nice too, not just skinning. This is a property of the traits
however; once we port UI into traits this will become a non-issue.
UserSettings stores the data loaded from settings.ini (or defaults). Eventually we need to be
able to save values changed in game into settings.ini (not yet implemented)
Bugs: There is a list of known bugs and features at http://bugs.open-ra.org/ .
We also have a website at http://www.open-ra.org/ .
Our IRC channel is #openra on irc.freenode.net .
As far as using git, get your own repository on github. Push your changes into your git repository, and it will/might :P be merged into http://github.com/OpenRA/OpenRA .
See http://help.github.com/ for working with GitHub and see http://progit.org/ for working
with Git.
Other things we probably want to put in here:
- A guide on how to add a generic unit via yaml using existing traits
- and then introduce some element that requires a simple trait change.
- how to set up a new mod (TC-style or mutator-style)
- VFS (OpenRa.FileFormats.FileSystem, Package, Folder classes)
- Trait inheritance (and the magicness of ^ActorType)
- Removing inherited traits (prepend `-` to the trait name)
- Multiple instances of a trait (`@` and all subsequent characters are ignored for
the purposes of looking up the trait.

64
INSTALL
View File

@@ -1,64 +0,0 @@
Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation. For more information,
see COPYING.
To run OpenRA, several files are needed from the original game disks.
A minimal asset pack can also be downloaded and installed by the game.
Windows
-------
* .NET Framework >= 3.5-SP1
(http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en)
* Cg Toolkit >= 2.2 (optional, for Cg renderer)
(https://developer.nvidia.com/cg-toolkit-download)
To compile OpenRA, open the OpenRA.sln solution in the main folder,
or build it from the command-line with MSBuild.
Execute `copy-dependencies.bat' to place the DLLs we conveniently
bundle for you. They include binaries of:
* http://libsdl.org/download-1.2.php
* http://gnuwin32.sourceforge.net/packages/freetype.htm
* http://gnuwin32.sourceforge.net/packages/zlib.htm
* http://kcat.strangesoft.net/openal.html
Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
Debian/Ubuntu
-------------
* mono-gmcs
* cli-common-dev (>= 2.10)
* freetype
* openal
* sdl
* nvidia-cg-toolkit (optional, for Cg renderer)
To compile OpenRA, run `make all' from the command line.
To grab the bundled CLI DLLs type `make dependencies'
Run with either `launch-game.sh' or `mono --debug OpenRA.Game.exe'.
Type 'sudo make install-all' for system wide installation. You
can then run from the `openra` shortcut.
Slackware
---------
The following packages from slackbuilds.org are required, on 13.37 32bit:
* libgdiplus
* mono
* openAL
* nvidia-cg-toolkit (optional, for Cg renderer)
openSUSE
--------
* mono-devel
* openal
* freetype2
* SDL
* cg (optional, for Cg renderer)

64
INSTALL.md Normal file
View File

@@ -0,0 +1,64 @@
To run OpenRA, several files are needed from the original game disks.
A minimal asset pack can also be downloaded and installed by the game.
The following lists per-platform dependencies required to build from source.
Windows
=======
* [.NET Framework >= 4.0 (Client Profile)](http://www.microsoft.com/en-us/download/details.aspx?id=17113)
* [SDL 2 (included)](http://www.libsdl.org/download-2.0.php)
* [FreeType (included)](http://gnuwin32.sourceforge.net/packages/freetype.htm)
* [zlib (included)](http://gnuwin32.sourceforge.net/packages/zlib.htm)
* [OpenAL (included)](http://kcat.strangesoft.net/openal.html)
To compile OpenRA, open the `OpenRA.sln` solution in the main folder,
or build it from the command-line with MSBuild.
Copy both the native DLLs from `.\thirdparty\windows`
and the CLI images from `.\thirdparty` to the main folder.
Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert
or `OpenRA.Game.exe Game.Mod=cnc` for Tiberian Dawn.
Linux
=====
Run `./configure` to map the native libraries to your system.
To compile OpenRA, run `make all` from the command line.
Run with either `launch-game.sh' or `mono --debug OpenRA.Game.exe'.
Type 'sudo make install-all' for system wide installation. You
can then run from the `openra` shortcut.
Debian/Ubuntu
-------------
* mono-dmcs
* libmono-winforms4.0-cil
* cli-common-dev (>= 2.10)
* freetype
* openal
Slackware
---------
The following packages from slackbuilds.org are required, on 13.37 32-bit:
* libgdiplus
* mono
* openAL
openSUSE
--------
* mono-devel
* openal
* freetype2
* SDL2
Gentoo
------
* dev-lang/mono
* dev-dotnet/libgdiplus
* media-libs/openal

347
Makefile
View File

@@ -6,12 +6,21 @@
# to compile with development tools, run:
# make all
#
# to check the official mods for erroneous yaml files, run:
# make test
#
# to generate documentation aimed at modders, run:
# make docs
#
# to install, run:
# make [prefix=/foo] [bindir=/bar/bin] install
#
# to install with development tools, run:
# make [prefix=/foo] [bindir=/bar/bin] install-all
#
# to install Linux startup scripts, desktop files and icons:
# make install-linux-shortcuts
#
# to uninstall, run:
# make uninstall
#
@@ -25,10 +34,10 @@
############################## TOOLCHAIN ###############################
#
CSC = gmcs
CSC = dmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll thirdparty/MaxMind.Db.dll thirdparty/MaxMind.GeoIP2.dll thirdparty/Eluant.dll
@@ -39,13 +48,17 @@ prefix ?= /usr/local
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib
gameinstalldir ?= $(libdir)/openra
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
DATA_INSTALL_DIR = $(DESTDIR)$(datadir)/openra
DATA_INSTALL_DIR = $(DESTDIR)$(gameinstalldir)
# install tools
RM = rm
RM_R = $(RM) -r
RM_F = $(RM) -f
RM_RF = $(RM) -rf
CP = cp
CP_R = $(CP) -r
INSTALL = install
@@ -54,8 +67,8 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = fileformats rcg rgl rsdl rnull game utility
TOOLS = editor tsbuild ralint
CORE = rsdl2 rnull game utility irc ralint
TOOLS = editor tsbuild crashdialog
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -64,122 +77,91 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
######################## PROGRAM TARGET RULES ##########################
#
# Core binaries
fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
fileformats_TARGET = OpenRA.FileFormats.dll
fileformats_KIND = library
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll
PROGRAMS = fileformats
fileformats: $(fileformats_TARGET)
geoip_SRCS := $(shell find GeoIP/ -iname '*.cs')
geoip_TARGET = GeoIP.dll
geoip_KIND = library
geoip_LIBS = $(COMMON_LIBS)
PROGRAMS += geoip
geoip: $(geoip_TARGET)
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_DEPS = $(fileformats_TARGET)
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/SDL2-CS.dll thirdparty/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs')
irc_TARGET = OpenRA.Irc.dll
irc_KIND = library
irc_DEPS = $(game_TARGET)
irc_LIBS = $(COMMON_LIBS) $(irc_DEPS)
PROGRAMS += irc
irc: $(irc_TARGET)
# Renderer dlls
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rsdl_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rcg_DEPS)
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rgl_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
$(rnull_DEPS)
PROGRAMS += rcg rgl rnull rsdl
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
rsdl2_DEPS = $(game_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/SDL2-CS.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rsdl2 rnull
renderers: $(rsdl2_TARGET) $(rnull_TARGET)
##### Official Mods #####
STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET)
STD_MOD_LIBS = $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
# Red Alert
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
mod_ra_KIND = library
mod_ra_DEPS = $(STD_MOD_DEPS) $(utility_TARGET) $(geoip_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(utility_TARGET) $(geoip_TARGET)
mod_ra_EXTRA_CMDS = mono --debug RALint.exe ra
PROGRAMS += mod_ra
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
mod_ra_KIND = library
mod_ra_DEPS = $(STD_MOD_DEPS) $(irc_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(irc_TARGET)
PROGRAMS += mod_ra
mod_ra: $(mod_ra_TARGET)
# Command and Conquer
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_cnc_EXTRA_CMDS = mono --debug RALint.exe cnc
PROGRAMS += mod_cnc
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_cnc
mod_cnc: $(mod_cnc_TARGET)
# Dune 2000
mod_d2k_SRCS := $(shell find OpenRA.Mods.D2k/ -iname '*.cs')
mod_d2k_TARGET = mods/d2k/OpenRA.Mods.D2k.dll
mod_d2k_KIND = library
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_d2k_EXTRA_CMDS = mono --debug RALint.exe d2k
PROGRAMS += mod_d2k
mod_d2k_SRCS := $(shell find OpenRA.Mods.D2k/ -iname '*.cs')
mod_d2k_TARGET = mods/d2k/OpenRA.Mods.D2k.dll
mod_d2k_KIND = library
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_TARGET)
# Tiberian Sun
mod_ts_SRCS := $(shell find OpenRA.Mods.TS/ -iname '*.cs')
mod_ts_TARGET = mods/ts/OpenRA.Mods.TS.dll
mod_ts_KIND = library
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_ts_EXTRA_CMDS = mono --debug RALint.exe ts
PROGRAMS += mod_ts
mod_ts_SRCS := $(shell find OpenRA.Mods.TS/ -iname '*.cs')
mod_ts_TARGET = mods/ts/OpenRA.Mods.TS.dll
mod_ts_KIND = library
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_ts
mod_ts: $(mod_ts_TARGET)
##### Tools #####
# Map Editor
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(game_TARGET)
editor_LIBS = System.Windows.Forms.dll System.Data.dll System.Drawing.dll $(editor_DEPS) thirdparty/Eluant.dll
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
PROGRAMS += editor
PROGRAMS += editor
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
OpenRA.Editor.Form1.resources:
@@ -187,22 +169,32 @@ OpenRA.Editor.Form1.resources:
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
# Analyses mod yaml for easy to detect errors
ralint_SRCS := $(shell find RALint/ -iname '*.cs')
ralint_TARGET = RALint.exe
ralint_KIND = exe
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint_SRCS := $(shell find OpenRA.Lint/ -iname '*.cs')
ralint_TARGET = OpenRA.Lint.exe
ralint_KIND = exe
ralint_DEPS = $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint: $(ralint_TARGET)
test:
@echo "OpenRA.Lint: checking Red Alert mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ra
@echo "OpenRA.Lint: checking Tiberian Dawn mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose cnc
@echo "OpenRA.Lint: checking Dune 2000 mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose d2k
@echo "OpenRA.Lint: checking Tiberian Sun mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ts
# Builds and exports tilesets from a bitmap
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
tsbuild_DEPS = $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
OpenRA.TilesetBuilder.FormBuilder.resources:
resgen2 OpenRA.TilesetBuilder/FormBuilder.resx OpenRA.TilesetBuilder.FormBuilder.resources 1> /dev/null
OpenRA.TilesetBuilder.FormNew.resources:
@@ -214,13 +206,22 @@ tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormN
##### Launchers / Utilities #####
crashdialog_SRCS := $(shell find OpenRA.CrashDialog/ -iname '*.cs')
crashdialog_TARGET = OpenRA.CrashDialog.exe
crashdialog_KIND = exe
crashdialog_DEPS = $(game_TARGET)
crashdialog_LIBS = $(COMMON_LIBS) $(crashdialog_DEPS) System.Windows.Forms.dll
crashdialog_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += crashdialog
crashdialog: $(crashdialog_TARGET)
# Backend for the launcher apps - queries game/mod info and applies actions to an install
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
utility_DEPS = $(fileformats_TARGET) $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll System.Windows.Forms.dll
PROGRAMS += utility
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
utility_DEPS = $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll
PROGRAMS += utility
utility: $(utility_TARGET)
@@ -251,28 +252,39 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
########################## MAKE/INSTALL RULES ##########################
#
default: dependencies core
default: cli-dependencies core
core: game renderers mods utility tsbuild
core: game renderers mods utility ralint
tools: editor tsbuild ralint
tools: editor tsbuild crashdialog
package: dependencies core editor docs version
package: dependencies core editor crashdialog docs version
mods: mod_ra mod_cnc mod_d2k mod_ts
all: dependencies core tools
all: cli-dependencies core tools
clean:
@-$(RM_F) *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_F) *.exe *.dll ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_RF) ./*/bin ./*/obj
distclean: clean
dependencies:
@ $(CP_R) thirdparty/*.dl* .
@ $(CP_R) thirdparty/Tao/* .
platformdeps = "linux"
ifeq ($(shell uname),Darwin)
platformdeps = "osx"
endif
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml
dependencies: cli-dependencies native-dependencies
cli-dependencies:
@ $(CP_R) thirdparty/*.dll .
@ $(CP_R) thirdparty/*.dll.config .
native-dependencies:
@ $(CP_R) thirdparty/${platformdeps}/* .
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml
@for i in $? ; do \
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
mv -f $${i}.tmp $${i} ; \
@@ -281,70 +293,96 @@ version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml
# Documentation (d2k depends on all mod libraries)
docs: utility
@mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe --lua-docs ra > Lua-API.md
install: install-core
install-all: install-core install-tools
install-linux-shortcuts: install-linux-scripts install-linux-icons install-linux-desktop
install-core: default
@-echo "Installing OpenRA to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
@$(CP_R) mods/common "$(DATA_INSTALL_DIR)/mods/"
@$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) "$(DATA_INSTALL_DIR)/mods/cnc"
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_ra_TARGET) "$(DATA_INSTALL_DIR)/mods/ra"
@$(CP_R) mods/d2k "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_d2k_TARGET) "$(DATA_INSTALL_DIR)/mods/d2k"
@$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
@$(INSTALL_DATA) "GeoIP.dat" "$(DATA_INSTALL_DIR)/GeoIP.dat"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb"
@$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
@$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
@$(CP_R) glsl "$(DATA_INSTALL_DIR)"
@$(CP_R) cg "$(DATA_INSTALL_DIR)"
@$(CP_R) lua "$(DATA_INSTALL_DIR)"
@$(CP) *.ttf "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/SharpFont.dll "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/SharpFont.dll.config "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll "$(DATA_INSTALL_DIR)"
@$(CP) SDL2-CS* "$(DATA_INSTALL_DIR)"
@$(CP) Eluant* "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) SharpFont.dll "$(DATA_INSTALL_DIR)"
@$(CP) SharpFont.dll.config "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Mono.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) KopiLua.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) NLua.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) MaxMind.Db.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) MaxMind.GeoIP2.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
@echo "#!/bin/sh" > openra
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra
@echo 'cd "$${DATADIR}/openra"' >> openra
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
ifeq ($(shell uname),Linux)
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
endif
install-tools: tools
@-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@echo "#!/bin/sh" > openra-editor
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor
@echo 'cd "$${DATADIR}/openra"' >> openra-editor
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
install-linux-icons:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
@$(CP_R) packaging/linux/hicolor/ "$(DESTDIR)$(datadir)/icons"
install-linux-desktop:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-editor.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
@echo "#!/bin/sh" > openra-editor
@echo 'cd "$(gameinstalldir)"' >> openra-editor
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra-editor "$(BIN_INSTALL_DIR)"
@-$(RM) openra-editor
uninstall:
@-$(RM_R) "$(DATA_INSTALL_DIR)"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra"
@-$(RM_F) "$(BIN_INSTALL_DIR)/openra-editor"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/applications/openra-editor.desktop"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/16x16/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/32x32/apps/openra-editor.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/48x48/apps/openra-editor.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/openra.png"
@-$(RM_F) "$(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/openra.png"
help:
@echo to compile, run:
@@ -353,12 +391,21 @@ help:
@echo to compile with development tools, run:
@echo \ \ make all
@echo
@echo to check the official mods for erroneous yaml files, run:
@echo \ \ make test
@echo
@echo to generate documentation aimed at modders, run:
@echo \ \ make docs
@echo
@echo to install, run:
@echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install
@echo
@echo to install with development tools, run:
@echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all
@echo
@echo to install Linux startup scripts, desktop files and icons
@echo \ \ make install-linux-shortcuts
@echo
@echo to uninstall, run:
@echo \ \ make uninstall
@echo

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{47F1B0EE-EB35-47F2-93E4-273C70909157}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>OpenRA</RootNamespace>
<AssemblyName>OpenRA.CrashDialog</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\</OutputPath>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>OpenRA.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Drawing" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="OpenRA.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -11,15 +11,22 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Media;
using System.Reflection;
using System.Windows.Forms;
using OpenRA;
namespace OpenRA
namespace OpenRA.CrashDialog
{
public static class FatalErrorDialog
class FatalErrorDialog
{
public static void Show()
static Settings settings;
[STAThread]
public static void Main(string[] args)
{
settings = new Settings(Platform.SupportDir + "settings.yaml", new Arguments());
var form = new Form
{
Size = new Size(315, 140),
@@ -27,7 +34,8 @@ namespace OpenRA
MinimizeBox = false,
MaximizeBox = false,
FormBorderStyle = FormBorderStyle.FixedDialog,
StartPosition = FormStartPosition.CenterScreen
StartPosition = FormStartPosition.CenterScreen,
Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location)
};
var notice = new Label
@@ -76,8 +84,8 @@ namespace OpenRA
form.FormClosed += (sender, e) =>
{
Game.Settings.Debug.ShowFatalErrorDialog = !dontShowAgain.Checked;
Game.Settings.Save();
settings.Debug.ShowFatalErrorDialog = !dontShowAgain.Checked;
settings.Save();
};
SystemSounds.Exclamation.Play();
@@ -88,7 +96,7 @@ namespace OpenRA
{
try
{
Process.Start(Log.LogPath);
Process.Start(Platform.SupportDir + "Logs" + Path.DirectorySeparatorChar);
}
catch { }
}
@@ -97,7 +105,7 @@ namespace OpenRA
{
try
{
Process.Start(Game.Settings.Debug.FatalErrorDialogFaq);
Process.Start(settings.Debug.FatalErrorDialogFaq);
}
catch { }
}

View File

@@ -9,7 +9,6 @@
#endregion
using System.Drawing;
using OpenRA.GameRules;
using OpenRA.Traits;
namespace OpenRA.Editor

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Editor
};
}
string NextActorName(Surface surface)
static string NextActorName(Surface surface)
{
var id = 0;
for (;;)

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Editor
if (surface.Map.IsInMap(new CVec(u, v) + pos))
{
var z = u + v * template.Size.X;
if (tile[z] != null)
if (tile[z].Length > 0)
surface.Map.MapTiles.Value[u + pos.X, v + pos.Y] =
new TileReference<ushort, byte>
{
@@ -63,8 +63,8 @@ namespace OpenRA.Editor
public void Preview(Surface surface, SGraphics g)
{
g.DrawImage(brushTemplate.Bitmap,
surface.TileSetRenderer.TileSize.Width * surface.GetBrushLocation().X * surface.Zoom + surface.GetOffset().X,
surface.TileSetRenderer.TileSize.Height * surface.GetBrushLocation().Y * surface.Zoom + surface.GetOffset().Y,
surface.TileSetRenderer.TileSize * surface.GetBrushLocation().X * surface.Zoom + surface.GetOffset().X,
surface.TileSetRenderer.TileSize * surface.GetBrushLocation().Y * surface.Zoom + surface.GetOffset().Y,
brushTemplate.Bitmap.Width * surface.Zoom,
brushTemplate.Bitmap.Height * surface.Zoom);
}
@@ -88,7 +88,7 @@ namespace OpenRA.Editor
while (queue.Count > 0)
{
var p = queue.Dequeue();
if (!s.Map.MapTiles.Value[p.X, p.Y].Equals(replace))
if (s.Map.MapTiles.Value[p.X, p.Y].Type != replace.Type)
continue;
var a = FindEdge(s, p, new CVec(-1, 0), replace);
@@ -97,9 +97,9 @@ namespace OpenRA.Editor
for (var x = a.X; x <= b.X; x++)
{
s.Map.MapTiles.Value[x, p.Y] = new TileReference<ushort, byte> { Type = brushTemplate.N, Index = (byte)0 };
if (s.Map.MapTiles.Value[x, p.Y - 1].Equals(replace))
if (s.Map.MapTiles.Value[x, p.Y - 1].Type == replace.Type)
maybeEnqueue(x, p.Y - 1);
if (s.Map.MapTiles.Value[x, p.Y + 1].Equals(replace))
if (s.Map.MapTiles.Value[x, p.Y + 1].Type == replace.Type)
maybeEnqueue(x, p.Y + 1);
}
}
@@ -109,13 +109,13 @@ namespace OpenRA.Editor
s.Chunks.Clear();
}
CPos FindEdge(Surface s, CPos p, CVec d, TileReference<ushort, byte> replace)
static CPos FindEdge(Surface s, CPos p, CVec d, TileReference<ushort, byte> replace)
{
for (;;)
{
var q = p + d;
if (!s.Map.IsInMap(q)) return p;
if (!s.Map.MapTiles.Value[q.X, q.Y].Equals(replace)) return p;
if (s.Map.MapTiles.Value[q.X, q.Y].Type != replace.Type) return p;
p = q;
}
}

View File

@@ -85,8 +85,6 @@ namespace OpenRA.Editor
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.redAlertMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.miniMapExport = new System.Windows.Forms.ToolStripMenuItem();
this.miniMapToPng = new System.Windows.Forms.ToolStripMenuItem();
this.fullMapRenderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -582,7 +580,6 @@ namespace OpenRA.Editor
this.saveToolStripMenuItem,
this.saveAsToolStripMenuItem,
this.toolStripSeparator2,
this.toolStripMenuItem1,
this.miniMapExport,
this.toolStripSeparator3,
this.exitToolStripMenuItem});
@@ -639,25 +636,6 @@ namespace OpenRA.Editor
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(120, 6);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.redAlertMapToolStripMenuItem});
this.toolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem1.Image")));
this.toolStripMenuItem1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(123, 22);
this.toolStripMenuItem1.Text = "&Import";
//
// cCRedAlertMapToolStripMenuItem
//
this.redAlertMapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cCRedAlertMapToolStripMenuItem.Image")));
this.redAlertMapToolStripMenuItem.Name = "cCRedAlertMapToolStripMenuItem";
this.redAlertMapToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
this.redAlertMapToolStripMenuItem.Text = "&Legacy Map Format...";
this.redAlertMapToolStripMenuItem.ToolTipText = "Import an original C&C / Red Alert and convert it to the .oramap format.";
this.redAlertMapToolStripMenuItem.Click += new System.EventHandler(this.ImportLegacyMapClicked);
//
// mnuExport
//
this.miniMapExport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -1097,8 +1075,6 @@ namespace OpenRA.Editor
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem redAlertMapToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem miniMapExport;
private System.Windows.Forms.ToolStripMenuItem miniMapToPng;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -14,7 +14,7 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
@@ -25,11 +25,11 @@ namespace OpenRA.Editor
public Form1(string[] args)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
currentMod = args.FirstOrDefault() ?? "ra";
toolStripComboBox1.Items.AddRange(Mod.AllMods.Keys.ToArray());
toolStripComboBox1.Items.AddRange(ModMetadata.AllMods.Keys.ToArray());
toolStripComboBox1.SelectedIndexChanged += (_, e) =>
{
@@ -47,11 +47,11 @@ namespace OpenRA.Editor
currentMod = toolStripComboBox1.SelectedItem as string;
Game.modData = new ModData(currentMod);
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Program.Rules = Game.modData.RulesetCache.LoadDefaultRules();
var mod = Game.modData.Manifest.Mods[0];
Text = "{0} Mod Version: {1} - OpenRA Editor".F(Mod.AllMods[mod].Title, Mod.AllMods[mod].Version);
var mod = Game.modData.Manifest.Mod;
Text = "{0} Mod Version: {1} - OpenRA Editor".F(mod.Title, mod.Version);
loadedMapName = null;
};
@@ -69,7 +69,8 @@ namespace OpenRA.Editor
void OnMapChanged()
{
MakeDirty();
miniMapBox.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
var tileSet = Program.Rules.TileSets[surface1.Map.Tileset];
miniMapBox.Image = Minimap.RenderMapPreview(tileSet, surface1.Map, true);
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
}
@@ -84,7 +85,7 @@ namespace OpenRA.Editor
var objSaved = kv.Value.Save();
// TODO: make this work properly
foreach (var init in Rules.Info[kv.Value.Type].GetInitKeys())
foreach (var init in Program.Rules.Actors[kv.Value.Type].GetInitKeys())
apd.AddRow(init.First,
apd.MakeEditorControl(init.Second,
() => objSaved.NodesDict.ContainsKey(init.First) ? objSaved.NodesDict[init.First].Value : null,
@@ -120,7 +121,7 @@ namespace OpenRA.Editor
if (map.Players.Count == 0)
map.MakeDefaultPlayers();
PrepareMapResources(Game.modData.Manifest, map);
PrepareMapResources(Game.modData, map);
// Calculate total net worth of resources in cash
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
@@ -135,23 +136,24 @@ namespace OpenRA.Editor
resourcePalette.Controls.Clear();
loadedMapName = null;
PrepareMapResources(Game.modData.Manifest, map);
PrepareMapResources(Game.modData, map);
MakeDirty();
}
// this code is insanely stupid, and mostly my fault -- chrisf
void PrepareMapResources(Manifest manifest, Map map)
void PrepareMapResources(ModData modData, Map map)
{
Rules.LoadRules(manifest, map);
tileset = Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, new Size(manifest.TileSize, manifest.TileSize));
Program.Rules = map.Rules;
tileset = Program.Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, modData.Manifest.TileSize);
var shadowIndex = new int[] { 3, 4 };
var palette = new Palette(FileSystem.Open(tileset.Palette), shadowIndex);
var palette = new Palette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
var shadowedPalette = new Palette(FileSystem.Open(playerPalette), shadowIndex);
var shadowedPalette = new Palette(GlobalFileSystem.Open(playerPalette), shadowIndex);
surface1.Bind(map, tileset, tilesetRenderer, palette, shadowedPalette);
@@ -208,11 +210,11 @@ namespace OpenRA.Editor
var actorTemplates = new List<ActorTemplate>();
foreach (var a in Rules.Info.Keys)
foreach (var a in Program.Rules.Actors.Keys)
{
try
{
var info = Rules.Info[a];
var info = Program.Rules.Actors[a];
if (!info.Traits.Contains<RenderSimpleInfo>()) continue;
var etf = info.Traits.GetOrDefault<EditorTilesetFilterInfo>();
@@ -253,7 +255,7 @@ namespace OpenRA.Editor
var resourceTemplates = new List<ResourceTemplate>();
foreach (var a in Rules.Info["world"].Traits.WithInterface<ResourceTypeInfo>())
foreach (var a in Program.Rules.Actors["world"].Traits.WithInterface<ResourceTypeInfo>())
{
try
{
@@ -286,7 +288,7 @@ namespace OpenRA.Editor
p.ResumeLayout();
}
miniMapBox.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
miniMapBox.Image = Minimap.RenderMapPreview(tileset, surface1.Map, true);
propertiesToolStripMenuItem.Enabled = true;
toolStripMenuItemProperties.Enabled = true;
@@ -305,7 +307,7 @@ namespace OpenRA.Editor
actorOwnerChooser.Items.Clear();
actorOwnerChooser.Items.AddRange(surface1.Map.Players.Values.ToArray());
actorOwnerChooser.SelectedIndex = 0;
surface1.NewActorOwner = (actorOwnerChooser.SelectedItem as PlayerReference).Name;
surface1.NewActorOwner = ((PlayerReference)actorOwnerChooser.SelectedItem).Name;
}
void ResizeClicked(object sender, EventArgs e)
@@ -343,6 +345,7 @@ namespace OpenRA.Editor
SaveAsClicked(sender, e);
else
{
surface1.Map.RequiresMod = currentMod;
surface1.Map.Save(loadedMapName);
dirty = false;
}
@@ -378,7 +381,7 @@ namespace OpenRA.Editor
nms.ButtonOkay.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())
LoadMap(nms.NewText.Tag as string);
LoadMap((string)nms.NewText.Tag);
}
}
@@ -387,12 +390,13 @@ namespace OpenRA.Editor
using (var nmd = new NewMapDialog())
{
nmd.TheaterBox.Items.Clear();
nmd.TheaterBox.Items.AddRange(Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.TheaterBox.Items.AddRange(Program.Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.TheaterBox.SelectedIndex = 0;
if (DialogResult.OK == nmd.ShowDialog())
{
var map = Map.FromTileset(nmd.TheaterBox.SelectedItem as string);
var tileset = Program.Rules.TileSets[nmd.TheaterBox.SelectedItem as string];
var map = Map.FromTileset(tileset);
map.Resize((int)nmd.MapWidth.Value, (int)nmd.MapHeight.Value);
map.ResizeCordon((int)nmd.CordonLeft.Value, (int)nmd.CordonTop.Value,
@@ -400,6 +404,7 @@ namespace OpenRA.Editor
map.Players.Clear();
map.MakeDefaultPlayers();
map.FixOpenAreas(Program.Rules);
NewMap(map);
}
@@ -435,37 +440,6 @@ namespace OpenRA.Editor
Close();
}
void ImportLegacyMapClicked(object sender, EventArgs e)
{
using (var ofd = new OpenFileDialog { RestoreDirectory = true,
Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" })
if (DialogResult.OK == ofd.ShowDialog())
{
/* massive hack: we should be able to call NewMap() with the imported Map object,
* but something's not right internally in it, unless loaded via the real maploader */
var savePath = Path.Combine(Path.GetTempPath(), "OpenRA.Import");
Directory.CreateDirectory(savePath);
var errors = new List<string>();
var map = LegacyMapImporter.Import(ofd.FileName, a => errors.Add(a));
if (errors.Count > 0)
using (var eld = new ErrorListDialog(errors))
eld.ShowDialog();
map.MakeDefaultPlayers();
map.Save(savePath);
LoadMap(savePath);
loadedMapName = null; /* editor needs to think this hasnt been saved */
Directory.Delete(savePath, true);
MakeDirty();
}
}
void OnFormClosing(object sender, FormClosingEventArgs e)
{
if (!dirty) return;
@@ -513,18 +487,7 @@ namespace OpenRA.Editor
void FixOpenAreas(object sender, EventArgs e)
{
dirty = true;
var r = new Random();
for (var j = surface1.Map.Bounds.Top; j < surface1.Map.Bounds.Bottom; j++)
for (var i = surface1.Map.Bounds.Left; i < surface1.Map.Bounds.Right; i++)
{
var tr = surface1.Map.MapTiles.Value[i, j];
if (tr.Type == 0xff || tr.Type == 0xffff || tr.Type == 1 || tr.Type == 2)
tr.Index = (byte)r.Next(0, surface1.TileSetRenderer.Data(tr.Type).Count);
surface1.Map.MapTiles.Value[i, j] = tr;
}
surface1.Map.FixOpenAreas(Program.Rules);
surface1.Chunks.Clear();
surface1.Invalidate();
}
@@ -544,7 +507,7 @@ namespace OpenRA.Editor
void DrawPlayerListItem(object sender, DrawItemEventArgs e)
{
// color block
var player = e.Index >= 0 ? (PlayerReference)(sender as ComboBox).Items[e.Index] : null;
var player = e.Index >= 0 ? (PlayerReference)((ComboBox)sender).Items[e.Index] : null;
e.DrawBackground();
e.DrawFocusRectangle();
@@ -572,17 +535,17 @@ namespace OpenRA.Editor
void OpenRAWebsiteToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.open-ra.org");
System.Diagnostics.Process.Start("http://www.openra.net");
}
void OpenRAResourcesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://content.open-ra.org");
System.Diagnostics.Process.Start("http://resource.openra.net");
}
void WikiDocumentationToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/wiki");
System.Diagnostics.Process.Start("http://wiki.openra.net");
}
void DiscussionForumsToolStripMenuItemClick(object sender, EventArgs e)
@@ -592,12 +555,12 @@ namespace OpenRA.Editor
void IssueTrackerToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/issues");
System.Diagnostics.Process.Start("http://bugs.openra.net");
}
void DeveloperBountiesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.bountysource.com/#repos/OpenRA/OpenRA");
System.Diagnostics.Process.Start("https://www.bountysource.com/trackers/36085-openra");
}
void SourceCodeToolStripMenuItemClick(object sender, EventArgs e)
@@ -615,7 +578,7 @@ namespace OpenRA.Editor
void HelpToolStripButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/wiki/Mapping");
System.Diagnostics.Process.Start("http://wiki.openra.net/Mapping");
}
void ToolStripMenuItemNewClick(object sender, EventArgs e)
@@ -700,7 +663,7 @@ namespace OpenRA.Editor
{
int imageLength = 0;
int type = surface1.Map.MapResources.Value[x, y].Type;
var template = surface1.ResourceTemplates.Where(a => a.Value.Info.ResourceType == type).FirstOrDefault().Value;
var template = surface1.ResourceTemplates.FirstOrDefault(a => a.Value.Info.ResourceType == type).Value;
if (type == 1)
imageLength = 12;
else if (type == 2)
@@ -753,4 +716,4 @@ namespace OpenRA.Editor
surface1.IsErasing = eraserToolStripButton.Checked;
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -45,7 +45,7 @@ namespace OpenRA.Editor
if (DirectoryIsEmpty(MapFolderPath))
return;
foreach (var map in ModData.FindMapsIn(MapFolderPath))
foreach (var map in MapCache.FindMapsIn(MapFolderPath))
{
ListViewItem map1 = new ListViewItem();
map1.Tag = map;
@@ -66,7 +66,7 @@ namespace OpenRA.Editor
NewText.Text = MapList.SelectedItems[0].Text;
NewText.Tag = MapList.SelectedItems[0].Tag;
var map = new Map(NewText.Tag as string);
var map = new Map((string)NewText.Tag);
TitleText.Text = map.Title;
AuthorText.Text = map.Author;
TheaterText.Text = map.Tileset;
@@ -75,11 +75,12 @@ namespace OpenRA.Editor
try
{
MiniMapBox.Image = Minimap.AddStaticResources(map, Minimap.TerrainBitmap(map, true));
var tileset = Program.Rules.TileSets[map.Tileset];
MiniMapBox.Image = Minimap.RenderMapPreview(tileset, map, true);
}
catch (Exception ed)
{
Console.WriteLine("No map preview image found: {0}", ed.ToString());
Console.WriteLine("No map preview image found: {0}", ed);
}
}
}

View File

@@ -10,7 +10,6 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Editor</RootNamespace>
<AssemblyName>OpenRA.Editor</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>OpenRA.Editor.Icon.ico</ApplicationIcon>
<FileUpgradeFlags>
@@ -60,18 +59,21 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Eluant">
<HintPath>..\thirdparty\Eluant.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActorPropertiesDialog.cs">
@@ -96,7 +98,6 @@
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ITool.cs" />
<Compile Include="LegacyMapImporter.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
@@ -165,12 +166,9 @@
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TileSetRenderer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
<Name>OpenRA.FileFormats</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -19,17 +19,12 @@ namespace OpenRA.Editor
{
static class Program
{
public static Ruleset Rules;
[STAThread]
static void Main(string[] args)
{
if (args.Length >= 2 && args[0] == "--convert")
{
Game.modData = new ModData(args[1]);
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
UpgradeMaps(args[1]);
return;
}
Log.AddChannel("perf", null);
Application.CurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles();
@@ -37,23 +32,5 @@ namespace OpenRA.Editor
Application.Run(new Form1(args));
}
static void UpgradeMaps(string mod)
{
var mapFolderPath = new string[] { Environment.CurrentDirectory, "mods", mod, "maps" }
.Aggregate(Path.Combine);
foreach (var path in ModData.FindMapsIn(mapFolderPath))
{
var map = new Map(path);
// Touch the lazy bits to initialize them
map.Actors.Force();
map.Smudges.Force();
map.MapTiles.Force();
map.MapResources.Force();
map.Save(path);
}
}
}
}

View File

@@ -8,21 +8,25 @@
*/
#endregion
using System;
using System.Collections;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ShpReader shp, Palette p)
static Bitmap RenderShp(ISpriteSource shp, Palette p)
{
var frame = shp[0];
var frame = shp.Frames.First();
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
@@ -34,9 +38,9 @@ namespace OpenRA.Editor
byte* q = (byte*)data.Scan0.ToPointer();
var stride2 = data.Stride;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride2 + i] = frame.Image[i + shp.Width * j];
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride2 + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
@@ -47,14 +51,14 @@ namespace OpenRA.Editor
{
var image = RenderSprites.GetImage(info);
using (var s = FileSystem.OpenWithExts(image, tileset.Extensions))
using (var s = GlobalFileSystem.OpenWithExts(image, tileset.Extensions))
{
var shp = new ShpReader(s);
var bitmap = RenderShp(shp, p);
try
{
using (var s2 = FileSystem.OpenWithExts(image + "2", tileset.Extensions))
using (var s2 = GlobalFileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpReader(s2);
var roofBitmap = RenderShp(shp2, p);
@@ -76,13 +80,14 @@ namespace OpenRA.Editor
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
{
var image = info.SpriteNames[0];
using (var s = FileSystem.OpenWithExts(image, exts))
var image = info.EditorSprite;
using (var s = GlobalFileSystem.OpenWithExts(image, exts))
{
var shp = new ShpReader(s);
var frame = shp[shp.ImageCount - 1];
// TODO: Do this properly
var shp = new ShpReader(s) as ISpriteSource;
var frame = shp.Frames.Last();
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
@@ -92,13 +97,13 @@ namespace OpenRA.Editor
byte* q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride + i] = frame.Image[i + shp.Width * j];
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.ImageCount - 1 };
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.Frames.Count() - 1 };
}
}
}

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Editor
= new TileReference<byte, byte>
{
Type = (byte)resourceTemplate.Info.ResourceType,
Index = (byte)random.Next(resourceTemplate.Info.SpriteNames.Length)
Index = (byte)random.Next(resourceTemplate.Info.MaxDensity)
};
var ch = new int2(surface.GetBrushLocation().X / Surface.ChunkSize,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -14,7 +14,9 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
using SGraphics = System.Drawing.Graphics;
@@ -107,7 +109,6 @@ namespace OpenRA.Editor
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
public Surface()
: base()
{
BackColor = Color.Black;
@@ -258,7 +259,7 @@ namespace OpenRA.Editor
Bitmap RenderChunk(int u, int v)
{
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize.Width, ChunkSize * TileSetRenderer.TileSize.Height);
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize, ChunkSize * TileSetRenderer.TileSize);
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
@@ -275,9 +276,9 @@ namespace OpenRA.Editor
var tile = TileSetRenderer.Data(tr.Type);
var index = (tr.Index < tile.Count) ? tr.Index : (byte)0;
var rawImage = tile[index];
for (var x = 0; x < TileSetRenderer.TileSize.Width; x++)
for (var y = 0; y < TileSetRenderer.TileSize.Height; y++)
p[(j * TileSetRenderer.TileSize.Width + y) * stride + i * TileSetRenderer.TileSize.Width + x] = Palette.GetColor(rawImage[x + TileSetRenderer.TileSize.Width * y]).ToArgb();
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = Palette.GetColor(rawImage[x + TileSetRenderer.TileSize * y]).ToArgb();
if (Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].Type != 0)
{
@@ -288,12 +289,12 @@ namespace OpenRA.Editor
int* q = (int*)srcdata.Scan0.ToPointer();
var srcstride = srcdata.Stride >> 2;
for (var x = 0; x < TileSetRenderer.TileSize.Width; x++)
for (var y = 0; y < TileSetRenderer.TileSize.Height; y++)
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
{
var c = q[y * srcstride + x];
if ((c & 0xff000000) != 0) /* quick & dirty, i cbf doing real alpha */
p[(j * TileSetRenderer.TileSize.Width + y) * stride + i * TileSetRenderer.TileSize.Width + x] = c;
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = c;
}
resourceImage.UnlockBits(srcdata);
@@ -304,14 +305,16 @@ namespace OpenRA.Editor
bitmap.UnlockBits(data);
if (ShowGrid)
{
using (var g = SGraphics.FromImage(bitmap))
{
var ts = Game.modData.Manifest.TileSize;
var rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
ControlPaint.DrawGrid(g, rect, new Size(2, Game.CellSize), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(Game.CellSize, 2), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(Game.CellSize, Game.CellSize), Color.Red);
ControlPaint.DrawGrid(g, rect, new Size(2, ts.Height), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, 2), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, ts.Height), Color.Red);
}
}
return bitmap;
}
@@ -319,15 +322,15 @@ namespace OpenRA.Editor
{
var vX = (int)Math.Floor((mousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((mousePos.Y - Offset.Y) / Zoom);
return new CPos(vX / TileSetRenderer.TileSize.Width, vY / TileSetRenderer.TileSize.Height);
return new CPos(vX / TileSetRenderer.TileSize, vY / TileSetRenderer.TileSize);
}
public CPos GetBrushLocationBR()
{
var vX = (int)Math.Floor((mousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((mousePos.Y - Offset.Y) / Zoom);
return new CPos((vX + TileSetRenderer.TileSize.Width - 1) / TileSetRenderer.TileSize.Width,
(vY + TileSetRenderer.TileSize.Height - 1) / TileSetRenderer.TileSize.Height);
return new CPos((vX + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize,
(vY + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
@@ -341,11 +344,11 @@ namespace OpenRA.Editor
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
{
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize.Width / 2 : 0;
float drawX = TileSetRenderer.TileSize.Width * location.X * Zoom + Offset.X - offsetX;
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize.Height / 2 : 0;
float drawY = TileSetRenderer.TileSize.Height * location.Y * Zoom + Offset.Y - offsetY;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
return new float2(drawX, drawY);
}
@@ -376,7 +379,7 @@ namespace OpenRA.Editor
ColorPalette GetPaletteForPlayerInner(string name)
{
var pr = Map.Players[name];
var pcpi = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>();
var pcpi = Program.Rules.Actors["player"].Traits.Get<PlayerColorPaletteInfo>();
var remap = new PlayerColorRemap(pcpi.RemapIndex, pr.Color, pcpi.Ramp);
return new Palette(PlayerPalette, remap).AsSystemPalette();
}
@@ -413,24 +416,24 @@ namespace OpenRA.Editor
var bmp = Chunks[x];
var drawX = TileSetRenderer.TileSize.Width * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize.Height * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
RectangleF sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
RectangleF destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom);
e.Graphics.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel);
}
e.Graphics.DrawRectangle(CordonPen,
Map.Bounds.Left * TileSetRenderer.TileSize.Width * Zoom + Offset.X,
Map.Bounds.Top * TileSetRenderer.TileSize.Height * Zoom + Offset.Y,
Map.Bounds.Width * TileSetRenderer.TileSize.Width * Zoom,
Map.Bounds.Height * TileSetRenderer.TileSize.Height * Zoom);
Map.Bounds.Left * TileSetRenderer.TileSize * Zoom + Offset.X,
Map.Bounds.Top * TileSetRenderer.TileSize * Zoom + Offset.Y,
Map.Bounds.Width * TileSetRenderer.TileSize * Zoom,
Map.Bounds.Height * TileSetRenderer.TileSize * Zoom);
e.Graphics.DrawRectangle(SelectionPen,
(SelectionStart.X * TileSetRenderer.TileSize.Width * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize.Height * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize.Width * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize.Height * Zoom);
(SelectionStart.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize * Zoom);
if (IsPaste)
{
@@ -439,10 +442,10 @@ namespace OpenRA.Editor
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
e.Graphics.DrawRectangle(PastePen,
(loc.X * TileSetRenderer.TileSize.Width * Zoom) + Offset.X,
(loc.Y * TileSetRenderer.TileSize.Height * Zoom) + Offset.Y,
width * (TileSetRenderer.TileSize.Width * Zoom),
height * (TileSetRenderer.TileSize.Height * Zoom));
(loc.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(loc.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
width * (TileSetRenderer.TileSize * Zoom),
height * (TileSetRenderer.TileSize * Zoom));
}
foreach (var ar in Map.Actors.Value)
@@ -458,8 +461,8 @@ namespace OpenRA.Editor
foreach (var ar in Map.Actors.Value)
if (!ar.Key.StartsWith("Actor")) // if it has a custom name
e.Graphics.DrawStringContrast(Font, ar.Key,
(int)(ar.Value.Location().X * TileSetRenderer.TileSize.Width * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize.Height * Zoom + Offset.Y),
(int)(ar.Value.Location().X * TileSetRenderer.TileSize * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize * Zoom + Offset.Y),
Brushes.White,
Brushes.Black);
@@ -469,7 +472,7 @@ namespace OpenRA.Editor
{
if (i % 8 == 0)
{
PointF point = new PointF(i * TileSetRenderer.TileSize.Width * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize.Height * Zoom + Offset.Y);
PointF point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
@@ -478,7 +481,7 @@ namespace OpenRA.Editor
{
if (i % 8 == 0)
{
PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize.Width * Zoom + Offset.X, i * TileSetRenderer.TileSize.Height * Zoom + Offset.Y);
PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
@@ -490,7 +493,7 @@ namespace OpenRA.Editor
if (currentTool == null)
{
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null)
if (x.Key != null && actorTemplates.ContainsKey(x.Value.Type))
DrawActorBorder(e.Graphics, x.Value.Location(), actorTemplates[x.Value.Type]);
}
}

View File

@@ -0,0 +1,134 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public class TileSetRenderer
{
public TileSet TileSet;
Dictionary<ushort, List<byte[]>> templates;
public readonly int TileSize;
// Extract a square tile that the editor can render
byte[] ExtractSquareTile(ISpriteFrame frame)
{
var data = new byte[TileSize * TileSize];
// Invalid tile size: return blank tile
if (frame.Size.Width < TileSize || frame.Size.Height < TileSize)
return new byte[0];
var frameData = frame.Data;
var xOffset = (frame.Size.Width - TileSize) / 2;
var yOffset = (frame.Size.Height - TileSize) / 2;
for (var y = 0; y < TileSize; y++)
for (var x = 0; x < TileSize; x++)
data[y * TileSize + x] = frameData[(yOffset + y) * frame.Size.Width + x + xOffset];
return data;
}
List<byte[]> LoadTemplate(string filename, string[] exts, Dictionary<string, ISpriteSource> sourceCache, int[] frames)
{
ISpriteSource source;
if (!sourceCache.ContainsKey(filename))
{
using (var s = GlobalFileSystem.OpenWithExts(filename, exts))
source = SpriteSource.LoadSpriteSource(s, filename);
if (source.CacheWhenLoadingTileset)
sourceCache.Add(filename, source);
}
else
source = sourceCache[filename];
if (frames != null)
{
var ret = new List<byte[]>();
var srcFrames = source.Frames.ToArray();
foreach (var i in frames)
ret.Add(ExtractSquareTile(srcFrames[i]));
return ret;
}
return source.Frames.Select(f => ExtractSquareTile(f)).ToList();
}
public TileSetRenderer(TileSet tileset, Size tileSize)
{
this.TileSet = tileset;
this.TileSize = Math.Min(tileSize.Width, tileSize.Height);
templates = new Dictionary<ushort, List<byte[]>>();
var sourceCache = new Dictionary<string, ISpriteSource>();
foreach (var t in TileSet.Templates)
templates.Add(t.Key, LoadTemplate(t.Value.Image, tileset.Extensions, sourceCache, t.Value.Frames));
}
public Bitmap RenderTemplate(ushort id, Palette p)
{
var template = TileSet.Templates[id];
var templateData = templates[id];
var bitmap = new Bitmap(TileSize * template.Size.X, TileSize * template.Size.Y,
PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var u = 0; u < template.Size.X; u++)
{
for (var v = 0; v < template.Size.Y; v++)
{
var rawImage = templateData[u + v * template.Size.X];
if (rawImage != null && rawImage.Length > 0)
{
for (var i = 0; i < TileSize; i++)
for (var j = 0; j < TileSize; j++)
q[(v * TileSize + j) * stride + u * TileSize + i] = rawImage[i + TileSize * j];
}
else
{
for (var i = 0; i < TileSize; i++)
for (var j = 0; j < TileSize; j++)
q[(v * TileSize + j) * stride + u * TileSize + i] = 0;
}
}
}
}
bitmap.UnlockBits(data);
return bitmap;
}
public List<byte[]> Data(ushort id)
{
return templates[id];
}
}
}

View File

@@ -1,429 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Reflection;
namespace OpenRA.FileFormats
{
public static class FieldLoader
{
public static Func<string, Type, string, object> InvalidValueAction = (s, t, f) =>
{
throw new InvalidOperationException("FieldLoader: Cannot parse `{0}` into `{1}.{2}` ".F(s, f, t));
};
public static Action<string, Type> UnknownFieldAction = (s, f) =>
{
throw new NotImplementedException("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
};
public static void Load(object self, MiniYaml my)
{
var loadDict = typeLoadInfo[self.GetType()];
foreach (var kv in loadDict)
{
object val;
if (kv.Value != null)
val = kv.Value(kv.Key.Name, kv.Key.FieldType, my);
else if (!TryGetValueFromYaml(kv.Key.Name, kv.Key.FieldType, my, out val))
continue;
kv.Key.SetValue(self, val);
}
}
static bool TryGetValueFromYaml(string fieldName, Type fieldType, MiniYaml yaml, out object ret)
{
ret = null;
var n = yaml.Nodes.Where(x => x.Key == fieldName).ToList();
if (n.Count == 0)
return false;
if (n.Count == 1 && n[0].Value.Nodes.Count == 0)
{
ret = GetValue(fieldName, fieldType, n[0].Value.Value);
return true;
}
else if (n.Count > 1)
{
throw new InvalidOperationException("The field {0} has multiple definitions:\n{1}"
.F(fieldName, n.Select(m => "\t- " + m.Location).JoinWith("\n")));
}
throw new InvalidOperationException("TryGetValueFromYaml: unable to load field {0} (of type {1})".F(fieldName, fieldType));
}
public static T Load<T>(MiniYaml y) where T : new()
{
var t = new T();
Load(t, y);
return t;
}
static readonly object[] NoIndexes = { };
public static void LoadField(object self, string key, string value)
{
var field = self.GetType().GetField(key.Trim());
if (field != null)
{
if (!field.HasAttribute<FieldFromYamlKeyAttribute>())
field.SetValue(self, GetValue(field.Name, field.FieldType, value));
return;
}
var prop = self.GetType().GetProperty(key.Trim());
if (prop != null)
{
if (!prop.HasAttribute<FieldFromYamlKeyAttribute>())
prop.SetValue(self, GetValue(prop.Name, prop.PropertyType, value), NoIndexes);
return;
}
UnknownFieldAction(key.Trim(), self.GetType());
}
public static T GetValue<T>(string field, string value)
{
return (T)GetValue(field, typeof(T), value);
}
public static object GetValue(string field, Type fieldType, string x)
{
if (x != null) x = x.Trim();
if (fieldType == typeof(int))
{
int res;
if (int.TryParse(x, out res))
return res;
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(ushort))
{
ushort res;
if (ushort.TryParse(x, out res))
return res;
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(float))
{
float res;
if (float.TryParse(x.Replace("%", ""), NumberStyles.Any, NumberFormatInfo.InvariantInfo, out res))
return res * (x.Contains('%') ? 0.01f : 1f);
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(decimal))
{
decimal res;
if (decimal.TryParse(x.Replace("%", ""), NumberStyles.Any, NumberFormatInfo.InvariantInfo, out res))
return res * (x.Contains('%') ? 0.01m : 1m);
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(string))
return x;
else if (fieldType == typeof(Color))
{
var parts = x.Split(',');
if (parts.Length == 3)
return Color.FromArgb(int.Parse(parts[0]).Clamp(0, 255), int.Parse(parts[1]).Clamp(0, 255), int.Parse(parts[2]).Clamp(0, 255));
if (parts.Length == 4)
return Color.FromArgb(int.Parse(parts[0]).Clamp(0, 255), int.Parse(parts[1]).Clamp(0, 255), int.Parse(parts[2]).Clamp(0, 255), int.Parse(parts[3]).Clamp(0, 255));
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(HSLColor))
{
var parts = x.Split(',');
// Allow old ColorRamp format to be parsed as HSLColor
if (parts.Length == 3 || parts.Length == 4)
return new HSLColor(
(byte)int.Parse(parts[0]).Clamp(0, 255),
(byte)int.Parse(parts[1]).Clamp(0, 255),
(byte)int.Parse(parts[2]).Clamp(0, 255));
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(WRange))
{
WRange res;
if (WRange.TryParse(x, out res))
return res;
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(WVec))
{
var parts = x.Split(',');
if (parts.Length == 3)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WVec(rx, ry, rz);
}
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(WPos))
{
var parts = x.Split(',');
if (parts.Length == 3)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WPos(rx, ry, rz);
}
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(WAngle))
{
int res;
if (int.TryParse(x, out res))
return new WAngle(res);
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType == typeof(WRot))
{
var parts = x.Split(',');
if (parts.Length == 3)
{
int rr, rp, ry;
if (int.TryParse(x, out rr) && int.TryParse(x, out rp) && int.TryParse(x, out ry))
return new WRot(new WAngle(rr), new WAngle(rp), new WAngle(ry));
}
return InvalidValueAction(x, fieldType, field);
}
else if (fieldType.IsEnum)
{
if (!Enum.GetNames(fieldType).Select(a => a.ToLower()).Contains(x.ToLower()))
return InvalidValueAction(x, fieldType, field);
return Enum.Parse(fieldType, x, true);
}
else if (fieldType == typeof(bool))
return ParseYesNo(x, fieldType, field);
else if (fieldType.IsArray)
{
if (x == null)
return Array.CreateInstance(fieldType.GetElementType(), 0);
var parts = x.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var ret = Array.CreateInstance(fieldType.GetElementType(), parts.Length);
for (int i = 0; i < parts.Length; i++)
ret.SetValue(GetValue(field, fieldType.GetElementType(), parts[i].Trim()), i);
return ret;
}
else if (fieldType == typeof(int2))
{
var parts = x.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType == typeof(float2))
{
var parts = x.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
float xx = 0;
float yy = 0;
float res;
if (float.TryParse(parts[0].Replace("%", ""), out res))
xx = res * (parts[0].Contains('%') ? 0.01f : 1f);
if (float.TryParse(parts[1].Replace("%", ""), out res))
yy = res * (parts[1].Contains('%') ? 0.01f : 1f);
return new float2(xx, yy);
}
else if (fieldType == typeof(Rectangle))
{
var parts = x.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Rectangle(int.Parse(parts[0]), int.Parse(parts[1]), int.Parse(parts[2]), int.Parse(parts[3]));
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Bits<>))
{
var parts = x.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var argTypes = new Type[] { typeof(string[]) };
var argValues = new object[] { parts };
return fieldType.GetConstructor(argTypes).Invoke(argValues);
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
var innerType = fieldType.GetGenericArguments().First();
var innerValue = GetValue("Nullable<T>", innerType, x);
return fieldType.GetConstructor(new []{ innerType }).Invoke(new []{ innerValue });
}
UnknownFieldAction("[Type] {0}".F(x), fieldType);
return null;
}
static object ParseYesNo(string p, System.Type fieldType, string field)
{
p = p.ToLowerInvariant();
if (p == "yes") return true;
if (p == "true") return true;
if (p == "no") return false;
if (p == "false") return false;
return InvalidValueAction(p, fieldType, field);
}
static Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>> typeLoadInfo = new Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>>(GetTypeLoadInfo);
static Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>> GetTypeLoadInfo(Type type)
{
var ret = new Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>();
foreach (var ff in type.GetFields())
{
var field = ff;
var ignore = field.GetCustomAttributes<IgnoreAttribute>(false);
var loadUsing = field.GetCustomAttributes<LoadUsingAttribute>(false);
var fromYamlKey = field.GetCustomAttributes<FieldFromYamlKeyAttribute>(false);
if (loadUsing.Length != 0)
ret[field] = (_1, fieldType, yaml) => loadUsing[0].LoaderFunc(field)(yaml);
else if (fromYamlKey.Length != 0)
ret[field] = (f, ft, yaml) => GetValue(f, ft, yaml.Value);
else if (ignore.Length == 0)
ret[field] = null;
}
return ret;
}
[AttributeUsage(AttributeTargets.Field)]
public class IgnoreAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Field)]
public class LoadUsingAttribute : Attribute
{
Func<MiniYaml, object> loaderFuncCache;
public readonly string Loader;
public LoadUsingAttribute(string loader)
{
Loader = loader;
}
internal Func<MiniYaml, object> LoaderFunc(FieldInfo field)
{
const BindingFlags BindingFlag = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
if (loaderFuncCache == null)
loaderFuncCache = (Func<MiniYaml, object>)Delegate.CreateDelegate(typeof(Func<MiniYaml, object>), field.DeclaringType.GetMethod(Loader, BindingFlag));
return loaderFuncCache;
}
}
}
public static class FieldSaver
{
public static MiniYaml Save(object o)
{
var nodes = new List<MiniYamlNode>();
string root = null;
foreach (var f in o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance))
{
if (f.HasAttribute<FieldFromYamlKeyAttribute>())
root = FormatValue(o, f);
else
nodes.Add(new MiniYamlNode(f.Name, FormatValue(o, f)));
}
return new MiniYaml(root, nodes);
}
public static MiniYaml SaveDifferences(object o, object from)
{
if (o.GetType() != from.GetType())
throw new InvalidOperationException("FieldLoader: can't diff objects of different types");
var fields = o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance)
.Where(f => FormatValue(o, f) != FormatValue(from, f));
return new MiniYaml(null, fields.Select(f => new MiniYamlNode(f.Name, FormatValue(o, f))).ToList());
}
public static MiniYamlNode SaveField(object o, string field)
{
return new MiniYamlNode(field, FieldSaver.FormatValue(o, o.GetType().GetField(field)));
}
public static string FormatValue(object v, Type t)
{
if (v == null)
return "";
// Color.ToString() does the wrong thing; force it to format as an array
if (t == typeof(Color))
{
var c = (Color)v;
return "{0},{1},{2},{3}".F(((int)c.A).Clamp(0, 255),
((int)c.R).Clamp(0, 255),
((int)c.G).Clamp(0, 255),
((int)c.B).Clamp(0, 255));
}
// Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
if (t == typeof(float))
return ((float)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(Rectangle))
{
var r = (Rectangle)v;
return "{0},{1},{2},{3}".F(r.X, r.Y, r.Width, r.Height);
}
if (t.IsArray)
{
var elems = ((Array)v).OfType<object>();
return elems.JoinWith(",");
}
return v.ToString();
}
public static string FormatValue(object o, FieldInfo f)
{
return FormatValue(f.GetValue(o), f.FieldType);
}
}
public class FieldFromYamlKeyAttribute : Attribute { }
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
public class DescAttribute : Attribute
{
public readonly string[] Lines;
public DescAttribute(params string[] lines) { Lines = lines; }
}
}

View File

@@ -1,144 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats
{
public enum Dune2ImageFlags : int
{
F80_F2 = 0,
F2 = 2,
L16_F80_F2_1 = 1,
L16_F80_F2_2 = 3,
Ln_F80_F2 = 5
}
public class Dune2ImageHeader
{
public readonly Dune2ImageFlags Flags;
public readonly int Width;
public readonly int Height;
public readonly int Slices;
public readonly int FileSize;
public readonly int DataSize;
public readonly byte[] LookupTable;
public byte[] Image;
public Dune2ImageHeader(Stream s)
{
Flags = (Dune2ImageFlags)s.ReadUInt16();
Slices = s.ReadUInt8();
Width = s.ReadUInt16();
Height = s.ReadUInt8();
FileSize = s.ReadUInt16();
DataSize = s.ReadUInt16();
if (Flags == Dune2ImageFlags.L16_F80_F2_1 ||
Flags == Dune2ImageFlags.L16_F80_F2_2 ||
Flags == Dune2ImageFlags.Ln_F80_F2)
{
int n = Flags == Dune2ImageFlags.Ln_F80_F2 ? s.ReadUInt8() : (byte)16;
LookupTable = new byte[n];
for (int i = 0; i < n; i++)
LookupTable[i] = s.ReadUInt8();
}
else
{
LookupTable = new byte[256];
for (int i = 0; i < 256; i++)
LookupTable[i] = (byte)i;
LookupTable[1] = 0x7f;
LookupTable[2] = 0x7e;
LookupTable[3] = 0x7d;
LookupTable[4] = 0x7c;
}
}
public Size Size
{
get { return new Size(Width, Height); }
}
}
public class Dune2ShpReader : IEnumerable<Dune2ImageHeader>
{
public readonly int ImageCount;
List<Dune2ImageHeader> headers = new List<Dune2ImageHeader>();
public Dune2ShpReader(Stream s)
{
ImageCount = s.ReadUInt16();
//Last offset is pointer to end of file.
uint[] offsets = new uint[ImageCount + 1];
uint temp = s.ReadUInt32();
//If fourth byte in file is non-zero, the offsets are two bytes each.
bool twoByteOffsets = (temp & 0xFF0000) > 0;
if (twoByteOffsets)
{
offsets[0] = ((temp & 0xFFFF0000) >> 16) + 2; //Offset does not account for image count bytes
offsets[1] = (temp & 0xFFFF) + 2;
}
else
offsets[0] = temp + 2;
for (int i = twoByteOffsets ? 2 : 1; i < ImageCount + 1; i++)
offsets[i] = (twoByteOffsets ? s.ReadUInt16() : s.ReadUInt32()) + 2;
for (int i = 0; i < ImageCount; i++)
{
s.Seek(offsets[i], SeekOrigin.Begin);
Dune2ImageHeader header = new Dune2ImageHeader(s);
byte[] imgData = s.ReadBytes(header.FileSize);
header.Image = new byte[header.Height * header.Width];
//Decode image data
if (header.Flags != Dune2ImageFlags.F2)
{
byte[] tempData = new byte[header.DataSize];
Format80.DecodeInto(imgData, tempData);
Format2.DecodeInto(tempData, header.Image);
}
else
Format2.DecodeInto(imgData, header.Image);
//Lookup values in lookup table
if (header.LookupTable != null)
for (int j = 0; j < header.Image.Length; j++)
header.Image[j] = header.LookupTable[header.Image[j]];
headers.Add(header);
}
}
public Dune2ImageHeader this[int index]
{
get { return headers[index]; }
}
public IEnumerator<Dune2ImageHeader> GetEnumerator()
{
return headers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

View File

@@ -1,167 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
public class ImageHeader
{
public uint Offset;
public Format Format;
public uint RefOffset;
public Format RefFormat;
public ImageHeader RefImage;
public byte[] Image;
public ImageHeader() { }
public ImageHeader( BinaryReader reader )
{
var data = reader.ReadUInt32();
Offset = data & 0xffffff;
Format = (Format)(data >> 24);
RefOffset = reader.ReadUInt16();
RefFormat = (Format)reader.ReadUInt16();
}
public static readonly int SizeOnDisk = 8;
public void WriteTo(BinaryWriter writer)
{
writer.Write(Offset | ((uint)Format << 24));
writer.Write((ushort)RefOffset);
writer.Write((ushort)RefFormat);
}
}
public enum Format { Format20 = 0x20, Format40 = 0x40, Format80 = 0x80 }
public class ShpReader
{
public readonly int ImageCount;
public readonly ushort Width;
public readonly ushort Height;
public Size Size { get { return new Size(Width, Height); } }
readonly List<ImageHeader> headers = new List<ImageHeader>();
int recurseDepth = 0;
public ShpReader(Stream stream)
{
using (var reader = new BinaryReader(stream))
{
ImageCount = reader.ReadUInt16();
reader.ReadUInt16();
reader.ReadUInt16();
Width = reader.ReadUInt16();
Height = reader.ReadUInt16();
reader.ReadUInt32();
for (int i = 0 ; i < ImageCount ; i++)
headers.Add(new ImageHeader(reader));
new ImageHeader(reader); // end-of-file header
new ImageHeader(reader); // all-zeroes header
var offsets = headers.ToDictionary(h => h.Offset, h =>h);
for (int i = 0 ; i < ImageCount ; i++)
{
var h = headers[ i ];
if (h.Format == Format.Format20)
h.RefImage = headers[i - 1];
else if (h.Format == Format.Format40)
if (!offsets.TryGetValue(h.RefOffset, out h.RefImage))
throw new InvalidDataException("Reference doesnt point to image data {0}->{1}".F(h.Offset, h.RefOffset));
}
foreach (ImageHeader h in headers)
Decompress(stream, h);
}
}
public ImageHeader this[int index]
{
get { return headers[index]; }
}
void Decompress(Stream stream, ImageHeader h)
{
if (recurseDepth > ImageCount)
throw new InvalidDataException("Format20/40 headers contain infinite loop");
switch(h.Format)
{
case Format.Format20:
case Format.Format40:
{
if (h.RefImage.Image == null)
{
++recurseDepth;
Decompress(stream, h.RefImage);
--recurseDepth;
}
h.Image = CopyImageData(h.RefImage.Image);
Format40.DecodeInto(ReadCompressedData(stream, h), h.Image);
break;
}
case Format.Format80:
{
var imageBytes = new byte[Width * Height];
Format80.DecodeInto(ReadCompressedData(stream, h), imageBytes);
h.Image = imageBytes;
break;
}
default:
throw new InvalidDataException();
}
}
static byte[] ReadCompressedData(Stream stream, ImageHeader h)
{
stream.Position = h.Offset;
// TODO: Actually, far too big. There's no length field with the correct length though :(
var compressedLength = (int)(stream.Length - stream.Position);
var compressedBytes = new byte[ compressedLength ];
stream.Read( compressedBytes, 0, compressedLength );
return compressedBytes;
}
byte[] CopyImageData(byte[] baseImage)
{
var imageData = new byte[Width * Height];
for (int i = 0 ; i < Width * Height ; i++)
imageData[i] = baseImage[i];
return imageData;
}
public IEnumerable<ImageHeader> Frames { get { return headers; } }
public static ShpReader Load(string filename)
{
using (var s = File.OpenRead(filename))
return new ShpReader(s);
}
}
}

View File

@@ -1,615 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats
{
public struct Header
{
public ushort A;
// Unknown
// Width and Height of the images
public ushort Width;
public ushort Height;
public ushort NumImages;
}
public class HeaderImage
{
public ushort x;
public ushort y;
public ushort cx;
public ushort cy;
// cx and cy are width n height of stored image
public byte compression;
public byte[] align;
public byte[] transparent;
public int zero;
public int offset;
public byte[] Image;
}
public struct SHPData
{
public HeaderImage HeaderImage;
public byte[] Databuffer;
public byte[] FrameImage;
}
public struct SHP
{
public Header Header;
public SHPData[] Data;
}
public class ShpTSReader : IEnumerable<HeaderImage>
{
public readonly int ImageCount;
public readonly ushort Width;
public readonly ushort Height;
public readonly ushort Width2;
public readonly ushort Height2;
public int arroff = 0;
public int erri = 0;
public int errj = 0;
public int errk = 0;
public int errl = 0;
public static int FindNextOffsetFrom(SHP SHP, int Init, int Last)
{
int result;
result = 0;
Last++;
while ((result == 0) && (Init < Last))
{
result = SHP.Data[Init].HeaderImage.offset;
Init++;
}
return result;
}
private readonly List<HeaderImage> headers = new List<HeaderImage>();
public ShpTSReader(Stream s)
{
SHP SHP = new SHP();
int FileSize;
int x;
int k = 0;
int l = 0;
int ImageSize;
int NextOffset;
byte[] FData;
byte cp;
byte[] Databuffer;
FileSize = (int)s.Length;
// Get Header
SHP.Header.A = s.ReadUInt16();
SHP.Header.Width = s.ReadUInt16();
SHP.Header.Height = s.ReadUInt16();
SHP.Header.NumImages = s.ReadUInt16();
SHP.Data = new SHPData[SHP.Header.NumImages + 1];
ImageCount = SHP.Header.NumImages;
for (x = 1; x <= SHP.Header.NumImages; x++)
{
SHP.Data[x].HeaderImage = new HeaderImage();
SHP.Data[x].HeaderImage.x = s.ReadUInt16();
SHP.Data[x].HeaderImage.y = s.ReadUInt16();
SHP.Data[x].HeaderImage.cx = s.ReadUInt16();
SHP.Data[x].HeaderImage.cy = s.ReadUInt16();
SHP.Data[x].HeaderImage.compression = s.ReadUInt8();
SHP.Data[x].HeaderImage.align = s.ReadBytes(3);
s.ReadInt32();
SHP.Data[x].HeaderImage.zero = s.ReadUInt8();
SHP.Data[x].HeaderImage.transparent = s.ReadBytes(3);
SHP.Data[x].HeaderImage.offset = s.ReadInt32();
}
Width = SHP.Header.Width;
Height = SHP.Header.Height;
for (int i = 0; i < ImageCount; i++)
{
headers.Add(SHP.Data[i+1].HeaderImage);
}
// Read and decode each image from the file
for (x = 1; x <= SHP.Header.NumImages; x++)
{
headers[x - 1].Image = new byte[(Width * Height)];
for (int i = 0; i < headers[x - 1].Image.Length; i++)
headers[x - 1].Image[i] = 0;
FData = new byte[(Width * Height)];
// Does it really reads the frame?
if (SHP.Data[x].HeaderImage.offset != 0)
{
try
{
// Now it checks the compression:
if ((SHP.Data[x].HeaderImage.compression == 3))
{
// decode it
// Compression 3
NextOffset = FindNextOffsetFrom(SHP, x + 1, SHP.Header.NumImages);
if (NextOffset != 0)
{
ImageSize = NextOffset - SHP.Data[x].HeaderImage.offset;
Databuffer = new byte[ImageSize];
for (int i = 0; i < ImageSize; i++)
{
s.Seek(SHP.Data[x].HeaderImage.offset + i, SeekOrigin.Begin);
Databuffer[i] = s.ReadUInt8();
}
SHP.Data[x].Databuffer = new byte[(SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy)];
Decode3(Databuffer, ref SHP.Data[x].Databuffer, SHP.Data[x].HeaderImage.cx, SHP.Data[x].HeaderImage.cy, ref FileSize);
k = 0;
l = 0;
for (int i = 0; i < Height; i++)
{
erri = i;
for (int j = SHP.Data[x].HeaderImage.x; j < Width; j++)
{
errj = j;
errl = l;
errk = k;
arroff = i + j + l;
if (((j + 1) > (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x)) || ((i + 1) > (SHP.Data[x].HeaderImage.cy)))
cp = 0;
else
cp = SHP.Data[x].Databuffer[i + (j - SHP.Data[x].HeaderImage.x) + l];
FData[i + j + k] = cp;
if (j == (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x - 1))
l = l + (SHP.Data[x].HeaderImage.cx - 1);
if (j == (Width - 1))
k = k + (Width - 1);
}
}
//FData = headers[x - 1].Image;
k = 0;
for (int i = 0; i < (Height - SHP.Data[x].HeaderImage.y); i++)
{
for (int j = 0; j < Width; j++)
{
headers[x - 1].Image[i + j + k + (Width * SHP.Data[x].HeaderImage.y)] = FData[i + j + k];
if (j == (Width - 1))
{
k = k + (Width - 1);
}
}
}
}
else
{
ImageSize = 0;
ImageSize = FileSize - SHP.Data[x].HeaderImage.offset;
Databuffer = new byte[ImageSize];
for (int i = 0; i < ImageSize; i++)
{
s.Seek(SHP.Data[x].HeaderImage.offset + i, SeekOrigin.Begin);
Databuffer[i] = s.ReadUInt8();
}
SHP.Data[x].Databuffer = new byte[((SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy))];
Decode3(Databuffer, ref SHP.Data[x].Databuffer, SHP.Data[x].HeaderImage.cx, SHP.Data[x].HeaderImage.cy, ref ImageSize);
k = 0;
l = 0;
for (int i = 0; i < Height; i++)
{
erri = i;
for (int j = SHP.Data[x].HeaderImage.x; j < Width; j++)
{
errj = j;
errl = l;
errk = k;
arroff = i + j + l;
if (((j + 1) > (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x)) || ((i + 1) > (SHP.Data[x].HeaderImage.cy)))
cp = 0;
else
cp = SHP.Data[x].Databuffer[i + (j - SHP.Data[x].HeaderImage.x) + l];
FData[i + j + k] = cp;
if (j == (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x - 1))
l = l + (SHP.Data[x].HeaderImage.cx - 1);
if (j == (Width - 1))
k = k + (Width - 1);
}
}
//FData = headers[x - 1].Image;
k = 0;
for (int i = 0; i < (Height - SHP.Data[x].HeaderImage.y); i++)
{
for (int j = 0; j < Width; j++)
{
headers[x - 1].Image[i + j + k + (Width * SHP.Data[x].HeaderImage.y)] = FData[i + j + k];
if (j == (Width - 1))
{
k = k + (Width - 1);
}
}
}
}
}
else if ((SHP.Data[x].HeaderImage.compression == 2))
{
NextOffset = FindNextOffsetFrom(SHP, x + 1, SHP.Header.NumImages);
if (NextOffset != 0)
{
ImageSize = NextOffset - SHP.Data[x].HeaderImage.offset;
SHP.Data[x].Databuffer = new byte[(SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy)];
Databuffer = new byte[ImageSize];
for (int i = 0; i < ImageSize; i++)
{
s.Seek(SHP.Data[x].HeaderImage.offset + i, SeekOrigin.Begin);
Databuffer[i] = s.ReadUInt8();
}
Decode2(Databuffer, ref SHP.Data[x].Databuffer, SHP.Data[x].HeaderImage.cx, SHP.Data[x].HeaderImage.cy, ref ImageSize);
k = 0;
l = 0;
for (int i = 0; i < Height; i++)
{
erri = i;
for (int j = SHP.Data[x].HeaderImage.x; j < Width; j++)
{
errj = j;
errl = l;
errk = k;
arroff = i + j + l;
if (((j + 1) > (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x)) || ((i + 1) > (SHP.Data[x].HeaderImage.cy)))
cp = 0;
else
cp = SHP.Data[x].Databuffer[i + (j - SHP.Data[x].HeaderImage.x) + l];
FData[i + j + k] = cp;
if (j == (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x - 1))
l = l + (SHP.Data[x].HeaderImage.cx - 1);
if (j == (Width - 1))
k = k + (Width - 1);
}
}
//FData = headers[x - 1].Image;
k = 0;
for (int i = 0; i < (Height - SHP.Data[x].HeaderImage.y); i++)
{
for (int j = 0; j < Width; j++)
{
headers[x - 1].Image[i + j + k + (Width * SHP.Data[x].HeaderImage.y)] = FData[i + j + k];
if (j == (Width - 1))
{
k = k + (Width - 1);
}
}
}
// Compression 2
}
else
{
ImageSize = 0;
ImageSize = FileSize - SHP.Data[x].HeaderImage.offset;
Databuffer = new byte[ImageSize];
for (int i = 0; i < ImageSize; i++)
{
s.Seek(SHP.Data[x].HeaderImage.offset + i, SeekOrigin.Begin);
Databuffer[i] = s.ReadUInt8();
}
SHP.Data[x].Databuffer = new byte[((SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy))];
Decode2(Databuffer, ref SHP.Data[x].Databuffer, SHP.Data[x].HeaderImage.cx, SHP.Data[x].HeaderImage.cy, ref ImageSize);
k = 0;
l = 0;
for (int i = 0; i < Height; i++)
{
erri = i;
for (int j = SHP.Data[x].HeaderImage.x; j < Width; j++)
{
errj = j;
errl = l;
errk = k;
arroff = i + j + l;
if (((j + 1) > (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x)) || ((i + 1) > (SHP.Data[x].HeaderImage.cy)))
cp = 0;
else
cp = SHP.Data[x].Databuffer[i + (j - SHP.Data[x].HeaderImage.x) + l];
FData[i + j + k] = cp;
if (j == (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x - 1))
l = l + (SHP.Data[x].HeaderImage.cx - 1);
if (j == (Width - 1))
k = k + (Width - 1);
}
}
//FData = headers[x - 1].Image;
k = 0;
for (int i = 0; i < (Height - SHP.Data[x].HeaderImage.y); i++)
{
for (int j = 0; j < Width; j++)
{
headers[x - 1].Image[i + j + k + (Width * SHP.Data[x].HeaderImage.y)] = FData[i + j + k];
if (j == (Width - 1))
{
k = k + (Width - 1);
}
}
}
// Compression 2
}
}
else
{
// Compression 1
ImageSize = (int)(SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy);
Databuffer = new byte[ImageSize];
for (int i = 0; i < ImageSize; i++)
{
s.Seek(SHP.Data[x].HeaderImage.offset + i, SeekOrigin.Begin);
Databuffer[i] = s.ReadUInt8();
}
SHP.Data[x].Databuffer = new byte[(SHP.Data[x].HeaderImage.cx * SHP.Data[x].HeaderImage.cy)];
SHP.Data[x].Databuffer = Databuffer;
k = 0;
l = 0;
for (int i = 0; i < Height; i++)
{
erri = i;
for (int j = SHP.Data[x].HeaderImage.x; j < Width; j++)
{
errj = j;
errl = l;
errk = k;
arroff = i + j + l;
if (((j + 1) > (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x)) || ((i + 1) > (SHP.Data[x].HeaderImage.cy)))
cp = 0;
else
cp = SHP.Data[x].Databuffer[i + (j - SHP.Data[x].HeaderImage.x) + l];
FData[i + j + k] = cp;
if (j == (SHP.Data[x].HeaderImage.cx + SHP.Data[x].HeaderImage.x - 1))
l = l + (SHP.Data[x].HeaderImage.cx - 1);
if (j == (Width - 1))
k = k + (Width - 1);
}
}
//FData = headers[x - 1].Image;
k = 0;
for (int i = 0; i < (Height - SHP.Data[x].HeaderImage.y); i++)
{
for (int j = 0; j < Width; j++)
{
headers[x - 1].Image[i + j + k + (Width * SHP.Data[x].HeaderImage.y)] = FData[i + j + k];
if (j == (Width - 1))
{
k = k + (Width - 1);
}
}
}
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
// Set the shp's databuffer to the result after decompression
}
//Width = Width2;
//Height = Height2;
}
public HeaderImage this[int index]
{
get { return headers[index]; }
}
public static void ReInterpretWordFromBytes(byte Byte1, byte Byte2, ref ushort FullValue)
{
FullValue = (ushort)((Byte2 * 256) + Byte1);
}
public static void ReInterpretWordFromBytes(byte Byte1, byte Byte2, ref uint FullValue)
{
FullValue = (uint)((Byte2 * 256) + Byte1);
}
// Compression 3:
public static void Decode3(byte[] Source, ref byte[] Dest, int cx, int cy, ref int max)
{
int SP;
int DP;
int x;
int y;
int Count;
int v;
int maxdp;
ushort Pos;
maxdp = cx * cy;
SP = 0;
DP = 0;
Pos = 0;
try
{
for (y = 1; y <= cy; y++)
{
ReInterpretWordFromBytes(Source[SP], Source[SP + 1], ref Pos);
Count = Pos - 2;
SP = SP + 2;
x = 0;
while (Count > 0)
{
Count = Count - 1;
if ((SP > max) || (DP > maxdp))
{
break;
}
else
{
// SP has reached max value, exit
v = Source[SP];
SP++;
if (v != 0)
{
if ((SP > max) || (DP > maxdp))
{
break;
}
else
{
x++;
Dest[DP] += (byte)v;
}
DP++;
}
else
{
Count -= 1;
v = Source[SP];
SP++;
if ((x + v) > cx)
{
v = cx - x;
}
x = x + v;
while (v > 0)
{
if ((SP > max) || (DP > maxdp))
{
break;
}
else
{
v -= 1;
Dest[DP] = 0;
}
DP++;
// SP has reached max value, exit
}
}
}
}
if ((SP >= max) || (DP >= maxdp))
{
return;
}
// SP has reached max value, exit
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
public static void Decode2(byte[] Source, ref byte[] Dest, int cx, int cy, ref int max)
{
int SP;
int DP;
int y;
int Count;
int maxdp;
ushort Pos;
maxdp = cx * cy;
SP = 0;
DP = 0;
Pos = 0;
try
{
for (y = 1; y <= cy; y++)
{
ReInterpretWordFromBytes(Source[SP], Source[SP + 1], ref Pos);
Count = Pos - 2;
SP += 2;
while (Count > 0)
{
Count -= 1;
if ((SP > max) || (DP > maxdp))
{
return;
}
// SP has reached max value, exit
Dest[DP] = Source[SP];
SP++;
DP++;
}
if ((SP >= max) || (DP >= maxdp))
{
return;
}
// SP has reached max value, exit
}
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
public IEnumerator<HeaderImage> GetEnumerator()
{
return headers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public Size Size { get { return new Size(Width, Height); } }
}
}

View File

@@ -1,56 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats.Graphics
{
// format80-only SHP writer
public static class ShpWriter
{
public static void Write(Stream s, int width, int height, IEnumerable<byte[]> frames)
{
var compressedFrames = frames.Select(f => Format80.Encode(f)).ToArray();
// note: end-of-file and all-zeroes headers
var dataOffset = 14 + (compressedFrames.Length + 2) * ImageHeader.SizeOnDisk;
using (var bw = new BinaryWriter(s))
{
bw.Write((ushort)compressedFrames.Length);
bw.Write((ushort)0); // unused
bw.Write((ushort)0); // unused
bw.Write((ushort)width);
bw.Write((ushort)height);
bw.Write((uint)0); // unused
foreach (var f in compressedFrames)
{
var ih = new ImageHeader { Format = Format.Format80, Offset = (uint)dataOffset };
dataOffset += f.Length;
ih.WriteTo(bw);
}
var eof = new ImageHeader { Offset = (uint)dataOffset };
eof.WriteTo(bw);
var allZeroes = new ImageHeader { };
allZeroes.WriteTo(bw);
foreach (var f in compressedFrames)
bw.Write(f);
}
}
}
}

View File

@@ -1,97 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA.FileFormats
{
public class TileSetRenderer
{
public TileSet TileSet;
Dictionary<ushort, List<byte[]>> templates;
public Size TileSize;
List<byte[]> LoadTemplate(string filename, string[] exts, Cache<string, R8Reader> r8cache, int[] frames)
{
if (exts.Contains(".R8") && FileSystem.Exists(filename + ".R8"))
{
var data = new List<byte[]>();
foreach (var f in frames)
data.Add(f >= 0 ? r8cache[filename][f].Image : null);
return data;
}
using (var s = FileSystem.OpenWithExts(filename, exts))
return new Terrain(s).TileBitmapBytes;
}
public TileSetRenderer(TileSet tileset, Size tileSize)
{
this.TileSet = tileset;
this.TileSize = tileSize;
templates = new Dictionary<ushort, List<byte[]>>();
var r8cache = new Cache<string, R8Reader>(s => new R8Reader(FileSystem.OpenWithExts(s, ".R8")));
foreach (var t in TileSet.Templates)
templates.Add(t.Key, LoadTemplate(t.Value.Image, tileset.Extensions, r8cache, t.Value.Frames));
}
public Bitmap RenderTemplate(ushort id, Palette p)
{
var template = TileSet.Templates[id];
var templateData = templates[id];
var bitmap = new Bitmap(TileSize.Width * template.Size.X, TileSize.Height * template.Size.Y,
PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
if (templateData[u + v * template.Size.X] != null)
{
var rawImage = templateData[u + v * template.Size.X];
for (var i = 0; i < TileSize.Width; i++)
for (var j = 0; j < TileSize.Height; j++)
q[(v * TileSize.Width + j) * stride + u * TileSize.Width + i] = rawImage[i + TileSize.Width * j];
}
else
{
for (var i = 0; i < TileSize.Width; i++)
for (var j = 0; j < TileSize.Height; j++)
q[(v * TileSize.Width + j) * stride + u * TileSize.Width + i] = 0;
}
}
bitmap.UnlockBits(data);
return bitmap;
}
public List<byte[]> Data(ushort id)
{
return templates[id];
}
}
}

View File

@@ -1,78 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
/* describes what is to be loaded in order to run a set of mods */
public class Manifest
{
public readonly string[]
Mods, Folders, Rules, ServerTraits,
Sequences, VoxelSequences, Cursors, Chrome, Assemblies, ChromeLayout,
Weapons, Voices, Notifications, Music, Movies, TileSets,
ChromeMetrics, PackageContents;
public readonly Dictionary<string, string> Packages;
public readonly MiniYaml LoadScreen;
public readonly MiniYaml LobbyDefaults;
public readonly Dictionary<string, Pair<string,int>> Fonts;
public readonly int TileSize = 24;
public Manifest(string[] mods)
{
Mods = mods;
var yaml = new MiniYaml(null, mods
.Select(m => MiniYaml.FromFile("mods{0}{1}{0}mod.yaml".F(Path.DirectorySeparatorChar, m)))
.Aggregate(MiniYaml.MergeLiberal)).NodesDict;
// TODO: Use fieldloader
Folders = YamlList(yaml, "Folders");
Packages = yaml["Packages"].NodesDict.ToDictionary(x => x.Key, x => x.Value.Value);
Rules = YamlList(yaml, "Rules");
ServerTraits = YamlList(yaml, "ServerTraits");
Sequences = YamlList(yaml, "Sequences");
VoxelSequences = YamlList(yaml, "VoxelSequences");
Cursors = YamlList(yaml, "Cursors");
Chrome = YamlList(yaml, "Chrome");
Assemblies = YamlList(yaml, "Assemblies");
ChromeLayout = YamlList(yaml, "ChromeLayout");
Weapons = YamlList(yaml, "Weapons");
Voices = YamlList(yaml, "Voices");
Notifications = YamlList(yaml, "Notifications");
Music = YamlList(yaml, "Music");
Movies = YamlList(yaml, "Movies");
TileSets = YamlList(yaml, "TileSets");
ChromeMetrics = YamlList(yaml, "ChromeMetrics");
PackageContents = YamlList(yaml, "PackageContents");
LoadScreen = yaml["LoadScreen"];
LobbyDefaults = yaml["LobbyDefaults"];
Fonts = yaml["Fonts"].NodesDict.ToDictionary(x => x.Key,
x => Pair.New(x.Value.NodesDict["Font"].Value,
int.Parse(x.Value.NodesDict["Size"].Value)));
if (yaml.ContainsKey("TileSize"))
TileSize = int.Parse(yaml["TileSize"].Value);
}
static string[] YamlList(Dictionary<string, MiniYaml> yaml, string key)
{
if (!yaml.ContainsKey(key))
return new string[] {};
return yaml[key].NodesDict.Keys.ToArray();
}
}
}

View File

@@ -1,77 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileFormats
{
public class Terrain
{
public readonly List<byte[]> TileBitmapBytes = new List<byte[]>();
public readonly int Width;
public readonly int Height;
public Terrain(Stream s)
{
// Try loading as a cnc .tem
Width = s.ReadUInt16();
Height = s.ReadUInt16();
/*NumTiles = */s.ReadUInt16();
/*Zero1 = */s.ReadUInt16();
/*uint Size = */s.ReadUInt32();
var imgStart = s.ReadUInt32();
/*Zero2 = */s.ReadUInt32();
int indexEnd, indexStart;
// ID1 = FFFFh for cnc
if (s.ReadUInt16() == 65535)
{
/*ID2 = */s.ReadUInt16();
indexEnd = s.ReadInt32();
indexStart = s.ReadInt32();
}
else
{
// Load as a ra .tem
s.Position = 0;
Width = s.ReadUInt16();
Height = s.ReadUInt16();
/*NumTiles = */s.ReadUInt16();
s.ReadUInt16();
/*XDim = */s.ReadUInt16();
/*YDim = */s.ReadUInt16();
/*uint FileSize = */s.ReadUInt32();
imgStart = s.ReadUInt32();
s.ReadUInt32();
s.ReadUInt32();
indexEnd = s.ReadInt32();
s.ReadUInt32();
indexStart = s.ReadInt32();
}
s.Position = indexStart;
foreach (byte b in s.ReadBytes(indexEnd - indexStart))
{
if (b != 255)
{
s.Position = imgStart + b * Width * Height;
TileBitmapBytes.Add(s.ReadBytes(Width * Height));
}
else
TileBitmapBytes.Add(null);
}
}
}
}

View File

@@ -1,176 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.FileFormats</RootNamespace>
<AssemblyName>OpenRA.FileFormats</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Optimize>false</Optimize>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Tao.Sdl, Version=1.2.13.0, Culture=neutral, PublicKeyToken=9c7a200e36c0094e">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\Tao\Tao.Sdl.dll</HintPath>
</Reference>
<Reference Include="WindowsBase">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Evaluator.cs" />
<Compile Include="Exts.cs" />
<Compile Include="FieldLoader.cs" />
<Compile Include="FileFormats\AudLoader.cs" />
<Compile Include="FileFormats\Blast.cs" />
<Compile Include="FileFormats\Blowfish.cs" />
<Compile Include="FileFormats\BlowfishKeyProvider.cs" />
<Compile Include="FileFormats\CRC32.cs" />
<Compile Include="FileFormats\Format2.cs" />
<Compile Include="FileFormats\Format40.cs" />
<Compile Include="FileFormats\Format80.cs" />
<Compile Include="FileFormats\IniFile.cs" />
<Compile Include="Filesystem\FileSystem.cs" />
<Compile Include="Filesystem\Folder.cs" />
<Compile Include="Filesystem\InstallShieldPackage.cs" />
<Compile Include="Filesystem\MixFile.cs" />
<Compile Include="Filesystem\ZipFile.cs" />
<Compile Include="Graphics\Dune2ShpReader.cs" />
<Compile Include="Graphics\IGraphicsDevice.cs" />
<Compile Include="Graphics\IInputHandler.cs" />
<Compile Include="Graphics\PngLoader.cs" />
<Compile Include="Graphics\ShpReader.cs" />
<Compile Include="Graphics\ShpWriter.cs" />
<Compile Include="Graphics\Vertex.cs" />
<Compile Include="Graphics\VqaReader.cs" />
<Compile Include="InstallUtils.cs" />
<Compile Include="Manifest.cs" />
<Compile Include="Map\PlayerReference.cs" />
<Compile Include="Map\SmudgeReference.cs" />
<Compile Include="Map\Terrain.cs" />
<Compile Include="Map\TileReference.cs" />
<Compile Include="Map\TileSet.cs" />
<Compile Include="MiniYaml.cs" />
<Compile Include="Mod.cs" />
<Compile Include="PackageEntry.cs" />
<Compile Include="Palette.cs" />
<Compile Include="Platform.cs" />
<Compile Include="PlayerColorRemap.cs" />
<Compile Include="Primitives\ActionQueue.cs" />
<Compile Include="Primitives\Bits.cs" />
<Compile Include="Primitives\Cache.cs" />
<Compile Include="Primitives\Cached.cs" />
<Compile Include="Primitives\DisposableAction.cs" />
<Compile Include="Primitives\Lazy.cs" />
<Compile Include="Primitives\Pair.cs" />
<Compile Include="Primitives\PriorityQueue.cs" />
<Compile Include="Primitives\Set.cs" />
<Compile Include="Primitives\float2.cs" />
<Compile Include="Primitives\int2.cs" />
<Compile Include="Support\Log.cs" />
<Compile Include="Support\Stopwatch.cs" />
<Compile Include="Support\Timer.cs" />
<Compile Include="Random.cs" />
<Compile Include="TypeDictionary.cs" />
<Compile Include="WPos.cs" />
<Compile Include="WVec.cs" />
<Compile Include="WAngle.cs" />
<Compile Include="WRot.cs" />
<Compile Include="WRange.cs" />
<Compile Include="HSLColor.cs" />
<Compile Include="Graphics\ShpTSReader.cs" />
<Compile Include="FileFormats\XccLocalDatabase.cs" />
<Compile Include="FileFormats\XccGlobalDatabase.cs" />
<Compile Include="Graphics\VxlReader.cs" />
<Compile Include="Graphics\HvaReader.cs" />
<Compile Include="StreamExts.cs" />
<Compile Include="FileFormats\WavLoader.cs" />
<Compile Include="Filesystem\D2kSoundResources.cs" />
<Compile Include="Graphics\R8Reader.cs" />
<Compile Include="Graphics\TileSetRenderer.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,79 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Diagnostics;
using System.IO;
using OpenRA.FileFormats;
namespace OpenRA
{
public enum PlatformType { Unknown, Windows, OSX, Linux }
public static class Platform
{
public static PlatformType CurrentPlatform { get { return currentPlatform.Value; } }
static Lazy<PlatformType> currentPlatform = Lazy.New((Func<PlatformType>)GetCurrentPlatform);
static PlatformType GetCurrentPlatform()
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
return PlatformType.Windows;
try
{
var psi = new ProcessStartInfo("uname", "-s");
psi.UseShellExecute = false;
psi.RedirectStandardOutput = true;
var p = Process.Start(psi);
var kernelName = p.StandardOutput.ReadToEnd();
if (kernelName.Contains("Linux") || kernelName.Contains("BSD"))
return PlatformType.Linux;
if (kernelName.Contains("Darwin"))
return PlatformType.OSX;
}
catch { }
return PlatformType.Unknown;
}
public static string SupportDir
{
get
{
// Use a local directory in the game root if it exists
if (Directory.Exists("Support"))
return "Support" + Path.DirectorySeparatorChar;
var dir = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
switch (CurrentPlatform)
{
case PlatformType.Windows:
dir += Path.DirectorySeparatorChar + "OpenRA";
break;
case PlatformType.OSX:
dir += "/Library/Application Support/OpenRA";
break;
case PlatformType.Linux:
default:
dir += "/.openra";
break;
}
if (!Directory.Exists(dir))
Directory.CreateDirectory(dir);
return dir + Path.DirectorySeparatorChar;
}
}
}
}

View File

@@ -1,55 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
namespace OpenRA.FileFormats
{
public class Cached<T>
{
Func<T> p;
T value;
bool hasValue;
public Cached(Func<T> p)
{
if (p == null)
throw new ArgumentNullException();
this.p = p;
}
public T Value
{
get
{
if (hasValue)
return value;
value = p();
hasValue = true;
return value;
}
}
public T Force() { return Value; }
public void Invalidate()
{
hasValue = false;
}
}
public static class Cached
{
public static Cached<T> New<T>(Func<T> p) { return new Cached<T>(p); }
}
}

View File

@@ -1,48 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
namespace OpenRA.FileFormats
{
public class Lazy<T>
{
Func<T> p;
T value;
public Lazy(Func<T> p)
{
if (p == null)
throw new ArgumentNullException();
this.p = p;
}
public T Value
{
get
{
if (p == null)
return value;
value = p();
p = null;
return value;
}
}
public T Force() { return Value; }
}
public static class Lazy
{
public static Lazy<T> New<T>(Func<T> p) { return new Lazy<T>(p); }
}
}

View File

@@ -1,56 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public class Set<T> : IEnumerable<T>
{
Dictionary<T, bool> data = new Dictionary<T, bool>();
public void Add( T obj )
{
data.Add( obj, false );
if( OnAdd != null )
OnAdd( obj );
}
public void Remove( T obj )
{
data.Remove( obj );
if( OnRemove != null )
OnRemove( obj );
}
public event Action<T> OnAdd;
public event Action<T> OnRemove;
public IEnumerator<T> GetEnumerator()
{
return data.Keys.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public bool Contains( T obj ) { return data.ContainsKey(obj); }
public Set( params T[] ts )
{
foreach( var t in ts )
Add(t);
}
}
}

View File

@@ -1,349 +0,0 @@
<StyleCopSettings Version="105">
<Analyzers>
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
<Rules>
<Rule Name="ElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="EnumerationItemsMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustContainValidXml">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementReturnValueDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="VoidReturnValueMustNotBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumented">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustNotBeEmpty">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationTextMustContainWhitespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationMustMeetCharacterPercentage">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludedDocumentationXPathDoesNotExist">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMustHaveHeader">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustShowCopyright">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveCopyrightText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustContainFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderMustHaveValidCompanyText">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
<Rules>
<Rule Name="TabsMustNotBeUsed">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
<Rules>
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="StatementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementMustNotBeOnSingleLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="CurlyBracketsMustNotBeOmitted">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeSeparatedByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ChainedStatementBlocksMustNotBePrecededByBlankLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
<Rules>
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustAppearInTheCorrectOrder">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ElementsMustBeOrderedByAccess">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="UseStringEmptyForEmptyStrings">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="PrefixCallsCorrectly">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ParameterMustFollowComma">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
<Rules>
<Rule Name="AccessModifierMustBeDeclared">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FieldsMustBePrivate">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="FileMayOnlyContainASingleClass">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
</Analyzers>
</StyleCopSettings>

View File

@@ -1,31 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Support
{
public class Stopwatch
{
System.Diagnostics.Stopwatch sw;
public Stopwatch ()
{
Reset();
}
public double ElapsedTime()
{
return sw.Elapsed.TotalMilliseconds / 1000.0;
}
public void Reset()
{
sw = System.Diagnostics.Stopwatch.StartNew();
}
}
}

View File

@@ -1,27 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Support
{
public static class Timer
{
static Stopwatch sw = new Stopwatch();
static double lastTime = 0;
public static void Time( string message )
{
var time = sw.ElapsedTime();
var dt = time - lastTime;
if( dt > 0.0001 )
Log.Write("perf", message, dt );
lastTime = time;
}
}
}

149
OpenRA.Game/Actor.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -12,29 +12,32 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Scripting;
using OpenRA.Traits;
namespace OpenRA
{
public class Actor
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding
{
public readonly ActorInfo Info;
public readonly World World;
public readonly uint ActorID;
public Lazy<Rectangle> Bounds;
Lazy<IOccupySpace> occupySpace;
Lazy<IFacing> facing;
public Cached<Rectangle> Bounds;
public Cached<Rectangle> ExtendedBounds;
Lazy<Health> health;
Lazy<IEffectiveOwner> effectiveOwner;
public IOccupySpace OccupiesSpace { get { return occupySpace.Value; } }
public IEffectiveOwner EffectiveOwner { get { return effectiveOwner.Value; } }
public CPos Location { get { return occupySpace.Value.TopLeft; } }
public PPos CenterLocation { get { return PPos.FromWPos(occupySpace.Value.CenterPosition); } }
public WPos CenterPosition { get { return occupySpace.Value.CenterPosition; } }
public WRot Orientation
@@ -62,42 +65,43 @@ namespace OpenRA
if (initDict.Contains<OwnerInit>())
Owner = init.Get<OwnerInit, Player>();
occupySpace = Lazy.New(() => TraitOrDefault<IOccupySpace>());
occupySpace = Exts.Lazy(() => TraitOrDefault<IOccupySpace>());
if (name != null)
{
if (!Rules.Info.ContainsKey(name.ToLowerInvariant()))
if (!world.Map.Rules.Actors.ContainsKey(name.ToLowerInvariant()))
throw new NotImplementedException("No rules definition for unit {0}".F(name.ToLowerInvariant()));
Info = Rules.Info[name.ToLowerInvariant()];
Info = world.Map.Rules.Actors[name.ToLowerInvariant()];
foreach (var trait in Info.TraitsInConstructOrder())
AddTrait(trait.Create(init));
}
facing = Lazy.New(() => TraitOrDefault<IFacing>());
facing = Exts.Lazy(() => TraitOrDefault<IFacing>());
health = Exts.Lazy(() => TraitOrDefault<Health>());
effectiveOwner = Exts.Lazy(() => TraitOrDefault<IEffectiveOwner>());
size = Lazy.New(() =>
Bounds = Exts.Lazy(() =>
{
var si = Info.Traits.GetOrDefault<SelectableInfo>();
if (si != null && si.Bounds != null)
return new int2(si.Bounds[0], si.Bounds[1]);
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
return TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
var offset = -size / 2;
if (si != null && si.Bounds != null && si.Bounds.Length > 2)
offset += new int2(si.Bounds[2], si.Bounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
});
applyIRender = (x, wr) => x.Render(this, wr);
applyRenderModifier = (m, p, wr) => p.ModifyRender(this, wr, m);
Bounds = Cached.New(() => CalculateBounds(false));
ExtendedBounds = Cached.New(() => CalculateBounds(true));
}
public void Tick()
{
Bounds.Invalidate();
ExtendedBounds.Invalidate();
var wasIdle = IsIdle;
currentActivity = Traits.Util.RunActivity(this, currentActivity);
if (!wasIdle && IsIdle)
foreach (var n in TraitsImplementing<INotifyBecomingIdle>())
n.OnBecomingIdle(this);
}
public bool IsIdle
@@ -105,44 +109,19 @@ namespace OpenRA
get { return currentActivity == null; }
}
OpenRA.FileFormats.Lazy<int2> size;
// note: these delegates are cached to avoid massive allocation.
Func<IRender, WorldRenderer, IEnumerable<IRenderable>> applyIRender;
Func<IEnumerable<IRenderable>, IRenderModifier, WorldRenderer, IEnumerable<IRenderable>> applyRenderModifier;
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
var mods = TraitsImplementing<IRenderModifier>();
var sprites = TraitsImplementing<IRender>().SelectMany(x => applyIRender(x, wr));
return mods.Aggregate(sprites, (m, p) => applyRenderModifier(m, p, wr));
var renderables = Renderables(wr);
foreach (var modifier in TraitsImplementing<IRenderModifier>())
renderables = modifier.ModifyRender(this, wr, renderables);
return renderables;
}
// When useAltitude = true, the bounding box is extended
// vertically to altitude = 0 to support FindUnitsInCircle queries
// When false, the bounding box is given for the actor
// at its current altitude
Rectangle CalculateBounds(bool useAltitude)
IEnumerable<IRenderable> Renderables(WorldRenderer wr)
{
var sizeVector = (PVecInt)size.Value;
var loc = CenterLocation - sizeVector / 2;
var si = Info.Traits.GetOrDefault<SelectableInfo>();
if (si != null && si.Bounds != null && si.Bounds.Length > 2)
{
loc += new PVecInt(si.Bounds[2], si.Bounds[3]);
}
var ios = occupySpace.Value;
if (ios != null)
{
var altitude = ios.CenterPosition.Z * Game.CellSize / 1024;
loc -= new PVecInt(0, altitude);
if (useAltitude)
sizeVector = new PVecInt(sizeVector.X, sizeVector.Y + altitude);
}
return new Rectangle(loc.X, loc.Y, sizeVector.X, sizeVector.Y);
foreach (var render in TraitsImplementing<IRender>())
foreach (var renderable in render.Render(this, wr))
yield return renderable;
}
public bool IsInWorld { get; internal set; }
@@ -245,5 +224,61 @@ namespace OpenRA
t.OnOwnerChanged(this, oldOwner, newOwner);
});
}
public bool IsDead()
{
if (Destroyed)
return true;
return (health.Value == null) ? false : health.Value.IsDead;
}
public bool IsDisguised()
{
return effectiveOwner.Value != null && effectiveOwner.Value.Disguised;
}
public void Kill(Actor attacker)
{
if (health.Value == null)
return;
health.Value.InflictDamage(this, attacker, health.Value.MaxHP, null, true);
}
#region Scripting interface
Lazy<ScriptActorInterface> luaInterface;
public void OnScriptBind(ScriptContext context)
{
luaInterface = Exts.Lazy(() => new ScriptActorInterface(context, this));
}
public LuaValue this[LuaRuntime runtime, LuaValue keyValue]
{
get { return luaInterface.Value[runtime, keyValue]; }
set { luaInterface.Value[runtime, keyValue] = value; }
}
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
Actor a, b;
if (!left.TryGetClrValue<Actor>(out a) || !right.TryGetClrValue<Actor>(out b))
return false;
return a == b;
}
public LuaValue ToString(LuaRuntime runtime)
{
return "Actor ({0})".F(this);
}
public bool HasScriptProperty(string name)
{
return luaInterface.Value.ContainsKey(name);
}
#endregion
}
}

View File

@@ -1,122 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA
{
public enum SubCell { FullCell, TopLeft, TopRight, Center, BottomLeft, BottomRight }
public class ActorMap
{
class InfluenceNode
{
public InfluenceNode next;
public SubCell subCell;
public Actor actor;
}
InfluenceNode[,] influence;
Map map;
public ActorMap( World world )
{
map = world.Map;
influence = new InfluenceNode[world.Map.MapSize.X, world.Map.MapSize.Y];
world.ActorAdded += a => Add( a, a.OccupiesSpace );
world.ActorRemoved += a => Remove( a, a.OccupiesSpace );
}
public IEnumerable<Actor> GetUnitsAt(CPos a)
{
if (!map.IsInMap(a)) yield break;
for( var i = influence[ a.X, a.Y ] ; i != null ; i = i.next )
if (!i.actor.Destroyed)
yield return i.actor;
}
public IEnumerable<Actor> GetUnitsAt(CPos a, SubCell sub)
{
if (!map.IsInMap(a)) yield break;
for( var i = influence[ a.X, a.Y ] ; i != null ; i = i.next )
if (!i.actor.Destroyed && (i.subCell == sub || i.subCell == SubCell.FullCell))
yield return i.actor;
}
public bool HasFreeSubCell(CPos a)
{
if (!AnyUnitsAt(a))
return true;
return new[]{ SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
SubCell.BottomLeft, SubCell.BottomRight }.Any(b => !AnyUnitsAt(a,b));
}
public SubCell? FreeSubCell(CPos a)
{
if (!HasFreeSubCell(a))
return null;
return new[]{ SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
SubCell.BottomLeft, SubCell.BottomRight }.First(b => !AnyUnitsAt(a,b));
}
public bool AnyUnitsAt(CPos a)
{
return influence[ a.X, a.Y ] != null;
}
public bool AnyUnitsAt(CPos a, SubCell sub)
{
for( var i = influence[ a.X, a.Y ] ; i != null ; i = i.next )
if (i.subCell == sub || i.subCell == SubCell.FullCell)
return true;
return false;
}
public void Add( Actor self, IOccupySpace unit )
{
if (unit != null)
foreach( var c in unit.OccupiedCells() )
influence[ c.First.X, c.First.Y ] = new InfluenceNode { next = influence[ c.First.X, c.First.Y ], subCell = c.Second, actor = self };
}
public void Remove( Actor self, IOccupySpace unit )
{
if (unit != null)
foreach (var c in unit.OccupiedCells())
RemoveInner( ref influence[ c.First.X, c.First.Y ], self );
}
void RemoveInner( ref InfluenceNode influenceNode, Actor toRemove )
{
if( influenceNode == null )
return;
else if( influenceNode.actor == toRemove )
influenceNode = influenceNode.next;
if (influenceNode != null)
RemoveInner( ref influenceNode.next, toRemove );
}
public void Update(Actor self, IOccupySpace unit)
{
Remove(self, unit);
if (!self.IsDead()) Add(self, unit);
}
}
}

View File

@@ -10,13 +10,13 @@
using System;
using System.Drawing;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Scripting;
namespace OpenRA
{
/// <summary>
/// Cell coordinate position in the world (coarse).
/// </summary>
public struct CPos
public struct CPos : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaEqualityBinding, ILuaTableBinding
{
public readonly int X, Y;
@@ -39,7 +39,6 @@ namespace OpenRA
public float2 ToFloat2() { return new float2(X, Y); }
public int2 ToInt2() { return new int2(X, Y); }
public PPos ToPPos() { return new PPos(Game.CellSize * X, Game.CellSize * Y); }
public WPos CenterPosition { get { return new WPos(1024 * X + 512, 1024 * Y + 512, 0); } }
public WPos TopLeft { get { return new WPos(1024 * X, 1024 * Y, 0); } }
@@ -55,15 +54,62 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CPos o = (CPos)obj;
return o == this;
var o = obj as CPos?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }
#region Scripting interface
public LuaValue Add(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CPos a;
CVec b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CVec>(out b))
throw new LuaException("Attempted to call CPos.Add(CPos, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a + b);
}
public LuaValue Subtract(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CPos a;
CVec b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CVec>(out b))
throw new LuaException("Attempted to call CPos.Subtract(CPos, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a - b);
}
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CPos a, b;
if (!left.TryGetClrValue<CPos>(out a) || !right.TryGetClrValue<CPos>(out b))
return false;
return a == b;
}
public LuaValue this[LuaRuntime runtime, LuaValue key]
{
get
{
switch (key.ToString())
{
case "X": return X;
case "Y": return Y;
default: throw new LuaException("CPos does not define a member '{0}'".F(key));
}
}
set
{
throw new LuaException("CPos is read-only. Use CPos.New to create a new value");
}
}
#endregion
}
public static class RectangleExtensions

View File

@@ -10,13 +10,13 @@
using System;
using System.Drawing;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Scripting;
namespace OpenRA
{
/// <summary>
/// Cell coordinate vector (coarse).
/// </summary>
public struct CVec
public struct CVec : IScriptBindable, ILuaAdditionBinding, ILuaSubtractionBinding, ILuaUnaryMinusBinding, ILuaEqualityBinding, ILuaTableBinding
{
public readonly int X, Y;
@@ -65,11 +65,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CVec o = (CVec)obj;
return o == this;
var o = obj as CVec?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }
@@ -85,5 +82,60 @@ namespace OpenRA
new CVec(1, 0),
new CVec(1, 1),
};
#region Scripting interface
public LuaValue Add(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
throw new LuaException("Attempted to call CVec.Add(CVec, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a + b);
}
public LuaValue Subtract(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
throw new LuaException("Attempted to call CVec.Subtract(CVec, CVec) with invalid arguments ({0}, {1})".F(left.WrappedClrType().Name, right.WrappedClrType().Name));
return new LuaCustomClrObject(a - b);
}
public LuaValue Minus(LuaRuntime runtime)
{
return new LuaCustomClrObject(-this);
}
public LuaValue Equals(LuaRuntime runtime, LuaValue left, LuaValue right)
{
CVec a, b;
if (!left.TryGetClrValue<CVec>(out a) || !right.TryGetClrValue<CVec>(out b))
return false;
return a == b;
}
public LuaValue this[LuaRuntime runtime, LuaValue key]
{
get
{
switch (key.ToString())
{
case "X": return X;
case "Y": return Y;
case "Facing": return Traits.Util.GetFacing(this, 0);
default: throw new LuaException("CVec does not define a member '{0}'".F(key));
}
}
set
{
throw new LuaException("WVec is read-only. Use CVec.New to create a new value");
}
}
#endregion
}
}

View File

@@ -19,33 +19,13 @@ namespace OpenRA
WebClient wc;
bool cancelled;
public Download(string url, string path, Action<DownloadProgressChangedEventArgs> onProgress, Action<AsyncCompletedEventArgs, bool> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_,a) => onProgress(a);
wc.DownloadFileCompleted += (_,a) => onComplete(a, cancelled);
Game.OnQuit += () => Cancel();
wc.DownloadFileCompleted += (_,a) => {Game.OnQuit -= () => Cancel();};
wc.DownloadFileAsync(new Uri(url), path);
}
public void Cancel()
{
Game.OnQuit -= () => Cancel();
wc.CancelAsync();
cancelled = true;
}
public static string FormatErrorMessage(Exception e)
{
var ex = e as System.Net.WebException;
if (ex == null) return e.Message;
var ex = e as WebException;
if (ex == null)
return e.Message;
switch(ex.Status)
switch (ex.Status)
{
case WebExceptionStatus.NameResolutionFailure:
case WebExceptionStatus.Timeout:
@@ -57,5 +37,40 @@ namespace OpenRA
return ex.Message;
}
}
public Download(string url, string path, Action<DownloadProgressChangedEventArgs> onProgress, Action<AsyncCompletedEventArgs, bool> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadFileCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += Cancel;
wc.DownloadFileCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadFileAsync(new Uri(url), path);
}
public Download(string url, Action<DownloadProgressChangedEventArgs> onProgress, Action<DownloadDataCompletedEventArgs, bool> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadDataCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += Cancel;
wc.DownloadDataCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadDataAsync(new Uri(url));
}
public void Cancel()
{
Game.OnQuit -= Cancel;
wc.CancelAsync();
cancelled = true;
}
}
}

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Effects
{

View File

@@ -10,7 +10,6 @@
using System.Collections.Generic;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Effects
{

View File

@@ -0,0 +1,38 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using OpenRA.Graphics;
namespace OpenRA.Effects
{
public class MoveFlash : IEffect
{
Animation anim;
WPos pos;
public MoveFlash(WPos pos, World world)
{
this.pos = pos;
anim = new Animation(world, "moveflsh");
anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
}
public void Tick(World world)
{
anim.Tick();
}
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
return anim.Render(pos, WVec.Zero, 0, wr.Palette("moveflash"), 1f / wr.Viewport.Zoom);
}
}
}

46
OpenRA.FileFormats/Exts.cs → OpenRA.Game/Exts.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -11,9 +11,10 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Globalization;
using System.Linq;
using System.Reflection;
using OpenRA.Support;
namespace OpenRA
{
@@ -36,6 +37,8 @@ namespace OpenRA
fn(ee);
}
public static Lazy<T> Lazy<T>(Func<T> p) { return new Lazy<T>(p); }
public static IEnumerable<string> GetNamespaces(this Assembly a)
{
return a.GetTypes().Select(t => t.Namespace).Distinct().Where(n => n != null);
@@ -83,12 +86,6 @@ namespace OpenRA
return (k & mod) == mod;
}
public static bool IsValidInput(this KeyInput key)
{
return char.IsLetter(key.UnicodeChar) || char.IsDigit(key.UnicodeChar) ||
char.IsSymbol(key.UnicodeChar) || char.IsSeparator(key.UnicodeChar) ||
char.IsPunctuation(key.UnicodeChar);
}
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k)
where V : new()
@@ -104,13 +101,13 @@ namespace OpenRA
return ret;
}
public static T Random<T>(this IEnumerable<T> ts, Thirdparty.Random r)
public static T Random<T>(this IEnumerable<T> ts, MersenneTwister r)
{
var xs = ts.ToArray();
return xs[r.Next(xs.Length)];
}
public static T RandomOrDefault<T>(this IEnumerable<T> ts, Thirdparty.Random r)
public static T RandomOrDefault<T>(this IEnumerable<T> ts, MersenneTwister r)
{
if (!ts.Any())
return default(T);
@@ -154,7 +151,7 @@ namespace OpenRA
public static string JoinWith<T>(this IEnumerable<T> ts, string j)
{
return string.Join(j, ts.Select(t => t.ToString()).ToArray());
return string.Join(j, ts);
}
public static IEnumerable<T> Append<T>(this IEnumerable<T> ts, params T[] moreTs)
@@ -256,11 +253,38 @@ namespace OpenRA
throw new InvalidOperationException("ToBits only accepts up to 32 values.");
return result;
}
public static int ParseIntegerInvariant(string s)
{
return int.Parse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo);
}
public static bool TryParseIntegerInvariant(string s, out int i)
{
return int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i);
}
}
public static class Enum<T>
{
public static T Parse(string s) { return (T)Enum.Parse(typeof(T), s); }
public static T[] GetValues() { return (T[])Enum.GetValues(typeof(T)); }
public static bool TryParse(string s, bool ignoreCase, out T value)
{
// The string may be a comma delimited list of values
var names = ignoreCase ? Enum.GetNames(typeof(T)).Select(x => x.ToLowerInvariant()) : Enum.GetNames(typeof(T));
var values = ignoreCase ? s.Split(',').Select(x => x.Trim().ToLowerInvariant()) : s.Split(',').Select(x => x.Trim());
if (values.Any(x => !names.Contains(x)))
{
value = default(T);
return false;
}
value = (T)Enum.Parse(typeof(T), s, ignoreCase);
return true;
}
}
}

453
OpenRA.Game/FieldLoader.cs Normal file
View File

@@ -0,0 +1,453 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using OpenRA.Graphics;
using OpenRA.Primitives;
namespace OpenRA
{
public static class FieldLoader
{
public static Func<string, Type, string, object> InvalidValueAction = (s, t, f) =>
{
throw new InvalidOperationException("FieldLoader: Cannot parse `{0}` into `{1}.{2}` ".F(s, f, t));
};
public static Action<string, Type> UnknownFieldAction = (s, f) =>
{
throw new NotImplementedException("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
};
public static void Load(object self, MiniYaml my)
{
var loadDict = typeLoadInfo[self.GetType()];
foreach (var kv in loadDict)
{
object val;
if (kv.Value != null)
val = kv.Value(kv.Key.Name, kv.Key.FieldType, my);
else if (!TryGetValueFromYaml(kv.Key, my, out val))
continue;
kv.Key.SetValue(self, val);
}
}
static bool TryGetValueFromYaml(FieldInfo field, MiniYaml yaml, out object ret)
{
ret = null;
var n = yaml.Nodes.Where(x => x.Key == field.Name).ToList();
if (n.Count == 0)
return false;
if (n.Count == 1 && n[0].Value.Nodes.Count == 0)
{
ret = GetValue(field.Name, field.FieldType, n[0].Value.Value, field);
return true;
}
else if (n.Count > 1)
{
throw new InvalidOperationException("The field {0} has multiple definitions:\n{1}"
.F(field.Name, n.Select(m => "\t- " + m.Location).JoinWith("\n")));
}
throw new InvalidOperationException("TryGetValueFromYaml: unable to load field {0} (of type {1})".F(field.Name, field.FieldType));
}
public static T Load<T>(MiniYaml y) where T : new()
{
var t = new T();
Load(t, y);
return t;
}
static readonly object[] NoIndexes = { };
public static void LoadField(object self, string key, string value)
{
var field = self.GetType().GetField(key.Trim());
if (field != null)
{
if (!field.HasAttribute<FieldFromYamlKeyAttribute>())
field.SetValue(self, GetValue(field.Name, field.FieldType, value, field));
return;
}
var prop = self.GetType().GetProperty(key.Trim());
if (prop != null)
{
if (!prop.HasAttribute<FieldFromYamlKeyAttribute>())
prop.SetValue(self, GetValue(prop.Name, prop.PropertyType, value, prop), NoIndexes);
return;
}
UnknownFieldAction(key.Trim(), self.GetType());
}
public static T GetValue<T>(string field, string value)
{
return (T)GetValue(field, typeof(T), value, null);
}
public static object GetValue(string fieldName, Type fieldType, string value)
{
return GetValue(fieldName, fieldType, value, null);
}
public static object GetValue(string fieldName, Type fieldType, string value, MemberInfo field)
{
if (value != null) value = value.Trim();
if (fieldType == typeof(int))
{
int res;
if (Exts.TryParseIntegerInvariant(value, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(ushort))
{
ushort res;
if (ushort.TryParse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
if (fieldType == typeof(long))
{
long res;
if (long.TryParse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(float))
{
float res;
if (float.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
return res * (value.Contains('%') ? 0.01f : 1f);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(decimal))
{
decimal res;
if (decimal.TryParse(value.Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
return res * (value.Contains('%') ? 0.01m : 1m);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(string))
{
if (field != null && field.HasAttribute<TranslateAttribute>())
return Regex.Replace(value, "@[^@]+@", m => Translate(m.Value.Substring(1, m.Value.Length - 2)), RegexOptions.Compiled);
return value;
}
else if (fieldType == typeof(Color))
{
var parts = value.Split(',');
if (parts.Length == 3)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
if (parts.Length == 4)
return Color.FromArgb(
Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[3]).Clamp(0, 255));
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(HSLColor))
{
var parts = value.Split(',');
// Allow old ColorRamp format to be parsed as HSLColor
if (parts.Length == 3 || parts.Length == 4)
return new HSLColor(
(byte)Exts.ParseIntegerInvariant(parts[0]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[1]).Clamp(0, 255),
(byte)Exts.ParseIntegerInvariant(parts[2]).Clamp(0, 255));
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(Hotkey))
{
Hotkey res;
if (Hotkey.TryParse(value, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRange))
{
WRange res;
if (WRange.TryParse(value, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec))
{
var parts = value.Split(',');
if (parts.Length == 3)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WVec(rx, ry, rz);
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WPos))
{
var parts = value.Split(',');
if (parts.Length == 3)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[0], out rx) && WRange.TryParse(parts[1], out ry) && WRange.TryParse(parts[2], out rz))
return new WPos(rx, ry, rz);
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WAngle))
{
int res;
if (Exts.TryParseIntegerInvariant(value, out res))
return new WAngle(res);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRot))
{
var parts = value.Split(',');
if (parts.Length == 3)
{
int rr, rp, ry;
if (Exts.TryParseIntegerInvariant(value, out rr)
&& Exts.TryParseIntegerInvariant(value, out rp)
&& Exts.TryParseIntegerInvariant(value, out ry))
return new WRot(new WAngle(rr), new WAngle(rp), new WAngle(ry));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CPos))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType.IsEnum)
{
try
{
return Enum.Parse(fieldType, value, true);
}
catch (ArgumentException)
{
return InvalidValueAction(value, fieldType, fieldName);
}
}
else if (fieldType == typeof(bool))
return ParseYesNo(value, fieldType, fieldName);
else if (fieldType.IsArray)
{
if (value == null)
return Array.CreateInstance(fieldType.GetElementType(), 0);
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var ret = Array.CreateInstance(fieldType.GetElementType(), parts.Length);
for (int i = 0; i < parts.Length; i++)
ret.SetValue(GetValue(fieldName, fieldType.GetElementType(), parts[i].Trim(), field), i);
return ret;
}
else if (fieldType == typeof(Size))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
else if (fieldType == typeof(float2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
float xx = 0;
float yy = 0;
float res;
if (float.TryParse(parts[0].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
xx = res * (parts[0].Contains('%') ? 0.01f : 1f);
if (float.TryParse(parts[1].Replace("%", ""), NumberStyles.Float, NumberFormatInfo.InvariantInfo, out res))
yy = res * (parts[1].Contains('%') ? 0.01f : 1f);
return new float2(xx, yy);
}
else if (fieldType == typeof(Rectangle))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Rectangle(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]),
Exts.ParseIntegerInvariant(parts[2]),
Exts.ParseIntegerInvariant(parts[3]));
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Bits<>))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
var argTypes = new Type[] { typeof(string[]) };
var argValues = new object[] { parts };
return fieldType.GetConstructor(argTypes).Invoke(argValues);
}
else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>))
{
var innerType = fieldType.GetGenericArguments().First();
var innerValue = GetValue("Nullable<T>", innerType, value, field);
return fieldType.GetConstructor(new[] { innerType }).Invoke(new[] { innerValue });
}
else if (fieldType == typeof(DateTime))
{
DateTime dt;
if (DateTime.TryParseExact(value, "yyyy-MM-dd HH-mm-ss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out dt))
return dt;
return InvalidValueAction(value, fieldType, fieldName);
}
UnknownFieldAction("[Type] {0}".F(value), fieldType);
return null;
}
static object ParseYesNo(string p, Type fieldType, string field)
{
p = p.ToLowerInvariant();
if (p == "yes") return true;
if (p == "true") return true;
if (p == "no") return false;
if (p == "false") return false;
return InvalidValueAction(p, fieldType, field);
}
static Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>> typeLoadInfo = new Cache<Type, Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>>(GetTypeLoadInfo);
static Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>> GetTypeLoadInfo(Type type)
{
var ret = new Dictionary<FieldInfo, Func<string, Type, MiniYaml, object>>();
foreach (var ff in type.GetFields())
{
var field = ff;
var ignore = field.GetCustomAttributes<IgnoreAttribute>(false);
var loadUsing = field.GetCustomAttributes<LoadUsingAttribute>(false);
var fromYamlKey = field.GetCustomAttributes<FieldFromYamlKeyAttribute>(false);
if (loadUsing.Length != 0)
ret[field] = (_1, fieldType, yaml) => loadUsing[0].LoaderFunc(field)(yaml);
else if (fromYamlKey.Length != 0)
ret[field] = (f, ft, yaml) => GetValue(f, ft, yaml.Value, field);
else if (ignore.Length == 0)
ret[field] = null;
}
return ret;
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class IgnoreAttribute : Attribute { }
[AttributeUsage(AttributeTargets.Field)]
public sealed class LoadUsingAttribute : Attribute
{
Func<MiniYaml, object> loaderFuncCache;
public readonly string Loader;
public LoadUsingAttribute(string loader)
{
Loader = loader;
}
internal Func<MiniYaml, object> LoaderFunc(FieldInfo field)
{
const BindingFlags BindingFlag = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static;
if (loaderFuncCache == null)
loaderFuncCache = (Func<MiniYaml, object>)Delegate.CreateDelegate(typeof(Func<MiniYaml, object>), field.DeclaringType.GetMethod(Loader, BindingFlag));
return loaderFuncCache;
}
}
public static string Translate(string key)
{
if (Translations == null || string.IsNullOrEmpty(key))
return key;
string value;
if (!Translations.TryGetValue(key, out value))
return key;
return value;
}
public static Dictionary<string, string> Translations = new Dictionary<string, string>();
}
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
public sealed class TranslateAttribute : Attribute { }
public sealed class FieldFromYamlKeyAttribute : Attribute { }
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
public sealed class DescAttribute : Attribute
{
public readonly string[] Lines;
public DescAttribute(params string[] lines) { Lines = lines; }
}
}

96
OpenRA.Game/FieldSaver.cs Normal file
View File

@@ -0,0 +1,96 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Reflection;
namespace OpenRA
{
public static class FieldSaver
{
public static MiniYaml Save(object o)
{
var nodes = new List<MiniYamlNode>();
string root = null;
foreach (var f in o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance))
{
if (f.HasAttribute<FieldFromYamlKeyAttribute>())
root = FormatValue(o, f);
else
nodes.Add(new MiniYamlNode(f.Name, FormatValue(o, f)));
}
return new MiniYaml(root, nodes);
}
public static MiniYaml SaveDifferences(object o, object from)
{
if (o.GetType() != from.GetType())
throw new InvalidOperationException("FieldLoader: can't diff objects of different types");
var fields = o.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance)
.Where(f => FormatValue(o, f) != FormatValue(from, f));
return new MiniYaml(null, fields.Select(f => new MiniYamlNode(f.Name, FormatValue(o, f))).ToList());
}
public static MiniYamlNode SaveField(object o, string field)
{
return new MiniYamlNode(field, FormatValue(o, o.GetType().GetField(field)));
}
public static string FormatValue(object v, Type t)
{
if (v == null)
return "";
// Color.ToString() does the wrong thing; force it to format as an array
if (t == typeof(Color))
{
var c = (Color)v;
return "{0},{1},{2},{3}".F(((int)c.A).Clamp(0, 255),
((int)c.R).Clamp(0, 255),
((int)c.G).Clamp(0, 255),
((int)c.B).Clamp(0, 255));
}
// Don't save floats in settings.yaml using country-specific decimal separators which can be misunderstood as group seperators.
if (t == typeof(float))
return ((float)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(Rectangle))
{
var r = (Rectangle)v;
return "{0},{1},{2},{3}".F(r.X, r.Y, r.Width, r.Height);
}
if (t.IsArray)
{
var elems = ((Array)v).OfType<object>();
return elems.JoinWith(",");
}
if (t == typeof(DateTime))
return ((DateTime)v).ToString("yyyy-MM-dd HH-mm-ss", CultureInfo.InvariantCulture);
return v.ToString();
}
public static string FormatValue(object o, FieldInfo f)
{
return FormatValue(f.GetValue(o), f.FieldType);
}
}
}

View File

@@ -47,7 +47,7 @@ namespace OpenRA.FileFormats
delegate void CipherFunc( ref uint a, ref uint b );
uint[] RunCipher(uint[] data, CipherFunc f)
static uint[] RunCipher(uint[] data, CipherFunc f)
{
uint[] result = new uint[data.Length];
@@ -120,7 +120,7 @@ namespace OpenRA.FileFormats
a ^= bf_f(b) ^ m_p[n];
}
uint SwapBytes(uint i)
static uint SwapBytes(uint i)
{
i = (i << 16) | (i >> 16);
i = ((i << 8) & 0xff00ff00) | ((i >> 8) & 0x00ff00ff);

View File

@@ -35,13 +35,13 @@ namespace OpenRA.FileFormats
uint glob1_hi_bitlen;
uint glob1_hi_inv_lo, glob1_hi_inv_hi;
void init_bignum(uint[] n, uint val, uint len)
static void init_bignum(uint[] n, uint val, uint len)
{
for (int i = 0; i < len; i++) n[i] = 0;
n[0] = val;
}
void move_key_to_big(uint[] n, byte[] key, uint klen, uint blen)
static void move_key_to_big(uint[] n, byte[] key, uint klen, uint blen)
{
byte sign;
@@ -60,7 +60,7 @@ namespace OpenRA.FileFormats
}
}
void key_to_bignum(uint[] n, byte[] key, uint len)
static void key_to_bignum(uint[] n, byte[] key, uint len)
{
uint keylen;
int i;
@@ -85,7 +85,7 @@ namespace OpenRA.FileFormats
move_key_to_big(n, key.Skip(j).ToArray(), keylen, len);
}
uint len_bignum(uint[] n, uint len)
static uint len_bignum(uint[] n, uint len)
{
uint i;
i = len - 1;
@@ -93,7 +93,7 @@ namespace OpenRA.FileFormats
return i + 1;
}
uint bitlen_bignum(uint[] n, uint len)
static uint bitlen_bignum(uint[] n, uint len)
{
uint ddlen, bitlen, mask;
ddlen = len_bignum(n, len);
@@ -122,7 +122,7 @@ namespace OpenRA.FileFormats
return (55 / a + 1) * (a + 1);
}
int cmp_bignum(uint[] n1, uint[] n2, uint len)
static int cmp_bignum(uint[] n1, uint[] n2, uint len)
{
while (len > 0)
@@ -134,12 +134,12 @@ namespace OpenRA.FileFormats
return 0;
}
void mov_bignum(uint[] dest, uint[] src, uint len)
static void mov_bignum(uint[] dest, uint[] src, uint len)
{
Array.Copy(src, dest, len);
}
void shr_bignum(uint[] n, int bits, int len)
static void shr_bignum(uint[] n, int bits, int len)
{
int i; int i2 = bits / 32;
@@ -155,7 +155,7 @@ namespace OpenRA.FileFormats
n[i] = n[i] >> bits;
}
void shl_bignum(uint[] n, int bits, int len)
static void shl_bignum(uint[] n, int bits, int len)
{
int i, i2;
@@ -172,7 +172,7 @@ namespace OpenRA.FileFormats
n[0] <<= bits;
}
uint sub_bignum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
static uint sub_bignum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
{
uint i1, i2;
@@ -199,7 +199,7 @@ namespace OpenRA.FileFormats
return carry;
}
unsafe uint sub_bignum(uint* dest, uint* src1, uint* src2, uint carry, int len)
static unsafe uint sub_bignum(uint* dest, uint* src1, uint* src2, uint carry, int len)
{
uint i1, i2;
@@ -220,7 +220,7 @@ namespace OpenRA.FileFormats
return carry;
}
void inv_bignum(uint[] n1, uint[] n2, uint len)
static void inv_bignum(uint[] n1, uint[] n2, uint len)
{
uint[] n_tmp = new uint[64];
uint n2_bytelen, bit;
@@ -255,7 +255,7 @@ namespace OpenRA.FileFormats
init_bignum(n_tmp, 0, len);
}
void inc_bignum(uint[] n, uint len)
static void inc_bignum(uint[] n, uint len)
{
int i = 0;
while ((++n[i] == 0) && (--len > 0)) i++;
@@ -282,7 +282,7 @@ namespace OpenRA.FileFormats
glob1_hi_inv_hi = (ushort)(glob1_hi_inv[0] >> 16);
}
unsafe void mul_bignum_word(ushort *pn1, uint[] n2, uint mul, uint len)
static unsafe void mul_bignum_word(ushort* pn1, uint[] n2, uint mul, uint len)
{
uint i, tmp;
unsafe
@@ -305,7 +305,7 @@ namespace OpenRA.FileFormats
}
}
void mul_bignum(uint[] dest, uint[] src1, uint[] src2, uint len)
static void mul_bignum(uint[] dest, uint[] src1, uint[] src2, uint len)
{
uint i;
@@ -324,13 +324,13 @@ namespace OpenRA.FileFormats
}
}
void not_bignum(uint[] n, uint len)
static void not_bignum(uint[] n, uint len)
{
uint i;
for (i = 0; i < len; i++) n[i] = ~n[i];
}
void neg_bignum(uint[] n, uint len)
static void neg_bignum(uint[] n, uint len)
{
not_bignum(n, len);
inc_bignum(n, len);
@@ -348,7 +348,7 @@ namespace OpenRA.FileFormats
return i & 0xffff;
}
void dec_bignum(uint[] n, uint len)
static void dec_bignum(uint[] n, uint len)
{
int i = 0;
while ((--n[i] == 0xffffffff) && (--len > 0))
@@ -450,7 +450,7 @@ namespace OpenRA.FileFormats
}
}
unsafe void memcpy(byte* dest, byte* src, int len)
static unsafe void memcpy(byte* dest, byte* src, int len)
{
while (len-- != 0) *dest++ = *src++;
}

View File

@@ -92,7 +92,7 @@ namespace OpenRA.FileFormats
/// A fast (native) CRC32 implementation that can be used on a regular byte arrays.
/// </summary>
/// <param name="data">The data from which to calculate the checksum.</param>
/// <param name="polynomal">The polynomal.</param>
/// <param name="polynomial">The polynomial.</param>
/// <returns>
/// The calculated checksum.
/// </returns>
@@ -115,7 +115,7 @@ namespace OpenRA.FileFormats
/// </summary>
/// <param name="data"> [in,out] If non-null, the.</param>
/// <param name="len"> The length of the data data.</param>
/// <param name="polynomal">The polynomal to xor with.</param>
/// <param name="polynomial">The polynomal to xor with.</param>
/// <returns>The calculated checksum.</returns>
public static unsafe uint Calculate(byte* data, uint len, uint polynomial)
{

View File

@@ -12,25 +12,22 @@ namespace OpenRA.FileFormats
{
public static class Format2
{
public static int DecodeInto(byte[] src, byte[] dest)
public static void DecodeInto(byte[] src, byte[] dest, int destIndex)
{
FastByteReader r = new FastByteReader(src);
var r = new FastByteReader(src);
int i = 0;
while (!r.Done())
{
byte cmd = r.ReadByte();
var cmd = r.ReadByte();
if (cmd == 0)
{
byte count = r.ReadByte();
var count = r.ReadByte();
while (count-- > 0)
dest[i++] = 0;
dest[destIndex++] = 0;
}
else
dest[i++] = cmd;
dest[destIndex++] = cmd;
}
return i;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -27,7 +27,7 @@ namespace OpenRA.FileFormats
public byte ReadByte() { return src[offset++]; }
public int ReadWord()
{
int x = ReadByte();
var x = ReadByte();
return x | (ReadByte() << 8);
}
@@ -42,84 +42,84 @@ namespace OpenRA.FileFormats
public static class Format80
{
static void ReplicatePrevious( byte[] dest, int destIndex, int srcIndex, int count )
static void ReplicatePrevious(byte[] dest, int destIndex, int srcIndex, int count)
{
if( srcIndex > destIndex )
if (srcIndex > destIndex)
throw new NotImplementedException("srcIndex > destIndex {0} {1}".F(srcIndex, destIndex));
if( destIndex - srcIndex == 1 )
if (destIndex - srcIndex == 1)
{
for( int i = 0 ; i < count ; i++ )
dest[ destIndex + i ] = dest[ destIndex - 1 ];
for (var i = 0; i < count; i++)
dest[destIndex + i] = dest[destIndex - 1];
}
else
{
for( int i = 0 ; i < count ; i++ )
dest[ destIndex + i ] = dest[ srcIndex + i ];
for (var i = 0; i < count; i++)
dest[destIndex + i] = dest[srcIndex + i];
}
}
public static int DecodeInto( byte[] src, byte[] dest )
public static int DecodeInto(byte[] src, byte[] dest)
{
var ctx = new FastByteReader(src);
int destIndex = 0;
var destIndex = 0;
while( true )
while (true)
{
byte i = ctx.ReadByte();
if( ( i & 0x80 ) == 0 )
var i = ctx.ReadByte();
if ((i & 0x80) == 0)
{
// case 2
byte secondByte = ctx.ReadByte();
int count = ( ( i & 0x70 ) >> 4 ) + 3;
int rpos = ( ( i & 0xf ) << 8 ) + secondByte;
var secondByte = ctx.ReadByte();
var count = ((i & 0x70) >> 4) + 3;
var rpos = ((i & 0xf) << 8) + secondByte;
ReplicatePrevious( dest, destIndex, destIndex - rpos, count );
ReplicatePrevious(dest, destIndex, destIndex - rpos, count);
destIndex += count;
}
else if( ( i & 0x40 ) == 0 )
else if ((i & 0x40) == 0)
{
// case 1
int count = i & 0x3F;
if( count == 0 )
var count = i & 0x3F;
if (count == 0)
return destIndex;
ctx.CopyTo( dest, destIndex, count );
ctx.CopyTo(dest, destIndex, count);
destIndex += count;
}
else
{
int count3 = i & 0x3F;
if( count3 == 0x3E )
var count3 = i & 0x3F;
if (count3 == 0x3E)
{
// case 4
int count = ctx.ReadWord();
byte color = ctx.ReadByte();
var count = ctx.ReadWord();
var color = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = color;
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] = color;
}
else if( count3 == 0x3F )
else if (count3 == 0x3F)
{
// case 5
int count = ctx.ReadWord();
int srcIndex = ctx.ReadWord();
if( srcIndex >= destIndex )
var count = ctx.ReadWord();
var srcIndex = ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = dest[ srcIndex++ ];
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] = dest[srcIndex++];
}
else
{
// case 3
int count = count3 + 3;
int srcIndex = ctx.ReadWord();
if( srcIndex >= destIndex )
var count = count3 + 3;
var srcIndex = ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = dest[ srcIndex++ ];
for (var end = destIndex + count; destIndex < end; destIndex++)
dest[destIndex] = dest[srcIndex++];
}
}
}

View File

@@ -9,9 +9,7 @@
#endregion
using System;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{

View File

@@ -56,7 +56,7 @@ namespace OpenRA.FileFormats
IniSection ProcessSection(string line)
{
Match m = sectionPattern.Match(line);
if (m == null || !m.Success)
if (!m.Success)
return null;
string sectionName = m.Groups[1].Value.ToLowerInvariant();
@@ -66,7 +66,7 @@ namespace OpenRA.FileFormats
return ret;
}
bool ProcessEntry(string line, IniSection currentSection)
static bool ProcessEntry(string line, IniSection currentSection)
{
var comment = line.IndexOf(';');
if (comment >= 0)

View File

@@ -18,7 +18,7 @@ using System.Net;
using System.Runtime.InteropServices;
using System.Text;
namespace OpenRA.FileFormats.Graphics
namespace OpenRA.FileFormats
{
public static class PngLoader
{

View File

@@ -8,22 +8,21 @@
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class R8Image
class R8Image : ISpriteFrame
{
public readonly Size Size;
public readonly int2 Offset;
public readonly byte[] Image;
// Legacy variable. Can be removed when the utility command is made sensible.
public readonly Size FrameSize;
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get; private set; }
public byte[] Data { get; set; }
public R8Image(Stream s)
{
@@ -53,45 +52,28 @@ namespace OpenRA.FileFormats
// Skip alignment byte
s.ReadUInt8();
// Ignore palette header
if (type == 1 && paletteOffset != 0)
s.Seek(8, SeekOrigin.Current);
Data = s.ReadBytes(width*height);
Image = s.ReadBytes(width*height);
// Ignore palette data
// Ignore palette
if (type == 1 && paletteOffset != 0)
s.Seek(512, SeekOrigin.Current);
s.Seek(520, SeekOrigin.Current);
}
}
public class R8Reader : IEnumerable<R8Image>
public class R8Reader : ISpriteSource
{
readonly List<R8Image> headers = new List<R8Image>();
readonly List<ISpriteFrame> frames = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return frames; } }
public bool CacheWhenLoadingTileset { get { return true; } }
public readonly int Frames;
public readonly int ImageCount;
public R8Reader(Stream stream)
{
while (stream.Position < stream.Length)
{
headers.Add(new R8Image(stream));
Frames++;
frames.Add(new R8Image(stream));
ImageCount++;
}
}
public R8Image this[int index]
{
get { return headers[index]; }
}
public IEnumerator<R8Image> GetEnumerator()
{
return headers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

View File

@@ -0,0 +1,124 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
using System.Text;
using OpenRA.Network;
namespace OpenRA.FileFormats
{
public class ReplayMetadata
{
// Must be an invalid replay 'client' value
public const int MetaStartMarker = -1;
public const int MetaEndMarker = -2;
public const int MetaVersion = 0x00000001;
public readonly GameInformation GameInfo;
public string FilePath { get; private set; }
public ReplayMetadata(GameInformation info)
{
if (info == null)
throw new ArgumentNullException("info");
GameInfo = info;
}
ReplayMetadata(FileStream fs, string path)
{
FilePath = path;
// Read start marker
if (fs.ReadInt32() != MetaStartMarker)
throw new InvalidOperationException("Expected MetaStartMarker but found an invalid value.");
// Read version
var version = fs.ReadInt32();
if (version != MetaVersion)
throw new NotSupportedException("Metadata version {0} is not supported".F(version));
// Read game info (max 100K limit as a safeguard against corrupted files)
string data = fs.ReadString(Encoding.UTF8, 1024 * 100);
GameInfo = GameInformation.Deserialize(data);
}
public void Write(BinaryWriter writer)
{
// Write start marker & version
writer.Write(MetaStartMarker);
writer.Write(MetaVersion);
// Write data
int dataLength = 0;
{
// Write lobby info data
writer.Flush();
dataLength += writer.BaseStream.WriteString(Encoding.UTF8, GameInfo.Serialize());
}
// Write total length & end marker
writer.Write(dataLength);
writer.Write(MetaEndMarker);
}
public void RenameFile(string newFilenameWithoutExtension)
{
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".rep";
File.Move(FilePath, newPath);
FilePath = newPath;
}
public static ReplayMetadata Read(string path)
{
using (var fs = new FileStream(path, FileMode.Open))
return Read(fs, path);
}
static ReplayMetadata Read(FileStream fs, string path)
{
if (!fs.CanSeek)
return null;
if (fs.Length < 20)
return null;
try
{
fs.Seek(-(4 + 4), SeekOrigin.End);
var dataLength = fs.ReadInt32();
if (fs.ReadInt32() == MetaEndMarker)
{
// go back by (end marker + length storage + data + version + start marker) bytes
fs.Seek(-(4 + 4 + dataLength + 4 + 4), SeekOrigin.Current);
try
{
return new ReplayMetadata(fs, path);
}
catch (InvalidOperationException ex)
{
Log.Write("debug", ex.ToString());
}
catch (NotSupportedException ex)
{
Log.Write("debug", ex.ToString());
}
}
}
catch (IOException ex)
{
Log.Write("debug", ex.ToString());
}
return null;
}
}
}

View File

@@ -0,0 +1,115 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
[Flags] enum FormatFlags : int
{
PaletteTable = 1,
SkipFormat80 = 2,
VariableLengthTable = 4
}
class Frame : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get { return Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public Frame(Stream s)
{
var flags = (FormatFlags)s.ReadUInt16();
s.Position += 1;
var width = s.ReadUInt16();
var height = s.ReadUInt8();
Size = new Size(width, height);
// Subtract header size
var dataLeft = s.ReadUInt16() - 10;
var dataSize = s.ReadUInt16();
byte[] table;
if ((flags & FormatFlags.PaletteTable) != 0)
{
var n = (flags & FormatFlags.VariableLengthTable) != 0 ? s.ReadUInt8() : (byte)16;
table = new byte[n];
for (var i = 0; i < n; i++)
table[i] = s.ReadUInt8();
dataLeft -= n;
}
else
{
table = new byte[256];
for (var i = 0; i < 256; i++)
table[i] = (byte)i;
table[1] = 0x7f;
table[2] = 0x7e;
table[3] = 0x7d;
table[4] = 0x7c;
}
Data = new byte[width * height];
// Decode image data
var compressed = s.ReadBytes(dataLeft);
if ((flags & FormatFlags.SkipFormat80) == 0)
{
var temp = new byte[dataSize];
Format80.DecodeInto(compressed, temp);
compressed = temp;
}
Format2.DecodeInto(compressed, Data, 0);
// Lookup values in lookup table
for (var j = 0; j < Data.Length; j++)
Data[j] = table[Data[j]];
}
}
public class ShpD2Reader : ISpriteSource
{
readonly List<ISpriteFrame> frames = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return frames; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public ShpD2Reader(Stream s)
{
var imageCount = s.ReadUInt16();
// Last offset is pointer to end of file.
var offsets = new uint[imageCount + 1];
var temp = s.ReadUInt32();
// If fourth byte in file is non-zero, the offsets are two bytes each.
var twoByteOffset = (temp & 0xFF0000) > 0;
s.Position = 2;
for (var i = 0; i < imageCount + 1; i++)
offsets[i] = (twoByteOffset ? s.ReadUInt16() : s.ReadUInt32()) + 2;
for (var i = 0; i < imageCount; i++)
{
s.Position = offsets[i];
frames.Add(new Frame(s));
}
}
}
}

View File

@@ -0,0 +1,203 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
enum Format { Format20 = 0x20, Format40 = 0x40, Format80 = 0x80 }
class ImageHeader : ISpriteFrame
{
public Size Size { get { return reader.Size; } }
public Size FrameSize { get { return reader.Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public uint FileOffset;
public Format Format;
public uint RefOffset;
public Format RefFormat;
public ImageHeader RefImage;
ShpReader reader;
// Used by ShpWriter
public ImageHeader() { }
public ImageHeader(Stream stream, ShpReader reader)
{
this.reader = reader;
var data = stream.ReadUInt32();
FileOffset = data & 0xffffff;
Format = (Format)(data >> 24);
RefOffset = stream.ReadUInt16();
RefFormat = (Format)stream.ReadUInt16();
}
public void WriteTo(BinaryWriter writer)
{
writer.Write(FileOffset | ((uint)Format << 24));
writer.Write((ushort)RefOffset);
writer.Write((ushort)RefFormat);
}
}
public class ShpReader : ISpriteSource
{
readonly List<ImageHeader> headers = new List<ImageHeader>();
Lazy<IEnumerable<ISpriteFrame>> spriteFrames;
public IEnumerable<ISpriteFrame> Frames { get { return spriteFrames.Value; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public readonly Size Size;
int recurseDepth = 0;
readonly int imageCount;
public ShpReader(Stream stream)
{
imageCount = stream.ReadUInt16();
stream.Position += 4;
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
Size = new Size(width, height);
stream.Position += 4;
for (var i = 0; i < imageCount; i++)
headers.Add(new ImageHeader(stream, this));
// Skip eof and zero headers
stream.Position += 16;
var offsets = headers.ToDictionary(h => h.FileOffset, h => h);
for (var i = 0; i < imageCount; i++)
{
var h = headers[i];
if (h.Format == Format.Format20)
h.RefImage = headers[i - 1];
else if (h.Format == Format.Format40 && !offsets.TryGetValue(h.RefOffset, out h.RefImage))
throw new InvalidDataException("Reference doesnt point to image data {0}->{1}".F(h.FileOffset, h.RefOffset));
}
foreach (var h in headers)
Decompress(stream, h);
spriteFrames = Exts.Lazy(() => headers.Cast<ISpriteFrame>());
}
static byte[] ReadCompressedData(Stream stream, ImageHeader h)
{
stream.Position = h.FileOffset;
// Actually, far too big. There's no length field with the correct length though :(
var compressedLength = (int)(stream.Length - stream.Position);
var compressedBytes = new byte[compressedLength];
stream.Read(compressedBytes, 0, compressedLength);
return compressedBytes;
}
void Decompress(Stream stream, ImageHeader h)
{
// No extra work is required for empty frames
if (h.Size.Width == 0 || h.Size.Height == 0)
return;
if (recurseDepth > imageCount)
throw new InvalidDataException("Format20/40 headers contain infinite loop");
switch (h.Format)
{
case Format.Format20:
case Format.Format40:
{
if (h.RefImage.Data == null)
{
++recurseDepth;
Decompress(stream, h.RefImage);
--recurseDepth;
}
h.Data = CopyImageData(h.RefImage.Data);
Format40.DecodeInto(ReadCompressedData(stream, h), h.Data);
break;
}
case Format.Format80:
{
var imageBytes = new byte[Size.Width * Size.Height];
Format80.DecodeInto(ReadCompressedData(stream, h), imageBytes);
h.Data = imageBytes;
break;
}
default:
throw new InvalidDataException();
}
}
byte[] CopyImageData(byte[] baseImage)
{
var imageData = new byte[Size.Width * Size.Height];
for (var i = 0; i < Size.Width * Size.Height; i++)
imageData[i] = baseImage[i];
return imageData;
}
public static ShpReader Load(string filename)
{
using (var s = File.OpenRead(filename))
return new ShpReader(s);
}
public static void Write(Stream s, Size size, IEnumerable<byte[]> frames)
{
var compressedFrames = frames.Select(f => Format80.Encode(f)).ToArray();
// note: end-of-file and all-zeroes headers
var dataOffset = 14 + (compressedFrames.Length + 2) * 8;
using (var bw = new BinaryWriter(s))
{
bw.Write((ushort)compressedFrames.Length);
bw.Write((ushort)0);
bw.Write((ushort)0);
bw.Write((ushort)size.Width);
bw.Write((ushort)size.Height);
bw.Write((uint)0);
foreach (var f in compressedFrames)
{
var ih = new ImageHeader { Format = Format.Format80, FileOffset = (uint)dataOffset };
dataOffset += f.Length;
ih.WriteTo(bw);
}
var eof = new ImageHeader { FileOffset = (uint)dataOffset };
eof.WriteTo(bw);
var allZeroes = new ImageHeader { };
allZeroes.WriteTo(bw);
foreach (var f in compressedFrames)
bw.Write(f);
}
}
}
}

View File

@@ -0,0 +1,104 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
class FrameHeader : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get; private set; }
public byte[] Data { get; set; }
public readonly uint FileOffset;
public readonly byte Format;
public FrameHeader(Stream stream, Size frameSize)
{
var x = stream.ReadUInt16();
var y = stream.ReadUInt16();
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
Offset = new float2(x + 0.5f * (width - frameSize.Width), y + 0.5f * (height - frameSize.Height));
Size = new Size(width, height);
FrameSize = frameSize;
Format = stream.ReadUInt8();
stream.Position += 11;
FileOffset = stream.ReadUInt32();
}
}
public class ShpTSReader : ISpriteSource
{
readonly List<FrameHeader> frames = new List<FrameHeader>();
Lazy<IEnumerable<ISpriteFrame>> spriteFrames;
public IEnumerable<ISpriteFrame> Frames { get { return spriteFrames.Value; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public ShpTSReader(Stream stream)
{
stream.ReadUInt16();
var width = stream.ReadUInt16();
var height = stream.ReadUInt16();
var size = new Size(width, height);
var frameCount = stream.ReadUInt16();
for (var i = 0; i < frameCount; i++)
frames.Add(new FrameHeader(stream, size));
for (var i = 0; i < frameCount; i++)
{
var f = frames[i];
if (f.FileOffset == 0)
continue;
stream.Position = f.FileOffset;
// Uncompressed
if (f.Format == 1 || f.Format == 0)
f.Data = stream.ReadBytes(f.Size.Width * f.Size.Height);
// Uncompressed scanlines
else if (f.Format == 2)
{
f.Data = new byte[f.Size.Width * f.Size.Height];
for (var j = 0; j < f.Size.Height; j++)
{
var length = stream.ReadUInt16() - 2;
stream.Read(f.Data, f.Size.Width * j, length);
}
}
// RLE-zero compressed scanlines
else if (f.Format == 3)
{
f.Data = new byte[f.Size.Width * f.Size.Height];
for (var j = 0; j < f.Size.Height; j++)
{
var length = stream.ReadUInt16() - 2;
Format2.DecodeInto(stream.ReadBytes(length), f.Data, j * f.Size.Width);
}
}
}
spriteFrames = Exts.Lazy(() => frames.Cast<ISpriteFrame>());
}
}
}

View File

@@ -0,0 +1,51 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpRAReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpRAReader(Stream s)
{
var width = s.ReadUInt16();
var height = s.ReadUInt16();
var size = new Size(width, height);
s.Position += 12;
var imgStart = s.ReadUInt32();
s.Position += 8;
var indexEnd = s.ReadInt32();
s.Position += 4;
var indexStart = s.ReadInt32();
s.Position = indexStart;
foreach (byte b in s.ReadBytes(indexEnd - indexStart))
{
if (b != 255)
{
s.Position = imgStart + b * width * height;
tiles.Add(new TmpTile(s.ReadBytes(width * height), size));
}
else
tiles.Add(new TmpTile(null, size));
}
}
}
}

View File

@@ -0,0 +1,69 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.IO;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpTile : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get; private set; }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public TmpTile(byte[] data, Size size)
{
FrameSize = size;
Data = data;
if (data == null)
Data = new byte[0];
else
Size = size;
}
}
public class TmpTDReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpTDReader(Stream s)
{
var width = s.ReadUInt16();
var height = s.ReadUInt16();
var size = new Size(width, height);
s.Position += 8;
var imgStart = s.ReadUInt32();
s.Position += 8;
var indexEnd = s.ReadInt32();
var indexStart = s.ReadInt32();
s.Position = indexStart;
foreach (byte b in s.ReadBytes(indexEnd - indexStart))
{
if (b != 255)
{
s.Position = imgStart + b * width * height;
tiles.Add(new TmpTile(s.ReadBytes(width * height), size));
}
else
tiles.Add(new TmpTile(null, size));
}
}
}
}

View File

@@ -0,0 +1,76 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.Graphics;
namespace OpenRA.FileFormats
{
public class TmpTSTile : ISpriteFrame
{
public Size Size { get; private set; }
public Size FrameSize { get { return Size; } }
public float2 Offset { get { return float2.Zero; } }
public byte[] Data { get; set; }
public TmpTSTile(Stream s, Size size)
{
Size = size;
// Ignore tile header for now
s.Position += 52;
Data = new byte[size.Width * size.Height];
// Unpack tile data
var width = 4;
for (var i = 0; i < size.Height; i++)
{
var start = i * size.Width + (size.Width - width) / 2;
for (var j = 0; j < width; j++)
Data[start + j] = s.ReadUInt8();
width += (i < size.Height / 2 - 1? 1 : -1) * 4;
}
// Ignore Z-data for now
// Ignore extra data for now
}
}
public class TmpTSReader : ISpriteSource
{
readonly List<ISpriteFrame> tiles = new List<ISpriteFrame>();
public IEnumerable<ISpriteFrame> Frames { get { return tiles; } }
public bool CacheWhenLoadingTileset { get { return false; } }
public TmpTSReader(Stream s)
{
var templateWidth = s.ReadUInt32();
var templateHeight = s.ReadUInt32();
var tileWidth = s.ReadInt32();
var tileHeight = s.ReadInt32();
var size = new Size(tileWidth, tileHeight);
var offsets = new uint[templateWidth * templateHeight];
for (var i = 0; i < offsets.Length; i++)
offsets[i] = s.ReadUInt32();
for (var i = 0; i < offsets.Length; i++)
{
s.Position = offsets[i];
tiles.Add(new TmpTSTile(s, size));
}
}
}
}

View File

@@ -257,7 +257,7 @@ namespace OpenRA.FileFormats
int cachedFrame = -1;
void DecodeFrameData( int frame )
void DecodeFrameData()
{
cachedFrame = currentFrame;
for (var y = 0; y < blocks.Y; y++)
@@ -280,7 +280,7 @@ namespace OpenRA.FileFormats
get
{
if (cachedFrame != currentFrame)
DecodeFrameData(currentFrame);
DecodeFrameData();
return frameData;
}

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.IO;
@@ -41,7 +40,7 @@ namespace OpenRA.FileFormats
uint BodySize;
void ReadVoxelData(Stream s, VxlLimb l)
static void ReadVoxelData(Stream s, VxlLimb l)
{
var baseSize = l.Size[0]*l.Size[1];
var colStart = new int[baseSize];

View File

@@ -10,7 +10,6 @@
using System;
using System.IO;
using System.Text;
namespace OpenRA.FileFormats
{

View File

@@ -9,13 +9,10 @@
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public class D2kSoundResources : IFolder
{
@@ -32,7 +29,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
s = FileSystem.Open(filename);
s = GlobalFileSystem.Open(filename);
s.Seek(0, SeekOrigin.Begin);
filenames = new List<string>();

View File

@@ -10,9 +10,8 @@
using System.Collections.Generic;
using System.IO;
using System;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public class Folder : IFolder
{

View File

@@ -13,14 +13,27 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using OpenRA.Primitives;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public static class FileSystem
public interface IFolder
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> ClassicHashes();
IEnumerable<uint> CrcHashes();
IEnumerable<string> AllFileNames();
void Write(Dictionary<string, byte[]> contents);
int Priority { get; }
string Name { get; }
}
public static class GlobalFileSystem
{
public static List<IFolder> MountedFolders = new List<IFolder>();
static Cache<uint, List<IFolder>> classicHashIndex = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
static Cache<uint, List<IFolder>> crcHashIndex = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
static Cache<uint, List<IFolder>> classicHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
static Cache<uint, List<IFolder>> crcHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
public static List<string> FolderPaths = new List<string>();
@@ -57,6 +70,8 @@ namespace OpenRA.FileFormats
throw new NotImplementedException("Creating .RS archives is unsupported");
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .Z archives is unsupported");
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .PAK archives is unsupported");
else
return new Folder(filename, order, content);
}
@@ -77,6 +92,8 @@ namespace OpenRA.FileFormats
return new D2kSoundResources(filename, order);
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(filename, order);
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
return new PakFile(filename, order);
else
return new Folder(filename, order);
}
@@ -89,14 +106,15 @@ namespace OpenRA.FileFormats
public static void Mount(string name, string annotation)
{
var optional = name.StartsWith("~");
if (optional) name = name.Substring(1);
if (optional)
name = name.Substring(1);
// paths starting with ^ are relative to the support dir
if (name.StartsWith("^"))
name = Platform.SupportDir+name.Substring(1);
name = Platform.SupportDir + name.Substring(1);
FolderPaths.Add(name);
Action a = () => FileSystem.MountInner(OpenPackage(name, annotation, order++));
Action a = () => MountInner(OpenPackage(name, annotation, order++));
if (optional)
try { a(); }
@@ -115,7 +133,7 @@ namespace OpenRA.FileFormats
public static bool Unmount(IFolder mount)
{
return (MountedFolders.RemoveAll(f => f == mount) > 0);
return MountedFolders.RemoveAll(f => f == mount) > 0;
}
public static void Mount(IFolder mount)
@@ -151,17 +169,26 @@ namespace OpenRA.FileFormats
public static Stream OpenWithExts(string filename, params string[] exts)
{
if (filename.IndexOfAny(new char[] { '/', '\\' } ) == -1)
Stream s;
if (!TryOpenWithExts(filename, exts, out s))
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
return s;
}
public static bool TryOpenWithExts(string filename, string[] exts, out Stream s)
{
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1)
{
foreach (var ext in exts)
{
var s = GetFromCache(PackageHashType.Classic, filename + ext);
s = GetFromCache(PackageHashType.Classic, filename + ext);
if (s != null)
return s;
return true;
s = GetFromCache(PackageHashType.CRC32, filename + ext);
if (s != null)
return s;
return true;
}
}
@@ -173,10 +200,14 @@ namespace OpenRA.FileFormats
.FirstOrDefault();
if (folder != null)
return folder.GetContent(filename + ext);
{
s = folder.GetContent(filename + ext);
return true;
}
}
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
s = null;
return false;
}
public static bool Exists(string filename) { return MountedFolders.Any(f => f.Exists(filename)); }
@@ -196,8 +227,8 @@ namespace OpenRA.FileFormats
if (assemblyCache.TryGetValue(filename, out a))
return a;
if (FileSystem.Exists(filename))
using (var s = FileSystem.Open(filename))
if (Exists(filename))
using (var s = Open(filename))
{
var buf = new byte[s.Length];
s.Read(buf, 0, buf.Length);

View File

@@ -11,9 +11,9 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public class InstallShieldPackage : IFolder
{
@@ -29,7 +29,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
filenames = new List<string>();
s = FileSystem.Open(filename);
s = GlobalFileSystem.Open(filename);
// Parse package header
BinaryReader reader = new BinaryReader(s);
@@ -62,7 +62,7 @@ namespace OpenRA.FileFormats
}
uint ParseDirectory(BinaryReader reader)
static uint ParseDirectory(BinaryReader reader)
{
// Parse directory header
var FileCount = reader.ReadUInt16();

View File

@@ -13,21 +13,10 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public interface IFolder
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> ClassicHashes();
IEnumerable<uint> CrcHashes();
IEnumerable<string> AllFileNames();
void Write(Dictionary<string, byte[]> contents);
int Priority { get; }
string Name { get; }
}
public class MixFile : IFolder
{
readonly Dictionary<uint, PackageEntry> index;
@@ -58,7 +47,7 @@ namespace OpenRA.FileFormats
this.filename = filename;
this.priority = priority;
this.type = type;
s = FileSystem.Open(filename);
s = GlobalFileSystem.Open(filename);
// Detect format type
s.Seek(0, SeekOrigin.Begin);
@@ -80,11 +69,11 @@ namespace OpenRA.FileFormats
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} ({1} format, Encrypted: {2}, DataStart: {3})".F(filename, (isCncMix ? "C&C" : "RA/TS/RA2"), isEncrypted, dataStart),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
}
List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
static List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
{
s.Seek(offset, SeekOrigin.Begin);
var numFiles = s.ReadUInt16();
@@ -98,7 +87,7 @@ namespace OpenRA.FileFormats
return items;
}
MemoryStream DecryptHeader(Stream s, long offset, out long headerEnd)
static MemoryStream DecryptHeader(Stream s, long offset, out long headerEnd)
{
s.Seek(offset, SeekOrigin.Begin);
@@ -132,7 +121,7 @@ namespace OpenRA.FileFormats
return ms;
}
uint[] ReadBlocks(Stream s, long offset, int count)
static uint[] ReadBlocks(Stream s, long offset, int count)
{
s.Seek(offset, SeekOrigin.Begin);
@@ -153,7 +142,7 @@ namespace OpenRA.FileFormats
// Maybe we were given a raw hash?
uint raw;
if (!uint.TryParse(filename, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out raw))
return null;
return null;
if ("{0:X}".F(raw) == filename && index.ContainsKey(raw))
return raw;
@@ -210,9 +199,9 @@ namespace OpenRA.FileFormats
}
}
if (FileSystem.Exists("global mix database.dat"))
if (GlobalFileSystem.Exists("global mix database.dat"))
{
var db = new XccGlobalDatabase(FileSystem.Open("global mix database.dat"));
var db = new XccGlobalDatabase(GlobalFileSystem.Open("global mix database.dat"));
foreach (var e in db.Entries)
{
var hash = PackageEntry.HashFilename(e, type);
@@ -236,7 +225,7 @@ namespace OpenRA.FileFormats
{
// Cannot modify existing mixfile - rename existing file and
// create a new one with original content plus modifications
FileSystem.Unmount(this);
GlobalFileSystem.Unmount(this);
// TODO: Add existing data to the contents list
if (index.Count > 0)

View File

@@ -12,8 +12,9 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using OpenRA.FileFormats;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public enum PackageHashType { Classic, CRC32 }

View File

@@ -0,0 +1,97 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileSystem
{
struct Entry
{
public uint Offset;
public uint Length;
public string Filename;
}
public class PakFile : IFolder
{
string filename;
int priority;
Dictionary<string, Entry> index;
Stream stream;
public PakFile(string filename, int priority)
{
this.filename = filename;
this.priority = priority;
index = new Dictionary<string, Entry>();
stream = GlobalFileSystem.Open(filename);
index = new Dictionary<string, Entry>();
var offset = stream.ReadUInt32();
while (offset != 0)
{
var file = stream.ReadASCIIZ();
var next = stream.ReadUInt32();
var length = (next == 0 ? (uint)stream.Length : next) - offset;
// Ignore duplicate files
if (index.ContainsKey(file))
continue;
index.Add(file, new Entry { Offset = offset, Length = length, Filename = file });
offset = next;
}
}
public Stream GetContent(string filename)
{
Entry entry;
if (!index.TryGetValue(filename, out entry))
return null;
stream.Seek(entry.Offset, SeekOrigin.Begin);
var data = new byte[entry.Length];
stream.Read(data, 0, (int)entry.Length);
return new MemoryStream(data);
}
public IEnumerable<uint> ClassicHashes()
{
foreach (var filename in index.Keys)
yield return PackageEntry.HashFilename(filename, PackageHashType.Classic);
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
foreach (var filename in index.Keys)
yield return filename;
}
public bool Exists(string filename)
{
return index.ContainsKey(filename);
}
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save Pak archives.");
}
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
}
}

View File

@@ -10,10 +10,11 @@
using System.Collections.Generic;
using System.IO;
using System.Text;
using ICSharpCode.SharpZipLib.Zip;
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileFormats
namespace OpenRA.FileSystem
{
public class ZipFile : IFolder
{
@@ -21,6 +22,11 @@ namespace OpenRA.FileFormats
SZipFile pkg;
int priority;
static ZipFile()
{
ZipConstants.DefaultCodePage = Encoding.Default.CodePage;
}
public ZipFile(string filename, int priority)
{
this.filename = filename;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -10,50 +10,46 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using MaxMind.GeoIP2;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Network;
using OpenRA.Primitives;
using OpenRA.Support;
using OpenRA.Widgets;
using XRandom = OpenRA.Thirdparty.Random;
namespace OpenRA
{
public static class Game
{
public static int CellSize { get { return modData.Manifest.TileSize; } }
public static MouseButtonPreference mouseButtonPreference = new MouseButtonPreference();
public static ModData modData;
static WorldRenderer worldRenderer;
public static Viewport viewport;
public static Settings Settings;
static WorldRenderer worldRenderer;
internal static OrderManager orderManager;
static Server.Server server;
public static XRandom CosmeticRandom = new XRandom(); // not synced
public static MersenneTwister CosmeticRandom = new MersenneTwister(); // not synced
public static Renderer Renderer;
public static bool HasInputFocus = false;
public static void MoveViewport(float2 loc)
{
viewport.Center(loc);
}
public static DatabaseReader GeoIpDatabase;
public static void JoinServer(string host, int port)
public static OrderManager JoinServer(string host, int port, string password)
{
JoinInner(new OrderManager(host, port,
new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename)));
var om = new OrderManager(host, port, password,
new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename));
JoinInner(om);
return om;
}
static string ChooseReplayFilename()
@@ -71,28 +67,29 @@ namespace OpenRA
public static void JoinReplay(string replayFile)
{
JoinInner(new OrderManager("<no server>", -1, new ReplayConnection(replayFile)));
JoinInner(new OrderManager("<no server>", -1, "", new ReplayConnection(replayFile)));
}
static void JoinLocal()
{
JoinInner(new OrderManager("<no server>", -1, new EchoConnection()));
JoinInner(new OrderManager("<no server>", -1, "", new EchoConnection()));
}
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return orderManager.NetFrameNumber; } }
public static int LocalTick { get { return orderManager.LocalFrameNumber; } }
const int NetTickScale = 3; // 120ms net tick for 40ms local tick
public const int NetTickScale = 3; // 120 ms net tick for 40 ms local tick
public const int Timestep = 40;
public const int TimestepJankThreshold = 250; // Don't catch up for delays larger than 250ms
public static event Action<OrderManager> ConnectionStateChanged = _ => { };
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
public static int LocalClientId { get { return orderManager.Connection.LocalClientId; } }
// Hacky workaround for orderManager visibility
public static Widget OpenWindow(World world, string widget)
{
return Ui.OpenWindow(widget, new WidgetArgs() {{ "world", world }, { "orderManager", orderManager }, { "worldRenderer", worldRenderer }});
return Ui.OpenWindow(widget, new WidgetArgs() { { "world", world }, { "orderManager", orderManager }, { "worldRenderer", worldRenderer } });
}
// Who came up with the great idea of making these things
@@ -110,7 +107,7 @@ namespace OpenRA
// Load a widget with world, orderManager, worldRenderer args, without adding it to the widget tree
public static Widget LoadWidget(World world, string id, Widget parent, WidgetArgs args)
{
return Game.modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
return modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
{
{ "world", world },
{ "orderManager", orderManager },
@@ -118,11 +115,14 @@ namespace OpenRA
}, parent, id);
}
// Note: These delayed actions should only be used by widgets or disposing objects
// - things that depend on a particular world should be queuing them on the worldactor.
static ActionQueue delayedActions = new ActionQueue();
public static void RunAfterTick(Action a) { delayedActions.Add(a); }
public static void RunAfterDelay(int delay, Action a) { delayedActions.Add(a, delay); }
static void Tick(OrderManager orderManager, Viewport viewPort)
static float cursorFrame = 0f;
static void Tick(OrderManager orderManager)
{
if (orderManager.Connection.ConnectionState != lastConnectionState)
{
@@ -130,15 +130,38 @@ namespace OpenRA
ConnectionStateChanged(orderManager);
}
Tick(orderManager);
TickInner(orderManager);
if (worldRenderer != null && orderManager.world != worldRenderer.world)
Tick(worldRenderer.world.orderManager);
TickInner(worldRenderer.world.orderManager);
using (new PerfSample("render"))
{
++RenderFrame;
viewport.DrawRegions(worldRenderer, new DefaultInputHandler( orderManager.world ));
Sound.SetListenerPosition(viewport.CenterLocation);
// worldRenderer is null during the initial install/download screen
if (worldRenderer != null)
{
Renderer.BeginFrame(worldRenderer.Viewport.TopLeft.ToFloat2(), worldRenderer.Viewport.Zoom);
Sound.SetListenerPosition(worldRenderer.Position(worldRenderer.Viewport.CenterLocation));
worldRenderer.Draw();
}
else
Renderer.BeginFrame(float2.Zero, 1f);
using (new PerfSample("render_widgets"))
{
Ui.Draw();
if (modData != null && modData.CursorProvider != null)
{
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
modData.CursorProvider.DrawCursor(Renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
}
}
using (new PerfSample("render_flip"))
{
Renderer.EndFrame(new DefaultInputHandler(orderManager.world));
}
}
PerfHistory.items["render"].Tick();
@@ -149,18 +172,37 @@ namespace OpenRA
delayedActions.PerformActions();
}
static void Tick(OrderManager orderManager)
static void TickInner(OrderManager orderManager)
{
int t = Environment.TickCount;
int dt = t - orderManager.LastTickTime;
if (dt >= Settings.Game.Timestep)
var tick = Environment.TickCount;
var world = orderManager.world;
var uiTickDelta = tick - Ui.LastTickTime;
if (uiTickDelta >= Timestep)
{
// Explained below for the world tick calculation
var integralTickTimestep = (uiTickDelta / Timestep) * Timestep;
Ui.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : Timestep;
Viewport.TicksSinceLastMove += uiTickDelta / Timestep;
Sync.CheckSyncUnchanged(world, Ui.Tick);
cursorFrame += 0.5f;
}
var worldTimestep = world == null ? Timestep : world.Timestep;
var worldTickDelta = (tick - orderManager.LastTickTime);
if (worldTimestep != 0 && worldTickDelta >= worldTimestep)
using (new PerfSample("tick_time"))
{
orderManager.LastTickTime += Settings.Game.Timestep;
Ui.Tick();
var world = orderManager.world;
if (orderManager.GameStarted)
++Viewport.TicksSinceLastMove;
// Tick the world to advance the world time to match real time:
// If dt < TickJankThreshold then we should try and catch up by repeatedly ticking
// If dt >= TickJankThreshold then we should accept the jank and progress at the normal rate
// dt is rounded down to an integer tick count in order to preserve fractional tick components.
var integralTickTimestep = (worldTickDelta / worldTimestep) * worldTimestep;
orderManager.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : worldTimestep;
Sound.Tick();
Sync.CheckSyncUnchanged(world, orderManager.TickImmediate);
@@ -192,7 +234,6 @@ namespace OpenRA
orderManager.LastTickTime = Environment.TickCount;
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
viewport.Tick();
}
}
}
@@ -204,17 +245,27 @@ namespace OpenRA
LobbyInfoChanged();
}
public static event Action BeforeGameStart = () => {};
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, bool isShellmap)
{
BeforeGameStart();
var map = modData.PrepareMap(mapUID);
viewport = new Viewport(new int2(Renderer.Resolution), map.Bounds, Renderer);
orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap);
worldRenderer = new WorldRenderer(orderManager.world);
Map map;
using (new PerfTimer("PrepareMap"))
map = modData.PrepareMap(mapUID);
using (new PerfTimer("NewWorld"))
{
orderManager.world = new World(map, orderManager, isShellmap);
orderManager.world.Timestep = Timestep;
}
worldRenderer = new WorldRenderer(orderManager.world);
using (new PerfTimer("LoadComplete"))
orderManager.world.LoadComplete(worldRenderer);
if (orderManager.GameStarted)
return;
if (orderManager.GameStarted) return;
Ui.MouseFocusWidget = null;
Ui.KeyboardFocusWidget = null;
@@ -222,26 +273,18 @@ namespace OpenRA
orderManager.LastTickTime = Environment.TickCount;
orderManager.StartGame();
worldRenderer.RefreshPalette();
if (!isShellmap)
Sound.PlayNotification(null, "Speech", "StartGame", null);
}
public static bool IsHost
{
get
{
var client= orderManager.LobbyInfo.ClientWithIndex(
orderManager.Connection.LocalClientId);
return ((client!=null) && client.IsAdmin);
var id = orderManager.Connection.LocalClientId;
var client = orderManager.LobbyInfo.ClientWithIndex(id);
return client != null && client.IsAdmin;
}
}
public static Dictionary<String, Mod> CurrentMods
{
get { return Mod.AllMods.Where(k => modData.Manifest.Mods.Contains(k.Key)).ToDictionary(k => k.Key, k => k.Value); }
}
static Modifiers modifiers;
public static Modifiers GetModifierKeys() { return modifiers; }
internal static void HandleModifierKeys(Modifiers mods) { modifiers = mods; }
@@ -250,7 +293,7 @@ namespace OpenRA
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Settings = new Settings(Platform.SupportDir + "settings.yaml", args);
@@ -260,6 +303,8 @@ namespace OpenRA
Log.AddChannel("sync", "syncreport.log");
Log.AddChannel("server", "server.log");
Log.AddChannel("sound", "sound.log");
Log.AddChannel("graphics", "graphics.log");
Log.AddChannel("geoip", "geoip.log");
if (Settings.Server.DiscoverNatDevices)
UPnP.TryNatDiscovery();
@@ -269,32 +314,66 @@ namespace OpenRA
Settings.Server.AllowPortForward = false;
}
FileSystem.Mount("."); // Needed to access shaders
Renderer.Initialize( Game.Settings.Graphics.Mode );
try
{
GeoIpDatabase = new DatabaseReader("GeoLite2-Country.mmdb");
}
catch (Exception e)
{
Log.Write("geoip", "DatabaseReader failed: {0}", e);
}
GlobalFileSystem.Mount("."); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
foreach (var r in renderers)
{
if (r == null)
throw new InvalidOperationException("No suitable renderers were found. Check graphics.log for details.");
Settings.Graphics.Renderer = r;
try
{
Renderer.Initialize(Settings.Graphics.Mode);
break;
}
catch (Exception e)
{
Log.Write("graphics", "{0}", e);
Console.WriteLine("Renderer initialization failed. Fallback in place. Check graphics.log for details.");
}
}
Renderer = new Renderer();
try
{
Sound.Create(Settings.Sound.Engine);
}
catch (Exception e)
{
Log.Write("sound", "{0}", e);
Console.WriteLine("Creating the sound engine failed. Fallback in place. Check sound.log for details.");
Settings.Sound.Engine = "Null";
Sound.Create(Settings.Sound.Engine);
}
Console.WriteLine("Available mods:");
foreach(var mod in Mod.AllMods)
foreach (var mod in ModMetadata.AllMods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
Sound.Create(Settings.Sound.Engine);
InitializeWithMods(Settings.Game.Mods);
InitializeWithMod(Settings.Game.Mod, args.GetValue("Launch.Replay", null));
if (Settings.Server.DiscoverNatDevices)
{
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, () =>
UPnP.TryStoppingNatDiscovery()
);
}
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.TryStoppingNatDiscovery);
}
public static void InitializeWithMods(string[] mods)
public static void InitializeWithMod(string mod, string replay)
{
// Clear static state if we have switched mods
LobbyInfoChanged = () => {};
AddChatLine = (a,b,c) => {};
ConnectionStateChanged = om => {};
BeforeGameStart = () => {};
LobbyInfoChanged = () => { };
AddChatLine = (a, b, c) => { };
ConnectionStateChanged = om => { };
BeforeGameStart = () => { };
Ui.ResetAll();
worldRenderer = null;
@@ -303,19 +382,22 @@ namespace OpenRA
if (orderManager != null)
orderManager.Dispose();
// Discard any invalid mods, set RA as default
var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray();
if (mm.Length == 0) mm = new[] { "ra" };
Console.WriteLine("Loading mods: {0}", mm.JoinWith(","));
Settings.Game.Mods = mm;
// Fall back to default if the mod doesn't exist
if (!ModMetadata.AllMods.ContainsKey(mod))
mod = new GameSettings().Mod;
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopMusic();
Sound.StopVideo();
Sound.Initialize();
modData = new ModData(mm);
modData = new ModData(mod);
Renderer.InitializeFonts(modData.Manifest);
modData.InitializeLoaders();
using (new PerfTimer("LoadMaps"))
modData.MapCache.LoadMaps();
PerfHistory.items["render"].hasNormalTick = false;
PerfHistory.items["batches"].hasNormalTick = false;
@@ -323,90 +405,116 @@ namespace OpenRA
PerfHistory.items["render_flip"].hasNormalTick = false;
JoinLocal();
viewport = new Viewport(new int2(Renderer.Resolution), Rectangle.Empty, Renderer);
if (Game.Settings.Server.Dedicated)
if (Settings.Server.Dedicated)
{
while (true)
{
Game.Settings.Server.Map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
Game.Settings.Save();
Game.CreateServer(new ServerSettings(Game.Settings.Server));
Settings.Server.Map = WidgetUtils.ChooseInitialMap(Settings.Server.Map);
Settings.Save();
CreateServer(new ServerSettings(Settings.Server));
while (true)
{
System.Threading.Thread.Sleep(100);
if ((server.State == Server.ServerState.GameStarted)
&& (server.conns.Count<=1))
if (server.State == Server.ServerState.GameStarted && server.Conns.Count < 1)
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();
break;
}
}
if (Game.Settings.Server.DedicatedLoop)
if (Settings.Server.DedicatedLoop)
{
Console.WriteLine("Starting a new server instance...");
modData.MapCache.LoadMaps();
continue;
}
else
break;
break;
}
System.Environment.Exit(0);
Environment.Exit(0);
}
else
{
modData.LoadScreen.StartGame();
Settings.Save();
if (!string.IsNullOrEmpty(replay))
Game.JoinReplay(replay);
}
}
public static void LoadShellMap()
{
StartGame(ChooseShellmap(), true);
var shellmap = ChooseShellmap();
using (new PerfTimer("StartGame"))
StartGame(shellmap, true);
}
static string ChooseShellmap()
{
var shellmaps = modData.AvailableMaps
.Where(m => m.Value.UseAsShellmap);
var shellmaps = modData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.UseAsShellmap)
.Select(m => m.Uid);
if (shellmaps.Count() == 0)
if (!shellmaps.Any())
throw new InvalidDataException("No valid shellmaps available");
return shellmaps.Random(CosmeticRandom).Key;
return shellmaps.Random(CosmeticRandom);
}
static bool quit;
public static event Action OnQuit = () => {};
public static event Action OnQuit = () => { };
static double idealFrameTime;
public static void SetIdealFrameTime(int fps)
{
idealFrameTime = 1.0 / fps;
}
internal static void Run()
{
if (Settings.Graphics.MaxFramerate < 1)
{
Settings.Graphics.MaxFramerate = new GraphicSettings().MaxFramerate;
Settings.Graphics.CapFramerate = false;
}
SetIdealFrameTime(Settings.Graphics.MaxFramerate);
while (!quit)
{
var idealFrameTime = 1.0 / Settings.Graphics.MaxFramerate;
var sw = new Stopwatch();
Tick( orderManager, viewport );
if (Settings.Graphics.CapFramerate)
{
var waitTime = idealFrameTime - sw.ElapsedTime();
var sw = Stopwatch.StartNew();
Tick(orderManager);
var waitTime = Math.Min(idealFrameTime - sw.Elapsed.TotalSeconds, 1);
if (waitTime > 0)
System.Threading.Thread.Sleep( TimeSpan.FromSeconds(waitTime) );
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(waitTime));
}
else
Tick(orderManager);
}
// Ensure that the active replay is properly saved
if (orderManager != null)
orderManager.Dispose();
OnQuit();
}
public static void Exit() { quit = true; }
public static Action<Color,string,string> AddChatLine = (c,n,s) => {};
public static Action<Color, string, string> AddChatLine = (c, n, s) => { };
public static void Debug(string s, params object[] args)
{
AddChatLine(Color.White, "Debug", String.Format(s,args));
AddChatLine(Color.White, "Debug", string.Format(s, args));
}
public static void Disconnect()
@@ -425,15 +533,14 @@ namespace OpenRA
server.Shutdown();
}
public static T CreateObject<T>( string name )
public static T CreateObject<T>(string name)
{
return modData.ObjectCreator.CreateObject<T>(name);
}
public static void CreateServer(ServerSettings settings)
{
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort),
Game.Settings.Game.Mods, settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, modData);
}
public static int CreateLocalServer(string map)
@@ -443,11 +550,10 @@ namespace OpenRA
Name = "Skirmish Game",
Map = map,
AdvertiseOnline = false,
AllowPortForward = false
AllowPortForward = false
};
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0),
Game.Settings.Game.Mods, settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, modData);
return server.Port;
}
@@ -456,29 +562,5 @@ namespace OpenRA
{
return orderManager != null && orderManager.world == world;
}
public static bool DownloadMap(string mapHash)
{
try
{
var mod = Game.CurrentMods.FirstOrDefault().Value.Id;
var dirPath = "{1}maps{0}{2}".F(Path.DirectorySeparatorChar, Platform.SupportDir, mod);
if(!Directory.Exists(dirPath))
Directory.CreateDirectory(dirPath);
var mapPath = "{1}{0}{2}".F(Path.DirectorySeparatorChar, dirPath, mapHash+".oramap");
Console.Write("Trying to download map to {0} ... ".F(mapPath));
WebClient webClient = new WebClient();
webClient.DownloadFile(Game.Settings.Game.MapRepository + mapHash, mapPath);
Game.modData.AvailableMaps.Add(mapHash, new Map(mapPath));
Console.WriteLine("done");
return true;
}
catch (WebException e)
{
Log.Write("debug", "Could not download map '{0}'", mapHash);
Log.Write("debug", e.ToString());
return false;
}
}
}
}

View File

@@ -0,0 +1,168 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Graphics;
using OpenRA.Network;
namespace OpenRA
{
public class GameInformation
{
public string MapUid;
public string MapTitle;
public DateTime StartTimeUtc;
// Game end timestamp (when the recoding stopped).
public DateTime EndTimeUtc;
// Gets the game's duration, from the time the game started until the
// replay recording stopped.
public TimeSpan Duration { get { return EndTimeUtc > StartTimeUtc ? EndTimeUtc - StartTimeUtc : TimeSpan.Zero; } }
public IList<Player> Players { get; private set; }
public MapPreview MapPreview { get { return Game.modData.MapCache[MapUid]; } }
public IEnumerable<Player> HumanPlayers { get { return Players.Where(p => p.IsHuman); } }
public bool IsSinglePlayer { get { return HumanPlayers.Count() == 1; } }
Dictionary<OpenRA.Player, Player> playersByRuntime;
public GameInformation()
{
Players = new List<Player>();
playersByRuntime = new Dictionary<OpenRA.Player, Player>();
}
public static GameInformation Deserialize(string data)
{
try
{
var info = new GameInformation();
var nodes = MiniYaml.FromString(data);
foreach (var node in nodes)
{
var keyParts = node.Key.Split('@');
switch (keyParts[0])
{
case "Root":
FieldLoader.Load(info, node.Value);
break;
case "Player":
info.Players.Add(FieldLoader.Load<Player>(node.Value));
break;
}
}
return info;
}
catch (InvalidOperationException)
{
Log.Write("debug", "GameInformation deserialized invalid MiniYaml:\n{0}".F(data));
throw;
}
}
public string Serialize()
{
var nodes = new List<MiniYamlNode>();
nodes.Add(new MiniYamlNode("Root", FieldSaver.Save(this)));
for (var i=0; i<Players.Count; i++)
nodes.Add(new MiniYamlNode("Player@{0}".F(i), FieldSaver.Save(Players[i])));
return nodes.WriteToString();
}
// Adds the player information at start-up.
public void AddPlayer(OpenRA.Player runtimePlayer, Session lobbyInfo)
{
if (runtimePlayer == null)
throw new ArgumentNullException("runtimePlayer");
if (lobbyInfo == null)
throw new ArgumentNullException("lobbyInfo");
// We don't care about spectators and map players
if (runtimePlayer.NonCombatant || !runtimePlayer.Playable)
return;
// Find the lobby client that created the runtime player
var client = lobbyInfo.ClientWithIndex(runtimePlayer.ClientIndex);
if (client == null)
return;
var player = new Player
{
ClientIndex = runtimePlayer.ClientIndex,
Name = runtimePlayer.PlayerName,
IsHuman = !runtimePlayer.IsBot,
IsBot = runtimePlayer.IsBot,
FactionName = runtimePlayer.Country.Name,
FactionId = runtimePlayer.Country.Race,
Color = runtimePlayer.Color,
Team = client.Team,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Country.Race != client.Country,
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
};
playersByRuntime.Add(runtimePlayer, player);
Players.Add(player);
}
// Gets the player information for the specified runtime player instance.
public Player GetPlayer(OpenRA.Player runtimePlayer)
{
Player player;
playersByRuntime.TryGetValue(runtimePlayer, out player);
return player;
}
public class Player
{
//
// Start-up information
//
public int ClientIndex;
// The player name, not guaranteed to be unique.
public string Name;
public bool IsHuman;
public bool IsBot;
// The faction name (aka Country)
public string FactionName;
// The faction id (aka Country, aka Race)
public string FactionId;
public HSLColor Color;
// The team id on start-up, or 0 if the player is not part of the team.
public int Team;
public int SpawnPoint;
// True if the faction was chosen at random; otherwise, false
public bool IsRandomFaction;
// True if the spawn point was chosen at random; otherwise, false.</summary>
public bool IsRandomSpawnPoint;
//
// Information gathered at a later stage
//
// The game outcome for this player
public WinState Outcome;
// The time when this player won or lost the game
public DateTime OutcomeTimestampUtc;
}
}
}

View File

@@ -12,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA

View File

@@ -9,6 +9,7 @@
#endregion
using OpenRA.FileFormats;
using OpenRA.FileSystem;
namespace OpenRA.GameRules
{
@@ -26,20 +27,20 @@ namespace OpenRA.GameRules
var nd = value.NodesDict;
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key)+"."+ext;
if (!FileSystem.Exists(Filename))
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
Length = (int)AudLoader.SoundLength(FileSystem.Open(Filename));
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
}
public void Reload()
{
if (!FileSystem.Exists(Filename))
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
Length = (int)AudLoader.SoundLength(FileSystem.Open(Filename));
Length = (int)AudLoader.SoundLength(GlobalFileSystem.Open(Filename));
}
}
}

View File

@@ -1,56 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.GameRules;
namespace OpenRA
{
public static class Rules
{
public static Dictionary<string, ActorInfo> Info;
public static Dictionary<string, WeaponInfo> Weapons;
public static Dictionary<string, SoundInfo> Voices;
public static Dictionary<string, SoundInfo> Notifications;
public static Dictionary<string, MusicInfo> Music;
public static Dictionary<string, string> Movies;
public static Dictionary<string, TileSet> TileSets;
public static void LoadRules(Manifest m, Map map)
{
// Added support to extend the list of rules (add it to m.LocalRules)
Info = LoadYamlRules(m.Rules, map.Rules, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
Weapons = LoadYamlRules(m.Weapons, map.Weapons, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new SoundInfo(k.Value));
Notifications = LoadYamlRules(m.Notifications, map.Notifications, (k, _) => new SoundInfo(k.Value));
Music = LoadYamlRules(m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
Movies = LoadYamlRules(m.Movies, new List<MiniYamlNode>(), (k, v) => k.Value.Value);
TileSets = new Dictionary<string, TileSet>();
foreach (var file in m.TileSets)
{
var t = new TileSet(file);
TileSets.Add(t.Id,t);
}
}
static Dictionary<string, T> LoadYamlRules<T>(string[] files, List<MiniYamlNode> dict, Func<MiniYamlNode, Dictionary<string, MiniYaml>, T> f)
{
var y = files.Select(MiniYaml.FromFile).Aggregate(dict, MiniYaml.MergeLiberal);
var yy = y.ToDictionary(x => x.Key, x => x.Value);
return y.ToDictionaryWithConflictLog(kv => kv.Key.ToLowerInvariant(), kv => f(kv, yy), "LoadYamlRules", null, null);
}
public static IEnumerable<KeyValuePair<string, MusicInfo>> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } }
}
}

View File

@@ -0,0 +1,52 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.GameRules;
using OpenRA.Graphics;
namespace OpenRA
{
public class Ruleset
{
public readonly IReadOnlyDictionary<string, ActorInfo> Actors;
public readonly IReadOnlyDictionary<string, WeaponInfo> Weapons;
public readonly IReadOnlyDictionary<string, SoundInfo> Voices;
public readonly IReadOnlyDictionary<string, SoundInfo> Notifications;
public readonly IReadOnlyDictionary<string, MusicInfo> Music;
public readonly IReadOnlyDictionary<string, string> Movies;
public readonly IReadOnlyDictionary<string, TileSet> TileSets;
public readonly IReadOnlyDictionary<string, SequenceProvider> Sequences;
public Ruleset(
IDictionary<string, ActorInfo> actors,
IDictionary<string, WeaponInfo> weapons,
IDictionary<string, SoundInfo> voices,
IDictionary<string, SoundInfo> notifications,
IDictionary<string, MusicInfo> music,
IDictionary<string, string> movies,
IDictionary<string, TileSet> tileSets,
IDictionary<string, SequenceProvider> sequences)
{
Actors = new ReadOnlyDictionary<string, ActorInfo>(actors);
Weapons = new ReadOnlyDictionary<string, WeaponInfo>(weapons);
Voices = new ReadOnlyDictionary<string, SoundInfo>(voices);
Notifications = new ReadOnlyDictionary<string, SoundInfo>(notifications);
Music = new ReadOnlyDictionary<string, MusicInfo>(music);
Movies = new ReadOnlyDictionary<string, string>(movies);
TileSets = new ReadOnlyDictionary<string, TileSet>(tileSets);
Sequences = new ReadOnlyDictionary<string, SequenceProvider>(sequences);
}
public IEnumerable<KeyValuePair<string, MusicInfo>> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } }
}
}

View File

@@ -0,0 +1,142 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Support;
namespace OpenRA
{
public class RulesetCache
{
readonly ModData modData;
readonly Dictionary<string, ActorInfo> actorCache = new Dictionary<string, ActorInfo>();
readonly Dictionary<string, WeaponInfo> weaponCache = new Dictionary<string, WeaponInfo>();
readonly Dictionary<string, SoundInfo> voiceCache = new Dictionary<string, SoundInfo>();
readonly Dictionary<string, SoundInfo> notificationCache = new Dictionary<string, SoundInfo>();
readonly Dictionary<string, MusicInfo> musicCache = new Dictionary<string, MusicInfo>();
readonly Dictionary<string, string> movieCache = new Dictionary<string, string>();
readonly Dictionary<string, TileSet> tileSetCache = new Dictionary<string, TileSet>();
readonly Dictionary<string, SequenceCache> sequenceCaches = new Dictionary<string, SequenceCache>();
public event EventHandler LoadingProgress;
void RaiseProgress()
{
if (LoadingProgress != null)
LoadingProgress(this, new EventArgs());
}
public RulesetCache(ModData modData)
{
this.modData = modData;
}
public Ruleset LoadDefaultRules()
{
return LoadMapRules(new Map());
}
public Ruleset LoadMapRules(Map map)
{
var m = modData.Manifest;
Dictionary<string, ActorInfo> actors;
Dictionary<string, WeaponInfo> weapons;
Dictionary<string, SoundInfo> voices;
Dictionary<string, SoundInfo> notifications;
Dictionary<string, MusicInfo> music;
Dictionary<string, string> movies;
Dictionary<string, TileSet> tileSets;
using (new PerfTimer("Actors"))
actors = LoadYamlRules(actorCache, m.Rules, map.RuleDefinitions, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
using (new PerfTimer("Weapons"))
weapons = LoadYamlRules(weaponCache, m.Weapons, map.WeaponDefinitions, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
using (new PerfTimer("Voices"))
voices = LoadYamlRules(voiceCache, m.Voices, map.VoiceDefinitions, (k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Notifications"))
notifications = LoadYamlRules(notificationCache, m.Notifications, map.NotificationDefinitions, (k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Music"))
music = LoadYamlRules(musicCache, m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
using (new PerfTimer("Movies"))
movies = LoadYamlRules(movieCache, m.Movies, new List<MiniYamlNode>(), (k, v) => k.Value.Value);
using (new PerfTimer("TileSets"))
tileSets = LoadTileSets(tileSetCache, sequenceCaches, m.TileSets);
var sequences = sequenceCaches.ToDictionary(kvp => kvp.Key, kvp => new SequenceProvider(kvp.Value, map));
return new Ruleset(actors, weapons, voices, notifications, music, movies, tileSets, sequences);
}
Dictionary<string, T> LoadYamlRules<T>(
Dictionary<string, T> itemCache,
string[] files, List<MiniYamlNode> nodes,
Func<MiniYamlNode, Dictionary<string, MiniYaml>, T> f)
{
RaiseProgress();
var inputKey = string.Concat(string.Join("|", files), "|", nodes.WriteToString());
var mergedNodes = files
.Select(s => MiniYaml.FromFile(s))
.Aggregate(nodes, MiniYaml.MergeLiberal);
Func<MiniYamlNode, Dictionary<string, MiniYaml>, T> wrap = (wkv, wyy) =>
{
var key = inputKey + wkv.Value.ToLines(wkv.Key).JoinWith("|");
T t;
if (itemCache.TryGetValue(key, out t))
return t;
t = f(wkv, wyy);
itemCache.Add(key, t);
RaiseProgress();
return t;
};
var yy = mergedNodes.ToDictionary(x => x.Key, x => x.Value);
var itemSet = mergedNodes.ToDictionaryWithConflictLog(kv => kv.Key.ToLowerInvariant(), kv => wrap(kv, yy), "LoadYamlRules", null, null);
RaiseProgress();
return itemSet;
}
Dictionary<string, TileSet> LoadTileSets(Dictionary<string, TileSet> itemCache, Dictionary<string, SequenceCache> sequenceCaches, string[] files)
{
var items = new Dictionary<string, TileSet>();
foreach (var file in files)
{
TileSet t;
if (itemCache.TryGetValue(file, out t))
items.Add(t.Id, t);
else
{
t = new TileSet(modData, file);
itemCache.Add(file, t);
// every time we load a tile set, we create a sequence cache for it
var sc = new SequenceCache(modData, t);
sequenceCaches.Add(t.Id, sc);
items.Add(t.Id, t);
}
}
return items;
}
}
}

Some files were not shown because too many files have changed in this diff Show More