Compare commits

...

3142 Commits

Author SHA1 Message Date
Paul Chote
309e3ac99e Merge pull request #8936 from Mailaender/lint-perf
Improved the --check-yaml performance
2015-08-08 10:57:57 +01:00
Matthias Mailänder
bc1a8d4b64 Merge pull request #8983 from Mailaender/freetype260-mscv9
Updated to latest FreeType6 version for Windows while downgrading the dependency to MSVC++ 2008
2015-08-08 11:42:58 +02:00
Matthias Mailänder
f416dfaca3 Merge pull request #8985 from pchote/fix-cnc-map-tabs
Fix padding at the top of the cnc map chooser.
2015-08-08 11:34:14 +02:00
Paul Chote
f60b80a935 Fix padding at the top of the cnc map chooser. 2015-08-08 10:05:21 +01:00
Matthias Mailänder
e430f313a7 remove the warning in the make script 2015-08-07 20:09:59 +02:00
Matthias Mailänder
0f9b87269e get latest FreeType6 for Windows
downgrade dependency to MSVC++ 2008
2015-08-07 20:09:56 +02:00
abcdefg30
520a32143d Merge pull request #8976 from Mailaender/pizza-maps
Added 3 new maps from PizzaAtomica
2015-08-07 14:21:26 +02:00
Matthias Mailänder
2ab883686d add 3 new maps from PizzaAtomica 2015-08-07 09:54:15 +02:00
abcdefg30
c9837280b9 Merge pull request #8971 from Mailaender/chmod-x
Removed executable bits from random files in the repository
2015-08-06 18:17:22 +02:00
Matthias Mailänder
fd7bbc3ce6 remove executable bits from binary data files 2015-08-06 18:16:01 +02:00
Matthias Mailänder
e428e6d8cc remove executable bits from source code 2015-08-06 18:05:50 +02:00
abcdefg30
cf9ec29708 Merge pull request #8964 from Mailaender/human-observers
Fixed neutral actors being visible in the All Players observer shroud mode
2015-08-06 14:13:18 +02:00
abcdefg30
8cb9dd5f25 Merge pull request #8969 from Mailaender/script-error-polish
Fixed the script error UI not shutting down the game properly
2015-08-06 14:06:37 +02:00
Matthias Mailänder
7a466890e5 hide tabs when script errors occur 2015-08-06 12:51:07 +02:00
Matthias Mailänder
d4a0bfe2a5 disable menu buttons when script errors occur 2015-08-06 12:49:35 +02:00
Matthias Mailänder
f1b9b31f07 remove duplicated line 2015-08-06 12:49:35 +02:00
Pavel Penev
55479435ef Merge pull request #8963 from Mailaender/ra-observer-dropdown-separator
Fixed red DropDown separator on black observer UI
2015-08-06 12:10:24 +03:00
Matthias Mailänder
02b2360909 Merge pull request #8945 from pchote/fix-missing-resources
Reveal the initial resources if shroud is disabled.
2015-08-06 10:42:49 +02:00
Matthias Mailänder
6c45763d75 avoid observers being allied to world owning neutral players 2015-08-05 22:35:28 +02:00
Paul Chote
155d0cc97d Reveal the initial resources if shroud is disabled.
Fixes #8943.
2015-08-05 20:27:36 +01:00
Matthias Mailänder
798086cd9d fix the red separator being used on black observer UI parts 2015-08-05 21:21:50 +02:00
Matthias Mailänder
987fdab042 unhardcode the chrome definition keys 2015-08-05 21:19:09 +02:00
Pavel Penev
0325f803ab Merge pull request #8956 from Mailaender/simple-things
Added missing lint references
2015-08-05 16:59:21 +03:00
Matthias Mailänder
3b47aff61c correct the namespace according to file location 2015-08-05 15:31:07 +02:00
Matthias Mailänder
281699baea add missing weapon reference 2015-08-05 15:30:51 +02:00
Matthias Mailänder
78b200d26a add missing sprite sequence and image references 2015-08-05 15:30:39 +02:00
abcdefg30
e1e166e0ad Merge pull request #8914 from Mailaender/fixed-scientists
Fixed scientist sprite shadow on frame 25 for both Red Alert and Tiberian Dawn
2015-08-05 14:23:54 +02:00
abcdefg30
668b46c297 Merge pull request #8946 from pchote/fix-faction-tooltips
Fix orphaned tooltips when dismissing a dropdown.
2015-08-05 14:02:13 +02:00
abcdefg30
abd08ac4fb Merge pull request #8953 from pchote/support-flying-mcv
Force helicopters to land before transforming.
2015-08-05 13:57:48 +02:00
Paul Chote
de4fbfd47a Reset tooltips when dismissing a DropDownButtonWidget. 2015-08-05 09:11:19 +01:00
Paul Chote
710a32d1ce Extract ScrollPanel tooltip workaround into common code. 2015-08-05 09:11:19 +01:00
Paul Chote
1aa5852a5b Force helicopters to land before transforming. 2015-08-05 08:59:32 +01:00
Matthias Mailänder
c6cb9db0dd Merge pull request #8948 from pchote/fix-shroud-edge-reveal
Prevent shroud from being revealed outside the map cordon.
2015-08-05 08:46:06 +02:00
Paul Chote
c1fcd5fb47 Prevent shroud from being revealed outside the map cordon.
Fixes #8947.
2015-08-04 23:12:19 +01:00
Paul Chote
3ed40090f7 Merge pull request #8941 from abcdefg30/revert-sync-inherited
Revert "Sync inherited members."
2015-08-04 22:15:53 +01:00
abcdefg30
ed78e3aa9c Merge pull request #8923 from reaperrr/prj-shadow
Made projectile shadows heightmap-aware
2015-08-04 20:32:02 +02:00
abcdefg30
58c4312675 Revert "Add tests to verify sync hashing mechanism."
This reverts commit 9f32eb76cd.
2015-08-04 20:03:19 +02:00
abcdefg30
0ecc5e388d Merge pull request #8881 from atlimit8/FixAircraftGetActorBelowAltitudeChecking
Fix Aircraft.GetActorBelow() altitude checking
2015-08-04 18:08:32 +02:00
abcdefg30
3ec874db31 Revert "Sync inherited members."
This reverts commit cfd2f265d5.
2015-08-04 17:24:59 +02:00
abcdefg30
582c93dda5 Merge pull request #8784 from Mailaender/heli-drop-sounds
Added helicopter takeoff and landing sound
2015-08-04 14:53:00 +02:00
Matthias Mailänder
fb22c9a1e5 test unchanged miniyaml rules only once 2015-08-04 14:20:52 +02:00
abcdefg30
d0fb08a48c Merge pull request #8920 from pchote/fix-map-border
Account for disabled shroud/fog in ShroudRenderer.
2015-08-04 12:27:26 +02:00
abcdefg30
6183691828 Merge pull request #8894 from pchote/fix-projection-init
Lazily initialize cell projection mapping.
2015-08-04 12:13:37 +02:00
Matthias Mailänder
6a1f7fd55a Merge pull request #8892 from pchote/fix-lonestar-audio
Use background music for Fort Lonestar rain.
2015-08-04 11:49:34 +02:00
Pavel Penev
958e996004 Merge pull request #8922 from pchote/fix-tabcomplete-crash
Fix a divide by zero crash in TabCompletionLogic.
2015-08-04 00:44:50 +03:00
reaperrr
efc7915f4f Made projectile shadows heightmap-aware. 2015-08-03 23:36:16 +02:00
Paul Chote
0aca03158c Fix a divide by zero crash in TabCompletionLogic. 2015-08-03 21:42:30 +01:00
Paul Chote
71576f9ab1 Merge pull request #8858 from RoosterDragon/sync-inherited
Sync members of base classes
2015-08-03 21:15:46 +01:00
Paul Chote
800fe5ff8d Merge pull request #8902 from deniz1a/dropdown-autoscroll
Makes dropdown menus auto-scroll to selected item.
2015-08-03 21:13:41 +01:00
Paul Chote
ab5b912697 Merge pull request #8913 from reaperrr/fix-ts-water
Fixed bright dots on TS temperate terrain water
2015-08-03 21:09:57 +01:00
Paul Chote
0b4543919d Account for disabled shroud/fog in ShroudRenderer.
Fixes #8827.
2015-08-03 21:07:02 +01:00
Pavel Penev
3961f3d6c7 Merge pull request #8908 from Mailaender/fix-spectating-desync
Fixed a desync when a player surrenders
2015-08-03 22:57:41 +03:00
abcdefg30
34bf5b5810 Merge pull request #8911 from reaperrr/random-wbe
Allowed WithBuildingExplosion to randomly select from multiple sequences
2015-08-03 17:02:00 +02:00
Matthias Mailänder
34a228406f fix shadow on frame 25
via http://cnc-comm.com/community/index.php?topic=4069.0
2015-08-03 16:44:35 +02:00
reaperrr
1ca4ec1749 Fixed bright dots on TS temperate terrain water
Temperate water tiles use palette index #1, which is also used for shadow on SHPs.
2015-08-03 16:42:20 +02:00
reaperrr
94f6dd5e56 Allow WithBuildingExplosion to randomly select from multiple sequences
Necessary for TS/RA2-style building explosions.
2015-08-03 16:35:58 +02:00
abcdefg30
d1375a224f Merge pull request #8910 from Mailaender/ts-crush-palette
Fixed Tiberian Sun infantry crush palette
2015-08-03 13:32:28 +02:00
abcdefg30
b384bcfe74 Merge pull request #8907 from Mailaender/ts-minigun-sounds
Added more variation to the Tiberian Sun light infantry gun
2015-08-03 13:12:32 +02:00
Matthias Mailänder
87db0c97c5 fix infantry crush palette 2015-08-03 11:33:12 +02:00
Matthias Mailänder
e50f42672d Merge pull request #8903 from GraionDilach/ts-fixwatereffects
Fix TS water effect palettes.
2015-08-03 11:13:46 +02:00
Matthias Mailänder
bbb186d9c8 fix marking player as spectator going through unsynced code 2015-08-03 10:28:32 +02:00
Matthias Mailänder
d2cc61e165 add more variation to the light infantry gun 2015-08-03 08:20:22 +02:00
RoosterDragon
9f32eb76cd Add tests to verify sync hashing mechanism. 2015-08-02 22:36:56 +01:00
Zimmermann Gyula
4521157901 Fix TS water effect palettes.
Also copied over the waterpiffs from RA because TS equvivalent has no
fitting palette/only singular piff exists - w_piffs didn't.
2015-08-02 23:30:51 +02:00
deniz1a
53329b7068 Makes dropdown menus auto-scroll to selected item. 2015-08-02 23:27:54 +03:00
Matthias Mailänder
1eb46d4922 Merge pull request #8895 from abcdefg30/napulsturr
Fix napuls sequences
2015-08-02 19:33:38 +02:00
atlimit8
a209e9db4c Fix Aircraft.GetActorBelow() altitude checking 2015-08-02 11:51:34 -05:00
abcdefg30
dcb3b11bb3 Fix napuls sequences 2015-08-02 18:36:11 +02:00
Paul Chote
3d65ba39f6 Lazily initialize cell projection mapping. 2015-08-02 17:15:39 +01:00
Paul Chote
f888886c35 Merge pull request #8891 from Mailaender/make-ts-version
Fixed Tiberian Sun mod not being versioned
2015-08-02 16:44:21 +01:00
Pavel Penev
e022a0a7ba Merge pull request #8799 from Mailaender/differentiate-ts-mixes
Added support to specify the package/folder in the virtual file system for Tiberian Sun Cabal/EVA voices and Nod/GDI icons
2015-08-02 18:39:30 +03:00
Matthias Mailänder
8d7a9c6b50 remove non-existing sprites 2015-08-02 17:29:44 +02:00
Matthias Mailänder
894f75fb3b provide a more helpful exception 2015-08-02 17:29:44 +02:00
Matthias Mailänder
a0c02d5710 use different Nod/GDI icons for shared actors 2015-08-02 17:29:44 +02:00
Matthias Mailänder
68b7359664 enable Cabal voice 2015-08-02 17:29:44 +02:00
Matthias Mailänder
245d7904fe allow to specify the folder directly in the virtual file system
using folder:file syntax
2015-08-02 17:29:41 +02:00
Matthias Mailänder
b5df1222bd Merge pull request #8893 from Phrohdoh/lua#fix-default-lighting
LightingGlobal default of 1d.
2015-08-02 17:28:19 +02:00
Taryn Hill
7656ad3d12 Use a default of 1d instead of 0d in LightingGlobal if the necessary trait doesn't exist 2015-08-02 10:26:15 -05:00
Paul Chote
2c138e7691 Use background music for Fort Lonestar rain. 2015-08-02 16:19:47 +01:00
Matthias Mailänder
7c9a333ac4 also use the combined mod for Lua API doc generation 2015-08-02 17:12:06 +02:00
Matthias Mailänder
f2073d18aa fix documentation not being versioned on Windows 2015-08-02 17:11:47 +02:00
Matthias Mailänder
a37e6a3625 fix TS mod not being versioned 2015-08-02 17:10:20 +02:00
Paul Chote
fb5db60d9d Merge pull request #8865 from Phrohdoh/lua#effects-rgba
Rename EffectGlobal to LightingGlobal and expose individual channels.
2015-08-02 16:05:27 +01:00
Taryn Hill
2f452d88b3 Rename EffectsGlobal to LightingGlobal
Remove ChangeLighting in favor of individual channels
Change RA's fort-lonestar to use Lighting instead of Effect
2015-08-02 10:03:39 -05:00
Oliver Brakmann
7298c21e75 Merge pull request #8882 from Mailaender/ts-decoration-radar-color
Fixed undefined white decoration radar colors
2015-08-02 16:46:22 +02:00
Paul Chote
a0c256173b Merge pull request #8851 from penev92/bleed_rename
Some more renaming from "race" to "faction"
2015-08-02 15:34:41 +01:00
Pavel Penev
a75f8f63be Add an upgrade rule for BuildableInfo.ForceRace rename 2015-08-02 17:19:46 +03:00
Oliver Brakmann
43a3717659 Merge pull request #8888 from deniz1a/fix-assetbrowser
Revert "Improves filter text field in asset browser."
2015-08-02 16:12:21 +02:00
Oliver Brakmann
1a83304f28 Merge pull request #8765 from reaperrr/arty-expl
Improved Explodes trait and how artillery explodes
2015-08-02 16:00:09 +02:00
Oliver Brakmann
9e2f06aa2d Merge pull request #8876 from pchote/music
Refine the music playlist code.
2015-08-02 15:49:13 +02:00
reaperrr
a06cb8fccb Tweaked RA and TD artillery explosion
Renamed RA UnitExplode to AmmoExplode, added new UnitExplode with 1/10
damage.
Reduced TD UnitExplode damage to 1/10 of old value.

Now artillery always explodes, but there's only a 75% chance it explodes
violently and only when it has ammo.
If either condition isn't met, it explodes with the (now less violent) UnitExplode.
2015-08-02 15:18:30 +02:00
deniz1a
37ac08ecfe Revert "Improves filter text field in asset browser."
This reverts commit 4fcf73921f.
2015-08-02 16:17:48 +03:00
Oliver Brakmann
4b6c37f90f Merge pull request #8878 from pchote/fix-cratebadger-spawn
Fix crate drop aircraft spawn height.
2015-08-02 14:51:42 +02:00
Oliver Brakmann
2b1f1cc031 Merge pull request #8880 from pchote/fix-radar-mouse
Fix radar pixel <-> cell conversions.
2015-08-02 14:46:24 +02:00
Oliver Brakmann
84cf1e4240 Merge pull request #8873 from pchote/remove-clone-crate
Remove the balance-breaking unit duplication crate.
2015-08-02 12:45:56 +02:00
Pavel Penev
dc3cfa35c6 Merge pull request #8874 from reaperrr/fix-e2-prone
Fixed RA grenadier prone-stand sequences
2015-08-02 13:45:09 +03:00
Matthias Mailänder
0efb8fc6f4 Merge pull request #8883 from pchote/remove-ts-proximitycaptor
Remove ProximityCaptor from TS camera.
2015-08-02 10:47:01 +02:00
Paul Chote
0109bb17be Remove ProximityCaptor from TS camera. 2015-08-02 09:33:28 +01:00
Paul Chote
5f2c62634c Merge pull request #8817 from penev92/bleed_cleanups
Touch up a few files
2015-08-02 09:30:43 +01:00
Matthias Mailänder
8a6b5d1b8d define radar color for rocks 2015-08-02 08:44:45 +02:00
Matthias Mailänder
6d20d4b2db define radar color for trees 2015-08-02 08:44:45 +02:00
Paul Chote
1d307bfe07 Disable music auto-play unless tracks are installed. 2015-08-01 23:05:09 +01:00
Paul Chote
9b3ef9e7f7 Move MusicPlaylist to Mods.Common. 2015-08-01 22:56:07 +01:00
Zimmermann Gyula
c6e246102e Hide the songs which were hidden in the base games. 2015-08-01 22:42:27 +01:00
Zimmermann Gyula
1d80c37fda Add support for hiding music tracks. 2015-08-01 22:41:25 +01:00
Paul Chote
21254db120 Add background music to RA shellmap. 2015-08-01 22:24:40 +01:00
Matthias Mailänder
25ee5f7287 add the takeoff and landing sound 2015-08-01 22:46:06 +02:00
Matthias Mailänder
9c67e46226 make Orca Transport buildable with developer cheats 2015-08-01 22:37:54 +02:00
Pavel Penev
244ca10242 Merge pull request #8862 from pchote/fix-rotation-hack
Disable legacy coordinate hack in TS.
2015-08-01 23:04:08 +03:00
Paul Chote
a8ddc4e360 Always start the game with a random song.
This fixes the issue where games will always start
with shellmap theme.
2015-08-01 20:52:20 +01:00
Paul Chote
5952d8c979 Fix crash when opening music player from TD lobby. 2015-08-01 20:52:20 +01:00
Paul Chote
fb0e2c5cc3 Introduce background music concept. 2015-08-01 20:52:20 +01:00
Paul Chote
a2517b42bb Fix 4tnk muzzle offsets. 2015-08-01 20:41:30 +01:00
Paul Chote
3a8a18499e Fix radar pixel <-> cell conversions.
Fixes #8869.
2015-08-01 20:19:20 +01:00
Paul Chote
180f6e83d4 Fix crate drop aircraft spawn height. 2015-08-01 20:01:45 +01:00
reaperrr
2d3bf3f664 Merge pull request #8875 from pchote/remove-ts-bounty
Remove bounties from the TS mod.
2015-08-01 19:23:17 +02:00
Paul Chote
5921ea2601 Remove bounties from the TS mod. 2015-08-01 18:10:00 +01:00
Paul Chote
cfe1aaaddd Remove the balance-breaking unit duplication crate. 2015-08-01 18:06:54 +01:00
reaperrr
ff3af5d071 Fixed RA grenadier prone-stand sequences 2015-08-01 19:05:08 +02:00
Paul Chote
583b4f92b6 Merge pull request #8866 from Phrohdoh/feat#terrain-height-at
Implement DistanceAboveTerrain
2015-08-01 17:54:31 +01:00
Taryn Hill
22ffeb2a12 Use DistanceAboveTerrain in CreateEffectWarhead 2015-08-01 11:48:50 -05:00
Taryn Hill
6fa1f757b0 Add Map.DistanceAboveTerrain(WPos) and Actor.IsAtGroundLevel() extension method 2015-08-01 11:48:47 -05:00
Matthias Mailänder
7066254887 Merge pull request #8814 from reaperrr/ssm-tur
Implement ammo-dependent turret art for TD Mobile SAM
2015-08-01 18:06:36 +02:00
reaperrr
ac0a92888e Implement ammo-dependent art for Mobile SAM turret 2015-08-01 17:15:35 +02:00
reaperrr
c3d996cb62 Adds WithReloadingTurret render trait to TD mod 2015-08-01 17:15:34 +02:00
abcdefg30
1b20807677 Merge pull request #8870 from obrakmann/fix-ai-using-shared-random
Fix AI using SharedRandom values
2015-08-01 16:39:32 +02:00
Oliver Brakmann
c539b9fcb4 Fix AI using SharedRandom values
The AI code runs on only one hosts, so by having the AI use SharedRandom values, the host's random gets out of sync with the other players' and crashes the game.
2015-08-01 15:59:12 +02:00
Matthias Mailänder
97192dd8b2 Merge pull request #8868 from pchote/readonly-traits
Make trait fields readonly
2015-08-01 15:58:42 +02:00
Paul Chote
3dda305524 Make NukePower fields readonly. 2015-08-01 14:19:12 +01:00
Paul Chote
6f60b16f06 Make SmokeTrailWhenDamaged fields readonly. 2015-08-01 14:19:12 +01:00
Paul Chote
60305face7 Make WithVoxelBody fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
a127c6b050 Make WithVoxelBarrel fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
322d941332 Make WithProductionOverlay fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
038e8018b9 Make WithBuildingPlacedOverlay fields readonly. 2015-08-01 14:19:11 +01:00
Paul Chote
4e27ac9aac Make WithTurret fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
d20819735c Make WithRotor fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
f91b28a2a0 Make WithRepairOverlay fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
bb092ec07b Make WithRepairAnimation fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
c5becaab9b Make WithIdleOverlay fields readonly. 2015-08-01 14:19:10 +01:00
Paul Chote
a2d069ce55 Make WithHarvestOverlay fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
8e6b764284 Make WithBuildingPlacedAnimation fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
0065d27c68 Make WithBuildingExplosion fields readonly. 2015-08-01 14:19:09 +01:00
Paul Chote
eeb101c040 Make Contrail fields readonly. 2015-08-01 14:19:09 +01:00
reaperrr
1e96e7720d Merge pull request #8867 from abcdefg30/fixload
Fix a crash in LaunchArguments when switching mods
2015-08-01 14:54:57 +02:00
Paul Chote
6a586fe501 Make RenderVoxels fields readonly. 2015-08-01 13:28:56 +01:00
Paul Chote
c6ecd772c4 Make RenderRangeCircle fields readonly. 2015-08-01 13:28:19 +01:00
Paul Chote
4b4cc52aa0 Make RenderDetectionCircle fields readonly. 2015-08-01 13:27:57 +01:00
Paul Chote
080f1880b9 Make RenderBuildingTurreted fields readonly. 2015-08-01 13:27:40 +01:00
Paul Chote
ef619a186c Make ExternalCapturableBar fields readonly. 2015-08-01 13:27:09 +01:00
abcdefg30
5e3d600408 Fix a crash in LaunchArguments when switching mods 2015-08-01 13:45:41 +02:00
reaperrr
4934d6c035 Merge pull request #8859 from pchote/coords-fixup
Fix WPos <-> CPos conversions.
2015-08-01 12:23:26 +02:00
Paul Chote
82abd5a016 Merge pull request #8808 from deniz1a/leavemap-cleanup
Removes unnecessary code from IngameChatLogic.cs.
2015-08-01 11:21:15 +01:00
Paul Chote
bdf3c0694d Merge pull request #8812 from abcdefg30/mechanical
Fix TS Repair weapons versus values
2015-08-01 11:13:26 +01:00
Paul Chote
a0e92093a1 Fix the WPos <-> CPos conversion.
Fixes #8463.
2015-08-01 11:09:07 +01:00
abcdefg30
b8372984b0 Merge pull request #8247 from Mailaender/man-openra
Added a UNIX man page
2015-08-01 12:06:14 +02:00
reaperrr
a8c09f4035 Merge pull request #8846 from pchote/ingame-map-previews
Improve radar minimap on isometric maps.
2015-08-01 11:59:21 +02:00
Matthias Mailänder
7c86519242 organize launch arguments in it's own class 2015-08-01 11:56:45 +02:00
Matthias Mailänder
baa798d831 autogenerate and install a UNIX man page 2015-08-01 11:56:43 +02:00
Matthias Mailänder
ec7912eaac remove unused variable 2015-08-01 11:55:46 +02:00
Matthias Mailänder
88e16a890d extract Launch args for automatic manpage creation 2015-08-01 11:55:46 +02:00
abcdefg30
9d32667d15 Merge pull request #8860 from pchote/heightmap-placebuilding-footprint
Align the footprint tiles with the building preview.
2015-08-01 10:32:57 +02:00
Paul Chote
bffbd2fc66 Fixes MMKII weapon offsets. 2015-08-01 00:42:59 +01:00
Paul Chote
9a64b8724c Disable local -> world offset hack in TS. 2015-08-01 00:42:59 +01:00
Paul Chote
aebca2bdae Align the footprint tiles with the building preview. 2015-07-31 23:36:40 +01:00
RoosterDragon
cfd2f265d5 Sync inherited members. 2015-07-31 22:04:43 +01:00
Pavel Penev
33e779f4c0 Merge pull request #8856 from reaperrr/wpdo
Fix WithProductionDoorOverlay namespace
2015-07-31 22:33:03 +03:00
reaperrr
5941914ced Fix WithProductionDoorOverlay namespace 2015-07-31 21:08:25 +02:00
Oliver Brakmann
b249347898 Merge pull request #8545 from HenrytheSlav/soviet4s
Add Soviet04a and Soviet04b
2015-07-31 20:11:19 +02:00
Pavel Penev
c304229987 Merge pull request #8847 from pchote/heightmap-borders
Heightmap-aware map helper functions.
2015-07-31 16:14:12 +03:00
Paul Chote
d29519fca1 Implement height-aware map.ChooseClosestEdgeCell(). 2015-07-31 08:38:07 +01:00
Paul Chote
05f41a0182 Implement height-aware map.DistanceToEdge(). 2015-07-31 08:38:07 +01:00
Paul Chote
318d6aaa73 Implement height-aware map.ChooseRandomEdgeCell(). 2015-07-31 08:38:07 +01:00
Paul Chote
e337710221 Implement height-aware map.ChooseRandomCell(). 2015-07-31 08:38:06 +01:00
Paul Chote
ed359c8aeb Improve radar display for isometric maps. 2015-07-31 08:34:16 +01:00
Paul Chote
372d93994c Account for heightmaps in choosing the minimap bounds. 2015-07-31 08:34:16 +01:00
Pavel Penev
10c5b82ef0 Rename BuildableInfo.ForceRace 2015-07-31 05:41:19 +03:00
Pavel Penev
720cb062b6 Add an upgrade rule for ProvidesPrerequisite.Race rename 2015-07-31 05:40:59 +03:00
Pavel Penev
a8dae72409 Clean ProvidesPrerequisite.cs of "race" 2015-07-31 05:38:49 +03:00
Pavel Penev
1e9cc50805 Clean Production.cs of "race" 2015-07-31 05:38:43 +03:00
Pavel Penev
6379ee9394 Clean ObserverShroudSelectorLogic.cs of "race" 2015-07-31 05:38:27 +03:00
reaperrr
715a89468a Clean up RA vehicles.yaml since UnitExplodeSmall is inherited from defaults 2015-07-30 21:23:56 +02:00
reaperrr
c205afcf4d Add descriptions and LoadedChance to Explodes trait
'Chance' only allows to control whether the actor explodes at all.
'LoadedChance' allows to control how likely the actor will explode violently using Weapon, and otherwise falls back to EmptyWeapon.
2015-07-30 21:23:55 +02:00
abcdefg30
c2cbf7c79d Merge pull request #8842 from GraionDilach/replace-thunder
Replace ambient sounds from unknown sources with CC0 licensed ones
2015-07-30 20:06:09 +02:00
Zimmermann Gyula
befdac8237 Replace ambient sounds from unknown sources with CC0 licensed ones
Sample sources:
rain https://www.freesound.org/people/vibe_crc/sounds/50058/
thunder1 https://www.freesound.org/people/netaj/sounds/193170/
thunder2 thunder-ambient
https://www.freesound.org/people/hifijohn/sounds/242735/
thunder3 https://www.freesound.org/people/sarson/sounds/195522/
thunder4 https://www.freesound.org/people/FenrirFangs/sounds/234737/
thunder5 https://www.freesound.org/people/Xythe/sounds/37299/
2015-07-30 19:36:12 +02:00
Pavel Penev
ab1c7ebb09 Merge pull request #8845 from obrakmann/remove-clamping-testcase
Revert "HACK: Testcase for edge clamping."
2015-07-30 17:40:42 +03:00
Oliver Brakmann
439bc4ab34 Revert "HACK: Testcase for edge clamping."
This reverts commit fb84f1157e.
2015-07-30 16:36:40 +02:00
Oliver Brakmann
74570e5998 Merge pull request #8824 from pchote/heightmap-clamp
Implement heightmap-aware bounds clamping.
2015-07-30 16:20:27 +02:00
Paul Chote
fb84f1157e HACK: Testcase for edge clamping.
Remove before merging!
2015-07-30 08:18:45 +01:00
Paul Chote
13e0527f7c Implement height-aware map.Clamp(MPos). 2015-07-30 08:18:45 +01:00
Paul Chote
2c00019715 Revert "Temporarily work around RadarWidget corruption."
This reverts commit 4bc75f1ed6.
2015-07-30 08:18:45 +01:00
Paul Chote
66f4e1d775 Render the full map to the radar backing sheet. 2015-07-30 08:18:39 +01:00
Oliver Brakmann
90d3a9078f Merge pull request #8825 from pchote/lobby-map-previews
Fix TS lobby map previews
2015-07-29 21:54:46 +02:00
Paul Chote
54a80ed035 Include additional preview to prevent cutoff.
Fun fact: The original TS sidestepped this issue
by rendering everything outside the cordon, which
looks much worse than what we do here.
2015-07-29 20:44:44 +01:00
Paul Chote
af69370c17 Improve lobby minimap display for isometric maps.
Also extracts a trait query from inside a tight loop to save unnecessary work.
2015-07-29 20:44:44 +01:00
reaperrr
6db91ccec1 Merge pull request #8796 from Mailaender/travis-docker-take2
Enabled the container based Travis CI architecture
2015-07-29 20:55:13 +02:00
abcdefg30
fa3ad6347b Merge pull request #8836 from reaperrr/atk-sync
Removed redundant ISync and ITick from Attack* traits
2015-07-29 19:37:24 +02:00
reaperrr
398f02c5db Remove redundant ISync and ITick from Attack* traits
ISync is implemented by AttackBase, so there's no need for other Attack traits to implement it again.
AttackTurreted inherits AttackFollow, which already implements ITick.
2015-07-29 17:45:30 +02:00
Matthias Mailänder
c660d32051 Merge pull request #8833 from obrakmann/fix8826_trait-from-dead-crate-crash
Fix crates dying while not in the world
2015-07-29 15:30:07 +02:00
Matthias Mailänder
8eb5698d57 Merge pull request #8170 from DSUK/master
TFD Installer for Tiberian dawn, Red Alert and Tiberian Sun
2015-07-29 15:25:59 +02:00
Pavel Penev
df46f83e38 Merge pull request #8834 from obrakmann/fix-basebuilder-nre
Fix potential NRE in AI BaseBuilder
2015-07-29 16:07:34 +03:00
Oliver Brakmann
1b9367ae4b Fix potential NRE in AI BaseBuilder
Detected by Coverity
2015-07-29 14:53:15 +02:00
abcdefg30
4a42591369 Fix TS Repair weapons versus values 2015-07-29 14:49:05 +02:00
Oliver Brakmann
eada254ad3 Fix crates dying while not in the world
On large maps, it can take the delivery aircraft longer than the crate's
lifetime to reach the paradrop location, so the crate will be destroyed while it's still in the aircraft, leading to an attempt to get a trait from a destroyed object in the Paradrop trait.

This fixes the lifetime logic of crates so that the lifetime will only be increased when the crate is actually in the world. This will probably also better reflect the intention behind the Lifetime property, which I assume was meant to be the time the crate would be on the map available for pickup, rather than the lifetime of the actor itself.
2015-07-29 12:35:58 +02:00
James
1d3f4d6f12 added The First Decade Installation Logic 2015-07-29 08:18:26 +01:00
James
8468ce5fe6 added InstallShield CAB Extractor 2015-07-29 08:18:26 +01:00
Matthias Mailänder
0ba54b425e Merge pull request #8759 from reaperrr/ai-bldgcheck
Improved AI BaseBuilder
2015-07-28 22:32:21 +02:00
reaperrr
d8e458d028 Added TODOs for foundation of checked water cells
Fix description style issues
2015-07-28 22:03:53 +02:00
reaperrr
91178d6f62 Improved naval placement check
Moved water checks before --waitTicks.
Use Water enum instead of multiple booleans.
Check for BaseProvider rather than BaseBuilding.
Move expensive ClosEnoughToWater check to last position for naval
production override.
2015-07-28 22:03:52 +02:00
Matthias Mailänder
b9c52acefc Merge pull request #8809 from reaperrr/ra-ai
Improved RA mod AI (yaml tweaks)
2015-07-28 21:25:33 +02:00
Matthias Mailänder
e127e55792 Merge pull request #8777 from pchote/base-key
Fall back to oldest building if no BaseBuildings exist.
2015-07-28 20:35:12 +02:00
reaperrr
ed1a55df83 Fixed AI soviet paratrooper target evaluation so it doesn't always fail 2015-07-28 19:26:43 +02:00
Pavel Penev
fb2a4265bd Merge pull request #8811 from abcdefg30/die3
Use HeadshotDeath instead of BulletDeath for Umagon's rifle
2015-07-28 19:16:24 +03:00
Pavel Penev
2a166edb72 Merge pull request #8820 from obrakmann/fix8722-allies03-jail-breakage
Revert "Allies 03 Cloak->TargetableUnit"
2015-07-28 18:23:48 +03:00
reaperrr
5f9834d250 Shifted Turtle AI priority more from adv. power plants to defenses
This will work better once #8759 is merged (due to improved low power check).
2015-07-28 17:05:20 +02:00
reaperrr
793a9e4f20 Disable dog kennels for AI
I saw the AI build kennels early and waste cash on an army of dogs quite a
few times, putting that AI at severe disadvantage.
2015-07-28 17:04:05 +02:00
Oliver Brakmann
b7c444713e Revert "Allies 03 Cloak->TargetableUnit"
This reverts commit acc4b307b6.
2015-07-28 15:42:18 +02:00
Oliver Brakmann
dff56f6c20 Merge pull request #8781 from pchote/heightmap-shroud
Add plumbing for heighmap-aware shroud and map bounds checks.
2015-07-28 15:35:51 +02:00
Pavel Penev
7701980b76 Simple code style cleanups 2015-07-28 14:21:17 +03:00
Pavel Penev
9801d89e75 Merge pull request #8813 from pchote/fix-bounds-checks
Replace map.Contains with proper array bounds checks.
2015-07-28 04:27:53 +03:00
deniz1a
e3c2dced36 Removes unnecessary code from IngameChatLogic.cs.
Cleanup after #8105.
2015-07-27 23:22:30 +03:00
Matthias Mailänder
9fefc1f7b7 Merge pull request #8816 from reaperrr/common-armor
Moved Armor trait to Mods.Common
2015-07-27 22:04:29 +02:00
Paul Chote
4bc75f1ed6 Temporarily work around RadarWidget corruption. 2015-07-27 20:20:01 +01:00
reaperrr
89f3718aa7 Move Armor trait to Mods.Common 2015-07-27 21:12:03 +02:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
fb5bcd3889 Extract MapCoordsRegion from CellRegion. 2015-07-27 19:34:39 +01:00
Paul Chote
a8c6a1aa97 Correct Contains check in DomainIndex. 2015-07-27 19:06:20 +01:00
Paul Chote
3a7300810c Correct Contains check in BridgeLayer. 2015-07-27 19:06:20 +01:00
Paul Chote
0b5b612757 Correct Contains check in BuildingInfluence. 2015-07-27 18:43:51 +01:00
Paul Chote
2b3c65334d Correct Contains check in ActorMap. 2015-07-27 18:43:51 +01:00
Matthias Mailänder
3b25a2029a Merge pull request #8805 from obrakmann/fix8802_enemy-unit-selection
Fix not being able to select enemy units
2015-07-27 19:38:37 +02:00
abcdefg30
adfa2af4bc Merge pull request #8800 from Mailaender/ts-deployed-units
Fixed deployed vehicles being treated as buildings
2015-07-27 18:53:48 +02:00
abcdefg30
7c14f54ca3 Added soviet04a and soviet04b 2015-07-27 18:10:09 +02:00
abcdefg30
88466473dd Use HeadshotDeath instead of BulletDeath for Umagon's rifle 2015-07-27 17:34:12 +02:00
reaperrr
e1ef6967f6 Sniper isn't buildable anymore 2015-07-27 16:00:53 +02:00
Oliver Brakmann
a2a0059f7f Fix chronoshift duration being visible to enemy players 2015-07-27 13:32:51 +02:00
reaperrr
76f2145db2 Added random factor to building production delay
Early game AI usually follows the same build order (power plant first, then refinery), which also means they all start producing them at the same tick. This adds a random factor to the production delay, so not all AIs produce on the same tick.
2015-07-27 13:28:07 +02:00
reaperrr
c7af9c180e Further improved building placement failure check
Since naval structures have their own safety measures now and therefore shouldn't count towards failCount under normal circumstances, we can now assume that 3 consecutive placement failures mean lack of space. Therefore, rather than unconditionally resetting the failCount and retry every N ticks, we now cache the number of buildings and construction yards at the time of the 3rd consecutive failure and if the number of buildings hasn't decreased and number of construction yards not increased, we assume there is still not enough space and reset the retry delay instead.
2015-07-27 13:28:06 +02:00
reaperrr
65a6489ef1 Avoid consecutive attempts to build naval structures
If not enough water space can be found inside the base perimeter, stop the AI from trying to build naval production buildings permanently until it deploys another construction yard.

If enough water is available within the base perimeter, check whether any
building that provides buildable area (for adjacency) is close enough to
water, otherwise don't even start producing this naval structure.
2015-07-27 13:28:05 +02:00
reaperrr
0a5b812bb7 Check for consecutive failures to place a structure.
After 3 consecutive failed attempts, wait one minute before resetting the counter and trying again.
2015-07-27 13:21:58 +02:00
Oliver Brakmann
618ba6342c Fix not being able to select enemy units 2015-07-27 13:07:07 +02:00
reaperrr
6ff394991d Fixed AI BaseBuilder low power check.
This was extremely borked:
The priority overrides for refinery, production and silo ignored power completely and never checked whether the structure might drive the AI into low power state; whereas the check for regular building checked whether the structure's power -exceeded- MinimumExcessPower (previously just 0). The catch is that power draw is represented by negative numbers, so the only buildings that would trigger this were - power plants.
Now it checks whether the sum of building power draw (negative) and AI's current power level are lower than MinimumExcessPower, if not, build the structure, if yes, build a power plant instead.
Additionally, this check is now performed for the early-game priority overrides as well.

Last but not least the AI would not(!) give power plants priority if it was already low on power. This has been fixed as well.
2015-07-27 13:06:18 +02:00
Matthias Mailänder
a3eac88e36 Merge pull request #8774 from atlimit8/v19husk_noRenderBuilding
Add StartSequence to WithIdleOverlay & change V19.Husk
2015-07-27 07:50:18 +02:00
Matthias Mailänder
00017a9b4e Merge pull request #8770 from RoosterDragon/ai-order-throttle
Throttle AI order speed to prevent lag spikes
2015-07-27 07:37:01 +02:00
Matthias Mailänder
5800c07602 don't define deployed vehicles as buildings 2015-07-26 21:17:25 +02:00
atlimit8
4976f9fec9 Add StartSequence to WithIdleOverlay & change V19.Husk 2015-07-26 12:53:09 -05:00
Matthias Mailänder
1748588ec8 remove redundant push/pop with nothing in between 2015-07-26 14:05:22 +02:00
RoosterDragon
942ce6b5a6 Throttle the issuing of orders by the AI.
To prevent the AI generating lag spikes by issuing too many orders in a single tick, it is now limited in how many orders can be issued per tick. Extra orders are queued. This allows the performance hit of issuing multiple orders to be spread out over several ticks.
2015-07-26 12:57:19 +01:00
Matthias Mailänder
f3490dd8e4 double quote to prevent globbing and word splitting
detected by http://www.shellcheck.net/
2015-07-26 13:03:01 +02:00
Matthias Mailänder
0c2934a536 switch to the new container based infrastructure 2015-07-26 13:02:14 +02:00
Matthias Mailänder
03ace48031 remove the thirdparty nsProcess plugin 2015-07-26 12:33:02 +02:00
Paul Chote
d9d37d54c8 Merge pull request #8782 from Mailaender/ts-tmpl
Added the Tiberian Sun Temple of Nod
2015-07-26 11:07:29 +01:00
Paul Chote
3dfd6360ac Merge pull request #8793 from atlimit8/SandwormNoLzay
Remove unnecessary Lazy<>s from Sandworm.cs
2015-07-26 11:06:44 +01:00
Oliver Brakmann
bb40d57944 Merge pull request #8791 from penev92/bleed_cancelActivity
Fix an NRE when cancelling repair orders on units at the wrong time
2015-07-26 11:09:56 +02:00
Matthias Mailänder
4d81cc262c Merge pull request #8783 from obrakmann/reenable-mission-replays
Re-enable mission replays
2015-07-26 09:44:19 +02:00
Matthias Mailänder
2119b26e18 Merge pull request #8790 from pchote/restore-aircraft-height
Revert "Lower aircraft altitude"
2015-07-26 08:51:31 +02:00
atlimit8
cc3b286fa6 Remove unnecessary Lazy<>s from Sandworm.cs 2015-07-25 23:10:42 -05:00
Pavel Penev
cccf5c5931 Check if the inner activity is null before trying to cancel it 2015-07-26 02:15:38 +03:00
Paul Chote
04a71f4dc5 Revert "Fix fallrates for parachutable things to match lowered release altitude"
This reverts commit f7a02eeca5.
2015-07-25 23:31:38 +01:00
Paul Chote
2a93a95245 Revert "Lower aircraft altitude"
This reverts commit d53cfafde9.
2015-07-25 23:27:06 +01:00
Oliver Brakmann
b749548e76 Re-enable replays for missions 2015-07-25 20:51:39 +02:00
Oliver Brakmann
4de03e991c Remove revealing views from observer mode in missions 2015-07-25 20:51:39 +02:00
Matthias Mailänder
a56ecc3f6b add Temple of Nod 2015-07-25 20:30:41 +02:00
Oliver Brakmann
808bbb8d2e Merge pull request #8105 from deniz1a/scrollafterend
Removes LeaveMap window.
2015-07-25 18:13:57 +02:00
Oliver Brakmann
a77e9c0d87 Delay loading the observer UI until the game is actually over 2015-07-25 18:56:25 +03:00
Oliver Brakmann
a725d63b0c Remove World.ObserveAfterWinOrLose
Fixes RenderPlayer for "All Players" view.
2015-07-25 18:56:24 +03:00
deniz1a
5546298866 Merges LeaveMapLogic into GameInfoLogic.
Opens options menu when game ends.

Closes settings or music window before opening options menu.

Moves game end video playback logic from GameInfoLogic to
LoadIngamePlayerOrObserverUILogic.

Improves menu buttons.

Stop video from playing on fatal lua script error
2015-07-25 18:56:24 +03:00
deniz1a
ef143e5f8a Freezes map after game ends.
Adds newline.

Disables keyboard hotkeys for units after game ends.
2015-07-25 18:56:23 +03:00
Pavel Penev
ea3a680eda Merge pull request #8725 from reaperrr/bye-rendersimple-pr1
Step towards removing RenderSimple and its derivatives (Part 1)
2015-07-25 18:43:13 +03:00
Oliver Brakmann
8c766a4a79 Merge pull request #8721 from penev92/bleed_rename
Some more Country -> Faction renaming
2015-07-25 17:10:35 +02:00
reaperrr
65c95eb2ee Adapted WithHarvestAnimation to account for damage stages 2015-07-25 16:17:08 +02:00
Paul Chote
537c252e83 Merge pull request #8779 from GraionDilach/fix-gameover
Fix Observers/players using the nofogcheat crashing during win/lose the game.
2015-07-25 14:47:28 +01:00
penev92
4616828b28 Deprecate PlayerProperties.Race 2015-07-25 16:43:34 +03:00
Pavel Penev
4ad9067f51 Merge pull request #8776 from pchote/editor-path-fix
Create the user map directory if required.
2015-07-25 16:36:24 +03:00
Zimmermann Gyula
8f43ae96ae Fix Observers crashing during win/lose the game. 2015-07-25 14:04:47 +02:00
Oliver Brakmann
229a059e06 Merge pull request #8771 from deniz1a/support-power-bounds
Aligns observer support power timers to the left edge of the screen.
2015-07-25 13:13:00 +02:00
Paul Chote
655f4d30ff Merge pull request #8769 from obrakmann/lobby-esc-hotkey
Remove ESC hotkey from lobby 'Back' button
2015-07-25 10:12:50 +01:00
bryanwilbur
09472c3275 Update AUTHORS 2015-07-25 10:04:15 +01:00
bryanwilbur
031109d766 The 'Jump to base' hotkey is useless if the Construction Yard is destroyed #3318
Now works like original Red Alert.  When there are no more Construction Yards the 'Jump to base' hotkey goes to the oldest undestroyed building.
2015-07-25 10:04:14 +01:00
Paul Chote
c70ebfab74 Create the user map directory if required.
Fixes #8772.
2015-07-25 09:36:29 +01:00
reaperrr
2e9a4b78a3 Refactor RenderEditorOnly into RenderSpritesEditorOnly + WithSpriteBody 2015-07-25 10:28:07 +02:00
reaperrr
fe346e5401 Replace RenderBuilding where already possible 2015-07-25 10:28:06 +02:00
reaperrr
74b948342e Fix WithSpriteBody PlayCustomAnimationRepeating
Lacked damage stage awareness.
2015-07-25 10:28:05 +02:00
deniz1a
32e2a06743 Aligns observer support power timers to the left edge of the screen. 2015-07-25 03:20:44 +03:00
Pavel Penev
ded5a2b16a Merge pull request #8742 from abcdefg30/withpalettedeath
Support multiple WithDeathAnimation traits
2015-07-25 03:10:43 +03:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00
penev92
b34810c1d3 Rename AddRaceSuffixLogic to AddFactionSuffixLogic 2015-07-25 00:39:29 +03:00
penev92
9a36bf6bcd Rename CountryTooltipLogic to FactionTooltipLogic 2015-07-25 00:20:59 +03:00
penev92
dc30e5a46d Rename LobbyCountry to LobbyFaction 2015-07-25 00:20:58 +03:00
Oliver Brakmann
6467593124 Remove ESC hotkey from lobby 'Back' button 2015-07-24 23:09:30 +02:00
Oliver Brakmann
7d56209f3b Merge pull request #8680 from deniz1a/textfields
Some text field improvements.
2015-07-24 23:00:12 +02:00
RoosterDragon
6b9dd9670a Avoid multiple AIs all issuing orders in exactly the same tick.
Randomize the initial tick used for each AI so they don't cause lag but all flooding the same tick with orders, but instead (try) and use a different tick for each AI. Order processing is expensive due to the need to sync world state, so it is best to spread out the performance cost of issuing these orders over different ticks.
2015-07-24 21:29:11 +01:00
deniz1a
f5b4befc75 Resets chat text field in lobby when Esc is pressed. 2015-07-24 23:21:37 +03:00
deniz1a
7337afcfeb Improves player name text field in game lobby.
Esc key resets text field to unmodified value and yields focus.
2015-07-24 23:13:17 +03:00
deniz1a
a51cc27fb5 Improves frame limit and player name text fields in settings menu.
Esc key resets text field to unedited value and yields focus.
2015-07-24 23:09:16 +03:00
deniz1a
4fcf73921f Improves filter text field in asset browser.
Text field takes keyboard focus by default.
Esc key resets filter or closes window if text field is empty.
2015-07-24 23:09:15 +03:00
deniz1a
d8c996f74a Fixes spelling in comment. 2015-07-24 23:09:15 +03:00
Paul Chote
34ffb3772f Merge pull request #8728 from reaperrr/wgb
Replaced RenderGunboat with WithGunboatBody
2015-07-24 20:54:55 +01:00
Paul Chote
6fb60f4d99 Merge pull request #8762 from RoosterDragon/filesystem-dispose
Release file handles when unmounting file system
2015-07-24 20:46:35 +01:00
Paul Chote
0c360b5bd0 Merge pull request #8743 from GraionDilach/remove-outtakes
Remove Outtakes (the blooper song) from C&C.
2015-07-24 20:20:06 +01:00
RoosterDragon
ce73bb909e Make IFolder interface inherently IDisposable.
Fix up implementations to ensure they dispose any stream they acquire, and ensure the constructor will not leave a stream open if it fails. Dispose folders when unmounting them in GlobalFileSystem.
2015-07-23 22:31:20 +01:00
Oliver Brakmann
1e7da8514a Merge pull request #8735 from reaperrr/safe-pf-changes
Minor pathfinder-related changes (preparation for mobile refactor)
2015-07-22 14:42:52 +02:00
Oliver Brakmann
5a1b6bb644 Merge pull request #8622 from reaperrr/hv-refactor2
Refactored harvester resource search
2015-07-22 14:26:31 +02:00
reaperrr
711ec0c600 Minor pathfinder changes 2015-07-22 06:36:00 +02:00
reaperrr
3b1607883d Fix D2k harvesters getting stuck on spice field after drop by carryall 2015-07-22 05:10:19 +02:00
reaperrr
61c0b5d59b Make refinery unblock cell customisable 2015-07-22 02:31:29 +02:00
reaperrr
62e05cf618 Fix for potential infinite loop freeze 2015-07-22 02:31:28 +02:00
David Jiménez
787609d51e Improved the performance and intelligence of resource harvesting by
refactoring the Harvesters' pathfinding. Now they in first place assess
which is the closest resource inside their search area and then a path is
calculated

Changed the way harvesters find resources by always trying to find the
closest resource to their refinery.

Changed the strategy of finding to find resources in Annulus.
2015-07-22 02:31:26 +02:00
reaperrr
bd73783cef Merge pull request #8685 from Mailaender/lint-projectile-sprites
Added projectile sprite testing to the CheckYaml lint rules
2015-07-21 01:56:58 +02:00
Matthias Mailänder
a0dc38c252 Merge pull request #8752 from obrakmann/optional-target-lines
Added option to turn off rendering of target lines in the settings
2015-07-20 22:05:05 +02:00
Matthias Mailänder
c6c6a9ff89 Merge pull request #8754 from atlimit8/00To0
Modify upgrade rules to match #8658 for rules older than 2015-07-11
2015-07-20 21:58:16 +02:00
Matthias Mailänder
0296d4e6c7 Merge pull request #8720 from abcdefg30/parashadow
Use the correct ShadowPalette for d2k paradrops
2015-07-20 21:56:50 +02:00
abcdefg30
69328af96d Merge pull request #8756 from atlimit8/FixUpgradableMultiplierTrait
Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled
2015-07-20 13:23:48 +02:00
atlimit8
96cafccb8d Fix #8751 - IndexOutOfRangeException when UpgradeMultiplierTrait is pre-enabled 2015-07-20 02:51:45 -05:00
atlimit8
1f3ba22a55 Modify upgrade rules to match #8658 for rules older than 2015-07-11 2015-07-19 19:45:11 -05:00
figrita
ab3ab6f230 Added option to turn off rendering of target lines in the settings 2015-07-20 00:05:29 +02:00
Oliver Brakmann
30696ea23d Merge pull request #8693 from abcdefg30/difficultyA02
Add different difficulties for allies02
2015-07-19 23:33:29 +02:00
reaperrr
a4a4ac1d5b Merge pull request #8741 from obrakmann/d2k-remove-shellmap-script
Remove shellmap script from d2k
2015-07-19 23:13:21 +02:00
Oliver Brakmann
68ac49b172 Merge pull request #8672 from pchote/more-terrainlayers
Convert remaining terrain layers to use TerrainSpriteLayer
2015-07-19 23:01:44 +02:00
Oliver Brakmann
e4521c7e15 Remove shellmap script from d2k 2015-07-19 19:40:44 +02:00
Matthias Mailänder
1f69a0f6ed make projectile sprite sequences lint testable 2015-07-19 19:24:18 +02:00
Matthias Mailänder
d1db675af5 fix the linter not printing any helpful stacktraces (doh!) 2015-07-19 19:24:18 +02:00
Matthias Mailänder
c8c0cc52b6 add missing sequence references and add spaces for readability 2015-07-19 19:24:18 +02:00
Matthias Mailänder
50d5f1f161 unhardcode and reference tesla zap sprite sequences 2015-07-19 19:24:17 +02:00
abcdefg30
a5f921e843 Merge pull request #8726 from GraionDilach/d2k-menumusic
Restore the original setup of the menu and score musics in the D2k mod.
2015-07-19 13:48:21 +02:00
abcdefg30
df1cdca0dc Add die4 and "fix" ExplosionDeath 2015-07-19 11:30:15 +02:00
abcdefg30
4cf045bdd8 Fix TS death animation palettes 2015-07-19 11:30:14 +02:00
abcdefg30
1518dc9145 Support multiple WithDeathAnimation traits 2015-07-19 11:30:13 +02:00
Zimmermann Gyula
40f116a452 Remove Outtakes (the blooper song) from C&C. 2015-07-19 11:28:31 +02:00
Oliver Brakmann
d5c65b59b0 Fix scripted paradrops
A recent PR changed ParaDrop from an Effect to an Activity. Idle triggers in the mission scripts however have already queued activities for the paradropped units, so the ParaDrop activity would only run once the first activity had finished (which could never happen).
2015-07-18 21:22:40 +02:00
abcdefg30
3e7134ae6b Fix bogus paradropping in survival01 2015-07-18 21:22:39 +02:00
abcdefg30
df02604a9a Fix WithParachute on ^Vehicle 2015-07-18 21:22:39 +02:00
abcdefg30
ef6da3d0b3 Replace the default value of ShadowPalette with "shadow". 2015-07-18 21:22:38 +02:00
Oliver Brakmann
c8a258faa0 Merge pull request #8683 from Mailaender/serverbrowser-color
Fixed hard-coded and hard to read colors in ServerBrowser
2015-07-18 18:26:12 +02:00
reaperrr
abec89fa26 Replaced RenderGunboat with WithGunboatBody
Based on WithSpriteBody.
2015-07-18 18:21:10 +02:00
Matthias Mailänder
d174d0065e choose a color with better contrast against background 2015-07-18 17:23:45 +02:00
Matthias Mailänder
860bfdadc4 extract server browser colors to configurable yaml 2015-07-18 17:22:39 +02:00
David Jiménez
5109848215 Changes to improve understandability of code 2015-07-18 15:05:12 +02:00
Paul Chote
17308c7643 Merge pull request #8690 from Mailaender/sdl2-cs-upstream
Updated SDL2-CS to use current upstream version
2015-07-18 12:35:30 +01:00
Paul Chote
bea021a069 Merge pull request #8729 from RoosterDragon/alloc-reductions
Reduce allocations
2015-07-18 12:28:07 +01:00
Paul Chote
794c317687 Unhardcode BuildableTerrainLayer palette. 2015-07-18 12:14:23 +01:00
Paul Chote
ce4bdced47 Use a TerrainSpriteLayer for smudges. 2015-07-18 12:14:23 +01:00
Paul Chote
fe41ee0346 Clean up SmudgeLayer init. 2015-07-18 12:14:23 +01:00
Paul Chote
bf08bbc357 Use a TerrainSpriteLayer for buildable terrain. 2015-07-18 12:14:22 +01:00
Paul Chote
1f0f8c953b Use TerrainSpriteLayers for editor resources. 2015-07-18 12:14:13 +01:00
Matthias Mailänder
60792abad8 Merge pull request #8737 from atlimit8/FixQuickReloadTimeMultiplierReloadDelayMultiplier
Fix quick ReloadTimeMultiplier => ReloadDelayMultiplier rename
2015-07-18 08:13:37 +02:00
atlimit8
ef955c4b5a Fix quick ReloadTimeMultiplier => ReloadDelayMultiplier rename 2015-07-17 22:45:13 -05:00
reaperrr
0b0fe3ca20 Merge pull request #8732 from Phrohdoh/polish#unhardcode-bullet
Unhardcode some things in Bullet.
2015-07-17 02:42:58 +02:00
Taryn Hill
847ce0d3a7 Add some descriptions to BulletInfo. Unhardcode a sequence and a palette in Bullet. 2015-07-16 19:19:28 -05:00
Taryn Hill
b8973cd5e7 Add some newlines to BulletInfo for readability. 2015-07-16 19:10:43 -05:00
Zimmermann Gyula
2de5bbe02b Restore the original setup of the menu and score musics in the D2k mod. 2015-07-16 16:56:04 +02:00
RoosterDragon
ccad451060 Add WorldRenderer.ScreenVectorComponents.
This allows the components to be returned via out parameters, avoiding the need to allocate an array for most callers.
2015-07-15 21:24:01 +01:00
RoosterDragon
92389916a6 Cache the simpler delegates used in IShader.Render calls. 2015-07-15 21:09:11 +01:00
RoosterDragon
3a0eb5554e Provide HasStance extension method for Stance enum, to avoid overhead of HasFlag method. 2015-07-15 20:40:38 +01:00
RoosterDragon
6113892276 Cache rotation matrices used by WorldRenderer.DrawRangeCircle. 2015-07-15 20:40:36 +01:00
RoosterDragon
7dc654a5ad Cache Orders in Passenger to avoid several repeated allocations when orders must be determined. 2015-07-15 20:40:35 +01:00
RoosterDragon
218712f5d3 Avoid allocating a compiler generated enumerator in WithDecoration.Render. 2015-07-15 20:40:35 +01:00
Oliver Brakmann
1d9c6251c0 Merge pull request #8658 from matija-hustic/higher_level_timed_upgrades
Higher level timed upgrades
2015-07-15 20:51:51 +02:00
Oliver Brakmann
98c2870cf1 Merge pull request #8716 from penev92/bleed_fixLaunch
Explicitly set current working directory
2015-07-15 18:24:29 +02:00
Oliver Brakmann
2f82c2f9dc Merge pull request #8713 from deniz1a/server-filter
Fixes Empty filter in server browser.
2015-07-15 18:15:18 +02:00
abcdefg30
8236673939 Merge pull request #8718 from penev92/bleed_renamePlayer
Rename Country to Faction in Player.cs
2015-07-15 12:53:41 +02:00
abcdefg30
c50c9a2427 Merge pull request #8719 from matija-hustic/paradrop_regression_fix
Fixes D2K not finding paratrooper shadow sequence
2015-07-15 12:29:26 +02:00
Matija Hustić
25ce915a0c Fixes D2K regression due to unspecified sprite file name. 2015-07-15 10:32:42 +01:00
penev92
479eb307d6 Remove unused parameter from Player's constructor 2015-07-15 04:58:50 +03:00
penev92
317576a9bb Touch up Player.cs 2015-07-15 04:22:57 +03:00
penev92
b8aa92c4be Rename Player.DisplayCountry to Player.DisplayFaction 2015-07-15 04:10:13 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
penev92
fb0b60dddf Explicitly set current working directory
Avoids issues when launching the game from a URL
2015-07-15 00:32:04 +03:00
Oliver Brakmann
2e1c1533a5 Merge pull request #8339 from matija-hustic/paradrop_activity
Step in the direction of RA2 paratroopers
2015-07-14 22:29:02 +02:00
Oliver Brakmann
c8c564fac5 Merge pull request #8714 from matija-hustic/spy_veterancy_leftovers
Spy veterancy leftovers
2015-07-14 22:17:11 +02:00
Matija Hustić
2f01c389cf Manually upgraded YAMLs. 2015-07-14 20:39:09 +01:00
Matija Hustić
71d73ac738 Automatically upgraded YAMLs. 2015-07-14 20:39:08 +01:00
Matija Hustić
72e8e08f48 Step in the direction of RA2 paratroopers. 2015-07-14 20:39:06 +01:00
Oliver Brakmann
f7327418e4 Merge pull request #8712 from Phrohdoh/fix#rename-pwl
Rename ProduceableWithLevel to ProducibleWithLevel.
2015-07-14 21:22:57 +02:00
Matija Hustić
881f24c1cc Rank+1 displays only on levelup. 2015-07-14 20:14:25 +01:00
Oliver Brakmann
2a248471a9 Merge pull request #8715 from abcdefg30/ownerrow
Remove OwnerRow from explosive barrels
2015-07-14 21:14:00 +02:00
abcdefg30
5ddf94e624 HIJACKER can not be build by allies 2015-07-14 21:12:41 +02:00
abcdefg30
384a67def5 Add different difficulties to allies02 2015-07-14 21:12:40 +02:00
abcdefg30
4556a6ebb3 Adjust the objectives in allies02 2015-07-14 21:12:40 +02:00
abcdefg30
958d839802 Remove Ukraine from allies02 2015-07-14 21:12:39 +02:00
Matija Hustić
0a1a53bb4b Disables veterancy when infiltrating war factory in Allies05. 2015-07-14 20:11:34 +01:00
Oliver Brakmann
380cf22477 Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
2015-07-14 21:05:52 +02:00
Oliver Brakmann
4ed7a4ce8a Merge pull request #8659 from penev92/bleed_playerReference
Rename PlayerReference.Race to Faction
2015-07-14 20:15:56 +02:00
abcdefg30
a273e2fc99 Remove OwnerRow from explosive barrels 2015-07-14 19:16:03 +02:00
penev92
0e871a4b6b Touch up CheckSequences.cs 2015-07-14 18:50:46 +03:00
penev92
830b7eee70 Touch up CheckPlayers.cs 2015-07-14 18:50:44 +03:00
penev92
0f0497b74d Add an upgrade rule for Country -> Faction 2015-07-14 18:50:41 +03:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
penev92
a1af5386e0 Rename the Country trait to Faction 2015-07-14 18:50:31 +03:00
deniz1a
a4d77a42d5 Fixes Empty filter in server browser.
Now, Waiting doesn't filter empty servers.
2015-07-14 10:51:21 +03:00
Matija Hustić
b2a26c57bc Adjusted other users of timed upgrades. 2015-07-14 03:08:48 +01:00
Taryn Hill
a3d740aa44 Rename ProduceableWithLevel to ProducibleWithLevel. 2015-07-13 21:04:26 -05:00
Matija Hustić
6f54fe7e5d Upgrade granting warheads register as sources. 2015-07-14 02:54:42 +01:00
Matija Hustić
58472bf090 Timed upgrades track sources. 2015-07-14 02:54:40 +01:00
Oliver Brakmann
b58d1037ea Merge pull request #8666 from GraionDilach/revert-emp-targeting
Reverted friendly units' immunity to EMP.
2015-07-13 22:24:08 +02:00
Oliver Brakmann
9415ced6ff Merge pull request #8664 from Mailaender/unduplicate-mobile
Removed code duplication from Mobile.cs
2015-07-13 22:17:37 +02:00
Oliver Brakmann
9722502a4b Merge pull request #8710 from GraionDilach/victory-music
Implements victory and defeat music.
2015-07-13 22:01:20 +02:00
Oliver Brakmann
8f48065176 Merge pull request #8708 from reaperrr/harv-caching
Improved caching in harvester activities
2015-07-13 17:43:39 +02:00
abcdefg30
a70e66f3fd Merge pull request #8572 from atlimit8/MultiplierTraits
Added multiplier modifier traits, removing GainsStatUpgrades, InvulnerabilityUpgrade, & Invulnerable.
2015-07-13 16:58:30 +02:00
atlimit8
daec860192 Added multiplier modifier traits, removing GainsStatUpgrades, InvulnerabilityUpgrade, & Invulnerable. 2015-07-13 09:24:50 -05:00
abcdefg30
b4031c6e9b Merge pull request #8703 from atlimit8/RequireInMiniYaml
Require trait properties in MiniYaml
2015-07-13 15:50:06 +02:00
Zimmermann Gyula
64e8d53541 List and add the previously unlisted tracks to the C&C mod. 2015-07-13 15:42:21 +02:00
Zimmermann Gyula
57e684d1d9 Implements victory and defeat music. 2015-07-13 15:42:13 +02:00
abcdefg30
ea5ef1c500 Merge pull request #8662 from atlimit8/UpgradableTargetableUnit
Upgradable TargetableUnit & apply to Allies 03
2015-07-13 15:40:28 +02:00
atlimit8
acc4b307b6 Allies 03 Cloak->TargetableUnit 2015-07-13 08:13:51 -05:00
abcdefg30
4297d06ba3 Merge pull request #8701 from obrakmann/fix8591_bldg-placement-nre
Fix an NRE during building placement under rare circumstances
2015-07-13 14:24:53 +02:00
abcdefg30
db4f1ad025 Merge pull request #8663 from Mailaender/disguise-stand2-crash
Fixed a crash when disguising the spy as infantry without stand2
2015-07-13 13:39:19 +02:00
abcdefg30
ce9b818600 Merge pull request #8684 from Mailaender/globalpalette-effect-lua
Exposed GlobalPaletteEffect to the Lua API for day/night cycles
2015-07-13 13:20:37 +02:00
abcdefg30
d35eb48612 Merge pull request #8688 from Phrohdoh/unhardcode-placebuilding
Unhardcode sound and delay in PlaceBuilding.
2015-07-13 12:50:42 +02:00
atlimit8
9905f217ef Make TargetableUnit upgradable 2015-07-12 19:41:29 -05:00
reaperrr
0ef5312931 Minor cosmetic cleanups for Harvester and BasePathSearch 2015-07-12 23:36:59 +02:00
reaperrr
ba2181e523 Make delay for re-checking for available refinery customisable and increase default 2015-07-12 23:36:58 +02:00
reaperrr
8fdeb04569 Extract HarvestResource into own file and cache trait lookups in
constructor
2015-07-12 23:36:57 +02:00
reaperrr
c8661ca2f9 Cache FindResources trait lookups in constructor 2015-07-12 23:36:56 +02:00
Zimmermann Gyula
b1de45bdcd Reverted friendly units' immunity to EMP and the explicit enemy vehicle targeting. 2015-07-12 23:04:15 +02:00
reaperrr
8253573ced Cache lookups in DeliverResources constructor
Only re-check for refinery every 5 seconds instead of every second.
2015-07-12 22:36:24 +02:00
Matthias Mailänder
41b488779a fix crash when disguising the spy as infantry without stand2 2015-07-12 22:20:52 +02:00
Matthias Mailänder
9ec2b8aac0 simulate dawn on the Dune 2000 shellmap 2015-07-12 22:13:40 +02:00
Matthias Mailänder
25d14d87e1 add Effect.ChangeLighting(red, green, blue, ambient) to Lua API 2015-07-12 22:12:38 +02:00
atlimit8
429a9380e8 Ignore trait property requirements for abstract actor types 2015-07-12 12:44:30 -05:00
atlimit8
1bcc07ce69 Add property requirements to safe traits 2015-07-12 12:44:30 -05:00
atlimit8
7881ff40bf Added FieldLoader.SerializeAttribute.Required to require fields in MiniYaml 2015-07-12 12:44:22 -05:00
reaperrr
27c6f5d6d6 Cached Mobile in constructor
...and removed redundant 'var harv'.
2015-07-12 19:19:32 +02:00
Oliver Brakmann
2fe98905a0 Merge pull request #8562 from GraionDilach/music-refactor
Refactors the music player.
2015-07-12 17:45:08 +02:00
Zimmermann Gyula
32c29e7dd6 Removes the MapMusic checkbox. 2015-07-12 17:27:12 +02:00
Zimmermann Gyula
e875f675b8 Updates all base mods with the MusicPlaylist trait. 2015-07-12 17:27:11 +02:00
Zimmermann Gyula
60fafaa5a7 Refactors the music player. 2015-07-12 17:27:02 +02:00
Matthias Mailänder
f5d7df621f Merge pull request #8698 from atlimit8/GainsExperienceDefaultsToMiniYaml
Make GainsExperience upgrades explicit in MiniYaml.
2015-07-11 17:12:15 +02:00
Oliver Brakmann
dd89aa1d48 Fix an NRE during building placement under rare circumstances
Happens when the last conyard vanishes at the same time a building
is picked up for placement.
2015-07-11 11:50:52 +02:00
atlimit8
5513030627 Make GainsExperience upgrades explicit. 2015-07-09 23:54:11 -05:00
Oliver Brakmann
bd12a742f1 Merge pull request #8691 from Mailaender/wrange-renamings
Renamed WRange to WDist in the Lua API and documentation
2015-07-09 23:03:45 +02:00
Matthias Mailänder
56e9bcd96e rename RangeSquard to LengthSquared 2015-07-09 21:16:01 +02:00
Matthias Mailänder
cae889fb67 leave a warning for thirdparty scripters 2015-07-09 21:15:57 +02:00
Taryn Hill
c1abc0dfbb Unhardcode sound and delay in PlaceBuilding. 2015-07-09 13:52:42 -05:00
Oliver Brakmann
4792ff336b Merge pull request #8674 from reaperrr/rem-initact
Removed InitialActivity from FreeActor and Buildable
2015-07-09 18:47:13 +02:00
abcdefg30
0835504c53 Merge pull request #8686 from Mailaender/ts-debris
Added debris to Tiberian Sun
2015-07-09 17:09:04 +02:00
abcdefg30
cb7df540c4 Merge pull request #8682 from Mailaender/abomb-activation-crash
Fixed a crash when activating a nuke during sudden powerdown
2015-07-09 13:24:01 +02:00
Matthias Mailänder
95b7da904c add debris to Tiberian Sun 2015-07-09 13:07:49 +02:00
Matthias Mailänder
ec9f0a4634 move ThrowsShrapnel to Mods.Commons 2015-07-09 13:07:49 +02:00
Matthias Mailänder
43ddf14998 rename internal API for consistency 2015-07-09 12:41:52 +02:00
Matthias Mailänder
8d8d7ab8ea rename WRange to WDist in documentation 2015-07-09 12:36:29 +02:00
Matthias Mailänder
ff7fe2bab5 rename WRange to WDist in the Lua API 2015-07-09 12:36:15 +02:00
Matthias Mailänder
31892dd104 fix copy paste error 2015-07-09 12:32:03 +02:00
Pavel Penev
559d6cb84b Merge pull request #8667 from Mailaender/wdist
Renamed WRange to WDist
2015-07-09 13:15:51 +03:00
Matthias Mailänder
ee7ccf10e8 update auto-documentation 2015-07-09 10:56:59 +02:00
Matthias Mailänder
413baf9d8b rename WDist.Range to WDist.Length 2015-07-09 10:55:38 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00
Matthias Mailänder
a91d43d7ce update SDL2-CS 2015-07-09 10:03:39 +02:00
Pavel Penev
54e1cf866c Merge pull request #8681 from Mailaender/gdi-upgrade-center-prereq
Fixed GDI upgrade center being visible in Nod build palette
2015-07-08 12:46:11 +03:00
Matthias Mailänder
d0bbe7da0d don't crash when it becomes disabled after activation 2015-07-08 10:00:40 +02:00
Matthias Mailänder
d9bda311ce fix GDI upgrade center being visible in Nod build palette 2015-07-08 09:54:29 +02:00
reaperrr
a29516656f Upgrade rule for InitialActivity removal 2015-07-08 02:14:45 +02:00
reaperrr
1baae6653c Remove InitialActivity 2015-07-08 02:14:44 +02:00
Matthias Mailänder
efe5ac26b9 Merge pull request #8679 from reaperrr/ai-tweaks1
Added configurable MinimumExcessPower to HackyAI
2015-07-07 23:48:48 +02:00
reaperrr
27ffd4967a AI base builder power tweaks 2015-07-07 22:22:59 +02:00
reaperrr
9594dd7e30 RA AI cleanups 2015-07-07 22:14:30 +02:00
reaperrr
bbf9596530 Merge pull request #8635 from penev92/bleed_warheads
Move Warheads from the engine to Mods.Common
2015-07-07 18:32:45 +02:00
Paul Chote
08c6f02b9e Merge pull request #8656 from Mailaender/credit-active-devs
Updated the list of active developers participating in maintenance and code review
2015-07-07 09:00:16 +01:00
Pavel Penev
69c49c0139 Merge pull request #8669 from RoosterDragon/settings-safe-load
Ensure FieldLoader is left in its original state when loading Settings
2015-07-06 23:24:20 +03:00
Pavel Penev
939ba67642 Merge pull request #8649 from pchote/resource-layer
Render resources using TerrainSpriteLayers
2015-07-06 22:54:29 +03:00
Paul Chote
d2b7d42cca Use TerrainSpriteLayer for rendering resources. 2015-07-06 20:36:29 +01:00
penev92
c3fcd9a8a1 Some cleanups 2015-07-06 22:24:50 +03:00
penev92
41cdc57ea5 Fix traits implementing INotifyKilled 2015-07-06 22:24:41 +03:00
penev92
351cf254e7 Fix DamageModifiers 2015-07-06 22:24:30 +03:00
penev92
fe94b7686e Introduce IWarhead and move Warhead to Mods.Common 2015-07-06 22:24:20 +03:00
Paul Chote
971d1c1388 Fix a NRE in TerrainSpriteLayer. 2015-07-06 19:54:44 +01:00
Paul Chote
7c0d3f4e40 Use a HashSet for ResourceLayer dirty cells. 2015-07-06 19:54:44 +01:00
Paul Chote
f93ad2a9c1 Expose TerrainSpriteLayer.Sheet and BlendMode. 2015-07-06 19:54:43 +01:00
Paul Chote
ae0d9c0e7d Move ResourceLayer init into the constructor.
Stylecop rules force renaming content and render.
2015-07-06 19:54:43 +01:00
RoosterDragon
101eadf345 Ensure FieldLoader is left in its original state when loading Settings. 2015-07-06 19:10:20 +01:00
Pavel Penev
53f00a7930 Merge pull request #8665 from Mailaender/warhead-duplication
Removed unused duplicated code in Warhead.cs
2015-07-06 12:09:36 +03:00
Matthias Mailänder
3f38d063a9 remove code duplication 2015-07-06 11:06:55 +02:00
Matthias Mailänder
5b122eae6c remove unused duplicated code 2015-07-06 10:58:34 +02:00
Matthias Mailänder
4acb096416 Merge pull request #8210 from matija-hustic/ra2_veterancy_icon
Veteran unit production & unlocking through spies.
2015-07-06 09:38:09 +02:00
Matthias Mailänder
d9ac97a967 Merge pull request #8660 from penev92/bleed_fixServer
Fix a bug in Server
2015-07-06 08:53:02 +02:00
penev92
0648b7edaa Fix a bug in Server 2015-07-06 00:59:30 +03:00
Pavel Penev
f221a70e40 Merge pull request #8652 from Mailaender/custom-rule-warning
Added a warning about custom game rules
2015-07-06 00:32:44 +03:00
penev92
6fc9abe599 Upgrade TS maps 2015-07-06 00:17:08 +03:00
Matija Hustić
27e95eaa59 TS Upgrade YAMLs. 2015-07-05 22:15:54 +01:00
penev92
7873a326cd Upgrade RA maps 2015-07-06 00:05:07 +03:00
penev92
8ecc6ffbf6 Upgrade TD maps 2015-07-05 23:55:36 +03:00
penev92
624002be63 Upgrade D2k maps 2015-07-05 23:50:05 +03:00
penev92
bbb162190f Add an upgrade rule 2015-07-05 23:49:26 +03:00
penev92
1d49c23af0 Rename PlayerReference.Race and LockRace to Faction and LockFaction 2015-07-05 23:08:49 +03:00
Matthias Mailänder
1c36f20009 update the active developers list 2015-07-05 21:32:27 +02:00
Oliver Brakmann
c899606a6f Merge pull request #7872 from Mailaender/storm-effects
Unified FlashPaletteEffect and exposed it to Lua
2015-07-05 21:08:04 +02:00
Matthias Mailänder
5378b6225c unhardcode and increase the exit delay 2015-07-05 20:50:31 +02:00
Oliver Brakmann
5fffd9e0dd Merge pull request #8435 from Mailaender/resharper
Added ReShaper dupFinder scans
2015-07-05 20:10:32 +02:00
Matthias Mailänder
b61dcbdf76 Merge pull request #8417 from abcdefg30/newlua_disguise
Added DisguiseAs and DisguiseAsType functions to lua
2015-07-05 20:04:00 +02:00
Pavel Penev
b4c1625f1c Merge pull request #8653 from abcdefg30/botsettings
Fix Team set in PlayerReference being ignored for unplayable players
2015-07-05 20:44:41 +03:00
abcdefg30
85345d83c6 Add teams to fort lonestar 2015-07-05 19:32:56 +02:00
abcdefg30
cc03e64b37 Fix Team set in PlayerReference being ignored for unplayable players 2015-07-05 19:32:48 +02:00
Pavel Penev
da3bf9bf8d Merge pull request #8654 from pchote/max-terrain-height
Move maximum terrain height definition to mod.yaml.
2015-07-05 20:31:47 +03:00
Matthias Mailänder
3b03abc4e3 scan for duplicates 2015-07-05 19:07:42 +02:00
Paul Chote
19c777a922 Move maximum terrain height definition to mod.yaml. 2015-07-05 17:49:56 +01:00
abcdefg30
6afc6a879e Update the ActorInfo summary 2015-07-05 18:43:10 +02:00
abcdefg30
d72fd39d61 Make use of the new DisguiseAsType function in allies05a
and remove the cloak hack
2015-07-05 18:43:09 +02:00
abcdefg30
20ac129433 Add DisguiseAs and DisguiseAsType functions to lua 2015-07-05 18:43:08 +02:00
Matthias Mailänder
e957ae37df Merge pull request #8528 from clemty/upstream/scriptfix
TD mission script fixes
2015-07-05 18:41:10 +02:00
Matthias Mailänder
f6ae27b4b7 add thunderstorm effects to fort lonestar 2015-07-05 18:15:29 +02:00
Matthias Mailänder
ed7b54a21e add a Lua controllable flash palette trait 2015-07-05 18:15:12 +02:00
Matthias Mailänder
a0c3a3adaa sort globals alphabetically 2015-07-05 18:14:05 +02:00
Matthias Mailänder
1eeedf9bb4 radar LightPaletteRotator is actually RA95 exclusive 2015-07-05 18:07:11 +02:00
Matthias Mailänder
2768fc88e7 stop all sounds on map change 2015-07-05 18:07:11 +02:00
Matthias Mailänder
06f92c5b94 add sound file playing to the Lua API 2015-07-05 18:07:11 +02:00
Matthias Mailänder
24444d4af3 fix a crash in AmbientSound 2015-07-05 18:07:11 +02:00
Oliver Brakmann
54c2db3804 Merge pull request #8629 from penev92/bleed_serverLog
Touch up Server.cs
2015-07-05 17:51:21 +02:00
penev92
907265a64c Random refactoring and beautifying of Server.cs 2015-07-05 18:39:13 +03:00
penev92
502db0b462 Add logging on exception to Server.ValidateClient() 2015-07-05 18:39:10 +03:00
Matthias Mailänder
e86ff94a20 don't display game join notifications during missions 2015-07-05 17:17:14 +02:00
Matthias Mailänder
8c92839e0b warn about custom rules 2015-07-05 17:16:43 +02:00
Pavel Penev
3a3d628947 Merge pull request #8625 from RoosterDragon/type-dict-refactor
Refactor TypeDictionary
2015-07-05 17:56:09 +03:00
Pavel Penev
1ed4d55363 Merge pull request #8624 from RoosterDragon/hotkey-perf
Improve hotkey resolution performance
2015-07-05 17:39:54 +03:00
Oliver Brakmann
a753a114a0 Merge pull request #8645 from Mailaender/fieldloader-nre-coverity
Fixed missing null checks in FieldLoader
2015-07-05 16:25:39 +02:00
Pavel Penev
bf7a96d6de Merge pull request #8650 from pchote/editor-overlay
Render the terrain geometry over all visible terrain.
2015-07-05 17:14:38 +03:00
Pavel Penev
e9ccceec8f Merge pull request #8639 from pchote/projected-bounds
A few map / bounds cleanups.
2015-07-05 17:08:58 +03:00
Paul Chote
7d62ac2b12 Merge RulesetCache.LoadDefaultRules and LoadMapRules. 2015-07-05 14:58:00 +01:00
Paul Chote
86bf9086d9 Rename WorldRenderer.Position -> ProjectedPosition. 2015-07-05 14:57:59 +01:00
Paul Chote
e10cb5cd9c Fix an incorrect coordinate check. 2015-07-05 14:57:59 +01:00
Paul Chote
26ce7b5e1c Fix incorrect uses of Map.Bounds. 2015-07-05 14:57:58 +01:00
Paul Chote
b8b27f11af Remove stub map constructor. 2015-07-05 14:57:58 +01:00
Paul Chote
0dbbc00d0a Simplify editor/importer map creation. 2015-07-05 14:57:58 +01:00
Paul Chote
41fa77d12a Fix projected world coordinate calculation for Lua API. 2015-07-05 14:57:58 +01:00
Paul Chote
78838c715a Render the terrain geometry over all visible terrain. 2015-07-05 14:52:38 +01:00
Pavel Penev
f05b71ada2 Merge pull request #8642 from reaperrr/fix-lst
Added separate CloseSequence to WithLandingCraftAnimation
2015-07-05 14:55:51 +03:00
Pavel Penev
5187a958ff Merge pull request #8646 from pchote/radar-cleanup
Remove unused/duplicated minimap code.
2015-07-05 14:48:05 +03:00
Oliver Brakmann
3746c0e295 Merge pull request #8648 from Mailaender/coverity-mail
Changed the Coverity results contact to a mailing list
2015-07-05 13:43:06 +02:00
Matthias Mailänder
c4ba78e73b change the Coverity results address to a mailing list 2015-07-05 13:36:04 +02:00
Oliver Brakmann
ae4759ac4b Merge pull request #8637 from suvjunmd/utility
Updated the utility
2015-07-05 13:33:49 +02:00
Pavel Penev
7918181442 Merge pull request #8641 from suvjunmd/dps
Added exception handling to ExportCharacterSeparatedRules
2015-07-05 14:26:08 +03:00
Pavel Penev
0574843b58 Merge pull request #8643 from reaperrr/crate-select
Removed bogus Selectable from RA crate
2015-07-05 14:25:05 +03:00
Pavel Penev
89d17f0a96 Merge pull request #8644 from Mailaender/upgrade-rule-nesting
Fixed missing braces breaking the upgrade rules
2015-07-05 13:29:34 +03:00
Paul Chote
7a4c461692 Remove unused code from Minimap.cs. 2015-07-05 11:15:14 +01:00
Paul Chote
f1e6f01e44 Use the standard radar shroud updating when switching to observer. 2015-07-05 11:14:59 +01:00
Matthias Mailänder
aab6d6d170 add addititional value null checks 2015-07-05 08:47:05 +02:00
Matthias Mailänder
5549bab073 fix nesting level does not match indentation 2015-07-05 08:30:15 +02:00
Dmitri Suvorov
d625cbe1de Updated commands layout 2015-07-05 02:38:09 +03:00
Dmitri Suvorov
2bc6bd74be Display commands in alphabetical order 2015-07-05 02:37:55 +03:00
Dmitri Suvorov
0457e58fe9 Added exception handling to ExportCharacterSeparatedRules 2015-07-05 02:32:24 +03:00
reaperrr
b8014b7d4d Increased CustomSelectionSize of crates to make them easier to target 2015-07-05 00:48:54 +02:00
reaperrr
9af2dcfaba Removed Selectable from RA ^Crate default 2015-07-05 00:47:50 +02:00
reaperrr
26a202600d Make WithAttackAnimation work with WithSpriteBody as well 2015-07-05 00:17:01 +02:00
reaperrr
8ae541339b Make WithMoveAnimation work with WithSpriteBody as well 2015-07-05 00:09:46 +02:00
reaperrr
632d8cd898 Allow setting separate close sequence for landing crafts 2015-07-05 00:09:15 +02:00
Matija Hustić
fe2c0b3b08 RA Upgrade YAMLs. 2015-07-04 22:25:13 +01:00
unknown
206ed8ebb8 Veteran unit production & unlocking through spies. 2015-07-04 22:25:12 +01:00
abcdefg30
a77e0782cf Merge pull request #8640 from Mailaender/unarmed-delphi
Fixed Warning: Sprite image delphi from actor DELPHI does not define sequence shoot
2015-07-04 23:23:14 +02:00
Matthias Mailänder
87a847b4e9 DELPHI is actually unarmed 2015-07-04 22:47:01 +02:00
Pavel Penev
8ee26738a9 Merge pull request #8553 from reaperrr/rem-renderunit
Removed RenderHarvester, RenderLandingCraft and RenderUnit
2015-07-04 23:23:06 +03:00
reaperrr
2be06e610a Removed RenderUnit
Used this opportunity to unhardcode several sandworm-related sequences.
2015-07-04 22:08:07 +02:00
reaperrr
76aaafe37c Added WithHarvestAnimation + WithDockingAnimation
Removed RenderHarvester.
2015-07-04 22:08:06 +02:00
reaperrr
de72db83db Added WithLandingCraftAnimation and removed RenderLandingCraft 2015-07-04 22:08:05 +02:00
reaperrr
1abe7ab2dc Renamed WithHarvestAnimation to WithHarvestOverlay 2015-07-04 22:08:04 +02:00
reaperrr
cd6c96db82 Fixed WithAttackAnimation namespace 2015-07-04 22:08:03 +02:00
Pavel Penev
a871a28ece Merge pull request #8527 from pchote/split-vis-origins
Introduce new options for shroud visibility and revealing.
2015-07-04 23:00:42 +03:00
Matthias Mailänder
3cb4ac49e9 Merge pull request #8634 from obrakmann/fix-allies01-lua-crash
Fix issues with civilian infantry in RA
2015-07-04 21:48:56 +02:00
clemty
26c271f80d TD: various map and script fixes 2015-07-04 19:05:46 +02:00
Paul Chote
e87e8ae632 Add a lint rule for VisibilityType. 2015-07-04 17:07:08 +01:00
Paul Chote
6bc4fae084 Upgrade RA rules. 2015-07-04 17:07:07 +01:00
Paul Chote
250481657e Upgrade TD rules. 2015-07-04 17:07:07 +01:00
Paul Chote
abdd6ca1d7 Upgrade D2K rules. 2015-07-04 17:07:06 +01:00
Paul Chote
0ac64da55a Upgrade TS rules. 2015-07-04 17:07:06 +01:00
Paul Chote
0bbfeb5653 Add upgrade rules. 2015-07-04 17:07:06 +01:00
Paul Chote
8206c3c453 Enable VisibilityType for shroud revealing.
VisibilityType.Footprint reveals from each footprint cell.

VisibilityType.CenterPosition reveals from the
actor’s CenterPosition only (as the original
games did).
2015-07-04 17:07:05 +01:00
Dmitri Suvorov
6e4ab810d8 Fixed multiple enumeration of IEnumerable 2015-07-04 18:22:28 +03:00
Oliver Brakmann
3b79f7b64b Fix Lua script crash in Allies01 2015-07-04 17:21:41 +02:00
Dmitri Suvorov
ad97fe850f Removed redundant using 2015-07-04 18:18:11 +03:00
Dmitri Suvorov
88ffa3836e Removed unused method GetNamedArg 2015-07-04 18:16:31 +03:00
Paul Chote
7053e59acb Expose a parameter for reveal behaviour.
VisibilityType.CenterPosition reveals the actor
only if its CenterPosition is inside a cell that
is visible.

VisibilityType.Footprint reveals the actor if any
of its footprint cells are visible (this includes
Mobile actors moving between two cells).
2015-07-04 16:14:47 +01:00
Oliver Brakmann
27f492b793 Merge pull request #8631 from Mailaender/parseyesno-nre
Fixed a null reference exception in FieldLoader.ParseYesNo
2015-07-04 15:36:47 +02:00
Oliver Brakmann
51f05f2f2e Fix wrong attack sequence being used for civilian infantry 2015-07-04 15:29:39 +02:00
Matthias Mailänder
10d76da61b fix a null reference exception 2015-07-04 09:43:31 +02:00
Paul Chote
af6f1ef675 Merge pull request #8628 from GraionDilach/fix-ps1
Fix make.ps1.
2015-07-03 23:13:05 +01:00
Zimmermann Gyula
c111836ae3 Fix make.ps1. 2015-07-04 00:09:37 +02:00
RoosterDragon
54e7c0bf44 Refactor TypeDictionary.
- When removing entries, ensure the dictionary entry is removed is the list is emptied, to prevent incorrect lookups later.
- Prevent NRE when calling GetOrDefault<T> where T is a value type and the default is returned.
- Use a single dictionary for simplicity and improved lookup performance (since there is only one dictionary to check).
- De-duplicate code in Get and GetOrDefault.
2015-07-03 20:54:34 +01:00
RoosterDragon
3f39744a9a Create delegates to access hotkeys, to avoid reflection during gameplay. 2015-07-03 20:28:47 +01:00
Paul Chote
5056e7bfc3 Merge pull request #8460 from Mailaender/make-debug
Enabled and documented DEBUG option on Unix startup scripts
2015-07-03 19:10:24 +01:00
Pavel Penev
00b2f0a4b5 Merge pull request #8581 from GraionDilach/emp-sparkles
Enable the EMP overlay animation in TS.
2015-07-03 20:14:40 +03:00
Paul Chote
d3c193e199 Merge pull request #8610 from Mailaender/hotkey-tryparse-nre
Fixed a possible NRE in Hotkey.TryParse
2015-07-03 17:10:55 +01:00
Zimmermann Gyula
4933a88c64 Enable the EMP overlay animation in TS. 2015-07-03 18:05:23 +02:00
Pavel Penev
fc5e5022d5 Merge pull request #8614 from abcdefg30/newlua_capture
Added a Capture function to lua
2015-07-03 02:50:15 +03:00
Pavel Penev
52c1d8b242 Merge pull request #8618 from RoosterDragon/color-widget-red-fix
Generate the selection bitmap when opening the ColorMixerWidget
2015-07-03 02:44:00 +03:00
Pavel Penev
cf137fafec Merge pull request #8615 from abcdefg30/soviet05fix
Fix a crash in soviet05
2015-07-03 02:07:54 +03:00
Pavel Penev
082b1ab1c9 Merge pull request #8558 from GraionDilach/grantupgrade-warhead-checkvalidity
Add target validation to GrantUpgrade warheads.
2015-07-02 23:34:28 +03:00
Matthias Mailänder
a73edfd4a5 Merge pull request #8598 from abcdefg30/minigame
Adjust the minigames' lobby settings
2015-07-02 21:58:43 +02:00
abcdefg30
57cea5aba1 Added a Capture function to lua 2015-07-02 21:48:30 +02:00
Pavel Penev
fd5023abe3 Merge pull request #8621 from Mailaender/rm-mobileinfo-lookup
Fixed an unneccessary and frequent trait lookup
2015-07-02 22:46:19 +03:00
abcdefg30
5c721d4169 Fix the-hot-box lobby settings 2015-07-02 21:30:09 +02:00
abcdefg30
2cf9db271e Fix the lobby settings of all ra minigames 2015-07-02 21:30:08 +02:00
abcdefg30
7a6b823233 Fix the lobby settings of the dropzone maps 2015-07-02 21:06:06 +02:00
Matthias Mailänder
e86b8d0dde avoid an unneccessary and frequent trait lookup 2015-07-02 20:22:36 +02:00
Pavel Penev
13a909eb59 Merge pull request #8616 from Mailaender/counter-intel
Added counter intelligence to spies
2015-07-02 21:14:31 +03:00
Pavel Penev
08a890491b Merge pull request #8609 from Mailaender/bad-lock-2
Fixed another bad choice of lock objects in ColorMixerWidget
2015-07-02 21:12:46 +03:00
RoosterDragon
4c2b7469f9 Generate the selection bitmap when opening the ColorMixerWidget.
Fixes a bug where opening the widget with a red color (i.e. hue = 0) would not generate this bitmap when opening the widget as that would not cause the selection bitmap to be refreshed.
2015-07-02 17:32:08 +01:00
Matthias Mailänder
499667eab5 remove unnecessary lock object 2015-07-02 06:33:14 +02:00
Matthias Mailänder
c1b7a4d4ae add counter intelligence to spies 2015-07-01 22:59:57 +02:00
Matthias Mailänder
79d00b2b7c Merge pull request #8359 from abcdefg30/difficulty
Added two new difficulties to allies-05a
2015-07-01 22:03:31 +02:00
abcdefg30
a486ba9371 Fix a crash in soviet05 2015-07-01 19:10:26 +02:00
abcdefg30
ae955a2340 Added two new difficulties to allies-05a 2015-07-01 19:00:45 +02:00
abcdefg30
39a297d575 Add MustBeDestroyed: to FCOM 2015-07-01 18:59:45 +02:00
Matthias Mailänder
44bf3aed2e Merge pull request #8416 from abcdefg30/newlua_capture_infiltrate
Added an Infiltrate function to lua
2015-07-01 18:53:39 +02:00
abcdefg30
6a92212864 Make use of the new Infiltrate function in allies05a 2015-07-01 18:21:01 +02:00
abcdefg30
ea151542de Added an Infiltrate function to lua 2015-07-01 18:21:01 +02:00
Pavel Penev
faaa484956 Merge pull request #8611 from Mailaender/pngloader-nre-2
Fixed another null reference exception in PngLoader
2015-07-01 14:49:06 +03:00
reaperrr
2a998e4414 Merge pull request #8612 from Mailaender/muzzle-nre
Fixed possible NREs in WithMuzzleFlash
2015-06-30 23:07:24 +02:00
Matthias Mailänder
f431c14ab7 fix possible NREs 2015-06-30 22:36:52 +02:00
Matthias Mailänder
605f95294c fix a null reference exception 2015-06-30 22:31:11 +02:00
Matthias Mailänder
d6efab185d fix a null reference exception 2015-06-30 22:26:53 +02:00
Oliver Brakmann
0492d57439 Merge pull request #8607 from penev92/bleed_disposeWorld
Dispose of the old world before creating a new one
2015-06-30 19:25:59 +02:00
penev92
d2058fbcbc Dispose of the old world before creating a new one 2015-06-30 14:49:47 +03:00
Pavel Penev
ff2a5ef68b Merge pull request #8514 from reaperrr/clean-td-rules
Cleaned C&C yaml rules
2015-06-30 13:06:15 +03:00
Pavel Penev
923a6a6074 Merge pull request #8605 from chrisforbes/drop-inotify
Remove unused INotify interface
2015-06-30 12:27:22 +03:00
Chris Forbes
76b4d702e3 Remove unused INotify interface
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2015-06-30 15:11:50 +12:00
Pavel Penev
9ed9d746a1 Merge pull request #8516 from reaperrr/clean-d2k-rules
Cleaned up D2k yaml rules
2015-06-30 01:32:16 +03:00
Pavel Penev
b5799b9883 Merge pull request #8515 from reaperrr/clean-ra-rules
Cleaned RA yaml rules
2015-06-30 00:37:21 +03:00
Matthias Mailänder
6582a0e096 Merge pull request #8589 from obrakmann/fix8543_range-circles-in-replays
Make range circles visible to observers
2015-06-29 23:10:28 +02:00
Matthias Mailänder
fc34aa7e4f Merge pull request #8602 from suvjunmd/authors
Updated AUTHORS to include myself
2015-06-29 23:07:12 +02:00
Dmitri Suvorov
c0de0314ad Updated AUTHORS to include myself 2015-06-29 23:25:11 +03:00
reaperrr
450749f388 Fix Fort Lonestar and Monster Tank Madness 2015-06-29 22:18:54 +02:00
reaperrr
f9fc60a3be Cleaned RA yaml rules.
Sanitized defaults.
2015-06-29 22:15:15 +02:00
Oliver Brakmann
f9d584f891 Merge pull request #8585 from suvjunmd/install
Modified the text inside "Install Required" dialogs to be consistent across all mods
2015-06-29 20:57:01 +02:00
Oliver Brakmann
f8eb2fadf7 Merge pull request #8582 from Mailaender/hide-ui-hotkey
Added a hide UI hotkey
2015-06-29 20:16:40 +02:00
reaperrr
f0905c5fe2 Temporary fix for TD shellmap
Can be removed once "Requires<WithSpriteBody>" has been added to WithTurret (not possible until RenderBuilding has been replaced with With*Body, due to d2k & TS defense turrets).
2015-06-29 20:02:11 +02:00
reaperrr
1814c4c4cc Cleaned up TD yaml rules.
Streamlined defaults, removed duplications.
2015-06-29 20:02:10 +02:00
abcdefg30
699822cd51 Merge pull request #8590 from obrakmann/objectives-polish
Objectives polish
2015-06-29 18:52:34 +02:00
Oliver Brakmann
562d08dbd5 Merge pull request #8313 from Mailaender/appveyor-coverity
Automatized Coverity Scan with AppVeyor
2015-06-29 18:50:11 +02:00
Dmitri Suvorov
8ce5d208c2 Modified the text inside "Install Required" dialogs to be consistent across all mods 2015-06-29 19:23:49 +03:00
Oliver Brakmann
82221f780f Make range circles visible to observers 2015-06-29 18:11:52 +02:00
Oliver Brakmann
fc8a34a7a2 Match all kinds of spectators in Player::IsAlliedWith() 2015-06-29 18:11:52 +02:00
abcdefg30
ec892a7c16 Merge pull request #8594 from GraionDilach/fix-modchooser
Make modchooser's loadscreen consistent
2015-06-29 18:11:16 +02:00
Pavel Penev
6ed7e46162 Merge pull request #8398 from Mailaender/ping-order-nre
Fixed NREs in LobbyCommands PingFromClient
2015-06-29 01:55:54 +03:00
reaperrr
b193d5195d Cleaned up d2k yaml rules.
Sanitized defaults.
2015-06-29 00:45:38 +02:00
Zimmermann Gyula
6e8f3c6755 Fix modchooser. 2015-06-28 22:20:57 +02:00
Matthias Mailänder
f65df39e36 Merge pull request #8586 from atlimit8/UpgradeManagerAfterIUpgradables
UpgradeManager after IUpgradables
2015-06-28 20:41:28 +02:00
Matthias Mailänder
7616fd1a07 Merge pull request #8574 from reaperrr/fix-ts-civ-offsets
Fixed TS civilian structures and map decorations
2015-06-28 20:16:13 +02:00
Pavel Penev
10da8027b2 Merge pull request #8084 from obrakmann/lose_targets
Actors will lose targets and AI won't follow indefinitely
2015-06-28 20:26:51 +03:00
pevers
6ed0273656 Actors will lose targets and AI won't follow indefinitely 2015-06-28 19:11:53 +02:00
Oliver Brakmann
4e010bd6e6 Change *VictoryConditions to use customizable objective descriptions 2015-06-28 19:08:37 +02:00
Oliver Brakmann
34f382ec57 Prevent unnecessary blinking of the options button in non-mission type games
The options button starts blinking when a new objective is added, which happens in all game modes, even skirmish and koth.  This change prevents the button from blinking in the latter two cases.

This prevents 1) confusion on part of the players, and 2) an unnecessary announcement of the objective since in skirmish and koth it is always the same.
2015-06-28 17:58:32 +02:00
atlimit8
a9908bffb4 UpgradeManager after IUpgradables 2015-06-28 10:24:00 -05:00
Pavel Penev
f27d010535 Merge pull request #8554 from Mailaender/package-entry-dispose
Dispose of a MemoryStream in PackageEntry Take 2
2015-06-28 17:55:13 +03:00
Matthias Mailänder
5c0c300c53 add a hotkey to hide the UI widgets 2015-06-28 16:29:25 +02:00
Pavel Penev
84808d25e9 Merge pull request #8583 from reaperrr/fix-attackmove-req
Fixed potential AttackMove crash
2015-06-28 17:16:19 +03:00
reaperrr
5db7492452 Fixes potential AttackMove crash 2015-06-28 16:06:39 +02:00
Matthias Mailänder
9d6a5d626f fix developer hotkey display being cut off 2015-06-28 15:48:11 +02:00
Pavel Penev
8b4d5c7fb2 Merge pull request #7930 from Mailaender/screenshot
Added a hotkey to take screenshots
2015-06-28 15:37:07 +03:00
Matthias Mailänder
8a07c0b969 build, store and publish to Coverity scans 2015-06-28 14:28:51 +02:00
Matthias Mailänder
13fa477638 Merge pull request #8580 from GraionDilach/contributor-update
Add myself to the contributor list.
2015-06-28 13:42:17 +02:00
Matthias Mailänder
3fd49b87d3 Merge pull request #8556 from suvjunmd/tooltips
Modified actor tooltips to include friendly name and internal name
2015-06-28 13:35:37 +02:00
Zimmermann Gyula
317a3b2a4f Add myself to the contributor list. 2015-06-28 13:23:24 +02:00
Dmitri Suvorov
1fb03ad656 Modified actor tooltips to include friendly name and internal name 2015-06-28 14:16:37 +03:00
Matthias Mailänder
e4b3515663 Merge pull request #8478 from GraionDilach/disguise-pip
Closes #7466
2015-06-28 13:09:36 +02:00
Zimmermann Gyula
32eed88de5 Implements an AcknowledgesUpgrade method in UpgradeManager to allow checking for truly applicable upgrades - AcceptsUpgrade returns false if the upgrade has reached max level. 2015-06-28 12:58:50 +02:00
Zimmermann Gyula
8a94caab3c Implements a disguise decoration to Spies. Deprecates WithDecorationDisguised in favor of a refactor in Disguise. 2015-06-28 12:58:41 +02:00
Matthias Mailänder
ae59198363 Merge pull request #8418 from abcdefg30/newlua_other_cool_stuff
Added even more lua functions
2015-06-28 12:37:06 +02:00
Matthias Mailänder
a24deed426 Merge pull request #8576 from abcdefg30/newlua_demolish
Add a Demolish function to lua
2015-06-28 12:24:14 +02:00
abcdefg30
f3f889814b Make use of the new demolish function in allies05a 2015-06-28 12:17:33 +02:00
abcdefg30
4b39064661 Add a Demolish function to lua 2015-06-28 01:25:55 +02:00
abcdefg30
db0b20f5f8 Use the new Beacon function in survival 01 and 02 2015-06-28 01:25:38 +02:00
abcdefg30
a4fd34558d Add a lua function for beacons 2015-06-28 01:25:37 +02:00
abcdefg30
31986469a9 Use the new EnterTransport function in soviet05 2015-06-28 01:25:37 +02:00
abcdefg30
e1c674aeca Add EnterTransport function to lua 2015-06-28 01:25:36 +02:00
reaperrr
b10ab733cd Fixed tree and rock offsets 2015-06-27 22:44:30 +02:00
reaperrr
c2aa0983a8 Fixes offsets for all civilian structures
Adds critical damage stage to snow-exclusive aban** buildings (the art isn't really suited for damaged/50% damage stage)
2015-06-27 22:44:29 +02:00
reaperrr
01a241d394 Fixed bogus temperate exclusivity from ca00** civ buildings and crash sites
- ...and fixed their snow palette via TilesetCode.
- Fixed palette via TilesetCode for several other structures as well.
- Removed redundant junk from civilian structure sequences.
2015-06-27 22:44:28 +02:00
Matthias Mailänder
be99ba7d61 Merge pull request #8285 from abcdefg30/soviet02a
Added Soviet02a
2015-06-27 21:53:26 +02:00
Matthias Mailänder
3e8894964f Merge pull request #8513 from reaperrr/clean-ts-rules
Cleaned TS yaml rules
2015-06-27 21:42:26 +02:00
Matthias Mailänder
41215fe021 document the new DEBUG option 2015-06-27 18:43:53 +02:00
Matthias Mailänder
2b834b54fb enable debug start scripts 2015-06-27 18:43:53 +02:00
abcdefg30
c6c12ee4ac Merge pull request #8561 from clemty/upstream/nod05
nod05: change objective
2015-06-27 18:08:52 +02:00
abcdefg30
79191ae280 Added soviet02a
Thanks to the basic work from @Computerfreaked
2015-06-27 17:55:39 +02:00
abcdefg30
6527d7751b Expose a Attack method to lua 2015-06-27 17:55:38 +02:00
Matthias Mailänder
87c2e68973 Merge pull request #8321 from penev92/bleed_lintUpgrades
Add a lint check for actor upgrades
2015-06-27 16:41:04 +02:00
Matthias Mailänder
2763e26d23 add a take screenshot hotkey 2015-06-27 16:29:33 +02:00
reaperrr
3734e67b80 Merge pull request #8568 from Mailaender/dipsose-world-music
Fixed music and video leaking after world disposal
2015-06-27 14:21:39 +02:00
reaperrr
97d760cd8c Several fixes
Fixed TS building repairability to match original.
Civilian structures can now only be repaired with engineers.

Removed ProximityCaptor.

Various other fixes.
2015-06-27 13:20:45 +02:00
Matthias Mailänder
e58ce7d59b stop music and video when disposing the world 2015-06-27 11:00:06 +02:00
clemty
f2d5d6cb86 nod05: change objective
- only buildings need to be destroyed for primary objective (#8531)
- GDI airstrikes also stop when GDI tech center is captured
2015-06-25 23:50:11 +02:00
Zimmermann Gyula
d222cd1c7a Removes unneeded dummy warhead from TS EMP. 2015-06-25 16:06:43 +02:00
Zimmermann Gyula
0e3ba0c72e Add target validation to GrantUpgrade warheads. 2015-06-25 16:06:35 +02:00
Pavel Penev
2c8437f80d Merge pull request #8483 from matija-hustic/selectall_fixed
Fixes regression with selection classes
2015-06-25 16:51:13 +03:00
Pavel Penev
f161a620e6 Merge pull request #7851 from Mailaender/dedicated-console-log
Added status messages to console output for dedicated servers
2015-06-25 01:45:49 +03:00
Pavel Penev
55128b8f78 Merge pull request #8508 from reaperrr/damaged-sprites
Added support for damage stages to WithSpriteBody and WithTurret
2015-06-25 00:35:05 +03:00
Matthias Mailänder
e4f3a17477 Merge pull request #8550 from obrakmann/fix7327_nuke-affects-parent
Make all of mininuke's SpreadDamage warheads affect the parent
2015-06-24 07:31:05 +02:00
Matthias Mailänder
e93faeaa04 dispose the memory stream and avoid the binary reader 2015-06-24 07:15:59 +02:00
Chris Forbes
3bbb5e1f7e Merge pull request #8548 from OpenRA/revert-8501-bleed_streams
Revert "Dispose of a MemoryStream in PackageEntry"
2015-06-24 11:14:30 +12:00
Oliver Brakmann
3f7ab07c2d Make all of mininuke's SpreadDamage warheads affect the parent 2015-06-23 18:54:10 +02:00
Oliver Brakmann
a572044497 Revert "Dispose of a MemoryStream in PackageEntry" 2015-06-23 17:37:35 +02:00
reaperrr
1389a4e414 Fixed Carryall and Mammoth Mk.II selection boxes.
Removed now-redundant custom selection boxes from Wolverine and Titan.
2015-06-22 23:23:28 +02:00
Oliver Brakmann
8dc0e79dc2 Merge pull request #8501 from penev92/bleed_streams
Dispose of a MemoryStream in PackageEntry
2015-06-22 22:11:28 +02:00
penev92
04cc54c392 Get rid of an undisposed MemoryStream in PackageEntry
And a BinaryReader
2015-06-22 20:06:36 +03:00
abcdefg30
70754b72f5 Merge pull request #8529 from pchote/fix-mission-quit-desync
Use INotifyActorDisposing to dispose LuaScript as part of the world disposal.
2015-06-21 21:35:02 +02:00
abcdefg30
7e374b53e3 Merge pull request #8536 from obrakmann/fix8526
Do not fire script triggers while the world is being destroyed
2015-06-21 21:32:06 +02:00
Matija Hustić
34d0518b29 Fixed regression from last PR. 2015-06-21 20:15:06 +01:00
reaperrr
4ef293b5e3 Fixed veinhole sequence offset 2015-06-21 20:48:00 +02:00
Paul Chote
f8205d3d22 Clean up after LuaScript when tearing down the world. 2015-06-21 18:48:54 +01:00
Oliver Brakmann
fbd5938f3f Do not fire script triggers while the world is being destroyed 2015-06-21 19:37:25 +02:00
Pavel Penev
e269a74b3e Merge pull request #8479 from pchote/merge-shroud-traits
Move more shroud logic to RevealsShroud / GeneratesShroud
2015-06-21 19:16:42 +03:00
Paul Chote
7d8ee64ce5 Reorganize shroud cell queries.
This is in preparation for a future PR that will
remove GetVisOrigins.
2015-06-21 17:01:45 +01:00
Paul Chote
01dc7edbe9 Remove duplication between CreatesShroud and RevealsShroud. 2015-06-21 17:01:44 +01:00
Paul Chote
2c3198dc27 Move shroud traits to Mods.Common. 2015-06-21 16:58:07 +01:00
Paul Chote
10716f8979 Move shrouded/revealed tile calculation outside Shroud. 2015-06-21 16:58:07 +01:00
Paul Chote
b5550102db Move world state tracking to Creates/RevealsShroud. 2015-06-21 16:58:06 +01:00
reaperrr
8da5f5b7ab Cleaned TS yaml rules.
Streamlined actor defaults, removed a lot of duplication.
2015-06-21 17:07:29 +02:00
abcdefg30
1cbde65a08 Merge pull request #8509 from clemty/strings
More script string fixes
2015-06-21 16:22:32 +02:00
reaperrr
affbb07983 Merge pull request #8506 from pchote/fix-ts-maps
Fix TS maps.
2015-06-21 16:14:43 +02:00
Oliver Brakmann
01cda29eef Merge pull request #8524 from pchote/remove-enemy-notifications
Remove "Enemy Unit Detected" announcements
2015-06-21 15:17:52 +02:00
Oliver Brakmann
bc5a38525d Merge pull request #8518 from pchote/renderbounds
Fix screen bounds calculations
2015-06-21 15:01:16 +02:00
Oliver Brakmann
e15d4e7407 Merge pull request #8519 from pchote/editor-save-fix
Save maps with the correct MapClassification.
2015-06-21 14:51:42 +02:00
Paul Chote
53e9692dbe Fix scissoring in the editor. 2015-06-21 13:47:20 +01:00
Paul Chote
198a51e5e0 Fix VisibleCellsInsideBounds. 2015-06-21 13:41:39 +01:00
Paul Chote
40d018aaf3 Rewrite and document the visible cells calculation. 2015-06-21 13:41:38 +01:00
Paul Chote
a401333316 Fix Monster Tank Madness. 2015-06-21 13:40:25 +01:00
Paul Chote
ea31b5f393 Only invalidate metadata when overwriting map. 2015-06-21 13:07:45 +01:00
Paul Chote
096ce36d7b Remove "Enemy Unit Detected" announcements from D2K. 2015-06-21 12:54:00 +01:00
Paul Chote
fede1a1e4b Remove "Enemy Unit Detected" announcements from RA. 2015-06-21 12:53:25 +01:00
Matthias Mailänder
e696e9c53a Merge pull request #8424 from moviuro/freebsd-rcd-script
openra: introduce a FreeBSD rc.d script
2015-06-21 13:00:49 +02:00
Matthias Mailänder
aa91a8e7de Merge pull request #8497 from reaperrr/inf-fix
Fixed infantry prone sequences
2015-06-21 12:50:13 +02:00
Paul Chote
544609dc2c Remove legacy test map. 2015-06-21 11:04:08 +01:00
Paul Chote
e1084d28fc Import "Hot Springs". 2015-06-21 11:04:08 +01:00
Paul Chote
aa27be2aa3 Import "River Raid". 2015-06-21 11:04:08 +01:00
Paul Chote
edf5f49709 Reimport "Tread Lightly".
Adds tiberium and rocks.
2015-06-21 11:04:07 +01:00
Paul Chote
0005c04813 Reimport "A River Runs Near It".
Adds proper tiberium, vines, and rocks.
2015-06-21 11:04:07 +01:00
Paul Chote
a8aaf04f14 Implement placeholder Veins. 2015-06-21 11:04:03 +01:00
Paul Chote
9e18d3cceb Work around an unsynced code check. 2015-06-21 10:34:37 +01:00
reaperrr
77803b2ecd Remove now redundant work-around from D2k infantry rules 2015-06-21 11:06:14 +02:00
reaperrr
5acc103242 Fixes infantry sequence modifier for good 2015-06-21 11:03:52 +02:00
reaperrr
6455d30310 Fix TD prone stand sequences 2015-06-21 11:03:51 +02:00
reaperrr
fcbecb611e Fixed RA prone stand sequences 2015-06-21 11:03:50 +02:00
reaperrr
11ce57523c Fixes d2k rifle infantry prone sequence 2015-06-21 11:03:49 +02:00
Paul Chote
a6d38c9260 Fix temperate tileset naming. 2015-06-21 09:31:22 +01:00
penev92
696680bad5 Add lint check for actor upgrades 2015-06-21 11:12:15 +03:00
Matthias Mailänder
7bb95a1658 Add LintExt and move GetFieldValues() 2015-06-21 11:06:53 +03:00
penev92
2647811a13 Add UpgradeUsedReferenceAttribute 2015-06-21 11:06:50 +03:00
penev92
fbbd9a7eaa Add UpgradeGrantedReferenceAttribute 2015-06-21 11:06:35 +03:00
penev92
2ab7abcee4 Add ScriptUpgradesCache class to enable maps to explicitly declare what upgrades their Lua scripts will use 2015-06-21 11:00:18 +03:00
penev92
f1ec71b17d Document GlobalUpgradable 2015-06-21 11:00:17 +03:00
penev92
74abf58f3e Remove redundant crate definition from D2k (no actor accepts a cloak upgrade) 2015-06-21 11:00:15 +03:00
Oliver Brakmann
2d920c43fb Merge pull request #8511 from Mailaender/rm-openra-editor
Dropped the legacy WinForms map editor
2015-06-20 23:35:23 +02:00
Paul Chote
6aeebe697f Default new maps to oramap. 2015-06-20 22:32:18 +01:00
Paul Chote
b2050ae1aa Use the map save dialog to set new map properties. 2015-06-20 22:32:14 +01:00
clemty
6b6cf8bb48 More script string fixes
This fixes spelling, punctuation and grammar in TD and RA missions.
2015-06-20 23:22:59 +02:00
Oliver Brakmann
b50ea207f1 Merge pull request #7709 from Mailaender/lint-sequences
Added checks for missing sequence entries
2015-06-20 23:19:55 +02:00
Paul Chote
cd1fdb9b36 Update the MapCache with the correct UID. 2015-06-20 21:38:28 +01:00
Matthias Mailänder
7faebe874a check for missing sequence entries using lint 2015-06-20 22:22:59 +02:00
Matthias Mailänder
7424f32b2f document Country trait 2015-06-20 22:22:59 +02:00
Oliver Brakmann
fc7df415d7 Merge pull request #8394 from Mailaender/map-container-nre
Fixed a null reference exception in Map.Save
2015-06-20 21:06:00 +02:00
Paul Chote
17d759c9be Save maps with the correct MapClassification. 2015-06-20 19:00:59 +01:00
Matthias Mailänder
45dc314b23 print server status messages to the console 2015-06-20 16:47:32 +02:00
Matthias Mailänder
6b20b3266d fix indentions 2015-06-20 16:44:02 +02:00
abcdefg30
5a74495432 Merge pull request #8484 from HenrytheSlav/soviet05
Added soviet05
2015-06-20 16:33:30 +02:00
HenrytheSlav
197015f056 Added soviet05 2015-06-20 16:27:00 +02:00
Matthias Mailänder
330982310c avoid a null reference exception 2015-06-20 15:56:26 +02:00
Matthias Mailänder
e228601a5c fix NullReferenceExceptions during client pings 2015-06-20 15:54:23 +02:00
Oliver Brakmann
ea051644a3 Merge pull request #8412 from Mailaender/lint-voices
Added a lint rule to detect missing voice definitions
2015-06-20 15:46:10 +02:00
Matthias Mailänder
ac970cdb44 remove the WinForms map editor 2015-06-20 13:45:44 +02:00
Matthias Mailänder
4681e22bdc miniyaml junk removal and add missing new lines 2015-06-20 12:13:22 +02:00
Matthias Mailänder
430126c711 fix missing braces 2015-06-20 12:12:05 +02:00
Matthias Mailänder
0f8d22c9a6 rename for consistency 2015-06-20 12:11:45 +02:00
Matthias Mailänder
50e5e9df24 check voice actor references 2015-06-20 12:09:58 +02:00
Matthias Mailänder
264a63e58c move GetFieldValues to shared LintExts 2015-06-20 10:47:28 +02:00
Pavel Penev
dcae3c9dca Merge pull request #8357 from Mailaender/fix-colorpicker-nre
Fixed a crash in color picker logic when using the in-game editor
2015-06-20 10:43:40 +03:00
Matthias Mailänder
26a8ffb91d set the world owner for color picker logic 2015-06-20 08:19:06 +02:00
Oliver Brakmann
24f1599122 Merge pull request #8477 from pchote/actor-visibility
Move actor visibility checks out of Shroud
2015-06-19 23:38:23 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Paul Chote
1eb1841f2b Hide TD C17 (which has no sight) under fog. 2015-06-19 22:02:08 +01:00
Paul Chote
9715139b8f Hide D2K aircraft (which have no sight) under fog. 2015-06-19 22:02:08 +01:00
Paul Chote
6762e033e2 Add lint rule. 2015-06-19 22:02:07 +01:00
Paul Chote
34f5482d26 Update RA rules. 2015-06-19 22:02:07 +01:00
Paul Chote
0fdc0f9bc2 Update TD rules. 2015-06-19 22:02:07 +01:00
Paul Chote
6dae4da8f1 Update D2K rules. 2015-06-19 22:02:06 +01:00
Paul Chote
983951c290 Update TS rules. 2015-06-19 22:02:06 +01:00
Paul Chote
b887d2bfd7 Introduce IDefaultVisibility. 2015-06-19 22:02:06 +01:00
Paul Chote
0a2757d0e0 Remove Shroud.IsExplored(Actor) and IsVisible(Actor). 2015-06-19 22:01:48 +01:00
reaperrr
248e6b0e18 Adds support for damage-stage-based sequences to WithSpriteBody and WithTurret 2015-06-19 21:16:39 +02:00
Pavel Penev
e7a64ffec4 Merge pull request #8388 from reaperrr/selectable-refactor1
Selectable bounds/selection box refactor
2015-06-19 13:43:30 +03:00
reaperrr
3e57145cfa Updated upgrade rules
Now all they do is remove the Selectable trait when the Selectable boolean is false, and just remove the boolean if it's true.
2015-06-19 12:27:30 +02:00
reaperrr
61ea21005a Update CustomSelectionSize description 2015-06-19 12:27:28 +02:00
reaperrr
3bcf0aab00 Move SelectionDecorations to Traits\Render 2015-06-19 12:27:27 +02:00
reaperrr
f5771571c1 Fix Selectable style nits and description
Silence Travis
2015-06-19 12:26:19 +02:00
reaperrr
f2d8e32b01 Selection box size now defaults to Selectable.Bounds if VisualBounds are null 2015-06-19 12:26:16 +02:00
Matthias Mailänder
87325d96a9 Merge pull request #8413 from moviuro/better-launch-scripts
launch-dedicated.sh: Support passing args from CLI
2015-06-19 07:23:38 +02:00
abcdefg30
5a47beeb64 Merge pull request #8453 from clemty/upstream/mapfix
fix mapping errors in shipped maps
2015-06-18 22:18:27 +02:00
clemty
d7ec296e8a fixes mapping errors in shipped maps 2015-06-18 21:21:02 +02:00
abcdefg30
63554cfddb Merge pull request #8502 from pchote/cross-mod-state
Don’t switch mods from inside button click handlers.
2015-06-18 17:34:16 +02:00
Paul Chote
75210b692e Don’t switch mods from inside button click handlers.
Fixes screen flickering and desyncs when returning to the mod chooser.
2015-06-17 21:55:48 +01:00
Pavel Penev
86af468ee4 Merge pull request #8400 from Mailaender/dedicated-validatecommand-nre
Fixed a NullReferenceException in LobbyCommands.ValidateCommand
2015-06-17 23:54:49 +03:00
reaperrr
2986277490 Improved SelectionDecoration description & removed ISelectionDecoration interface 2015-06-17 21:37:24 +02:00
Paul Chote
e3ad118249 Merge pull request #8387 from RoosterDragon/one-temp-buffer
Create only one scratch vertex buffer for rendering
2015-06-17 18:19:28 +00:00
reaperrr
b6bbd11c83 Fix crate tooltips 2015-06-17 20:14:02 +02:00
reaperrr
a1fa43966b Newlines to improve readability of SelectionDecorations. 2015-06-17 20:14:01 +02:00
reaperrr
875d8bac06 Move debug target path rendering to SelectionDecorations 2015-06-17 20:14:00 +02:00
reaperrr
c23ee1be2e Remove Selectable boolean from Selectable trait
Add work-around for ta/td bridge huts since they need actor Bounds to
be targetable by C4/engineer repair.
2015-06-17 20:13:59 +02:00
reaperrr
2afa3cfa3a Slightly changed D2k barracks footprint
Makes upper-left barracks cell impassable. It might look passable on Atreides' barracks, but not Harkonnen barracks, for example.
2015-06-17 20:13:58 +02:00
reaperrr
a9477ddc2d Changed back TD power plant footprints to 2x2 impassable
Reason 1: The art doesn't really look like that cell should be passable.
Reason 2: This falls within Selectable Bounds and can therefore be exploited to protect turrets and towers, while making it impossible to collect crates or squish infantry on this cell.
2015-06-17 20:13:57 +02:00
reaperrr
e30ede3971 Change Bounds/add VisualBounds in TS mod 2015-06-17 20:13:56 +02:00
reaperrr
332b7a374e Changed Bounds/added VisualBounds in TD mod
Where necessary/applicable.

Tweaked Refinery Offsets.
2015-06-17 20:13:55 +02:00
reaperrr
f709a6f6c4 Changed Bounds/added VisualBounds in D2k mod 2015-06-17 20:13:54 +02:00
reaperrr
0ff22b8cbc Changed Bounds/added VisualBounds in RA mod 2015-06-17 20:13:53 +02:00
reaperrr
a3bd007ac7 Moved SelectionDecorations to Mods.Common
And added more settings.

Moved SelectionBoxRenderable to Mods.Common, too.
2015-06-17 20:13:52 +02:00
reaperrr
d6fb05ce68 Introduced VisualBounds on SelectionDecorations
To allow visual selection boxes to be independent from Selectable.Bounds.
2015-06-17 20:13:51 +02:00
Pavel Penev
f72a14faea Merge pull request #8395 from Mailaender/pause-world-nre
Fixed null reference exception when processing the Pause order
2015-06-17 18:05:51 +03:00
Matthias Mailänder
6f6602dece Merge pull request #8472 from penev92/bleed_dropDown
Change DropDownButtonWidget separator to an image
2015-06-16 20:36:03 +02:00
Matthias Mailänder
96884210b3 Merge pull request #8119 from penev92/bleed_d2kVideos
Rework mod content installation directories and add D2k videos
2015-06-16 18:37:50 +02:00
abcdefg30
e1904274d8 Merge pull request #8491 from Mailaender/rm-artsrc
Removed the artsrc directory
2015-06-16 17:00:33 +02:00
Pavel Penev
0868f2da47 Merge pull request #8474 from pchote/remove-shroud-tests
Remove region assumptions from fast shroud tests
2015-06-16 12:08:08 +03:00
Paul Chote
c44afc0722 Remove viewport editor-mode assumptions. 2015-06-16 08:16:49 +01:00
Oliver Brakmann
78a1dadba0 Merge pull request #8470 from Mailaender/upgrade-nres
Fixed NullReferenceExceptions in UpgradeActorRules
2015-06-15 22:07:00 +02:00
Matthias Mailänder
218d2834cb remove artsrc 2015-06-15 21:36:28 +02:00
Paul Chote
6738b8b977 Undo an invalid optimisation.
Fixes a regression from #7746.
2015-06-15 18:06:43 +01:00
Paul Chote
2156a234db Render shroud outside map bounds.
Fixes a regression from #8337.
2015-06-15 18:06:43 +01:00
Paul Chote
aee951c86f Remove region assumptions from fast shroud tests. 2015-06-15 18:06:42 +01:00
Paul Chote
da3abb4e2e Tweak shroud revealing logic
The per-actor visibility now tracks all cells
inside the map area (including those outside the
currently visible bounds), but the shroud/fog is
only cleared if the cell is inside the currently
visible bounds.
2015-06-15 18:06:42 +01:00
Pavel Penev
6e052d19d9 Merge pull request #8157 from abcdefg30/atreides01b
Added atreides-01b
2015-06-15 19:58:44 +03:00
abcdefg30
439c82fb60 Add the map pngs for atreides01a and b 2015-06-15 17:39:33 +02:00
abcdefg30
4f462fb988 Make use of tables for different difficulties 2015-06-15 17:39:32 +02:00
abcdefg30
b282dffbaf Added atreides-01b 2015-06-15 17:39:32 +02:00
penev92
c93c0488c3 Change DropDownButtonWidget separator to an image 2015-06-15 03:15:19 +03:00
Pavel Penev
b1ef76d099 Merge pull request #8485 from obrakmann/fix-makefile-typo
Fix stupid typo in the Makefile
2015-06-15 01:08:38 +03:00
Oliver Brakmann
1f29bb6faa Fix stupid typo in the Makefile 2015-06-14 23:29:31 +02:00
Oliver Brakmann
ae8b146d2d Merge pull request #8325 from Mailaender/foundations-zero-tiles
Fixed a division through zero
2015-06-14 23:04:09 +02:00
Oliver Brakmann
28422f3e38 Merge pull request #8481 from obrakmann/build_prep_on_travis
Build prep branches on Travis, too
2015-06-14 13:44:00 +02:00
Oliver Brakmann
0d656e94ab Merge pull request #8482 from pchote/fix-d2k-tooltips
Fix d2k tooltips.
2015-06-14 13:40:16 +02:00
Paul Chote
f41acf56e6 Fix d2k tooltips. 2015-06-14 11:24:25 +01:00
Oliver Brakmann
553f9af1ba Build prep branches on Travis, too 2015-06-14 11:18:51 +02:00
Oliver Brakmann
7bc012be8d Merge pull request #8475 from abcdefg30/makeclean
Fix OpenRA.Game.exe.config being removed by 'make clean'
2015-06-14 10:26:45 +02:00
Matthias Mailänder
1a690bae9e Update README.md
separate buttons (different height)
2015-06-14 07:25:41 +02:00
abcdefg30
0244f394fd Fix OpenRA.Game.exe.config being removed by 'make clean' 2015-06-13 15:54:28 +02:00
abcdefg30
93ed8fbdd1 Merge pull request #8415 from deniz1a/make-utility-check
Adds checks for OpenRA.Utility.exe in make.cmd.
2015-06-13 15:27:40 +02:00
abcdefg30
981ff2dddf Merge pull request #8469 from Mailaender/empty-font-height
Fixed Sprite.Measure returning a 0 height
2015-06-13 14:53:18 +02:00
Pavel Penev
02834adfd9 Merge pull request #8471 from Mailaender/name-length-nre
Fixed a NullReferenceException in SanitizedPlayerName
2015-06-13 14:06:38 +03:00
penev92
6c75d1dde3 Fix video playback to work with D2k VQAs 2015-06-13 12:43:35 +03:00
penev92
be609c6033 Move D2k tilesets to a separate directory 2015-06-13 12:43:33 +03:00
penev92
a442c6c932 Add videos to D2k's assets 2015-06-13 12:43:30 +03:00
penev92
c8ab1e8370 Add Dictionary support to InstallUtils and fix D2k locking asset files;
Also fix D2k assets locations
2015-06-13 12:43:23 +03:00
Matthias Mailänder
b58988c623 move the null check to avoid a crash 2015-06-13 11:01:55 +02:00
Matthias Mailänder
1bf2bfadb4 update the engine version as the merge was delayed 2015-06-13 10:54:03 +02:00
Matthias Mailänder
d7e63ec28a fix a NullReferenceException 2015-06-13 10:53:48 +02:00
Matthias Mailänder
0816251bcd fix a null reference exception in parentKey 2015-06-13 10:52:23 +02:00
Pavel Penev
5226e1ad26 Merge pull request #8468 from Phrohdoh/fix-maped
Replace Get with GetOrNull in MapEditorLogic.
2015-06-13 11:36:34 +03:00
Matthias Mailänder
50f9724e34 fix a NullReferenceException 2015-06-13 10:36:07 +02:00
Moviuro
9df6b3c15f launch-dedicated.sh: add a tiny comment/usage 2015-06-13 10:23:24 +02:00
Moviuro
392cc90695 launch-dedicated.sh: Default to advertize Online 2015-06-13 10:19:05 +02:00
Moviuro
e24b4dbd8a launch-dedicated.sh: add AllowPortForward directive 2015-06-13 10:18:30 +02:00
Matthias Mailänder
bb6d4388df always return a default height based on font size 2015-06-13 08:36:37 +02:00
Taryn Hill
8fd82f0998 Remove unused using directives from MapEditorLogic. 2015-06-12 23:00:57 -05:00
Taryn Hill
6c3e127469 Replace a problematic Get with GetOrNull in MapEditorLogic. 2015-06-12 23:00:43 -05:00
abcdefg30
b98d98c6d6 Merge pull request #8212 from matija-hustic/selectable_classes
Added selection classes
2015-06-13 01:53:32 +02:00
Pavel Penev
e96e3fd3da Merge pull request #8277 from abcdefg30/radesc
Update all ra tooltips
2015-06-13 01:10:20 +03:00
Matthias Mailänder
6c7d2095b9 Merge pull request #8464 from GraionDilach/customcameopal
Closes #8434
2015-06-12 21:10:12 +02:00
Zimmermann Gyula
d5a5640f52 Adds an IconPalette property to Buildable and SupportPower traits. 2015-06-12 20:33:58 +02:00
Pavel Penev
649409e2ce Merge pull request #8430 from pchote/editor-cordon
Display and support editing the area outside the map bounds
2015-06-12 17:49:10 +03:00
Pavel Penev
ef7b1cf914 Merge pull request #8296 from Mailaender/lint-sprites
Moved the sequence image check to RenderSprites level
2015-06-12 04:43:47 +03:00
Paul Chote
ba2d499e5d Fix a bug in Map/CellLayer.Contains. 2015-06-11 21:27:35 +01:00
Paul Chote
6e09c62fdd Allow resource placement outside the map cordon. 2015-06-11 21:27:35 +01:00
Paul Chote
55cea73cf4 Allow actor placement outside the map cordon. 2015-06-11 21:27:34 +01:00
Paul Chote
f10d876429 Allow tile placement outside the map cordon. 2015-06-11 21:27:34 +01:00
Paul Chote
3d352563a8 Allow scrolling to the map edges in the editor. 2015-06-11 21:27:34 +01:00
Paul Chote
293c7fb840 Disable shroud in the map editor. 2015-06-11 21:27:33 +01:00
Paul Chote
486bf14669 Relax screen clipping bounds.
Fixes missing tiles in TS.
2015-06-11 21:27:33 +01:00
Paul Chote
d21b63ca04 Add some more coordinate utility functions. 2015-06-11 20:59:35 +01:00
Matthias Mailänder
e2e9ce9d7e check sequence image at RenderSprites level 2015-06-11 21:18:25 +02:00
Pavel Penev
b7567fa5fa Merge pull request #8399 from Mailaender/mix-readblock-guards
Fixed EndOfStreamException in MixFile.ReadBlocks
2015-06-11 17:38:35 +03:00
Pavel Penev
a4f85c6201 Merge pull request #8300 from matija-hustic/withrank_trait
Rank effect moved to new trait
2015-06-11 04:54:08 +03:00
Matija Hustić
a4ac3ecd5f Rank moved to new trait. 2015-06-11 02:41:29 +01:00
Oliver Brakmann
d24d2909ce Merge pull request #8282 from RoosterDragon/release-config
Enable compiler optimizations
2015-06-10 23:14:38 +02:00
Oliver Brakmann
afb939b159 Merge pull request #8457 from Mailaender/spritefont-measure-nre
Fixed a common NullReferenceException at SpriteFont.Measure
2015-06-10 22:54:10 +02:00
Oliver Brakmann
6e74bceaa9 Merge pull request #8425 from Mailaender/colormixer-badlock
Fixed a bad choice of lock objects in ColorMixerWidget
2015-06-10 22:50:02 +02:00
Oliver Brakmann
0ac78ef6a2 Merge pull request #8423 from Mailaender/hashfrozenactor-nre
Fixed a NullReferenceException in Sync.HashTarget
2015-06-10 22:19:37 +02:00
Matthias Mailänder
9f8d5bc12e Merge pull request #8375 from 42foobar42/nod06bfix
Closes #8297
2015-06-10 22:05:53 +02:00
Oliver Brakmann
0ff5e0078d Merge pull request #8393 from Mailaender/zipfile-nre
Fixed a dereference null return value in ZipFile.GetContent
2015-06-10 21:47:30 +02:00
Oliver Brakmann
398baa593e Merge pull request #8391 from Mailaender/pngloader-null-bitmap
Catched an explicit null dereference in PngLoader
2015-06-10 21:44:23 +02:00
Matthias Mailänder
07711f01b3 add exceptions for debugging 2015-06-10 20:41:34 +02:00
Pavel Penev
5097137b95 Merge pull request #8402 from obrakmann/fix8041_undeployable_conyard
Fix WithBuildingPlacedAnimation interrupting WithMakeAnimation
2015-06-10 14:55:22 +03:00
Matthias Mailänder
e53b1d16dd Merge pull request #8447 from pchote/ts-shroud-offset
Offset the TS shroud sequences.
2015-06-10 07:14:20 +02:00
Matthias Mailänder
9261f685a7 fix a null reference exception 2015-06-10 06:48:10 +02:00
Matthias Mailänder
bac11e23f6 avoid an often forgotten NullReferenceException 2015-06-10 06:39:54 +02:00
Matthias Mailänder
fb4b306553 avoid a bad choice of lock objects 2015-06-10 06:36:46 +02:00
Matthias Mailänder
51a17095a8 Merge pull request #8455 from Phrohdoh/dated-makefile
Remove old dependencies from Makefile.
2015-06-10 06:29:04 +02:00
Pavel Penev
f75da37ebf Merge pull request #8401 from Mailaender/playercolor-dictionary-exploit
Fixed an exploit where choosing another players color crashes the game
2015-06-10 01:56:23 +03:00
Taryn Hill
96bbc876ee Remove old dependencies from Makefile. 2015-06-09 16:30:43 -05:00
Oliver Brakmann
561fba46d3 Merge pull request #8431 from jbeich/unix_quirks
A few minor portability fixes
2015-06-09 22:53:52 +02:00
Oliver Brakmann
1a9f4f8a1b Allow switching off debug compilation in the Makefile
Debug mode stays enabled by default. Turn it off by passing a DEBUG flag into make, eg.:

$ make DEBUG=0
2015-06-09 18:06:32 +01:00
RoosterDragon
272a0d8691 Added a release config. 2015-06-09 18:06:31 +01:00
Pavel Penev
8ccb55734d Merge pull request #8449 from Mailaender/allow-long-servernames
Fixed long server names being sanitized
2015-06-09 15:03:21 +03:00
Matthias Mailänder
ba7059ab0b allow long server names 2015-06-09 06:58:58 +02:00
Paul Chote
c87ebce759 Offset the TS shroud sequences.
This corrects the 1px offsets in the sprites.
2015-06-08 23:02:51 +01:00
Oliver Brakmann
e5f89c2339 Merge pull request #8428 from moviuro/silent-get-function
thirdparty/fetch-thirdparty-deps.sh: silence the nuget check
2015-06-08 21:22:26 +02:00
Oliver Brakmann
2f578c80da Merge pull request #8422 from Mailaender/perfitem-div0
Fixed a division through zero in PerfItem.Average
2015-06-08 21:09:33 +02:00
Oliver Brakmann
5f45de1fe1 Merge pull request #8380 from reaperrr/color-valid-tweak
Less permissive color validator
2015-06-08 19:50:02 +02:00
Oliver Brakmann
d1ffb57e4e Merge pull request #8433 from Mailaender/namespace-doc-toc
Added the namespace headers to the trait documentation table of contents
2015-06-08 19:28:57 +02:00
Oliver Brakmann
2683da17d9 Merge pull request #8440 from OpenRA/avoid-duplicate-overcrowded-bugs
Expanded the bug reporting guidelines
2015-06-08 19:15:08 +02:00
Matthias Mailänder
f9c2b50ab5 Update CONTRIBUTING.md
please don't submit duplicates and keep it one issue per issue
2015-06-08 19:09:32 +02:00
deniz1a
b8c3a7a30d Adds checks for OpenRA.Utility.exe in make.cmd.
It displays a message now instead of file not found error.
2015-06-08 18:56:24 +03:00
Matija Hustić
e965a0d3f0 Touched up selection functionality. 2015-06-08 15:03:09 +01:00
Matthias Mailänder
854117d1d9 Merge pull request #8426 from obrakmann/ra-map-import-ships
Fixed missing ships when importing legacy RA maps
2015-06-08 09:03:38 +02:00
Matthias Mailänder
e5d06278ad Merge pull request #8427 from moviuro/comment-posix
thirdparty/*.sh: add comments on POSIX-compliant scripts
2015-06-08 08:57:28 +02:00
reaperrr
621cdeb996 Make color validator less permissive and increase minimum color lumination.
Closes #7902.
2015-06-08 03:07:51 +02:00
Pavel Penev
21f0d5c5a0 Merge pull request #8420 from Mailaender/unitordergen-nre
Fixed a dereference after null check in UnitOrderGenerator.CheckSameOrder
2015-06-08 01:06:49 +03:00
Oliver Brakmann
ce1eed6bcc Merge pull request #8432 from pchote/shroud-wpos
Add WPos shroud visibility queries.
2015-06-07 21:57:39 +02:00
Oliver Brakmann
747d762681 Merge pull request #8370 from penev92/bleed_newsDownload
Expand Battlefield News when a new news post has been downloaded
2015-06-07 21:23:37 +02:00
Matthias Mailänder
f084322162 also add namespaces to the toc 2015-06-07 21:07:37 +02:00
abcdefg30
10629b54ee Update all ra tooltips 2015-06-07 20:59:08 +02:00
Paul Chote
3994e1eec9 Use FogObscures(WPos). 2015-06-07 19:50:03 +01:00
Paul Chote
66dd3c553c Introduce WPos versions of FogObscures and ShroudObscures. 2015-06-07 19:50:02 +01:00
Oliver Brakmann
588cb7a959 Merge pull request #8337 from pchote/shroud-vertexbuffer
Simplify and improve shroud rendering performance.
2015-06-07 20:26:22 +02:00
Paul Chote
ec576558c0 Generate shroud cells outside the map. 2015-06-07 19:15:11 +01:00
Pavel Penev
07aa575c6b Merge pull request #8382 from LipkeGu/visualc_check
Check also for 2012 and 2013 Visual C runtimes libaries
2015-06-07 21:02:50 +03:00
Matthias Mailänder
dbc3d28c1a Merge pull request #7940 from Unit158/AttackTurreted-fix
Fixed turrets not firing at fast moving targets.
2015-06-07 19:05:17 +02:00
Christopher Grant
e94435ceaf Fixed turrets not firing at fast moving targets. 2015-06-07 12:54:56 -04:00
Jan Beich
fc7edb536d build/install: fall back to Unix desktop
Instead of enumerating every Unix assume Freedesktop-compliant behavior.
In future Android may want to define its own flavor like OSX.
2015-06-07 19:42:29 +03:00
Jan Beich
5483384e44 install: work around historical BSD cp(1) behavior
Strip ending / (slash) of the source when copying hicolor directory to
avoid installing icons under a theme with empty name. This should
unbreak expanding Icon in .desktop file by gtk_icon_theme_lookup_icon()
on DragonFly and FreeBSD.

|cp -R foo/ bar| == |cp -R foo/. bar| was disabled by NetBSD and OpenBSD
years ago to match POSIX. Other cp(1) implementations aren't affected.
2015-06-07 19:35:01 +03:00
Jan Beich
01dbbb72fa install: crashdialog_TARGET no longer exists after 307eaec 2015-06-07 19:35:01 +03:00
Paul Chote
cac7ec39f4 Rework shroud rendering using TerrainSpriteLayer. 2015-06-07 17:02:56 +01:00
Matthias Mailänder
9882a6e34d Merge pull request #8171 from reaperrr/withunitbody1
Introduce WithFacingSpriteBody and related With*Animation traits
2015-06-07 17:11:48 +02:00
Moviuro
1f0c884654 thirdparty/fetch-thirdparty-deps.sh: silence the nuget check 2015-06-07 17:08:36 +02:00
Moviuro
0525bebc80 thirdparty/*.sh: add comments on POSIX-compliant scripts 2015-06-07 16:32:46 +02:00
Oliver Brakmann
e445cc4fce Merge pull request #8408 from Mailaender/make-bsd-detect
Added a generic BSD detection to the Makefile
2015-06-07 15:56:56 +02:00
Oliver Brakmann
8442dc4bf0 Fixed missing ships when importing legacy RA maps 2015-06-07 15:45:16 +02:00
Moviuro
7375ad11db packaging/freebsd/openra: fix word splitting
Allow spaces in ServerName
2015-06-07 14:54:23 +02:00
Moviuro
1678a3a274 packaging/freebsd/openra: set AdvertiseOnline to True by default 2015-06-07 14:37:04 +02:00
Moviuro
9224030376 packaging/freebsd/openra: update comments, fix typos 2015-06-07 14:20:13 +02:00
Moviuro
56fc53b1e6 openra: introduce a FreeBSD rc.d script
Requires screen
2015-06-07 14:05:18 +02:00
Matthias Mailänder
47a92c4511 fix a NullReferenceException 2015-06-07 13:41:29 +02:00
Matthias Mailänder
47b0b4f143 fix a division through zero 2015-06-07 13:38:04 +02:00
Matthias Mailänder
8381fbd712 fix dereference after null check 2015-06-07 13:17:33 +02:00
abcdefg30
5c734b7031 Merge pull request #8411 from Unit158/shrapnel-polish
Added shrapnel sequences.
2015-06-07 12:50:16 +02:00
Pavel Penev
c4b48aaafb Merge pull request #8390 from OpenRA/coverity-badge
Added a Coverity Scan Badge to the README file
2015-06-07 13:19:10 +03:00
Moviuro
68cc00447c launch-dedicated.sh: Support passing args from CLI 2015-06-06 22:03:54 +02:00
Matthias Mailänder
c460e4ac4d avoid word splitting 2015-06-06 19:20:54 +02:00
Christopher Grant
81f05e7556 Added shrapnel sequences. 2015-06-06 13:18:09 -04:00
Matthias Mailänder
363e84157f add BSD detection to the Makefile 2015-06-06 18:36:40 +02:00
Oliver Brakmann
52179e802e Merge pull request #8405 from moviuro/posix-compliance
POSIX compliance
2015-06-06 17:42:26 +02:00
Moviuro
992d8396c6 thirdparty/configure-linux-native-deps.sh: == is not POSIX
Replaced it with =
2015-06-06 16:56:39 +02:00
Matthias Mailänder
99c9841274 don't log to which player the duplicate color belonged 2015-06-06 16:50:44 +02:00
Oliver Brakmann
929df0a4c7 Merge pull request #8356 from clemty/upstream/missionobj
make TD mission objective punctuation consistent
2015-06-06 16:31:36 +02:00
Moviuro
753f268593 thirdparty/configure-linux-native-deps.sh: POSIX compliant
Also works on FreeBSD
I didn't fix the MakeFile, though
2015-06-06 16:25:52 +02:00
Moviuro
fbf0cb676f *.sh: POSIX compliance when needed 2015-06-06 16:16:30 +02:00
Oliver Brakmann
a9339d91ea Fix WithBuildingPlacedAnimation interrupting WithMakeAnimation
The bug happens when a second (or third, fourth etc.) Conyard deploys while a building is placed from the first Conyard.

The `WithMakeAnimation` running on the second CY uses `Animation::PlayThen` to call `Building::Unlock` in a delegate.

`WithBuildingPlacedAnimation::BuildingPlaced` runs when a building placed and replaces the delegate from `WithMakeAnimation` with its own before it has a chance to run, and so the new Conyard never gets unlocked.

The fix is then to simply not run `BuildingPlaced` on conyards that haven't completed the make animation yet.
2015-06-06 15:13:22 +02:00
Matthias Mailänder
667646a984 fix null reference exception 2015-06-06 12:52:38 +02:00
Alexander Boll
4430267a60 fixed picture position 2015-06-06 12:16:25 +02:00
Matthias Mailänder
e7a023edce catch an explicit null dereference 2015-06-06 11:12:37 +02:00
Matthias Mailänder
b7a4552346 Update README.md
add a Coverity Scan Badge
2015-06-06 11:02:39 +02:00
bean601
730cec3974 Expand Battlefield News when a new news post has been downloaded 2015-06-06 10:41:31 +03:00
RoosterDragon
1e60a0ca76 Create only one scratch vertex buffer for rendering.
Previously several buffers were created but only one was ever used.
2015-06-05 21:32:07 +01:00
Pavel Penev
1651bd817b Merge pull request #8385 from abcdefg30/mentat
Add the "Mentat" prefix to the messages in atreides01a
2015-06-05 22:31:15 +03:00
abcdefg30
4561a73240 Add the "Mentat" prefix to the messages in atreides01a 2015-06-05 15:00:34 +02:00
Guido L
48c60589d4 [MSVCRT] check also for 2012 and 2013 2015-06-05 08:34:17 +01:00
Taryn Hill
0dd6f54a11 Merge pull request #8090 from penev92/bleed_upgradableTraits
Make some traits upgradable.
2015-06-04 12:04:07 -05:00
reaperrr
d52906117e Upgrade TS to replace RenderUnit with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.
2015-06-04 14:46:12 +02:00
reaperrr
6fdbd0e447 Replace RenderUnit in D2k with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize, where possible.
2015-06-04 14:44:20 +02:00
reaperrr
7147ffc812 Replace RenderUnit in RA mod with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.

Change MadTank dependency from RenderUnit to WithFacingSpriteBody.
2015-06-04 14:44:19 +02:00
reaperrr
2c139f326a Upgrade TD to replace RenderUnit with WithFacingSpriteBody
+RenderSprites + AutoSelectionSize.
2015-06-04 14:44:18 +02:00
reaperrr
75b3ccfad0 TS wolverine changed to use WithFacingSpriteBody
...in conjunction with WithMoveAnimation and WithAttackAnimation,
replacing WithInfantryBody.
2015-06-04 14:42:12 +02:00
reaperrr
733b7fc0b0 Added WithMoveAnimation trait
RenderUnitFlying -> WithUnitBody + WithMoveAnimation upgrade rule

Make TD Orca use WithMoveAnimation
Remove RenderUnitFlying
2015-06-04 14:42:11 +02:00
reaperrr
4d79cce491 Added WithAttackAnimation trait
Interacts with WithUnitBody.

Upgrade rule for RenderUnitReload -> RenderSprites + WithUnitBody + WithAttackAnimation

Use WithAttackAnimation for RA V2 launcher
Remove RenderUnitReload
2015-06-04 14:42:10 +02:00
reaperrr
b21ca9b7e7 Add deprecation notices to RenderUnit and RenderSimple 2015-06-04 14:42:09 +02:00
reaperrr
0e3a53bec7 Added WithFacingSpriteBody trait.
Extracted AutoSelectionSize into its own trait.

RenderUnit -> RenderSprites + WithFacingSpriteBody upgrade rule

Remove RenderSimple dependencies of ThrowsParticle
and WithHarvestAnimation.
2015-06-04 14:42:08 +02:00
clemty
3bb9f0170a adds punctuation to all mission objectives 2015-06-04 10:20:05 +02:00
Matthias Mailänder
9b52bff87d Merge pull request #8303 from AoAGeneral/upstream/myfeature
TD Balance Changes
2015-06-04 06:42:52 +02:00
Matthias Mailänder
1944f352b2 Merge pull request #8072 from reaperrr/clean-selectable
Cleaned up infantry rules (part 1)
2015-06-04 06:04:09 +02:00
abcdefg30
fcd9759eac Merge pull request #8290 from penev92/bleed_d2kMissionBrowser
Give D2k its own mission browser
2015-06-03 16:48:28 +02:00
Pavel Penev
c22f15de55 Merge pull request #8299 from pchote/map-visiblecells
Distinguish between all map cells and cells inside map bounds.
2015-06-03 14:59:21 +03:00
Pavel Penev
707c403cc3 Merge pull request #8342 from LipkeGu/editor-crash-colorpicker
Allow changing of player Color/Name only on main menu
2015-06-03 14:08:30 +03:00
Guido L
a1fc77980d Allow changing of player color/Name only on main menu to Allow changing of player Color/Name ONLY on main menu 2015-06-03 07:24:41 +01:00
Matthias Mailänder
e12dc1904e Merge pull request #8349 from abcdefg30/protectharvester
Fix a potential crash in allies05a
2015-06-03 07:21:57 +02:00
Matthias Mailänder
9e4c926b8f Merge pull request #8350 from abcdefg30/timer02
Fix the timer in allies02
2015-06-03 07:00:35 +02:00
Paul Chote
bf4722fb9f Distinguish between all map cells and cells inside map bounds. 2015-06-02 21:53:25 +01:00
Oliver Brakmann
6650e3d9c7 Merge pull request #8319 from Mailaender/hacky-currentstate-nre
Fixed possible NREs in AI.StateMachine
2015-06-02 22:35:49 +02:00
Oliver Brakmann
05e9b22af7 Merge pull request #8329 from Mailaender/worldtooltip-owner-nre
Fixed a NullReferenceException in WorldTooltipLogic
2015-06-02 22:22:10 +02:00
Matthias Mailänder
cab701e8f5 Merge pull request #8360 from penev92/bleed_checkVC2010
Check for dependencies of dependencies
2015-06-02 22:18:57 +02:00
Matthias Mailänder
cd5c0eca79 fix possible null reference exceptions 2015-06-02 22:16:16 +02:00
Matthias Mailänder
a4f7daf47a avoid a division through zero 2015-06-02 22:12:48 +02:00
Matthias Mailänder
06106b09ed fix NRE 2015-06-02 22:04:34 +02:00
Matthias Mailänder
5fafc65885 Merge pull request #8348 from obrakmann/fix8343_8344_nod06a
Fix actor placement and typo in nod06a
2015-06-02 20:48:25 +02:00
Oliver Brakmann
206c33ed41 Merge pull request #8226 from pchote/actor-disposal
Dispose traits when destroying an actor.
2015-06-02 19:33:22 +02:00
Oliver Brakmann
62aee92185 Merge pull request #8221 from pchote/terrain-spritelayer
Introduce a class for efficient tiled sprite rendering.
2015-06-02 18:16:05 +02:00
penev92
4fc6ac3a15 Check for MS VC++ 2010 2015-06-02 18:04:55 +03:00
abcdefg30
04ea348764 Merge pull request #8336 from reaperrr/fix-d2k-attackvoice
Fixed D2k attack voices and adds 4th variant for fremen voices
2015-06-02 14:46:39 +02:00
reaperrr
9f1abd04e8 Cleaned and fixed TS infantry rules a little.
Moved Selectable Bounds to infantry default and tweaked them to better
match art size.
Gave Viceroids their own default. They don't share cells anymore, either.
Fixed JumJet voice.
Disabled RevealsShroud on Tiberian Fiend.
Cleaned up TakeCover definitions.
Tweaked selection bounds of TS cyborgs.
Changed TS engineer trait order to fix prone animations not showing up.
2015-06-01 23:27:50 +02:00
reaperrr
64fb38bd3e Cleaned and fixed D2k infantry rules a little
Moved Selectable Bounds to infantry default, fixed vertical offset.
Removed some TakeCover duplication.
Added engineer and medic/thumper prone sequences.
Made sure that TakeCover/WithInfantryBody sequence modifiers are applied
properly.

Fixed d2k grenadier sequences offset to match other infantry.
2015-06-01 23:27:49 +02:00
reaperrr
f88ada8648 Cleaned and fixed TD infantry rules a little
Fixes TD infantry not going visually prone.
2015-06-01 23:27:47 +02:00
reaperrr
e8cd833058 Cleaned RA infantry rules a little 2015-06-01 23:27:46 +02:00
reaperrr
d3c146f707 Enabled saboteur demolish voice. 2015-06-01 23:17:25 +02:00
Oliver Brakmann
d8844b5e6f Merge pull request #8352 from abcdefg30/missionwatch
Disable EnemyWatcher in all ra missions
2015-06-01 21:50:25 +02:00
Pavel Penev
d7a7dc9219 Merge pull request #8331 from Mailaender/replay-utility-nre
Added more useful exceptions to the command line utility replay parser
2015-06-01 20:04:11 +03:00
Pavel Penev
0e81615902 Merge pull request #8351 from abcdefg30/genericdog
Adjust the dogs generic name
2015-06-01 19:32:54 +03:00
abcdefg30
8a5cdfa9fb Disable EnemyWatcher in all ra missions 2015-06-01 18:21:22 +02:00
Oliver Brakmann
56e0af67fa Merge pull request #8328 from Mailaender/desc-label-nre
Made the tech description label optional
2015-06-01 17:18:42 +02:00
Oliver Brakmann
c1835e9214 Merge pull request #8327 from Mailaender/swallow-ammopool-nre
Fixed an explicit NRE from SwallowActor.WormAttack
2015-06-01 17:14:37 +02:00
Oliver Brakmann
60b1424585 Fix actor placement and typo in nod06a 2015-06-01 17:11:24 +02:00
Pavel Penev
32f420976e Merge pull request #8261 from Mailaender/cyborgs
Added the Tiberian Sun cyborg logic
2015-06-01 11:58:51 +03:00
Matthias Mailänder
031dc1c1ff provide more useful exceptions 2015-06-01 09:03:32 +02:00
Matthias Mailänder
8dbe9804fc add the Cyborg rendering logic 2015-06-01 07:58:34 +02:00
AoAGeneral
194d62f70c Update vehicles.yaml 2015-05-31 17:29:21 -07:00
Pavel Penev
53f26adb88 Merge pull request #8309 from Mailaender/lint-neutral
Added a lint rule to check if Neutral is set up correctly
2015-06-01 02:06:06 +03:00
Pavel Penev
926900d3f9 Merge pull request #8330 from Mailaender/gametimer-nre
Fixed a NullReferenceException in GameTimeLogic
2015-06-01 01:59:32 +03:00
Pavel Penev
c11214f697 Merge pull request #8332 from Mailaender/language-extract-nre
Fixed an explicit NullReferenceException in ExtractLanguageStringsCommand
2015-06-01 01:58:28 +03:00
Pavel Penev
e7c795e56f Merge pull request #8338 from Mailaender/long-wrange-squared
Fixed all squared range related integer overflows
2015-06-01 01:57:27 +03:00
Pavel Penev
b12204f99f Merge pull request #8335 from Mailaender/editor-onpaint-base
Fixed a missing call to base clase in OpenRA.Editor.OnPaint
2015-06-01 01:43:21 +03:00
Matthias Mailänder
ea5003cd2d add new long WRange.RangeSquared to avoid integer overflows 2015-05-31 23:51:30 +02:00
Matthias Mailänder
aab2afd407 fix a missing call to base clase 2015-05-31 22:38:21 +02:00
reaperrr
db162e9b51 Fixes D2k attack voices and adds 4th variant for fremen voices. 2015-05-31 22:38:02 +02:00
Matthias Mailänder
060e83b35d fix an explicit NRE 2015-05-31 22:13:07 +02:00
Matthias Mailänder
14a4b876e3 fix a possible NRE 2015-05-31 21:10:56 +02:00
Matthias Mailänder
7efdd6820f make the description label optional 2015-05-31 20:59:11 +02:00
Matthias Mailänder
1fd25a3d3a fix an explicit NRE from SwallowActor.WormAttack 2015-05-31 20:47:08 +02:00
Matthias Mailänder
98afa922ac Random is already in the race list 2015-05-31 20:33:29 +02:00
Oliver Brakmann
79edf648a7 Merge pull request #8308 from Mailaender/lint-owners
Added a lint check for invalid owners
2015-05-31 20:25:00 +02:00
Matthias Mailänder
44691831ad check for invalid owners 2015-05-31 18:33:23 +02:00
Oliver Brakmann
1dc1155ad7 Merge pull request #8316 from Mailaender/dispose-blank-loadscreen
Added missing disposings of the *LoadScreen base class
2015-05-31 18:13:19 +02:00
Oliver Brakmann
4d4ee90ac8 Merge pull request #8322 from Mailaender/demolish-warhead-damagemod-nre
Fixed an explicit NRE in TerrainModifiesDamage
2015-05-31 17:54:42 +02:00
Oliver Brakmann
f25300c703 Merge pull request #8320 from Mailaender/flyattack-tick-nre
Fixed a possible NRE in FlyAttack.Tick
2015-05-31 17:39:36 +02:00
Oliver Brakmann
b5bae91bb0 Merge pull request #8318 from Mailaender/hackyai-nre-attacker
Fixed possible NREs in HackyAI.Damaged
2015-05-31 17:07:33 +02:00
Oliver Brakmann
e4fcb65808 Merge pull request #8315 from Mailaender/health-attacker-nre
Fixed a possible NRE in Health.InflictDamage debug logging
2015-05-31 17:04:09 +02:00
Oliver Brakmann
c30a483ee5 Merge pull request #8292 from Mailaender/fix-atreides01-color
Fixed the Atreides house color in the first mission
2015-05-31 16:32:02 +02:00
Oliver Brakmann
48b9e0b39f Merge pull request #8307 from wenzeslaus/ts-infantry-palette-order
reorder infantry build palette in TS mod
2015-05-31 16:23:53 +02:00
Matthias Mailänder
8fe57e80df fix an explicit NRE from Demolish.OnInside 2015-05-31 16:07:55 +02:00
Matthias Mailänder
723c2d82c8 fix a possible NRE 2015-05-31 15:58:55 +02:00
Pavel Penev
7ea0de0435 Merge pull request #8312 from Mailaender/pngloader-null-palette
Fixed a cryptic error message when feeding non-paletted PNGs into the command line utility
2015-05-31 16:49:39 +03:00
abcdefg30
3a9067db4d Fix the timer in allies02
... still ticking even when the convoy already approached
2015-05-31 15:41:36 +02:00
Matthias Mailänder
f171b23a1b move the null check up further to catch everything 2015-05-31 15:36:48 +02:00
Matthias Mailänder
a3c8d4691a add a missing dispose of the base class 2015-05-31 15:31:22 +02:00
Matthias Mailänder
aade0197ff fix a possible NRE 2015-05-31 15:24:06 +02:00
abcdefg30
203978ed1b Adjust the dogs generic name 2015-05-31 15:16:58 +02:00
Pavel Penev
03e377f107 Merge pull request #8310 from Mailaender/wrange-nre
Fixed a possible NRE in WRange.TryParse
2015-05-31 16:15:12 +03:00
abcdefg30
1fe68a8ef4 Don't crash when trying to protect a harvester against a dead (not in world) enemy 2015-05-31 15:08:59 +02:00
Matthias Mailänder
2b0421f692 throw before triggering an NRE by accessing a null array 2015-05-31 10:19:49 +02:00
Matthias Mailänder
87a4e3da26 avoid a possible NRE 2015-05-31 10:00:39 +02:00
Matthias Mailänder
3167ca48ff check if the neutral player is set up correctly 2015-05-31 09:44:50 +02:00
Matthias Mailänder
7186f654d7 avoid an unneeded loop 2015-05-31 09:43:35 +02:00
Matthias Mailänder
a12e6a191b Merge pull request #8302 from obrakmann/fix-nod05-invalid-owner
Fix an invalid owner init entry in nod05.
2015-05-31 09:14:50 +02:00
Matthias Mailänder
bb30a3c75a Merge pull request #8295 from obrakmann/fix8291_tesla_zap_in_fog
Fix tesla zaps being visible under the fog
2015-05-31 09:00:36 +02:00
Matthias Mailänder
bb9cd56f3d Merge pull request #8304 from penev92/bleed_speedModifier
Fix Mobile not using ISpeedModifier properly
2015-05-31 08:50:33 +02:00
Vaclav Petras
371f784d43 reorder infantry build palette in TS mod
The order is not the same as the original one (influenced by dependencies) but the main point is to have standard infantry (E1) first, E2 second, ENGINEER third, and the special units on last places. The biggest difference to the original is GDI MEDIC as last (which also applies when both GDI and NOD units are available).
2015-05-30 22:55:49 -04:00
penev92
fcd9906683 Make speedModifiers Lazy 2015-05-31 00:24:12 +03:00
Pavel Penev
3666fabf1e Merge pull request #8137 from Mailaender/sanitize-player-name
Added a client side player name sanitation
2015-05-30 22:21:32 +03:00
AoAGeneral
c72e89bb32 TD Balance Changes
http://www.sleipnirstuff.com/forum/viewtopic.php?f=82&t=17430

List of changes on forums.
2015-05-30 12:03:04 -07:00
penev92
5b00fddfc9 Make AttractsWorms upgradable 2015-05-30 20:01:47 +03:00
penev92
afb97ac4b4 Make WithInfantryBody upgradable 2015-05-30 20:01:38 +03:00
Oliver Brakmann
25b9c6f5f0 Fix an invalid owner init entry in nod05. 2015-05-30 18:51:11 +02:00
Oliver Brakmann
b56280e785 Merge pull request #8293 from MustaphaTR/d2k-stealth-raider-prerequisite
D2K - Fix Prerequisite of Stealth Raider
2015-05-30 13:03:34 +02:00
Oliver Brakmann
72b6feb186 Fix tesla zaps being visible under the fog 2015-05-30 11:22:00 +02:00
Mustafa Alperen Seki
6f8b062020 Add hightech to Prerequisite of Stealth Raider 2015-05-30 10:06:23 +02:00
Matthias Mailänder
fefad25d9d don't change player names without necessity 2015-05-30 09:20:44 +02:00
Matthias Mailänder
5a29e47f7c fix the Atreides color 2015-05-30 09:11:32 +02:00
Matthias Mailänder
eba0b263d3 Merge pull request #8288 from obrakmann/fix8287_ugly_mission_preview
Update gdi05a mission preview image.
2015-05-30 08:02:15 +02:00
abcdefg30
8b8ff92122 Merge pull request #8286 from penev92/bleed_lintDeathTypes
Add a lint check for DeathAnimations
2015-05-29 23:58:08 +02:00
abcdefg30
e26194686d Merge pull request #8289 from RoosterDragon/fast-case-premultiply
Speed up PremultiplyAlpha
2015-05-29 23:14:02 +02:00
penev92
6b4bf10227 Add lint rule for Death Types 2015-05-29 23:41:56 +03:00
penev92
f55573d37c Give D2k its own mission browser 2015-05-29 23:24:12 +03:00
Pavel Penev
c4d349ef2c Merge pull request #8117 from abcdefg30/atreides01
Added atreides-01a
2015-05-29 21:57:37 +03:00
RoosterDragon
1a89e91630 Fast case PremultiplyAlpha for opaque colors. 2015-05-29 19:50:33 +01:00
Paul Chote
8ae3afa3c5 Properly clean up traits that used to hook only death. 2015-05-29 19:21:35 +01:00
Paul Chote
4ff309811f Dispose actors when tearing down the world. 2015-05-29 19:21:34 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
Paul Chote
629f877032 Extract terrain vertex buffer into a reusable class. 2015-05-29 19:06:11 +01:00
Paul Chote
b1f4bd85d6 Accept an IntPtr for VertexBuffer.SetData. 2015-05-29 19:06:11 +01:00
Paul Chote
4df64eb18f Expose vertex components. 2015-05-29 19:06:11 +01:00
abcdefg30
4c72b0066c Merge pull request #8283 from obrakmann/fix8266_missing_damangetype_in_missions
Add a missing DamageType to missions which re-define weapons
2015-05-29 18:07:35 +02:00
Oliver Brakmann
33d67ceb01 Merge pull request #8070 from Phrohdoh/support-power-cursor
Move Cursor field to SupportPower.
2015-05-29 17:14:41 +02:00
Oliver Brakmann
5c42fb0dd0 Update gdi05a mission preview image. 2015-05-29 17:13:20 +02:00
Taryn Hill
4f222acf61 Upgrade rule for moving Cursor to SupportPower. 2015-05-29 09:47:09 -05:00
Taryn Hill
17a16ac8e0 Restore correct SupportPower cursors in yaml. 2015-05-29 09:47:09 -05:00
Taryn Hill
26a72fff5b Move Cursor field to SupportPower. 2015-05-29 09:47:05 -05:00
Oliver Brakmann
46f871c352 Add missing DamageType to deviator weapon 2015-05-29 14:48:23 +02:00
Oliver Brakmann
8b6c4a5b13 Merge pull request #8248 from Mailaender/premultiplied-geometric-renderers
Fixed transparency breakage on quad and line rendering
2015-05-29 14:11:28 +02:00
Oliver Brakmann
16a9b9284b Merge pull request #8167 from deniz1a/fix-sat-icon
Prevents satellite icons from being drawn over frozen actors.
2015-05-29 13:56:37 +02:00
Oliver Brakmann
311ec55190 Merge pull request #8154 from Mailaender/lint-spawn
Added lint rules to detect bad spawn points in maps.
2015-05-29 13:24:36 +02:00
Oliver Brakmann
c61b893e11 Add a missing DamageType to missions which re-define weapons 2015-05-28 22:23:59 +02:00
abcdefg30
66b2c539a2 Added atreides-01a 2015-05-28 21:16:12 +02:00
abcdefg30
ac1c8e68c4 Remove the redundant timer in d2k 2015-05-28 17:31:28 +02:00
Matthias Mailänder
6e6c8abc74 Merge pull request #8265 from abcdefg30/healanim
Don't skip the heal animation
2015-05-28 06:54:52 +02:00
abcdefg30
12966129a4 Merge pull request #8216 from Phrohdoh/fix-spy-exploit
Fix Disguise oversight.
2015-05-28 02:11:23 +02:00
Oliver Brakmann
3f320d0bf1 Merge pull request #8250 from 42foobar42/nod06c
added mission 6c nod
2015-05-28 00:31:30 +02:00
Oliver Brakmann
2ce9af41d3 Merge pull request #8275 from abcdefg30/FacingGlobal
Add default facings to lua
2015-05-27 23:51:10 +02:00
Oliver Brakmann
e25a6ed275 Merge pull request #8273 from abcdefg30/luaUI
Use the new lua UserInterface in the missions
2015-05-27 23:30:56 +02:00
Matthias Mailänder
34f3d2d5f1 avoid code duplication 2015-05-27 22:17:42 +02:00
Matthias Mailänder
05229e79ce use the new facing global 2015-05-27 22:17:42 +02:00
abcdefg30
59a5eb4937 Add default facings to lua 2015-05-27 22:17:41 +02:00
Matthias Mailänder
dec7ad1ee2 Merge pull request #8268 from obrakmann/fix8262_d2k_double_remove_from_world
Fix potentially removing actors twice from world in Actor::ChangeOwner
2015-05-27 22:03:43 +02:00
abcdefg30
91f62b5741 Expose more PlayerProperties to lua 2015-05-27 16:51:28 +02:00
abcdefg30
27db5851e2 Add default colors to HSLColorGlobal 2015-05-27 16:51:27 +02:00
abcdefg30
5aa9d50551 Use the new lua UserInterface in the missions 2015-05-27 16:51:26 +02:00
Oliver Brakmann
7ddf11433b Merge pull request #8243 from abcdefg30/capturecontrol
Fixed captured buildings producing bot controled units
2015-05-27 14:55:55 +02:00
abcdefg30
f88c1fd569 Merge pull request #8271 from obrakmann/fix8263_gdi05b_nod_attacks_world
Fix Nod attacking the world in gdi05b
2015-05-27 00:01:31 +02:00
Taryn Hill
70c61817d9 Fix oversight where disguising SpyA as a disguised SpyB uses the image and tooltip for SpyB instead of SpyB’s disguise. 2015-05-26 13:50:07 -05:00
Oliver Brakmann
75c2e7c12c Fix Nod attacking the world in gdi05b 2015-05-26 19:45:08 +02:00
Oliver Brakmann
7b3b2f85f8 Fix potentially removing actors twice from world in Actor::ChangeOwner 2015-05-26 17:16:56 +02:00
Oliver Brakmann
d3bda15bdc Merge pull request #8056 from penev92/bleed_carryalls
Added unit repair via order button with optional Carryall transport
2015-05-26 12:14:02 +02:00
abcdefg30
a39f966a11 Don't skip the heal animation 2015-05-26 12:00:10 +02:00
penev92
3bd8377154 Update D2k rules
Make use of WithDecorationCarryable
2015-05-26 12:44:20 +03:00
penev92
463ac0ddc2 Enable Repairable actors to call for transport to the repair pad 2015-05-26 12:44:18 +03:00
penev92
97e150e757 Introduce ICallForTransport + carryall code fixes 2015-05-26 12:43:35 +03:00
penev92
070e5109f5 Issue repair orders to Repairable units via RepairOrderGenerator 2015-05-26 12:43:34 +03:00
abcdefg30
3bf149222e Merge pull request #8192 from OpenRA/desktop-l10n
Added a German translation for the Linux desktop entry
2015-05-26 10:48:34 +02:00
Oliver Brakmann
641213696f Merge pull request #8191 from abcdefg30/luawidget
Add a custom text display to lua
2015-05-26 00:03:08 +02:00
Oliver Brakmann
8e9cab0079 Merge pull request #8257 from Mailaender/dereference-before-null-check
Removed an unnecessary (too late) null check at EditorResourceBrush.AllowResourceAt
2015-05-25 19:24:40 +02:00
Oliver Brakmann
efdd8198d9 Merge pull request #8259 from Mailaender/newsbutton-nre
Made the main menu news button optional
2015-05-25 19:18:28 +02:00
Oliver Brakmann
2b1c7f90a4 Merge pull request #8256 from Mailaender/voxel-fbo-nre
Fixed a dereference of an explicit null value in VoxelRenderer
2015-05-25 18:51:03 +02:00
Alexander Boll
5108975125 added mission 6c nod 2015-05-25 18:36:48 +02:00
Matthias Mailänder
fa8b4e67a3 made the news button optional 2015-05-25 18:29:36 +02:00
Matthias Mailänder
113bcebf35 remove unneccesary null check 2015-05-25 17:46:34 +02:00
Oliver Brakmann
0d8876a1de Merge pull request #8253 from Mailaender/editor-resource-brush-nre
Fixed a potential null reference exception during in-game editor resource placement
2015-05-25 17:42:28 +02:00
Matthias Mailänder
1b16a51021 fix a dereference of an explicit null value 2015-05-25 17:41:55 +02:00
abcdefg30
93d9398a64 Merge pull request #8255 from Mailaender/maptitle-nre
Fixed a NullReferenceException when not using the optional MAP LabelWidget
2015-05-25 17:04:42 +02:00
abcdefg30
0a60b78bec Merge pull request #8254 from Mailaender/colorpicker-preview-nre
Fixed a null reference exception in ColorPickerLogic when deciding not to use a ActorPreviewWidget
2015-05-25 17:00:38 +02:00
abcdefg30
d5ceb2623b Make use of the new lua UserInterface in survival02 2015-05-25 16:57:16 +02:00
abcdefg30
a5c9bc9a2c Expose an HSL color parameter to lua 2015-05-25 16:57:16 +02:00
abcdefg30
35374d168f Add support for custom mission timers: UserInterfaceGlobal 2015-05-25 16:57:15 +02:00
abcdefg30
852ea87daa Add lua support for nullables 2015-05-25 16:54:42 +02:00
Matthias Mailänder
015a083ced fix a possible NRE (copy and paste error) 2015-05-25 16:44:56 +02:00
Oliver Brakmann
9ec7f00635 Merge pull request #8252 from Mailaender/legacy-map-dispose-stream
Fixed missing dispose on stream in LegacyMapImporter
2015-05-25 16:42:41 +02:00
Oliver Brakmann
a060675951 Merge pull request #8251 from Mailaender/ini-stream-dispose
Fixed a resource leak in IniFile
2015-05-25 16:35:37 +02:00
Matthias Mailänder
a7cc11f625 fix a potential NRE 2015-05-25 16:35:02 +02:00
Matthias Mailänder
dd5eca7d1d fix a potential NRE 2015-05-25 16:26:14 +02:00
Matthias Mailänder
b4a67f412e fix missing dispose on stream in LegacyMapImporter 2015-05-25 16:08:52 +02:00
Matthias Mailänder
70fdb73127 fix missing dispose on stream in IniFile 2015-05-25 16:07:21 +02:00
abcdefg30
b771b3fd86 Disable hijackers in monster tank madness 2015-05-25 15:38:16 +02:00
abcdefg30
dcffbc3f11 Fixed captured buildings producing bot controled units 2015-05-25 15:29:55 +02:00
Matthias Mailänder
96e2c9bb79 use premultiplied alpha on geometric renderers
to fix transparency again
2015-05-25 13:39:38 +02:00
Oliver Brakmann
adf1bf30b6 Merge pull request #8199 from 42foobar42/nod06b
added mission 6b nod
2015-05-25 13:04:40 +02:00
Alexander Boll
e77123316e added mission 6b nod 2015-05-25 12:39:41 +02:00
Paul Chote
c7dc3737b1 Merge pull request #8237 from Mailaender/appveyor-geoip-copy
Fixed make dependencies not copying the cached GeoLite2-Country.mmdb.gz into the root.
2015-05-25 10:39:19 +01:00
Matthias Mailänder
cefa5013ad Merge pull request #8246 from jacobdufault/remove-unused-usings
Remove some unused using statements
2015-05-25 11:17:20 +02:00
Jacob Dufault
d9b39d15d4 Remove some unused using statements 2015-05-25 02:00:45 -07:00
deniz1a
106286da23 Prevents satellite icons from being drawn over frozen actors. 2015-05-25 06:31:04 +03:00
abcdefg30
ed4b3f9970 Merge pull request #8239 from Mailaender/playtest-20150524-CS0219
Fixed the build of playtest-20150524 on Mono 2.10
2015-05-25 01:33:36 +02:00
Oliver Brakmann
9b4095ee55 Merge pull request #8240 from pchote/fix-nuke-flashes
Fix nuke flashes
2015-05-24 21:42:21 +02:00
Paul Chote
dae5703c71 Add nuke flash to D2K. 2015-05-24 18:39:51 +01:00
Paul Chote
322285ef66 Update NukePaletteEffect for premultiplied alpha. 2015-05-24 18:32:42 +01:00
Matthias Mailänder
04be567813 fix error CS0219:
The variable `zoom' is assigned but its value is never used
2015-05-24 19:12:51 +02:00
Matthias Mailänder
fbef65bae9 copy it in the make dependencies step 2015-05-24 17:28:47 +02:00
Paul Chote
2cc125a3fa Merge pull request #8236 from Mailaender/win-geoip-gz
Fixed a GeoLite2-Country DB filename in Windows fetch scripts.
2015-05-24 15:37:38 +01:00
Matthias Mailänder
f2124f7ebe fix file name 2015-05-24 16:17:43 +02:00
Oliver Brakmann
a507b7d567 Merge pull request #8196 from Mailaender/stylecop-mono-4
Fixed StyleCop on Mono 4
2015-05-24 16:02:13 +02:00
Pavel Penev
902cd124ba Merge pull request #8149 from Mailaender/fetch-geoip-db
Automatized GeoIP database download
2015-05-24 16:43:22 +03:00
Paul Chote
767a63d43e Merge pull request #8235 from obrakmann/map-chooser-delete-unpacked-maps
Fix inability to delete unpacked maps
2015-05-24 13:53:27 +01:00
Oliver Brakmann
331ad217c2 Fix inability to delete unpacked maps 2015-05-24 14:32:46 +02:00
Paul Chote
c5614d4c3a Merge pull request #8223 from Mailaender/fix-sequences
Fixed several broken YAML sequences
2015-05-24 13:12:22 +01:00
Pavel Penev
9ed7ef10b9 Merge pull request #8227 from obrakmann/fix8219_rise_of_the_undead_bridges
Fix broken bridges being initialized with a non-zero HP value
2015-05-24 15:05:29 +03:00
Paul Chote
8483152a3c Merge pull request #8222 from Mailaender/water-troopers
Fixed the AI not avoiding boats when searching for viable paradrop targets
2015-05-24 12:54:48 +01:00
Pavel Penev
3ebb6573a4 Merge pull request #8228 from Mailaender/render-trait-doc
Added render trait documentation
2015-05-24 14:41:44 +03:00
Matthias Mailänder
5b5b0c02dd add trait documentation 2015-05-24 13:37:04 +02:00
Matthias Mailänder
5838dc39fc Merge pull request #8231 from obrakmann/map-chooser-addendum
Fix map chooser crashing the server creation dialog in cnc
2015-05-24 13:32:27 +02:00
Matthias Mailänder
472de004ed Merge pull request #8232 from obrakmann/fix_game.exe.config_removal
Fix OpenRA.Game.exe.config issues
2015-05-24 13:30:14 +02:00
Oliver Brakmann
c6c9863681 Merge pull request #8176 from pchote/fix-palette-alpha
Load textures using premultiplied alpha.
2015-05-24 13:15:54 +02:00
Oliver Brakmann
88d448bf40 Merge pull request #8229 from Mailaender/noget
Added a NuGet replacement script as fallback
2015-05-24 12:18:58 +02:00
Oliver Brakmann
fac0991901 Fix OpenRA.Game.exe.config not being copied to the built dir during packaging 2015-05-24 12:17:43 +02:00
Oliver Brakmann
29efb0675d Fix OpenRA.Game.exe.config being removed by 'make clean' 2015-05-24 12:08:30 +02:00
Oliver Brakmann
00bf032a8f Fix custom map tab offset in cnc mod 2015-05-24 11:45:37 +02:00
Oliver Brakmann
6f0e155afb Fix map chooser crashing the server creation dialog in cnc 2015-05-24 11:40:33 +02:00
Pavel Penev
f2abf10670 Merge pull request #8230 from reaperrr/grav-bomb-fix
Made projectiles accept empty to disable image or sequence
2015-05-24 11:32:48 +03:00
Matthias Mailänder
b2fc8585e0 unify the spelling towards the official one 2015-05-24 10:24:47 +02:00
Matthias Mailänder
c4deaef163 remove nuget until the connectivity problems are resolved 2015-05-24 10:24:22 +02:00
Matthias Mailänder
dd19d9127b add a fallback if nuget is not available on the system 2015-05-24 10:24:19 +02:00
reaperrr
6ab73fa982 Made projectile effects accept empty values to disable/negate image or sequence.
In addition to accepting null.
2015-05-24 10:02:53 +02:00
Matthias Mailänder
cc34463019 require DetectCloaked as it is useless otherwise 2015-05-24 09:06:03 +02:00
Matthias Mailänder
d0b3e5fb8b Merge pull request #8114 from penev92/bleed_d2kUpgrades
Add D2k building upgrades
2015-05-24 08:23:28 +02:00
Matthias Mailänder
d87d3e5283 Merge pull request #8220 from abcdefg30/bombletcrash
Fix a crash in the ParaBomb weapon defintion
2015-05-24 08:10:23 +02:00
Pavel Penev
9e0e866199 Merge pull request #8207 from obrakmann/map-chooser-overhaul
Split maps into system and custom maps in the map chooser
2015-05-24 04:12:23 +03:00
Oliver Brakmann
d9f0ca362f Fix broken bridges being initialized with a non-zero HP value 2015-05-24 02:02:20 +02:00
Oliver Brakmann
dc08b7a90a Add buttons for map file management to map chooser 2015-05-24 01:49:30 +02:00
abcdefg30
8c59016853 Merge pull request #8066 from penev92/bleed_warheads
Remove DeathType from DamageWarhead
2015-05-24 01:33:44 +02:00
Oliver Brakmann
1854d994fd Split map chooser in system- and user-installed map lists 2015-05-24 01:28:22 +02:00
Oliver Brakmann
72c0f9b8dc Allow non-hosts to open the map chooser 2015-05-23 23:38:30 +02:00
penev92
9ea78285fa Add an upgrade rule for DeathSounds.DeathTypes 2015-05-24 00:16:26 +03:00
penev92
1c44fcbad4 Add upgrade rules to remove DamageWarhead.DeathType
and replace it with proper DamageTypes
2015-05-24 00:15:09 +03:00
penev92
b5e4876b7f Add DeathTypes to WithDeathAnimation 2015-05-24 00:15:08 +03:00
penev92
32bb70abca Remove DamageWarhead.DeathType in favor of DamageWarhead.DamageTypes 2015-05-24 00:15:07 +03:00
Matthias Mailänder
a2c553478d fetch GeoLite2-Country.mmdb.gz after 30 days of file age 2015-05-23 22:45:31 +02:00
Matthias Mailänder
c76fb51b14 Merge pull request #8208 from penev92/bleed_registerFileTypes
Register .orarep file type and openra:// URI scheme on Windows
2015-05-23 22:27:41 +02:00
penev92
b1c36246cf Clean Windows registry on uninstall 2015-05-23 23:15:51 +03:00
Matthias Mailänder
486c7527c9 Merge pull request #8012 from reaperrr/voiceset
Extracted actor Voices from Selectable into own Voiced trait
2015-05-23 21:59:34 +02:00
Pavel Penev
54e806568a Merge pull request #7934 from Mailaender/mime-join
Registered the openra:// protocol to join games on Linux
2015-05-23 22:39:17 +03:00
Matthias Mailänder
44a4c0600e redirect Microsoft.Build.Framework.dll on Mono 4 2015-05-23 18:30:12 +02:00
Matthias Mailänder
9773cca214 rename and fix unused sequences 2015-05-23 16:10:55 +02:00
Matthias Mailänder
47927963a7 fix misnamed TakeCover sequence 2015-05-23 16:10:55 +02:00
Matthias Mailänder
13a8f6f5bd remove duplicate and unused land animation 2015-05-23 16:10:55 +02:00
Matthias Mailänder
c88daef3b3 fix missing make and crumble animation 2015-05-23 16:10:52 +02:00
Matthias Mailänder
a424440cd2 fix missing aim sequence 2015-05-23 16:10:29 +02:00
Matthias Mailänder
861ebd61b7 fix missing make animation for civilian buildings 2015-05-23 16:10:26 +02:00
Matthias Mailänder
add0cc565a don't paradrop units near boats 2015-05-23 16:05:56 +02:00
Matthias Mailänder
8e919d3215 move GeoIP functions into it's own class
extract the geoip database .gz in-game
2015-05-23 16:00:46 +02:00
Matthias Mailänder
edca755540 also sanitize server names 2015-05-23 15:07:18 +02:00
Matthias Mailänder
736b169319 sanitize player names 2015-05-23 15:07:13 +02:00
reaperrr
a99f69035c Made AnnounceOnKill and AnnounceOnBuild voices customisable. 2015-05-23 13:53:38 +02:00
reaperrr
3777a8bca9 Moved Voice-related extensions to VoiceExts.
Note: This is a work-around until Selectable can be moved to Mods.Common, which is when the voice extensions should be moved back to ActorExts.

Pulled phrase check before foreach in PlayVoice ActorExts.
Removed superflous actor parameter from PlayVoice/PlayVoiceLocal.

Simplified PlayVoice extensions.

variant is no longer customisable, as all current usages use self.Owner.Country.Race anyway.
2015-05-23 13:46:01 +02:00
abcdefg30
b5b2a6bdcb Fix a crash in the ParaBomb weapon defintion
in Fort Lonestar and Survival02
2015-05-23 13:31:45 +02:00
Paul Chote
80a54fe4fe Fix repair depot lights. 2015-05-23 08:50:29 +01:00
Paul Chote
5532ed4fc9 Remove now-redundant blend code. 2015-05-23 08:50:28 +01:00
Paul Chote
4eb76046f4 Fix deviator gas blending. 2015-05-23 08:50:28 +01:00
Paul Chote
26fd858fc7 Use premultiplied alpha for all textures and blending. 2015-05-23 08:50:28 +01:00
Matthias Mailänder
78f1e9fb2f Merge pull request #8215 from abcdefg30/raflare
Removed bogus traits from ra FLARE
2015-05-23 08:50:21 +02:00
abcdefg30
89db7bbf05 Add a tooltip to FLARE 2015-05-22 23:25:42 +02:00
Oliver Brakmann
e75e6fee0e Remove superfluous traits from crate actor definitions 2015-05-22 22:29:07 +02:00
abcdefg30
bc55748e81 Removed bogus traits from FLARE 2015-05-22 22:29:06 +02:00
penev92
42af5f0939 Fix how OpenRA.exe launches OpenRA.Game.exe 2015-05-22 20:38:45 +03:00
penev92
cffc01ab28 Register .orarep file type and openra:// URI scheme on Windows 2015-05-22 20:38:41 +03:00
Pavel Penev
fe45a85349 Merge pull request #8187 from Mailaender/travis-windows-deploy
Brought back the Windows setup deployment via Travis CI
2015-05-22 20:03:28 +03:00
Pavel Penev
0d33fdb5e1 Merge pull request #8200 from RoosterDragon/sheet-fixes
Sheet fixes
2015-05-22 18:30:13 +03:00
Pavel Penev
686e01c6cc Merge pull request #8193 from RoosterDragon/line-render-perf
Improve performance of line rendering
2015-05-22 17:51:11 +03:00
Pavel Penev
bd7838bdb6 Merge pull request #8211 from obrakmann/fix8175_ext-editor-breakage
Fix legacy editor
2015-05-22 17:19:59 +03:00
Pavel Penev
beb1481107 Merge pull request #8195 from obrakmann/fix8181_reveal_fakes_with_unit_selection_key
Fix revealing fakes by double-clicking a building
2015-05-22 17:09:00 +03:00
reaperrr
b9e8406aeb Fix Unload definition in voice sets. 2015-05-22 01:51:56 +02:00
reaperrr
5e2c781c8a Adds PlayVoice, PlayVoiceLocal and HasVoice to ActorExts.
Makes Cargo unload voice customisable.
2015-05-22 01:51:55 +02:00
reaperrr
5f68516070 Cleaned up IVoiced-related code.
Added Volume control and descriptions to Voiced.

Streamline voice checks in WorldUtils and DeathSounds.
2015-05-22 01:51:54 +02:00
reaperrr
251d3e6864 Move PlayVoice and PlayVoiceLocal from Sound to Voiced.
Move HasVoice, HasVoices and GetVoices from WorldUtils to Voiced.
2015-05-22 01:51:53 +02:00
reaperrr
037bd6794c Upgrade rules for moving Voice to Voiced trait 2015-05-22 01:51:52 +02:00
reaperrr
0d05fdefbb Extract actor voice set into Voiced trait 2015-05-22 01:51:51 +02:00
Oliver Brakmann
f8774dd575 Adjust legacy editor after moving player palettes to the World actor 2015-05-21 21:30:35 +02:00
Oliver Brakmann
b35491d609 Fixed reading past the bounds of the map when rendering in the legacy editor 2015-05-21 21:29:59 +02:00
Pavel Penev
66f99704a8 Merge pull request #8209 from Mailaender/mono2-CS0172
Fixed a compilation error on Mono 2.10
2015-05-21 22:06:54 +03:00
Matthias Mailänder
31d1f0bcf9 fix error CS0172 2015-05-21 20:43:45 +02:00
Pavel Penev
21d1348ea3 Merge pull request #8202 from deniz1a/revert-8097
Reverts #8097.
2015-05-21 21:38:10 +03:00
Matthias Mailänder
b518e5949c register the openra:// protocol to join games 2015-05-21 20:33:42 +02:00
Matthias Mailänder
da2b7e687c add a new Launch.URI parameter 2015-05-21 20:33:36 +02:00
Oliver Brakmann
d46cf70b00 Make d2k AI aware of buildings upgrades 2015-05-21 21:26:16 +03:00
OmegaBolt
8b5353e39b Fix D2k tech tree
- Added upgrades for the Con Yard, Barracks, Light, Heavy and High Tech Factory (last one is Atreides only)
- Updated the prerequisites of all structures, infantry and vehicles to use the upgrades
- Fixed the Ix Research building to use vanilla Dune 2000 prerequisites
- Renamed High Tech Facility to High Tech Factory like vanilla Dune 2000
- Given the Air Strike power to the High Tech Factory Upgrade like vanilla
2015-05-21 21:26:14 +03:00
OmegaBolt
340c8dad21 Add D2k building upgrades 2015-05-21 21:26:12 +03:00
OmegaBolt
f3ec07d4e4 Add Upgrade production queue to D2k 2015-05-21 21:26:10 +03:00
Matthias Mailänder
81608a3282 remove unused replay launch script 2015-05-21 18:45:57 +02:00
abcdefg30
0b09b82254 Merge pull request #8198 from Mailaender/net40-thirdparty-dll
Fixed SystemNotSupportedException caused by thirdparty mod DLLs on .NET > 4.0
2015-05-21 17:20:42 +02:00
Oliver Brakmann
5c95c7e157 Merge pull request #8130 from Mailaender/tileset-filters
Fixed glitchy remap errors of non-fitting actors on certain tilesets
2015-05-21 16:27:37 +02:00
Matthias Mailänder
07fb7f921f bring back system markdown 2015-05-21 11:54:21 +02:00
Matthias Mailänder
f079b1980f switch back to the old Travis infrastructure 2015-05-21 11:53:47 +02:00
Igor Popov
28e1eccf29 Merge pull request #8206 from baxxxster/bleed
Added possibility to use spaces in Server.Name
2015-05-21 12:25:25 +03:00
Glenn Martin Jensen
615c22f158 Added possibility to use spaces in Server.Name
This way it's easier for others to set a servername with spaces in it by
default
2015-05-21 09:49:04 +02:00
Matthias Mailänder
27cbfd9bb1 Merge pull request #8204 from reaperrr/group-sel-bug
Fixes bug that selection voices are played twice when selecting groups
2015-05-21 08:04:18 +02:00
reaperrr
75a0ff7702 Fixes the bug that selection voices are played twice when selecting groups
via 0-9 hotkeys.

Problem was that the voice was played for both KeyUp and KeyDown events.

Closes #8121.
2015-05-21 03:01:13 +02:00
deniz1a
e290975952 Reverts #8097.
It caused units not targeting enemies under fog even with satellite.
2015-05-21 00:24:27 +03:00
Oliver Brakmann
1f17ec4d4f Merge pull request #8201 from Mailaender/isometric-editor-sprites
Fixed Tiberian Sun multiplayer spawn and waypoints
2015-05-20 21:56:07 +02:00
Matthias Mailänder
d9b0e00b41 isometric waypoints 2015-05-20 21:17:20 +02:00
Matthias Mailänder
ca73b9612a isometric spawn points 2015-05-20 21:17:14 +02:00
RoosterDragon
b48b994f16 Remove half-baked thread-safety mechanisms from Sheet.
Sheet is now thread-unsafe, rather than attempting to expose a dodgy thread safety model.
2015-05-20 18:50:28 +01:00
RoosterDragon
d42c3a9740 Allow a sheet buffer to be released without error, even if unbuffered. 2015-05-20 18:35:24 +01:00
Matthias Mailänder
9e81a05f86 allow 3rd-party mod DLLs on .NET > 4.0 2015-05-20 19:32:19 +02:00
Oliver Brakmann
da16142412 Enable unit selection keys for spectators and in replays.
Only work in per-player views.
2015-05-20 18:56:14 +02:00
Oliver Brakmann
9895aee6f2 Disable unit selection by double-clicking for enemy units 2015-05-20 18:28:34 +02:00
Oliver Brakmann
5db63ba7aa Merge pull request #8123 from 42foobar42/nod06a
added mission 6a nod
2015-05-20 17:12:39 +02:00
abcdefg30
e725732f69 Merge pull request #8078 from Mailaender/make-all-docs
Fixed the trait documentation
2015-05-20 17:05:46 +02:00
Alexander Boll
da3d177c60 added mission 6a nod 2015-05-20 16:29:58 +02:00
Matthias Mailänder
9c53ff1403 Merge pull request #8103 from RoosterDragon/mapcache-better-threading
Fix graphical glitches & crashes related to map loading
2015-05-20 13:11:44 +02:00
Matthias Mailänder
1e7e2aa1e0 Merge pull request #8085 from abcdefg30/funpark
Add funpark01 - Take #3
2015-05-20 13:01:36 +02:00
RoosterDragon
b9ebeaadca Improve performance of line rendering.
- Create an overload that renders a line in one color, as this allows most existing calls to be simplified. This also allows a slight performance improvement by only normalizing the components once.
- Introduce a DrawLineStrip method. This improves performance by allowing the color components to be normalized once for the whole strip, and only needing to calculate vertices once per point rather than twice since we can reuse the last result.
2015-05-19 21:41:50 +01:00
Matthias Mailänder
1fa70b959d Update openra.desktop
translate the generic name to German
2015-05-19 22:00:07 +02:00
Oliver Brakmann
9397749118 Merge pull request #8097 from deniz1a/cloaked-targetability
Fixes location of phase transport being revealed by attack line.
2015-05-18 23:04:09 +02:00
Matthias Mailänder
6f3c11da1d remove actors without palette glitches, but non-sensical 2015-05-18 19:41:47 +02:00
Matthias Mailänder
2fbe7b0013 filter actors with glitchy remap errors on certain tilesets 2015-05-18 19:12:20 +02:00
Matthias Mailänder
fd85b208fa update documentation 2015-05-18 18:54:53 +02:00
Matthias Mailänder
2eac646929 deploy Windows setup with Travis CI only 2015-05-18 18:54:41 +02:00
Pavel Penev
a47235d162 Merge pull request #8065 from pchote/ingame-map-editor
Add the new map editor.
2015-05-18 19:16:16 +03:00
Pavel Penev
5d593de09d Merge pull request #8183 from Mailaender/unused-tilestart
Fixed the build for Mono 2.10 again
2015-05-17 22:02:15 +03:00
Matthias Mailänder
ffffe0089a fix error CS0219:
The variable `tileStart' is assigned but its value is never used
2015-05-17 20:34:47 +02:00
Pavel Penev
53af3df3ee Merge pull request #8174 from abcdefg30/formattime
Added a FormatTime function to UtilsGlobal.cs
2015-05-17 17:48:23 +03:00
Pavel Penev
d978fff982 Merge pull request #8106 from reaperrr/cnc-fixes
Several TD mod fixes
2015-05-17 17:39:33 +03:00
Pavel Penev
d718a5a5ca Merge pull request #8094 from reaperrr/hackyai-tweaks
Make HackyAI squad creation a little more flexible and controllable
2015-05-17 17:28:02 +03:00
Pavel Penev
2230daee14 Merge pull request #8179 from Mailaender/ts-skirmish-stats
Added skirmish stats to Tiberian Sun
2015-05-17 15:38:50 +03:00
Paul Chote
09e4c5c5ab Merge pull request #8109 from reaperrr/fix-idleoverlay
Fixes WithIdleOverlay to start with first frame after make animation
2015-05-17 13:06:44 +01:00
Paul Chote
60f96fcb7b Overhaul save panel. 2015-05-17 12:09:41 +01:00
Paul Chote
445c0d76a2 Fix create map panel geometry. 2015-05-17 12:09:40 +01:00
Matthias Mailänder
0638f1ce7d add skirmish stats
fixes #7728
2015-05-17 10:37:49 +02:00
deniz1a
db38f52721 Fixes location of phase transport being revealed by attack line. 2015-05-16 15:20:07 +03:00
abcdefg30
d50ed6ec2f Replace a bogus tab 2015-05-16 13:19:46 +02:00
abcdefg30
2fd91c53f2 Remove trailing spaces from nod04b map.yaml 2015-05-16 13:19:45 +02:00
abcdefg30
57dbdd097d Add a FormatTime function to UtilsGlobal.cs 2015-05-16 13:19:44 +02:00
Paul Chote
469f47aeea Add new map editor UI. 2015-05-15 17:09:27 +01:00
Paul Chote
d211fe9fe1 Add the world components of the new editor. 2015-05-15 17:09:20 +01:00
Matthias Mailänder
1f024a8695 Add menu plumbing for the new map editor. 2015-05-15 17:08:33 +01:00
Paul Chote
444c02a498 Add ClickThrough property to ContainerWidget. 2015-05-15 17:08:32 +01:00
Paul Chote
b1dc5012c3 Don’t crash if IQBO isn’t present on an actor. 2015-05-15 17:08:32 +01:00
Paul Chote
038847cc4c Force the first template variant in TTPW. 2015-05-15 17:08:32 +01:00
Paul Chote
443bc63fa7 Render terrain grid above actors, too. 2015-05-15 17:08:31 +01:00
Paul Chote
b889101ba1 Make sure that ScreenMap is initialized before other traits. 2015-05-15 17:08:31 +01:00
Paul Chote
9e5e1f1a89 Add methods to IOccupySpaceInfo. 2015-05-15 17:08:31 +01:00
Paul Chote
5754de141d Add Remove support to TypeDictionary. 2015-05-15 17:08:30 +01:00
abcdefg30
f65d9ab584 Merge pull request #8166 from Mailaender/win-dedicated-launcher
Added a Windows dedicated server launch script
2015-05-15 17:36:48 +02:00
Glen Anderson
71c42f5b38 add a Windows dedicated server launch script 2015-05-15 17:12:03 +02:00
Pavel Penev
29c4b646e3 Merge pull request #8144 from abcdefg30/lowfakepower
Add a low power overlay to fake structures
2015-05-15 15:40:35 +03:00
abcdefg30
70e7b33fd7 Merge pull request #7979 from Mailaender/d2k-sand-blendmode
Fixed the Dune 2000 harvester sand out animation
2015-05-14 19:21:06 +02:00
abcdefg30
48a9807273 Merge pull request #8164 from Mailaender/common-render-voxel
Moved the generic voxel rendering traits to Mods.Common
2015-05-14 17:38:06 +02:00
Matthias Mailänder
7e1c3047f6 move generic Voxel render traits to Mods.Common 2015-05-14 17:02:47 +02:00
abcdefg30
96767bab5d Add funpark01 2015-05-14 16:57:30 +02:00
abcdefg30
db3f84e361 Merge pull request #8158 from deniz1a/nodogspy
Removes Spy's ability to disguise as Attack Dog or Giant Ant.
2015-05-14 16:49:23 +02:00
Matthias Mailänder
e8144e1194 Merge pull request #8161 from LipkeGu/ts_music_installer
Allow music download for TS
2015-05-14 16:21:01 +02:00
abcdefg30
e338c63203 Add attack sounds for dinos 2015-05-14 14:07:18 +02:00
abcdefg30
4d864c9aaf Add selection boxes for dinos 2015-05-14 14:07:17 +02:00
Guido L
004c7316fc Allow music download 2015-05-14 13:51:03 +02:00
reaperrr
e190093ac4 Fix WithIdleOverlay to start with first frame after make animation 2015-05-13 23:18:59 +02:00
reaperrr
0d3dd28a3f Unharcode squad randomization, add minimum delay for creating attack force 2015-05-13 22:50:23 +02:00
Deniz Ayikol
153bac4602 Removes Spy's ability to disguise as Attack Dog and Giant Ant. 2015-05-13 20:03:26 +03:00
Matthias Mailänder
a943fbc94e check for duplicate spawn point locations 2015-05-13 15:28:19 +02:00
Matthias Mailänder
bb08537c44 check for too few/many spawn points/player definitions 2015-05-13 15:27:11 +02:00
Pavel Penev
7154ce4a2f Merge pull request #8147 from DeadlySurprise/vqaAudioFix
Fixed gdi3lose.vqa crash
2015-05-13 03:50:45 +03:00
Oliver Brakmann
1c75d62d4c Merge pull request #8150 from penev92/bleed_factionDescriptions
Add faction description tooltips to TD
2015-05-12 21:26:43 +02:00
penev92
c352e5309d Add faction description tooltips to TD 2015-05-12 22:07:47 +03:00
Matthias Mailänder
e80641940b Merge pull request #8151 from abcdefg30/armordropAI
ArmorDrop has been removed
2015-05-12 19:14:00 +02:00
abcdefg30
d62b01d294 Merge pull request #7538 from cjshmyr/teamhealth
Give ally players a yellow health bar (team health colors)
2015-05-12 18:01:27 +02:00
abcdefg30
e9884b740b ArmorDrop has been removed 2015-05-12 13:53:08 +02:00
Pavel Penev
5fc452412a Merge pull request #8148 from Mailaender/thanks-ihptru
Moved ihptru on top of the Credits
2015-05-11 23:33:50 +03:00
Matthias Mailänder
9f3008456e move ihptru up front 2015-05-11 22:08:41 +02:00
DeadlySurprise
35445775c2 Fixed crash 2015-05-11 18:19:06 +02:00
abcdefg30
5553f55705 Merge pull request #8087 from 42foobar42/nod5
added mission 5 nod
2015-05-11 17:03:50 +02:00
abcdefg30
e55364dd0f Add a low power overlay to fake structures 2015-05-11 16:35:17 +02:00
Pavel Penev
648dc31e24 Merge pull request #8131 from obrakmann/fix8129_hotkey_input_lose_focus
Fix HotkeyEntryWidget keeping keyboard focus after receiving input
2015-05-11 03:42:30 +03:00
Pavel Penev
ffd45e9b04 Merge pull request #7982 from Mailaender/ts-obelisk
Added the Tiberian Sun Nod Obelisk charge animation
2015-05-11 03:30:48 +03:00
Matthias Mailänder
69ce877a89 Merge pull request #8083 from obrakmann/separate_download_dir
Closes #8069
2015-05-10 21:30:38 +02:00
Alexander Boll
6a2b9fc41b added mission 5 nod
Update nod05
2015-05-10 19:43:42 +02:00
Curtis Shmyr
6ca51e47c1 Give ally players a yellow hp bar for team health colors 2015-05-10 11:12:10 -06:00
Matthias Mailänder
4b50f34c46 Merge pull request #7849 from penev92/bleed_notifications
Add new enemy detection voice notifications to RA and D2k
2015-05-10 18:32:13 +02:00
Oliver Brakmann
7ef14f56e2 Fix HotkeyEntryWidget keeping keyboard focus after receiving input 2015-05-10 17:46:39 +02:00
Oliver Brakmann
0f7aaf3445 Merge pull request #8125 from pchote/player-palettes
Reorganize palette loading.
2015-05-10 17:35:34 +02:00
Oliver Brakmann
53995bf3f3 Merge pull request #7938 from Mailaender/appdata
Added Linux app store data metadata
2015-05-10 16:02:43 +02:00
Matthias Mailänder
3d23897af0 install Linux app store data metadata 2015-05-10 15:38:01 +02:00
Matthias Mailänder
0e987137a2 Merge pull request #8124 from pchote/actorpreview-owners
Remove Owner from ActorPreviews.
2015-05-10 14:21:44 +02:00
Paul Chote
889360d4c6 Regenerate cached texture indices when the palette size changes. 2015-05-10 00:59:15 +01:00
Paul Chote
c0282bdff9 Remove Owner from ActorPreviews. 2015-05-10 00:01:43 +01:00
Paul Chote
7eae157ad8 Rework player palette loading. 2015-05-10 00:01:14 +01:00
Paul Chote
1d835edfca Split PaletteReference into its own file. 2015-05-09 22:36:28 +01:00
Matthias Mailänder
d99ae3bcb9 split render building/overlay and play sound for charge
to add the Tiberian Sun Nod Obelisk

tick slightly faster

tweak the local offsets
2015-05-09 19:56:15 +02:00
Oliver Brakmann
d3f76f13a1 Merge pull request #8048 from 42foobar42/nod4b
added nod4b
2015-05-09 12:56:01 +02:00
Alexander Boll
912ab4d1b8 added nod4b 2015-05-09 12:10:35 +02:00
Scott
c9d6760972 Merge pull request #8104 from penev92/bleed_factionDescriptions
Add D2k faction description tooltips
2015-05-09 13:13:22 +12:00
Oliver Brakmann
0c1b825877 Adjust travis-ci caching
1. Removes the APT caching, since it's not available on the docker infrastructure.
2. Enables caching for the dependency download directory.
2015-05-08 20:59:45 +02:00
Oliver Brakmann
71857be388 Make packaging less noisy, + random cleanups 2015-05-08 20:59:45 +02:00
Oliver Brakmann
f251813f89 Keep downloaded files in a separate directory
As a side effect, this re-enables building the Windows installer on Linux hosts.
2015-05-08 20:59:24 +02:00
Oliver Brakmann
14886bc3f7 Merge pull request #8101 from penev92/bleed_references
Cleanup unused DLL references
2015-05-08 20:41:37 +02:00
penev92
873c47127a Add "Enemy detected" notification to RA 2015-05-08 20:07:08 +03:00
penev92
606f69ed7c Add "Enemy units detected" notifications to D2k 2015-05-08 20:06:56 +03:00
penev92
8e730c264f Revert removal of EnemyWatcher and AnnounceOnSeen traits from RA and D2k 2015-05-08 20:06:52 +03:00
Paul Chote
ba131fcf0a Merge pull request #7805 from penev92/bleed_prerequisites
Make buildings explicitly provide their names as prerequisites
2015-05-08 17:29:22 +01:00
Pavel Penev
0d759eee2a Merge pull request #8061 from Phrohdoh/with-decoration
Implement WithDecoration and subtraits.
2015-05-08 18:02:13 +03:00
Taryn Hill
cace31f5e9 Implement WithDecorationCarryable. 2015-05-08 09:55:40 -05:00
Taryn Hill
dd1cc4eb2f Implement WithDecorationDisguised. 2015-05-08 09:55:40 -05:00
Taryn Hill
d57d7c522f Implement WithDecoration. 2015-05-08 09:55:31 -05:00
Pavel Penev
3eb556258d Merge pull request #8021 from sinf/quickbuild
Added quick build feature
2015-05-08 17:53:57 +03:00
abcdefg30
4d0fb8b931 Merge pull request #8102 from RoosterDragon/objective-size
Fix objectives window
2015-05-08 15:24:29 +02:00
reaperrr
89845272e0 Add two previously unused voices to Commando voice set 2015-05-08 02:59:08 +02:00
reaperrr
f7c69b4801 Split radar dish from Nod airfield and make it an idle overlay 2015-05-08 02:59:07 +02:00
reaperrr
d441d9bd6e Converted rank and levelup art to cnc palette 2015-05-08 02:59:06 +02:00
reaperrr
c88ee0f56a Tweaked Break of Day and Chokepoint
Break of Day:
- fixed tiberium tree positions
- fixed a minor tile error near a river

Chokepoint:
- replaced temperate tree groups with large desert tree
2015-05-08 02:59:05 +02:00
reaperrr
fe0c21aa91 Significantly improved Rogue States
- fixed most, possibly all cliff errors
- fixed many river, shore and road errors
- hid a few remaining shore errors behind trees/rocks
- fixed positions of all tiberium trees (1 cell down)
- replaced temperate tree groups with large desert tree
- tweaked position of some buildings at the border of the map so they're more visible (instead of half-hidden below shroud edge)
2015-05-08 02:59:03 +02:00
reaperrr
9a23ef2ac5 Significantly improved Necessary Illusions
- fixed all cliff tile errors
- fixed most noticable river errors
- fixed some noticable road errors
- fixed position of all tiberium trees (regression from #5198)
2015-05-08 02:59:01 +02:00
penev92
58ecf9cbac Add D2k faction descriptions to the lobby 2015-05-08 01:54:11 +03:00
RoosterDragon
a42b69bd98 Give objectives proper sizing.
This gives the container an actual size, which prevents the scroll panel logic skipping rendering in the belief that it is not visible.
2015-05-07 21:07:35 +01:00
RoosterDragon
3b5a672848 Always access the SheetBuilder from the main thread in MapCache.
Not doing this can occasionally this can result in a cross thread call to the backing texture which leads to bad things. This stops trying to be clever regarding the thread safety invariants exposed by SheetBuilder and does things simply and safely: All updates happen on the main thread.
2015-05-07 20:58:59 +01:00
Matthias Mailänder
4dbdd365de also version the all helper mod 2015-05-07 21:25:32 +02:00
Oliver Brakmann
2e11b5d809 Merge pull request #8099 from pchote/scrollpanel-move-regression
Only issue a MouseMove event if the scroll offset actually changed.
2015-05-07 19:23:45 +02:00
Oliver Brakmann
1fe8b98415 Merge pull request #8095 from penev92/bleed_tiles
Add one more D2k tile definition
2015-05-07 19:10:47 +02:00
penev92
bb51657e40 Cleanup unused DLL references 2015-05-07 18:59:01 +03:00
penev92
dc3ae39db1 Rename ProvidesCustomPrerequisite to ProvidesPrerequisite 2015-05-07 03:04:11 +03:00
Paul Chote
88221423b6 Only issue a MouseMove event if the scroll offset actually changed. Fixes #8098. 2015-05-06 21:51:24 +01:00
penev92
95eb8b27b5 Add tile BLOXTREE-345 2015-05-06 17:11:25 +03:00
Paul Chote
e170140084 Merge pull request #8091 from penev92/bleed_someRandomFix
Don't do trait lookups for Health on each processed order
2015-05-05 23:40:00 +01:00
penev92
ea9d49e2b7 Don't do trait lookups for Health on each processed order 2015-05-05 19:41:45 +03:00
penev92
834e4bfe9c Fix building prerequisites in TS 2015-05-04 01:58:56 +03:00
penev92
352c28314b Fix building prerequisites in D2k 2015-05-04 01:58:55 +03:00
penev92
1154e109d3 Fix building prerequisites in RA 2015-05-04 01:58:54 +03:00
penev92
75687ba271 Fix building prerequisites in Cnc 2015-05-04 01:58:51 +03:00
penev92
e3e6bcaf2a Add an upgrade rule for explicit prerequisite providing by buildings 2015-05-04 01:58:49 +03:00
penev92
50fb6f1d25 Make buildings grant prerequisites explicitly 2015-05-04 01:39:32 +03:00
Oliver Brakmann
a310411bcc Merge pull request #8013 from penev92/bleed_wormSound
Add sandworm attack sound
2015-05-03 23:23:11 +02:00
Oliver Brakmann
62b3592bd4 Merge pull request #7998 from Mailaender/ts-proc-dock
Added the Tiberian Sun docking overlays
2015-05-03 22:50:16 +02:00
Oliver Brakmann
622685c8f4 Merge pull request #7968 from pchote/ts-tileset-depth
Load depth data from tmp(ts) sprites.
2015-05-03 22:31:27 +02:00
Oliver Brakmann
536d80a7f3 Merge pull request #7917 from RoosterDragon/replay-browser-load-perf
Faster replay browser loading
2015-05-03 20:13:13 +02:00
Oliver Brakmann
3ae7d51feb Merge pull request #7871 from Mailaender/ambient-sound
Added a looping sound trait
2015-05-03 16:46:36 +02:00
Oliver Brakmann
b9f2caa0cf Merge pull request #8082 from Mailaender/more-dependency-fixes
Moved configure native dependencies
2015-05-03 16:07:08 +02:00
penev92
76a3b9c3b7 Add sandworm attack sound 2015-05-03 12:55:32 +03:00
Matthias Mailänder
4818efe036 Merge pull request #8080 from abcdefg30/upgrademaps
Run the utility on all maps
2015-05-03 11:23:22 +02:00
abcdefg30
cd9af39662 Merge pull request #8044 from penev92/bleed_withSpriteBody
Retire RenderFlare and WithFire traits
2015-05-03 11:19:02 +02:00
abcdefg30
3f7fc18ee7 Run the utility on all maps and polish stuff 2015-05-03 11:00:50 +02:00
penev92
c5dead9098 Introduce WithSpriteBody trait
Add upgrade rules

Add ISpriteBody
2015-05-03 11:54:27 +03:00
Matthias Mailänder
d999617a3c add the flame animation 2015-05-03 08:50:06 +02:00
Matthias Mailänder
2db26c93ff fix an overlap when the harvester exits to the north 2015-05-03 08:45:35 +02:00
Paul Chote
2682dc4228 Move native deps script into thirdparty to avoid confusion. 2015-05-03 07:47:17 +02:00
Paul Chote
a11e9e348b Configure native dependencies from the makefile. 2015-05-03 07:47:15 +02:00
Paul Chote
89a1bdd4f1 Merge pull request #7475 from abcdefg30/perhealth
Convert the float health percentage to an int percentage
2015-05-03 08:35:58 +12:00
Matthias Mailänder
10e9c774a8 Merge pull request #8079 from penev92/bleed_make
Fix the Windows Make script
2015-05-02 18:45:51 +02:00
penev92
ccd5a56fdb Fix the Windows Make script 2015-05-02 14:04:29 +03:00
Matthias Mailänder
3bd4a97d11 Merge pull request #8068 from Phrohdoh/spawn-actors-power
SpawnActorPower no longer forces removal of the spawned actor.
2015-05-02 12:30:54 +02:00
Matthias Mailänder
cdc98013f7 readonly 2015-05-02 12:14:46 +02:00
Matthias Mailänder
84e247f1eb separate with newlines for readability 2015-05-02 12:14:46 +02:00
Matthias Mailänder
34cd717349 Merge pull request #8071 from pchote/remove-trait-test-plumbing
Remove plumbing for trait unit tests.
2015-05-02 11:34:54 +02:00
Oliver Brakmann
0cfa1d3b1e Merge pull request #8077 from Mailaender/appveyor-improve-cache
Improved AppVeyor build cache
2015-05-02 10:51:12 +02:00
Matthias Mailänder
ebfd6eb8f6 fix trait documentation leaving out certain namespaces 2015-05-02 10:09:22 +02:00
Matthias Mailänder
50ae255395 don't hardcode hidden mods 2015-05-02 10:07:26 +02:00
Matthias Mailänder
a3b5f5a9a2 separate docs by namespace 2015-05-02 10:06:33 +02:00
Matthias Mailänder
0b1c2135db don't redownload cached files 2015-05-02 08:07:41 +02:00
Matthias Mailänder
b87fcacf46 catch all nuget CLI downloads 2015-05-02 08:02:47 +02:00
Matthias Mailänder
7cbdc07ca3 add a looping sound trait 2015-05-02 06:59:57 +02:00
Paul Chote
9edc0675f0 Merge pull request #7953 from Mailaender/github-release-thirdparty
Removed all remaining binaries from thirdparty
2015-05-02 08:57:44 +12:00
Matthias Mailänder
7cef5cfbfd clean Windows dependencies as well 2015-05-01 21:49:13 +02:00
Matthias Mailänder
30a0eb6082 remove non-existent DLL from list 2015-05-01 21:49:13 +02:00
Matthias Mailänder
753045ca65 clean the thirdparty directory, too 2015-05-01 21:49:13 +02:00
Matthias Mailänder
a43d303eb7 use curl everywhere to run out of the box on Mac 2015-05-01 21:49:11 +02:00
Oliver Brakmann
3cda61a13a Merge pull request #8014 from abcdefg30/hijacksurvival
Fix a problem with hijackers in the survival maps
2015-05-01 15:58:47 +02:00
Matthias Mailänder
7be62f3bbb Merge pull request #7986 from abcdefg30/mtm
Updated Monster Tank Madness
2015-05-01 14:30:23 +02:00
abcdefg30
51433e7c64 Updated all maps with the utility 2015-05-01 14:16:21 +02:00
abcdefg30
95e3713b69 Add an upgrade rule 2015-05-01 14:16:20 +02:00
abcdefg30
8d2307db83 Convert the float health percentage to an int one 2015-05-01 14:16:19 +02:00
Matthias Mailänder
8a514ee143 remove outdated documentation 2015-05-01 11:45:12 +02:00
Matthias Mailänder
78588753e8 fetch Eluant from GitHub 2015-05-01 11:45:12 +02:00
Matthias Mailänder
adddf1245b fetch SDL2-CS from GitHub 2015-05-01 11:45:12 +02:00
Matthias Mailänder
732001f3f3 Merge pull request #7696 from Robmaister/bleed
Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types
2015-05-01 11:41:20 +02:00
Pavel Penev
dacf094956 Merge pull request #7981 from Mailaender/ts-apc
Added the amphibious mode to the Tiberian Sun APC
2015-05-01 11:52:27 +03:00
Matthias Mailänder
fa0ce88f70 change voxel image on water terrain type for APC 2015-05-01 10:37:17 +02:00
Paul Chote
b1e285f243 Remove Moq dependency. 2015-05-01 16:29:31 +12:00
David Jiménez
044b51742f Remove plumbing for trait unit tests. 2015-05-01 16:24:14 +12:00
Paul Chote
8d0acaaa4f Merge pull request #8053 from reaperrr/fix-td-bluetib-editor
Fixes blue tiberium not appearing in legacy editor (TD)
2015-05-01 14:10:54 +12:00
Paul Chote
68eb73fe34 Merge pull request #8063 from Phrohdoh/silent-curl
Silence curl output for OS X native dependencies.
2015-05-01 14:05:30 +12:00
Taryn Hill
7a4076630f SpawnActorPower no longer forces removal of the spawned actor. 2015-04-30 18:35:06 -05:00
sinf
5991a9b439 Added quick build feature 2015-05-01 01:40:26 +03:00
Pavel Penev
f9baa38169 Merge pull request #8067 from Phrohdoh/terms-sprite-effect
Correct terminology and add readonly modifiers in SpriteEffect.
2015-05-01 01:27:04 +03:00
Taryn Hill
d279e1dcee Correct terminology and add readonly modifiers in SpriteEffect. 2015-04-30 17:19:13 -05:00
abcdefg30
e6828aa1ff Fix a problem with hijackers in the survival maps 2015-04-30 22:37:43 +02:00
Oliver Brakmann
583b89eb17 Merge pull request #8001 from RoosterDragon/hardware-cursor-fixes
Hardware cursor fixes
2015-04-30 20:24:19 +02:00
Chris Forbes
16c61cb929 Merge pull request #8017 from pchote/map-definitions
Remove magic ActorReference/SmudgeReference parsing
2015-04-30 10:46:27 +12:00
Chris Forbes
1c0809962e Merge pull request #7898 from Phrohdoh/unload-terrain-types
Add UnloadTerrainTypes to Cargo.
2015-04-30 10:36:14 +12:00
Taryn Hill
af78370506 Silence curl output for OS X native dependencies. 2015-04-29 16:58:36 -05:00
Pavel Penev
2d5517fc23 Merge pull request #8057 from RoosterDragon/location-fix
Safer country lookup
2015-04-29 23:57:20 +03:00
Pavel Penev
bf0ee862b2 Merge pull request #8004 from pchote/remove-owner
Remove deprecated Buildable.Owner field.
2015-04-29 23:01:41 +03:00
Paul Chote
d255a3989e Upgrade mod rules. 2015-04-30 07:35:27 +12:00
Paul Chote
97b4509607 Remove deprecated Buildable.Owner field. 2015-04-30 07:35:27 +12:00
Matthias Mailänder
b1dd380db1 Merge pull request #8055 from pchote/scroll-mouseover
Update widget mouseover when scrolling panels.
2015-04-29 21:07:21 +02:00
Paul Chote
981f782cf9 Add a stub for upgrading map actors. 2015-04-30 07:06:14 +12:00
Paul Chote
4b1f541f34 Reorganize actor and smudge loading.
The actor and smudge definitions are now stored
as raw MiniYamlNodes in the map.  It is now the
responsibility of the consumers to parse these
into real objects.
2015-04-30 07:06:14 +12:00
Paul Chote
cd12dcc2ff Update widget mouseover when scrolling panels. 2015-04-30 07:01:52 +12:00
RoosterDragon
748b37ede7 Ensure we never return a null string from LookupCountry. 2015-04-29 19:27:49 +01:00
Oliver Brakmann
ea679d4557 Merge pull request #8054 from pchote/terrain-console
Separate terrain geometry visualization from DevMode.
2015-04-29 20:16:25 +02:00
Matthias Mailänder
f4ba56912f Merge pull request #8043 from pchote/exit-delays
Polish TS war factories.
2015-04-28 22:22:29 +02:00
Matthias Mailänder
6921cb904f Merge pull request #8052 from Phrohdoh/desc-cargo
Add Cargo descriptions.
2015-04-28 21:59:01 +02:00
Taryn Hill
92ba61b149 Add descriptions to CargoInfo members. 2015-04-28 13:48:44 -05:00
Paul Chote
f46e15c63e Separate terrain geometry visualization from DevMode.
Also adds a “terrainoverlay" console command.
2015-04-29 05:26:50 +12:00
reaperrr
365e7a9584 Fix blue tiberium not appearing in legacy editor (TD) 2015-04-28 16:20:08 +02:00
Paul Chote
413eaadb06 Polish TD weapons factory. Fixes #6651. 2015-04-28 19:34:24 +12:00
Paul Chote
dac9431ca3 Polish TS war factories. 2015-04-28 19:25:41 +12:00
Paul Chote
8e9a7fd08b Add an ExitDelay field to allow doors to open before exiting. 2015-04-28 19:18:44 +12:00
Paul Chote
ccf9d8fe97 Merge pull request #8047 from OpenRA/travis-mono-3.12
Updated Travis CI configuration to enforce Mono 3
2015-04-28 18:50:27 +12:00
Matthias Mailänder
c4bc974eb6 Update .travis.yml
define the mono version
2015-04-27 22:01:15 +02:00
Matthias Mailänder
4e950024d3 Merge pull request #8046 from obrakmann/fix_missing_infantry_in_legacy_editor
Fix missing infantry in the legacy editor
2015-04-27 21:28:43 +02:00
Matthias Mailänder
f9fa5cc9b0 Merge pull request #8038 from pchote/resource-slopes
Prevent resources from spawning on ramps.
2015-04-27 21:24:09 +02:00
Taryn Hill
f6a34aab9c Add UnloadTerrainTypes restriction to Cargo. 2015-04-27 12:23:29 -05:00
Oliver Brakmann
d92f4cedc5 Merge pull request #8045 from abcdefg30/fakeweap
Use WithProductionDoorOverlay on fake weap
2015-04-27 19:00:34 +02:00
Oliver Brakmann
22cd68e8f9 Fix missing infantry in the legacy editor
The editor is looking for actor types that implement ILegacyEditorRender, but infantry units don't anymore since #7638.

This moves ILegacyEditorRender to the root of the Render* inheritance tree, so that all actor types have access to it.
2015-04-27 17:52:14 +02:00
abcdefg30
a2c1993561 Merge pull request #7980 from pchote/animation-keys
Remove RenderSprites animation keys.
2015-04-27 17:48:41 +02:00
abcdefg30
cc61f904e0 Use WithProductionDoorOverlay on fake weap 2015-04-27 17:42:58 +02:00
Paul Chote
94f22638be Add an upgrade rule. 2015-04-27 19:47:12 +12:00
Paul Chote
614f96046c Remove RenderSprites animation keys. 2015-04-27 19:38:23 +12:00
Paul Chote
937d2070cc Add a palette for previewing depth info in the asset browser. 2015-04-27 19:21:55 +12:00
Paul Chote
b62d1cae78 Load tmp(ts) depth data. 2015-04-27 19:21:55 +12:00
Paul Chote
8b7453070a Include all the relevant palettes in the asset browser. 2015-04-27 19:21:55 +12:00
Paul Chote
098d69f120 Prevent resources from spawning on ramps. 2015-04-27 19:21:12 +12:00
abcdefg30
c4a63eee30 Merge pull request #7875 from penev92/bleed_exposePlayerReferences
Add upgrade rules support for map PlayerReferences
2015-04-26 22:53:42 +02:00
Oliver Brakmann
d6963567d9 Merge pull request #8034 from pchote/chrome-logic
Some chrome logic cleanups
2015-04-26 22:19:28 +02:00
penev92
2402b56da7 Reorganize PlayerReference loading to enable upgrade rules for them.
The PlayerReference definitions are now stored
as raw MiniYamlNodes in the map.
2015-04-26 23:16:20 +03:00
Oliver Brakmann
a6b8bdf978 Merge pull request #8027 from pchote/update-terrain-vertexbuffer
Update terrain layer when the terrain data changes.
2015-04-26 21:15:45 +02:00
Oliver Brakmann
354b45add7 Merge pull request #8025 from pchote/radar-updates
Use the correct (tile-based) radar color when updating the radar.
2015-04-26 20:30:54 +02:00
Oliver Brakmann
e7cbd5a41b Merge pull request #7937 from pchote/some-editor-prereqs
A collection of ActorPreview improvements.
2015-04-26 18:46:26 +02:00
Paul Chote
bf8e5169f6 Fix colorpicker preview. 2015-04-27 04:14:09 +12:00
Oliver Brakmann
db170f75e5 Merge pull request #8037 from OpenRA/osx-github-usercontent
Fixed Mac OS X dependencies pointing to a redirect
2015-04-26 18:06:38 +02:00
Oliver Brakmann
3ac12323db Merge pull request #8032 from OpenRA/ts-offline-speech-fix
Fixed "building online" played by power off and vice versa on Tiberian Sun
2015-04-26 17:26:12 +02:00
Matthias Mailänder
9bbed8adec Update configure
Fixes #8036
2015-04-26 17:24:49 +02:00
Matthias Mailänder
6653322096 Merge pull request #8011 from penev92/bleed_fixTakeCover
Move prone-related logic from DamageWarhead to TakeCover
2015-04-26 16:20:27 +02:00
Matthias Mailänder
fccbde3c36 Merge pull request #7534 from 42foobar42/nod4a
added mission nod4a
2015-04-26 16:10:31 +02:00
Matthias Mailänder
67c9df62c3 Merge pull request #7829 from sinf/hotkeys
Closes #7369
2015-04-26 16:02:08 +02:00
penev92
36abf2ac41 Add an upgrade rule for TakeCover 2015-04-26 14:29:12 +03:00
penev92
ea01439377 Add an upgrade rule for DamageWarheads 2015-04-26 14:29:10 +03:00
penev92
aa57d5f956 Move prone-related logic from DamageWarhead to TakeCover
Add DamageTypes to DamageWarhead and DamageTypeModifiers to TakeCover
2015-04-26 14:29:08 +03:00
Paul Chote
e0ac3df373 Split perf widgets into their own file. 2015-04-26 23:21:02 +12:00
Paul Chote
da70683c03 Split OrderButtonsChromeLogic into smaller classes. 2015-04-26 23:21:02 +12:00
Alexander Boll
0f0c400657 added mission nod4a
Polish nod04a a bit
2015-04-26 12:59:23 +02:00
Paul Chote
f4987f7258 Add support for multiple logic objects on a widget. 2015-04-26 19:30:28 +12:00
Matthias Mailänder
45ffac350f fix d2k harvester sand overlay 2015-04-26 09:22:23 +02:00
Matthias Mailänder
996445a178 fix the Multiply blend mode 2015-04-26 09:22:23 +02:00
Matthias Mailänder
63e4d40770 add alpha channel to every possible blend mode 2015-04-26 09:22:19 +02:00
Matthias Mailänder
a84345f5d3 add water wakes to APC 2015-04-26 08:54:10 +02:00
Paul Chote
1b31001661 Merge pull request #7974 from Mailaender/ts-hover-wakes
Added the Hovercraft wake animation
2015-04-26 18:50:42 +12:00
Paul Chote
57db20da5d Merge pull request #8028 from RoosterDragon/cache-traits
Cache traits
2015-04-26 18:23:15 +12:00
Paul Chote
8a171bb452 Don’t export certain Init types. 2015-04-26 18:12:21 +12:00
Matthias Mailänder
b5ff247fa5 fix the cnc mpspawn and waypoint palettes 2015-04-26 18:12:21 +12:00
Paul Chote
a2af79ff98 Add support for wall preview neighbours. 2015-04-26 18:12:20 +12:00
Paul Chote
76202a9f6a Fix turret preview z-offsets. 2015-04-26 18:12:20 +12:00
Paul Chote
d5541accda Fix custom palettes in actor previews. 2015-04-26 18:12:20 +12:00
Paul Chote
1256ddc6a6 Account for bibs in ActorPreviews. 2015-04-26 18:12:19 +12:00
Paul Chote
56bf0f36a8 Fix crate actor previews. 2015-04-26 18:12:19 +12:00
Paul Chote
09bad3f0ef Account for damage state in ActorPreviews. 2015-04-26 18:12:19 +12:00
Matthias Mailänder
6d03eef998 Update sounds-generic.yaml
switch building online/offline
2015-04-26 07:31:51 +02:00
Pavel Penev
ef55cb6528 Merge pull request #7862 from Mailaender/ts-factory-doors
Fixed the Tiberian Sun weapon factory doors
2015-04-26 01:12:11 +03:00
Paul Chote
8f93d7b5d7 Simplify and fix animation glitches. 2015-04-25 22:52:14 +02:00
Matthias Mailänder
75624560d2 remove trailing tabs 2015-04-25 22:52:14 +02:00
Matthias Mailänder
b07d125d18 add an upgrade rule 2015-04-25 22:52:14 +02:00
Matthias Mailänder
8c8b9b1cc3 deprecate RenderBuildingWarFactory 2015-04-25 22:52:14 +02:00
Matthias Mailänder
9a37e77d1a fix the weapon factory door opening animation 2015-04-25 22:52:14 +02:00
Matthias Mailänder
9c20de7d98 readonly and don't sync cosmetic traits 2015-04-25 22:52:14 +02:00
RoosterDragon
fb0cab7481 Cache results of TraitsImplementing calls.
If a class is caching the TraitsImplementing enumerable, instead cache the results of enumerating it to an array. The avoids having to enumerate the sequence each time it is needed.
2015-04-25 20:42:27 +01:00
RoosterDragon
2937a31463 Make IsDisabled a method on Actor.
This allows us to cache the disabled traits, which simplifies life for some callers since we relieve them of having to cache it, as well as improving perf for all IsDisabled calls.
2015-04-25 20:42:26 +01:00
RoosterDragon
500a33b590 Cache some trait lookups that occur frequently. 2015-04-25 20:41:49 +01:00
RoosterDragon
6125d7c117 Rename existing fields that are caching TraitsImplementing calls for consistency. 2015-04-25 20:41:48 +01:00
Paul Chote
7df12cb3e9 Update terrain layer when the terrain data changes. 2015-04-26 07:35:07 +12:00
Paul Chote
acee680083 Use the correct (tile-based) radar color when updating the radar. 2015-04-26 07:19:57 +12:00
RoosterDragon
087b407f46 Avoid ScrollPanelWidget drawing invisible child items.
If child items in a scroll panel will be outside the scissor area, then we can avoid drawing them at all. If a scroll panel has many items, this reduces to the draw cost closer to those visible in the panel, rather than costing for all the items.
2015-04-25 18:55:47 +01:00
RoosterDragon
60238a858d Load replays asynchronously and in parallel.
This prevents the UI blocking, and also speeds up loading time for getting all the replays displayed.
2015-04-25 18:55:46 +01:00
RoosterDragon
d2d2f4a838 Made FieldLoader thread-safe, and cache some expensive reflection calls. 2015-04-25 18:55:46 +01:00
RoosterDragon
109ccbb0b0 Added ConcurrentCache, a thread-safe Cache. 2015-04-25 18:55:45 +01:00
Oliver Brakmann
a48a878a71 Merge pull request #7983 from pchote/radar-colors
Adjust IRadarSignature to support per-cell colors.
2015-04-25 16:38:28 +02:00
Robert Rouhani
5d4ca1d52f Fixed bug where the SDL2 directory wouldn't be deleted 2015-04-25 10:33:20 -04:00
Robert Rouhani
d3528d6ed8 Removed zlib from NSIS script 2015-04-25 10:30:01 -04:00
Robert Rouhani
7ccd5521e0 Removed zlib dependency and chose a specific version of SharpFont.Dependencies. 2015-04-25 10:30:00 -04:00
Robert Rouhani
4987a6b24c Updated SharpFont to 3.0.0, adjusted font rendering code for new fixed-point types. 2015-04-25 10:26:41 -04:00
abcdefg30
2a80642c6a Add a new line at the end of descriptions for better readability 2015-04-25 15:47:18 +02:00
abcdefg30
100a58e12c Use OnPlayerDiscovered instead of OnEnteredFootprint
in Monster Tank Madness
2015-04-25 15:47:17 +02:00
Oliver Brakmann
bc7fd81297 Merge pull request #7840 from sinf/fix7838
Fixed parsing of hotkeys with no name (such as tilde)
2015-04-25 14:19:25 +02:00
sinf
5e86e63b37 Fixed parsing of hotkeys with no name (such as tilde) 2015-04-25 15:01:00 +03:00
Matthias Mailänder
175e9a14b7 Merge pull request #8000 from pchote/bogus-yaml-removals
Fix yaml merging
2015-04-25 13:42:18 +02:00
Matthias Mailänder
14777e46c4 Merge pull request #7933 from pchote/new-osx-launcher
New OSX launcher
2015-04-25 12:41:28 +02:00
Oliver Brakmann
ed5e8beedd Merge pull request #7978 from pchote/orca
Fix orca’s flying sequences.
2015-04-25 12:30:40 +02:00
sinf
9250c61473 Added Hotkeys for support powers 2015-04-25 13:15:06 +03:00
Paul Chote
722f4725d5 Fix orca’s flying sequences. 2015-04-25 22:06:02 +12:00
Matthias Mailänder
70db0fa784 add the Hovercraft wake animation 2015-04-25 11:26:59 +02:00
Oliver Brakmann
76ff0eddb9 Merge pull request #7908 from penev92/bleed_minimapCheat
Add a DevCommand for enabling the minimap
2015-04-25 11:13:23 +02:00
Matthias Mailänder
1476a0eb70 Merge pull request #7847 from RoosterDragon/screen-map-refactor-perf
Refactored ScreenMap & improved perf of updates, removals and region lookups
2015-04-25 10:12:52 +02:00
Paul Chote
6b79af4d62 Merge pull request #7957 from Mailaender/ts-powerdown-indicator-palette
Fixed Tiberian Sun building repair and power down indicator palette
2015-04-25 19:50:21 +12:00
Matthias Mailänder
a5f60deedd fix TS repair indicator palette 2015-04-25 09:36:20 +02:00
Paul Chote
d8f24adcc7 Merge pull request #7853 from Mailaender/alpha-experiments
Added AlphaImage support
2015-04-25 19:03:25 +12:00
Paul Chote
e452aba9e4 Merge pull request #7850 from Mailaender/appveyor-cache
Tried to cache AppVeyor downloads
2015-04-25 18:57:57 +12:00
Paul Chote
1e30fdb333 Merge pull request #7909 from reaperrr/projectile-cleanup2
Projectiles cleanup Part 2
2015-04-25 18:41:06 +12:00
Paul Chote
27127dd1a9 Merge pull request #7907 from rneatherway/nuget-version-fix
Remove version information from NuGet folder names
2015-04-25 18:28:45 +12:00
Paul Chote
69fed6a688 Merge pull request #7865 from Phrohdoh/deploy-to-upgrade
Implement DeployToUpgrade.
2015-04-25 18:11:34 +12:00
Paul Chote
4116da7c01 Merge pull request #7857 from sinf/glgl
Print GLSL info log if shader compilation fails
2015-04-25 17:56:32 +12:00
Paul Chote
ddc3bd3a1f Merge pull request #7887 from Mailaender/unhardcode-render-sequence
Unhardcoded and self-documented render sequences
2015-04-25 17:35:07 +12:00
Pavel Penev
479e81d7f5 Merge pull request #7944 from LunaticEdit/bleed
EndOfStream first chance exceptions on server
2015-04-25 07:17:24 +03:00
Pavel Penev
6d64217769 Merge pull request #7863 from Mailaender/global-palette-effect
Added a global palette effect for day/night lighting
2015-04-25 07:11:01 +03:00
Pavel Penev
f759530964 Merge pull request #7854 from sinf/tsnotifications
Add more TS notification sounds
2015-04-25 07:06:57 +03:00
Pavel Penev
f372f0c466 Merge pull request #7726 from Phrohdoh/prevent-eod
Prevent EjectOnDeath.
2015-04-25 07:03:00 +03:00
Pavel Penev
c9e89cc7f5 Merge pull request #7832 from Phrohdoh/cleanup
Another cleanup.
2015-04-25 06:53:16 +03:00
Pavel Penev
494d2f274a Merge pull request #7463 from Smith00101010/gdi05b
Added CnC: gdi05b
2015-04-25 06:48:06 +03:00
reaperrr
b100091ad1 Merge pull request #7967 from abcdefg30/tsfixes
Add descriptions to all TS units
2015-04-25 01:25:26 +02:00
abcdefg30
158659abcf Add descriptions for all buildable actors 2015-04-24 16:32:15 +02:00
RoosterDragon
09dc1db651 Refactored ScreenMap & improved perf of updates, removals and region lookups.
Reduce code duplication by extracting a common class to deal with spatial partitioning of actors, and use some (cached) delegates to reduce duplication further without affecting performance too much.

Speed up updates and removal of actors by caching their location so we only need to update or remove them from bins they are actually in (typically very few), compared to having to check every bin for removals which is much more work in comparison.

Speed up checking for actors inside a region by checking if items are located entirely within the bin they are located in. If so, we don't need to add them to the hash-set for de-duplication purposes which is fairly expensive.
2015-04-23 21:06:09 +01:00
Pavel Penev
f6051b1e2b Merge pull request #8007 from obrakmann/fix8006_carryall_dead_cargo_crash
Clean up state properly when a Carryall's cargo has died
2015-04-23 00:24:44 +03:00
Oliver Brakmann
3924e2643d Clean up state properly when a Carryall's cargo has died 2015-04-22 21:51:01 +02:00
Paul Chote
8a1f9261c3 Convert hidden [Desc] to a <summary>. 2015-04-22 21:24:48 +12:00
Paul Chote
44f2dd5a3d Extract common inherits in ra defaults.yaml. 2015-04-22 21:24:47 +12:00
Paul Chote
2cbe269c1e Support multiple inheritance for actor rules. 2015-04-22 21:24:47 +12:00
Paul Chote
8de497925d Fix map yaml removals. 2015-04-22 21:24:47 +12:00
Paul Chote
7dd51663b6 Fix the MiniYaml unit tests. Fixes #7999. 2015-04-22 19:58:10 +12:00
Paul Chote
29b7bc4d79 Restore RallyPoint removal in soviet-01. 2015-04-22 19:58:10 +12:00
Paul Chote
0a43b3da72 Rewrite yaml merging block removal.
Fixes #2922, #6818.
2015-04-22 19:58:10 +12:00
RoosterDragon
13078c820b Retry hardware cursor creation.
On Windows, a spurious error sometimes occur when creating cursors. We retry a few times before before having to give up and fall back to software cursors.
2015-04-21 20:46:22 +01:00
RoosterDragon
c963806dae Prevent leaking of hardware cursors.
Added the lacking finialization machinery, ensured disposal under exceptional circumstances and also ensure the game calls dispose on old cursors before creating new ones.
2015-04-21 20:46:21 +01:00
Matthias Mailänder
b4fa704fbd Merge pull request #7950 from penev92/bleed_fixRaHarvester
Change the RA harvester SHP file
2015-04-20 21:50:15 +02:00
Matthias Mailänder
132b5e34c4 Merge pull request #7984 from abcdefg30/watchfix
Fix an issue in EnemyWatcher.cs
2015-04-20 21:05:02 +02:00
Oliver Brakmann
70b7d3ac47 Merge pull request #7992 from reaperrr/d2k-zoffsets
Made sure spice blooms are drawn below harvesters
2015-04-20 16:28:26 +02:00
reaperrr
6e7a6cef5e Merge pull request #7852 from Mailaender/gaspot-regression-fix
Fixed GASPOT again
2015-04-20 16:24:40 +02:00
Paul Chote
58161d6178 Merge pull request #7990 from obrakmann/fix7988_d2k_score_screen_misalignments
Fix alignment issues in the score screen
2015-04-20 21:06:16 +12:00
reaperrr
11d759c59c Merge pull request #7985 from Mailaender/ts-transforms
Fixed the offsets for Tiberian Sun transformable units
2015-04-20 10:53:45 +02:00
Paul Chote
796b2caca1 Merge pull request #7972 from abcdefg30/tsfixes2
Some general polish in TS
2015-04-20 18:40:25 +12:00
Paul Chote
7bb25ec913 Merge pull request #7880 from Mailaender/ts-crates
Added the Tiberian Sun crates
2015-04-20 17:40:42 +12:00
Paul Chote
4fb076ac92 Merge pull request #7843 from reaperrr/ts-inf-seq
Cleaned up TS infantry and player structure sequences
2015-04-20 15:50:48 +12:00
abcdefg30
273a78b889 Added BuildLimit: 1 to CYC2 2015-04-19 21:52:56 +02:00
Matthias Mailänder
dbfd8da6c4 fix the artillery voxel lighting 2015-04-19 21:51:54 +02:00
abcdefg30
c0b8fce427 Remove the interval hack from gdi05a 2015-04-19 21:48:15 +02:00
abcdefg30
1c44f30e2c Fix an issue in EnemyWatcher.cs 2015-04-19 21:48:14 +02:00
Matthias Mailänder
6fc1627f99 Update README.md
add some additional new-lines to fix problems with local Markdown scripts
2015-04-19 20:34:10 +02:00
reaperrr
1655a1462d Made sure spice blooms are drawn below harvesters all the time 2015-04-19 19:54:28 +02:00
Oliver Brakmann
5e2b7add6e Fix alignment issues in the score screen 2015-04-19 19:23:20 +02:00
reaperrr
1df2f5e387 Merge pull request #7989 from pchote/oops
Fix a regression from #7976.
2015-04-19 19:18:21 +02:00
Paul Chote
4b22436d14 Fix a regression from #7987. 2015-04-20 04:55:31 +12:00
Oliver Brakmann
322801247f Merge pull request #7987 from pchote/fix-player-bogosity
Fix random country display.
2015-04-19 18:13:04 +02:00
Paul Chote
3cfa96e7a6 Fix random country display. 2015-04-20 03:33:46 +12:00
Matthias Mailänder
450b427d98 fix transform offsets 2015-04-19 16:23:18 +02:00
Pavel Penev
5676c55082 Merge pull request #7976 from pchote/subcell-crash
Don’t crash when asking for the offset of an invalid subcell.
2015-04-19 13:40:47 +03:00
Paul Chote
145f7b28f5 Adjust IRadarSignature to support per-cell colors. 2015-04-19 22:27:47 +12:00
Paul Chote
ab7706073b Don’t crash when asking for the offset of an invalid subcell. 2015-04-19 15:20:45 +12:00
Matthias Mailänder
e8493ab855 fix TS power down palette 2015-04-18 14:11:51 +02:00
Matthias Mailänder
9a6e8467da fix GASPOT again 2015-04-18 13:47:20 +02:00
reaperrr
dd689de0e6 Fixed alphatst.shp 2015-04-18 13:41:53 +02:00
Matthias Mailänder
fdf58b29e2 setup the alpha image lighting for the light spot 2015-04-18 13:41:53 +02:00
Matthias Mailänder
868e404b22 add 2 new blend modes: Multiplicative, DoubleMultiplicative 2015-04-18 13:41:53 +02:00
Matthias Mailänder
d5cbf82889 add the Tiberian Sun crates 2015-04-18 13:25:45 +02:00
Pavel Penev
9df371b393 Merge pull request #7970 from obrakmann/fix-rgb-map-previews
Fix RGB map previews
2015-04-18 14:15:53 +03:00
Oliver Brakmann
cda7310b25 Convert RGB map preview image files to RGBA 2015-04-18 11:35:01 +02:00
Oliver Brakmann
b363c2c51e Don't unnecessarily discard 24bpp map previews
Those images now get converted on-the-fly by the game.
2015-04-18 11:27:23 +02:00
Matthias Mailänder
7157cc0a9f unhardcode and self-document render sequences 2015-04-18 08:44:43 +02:00
abcdefg30
2ebd2cac98 Remove bogus hotkey ("Hothey") definition 2015-04-17 22:19:34 +02:00
abcdefg30
e7724eeb2e Correct TRNSPORT prerequisites 2015-04-17 22:19:33 +02:00
abcdefg30
dab0cd7bda Added BuildLimit: 1 to GHOST and HMEC 2015-04-17 22:19:32 +02:00
abcdefg30
03e81f9739 Fix HMEC walking animation 2015-04-17 22:19:31 +02:00
abcdefg30
6b9a359bce Adjust some selection bounds
No idea what regressed them.
2015-04-17 22:18:57 +02:00
penev92
b4112dc2c3 Change RA harv.shp 2015-04-17 23:12:21 +03:00
Oliver Brakmann
fe8b3d91b1 Merge pull request #7951 from RoosterDragon/fix-browser-images
Fix mod browser previews
2015-04-17 21:52:38 +02:00
Pavel Penev
8f05d8a931 Merge pull request #7966 from obrakmann/fix7927
Allow players locked to unplayable factions in the lobby
2015-04-17 12:37:49 -07:00
Oliver Brakmann
28310ce2fc Allow players locked to unplayable factions in the lobby 2015-04-17 20:50:15 +02:00
abcdefg30
3f333b0f0a Merge pull request #7948 from penev92/bleed_fixCarryalls
Fix carryalls unreserving issue
2015-04-17 20:47:00 +02:00
RoosterDragon
9c93001c84 Convert to 32bbp internally in FastCopyIntoSprite.
This avoids the need for callers to ensure the pixel format is correct, but ensures that the copying succeeds when the format is different.
2015-04-17 18:50:49 +01:00
Oliver Brakmann
f77d6f6044 Merge pull request #7959 from Rydra/upstream/pathfinderFix
BugFix for #7955
2015-04-16 22:22:26 +02:00
abcdefg30
cfa59d611a Merge pull request #7844 from reaperrr/ts-rules-split
Split TS rules for infantry, structures and vehicles
2015-04-16 22:00:38 +02:00
reaperrr
62bb9677a6 Remove obsolete gagreen sequence
and removed a superflous newline
2015-04-16 21:47:38 +02:00
Pavel Penev
0dfbc7b651 Merge pull request #7961 from reaperrr/fix-preview-bpp
Convert TD and D2k previews to 32bpp
2015-04-16 10:49:23 -07:00
reaperrr
8b07c0826b Convert TD and D2k previews to 32bpp 2015-04-16 19:12:16 +02:00
David Jiménez
6d96a43341 Fixes #7955. Improves pathfinder performance a bit. 2015-04-15 23:43:14 +02:00
Matthias Mailänder
012226c481 Merge pull request #7952 from RoosterDragon/cache-render-traits
Cache render traits in Actor
2015-04-15 07:01:22 +02:00
penev92
665c82305e Fix carryalls telling carryables to unreserve when they are reserved for a different carryall;
Reserve carryable in FreeActorWithDelivery
2015-04-15 00:40:06 +03:00
RoosterDragon
106816a547 Cache the IRenderModifier and IRender traits in Actor.
Previously we just cached the query object, but now we cache the full results. This avoids having to re-evaluate them every render.
2015-04-14 20:15:45 +01:00
abcdefg30
af1dfd3d17 Merge pull request #7947 from penev92/bleed_diplomacyWindow
Fix flag-related crash for scripted "players"

Closes: #7929
2015-04-14 15:20:39 +02:00
LunaticEdit
575b568c6a EndOfStream first chance exceptions on server
The server class reads the memory stream in a forever loop until an
EndOfStreamException occurs. This causes repeated first chance
exceptions due to EndOfStreamException. This change verifies that the
memory stream's reader position is not past the length of the memory
stream.
2015-04-13 19:09:32 -04:00
penev92
cc73ba09ab Fix flag-related crash for scripted "players" 2015-04-13 23:36:29 +03:00
Moshe Schmidt
7d6f367d84 Added CnC: gdi05b 2015-04-13 22:31:51 +02:00
reaperrr
fbb245d569 Removes armament pistol from TS civilian default
Adds pistols to civ1 and civ3.
2015-04-13 17:31:49 +02:00
reaperrr
f7a20ceb62 Clean up infantry sequences 2015-04-13 17:11:52 +02:00
Taryn Hill
0717ca57ea Implement DeployToUpgrade.
Expose some deploy-related cursors to yaml.
2015-04-13 10:04:03 -05:00
reaperrr
24057ee5bb Clean up structure sequences
Now that we have tileset codes, those bitrotted file name definitions are no longer needed.
2015-04-13 17:00:01 +02:00
Robin Neatherway
2dba45ebac Remove version information from NuGet folder names
This makes the names consistent and prevents changes in versions of
dependencies from breaking the build.
2015-04-13 15:41:17 +01:00
Paul Chote
03572ecb3a Remove binaries from thirdparty/osx dir. 2015-04-12 21:22:26 +01:00
Paul Chote
85cd7308b4 Replace OSX launcher with a native-code version.
- Binary files hosted externally.
- Fixes dialogs hijacking Finder.
- Fixes dock icon being lost when restarting.
- Adds openra:// url handling.
- Adds .orarep file handling.
- Minimum OS X version is now 10.6.
2015-04-12 21:21:46 +01:00
reaperrr
1c06f43924 Redistribute defense/support structure rules for more consistency 2015-04-12 19:10:51 +02:00
reaperrr
cebdcdddc9 Rename yamls for actors available to both sides from player-* to shared-* 2015-04-12 19:10:51 +02:00
reaperrr
194fe8d926 Improve rules yaml order in mod.yaml a little 2015-04-12 19:10:50 +02:00
reaperrr
71b9665ad6 structures.yaml split into faction-specific structure and defense yamls 2015-04-12 19:10:49 +02:00
reaperrr
bc7af30ae9 Split TS vehicles.yaml into gdi-, nod- and player-vehicles.yaml 2015-04-12 18:59:55 +02:00
reaperrr
4fe72d95c3 Rename civilian.yaml to civilian-structures.yaml
Move Sandbags to civilian structures.
Remove GAGREEN.
2015-04-12 18:59:54 +02:00
reaperrr
f1cb333d6b Split TS infantry.yaml into gdi-, nod- and player-infantry.yaml 2015-04-12 18:59:53 +02:00
Paul Chote
70c9bca847 Merge pull request #7936 from obrakmann/fix7935_random_factions_in_missions
Allow non-selectable factions for players if LockRace is set
2015-04-12 17:49:39 +01:00
abcdefg30
8b090423a3 Merge pull request #7924 from Mailaender/windmill
Added the windmill to the Red Alert civilian buildings
2015-04-12 18:30:58 +02:00
Oliver Brakmann
7b1b17df4a Allow non-selectable factions for players if LockRace is set 2015-04-12 15:27:25 +02:00
Matthias Mailänder
cae7d7cffa add the windmill 2015-04-12 13:31:56 +02:00
abcdefg30
83e9c51940 Merge pull request #7923 from Mailaender/lighthouse
Added a lighthouse to the Red Alert civilian buildings
2015-04-12 13:13:43 +02:00
Matthias Mailänder
18064370ee Merge pull request #7919 from RoosterDragon/fix-previews
Fix custom map previews
2015-04-12 12:52:25 +02:00
Matthias Mailänder
fc0ad15a5b Merge pull request #7915 from obrakmann/fix7911_osx_freetype_lib_path
Fix path to freetype library in SharpFont's .dll mapping for OS X
2015-04-12 12:50:25 +02:00
Matthias Mailänder
0cde0c1224 add the light house 2015-04-12 08:11:13 +02:00
RoosterDragon
84dffce7c1 Added an extension method to clone bitmaps with a 32bbpArgb pixel format. 2015-04-11 21:05:46 +01:00
RoosterDragon
c1787a8368 Don't process images with the wrong pixel format in MapCache. 2015-04-11 15:20:16 +01:00
Matthias Mailänder
56405f42ab add a global palette effect for day/night ambient 2015-04-11 12:05:25 +02:00
Oliver Brakmann
1a21421217 Merge pull request #7921 from ScottNZ/balance-stuff
Move ra silo to defense queue
2015-04-11 11:39:49 +02:00
ScottNZ
79ca6a401a Move ra silo to defense queue 2015-04-11 17:10:47 +12:00
Oliver Brakmann
b6f015641e Fix path to freetype library in SharpFont's .dll mapping for OS X 2015-04-11 00:11:52 +02:00
RoosterDragon
7883355481 Validate PixelFormat of source bitmap argument in FastCopyIntoSprite. 2015-04-10 19:54:03 +01:00
RoosterDragon
5dfcc3e9d0 Convert custom map previews that are not using PixelFormat.Format32bppArgb. 2015-04-10 19:54:02 +01:00
Matthias Mailänder
03e25c73d8 Merge pull request #7910 from obrakmann/make-docs-with-version
Set version before creating docs
2015-04-10 20:22:33 +02:00
reaperrr
6e14d96815 Merge pull request #7912 from Mailaender/ts-missile-silo-owner-fix
Fixed the missile silo being visible to GDI commanders
2015-04-10 13:17:18 +02:00
reaperrr
b45dd32242 Merge pull request #7914 from penev92/bleed_authors
Add penev92 to AUTHORS
2015-04-10 12:49:28 +02:00
Oliver Brakmann
8bb19defd6 Only set the version once in appveyor.yaml 2015-04-10 12:10:12 +02:00
penev92
e3012ae505 Enable minimap toggling via the DisableShroud dev command 2015-04-10 09:42:07 +03:00
penev92
fd674962e3 Add penev92 to AUTHORS 2015-04-10 09:19:02 +03:00
Matthias Mailänder
7a4f7527a4 fix missile silo being visible to GDI commanders 2015-04-10 06:36:36 +02:00
reaperrr
6b7ffdc1b7 De-hardcoded GravityBomb idle and opening sequence
Avoid checking for sequence if Image is null.
2015-04-10 00:39:34 +02:00
reaperrr
b7bb719173 De-hardcoded LaserZap animation sequence 2015-04-10 00:39:32 +02:00
Oliver Brakmann
9aa16c95da Set version before creating docs
Since the version string gets embedded into the created documentation.
2015-04-10 00:13:19 +02:00
Taryn Hill
96d6ea79ce Remove explicit private.
Remove unnecessary delegate.
Use extension method syntax.
Fix HealthInfo.NotifyAppliedDamage’s desc.
Remove unused using directives.
Remove explicit type declaration in Manifest.
2015-04-09 13:59:20 -05:00
Pavel Penev
87b7cc4527 Merge pull request #7906 from reaperrr/public-classes
Made JamsMissiles and Hovers classes public
2015-04-09 07:10:01 -07:00
reaperrr
94c5ef7260 Make JamsMissiles and Hovers classes public 2015-04-09 15:38:49 +02:00
Pavel Penev
6a66cea01f Merge pull request #7903 from obrakmann/fix_allies01_power
Fix issues in Allies01 and Monster Tank Madness
2015-04-08 10:23:24 -07:00
Oliver Brakmann
f5579bc749 Fix tooltips in mission Monster Tank Madness 2015-04-08 15:55:00 +02:00
Oliver Brakmann
1c1a9f3065 Fix power levels in mission Allies01 2015-04-08 15:54:34 +02:00
Pavel Penev
0617eb2e59 Merge pull request #7881 from ScottNZ/balance-stuff
Misc ra balance changes, pt. 2
2015-04-07 16:12:38 -07:00
Pavel Penev
37ec903c67 Merge pull request #7896 from reaperrr/missile-hit
Tweaks RA and TD helicopter weapon minimum ranges
2015-04-07 16:07:47 -07:00
reaperrr
7ddd6aab93 Make helicopters move backwards when target is too close
'Too close' as in closer than weapons' MinRange.
2015-04-08 00:51:24 +02:00
Pavel Penev
66e8545eaa Merge pull request #7894 from obrakmann/fix_7890_7893
Fix issues in latest playtest
2015-04-07 14:52:51 -07:00
reaperrr
a37babf0c1 Tweaked TD aircraft weapon minimum ranges. 2015-04-07 23:52:16 +02:00
reaperrr
ebcde3922d Tweaked/added RA helicopter weapon minimum ranges. 2015-04-07 23:52:14 +02:00
Oliver Brakmann
5ddce9a197 Merge pull request #7897 from reaperrr/flaktruck-art
Fixed empty pixels on flak truck art
2015-04-07 21:58:28 +02:00
Taryn Hill
2bac9f6c64 Add interface IPreventsEjectOnDeath. 2015-04-07 14:02:27 -05:00
reaperrr
0b79141252 Fixed empty pixels on flak truck art 2015-04-07 18:11:49 +02:00
Oliver Brakmann
197f60b2a5 Mark running games as password protected as well
Fixes #7893
2015-04-07 17:35:03 +02:00
Oliver Brakmann
a992318208 Fix "ally" suffix being wrongly assigned to enemy players
Fixes #7890
2015-04-07 17:34:54 +02:00
ScottNZ
ce88dc3112 Remove orphaned armor airdrop icon and sequences 2015-04-08 02:33:24 +12:00
ScottNZ
c2c661de82 Decrease power requirement of tsla from 150 to 100 2015-04-08 02:33:23 +12:00
ScottNZ
99945e1154 Increase power requirement of mslo from 100 to 150 2015-04-08 02:33:23 +12:00
ScottNZ
15c548c60a Have build limit of 1 for pdof and mslf 2015-04-08 02:33:22 +12:00
ScottNZ
011433041d Rename 'Allied' to 'Allies' in faction selector 2015-04-08 02:33:22 +12:00
ScottNZ
65aa4b369e Spread out parabombs badgers 2015-04-08 02:33:21 +12:00
ScottNZ
7aca8d426b Increase parabombs support power charge time to 360 2015-04-08 02:33:21 +12:00
ScottNZ
540148038d Increase Ukraine parabombs badger squad size to 3 2015-04-08 02:33:20 +12:00
ScottNZ
f142fb4e09 Remove vanilla Allies and vanilla Soviet countries from multiplayer 2015-04-08 02:33:20 +12:00
ScottNZ
5653b3cbf3 Move fake structures to France 2015-04-08 02:33:20 +12:00
ScottNZ
8e1960452b Remove advanced gap generator 2015-04-08 02:33:19 +12:00
ScottNZ
461cf89676 Make paratroopers available to all Soviet factions 2015-04-08 02:33:19 +12:00
ScottNZ
0442c790da Rework Russia's abilities to be Tesla-themed 2015-04-08 02:33:18 +12:00
reaperrr
bcb75869c7 Merge pull request #7866 from obrakmann/fix-fall-rates
Fix fallrates for parachutable things to match lowered release altitude
2015-04-07 14:16:01 +02:00
Pavel Penev
0dbfce258a Merge pull request #7885 from obrakmann/fix7884_td_create_server_mapchooser_crash
Fix crash in TD's server creation dialog
2015-04-06 18:40:49 -07:00
Oliver Brakmann
2b62284fc7 Fix crash in TD's server creation dialog 2015-04-06 15:44:06 +02:00
Paul Chote
27c4512ec7 Import lighting parameters for TS maps. 2015-04-06 08:50:08 +02:00
Pavel Penev
cd9589eaa0 Merge pull request #7868 from Mailaender/mono-2.10-CS0172
Fixed CS0172 compile error on Fedora 21
2015-04-05 08:50:29 -07:00
Oliver Brakmann
6329563c03 Merge pull request #7867 from OpenRA/tsbuilder-makefile
Remove a forgotten TilesetBuilder reference from the Makefile
2015-04-05 13:49:40 +02:00
Matthias Mailänder
a8b9026876 fix CS0172 2015-04-05 12:46:41 +02:00
Matthias Mailänder
2eb996751b Update Makefile
remove last TilesetBuilder reference
2015-04-05 12:26:00 +02:00
Oliver Brakmann
f7a02eeca5 Fix fallrates for parachutable things to match lowered release altitude 2015-04-05 12:23:32 +02:00
sinf
73ef8f855a Print GLSL info log if shader compilation fails 2015-04-05 11:03:28 +03:00
Matthias Mailänder
3f48c649f0 Merge pull request #7722 from penev92/bleed_diplomacyWindow
Closes #7391
2015-04-05 08:34:38 +02:00
sinf
9ada9fb343 Add more TS notification sounds 2015-04-05 00:42:36 +03:00
Pavel Penev
a013cf4fca Merge pull request #7842 from obrakmann/change_aircraft_altitude
Lower aircraft altitude
2015-04-04 14:18:20 -07:00
Pavel Penev
be0eaee6cc Merge pull request #7864 from Mailaender/ra-logo
Removed the grain effect from the Red Alert logo
2015-04-04 13:59:01 -07:00
Pavel Penev
0190382104 Merge pull request #7839 from obrakmann/fix7836_gdi05a_crash
Fix issues in gdi05a
2015-04-04 13:50:57 -07:00
Matthias Mailänder
5409c04066 use the new vectorized hammer & sickle as a template 2015-04-04 22:41:41 +02:00
penev92
2c108a1845 Use proper names and flags for unknown players 2015-04-04 17:24:19 +03:00
Matthias Mailänder
cc82e7c527 Merge pull request #7841 from Mailaender/ra-announce-yaml-polishing
Removed AnnounceOnSeen from Red Alert and fixed Lint warnings
2015-04-04 14:22:29 +02:00
Oliver Brakmann
a3f875b8a8 Merge pull request #7845 from reaperrr/mapcontrol-remove
Removed map control from player statistics for performance reasons
2015-04-04 13:24:07 +02:00
Matthias Mailänder
109392e7f9 try to cache the native DLL dependencies 2015-04-04 12:01:13 +02:00
Matthias Mailänder
611067da7e try to cache build dependency downloads 2015-04-04 12:00:58 +02:00
Matthias Mailänder
612f18edd8 Merge pull request #7846 from obrakmann/turn-to-attack-delay-v2
Expose turn-to-attack delay to yaml, v2
2015-04-04 10:54:50 +02:00
reaperrr
e25247f259 Removes map control from player statistics for performance reasons 2015-04-04 01:38:54 +02:00
Oliver Brakmann
b1d3486561 Expose Plane turn-to-attack delay to yaml 2015-04-04 00:10:06 +02:00
Oliver Brakmann
32ed63727d Revert "Expose Plane turn-to-attack delay to yaml."
This reverts commit 02da41e5c5.
2015-04-03 23:42:35 +02:00
Oliver Brakmann
a8d7140c1a Merge pull request #7815 from Phrohdoh/aircraft-turn-timing
Expose Plane turn-to-attack delay to yaml.
2015-04-03 23:15:41 +02:00
Oliver Brakmann
4ca27234e6 Merge pull request #7686 from reaperrr/custom-visibility-update
Skip visibility updates when fog & shroud are disabled via lobby
2015-04-03 20:58:56 +02:00
Matthias Mailänder
fd143a5eb0 remove EnemyWatcher from RA 2015-04-03 17:04:43 +02:00
Oliver Brakmann
ba977c040f gdi05a: ensure base discovery trigger fires in time 2015-04-03 16:27:48 +02:00
Oliver Brakmann
d53cfafde9 Lower aircraft altitude
In order to work around a problem where the game does not take aircrafts' altitude into account when deciding whether a unit should be rendered or not, leading to aircrafts seemingly (dis)appearing a couple of cells into the map instead of right at the lower edge of the map.

Planes will now fly at the default altitude of 1280, helicopters slightly below at 1024.
2015-04-03 16:19:27 +02:00
Matthias Mailänder
016e8cd6fe remove automatic EnemyUnitsApproaching notification for D2k 2015-04-03 16:18:41 +02:00
Matthias Mailänder
d0046f804a remove AnnounceOnSeen from Red Alert mod again
closes #7787
2015-04-03 15:36:44 +02:00
Matthias Mailänder
a6af357646 fix OpenRA.Lint Warning
Sprite image camera.* from actor camera.* has no sequence definition
2015-04-03 15:35:29 +02:00
Matthias Mailänder
a8bf90f8b2 Merge pull request #7746 from RoosterDragon/shroud-vis-perf
Speed up frozen actor visibility updates.
2015-04-03 15:20:10 +02:00
Matthias Mailänder
8494ad0a38 Merge pull request #7834 from RoosterDragon/avoid-preventable-allocations
Avoid preventable allocations
2015-04-03 13:52:46 +02:00
RoosterDragon
3885ca3f14 Speed up frozen actor visibility updates.
Cache the isVisibleTest function in the ctor for FrozenActor. The footprint never changes so the test will always be valid.
2015-04-03 12:21:03 +01:00
Oliver Brakmann
253d97ca5d Fix sandbag ownership and build prerequisites for gdi05a 2015-04-03 13:16:57 +02:00
Pavel Penev
cedfe5c0b5 Merge pull request #7734 from RoosterDragon/frozen-lazy-render
Lazily generate frozen actor renderables.
2015-04-03 04:16:19 -07:00
Oliver Brakmann
1070d752f3 Turn event handler into no-op for captured factories in gdi05a 2015-04-03 13:14:25 +02:00
Pavel Penev
39dfbb5505 Merge pull request #7837 from Mailaender/ts-building-overlay-translucency
Added transparency to the Tiberian Sun building placement overlay
2015-04-03 03:39:44 -07:00
Paul Chote
98b8078f7d Merge pull request #7573 from bvandenbogaard/bleed
Added audio.bag/audio.idx support used in RA2
2015-04-03 11:35:54 +01:00
Matthias Mailänder
5733c049e1 Merge pull request #7715 from RoosterDragon/random-prevent-crash
Only evaluate input sequence once in RandomOrDefault.
2015-04-03 12:27:20 +02:00
Matthias Mailänder
bf588c1cf2 transparent build overlay 2015-04-03 12:03:39 +02:00
Paul Chote
070d8ea6a2 Merge pull request #7811 from reaperrr/new-blendmodes1
Added two new BlendModes
2015-04-03 10:57:12 +01:00
Matthias Mailänder
f785f15bf4 Merge pull request #7798 from reaperrr/ts-weapons01
Split TS weapons.yaml and fix weapons and aircraft
2015-04-03 11:56:21 +02:00
Paul Chote
94360655c3 Merge pull request #7830 from obrakmann/fix7824_allies03b_crash
Fix crash in allies03b
2015-04-03 10:44:05 +01:00
Matthias Mailänder
de2860358f Merge pull request #7814 from Phrohdoh/default-image
Image reference in 'Defaults' sequence block.
2015-04-03 10:36:29 +02:00
Matthias Mailänder
39b42a35a0 Merge pull request #7823 from RoosterDragon/celllayer-enumerator
Fix CellLayer.GetEnumerator
2015-04-03 10:13:16 +02:00
Paul Chote
5f7b9b7621 Merge pull request #7827 from obrakmann/fix-refund-tooltip-margins
Fix margins of refund tooltips
2015-04-03 01:13:04 +01:00
RoosterDragon
b66db23adf Only evaluate input sequence once in RandomOrDefault.
This ensures non-deterministic sequences cannot crash by returning an empty sequence on the second evaluation.
2015-04-03 01:08:30 +01:00
Pavel Penev
78afbffbc8 Merge pull request #7835 from reaperrr/fix-ps-check
Fixed make.ps1 'check' command
2015-04-02 15:12:41 -07:00
reaperrr
d72cec6275 Fix make.ps1 'check' command 2015-04-02 23:19:49 +02:00
RoosterDragon
287ead56b3 Avoid allocating a delegate and new list in every tick of RepairableBuilding. 2015-04-02 21:41:22 +01:00
RoosterDragon
ab2ef0ba03 Improve performance of target validation.
The Warhead and WeaponInfo classes now maintain preconstructed sets of valid and invalid targets to speed up validation checks since LINQ Intersect no longer has to be called (which recreates the sets internally each time).

Fixed minor bugs in the AI where it was repeating the validation logic but failing to account for invalid targets.
2015-04-02 21:11:12 +01:00
Pavel Penev
5ac648600d Merge pull request #7794 from ScottNZ/balance-stuff
Misc ra balance changes
2015-04-02 11:47:38 -07:00
Oliver Brakmann
92e0dbd864 Merge pull request #7822 from RoosterDragon/map-cache-dispose-fix
Ensure MapCache disposes cleanly.
2015-04-02 20:26:02 +02:00
Oliver Brakmann
b1f6136b98 Fix crash in allies03b 2015-04-02 19:06:16 +02:00
Taryn Hill
58f32a11f8 Merge pull request #7828 from obrakmann/fix7821_pbog_crash_td
Fix crash when placing buildings in TD.
2015-04-02 11:38:35 -05:00
Oliver Brakmann
0406e8e708 Add $-sign to refund tooltip 2015-04-02 18:35:34 +02:00
Oliver Brakmann
5e7a71edf5 Fix crash when placing buildings in TD
Caused by production queues being tied to buildings, not the player, in TD.
PBOG would therefore try to find the PlaceBuilding trait, which is on the player, on the conyard actor and crash.
2015-04-02 18:04:19 +02:00
reaperrr
4fc58b4491 Skip shroud/fog calculations when both are disabled via lobby option. 2015-04-02 00:42:51 +02:00
RoosterDragon
9c0d3d737d Fix CellLayer.GetEnumerator. 2015-04-01 22:52:36 +01:00
reaperrr
6dc577ed6f Make all aircraft repairable on GDI repair bay, make all armed aircraft rearmable on both helipads 2015-04-01 23:49:01 +02:00
reaperrr
32bed06df5 Fix Orca Bomber and Banshee Fighter flight behavior and reloading 2015-04-01 23:49:00 +02:00
reaperrr
0efce0e94a Brings TS weapons more in line with the original's rules
Adds trails to missiles.
2015-04-01 23:48:59 +02:00
reaperrr
fbfc38fe1b Fix TS weapon names to match the original 2015-04-01 22:42:01 +02:00
reaperrr
ca67407358 Split TS weapons.yaml into several categorized yamls 2015-04-01 22:42:01 +02:00
reaperrr
40d73db9fd Added BlendModes to TS EMP explosion and Ion Cannon explosion 2015-04-01 22:01:26 +02:00
reaperrr
883e3822c6 Tweak D2k artillery missiles speed and angle.
Additionally, remove bogus properties (leftovers from projectile change)
2015-04-01 22:01:25 +02:00
reaperrr
10f205b43d Reduce brightness of several D2k weapon effects via new blend modes 2015-04-01 22:01:24 +02:00
RoosterDragon
47e2c48068 Ensure MapCache disposes cleanly.
This prevents the map loading thread writing to disposed objects which can have unintended side effects.
2015-04-01 20:58:09 +01:00
Oliver Brakmann
cc1da824cd Merge pull request #7820 from Mailaender/oldlength-ancient-mono-fix
Removed unused oldLength
2015-04-01 21:39:56 +02:00
reaperrr
c0448fce3e Adds two new BlendModes. 2015-04-01 21:16:01 +02:00
Matthias Mailänder
dc3f82f537 Merge pull request #7816 from Phrohdoh/cleanups
Small code cleanup.
2015-04-01 20:53:42 +02:00
Matthias Mailänder
4cc016c3d0 remove unused oldLength
closes #7808
2015-04-01 19:43:56 +02:00
Taryn Hill
4ed53c5952 Simplify return statements.
Remove redundant ‘this’.
Remove unused using directives.
Simplify LINQ chains.
Add some trait property descriptions.
Add readonly where viable.
Add fullstops to some yaml descriptions.
2015-04-01 12:33:17 -05:00
Chris Forbes
14e9cfd433 Merge pull request #7812 from pchote/modules
Pluggable upgrade modules
2015-04-02 05:25:48 +13:00
Oliver Brakmann
ff77d2d029 Fix margins of refund tooltips 2015-04-01 17:14:41 +02:00
Taryn Hill
28ea59854e Merge pull request #7748 from pchote/heightmap-input
Account for terrain height and slope when calculating order location.
2015-04-01 07:57:33 -05:00
Taryn Hill
02da41e5c5 Expose Plane turn-to-attack delay to yaml.
Require Plane in some ctors.
2015-04-01 00:12:20 -05:00
Taryn Hill
32083344aa Set place to default image for TS’ overlay sequence. 2015-03-31 21:37:28 -05:00
Taryn Hill
f41497b421 Allow Defaults: image in sequence definitions. 2015-03-31 21:36:50 -05:00
Taryn Hill
e066c893eb Remove unnecessary image references in ts/sequences/misc. 2015-03-31 21:36:15 -05:00
Paul Chote
704e3656b4 Implement Ion Cannon Uplink upgrade. 2015-03-31 22:32:13 +01:00
Paul Chote
a89029acf0 Implement GDI power turbines upgrade. 2015-03-31 22:32:13 +01:00
Paul Chote
0c5be6183f Implement GDI component tower upgrades. 2015-03-31 22:32:13 +01:00
Paul Chote
ebd09f196c Add upgrade support to SupportPower. 2015-03-31 22:32:12 +01:00
Paul Chote
e440d00585 Add upgrade support to WithIdleOverlay. 2015-03-31 22:32:12 +01:00
Paul Chote
5c18220636 Add upgrade support to WithTurret. 2015-03-31 22:32:11 +01:00
Paul Chote
42f3fa7439 Add upgrade support to WithMuzzleFlash. 2015-03-31 22:23:44 +01:00
Paul Chote
ee12257d24 Fix RenderRangeCircle for disabled Armaments. 2015-03-31 22:23:43 +01:00
Paul Chote
a9e1c09d82 Add upgrade support to DetectCloaked. 2015-03-31 22:23:43 +01:00
Paul Chote
4597895ea3 Add upgrade support to AttackBase. 2015-03-31 22:23:43 +01:00
Paul Chote
d1839701bb Add Plug and Pluggable for building actor-specific upgrades. 2015-03-31 22:23:41 +01:00
reaperrr
c0c7ad1035 Merge pull request #7806 from Phrohdoh/ts-placement-marker
Expose PlaceBuilding palette and use palette.pal for TS' overlay.
2015-03-31 23:19:02 +02:00
Taryn Hill
79a0ab0667 Use palette.pal for the TS foundation overlay. 2015-03-31 15:26:16 -05:00
Taryn Hill
c6c52eac7d Expose and document the palette used
by PlaceBuildingOrderGenerator for
the structure placement overlay
2015-03-31 15:26:04 -05:00
Paul Chote
57a6fff6ce Don’t crash if the click location is outside the map. 2015-03-31 20:59:53 +01:00
Paul Chote
c0fa025b74 Indicate current mouseover cell in TerrainGeometryOverlay. 2015-03-31 20:59:53 +01:00
Paul Chote
1e54b19bd3 Implement heightmap-aware view -> cell conversion. 2015-03-31 20:59:53 +01:00
Paul Chote
c68cb995f4 Move cell corner state into Map. 2015-03-31 20:59:52 +01:00
Paul Chote
49624e335c Remove legacy DIY view -> world conversions. 2015-03-31 20:59:52 +01:00
Paul Chote
2630537daf Fix a mistake in Map.CellContaining.
Fixes #6247.
2015-03-31 20:59:52 +01:00
Taryn Hill
0d5588f08a Merge pull request #7772 from pchote/remove-tilesetbuilder
Remove OpenRA.TilesetBuilder.
2015-03-31 14:56:02 -05:00
Paul Chote
878a0f7008 Remove OpenRA.TilesetBuilder.
This project has not been maintained in years,
and has been outright broken for a significant
amount of this period.
2015-03-31 20:42:37 +01:00
reaperrr
360f3bc2f8 Merge pull request #7776 from pchote/ts-buildables
Remove bogus buildable actors from TS.
2015-03-31 21:05:15 +02:00
Paul Chote
9ac3e57afd Fix EMP icon. 2015-03-31 19:11:38 +01:00
Paul Chote
f0414d2ec0 Make special structures unbuildable. 2015-03-31 19:11:38 +01:00
Paul Chote
a3ba925458 Make special vehicles unbuildable. 2015-03-31 19:11:38 +01:00
Paul Chote
1f4fe0a44d Move civilian vehicles to their own yaml file. 2015-03-31 19:11:37 +01:00
Paul Chote
7b330e23e2 Make special aircraft unbuildable. 2015-03-31 19:11:37 +01:00
Paul Chote
b6ca5102b4 Fix mutant hijacker. 2015-03-31 19:11:37 +01:00
Paul Chote
fbca912207 Make mission-specific and civilian infantry unbuildable. 2015-03-31 19:11:22 +01:00
Paul Chote
f7e1140268 Merge pull request #7771 from reaperrr/d2k-yaml-cleanup1
Fixes D2k muzzle/firing offsets and cleans sequences
2015-03-31 17:55:13 +01:00
Paul Chote
9fdd43ed41 Merge pull request #7789 from Phrohdoh/ts-starting-units
Add light, medium, and heavy starting units to TS.
2015-03-31 17:45:54 +01:00
Paul Chote
cca1ccab1f Merge pull request #7796 from MustaphaTR/3-orni
D2K - 3 Ornithopter
2015-03-31 17:42:13 +01:00
Paul Chote
b9ac0ec077 Merge pull request #7792 from reaperrr/ts-shell-titan
Fix TS shellmap music and Titan selection box
2015-03-31 17:40:12 +01:00
Benno van den Bogaard
8cf7c46c8f Added audio.bag/audio.idx support used in RA2 2015-03-31 18:13:20 +02:00
Oliver Brakmann
bec56ee5b6 Merge pull request #7784 from reaperrr/fix-ctor-regressions
Fixes #7764, #7780...
2015-03-31 00:06:01 +02:00
Oliver Brakmann
c9a4f9c126 Merge pull request #7757 from pchote/ts-tileset-variants
Add support for TS-style random tile variants.
2015-03-30 23:25:05 +02:00
reaperrr
83b702343e Fixes #7764, #7780 and other potential regressions introduced by #7671. 2015-03-30 21:51:29 +02:00
Paul Chote
84e85d8a5d Rename Image -> Images. 2015-03-30 20:20:36 +01:00
Paul Chote
4be5334a0e Add support for TS-style random tile variants. 2015-03-30 19:44:53 +01:00
Mustafa Alperen Seki
71874392b7 3 Ornithopter 2015-03-30 17:35:23 +02:00
ScottNZ
d3f2a8677e Spy Plane ability is no longer special compared to the other factions, so remove it from the Soviet faction description 2015-03-31 00:01:40 +13:00
ScottNZ
925f838e6d Update some infantry tooltip descriptions 2015-03-30 23:55:22 +13:00
ScottNZ
5a29febe97 Increase shroud reveal range of shok from 4 cells to 5 2015-03-30 23:55:22 +13:00
ScottNZ
c193b91b4f Increase shok range from 3.5 cells to 6 2015-03-30 23:55:21 +13:00
ScottNZ
b62a710fd9 Remove sniper (make it unbuildable) 2015-03-30 23:55:20 +13:00
ScottNZ
f7893534f5 Make spy plane available to all Soviet factions 2015-03-30 23:55:20 +13:00
ScottNZ
5e3457a046 Buff pillbox against infantry 2015-03-30 23:55:19 +13:00
reaperrr
0b4ec5a815 Merge pull request #7770 from penev92/bleed_starportCarryall
Bring back carryall.starport and fix trike.starport's prerequisites
2015-03-30 02:13:46 +02:00
reaperrr
ad808a4ad0 Fixes Titan selection box, improves Wolverine selection box. 2015-03-30 02:04:52 +02:00
reaperrr
ba0b934c38 Fix TS shellmap music 2015-03-30 02:04:51 +02:00
Taryn Hill
410d9325e3 Add light, medium, and heavy starting units to TS. 2015-03-29 14:50:05 -05:00
reaperrr
57dab6ccc1 Fix D2k gun tower to use tank muzzle 2015-03-29 14:23:09 +02:00
Paul Chote
dcebbf211c Merge pull request #7754 from Phrohdoh/crlf-to-lf
Replace CRLF with LF in TilesetBuilder/defaults.yaml.
2015-03-29 12:17:19 +01:00
reaperrr
25d5daf6f5 Fixes/improves D2k firing offsets.
- Raider/Stealth Raider
- Bazooka infantry
- Devastator
- Gun Tower
2015-03-29 12:42:47 +02:00
reaperrr
05426562cd D2k sequence cleanups and gun turret muzzle fix 2015-03-29 12:42:46 +02:00
penev92
df759172c0 Bring back carryall.starport and fix trike.starport's prerequisites 2015-03-29 13:06:51 +03:00
Pavel Penev
975cb3101f Merge pull request #7765 from Mailaender/voxel-shadow-palette
Documented the voxel shadow palette
2015-03-29 02:27:21 -07:00
Oliver Brakmann
9b1ef23c3c Merge pull request #7768 from OpenRA/revert-7761-appveyor-artifacts-kiss
Revert "Deploy with just OpenRA-Setup.exe"
2015-03-29 11:09:51 +02:00
Oliver Brakmann
ebe8e1dc4d Merge pull request #7766 from Mailaender/appveyor-make-version
Fixed the missing version tag in the Windows installer
2015-03-29 11:08:52 +02:00
Matthias Mailänder
105417e7c1 Revert "Deploy with just OpenRA-Setup.exe" 2015-03-29 10:30:57 +02:00
Matthias Mailänder
e289be1557 tag the version on Windows 2015-03-29 08:24:47 +02:00
Matthias Mailänder
c5a1141711 un-hardcode and self-document the shadow palette 2015-03-29 08:17:20 +02:00
Matthias Mailänder
91d4a1ce66 Update README.md
linkfix
2015-03-28 23:58:09 +01:00
Matthias Mailänder
6666f1ec46 Merge pull request #7762 from Mailaender/appveyor-after-test
Package after the units tests instead of before deploy
2015-03-28 23:33:55 +01:00
Matthias Mailänder
fb3ea081a1 before before deploy 2015-03-28 23:20:16 +01:00
Oliver Brakmann
4a69687311 Merge pull request #7761 from Mailaender/appveyor-artifacts-kiss
Deploy with just OpenRA-Setup.exe
2015-03-28 23:00:30 +01:00
Matthias Mailänder
dc9b193925 KISS 2015-03-28 22:53:41 +01:00
Matthias Mailänder
49835b2f7a Merge pull request #7760 from Mailaender/appveyor-artifact-name
Yet another attempt to fix AppVeyor deployment
2015-03-28 22:22:45 +01:00
Matthias Mailänder
766b9d6aa3 try a different syntax for environment variables 2015-03-28 22:01:33 +01:00
Matthias Mailänder
e454e6dcb1 name the artifact 2015-03-28 21:53:39 +01:00
Matthias Mailänder
3bcc94c182 Merge pull request #7759 from obrakmann/fix-wiki-update
Fix wiki update to match travis' idea of branch names
2015-03-28 21:15:23 +01:00
Oliver Brakmann
858a8331b1 Merge pull request #7758 from Mailaender/appveyor-artifacts
Tried to fix AppVeyor deployment
2015-03-28 21:14:42 +01:00
Oliver Brakmann
6f54f8e616 Fix wiki update to match travis' idea of branch names 2015-03-28 21:00:17 +01:00
Matthias Mailänder
324dcf0e8a try to simplify/fix the artifacts filter 2015-03-28 20:57:42 +01:00
Matthias Mailänder
e886f64785 Merge pull request #7756 from pchote/fix-ts-palette
Fix TS player palette definition.
2015-03-28 20:17:49 +01:00
Paul Chote
77a56c95f1 Fix TS player palette definition.
Regression from #7699.
2015-03-28 19:11:44 +00:00
Oliver Brakmann
820df840a3 Merge pull request #7755 from Mailaender/powershell-utf8
Enforced UTF8 encoding for pandoc
2015-03-28 20:07:49 +01:00
Matthias Mailänder
f287fb9c10 enforce UTF8 encoding for pandoc 2015-03-28 19:45:11 +01:00
penev92
a26be8188c Hide faction for players who randomed in diplomacy and objectives panels 2015-03-28 20:44:05 +02:00
Taryn Hill
3faea1bfc0 Replace CRLF with LF in TilesetBuilder/defaults.yaml 2015-03-28 12:53:34 -05:00
Matthias Mailänder
b59bdce194 Merge pull request #7753 from obrakmann/fix-appyveyor
Fix appveyor build again
2015-03-28 18:20:21 +01:00
Oliver Brakmann
ba7b2ac6bd Reverse arguments to pandoc 2015-03-28 18:15:29 +01:00
Oliver Brakmann
93af7b7677 Merge pull request #7752 from Mailaender/pandoc-appveyor-fix
Trying to fix pandoc in the AppVeyor build again
2015-03-28 18:00:43 +01:00
Matthias Mailänder
f6d740b4b7 absolute path for pandoc 2015-03-28 16:55:43 +01:00
Matthias Mailänder
8f1f2e8999 prepare for Chocolatey (v0.9.9) 2015-03-28 16:54:58 +01:00
Oliver Brakmann
2cf53f0e13 Merge pull request #7747 from reaperrr/ra-tent-fix
Made RA tent art tileset-specific again
2015-03-28 16:22:40 +01:00
reaperrr
c32631de9b Merge pull request #7699 from x-a-n-a-x/new-TS-build-palette-skin
Added a new Tiberian Sun mod build palette skin
2015-03-28 16:15:22 +01:00
Paul Chote
9b11b0fd41 Merge pull request #7607 from Mailaender/html-local-markdown
Brought back the HTML documentation for NSIS
2015-03-28 14:55:00 +00:00
Matthias Mailänder
5733e3832e Merge pull request #7749 from pchote/remove-legacy-extensions
Remove GlobalFilesystem.OpenWithExts.
2015-03-28 15:27:03 +01:00
Paul Chote
b2458fc614 Remove GlobalFilesystem.OpenWithExts. Closes #5272. 2015-03-28 12:38:48 +00:00
reaperrr
2a6f69345d Removes the desert conversions of walls.
The files aren't used by the game anymore and just confuse the legacy editor.
2015-03-28 13:38:08 +01:00
reaperrr
557b479f40 Makes ra tent art tileset-specific again 2015-03-28 12:43:12 +01:00
Matthias Mailänder
99283da84f Merge pull request #7723 from RoosterDragon/batch-shroud-cell-changes
Batch shroud cell changes
2015-03-28 12:16:30 +01:00
x-a-n-a-x
a8d5542422 Added a new Tiberian Sun mod build palette skin 2015-03-28 10:10:45 +01:00
Matthias Mailänder
87d2aa062a Merge pull request #7710 from pchote/radar-geometry-fix
Fix radar origin for non-square widgets.
2015-03-28 10:01:06 +01:00
reaperrr
fe09cef825 Merge pull request #7745 from pchote/ts-snow
Add snow tileset and artwork to TS.
2015-03-28 01:26:41 +01:00
reaperrr
764c082478 Merge pull request #7741 from pchote/ra-remove-legacy-parsing
Disable legacy sequence parsing in RA.
2015-03-28 00:45:46 +01:00
Oliver Brakmann
18c59bdb7f Merge pull request #7671 from reaperrr/random-optimisations
More constructor caching and minor random optimisations
2015-03-27 23:40:11 +01:00
Oliver Brakmann
66c56ac47a Merge pull request #7678 from delftswa2014/feature/aicheats
Money cheat for all players and AI
2015-03-27 23:02:37 +01:00
Oliver Brakmann
7739f59d62 Merge pull request #7703 from reaperrr/d2k-trails
Fixed D2k trails and deviator explosion color
2015-03-27 22:27:20 +01:00
RoosterDragon
d44830c945 Inline the equality test in CPos.Equals for performance. 2015-03-27 19:50:09 +00:00
RoosterDragon
1853ddde94 Use MPos indexer for CellLayer in Shroud.
This reduces us to one conversion per cell rather than two or three.
2015-03-27 19:50:07 +00:00
RoosterDragon
1584018dcd Batch shroud cell changes.
By maintaining a set of changed cells we can avoid repeating work for cells that change multiple times before being rendered. The shroud renderer and radar widget now delay their work until they must render, and thus process each changed cell only once. This avoids significant repetition that was causing major slowdown when many actors were in the world.
2015-03-27 19:50:05 +00:00
reaperrr
663d434457 Fix sniper electro death anim.
Closes #7742.
2015-03-27 17:35:16 +00:00
reaperrr
b7fc275067 RA sequence cleanups.
Note: Removing Length: * from interior boxes and larvae as well as barrels
is intentional, boxes have just 1 frame, and frames 2+3 of larvae and
barrels are just duplicates of the first, added by Westwood to work around
damage stage issues.

Fixes fence palette on desert maps.
2015-03-27 17:35:16 +00:00
Paul Chote
08aa1e86a9 Disable legacy sequence parsing in RA. 2015-03-27 17:35:15 +00:00
reaperrr
6f244d5e3c Fix D2k missile trails and deviator explosion 2015-03-27 13:59:34 +01:00
reaperrr
8bc31a4ae2 Make smoke trail palette customisable, add player color trail support to bullets & missiles 2015-03-27 13:59:33 +01:00
reaperrr
9e2da0d2df Add support for player color explosions to CreateEffectWarhead 2015-03-27 13:51:13 +01:00
reaperrr
b52d055eec Misc constructor caching
Cache trait look-ups in constructor for various other traits and
activities.
2015-03-27 13:47:04 +01:00
reaperrr
1e9d1a6cb7 Cache trait look-ups in the constructor where possible for Air activities/traits 2015-03-27 13:47:04 +01:00
Pavel Penev
9a780ba07d Merge pull request #7738 from pchote/cnc-remove-legacy-parsing
Disable legacy sequence parsing in TD.
2015-03-27 02:58:41 -07:00
Pavel Penev
7179ec6ffb Merge pull request #7639 from reaperrr/projectile-cleanup
Remove TurboBoost and various other Projectile cleanups
2015-03-27 01:46:54 -07:00
reaperrr
b5c74c63c9 Make variable bullet angle and speed independent from each other 2015-03-27 00:11:33 +01:00
reaperrr
d531d29791 Add/tweak some descriptions and streamline style/organisation of
projectile and explosion effects code
2015-03-27 00:11:32 +01:00
reaperrr
1cc900b269 Yaml style fixes to reduce future --upgrade-mod "noise" a little 2015-03-27 00:11:32 +01:00
reaperrr
33cb4fe3e1 Projectile refactoring upgrade rules 2015-03-27 00:11:31 +01:00
reaperrr
c92b2298c3 Remove missile TurboBoost 2015-03-27 00:04:39 +01:00
reaperrr
2a4719b88b Rename Missile ROT to RateOfTurn 2015-03-27 00:04:38 +01:00
reaperrr
f9332c9efe Renames BlocksBullets to BlocksProjectiles and projectile High property to Blockable 2015-03-27 00:04:37 +01:00
reaperrr
fb710f15bb Move projectile palette definition from weapon to projectile effects 2015-03-27 00:04:36 +01:00
Pavel Penev
c61dc48548 Merge pull request #7324 from reaperrr/limitedammo2
Refactored LimitedAmmo to AmmoPool
2015-03-26 15:59:56 -07:00
Paul Chote
4e1a02e35e Add snow test map. 2015-03-26 22:42:44 +00:00
Paul Chote
0a6e21d908 Support tileset-specific art in TS. 2015-03-26 22:42:43 +00:00
Paul Chote
a9f6e09afd Add TS snow tileset. 2015-03-26 22:42:43 +00:00
Paul Chote
a2b423e4f9 Add a(nother) workaround for the legacy editor. 2015-03-26 22:41:46 +00:00
Paul Chote
549c0bf382 Disable legacy sequence parsing in TD.
Removes unused `powerdown` sequences.
2015-03-26 22:41:46 +00:00
Paul Chote
7ad2f3e104 Support tileset-specific sprite definitions. 2015-03-26 22:41:45 +00:00
reaperrr
c51afd837c Upgrade rules for LimitedAmmo -> AmmoPool refactoring 2015-03-26 23:21:02 +01:00
reaperrr
38d5163062 Refactors LimitedAmmo to AmmoPool.
Removes Reloads trait.

This enables adding multiple AmmoPools via @ differentiators and
Name which adds the possibility to assign each armament to a specific
ammo pool.

Furthermore, this moves all Reloads functionality onto AmmoPool.

Now a combination of all three is possible on a single actor: no limited
ammo, limited ammo that can reload on its own, and limited ammo which
needs to be reloaded at a rearm actor.

Additionally moves RearmSound from Minelayer to AmmoPool.
2015-03-26 23:21:01 +01:00
Matthias Mailänder
43b4bfc9e5 Merge pull request #7706 from penev92/bleed_fixDisguise
Fix for the EnemyWatcher-Disguise trait interaction
2015-03-26 22:35:18 +01:00
Matthias Mailänder
ab2db13b3c Merge pull request #7736 from abcdefg30/allies05aFIX
Fixes #7735
2015-03-26 22:26:31 +01:00
Matthias Mailänder
4084140716 Merge pull request #7731 from pchote/ts-tileset-fixes
Fix TS/RA2 tileset importer and apply correctness fixes to TS temperate.
2015-03-26 22:13:31 +01:00
penev92
460d0b84a6 Fix EnemyWatcher's interaction with disguised actors 2015-03-26 15:20:26 +02:00
Paul Chote
bbee16db99 Fix TS tileset. 2015-03-25 19:59:09 +00:00
Paul Chote
5d0eecd4c5 Don’t crash on bogus TerrainTiles. 2015-03-25 19:59:09 +00:00
Paul Chote
c5625d0d70 Fix radar color keys. 2015-03-25 19:59:09 +00:00
Paul Chote
a76bc3e188 Include sprite extension in imported tilesets. 2015-03-25 19:59:08 +00:00
Paul Chote
23bbe23603 Update imported tile types.
Using data provided by @tomsons26.
2015-03-25 19:59:08 +00:00
Oliver Brakmann
6fca67e7f6 Merge pull request #7664 from penev92/bleed_harvesterInsurance
Implement Carryall edge spawn, harvester delivery by carryall and harvester insurance for D2k
2015-03-25 20:03:00 +01:00
Oliver Brakmann
15af43d9b4 Merge pull request #7674 from obrakmann/fix7414_debian_dependencies
Add MaxMind GeoIP2's dependencies to debian package
2015-03-25 19:14:01 +01:00
abcdefg30
7c7e5efc4f Fix a fatal error in allies05a 2015-03-25 16:15:49 +01:00
reaperrr
036f2459bf Merge pull request #7732 from pchote/tsra2-reverses
Clean up sequence key loading and add Reverses field for TS/RA2.
2015-03-25 06:41:44 +01:00
Matthias Mailänder
b5779b2583 Merge pull request #7733 from pchote/d2k-remove-legacy-parsing
Disable legacy sequence parsing in D2K.
2015-03-24 22:16:12 +01:00
RoosterDragon
777a57af62 Lazily generate frozen actor renderables.
Previously actors that could be frozen under fog but were currently visible would be rendered by the frozen under fog system constantly in order to keep a copy of the renderables ready to go for the frozen counterpart when the actor became invisible. Instead, we now delay this extra rendering until the actor actually becomes invisible. This eliminates the wasted rendering to generate renderables that were never used.
2015-03-24 21:08:27 +00:00
Paul Chote
9b33d7b1e5 Disable legacy sequence parsing in D2K. 2015-03-24 18:01:30 +00:00
Paul Chote
4baf639130 Add a Reverses sequence key for TS/RA2 animations. 2015-03-24 17:37:08 +00:00
Paul Chote
4d60757611 Simplify sequence field parsing. 2015-03-24 17:37:08 +00:00
Taryn Hill
8d8db8d90d Merge pull request #7707 from pchote/tileset-fixes
Automated correctness fixes for tileset definitions.
2015-03-24 09:03:34 -05:00
Oliver Brakmann
60319aa500 Add MaxMind GeoIP2's dependencies to debian package
It would have been easier to just depend on libnewtonsoft-json5.0-cil, but that is only available in Ubuntu 14.04 and higher.
2015-03-24 14:30:22 +01:00
Paul Chote
52624912fe Work around bogus tiles. 2015-03-23 20:33:24 +00:00
Paul Chote
92452271fe Use per-tile color in minimap. 2015-03-23 20:33:23 +00:00
Paul Chote
491c851c87 Fix D2K tileset. 2015-03-23 20:33:23 +00:00
Paul Chote
dd36c5094c Fix TD tilesets. 2015-03-23 20:32:29 +00:00
Paul Chote
6e1307d08d Fix RA tilesets. 2015-03-23 20:32:28 +00:00
Paul Chote
ec77e15e54 Add a utility command to fix implicit tile definitions. 2015-03-23 20:32:28 +00:00
Paul Chote
8844defb44 Fix TileSet.Save(). 2015-03-23 20:32:28 +00:00
Taryn Hill
ab63d3f7df Merge pull request #7714 from Mailaender/d2k-black-tile-removal
Removed legacy ARRAKIS tiles.
2015-03-23 15:15:28 -05:00
Matthias Mailänder
2f1aae59eb don't crash so easily 2015-03-23 21:03:26 +01:00
Matthias Mailänder
edbb31afe1 remove mistaken templates 2015-03-23 21:03:24 +01:00
Matthias Mailänder
2223b0a43b Merge pull request #7719 from reaperrr/fix-wda-crashes
Disables WithDeathAnimation for deployed TS units
2015-03-23 20:30:24 +01:00
Taryn Hill
c68becb1ea Merge pull request #7721 from abcdefg30/smallpolish
Small polish.
2015-03-23 12:28:55 -05:00
abcdefg30
f84882ce9c Replace spaces with tabs 2015-03-23 17:27:53 +01:00
abcdefg30
fb8ac18522 Fix the wrong indentation in PerfHistory.cs 2015-03-23 17:27:52 +01:00
abcdefg30
c5a5bb0844 Add a missing space in the Template description 2015-03-23 17:27:51 +01:00
reaperrr
e65453de24 Disables WithDeathAnimation for deployed TS units (Tick Tank, Arty, Sensor Array, ICBM launcher)
Fixes crash when destroying them.
2015-03-23 14:56:40 +01:00
reaperrr
3c4d712b78 Merge pull request #7708 from pchote/sequence-utility
Add a utility command for checking sequences.
2015-03-23 13:19:42 +01:00
Paul Chote
d631d8b780 Merge pull request #7711 from Mailaender/d2k-sietch-offset
Fixed the Sietch sprite offset
2015-03-22 22:31:59 +00:00
reaperrr
bbabf4e2e7 Merge pull request #7712 from Mailaender/grid-above-spice
Fixed spice being drawn above the grid
2015-03-22 22:49:23 +01:00
reaperrr
09a0d83936 Merge pull request #7577 from RoosterDragon/shroud-visibility-perf
Speed up shroud visibility updates.
2015-03-22 22:38:41 +01:00
Paul Chote
7b57d87df5 Merge pull request #7713 from Mailaender/camera-icon
Added a camera icon
2015-03-22 19:30:00 +00:00
Matthias Mailänder
f39b01b53c Merge pull request #7700 from pchote/sequence-defaults
Add support for per-sequence animation defaults
2015-03-22 20:22:04 +01:00
Paul Chote
a7c64a0941 Remove redundancies from TS sequences. 2015-03-22 17:31:42 +00:00
Matthias Mailänder
90138785a1 draw the grid above the spice 2015-03-22 18:13:08 +01:00
Matthias Mailänder
ee58c68604 fix Sietch sprite offset 2015-03-22 18:09:33 +01:00
Paul Chote
2444f35695 Fix radar origin for non-square widgets. 2015-03-22 17:01:24 +00:00
penev92
efee3598f9 Add D2k harvester insurance on worm frenzy 2015-03-22 17:00:59 +02:00
penev92
0d05fb5326 Implement FreeActorWithDelivery to enable off-map harvester delivery
Fix FreeActorInfo fields descriptions
2015-03-22 17:00:57 +02:00
penev92
fa6e5948d7 Remove the Lua scripted harvester delivery from the D2k shellmap and reorganize Carryall actor definitions 2015-03-22 16:58:16 +02:00
penev92
7608cb93b4 Split CarryUnit into PickupUnit and DeliverUnit 2015-03-22 16:58:15 +02:00
penev92
4eb67b328f Refactor AutoCarryall trait and rename to Carryall
Fixup Carryable
2015-03-22 16:58:14 +02:00
penev92
f9a2378be8 Produce D2k carryalls at the edge of the map 2015-03-22 16:58:13 +02:00
penev92
5927e1080a Add ChooseClosestEdgeCell() method to the Map class 2015-03-22 16:58:11 +02:00
Paul Chote
bcc3aefaa7 Merge pull request #7702 from abcdefg30/tscrash
Fix a crash in UpgradeActorsNear.cs
2015-03-22 13:58:05 +00:00
Paul Chote
8fd4eca2da Merge pull request #7560 from RoosterDragon/let-it-go
Speed up frozen actor updates & prevent flicker
2015-03-22 13:52:33 +00:00
Paul Chote
c92d1342f0 Allow mods to define Defaults for all animations in a sequence. 2015-03-22 12:58:08 +00:00
Paul Chote
a69145caf0 Add a utility command for checking sequences. 2015-03-22 12:48:51 +00:00
Matthias Mailänder
7f9f29c8a2 add a camera icon 2015-03-22 07:51:22 +01:00
abcdefg30
5d7f6081e4 Fix a crash in UpgradeActorsNear.cs 2015-03-21 22:51:25 +01:00
Matthias Mailänder
5de9e72707 Merge pull request #7492 from penev92/bleed_enemySightedNotification
Closes #7491
2015-03-21 19:18:01 +01:00
Matthias Mailänder
3900733c1d Merge pull request #7581 from Phrohdoh/sequence-error-fix
Clarify the error relating to too many frames defined in a sequence.
2015-03-21 15:33:14 +01:00
Oliver Brakmann
919c0fd359 Merge pull request #7638 from pchote/infantry-body
Decompose RenderInfantry into WithInfantryBody and RenderSprites.
2015-03-21 15:22:53 +01:00
Paul Chote
cf92d0ea24 Merge pull request #7687 from reaperrr/ts-wda
Use 3rd damage level of TS buildings for death instead of critical
2015-03-21 14:10:45 +00:00
Oliver Brakmann
ff49cdcc5f Use the OnPlayerDiscovered trigger in gdi05a 2015-03-21 15:19:19 +02:00
penev92
16dee554c4 Introduce OnDiscovered and OnPlayerDiscovered Lua triggers 2015-03-21 15:19:18 +02:00
Matthias Mailänder
79c53e3981 Merge pull request #7525 from penev92/bleed_enemySightedNotification2
Refactor EnemyWatcher and AnnounceOnSeen traits
2015-03-21 14:16:06 +01:00
Paul Chote
4ea55809ca Decompose RenderInfantry into WithInfantryBody and RenderSprites. 2015-03-21 13:04:17 +00:00
Paul Chote
fa0264a73c Fix WithDeathAnimation dependency. 2015-03-21 13:04:16 +00:00
Oliver Brakmann
6c50d0eda8 Merge pull request #7608 from pchote/widgetcommon
Move common widgets from Game to Mods.Common.
2015-03-21 13:57:56 +01:00
penev92
d9a6b1ec5a Disable notifications for U2 2015-03-21 14:19:20 +02:00
Paul Chote
e5c03413cc Move common widgets from Game to Mods.Common. 2015-03-21 11:53:53 +00:00
penev92
328e329fe7 Disallow sound/radar notifications for neutral actors via a configurable field on the trait 2015-03-21 12:03:41 +02:00
penev92
55e04a44c8 Add EnemyWatcher and AnnounceOnSeen to RA 2015-03-21 11:32:28 +02:00
penev92
1b616123ef Introduce INotifyDiscovered interface and use it to move notifications from EnemyWatcher to AnnounceOnSeen 2015-03-21 07:53:41 +02:00
Matthias Mailänder
eb0ea8d543 Merge pull request #7693 from obrakmann/fix7688_d2k_insignia_behind_radar
Fix d2k faction logos being visible behind radar on narrow maps
2015-03-20 22:46:14 +01:00
Oliver Brakmann
112d7caf97 Fix d2k faction logos being visible behind radar on narrow maps 2015-03-20 19:10:05 +01:00
Matthias Mailänder
e98c55a852 Merge pull request #7681 from abcdefg30/startgamenotification
Allow the use of race variants in "StartGameNotification:"
2015-03-20 18:08:16 +01:00
Matthias Mailänder
146afd755b bring back the HTML documentation 2015-03-20 18:01:12 +01:00
Matthias Mailänder
7be8c4461b Merge pull request #7405 from Rydra/upstream/int2immutable
Made int2 class immutable
2015-03-20 16:03:46 +01:00
abcdefg30
a249302b6b Allow the use of race variants in "StartGameNotification:" 2015-03-20 14:52:58 +01:00
David Jiménez
f15f1e41e8 Made int2 struct immutable 2015-03-20 13:54:01 +01:00
Matthias Mailänder
dc1862f3dc Merge pull request #7529 from delftswa2014/feature/kdr_stat
Add Kill/Death ratio in statistics window
2015-03-20 13:35:21 +01:00
Matthias Mailänder
d7a373ffda Merge pull request #7691 from Mailaender/appveyor-windows-move
Corrected the NSIS Setup.exe renaming in the last AppVeyor step
2015-03-20 07:37:54 +01:00
Matthias Mailänder
2f199a1c9c correct the path 2015-03-20 07:34:42 +01:00
Matthias Mailänder
fc09fe9e03 Merge pull request #7683 from obrakmann/fix-appveyor-build-the-37482th
Fix archive extraction in appveyor builds
2015-03-20 07:10:02 +01:00
Matthias Mailänder
0569eb640f Merge pull request #7649 from RoosterDragon/stylecop-line-length
Enforce a line length limit.
2015-03-20 07:07:58 +01:00
reaperrr
b66cae100b Use 3rd damage level of TS buildings for death animation instead of critical damage state 2015-03-20 01:11:50 +01:00
RoosterDragon
c3531d6f70 Avoid duplicated frozen visibility checks.
The FrozenUnderFog.Tick method will now reuse the calculation do by the frozen actor when it had to calculate its visibility, this prevents it having to re-do the fairly expensive visibility calculation.
2015-03-19 17:30:40 +00:00
RoosterDragon
1515ac54f6 Enforce a line length limit. 2015-03-19 17:20:34 +00:00
Oliver Brakmann
721ba5e9c3 Merge pull request #7595 from WolfGaming/SellTooltip
Refund tooltip
2015-03-19 18:11:30 +01:00
WolfGaming
068a96fd46 Fixes NullPointerException when frozen.Actor is null. 2015-03-19 05:53:59 +00:00
WolfGaming
d2f02e7a4b Fix missions showing tooltips wrong. 2015-03-19 05:53:55 +00:00
WolfGaming
c460906ed5 Added refund tooltip. 2015-03-19 05:53:51 +00:00
WolfGaming
bf3ddcfbf1 Implemented an interface that allows traits to add custom information to tooltips. 2015-03-19 05:53:44 +00:00
Pavel Penev
272086de76 Merge pull request #7541 from Mailaender/d2k-build-hotkeys
Fixed the hard-coded Dune 2000 production tab hotkeys
2015-03-18 12:08:41 -07:00
Oliver Brakmann
4d8189ea97 Fix archive extraction in appveyor builds 2015-03-18 18:10:10 +01:00
Matthias Mailänder
73b4a18e22 make the d2k production tab hotkeys configurable 2015-03-18 06:49:44 +01:00
Matthias Mailänder
16ff6e2112 Merge pull request #7561 from RoosterDragon/fast-map-border-shroud
Speed up map border shroud & fix viewport visible cells
2015-03-18 06:36:45 +01:00
Pavel Penev
82c01ec640 Merge pull request #7667 from Mailaender/move-without-force
Avoid PowerShellisms to fix the AppVeyor build
2015-03-17 18:58:09 -07:00
Pavel Penev
4c0a81fe15 Merge pull request #7679 from obrakmann/new-ftrk-icon
Replace flak truck icon with non-copyrighted art
2015-03-17 12:45:50 -07:00
Oliver Brakmann
d16701447f Replace flak truck icon with non-copyrighted art
The new art is based on an image from the public domain (http://commons.wikimedia.org/wiki/File:%D0%9C%D1%83%D0%B7%D0%B5%D0%B9_%D0%B2%D0%BE%D0%B5%D0%BD%D0%BD%D0%BE%D0%B9_%D1%82%D0%B5%D1%85%D0%BD%D0%B8%D0%BA%D0%B8_%D0%9E%D1%80%D1%83%D0%B6%D0%B8%D0%B5_%D0%9F%D0%BE%D0%B1%D0%B5%D0%B4%D1%8B,_%D0%9A%D1%80%D0%B0%D1%81%D0%BD%D0%BE%D0%B4%D0%B0%D1%80_%2829%29.jpg), modified for OpenRA by @OmegaBolt.
2015-03-17 18:51:04 +01:00
pevers
bc14889881 added cheat command to give money to all the players and AI 2015-03-17 16:45:37 +01:00
Matthias Mailänder
26a4b9b841 Merge pull request #7623 from cjshmyr/orelord
Added new 1v1 RA map by MicroBit - Ore Lord
2015-03-17 05:15:00 +01:00
Oliver Brakmann
e4ef1eb820 Merge pull request #7626 from Mailaender/ts-radar-dishes
Fixed Tiberian Sun radar dishes
2015-03-16 18:37:59 +01:00
reaperrr
258e924afe Merge pull request #7619 from pchote/ts-civilian-fixes
Fix TS civilian actor/sequence definitions.
2015-03-16 03:41:37 +01:00
reaperrr
a14bf8622f Merge pull request #7570 from Mailaender/mods-common
Moved more traits to Mods.Common
2015-03-15 19:53:13 +01:00
Curtis Shmyr
e71aca2038 Added new RA map by MicroBit - Ore Lord 2015-03-15 11:47:29 -06:00
Matthias Mailänder
737a0e0b67 move common traits 2015-03-15 18:25:28 +01:00
Oliver Brakmann
4a2803c9d1 Merge pull request #7528 from delftswa2014/feature/distinguish_ally_enemy_messages
Add "(Ally)" behind the name of allies in all-chat
2015-03-15 16:15:01 +01:00
Oliver Brakmann
f6b45fe6cd Merge pull request #7648 from Phrohdoh/emit-inf-check-race
Make EmitInfantryOnSell compare string[] for owner's race.
2015-03-15 15:03:51 +01:00
jabbink
1f26d900f5 Add "(Ally)" behind the name of allies in all-chat
Fixes #7518
2015-03-15 11:52:32 +01:00
Matthias Mailänder
5c1cd0db16 suppress prompting on file moves 2015-03-15 07:32:33 +01:00
Matthias Mailänder
fe5ff86fe2 avoid PowerShellisms 2015-03-15 01:34:50 +01:00
Taryn Hill
fcb2141132 EmitInfantryOnSell now checks a Races string[] against the seller’s race. 2015-03-14 15:54:26 -05:00
Taryn Hill
bc69539993 Clarify the error relating to too many frames defined in a sequence. 2015-03-14 15:50:52 -05:00
Pavel Penev
9a66fc7382 Merge pull request #7656 from OmegaBolt/bfdmap
Battle for Dune 3v3 map
2015-03-14 18:20:24 +02:00
OmegaBolt
9d3efd12a0 Battle for Dune 3v3 map
PR as recommended by penev
2015-03-14 15:42:30 +00:00
Pavel Penev
e8a12a5550 Merge pull request #7661 from Mailaender/appveyor-nsis-plugins
Try to fix the AppVeyor build
2015-03-14 15:00:50 +02:00
Matthias Mailänder
32e1cfd2f2 Merge pull request #7644 from razzmatazz/hackyai-mcv-redeployment-fix
HackyAI can now build buildings near a new MCV
2015-03-14 12:40:39 +01:00
Oliver Brakmann
863db5a42c Merge pull request #7640 from Phrohdoh/rand-dmg-sounds
SoundOnDamageTransition to use string[].
2015-03-14 12:39:20 +01:00
Oliver Brakmann
0062391665 Merge pull request #7652 from fluxer/bleed
add /lib and /lib64 to the locations lookup for Lua
2015-03-14 10:52:32 +01:00
Matthias Mailänder
33e49c371a try to fix the AppVeyor build 2015-03-14 09:57:22 +01:00
Pavel Penev
03bab4a72a Merge pull request #7631 from pchote/sequence-rework
Rework sequence parsing.
2015-03-14 00:13:03 +02:00
Taryn Hill
76457c5fc1 Merge pull request #7542 from Mailaender/appveyor-deployment-fix
Fixed AppVeyor deployment.
2015-03-13 16:22:40 -05:00
Pavel Penev
04e0275d33 Merge pull request #7650 from Phrohdoh/fix-ramp-nre
Fix NRE caused by checking the RampType of a tile in #7645.
2015-03-13 20:30:02 +02:00
Pavel Penev
dd424f0b14 Merge pull request #7657 from MustaphaTR/copyright-date-readme
Update year of Copyrights on Readme
2015-03-13 16:34:54 +02:00
Mustafa Alperen Seki
aaf0f8d906 Update year of Copyrights on Readme 2015-03-13 12:36:09 +02:00
Pavel Penev
dc6040217b Merge pull request #7618 from Rydra/upstream/hv-heuristic
Changed the harvester heuristic, solved several regressions in Pathfinder and harvesters
2015-03-13 01:55:50 +02:00
Taryn Hill
7bf058896d Apply SoundOnDamageTransition upgrade rule. 2015-03-12 16:09:15 -05:00
Taryn Hill
1e0612ddf0 Change SoundOnDamageTransition to randomly select
from a string[] instead of a single string.
2015-03-12 16:09:11 -05:00
Taryn Hill
32edeccb56 Merge pull request #7476 from abcdefg30/any-subfaction
Allow picking of a random subfaction.
2015-03-12 15:52:39 -05:00
abcdefg30
63fe578ba8 Allow picking of a random subfaction 2015-03-12 21:34:23 +01:00
Saulius Menkevičius
e1fa6af954 HackyAI can now build buildings with new MCV
There was an issue where HackyAI would try to build buildings
at old base location and would fail, unless it was placed at the
same place where the old MCV was.
2015-03-12 20:10:08 +02:00
Ivailo Monev
6f070994b5 add /lib and /lib64 to the locations lookup for Lua (issue #7637) 2015-03-12 15:20:46 +00:00
Taryn Hill
602de0ea13 Fix NRE caused by checking the RampType of a tile in #7645. 2015-03-12 09:11:51 -05:00
David Jiménez
ea32c20450 Changed the harvester heuristic so that now takes into account the distance from the initial search location. This makes harvesters somewhat more "intelligent" and gather nearer resources. Also solved several regressions introduced in the recent changes in the Pathfinder 2015-03-12 12:28:34 +01:00
Matthias Mailänder
fa4f43b750 account for initial health 2015-03-11 23:18:03 +01:00
Pavel Penev
687403ab89 Merge pull request #7645 from Phrohdoh/fix-slope-buildings
Mark ramp/slope tiles as unbuildable.
2015-03-11 23:50:17 +02:00
Taryn Hill
a744900e74 Mark ramp/slope tiles as unbuildable. 2015-03-11 16:30:55 -05:00
Matthias Mailänder
4f775a8dc7 Merge pull request #7641 from Generalcamo/patch-2
Add a Cloaking sound to the Phase Transport
2015-03-11 20:24:42 +01:00
Cody Brittain
a2de502619 Add a Cloaking sound to the Phase Transport
Adds a cloaking sound to the phase transport
2015-03-10 20:30:45 -04:00
Oliver Brakmann
f5535c00a2 Merge pull request #7593 from Phrohdoh/wiki-trait-links
Wiki trait links.
2015-03-10 18:40:53 +01:00
Oliver Brakmann
60bf903e7c Merge pull request #7634 from Phrohdoh/sw-docs
Add some documentation to support powers.
2015-03-10 18:35:41 +01:00
Matthias Mailänder
cb29c29efc deploy on any branch with tags 2015-03-10 07:31:26 +01:00
Matthias Mailänder
32328835ff try to fix artifact deployment 2015-03-10 07:31:26 +01:00
Matthias Mailänder
7bf3ef0e90 stop 7-Zip from displaying prompts that halt the build 2015-03-10 07:31:24 +01:00
Matthias Mailänder
7123f93e86 Merge pull request #7617 from Mailaender/fuzzy-nuget
Removed FuzzyLogicLibrary.dll binary from source code management
2015-03-10 06:50:56 +01:00
Taryn Hill
a5bbb60db9 Remove unnecessary newline from output.
Make required trait strings a hyperlink.
2015-03-10 00:20:40 -05:00
Taryn Hill
51e470e64c Add some documentation to support powers. 2015-03-10 00:13:24 -05:00
Paul Chote
f91ee3fb45 Fix sequence terminology. 2015-03-09 20:45:49 +00:00
Paul Chote
7292bd20b3 Move Sequence parsing into mod code. 2015-03-09 20:45:22 +00:00
Paul Chote
d3783f0244 Introduce ISpriteSequence interface. 2015-03-09 19:19:00 +00:00
Paul Chote
2cc714be4e Allow IGlobalModData to opt-in to custom parsing. 2015-03-09 19:19:00 +00:00
Paul Chote
60937b096b Give a sensible error if LoadScreen/LobbyDefaults is missing. 2015-03-09 19:18:59 +00:00
Matthias Mailänder
429111a282 fix the destroyed radar dishes 2015-03-08 21:51:36 +01:00
Matthias Mailänder
762c0e12a2 Merge pull request #7522 from delftswa2014/bugfix/sellicon
Closes #7508
2015-03-08 19:13:34 +01:00
Oliver Brakmann
78e74eb685 Merge pull request #7601 from Phrohdoh/ab-hotkeys
Add hotkeys to playback controls.
2015-03-08 17:19:24 +01:00
Taryn Hill
a05b015581 Add hotkeys to playback controls. 2015-03-08 10:30:26 -05:00
Oliver Brakmann
190d197613 Merge pull request #7544 from delftswa2014/bugfix/sam_site_friendlyfire
Friendly fire fixes and sam sites
2015-03-08 16:16:14 +01:00
Oliver Brakmann
a39352aee3 Merge pull request #7524 from penev92/bleed_enemySightedNotification1
Fix the EnemyWatcher trait (hotfix)
2015-03-08 15:44:31 +01:00
Paul Chote
4110064c44 Fix TS civilian actor/sequence definitions. 2015-03-08 13:01:47 +00:00
penev92
4a5b3b59ed Properly remove worms from the world 2015-03-08 15:01:40 +02:00
penev92
58ab28206f Fix multiple notifications in multiplayer bug 2015-03-08 15:01:38 +02:00
penev92
1261fd1b07 Increase NotificationInterval to 30 seconds 2015-03-08 15:01:36 +02:00
Pavel Penev
a3065ad90c Merge pull request #7616 from obrakmann/fix-win-map-hashes
Ensure LF line ending for .yaml files for hash consistency across platforms
2015-03-08 14:55:32 +02:00
Matthias Mailänder
ac5a1b2569 fetch FuzzyLogicLibrary from NuGet 2015-03-08 10:22:37 +01:00
Pavel Penev
5ad1424c87 Merge pull request #7579 from Mailaender/lua51-msvc110
Avoid MSVC120 runtime dependency for Lua Windows DLLs
2015-03-08 02:29:55 +02:00
Pavel Penev
4c394d61e4 Merge pull request #7611 from Mailaender/freetype2-msvc-downgrade
Fixed FreeType2 depending on too new VS C++ runtime DLLs
2015-03-08 02:27:14 +02:00
Oliver Brakmann
419e63a33c Ensure LF line ending for .yaml files for hash consistency across platforms
Without this change, the git client will auto-convert the line endings to CRLF, which leads to hash mismatches for unpacked maps, which would be especially bad if we were going to build the Windows package on a Windows system.

Adds the same rule for .lua files as well, in preparation for a change that will make those contribute to the map hash.
2015-03-07 23:34:01 +01:00
Matthias Mailänder
b7255761e3 downgrade to MSVC8 runtime dependency 2015-03-07 17:54:42 +01:00
Taryn Hill
04fff1da72 Merge pull request #7606 from pchote/manifest
Allow mods to define custom manifest data.
2015-03-07 09:51:00 -06:00
Matthias Mailänder
0f309c31be downgrade FreeType2 version to old msvcrt.dll dependency
also downgrade ZLib dependency to old VC runtime versions
2015-03-07 14:04:36 +01:00
Paul Chote
dcfc62f333 Move InstallUtils from Game to Mods.Common. 2015-03-07 10:02:43 +00:00
Paul Chote
2de91a4c4e Convert ContentInstaller into a manifest module. 2015-03-07 10:02:42 +00:00
Paul Chote
5552000d69 Allow mods to define custom manifest metadata. 2015-03-07 10:02:42 +00:00
Paul Chote
31710c1644 Remove obsolete Movies entry from cnc manifest. 2015-03-07 10:02:42 +00:00
Pavel Penev
77684f4439 Merge pull request #7353 from Mailaender/promptconfirm-incompatible-replay
Added a warning before loading incompatible replays
2015-03-07 11:20:33 +02:00
Matthias Mailänder
e13447e641 automatically switch mods when possible 2015-03-07 10:12:16 +01:00
Matthias Mailänder
3bb448b29b warn before loading incompatible replays 2015-03-07 10:06:17 +01:00
Pavel Penev
5fa7e50c8e Merge pull request #7599 from DeadlySurprise/radarCursorFix
Fixed radar not showing move/attack cursors
2015-03-06 22:32:37 +02:00
Pavel Penev
f590fe0d91 Merge pull request #7602 from obrakmann/fix7600_pdof_bib
Add mini-bib to fake chronosphere
2015-03-06 22:24:31 +02:00
Oliver Brakmann
886513277a Add mini-bib to fake chronosphere
Fixes #7600
2015-03-06 20:29:30 +01:00
DeadlySurprise
1a2e8d56d1 Fixed radar not showing move/attack cursors 2015-03-06 14:30:45 +01:00
Taryn Hill
36db620262 Merge pull request #7533 from reaperrr/ra-weapons
Split RA weapons.yaml into multiple roughly categorized files.
2015-03-05 17:27:16 -06:00
jabbink
da546fc955 Add Kill/Death ratio in statistics window
closes #6858
2015-03-05 11:15:08 +01:00
Matthias Mailänder
957a9e2532 Merge pull request #7580 from Phrohdoh/ab-logical-frame-counter
Use correct frame indices in the asset browser.
2015-03-04 22:11:56 +01:00
Matthias Mailänder
fc750874bc Merge pull request #7586 from Phrohdoh/exit-descs-buff
Make Exit’s descs more informative.
2015-03-04 20:45:59 +01:00
pevers
17fec82348 fixed taking over sam/pillbox/etc. to stop firing
fixed issue with powered down samsites

more optimization

very small optimization

undo changes to powerdown samsite fixes

refixed powered down sam sites

removed debug line

redid the fix in another approach by queueing a sell activity on the top of the queue. This was already present but didn't always work

fixed line I removed

prevented attack activity to be queued when actor is disabled

another style fail of me

reverse and queueactivity activities are now executed on top of the queue for a sell action
2015-03-04 18:13:33 +01:00
Taryn Hill
7b16ba5d42 Use correct frame indices in the asset browser
with total frame count in parentheses.
2015-03-04 10:52:07 -06:00
Taryn Hill
d6da7d54e4 Make Exit’s descs more informative. 2015-03-04 09:15:09 -06:00
Scott
43c3621ef6 Merge pull request #7582 from Phrohdoh/ignore-moq
Add Moq.dll to the gitignore.
2015-03-04 19:00:46 +13:00
Taryn Hill
025493f6a5 Add Moq.dll to the gitignore. 2015-03-03 22:02:35 -06:00
Paul Chote
8c4ea20636 Merge pull request #7430 from Rydra/upstream/pf-optimized
[Discussion PR] Complete refactor of Pathfinder
2015-03-03 19:50:25 +00:00
David Jiménez
54ae572303 - Introduced Unit Testing capabilities to the PathFinder trait and algorithm.
Introduced also a small Unit test project to prove it.

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

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

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

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

- Massive performance improvements

- Solved error with harvesters' Heuristic

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

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

- Extracted the graph abstraction onto an IGraph interface, making the
Pathfinder agnostic to the definition of world and terrain. This
abstraction can help in the future to be able to cache graphs for similar
classes and their costs, speeding up the pathfinder and being able to feed
the A* algorithm with different types of graphs like Hierarchical graphs
2015-03-03 20:11:11 +01:00
Oliver Brakmann
50d726ea31 Merge pull request #7477 from pchote/d2k-raceart
Add race-specific sequence support, and overhaul D2K actor definitions.
2015-03-03 20:07:30 +01:00
Paul Chote
b968b527d2 Allow map players to use non-selectable races. 2015-03-03 18:45:46 +00:00
Paul Chote
6e08fd33c4 Update d2k map importer actor table. 2015-03-03 18:45:46 +00:00
Paul Chote
476986660f Allow GDI/Nod flavoured conyards to be built in debug mode. 2015-03-03 18:45:45 +00:00
Paul Chote
b670673f9f Reorganize D2K actor rules.
This removes the redundancy between faction variants and adjusts the layout
to be more consistent with the other mods.
2015-03-03 18:45:45 +00:00
Paul Chote
b7a98c8eb7 Document the other Transforms trait properties. 2015-03-03 18:45:45 +00:00
Paul Chote
59d06a22bf Change "Cannot deploy here" to a notification. 2015-03-03 18:45:44 +00:00
Paul Chote
7b27b803f9 Allow actors to force a specific race variant. 2015-03-03 18:45:44 +00:00
Paul Chote
d1ed1bf0fb Set actor race (and icons) based on active producer. 2015-03-03 18:45:44 +00:00
RoosterDragon
6234e311ca Speed up shroud visibility updates.
A unit with the CreatesShroud or RevealsShroud trait must update all shrouds when it changes position. Calculating the tiles it can currently see is an expensive calculation that previously had to be repeated for every shroud that needed to know these tiles.

Now, we lazily populate a ref parameter to allow it to be reused for an actor if possible. The biggest improvement comes from the fact that allied players can re-use this calculation when updating their shrouds. Since many games includes a neutral player allied to both sides, most games will see a decent speedup.
2015-03-02 22:18:06 +00:00
Paul Chote
44159ecdd6 Add support for race-specific actor sequences. 2015-03-02 20:46:24 +00:00
Paul Chote
00a2146299 Adjust GetImage plumbing in preparation for race-specific sequences. 2015-03-02 20:46:24 +00:00
Paul Chote
4c3a95ebc0 Fix bogus Produces definition on TD FACT. 2015-03-02 20:46:24 +00:00
Paul Chote
f606a1bfd7 Use a consistent set of arguments for Render* ctors. 2015-03-02 20:46:23 +00:00
Oliver Brakmann
d135e58ad9 Merge pull request #7501 from Bynnar18/leftclick
Reimplementing Left Click Orders with Fixes
2015-03-02 18:01:26 +01:00
reaperrr
477dbbd532 Splits RA weapons.yaml into multiple roughly categorized files 2015-03-01 22:11:45 +01:00
Bynnar18
0abe8f9b2b Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme. 2015-03-01 14:58:19 -06:00
Bynnar18
7b46b76329 Fixed left-click orders and implemented a selection deadzone. 2015-03-01 14:58:19 -06:00
Bynnar18
36d59d6b1d Restored faulty left-click logic for now. 2015-03-01 14:58:18 -06:00
Oliver Brakmann
75bfd0fb31 Merge pull request #7535 from reaperrr/allmods-audio
Cleanup: Moved audio-related yamls to audio subfolder
2015-03-01 19:20:47 +01:00
Pavel Penev
711659d7dd Merge pull request #7540 from Mailaender/d2k-description
Changed the Dune 2000 mod chooser description
2015-03-01 17:53:20 +02:00
Matthias Mailänder
ab04380234 give this a more in-universe description
we now have sandworms, carryalls and concrete
2015-03-01 14:59:41 +01:00
Oliver Brakmann
61cea23c3c Merge pull request #7562 from abcdefg30/onSellRemoved
Fix a crash in OnAllRemovedFromWorld
2015-03-01 14:00:25 +01:00
Oliver Brakmann
74c22523aa Merge pull request #7564 from Mailaender/common-widgets
Moved the whole widget code to OpenRA.Mods.Common
2015-02-28 23:00:07 +01:00
Matthias Mailänder
ff6dbde8d7 move widget code to commons 2015-02-28 20:32:19 +01:00
Oliver Brakmann
92101a1393 Merge pull request #7487 from abcdefg30/changealtitude
Change the plane altitude in ra
2015-02-28 19:49:39 +01:00
RoosterDragon
d3b93345b4 Fix Viewport.VisibleCells.
Reworked the visible cells calculation to ensure the visible region is actually minimal, which should reduce the amount of rendering to be done by a small amount. Previously, the region would tend to overdraw by 2-3 cells in either direction. For isometric maps, there was also a bug where it would draw far too much vertically above the top of the map.
2015-02-28 13:36:58 +00:00
abcdefg30
28262df1e5 Don't crash when selling an actor using OnAllRemovedFromWorld 2015-02-28 09:38:14 +01:00
RoosterDragon
803390c68e Speed up rendering map border shroud when no shroud is visible.
When the map border shroud must be rendered, but no cells at the border are visible, then we know that no shroud will be visible at all. We can bail from rendering early in this case.
2015-02-27 20:07:32 +00:00
Pavel Penev
cee3d6cf9e Merge pull request #7532 from RoosterDragon/disabledoverlay-modifyrender
Adjust DisabledOverlay.ModifyRender to be more efficient.
2015-02-27 01:08:39 +02:00
RoosterDragon
6baa35a763 Adjust DisabledOverlay.ModifyRender to be more efficient.
When not disabled, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is disabled, then the modifying enumerable has one less condition to check inside the loop.
2015-02-26 21:58:29 +00:00
Pavel Penev
0c9960ae1b Merge pull request #7519 from obrakmann/fix7516_default-facing
Change default facing to 0
2015-02-26 23:23:43 +02:00
Oliver Brakmann
a1beb8a61e Merge pull request #7555 from delftswa2014/bugfix/resourcegrowth_transient
allowed resources to be grown under Actors
2015-02-26 22:18:01 +01:00
Pavel Penev
67cee6324c Merge pull request #7511 from obrakmann/vqaplayer-no-mouse
Prevent VqaPlayerWidget from eating the radar bin's mouse input
2015-02-26 23:14:26 +02:00
Oliver Brakmann
325f8fbb17 Merge pull request #7554 from x-a-n-a-x/RA-DebugSymbol
Adds a debug symbol (RA mod)
2015-02-26 22:00:20 +01:00
Nick ten Veen
96e9b90a64 Fixed #7008 for TD, TS and D2K aswell 2015-02-26 21:56:35 +01:00
Nick ten Veen
78511de58f allowed resources to be grown under Actors 2015-02-26 18:15:09 +01:00
Sebastien Kerguen
1b0a805fc6 Adds the chrome.psd (art source) 2015-02-26 17:26:07 +01:00
Sebastien Kerguen
3834a08c73 Adds a debug symbol (RA mod) 2015-02-26 17:08:00 +01:00
Oliver Brakmann
4beef806d6 Merge pull request #7521 from delftswa2014/bugfix/cheatfix
Forgot shroud on all-cheat
2015-02-25 23:35:00 +01:00
reaperrr
57a4bdb606 Remove obsolete PackageContents from TS mod.yaml 2015-02-23 23:30:14 +01:00
reaperrr
e38736670c Move TS music, notifications and voices yamls to audio subfolder.
Move TileSets and tile/cell settings for consistency with other mods.
2015-02-23 23:29:39 +01:00
reaperrr
650bc615af Move D2k music, notifications and voices yamls to audio subfolder.
Move TileSets a little for consistency with other mod.yamls.
2015-02-23 23:27:49 +01:00
reaperrr
26158ad722 Move TD music, notifications and voices yamls to audio subfolder.
Move TileSets and Translations in mods.yaml for consistency with other mods.
2015-02-23 23:24:18 +01:00
reaperrr
7baad53124 Move RA music, notifications and voices yamls to audio subfolder 2015-02-23 23:20:55 +01:00
Oliver Brakmann
ec12fb130c Merge pull request #7527 from delftswa2014/bugfix/lobby_chat_margin
Increase ItemSpacing in CHAT_TEMPLATE for the lobby chat
2015-02-23 22:13:42 +01:00
Oliver Brakmann
0bf9b04b51 Merge pull request #7531 from RoosterDragon/stream-read-fixes
Fix some broken Stream.Read calls.
2015-02-23 21:49:49 +01:00
pevers
6d716d301a DisableShroud cheat now properly disables after disabling the all-cheat
Smaller code base

Added newline

Added newline between assignment and statement

fixed spacing

fixed spacing

fixed spacing
2015-02-23 21:19:07 +01:00
RoosterDragon
d4421f0a41 Fix some broken Stream.Read calls.
Change callers of this method to use the ReadBytes extension method that ensures the requested amount of bytes are consumed.

Also tighten argument validation.
2015-02-23 19:40:16 +00:00
jabbink
a7a326c568 Increase ItemSpacing in CHAT_TEMPLATE for the lobby chat
Fixes #7447
2015-02-23 15:12:11 +01:00
David Jiménez
8659a3e71e Introduced the interfaces IActor, ICacheStorage, ILog, IMap, IWorld a
nd IMobileInfo to separate concrete implementations and abstractions
2015-02-22 23:14:12 +01:00
pevers
97ca96f8ab fixed sellicon bug 2015-02-22 18:14:25 +01:00
Oliver Brakmann
85fae8720d Merge pull request #7510 from DeadlySurprise/UninstallFix
Added uninstaller check for running game
2015-02-22 17:14:11 +01:00
Oliver Brakmann
02c4ace0af Change default facing to 0 2015-02-22 16:25:40 +01:00
Oliver Brakmann
293ec6577b Merge pull request #7507 from delftswa2014/bugfix/cheatfix
Fixed all cheat code
2015-02-22 15:10:17 +01:00
pevers
3f1db45ea6 changed all cheat to really enable everything on call
added givecash to the all cheat

fixed spacing

fixed spacing
2015-02-22 14:43:42 +01:00
DeadlySurprise
4668452e9b Added plugin download to appveyor 2015-02-21 21:58:07 +01:00
DeadlySurprise
c50feeb4e2 Added uninstaller check for running game 2015-02-21 21:57:46 +01:00
Oliver Brakmann
d3dab83de8 Merge pull request #7461 from pchote/remove-legacy-sidebar
Remove legacy sidebar code
2015-02-21 16:46:39 +01:00
Oliver Brakmann
878430622f Merge pull request #7479 from Mailaender/nuget-openal-soft
Replaced OpenAL Soft Windows DLL with a fetch script from Nuget
2015-02-21 15:42:24 +01:00
Matthias Mailänder
361c1bc010 Merge pull request #7483 from pchote/deadbuildingstate
Fix missing first animation frame and remove DeadBuildingState.
2015-02-21 14:00:23 +01:00
Pavel Penev
20ca9b2ab1 Merge pull request #7486 from delftswa2014/bugfix/apcbibs
Fixed #7472 so that cargo is only shown on allied vehicles
2015-02-21 02:08:41 +02:00
Pavel Penev
293bb78a3c Merge pull request #7457 from pchote/actorpreviews
Introduce ActorPreviewWidget (and other related changes).
2015-02-21 01:35:03 +02:00
Oliver Brakmann
aeceb05e08 Merge pull request #7305 from RoosterDragon/shroud-lazy-update
Vastly improve shroud rendering performance.
2015-02-20 23:59:48 +01:00
Oliver Brakmann
10f0c83270 Prevent VqaPlayerWidget from eating the radar bin's mouse inputs 2015-02-20 22:44:37 +01:00
RoosterDragon
4d5101a7c4 Vastly improve shroud rendering performance.
Changes in the shroud are now tracked. If a cell changes it will mark itself and its neighbors as dirty. During the render phase all dirty cells will have their vertices calculated and cached. If a cell is not dirty, the pre-calculated vertices are retrieved from cache. Then the sprite renderer is provided the sprite and the pre-calculated vertices to draw.

This prevents constant recalculation of vertices for the shroud in the render phase, requiring instead only dirty cells in the visible area. The update phase is reduced to a practical noop, instead incurring the cost only of changed cells each frame, rather than checking the visible area.
2015-02-20 20:03:42 +00:00
Paul Chote
df7588f1bc Merge pull request #7488 from RoosterDragon/trait-remove-perf
Speed up TraitContainer.RemoveActor.
2015-02-20 17:45:40 +00:00
Paul Chote
4ac8199e8e Merge pull request #7482 from OpenRA/appveyor-deploy-conditions
Fixed AppVeyor deploying and failing the build
2015-02-20 17:29:10 +00:00
Paul Chote
1a6de9a03c Merge pull request #7374 from DeadlySurprise/cashOverflowFix
Added a check for overflowing player credits
2015-02-20 17:24:57 +00:00
Paul Chote
f4e94f9f60 Merge pull request #7318 from reaperrr/remove-percellwh
Removed PerCellDamageWarhead
2015-02-20 17:15:28 +00:00
Paul Chote
f2087de9bd Remove DeadBuildingState.
Fixes #3422, #3522, #5136.
2015-02-20 16:56:46 +00:00
Paul Chote
29bf625887 Remove DeadBuildingState from RA. 2015-02-20 16:56:41 +00:00
Paul Chote
63e9cd4c9c Remove DeadBuildingState from TD. 2015-02-20 16:54:04 +00:00
Paul Chote
e9caf7f6e6 Initialise frame time when playing a new sequence.
Fixes #3706, #6389.
2015-02-20 16:54:04 +00:00
Paul Chote
e52c15553f Remove legacy sidebar code. 2015-02-20 16:46:55 +00:00
pevers
329d610577 Fixed #7472 so that cargo is only shown on allied vehicles
fixed spacing

pips are shown on every team when shroud is disabled

removed comment

Remove unwanted comment explaining how ally-detection works

fixed the real problem in RenderAfterWorld
2015-02-19 21:09:37 +01:00
Paul Chote
2a1e4f70a9 Replace the legacy TS sidebar placeholder with a modern placeholder. 2015-02-19 17:54:01 +00:00
Pavel Penev
e2da1f11cb Merge pull request #7495 from abcdefg30/placed_overlay
Fix a visual glitch in WithBuildingPlacedOverlay
2015-02-19 00:40:58 +02:00
abcdefg30
adffd33f4d Don't repulse actors flying with another altitude 2015-02-18 22:06:31 +01:00
abcdefg30
c70edc65fe Change cruise altitudes and fall rates 2015-02-18 22:06:30 +01:00
abcdefg30
6155928678 Don't display beacons in the air 2015-02-18 22:06:28 +01:00
Oliver Brakmann
44f884c561 Merge pull request #7156 from DeadlySurprise/luaMediaApi
Lua API : Added floating text and radar video
2015-02-18 20:57:37 +01:00
Oliver Brakmann
ca611a82e4 Merge pull request #7135 from penev92/bleed_d2kMapImporter
D2k: Add map importer
2015-02-18 20:33:17 +01:00
DeadlySurprise
7b53582c5e Implemented Floating Text and radar video 2015-02-18 14:38:30 +01:00
abcdefg30
f63bc1e001 Fix a glitch in WithBuildingPlacedOverlay
when transforming the actor.
2015-02-18 12:50:17 +01:00
penev92
922af4d9cf Add missing tiles BLOXBGBS-29 (1x1) and BLOXBGBS-617 (2x2) 2015-02-18 13:18:42 +02:00
penev92
da425f47e7 Initial implementation of D2k legacy map importer
Improve error handling; fix utility command description

Revert output location to working directory for both map importers

Rework how the map tiles get populated

Remove actor comments
2015-02-18 13:16:32 +02:00
abcdefg30
035b96f469 Made the ts conyard sellable 2015-02-18 11:13:48 +01:00
Igor Popov
5bcd56eb9d Merge pull request #7439 from ScottNZ/fix-map-import
Fix map importer using the map title as the output filename.
2015-02-17 09:47:01 +03:00
reaperrr
89527962dd Upgrade rule for PerCellDamage removal 2015-02-17 01:33:23 +01:00
reaperrr
f39488de41 Remove PerCellDamageWarhead
Remove redundant CrateNuke definition from Training Camp
2015-02-17 01:33:22 +01:00
RoosterDragon
a3898db660 Speed up TraitContainer.RemoveActor.
Use the binary search invariant of the lists to find the actor quickly and remove the range of entries from the list in a single operation to avoid redundant copying otherwise caused by removing entries one by one.
2015-02-17 00:02:43 +00:00
Chris Forbes
32411d64df Merge pull request #7480 from pchote/beacon-poster-fade
Desaturate beacon posters in TD menu.
2015-02-17 10:06:27 +13:00
Matthias Mailänder
38dbb3063b Merge pull request #7462 from obrakmann/fix7459_build_area
Fix extent of buildable area below structures
2015-02-16 22:04:03 +01:00
penev92
9664e32005 Merge pull request #7424 from RoosterDragon/minor-alloc
Avoid some memory allocations
2015-02-16 20:20:40 +02:00
Matthias Mailänder
917ae35e40 don't try to deploy all the time 2015-02-15 17:30:40 +01:00
Paul Chote
6e55c79a66 Desaturate beacon posters in TD menu. 2015-02-15 15:34:40 +00:00
Matthias Mailänder
6626df468c fetch OpenAL Soft from Nuget on Windows 2015-02-15 11:33:05 +01:00
Matthias Mailänder
4b70005d49 Merge pull request #7458 from pchote/replay-metadata
Closes #6669
2015-02-15 10:31:17 +01:00
Paul Chote
2d31e12bb9 Add --replay-metadata utility command. 2015-02-15 08:58:59 +00:00
Oliver Brakmann
7c59a523db Merge pull request #7460 from pchote/soviet-sidebar
Fix soviet sidebar regression
2015-02-14 20:47:06 +01:00
Oliver Brakmann
beb9e5087b Merge pull request #7446 from atimoschenkow/fix-sound-reset
Fix #7431
2015-02-14 17:04:14 +01:00
Oliver Brakmann
d1f810731d Merge pull request #7437 from 42foobar42/nod2b
added nod mission 2b
2015-02-14 16:50:27 +01:00
Oliver Brakmann
de16d29aa6 Merge pull request #7445 from jwbuurlage/bleed
Fixes #7219. In addition, sets cursor corresponding to the order with hi...
2015-02-14 12:22:34 +01:00
ScottNZ
61de2a2312 Fix map importer using the map title as the output filename.
This is broken because the map title can make an invalid filename.
2015-02-15 00:04:38 +13:00
Matthias Mailänder
76bf570426 Merge pull request #7436 from penev92/bleed_moveFiles2
Move the AI to Mods.Common
2015-02-14 09:42:18 +01:00
Matthias Mailänder
589e9fb5ee Merge pull request #7471 from x-a-n-a-x/D2KUI-tooltips
Closes #7470
2015-02-14 07:21:14 +01:00
Sebastien Kerguen
fa3c0e77d5 - fixes the missing tooltip glyphs #7470 2015-02-13 22:55:02 +01:00
Paul Chote
50860ab2b5 Merge pull request #7378 from obrakmann/fix_wiki_deployment
Switch wiki deployment to the orabot user with SSH auth
2015-02-12 14:43:19 +00:00
Taryn Hill
5349c69307 Merge pull request #7467 from ScottNZ/stylecop-fixes
Brace style fixes.
2015-02-12 07:54:10 -06:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
Paul Chote
aa550790e5 Merge pull request #4528 from Mailaender/mime
Registered Linux MIME type to directly load replays
2015-02-12 11:21:37 +00:00
Paul Chote
6cacc70f6e Merge pull request #7456 from Mailaender/d2k-radar-fixup
Fixed the faction insignia being drawn over the radar minimap
2015-02-12 10:36:41 +00:00
Alexander Boll
52c67aef76 added hunt to every movement 2015-02-10 21:08:20 +01:00
Alexander Boll
e4647a8333 added nod mission 2b 2015-02-10 21:08:19 +01:00
Matthias Mailänder
ba66be18f7 remove empty Children: 2015-02-10 20:17:50 +01:00
Matthias Mailänder
b4ada2d61c change drawing order of faction logos over the minimap 2015-02-10 20:17:48 +01:00
Oliver Brakmann
7f4b62b7ee Fix extent of buildable area below structures
Restore use of GetBuildingAt to take bibs into account for buildable area, and only consult the actor map if the actor at that location is not a building.
2015-02-10 19:28:54 +01:00
Paul Chote
1af61c92c5 Split SpriteRenderable into its own file. 2015-02-10 17:47:49 +00:00
Paul Chote
2834c95e35 Fix soviet sidebar texture rectangles. 2015-02-10 17:11:15 +00:00
Paul Chote
8d51fb0e66 Use ActorPreviewWidget for the color pickers. 2015-02-10 15:22:42 +00:00
Paul Chote
aa9db669e7 Fix ActorPreview turret facings. 2015-02-10 15:22:42 +00:00
Paul Chote
268ca94dc1 Introduce ActorPreviewWidget. 2015-02-10 15:22:42 +00:00
Paul Chote
db1a27b071 Introduce IFinalizedRenderable.ScreenBounds. 2015-02-10 14:26:44 +00:00
Paul Chote
c55d723fb4 Remove Scale from IRenderable interface.
It is no longer used, and isn’t implemented for most renderables.
2015-02-09 23:26:06 +00:00
Paul Chote
a495a2f528 Split IFinalizedRenderable from Renderable to remove mutable structs. 2015-02-09 23:23:37 +00:00
Matthias Mailänder
1eb6c984f5 Merge pull request #7384 from Mailaender/new-d2k-build-palette
Added the new modular build palette to Dune 2000
2015-02-09 22:08:43 +01:00
penev92
6c6a4322ed Move the AI namespace to Mods.Common 2015-02-09 16:57:29 +02:00
atimoschenkow
9bf43c00a3 Fix #7431 2015-02-09 00:50:18 +01:00
Jan-Willem Buurlage
7eb2106375 Change cursor according to the command with highest priority. 2015-02-08 22:38:05 +01:00
Jan-Willem Buurlage
ce6c883fb1 Fixed #7219. Reduce boarding priority to resolve conflict with force-attacking own units. 2015-02-08 22:31:56 +01:00
Jan-Willem Buurlage
26562862f7 Add myself to authors 2015-02-08 22:30:55 +01:00
Matthias Mailänder
b0f986887c make maximum and minimum rows configurable 2015-02-08 20:43:35 +01:00
Matthias Mailänder
3be3700722 use the new modular UI 2015-02-08 20:43:32 +01:00
Matthias Mailänder
d921e0f838 Merge pull request #7418 from Mailaender/movie-list-removal
Removed the unused movie lists
2015-02-08 13:00:02 +01:00
Oliver Brakmann
32243122be Merge pull request #7435 from penev92/bleed_moveFiles
Moving more files to Mods.Common
2015-02-07 10:10:32 +01:00
Oliver Brakmann
0af8d6902b Merge pull request #7420 from abcdefg30/tsbounds
Fix some ts structure bounds
2015-02-06 22:03:54 +01:00
Oliver Brakmann
aafde15ddf Merge pull request #7393 from 42foobar42/bleed
Nod Mission 2a
2015-02-06 21:18:50 +01:00
Alexander Boll
9a09421800 fixed mission 2a and cleaned the code
changed according style code and added production trigger

corrected tech tree

removed comments and corrected same style issues

added gdi tech tree and changed produce to build

changed image format and replace spaces with tabs

deleted unnecessary tabs, added tooltips and corrected name

added lua file from nod 2a

changed according style code and added production trigger

deleted unnecessary tabs, added tooltips and corrected name

fixed image size

changed for loops to Utils.Do, removed facing and health from yaml,
changed movement function and corrected mission description

restored facing values unequal zero und fixed image position

Polish things a bit

Have player's units move into the map at the start

Polish some things
2015-02-06 21:11:18 +01:00
abcdefg30
3b84f42689 Fix some structure bounds 2015-02-06 20:48:21 +01:00
penev92
64887cb8c8 Move MainMenuLogic to Mods.Common 2015-02-06 13:37:43 +02:00
penev92
494b600ed8 Move refinery and harvester logic to Mods.Common;
Remove unused interface IAcceptOreDockAction
2015-02-06 13:23:07 +02:00
Matthias Mailänder
6714b498af Merge pull request #7428 from Phrohdoh/chmod
Unset executable bit from some thirdparty objects.
2015-02-05 19:22:22 +01:00
Oliver Brakmann
fc7e944727 Merge pull request #7398 from LipkeGu/ts_assets_part2
Adding the Rocks to Tiberian Sun
2015-02-05 18:22:57 +01:00
Oliver Brakmann
01ee8a3ca7 Merge pull request #7421 from huwpascoe/bugfix-carryall
BugFix: harvester-carryall remote death
2015-02-05 17:04:40 +01:00
Oliver Brakmann
1cb04d4500 Merge pull request #7408 from Mailaender/appveyor-nsis-deploy
Fixed NSIS being installed during every pull request build
2015-02-05 16:11:50 +01:00
Taryn Hill
a0130f105e Unset executable bit from some thirdparty objects. 2015-02-04 12:37:04 -06:00
huwpascoe
804cdee8f0 BugFix: harvester-carryall remote death
The d2k harvester would suddenly explode if the approaching carryall was
destroyed. This is because there was no distinction between the unit being
carried and the unit being reserved. To test you'll probably have to tweak
the turret missile in weapons.yaml so you can forcefire on the carryall.

* added a bool to check if carryall is actually holding it's target
* fixed harvester being stuck in reserved mode
2015-02-03 22:43:35 +00:00
Taryn Hill
e79239311a Merge pull request #7376 from abcdefg30/tsprereqs
Fix TS prerequisites.
2015-02-03 15:46:13 -06:00
Oliver Brakmann
86051ade43 Merge pull request #7423 from abcdefg30/demofix
Fix the demo truck explosion not killing the initiator
2015-02-03 22:20:18 +01:00
Guido L.
ce5e6e5a76 Add Rocks to Tiberian Sun 2015-02-03 19:26:47 +01:00
Oliver Brakmann
99c4e12650 Merge pull request #7425 from chrisforbes/issuestats
add issuestats badges to README
2015-02-03 17:21:54 +01:00
Chris Forbes
9f05d39352 add issuestats badges to README 2015-02-03 15:35:42 +13:00
RoosterDragon
b4993efff1 Avoid some minor allocations.
- Don't call string.Format in Actor.ToString since it gets called often, instead prefer a simple concat.
- In HiddenUnderFog.IsVisible, avoid a needless level of lambda indirection.
2015-02-02 21:16:14 +00:00
RoosterDragon
7e28acadd8 DrawPanelPartial now specifies each sprite as an individual parameter.
This allows some array allocations to be avoided, and makes the code more obvious since each sprite is referred to by name rather than an array index.
2015-02-02 21:16:14 +00:00
Oliver Brakmann
0371cfef3b Merge pull request #7406 from abcdefg30/allies05a
Ported allies05a to lua
2015-02-02 17:06:53 +01:00
Oliver Brakmann
ccc34806de Some polish for allies05a
* Viewport follows the truck automatically
* Greece's reinforcements arrive only after the heli has left the scene
* Added "Reinforcements have arrived" notification
* Adds all the Lua files of the recent missions to the solution
2015-02-02 16:51:50 +01:00
abcdefg30
aab54218e5 Ported allies05a to lua 2015-02-02 16:51:50 +01:00
abcdefg30
3b5e95bdc5 Set "AffectsParent: true" for the "MiniNuke" weapon 2015-02-02 15:17:41 +01:00
Matthias Mailänder
595c792879 remove the unused movie lists 2015-02-01 18:53:50 +01:00
Matthias Mailänder
5040baac9b Merge pull request #7415 from obrakmann/gdi05a
Add mission gdi05a
2015-02-01 18:49:27 +01:00
Oliver Brakmann
1b4dc3d1fe Add mission gdi05a 2015-02-01 18:12:46 +01:00
Oliver Brakmann
479259b9d7 Update mission gdi03 2015-02-01 15:50:18 +01:00
Oliver Brakmann
4aa97ec776 Allow support powers to start with a full charge when created 2015-02-01 15:49:45 +01:00
Oliver Brakmann
de616c69a2 Merge pull request #7416 from atimoschenkow/adjust-nudge
Adjust nudging for cases where no enterable cell is found
2015-02-01 15:18:59 +01:00
Oliver Brakmann
07d6a104a1 Merge pull request #7413 from Unit158/BoDupdate
Updated Break of Day
2015-02-01 15:14:51 +01:00
atimoschenkow
f2ae11f247 Adjust nudging for cases where no enterable cell is found
- Randomly select one of the occupied "non-stupid" cells
- Notify blockers in that cell
- Wait until it can be entered
- Move to cell
2015-02-01 14:57:10 +01:00
DeadlySurprise
4f07de2af8 Added a check for overflowing player credits 2015-02-01 13:28:47 +01:00
Matthias Mailänder
bcda232a1c Merge pull request #7231 from RoosterDragon/linq-checks
Checked LINQ queries and collections for inefficiencies.
2015-02-01 08:56:15 +01:00
Christopher Grant
ec79915323 Updated Break of Day 2015-01-31 18:04:35 -05:00
Oliver Brakmann
b68918f5d5 Merge pull request #7401 from RoosterDragon/stylecop-ignore-designer
Ignore designer generated files during StyleCop checks.
2015-01-31 14:35:28 +01:00
RoosterDragon
7ad58a3e3d Revert "don't check auto-generated code"
This reverts commit 47e2d9d623.
2015-01-31 12:46:47 +00:00
RoosterDragon
7a0889db91 Ignore designer generated files during StyleCop checks. 2015-01-31 12:46:47 +00:00
Matthias Mailänder
cfbe59f1e4 only install NSIS during deployment 2015-01-31 11:31:48 +01:00
Paul Chote
885b8ee18b Merge pull request #7407 from Mailaender/moneybinwidget-invalid-spacing
Fixed OpenRA.Mods.D2k/Widgets/MoneyBinWidget.cs: [SP2000] Invalid spacing at the end of the line.
2015-01-31 23:21:36 +13:00
Matthias Mailänder
89a5facb14 fix SP2000 2015-01-31 11:07:06 +01:00
Matthias Mailänder
7592f7d6fb Merge pull request #7342 from LipkeGu/Draw_sprite_crash
Do not try to draw "null" sprites
2015-01-31 10:55:26 +01:00
Matthias Mailänder
f0d4650857 Merge pull request #7392 from abcdefg30/missiondiplomacy
Disable the diplomacy menu in mission or campaign maps
2015-01-31 10:49:44 +01:00
Matthias Mailänder
83e3edb90a Merge pull request #7404 from obrakmann/non-targetable-spyplane
Make spy plane non-targetable
2015-01-31 10:37:53 +01:00
Oliver Brakmann
22b1f4de59 Merge pull request #7331 from Phrohdoh/dune-armor-bonuses
TerrainModifiesDamage trait.
2015-01-30 17:30:43 +01:00
Oliver Brakmann
f0a1292207 Make spy plane non-targetable 2015-01-30 15:52:35 +01:00
Matthias Mailänder
4899b555a9 Merge pull request #7191 from Mailaender/ts-superweapons
Added the Nod missile silo and the Ion Cannon to the Tiberian Sun mod
2015-01-29 21:48:14 +01:00
abcdefg30
28b90b0115 Use the class enum in LeaveMapLogic.cs as well 2015-01-29 20:26:40 +01:00
abcdefg30
b7b1e13c63 Disable the diplomacy menu in mission or campaign maps 2015-01-29 20:26:15 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
Oliver Brakmann
f5f3747338 Merge pull request #7400 from obrakmann/whitespace-fix
Remove whitespace from empty line
2015-01-28 21:36:32 +01:00
Oliver Brakmann
f247bc890e Remove whitespace from empty line 2015-01-28 21:25:07 +01:00
Oliver Brakmann
7ddc340d5b Merge pull request #7314 from Unit158/Levelup-command
Added a levelup command
2015-01-28 20:58:17 +01:00
Oliver Brakmann
2e1ca40bb5 Merge pull request #7155 from cjshmyr/buildarea
Use ActorMap instead of BuildingInfluence for finding buildable area
2015-01-28 19:03:49 +01:00
Oliver Brakmann
9ec349cfd6 Merge pull request #7259 from MustaphaTR/d2k-tile-fix
D2K - Fixed some tiles
2015-01-28 18:54:02 +01:00
Mustafa Alperen Seki
a1810f7d28 Fixed some d2k tiles. 2015-01-28 14:17:06 +02:00
Oliver Brakmann
b0b83f2a3e Merge pull request #7388 from MustaphaTR/d2k-carryall-to-last
D2K - Carryall moved to last in Starport.
2015-01-27 20:32:06 +01:00
Matthias Mailänder
1859e9289a Merge pull request #7385 from huwpascoe/beepy
Changed the chat notification sounds for RA mod
2015-01-27 20:26:09 +01:00
Mustafa Alperen Seki
4e366a85fe Carryall moved to last in Starport. 2015-01-27 16:23:13 +02:00
Curtis Shmyr
30cf02c8e2 Use ActorMap instead of BuildingInfluence for finding buildable area 2015-01-26 20:22:21 -07:00
Taryn Hill
86f6d634c0 Add TerrainModifiesDamage trait.
^Infantry take 80% damage on Rough terrain in D2k.
2015-01-26 18:08:44 -06:00
huwpascoe
ac38340f4e Changed the chat notification sounds for RA and CNC mod. 2015-01-26 23:10:02 +00:00
Matthias Mailänder
034c071fbc Merge pull request #7382 from Mailaender/stylecop-plus
Added support for StyleCop+
2015-01-25 23:58:42 +01:00
Paul Chote
27a3a1e974 Merge pull request #7383 from obrakmann/fix7379_invalid_debug_channel
Fix wrong log channel name: Debug -> debug
2015-01-26 09:20:10 +13:00
Oliver Brakmann
b75adfe40e Merge pull request #6846 from Mailaender/gem-mine
Replaced the gem mine artwork
2015-01-25 20:16:51 +01:00
Oliver Brakmann
f2d8831576 Merge pull request #7360 from abcdefg30/allies03b
Ported allies03b to lua
2015-01-25 20:01:30 +01:00
Matthias Mailänder
f444fa6763 Merge pull request #7362 from RoosterDragon/fix-shared-font-sheetbuilder
Avoid a globally shared SheetBuilder in SpriteFont.
2015-01-25 19:48:54 +01:00
abcdefg30
4a7afd1a16 Ported allies03b to lua 2015-01-25 19:34:30 +01:00
Oliver Brakmann
266f26cdce Merge pull request #7223 from LipkeGu/ts_assets_mapeditor
Add Buildings and Trees to Tiberian Sun
2015-01-25 19:13:35 +01:00
Matthias Mailänder
24deec2a7b fix CodeLineMustNotEndWithWhitespace 2015-01-25 18:41:29 +01:00
Matthias Mailänder
47e2d9d623 don't check auto-generated code 2015-01-25 18:40:44 +01:00
Matthias Mailänder
93c4be6f7a add support for StyleCop+ 2015-01-25 18:40:44 +01:00
Oliver Brakmann
16cf805a23 Fix wrong log channel name: Debug -> debug 2015-01-25 18:34:16 +01:00
Oliver Brakmann
a38a1918dc Merge pull request #7098 from penev92/bleed_fixRefineryHierarchy
Clean up refinery and harvester docking sequence logic
2015-01-25 18:08:14 +01:00
penev92
828614d0f0 Add YAML upgrade rule 2015-01-25 17:17:35 +02:00
penev92
49508482c3 Update Refinery docking rules in YAML files 2015-01-25 17:17:34 +02:00
penev92
502ed6a0e7 Add SpriteHarvesterDockSequence and VoxelHarvesterDockSequence
Pass drag-related info from Refinery to HarvesterDockSequence
2015-01-25 17:17:34 +02:00
penev92
c18da7abb0 Fix harvester dock sequence names 2015-01-25 16:58:04 +02:00
penev92
202e280551 Fix OreRefinery and TiberiumRefinery names 2015-01-25 16:58:03 +02:00
penev92
6a40dfd0db Changed IAcceptOre to IAcceptResources 2015-01-25 16:58:02 +02:00
Oliver Brakmann
4cbfa31053 Merge pull request #6880 from Mailaender/lua-music
Added Media.PlayMusic to the Lua API
2015-01-25 15:05:47 +01:00
Oliver Brakmann
1f048b64ac Add upgrade rule for PlayMusicOnMapLoad removal 2015-01-25 14:44:13 +01:00
Matthias Mailänder
895f02d7cb update the music player widget when the music changes 2015-01-25 14:43:36 +01:00
Matthias Mailänder
c3e3a47746 play mission won theme 2015-01-25 14:43:36 +01:00
Matthias Mailänder
d5643a79b7 auto play shellmap music (again) on all mods
closes #6071
2015-01-25 14:43:36 +01:00
Matthias Mailänder
a7f27a65ea add Media.StopMusic() 2015-01-25 14:43:36 +01:00
Matthias Mailänder
3489794713 replace PlayMusicOnMapLoad trait with Lua Media.PlayMusic method 2015-01-25 14:43:36 +01:00
Matthias Mailänder
554f3ae8de Merge pull request #7375 from abcdefg30/fixsurvival02
Fix a crash in survival02
2015-01-25 14:34:51 +01:00
abcdefg30
a5b0ea73b0 Fix ts prerequisistes 2015-01-25 14:31:48 +01:00
Christopher Grant
66c33452e8 Added a levelup command 2015-01-24 14:56:33 -05:00
Matthias Mailänder
26202520a1 add the GDI Upgrade Center and Ion Cannon 2015-01-24 17:35:53 +01:00
Matthias Mailänder
d7c9a6cbc8 add the Nod Missile Silo and Cluster Missile 2015-01-24 17:35:52 +01:00
Matthias Mailänder
fc16990c05 unhardcode and self-document 2015-01-24 17:35:21 +01:00
Matthias Mailänder
aba9ffe93e remove unused sequence 2015-01-24 17:35:21 +01:00
Oliver Brakmann
98fd875a43 Merge pull request #7372 from ScottNZ/countries
Add more fake buildings
2015-01-24 12:30:48 +01:00
ScottNZ
7d8a6186e2 No access to Allied construction yards in allies 03, so remove unneeded fake definitions 2015-01-24 13:03:06 +13:00
ScottNZ
8e1661c297 Remove high tech fake structure access from a few missions 2015-01-24 13:02:35 +13:00
Oliver Brakmann
2f588968b0 Switch wiki deployment to the openra user with ssh auth 2015-01-23 22:36:10 +01:00
Oliver Brakmann
f360161922 Merge pull request #7227 from sinaptik/bleed
add scroll buttons that appear in the production palette when icons exceed available space
2015-01-23 19:46:30 +01:00
abcdefg30
b309983fd4 Fix a crash in survival02 2015-01-23 15:18:20 +01:00
ScottNZ
3c4e149f80 Rebalance fake structure costs: %10 of the original 2015-01-23 23:45:00 +13:00
ScottNZ
1986b31bcb Add fake atek (atef), mslo (mslf) and pdox (pdof) structures to ra.
Thanks to MicroBit for the icons.
2015-01-23 23:44:59 +13:00
ScottNZ
806d9ad4ad Move fake structures to fakes.yaml 2015-01-23 23:44:59 +13:00
sinaptik
b6b2b1a942 Add scroll buttons that appear in the production palette when icons exceed available space #7227
scroll up and down buttons: add disabled status, make dynamic, make smaller

Rename MaxIconRows to MaxIconRowOffset for clarity

Clean up scrolling logic, reset row position when switching tab
2015-01-23 18:40:11 +13:00
Oliver Brakmann
b97ccc3465 Merge pull request #7201 from reaperrr/yaml-reorg-cnc
Split TD weapons.yaml into multiple categorised yamls
2015-01-22 22:31:27 +01:00
Oliver Brakmann
2c71e954bf Merge pull request #7170 from penev92/bleed_enemySightedNotification
Implement "Enemy unit sighted" notification
2015-01-22 21:58:58 +01:00
Oliver Brakmann
ee3b4e6652 Merge pull request #7364 from RoosterDragon/yaml-redo
Reassert some changes lost in rebasing in MiniYaml.cs.
2015-01-21 20:14:32 +01:00
Oliver Brakmann
e875240ca3 Merge pull request #7367 from abcdefg30/fixmgg
Fix the prerequisites of mobile gap generator
2015-01-21 20:05:44 +01:00
abcdefg30
d73e739e5b Make mgg buildable by france only 2015-01-21 16:15:51 +01:00
reaperrr
309d64f2a3 Split cnc weapons.yaml into multiple rough categories 2015-01-20 23:23:50 +01:00
RoosterDragon
c39ff6894c Reassert some changes lost in rebasing in MiniYaml.cs. 2015-01-20 20:52:02 +00:00
Oliver Brakmann
7267a3afdb Merge pull request #6984 from DeadlySurprise/yamlFix
Fixed yaml bug with leading spaces
2015-01-20 21:42:22 +01:00
Paul Chote
99e2700ba7 Merge pull request #7356 from abcdefg30/limitcheat
Ignore buildlimits with AllTech cheat
2015-01-20 11:46:27 +13:00
RoosterDragon
c313c52e96 Avoid a globally shared SheetBuilder in SpriteFont.
A globally shared sheet builder leaks memory and resources between mod switches. Instead, we create and inject the sheet builder during mod startup to ensure we still share the builder across all fonts, but can reclaim it when the mod is unloaded.
2015-01-19 21:04:17 +00:00
Matthias Mailänder
398af8e513 Merge pull request #7357 from pchote/yay-outdated-distros
Fix compilation on mono 2.10.
2015-01-18 22:12:11 +01:00
Paul Chote
fb17fe79e2 Merge pull request #7351 from Mailaender/appveyor-push-artifact
Added appveyor PushArtifact to fix deployment
2015-01-19 09:51:13 +13:00
Paul Chote
4a73c88a85 Fix compilation on mono 2.10. 2015-01-19 08:56:18 +13:00
abcdefg30
2fd1576d15 Ignore buildlimits with AllTech cheat 2015-01-18 20:36:26 +01:00
Oliver Brakmann
98325ea32e Merge pull request #7329 from abcdefg30/improvemtm
Polished monster-tank-madness
2015-01-18 16:51:50 +01:00
reaperrr
ea1b45551c Merge pull request #7354 from penev92/bleed_moveFiles
Move parachutes and crates to Mods.Common
2015-01-18 16:28:27 +01:00
penev92
52cc69fd1f Move Crate, CrateSpawner and all CrateActions to Mods.Common 2015-01-18 16:40:55 +02:00
penev92
f1a0f6e2a5 Move Parachute, Parachutable and ParaDrop to Mods.Common 2015-01-18 16:15:14 +02:00
Matthias Mailänder
411446f9bd package the XML files 2015-01-18 13:17:11 +01:00
Matthias Mailänder
1b5928879c save replays in a less generic file extension 2015-01-18 13:17:11 +01:00
Matthias Mailänder
417b499472 register Linux MIME type to directly load replays 2015-01-18 13:17:10 +01:00
Matthias Mailänder
37c9caabd8 this has already been resolved in #7121 and #7187 2015-01-18 13:17:10 +01:00
Matthias Mailänder
44f1c52e44 Merge pull request #7204 from Mailaender/ts-harvest-overlay
Added the Tiberian Sun harvest animation
2015-01-18 12:58:46 +01:00
Matthias Mailänder
22df04a51b push the artifact rename the setup.exe 2015-01-18 10:54:35 +01:00
Matthias Mailänder
17277a318d Merge pull request #7345 from Mailaender/appveyor-nsis
Moved Windows setup deployment to AppVeyor
2015-01-18 09:50:32 +01:00
Matthias Mailänder
6a25bc90d8 Merge pull request #7346 from Mailaender/windows-dependencies
Added all native Windows dependencies to the fetch script
2015-01-18 09:46:26 +01:00
Matthias Mailänder
8e4674520e create a thirdparty/windows directory if it does not exit 2015-01-18 08:33:59 +01:00
Matthias Mailänder
601022f582 deploy Windows setup exe via AppVeyor only 2015-01-18 08:01:33 +01:00
Matthias Mailänder
b25184adca fetch Zlib from nuget 2015-01-18 07:35:54 +01:00
Matthias Mailänder
9cae84d29d fetch Lua 5.1 from nuget.org 2015-01-18 07:35:41 +01:00
Matthias Mailänder
23380c6df6 don't fetch native Windows binaries on Unix 2015-01-18 07:35:40 +01:00
Guido L.
8d6722be2d Do not try to pass "null" sprites 2015-01-18 03:41:10 +01:00
abcdefg30
7fe64b14a4 Polished monster-tank-madness 2015-01-17 23:56:31 +01:00
reaperrr
55b858051d Merge pull request #7347 from Mailaender/ingame-menu-csproj
Fixed the IDE build again
2015-01-17 18:52:05 +01:00
Matthias Mailänder
d6d75e244b bring back IngameMenuLogic 2015-01-17 18:30:47 +01:00
Oliver Brakmann
c2dac459bb Merge pull request #7334 from RoosterDragon/less-alloc
Cache or inline some delegates to avoid allocations.
2015-01-17 16:04:36 +01:00
Oliver Brakmann
c7b2bce18b Merge pull request #7307 from Mailaender/common-networking-ui
Moved connection UI to OpenRA.Mods.Common
2015-01-17 15:51:43 +01:00
Matthias Mailänder
5aeb6eda06 move connection UI to commons 2015-01-17 15:17:54 +01:00
Matthias Mailänder
94a3fc0186 Merge pull request #7336 from obrakmann/d2k-no-healing-barracks
Remove healing ability from d2k barracks
2015-01-17 15:13:50 +01:00
Matthias Mailänder
94678e37e8 Merge pull request #7296 from MustaphaTR/d2k-starport-tank
D2K - Fix Starport unit prerequisites.
2015-01-17 15:09:37 +01:00
Matthias Mailänder
c1c1960b44 Merge pull request #7337 from reaperrr/common29
Moved Lint, UtilityCommands and Scripting properties to Mods.Common
2015-01-17 14:53:48 +01:00
penev92
a4a8a793df Add EnemyWatcher trait to D2k and AnnounceOnSeen to D2k units and sandworms; remove sandworm announcement on worm spawn 2015-01-17 14:41:23 +02:00
penev92
e2832bb3d7 Implement EnemyWatcher and AnnounceOnSeen traits 2015-01-17 14:41:22 +02:00
Oliver Brakmann
878de65268 Merge pull request #7343 from Mailaender/travis-nsis-common
Fixed Travis deployment by adding NSIS stubs and plugins
2015-01-17 12:01:17 +01:00
Matthias Mailänder
2920b1bb02 fix Error: opening stub "/usr/share/nsis/Stubs/zlib" 2015-01-17 11:56:13 +01:00
Matthias Mailänder
87d14bc001 Merge pull request #7341 from obrakmann/fix_travis_build
Fix travis build not exiting in the top-level directory
2015-01-17 11:46:22 +01:00
Matthias Mailänder
e694692b97 add the Tiberian Sun harvest animation 2015-01-17 11:36:41 +01:00
Oliver Brakmann
e70a028328 Fix travis build not exiting in the top-level directory 2015-01-17 11:36:03 +01:00
Matthias Mailänder
4edb937401 Merge pull request #7339 from obrakmann/fix7303_wrong_ip_in_lobby_client_tooltip
Fixes #7303
2015-01-17 10:57:51 +01:00
Matthias Mailänder
65973f4af5 Merge pull request #7335 from ScottNZ/countries
Combine PDOX and PDOX.Germany
2015-01-17 09:35:27 +01:00
Matthias Mailänder
25185f6661 Merge pull request #7333 from obrakmann/fix-d2k-tile
Fix wrong template definition in the d2k tileset
2015-01-17 08:07:07 +01:00
Oliver Brakmann
2267530865 Fix showing wrong IP for server admins in the lobby client tooltips
The external IP will now only be resolved for the local client.
2015-01-16 20:18:40 +01:00
Oliver Brakmann
e58d4ae87e Merge pull request #7257 from Mailaender/d2k-guarding-voice
Added the Dune 2000 Guarding voice
2015-01-15 23:26:57 +01:00
reaperrr
52dd8c922f Moves Lint checks to Mods.Common 2015-01-15 23:15:51 +01:00
reaperrr
e82b2ce8dd Moves BaseAttackNotifier to Mods.Common 2015-01-15 22:59:43 +01:00
reaperrr
6f0ae30a7e Moves nearly all ScriptingProperties to Mods.Common 2015-01-15 22:56:35 +01:00
reaperrr
f3d364877a Moves the last 3 UtilityCommands and some prerequisite references to Mods.Common 2015-01-15 22:39:41 +01:00
ScottNZ
0e1bc262b1 Combine PDOX and PDOX.Germany to respect BuildLimit: 1 (Fixes #7330) 2015-01-16 09:33:55 +13:00
Oliver Brakmann
c092c0231f Merge pull request #7316 from reaperrr/move-stuff28
Moved Upgrades, SupportPowers and some misc features to Mods.Common
2015-01-15 20:57:40 +01:00
Oliver Brakmann
8575fdab68 Merge pull request #7298 from abcdefg30/repairnotifications
Add repairing and unit repaired sounds to ra service depo
2015-01-15 20:31:15 +01:00
abcdefg30
15c07d94ac Add repairing and unit repaired sounds to fix 2015-01-15 20:16:24 +01:00
Oliver Brakmann
13d819f0ac Remove healing ability from d2k barracks 2015-01-15 20:14:42 +01:00
reaperrr
e8fbfc366a Moves some misc traits/activities to Mods.Common, moves some RA traits into the Traits folder 2015-01-15 13:18:12 +01:00
reaperrr
be9d37f30e Moves SupportPowers and related Widgets to Mods.Common 2015-01-15 13:18:11 +01:00
reaperrr
f897a9ff01 Moves Upgrades and Invulnerable trait to Mods.Common 2015-01-15 00:07:27 +01:00
RoosterDragon
930d9cbea3 Cache or inline some delegates to avoid repeated allocations. 2015-01-14 22:57:41 +00:00
Oliver Brakmann
e4ce46514c Merge pull request #7278 from penev92/bleed_sandworm
Enhance Sandworm behaviour
2015-01-14 20:40:24 +01:00
penev92
e6f1c6b460 Enhance sandworm targeting logic by having actors produce noise 2015-01-14 21:26:55 +02:00
penev92
e42cf58cb1 Add IgnoresVisibility field to AttackBase 2015-01-14 21:26:54 +02:00
penev92
ea9ebaa08d Add IgnoresCloak trait 2015-01-14 21:26:53 +02:00
Oliver Brakmann
240e71684d Fix wrong template definition in the d2k tileset 2015-01-14 19:30:59 +01:00
Oliver Brakmann
0831b105cb Merge pull request #7164 from abcdefg30/survival02
Ported survival02 to lua
2015-01-13 20:16:00 +01:00
abcdefg30
363a6c6161 Add tooltips to cycl, barb and wood 2015-01-13 18:50:50 +01:00
abcdefg30
9dd85125d8 Ported Survival02 to lua 2015-01-13 17:48:12 +01:00
abcdefg30
a4f051ad6b Added a lua function for paratroopers 2015-01-13 17:48:11 +01:00
abcdefg30
660f43cc66 Added a lua function for airstrikes 2015-01-13 17:45:54 +01:00
Paul Chote
3ea70e891d Merge pull request #7291 from RoosterDragon/dynamic-palette-sizing
Implement dynamic hardware palette sizing.
2015-01-13 17:41:15 +13:00
Paul Chote
bdca98d4d6 Merge pull request #7311 from Mailaender/travis-docker
Switched to the new the Docker-based Travis CI infrastructure
2015-01-13 17:29:05 +13:00
Matthias Mailänder
a7220498b0 Merge pull request #7321 from abcdefg30/fixsoviet01
Polished soviet-01
2015-01-12 22:11:33 +01:00
Matthias Mailänder
cab7a34813 Merge pull request #7261 from abcdefg30/yaml-cleanup
map.yaml cleanup
2015-01-12 22:05:32 +01:00
Oliver Brakmann
75a9848468 Merge pull request #7276 from penev92/bleed_fixAttack
Minor targeting cleanup
2015-01-12 18:48:18 +01:00
Taryn Hill
20c0063656 Merge pull request #7323 from abcdefg30/devpower
Fix power decreasing while the dev hack is enabled.
2015-01-12 10:02:59 -07:00
abcdefg30
b7d8b2c6b3 Don't remove power while the dev hack is enabled 2015-01-11 21:37:32 +01:00
abcdefg30
dbde7e7a27 Polished soviet-01
- Made buildings unsellable
- Let the mission fail, if all airfields are destroyed
- Removed NPC fake objective
2015-01-11 21:15:02 +01:00
abcdefg30
80195d3fd0 Removed unused actors and reordered the rest 2015-01-11 16:36:49 +01:00
Oliver Brakmann
25abdfbcd6 Merge pull request #7319 from abcdefg30/remvalues
Removed Facing: 0 and Health: 1
2015-01-11 16:22:04 +01:00
abcdefg30
4be5c03385 Removed Facing: 0 and Health: 1 2015-01-11 16:04:41 +01:00
Oliver Brakmann
56446f5335 Merge pull request #7313 from Unit158/DropProductFix
Fixed airdrop production crash
2015-01-11 11:58:20 +01:00
Matthias Mailänder
3f85e1dd43 Merge pull request #7295 from reaperrr/move-prodrep
Move some more traits to Mods.Common
2015-01-11 08:26:03 +01:00
Matthias Mailänder
5c1b828be8 Merge pull request #7302 from pchote/makefile-deps
Move the mod dependencies to the test/check rules.
2015-01-11 08:21:46 +01:00
reaperrr
c431545a44 Wrap up Render traits move 2015-01-11 03:04:42 +01:00
reaperrr
5b8c97ae37 Move OrderGenerators to Mods.Common 2015-01-11 03:04:40 +01:00
reaperrr
0e1773ac5d Move Production to Mods.Common 2015-01-11 03:04:39 +01:00
Chicken man
279b7b0279 Fixed airdrop production crash 2015-01-10 20:40:39 -05:00
Taryn Hill
0dc65e5cf3 Merge pull request #7301 from abcdefg30/yearnumbers
Updated year numbers in all files.
2015-01-10 17:57:42 -07:00
Paul Chote
e0e0fea152 Move the mod dependencies to the test/check rules.
The utility does not require these at compile time, but the check and test commands are located inside the RA mod, which references all of the mod dlls at run time.
2015-01-11 11:21:26 +13:00
Matthias Mailänder
a95abd7b38 setup the Guarding voice 2015-01-10 22:34:57 +01:00
Matthias Mailänder
50b9054679 Merge pull request #7287 from abcdefg30/all-notifications
Added all ra notifications to notifications.yaml
2015-01-10 22:22:59 +01:00
Matthias Mailänder
2d3634e23a try to cache the Ubuntu package installation 2015-01-10 21:24:56 +01:00
Matthias Mailänder
edbab6976c switch to the new the Docker-based infrastructure 2015-01-10 21:24:54 +01:00
Matthias Mailänder
08411dbd73 Merge pull request #7308 from Mailaender/d2k-shellmap-harv-polish
Polished the Dune 2000 shellmap harvester delivery
2015-01-10 15:20:28 +01:00
Matthias Mailänder
3ef57d0180 Merge pull request #7273 from Mailaender/with-cargo-fix
Fixed WithCargo
2015-01-10 14:32:47 +01:00
Matthias Mailänder
e6ea359472 tweak the offset 2015-01-10 13:30:38 +01:00
Matthias Mailänder
be982bb42e Merge pull request #7250 from atimoschenkow/redundancy-fix
Refactored NotifyBlocker() (and several overloads) into ActorExts
2015-01-10 12:18:05 +01:00
atimoschenkow
cefd554a5e NotifyBlocker extension method for Actor 2015-01-10 12:02:59 +01:00
Oliver Brakmann
ae03fa9af5 Merge pull request #7306 from Mailaender/ra-missing-desert-palette
Removed glitchy decorations from DESERT tileset
2015-01-10 11:26:57 +01:00
Scott
77a4e467f8 Fix a small typo in survival01 (missing colon) 2015-01-10 12:12:59 +13:00
Matthias Mailänder
9ebf0ec85e exclude decorations without desert palette equivalents 2015-01-09 22:54:26 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Matthias Mailänder
5840e91908 Merge pull request #7299 from penev92/bleed_reorderMakefile
Reorder Travis build command orders
2015-01-09 20:57:20 +01:00
penev92
5d6f23af31 Add command dependencies 2015-01-09 18:48:37 +02:00
penev92
a8a726f56b Reorder Travis command order, add new lines to Makefile output for better readability 2015-01-09 17:49:34 +02:00
Oliver Brakmann
d9932549f2 Merge pull request #7297 from abcdefg30/fixutility
Fix a stupid mistake in utility.cmd (td vs cnc)
2015-01-09 15:38:30 +01:00
abcdefg30
d9572d4ca4 Rename Win -> MissionAccomplished and Lose -> MissionFailed
But keep them in notifications.yaml for backwards compatibility.
2015-01-09 14:14:03 +01:00
abcdefg30
ad1f9e56b6 Fix a stupid mistake in utility.cmd (td vs cnc) 2015-01-09 14:10:44 +01:00
abcdefg30
4a1e0a44d5 Added all speech notifications to notifications.yaml 2015-01-09 14:09:54 +01:00
Mustafa Alperen Seki
a7017d6d71 Fix Starport unit prerequisites. 2015-01-09 10:34:49 +02:00
Mustafa Alperen Seki
52a08e24af Fix Starport unit prerequisites. 2015-01-09 10:32:08 +02:00
Mustafa Alperen Seki
c2f9169d54 Fix Starport unit prerequisites. 2015-01-09 10:29:02 +02:00
Oliver Brakmann
4ec3a9e9fe Merge pull request #7294 from penev92/bleed_reorderMakefile
Reorder the Makefile
2015-01-08 17:42:21 +01:00
Oliver Brakmann
c779259462 Merge pull request #7282 from penev92/bleed_moveFiles
Move more traits to Mods.Common
2015-01-08 17:29:19 +01:00
penev92
cada348262 Reorder the "test" and "check" sections of the Makefile in order to run the faster/more dangerous things first 2015-01-08 18:02:13 +02:00
Oliver Brakmann
248afc0fee Merge pull request #7284 from pchote/fire-offset
Improve the fire animation position on D2K husks.
2015-01-08 16:59:40 +01:00
reaperrr
c619c06999 Merge pull request #7292 from RoosterDragon/upgradeoverlay-modifyrender
Adjust UpgradeOverlay.ModifyRender to be more efficient.
2015-01-08 08:48:55 +01:00
Matthias Mailänder
89b2f4d5d3 Merge pull request #7217 from Mailaender/chrome-init-cleanup
Cleaned up the ingame widget initialization
2015-01-08 07:40:36 +01:00
Matthias Mailänder
88922b056e Merge pull request #7229 from RoosterDragon/map-coords
Introduce a new type for representing map coordinates.
2015-01-08 07:39:23 +01:00
Chris Forbes
507fe66f78 Merge pull request #7288 from RoosterDragon/faster-depth-sorting
Speed up depth sorting of renderables.
2015-01-08 14:22:20 +13:00
Chris Forbes
0a493df4c1 Merge pull request #7281 from RoosterDragon/cache-render-traits
Cache render related TraitsImplementing calls in Actor.
2015-01-08 14:13:11 +13:00
RoosterDragon
df6956867a Adjust UpgradeOverlay.ModifyRender to be more efficient.
When IsTraitDisabled is set, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is unset, then the modifying enumerable has one less condition to check inside the loop.
2015-01-08 00:52:03 +00:00
penev92
37cdcaf354 Move everything Capture-related + Transform activity to Mods.Common 2015-01-08 01:49:15 +02:00
penev92
18ac3953cc Move everything ExternalCapture-related to Mods.Common 2015-01-08 01:49:14 +02:00
penev92
8504c233d9 Move everything Repair-related to Mods.Common 2015-01-08 01:49:14 +02:00
penev92
bcd5160604 Move everything Bridge-related to Mods.Common 2015-01-08 01:47:20 +02:00
RoosterDragon
53f06ba093 Implement dynamic hardware palette sizing.
The HardwarePalette will now grow its palette buffer and texture in power-of-2 increments. This avoids it having to allocate memory for a full 256x256 texture up front. In practice the default mods use 22 or 23 palettes so a 32x256 texture is used. This means both the buffer and texture save neatly on memory. Additionally, HardwarePalette.ApplyModifiers sees a nice speedup as it has to transfer a much smaller amount of memory from the buffer to the texture.

To facilitate this change, the MaxPalettes constant is no more. Instead the PaletteReference deals with the calculation of the index and this is passed into the appropriate methods.
2015-01-07 22:41:51 +00:00
DeadlySurprise
fbe6ab7f4e Fixed yaml bug with leading spaces 2015-01-07 22:16:15 +01:00
RoosterDragon
69c409c20d Speed up depth sorting of renderables.
The OrderBy overload that takes an int generating key selector is faster than the one that requires a custom comparer. We extract a function from the ScreenZPosition function that determines the Z position of a WPos with an offset, but does not account for the tileset height. For the ordering function this is fine as only the relative magnitude of the comparison keys matter, so we don't need to spend time adjusting for the tileset height, as that won't affect the sort.
2015-01-07 18:22:38 +00:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
Igor Popov
40c9d0a47d Merge pull request #7275 from RoosterDragon/formatting
Formatted all files.
2015-01-07 13:56:04 +03:00
Paul Chote
3667ebb7ca Merge pull request #7203 from RoosterDragon/reduce-server-footprint
Avoid initialization of graphical elements for a server.
2015-01-07 10:34:59 +13:00
RoosterDragon
a6cda967c2 Formatted all files.
Automatically formatted all files via VS. This generally corrects indentation, removes trailing whitespace and corrects misplaced tabs or spaces. Manually tweaked a few files where required.
2015-01-06 21:28:50 +00:00
Matthias Mailänder
282f76c1c1 Merge pull request #7256 from obrakmann/td-lobby-headers
Fix incorrect name for lobby headers container in TD
2015-01-06 22:08:16 +01:00
penev92
1c3dc388ea Remove redundant (and possibly risky) AttackFollow.CanAttack() 2015-01-06 22:07:41 +02:00
penev92
17dfda4c9d Some fixes to Cloak.IsVisible() 2015-01-06 22:07:33 +02:00
Oliver Brakmann
6468c0b6e6 Merge pull request #7266 from reaperrr/stylecop-make
Add StyleCop checks for Game, Editor and Mod dlls to make.ps1
2015-01-06 21:05:36 +01:00
Matthias Mailänder
eef3c548b8 Merge pull request #7286 from abcdefg30/d2kfix
Closes #7283
Closes #7285
2015-01-06 20:44:41 +01:00
Matthias Mailänder
c250457a34 make this fool proof by choosing a sane default 2015-01-06 20:04:45 +01:00
abcdefg30
84c2fdf9a9 Remove Buildable: from corrino buildings 2015-01-06 11:53:35 +01:00
abcdefg30
72a8951738 Fix sardaukars targeting air units 2015-01-06 11:43:11 +01:00
Paul Chote
55e5dd93eb Improve the fire animation position on D2K husks. 2015-01-06 23:36:43 +13:00
RoosterDragon
dc4d522967 Cache render related TraitsImplementing calls in Actor.
The TraitsImplementing<T> performs a dictionary lookup to match up its generic type parameter with the right trait collection. Since actors are rendered so much, it is useful to cache this result to avoid looking it up repeatedly.
2015-01-05 21:05:19 +00:00
reaperrr
dd90409b3d Document make check in Makefile 2015-01-05 20:49:20 +01:00
reaperrr
192ae175a6 Add StyleCop checks for mod dlls to make.ps1 2015-01-05 20:49:19 +01:00
Matthias Mailänder
e353fe5263 Merge pull request #7271 from reaperrr/ra-common27
Moved more traits & activities to Mods.Common
2015-01-05 20:35:21 +01:00
Oliver Brakmann
6a0363d482 Merge pull request #7265 from pchote/fix-lag-crash
Fix a race condition in the map download code.
2015-01-05 18:44:13 +01:00
Oliver Brakmann
ee50aec55a Fix incorrect name for lobby headers container in TD
...which caused the headers to still be visible when the options bin was open.

Also moves the "Map Options" title to the same place the headers occupy,
to above the options bin.
2015-01-05 18:40:46 +01:00
RoosterDragon
2c34358372 Avoid initialization of graphical elements for a server.
Avoid allocating memory and resources for graphical elements that will never be drawn when starting a dedicated server. This reduces the server memory footprint by approx 17 MiB.
2015-01-04 19:22:41 +00:00
Matthias Mailänder
4770876fff these only store value set in the constructor 2015-01-04 20:19:22 +01:00
Oliver Brakmann
58dc61e6ed Merge pull request #7262 from RoosterDragon/actormap-partitioning
Fix ActorMap spatial partitioning to actually work.
2015-01-04 18:48:01 +01:00
reaperrr
573c26145e Move Render*Circle, ThrowsParticle and ParatroopersPower to appropriate locations 2015-01-04 18:12:11 +01:00
reaperrr
7a8826f5e0 Move Targetable*, Seeds/StoresResource(s) and two RenderBuilding traits to Mods.Common 2015-01-04 18:12:10 +01:00
reaperrr
b7a3b9fdbf Move ScaredyCat, TakeCover, RenderInfantry, WithBuildingExplosion and SpawnMPUnits as well as Hunt activity to Mods.Common. 2015-01-04 18:12:09 +01:00
reaperrr
d07db9c6a9 Move Guard, CashTrickler, Explodes, SelfHealing, Sellable and Crushable to Mods.Common.
Extract Guardable trait from Guard into own file.
2015-01-04 18:12:08 +01:00
Matthias Mailänder
d4d55bb6dc modularize the remaining legacy ingame interface widgets
and consolidate chrome root initialization
2015-01-04 17:57:38 +01:00
Matthias Mailänder
9d2f33d42c add a World type 2015-01-04 17:57:38 +01:00
Oliver Brakmann
dbbc790dab Merge pull request #7270 from Mailaender/mods-ra-stylecop
StyleCop clean OpenRA.Mods.RA and enforce rules with Makefile
2015-01-04 17:45:20 +01:00
Oliver Brakmann
302cf44f5a Merge pull request #7267 from atimoschenkow/fix-selection-after-radar
Selection rectangle is drawn after exiting radar widget while dragging the viewport
2015-01-04 17:23:08 +01:00
atimoschenkow
831f19e993 A selection box is drawn if the mouse exits the radar widget while dragging the viewport.
These changes prevent this side effect.
2015-01-04 17:06:50 +01:00
Matthias Mailänder
1b0e3a7a7f StyleCop clean OpenRA.Mods.RA 2015-01-04 17:02:46 +01:00
Oliver Brakmann
75808c365a Merge pull request #7269 from abcdefg30/general-polish
Some general polish
2015-01-04 16:54:37 +01:00
reaperrr
2691f16a81 Merge pull request #7268 from Mailaender/stylecop-game-final
StyleCop clean OpenRA.Game Part 2 and enforce rules with Makefile
2015-01-04 15:47:54 +01:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Matthias Mailänder
d2d715765c Merge pull request #7263 from reaperrr/ra-common26
Moved Armament, Attack, Move, Air features and dependencies to Mods.Common
2015-01-04 15:33:16 +01:00
reaperrr
cb3ba37462 StyleCop fixes 2015-01-04 15:02:19 +01:00
Matthias Mailänder
0046dab1fd avoid legacy boolean values 2015-01-04 14:29:40 +01:00
Matthias Mailänder
18663323aa add the gem mine by @MicroJOo 2015-01-04 14:26:05 +01:00
Oliver Brakmann
580e0fc0df Merge pull request #7147 from penev92/bleed_enrichDune2kResources
Add more resources to the D2k mod
2015-01-04 14:18:38 +01:00
Oliver Brakmann
4cdf1b73c4 Merge pull request #7167 from MatthijsBenschop/d2k-carryall-extras
Some carryall fixes
2015-01-04 14:11:13 +01:00
abcdefg30
4fed02cd74 Make health bars 2 pixels shorter 2015-01-04 13:07:55 +01:00
abcdefg30
be5fc0bc27 Return from skirmish lobby to singleplayer menu instead of main menu 2015-01-04 13:06:06 +01:00
abcdefg30
f2e224dd72 Fix a crash in RemoveProximityTrigger 2015-01-04 13:06:06 +01:00
abcdefg30
98aed777d0 Improved legacy map import
Health: 1 and Facing: 0 will be omitted.
2015-01-04 13:06:05 +01:00
abcdefg30
e4c562ca53 Oppress undesired messages about difficulty changes 2015-01-04 13:06:04 +01:00
Paul Chote
a7ae72a7bb Fix a race condition in the map download code.
Fixes #7264.
2015-01-04 19:25:43 +13:00
reaperrr
654f56c5d5 Moves Attack, Armament, Move, Air traits and activities as well as anything required by them to Mods.Common.
Extracts Exit from Production into its own trait.
2015-01-04 05:24:28 +01:00
RoosterDragon
a0737ccbf3 Fix ActorMap spatial partitioning to actually work.
The bin partitioning in ActorMap worked by dividing the map up into a few chunks of cells, each of which would contain some actors. Unfortunately, the bins were accessed directly in world coordinates which are on a scale 1024x greater than cell coordinates. This lead to all actors being placed into the bottom right bin. When checking for actors in a box, only this bottom right bin would be iterated for actors. Thanks to the fact this bin indeed contained all the actors, some clamps on the input ranges and filtering required per bin anyway, this actually returned correct results. Effectively, it was as if there was no spatial partitioning at all.

Not surprisingly however, this is fairly inefficient. By correcting the spatial partitioning to actually partition we see a 7x speedup in ActorsInBox on the RA shellmap.
2015-01-04 02:35:16 +00:00
Oliver Brakmann
9e0bd02e39 Merge pull request #7253 from Mailaender/utility-check-verbosity
Tweaked the StyleCop utility output
2015-01-04 01:06:43 +01:00
Oliver Brakmann
158517c09f Merge pull request #7251 from Mailaender/stylecop-clean-game
StyleCop cleaned OpenRA.Game Part 1
2015-01-04 01:00:56 +01:00
reaperrr
eb33d72a70 Merge pull request #7254 from penev92/bleed_moveFiles
Moving more files to Common
2015-01-04 00:46:11 +01:00
Matthias Mailänder
f02e30a797 Merge pull request #7260 from RoosterDragon/fix-pathsearch-cache
Fix broken pathing
2015-01-03 23:52:05 +01:00
Matthijs Benschop
3c49364b57 Fix harvesters doing nothing after being dropped of by a carryall 2015-01-03 22:44:41 +01:00
Matthijs Benschop
740595064a The carryable should not unreserve itself 2015-01-03 22:44:41 +01:00
Matthijs Benschop
0868558e94 Allow a carryable to change his destination after being reserved 2015-01-03 22:44:41 +01:00
RoosterDragon
c7b4eff89a Ensure the whole path search cache is initialized.
The region covered by map.Cells may not cover the whole map size, but we need the whole cache initialized so it can be used correctly when a different map is used, because that map may have the same size but a different offset which means a different region is covered.
2015-01-03 20:07:04 +00:00
Matthias Mailänder
44cd174a8d StyleCop clean OpenRA.Game 2015-01-03 19:00:48 +01:00
Matthias Mailänder
30a5df46af Merge pull request #7222 from penev92/bleed_wander
Add Wanders trait and make AttackWander inherit that
2015-01-03 15:19:18 +01:00
penev92
62601491ad Move Enter and Repair Building activities, EngineerRepair trait and ActorExts to Mods.Common and extract IgnoresDisguise trait to its own file 2015-01-03 07:03:41 +02:00
penev92
b1e2e5bea6 Move PlayerStatistics to Mods.Common 2015-01-03 07:03:40 +02:00
penev92
0e71580af6 Move DetectCloaked to Mods.Common 2015-01-03 07:03:40 +02:00
penev92
5e1af58bbe Move Gives/Gains Experience and Bounty to Mods.Common 2015-01-03 07:03:28 +02:00
penev92
04c09dda31 Add a delay before wandering, use it on viceroids
Add a Min and Max delay and make it random
2015-01-03 06:56:20 +02:00
penev92
ded8ae9345 Add Wanders trait and make AttackWander inherit that 2015-01-03 06:52:49 +02:00
Matthias Mailänder
0f733d6b0d absolute path is not of relevance and only junking up the logs 2015-01-02 18:41:11 +01:00
Matthias Mailänder
1c90199fb0 one everything is fine per project is enough 2015-01-02 18:41:11 +01:00
Matthias Mailänder
7b5b14e0cf remove the spammy exit 0 output 2015-01-02 18:41:11 +01:00
Matthias Mailänder
9dd607c846 Merge pull request #7230 from RoosterDragon/occupied-cells-arrays
Make OccupiedCells implementations return arrays.
2015-01-02 17:38:56 +01:00
Matthias Mailänder
cddb956fee Merge pull request #7245 from Hellhake/stylecop-rest
Fix StyleCop warnings in Editor, Renderer.Sdl2, Utility, Test
2015-01-02 16:53:22 +01:00
Hellhake
7f06c4123a Enable stylecop clean projects for make check 2015-01-02 16:40:55 +01:00
Matthias Mailänder
167ba72119 Merge pull request #7246 from Hellhake/stylecop-ra
Fix StyleCop warnings in OpenRA.Mods.RA
2015-01-02 16:38:22 +01:00
penev92
6dabec6124 Add more tileset templates and voice notifications
Add House Corrino

Add Corrino-specific structures

Remove "new" tileset entries and speech notifications for now
2015-01-02 17:23:23 +02:00
Hellhake
311d154bd6 Fix StyleCop warnings in OpenRA.Test 2015-01-02 16:08:07 +01:00
Hellhake
90c948ebc3 Fix StyleCop warnings in OpenRA.Utility 2015-01-02 16:08:07 +01:00
Hellhake
bce017494d Fix StyleCop warnings in OpenRA.Renderer.Sdl2 2015-01-02 16:07:58 +01:00
Hellhake
beefe18ca5 Fix StyleCop warnings in OpenRA.Editor 2015-01-02 16:07:52 +01:00
Hellhake
b6410bc1e0 Fix StyleCop warnings in OpenRA.Mods.RA 2015-01-02 14:39:49 +01:00
Oliver Brakmann
30e42cdc62 Merge pull request #7247 from Hellhake/stylecop-game
Fix StyleCop warnings in OpenRA.Game
2015-01-02 12:58:04 +01:00
Oliver Brakmann
7fa0a9722a Merge pull request #7242 from LipkeGu/ignore_nuget
Add nuget(.exe) binary to .gitignore
2015-01-02 12:22:57 +01:00
Oliver Brakmann
ce41c60a40 Merge pull request #7244 from Hellhake/bom
Remove BOM
2015-01-02 12:11:27 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Guido L.
7b25984561 Add nuget(.exe) binary to .gitignore 2015-01-02 11:52:29 +01:00
Matthias Mailänder
4c8f05e8aa Merge pull request #7178 from Mailaender/d2k-carryall-delivery
Polished the Dune 2000 shellmap to highlight both Carryalls and Sandworms
2015-01-02 11:29:15 +01:00
Paul Chote
151c263957 Merge pull request #7243 from Mailaender/travis-security
Replaced GitHub access token
2015-01-02 17:57:13 +13:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
Matthias Mailänder
1b3654a7f9 replace GitHub access token 2015-01-01 20:31:04 +01:00
Matthias Mailänder
53f2bcd638 Merge pull request #6946 from LipkeGu/ServerCrash
Fix bad behavor while pinging Clients
2015-01-01 15:38:42 +01:00
Oliver Brakmann
1d58a896bd Merge pull request #7177 from Mailaender/attack-overlay
Added an attack overlay for the sand worm
2015-01-01 15:05:21 +01:00
Matthias Mailänder
3835aec17f add an attack overlay for the sand worm 2015-01-01 14:53:04 +01:00
Matthias Mailänder
e9989496c4 Merge pull request #7235 from Mailaender/nuget-fail
Fail the whole script when nuget fails
2015-01-01 14:13:38 +01:00
Guido L.
f03355ba90 Fix bad behavor while pinging Clients 2015-01-01 13:45:59 +01:00
Matthias Mailänder
f093de98b6 Merge pull request #7238 from Mailaender/server-cpu-fix
Fixed high CPU usage due to Socket.Select not blocking the thread properly when the game started
2015-01-01 10:53:40 +01:00
Paul Chote
df425b29b3 Merge pull request #7194 from reaperrr/move-ra-common25
More Mods.RA reorganisation, more files moved to Mods.Common
2015-01-01 16:39:26 +13:00
asl97
d2a14842d8 avoid a busy server loop with high CPU usage
fixes #7237
2014-12-31 19:46:39 +01:00
Matthias Mailänder
714233d72e Merge pull request #7220 from obrakmann/d2k-worm-option-and-maps
Add worms to d2k maps and add lobby option to disable them
2014-12-31 13:03:37 +01:00
Oliver Brakmann
16a7038d90 Merge pull request #7236 from pchote/observershroud-spam
Fix missing collection debug messages.
2014-12-31 12:14:29 +01:00
Paul Chote
e930dc2b89 Fix missing collection debug messages. Fixes #6909. 2014-12-31 23:07:25 +13:00
Matthias Mailänder
2791ac7491 fail the whole script when nuget fails 2014-12-31 11:04:24 +01:00
Paul Chote
aa325eda36 Merge pull request #7232 from RoosterDragon/yaml-parse-perf
Improve YAML parse time.
2014-12-31 09:20:48 +13:00
RoosterDragon
fdcfb30011 Improve YAML parse time.
Stream lines to avoid needing to load the whole file first, and avoid a LINQ Contains call when string.IndexOf will be much faster.
2014-12-30 18:17:32 +00:00
RoosterDragon
fe24304a21 Make OccupiedCells implementations return arrays.
Since there are only one or two items, it's cheaper to return a concrete collection and avoid the overhead of the compiler generated state machine.

This in particular speeds up Shroud.GetVisOrigins when dealing with Mobile.OccupiedCells, as the expensive CanEnterCell call is made only once rather than twice.
2014-12-30 17:25:04 +00:00
Guido L.
2c485414e2 Add Buildings and Trees to Tiberian Sun 2014-12-30 18:18:48 +01:00
Oliver Brakmann
caa38f034e Update missions with new map option 2014-12-28 19:26:40 +01:00
Oliver Brakmann
de0a62eb42 Add a lobby option to control spawning creeps (viceroids/worms)
The lobby option is only exposed in d2k currently, not in TD or TS.
2014-12-28 19:26:39 +01:00
Oliver Brakmann
06226e8958 Merge pull request #7215 from pchote/production-hotkeys
Make production type hotkeys configurable.
2014-12-28 19:02:18 +01:00
Oliver Brakmann
c1bf8b29e3 Add worm spawn points to d2k maps 2014-12-28 17:47:36 +01:00
Matthias Mailänder
1e8382b7a1 add new map Kanly
http://resource.openra.net/maps/1696
2014-12-28 17:47:36 +01:00
Matthias Mailänder
d9c7096151 add new map Eyes of The Desert
http://resource.openra.net/maps/1661
2014-12-28 17:47:36 +01:00
Matthias Mailänder
a18512cd57 Merge pull request #7212 from reaperrr/stable-sharp-dep
Revert to stable SharpFont version 2.5.0.1
2014-12-28 16:12:39 +01:00
Matthias Mailänder
68253a61d0 Merge pull request #7216 from pchote/travis-retry
Use travis_retry to reduce the nuget timeout errors.
2014-12-28 10:47:29 +01:00
Paul Chote
07ebb017b9 Use travis_retry to reduce the nuget timeout errors. 2014-12-28 18:49:08 +13:00
Paul Chote
d9752c3bdf Make production type hotkeys configurable. 2014-12-28 17:24:12 +13:00
Paul Chote
a549e1b418 Merge pull request #7205 from ScottNZ/nuget
Make fetch-thirdparty-deps.ps1 work on more Windows platforms.
2014-12-28 10:13:59 +13:00
reaperrr
d5f5aeee0f Revert to SharpFont 2.5.0.1 for Linux and OSX, too 2014-12-27 21:24:12 +01:00
reaperrr
be7830e118 Revert to stable SharpFont version 2.5.0.1 2014-12-27 21:12:20 +01:00
ScottNZ
8725ee9de3 Make fetch-thirdparty-deps.ps1 work on more Windows platforms. 2014-12-27 22:05:54 +13:00
reaperrr
311e347ad2 Style fixes 2014-12-26 22:10:52 +01:00
Matthias Mailänder
1ec3c4bc62 Update INSTALL.md
try to explain the changes from #7190 and #7197
2014-12-26 21:45:08 +01:00
reaperrr
d074fb4471 Move *ResourceWarheads to Common, move warheads to Common.Warheads namespace 2014-12-26 21:38:50 +01:00
reaperrr
9dfd369446 Move some Building traits and related elements to Mods.Common 2014-12-26 21:38:49 +01:00
reaperrr
2f67a88b93 Move Armament, Attack* and various other traits to Traits namespace 2014-12-26 21:38:48 +01:00
reaperrr
2054e41552 Dissolve Render namespace 2014-12-26 21:38:47 +01:00
reaperrr
51fe951cd6 Move SupportPowers to Traits namespace 2014-12-26 21:38:47 +01:00
reaperrr
d58807cdb8 Dissolve RA.Buildings namespace.
Move a handfull related, loose traits to RA.Traits as well.
2014-12-26 21:38:46 +01:00
Paul Chote
9e806d5869 Merge pull request #7197 from Mailaender/nuget-thirdparty
Cleaned most of the thirdparty folder from foreign binaries
2014-12-27 09:28:44 +13:00
Paul Chote
9928d9a187 Merge pull request #7196 from Mailaender/prologue
Added the intro videos to the first missions as background info
2014-12-27 08:23:04 +13:00
Matthias Mailänder
94fcfccef9 add the intro videos to the first missions 2014-12-26 19:40:03 +01:00
Oliver Brakmann
cfb36a96d8 Merge pull request #7193 from pchote/style
Fix and enforce code style in Mods.Common, D2k, and TS.
2014-12-26 19:33:27 +01:00
Matthias Mailänder
e7ff627d87 Update INSTALL.md
add Windows PowerShell as dependency for the Makefile substitutes
2014-12-26 16:27:22 +01:00
Matthias Mailänder
962d8fe74f fetch Mono.Nat from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
51d081f93f fetch SDL2 (native Windows DLL) from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
02e1a8d5d2 fetch NUnit 2 from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
9ad76f87d2 fetch SharpFont from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
13785ddabd fetch MaxMind.GeoIP2 from nuget 2014-12-26 15:40:06 +01:00
Matthias Mailänder
6c855cdb8a fetch ICSharpCode.SharpZipLib from nuget 2014-12-26 15:40:04 +01:00
Paul Chote
63d5db1d12 Add Mods.D2k to make check. 2014-12-26 12:13:10 +13:00
Paul Chote
288a89168f Fix d2k naming style nits. 2014-12-26 12:13:10 +13:00
Paul Chote
2726108cff Fix d2k spacing and ordering style nits. 2014-12-26 12:13:09 +13:00
Paul Chote
28aad98125 Add Mods.TS to make check. 2014-12-26 12:13:09 +13:00
Paul Chote
2012946f06 Fix style nits in Mods.TS. 2014-12-26 12:13:09 +13:00
Paul Chote
44b1647fbe Add Mods.Common to make check. 2014-12-26 12:13:09 +13:00
Paul Chote
7575fd811d Rename static fields in SettingsLogic. 2014-12-26 12:13:09 +13:00
Paul Chote
97394789da Disable SA1509. 2014-12-26 12:13:08 +13:00
Paul Chote
9e47634d0f Fix public/static ordering. 2014-12-26 12:13:08 +13:00
Paul Chote
904efac284 Remove underscore prefix. 2014-12-26 12:13:08 +13:00
Paul Chote
362b4aeaef Fix variable ordering. 2014-12-26 12:13:08 +13:00
Paul Chote
22ab35f681 Fix capitalization. 2014-12-26 12:13:08 +13:00
Paul Chote
4ea7b5a908 Usings order. 2014-12-26 12:13:07 +13:00
Paul Chote
805039530d Info -> info. 2014-12-26 12:13:07 +13:00
Paul Chote
673ebba135 Fix invalid spacing style warnings. 2014-12-26 12:13:07 +13:00
Oliver Brakmann
0a68db5dfa Merge pull request #7187 from pchote/allmods
Show games from all compatible mods in the server browser.
2014-12-25 23:22:05 +01:00
Paul Chote
d584ca2797 Merge pull request #7190 from Mailaender/more-stylecop
Added yaml and code style analysis commands to OpenRA.Utility
2014-12-26 10:55:59 +13:00
Paul Chote
2cdcd0f590 Don’t crash if a replay can’t be loaded. 2014-12-26 08:48:37 +13:00
Matthias Mailänder
c1d9665b3d drop in Atreides harvester replacements with carryalls
replace Harkonnen base with Emperors outpost
2014-12-25 14:25:29 +01:00
Matthias Mailänder
e7a64ab8b0 automatically check for code style violations 2014-12-25 10:27:45 +01:00
Paul Chote
f4055dae53 Add --check-code-style utility command. 2014-12-25 10:18:20 +01:00
Paul Chote
ecd4479807 Move OpenRA.Lint into a --check-yaml utility command. 2014-12-25 10:10:57 +01:00
Paul Chote
91807cb53c Remove redundant StyleCop definitions. 2014-12-25 10:10:57 +01:00
Paul Chote
3086cc6154 Disable SA1024 and SA1035.
These rules generate many false positives, and do not help with code readability within OpenRA.
2014-12-25 10:10:57 +01:00
Matthias Mailänder
2dae43335e Merge pull request #7185 from zstyblik/pr20141224-heli-stances
Closes #7117
2014-12-25 10:05:13 +01:00
Paul Chote
568a23e395 Show all mods in the server browser. 2014-12-25 09:46:14 +13:00
Paul Chote
c45d472f9d Hide started games from the server list to reduce noise. 2014-12-25 09:46:14 +13:00
Paul Chote
199f80c8ed Cache GameServer joinable/compatible state across render frames. 2014-12-25 09:46:14 +13:00
Matthias Mailänder
b17c49d12f Merge pull request #7180 from abcdefg30/fix-lonestar
Repaired Fort Lonestar map
2014-12-24 18:03:26 +01:00
abcdefg30
1b068f5986 Add MustBeDestroyed to sniper and reorganize map.yaml 2014-12-24 16:12:45 +01:00
Oliver Brakmann
39d13dc654 Merge pull request #7121 from pchote/switchmods
Add Launch.Connect command and on-connect mod switching.
2014-12-24 16:06:00 +01:00
Matthias Mailänder
34a793c246 Merge pull request #7186 from Mailaender/ts-modchooser-png
Added mod chooser graphics to the Tiberian Sun mod
2014-12-24 15:13:01 +01:00
Oliver Brakmann
659d677cdb Merge pull request #7052 from Mailaender/gdi01-polishing
Fixed GDI01 secondary objectives and mission descriptions
2014-12-24 14:30:40 +01:00
Matthias Mailänder
c97aaa3064 add modchooser graphics 2014-12-24 14:22:55 +01:00
Zdenek Styblik
26d5a62c53 Enable stances for helicopters in RA
Commit enables stance changes for helicopters in RA. It also sets default stance
to HoldFire to keep previous behaviour.

closes #7117
2014-12-24 12:34:01 +01:00
Matthias Mailänder
4b913d423e Merge pull request #7162 from penev92/bleed_moveFiles
Further RA project cleanup
2014-12-24 11:02:23 +01:00
Matthias Mailänder
0cc95b8cfa Merge pull request #7184 from abcdefg30/fixsoviets
Fix soviets01
2014-12-24 10:48:58 +01:00
abcdefg30
e577f3d7f8 map.yaml cleanup 2014-12-24 10:09:26 +01:00
abcdefg30
366be4585a Fix soviets01 2014-12-24 09:56:23 +01:00
Matthias Mailänder
849d7ce0b3 Merge pull request #7175 from pchote/hardware-cursors
Closes #7015
2014-12-24 09:37:17 +01:00
Matthias Mailänder
4e4a14ae0b Merge pull request #7181 from pchote/d2k-leavemap
Fix d2k ingame-leavemap.yaml.
2014-12-24 09:16:38 +01:00
Paul Chote
54f3c1e7ac Fix d2k ingame-leavemap.yaml. 2014-12-24 09:54:34 +13:00
Matthias Mailänder
c460769442 Merge pull request #7176 from Mailaender/wormspawner-icon
Replaced the wormspawner editor icon
2014-12-23 15:41:33 +01:00
penev92
681042caec Further RA project cleanup 2014-12-23 15:18:07 +02:00
Matthias Mailänder
77ad98fa69 replace wormspawner editor icon 2014-12-23 11:46:32 +01:00
Paul Chote
6923046564 Expose the cursor mode setting. 2014-12-23 22:09:22 +13:00
Paul Chote
1317101662 Add support for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
75b046ae2a Reorganize cursor plumbing in preparation for hardware cursors. 2014-12-23 22:09:22 +13:00
Paul Chote
202247cf6a Include no-extension workaround for FrameCache too. 2014-12-23 22:09:22 +13:00
Paul Chote
380b0e1561 Capitalise cursor properties. 2014-12-23 22:09:21 +13:00
Matthias Mailänder
7c19f710b8 Merge pull request #7134 from pchote/map-class
Introduce map Class field to replace Selectable/UseAsShellmap
2014-12-22 22:23:41 +01:00
Paul Chote
dc211cc729 Fix an unrelated editor regression. 2014-12-23 10:00:23 +13:00
Paul Chote
bd2518649a Upgrade shipped maps to the latest format. 2014-12-23 10:00:19 +13:00
Paul Chote
96b5b1fc66 Automatically switch mods when connecting to a server / replay. 2014-12-23 09:20:21 +13:00
Paul Chote
660f6682ff Add Launch.Connect parameter for launching directly to a server. 2014-12-23 09:20:21 +13:00
Paul Chote
7bfffeadc2 Simplify mod content installation plumbing. 2014-12-23 09:20:21 +13:00
Paul Chote
ec7a32184e Move the mod-level initialisation code back into the load screen. 2014-12-23 09:20:19 +13:00
Paul Chote
6f0927069a Allow outside code to specify the map chooser visibility filter. 2014-12-23 09:08:00 +13:00
Paul Chote
2ed594fd86 Introduce map Visibility field.
This replaces the Selectable, UseAsShellmap, and special-cased Type = "Mission" fields.
2014-12-23 09:08:00 +13:00
Paul Chote
b4c9c19cce Don’t crash when saving automatically-upgraded maps. 2014-12-23 09:08:00 +13:00
Paul Chote
14deb1efdf Drop support for map format 5. 2014-12-23 09:08:00 +13:00
Matthias Mailänder
711a1ca5fc Merge pull request #6830 from RoosterDragon/dispose-renderer-resources
Closes #5116
2014-12-22 19:59:41 +01:00
Matthias Mailänder
ea410d0688 Merge pull request #7096 from ScottNZ/countries
Closes #5928
2014-12-22 19:20:43 +01:00
Oliver Brakmann
4f4501ccb6 Merge pull request #7165 from Mailaender/appveyor
Added AppVeyor support
2014-12-22 18:49:23 +01:00
Matthias Mailänder
967d6b6ea0 Merge pull request #7161 from reaperrr/dissolve-namespaces03
Dissolve Move, Infiltration and Crates namespaces
2014-12-22 18:43:05 +01:00
RoosterDragon
b28d999131 Made SheetBuilder rely on global settings rather than global renderer.
Additionally exposed an InitializeSettings method on game to initialize the global settings so that other classes can set up all the secret dependencies on the global settings required.
2014-12-22 17:39:19 +00:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
reaperrr
070a3839d4 Remove obsolete D2k sln
Closes #7163.
2014-12-22 18:13:31 +01:00
reaperrr
370c3c65b6 Moved AttackLeap to Mods.RA.Traits, moved AttackPopupTurreted to
Mods.Cnc.Traits
2014-12-22 18:13:30 +01:00
reaperrr
65a140afa5 Dissolve Crates namespace, move CrateActions and Crate trait to Traits/Crates 2014-12-22 18:13:29 +01:00
reaperrr
52219b1c7a Dissolve Infiltration namespace 2014-12-22 18:13:28 +01:00
reaperrr
5c5210f5e3 Dissolve Move namespace into Activities & Traits 2014-12-22 17:32:08 +01:00
Matthias Mailänder
b0181b6d7b don't run tests that will fail due to known issues 2014-12-22 10:18:44 +01:00
Matthias Mailänder
c04bb13e71 fix redeploying failing the secondary objective
code cleanup
2014-12-22 09:56:36 +01:00
Matthias Mailänder
b294816489 left-click orders have been deprecated 2014-12-22 09:45:18 +01:00
Matthias Mailänder
38b579a081 Merge pull request #7169 from pchote/revert-attackmove
Closes #7128
2014-12-22 09:43:42 +01:00
Paul Chote
9fc8726a5e Merge pull request #7171 from chrisforbes/fix-mission-nre
Fix NRE in start game MissionBrowser IsDisabled query
2014-12-22 16:34:06 +13:00
Chris Forbes
2790748587 Fix NRE in start game MissionBrowser IsDisabled query 2014-12-22 16:12:53 +13:00
Paul Chote
488f0d1140 Revert "Fixes AttackMove moving even if an enemy is within range."
This reverts commit a155c7b7ac.
2014-12-22 15:17:51 +13:00
Paul Chote
e212517bbb Merge pull request #7126 from penev92/bleed_sandworm
Fix worms not releasing targets when they move deep onto rock
2014-12-22 14:46:08 +13:00
Paul Chote
f352aedf61 Merge pull request #7071 from RoosterDragon/deal-in-map-coords
Avoid redundant cell <-> map conversions
2014-12-22 14:08:30 +13:00
Paul Chote
acb29d74cd Merge pull request #7141 from RoosterDragon/sync-less-tostring
Generate sync reports faster
2014-12-22 09:01:08 +13:00
Matthias Mailänder
c42f4d8fcc add AppVeyor support 2014-12-21 20:08:35 +01:00
Matthias Mailänder
b05fd1664f Merge pull request #7158 from obrakmann/fix6839_part2
Disable dev and player commands for observers
2014-12-21 12:32:51 +01:00
RoosterDragon
c37a691c33 Convert some keys users of CellLayer to index via map-coords for efficiency. 2014-12-20 23:39:03 +00:00
RoosterDragon
b728deb0e1 Added the ability to enumerate the map-coords of a CellRegion for performance. 2014-12-20 23:36:28 +00:00
Oliver Brakmann
b9e3c62671 Merge pull request #7157 from reaperrr/ra-common22
Moved Tooltip to Mods.Common.Traits
2014-12-20 22:16:51 +01:00
Oliver Brakmann
a2eddeae40 Disable dev and player commands for observers
Fixes #6839
2014-12-20 19:34:10 +01:00
reaperrr
51cc87a8dc Move Tooltip to Mods.Common 2014-12-20 15:19:26 +01:00
Oliver Brakmann
087a06b3bc Merge pull request #7152 from ihptru/masterserver
notify user that his server does not have forwarded ports
2014-12-20 13:34:51 +01:00
Oliver Brakmann
2509bbdc8e Merge pull request #7149 from LipkeGu/devcmd_observer_crash
Accept DevCommands only from local players
2014-12-20 13:25:17 +01:00
ihptru
57897b4916 notify user that his server does not have forwarded ports 2014-12-20 10:54:01 +03:00
Chris Forbes
080e94f970 Merge pull request #7153 from reaperrr/ra-common20
More RA/Common reorganisation
2014-12-20 15:24:11 +13:00
reaperrr
2d7c1a3394 Rename CommonTraitsInterfaces to TraitsInterfaces, move to Traits namespace 2014-12-19 13:18:36 +01:00
reaperrr
de224a381d Make WithRotor independent from WithTurret
Move WithRotor to Mods.Common
2014-12-19 13:18:32 +01:00
ScottNZ
67faca2e57 Remove fake structure access from a few missions 2014-12-19 18:13:33 +13:00
ScottNZ
d77086a94b Buff parabombs - increase damage and spread 2014-12-19 18:13:32 +13:00
ScottNZ
a4ed728428 Reduce price of MAD tank to $2000 2014-12-19 18:13:32 +13:00
ScottNZ
2f8fb1a138 Increase minelayer capacity to 5 2014-12-19 18:13:31 +13:00
ScottNZ
486b878e9b Set up additional prerequisites to make it easier for modders 2014-12-19 18:13:31 +13:00
ScottNZ
52f6cb418a Fix faction dropdowns unhighlighting when they shouldn't 2014-12-19 18:13:30 +13:00
ScottNZ
4f4c67735d Overhaul the lobby faction dropdown for ra 2014-12-19 18:13:27 +13:00
ScottNZ
ac090b3acd Fix a bogus label name in ra 2014-12-19 18:08:52 +13:00
ScottNZ
32c25d03a1 Add new flags to ra countries, based on tomsons26's work 2014-12-19 18:08:51 +13:00
ScottNZ
846b15fb26 Add Advanced Gap Generator for France 2014-12-19 18:08:51 +13:00
ScottNZ
4b94bfdf85 stnk -> England, mgg -> France, ctnk -> Germany, qtnk -> Russia, dtrk -> Ukraine 2014-12-19 18:08:50 +13:00
ScottNZ
8da406238b Set up prerequisites for WEAP 2014-12-19 18:08:50 +13:00
ScottNZ
fc1392e9ad Add Advanced Chronosphere for Germany 2014-12-19 18:08:50 +13:00
ScottNZ
61ad0edc15 Change spy to be 50% cheaper for England 2014-12-19 18:08:49 +13:00
ScottNZ
40fda57769 Let vanilla Allies build fake structures (except fake sub pen because it's silly) 2014-12-19 18:08:49 +13:00
ScottNZ
20fd862d75 Rebalance fake structures 2014-12-19 18:08:48 +13:00
ScottNZ
01db3fc4b8 Adjust fake structure tooltips to appear real to enemies 2014-12-19 18:08:48 +13:00
ScottNZ
62f85e8e36 Update voice definitions for new countries 2014-12-19 18:08:48 +13:00
ScottNZ
1c2bda8460 Update crates for new countries 2014-12-19 18:08:47 +13:00
ScottNZ
c526f572e7 Set up tank drop for Russia, parabombs for Ukraine and spy plane/paradrop for Soviet 2014-12-19 18:08:47 +13:00
ScottNZ
e54be8c58b Set up custom prerequisites for FACT 2014-12-19 18:05:28 +13:00
ScottNZ
c4110bad45 Add country definitions 2014-12-19 18:05:28 +13:00
Paul Chote
5b011e6baf Merge pull request #7072 from obrakmann/fmv-overhaul
Move FMV playback from Lua scripts to widgets
2014-12-19 17:43:07 +13:00
Paul Chote
e3068a8032 Merge pull request #6964 from obrakmann/fix6589_add_short_game_option
Short Game option
2014-12-19 17:20:47 +13:00
Guido L.
47e2859196 Accept DevCommands only from local Players 2014-12-18 22:41:19 +01:00
Oliver Brakmann
2ec36b65aa Merge pull request #7146 from MustaphaTR/d2k-starting-units
D2k - Added more Rifle Inf. to Starting Units.
2014-12-18 20:42:44 +01:00
Oliver Brakmann
441f30f021 Punctuation fixes 2014-12-18 20:24:37 +01:00
Oliver Brakmann
5a6282d6f9 Adjust missions 2014-12-18 20:24:37 +01:00
Oliver Brakmann
f182e3be1d Adjust minigames 2014-12-18 20:24:37 +01:00
Oliver Brakmann
3cd4152dd2 Adjust rules 2014-12-18 20:24:37 +01:00
Oliver Brakmann
4b9b1df96b Add short game option to GUI 2014-12-18 20:24:37 +01:00
Oliver Brakmann
280b30961f Add plumbing for short game option 2014-12-18 20:03:26 +01:00
Oliver Brakmann
470ae17271 Move mission objectives and victory conditions to Mods.Common 2014-12-18 20:03:26 +01:00
Oliver Brakmann
e342619ac7 Add video support to legacy map importer
This enables the map importer to map the .ini video definitions to ours.

The mapping generally is as follows:

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

An issue in some Red Alert maps means that this mapping is not always
quite correct. In those maps that do not have a 'Brief' video defined
(scg03a is an example), Westwood has assigned the video that should
probaby have been the 'Action' video to the 'Intro' slot instead. I can
only assume that that was done due to some limitation in the original
game code. Mappers will have to correct that assignment manually in
those cases.
2014-12-18 18:59:42 +01:00
Oliver Brakmann
1564e6c0dd Update missions for yaml-defined FMV playback 2014-12-18 18:59:42 +01:00
Oliver Brakmann
04bd4627d4 Add yaml-defined FMV playback to GUI elements 2014-12-18 18:59:42 +01:00
Mustafa Alperen Seki
cd53de198c D2k - Added more Rifle Inf. to Starting Units. 2014-12-18 13:41:49 +02:00
Paul Chote
cb471bb36b Merge pull request #7133 from reaperrr/ra-reorg10
Reorganise Mods.D2k, more reorganisation for Mods.RA
2014-12-18 23:00:21 +13:00
Oliver Brakmann
1175215bf3 Merge pull request #7039 from Mailaender/bring-back-teamchat-tab
Brought back TAB to switch team/all chat when nothing has been typed yet
2014-12-17 22:18:14 +01:00
reaperrr
c19d096d92 Bring Mods.D2k in line with our new folder/namespace structure 2014-12-17 13:10:50 +01:00
Chris Forbes
3bb3eebeb9 Merge pull request #7138 from DavidARussell/bleed
Applys decloak to units activating a C4 demolition or infiltrate ability
2014-12-17 22:32:16 +13:00
Paul Chote
e1a701d21b Merge pull request #7143 from Unit158/AUTHORS
Add Unit158 to AUTHORS
2014-12-17 15:24:41 +13:00
Chicken man
15620e8da8 Add Unit158 to AUTHORS 2014-12-16 19:09:04 -05:00
David Russell
5e2df2c39a Decloak on demolish and infiltrate
Per issue #7028, infiltrating or demolishing a building will now cause an
infantry unit to decloak (if it has a cloak ability). This behaviour is
configurable (defaults to true in both cases) using the
DecloakOnInfiltrate and DecloakOnDemolish options.
2014-12-16 22:25:49 +00:00
RoosterDragon
3511fbbf2c Generate sync reports faster by delaying ToString calls until it is written to disk.
Values for the report are generated by calling ToString on members, we avoid calling this on value types for performance. By instead just copying the value we can delay calling ToString until later and avoid spending time and memory creating strings that usually go unused.
2014-12-16 18:39:02 +00:00
Paul Chote
f186f22bfc Merge pull request #7073 from Mailaender/travis-csharp
Added official Travis C# support
2014-12-16 20:58:55 +13:00
reaperrr
b5872d9fa5 Reorganise RA-specific parts of Mods.RA a little more 2014-12-15 00:01:36 +01:00
Paul Chote
1f90b9b74b Merge pull request #7129 from reaperrr/ra-common15
More Mods.RA/Mods.Common reorganisation
2014-12-15 08:15:41 +13:00
reaperrr
ee8e1f46c1 Move 'Activity' into its own namespace in OpenRA.Game. 2014-12-14 17:12:46 +01:00
reaperrr
91c19b0f66 Move various RA-specific traits to the new folder/namespace structure 2014-12-14 17:11:52 +01:00
reaperrr
b217730caa Move Activities CallFunc, RemoveSelf and SimpleTeleport to Common 2014-12-14 17:11:52 +01:00
reaperrr
0015c1319e Rename Util.cs to BuildingUtils.cs 2014-12-14 17:11:51 +01:00
reaperrr
4bf50c9153 Move more traits from Mods.RA to Mods.Common 2014-12-14 17:11:50 +01:00
Oliver Brakmann
8723aa86fb Merge pull request #6679 from Mailaender/change-owner-warhead
Implemented Deviator nerve gas missiles as warheads
2014-12-14 16:28:58 +01:00
Matthias Mailänder
9e650adef8 implement Ordos nerve gas missiles as warheads
closes #2838
2014-12-14 16:03:16 +01:00
Matthias Mailänder
b6ed3c1c0d Merge pull request #7108 from RoosterDragon/faster-path-init
Cache the initial path layer for faster path search startups.
2014-12-14 15:52:06 +01:00
Matthias Mailänder
f55b95017c Merge pull request #7122 from penev92/bleed_moveFiles
Move more files away from OpenRA.Mods.RA
2014-12-14 15:40:46 +01:00
penev92
1e9535b63a Move more files
Move VoxelNormalsPalette to TS
2014-12-14 15:39:38 +02:00
Matthias Mailänder
611e3038b2 Merge pull request #7066 from WolfGaming/FixTimeoutInSinglePlayer
Fix: Game can no longer drop you in a single player game.
2014-12-14 10:50:36 +01:00
Scott
0e220c65d3 Merge pull request #7127 from pchote/stylecop
Fix a collection of whitespace-style issues in Mods.Common.
2014-12-14 19:37:11 +13:00
Paul Chote
0f332472f1 Fix StyleCop nits in Mods.TS. 2014-12-14 17:13:23 +13:00
Paul Chote
4504df1de9 Fix StyleCop nits in Mods.Cnc. 2014-12-14 17:11:20 +13:00
Paul Chote
ecd3809bc2 Fix a collection of whitespace-style issues in Mods.Common. 2014-12-14 17:06:43 +13:00
WolfGaming
20fe03b6c1 Added comment and a static field for localhost. 2014-12-14 02:26:42 +00:00
penev92
fbda9dc1b1 Fix worms getting stuck when target reaches rock 2014-12-14 02:32:01 +02:00
Oliver Brakmann
299a933dac Merge pull request #7123 from pchote/style-cleanup
Clean up some code style issues.
2014-12-14 00:06:52 +01:00
Paul Chote
eefd7dba2c Fix some minor style issues in Attack*. 2014-12-14 11:31:04 +13:00
Paul Chote
ebdb260650 Fix style issues from a recent PR. 2014-12-14 11:31:04 +13:00
Paul Chote
a50ccd1020 Remove the AttackSwallow Info field overloading. 2014-12-14 10:49:35 +13:00
RoosterDragon
f01f8d92b3 Cache the initial path layer for faster path search startups.
Reinitializing the initial cell info layer for the path search took a fair bit of time. We cache this initial setup so it only has to be done each time the map size changes. A CopyValuesFrom method in CellLayer is provided which copies values between layers by just copying the internal arrays for super speed.

This speeds up InitCellInfo 10x.
2014-12-13 21:44:32 +00:00
WolfGaming
f191babec8 Fix: Game can no longer drop you in a single player game. 2014-12-13 16:04:00 +00:00
Matthias Mailänder
8e001663dc Merge pull request #6821 from penev92/bleed_sandworm
Closes #2245
2014-12-13 14:16:55 +01:00
obrakmann
515e2c572c Merge pull request #7097 from abcdefg30/difficulty03a
Polished allies03a
2014-12-13 13:53:42 +01:00
penev92
f57625f9e6 Add WormAttack notification, fix worm min count and spawn interval
Enhance usage of WormManager Minimum and Maximum properties, add escape radius to AttackSwallow
2014-12-13 14:06:56 +02:00
penev92
b4d1a605da Add RadarPing on worm spawn, fix wandering issue, add new Wormspawner.shp 2014-12-13 14:02:45 +02:00
penev92
61cb74adb4 Improved visuals, added WormSign norification 2014-12-13 14:02:44 +02:00
penev92
c4efd269d4 Step three in implementing sandworms
Removed/fixed comments

Code style fixes

Fixed AttackWander, addressed style nits

Fix Travis crash
2014-12-13 14:02:44 +02:00
penev92
1057f8ff3b Second implementation of Sandworms
Fix tabs in AttackSwallow.cs
2014-12-13 14:02:43 +02:00
abcdefg30
ddf4a4a656 Don't hunt cloaked units 2014-12-13 11:46:18 +01:00
abcdefg30
2729233735 Polished allies03a 2014-12-13 11:24:11 +01:00
Matthias Mailänder
5da5bce405 Merge pull request #7102 from ScottNZ/parachutable
Fixes #7101
2014-12-13 08:14:23 +01:00
Matthias Mailänder
e353c93b76 Merge pull request #7107 from reaperrr/ra-common-move01
Made Common namespaces more consistent
2014-12-12 22:19:54 +01:00
obrakmann
aba00eaf64 Merge pull request #7116 from reaperrr/attackmove-split
Splits AttackMove into trait and activity
2014-12-12 21:29:13 +01:00
reaperrr
56ac46541a Merge pull request #7119 from Mailaender/allies01-tanya-crash
Fixed a Fatal Lua Error in the first Allies mission
2014-12-12 13:30:56 +01:00
reaperrr
584a6b2e75 Splits AttackMove into trait and activity.
Moves them to subfolders/namespaces accordingly.
2014-12-12 13:24:30 +01:00
reaperrr
94907088c8 Merge pull request #7113 from Smilex/issue_7100
Prevent divide by zero. Issue #7100
2014-12-12 13:21:18 +01:00
reaperrr
65fb1a2cba Merge pull request #7114 from Mailaender/no-bots-koth-hopes-anchor
Disallowed bots on Hopes Anchor
2014-12-11 23:29:38 +01:00
reaperrr
26075b8eaf Moves loadscreens into LoadScreens folder/namespace.
Moves LoadWidgetAtGameStart to Traits/World.
2014-12-11 23:21:34 +01:00
reaperrr
75b91af023 TimedUpgradeBar moved to Traits/Render 2014-12-11 23:21:33 +01:00
reaperrr
aadceb085b Renames RallyPoint effect to RallyPointIndicator 2014-12-11 23:21:32 +01:00
reaperrr
ffca040c47 Moves traits from Common and Power namespaces to Common.Traits namespace 2014-12-11 23:21:31 +01:00
reaperrr
9a1e110481 Move some Render traits to Mods.Common 2014-12-11 23:10:06 +01:00
reaperrr
88c119ebba Merge pull request #7106 from penev92/bleed_moveFiles
Move Upgrades and Prerequisites from Mods.RA to Mods.Common
2014-12-11 22:34:58 +01:00
Matthias Mailänder
6e6b1fc452 fix an oversight in #7081 2014-12-11 20:49:03 +01:00
Ian T. Jacobsen
f62a9b4f8a Changed parens
Changed parens
2014-12-11 13:16:14 +00:00
obrakmann
c8ad2d4911 Merge pull request #7093 from RoosterDragon/frozen-stream
Make FrozenActorsInBox a streaming enumerable.
2014-12-11 00:10:40 +01:00
obrakmann
2d5b41338e Merge pull request #7091 from RoosterDragon/buffer-copy-palettes
Block copy palettes
2014-12-10 22:57:37 +01:00
obrakmann
3b0a725c23 Merge pull request #7067 from WolfGaming/AttackMove
Fix: AttackMove moving when within range
2014-12-10 22:07:50 +01:00
Matthias Mailänder
b32861c832 disallow bots on Hopes Anchor 2014-12-10 20:04:13 +01:00
Ian T. Jacobsen
38556c7014 Prevent divide by zero 2014-12-10 17:14:41 +00:00
WolfGaming
a155c7b7ac Fixes AttackMove moving even if an enemy is within range. 2014-12-10 13:28:10 +00:00
reaperrr
fb6b9b8be5 Merge pull request #7085 from Mailaender/d2k-clock
Fixed color and overlap glitches in the Dune 2000 build palette
2014-12-10 13:13:18 +01:00
Chris Forbes
d72dfe30e1 Merge pull request #6993 from Mailaender/server-browser-colors
Color coded the server browser and added a filter for password protected games
2014-12-10 16:30:57 +13:00
penev92
ce2c536a1a Move Upgrades and Prerequisites 2014-12-10 00:07:07 +02:00
obrakmann
af0be2f592 Merge pull request #7042 from Mailaender/chronosphere-owner-shroud
Fixed teleporter check the target instead of the initiating owner shrouds
2014-12-09 21:09:32 +01:00
Matthias Mailänder
4be6b51c58 save a trait lookup 2014-12-09 20:31:34 +01:00
Oliver Brakmann
ac1e7a7352 check shroud against the initiating owner when teleporting
fixes #6999
2014-12-09 20:31:33 +01:00
Matthias Mailänder
253dfcac29 split SimpleTeleport into it's own file 2014-12-09 20:31:33 +01:00
reaperrr
8f076131c8 Merge pull request #7090 from Mailaender/d2k-infantry-noidle-stand
Fixed infantry without idle animation never returning to stand
2014-12-09 20:08:10 +01:00
Matthias Mailänder
f56876cd23 Merge pull request #7036 from penev92/bleed_moveFiles_1
Moved several render traits from Mods.RA to Common
2014-12-09 19:53:27 +01:00
ScottNZ
39c10e76e1 Fix Parachutable to work for tank drops 2014-12-10 00:37:35 +13:00
penev92
09350528fd Moving renders
Remove Traits.Render
2014-12-09 01:29:25 +02:00
obrakmann
fbddff3a75 Merge pull request #7088 from Gishten/taskbranch-7083
Fix aircraft fly endlessly in a circle when ordered to attack inside own...
2014-12-08 09:57:32 +01:00
Jonathan Gustafsson
d7f321e04d Fix aircraft fly endlessly in a circle when ordered to attack inside own turning radius 2014-12-08 07:41:10 +01:00
Chris Forbes
eec4f7171a Merge pull request #7057 from pchote/celllayerupdates
Improve radar rendering performance
2014-12-08 14:09:09 +13:00
Chris Forbes
522c63ff58 Merge pull request #7081 from Mailaender/ignore-missing-npc-objectives
Removed the need to give NPCs fake objectives to properly end the game
2014-12-08 14:05:59 +13:00
RoosterDragon
1116f578a3 Make FrozenActorsInBox a streaming enumerable.
Following the same layout as ActorsInBox, this streams the enumerable internally making it cheaper to call if only part of it is required, and also avoids building an intermediate list.
2014-12-07 21:36:56 +00:00
RoosterDragon
8c2fdb9097 Add CopyToArray method for IPalette.
By allowing a palette to be copied to an array, a speedup can be gained in HardwarePalette since palettes can be block copied using native magic rather than having to copy them item by item. We transpose the buffer in HardwarePalette in order to allow a contiguous block copy into this buffer, transposing again in the shader to keep everything correct.
2014-12-07 20:46:46 +00:00
Matthias Mailänder
70e1ceaa04 allow TAB to switch team/all chat when nothing is auto-completed 2014-12-07 17:36:55 +01:00
Matthias Mailänder
9bfd82e868 fix infantry without idle animation not returning to stand 2014-12-07 16:39:09 +01:00
Matthias Mailänder
cd6e3291e2 adjust clock.shp to the Dune 2000 icon size
remove artifacts from automatic palette conversions
2014-12-07 11:53:31 +01:00
Matthias Mailänder
a57b7800c0 color code the server browser and filter protected
closes #4495
2014-12-07 08:22:32 +01:00
Paul Chote
51f874fae2 Merge pull request #7033 from Mailaender/d2k-carryall-tweaks
Tweaked spice harvester carryalls
2014-12-07 11:09:55 +13:00
obrakmann
0454d94e77 Merge pull request #6896 from LipkeGu/ai_waepons
[TS] Add Defence buildings to the AI
2014-12-06 22:59:37 +01:00
Paul Chote
400cfb9713 Merge pull request #6904 from LipkeGu/fix_log_path_prefix
fix LogPathPrefix
2014-12-07 10:29:19 +13:00
obrakmann
01b44f0478 Merge pull request #7079 from Mailaender/mobile-cursor
Unhardcoded and self-documented the mobile cursor definitions
2014-12-06 21:25:01 +01:00
Matthias Mailänder
d319a8f506 split Einstein and Tanya survival objectives for clarity
fixes #7068
2014-12-06 21:04:48 +01:00
Matthias Mailänder
e16bc064a0 fix the end game dialog not showing which objectives failed
- don't mark everything as failed just because one objective did
- remove fake objectives workarounds for non-playable factions
2014-12-06 21:04:46 +01:00
Matthias Mailänder
f246475b81 Merge pull request #7065 from reaperrr/magenta-fix
Revive magenta cnc desert tiles for compatibility reasons
2014-12-06 21:01:37 +01:00
Matthias Mailänder
486376b56a Merge pull request #7045 from Gishten/bleed
Closes #6989
2014-12-06 20:54:50 +01:00
Matthias Mailänder
2ae93f44aa move carryall to it's own aircraft queue 2014-12-06 20:31:15 +01:00
Matthias Mailänder
74d22f4db2 unhardcode the cursor definitions
closes #7074
2014-12-06 19:01:10 +01:00
Jonathan Gustafsson
c5b2c747f8 Vehicles can't move to nearby walled tile #6989 2014-12-06 15:01:17 +01:00
Matthias Mailänder
e1a441b7f3 use official Travis csharp support 2014-12-06 08:50:07 +01:00
obrakmann
de28df2c41 Merge pull request #7049 from WolfGaming/FixUpgradeCrash
Added missing stance check.
2014-12-05 21:26:04 +01:00
Paul Chote
ea05e06290 Merge pull request #7038 from Mailaender/packaging-tweaks
Reduced the Travis dependencies and adapted the installation instructions
2014-12-05 19:58:43 +13:00
obrakmann
7a91e7937a Merge pull request #7018 from atlimit8/PoisonedByTiberiumByUpgrade
Control whether actor is poisioned by resource through the use of upgrades.
2014-12-04 21:44:20 +01:00
obrakmann
e5c4ae28de Merge pull request #6768 from atlimit8/PowerByUpgrade
Add Upgrade support to Power/CanPowerDown
2014-12-04 21:26:36 +01:00
atlimit8
92779cc496 Support multiple Power traits 2014-12-04 14:19:50 -06:00
atlimit8
47357addeb Add Upgrade support to Power/CanPowerDown 2014-12-04 04:12:21 -06:00
atlimit8
4646e8fb32 Control whether actor is poisioned by resource (Tiberium) through the use of upgrade(s) 2014-12-04 04:00:39 -06:00
Paul Chote
af9a74ddd4 Optimise actor radar rendering for another significant perf win. 2014-12-04 21:18:45 +13:00
Paul Chote
5e402e95cb Update only dirty radar pixels and refresh every tick. 2014-12-04 21:18:45 +13:00
Paul Chote
e064593961 Add a CellEntryChanged event to CellLayer. 2014-12-04 21:18:45 +13:00
Paul Chote
ab4a8be66e Store the radar layers in a single buffered sheet. 2014-12-04 21:18:44 +13:00
reaperrr
5cb198829b Revive magenta desert tiles for compatibility reasons 2014-12-03 22:03:13 +01:00
obrakmann
ae992d1403 Merge pull request #7043 from reaperrr/cnc-tileset-fix
Added map editor categories to TD tilesets
2014-12-03 21:37:10 +01:00
obrakmann
8886df9837 Merge pull request #6979 from reaperrr/ra-reorg02
Moved various RA traits into Traits namespace & folders
2014-12-03 21:28:11 +01:00
reaperrr
e575cc0864 Adds editor categories to TD tilesets
Removes magenta desert tiles
2014-12-03 21:23:09 +01:00
reaperrr
7470391c5d Move RA World traits, FrozenUnderFog Modifier and various other traits into Traits 2014-12-03 12:52:17 +01:00
obrakmann
7c44110fb0 Merge pull request #6884 from MustaphaTR/ra-ai
RA - Updated AI
2014-12-02 21:39:50 +01:00
obrakmann
ff2ffa8ec8 Merge pull request #6890 from Mailaender/document-build-time-value
Documented various traits
2014-12-01 20:53:38 +01:00
WolfGaming
22ab93b549 Added missing stance check. 2014-12-01 09:57:24 +00:00
Matthias Mailänder
2e33d12135 Merge pull request #7046 from penev92/bleed_removeChronoshiftableTraitFromTD
Remove Chronoshiftable trait from TD mod vehicles
2014-11-30 23:03:03 +01:00
penev92
4a61bb838f Remove Chronoshiftable trait from TD mod 2014-11-30 23:20:56 +02:00
Matthias Mailänder
5361b920ca document various traits 2014-11-30 19:08:44 +01:00
Matthias Mailänder
43f4e3f5c3 document "Value" 2014-11-30 16:53:32 +01:00
Matthias Mailänder
93ef16d657 Merge pull request #7032 from RoosterDragon/less-makearray
Change some Exts.MakeArray calls into Enumerable.Range.
2014-11-30 12:21:11 +01:00
Matthias Mailänder
34bedeb71f split Hovers from WithShadow
fixes #4508
2014-11-30 10:54:36 +01:00
Matthias Mailänder
6ecc6d67cd fix overlapping shadows 2014-11-30 10:54:36 +01:00
Matthias Mailänder
bfcc52c871 enable high tech factory welding 2014-11-30 10:37:58 +01:00
Matthias Mailänder
003838de3f make carryalls initially lift-off from high tech factories 2014-11-30 10:37:58 +01:00
Matthias Mailänder
e910e8bec4 add lore to the description 2014-11-30 10:37:58 +01:00
Matthias Mailänder
5402993930 document Makefile changes 2014-11-30 09:50:50 +01:00
Matthias Mailänder
05bc9e5a7a native dependencies are not required during the build 2014-11-30 09:50:39 +01:00
Matthias Mailänder
9d2411a600 Merge pull request #6950 from pchote/retire-packaging
Closes #6480
2014-11-30 09:47:10 +01:00
Paul Chote
97e5473126 Remove linux native libraries and automate configure. 2014-11-30 10:20:24 +13:00
Paul Chote
c4967db0cc Remove native code from deb packages. 2014-11-30 09:34:54 +13:00
Paul Chote
260c36239b Remove automated rpm and arch packaging.
See #6480 for the reasoning.
2014-11-30 09:34:54 +13:00
obrakmann
4d1372aaec Merge pull request #7013 from atlimit8/ModsCommonScripting
Move the core of OpenRA.Mods.RA.Scripting to OpenRA.Mods.Common.Scripting
2014-11-29 18:13:18 +01:00
obrakmann
0dd7d08974 Merge pull request #6756 from RoosterDragon/release-more-buffers
Release more sheet buffers
2014-11-29 17:47:06 +01:00
Matthias Mailänder
422cc97cec Merge pull request #7009 from obrakmann/fix7000_e3_close_range_fix
Add min range to bazookas
2014-11-29 17:37:49 +01:00
Matthias Mailänder
272682e53e Merge pull request #7010 from obrakmann/fix6990_cargo_on_radar
Do not show cargo on radar map
2014-11-29 16:08:57 +01:00
RoosterDragon
c2d86557f1 Use more locking to improve thread-safety in Sheet. 2014-11-29 12:04:51 +00:00
RoosterDragon
c2b7d9ca5b Release sheet buffers in SequenceProvider and MapCache.
The buffers in SequenceProvider can be freed if Preload is called, since we know everything is loaded. A SequenceProvider is created for each TileSet is use so this saves memory for however many tilesets had been used in the game. This will be at least one for the shellmap, and often more.

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

Additionally, when starting the MapCache loading thread we must ensure the buffer is created from the main thread since it may query the texture object which has thread affinity. After that the buffer may be modified freely on the loading thread until released.
2014-11-29 12:04:51 +00:00
RoosterDragon
a6f5a21ed4 Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
2014-11-29 12:04:50 +00:00
RoosterDragon
ff16690b86 Lazily generate buffer in Sheet.
The managed byte buffer is created on demand, meaning a newly allocated sheet will not waste memory holding onto the buffer until some changes are actually required to be written. This avoids a newly allocated sheet wasting memory on buffers that do not differ from their backing texture.
2014-11-29 12:04:00 +00:00
obrakmann
e6852e2b50 Merge pull request #6780 from MatthijsBenschop/d2k-caryall
D2K: Implement automatic Carryall
2014-11-29 12:38:39 +01:00
Matthijs Benschop
a3195f21e5 Add myself to Authors 2014-11-29 12:17:20 +01:00
Matthijs Benschop
2d380c64bd Implementation of the automated D2k Carryall
Closes #2246
2014-11-29 12:17:11 +01:00
Paul Chote
71a8815ffb Merge pull request #6760 from atlimit8/RepairableBuildingByUpgrade
Repairable building by upgrade
2014-11-29 22:16:24 +13:00
Paul Chote
84a8d6ba9f Merge pull request #6745 from atlimit8/SellableByUpgrade
Upgrade support for Sellable
2014-11-29 22:08:29 +13:00
Paul Chote
da4599f621 Merge pull request #6638 from DeadlySurprise/tsVqa
Tiberian Sun .vqa support
2014-11-29 22:01:28 +13:00
RoosterDragon
dc2e44da36 Change some Exts.MakeArray calls into Enumerable.Range.
Avoid creating some arrays where sequences will suffice.
2014-11-29 02:20:42 +00:00
atlimit8
9ddf6dc36c Added RepairableBuildingInfo.CancelWhenDisabled 2014-11-27 17:55:35 -06:00
atlimit8
3c79a9d875 Added upgrade support to RepairableBuilding 2014-11-27 16:28:45 -06:00
obrakmann
6ebaebd1d1 Merge pull request #6878 from Mailaender/captureable-flag
Added a captureable flag
2014-11-27 22:52:09 +01:00
atlimit8
1d631d6980 Added Upgrade support to Sellable 2014-11-27 12:08:14 -06:00
Mustafa Alperen Seki
3aea3faa8e Updated RA AI 2014-11-27 17:21:41 +02:00
atlimit8
91b5ac5070 Move the core of OpenRA.Mods.RA.Scripting to OpenRA.Mods.Common.Scripting 2014-11-26 15:49:16 -06:00
obrakmann
60cf2d2cae Merge pull request #6750 from atlimit8/ITraitDisabled
Added IDisabledTrait & UpgradableTrait with upgrade levels support
2014-11-26 20:21:15 +01:00
atlimit8
bbd54cb32f Added IDisabledTrait & rewrote upgrade code using a level-based approach.
Upgradeable traits are notified whenever an upgrade of their declared types are granted or revoked.  The traits maintain their own internal level counter, which is then used to enable or disable the trait functionality.  A trait can register for multiple upgrade types which then all affect the internal level counter.

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

	Includes rework by pchote with alterations.
2014-11-26 05:45:26 -06:00
Oliver Brakmann
867f7f777e Do not show cargo on radar map
Fixes #6990
2014-11-25 23:08:26 +01:00
Oliver Brakmann
4956bc9213 Add min range to bazookas
Fixes #7000
2014-11-25 22:08:33 +01:00
Chris Forbes
76cf5b8b98 Merge pull request #6995 from reaperrr/buildpal-tab-desc
Added description to ChooseBuildTabOnSelect
2014-11-24 09:30:05 +13:00
reaperrr
7240f8db9f Adds description to BuildPaletteWidget. 2014-11-23 18:14:02 +01:00
reaperrr
aad6ad00a1 Adds description to ChooseBuildTabOnSelect 2014-11-23 18:13:35 +01:00
Matthias Mailänder
f263579158 Merge pull request #6934 from abcdefg30/survival01
Ported Survival01 to Lua
2014-11-23 15:17:42 +01:00
Matthias Mailänder
7ad2a57517 Merge pull request #6927 from huwpascoe/actor-fixup
Actor properties consistency improved
2014-11-23 14:53:33 +01:00
Matthias Mailänder
b52dbe6c07 Merge pull request #6988 from RoosterDragon/enum-memory
Reduce enum memory
2014-11-23 14:48:20 +01:00
abcdefg30
b492c412cd Added "missiontimer initialized" speech notification to allies02 2014-11-23 13:32:44 +01:00
abcdefg30
33eeee4680 Added OnKilledOrCaptured and OnAllKilledOrCaptured 2014-11-23 13:32:40 +01:00
abcdefg30
e29adf5f4f Added proximity triggers 2014-11-23 13:31:39 +01:00
abcdefg30
0899b26874 Added some power functions 2014-11-23 13:31:38 +01:00
abcdefg30
71fa6b2aed Fixed a bug in Intervention
https://github.com/OpenRA/OpenRA/pull/5483#issuecomment-44781904
broke the game.
2014-11-23 13:31:36 +01:00
abcdefg30
19713a19f6 Added support for selecting mission difficulty 2014-11-23 13:31:35 +01:00
abcdefg30
c5978d0dbe Ported Survival01 to lua 2014-11-23 13:31:24 +01:00
obrakmann
13ff5ddf6a Merge pull request #6986 from chrisforbes/minimal-neighbors
Prune neighbor sets based on direction we arrived at a cell
2014-11-23 12:42:54 +01:00
Matthias Mailänder
279e425431 Merge pull request #6983 from huwpascoe/server-browser
Cleaned up the server browser
2014-11-23 11:26:03 +01:00
Chris Forbes
68309af233 Remove enemy territory avoidance in FindResources.
This is called from the inner loop of the pathfinder, so cannot afford
to do actor queries etc. It also didn't have the desired effect --
harvesters still wander through enemy territory even with the bias.

Just rip it out for a perf win.
2014-11-23 15:09:48 +13:00
Chris Forbes
f4e5c63408 Pathfinder: Only consider useful neighbors
Depending on the direction we came from, many neighbors are completely
useless. This is the first step to implementing the ideas in 'Jump Point
Search'

V2: Added comment describing what the array is for.
2014-11-23 15:09:48 +13:00
Chris Forbes
c470945db7 Remove vestigial direction-sorting machinery from PathSearch 2014-11-23 15:09:48 +13:00
huwpascoe
d313317cf5 Cleaned up the server browser 2014-11-22 21:55:55 +00:00
RoosterDragon
35da7d8a6e Make the underlying types of TextureChannel and BlendMode enums a byte to save memory. 2014-11-22 18:12:46 +00:00
obrakmann
20fdd1ccb5 Merge pull request #6795 from Mailaender/gdi03-new-lua
Ported mission GDI03 to the new Lua API
2014-11-22 16:37:17 +01:00
MicroGraphics
91d79d4f42 Added "Capture-the" Flag 2014-11-22 16:23:48 +01:00
abcdefg30
c62d33c4bb let nod attack from different directions 2014-11-22 14:59:09 +01:00
Matthias Mailänder
2dad3b5a59 fix harvesters crushing the sand bags 2014-11-22 14:59:09 +01:00
Matthias Mailänder
a29a16b921 port gdi03 to the new Lua API 2014-11-22 14:59:08 +01:00
Matthias Mailänder
8245b818f8 remove lonely tab 2014-11-22 14:57:16 +01:00
huwpascoe
a660bb95b5 Actor properties consistency improved 2014-11-21 02:44:05 +00:00
Matthias Mailänder
6a425b8636 Merge pull request #6972 from pchote/thirdparty-readme
Closes #6863
2014-11-20 20:11:42 +01:00
Guido L.
0806cca133 Prevent the creation of Logfiles in the Game Directory 2014-11-20 12:59:02 +01:00
Chris Forbes
8ba2137af0 Merge pull request #6978 from pchote/font-licenses
Attribute GNU freefont in the credits.
2014-11-20 18:42:23 +13:00
Paul Chote
a383e5ea9e Add a readme file with the thirdparty dll sources.
Closes #6863.
2014-11-20 18:32:42 +13:00
Paul Chote
692e4af4aa Attribute GNU freefont in the credits. Closes #6862. 2014-11-20 18:19:05 +13:00
obrakmann
c7d418dfb0 Merge pull request #6963 from reaperrr/ra-reorg01
Initial step towards reorganising namespace/folder structure of Mods.*
2014-11-19 22:05:10 +01:00
Chris Forbes
69d035f4db Merge pull request #6973 from Phrohdoh/fix-gitconfig
Fix global git config in update-wiki.sh
2014-11-20 08:26:54 +13:00
Taryn Hill
95a2ebf72d Fix global git config in update-wiki.sh 2014-11-19 07:24:53 -06:00
DeadlySurprise
c504383d92 Changed aspect ratio implementation 2014-11-18 22:35:34 +01:00
DeadlySurprise
cdb05537f3 Added tiberian sun vqa file support 2014-11-18 22:35:33 +01:00
Matthias Mailänder
96497b6bde Merge pull request #6966 from DeadlySurprise/vqa_crash_fix
Fixes #4224
2014-11-18 22:07:55 +01:00
DeadlySurprise
b7e3dfc665 Fixed vqa crashes 2014-11-18 18:42:38 +01:00
reaperrr
f3f051fd46 Move Common Modifiers and PaletteEffects into Traits space 2014-11-18 18:10:59 +01:00
Matthias Mailänder
6774435ef4 Merge pull request #6962 from obrakmann/split_wiki_docs
Wiki: keep separate Trait and Lua API docs for release and playtest
2014-11-18 06:57:58 +01:00
reaperrr
127969d014 Move Air activities and traits to Activities\Air and Traits\Air, respectively 2014-11-17 12:56:18 +01:00
reaperrr
797ac17e61 Reorganize Mods.Cnc 2014-11-17 12:56:17 +01:00
reaperrr
1a032d6f6c Reorganize Mods.D2k 2014-11-16 17:03:52 +01:00
reaperrr
80279dc304 Reorganize Mods.TS 2014-11-16 17:00:41 +01:00
Oliver Brakmann
7359af8667 Wiki: keep separate Trait and Lua API docs for release and playtest 2014-11-16 10:41:47 +01:00
Paul Chote
5c4d49394d Merge pull request #6945 from Phrohdoh/madtank-fix
MadTank deployed teleportation fix.
2014-11-16 17:31:46 +13:00
Paul Chote
6b90d3b9d6 Merge pull request #6960 from obrakmann/fix_buggy_mouse_orders
Fix broken orders when actors are selected
2014-11-16 17:17:06 +13:00
Taryn Hill
31b24b4802 Implement (new) IPreventsTeleport in MadTank.
Prevents MadTank from being teleported after deployment.
2014-11-15 20:55:44 -06:00
obrakmann
8ac2f7fce3 Merge pull request #6957 from ScottNZ/bleed
Set passenger facings when they are unloading
2014-11-15 23:54:15 +01:00
ScottNZ
60a197f8d7 Set PassengerFacing to 0 for ra/td lst 2014-11-16 10:53:16 +13:00
Paul Chote
a3c5747246 Merge pull request #6959 from Mailaender/travis-wiki-playtest
Fixed Travis updating the wrong wiki page
2014-11-16 09:32:46 +13:00
Oliver Brakmann
4e3f565354 Fix broken orders when actors are selected.
Fixes an oversight in #6949.
2014-11-15 21:00:52 +01:00
Matthias Mailänder
1e97accf90 not new, but only Lua API 2014-11-15 20:40:02 +01:00
Matthias Mailänder
834538b336 not just Traits anymore 2014-11-15 20:40:02 +01:00
obrakmann
2c3b812b26 Merge pull request #6949 from pchote/retire-classic-mouse
Retire classic mouse orders
2014-11-15 19:38:32 +01:00
Matthias Mailänder
8005c98143 Merge pull request #6958 from obrakmann/fix6956
Fix shell script syntax errors
2014-11-15 19:10:18 +01:00
Oliver Brakmann
1db0d55aa4 Fix shell script syntax errors
Fixes #6956
2014-11-15 10:43:51 +01:00
Matthias Mailänder
bad8f70210 Merge pull request #6921 from reaperrr/common-traits01
Moved various traits to Mods.Common
2014-11-15 09:41:36 +01:00
ScottNZ
eea978a4ae Set passenger facings when they are unloading 2014-11-15 19:51:14 +13:00
Matthias Mailänder
5bf3d9879c Merge pull request #6948 from pchote/revert-production-desync
Closes #6910
Closes #6925
Closes #6933
2014-11-15 00:15:25 +01:00
Paul Chote
c8ed0fc75c Fix the hotkey panel margins. 2014-11-15 09:46:31 +13:00
Paul Chote
f5c09121ad Remove buggy classic mouse orders. Closes #3153. 2014-11-15 09:40:25 +13:00
Paul Chote
563efd678a Revert "DevEnableTech now displays from all factions"
This reverts commit 5d5f302d07.
2014-11-15 09:20:04 +13:00
reaperrr
5213aef105 Move Palette traits into Traits\World 2014-11-14 01:01:47 +01:00
reaperrr
0cbcae93a9 Move Valued, CustomSellValue and CustomBuildTimeValue to Common 2014-11-14 01:01:46 +01:00
reaperrr
5e866b862b Move Burns from RA to Common, move RallyPoint to Traits folder 2014-11-14 01:01:44 +01:00
reaperrr
41f3ee1080 Move ShroudPalette, ShroudRenderer and StartGameNotification to Common
Move World into Traits folder
2014-11-14 00:59:17 +01:00
reaperrr
3372914216 Move some traits from RA.Buildings to Common 2014-11-14 00:33:30 +01:00
obrakmann
455d4dc97f Merge pull request #6917 from reaperrr/common-11
Move palette stuff + nuke effect + Immobile trait to Mods.Common
2014-11-13 20:52:21 +01:00
obrakmann
0ae0669d4b Merge pull request #6856 from MustaphaTR/d2k-crate-explode
D2k - More Crate PowerUps
2014-11-13 20:03:51 +01:00
Taryn Hill
ee35e1b2ae Merge pull request #6770 from atlimit8/PassengerProvidesUpgrade
Passengers can provide upgrade(s) to transport.
2014-11-12 19:54:59 -07:00
obrakmann
22c2dc56fe Merge pull request #6931 from Happy0/mono310_workaround
Workarounds for a bug in certain versions of Mono (3.10 and certain versions of 3.8) which stops OpenRA building
2014-11-12 20:45:20 +01:00
Gordon Martin
04cbea3792 Desugaring a couple of ternary expressions which prevented OpenRA building on Mono 3.10 and certain versions of the 3.8 series due to a bug in Mono: https://bugzilla.xamarin.com/show_bug.cgi?id=23319 2014-11-11 21:43:33 +00:00
obrakmann
b37a90c3e6 Merge pull request #6902 from Mailaender/geoip-2.1.0
Update to MaxMind GeoIP2 .NET version 2.1.0
2014-11-11 20:08:29 +01:00
Chris Forbes
551000104d Merge pull request #6905 from LipkeGu/Dont_query_traits_on_dead_units
AnyUnitsAt: Ignore Units which are Destroyed
2014-11-12 08:06:58 +13:00
Chris Forbes
08f50811b0 Merge pull request #6892 from MustaphaTR/d2k-stealth-raider
D2k - Shortened Stealth Raider Code
2014-11-12 08:05:32 +13:00
obrakmann
8dba65cff0 Merge pull request #6930 from baxxxster/bleed
Update AUTHORS, Added Baxxster
2014-11-11 20:03:45 +01:00
Mustafa Alperen Seki
008a416fd8 Update misc.yaml 2014-11-11 09:52:10 +02:00
Mustafa Alperen Seki
6d65519788 Update misc.yaml 2014-11-11 09:30:56 +02:00
Glenn Martin Jensen
164badf4bc Update AUTHORS 2014-11-11 01:28:13 +01:00
Matthias Mailänder
a2f776759b Merge pull request #6912 from reaperrr/ts-tibcolor
Tweak TS tiberium colors and add shadow to blue tib crystal
2014-11-10 21:02:39 +01:00
Paul Chote
7c2cb601f5 Merge pull request #6872 from Mailaender/check-map-rules
Fixed Fort Lonestar and Drop Zone maps and added a test to check map rule loading
2014-11-11 08:35:56 +13:00
Matthias Mailänder
d418afaab9 don't re-use regular multiplayer crates
fixes #6869
2014-11-10 20:20:10 +01:00
Matthias Mailänder
5775fa5e9f add a new lint check for map rule loading 2014-11-10 20:20:05 +01:00
Paul Chote
713ddb7b9c Merge pull request #6718 from huwpascoe/tilebuilder
Fixed DPI scaling issues with tilebuilder
2014-11-10 22:25:35 +13:00
obrakmann
724b1d3f45 Merge pull request #6919 from Mailaender/voxel-barrel-requires
Fixed a crash in WithVoxelBarrel
2014-11-09 13:05:30 +01:00
Matthias Mailänder
d0e908ef91 add missing requires
closes #6914
2014-11-09 07:58:39 +01:00
reaperrr
2043c31e05 Move most palette-related stuff + nuke effect + Immobile trait to Mods.Common 2014-11-09 04:17:02 +01:00
Guido L.
ae4ee0926a AnyUnitsAt: Ignore destroyed Units 2014-11-09 03:15:33 +01:00
reaperrr
4f5e4b26b5 Add shadow to blue tiberium crystal 2014-11-09 03:14:20 +01:00
reaperrr
3a362e5e2f Tweak blue tiberium color 2014-11-09 02:56:11 +01:00
Scott
961782cb21 Merge pull request #6816 from steelphase-forks/bleed-ps-make-version
Update make version to check for git.
2014-11-09 13:17:30 +13:00
steelphase
07d77871d9 Update make to not have issues with pausing at the end. 2014-11-08 19:11:24 -05:00
steelphase
db2a72b475 Update make version to check for git.
This will prevent the version from being set to null if git isn't in the
path.
2014-11-08 19:11:17 -05:00
obrakmann
93bde9f511 Merge pull request #6900 from pchote/fix-gameplay-skipping
Force at least one render per tick during regular gameplay.
2014-11-08 22:43:36 +01:00
obrakmann
11a5a658e2 Merge pull request #6906 from reaperrr/common-10
Moved LoadScreens and some Warheads to Mods.Common
2014-11-08 22:23:44 +01:00
reaperrr
3743fb35a3 Tweaks green tiberium color 2014-11-08 20:47:38 +01:00
Matthias Mailänder
01708b60a7 Merge pull request #6901 from pchote/heightmaps-part-two
Implement terrain heightmaps
2014-11-08 18:22:57 +01:00
atlimit8
1c473ecfac Passengers can grant upgrades to transport. 2014-11-08 02:14:13 -06:00
reaperrr
52bb0e8c6b Move some Warheads to Mods.Common 2014-11-07 15:15:47 +01:00
reaperrr
0807b7009b Move NullLoadScreen, DefaultLoadScreen and LoadWidgetAtGameStart to Mods.Common 2014-11-07 15:13:58 +01:00
Matthias Mailänder
ecc7e44b2e update to MaxMind GeoIP2 .NET version 2.1.0
https://github.com/maxmind/GeoIP2-dotnet/releases/tag/v2.1.0
2014-11-07 09:34:49 +01:00
Matthias Mailänder
2ab8b28bcf Merge pull request #6898 from OpenRA/common-09
Moved remaining two ServerTraits and some Modifiers to Mods.Common
2014-11-07 08:48:40 +01:00
Paul Chote
cfddd47864 Add a new test map. 2014-11-07 19:18:34 +13:00
Paul Chote
118275b376 Add terrain geometry visualisation. 2014-11-07 19:18:34 +13:00
Paul Chote
18f65552a1 Account for terrain height in Viewport. 2014-11-07 19:14:02 +13:00
Paul Chote
55d9e71ff3 Force at least one render per tick during regular gameplay.
Partially reverts #5850, as this feature is a serious usability regression when controlling units. Fixes #6867.
2014-11-07 18:58:56 +13:00
Paul Chote
6527ab21d7 Improve voxel shadow rendering. 2014-11-07 18:18:41 +13:00
Paul Chote
60420340fb Add height map support. 2014-11-07 18:18:41 +13:00
Guido L
70e4462c9f [TS] Add Defence buildings to the AI 2014-11-07 02:04:11 +01:00
reaperrr
cd00fdeacc Moves the remaining two ServerTraits and 3 out of 4 Modifiers to Mods.Common 2014-11-07 00:05:25 +01:00
Matthias Mailänder
3dd93c7ff6 Merge pull request #6889 from atlimit8/ModsCommon-SystemCore
Add System.Core reference to OpenRA.Mods.Common.csproj for Linq
2014-11-06 23:31:57 +01:00
obrakmann
603d700382 Merge pull request #6876 from Mailaender/render-perflog
Measure long TickRender in perf.log
2014-11-06 22:05:49 +01:00
Paul Chote
c66c72dc71 Merge pull request #6888 from obrakmann/fix6887_crash_dialog_on_restart
Prevent crash dialog from popping up when the game restarts
2014-11-07 08:15:45 +13:00
Angusm3
7ea176fe02 Add Angusm3 to AUTHORS 2014-11-06 20:02:36 +01:00
Matthias Mailänder
090ab292f7 Merge pull request #6897 from reaperrr/common-power
Moved Power and PowerdownIndicator effect to Mods.Common
2014-11-06 19:24:44 +01:00
reaperrr
477f5aac94 Move Power and PowerdownIndicator effect to Mods.Common 2014-11-06 18:43:00 +01:00
Matthias Mailänder
ac82e3079a Merge pull request #6710 from huwpascoe/depends
Fixes #3160
Fixes #3568
Fixes #4894
Closes #6701
2014-11-06 10:48:17 +01:00
Matthias Mailänder
c10d5c76d2 Merge pull request #6894 from reaperrr/common06
Moved a few start location/spawn traits to Mods.Common
2014-11-06 10:31:19 +01:00
reaperrr
5aec72ce6d Adds Mods.Common usings where necessary. 2014-11-05 20:46:53 +01:00
reaperrr
488af4b4b9 Moves a few start location/spawn traits to Mods.Common. 2014-11-05 20:46:53 +01:00
Matthias Mailänder
89923d4a45 Merge pull request #6855 from pchote/heightmaps-part-one
Add groundwork for heightmapped terrain.
2014-11-05 09:54:38 +01:00
Mustafa Alperen Seki
292eceb655 Shortened Stealth Raider Code 2014-11-05 10:11:46 +02:00
atlimit8
f2a02be972 Add System.Core reference to OpenRA.Mods.Common.csproj for Linq 2014-11-04 16:30:25 -06:00
obrakmann
85b167dfea Merge pull request #6732 from reaperrr/common-05
Moved a few more traits to Mods.Common
2014-11-04 22:31:56 +01:00
Paul Chote
f0eee47e68 Introduce TerrainTemplatePreviewWidget. 2014-11-05 09:39:55 +13:00
Paul Chote
9f1def2840 Convert TS terrain height, ramp, and minimap colors. 2014-11-05 09:39:55 +13:00
Paul Chote
63f5fc8613 Work around the undesired R8 terrain sprite offsets. 2014-11-05 09:39:55 +13:00
Paul Chote
aab9ad5ac0 Load tmp(ts) ExtraData for cliffs etc. 2014-11-05 09:39:55 +13:00
Paul Chote
c3b6f9bef6 Rename TileTemplate -> TerrainTemplateInfo. 2014-11-05 09:39:55 +13:00
Paul Chote
ab2bc789ce TileSet cleanups. 2014-11-05 09:39:54 +13:00
Paul Chote
7d11649fab Add support for per-tile minimap color and height/ramp type. 2014-11-05 09:39:54 +13:00
Oliver Brakmann
64506b856a Prevent crash dialog from popping up when the game restarts
Fixes #6887
2014-11-04 21:35:56 +01:00
reaperrr
c4d19b77a4 Moves BlocksBullets, DeathSounds, ActorLostNotification, AnnounceOnBuild and AnnounceOnKill to Mods.Common 2014-11-03 20:34:44 +01:00
obrakmann
e6bf1cafd3 Merge pull request #6875 from Mailaender/build-domain-perf-log
Measure BuildDomains in perf.log
2014-11-03 20:31:20 +01:00
Paul Chote
04b2f004d5 Merge pull request #6796 from Mailaender/soviet-01-lua
Added soviet 01 to the Red Alert campaign
2014-11-04 08:06:28 +13:00
Paul Chote
620c986e9f Merge pull request #6733 from penev92/bleed
Moved RenderSprites.cs from Mods.RA to Common
2014-11-04 07:58:35 +13:00
Paul Chote
bd4c22ba96 Merge pull request #6682 from Mailaender/player-settings-ui
Added player name and color selection to Settings menu
2014-11-04 07:54:49 +13:00
obrakmann
b7ccff4cef Merge pull request #6797 from huwpascoe/nunit
NUnit integration
2014-11-03 19:53:04 +01:00
Matthias Mailänder
8a6c5ea85a add soviet-01 2014-11-03 19:53:02 +01:00
obrakmann
2696f8c963 Merge pull request #6766 from huwpascoe/pq-transform-fix
Fixed ProductionQueue freezing Transform
2014-11-03 19:07:46 +01:00
Matthias Mailänder
ea57fa12f1 Merge pull request #6873 from MustaphaTR/ts-crushable
TS  - Added more crushers.
2014-11-03 08:47:33 +01:00
huwpascoe
56551c29c4 Fixed ProductionQueue freezing Transform 2014-11-02 20:34:44 +00:00
huwpascoe
dfc6ebd3ba Introduced NUnit and some tests. 2014-11-02 20:18:04 +00:00
obrakmann
19c1f4ca99 Merge pull request #6877 from Mailaender/spritefont-perf
Measure SpriteFont in perf.log
2014-11-02 18:18:53 +01:00
obrakmann
c21402530e Merge pull request #6868 from Mailaender/network-code-clean
StyleCop cleanup of the Network code
2014-11-02 18:01:10 +01:00
penev92
623642f9d5 Moved RenderSprites.cs from Mods.RA to Common 2014-11-02 18:33:47 +02:00
Oliver Brakmann
eb9cf40c4c Add ReturnToBase to Lua API 2014-11-02 12:51:18 +01:00
Matthias Mailänder
5e5d784a31 unhardcode and self-document 2014-11-02 12:51:18 +01:00
Matthias Mailänder
0049d08356 remove missing .lua files 2014-11-02 12:51:18 +01:00
Paul Chote
78039bde31 Merge pull request #6848 from Mailaender/fmv-sound-polish
Fixed sound overlapping with full motion video clips
2014-11-02 10:42:14 +13:00
Matthias Mailänder
fb0d5036da beautify comment 2014-11-01 22:16:03 +01:00
Paul Chote
17f3b36f97 Merge pull request #6843 from Mailaender/unpolished-map-cull
Removed maps with visual problems
2014-11-02 09:57:46 +13:00
Matthias Mailänder
b28615c2f6 StyleCop clean Order 2014-11-01 21:50:53 +01:00
Matthias Mailänder
a26a9cc3a2 StyleCop clean GenericSelectTarget 2014-11-01 21:48:09 +01:00
Matthias Mailänder
0a06ae1d76 avoid unneccessary spaces 2014-11-01 21:48:09 +01:00
Matthias Mailänder
3f75ff0e00 StyleCop clean Unitorders 2014-11-01 21:48:09 +01:00
Matthias Mailänder
8e667304aa StyleCop clean SyncReport 2014-11-01 21:48:09 +01:00
Matthias Mailänder
7decbdeae0 StyleCop clean Session 2014-11-01 21:48:09 +01:00
Matthias Mailänder
a4b6ddc836 StyleCop clean ReplayRecorderConnection 2014-11-01 21:48:09 +01:00
Matthias Mailänder
6a5d304f07 StyleCop clean FrameData 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7adacc0477 StyleCop clean Connection 2014-11-01 21:46:19 +01:00
Matthias Mailänder
7b22a01fc0 StyleCop clean OrderIO 2014-11-01 21:46:19 +01:00
Matthias Mailänder
95a4248419 StyleCop clean OrderManager 2014-11-01 21:46:19 +01:00
obrakmann
2b6295608a Merge pull request #6689 from huwpascoe/alltech
DevEnableTech now displays from all factions
2014-11-01 21:02:31 +01:00
Matthias Mailänder
44b485606f StyleCop 2014-11-01 16:36:51 +01:00
Matthias Mailänder
83ed06e015 C#ify 2014-11-01 16:35:42 +01:00
Matthias Mailänder
c7f5b24593 use LoadChar 2014-11-01 16:13:54 +01:00
Matthias Mailänder
cf43581bac measure sprite font performance 2014-11-01 16:13:54 +01:00
Matthias Mailänder
d2eafdffb3 Merge pull request #6866 from Phrohdoh/filecleanup
Clean up some chars.
2014-11-01 15:41:53 +01:00
Matthias Mailänder
10edb7a621 also measure render performance bottle necks
closes #4133
2014-11-01 15:33:03 +01:00
Matthias Mailänder
ce357d5314 measure BuildDomains in perf.log 2014-11-01 15:12:36 +01:00
Mustafa Alperen Seki
5fe090ab7f Added more infantry crushers. 2014-11-01 13:47:34 +02:00
Mustafa Alperen Seki
8b4ed823a3 More Crate PowerUps
Update misc.yaml

Update misc.yaml
2014-11-01 13:44:12 +02:00
Taryn Hill
b8f5786bdb Clean up some chars. 2014-10-30 20:34:56 -06:00
obrakmann
2d88a77849 Merge pull request #6861 from ihptru/utility-fix
fixes crash in minimap generator for some of maps
2014-10-30 21:29:36 +01:00
obrakmann
edb309d2cf Merge pull request #6789 from atlimit8/FixRepairBridgeOrderTargeter
Fixed RepairBridgeOrderTargeter & hut logic - it now ignores dangling bridges
2014-10-30 21:25:14 +01:00
ihptru
f971ff11ca fixes crash in minimap generator for some of maps 2014-10-30 22:35:01 +03:00
atlimit8
1ab5b76a3e Fixed RepairBridgeOrderTargeter & hut logic - it now ignores dangling bridges & rejects bridges under repair
Closes #4354
2014-10-30 12:55:20 -05:00
obrakmann
e257b5316c Merge pull request #6456 from Mailaender/remove-belowunits
Removed the BelowUnits trait
2014-10-29 23:49:49 +01:00
huwpascoe
7d973f0192 Added missing trait dependency 2014-10-29 20:53:18 +00:00
Matthias Mailänder
ad7208b18d private readonly elsewhere unused variables 2014-10-29 21:38:33 +01:00
Matthias Mailänder
a3baee9d68 remove BelowUnits
closes #3670
2014-10-29 21:38:30 +01:00
huwpascoe
db126ce1b6 Reimplemented TraitsInConstructOrder() 2014-10-29 20:37:14 +00:00
obrakmann
219151f41f Merge pull request #6851 from atlimit8/BuildingCompleteForProduction
Use INotifyBuildComplete for Production & AnnounceOnBuild
2014-10-29 16:38:20 +01:00
Taryn Hill
e5948ba501 Merge pull request #6852 from pchote/fix-modscommon-xbuild
Copy Mods.Common.dll to the correct location after build.
2014-10-28 14:08:16 -06:00
Matthias Mailänder
9612ee7f0f don't play Battle Control Initialized during FMVs 2014-10-28 20:51:56 +01:00
Paul Chote
7ff7935860 Copy Mods.Common to the correct location after build. 2014-10-29 07:44:40 +13:00
atlimit8
6452b17c82 Made AnnounceOnBuild implement INotifyBuildComplete. 2014-10-28 01:55:18 -05:00
atlimit8
2ad1a5d8dd Extend using INotifyBuildComplete to Production. 2014-10-28 01:54:39 -05:00
Matthias Mailänder
4f919f5f4b remove Year 501
closes #6447
2014-10-28 07:37:10 +01:00
Matthias Mailänder
6f5e25f608 remove map Brimstone 2014-10-28 07:37:10 +01:00
obrakmann
7d98822dcd Merge pull request #6842 from Mailaender/map-scrap
Removed several maps from the Red Alert mod
2014-10-27 21:45:28 +01:00
Matthias Mailänder
18176b1980 remove Convergence and River War maps 2014-10-27 07:00:53 +01:00
obrakmann
0f50d0bf49 Merge pull request #6847 from pchote/fix-utility
Fix the --png utility command.
2014-10-26 22:09:03 +01:00
Paul Chote
646b66e4c3 Merge pull request #6844 from Mailaender/new-d2k-maps
Added new maps to the Dune 2000 mod
2014-10-27 09:28:08 +13:00
Paul Chote
55c4b37412 Merge pull request #6841 from Mailaender/hopes-anchor
Added a new map Hopes Anchor
2014-10-27 09:21:56 +13:00
Paul Chote
87c02adcb5 Fix the --png utility command. Closes #6845. 2014-10-27 09:17:29 +13:00
Matthias Mailänder
5d5bf1459f added Vladimir's Folly
http://resource.openra.net/maps/1639/
2014-10-26 19:45:30 +01:00
Matthias Mailänder
8d6d09a394 added Desert Twister by @psydev
http://resource.openra.net/maps/990
2014-10-26 15:54:02 +01:00
Matthias Mailänder
282f23b082 added Oasis Conquest
http://resource.openra.net/maps/1470
2014-10-26 15:53:45 +01:00
Matthias Mailänder
6f69bf198d remove maps
closes #5458
2014-10-26 15:05:37 +01:00
Matthias Mailänder
9193d9edce add new map Hopes Anchor by @NukemBro
http://resource.openra.net/maps/1368/
2014-10-26 14:50:24 +01:00
Matthias Mailänder
1478822a2f Merge pull request #6836 from pchote/polish-gdi0102
Closes #6757
Closes #6834
2014-10-26 08:02:46 +01:00
Matthias Mailänder
cb7ed7bf61 Merge pull request #6837 from obrakmann/mission-polish
Another mission polish PR
2014-10-26 07:47:47 +01:00
Matthias Mailänder
2215e21def Merge pull request #6740 from Mailaender/tidy-d2k-dll
Tidied the Dune 2000 mod DLL
2014-10-26 07:37:42 +01:00
Paul Chote
99c0d8bd53 Require silos to be captured or destroyed in GDI02. 2014-10-26 13:43:35 +13:00
obrakmann
b9e04211e9 Merge pull request #6838 from pchote/transport-vis-fix
Fix transport passenger shroud revealing
2014-10-26 01:51:41 +02:00
Oliver Brakmann
cb9f186097 Prevent viceroids from appearing in missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
fd8cd4ddea Enable fog in TD missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
1a63a0a167 Fix chat sounds overlapping with playing FMV in missions 2014-10-26 00:38:32 +02:00
Oliver Brakmann
90d517a448 Fix crates in gdi04a/b 2014-10-26 00:38:32 +02:00
Oliver Brakmann
7b1ab34392 Make crates not suck
* allow for crates without any associated CrateActions
* allow for crates to not auto-remove
2014-10-26 00:38:31 +02:00
Paul Chote
3eb05ef23e Don’t reveal shroud at the original transport load point. 2014-10-26 10:01:47 +13:00
obrakmann
c0cfacceb1 Merge pull request #6832 from pchote/disable-bogus-sp-maps
Disable missions that define bogus rules.
2014-10-25 22:41:14 +02:00
Paul Chote
6f7d20681b Polish GDI01:
* Insert initial forces via landing craft.
* Remove unbuildable concrete wall from production palette.
* Fix chat sounds and reinforcement notification overlapping FMV.
* Cut down the excessive starting forces to encourage base building.
* Require Silo capture/destruction for victory.
2014-10-26 09:29:34 +13:00
obrakmann
f94b48459f Merge pull request #6835 from pchote/polish-nod01
Polish nod01
2014-10-25 22:25:46 +02:00
Paul Chote
8b66162e99 Fix landing craft reinforcements in GDI01 and GDI02. 2014-10-26 09:21:43 +13:00
Paul Chote
8e4765ca46 Allow integers to bridge to enums. 2014-10-26 09:19:45 +13:00
Paul Chote
69b561b12c Fix transport cargo visibility in GDI01 and GDI02. 2014-10-26 09:19:45 +13:00
Paul Chote
bb3dc06227 Polish Nod01:
- Script initial unit entry.
- Centre the camera on the initial starting point
- Give additional e3 reinforcements to clear the village.
2014-10-26 09:18:54 +13:00
Paul Chote
91854c52fa Catch and display an error if CallLuaFunc throws. 2014-10-26 09:17:12 +13:00
obrakmann
dd03ce02d3 Merge pull request #6804 from steelphase-forks/bleed-debugging-clean
Update UseVSHostingProcess
2014-10-25 22:05:46 +02:00
Oliver Brakmann
f891b626f3 Document another pitfall in the Lua API 2014-10-25 12:45:16 +02:00
obrakmann
93456fd2ab Merge pull request #6825 from huwpascoe/bike
Balancing: Increased BIKE cost to 600
2014-10-24 22:38:50 +02:00
obrakmann
f12738e42f Merge pull request #6748 from abcdefg30/allies03a
Ported allies-03a
2014-10-24 22:21:41 +02:00
Paul Chote
ab80ce8dd8 Disable missions that define bogus rules. Fixes #6818. 2014-10-25 09:17:07 +13:00
abcdefg30
ff8944d288 Ported allies03a 2014-10-24 20:32:47 +02:00
abcdefg30
3091d2c480 Readded tanyas ability to crush vehicles on allies01 2014-10-24 19:37:24 +02:00
abcdefg30
cc97f45ea4 Removed -classic suffix 2014-10-24 19:37:23 +02:00
Matthias Mailänder
442241b6cd fix Exception: Tried logging to non-existant channel debug 2014-10-24 19:37:22 +02:00
Matthias Mailänder
444b5f92c3 add HEALCRATE and inherit from ^Crate 2014-10-24 19:37:22 +02:00
Matthias Mailänder
f188894a53 Merge pull request #6807 from obrakmann/lua-cleanups
Lua cleanups
2014-10-24 18:29:34 +02:00
Matthias Mailänder
9efa0ceab5 Merge pull request #6823 from pchote/fix-shpts-offsets
Closes #6020
2014-10-23 07:13:22 +02:00
Matthias Mailänder
b901395502 Merge pull request #6824 from pchote/external-editor-templates
Fixes #6812
2014-10-23 07:09:11 +02:00
huwpascoe
07f3523bd4 Balancing: Increased BIKE cost to 600 2014-10-23 01:56:11 +01:00
Paul Chote
fda25a56ca Make the legacy editor more robust against invalid templates. 2014-10-23 10:26:36 +13:00
Paul Chote
62c04b2793 Rewrite shp(ts) parsing to avoid offset issues. Fixes #6822. 2014-10-23 08:14:28 +13:00
obrakmann
fa81fde78a Merge pull request #6814 from steelphase-forks/bleed-slider-thumb
Add chrome for slider thumb.
2014-10-22 09:23:58 +02:00
steelphase
8fe7c71b66 Add chrome for slider thumb.
update hardcoded references to chrome.yaml to use public parameters.
2014-10-21 17:14:55 -04:00
Matthias Mailänder
1bed876540 bring back the player name and color to the settings menu
closes #6380
2014-10-21 23:09:39 +02:00
Matthias Mailänder
cfbdebc371 fix inconsistent naming 2014-10-21 23:04:09 +02:00
Matthias Mailänder
337bcac045 name order these properly 2014-10-21 22:25:14 +02:00
Oliver Brakmann
f55af366f2 Remove more references to old Lua API
Fixes #6811
2014-10-21 22:08:06 +02:00
Oliver Brakmann
4b63b6ef2e Whitespace fixes 2014-10-21 22:08:06 +02:00
Oliver Brakmann
d1af36c189 Point out pitfalls in the Lua API documentation 2014-10-21 22:08:06 +02:00
Oliver Brakmann
35ccc79902 Move Utils.CenterOfCell into Map global 2014-10-21 22:08:06 +02:00
Oliver Brakmann
37c5d51f19 Move Utils.Seconds and .Minutes into DateTime global
Also renames Date.IsHalloween to DateTime.IsHalloween
2014-10-21 22:08:06 +02:00
Oliver Brakmann
6a44c265e2 Made gdi04c easier to win and added cell trigger guards 2014-10-21 22:08:06 +02:00
steelphase
d8e764baac Update UseVSHostingProcess
This shouldn't need to be enabled.
2014-10-20 14:23:04 -04:00
obrakmann
02fabf8ce8 Merge pull request #6800 from pchote/fix-replay-browser
Fix a crash when double-clicking a replay with an unknown map.
2014-10-20 20:15:29 +02:00
Paul Chote
a09cfd7a8f Fix a crash when double-clicking a replay with an unknown map. 2014-10-20 22:55:19 +13:00
huwpascoe
c3514e98eb Fixed DPI scaling issues with tilebuilder 2014-10-19 21:58:22 +01:00
huwpascoe
5d5f302d07 DevEnableTech now displays from all factions 2014-10-19 20:28:29 +01:00
1897 changed files with 132448 additions and 88869 deletions

2
.gitattributes vendored
View File

@@ -1,4 +1,6 @@
# Enforce LF normalization on Windows
*.yaml eol=lf
*.lua eol=lf
* text=lf
# Custom for Visual Studio

10
.gitignore vendored
View File

@@ -12,6 +12,12 @@ obj
*.lastcodeanalysissucceeded
_ReSharper.*/
# movies
*.vqa
# archives
*.mix
# binaries
mods/*/*.dll
mods/*/*.mdb
@@ -22,6 +28,8 @@ mods/*/*.mdb
/*.pdb
/*.mdb
/*.exe
thirdparty/download/*
*.mmdb.gz
# backup files by various editors
*~
@@ -54,9 +62,11 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
DOCUMENTATION.md
Lua-API.md
*.html
openra.6
# StyleCop
*.Cache
StyleCopViolations.xml
# SublimeText
*.sublime-project

View File

@@ -1,28 +1,41 @@
# Travis-CI Build for OpenRA
# see travis-ci.org for details
# Mono/.NET are not officially supported. The following is a workaround.
language: c
language: csharp
mono: 3.12.0
# Make sure build dependencies are installed.
install:
- wget http://download.mono-project.com/repo/xamarin.gpg -O /tmp/mono.gpg
- sudo apt-key add /tmp/mono.gpg
- sudo sh -c "echo 'deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.8.0 main' >> /etc/apt/sources.list.d/mono-xamarin.list"
- sudo apt-get update -qq
- sudo apt-get install -qq mono-gmcs cli-common-dev libgl1-mesa-glx libopenal1 libfreetype6 libgdiplus=2.10-3
cache: apt
# http://docs.travis-ci.com/user/migrating-from-legacy
sudo: false
cache:
directories:
- thirdparty/download
addons:
apt:
packages:
- nsis
- nsis-common
- dpkg
- markdown
# Environment variables
env:
secure: "C0+Hlfa0YGErxUuWV00Tj6p45otC/D3YwYFuLpi2mj1rDFn/4dgh5WRngjvdDBVbXJ3duaZ78jPHWm1jr7vn2jqj9yETsCIK9psWd38ep/FEBM0SDr6MUD89OuXk/YyvxJAE+UXF6bXg7giey09g/CwBigjMW7ynET3wNAWPHPs="
# Fetch dependencies
# Run the build script
# call RALint to check for YAML errors
# Check source code with StyleCop
# call OpenRA to check for YAML errors
script:
- make dependencies
- travis_retry make all-dependencies
- make all
- make check
- make test
# Automatically update the trait documentation and Lua API
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && make docs && cd packaging && ./update-wiki.sh
- test $TRAVIS_PULL_REQUEST == "false" && make docs && cd packaging && ./update-wiki.sh $TRAVIS_BRANCH; cd ..
# Only watch the development branch and tagged release.
branches:
@@ -30,6 +43,7 @@ branches:
- /^release-.*$/
- /^playtest-.*$/
- /^pkgtest-.*$/
- /^prep-.*$/
- bleed
# Notify developers when build passed/failed.
@@ -43,12 +57,7 @@ notifications:
skip_join: true
before_deploy:
- sudo apt-get install nsis markdown dpkg rpm libarchive-dev m4 fakeroot bsdtar
- wget ftp://ftp.archlinux.org/other/pacman/pacman-4.0.3.tar.gz -O /tmp/pacman-4.0.3.tar.gz
- pushd /tmp
- tar -xzvf pacman-4.0.3.tar.gz
- cd pacman-4.0.3 && ./configure --disable-doc --prefix=/usr && make && sudo make install
- popd
- export PATH=$PATH:$HOME/usr/bin
- DOTVERSION=`echo ${TRAVIS_TAG} | sed "s/-/\\./g"`
- cd packaging
- mkdir build
@@ -56,13 +65,11 @@ before_deploy:
deploy:
provider: releases
api_key:
secure: "cMC68erxuf0jb4Pe0sOH4m1f7I2LWPUatD9BC0WeZ9PwTnWOzrm0hnjZIES4TTKVo8WIfZIiCfxpdAFeoh6bomG2MsKwSKMc8qHGhfNGqPnyzYh6zdPZaA+4Q3TDQI3DrziyDnQUFeH1h/7UZLDLxtDrOtcYcGdNg5VjvV9fJ7g="
secure: "g/LU11f+mjqv+lj0sR1UliHwogXL4ofJUwoG5Dbqlvdf5UTLWytw/OWSCv8RGyuh10miyWeaoqHh1cn2C1IFhUEqN1sSeKKKOWOTvJ2FR5mzi9uH3d/MOBzG5icQ7Qh0fZ1YPz5RaJJhYu6bmfvA/1gD49GoaX2kxQL4J5cEBgg="
file:
- build/OpenRA-${TRAVIS_TAG}.exe
- build/OpenRA-${TRAVIS_TAG}.zip
- build/openra_${DOTVERSION}_all.deb
- build/openra-${DOTVERSION}-1-any.pkg.tar.gz
- build/openra-${DOTVERSION}-1.noarch.rpm
skip_cleanup: true
on:
all_branches: true

29
AUTHORS
View File

@@ -3,19 +3,24 @@ hard work of many contributors.
The OpenRA developers are:
* Chris Forbes (chrisf)
* Curtis Shmyr (hamb)
* Igor Popov (ihptru)
* Lukas Franke (abcdefg30)
* Matthias Mailänder (Mailaender)
* Oliver Brakmann (obrakmann)
* Paul Chote (pchote)
* ScottNZ
* Pavel Penev (penev92)
* Reaperrr
* Tom Roostan (RoosterDragon)
Previous developers included:
* Alli Witheford (alzeih)
* Caleb Anderson (RobotCaleb)
* Curtis Shmyr (hamb)
* Daniel Hernandez (Mancano)
* Megan Bowra-Dean (beedee)
* Mike Bundy (kehaar)
* Robert Pepperell (ytinasni)
* ScottNZ
Also thanks to:
* Adam Valy (Tschokky)
@@ -26,30 +31,40 @@ Also thanks to:
* Andrew Perkins
* Andrew Riedi
* Andreas Beck (baxtor)
* Ang Soon Li (asl97)
* Arik Lirette (Angusm3)
* Barnaby Smith (mvi)
* Bellator
* Braxton Williams (Buddytex)
* Bryan Wilbur
* Bugra Cuhadaroglu (BugraC)
* Christer Ulfsparre (Holloweye)
* Chris Grant (Unit158)
* Cody Brittain (Generalcamo)
* D2k Sardaukar
* Daniel Derejvanik (Harisson)
* Danny Keary (Dan9550)
* David Jiménez (Rydra)
* David Russell (DavidARussell)
* DeadlySurprise
* Dmitri Suvorov (suvjunmd)
* Erasmus Schroder (rasco)
* Eric Bajumpaa (SteelPhase)
* Fahrradkette
* Frank Razenberg (zzattack)
* Gareth Needham (Ripley`)
* Glen Anderson (GlenAnderson)
* Glenn Martin Jensen (Baxxster)
* Gordon Martin (Happy0)
* Guido Lipke (LipkeGu)
* Gyula Zimmermann (Graion Dilach)
* Huw Pascoe
* Ian T. Jacobsen (Smilex)
* Igor Popov (ihptru)
* Imago
* Iran
* Jacob Dufault (jacobdufault)
* James Dunne (jsd)
* Jan-Willem Buurlage (jwbuurlage)
* Jason (atlimit8)
* Jeff Harris (jeff_1amstudios)
* Jes
@@ -60,17 +75,18 @@ Also thanks to:
* Kyrre Soerensen (zypres)
* Lawrence Wang
* Lesueur Benjamin (Valkirie)
* Lukas Franke (abcdefg30)
* Maarten Meuris (Nyerguds)
* Mark Olson (markolson)
* Matija Hustic (matija-hustic)
* Matthew Gatland (mgatland)
* Matthew Uzzell (MUzzell)
* Matthijs Benschop (Nerdie)
* Max621
* Max Ugrumov (katzsmile)
* Michael Sztolcman (s1w_)
* Mustafa Alperen Seki (MustaphaTR)
* Neil Shivkar (havok13888)
* Nooze
* Nukem
* Okunev Yu Dmitry (xaionaro)
* Olaf van der Spek
@@ -81,7 +97,6 @@ Also thanks to:
* Psydev
* Raymond Bedrossian (Squiggles211)
* Raymond Martineau (mart0258)
* Reaperrr
* Riderr3
* Rikhardur Bjarni Einarsson (WolfGaming)
* Sascha Biedermann (bidifx)
@@ -92,12 +107,14 @@ Also thanks to:
* Teemu Nieminen (Temeez)
* Tim Mylemans (gecko)
* Tirili
* Tom Roostan (RoosterDragon)
* Tristan Keating (Kilkakon)
* Tristan Mühlbacher (MicroBit)
* Vladimir Komarov (VrKomarov)
* Wuschel
Using GNU FreeFont distributed under the GNU GPL
terms.
Using Simple DirectMedia Layer distributed under
the terms of the zlib license.

View File

@@ -4,7 +4,10 @@
* Have you read the [FAQ](https://github.com/OpenRA/OpenRA/wiki/FAQ)?
* Add the appropriate log files on crashes.
* Mention the version you have tested against.
* Please be specific on how to reproduce the problem.
* Do not submit duplicate issues. Search first.
* Avoid including multiple requests/bugs into a single issue.
## Patches

Binary file not shown.

View File

@@ -6,26 +6,24 @@ The following lists per-platform dependencies required to build from source.
Windows
=======
* [Windows PowerShell >= 4.0](http://microsoft.com/powershell)
* [.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)
* [liblua 5.1 (included)](http://luabinaries.sourceforge.net/download.html)
* [SDL 2](http://www.libsdl.org/download-2.0.php) (included)
* [FreeType](http://gnuwin32.sourceforge.net/packages/freetype.htm) (included)
* [zlib](http://gnuwin32.sourceforge.net/packages/zlib.htm) (included)
* [OpenAL](http://kcat.strangesoft.net/openal.html) (included)
* [liblua 5.1](http://luabinaries.sourceforge.net/download.html) (included)
To compile OpenRA, open the `OpenRA.sln` solution in the main folder,
or build it from the command-line with MSBuild.
You need to fetch the thirdparty dependencies using [NuGet](http://www.nuget.org) and place them at the appropriate places by typing `make dependencies` in a command terminal.
Copy both the native DLLs from `.\thirdparty\windows`
and the CLI images from `.\thirdparty` to the main folder.
To compile OpenRA, open the `OpenRA.sln` solution in the main folder, build it from the command-line with MSBuild or use the Makefile analogue command `make all` scripted in PowerShell syntax.
Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert
or `OpenRA.Game.exe Game.Mod=cnc` for Tiberian Dawn.
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.
Use `make dependencies` to map the native libraries to your system, fetch the remaining CLI dependencies using [NuGet](http://www.nuget.org) and place them at the appropriate places.
To compile OpenRA, run `make all` from the command line.
@@ -38,6 +36,7 @@ Debian/Ubuntu
* mono-dmcs
* libmono-system-windows-forms4.0-cil
* nuget
* cli-common-dev (>= 2.10)
* libfreetype6
* libopenal1
@@ -50,6 +49,7 @@ openSUSE
--------
* mono-devel
* nuget
* openal
* freetype2
* SDL2
@@ -62,6 +62,7 @@ Gentoo
* dev-lang/mono
* dev-dotnet/libgdiplus
* dev-dotnet/nuget
* media-libs/freetype:2
* media-libs/libsdl2
* media-libs/openal

265
Makefile
View File

@@ -1,14 +1,17 @@
############################# INSTRUCTIONS #############################
#
# to compile, run:
# make
# make [DEBUG=false]
#
# to compile with development tools, run:
# make all
# make all [DEBUG=false]
#
# to check the official mods for erroneous yaml files, run:
# make test
#
# to check the official mod dlls for StyleCop violations, run:
# make check
#
# to generate documentation aimed at modders, run:
# make docs
#
@@ -19,7 +22,7 @@
# make [prefix=/foo] [bindir=/bar/bin] install-all
#
# to install Linux startup scripts, desktop files and icons:
# make install-linux-shortcuts
# make install-linux-shortcuts [DEBUG=false]
#
# to uninstall, run:
# make uninstall
@@ -35,9 +38,17 @@
############################## TOOLCHAIN ###############################
#
CSC = dmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.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
CSFLAGS = -nologo -warn:4 -codepage:utf8 -unsafe -warnaserror
DEFINE = TRACE
COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExtensions.dll System.Drawing.dll System.Xml.dll thirdparty/download/ICSharpCode.SharpZipLib.dll thirdparty/download/FuzzyLogicLibrary.dll thirdparty/download/Mono.Nat.dll thirdparty/download/MaxMind.Db.dll thirdparty/download/MaxMind.GeoIP2.dll thirdparty/download/Eluant.dll
DEBUG = true
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
CSFLAGS += -debug:pdbonly -optimize+
else
CSFLAGS += -debug:full -optimize-
DEFINE := DEBUG;$(DEFINE)
endif
@@ -47,6 +58,7 @@ COMMON_LIBS = System.dll System.Core.dll System.Data.dll System.Data.DataSetExte
prefix ?= /usr/local
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
mandir ?= $(datarootdir)/man/
bindir ?= $(prefix)/bin
libdir ?= $(prefix)/lib
gameinstalldir ?= $(libdir)/openra
@@ -67,10 +79,18 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = rsdl2 rnull game utility ralint
TOOLS = editor tsbuild crashdialog
CORE = rsdl2 rnull game utility
TOOLS = gamemonitor
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
# dependencies
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
os-dependencies = osx-dependencies
else
os-dependencies = linux-dependencies
endif
######################## PROGRAM TARGET RULES ##########################
@@ -80,7 +100,7 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
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_LIBS = $(COMMON_LIBS) $(game_DEPS) thirdparty/download/SDL2-CS.dll thirdparty/download/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
@@ -90,7 +110,7 @@ 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)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/download/SDL2-CS.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
@@ -105,14 +125,14 @@ mod_common_SRCS := $(shell find OpenRA.Mods.Common/ -iname '*.cs')
mod_common_TARGET = mods/common/OpenRA.Mods.Common.dll
mod_common_KIND = library
mod_common_DEPS = $(game_TARGET)
mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS)
mod_common_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) thirdparty/download/StyleCop.dll thirdparty/download/StyleCop.CSharp.dll thirdparty/download/StyleCop.CSharp.Rules.dll
PROGRAMS += mod_common
mod_common: $(mod_common_TARGET)
##### Official Mods #####
STD_MOD_LIBS = $(game_TARGET)
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
STD_MOD_DEPS = $(STD_MOD_LIBS)
# Red Alert
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
@@ -127,8 +147,8 @@ mod_ra: $(mod_ra_TARGET)
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_common_TARGET) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_cnc
mod_cnc: $(mod_cnc_TARGET)
@@ -136,8 +156,8 @@ mod_cnc: $(mod_cnc_TARGET)
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_common_TARGET) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_TARGET)
@@ -145,63 +165,59 @@ mod_d2k: $(mod_d2k_TARGET)
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_common_TARGET) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(mod_ra_TARGET)
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET)
PROGRAMS += mod_ts
mod_ts: $(mod_ts_TARGET)
##### Tools #####
check: utility mods
@echo
@echo "Checking for code style violations in OpenRA.Game..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Game
@echo
@echo "Checking for code style violations in OpenRA.Renderer.Null..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Null
@echo
@echo "Checking for code style violations in OpenRA.GameMonitor..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.GameMonitor
@echo
@echo "Checking for code style violations in OpenRA.Mods.Common..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.Common
@echo
@echo "Checking for code style violations in OpenRA.Mods.RA..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.RA
@echo
@echo "Checking for code style violations in OpenRA.Mods.Cnc..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.Cnc
@echo
@echo "Checking for code style violations in OpenRA.Mods.D2k..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.D2k
@echo
@echo "Checking for code style violations in OpenRA.Mods.TS..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Mods.TS
@echo
@echo "Checking for code style violations in OpenRA.Renderer.Sdl2..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Renderer.Sdl2
@echo
@echo "Checking for code style violations in OpenRA.Utility..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Utility
@echo
@echo "Checking for code style violations in OpenRA.Test..."
@mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Test
# Map Editor
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(game_TARGET) $(mod_common_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
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
OpenRA.Editor.Form1.resources:
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
# Analyses mod yaml for easy to detect errors
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 = $(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:
resgen2 OpenRA.TilesetBuilder/frmNew.resx OpenRA.TilesetBuilder.FormNew.resources 1> /dev/null
OpenRA.TilesetBuilder.Surface.resources:
resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null
tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET)
test: utility mods
@echo
@echo "Testing Tiberian Sun mod MiniYAML..."
@mono --debug OpenRA.Utility.exe ts --check-yaml
@echo
@echo "Testing Dune 2000 mod MiniYAML..."
@mono --debug OpenRA.Utility.exe d2k --check-yaml
@echo
@echo "Testing Tiberian Dawn mod MiniYAML..."
@mono --debug OpenRA.Utility.exe cnc --check-yaml
@echo
@echo "Testing Red Alert mod MiniYAML..."
@mono --debug OpenRA.Utility.exe ra --check-yaml
##### Launchers / Utilities #####
@@ -220,11 +236,10 @@ 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
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/download/ICSharpCode.SharpZipLib.dll
PROGRAMS += utility
utility: $(utility_TARGET)
# Patches binary headers to work around a mono bug
fixheader.exe: packaging/fixheader.cs
@echo CSC fixheader.exe
@@ -252,48 +267,62 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
########################## MAKE/INSTALL RULES ##########################
#
default: cli-dependencies core
default: core
core: game renderers mods utility ralint
core: game renderers mods utility
tools: editor tsbuild gamemonitor
tools: gamemonitor
package: dependencies core editor gamemonitor docs version
package: all-dependencies core tools docs version
mods: mod_common mod_ra mod_cnc mod_d2k mod_ts
all: cli-dependencies core tools
all: dependencies core tools
clean:
@-$(RM_F) *.exe *.dll ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_F) *.exe *.dll *.dylib *.dll.config ./OpenRA*/*.dll ./OpenRA*/*.mdb *.mdb mods/**/*.dll mods/**/*.mdb *.resources
@-$(RM_RF) ./*/bin ./*/obj
@-$(RM_RF) ./thirdparty/download
distclean: clean
platformdeps = "linux"
ifeq ($(shell uname),Darwin)
platformdeps = "osx"
endif
dependencies: cli-dependencies native-dependencies
cli-dependencies:
@ $(CP_R) thirdparty/*.dll .
@ $(CP_R) thirdparty/*.dll.config .
@./thirdparty/fetch-thirdparty-deps.sh
@ $(CP_R) thirdparty/download/*.dll .
@ $(CP_R) thirdparty/download/*.dll.config .
@ $(CP) thirdparty/SDL2-CS.dll.config .
native-dependencies:
@ $(CP_R) thirdparty/${platformdeps}/* .
linux-dependencies: cli-dependencies linux-native-dependencies
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/modchooser/mod.yaml
linux-native-dependencies:
@./thirdparty/configure-native-deps.sh
windows-dependencies:
@./thirdparty/fetch-thirdparty-deps-windows.sh
osx-dependencies: cli-dependencies
@./thirdparty/fetch-thirdparty-deps-osx.sh
@ $(CP_R) thirdparty/download/osx/*.dylib .
@ $(CP_R) thirdparty/download/osx/*.dll.config .
dependencies: $(os-dependencies)
@./thirdparty/fetch-geoip-db.sh
@ $(CP) thirdparty/download/GeoLite2-Country.mmdb.gz .
all-dependencies: cli-dependencies windows-dependencies osx-dependencies
version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml mods/ts/mod.yaml mods/modchooser/mod.yaml mods/all/mod.yaml
@for i in $? ; do \
awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \
mv -f $${i}.tmp $${i} ; \
done
# Documentation (d2k depends on all mod libraries)
docs: utility
@mono --debug OpenRA.Utility.exe d2k --docs > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe ra --lua-docs > Lua-API.md
docs: utility mods version
@mono --debug OpenRA.Utility.exe all --docs > DOCUMENTATION.md
@mono --debug OpenRA.Utility.exe all --lua-docs > Lua-API.md
man-page: utility mods
@mono --debug OpenRA.Utility.exe all --man-page > openra.6
install: install-core
@@ -317,7 +346,7 @@ install-core: default
@$(CP_R) mods/modchooser "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_DATA) "global mix database.dat" "$(DATA_INSTALL_DIR)/global mix database.dat"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb"
@$(INSTALL_DATA) "GeoLite2-Country.mmdb.gz" "$(DATA_INSTALL_DIR)/GeoLite2-Country.mmdb.gz"
@$(INSTALL_DATA) AUTHORS "$(DATA_INSTALL_DIR)/AUTHORS"
@$(INSTALL_DATA) COPYING "$(DATA_INSTALL_DIR)/COPYING"
@@ -335,7 +364,7 @@ install-core: default
@$(INSTALL_PROGRAM) Newtonsoft.Json.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) RestSharp.dll "$(DATA_INSTALL_DIR)"
ifeq ($(shell uname),Linux)
ifneq ($(UNAME_S),Darwin)
@$(CP) *.sh "$(DATA_INSTALL_DIR)"
endif
@@ -343,22 +372,40 @@ 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)"
@$(RM) $(DATA_INSTALL_DIR)/OpenRA.TilesetBuilder.exe # TODO: won't work outside the source tree
install-linux-icons:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/icons/"
@$(CP_R) packaging/linux/hicolor/ "$(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-mime:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/mime/packages/"
@$(INSTALL_DATA) packaging/linux/openra-mimeinfo.xml "$(DESTDIR)$(datadir)/mime/packages/openra.xml"
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-join-servers.desktop "$(DESTDIR)$(datadir)/applications"
@$(INSTALL_DATA) packaging/linux/openra-replays.desktop "$(DESTDIR)$(datadir)/applications"
install-linux-appdata:
@$(INSTALL_DIR) "$(DESTDIR)$(datadir)/appdata/"
@$(INSTALL_DATA) packaging/linux/openra.appdata.xml "$(DESTDIR)$(datadir)/appdata/"
install-man-page: man-page
@$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man6/"
@$(INSTALL_DATA) openra.6 "$(DESTDIR)$(mandir)/man6/"
install-linux-scripts:
@echo "#!/bin/sh" > openra
@echo 'cd "$(gameinstalldir)"' >> openra
ifeq ($(DEBUG), $(filter $(DEBUG),false no n off 0))
@echo 'mono OpenRA.Game.exe "$$@"' >> openra
@echo 'if [ $$? != 0 ]' >> openra
else
@echo 'mono --debug OpenRA.Game.exe "$$@"' >> openra
endif
@echo 'if [ $$? != 0 -a $$? != 1 ]' >> openra
@echo 'then' >> openra
@echo 'ZENITY=`which zenity` || echo "OpenRA needs zenity installed to display a graphical error dialog. See ~/.openra. for log files."' >> openra
@echo '$$ZENITY --question --title "OpenRA" --text "OpenRA has encountered a fatal error.\nLog Files are available in ~/.openra." --ok-label "Quit" --cancel-label "View FAQ" || xdg-open https://github.com/OpenRA/OpenRA/wiki/FAQ' >> openra
@@ -369,33 +416,25 @@ install-linux-scripts:
@$(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"
@-$(RM_F) "$(DESTDIR)$(datadir)/mime/packages/openra.xml"
@-$(RM_F) "$(DESTDIR)$(datadir)/appdata/openra.appdata.xml"
@-$(RM_F) "$(DESTDIR)$(mandir)/man6/openra.6"
help:
@echo to compile, run:
@echo \ \ make
@echo \ \ make [DEBUG=false]
@echo
@echo to compile with development tools, run:
@echo \ \ make all
@echo \ \ make all [DEBUG=false]
@echo
@echo to check the official mods for erroneous yaml files, run:
@echo \ \ make test
@@ -410,7 +449,7 @@ help:
@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 \ \ make install-linux-shortcuts [DEBUG=false]
@echo
@echo to uninstall, run:
@echo \ \ make uninstall

View File

@@ -1,90 +0,0 @@
namespace OpenRA.Editor
{
partial class ActorPropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(226, 333);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button2.Enabled = false;
this.button2.Location = new System.Drawing.Point(145, 333);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 0;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.AutoScroll = true;
this.flowLayoutPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.flowLayoutPanel1.Location = new System.Drawing.Point(13, 13);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(288, 314);
this.flowLayoutPanel1.TabIndex = 1;
//
// ActorPropertiesDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(313, 368);
this.Controls.Add(this.flowLayoutPanel1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ActorPropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Actor Properties";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}

View File

@@ -1,48 +0,0 @@
#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.Drawing;
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ActorPropertiesDialog : Form
{
public ActorPropertiesDialog()
{
InitializeComponent();
}
public void AddRow(string name, Control c)
{
flowLayoutPanel1.Controls.Add(new Label
{
Text = name,
Width = flowLayoutPanel1.Width * 3 / 10,
Height = 25,
TextAlign = ContentAlignment.MiddleLeft,
});
c.Width = flowLayoutPanel1.Width * 6 / 10 - 25;
c.Height = 25;
flowLayoutPanel1.Controls.Add(c);
}
public Control MakeEditorControl(Type t, Func<object> getter, Action<object> setter)
{
var r = new TextBox();
r.Text = FieldSaver.FormatValue(getter(), t);
r.LostFocus += (e, _) => setter(FieldLoader.GetValue("<editor internals>", t, r.Text));
r.Enabled = false;
return r;
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,35 +0,0 @@
#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.Drawing;
using OpenRA.Traits;
namespace OpenRA.Editor
{
class ActorTemplate
{
public Bitmap Bitmap;
public ActorInfo Info;
public EditorAppearanceInfo Appearance;
}
class BrushTemplate
{
public Bitmap Bitmap;
public ushort N;
}
class ResourceTemplate
{
public Bitmap Bitmap;
public ResourceTypeInfo Info;
public int Value;
}
}

View File

@@ -1,51 +0,0 @@
#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.Linq;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class ActorTool : ITool
{
ActorTemplate actorTemplate;
public ActorTool(ActorTemplate actor) { this.actorTemplate = actor; }
public void Preview(Surface surface, SGraphics g)
{
surface.DrawActor(g, surface.GetBrushLocation(), actorTemplate,
surface.GetPaletteForPlayer(surface.NewActorOwner));
}
public void Apply(Surface surface)
{
if (surface.Map.Actors.Value.Any(a => a.Value.Location() == surface.GetBrushLocation()))
return;
var owner = surface.NewActorOwner;
var id = NextActorName(surface);
surface.Map.Actors.Value[id] = new ActorReference(actorTemplate.Info.Name.ToLowerInvariant())
{
new LocationInit(surface.GetBrushLocation()),
new OwnerInit(owner)
};
}
static string NextActorName(Surface surface)
{
var id = 0;
for (;;)
{
var possible = "Actor{0}".F(id++);
if (!surface.Map.Actors.Value.ContainsKey(possible)) return possible;
}
}
}
}

View File

@@ -1,121 +0,0 @@
#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.Windows.Forms;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class BrushTool : ITool
{
BrushTemplate brushTemplate;
public BrushTool(BrushTemplate brush) { this.brushTemplate = brush; }
public void Apply(Surface surface)
{
// change the bits in the map
var template = surface.TileSet.Templates[brushTemplate.N];
var tile = surface.TileSetRenderer.Data(brushTemplate.N);
var pos = surface.GetBrushLocation();
if (surface.GetModifiers() == Keys.Shift)
{
FloodFillWithBrush(surface, pos);
return;
}
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
{
var cell = pos + new CVec(u, v);
if (surface.Map.Contains(cell))
{
var z = u + v * template.Size.X;
if (tile[z].Length > 0)
{
var index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z;
surface.Map.MapTiles.Value[cell] = new TerrainTile(brushTemplate.N, index);
}
var ch = new int2((pos.X + u) / Surface.ChunkSize, (pos.Y + v) / Surface.ChunkSize);
if (surface.Chunks.ContainsKey(ch))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
}
}
public void Preview(Surface surface, SGraphics g)
{
g.DrawImage(brushTemplate.Bitmap,
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);
}
void FloodFillWithBrush(Surface s, CPos pos)
{
var queue = new Queue<CPos>();
var replace = s.Map.MapTiles.Value[pos];
var touched = new bool[s.Map.MapSize.X, s.Map.MapSize.Y];
Action<int, int> maybeEnqueue = (x, y) =>
{
var c = new CPos(x, y);
if (s.Map.Contains(c) && !touched[x, y])
{
queue.Enqueue(c);
touched[x, y] = true;
}
};
queue.Enqueue(pos);
while (queue.Count > 0)
{
var p = queue.Dequeue();
if (s.Map.MapTiles.Value[p].Type != replace.Type)
continue;
var a = FindEdge(s, p, new CVec(-1, 0), replace);
var b = FindEdge(s, p, new CVec(1, 0), replace);
for (var x = a.X; x <= b.X; x++)
{
s.Map.MapTiles.Value[new CPos(x, p.Y)] = new TerrainTile(brushTemplate.N, (byte)0);
if (s.Map.MapTiles.Value[new CPos(x, p.Y - 1)].Type == replace.Type)
maybeEnqueue(x, p.Y - 1);
if (s.Map.MapTiles.Value[new CPos(x, p.Y + 1)].Type == replace.Type)
maybeEnqueue(x, p.Y + 1);
}
}
/* TODO: optimize */
foreach (var ch in s.Chunks.Values) ch.Dispose();
s.Chunks.Clear();
}
static CPos FindEdge(Surface s, CPos p, CVec d, TerrainTile replace)
{
for (;;)
{
var q = p + d;
if (!s.Map.Contains(q)) return p;
if (s.Map.MapTiles.Value[q].Type != replace.Type) return p;
p = q;
}
}
}
}

View File

@@ -1,98 +0,0 @@
#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
namespace OpenRA.Editor
{
partial class ErrorListDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(10, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(610, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Your map import completed, but with errors:";
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(13, 30);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(607, 316);
this.listBox1.TabIndex = 1;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(545, 359);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
//
// ErrorListDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 394);
this.Controls.Add(this.button1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ErrorListDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Import Errors";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
}
}

View File

@@ -1,25 +0,0 @@
#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.Collections.Generic;
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ErrorListDialog : Form
{
public ErrorListDialog(IEnumerable<string> errors)
{
InitializeComponent();
foreach (var e in errors)
listBox1.Items.Add(e);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,730 +0,0 @@
#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.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Editor
{
public partial class Form1 : Form
{
public Form1(string[] args)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
currentMod = args.FirstOrDefault() ?? "ra";
toolStripComboBox1.Items.AddRange(ModMetadata.AllMods.Keys.ToArray());
toolStripComboBox1.SelectedIndexChanged += (_, e) =>
{
tilePalette.SuspendLayout();
actorPalette.SuspendLayout();
resourcePalette.SuspendLayout();
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
tilePalette.ResumeLayout();
actorPalette.ResumeLayout();
resourcePalette.ResumeLayout();
surface1.Bind(null, null, null, null, null);
miniMapBox.Image = null;
currentMod = toolStripComboBox1.SelectedItem as string;
Game.modData = new ModData(currentMod);
GlobalFileSystem.LoadFromManifest(Game.modData.Manifest);
Program.Rules = Game.modData.RulesetCache.LoadDefaultRules();
var mod = Game.modData.Manifest.Mod;
Text = "{0} Mod Version: {1} - OpenRA Editor".F(mod.Title, mod.Version);
loadedMapName = null;
};
toolStripComboBox1.SelectedItem = currentMod;
surface1.AfterChange += OnMapChanged;
surface1.MousePositionChanged += s => toolStripStatusLabelMousePosition.Text = s;
surface1.ActorDoubleClicked += ActorDoubleClicked;
if (args.Length >= 2)
LoadMap(args[1]);
}
void OnMapChanged()
{
MakeDirty();
var tileSet = Program.Rules.TileSets[surface1.Map.Tileset];
miniMapBox.Image = Minimap.RenderMapPreview(tileSet, surface1.Map, true);
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
}
void ActorDoubleClicked(KeyValuePair<string, ActorReference> kv)
{
using (var apd = new ActorPropertiesDialog())
{
var name = kv.Key;
apd.AddRow("(Name)", apd.MakeEditorControl(typeof(string), () => name, v => name = (string)v));
apd.AddRow("(Type)", apd.MakeEditorControl(typeof(string), () => kv.Value.Type, v => kv.Value.Type = (string)v));
var objSaved = kv.Value.Save();
// TODO: make this work properly
foreach (var init in Program.Rules.Actors[kv.Value.Type].GetInitKeys())
{
var initName = init.First;
apd.AddRow(initName,
apd.MakeEditorControl(init.Second,
() =>
{
var nodesDict = objSaved.ToDictionary();
return nodesDict.ContainsKey(initName) ? nodesDict[initName].Value : null;
},
_ => { }));
}
apd.ShowDialog();
// TODO: writeback
}
}
void MakeDirty() { dirty = true; }
string loadedMapName;
string currentMod = "ra";
TileSet tileset;
TileSetRenderer tilesetRenderer;
bool dirty = false;
void LoadMap(string mapname)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = mapname;
// load the map
var map = new Map(mapname);
// upgrade maps that have no player definitions. editor doesnt care,
// but this breaks the game pretty badly.
if (map.Players.Count == 0)
map.MakeDefaultPlayers();
PrepareMapResources(Game.modData, map);
// Calculate total net worth of resources in cash
cashToolStripStatusLabel.Text = CalculateTotalResource().ToString();
dirty = false;
}
void NewMap(Map map)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = null;
PrepareMapResources(Game.modData, map);
MakeDirty();
}
// this code is insanely stupid, and mostly my fault -- chrisf
void PrepareMapResources(ModData modData, Map map)
{
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 ImmutablePalette(GlobalFileSystem.Open(tileset.Palette), shadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
var shadowedPalette = new ImmutablePalette(GlobalFileSystem.Open(playerPalette), shadowIndex);
surface1.Bind(map, tileset, tilesetRenderer, palette, shadowedPalette);
// construct the palette of tiles
var palettes = new[] { tilePalette, actorPalette, resourcePalette };
foreach (var p in palettes) { p.Visible = false; p.SuspendLayout(); }
var templateOrder = tileset.EditorTemplateOrder ?? new string[] { };
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => Array.IndexOf(templateOrder, t.Key)))
{
var category = tc.Key ?? "(Uncategorized)";
var categoryHeader = new Label
{
BackColor = SystemColors.Highlight,
ForeColor = SystemColors.HighlightText,
Text = category,
AutoSize = false,
Height = 24,
TextAlign = ContentAlignment.MiddleLeft,
Width = tilePalette.ClientSize.Width,
};
// hook this manually, anchoring inside FlowLayoutPanel is flaky.
tilePalette.Resize += (_, e) => categoryHeader.Width = tilePalette.ClientSize.Width;
if (tilePalette.Controls.Count > 0)
tilePalette.SetFlowBreak(
tilePalette.Controls[tilePalette.Controls.Count - 1], true);
tilePalette.Controls.Add(categoryHeader);
foreach (var t in tc)
{
try
{
var bitmap = tilesetRenderer.RenderTemplate((ushort)t.Key, palette);
var ibox = new PictureBox
{
Image = bitmap,
Width = bitmap.Width / 2,
Height = bitmap.Height / 2,
SizeMode = PictureBoxSizeMode.StretchImage
};
var brushTemplate = new BrushTemplate { Bitmap = bitmap, N = t.Key };
ibox.Click += (_, e) => surface1.SetTool(new BrushTool(brushTemplate));
var template = t.Value;
tilePalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{1}:{0} ({2}x{3})".F(template.Image, template.Id, template.Size.X, template.Size.Y));
}
catch { }
}
}
var actorTemplates = new List<ActorTemplate>();
foreach (var a in Program.Rules.Actors.Keys)
{
try
{
var info = Program.Rules.Actors[a];
if (!info.Traits.Contains<ILegacyEditorRenderInfo>()) continue;
var etf = info.Traits.GetOrDefault<EditorTilesetFilterInfo>();
if (etf != null && etf.ExcludeTilesets != null
&& etf.ExcludeTilesets.Contains(tileset.Id)) continue;
if (etf != null && etf.RequireTilesets != null
&& !etf.RequireTilesets.Contains(tileset.Id)) continue;
var templatePalette = shadowedPalette;
var rsi = info.Traits.GetOrDefault<ILegacyEditorRenderInfo>();
// exception for desert buildings
if (rsi != null && rsi.EditorPalette != null && rsi.EditorPalette.Contains("terrain"))
templatePalette = palette;
var template = RenderUtils.RenderActor(info, tileset, templatePalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ActorTool(template));
actorPalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{0}".F(info.Name));
actorTemplates.Add(template);
}
catch { }
}
surface1.BindActorTemplates(actorTemplates);
var resourceTemplates = new List<ResourceTemplate>();
foreach (var a in Program.Rules.Actors["world"].Traits.WithInterface<ResourceTypeInfo>())
{
try
{
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, shadowedPalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ResourceTool(template));
resourcePalette.Controls.Add(ibox);
tt.SetToolTip(ibox, "{0}:{1}cr".F(template.Info.Name, template.Info.ValuePerUnit));
resourceTemplates.Add(template);
}
catch { }
}
surface1.BindResourceTemplates(resourceTemplates);
foreach (var p in palettes)
{
p.Visible = true;
p.ResumeLayout();
}
miniMapBox.Image = Minimap.RenderMapPreview(tileset, surface1.Map, true);
propertiesToolStripMenuItem.Enabled = true;
toolStripMenuItemProperties.Enabled = true;
resizeToolStripMenuItem.Enabled = true;
toolStripMenuItemResize.Enabled = true;
saveToolStripMenuItem.Enabled = true;
toolStripMenuItemSave.Enabled = true;
saveAsToolStripMenuItem.Enabled = true;
miniMapToPng.Enabled = true;
PopulateActorOwnerChooser();
}
void PopulateActorOwnerChooser()
{
actorOwnerChooser.Items.Clear();
actorOwnerChooser.Items.AddRange(surface1.Map.Players.Values.ToArray());
actorOwnerChooser.SelectedIndex = 0;
surface1.NewActorOwner = ((PlayerReference)actorOwnerChooser.SelectedItem).Name;
}
void ResizeClicked(object sender, EventArgs e)
{
using (var rd = new ResizeDialog())
{
rd.MapWidth.Value = surface1.Map.MapSize.X;
rd.MapHeight.Value = surface1.Map.MapSize.Y;
rd.CordonLeft.Value = surface1.Map.Bounds.Left;
rd.CordonTop.Value = surface1.Map.Bounds.Top;
rd.CordonRight.Value = surface1.Map.Bounds.Right;
rd.CordonBottom.Value = surface1.Map.Bounds.Bottom;
if (DialogResult.OK != rd.ShowDialog())
return;
surface1.Map.ResizeCordon((int)rd.CordonLeft.Value,
(int)rd.CordonTop.Value,
(int)rd.CordonRight.Value,
(int)rd.CordonBottom.Value);
if ((int)rd.MapWidth.Value != surface1.Map.MapSize.X || (int)rd.MapHeight.Value != surface1.Map.MapSize.Y)
{
surface1.Map.Resize((int)rd.MapWidth.Value, (int)rd.MapHeight.Value);
surface1.Bind(surface1.Map, surface1.TileSet, surface1.TileSetRenderer, surface1.Palette, surface1.PlayerPalette); // rebind it to invalidate all caches
}
surface1.Invalidate();
}
}
void SaveClicked(object sender, EventArgs e)
{
if (loadedMapName == null)
SaveAsClicked(sender, e);
else
{
surface1.Map.RequiresMod = currentMod;
surface1.Map.Save(loadedMapName);
dirty = false;
}
}
void SaveAsClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.NewText.ReadOnly = false;
nms.ButtonOkay.Text = "Save";
nms.NewText.Text = "unnamed";
nms.PathOutText.ReadOnly = false;
if (DialogResult.OK == nms.ShowDialog())
{
if (nms.NewText.Text == "")
nms.NewText.Text = "unnamed";
// TODO: Allow the user to choose map format (directory vs oramap)
loadedMapName = Path.Combine(nms.MapFolderPath, nms.NewText.Text + ".oramap");
SaveClicked(sender, e);
}
}
}
void OpenClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.NewText.ReadOnly = true;
nms.PathOutText.ReadOnly = true;
nms.ButtonOkay.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())
LoadMap((string)nms.NewText.Tag);
}
}
void NewClicked(object sender, EventArgs e)
{
using (var nmd = new NewMapDialog())
{
nmd.TheaterBox.Items.Clear();
nmd.TheaterBox.Items.AddRange(Program.Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.TheaterBox.SelectedIndex = 0;
if (DialogResult.OK == nmd.ShowDialog())
{
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,
(int)nmd.CordonRight.Value, (int)nmd.CordonBottom.Value);
map.Players.Clear();
map.MakeDefaultPlayers();
map.FixOpenAreas(Program.Rules);
NewMap(map);
}
}
}
void PropertiesClicked(object sender, EventArgs e)
{
using (var pd = new PropertiesDialog())
{
pd.TitleBox.Text = surface1.Map.Title;
pd.DescBox.Text = surface1.Map.Description;
pd.AuthorBox.Text = surface1.Map.Author;
pd.SelectableCheckBox.Checked = surface1.Map.Selectable;
pd.ShellmapCheckBox.Checked = surface1.Map.UseAsShellmap;
if (DialogResult.OK != pd.ShowDialog())
return;
surface1.Map.Title = pd.TitleBox.Text;
surface1.Map.Description = pd.DescBox.Text;
surface1.Map.Author = pd.AuthorBox.Text;
surface1.Map.Selectable = pd.SelectableCheckBox.Checked;
surface1.Map.UseAsShellmap = pd.ShellmapCheckBox.Checked;
}
}
void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = true; }
void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = false; }
void CloseClicked(object sender, EventArgs e)
{
Close();
}
void OnFormClosing(object sender, FormClosingEventArgs e)
{
if (!dirty) return;
switch (MessageBox.Show("The map has been modified since it was last saved. " + "\r\n" + "Save changes now?",
"Unsaved Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation))
{
case DialogResult.Yes: SaveClicked(null, EventArgs.Empty); break;
case DialogResult.No: break;
case DialogResult.Cancel: e.Cancel = true; break;
}
}
void ExportMinimap(object sender, EventArgs e)
{
using (var sfd = new SaveFileDialog()
{
InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps"),
DefaultExt = "*.png",
Filter = "PNG Image (*.png)|*.png",
Title = "Export Minimap to PNG",
FileName = Path.ChangeExtension(loadedMapName, ".png"),
RestoreDirectory = true
})
if (DialogResult.OK == sfd.ShowDialog())
miniMapBox.Image.Save(sfd.FileName);
}
void ShowActorNamesClicked(object sender, EventArgs e)
{
showActorNamesToolStripMenuItem.Checked ^= true;
toolStripMenuItemShowActorNames.Checked ^= true;
surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked;
}
void ShowGridClicked(object sender, EventArgs e)
{
showGridToolStripMenuItem.Checked ^= true;
toolStripMenuItemShowGrid.Checked ^= true;
surface1.ShowGrid = showGridToolStripMenuItem.Checked;
surface1.Chunks.Clear();
}
void FixOpenAreas(object sender, EventArgs e)
{
dirty = true;
surface1.Map.FixOpenAreas(Program.Rules);
surface1.Chunks.Clear();
surface1.Invalidate();
}
void SetupDefaultPlayers(object sender, EventArgs e)
{
dirty = true;
surface1.Map.Players.Clear();
surface1.Map.MakeDefaultPlayers();
surface1.Chunks.Clear();
surface1.Invalidate();
PopulateActorOwnerChooser();
}
void DrawPlayerListItem(object sender, DrawItemEventArgs e)
{
// color block
var player = e.Index >= 0 ? (PlayerReference)((ComboBox)sender).Items[e.Index] : null;
e.DrawBackground();
e.DrawFocusRectangle();
if (player == null)
return;
var color = player.Color.RGB;
using (var brush = new SolidBrush(color))
e.Graphics.FillRectangle(brush, e.Bounds.Left + 2, e.Bounds.Top + 2, e.Bounds.Height + 6, e.Bounds.Height - 4);
using (var foreBrush = new SolidBrush(e.ForeColor))
e.Graphics.DrawString(player.Name, e.Font, foreBrush, e.Bounds.Left + e.Bounds.Height + 12, e.Bounds.Top);
}
void OnSelectedPlayerChanged(object sender, EventArgs e)
{
var player = actorOwnerChooser.SelectedItem as PlayerReference;
surface1.NewActorOwner = player.Name;
}
void CopySelectionToolStripMenuItemClick(object sender, EventArgs e)
{
surface1.CopySelection();
}
void OpenRAWebsiteToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.openra.net");
}
void OpenRAResourcesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://resource.openra.net");
}
void WikiDocumentationToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://wiki.openra.net");
}
void DiscussionForumsToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://www.sleipnirstuff.com/forum/viewforum.php?f=80");
}
void IssueTrackerToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://bugs.openra.net");
}
void DeveloperBountiesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.bountysource.com/trackers/36085-openra");
}
void SourceCodeToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA");
}
void AboutToolStripMenuItemClick(object sender, EventArgs e)
{
MessageBox.Show("OpenRA and OpenRA Editor are Free/Libre Open Source Software released under the GNU General Public License version 3. See AUTHORS and COPYING for details.",
"About",
MessageBoxButtons.OK,
MessageBoxIcon.Asterisk);
}
void HelpToolStripButton_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("http://wiki.openra.net/Mapping");
}
void ToolStripMenuItemNewClick(object sender, EventArgs e)
{
NewClicked(sender, e);
}
void ToolStripMenuItemOpenClick(object sender, EventArgs e)
{
OpenClicked(sender, e);
}
void ToolStripMenuItemSaveClick(object sender, EventArgs e)
{
SaveClicked(sender, e);
}
void ToolStripMenuItemPropertiesClick(object sender, EventArgs e)
{
PropertiesClicked(sender, e);
}
void ToolStripMenuItemResizeClick(object sender, EventArgs e)
{
ResizeClicked(sender, e);
}
void ToolStripMenuItemShowActorNamesClick(object sender, EventArgs e)
{
ShowActorNamesClicked(sender, e);
}
void ToolStripMenuItemFixOpenAreasClick(object sender, EventArgs e)
{
FixOpenAreas(sender, e);
}
void ToolStripMenuItemSetupDefaultPlayersClick(object sender, EventArgs e)
{
SetupDefaultPlayers(sender, e);
}
void ToolStripMenuItemCopySelectionClick(object sender, EventArgs e)
{
CopySelectionToolStripMenuItemClick(sender, e);
}
void ToolStripMenuItemShowGridClick(object sender, EventArgs e)
{
ShowGridClicked(sender, e);
}
public int CalculateTotalResource()
{
var totalResource = 0;
for (var i = 0; i < surface1.Map.MapSize.X; i++)
for (var j = 0; j < surface1.Map.MapSize.Y; j++)
{
var cell = new CPos(i, j);
if (surface1.Map.MapResources.Value[cell].Type != 0)
totalResource += GetResourceValue(i, j);
}
return totalResource;
}
int GetAdjecentCellsWith(int resourceType, int x, int y)
{
var sum = 0;
for (var u = -1; u < 2; u++)
for (var v = -1; v < 2; v++)
{
var cell = new CPos(x + u, y + v);
if (!surface1.Map.Contains(cell))
continue;
if (surface1.Map.MapResources.Value[cell].Type == resourceType)
++sum;
}
return sum;
}
int GetResourceValue(int x, int y)
{
var imageLength = 0;
var type = surface1.Map.MapResources.Value[new CPos(x, y)].Type;
var template = surface1.ResourceTemplates.FirstOrDefault(a => a.Value.Info.ResourceType == type).Value;
if (type == 1)
imageLength = 12;
else if (type == 2)
imageLength = 3;
var density = (GetAdjecentCellsWith(type, x, y) * imageLength - 1) / 9;
var value = template.Info.ValuePerUnit;
return density * value;
}
void ZoomInToolStripButtonClick(object sender, System.EventArgs e)
{
if (surface1.Map == null) return;
surface1.Zoom /= .75f;
surface1.Invalidate();
}
void ZoomOutToolStripButtonClick(object sender, System.EventArgs e)
{
if (surface1.Map == null) return;
surface1.Zoom *= .75f;
surface1.Invalidate();
}
void PanToolStripButtonClick(object sender, System.EventArgs e)
{
panToolStripButton.Checked ^= true;
surface1.IsPanning = panToolStripButton.Checked;
}
void ShowRulerToolStripMenuItemClick(object sender, EventArgs e)
{
showRulerToolStripMenuItem.Checked ^= true;
showRulerToolStripItem.Checked ^= true;
surface1.ShowRuler = showRulerToolStripMenuItem.Checked;
surface1.Chunks.Clear();
}
void ShowRulerToolStripItemClick(object sender, System.EventArgs e)
{
ShowRulerToolStripMenuItemClick(sender, e);
}
void EraserToolStripButtonClick(object sender, System.EventArgs e)
{
eraserToolStripButton.Checked ^= true;
surface1.IsErasing = eraserToolStripButton.Checked;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +0,0 @@
#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 SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
interface ITool
{
void Apply(Surface surface);
void Preview(Surface surface, SGraphics g);
}
}

View File

@@ -1,319 +0,0 @@
#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
namespace OpenRA.Editor
{
partial class MapSelect
{
// TODO:
private System.ComponentModel.IContainer components = null;
// TODO:
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
// TODO:
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect));
this.MapList = new System.Windows.Forms.ListView();
this.ColumnMapName = new System.Windows.Forms.ColumnHeader("(none)");
this.MapIconsList = new System.Windows.Forms.ImageList(this.components);
this.ButtonCancel = new System.Windows.Forms.Button();
this.ButtonOkay = new System.Windows.Forms.Button();
this.NewLabel = new System.Windows.Forms.Label();
this.NewText = new System.Windows.Forms.TextBox();
this.MiniMapBox = new System.Windows.Forms.PictureBox();
this.BottomPanel = new System.Windows.Forms.Panel();
this.PathOutText = new System.Windows.Forms.TextBox();
this.PathOutLabel = new System.Windows.Forms.Label();
this.PathLabel = new System.Windows.Forms.Label();
this.SplitContainer1 = new System.Windows.Forms.SplitContainer();
this.MapListLabel = new System.Windows.Forms.Label();
this.DescTxt = new System.Windows.Forms.TextBox();
this.DescLabel = new System.Windows.Forms.Label();
this.TheaterText = new System.Windows.Forms.TextBox();
this.TheaterLabel = new System.Windows.Forms.Label();
this.AuthorText = new System.Windows.Forms.TextBox();
this.AuthorLabel = new System.Windows.Forms.Label();
this.TitleText = new System.Windows.Forms.TextBox();
this.MapNameLabel = new System.Windows.Forms.Label();
this.MiniMapLabel = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)this.MiniMapBox).BeginInit();
this.BottomPanel.SuspendLayout();
this.SplitContainer1.Panel1.SuspendLayout();
this.SplitContainer1.Panel2.SuspendLayout();
this.SplitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)this.pictureBox1).BeginInit();
this.SuspendLayout();
this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.ColumnMapName });
this.MapList.FullRowSelect = true;
this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.MapList.LargeImageList = this.MapIconsList;
this.MapList.Location = new System.Drawing.Point(15, 25);
this.MapList.MultiSelect = false;
this.MapList.Name = "MapList";
this.MapList.Size = new System.Drawing.Size(273, 294);
this.MapList.SmallImageList = this.MapIconsList;
this.MapList.StateImageList = this.MapIconsList;
this.MapList.TabIndex = 0;
this.MapList.UseCompatibleStateImageBehavior = false;
this.MapList.View = System.Windows.Forms.View.Details;
this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged);
this.ColumnMapName.Text = "Map name";
this.ColumnMapName.Width = 240;
this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24);
this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent;
this.ButtonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.ButtonCancel.Location = new System.Drawing.Point(407, 35);
this.ButtonCancel.Name = "btnCancel";
this.ButtonCancel.Size = new System.Drawing.Size(75, 23);
this.ButtonCancel.TabIndex = 3;
this.ButtonCancel.Text = "Cancel";
this.ButtonCancel.UseVisualStyleBackColor = true;
this.ButtonOkay.DialogResult = System.Windows.Forms.DialogResult.OK;
this.ButtonOkay.Location = new System.Drawing.Point(326, 35);
this.ButtonOkay.Name = "btnOk";
this.ButtonOkay.Size = new System.Drawing.Size(75, 23);
this.ButtonOkay.TabIndex = 2;
this.ButtonOkay.Text = "Open";
this.ButtonOkay.UseVisualStyleBackColor = true;
this.NewLabel.AutoSize = true;
this.NewLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)204);
this.NewLabel.Location = new System.Drawing.Point(12, 40);
this.NewLabel.Name = "lblNew";
this.NewLabel.Size = new System.Drawing.Size(69, 13);
this.NewLabel.TabIndex = 3;
this.NewLabel.Text = "Map name:";
this.NewText.BackColor = System.Drawing.SystemColors.Window;
this.NewText.Location = new System.Drawing.Point(88, 37);
this.NewText.Name = "txtNew";
this.NewText.ReadOnly = true;
this.NewText.Size = new System.Drawing.Size(232, 20);
this.NewText.TabIndex = 1;
this.MiniMapBox.BackColor = System.Drawing.Color.Black;
this.MiniMapBox.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.MiniMapBox.Location = new System.Drawing.Point(32, 25);
this.MiniMapBox.Name = "pbMinimap";
this.MiniMapBox.Size = new System.Drawing.Size(124, 124);
this.MiniMapBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.MiniMapBox.TabIndex = 5;
this.MiniMapBox.TabStop = false;
this.BottomPanel.Controls.Add(this.pictureBox1);
this.BottomPanel.Controls.Add(this.PathOutText);
this.BottomPanel.Controls.Add(this.PathOutLabel);
this.BottomPanel.Controls.Add(this.PathLabel);
this.BottomPanel.Controls.Add(this.ButtonCancel);
this.BottomPanel.Controls.Add(this.ButtonOkay);
this.BottomPanel.Controls.Add(this.NewText);
this.BottomPanel.Controls.Add(this.NewLabel);
this.BottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
this.BottomPanel.Location = new System.Drawing.Point(0, 332);
this.BottomPanel.MaximumSize = new System.Drawing.Size(0, 70);
this.BottomPanel.Name = "pnlBottom";
this.BottomPanel.Size = new System.Drawing.Size(494, 70);
this.BottomPanel.TabIndex = 6;
this.PathOutText.BackColor = System.Drawing.SystemColors.Window;
this.PathOutText.Location = new System.Drawing.Point(55, 10);
this.PathOutText.Name = "txtPathOut";
this.PathOutText.ReadOnly = true;
this.PathOutText.Size = new System.Drawing.Size(265, 20);
this.PathOutText.TabIndex = 0;
this.PathOutText.TextChanged += new System.EventHandler(this.PathOutTextChanged);
this.PathOutLabel.AutoSize = true;
this.PathOutLabel.Location = new System.Drawing.Point(55, 13);
this.PathOutLabel.Name = "lblPathOut";
this.PathOutLabel.Size = new System.Drawing.Size(0, 13);
this.PathOutLabel.TabIndex = 6;
this.PathLabel.AutoSize = true;
this.PathLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)204);
this.PathLabel.Location = new System.Drawing.Point(12, 13);
this.PathLabel.Name = "lblPath";
this.PathLabel.Size = new System.Drawing.Size(37, 13);
this.PathLabel.TabIndex = 5;
this.PathLabel.Text = "Path:";
this.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SplitContainer1.Location = new System.Drawing.Point(0, 0);
this.SplitContainer1.Name = "splitContainer1";
this.SplitContainer1.Panel1.Controls.Add(this.MapListLabel);
this.SplitContainer1.Panel1.Controls.Add(this.MapList);
this.SplitContainer1.Panel2.Controls.Add(this.DescTxt);
this.SplitContainer1.Panel2.Controls.Add(this.DescLabel);
this.SplitContainer1.Panel2.Controls.Add(this.TheaterText);
this.SplitContainer1.Panel2.Controls.Add(this.TheaterLabel);
this.SplitContainer1.Panel2.Controls.Add(this.AuthorText);
this.SplitContainer1.Panel2.Controls.Add(this.AuthorLabel);
this.SplitContainer1.Panel2.Controls.Add(this.TitleText);
this.SplitContainer1.Panel2.Controls.Add(this.MapNameLabel);
this.SplitContainer1.Panel2.Controls.Add(this.MiniMapLabel);
this.SplitContainer1.Panel2.Controls.Add(this.MiniMapBox);
this.SplitContainer1.Size = new System.Drawing.Size(494, 332);
this.SplitContainer1.SplitterDistance = 300;
this.SplitContainer1.TabIndex = 7;
this.MapListLabel.AutoSize = true;
this.MapListLabel.Location = new System.Drawing.Point(12, 9);
this.MapListLabel.Name = "lblMapList";
this.MapListLabel.Size = new System.Drawing.Size(81, 13);
this.MapListLabel.TabIndex = 1;
this.MapListLabel.Text = "Available maps:";
this.DescTxt.BackColor = System.Drawing.SystemColors.ButtonFace;
this.DescTxt.Location = new System.Drawing.Point(16, 289);
this.DescTxt.Name = "txtDesc";
this.DescTxt.ReadOnly = true;
this.DescTxt.Size = new System.Drawing.Size(162, 20);
this.DescTxt.TabIndex = 14;
this.DescLabel.AutoSize = true;
this.DescLabel.Location = new System.Drawing.Point(13, 273);
this.DescLabel.Name = "lblDesc";
this.DescLabel.Size = new System.Drawing.Size(63, 13);
this.DescLabel.TabIndex = 13;
this.DescLabel.Text = "Description:";
this.TheaterText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.TheaterText.Location = new System.Drawing.Point(16, 252);
this.TheaterText.Name = "txtTheater";
this.TheaterText.ReadOnly = true;
this.TheaterText.Size = new System.Drawing.Size(162, 20);
this.TheaterText.TabIndex = 12;
this.TheaterLabel.AutoSize = true;
this.TheaterLabel.Location = new System.Drawing.Point(13, 236);
this.TheaterLabel.Name = "lblTheater";
this.TheaterLabel.Size = new System.Drawing.Size(47, 13);
this.TheaterLabel.TabIndex = 11;
this.TheaterLabel.Text = "Tileset:";
this.AuthorText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.AuthorText.Location = new System.Drawing.Point(16, 214);
this.AuthorText.Name = "txtAuthor";
this.AuthorText.ReadOnly = true;
this.AuthorText.Size = new System.Drawing.Size(162, 20);
this.AuthorText.TabIndex = 10;
this.AuthorLabel.AutoSize = true;
this.AuthorLabel.Location = new System.Drawing.Point(13, 198);
this.AuthorLabel.Name = "lblAuthor";
this.AuthorLabel.Size = new System.Drawing.Size(41, 13);
this.AuthorLabel.TabIndex = 9;
this.AuthorLabel.Text = "Author:";
this.TitleText.BackColor = System.Drawing.SystemColors.ButtonFace;
this.TitleText.Location = new System.Drawing.Point(16, 177);
this.TitleText.Name = "txtTitle";
this.TitleText.ReadOnly = true;
this.TitleText.Size = new System.Drawing.Size(162, 20);
this.TitleText.TabIndex = 8;
this.MapNameLabel.AutoSize = true;
this.MapNameLabel.Location = new System.Drawing.Point(13, 161);
this.MapNameLabel.Name = "lblMapName";
this.MapNameLabel.Size = new System.Drawing.Size(30, 13);
this.MapNameLabel.TabIndex = 7;
this.MapNameLabel.Text = "Title:";
this.MiniMapLabel.AutoSize = true;
this.MiniMapLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)204);
this.MiniMapLabel.Location = new System.Drawing.Point(29, 9);
this.MiniMapLabel.Name = "lblMinimap";
this.MiniMapLabel.Size = new System.Drawing.Size(71, 13);
this.MiniMapLabel.TabIndex = 6;
this.MiniMapLabel.Text = "Map preview:";
this.pictureBox1.Image = (System.Drawing.Image)resources.GetObject("pictureBox1.Image");
this.pictureBox1.Location = new System.Drawing.Point(336, -9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(54, 35);
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
this.AcceptButton = this.ButtonOkay;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.ButtonCancel;
this.ClientSize = new System.Drawing.Size(494, 402);
this.Controls.Add(this.SplitContainer1);
this.Controls.Add(this.BottomPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MapSelect";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Select map";
this.Load += new System.EventHandler(this.MapSelect_Load);
((System.ComponentModel.ISupportInitialize)this.MiniMapBox).EndInit();
this.BottomPanel.ResumeLayout(false);
this.BottomPanel.PerformLayout();
this.SplitContainer1.Panel1.ResumeLayout(false);
this.SplitContainer1.Panel1.PerformLayout();
this.SplitContainer1.Panel2.ResumeLayout(false);
this.SplitContainer1.Panel2.PerformLayout();
this.SplitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)this.pictureBox1).EndInit();
this.ResumeLayout(false);
}
public System.Windows.Forms.ListView MapList;
public System.Windows.Forms.Button ButtonCancel;
public System.Windows.Forms.Button ButtonOkay;
public System.Windows.Forms.Label NewLabel;
public System.Windows.Forms.TextBox NewText;
public System.Windows.Forms.ColumnHeader ColumnMapName;
public System.Windows.Forms.ImageList MapIconsList;
public System.Windows.Forms.PictureBox MiniMapBox;
public System.Windows.Forms.Panel BottomPanel;
public System.Windows.Forms.SplitContainer SplitContainer1;
public System.Windows.Forms.Label MiniMapLabel;
public System.Windows.Forms.TextBox TheaterText;
public System.Windows.Forms.Label TheaterLabel;
public System.Windows.Forms.TextBox AuthorText;
public System.Windows.Forms.Label AuthorLabel;
public System.Windows.Forms.TextBox TitleText;
public System.Windows.Forms.Label MapNameLabel;
public System.Windows.Forms.TextBox DescTxt;
public System.Windows.Forms.Label DescLabel;
public System.Windows.Forms.Label MapListLabel;
public System.Windows.Forms.Label PathOutLabel;
public System.Windows.Forms.Label PathLabel;
public System.Windows.Forms.TextBox PathOutText;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@@ -1,92 +0,0 @@
#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.Linq;
using System.Windows.Forms;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public partial class MapSelect : Form
{
public string MapFolderPath;
public bool DirectoryIsEmpty(string path)
{
return !Directory.GetFileSystemEntries(path).Any();
}
public MapSelect(string currentMod)
{
MapFolderPath = Platform.ResolvePath("^", "maps", currentMod);
if (!Directory.Exists(MapFolderPath))
Directory.CreateDirectory(MapFolderPath);
InitializeComponent();
MapIconsList.Images.Add(pictureBox1.Image);
}
void MapSelect_Load(object sender, EventArgs e)
{
MapList.Items.Clear();
PathOutText.Text = MapFolderPath;
if (DirectoryIsEmpty(MapFolderPath))
return;
foreach (var map in MapCache.FindMapsIn(MapFolderPath))
{
var map1 = new ListViewItem();
map1.Tag = map;
map1.Text = Path.GetFileNameWithoutExtension(map);
map1.ImageIndex = 0;
MapList.Items.Add(map1);
}
// hack
if (NewText.Text != "unnamed")
MapList.Items[0].Selected = true;
}
void MapList_SelectedIndexChanged(object sender, EventArgs e)
{
if (MapList.SelectedItems.Count == 1)
{
NewText.Text = MapList.SelectedItems[0].Text;
NewText.Tag = MapList.SelectedItems[0].Tag;
var map = new Map((string)NewText.Tag);
TitleText.Text = map.Title;
AuthorText.Text = map.Author;
TheaterText.Text = map.Tileset;
DescTxt.Text = map.Description;
MiniMapBox.Image = null;
try
{
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);
}
}
}
void PathOutTextChanged(object sender, EventArgs e)
{
MapFolderPath = PathOutText.Text;
}
}
}

View File

@@ -1,177 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="MapIconsList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAArjSURBVFhHrVcJUFRXFmVpkE0Wg0ZEMoIBl8RodGSMmVES
R0NiChVxCyIIAmFfhe6maeh9AZodZHFpUFQWcQmKisiuLKLEKFFEcIuljtZMYmI5Uc/c14EZYyapmpq8
qlP/9/+/373v3HPu+19P7/cf+jSlEWHCOEuzZfNn2Yvo3Pj3D/PTjCwYAwtgyeFwFk163Tos2tvtWJZw
zeUjmYFP6vL9fhw31vRPI8/9LnmMrtCWZhtPcJ7hbC/W8DwfnS0LR0t5NKoFazHcqsaprE3YGbMQLrYW
W/7fBAxogjGEd5wcXuPK4jxa60qD75VrfIbKMrYMD7VlPX/Ul49rp8RoyPbFIaEnhpuU6NRGoVa2HKuX
zEj/X8vAVmlIsDY2Nna2sjBd+ee5b7Yq4tfgfm8a7pxNw60OFa6e4uFmhxr/uFSIexfz0VsZh7PaIJzb
F42u8hAcV2/ANz3KF8Hub52kucb+Fv+jAccbm5quWOfxYX5y6Mcnq/IDh1oreX/vOcx9drdbjTudUgye
Tsb1piT0H4/DACUw0JiEh33ZePhlFi7UxOCLtI1o2x6IW2cUqM/egLtdediV9MnjSTYm60bE+Ys8rMzN
zd1c3/vLgVRV3lN1XjkqyzNoNaEUjIvrLXwMtQsw1JqEy/UxuHg0DJcp+KXj8bh0IobOucSGDA8vpqE6
+VNINixBU0kQbp5JJ8jxDSXdeyAE5arlAxTZ/BfRra2tS8Tqwh9L9tQhq6gSabm7odLkoP8oF90V/rjR
LsRgExc32oS40ZFCiQgw2Mgj+gW42pBI4OPSsUh6Jgn1mX4ojXJH865IXDzCx50uDe6fV+P8oQQ4Tx6r
pOATmVteKgdjXu/Mhk1h328rO4TMwn3gp2YhmquEX7gAfYfjcb4qGH0HQ3D5WAiunU7ApfpofH0ymhIS
UwkSqQRb6VoYvm6IZvXG7W4VBVbjwQU1/tanIQZkGDqtwOmSjzHXxXaLsZnZpy85QpdAnfunax/mllRD
ma2FQJyHxORMJAqzwBVpUJgtRLF8E7bxlqKjzA991QEYaIijgFwMt6VggJK60hCFr46F4sqprbjbLaf6
S0icIh1rwy1i3OvNQff+GEgj3r87/c1JLIGfjX1LP/F6KJDlIy1vN4SyQohVRdAU7IVIXQxuSiZ8/OOw
JYyP8EiqfV04Lh2JoHIwMSbiwoFgtO1ah97aTSTMKGIjDl/WhONWl5jKlYrbZ9OJGRWVIg/+axf8SK5a
8WoC5fPm//l2qqIIOaVVECm3QZG5C7L0HZCklYJLTCQKNUiWFYAnykJYRDRaywNxrTGRyhKNKyciiIEY
dFd743z1ZioT6eJkHK41kXDbRFSKbHzTpcJwsxoHc71fTLGzyBix+L/zUFlaWX+VTcFZ4NzSamQXV1Lw
EggkeeBRAsnSfKgyy6DKKcNnxEahIgRfHg5B/7EoDDYn4ma7FD0VAThfG4Cemi3EDI90IKWVq3GbHHKz
nUpCbrh6QokEr5mPTEw4773MQij9aPZY5fNYrC6hEhRAnrkTjJEkcS5ieWokS/IhUZdCrtlJbGQiIjQQ
/YeD0VMVhoTVbmgs8iVBctG11xtdlUHkDGpQpIN7velUAhmG2+W43spclI6K9JWY6TyxlGKOGxWjG53s
5HBMBpZ7+iI6UY44vhoiVTH4ohxCLoTyArqu1OlBll6CZHE20mI9EOjuis3L5uFCbTh6D4Wgu8offYeC
qSRccgcPD/qyMEiBb55VYahFgSuNckhjlr2YaGMqH2ntOiKmEAQGBgbnNviGPg2LFSM4UoiAUD78ghLo
yEVojBhRiQqEx0nAI5sKiBH/z+OgVfuic7c/Lh+NwZndfughDfQdCtL1hKFmEW51ymn1EjpSAh1ytFCL
Pl+nhKebY8XLTYn16DWEgzY2ttdzyI6yjB06+uP4acRANokvhzRRjBR5oe4aN4WupeYgNCIWZ2vj0b17
I/UKf3Tt34jOis9otTyyILmkORUDTRKyqxj9DSI07Y0k26Yhes38Roo3YVQH7OVhGiGR0K7O0epEqCRB
shKwRIQkQrZqMelAIM6ncihII9uQSCXZEi2HSMjDXvVqXKSGdTLbg6z6OVkwGcfLQvHB4jkYbJMS/UL0
1aeSM6So1Hg/oljTR93AupEVYSXhGE+soZa8X+cIlgALzFhg5/HJ6YhIzACXVs9EKiHRMmckSfMQGx0G
rXIldU4/dJSvJx3EoSDZC7OszHByTxTOfZGEq00y9B3lo70iElamhp4Ujy1eN8wIrEOd0BRW6DpiWEwq
giKSdYiIl5IOUskRKh39AmKECZNP7Mg0O6Ci59Pzd4O/NQK7FBvQULyGOmMUpBsX4KqjGTL5qzHQIqJy
iNG6Px5dtYlY7jqhmeKxvUE32C7FGKiP58uf5W6v0ekgPkmNrYIMor4YqcoinQBFdGQrl2ZsB4/cwBJR
Zml/+k0sxcQnQZzgDWHIIni9NQHSHU5IS15EPSEN11ok6G9UQs1dh/lvv/GdkZHR3NEETOhkIUE7zvb1
wRRFwYv0vD3UBTORJCEdSHMhydgFCXVHVnuWEGvZrDewjqmzKbHDNjHmFl5KBlasWokiFwtop5nhyL6p
2JO/CN2HBdSgMpHJ88GH82c8s7b4T1vmUPA3CFxCp19QzBPdtpxdRqon2kkDKRSYXeOJcyBUFMI7IJ70
kYsEgRLTXGbgrzNnwmWqC2Y4OsLZZjx43El4ggXI1zohy24MAFd4u9tj8YLpmD71DTiMtwGHY1A7ygB7
52N29CLULV7qeT+HnFCoPairu87/RC9rTjE8JYJoY/p4lR8lVQAp7Rc+/pHY7OKE61NN8a21MbQpfwC+
m4fbQ7MQNdcCfWMMsTPWDi2yyRgyNkDhOGPYGhpeo97jP5oAcwJjYQ4hk3DOyzvwn9v3HtUJjHXAzSFc
RHHlCAznIyAsCZa2k56u3xT2gtHPmGHCdXtnHh47mKBqjS1K5Q7ITrCjlf8RqXPM0bDUCr3bp2C9nj70
DDinKMYSwmujCbAjY4G9ZrN3tyMLP/D4IT1vP/J21CBeoKaa55MTUhAeK8J7i91v0DMdxqZmgw7Oc74N
iFQ8T5YX6ZzisWI9Uiebo8rKCOcsjLAv1Z72BydUxE5ElcTuKf2P9RunEeGzmD8bTIzsI0I7wc7xdgyf
NiayWVoueZ1qz7zPT8l5McnBqZieYZsYO/a4zF7yaKWP4HlASMKLj9xX4WrXWzhdMxUFlkaI1tPDAZE9
Htc4wWuhOas5Y/oXgUezYDdZdmK2N6zzCfuB1V1GFkulNswT5cFllms73f+QMIWwjCDjGJnUW1rbfu2z
wvXJk85pUH5gieNJdugvd8QV7RSc0TjgiMwevkvH3np1xa/+ZplZE9jecNh14UcPmO8VmnLyfzGr/feU
mB/dY7VjybItdSZhrb6+fvEYY6PuMWOMn7ZbGeILfQNYmnN+mO1o/OBdCw74HAMsMjR8NjL/r+Yx+p3H
XhjKZs93uxMZr4Z/uOb54qWf3bGf4pw3EpC1UPYsS3g0EU9K4uBsI86zYHPOY3MOp4zuRRLyDfT1O941
Mrzvb86Bob4h+0r6zcEmdiFICA2vvT55kLFBYOJhnYt9or06TOmCJ7HTbGxgADpndmaJMU29QxAQKvTo
vhnHkN1nX12/OlgCNoT3CZsIvgRWc9ao2IT/bTD3+BID7N1/zisBWCKOBB/CagKf8PboJP8CoUmu3yhA
ga8AAAAASUVORK5CYII=
</value>
</data>
</root>

View File

@@ -1,295 +0,0 @@
#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
namespace OpenRA.Editor
{
partial class NewMapDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.CordonBottom = new System.Windows.Forms.NumericUpDown();
this.CordonTop = new System.Windows.Forms.NumericUpDown();
this.CordonRight = new System.Windows.Forms.NumericUpDown();
this.CordonLeft = new System.Windows.Forms.NumericUpDown();
this.MapHeight = new System.Windows.Forms.NumericUpDown();
this.MapWidth = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.TheaterBox = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).BeginInit();
this.SuspendLayout();
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(229, 160);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(310, 160);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 8;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 77);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Cordon Right/Bottom";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(31, 51);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 11;
this.label2.Text = "Cordon Left/Top";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(31, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Size";
//
// cordonBottom
//
this.CordonBottom.Location = new System.Drawing.Point(280, 75);
this.CordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonBottom.Name = "cordonBottom";
this.CordonBottom.Size = new System.Drawing.Size(105, 20);
this.CordonBottom.TabIndex = 5;
this.CordonBottom.Value = new decimal(new int[] {
112,
0,
0,
0});
this.CordonBottom.Enter += new System.EventHandler(this.SelectText);
//
// cordonTop
//
this.CordonTop.Location = new System.Drawing.Point(280, 49);
this.CordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonTop.Name = "cordonTop";
this.CordonTop.Size = new System.Drawing.Size(105, 20);
this.CordonTop.TabIndex = 3;
this.CordonTop.Value = new decimal(new int[] {
16,
0,
0,
0});
this.CordonTop.Enter += new System.EventHandler(this.SelectText);
//
// cordonRight
//
this.CordonRight.Location = new System.Drawing.Point(169, 75);
this.CordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonRight.Name = "cordonRight";
this.CordonRight.Size = new System.Drawing.Size(105, 20);
this.CordonRight.TabIndex = 4;
this.CordonRight.Value = new decimal(new int[] {
112,
0,
0,
0});
this.CordonRight.Enter += new System.EventHandler(this.SelectText);
//
// cordonLeft
//
this.CordonLeft.Location = new System.Drawing.Point(169, 49);
this.CordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonLeft.Name = "cordonLeft";
this.CordonLeft.Size = new System.Drawing.Size(105, 20);
this.CordonLeft.TabIndex = 2;
this.CordonLeft.Value = new decimal(new int[] {
16,
0,
0,
0});
this.CordonLeft.Enter += new System.EventHandler(this.SelectText);
//
// height
//
this.MapHeight.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapHeight.Location = new System.Drawing.Point(280, 23);
this.MapHeight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapHeight.Name = "height";
this.MapHeight.Size = new System.Drawing.Size(105, 20);
this.MapHeight.TabIndex = 1;
this.MapHeight.Value = new decimal(new int[] {
128,
0,
0,
0});
this.MapHeight.Enter += new System.EventHandler(this.SelectText);
//
// width
//
this.MapWidth.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapWidth.Location = new System.Drawing.Point(169, 23);
this.MapWidth.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapWidth.Name = "width";
this.MapWidth.Size = new System.Drawing.Size(105, 20);
this.MapWidth.TabIndex = 0;
this.MapWidth.Value = new decimal(new int[] {
128,
0,
0,
0});
this.MapWidth.Enter += new System.EventHandler(this.SelectText);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 124);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 13);
this.label4.TabIndex = 14;
this.label4.Text = "Tileset";
//
// theater
//
this.TheaterBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.TheaterBox.FormattingEnabled = true;
this.TheaterBox.Location = new System.Drawing.Point(169, 121);
this.TheaterBox.Name = "theater";
this.TheaterBox.Size = new System.Drawing.Size(216, 21);
this.TheaterBox.TabIndex = 6;
//
// NewMapDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(418, 210);
this.Controls.Add(this.TheaterBox);
this.Controls.Add(this.label4);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.CordonBottom);
this.Controls.Add(this.CordonTop);
this.Controls.Add(this.CordonRight);
this.Controls.Add(this.CordonLeft);
this.Controls.Add(this.MapHeight);
this.Controls.Add(this.MapWidth);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "NewMapDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "New Map";
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.NumericUpDown CordonBottom;
public System.Windows.Forms.NumericUpDown CordonTop;
public System.Windows.Forms.NumericUpDown CordonRight;
public System.Windows.Forms.NumericUpDown CordonLeft;
public System.Windows.Forms.NumericUpDown MapHeight;
public System.Windows.Forms.NumericUpDown MapWidth;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.ComboBox TheaterBox;
}
}

View File

@@ -1,28 +0,0 @@
#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.Windows.Forms;
namespace OpenRA.Editor
{
public partial class NewMapDialog : Form
{
public NewMapDialog()
{
InitializeComponent();
}
void SelectText(object sender, System.EventArgs e)
{
var ud = sender as NumericUpDown;
ud.Select(0, ud.ToString().Length);
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,199 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00038B75-405B-44F5-8691-BD2546DBE224}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Editor</RootNamespace>
<AssemblyName>OpenRA.Editor</AssemblyName>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>OpenRA.Editor.Icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<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|x86'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<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>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActorPropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ActorPropertiesDialog.Designer.cs">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
</Compile>
<Compile Include="ActorTemplate.cs" />
<Compile Include="ActorTool.cs" />
<Compile Include="BrushTool.cs" />
<Compile Include="ErrorListDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ErrorListDialog.Designer.cs">
<DependentUpon>ErrorListDialog.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ITool.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapSelect.Designer.cs">
<DependentUpon>MapSelect.cs</DependentUpon>
</Compile>
<Compile Include="NewMapDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewMapDialog.Designer.cs">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="PropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PropertiesDialog.Designer.cs">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="ActorPropertiesDialog.resx">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MapSelect.resx">
<DependentUpon>MapSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewMapDialog.resx">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PropertiesDialog.resx">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ResizeDialog.resx">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="RenderUtils.cs" />
<Compile Include="ResizeDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ResizeDialog.Designer.cs">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</Compile>
<Compile Include="ResourceTool.cs" />
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TileSetRenderer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj">
<Project>{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}</Project>
<Name>OpenRA.Mods.Common</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="OpenRA.Editor.Icon.ico" />
</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,33 +0,0 @@
#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.Globalization;
using System.Windows.Forms;
namespace OpenRA.Editor
{
static class Program
{
public static Ruleset Rules;
[STAThread]
static void Main(string[] args)
{
Log.AddChannel("perf", null);
Application.CurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args));
}
}
}

View File

@@ -1,63 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenRA.Editor.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRA.Editor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.269
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenRA.Editor.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,181 +0,0 @@
#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
namespace OpenRA.Editor
{
partial class PropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.TitleBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.DescBox = new System.Windows.Forms.TextBox();
this.SelectableCheckBox = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.AuthorBox = new System.Windows.Forms.TextBox();
this.ShellmapCheckBox = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(196, 193);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 14;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(277, 193);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 15;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 16;
this.label1.Text = "Title";
//
// title
//
this.TitleBox.Location = new System.Drawing.Point(66, 47);
this.TitleBox.Name = "title";
this.TitleBox.Size = new System.Drawing.Size(286, 20);
this.TitleBox.TabIndex = 17;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 16;
this.label2.Text = "Desc";
//
// desc
//
this.DescBox.Location = new System.Drawing.Point(66, 73);
this.DescBox.Name = "desc";
this.DescBox.Size = new System.Drawing.Size(286, 20);
this.DescBox.TabIndex = 17;
//
// selectable
//
this.SelectableCheckBox.AutoSize = true;
this.SelectableCheckBox.Location = new System.Drawing.Point(118, 138);
this.SelectableCheckBox.Name = "selectable";
this.SelectableCheckBox.Size = new System.Drawing.Size(130, 17);
this.SelectableCheckBox.TabIndex = 18;
this.SelectableCheckBox.Text = "Show in Map Chooser";
this.SelectableCheckBox.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Author";
//
// author
//
this.AuthorBox.Location = new System.Drawing.Point(66, 99);
this.AuthorBox.Name = "author";
this.AuthorBox.Size = new System.Drawing.Size(286, 20);
this.AuthorBox.TabIndex = 17;
//
// checkBox1
//
this.ShellmapCheckBox.AutoSize = true;
this.ShellmapCheckBox.Location = new System.Drawing.Point(118, 161);
this.ShellmapCheckBox.Name = "checkBox1";
this.ShellmapCheckBox.Size = new System.Drawing.Size(105, 17);
this.ShellmapCheckBox.TabIndex = 18;
this.ShellmapCheckBox.Text = "Use as Shellmap";
this.ShellmapCheckBox.UseVisualStyleBackColor = true;
//
// PropertiesDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(370, 228);
this.Controls.Add(this.ShellmapCheckBox);
this.Controls.Add(this.SelectableCheckBox);
this.Controls.Add(this.AuthorBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.DescBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.TitleBox);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "PropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Properties";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox TitleBox;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox DescBox;
public System.Windows.Forms.CheckBox SelectableCheckBox;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox AuthorBox;
public System.Windows.Forms.CheckBox ShellmapCheckBox;
}
}

View File

@@ -1,22 +0,0 @@
#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.Windows.Forms;
namespace OpenRA.Editor
{
public partial class PropertiesDialog : Form
{
public PropertiesDialog()
{
InitializeComponent();
}
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,108 +0,0 @@
#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.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Mods.Common.SpriteLoaders;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ShpTDSprite shp, IPalette p)
{
var frame = shp.Frames.First();
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);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride2 = data.Stride;
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);
return bitmap;
}
public static ActorTemplate RenderActor(ActorInfo info, TileSet tileset, IPalette p)
{
var image = info.Traits.Get<ILegacyEditorRenderInfo>().EditorImage(info);
using (var s = GlobalFileSystem.OpenWithExts(image, tileset.Extensions))
{
var shp = new ShpTDSprite(s);
var bitmap = RenderShp(shp, p);
try
{
using (var s2 = GlobalFileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpTDSprite(s2);
var roofBitmap = RenderShp(shp2, p);
using (var g = System.Drawing.Graphics.FromImage(bitmap))
g.DrawImage(roofBitmap, 0, 0);
}
}
catch { }
return new ActorTemplate
{
Bitmap = bitmap,
Info = info,
Appearance = info.Traits.GetOrDefault<EditorAppearanceInfo>()
};
}
}
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, IPalette p)
{
var image = info.EditorSprite;
using (var s = GlobalFileSystem.OpenWithExts(image, exts))
{
// TODO: Do this properly
var shp = new ShpTDSprite(s);
var frame = shp.Frames.Last();
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);
unsafe
{
var q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
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.Frames.Count - 1 };
}
}
}
}

View File

@@ -1,235 +0,0 @@
#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
namespace OpenRA.Editor
{
partial class ResizeDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
components.Dispose();
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.MapWidth = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.CordonLeft = new System.Windows.Forms.NumericUpDown();
this.CordonTop = new System.Windows.Forms.NumericUpDown();
this.CordonRight = new System.Windows.Forms.NumericUpDown();
this.CordonBottom = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.MapHeight = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).BeginInit();
this.SuspendLayout();
//
// width
//
this.MapWidth.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapWidth.Location = new System.Drawing.Point(161, 18);
this.MapWidth.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapWidth.Name = "width";
this.MapWidth.Size = new System.Drawing.Size(105, 20);
this.MapWidth.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Size";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Cordon Left/Top";
//
// cordonLeft
//
this.CordonLeft.Location = new System.Drawing.Point(161, 44);
this.CordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonLeft.Name = "cordonLeft";
this.CordonLeft.Size = new System.Drawing.Size(105, 20);
this.CordonLeft.TabIndex = 0;
//
// cordonTop
//
this.CordonTop.Location = new System.Drawing.Point(272, 44);
this.CordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonTop.Name = "cordonTop";
this.CordonTop.Size = new System.Drawing.Size(105, 20);
this.CordonTop.TabIndex = 0;
//
// cordonRight
//
this.CordonRight.Location = new System.Drawing.Point(161, 70);
this.CordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonRight.Name = "cordonRight";
this.CordonRight.Size = new System.Drawing.Size(105, 20);
this.CordonRight.TabIndex = 0;
//
// cordonBottom
//
this.CordonBottom.Location = new System.Drawing.Point(272, 70);
this.CordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.CordonBottom.Name = "cordonBottom";
this.CordonBottom.Size = new System.Drawing.Size(105, 20);
this.CordonBottom.TabIndex = 0;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Cordon Right/Bottom";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(302, 111);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(221, 111);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// height
//
this.MapHeight.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.MapHeight.Location = new System.Drawing.Point(272, 18);
this.MapHeight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.MapHeight.Name = "height";
this.MapHeight.Size = new System.Drawing.Size(105, 20);
this.MapHeight.TabIndex = 0;
//
// ResizeDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(409, 146);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.CordonBottom);
this.Controls.Add(this.CordonTop);
this.Controls.Add(this.CordonRight);
this.Controls.Add(this.CordonLeft);
this.Controls.Add(this.MapHeight);
this.Controls.Add(this.MapWidth);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResizeDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resize Map";
((System.ComponentModel.ISupportInitialize)(this.MapWidth)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.CordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.MapHeight)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
public System.Windows.Forms.NumericUpDown MapWidth;
public System.Windows.Forms.NumericUpDown CordonLeft;
public System.Windows.Forms.NumericUpDown CordonTop;
public System.Windows.Forms.NumericUpDown CordonRight;
public System.Windows.Forms.NumericUpDown CordonBottom;
public System.Windows.Forms.NumericUpDown MapHeight;
}
}

View File

@@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -1,45 +0,0 @@
#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 SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class ResourceTool : ITool
{
ResourceTemplate resourceTemplate;
public ResourceTool(ResourceTemplate resource) { resourceTemplate = resource; }
public void Apply(Surface surface)
{
var type = (byte)resourceTemplate.Info.ResourceType;
var index = (byte)random.Next(resourceTemplate.Info.MaxDensity);
surface.Map.MapResources.Value[surface.GetBrushLocation()] = new ResourceTile(type, index);
var ch = new int2(surface.GetBrushLocation().X / Surface.ChunkSize,
surface.GetBrushLocation().Y / Surface.ChunkSize);
if (surface.Chunks.ContainsKey(ch))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
public void Preview(Surface surface, SGraphics g)
{
surface.DrawImage(g, resourceTemplate.Bitmap, surface.GetBrushLocation(), false, null);
}
Random random = new Random();
}
}

View File

@@ -1,566 +0,0 @@
#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.Drawing.Imaging;
using System.Linq;
using System.Windows.Forms;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Traits;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
static class ActorReferenceExts
{
public static CPos Location(this ActorReference ar)
{
return (CPos)ar.InitDict.Get<LocationInit>().value;
}
public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg)
{
g.DrawString(s, f, bg, x - 1, y - 1);
g.DrawString(s, f, bg, x + 1, y - 1);
g.DrawString(s, f, bg, x - 1, y + 1);
g.DrawString(s, f, bg, x + 1, y + 1);
g.DrawString(s, f, fg, x, y);
}
}
class Surface : Control
{
public Map Map { get; private set; }
public TileSet TileSet { get; private set; }
public TileSetRenderer TileSetRenderer { get; private set; }
public IPalette Palette { get; private set; }
public IPalette PlayerPalette { get; private set; }
public int2 Offset;
public int2 GetOffset() { return Offset; }
public float Zoom = 1.0f;
ITool currentTool;
public bool IsPanning;
public bool IsErasing;
public bool ShowActorNames;
public bool ShowGrid;
public bool ShowRuler;
public bool IsPaste { get { return TileSelection != null && ResourceSelection != null; } }
public TerrainTile[,] TileSelection;
public ResourceTile[,] ResourceSelection;
public CPos SelectionStart;
public CPos SelectionEnd;
public string NewActorOwner;
public event Action AfterChange = () => { };
public event Action<string> MousePositionChanged = _ => { };
public event Action<KeyValuePair<string, ActorReference>> ActorDoubleClicked = _ => { };
Dictionary<string, ActorTemplate> actorTemplates = new Dictionary<string, ActorTemplate>();
public Dictionary<int, ResourceTemplate> ResourceTemplates = new Dictionary<int, ResourceTemplate>();
static readonly Font MarkerFont = new Font(FontFamily.GenericSansSerif, 12.0f, FontStyle.Regular);
static readonly SolidBrush TextBrush = new SolidBrush(Color.Red);
public Keys GetModifiers() { return ModifierKeys; }
public void Bind(Map m, TileSet ts, TileSetRenderer tsr, IPalette p, IPalette pp)
{
Map = m;
TileSet = ts;
TileSetRenderer = tsr;
Palette = p;
PlayerPalette = pp;
playerPalettes = null;
Chunks.Clear();
currentTool = null;
}
public void SetTool(ITool tool) { currentTool = tool; ClearSelection(); }
public void BindActorTemplates(IEnumerable<ActorTemplate> templates)
{
actorTemplates = templates.ToDictionary(a => a.Info.Name.ToLowerInvariant());
}
public void BindResourceTemplates(IEnumerable<ResourceTemplate> templates)
{
ResourceTemplates = templates.ToDictionary(a => a.Info.ResourceType);
}
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
public Surface()
{
BackColor = Color.Black;
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.ResizeRedraw, true);
UpdateStyles();
}
static readonly Pen SelectionPen = new Pen(Color.Blue);
static readonly Pen PastePen = new Pen(Color.Green);
static readonly Pen CordonPen = new Pen(Color.Red);
int2 mousePos;
public void Scroll(int2 dx)
{
Offset -= dx;
Invalidate();
}
protected override void OnDoubleClick(EventArgs e)
{
base.OnDoubleClick(e);
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null)
ActorDoubleClicked(x);
}
protected override void OnMouseWheel(MouseEventArgs e)
{
base.OnMouseWheel(e);
if (Map == null) return;
Zoom *= e.Delta > 0 ? 4.0f / 3.0f : .75f;
Invalidate();
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
this.Parent.Focus();
Invalidate();
}
protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseLeave(e);
this.Focus();
Invalidate();
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (Map == null) return;
var oldMousePos = mousePos;
mousePos = new int2(e.Location);
MousePositionChanged(GetBrushLocation().ToString());
if (e.Button == MouseButtons.Middle || (e.Button != MouseButtons.None && IsPanning))
Scroll(oldMousePos - mousePos);
else
{
if (e.Button == MouseButtons.Right || (IsErasing && e.Button == MouseButtons.Left))
Erase();
if (e.Button == MouseButtons.Left && !IsErasing)
Draw();
Invalidate();
}
}
void Erase()
{
// Crash preventing
var brushLocation = GetBrushLocation();
if (Map == null || brushLocation.X >= Map.MapSize.X ||
brushLocation.Y >= Map.MapSize.Y ||
brushLocation.X < 0 ||
brushLocation.Y < 0)
return;
currentTool = null;
var key = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == brushLocation);
if (key.Key != null) Map.Actors.Value.Remove(key.Key);
if (Map.MapResources.Value[brushLocation].Type != 0)
{
Map.MapResources.Value[brushLocation] = new ResourceTile(0, 0);
var ch = new int2(brushLocation.X / ChunkSize, brushLocation.Y / ChunkSize);
if (Chunks.ContainsKey(ch))
{
Chunks[ch].Dispose();
Chunks.Remove(ch);
}
}
AfterChange();
ClearSelection();
}
void Draw()
{
if (currentTool != null)
{
currentTool.Apply(this);
AfterChange();
}
else if (IsPaste)
PasteSelection();
else
SelectionEnd = GetBrushLocationBR();
}
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
if (Map == null) return;
if (!IsPanning)
{
if (e.Button == MouseButtons.Right) Erase();
if (e.Button == MouseButtons.Left && !IsErasing)
{
Draw();
if (!IsPaste)
SelectionStart = SelectionEnd = GetBrushLocation();
}
}
Invalidate();
}
public const int ChunkSize = 8; // 8x8 chunks ==> 192x192 bitmaps.
Bitmap RenderChunk(int u, int v)
{
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize, ChunkSize * TileSetRenderer.TileSize);
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
var p = (int*)data.Scan0.ToPointer();
var stride = data.Stride >> 2;
for (var i = 0; i < ChunkSize; i++)
for (var j = 0; j < ChunkSize; j++)
{
var ui = u * ChunkSize + i;
var vj = v * ChunkSize + j;
var tr = Map.MapTiles.Value[ui, vj];
var tile = TileSetRenderer.Data(tr.Type);
var index = (tr.Index < tile.Length) ? tr.Index : (byte)0;
var rawImage = tile[index];
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[ui, vj].Type != 0)
{
var resourceImage = ResourceTemplates[Map.MapResources.Value[ui, vj].Type].Bitmap;
var srcdata = resourceImage.LockBits(resourceImage.Bounds(),
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
var q = (int*)srcdata.Scan0.ToPointer();
var srcstride = srcdata.Stride >> 2;
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 + y) * stride + i * TileSetRenderer.TileSize + x] = c;
}
resourceImage.UnlockBits(srcdata);
}
}
}
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, 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;
}
public CPos GetBrushLocation()
{
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, 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 - 1) / TileSetRenderer.TileSize,
(vY + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
var actorPalette = cp;
if (t.Appearance != null && t.Appearance.UseTerrainPalette)
actorPalette = Palette.AsSystemPalette();
DrawImage(g, t.Bitmap, p, centered, actorPalette);
}
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
{
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0;
var drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0;
var drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
return new float2(drawX, drawY);
}
public void DrawImage(SGraphics g, Bitmap bmp, CPos location, bool centered, ColorPalette cp)
{
var drawPos = GetDrawPosition(location, bmp, centered);
var sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
var destRect = new RectangleF(drawPos.X, drawPos.Y, bmp.Width * Zoom, bmp.Height * Zoom);
var restorePalette = bmp.Palette;
if (cp != null) bmp.Palette = cp;
g.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel);
if (cp != null) bmp.Palette = restorePalette;
}
void DrawActorBorder(SGraphics g, CPos p, ActorTemplate t)
{
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
var drawPos = GetDrawPosition(p, t.Bitmap, centered);
g.DrawRectangle(CordonPen,
drawPos.X, drawPos.Y,
t.Bitmap.Width * Zoom, t.Bitmap.Height * Zoom);
}
ColorPalette GetPaletteForPlayerInner(string name)
{
var pr = Map.Players[name];
var pcpi = Program.Rules.Actors["player"].Traits.Get<PlayerColorPaletteInfo>();
var remap = new PlayerColorRemap(pcpi.RemapIndex, pr.Color, pcpi.Ramp);
return new ImmutablePalette(PlayerPalette, remap).AsSystemPalette();
}
Cache<string, ColorPalette> playerPalettes;
public ColorPalette GetPaletteForPlayer(string player)
{
if (playerPalettes == null)
playerPalettes = new Cache<string, ColorPalette>(GetPaletteForPlayerInner);
return playerPalettes[player];
}
ColorPalette GetPaletteForActor(ActorReference ar)
{
var ownerInit = ar.InitDict.GetOrDefault<OwnerInit>();
if (ownerInit == null)
return null;
return GetPaletteForPlayer(ownerInit.PlayerName);
}
protected override void OnPaint(PaintEventArgs e)
{
if (Map == null) return;
if (TileSet == null) return;
for (var u = 0; u < Map.MapSize.X; u += ChunkSize)
for (var v = 0; v < Map.MapSize.Y; v += ChunkSize)
{
var x = new int2(u / ChunkSize, v / ChunkSize);
if (!Chunks.ContainsKey(x)) Chunks[x] = RenderChunk(u / ChunkSize, v / ChunkSize);
var bmp = Chunks[x];
var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
var sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
var 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 * 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 * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize * Zoom);
if (IsPaste)
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
e.Graphics.DrawRectangle(PastePen,
(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)
{
if (actorTemplates.ContainsKey(ar.Value.Type))
DrawActor(e.Graphics, ar.Value.Location(), actorTemplates[ar.Value.Type],
GetPaletteForActor(ar.Value));
else
Console.WriteLine("Warning: Unknown or excluded actor: {0}", ar.Value.Type);
}
if (ShowActorNames)
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 * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize * Zoom + Offset.Y),
Brushes.White,
Brushes.Black);
if (ShowRuler && Zoom > 0.2)
{
for (var i = Map.Bounds.Left; i <= Map.Bounds.Right; i += 8)
{
if (i % 8 == 0)
{
var 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);
}
}
for (var i = Map.Bounds.Top; i <= Map.Bounds.Bottom; i += 8)
{
if (i % 8 == 0)
{
var 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);
}
}
}
if (currentTool != null)
currentTool.Preview(this, e.Graphics);
if (currentTool == null)
{
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null && actorTemplates.ContainsKey(x.Value.Type))
DrawActorBorder(e.Graphics, x.Value.Location(), actorTemplates[x.Value.Type]);
}
}
public void CopySelection()
{
// Grab tiles and resources within selection (doesn't do actors)
var start = SelectionStart;
var end = SelectionEnd;
if (start == end) return;
var width = Math.Abs((start - end).X);
var height = Math.Abs((start - end).Y);
TileSelection = new TerrainTile[width, height];
ResourceSelection = new ResourceTile[width, height];
for (var x = 0; x < width; x++)
{
for (var y = 0; y < height; y++)
{
// TODO: crash prevention
var cell = new CPos(start.X + x, start.Y + y);
TileSelection[x, y] = Map.MapTiles.Value[cell];
ResourceSelection[x, y] = Map.MapResources.Value[cell];
}
}
}
void PasteSelection()
{
var loc = GetBrushLocation();
var width = Math.Abs((SelectionStart - SelectionEnd).X);
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
for (var x = 0; x < width; x++)
{
for (var y = 0; y < height; y++)
{
var mapX = loc.X + x;
var mapY = loc.Y + y;
var cell = new CPos(mapX, mapY);
// TODO: crash prevention for outside of bounds
Map.MapTiles.Value[cell] = TileSelection[x, y];
Map.MapResources.Value[cell] = ResourceSelection[x, y];
var ch = new int2(mapX / ChunkSize, mapY / ChunkSize);
if (Chunks.ContainsKey(ch))
{
Chunks[ch].Dispose();
Chunks.Remove(ch);
}
}
}
AfterChange();
}
void ClearSelection()
{
SelectionStart = CPos.Zero;
SelectionEnd = CPos.Zero;
TileSelection = null;
ResourceSelection = null;
}
}
}

View File

@@ -1,110 +0,0 @@
#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.Drawing.Imaging;
using System.Linq;
using OpenRA.FileSystem;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public class TileSetRenderer
{
public readonly int TileSize;
public TileSet TileSet;
Dictionary<ushort, byte[][]> templates;
// 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;
}
public TileSetRenderer(TileSet tileset, Size tileSize)
{
this.TileSet = tileset;
this.TileSize = Math.Min(tileSize.Width, tileSize.Height);
templates = new Dictionary<ushort, byte[][]>();
var frameCache = new FrameCache(Game.modData.SpriteLoaders, tileset.Extensions);
foreach (var t in tileset.Templates)
{
var allFrames = frameCache[t.Value.Image];
var frames = t.Value.Frames != null ? t.Value.Frames.Select(f => allFrames[f]).ToArray() : allFrames;
templates.Add(t.Value.Id, frames.Select(f => ExtractSquareTile(f)).ToArray());
}
}
public Bitmap RenderTemplate(ushort id, IPalette 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 byte[][] Data(ushort id)
{
return templates[id];
}
}
}

6
OpenRA.Game.exe.config Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,8 +10,9 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Traits
namespace OpenRA.Activities
{
public abstract class Activity
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -9,9 +9,8 @@
#endregion
using System;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
namespace OpenRA.Activities
{
public class CallFunc : Activity
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,6 +14,7 @@ using System.Drawing;
using System.Linq;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Activities;
using OpenRA.Graphics;
using OpenRA.Primitives;
using OpenRA.Scripting;
@@ -21,22 +22,39 @@ using OpenRA.Traits;
namespace OpenRA
{
public class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>
public sealed class Actor : IScriptBindable, IScriptNotifyBind, ILuaTableBinding, ILuaEqualityBinding, ILuaToStringBinding, IEquatable<Actor>, IDisposable
{
public readonly ActorInfo Info;
public readonly World World;
public readonly uint ActorID;
public Lazy<Rectangle> Bounds;
Lazy<IOccupySpace> occupySpace;
public readonly uint ActorID;
[Sync] public Player Owner { get; set; }
public bool IsInWorld { get; internal set; }
public bool Disposed { get; private set; }
Activity currentActivity;
public Group Group;
public int Generation;
Lazy<Rectangle> bounds;
Lazy<Rectangle> visualBounds;
Lazy<IFacing> facing;
Lazy<Health> health;
Lazy<IOccupySpace> occupySpace;
Lazy<IEffectiveOwner> effectiveOwner;
public Rectangle Bounds { get { return bounds.Value; } }
public Rectangle VisualBounds { get { return visualBounds.Value; } }
public IOccupySpace OccupiesSpace { get { return occupySpace.Value; } }
public IEffectiveOwner EffectiveOwner { get { return effectiveOwner.Value; } }
public bool IsIdle { get { return currentActivity == null; } }
public bool IsDead { get { return Disposed || (health.Value == null ? false : health.Value.IsDead); } }
public CPos Location { get { return occupySpace.Value.TopLeft; } }
public WPos CenterPosition { get { return occupySpace.Value.CenterPosition; } }
@@ -50,11 +68,9 @@ namespace OpenRA
}
}
[Sync] public Player Owner;
Activity currentActivity;
public Group Group;
public int Generation;
readonly IRenderModifier[] renderModifiers;
readonly IRender[] renders;
readonly IDisable[] disables;
internal Actor(World world, string name, TypeDictionary initDict)
{
@@ -69,10 +85,12 @@ namespace OpenRA
if (name != null)
{
if (!world.Map.Rules.Actors.ContainsKey(name.ToLowerInvariant()))
throw new NotImplementedException("No rules definition for unit {0}".F(name.ToLowerInvariant()));
name = name.ToLowerInvariant();
Info = world.Map.Rules.Actors[name.ToLowerInvariant()];
if (!world.Map.Rules.Actors.ContainsKey(name))
throw new NotImplementedException("No rules definition for unit " + name);
Info = world.Map.Rules.Actors[name];
foreach (var trait in Info.TraitsInConstructOrder())
AddTrait(trait.Create(init));
}
@@ -81,7 +99,7 @@ namespace OpenRA
health = Exts.Lazy(() => TraitOrDefault<Health>());
effectiveOwner = Exts.Lazy(() => TraitOrDefault<IEffectiveOwner>());
Bounds = Exts.Lazy(() =>
bounds = Exts.Lazy(() =>
{
var si = Info.Traits.GetOrDefault<SelectableInfo>();
var size = (si != null && si.Bounds != null) ? new int2(si.Bounds[0], si.Bounds[1]) :
@@ -93,39 +111,52 @@ namespace OpenRA
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
});
visualBounds = Exts.Lazy(() =>
{
var sd = Info.Traits.GetOrDefault<ISelectionDecorationsInfo>();
if (sd == null || sd.SelectionBoxBounds == null)
return bounds.Value;
var size = new int2(sd.SelectionBoxBounds[0], sd.SelectionBoxBounds[1]);
var offset = -size / 2;
if (sd.SelectionBoxBounds.Length > 2)
offset += new int2(sd.SelectionBoxBounds[2], sd.SelectionBoxBounds[3]);
return new Rectangle(offset.X, offset.Y, size.X, size.Y);
});
renderModifiers = TraitsImplementing<IRenderModifier>().ToArray();
renders = TraitsImplementing<IRender>().ToArray();
disables = TraitsImplementing<IDisable>().ToArray();
}
public void Tick()
{
var wasIdle = IsIdle;
currentActivity = Traits.Util.RunActivity(this, currentActivity);
if (!wasIdle && IsIdle)
foreach (var n in TraitsImplementing<INotifyBecomingIdle>())
n.OnBecomingIdle(this);
}
public bool IsIdle
{
get { return currentActivity == null; }
}
public IEnumerable<IRenderable> Render(WorldRenderer wr)
{
var renderables = Renderables(wr);
foreach (var modifier in TraitsImplementing<IRenderModifier>())
foreach (var modifier in renderModifiers)
renderables = modifier.ModifyRender(this, wr, renderables);
return renderables;
}
IEnumerable<IRenderable> Renderables(WorldRenderer wr)
{
foreach (var render in TraitsImplementing<IRender>())
foreach (var render in renders)
foreach (var renderable in render.Render(this, wr))
yield return renderable;
}
public bool IsInWorld { get; internal set; }
public void QueueActivity(bool queued, Activity nextActivity)
{
if (!queued)
@@ -170,48 +201,52 @@ namespace OpenRA
public override string ToString()
{
return "{0} {1}{2}".F(Info.Name, ActorID, IsInWorld ? "" : " (not in world)");
var name = Info.Name + " " + ActorID;
if (!IsInWorld)
name += " (not in world)";
return name;
}
public T Trait<T>()
{
return World.traitDict.Get<T>(this);
return World.TraitDict.Get<T>(this);
}
public T TraitOrDefault<T>()
{
return World.traitDict.GetOrDefault<T>(this);
return World.TraitDict.GetOrDefault<T>(this);
}
public IEnumerable<T> TraitsImplementing<T>()
{
return World.traitDict.WithInterface<T>(this);
return World.TraitDict.WithInterface<T>(this);
}
public bool HasTrait<T>()
{
return World.traitDict.Contains<T>(this);
return World.TraitDict.Contains<T>(this);
}
public void AddTrait(object trait)
{
World.traitDict.AddTrait(this, trait);
World.TraitDict.AddTrait(this, trait);
}
public bool Destroyed { get; private set; }
public void Destroy()
public void Dispose()
{
World.AddFrameEndTask(w =>
{
if (Destroyed)
if (Disposed)
return;
if (IsInWorld)
World.Remove(this);
World.traitDict.RemoveActor(this);
Destroyed = true;
foreach (var t in TraitsImplementing<INotifyActorDisposing>())
t.Disposing(this);
World.TraitDict.RemoveActor(this);
Disposed = true;
if (luaInterface != null)
luaInterface.Value.OnActorDestroyed();
@@ -223,35 +258,27 @@ namespace OpenRA
{
World.AddFrameEndTask(w =>
{
if (this.Destroyed)
if (Disposed)
return;
var oldOwner = Owner;
var wasInWorld = IsInWorld;
// momentarily remove from world so the ownership queries don't get confused
w.Remove(this);
if (wasInWorld)
w.Remove(this);
Owner = newOwner;
Generation++;
w.Add(this);
if (wasInWorld)
w.Add(this);
foreach (var t in this.TraitsImplementing<INotifyOwnerChanged>())
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)
@@ -260,6 +287,14 @@ namespace OpenRA
health.Value.InflictDamage(this, attacker, health.Value.MaxHP, null, true);
}
public bool IsDisabled()
{
foreach (var disable in disables)
if (disable.Disabled)
return true;
return false;
}
#region Scripting interface
Lazy<ScriptActorInterface> luaInterface;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -9,7 +9,6 @@
#endregion
using System;
using System.Drawing;
using Eluant;
using Eluant.ObjectBinding;
using OpenRA.Scripting;
@@ -28,28 +27,46 @@ namespace OpenRA
public static CPos operator +(CVec a, CPos b) { return new CPos(a.X + b.X, a.Y + b.Y); }
public static CPos operator +(CPos a, CVec b) { return new CPos(a.X + b.X, a.Y + b.Y); }
public static CPos operator -(CPos a, CVec b) { return new CPos(a.X - b.X, a.Y - b.Y); }
public static CVec operator -(CPos a, CPos b) { return new CVec(a.X - b.X, a.Y - b.Y); }
public static bool operator ==(CPos me, CPos other) { return (me.X == other.X && me.Y == other.Y); }
public static bool operator ==(CPos me, CPos other) { return me.X == other.X && me.Y == other.Y; }
public static bool operator !=(CPos me, CPos other) { return !(me == other); }
public static CPos Max(CPos a, CPos b) { return new CPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
public static CPos Min(CPos a, CPos b) { return new CPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
public CPos Clamp(Rectangle r)
{
return new CPos(Math.Min(r.Right, Math.Max(X, r.Left)),
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
}
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
public bool Equals(CPos other) { return other == this; }
public bool Equals(CPos other) { return X == other.X && Y == other.Y; }
public override bool Equals(object obj) { return obj is CPos && Equals((CPos)obj); }
public override string ToString() { return X + "," + Y; }
public MPos ToMPos(Map map)
{
return ToMPos(map.TileShape);
}
public MPos ToMPos(TileShape shape)
{
if (shape == TileShape.Rectangle)
return new MPos(X, Y);
// Convert from diamond cell (x, y) position to rectangular map position (u, v)
// - The staggered rows make this fiddly (hint: draw a diagram!)
// (a) Consider the relationships:
// - +1x (even -> odd) adds (0, 1) to (u, v)
// - +1x (odd -> even) adds (1, 1) to (u, v)
// - +1y (even -> odd) adds (-1, 1) to (u, v)
// - +1y (odd -> even) adds (0, 1) to (u, v)
// (b) Therefore:
// - ax + by adds (a - b)/2 to u (only even increments count)
// - ax + by adds a + b to v
var u = (X - Y) / 2;
var v = X + Y;
return new MPos(u, v);
}
#region Scripting interface
public LuaValue Add(LuaRuntime runtime, LuaValue left, LuaValue right)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -31,7 +31,7 @@ namespace OpenRA
public static CVec operator -(CVec a) { return new CVec(-a.X, -a.Y); }
public static bool operator ==(CVec me, CVec other) { return (me.X == other.X && me.Y == other.Y); }
public static bool operator ==(CVec me, CVec other) { return me.X == other.X && me.Y == other.Y; }
public static bool operator !=(CVec me, CVec other) { return !(me == other); }
public static CVec Max(CVec a, CVec b) { return new CVec(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
@@ -48,8 +48,7 @@ namespace OpenRA
{
return new CVec(
Math.Min(r.Right, Math.Max(X, r.Left)),
Math.Min(r.Bottom, Math.Max(Y, r.Top))
);
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
}
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
@@ -59,7 +58,7 @@ namespace OpenRA
public override string ToString() { return X + "," + Y; }
public static readonly CVec[] directions =
public static readonly CVec[] Directions =
{
new CVec(-1, -1),
new CVec(-1, 0),

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -8,15 +8,12 @@
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
namespace OpenRA
{
public partial class ResizeDialog : Form
public interface ICacheStorage<T>
{
public ResizeDialog()
{
InitializeComponent();
}
void Remove(string key);
void Store(string key, T data);
T Retrieve(string key);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,

View File

@@ -0,0 +1,38 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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 OpenRA.Graphics;
namespace OpenRA.Effects
{
public class AsyncAction : IEffect
{
Action a;
IAsyncResult ar;
public AsyncAction(IAsyncResult ar, Action a)
{
this.a = a;
this.ar = ar;
}
public void Tick(World world)
{
if (ar.IsCompleted)
{
world.AddFrameEndTask(w => { w.Remove(this); a(); });
}
}
public IEnumerable<IRenderable> Render(WorldRenderer r) { yield break; }
}
}

4
OpenRA.Game/Effects/DelayedAction.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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
OpenRA.Game/Effects/FlashTarget.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -25,8 +25,11 @@ namespace OpenRA.Effects
this.target = target;
player = asPlayer;
remainingTicks = ticks;
foreach (var e in target.World.Effects.OfType<FlashTarget>().Where(a => a.target == target).ToArray())
target.World.Remove(e);
target.World.RemoveAll(effect =>
{
var flashTarget = effect as FlashTarget;
return flashTarget != null && flashTarget.target == target;
});
}
public void Tick(World world)

4
OpenRA.Game/Effects/IEffect.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -15,15 +15,15 @@ namespace OpenRA.Effects
{
public class SpriteEffect : IEffect
{
string palette;
Animation anim;
WPos pos;
readonly string palette;
readonly Animation anim;
readonly WPos pos;
public SpriteEffect(WPos pos, World world, string sprite, string palette)
public SpriteEffect(WPos pos, World world, string image, string palette)
{
this.pos = pos;
this.palette = palette;
anim = new Animation(world, sprite);
anim = new Animation(world, image);
anim.PlayThen("idle", () => world.AddFrameEndTask(w => w.Remove(this)));
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,10 +11,12 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
using OpenRA.Support;
using OpenRA.Traits;
namespace OpenRA
{
@@ -86,12 +88,34 @@ namespace OpenRA
return r.Contains(p.ToPointF());
}
static int WindingDirectionTest(int2 v0, int2 v1, int2 p)
{
return (v1.X - v0.X) * (p.Y - v0.Y) - (p.X - v0.X) * (v1.Y - v0.Y);
}
public static bool PolygonContains(this int2[] polygon, int2 p)
{
var windingNumber = 0;
for (var i = 0; i < polygon.Length; i++)
{
var tv = polygon[i];
var nv = polygon[(i + 1) % polygon.Length];
if (tv.Y <= p.Y && nv.Y > p.Y && WindingDirectionTest(tv, nv, p) > 0)
windingNumber++;
else if (tv.Y > p.Y && nv.Y <= p.Y && WindingDirectionTest(tv, nv, p) < 0)
windingNumber--;
}
return windingNumber != 0;
}
public static bool HasModifier(this Modifiers k, Modifiers mod)
{
return (k & mod) == mod;
}
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k)
where V : new()
{
@@ -106,21 +130,34 @@ namespace OpenRA
return ret;
}
public static int IndexOf<T>(this T[] array, T value)
{
return Array.IndexOf(array, value);
}
public static T Random<T>(this IEnumerable<T> ts, MersenneTwister r)
{
var xs = ts as ICollection<T>;
if (xs != null)
return xs.ElementAt(r.Next(xs.Count));
var ys = ts.ToList();
return ys[r.Next(ys.Count)];
return Random(ts, r, true);
}
public static T RandomOrDefault<T>(this IEnumerable<T> ts, MersenneTwister r)
{
if (!ts.Any())
return default(T);
return Random(ts, r, false);
}
return ts.Random(r);
static T Random<T>(IEnumerable<T> ts, MersenneTwister r, bool throws)
{
var xs = ts as ICollection<T>;
xs = xs ?? ts.ToList();
if (xs.Count == 0)
{
if (throws)
throw new ArgumentException("Collection must not be empty.", "ts");
else
return default(T);
}
else
return xs.ElementAt(r.Next(xs.Count));
}
public static float Product(this IEnumerable<float> xs)
@@ -183,6 +220,7 @@ namespace OpenRA
u = nextU;
}
}
return t;
}
}
@@ -241,7 +279,6 @@ namespace OpenRA
// Adjust for other rounding modes
if (round == ISqrtRoundMode.Nearest && remainder > root)
root += 1;
else if (round == ISqrtRoundMode.Ceiling && root * root < number)
root += 1;
@@ -283,7 +320,6 @@ namespace OpenRA
// Adjust for other rounding modes
if (round == ISqrtRoundMode.Nearest && remainder > root)
root += 1;
else if (round == ISqrtRoundMode.Ceiling && root * root < number)
root += 1;
@@ -300,12 +336,21 @@ namespace OpenRA
return ts.Concat(moreTs);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> source)
{
return new HashSet<T>(source);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(
this IEnumerable<TSource> source, Func<TSource, TKey> keySelector,
string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
{
return ToDictionaryWithConflictLog(source, keySelector, x => x, debugName, logKey, logValue);
}
public static Dictionary<TKey, TElement> ToDictionaryWithConflictLog<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, string debugName, Func<TKey, string> logKey, Func<TElement, string> logValue)
public static Dictionary<TKey, TElement> ToDictionaryWithConflictLog<TSource, TKey, TElement>(
this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector,
string debugName, Func<TKey, string> logKey, Func<TElement, string> logValue)
{
// Fall back on ToString() if null functions are provided:
logKey = logKey ?? (s => s.ToString());
@@ -342,7 +387,7 @@ namespace OpenRA
// If any duplicates were found, throw a descriptive error
if (dupKeys.Count > 0)
{
var badKeysFormatted = string.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), string.Join(",", p.Value.ToArray()))).ToArray());
var badKeysFormatted = string.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), string.Join(",", p.Value))));
var msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted);
throw new ArgumentException(msg);
}
@@ -373,14 +418,42 @@ namespace OpenRA
{
var result = new T[width, height];
for (var i = 0; i < width; i++)
{
for (var j = 0; j < height; j++)
result[i, j] = i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1)
? ts[i, j] : t;
{
// Workaround for broken ternary operators in certain versions of mono
// (3.10 and certain versions of the 3.8 series): https://bugzilla.xamarin.com/show_bug.cgi?id=23319
if (i <= ts.GetUpperBound(0) && j <= ts.GetUpperBound(1))
result[i, j] = ts[i, j];
else
result[i, j] = t;
}
}
return result;
}
public static Rectangle Bounds(this Bitmap b) { return new Rectangle(0, 0, b.Width, b.Height); }
public static Bitmap CloneWith32bbpArgbPixelFormat(this Bitmap original)
{
// Note: We would use original.Clone(original.Bounds(), PixelFormat.Format32bppArgb)
// but this doesn't work on mono.
var clone = new Bitmap(original.Width, original.Height, PixelFormat.Format32bppArgb);
try
{
using (var g = System.Drawing.Graphics.FromImage(clone))
g.DrawImage(original, original.Bounds());
}
catch (Exception)
{
clone.Dispose();
throw;
}
return clone;
}
public static int ToBits(this IEnumerable<bool> bits)
{
var i = 0;
@@ -404,6 +477,16 @@ namespace OpenRA
{
return int.TryParse(s, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out i);
}
public static bool IsTraitEnabled(this object trait)
{
return trait as IDisabledTrait == null || !(trait as IDisabledTrait).IsTraitDisabled;
}
public static bool IsTraitEnabled<T>(T t)
{
return IsTraitEnabled(t as object);
}
}
public static class Enum<T>

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
@@ -23,6 +24,26 @@ namespace OpenRA
{
public static class FieldLoader
{
public class MissingFieldsException : YamlException
{
public readonly string[] Missing;
public readonly string Header;
public override string Message
{
get
{
return (string.IsNullOrEmpty(Header) ? "" : Header + ": ") + Missing[0]
+ string.Concat(Missing.Skip(1).Select(m => ", " + m));
}
}
public MissingFieldsException(string[] missing, string header = null, string headerSingle = null) : base(null)
{
Header = missing.Length > 1 ? header : headerSingle ?? header;
Missing = missing;
}
}
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));
@@ -33,9 +54,18 @@ namespace OpenRA
throw new NotImplementedException("FieldLoader: Missing field `{0}` on `{1}`".F(s, f.Name));
};
static readonly ConcurrentCache<Type, FieldLoadInfo[]> TypeLoadInfo =
new ConcurrentCache<Type, FieldLoadInfo[]>(BuildTypeLoadInfo);
static readonly ConcurrentCache<MemberInfo, bool> MemberHasTranslateAttribute =
new ConcurrentCache<MemberInfo, bool>(member => member.HasAttribute<TranslateAttribute>());
static readonly object TranslationsLock = new object();
static Dictionary<string, string> translations;
public static void Load(object self, MiniYaml my)
{
var loadInfo = typeLoadInfo[self.GetType()];
var loadInfo = TypeLoadInfo[self.GetType()];
var missing = new List<string>();
Dictionary<string, MiniYaml> md = null;
@@ -43,19 +73,33 @@ namespace OpenRA
{
object val;
if (md == null)
md = my.ToDictionary();
if (fli.Loader != null)
val = fli.Loader(my);
{
if (!fli.Attribute.Required || md.ContainsKey(fli.YamlName))
val = fli.Loader(my);
else
{
missing.Add(fli.YamlName);
continue;
}
}
else
{
if (md == null)
md = my.ToDictionary();
if (!TryGetValueFromYaml(fli.YamlName, fli.Field, md, out val))
{
if (fli.Attribute.Required)
missing.Add(fli.YamlName);
continue;
}
}
fli.Field.SetValue(self, val);
}
if (missing.Any())
throw new MissingFieldsException(missing.ToArray());
}
static bool TryGetValueFromYaml(string yamlName, FieldInfo field, Dictionary<string, MiniYaml> md, out object ret)
@@ -82,14 +126,13 @@ namespace OpenRA
return t;
}
static readonly object[] NoIndexes = { };
public static void LoadField(object target, string key, string value)
{
const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
key = key.Trim();
var field = target.GetType().GetField(key, flags);
var field = target.GetType().GetField(key, Flags);
if (field != null)
{
var sa = field.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
@@ -98,12 +141,12 @@ namespace OpenRA
return;
}
var prop = target.GetType().GetProperty(key, flags);
var prop = target.GetType().GetProperty(key, Flags);
if (prop != null)
{
var sa = prop.GetCustomAttributes<SerializeAttribute>(false).DefaultIfEmpty(SerializeAttribute.Default).First();
if (!sa.FromYamlKey)
prop.SetValue(target, GetValue(prop.Name, prop.PropertyType, value, prop), NoIndexes);
prop.SetValue(target, GetValue(prop.Name, prop.PropertyType, value, prop), null);
return;
}
@@ -131,7 +174,6 @@ namespace OpenRA
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(ushort))
{
ushort res;
@@ -147,61 +189,87 @@ namespace OpenRA
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))
if (value != null && 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))
if (value != null && 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>())
if (field != null && MemberHasTranslateAttribute[field] && value != null)
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));
if (value != null)
{
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(Color[]))
{
if (value != null)
{
var parts = value.Split(',');
if (parts.Length % 4 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var colors = new Color[parts.Length / 4];
for (var i = 0; i < colors.Length; i++)
{
colors[i] = Color.FromArgb(
Exts.ParseIntegerInvariant(parts[4 * i]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 1]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 2]).Clamp(0, 255),
Exts.ParseIntegerInvariant(parts[4 * i + 3]).Clamp(0, 255));
}
return colors;
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(HSLColor))
{
var parts = value.Split(',');
if (value != null)
{
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));
// 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;
@@ -210,63 +278,67 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRange))
else if (fieldType == typeof(WDist))
{
WRange res;
if (WRange.TryParse(value, out res))
WDist res;
if (WDist.TryParse(value, out res))
return res;
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec))
{
var parts = value.Split(',');
if (parts.Length == 3)
if (value != null)
{
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);
var parts = value.Split(',');
if (parts.Length == 3)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[0], out rx) && WDist.TryParse(parts[1], out ry) && WDist.TryParse(parts[2], out rz))
return new WVec(rx, ry, rz);
}
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WVec[]))
{
var parts = value.Split(',');
if (parts.Length % 3 != 0)
return InvalidValueAction(value, fieldType, fieldName);
var vecs = new WVec[parts.Length / 3];
for (var i = 0; i < vecs.Length; ++i)
if (value != null)
{
WRange rx, ry, rz;
if (WRange.TryParse(parts[3 * i], out rx)
&& WRange.TryParse(parts[3 * i + 1], out ry)
&& WRange.TryParse(parts[3 * i + 2], out rz))
vecs[i] = new WVec(rx, ry, rz);
}
var parts = value.Split(',');
return vecs;
}
if (parts.Length % 3 != 0)
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);
var vecs = new WVec[parts.Length / 3];
for (var i = 0; i < vecs.Length; ++i)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[3 * i], out rx) && WDist.TryParse(parts[3 * i + 1], out ry) && WDist.TryParse(parts[3 * i + 2], out rz))
vecs[i] = new WVec(rx, ry, rz);
}
return vecs;
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WPos))
{
if (value != null)
{
var parts = value.Split(',');
if (parts.Length == 3)
{
WDist rx, ry, rz;
if (WDist.TryParse(parts[0], out rx) && WDist.TryParse(parts[1], out ry) && WDist.TryParse(parts[2], out rz))
return new WPos(rx, ry, rz);
}
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WAngle))
{
int res;
@@ -274,38 +346,41 @@ namespace OpenRA
return new WAngle(res);
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(WRot))
{
var parts = value.Split(',');
if (parts.Length == 3)
if (value != null)
{
int rr, rp, ry;
if (Exts.TryParseIntegerInvariant(value, out rr)
&& Exts.TryParseIntegerInvariant(value, out rp)
&& Exts.TryParseIntegerInvariant(value, out ry))
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]));
}
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType.IsEnum)
{
try
@@ -317,10 +392,31 @@ namespace OpenRA
return InvalidValueAction(value, fieldType, fieldName);
}
}
else if (fieldType == typeof(ImageFormat))
{
if (value != null)
{
switch (value.ToLowerInvariant())
{
case "bmp":
return ImageFormat.Bmp;
case "gif":
return ImageFormat.Gif;
case "jpg":
case "jpeg":
return ImageFormat.Jpeg;
case "tif":
case "tiff":
return ImageFormat.Tiff;
default:
return ImageFormat.Png;
}
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(bool))
return ParseYesNo(value, fieldType, fieldName);
else if (fieldType.IsArray)
{
if (value == null)
@@ -333,61 +429,75 @@ namespace OpenRA
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]));
}
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(
Exts.ParseIntegerInvariant(parts[0]),
Exts.ParseIntegerInvariant(parts[1]));
}
if (value != null)
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new int2(Exts.ParseIntegerInvariant(parts[0]), Exts.ParseIntegerInvariant(parts[1]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
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);
}
if (value != null)
{
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);
}
return InvalidValueAction(value, fieldType, fieldName);
}
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]));
}
if (value != null)
{
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]));
}
return InvalidValueAction(value, fieldType, fieldName);
}
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);
}
if (value != null)
{
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);
}
return InvalidValueAction(value, fieldType, fieldName);
}
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;
@@ -395,7 +505,6 @@ namespace OpenRA
return dt;
return InvalidValueAction(value, fieldType, fieldName);
}
else
{
var conv = TypeDescriptor.GetConverter(fieldType);
@@ -418,11 +527,15 @@ namespace OpenRA
static object ParseYesNo(string p, Type fieldType, string field)
{
if (string.IsNullOrEmpty(p))
return InvalidValueAction(p, fieldType, 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);
}
@@ -444,12 +557,10 @@ namespace OpenRA
public static IEnumerable<FieldLoadInfo> GetTypeLoadInfo(Type type, bool includePrivateByDefault = false)
{
return typeLoadInfo[type].Where(fli => includePrivateByDefault || fli.Field.IsPublic || (fli.Attribute.Serialize && !fli.Attribute.IsDefault));
return TypeLoadInfo[type].Where(fli => includePrivateByDefault || fli.Field.IsPublic || (fli.Attribute.Serialize && !fli.Attribute.IsDefault));
}
static Cache<Type, List<FieldLoadInfo>> typeLoadInfo = new Cache<Type, List<FieldLoadInfo>>(BuildTypeLoadInfo);
static List<FieldLoadInfo> BuildTypeLoadInfo(Type type)
static FieldLoadInfo[] BuildTypeLoadInfo(Type type)
{
var ret = new List<FieldLoadInfo>();
@@ -471,7 +582,7 @@ namespace OpenRA
ret.Add(fli);
}
return ret;
return ret.ToArray();
}
[AttributeUsage(AttributeTargets.Field)]
@@ -481,12 +592,20 @@ namespace OpenRA
: base(false) { }
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class RequireAttribute : SerializeAttribute
{
public RequireAttribute()
: base(true, true) { }
}
[AttributeUsage(AttributeTargets.Field)]
public sealed class LoadUsingAttribute : SerializeAttribute
{
public LoadUsingAttribute(string loader)
public LoadUsingAttribute(string loader, bool required = false)
{
Loader = loader;
Required = required;
}
}
@@ -501,19 +620,21 @@ namespace OpenRA
public string YamlName;
public string Loader;
public bool FromYamlKey;
public bool Required;
public SerializeAttribute(bool serialize = true)
public SerializeAttribute(bool serialize = true, bool required = false)
{
Serialize = serialize;
Required = required;
}
internal Func<MiniYaml, object> GetLoader(Type type)
{
const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy;
const BindingFlags Flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy;
if (!string.IsNullOrEmpty(Loader))
{
var method = type.GetMethod(Loader, flags);
var method = type.GetMethod(Loader, Flags);
if (method == null)
throw new InvalidOperationException("{0} does not specify a loader function '{1}'".F(type.Name, Loader));
@@ -526,17 +647,27 @@ namespace OpenRA
public static string Translate(string key)
{
if (Translations == null || string.IsNullOrEmpty(key))
if (string.IsNullOrEmpty(key))
return key;
string value;
if (!Translations.TryGetValue(key, out value))
return key;
lock (TranslationsLock)
{
if (translations == null)
return key;
return value;
string value;
if (!translations.TryGetValue(key, out value))
return key;
return value;
}
}
public static Dictionary<string, string> Translations = new Dictionary<string, string>();
public static void SetTranslations(IDictionary<string, string> translations)
{
lock (TranslationsLock)
FieldLoader.translations = new Dictionary<string, string>(translations);
}
}
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
@@ -552,6 +683,7 @@ namespace OpenRA
}
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
[AttributeUsage(AttributeTargets.All)]
public sealed class DescAttribute : Attribute
{
public readonly string[] Lines;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,6 +12,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.Globalization;
using System.Linq;
using System.Reflection;
@@ -46,8 +47,7 @@ namespace OpenRA
return new MiniYaml(
null,
fields.Select(info => new MiniYamlNode(info.YamlName, FormatValue(o, info.Field))).ToList()
);
fields.Select(info => new MiniYamlNode(info.YamlName, FormatValue(o, info.Field))).ToList());
}
public static MiniYamlNode SaveField(object o, string field)
@@ -78,6 +78,11 @@ namespace OpenRA
if (t == typeof(double))
return ((double)v).ToString(CultureInfo.InvariantCulture);
if (t == typeof(ImageFormat))
{
return ((ImageFormat)v).ToString();
}
if (t == typeof(Rectangle))
{
var r = (Rectangle)v;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,8 +45,8 @@ namespace OpenRA.FileFormats
public static class AudLoader
{
static int[] indexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static int[] stepTable =
{
static int[] stepTable =
{
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
@@ -56,7 +56,7 @@ namespace OpenRA.FileFormats
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
};
static short DecodeSample(byte b, ref int index, ref int current)

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -66,7 +66,7 @@ namespace OpenRA.FileFormats
if (coded < 0 || coded > 1)
throw new NotImplementedException("Invalid datastream");
var EncodedLiterals = coded == 1;
var encodedLiterals = coded == 1;
// log2(dictionary size) - 6
var dict = br.ReadBits(8);
@@ -142,10 +142,10 @@ namespace OpenRA.FileFormats
}
} while (len != 0);
}
// literal value
else
{
var symbol = EncodedLiterals ? Decode(litcode, br) : br.ReadBits(8);
// literal value
var symbol = encodedLiterals ? Decode(litcode, br) : br.ReadBits(8);
outBuffer[next++] = (byte)symbol;
if (next == MAXWIN)
{
@@ -241,9 +241,8 @@ namespace OpenRA.FileFormats
var num = (code >> 4) + 1; // Number of codes (top four bits plus 1)
var len = (byte)(code & 15); // Code length (low four bits)
do
{
length[s++] = len;
} while (--num > 0);
while (--num > 0);
}
n = s;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -21,31 +21,31 @@ namespace OpenRA.FileFormats
uint c = key[j++ % key.Length];
uint d = key[j++ % key.Length];
m_p[i] ^= a << 24 | b << 16 | c << 8 | d;
lookupMfromP[i] ^= a << 24 | b << 16 | c << 8 | d;
}
uint l = 0, r = 0;
for (var i = 0; i < 18; )
for (var i = 0; i < 18;)
{
Encrypt(ref l, ref r);
m_p[i++] = l;
m_p[i++] = r;
lookupMfromP[i++] = l;
lookupMfromP[i++] = r;
}
for (var i = 0; i < 4; ++i)
for (var j = 0; j < 256; )
for (var j = 0; j < 256;)
{
Encrypt(ref l, ref r);
m_s[i, j++] = l;
m_s[i, j++] = r;
lookupMfromS[i, j++] = l;
lookupMfromS[i, j++] = r;
}
}
public uint[] Encrypt(uint[] data) { return RunCipher(data, Encrypt); }
public uint[] Decrypt(uint[] data) { return RunCipher(data, Decrypt); }
delegate void CipherFunc( ref uint a, ref uint b );
delegate void CipherFunc(ref uint a, ref uint b);
static uint[] RunCipher(uint[] data, CipherFunc f)
{
@@ -56,7 +56,7 @@ namespace OpenRA.FileFormats
while (size-- > 0)
{
var a = SwapBytes(data[i]);
var b = SwapBytes(data[i+1]);
var b = SwapBytes(data[i + 1]);
f(ref a, ref b);
@@ -69,55 +69,57 @@ namespace OpenRA.FileFormats
void Encrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[0];
uint tempA = a, tempB = b;
tempA ^= lookupMfromP[0];
var x = false;
for( var i = 1; i <= 16; i++, x ^= true)
for (var i = 1; i <= 16; i++, x ^= true)
{
if (x)
Round(ref _a, _b, i);
Round(ref tempA, tempB, i);
else
Round(ref _b, _a, i);
Round(ref tempB, tempA, i);
}
_b ^= m_p[17];
a = _b;
b = _a;
tempB ^= lookupMfromP[17];
a = tempB;
b = tempA;
}
void Decrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[17];
uint tempA = a, tempB = b;
tempA ^= lookupMfromP[17];
var x = false;
for (var i = 16; i >= 1; i--, x ^= true)
{
if (x)
Round(ref _a, _b, i);
Round(ref tempA, tempB, i);
else
Round(ref _b, _a, i);
Round(ref tempB, tempA, i);
}
_b ^= m_p[0];
a = _b;
b = _a;
tempB ^= lookupMfromP[0];
a = tempB;
b = tempA;
}
uint S(uint x, int i)
{
return m_s[i, (x >> ((3 - i) << 3)) & 0xff];
return lookupMfromS[i, (x >> ((3 - i) << 3)) & 0xff];
}
uint bf_f(uint x)
uint ConvertBFtoF(uint x)
{
return ((S(x, 0) + S(x, 1)) ^ S(x, 2)) + S(x, 3);
}
void Round(ref uint a, uint b, int n)
{
a ^= bf_f(b) ^ m_p[n];
a ^= ConvertBFtoF(b) ^ lookupMfromP[n];
}
static uint SwapBytes(uint i)
@@ -127,7 +129,7 @@ namespace OpenRA.FileFormats
return i;
}
uint[] m_p = new uint[] {
uint[] lookupMfromP = new uint[] {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
@@ -135,7 +137,7 @@ namespace OpenRA.FileFormats
0x9216d5d9, 0x8979fb1b
};
uint[,] m_s = new uint[,] {
uint[,] lookupMfromS = new uint[,] {
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
@@ -400,7 +402,6 @@ namespace OpenRA.FileFormats
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
}
};
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -13,35 +13,36 @@ using System.Linq;
namespace OpenRA.FileFormats
{
/* possibly the fugliest C# i've ever seen. */
/* TODO: Convert this direct C port into readable code. */
class BlowfishKeyProvider
{
const string pubkeyStr = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
const string PublicKeyString = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
class PublicKey
{
public uint[] key1 = new uint[64];
public uint[] key2 = new uint[64];
public uint len;
public uint[] KeyOne = new uint[64];
public uint[] KeyTwo = new uint[64];
public uint Len;
}
PublicKey pubkey = new PublicKey();
uint[] glob1 = new uint[64];
uint glob1_bitlen, glob1_len_x2;
uint[] glob2 = new uint[130];
uint[] glob1_hi = new uint[4];
uint[] glob1_hi_inv = new uint[4];
uint glob1_hi_bitlen;
uint glob1_hi_inv_lo, glob1_hi_inv_hi;
uint[] globOne = new uint[64];
uint globOneBitLen, globOneLenXTwo;
uint[] globTwo = new uint[130];
uint[] globOneHigh = new uint[4];
uint[] globOneHighInv = new uint[4];
uint globOneHighBitLen;
uint globOneHighInvLow, globOneHighInvHigh;
static void init_bignum(uint[] n, uint val, uint len)
static void InitBigNum(uint[] n, uint val, uint len)
{
for (var i = 0; i < len; i++) n[i] = 0;
n[0] = val;
}
static void move_key_to_big(uint[] n, byte[] key, uint klen, uint blen)
static void MoveKeyToBig(uint[] n, byte[] key, uint klen, uint blen)
{
byte sign;
@@ -50,9 +51,9 @@ namespace OpenRA.FileFormats
unsafe
{
fixed (uint* _pn = &n[0])
fixed (uint* tempPn = &n[0])
{
var pn = (byte*)_pn;
var pn = (byte*)tempPn;
var i = blen * 4;
for (; i > klen; i--) pn[i - 1] = (byte)sign;
for (; i > 0; i--) pn[i - 1] = key[klen - i];
@@ -60,7 +61,7 @@ namespace OpenRA.FileFormats
}
}
static void key_to_bignum(uint[] n, byte[] key, uint len)
static void KeyToBigNum(uint[] n, byte[] key, uint len)
{
uint keylen;
int i;
@@ -81,11 +82,12 @@ namespace OpenRA.FileFormats
keylen = key[j];
j++;
}
if (keylen <= len * 4)
move_key_to_big(n, key.Skip(j).ToArray(), keylen, len);
MoveKeyToBig(n, key.Skip(j).ToArray(), keylen, len);
}
static uint len_bignum(uint[] n, uint len)
static uint LenBigNum(uint[] n, uint len)
{
uint i;
i = len - 1;
@@ -93,10 +95,10 @@ namespace OpenRA.FileFormats
return i + 1;
}
static uint bitlen_bignum(uint[] n, uint len)
static uint BitLenBigNum(uint[] n, uint len)
{
uint ddlen, bitlen, mask;
ddlen = len_bignum(n, len);
ddlen = LenBigNum(n, len);
if (ddlen == 0) return 0;
bitlen = ddlen * 32;
mask = 0x80000000;
@@ -105,41 +107,42 @@ namespace OpenRA.FileFormats
mask >>= 1;
bitlen--;
}
return bitlen;
}
void init_pubkey()
void InitPublicKey()
{
init_bignum(pubkey.key2, 0x10001, 64);
InitBigNum(pubkey.KeyTwo, 0x10001, 64);
key_to_bignum(pubkey.key1, Convert.FromBase64String(pubkeyStr), 64);
pubkey.len = bitlen_bignum(pubkey.key1, 64) - 1;
KeyToBigNum(pubkey.KeyOne, Convert.FromBase64String(PublicKeyString), 64);
pubkey.Len = BitLenBigNum(pubkey.KeyOne, 64) - 1;
}
uint len_predata()
uint LenPreData()
{
var a = (pubkey.len - 1) / 8;
var a = (pubkey.Len - 1) / 8;
return (55 / a + 1) * (a + 1);
}
static int cmp_bignum(uint[] n1, uint[] n2, uint len)
static int CompareBigNum(uint[] n1, uint[] n2, uint len)
{
while (len > 0)
{
--len;
if (n1[len] < n2[len]) return -1;
if (n1[len] > n2[len]) return 1;
}
return 0;
}
static void mov_bignum(uint[] dest, uint[] src, uint len)
static void MoveBigNum(uint[] dest, uint[] src, uint len)
{
Array.Copy(src, dest, len);
}
static void shr_bignum(uint[] n, int bits, int len)
static void ShrBigNum(uint[] n, int bits, int len)
{
int i; var i2 = bits / 32;
@@ -149,13 +152,13 @@ namespace OpenRA.FileFormats
for (; i < len; i++) n[i] = 0;
bits = bits % 32;
}
if (bits == 0) return;
for (i = 0; i < len - 1; i++) n[i] = (n[i] >> bits) | (n[i + 1] << (32 -
bits));
for (i = 0; i < len - 1; i++) n[i] = (n[i] >> bits) | (n[i + 1] << (32 - bits));
n[i] = n[i] >> bits;
}
static void shl_bignum(uint[] n, int bits, int len)
static void ShlBigNum(uint[] n, int bits, int len)
{
int i, i2;
@@ -166,26 +169,26 @@ namespace OpenRA.FileFormats
for (; i > 0; i--) n[i] = 0;
bits = bits % 32;
}
if (bits == 0) return;
for (i = len - 1; i > 0; i--) n[i] = (n[i] << bits) | (n[i - 1] >> (32 -
bits));
for (i = len - 1; i > 0; i--) n[i] = (n[i] << bits) | (n[i - 1] >> (32 - bits));
n[0] <<= bits;
}
static uint sub_bignum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
static uint SubBigNum(uint[] dest, uint[] src1, uint[] src2, uint carry, int len)
{
uint i1, i2;
len += len;
unsafe
{
fixed (uint* _ps1 = &src1[0])
fixed (uint* _ps2 = &src2[0])
fixed (uint* _pd = &dest[0])
fixed (uint* tempPs1 = &src1[0])
fixed (uint* tempPs2 = &src2[0])
fixed (uint* tempPd = &dest[0])
{
var ps1 = (ushort*)_ps1;
var ps2 = (ushort*)_ps2;
var pd = (ushort*)_pd;
var ps1 = (ushort*)tempPs1;
var ps2 = (ushort*)tempPs2;
var pd = (ushort*)tempPd;
while (--len != -1)
{
@@ -196,10 +199,11 @@ namespace OpenRA.FileFormats
}
}
}
return carry;
}
static unsafe uint sub_bignum(uint* dest, uint* src1, uint* src2, uint carry, int len)
static unsafe uint SubBigNum(uint* dest, uint* src1, uint* src2, uint carry, int len)
{
uint i1, i2;
@@ -215,36 +219,37 @@ namespace OpenRA.FileFormats
i2 = *ps2++;
*pd++ = (ushort)(i1 - i2 - carry);
if (((i1 - i2 - carry) & 0x10000) != 0) carry = 1; else carry = 0;
}
return carry;
}
static void inv_bignum(uint[] n1, uint[] n2, uint len)
static void InvertBigNum(uint[] n1, uint[] n2, uint len)
{
var n_tmp = new uint[64];
uint n2_bytelen, bit;
int n2_bitlen;
var nTmp = new uint[64];
uint nTwoByteLen, bit;
int nTwoBitLen;
var j = 0;
init_bignum(n_tmp, 0, len);
init_bignum(n1, 0, len);
n2_bitlen = (int)bitlen_bignum(n2, len);
bit = ((uint)1) << (n2_bitlen % 32);
j = ((n2_bitlen + 32) / 32) - 1;
n2_bytelen = (uint)((n2_bitlen - 1) / 32) * 4;
n_tmp[n2_bytelen / 4] |= ((uint)1) << ((n2_bitlen - 1) & 0x1f);
InitBigNum(nTmp, 0, len);
InitBigNum(n1, 0, len);
nTwoBitLen = (int)BitLenBigNum(n2, len);
bit = ((uint)1) << (nTwoBitLen % 32);
j = ((nTwoBitLen + 32) / 32) - 1;
nTwoByteLen = (uint)((nTwoBitLen - 1) / 32) * 4;
nTmp[nTwoByteLen / 4] |= ((uint)1) << ((nTwoBitLen - 1) & 0x1f);
while (n2_bitlen > 0)
while (nTwoBitLen > 0)
{
n2_bitlen--;
shl_bignum(n_tmp, 1, (int)len);
if (cmp_bignum(n_tmp, n2, len) != -1)
nTwoBitLen--;
ShlBigNum(nTmp, 1, (int)len);
if (CompareBigNum(nTmp, n2, len) != -1)
{
sub_bignum(n_tmp, n_tmp, n2, 0, (int)len);
SubBigNum(nTmp, nTmp, n2, 0, (int)len);
n1[j] |= bit;
}
bit >>= 1;
if (bit == 0)
{
@@ -252,44 +257,46 @@ namespace OpenRA.FileFormats
bit = 0x80000000;
}
}
init_bignum(n_tmp, 0, len);
InitBigNum(nTmp, 0, len);
}
static void inc_bignum(uint[] n, uint len)
static void IncrementBigNum(uint[] n, uint len)
{
var i = 0;
while ((++n[i] == 0) && (--len > 0)) i++;
}
void init_two_dw(uint[] n, uint len)
void InitTwoDw(uint[] n, uint len)
{
mov_bignum(glob1, n, len);
glob1_bitlen = bitlen_bignum(glob1, len);
glob1_len_x2 = (glob1_bitlen + 15) / 16;
mov_bignum(glob1_hi, glob1.Skip((int)len_bignum(glob1, len) - 2).ToArray(), 2);
glob1_hi_bitlen = bitlen_bignum(glob1_hi, 2) - 32;
shr_bignum(glob1_hi, (int)glob1_hi_bitlen, 2);
inv_bignum(glob1_hi_inv, glob1_hi, 2);
shr_bignum(glob1_hi_inv, 1, 2);
glob1_hi_bitlen = (glob1_hi_bitlen + 15) % 16 + 1;
inc_bignum(glob1_hi_inv, 2);
if (bitlen_bignum(glob1_hi_inv, 2) > 32)
MoveBigNum(globOne, n, len);
globOneBitLen = BitLenBigNum(globOne, len);
globOneLenXTwo = (globOneBitLen + 15) / 16;
MoveBigNum(globOneHigh, globOne.Skip((int)LenBigNum(globOne, len) - 2).ToArray(), 2);
globOneHighBitLen = BitLenBigNum(globOneHigh, 2) - 32;
ShrBigNum(globOneHigh, (int)globOneHighBitLen, 2);
InvertBigNum(globOneHighInv, globOneHigh, 2);
ShrBigNum(globOneHighInv, 1, 2);
globOneHighBitLen = (globOneHighBitLen + 15) % 16 + 1;
IncrementBigNum(globOneHighInv, 2);
if (BitLenBigNum(globOneHighInv, 2) > 32)
{
shr_bignum(glob1_hi_inv, 1, 2);
glob1_hi_bitlen--;
ShrBigNum(globOneHighInv, 1, 2);
globOneHighBitLen--;
}
glob1_hi_inv_lo = (ushort)glob1_hi_inv[0];
glob1_hi_inv_hi = (ushort)(glob1_hi_inv[0] >> 16);
globOneHighInvLow = (ushort)globOneHighInv[0];
globOneHighInvHigh = (ushort)(globOneHighInv[0] >> 16);
}
static unsafe void mul_bignum_word(ushort* pn1, uint[] n2, uint mul, uint len)
static unsafe void MulBignumWord(ushort* pn1, uint[] n2, uint mul, uint len)
{
uint i, tmp;
unsafe
{
fixed (uint* _pn2 = &n2[0])
fixed (uint* tempPn2 = &n2[0])
{
var pn2 = (ushort*)_pn2;
var pn2 = (ushort*)tempPn2;
tmp = 0;
for (i = 0; i < len; i++)
@@ -305,110 +312,113 @@ namespace OpenRA.FileFormats
}
}
static void mul_bignum(uint[] dest, uint[] src1, uint[] src2, uint len)
static void MulBigNum(uint[] dest, uint[] src1, uint[] src2, uint len)
{
uint i;
uint i;
unsafe
{
fixed( uint * _psrc2 = &src2[0] )
fixed(uint* _pdest = &dest[0])
{
var psrc2 = (ushort*)_psrc2;
var pdest = (ushort*)_pdest;
unsafe
{
fixed (uint* tempSrc2 = &src2[0])
fixed (uint* tempPdest = &dest[0])
{
var psrc2 = (ushort*)tempSrc2;
var pdest = (ushort*)tempPdest;
init_bignum(dest, 0, len * 2);
for (i = 0; i < len * 2; i++)
mul_bignum_word(pdest++, src1, *psrc2++, len * 2);
}
}
InitBigNum(dest, 0, len * 2);
for (i = 0; i < len * 2; i++)
MulBignumWord(pdest++, src1, *psrc2++, len * 2);
}
}
}
static void not_bignum(uint[] n, uint len)
static void NotBigNum(uint[] n, uint len)
{
uint i;
for (i = 0; i < len; i++) n[i] = ~n[i];
uint i;
for (i = 0; i < len; i++) n[i] = ~n[i];
}
static void neg_bignum(uint[] n, uint len)
static void NegBigNum(uint[] n, uint len)
{
not_bignum(n, len);
inc_bignum(n, len);
NotBigNum(n, len);
IncrementBigNum(n, len);
}
unsafe uint get_mulword(uint* n)
unsafe uint GetMulWord(uint* n)
{
var wn = (ushort*)n;
var i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_lo + 0x10000) >> 1)
+ (((*(wn - 2) ^ 0xffff) * glob1_hi_inv_hi + glob1_hi_inv_hi) >> 1) + 1)
>> 16) + ((((*(wn - 1) ^ 0xffff) & 0xffff) * glob1_hi_inv_hi) >> 1) +
(((*wn ^ 0xffff) * glob1_hi_inv_lo) >> 1) + 1) >> 14) + glob1_hi_inv_hi
* (*wn ^ 0xffff) * 2) >> (int)glob1_hi_bitlen);
var i = (uint)((((((((((*(wn - 1) ^ 0xffff) & 0xffff) * globOneHighInvLow + 0x10000) >> 1)
+ (((*(wn - 2) ^ 0xffff) * globOneHighInvHigh + globOneHighInvHigh) >> 1) + 1)
>> 16) + ((((*(wn - 1) ^ 0xffff) & 0xffff) * globOneHighInvHigh) >> 1) +
(((*wn ^ 0xffff) * globOneHighInvLow) >> 1) + 1) >> 14) + globOneHighInvHigh
* (*wn ^ 0xffff) * 2) >> (int)globOneHighBitLen);
if (i > 0xffff) i = 0xffff;
return i & 0xffff;
}
static void dec_bignum(uint[] n, uint len)
static void DecBigNum(uint[] n, uint len)
{
var i = 0;
while ((--n[i] == 0xffffffff) && (--len > 0))
i++;
}
void calc_a_bignum(uint[] n1, uint[] n2, uint[] n3, uint len)
void CalcBigNum(uint[] n1, uint[] n2, uint[] n3, uint len)
{
uint g2_len_x2, len_diff;
uint globTwoXtwo, lenDiff;
unsafe
{
fixed( uint* g1 = &glob1[0])
fixed (uint* g2 = &glob2[0])
fixed (uint* g1 = &globOne[0])
fixed (uint* g2 = &globTwo[0])
{
mul_bignum(glob2, n2, n3, len);
glob2[len * 2] = 0;
g2_len_x2 = len_bignum(glob2, len * 2 + 1) * 2;
if (g2_len_x2 >= glob1_len_x2)
MulBigNum(globTwo, n2, n3, len);
globTwo[len * 2] = 0;
globTwoXtwo = LenBigNum(globTwo, len * 2 + 1) * 2;
if (globTwoXtwo >= globOneLenXTwo)
{
inc_bignum(glob2, len * 2 + 1);
neg_bignum(glob2, len * 2 + 1);
len_diff = g2_len_x2 + 1 - glob1_len_x2;
var esi = ((ushort*)g2) + (1 + g2_len_x2 - glob1_len_x2);
var edi = ((ushort*)g2) + (g2_len_x2 + 1);
for (; len_diff != 0; len_diff--)
IncrementBigNum(globTwo, len * 2 + 1);
NegBigNum(globTwo, len * 2 + 1);
lenDiff = globTwoXtwo + 1 - globOneLenXTwo;
var esi = ((ushort*)g2) + (1 + globTwoXtwo - globOneLenXTwo);
var edi = ((ushort*)g2) + (globTwoXtwo + 1);
for (; lenDiff != 0; lenDiff--)
{
edi--;
var tmp = get_mulword((uint*)edi);
var tmp = GetMulWord((uint*)edi);
esi--;
if (tmp > 0)
{
mul_bignum_word(esi, glob1, tmp, 2 * len);
MulBignumWord(esi, globOne, tmp, 2 * len);
if ((*edi & 0x8000) == 0)
{
if (0 != sub_bignum((uint*)esi, (uint*)esi, g1, 0, (int)len)) (*edi)--;
if (0 != SubBigNum((uint*)esi, (uint*)esi, g1, 0, (int)len))
(*edi)--;
}
}
}
neg_bignum(glob2, len);
dec_bignum(glob2, len);
NegBigNum(globTwo, len);
DecBigNum(globTwo, len);
}
mov_bignum(n1, glob2, len);
MoveBigNum(n1, globTwo, len);
}
}
}
void clear_tmp_vars(uint len)
void ClearTempVars(uint len)
{
init_bignum(glob1, 0, len);
init_bignum(glob2, 0, len);
init_bignum(glob1_hi_inv, 0, 4);
init_bignum(glob1_hi, 0, 4);
glob1_bitlen = 0;
glob1_hi_bitlen = 0;
glob1_len_x2 = 0;
glob1_hi_inv_lo = 0;
glob1_hi_inv_hi = 0;
InitBigNum(globOne, 0, len);
InitBigNum(globTwo, 0, len);
InitBigNum(globOneHighInv, 0, 4);
InitBigNum(globOneHigh, 0, 4);
globOneBitLen = 0;
globOneHighBitLen = 0;
globOneLenXTwo = 0;
globOneHighInvLow = 0;
globOneHighInvHigh = 0;
}
void calc_a_key(uint[] n1, uint[] n2, uint[] n3, uint[] n4, uint len)
void CalcKey(uint[] n1, uint[] n2, uint[] n3, uint[] n4, uint len)
{
var n_tmp = new uint[64];
uint n3_len, n4_len;
@@ -417,19 +427,19 @@ namespace OpenRA.FileFormats
unsafe
{
fixed (uint* _pn3 = &n3[0])
fixed (uint* tempPn3 = &n3[0])
{
var pn3 = _pn3;
var pn3 = tempPn3;
init_bignum(n1, 1, len);
n4_len = len_bignum(n4, len);
init_two_dw(n4, n4_len);
n3_bitlen = (int)bitlen_bignum(n3, n4_len);
InitBigNum(n1, 1, len);
n4_len = LenBigNum(n4, len);
InitTwoDw(n4, n4_len);
n3_bitlen = (int)BitLenBigNum(n3, n4_len);
n3_len = (uint)((n3_bitlen + 31) / 32);
bit_mask = (((uint)1) << ((n3_bitlen - 1) % 32)) >> 1;
pn3 += n3_len - 1;
n3_bitlen--;
mov_bignum(n1, n2, n4_len);
MoveBigNum(n1, n2, n4_len);
while (--n3_bitlen != -1)
{
if (bit_mask == 0)
@@ -437,39 +447,41 @@ namespace OpenRA.FileFormats
bit_mask = 0x80000000;
pn3--;
}
calc_a_bignum(n_tmp, n1, n1, n4_len);
CalcBigNum(n_tmp, n1, n1, n4_len);
if ((*pn3 & bit_mask) != 0)
calc_a_bignum(n1, n_tmp, n2, n4_len);
CalcBigNum(n1, n_tmp, n2, n4_len);
else
mov_bignum(n1, n_tmp, n4_len);
MoveBigNum(n1, n_tmp, n4_len);
bit_mask >>= 1;
}
init_bignum(n_tmp, 0, n4_len);
clear_tmp_vars(len);
InitBigNum(n_tmp, 0, n4_len);
ClearTempVars(len);
}
}
}
static unsafe void memcpy(byte* dest, byte* src, int len)
static unsafe void Memcopy(byte* dest, byte* src, int len)
{
while (len-- != 0) *dest++ = *src++;
}
unsafe void process_predata(byte* pre, uint pre_len, byte *buf)
unsafe void ProcessPredata(byte* pre, uint pre_len, byte* buf)
{
var n2 = new uint[64];
var n3 = new uint[64];
var a = (pubkey.len - 1) / 8;
var a = (pubkey.Len - 1) / 8;
while (a + 1 <= pre_len)
{
init_bignum(n2, 0, 64);
fixed( uint * pn2 = &n2[0] )
memcpy((byte *)pn2, pre, (int)a + 1);
calc_a_key(n3, n2, pubkey.key2, pubkey.key1, 64);
InitBigNum(n2, 0, 64);
fixed (uint* pn2 = &n2[0])
Memcopy((byte*)pn2, pre, (int)a + 1);
CalcKey(n3, n2, pubkey.KeyTwo, pubkey.KeyOne, 64);
fixed( uint * pn3 = &n3[0] )
memcpy(buf, (byte *)pn3, (int)a);
fixed (uint* pn3 = &n3[0])
Memcopy(buf, (byte*)pn3, (int)a);
pre_len -= a + 1;
pre += a + 1;
@@ -479,15 +491,16 @@ namespace OpenRA.FileFormats
public byte[] DecryptKey(byte[] src)
{
init_pubkey();
InitPublicKey();
var dest = new byte[256];
unsafe
{
fixed (byte* pdest = &dest[0])
fixed (byte* psrc = &src[0])
process_predata(psrc, len_predata(), pdest);
ProcessPredata(psrc, LenPreData(), pdest);
}
return dest.Take(56).ToArray();
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,7 +10,6 @@
namespace OpenRA.FileFormats
{
/// <summary>
/// Static class that uses a lookup table to calculates CRC32
/// checksums of input strings.
@@ -104,6 +103,7 @@ namespace OpenRA.FileFormats
crc ^= polynomial;
return crc;
}
public static uint Calculate(byte[] data)
{
return Calculate(data, 0xFFFFFFFF);
@@ -125,6 +125,7 @@ namespace OpenRA.FileFormats
crc ^= polynomial;
return crc;
}
public static unsafe uint Calculate(byte* data, uint len)
{
return Calculate(data, len, 0xFFFFFFFF);

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -50,7 +50,7 @@ namespace OpenRA.FileFormats
if ((count & 0x8000) == 0)
{
// case 2
destIndex += (count & 0x7FFF);
destIndex += count & 0x7FFF;
}
else if ((count & 0x4000) == 0)
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -60,11 +60,10 @@ namespace OpenRA.FileFormats
}
}
public static int DecodeInto(byte[] src, byte[] dest, int srcOffset = 0)
public static int DecodeInto(byte[] src, byte[] dest, int srcOffset = 0, bool reverse = false)
{
var ctx = new FastByteReader(src, srcOffset);
var destIndex = 0;
while (true)
{
var i = ctx.ReadByte();
@@ -75,6 +74,9 @@ namespace OpenRA.FileFormats
var count = ((i & 0x70) >> 4) + 3;
var rpos = ((i & 0xf) << 8) + secondByte;
if (destIndex + count > dest.Length)
return destIndex;
ReplicatePrevious(dest, destIndex, destIndex - rpos, count);
destIndex += count;
}
@@ -104,7 +106,7 @@ namespace OpenRA.FileFormats
{
// case 5
var count = ctx.ReadWord();
var srcIndex = ctx.ReadWord();
var srcIndex = reverse ? destIndex - ctx.ReadWord() : ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
@@ -115,7 +117,7 @@ namespace OpenRA.FileFormats
{
// case 3
var count = count3 + 3;
var srcIndex = ctx.ReadWord();
var srcIndex = reverse ? destIndex - ctx.ReadWord() : ctx.ReadWord();
if (srcIndex >= destIndex)
throw new NotImplementedException("srcIndex >= destIndex {0} {1}".F(srcIndex, destIndex));
@@ -174,10 +176,13 @@ namespace OpenRA.FileFormats
// Command 4: Repeat byte n times
ms.WriteByte(0xFE);
// Low byte
ms.WriteByte((byte)(repeatCount & 0xFF));
// High byte
ms.WriteByte((byte)(repeatCount >> 8));
// Value to repeat
ms.WriteByte(src[offset]);
@@ -185,9 +190,7 @@ namespace OpenRA.FileFormats
blockStart = offset;
}
else
{
offset++;
}
}
// Write what we haven't written up to now

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -22,28 +22,28 @@ namespace OpenRA.FileFormats
public HvaReader(Stream s)
{
// Index swaps for transposing a matrix
var ids = new byte[]{0,4,8,12,1,5,9,13,2,6,10,14};
var ids = new byte[] { 0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14 };
s.Seek(16, SeekOrigin.Begin);
FrameCount = s.ReadUInt32();
LimbCount = s.ReadUInt32();
// Skip limb names
s.Seek(16*LimbCount, SeekOrigin.Current);
Transforms = new float[16*FrameCount*LimbCount];
s.Seek(16 * LimbCount, SeekOrigin.Current);
Transforms = new float[16 * FrameCount * LimbCount];
for (var j = 0; j < FrameCount; j++)
for (var i = 0; i < LimbCount; i++)
{
// Convert to column-major matrices and add the final matrix row
var c = 16*(LimbCount*j + i);
Transforms[c + 3] = 0;
Transforms[c + 7] = 0;
Transforms[c + 11] = 0;
Transforms[c + 15] = 1;
{
// Convert to column-major matrices and add the final matrix row
var c = 16 * (LimbCount * j + i);
Transforms[c + 3] = 0;
Transforms[c + 7] = 0;
Transforms[c + 11] = 0;
Transforms[c + 15] = 1;
for (var k = 0; k < 12; k++)
Transforms[c + ids[k]] = s.ReadFloat();
}
for (var k = 0; k < 12; k++)
Transforms[c + ids[k]] = s.ReadFloat();
}
}
public static HvaReader Load(string filename)

View File

@@ -0,0 +1,44 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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 OpenRA.FileSystem;
namespace OpenRA.FileFormats
{
public class IdxReader
{
public readonly int SoundCount;
public List<IdxEntry> Entries;
public IdxReader(Stream s)
{
s.Seek(0, SeekOrigin.Begin);
var id = s.ReadASCII(4);
if (id != "GABA")
throw new InvalidDataException("Unable to load Idx file, did not find magic id, found {0} instead".F(id));
var two = s.ReadInt32();
if (two != 2)
throw new InvalidDataException("Unable to load Idx file, did not find magic number 2, found {0} instead".F(two));
SoundCount = s.ReadInt32();
Entries = new List<IdxEntry>();
for (var i = 0; i < SoundCount; i++)
Entries.Add(new IdxEntry(s));
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -31,9 +31,9 @@ namespace OpenRA.FileFormats
public static class ImaAdpcmLoader
{
static readonly int[] indexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static readonly int[] stepTable =
{
static readonly int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static readonly int[] StepTable =
{
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
@@ -43,7 +43,7 @@ namespace OpenRA.FileFormats
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
};
static short DecodeImaAdpcmSample(byte b, ref int index, ref int current)
@@ -51,14 +51,14 @@ namespace OpenRA.FileFormats
var sb = (b & 8) != 0;
b &= 7;
var delta = (stepTable[index] * b) / 4 + stepTable[index] / 8;
var delta = (StepTable[index] * b) / 4 + StepTable[index] / 8;
if (sb) delta = -delta;
current += delta;
if (current > short.MaxValue) current = short.MaxValue;
if (current < short.MinValue) current = short.MinValue;
index += indexAdjust[b];
index += IndexAdjust[b];
if (index < 0) index = 0;
if (index > 88) index = 88;

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -22,7 +22,8 @@ namespace OpenRA.FileFormats
public IniFile(Stream s)
{
Load(s);
using (s)
Load(s);
}
public IniFile(params Stream[] streams)
@@ -44,9 +45,9 @@ namespace OpenRA.FileFormats
switch (line[0])
{
case ';': break;
case '[': currentSection = ProcessSection(line); break;
default: ProcessEntry(line, currentSection); break;
case ';': break;
case '[': currentSection = ProcessSection(line); break;
default: ProcessEntry(line, currentSection); break;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -41,7 +41,7 @@ namespace OpenRA.FileFormats
Color[] palette = null;
var data = new List<byte>();
for (; ; )
for (;;)
{
var length = IPAddress.NetworkToHostOrder(br.ReadInt32());
var type = Encoding.UTF8.GetString(br.ReadBytes(4));
@@ -54,7 +54,6 @@ namespace OpenRA.FileFormats
{
case "IHDR":
{
var width = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var height = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var bitDepth = cr.ReadByte();
@@ -67,8 +66,8 @@ namespace OpenRA.FileFormats
if (interlace != 0) throw new InvalidDataException("Interlacing not supported");
bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType));
}
break;
case "PLTE":
@@ -80,23 +79,32 @@ namespace OpenRA.FileFormats
palette[i] = Color.FromArgb(r, g, b);
}
}
break;
case "tRNS":
{
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
break;
case "IDAT":
{
data.AddRange(content);
}
break;
case "IEND":
{
if (bitmap == null)
throw new InvalidDataException("Image header not found.");
var bits = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
@@ -128,6 +136,9 @@ namespace OpenRA.FileFormats
bitmap.UnlockBits(bits);
if (palette == null)
throw new InvalidDataException("Non-Palette indexed PNG are not supported.");
using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
{
var cp = temp.Palette;
@@ -168,8 +179,8 @@ namespace OpenRA.FileFormats
}
[Flags]
enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 };
enum PngFilter { None, Sub, Up, Average, Paeth };
enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 }
enum PngFilter { None, Sub, Up, Average, Paeth }
static PixelFormat MakePixelFormat(byte bitDepth, PngColorType colorType)
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -71,7 +71,7 @@ namespace OpenRA.FileFormats
public void RenameFile(string newFilenameWithoutExtension)
{
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".rep";
var newPath = Path.Combine(Path.GetDirectoryName(FilePath), newFilenameWithoutExtension) + ".orarep";
File.Move(FilePath, newPath);
FilePath = newPath;
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -25,16 +25,28 @@ namespace OpenRA.FileFormats
ushort numColors;
ushort blockWidth;
ushort blockHeight;
byte cbParts;
byte chunkBufferParts;
int2 blocks;
UInt32[] offsets;
uint[] offsets;
uint[] palette;
uint videoFlags; // if 0x10 is set the video is a 16 bit hq video (ts and later)
int sampleRate;
int sampleBits;
int audioChannels;
// Stores a list of subpixels, referenced by the VPTZ chunk
byte[] cbf;
byte[] cbp;
int cbChunk = 0;
int cbOffset = 0;
byte[] cbfBuffer;
// Buffer for loading file subchunks, the maximum chunk size of a file is not defined
// and the header definition for the size of the biggest chunks (color data) isn't accurate.
// But 256k is large enough for all TS videos(< 200k).
byte[] fileBuffer = new byte[256000];
int maxCbfzSize = 256000;
int vtprSize = 0;
int currentChunkBuffer = 0;
int chunkBufferOffset = 0;
// Top half contains block info, bottom half contains references to cbf array
byte[] origData;
@@ -42,9 +54,14 @@ namespace OpenRA.FileFormats
// Final frame output
uint[,] frameData;
byte[] audioData; // audio for this frame: 22050Hz 16bit mono pcm, uncompressed.
bool hasAudio;
public byte[] AudioData { get { return audioData; } }
public int CurrentFrame { get { return currentFrame; } }
public int SampleRate { get { return sampleRate; } }
public int SampleBits { get { return sampleBits; } }
public int AudioChannels { get { return audioChannels; } }
public bool HasAudio { get { return hasAudio; } }
public VqaReader(Stream stream)
{
@@ -53,14 +70,14 @@ namespace OpenRA.FileFormats
// Decode FORM chunk
if (stream.ReadASCII(4) != "FORM")
throw new InvalidDataException("Invalid vqa (invalid FORM section)");
/*var length = */ stream.ReadUInt32();
/*var length = */stream.ReadUInt32();
if (stream.ReadASCII(8) != "WVQAVQHD")
throw new InvalidDataException("Invalid vqa (not WVQAVQHD)");
/* var length = */stream.ReadUInt32();
/*var length2 = */stream.ReadUInt32();
/*var version = */stream.ReadUInt16();
/*var flags = */stream.ReadUInt16();
videoFlags = stream.ReadUInt16();
Frames = stream.ReadUInt16();
Width = stream.ReadUInt16();
Height = stream.ReadUInt16();
@@ -68,7 +85,7 @@ namespace OpenRA.FileFormats
blockWidth = stream.ReadUInt8();
blockHeight = stream.ReadUInt8();
Framerate = stream.ReadUInt8();
cbParts = stream.ReadUInt8();
chunkBufferParts = stream.ReadUInt8();
blocks = new int2(Width / blockWidth, Height / blockHeight);
numColors = stream.ReadUInt16();
@@ -77,30 +94,53 @@ namespace OpenRA.FileFormats
/*var unknown2 = */stream.ReadUInt32();
// Audio
/*var freq = */stream.ReadUInt16();
/*var channels = */stream.ReadByte();
/*var bits = */stream.ReadByte();
/*var unknown3 = */stream.ReadBytes(14);
sampleRate = stream.ReadUInt16();
audioChannels = stream.ReadByte();
sampleBits = stream.ReadByte();
/*var unknown3 =*/stream.ReadUInt32();
/*var unknown4 =*/stream.ReadUInt16();
/*maxCbfzSize =*/stream.ReadUInt32(); // Unreliable
/*var unknown5 =*/stream.ReadUInt32();
var frameSize = Exts.NextPowerOf2(Math.Max(Width, Height));
cbf = new byte[Width*Height];
cbp = new byte[Width*Height];
palette = new uint[numColors];
origData = new byte[2*blocks.X*blocks.Y];
frameData = new uint[frameSize, frameSize];
var type = stream.ReadASCII(4);
if (type != "FINF")
if (IsHqVqa)
{
stream.Seek(27, SeekOrigin.Current);
type = stream.ReadASCII(4);
cbfBuffer = new byte[maxCbfzSize];
cbf = new byte[maxCbfzSize * 3];
origData = new byte[maxCbfzSize];
}
else
{
cbfBuffer = new byte[Width * Height];
cbf = new byte[Width * Height];
cbp = new byte[Width * Height];
origData = new byte[2 * blocks.X * blocks.Y];
}
palette = new uint[numColors];
frameData = new uint[frameSize, frameSize];
var type = stream.ReadASCII(4);
while (type != "FINF")
{
// Sub type is a file tag
if (type[3] == 'F')
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
}
/*var length = */stream.ReadUInt16();
/*var unknown4 = */stream.ReadUInt16();
// Frame offsets
offsets = new UInt32[Frames];
offsets = new uint[Frames];
for (var i = 0; i < Frames; i++)
{
offsets[i] = stream.ReadUInt32();
@@ -116,15 +156,15 @@ namespace OpenRA.FileFormats
public void Reset()
{
currentFrame = cbOffset = cbChunk = 0;
currentFrame = chunkBufferOffset = currentChunkBuffer = 0;
LoadFrame();
}
void CollectAudioData()
{
var ms = new MemoryStream();
var audio1 = new MemoryStream(); // left channel / mono
var audio2 = new MemoryStream(); // right channel
var adpcmIndex = 0;
var compressed = false;
for (var i = 0; i < Frames; i++)
{
@@ -134,17 +174,41 @@ namespace OpenRA.FileFormats
while (stream.Position < end)
{
var type = stream.ReadASCII(4);
if (type == "SN2J")
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
var length = int2.Swap(stream.ReadUInt32());
switch (type)
{
case "SND0":
case "SND2":
var rawAudio = stream.ReadBytes((int)length);
ms.Write(rawAudio);
compressed = (type == "SND2");
if (audioChannels == 0)
throw new NotSupportedException();
else if (audioChannels == 1)
{
var rawAudio = stream.ReadBytes((int)length);
audio1.Write(rawAudio);
}
else
{
var rawAudio = stream.ReadBytes((int)length / 2);
audio1.Write(rawAudio);
rawAudio = stream.ReadBytes((int)length / 2);
audio2.Write(rawAudio);
if (length % 2 != 0)
stream.ReadBytes(2);
}
compressed = type == "SND2";
break;
default:
if (length + stream.Position > stream.Length)
throw new NotSupportedException("Vqa uses unknown Subtype: {0}".F(type));
stream.ReadBytes((int)length);
break;
}
@@ -154,7 +218,37 @@ namespace OpenRA.FileFormats
}
}
audioData = (compressed) ? AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex) : ms.ToArray();
if (audioChannels == 1)
audioData = compressed ? AudLoader.LoadSound(audio1.ToArray(), ref adpcmIndex) : audio1.ToArray();
else
{
byte[] leftData, rightData;
if (!compressed)
{
leftData = audio1.ToArray();
rightData = audio2.ToArray();
}
else
{
adpcmIndex = 0;
leftData = AudLoader.LoadSound(audio1.ToArray(), ref adpcmIndex);
adpcmIndex = 0;
rightData = AudLoader.LoadSound(audio2.ToArray(), ref adpcmIndex);
}
audioData = new byte[rightData.Length + leftData.Length];
var rightIndex = 0;
var leftIndex = 0;
for (var i = 0; i < audioData.Length;)
{
audioData[i++] = leftData[leftIndex++];
audioData[i++] = leftData[leftIndex++];
audioData[i++] = rightData[rightIndex++];
audioData[i++] = rightData[rightIndex++];
}
}
hasAudio = audioData.Length > 0;
}
public void AdvanceFrame()
@@ -170,18 +264,41 @@ namespace OpenRA.FileFormats
// Seek to the start of the frame
stream.Seek(offsets[currentFrame], SeekOrigin.Begin);
var end = (currentFrame < Frames - 1) ? offsets[currentFrame+1] : stream.Length;
var end = (currentFrame < Frames - 1) ? offsets[currentFrame + 1] : stream.Length;
while (stream.Position < end)
{
var type = stream.ReadASCII(4);
var length = int2.Swap(stream.ReadUInt32());
var length = 0U;
if (type == "SN2J")
{
var jmp = int2.Swap(stream.ReadUInt32());
stream.Seek(jmp, SeekOrigin.Current);
type = stream.ReadASCII(4);
if (type == "SND2")
{
length = int2.Swap(stream.ReadUInt32());
stream.Seek(length, SeekOrigin.Current);
type = stream.ReadASCII(4);
}
else
throw new NotSupportedException();
}
switch(type)
length = int2.Swap(stream.ReadUInt32());
switch (type)
{
case "VQFR":
DecodeVQFR(stream);
break;
break;
case "\0VQF":
stream.ReadByte();
DecodeVQFR(stream);
break;
case "VQFL":
DecodeVQFR(stream, "VQFL");
break;
default:
// Don't parse sound here.
stream.ReadBytes((int)length);
@@ -194,7 +311,7 @@ namespace OpenRA.FileFormats
}
// VQA Frame
public void DecodeVQFR(Stream s)
public void DecodeVQFR(Stream s, string parentType = "VQFR")
{
while (true)
{
@@ -203,35 +320,61 @@ namespace OpenRA.FileFormats
var type = s.ReadASCII(4);
var subchunkLength = (int)int2.Swap(s.ReadUInt32());
switch(type)
switch (type)
{
// Full frame-modifier
case "CBFZ":
Format80.DecodeInto(s.ReadBytes(subchunkLength), cbf);
break;
var decodeMode = s.Peek() == 0;
s.ReadBytes(fileBuffer, 0, subchunkLength);
Array.Clear(cbf, 0, cbf.Length);
Array.Clear(cbfBuffer, 0, cbfBuffer.Length);
var decodeCount = 0;
decodeCount = Format80.DecodeInto(fileBuffer, cbfBuffer, decodeMode ? 1 : 0, decodeMode);
if ((videoFlags & 0x10) == 16)
{
var p = 0;
for (var i = 0; i < decodeCount; i += 2)
{
var packed = cbfBuffer[i + 1] << 8 | cbfBuffer[i];
/* 15 bit 0
0rrrrrgg gggbbbbb
HI byte LO byte*/
cbf[p++] = (byte)((packed & 0x7C00) >> 7);
cbf[p++] = (byte)((packed & 0x3E0) >> 2);
cbf[p++] = (byte)((packed & 0x1f) << 3);
}
}
else
{
cbf = cbfBuffer;
}
if (parentType == "VQFL")
return;
break;
case "CBF0":
cbf = s.ReadBytes(subchunkLength);
break;
break;
// frame-modifier chunk
case "CBP0":
case "CBPZ":
// Partial buffer is full; dump and recreate
if (cbChunk == cbParts)
if (currentChunkBuffer == chunkBufferParts)
{
if (type == "CBP0")
cbf = (byte[])cbp.Clone();
else
Format80.DecodeInto(cbp, cbf);
cbOffset = cbChunk = 0;
chunkBufferOffset = currentChunkBuffer = 0;
}
var bytes = s.ReadBytes(subchunkLength);
bytes.CopyTo(cbp,cbOffset);
cbOffset += subchunkLength;
cbChunk++;
break;
bytes.CopyTo(cbp, chunkBufferOffset);
chunkBufferOffset += subchunkLength;
currentChunkBuffer++;
break;
// Palette
case "CPL0":
@@ -242,13 +385,28 @@ namespace OpenRA.FileFormats
var b = (byte)(s.ReadUInt8() << 2);
palette[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
}
break;
break;
// Frame data
case "VPTZ":
Format80.DecodeInto(s.ReadBytes(subchunkLength), origData);
// This is the last subchunk
return;
case "VPRZ":
Array.Clear(origData, 0, origData.Length);
s.ReadBytes(fileBuffer, 0, subchunkLength);
if (fileBuffer[0] != 0)
vtprSize = Format80.DecodeInto(fileBuffer, origData);
else
Format80.DecodeInto(fileBuffer, origData, 1, true);
return;
case "VPTR":
Array.Clear(origData, 0, origData.Length);
s.ReadBytes(origData, 0, subchunkLength);
vtprSize = subchunkLength;
return;
default:
throw new InvalidDataException("Unknown sub-chunk {0}".F(type));
}
@@ -260,19 +418,76 @@ namespace OpenRA.FileFormats
void DecodeFrameData()
{
cachedFrame = currentFrame;
for (var y = 0; y < blocks.Y; y++)
for (var x = 0; x < blocks.X; x++)
if (IsHqVqa)
{
/* The VP?? chunks of the video file contains an array of instructions for
* how the blocks of the finished frame will be filled with color data blocks
* contained in the CBF? chunks.
*/
var p = 0;
for (var y = 0; y < blocks.Y;)
{
var px = origData[x + y*blocks.X];
var mod = origData[x + (y + blocks.Y)*blocks.X];
for (var j = 0; j < blockHeight; j++)
for (var i = 0; i < blockWidth; i++)
for (var x = 0; x < blocks.X;)
{
if (y >= blocks.Y)
break;
// The first 3 bits of the short determine the type of instruction with the rest being one or two parameters.
var val = (int)origData[p++];
val |= origData[p++] << 8;
var para_A = val & 0x1fff;
var para_B1 = val & 0xFF;
var para_B2 = (((val / 256) & 0x1f) + 1) * 2;
switch (val >> 13)
{
var cbfi = (mod*256 + px)*8 + j*blockWidth + i;
var color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y*blockHeight + j, x*blockWidth + i] = palette[color];
case 0:
x += para_A;
break;
case 1:
WriteBlock(para_B1, para_B2, ref x, ref y);
break;
case 2:
WriteBlock(para_B1, 1, ref x, ref y);
for (var i = 0; i < para_B2; i++)
WriteBlock(origData[p++], 1, ref x, ref y);
break;
case 3:
WriteBlock(para_A, 1, ref x, ref y);
break;
case 5:
WriteBlock(para_A, origData[p++], ref x, ref y);
break;
default:
throw new NotSupportedException();
}
}
y++;
}
if (p != vtprSize)
throw new IndexOutOfRangeException();
}
else
{
for (var y = 0; y < blocks.Y; y++)
{
for (var x = 0; x < blocks.X; x++)
{
var px = origData[x + y * blocks.X];
var mod = origData[x + (y + blocks.Y) * blocks.X];
for (var j = 0; j < blockHeight; j++)
{
for (var i = 0; i < blockWidth; i++)
{
var cbfi = (mod * 256 + px) * 8 + j * blockWidth + i;
var color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y * blockHeight + j, x * blockWidth + i] = palette[color];
}
}
}
}
}
}
public uint[,] FrameData
@@ -285,5 +500,33 @@ namespace OpenRA.FileFormats
return frameData;
}
}
bool IsHqVqa { get { return (videoFlags & 0x10) == 16; } }
void WriteBlock(int blockNumber, int count, ref int x, ref int y)
{
for (var i = 0; i < count; i++)
{
var frameX = x * blockWidth;
var frameY = y * blockHeight;
var offset = blockNumber * blockHeight * blockWidth * 3;
for (var by = 0; by < blockHeight; by++)
for (var bx = 0; bx < blockWidth; bx++)
{
var p = (bx + by * blockWidth) * 3;
frameData[frameY + by, frameX + bx] = (uint)(0xFF << 24 | cbf[offset + p] << 16 | cbf[offset + p + 1] << 8 | cbf[offset + p + 2]);
}
x++;
if (x >= blocks.X)
{
x = 0;
y++;
if (y >= blocks.Y && i != count - 1)
throw new IndexOutOfRangeException();
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -38,15 +38,15 @@ namespace OpenRA.FileFormats
public readonly uint LimbCount;
public VxlLimb[] Limbs;
uint BodySize;
uint bodySize;
static void ReadVoxelData(Stream s, VxlLimb l)
{
var baseSize = l.Size[0]*l.Size[1];
var baseSize = l.Size[0] * l.Size[1];
var colStart = new int[baseSize];
for (var i = 0; i < baseSize; i++)
colStart[i] = s.ReadInt32();
s.Seek(4*baseSize, SeekOrigin.Current);
s.Seek(4 * baseSize, SeekOrigin.Current);
var dataStart = s.Position;
// Count the voxels in this limb
@@ -65,12 +65,12 @@ namespace OpenRA.FileFormats
var count = s.ReadUInt8();
z += count;
l.VoxelCount += count;
s.Seek(2*count + 1, SeekOrigin.Current);
s.Seek(2 * count + 1, SeekOrigin.Current);
} while (z < l.Size[2]);
}
// Read the data
l.VoxelMap = new Dictionary<byte, VxlElement>[l.Size[0],l.Size[1]];
l.VoxelMap = new Dictionary<byte, VxlElement>[l.Size[0], l.Size[1]];
for (var i = 0; i < baseSize; i++)
{
// Empty column
@@ -82,7 +82,7 @@ namespace OpenRA.FileFormats
var x = (byte)(i % l.Size[0]);
var y = (byte)(i / l.Size[0]);
byte z = 0;
l.VoxelMap[x,y] = new Dictionary<byte, VxlElement>();
l.VoxelMap[x, y] = new Dictionary<byte, VxlElement>();
do
{
z += s.ReadUInt8();
@@ -93,9 +93,10 @@ namespace OpenRA.FileFormats
v.Color = s.ReadUInt8();
v.Normal = s.ReadUInt8();
l.VoxelMap[x,y].Add(z, v);
l.VoxelMap[x, y].Add(z, v);
z++;
}
// Skip duplicate count
s.ReadUInt8();
} while (z < l.Size[2]);
@@ -104,14 +105,13 @@ namespace OpenRA.FileFormats
public VxlReader(Stream s)
{
if (!s.ReadASCII(16).StartsWith("Voxel Animation"))
throw new InvalidDataException("Invalid vxl header");
s.ReadUInt32();
LimbCount = s.ReadUInt32();
s.ReadUInt32();
BodySize = s.ReadUInt32();
bodySize = s.ReadUInt32();
s.Seek(770, SeekOrigin.Current);
// Read Limb headers
@@ -124,12 +124,12 @@ namespace OpenRA.FileFormats
}
// Skip to the Limb footers
s.Seek(802 + 28*LimbCount + BodySize, SeekOrigin.Begin);
s.Seek(802 + 28 * LimbCount + bodySize, SeekOrigin.Begin);
var LimbDataOffset = new uint[LimbCount];
var limbDataOffset = new uint[LimbCount];
for (var i = 0; i < LimbCount; i++)
{
LimbDataOffset[i] = s.ReadUInt32();
limbDataOffset[i] = s.ReadUInt32();
s.Seek(8, SeekOrigin.Current);
Limbs[i].Scale = s.ReadFloat();
s.Seek(48, SeekOrigin.Current);
@@ -143,7 +143,7 @@ namespace OpenRA.FileFormats
for (var i = 0; i < LimbCount; i++)
{
s.Seek(802 + 28*LimbCount + LimbDataOffset[i], SeekOrigin.Begin);
s.Seek(802 + 28 * LimbCount + limbDataOffset[i], SeekOrigin.Begin);
ReadVoxelData(s, Limbs[i]);
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -30,9 +30,9 @@ namespace OpenRA.FileFormats
public readonly int DataSize;
public readonly byte[] RawOutput;
public enum WaveType { Pcm = 0x1, ImaAdpcm = 0x11 };
public enum WaveType { Pcm = 0x1, ImaAdpcm = 0x11 }
public static WaveType Type { get; private set; }
public WavLoader(Stream s)
{
while (s.Position < s.Length)
@@ -69,6 +69,7 @@ namespace OpenRA.FileFormats
UncompressedSize = s.ReadInt32();
s.ReadBytes(chunkSize - 4);
}
break;
case "data":
DataSize = s.ReadInt32();
@@ -80,6 +81,7 @@ namespace OpenRA.FileFormats
var chunkSize = s.ReadInt32();
s.ReadBytes(chunkSize);
}
break;
}
}
@@ -90,7 +92,7 @@ namespace OpenRA.FileFormats
BitsPerSample = 16;
}
}
public static float WaveLength(Stream s)
{
s.Position = 12;
@@ -127,7 +129,7 @@ namespace OpenRA.FileFormats
// Decode each block of IMA ADPCM data in RawOutput
for (var block = 0; block < numBlocks; block++)
{
// Each block starts with a initial state per-channel
// Each block starts with a initial state per-channel
for (var c = 0; c < Channels; c++)
{
predictor[c] = s.ReadInt16();

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -34,7 +34,7 @@ namespace OpenRA.FileFormats
entries.Add(new string(chars.ToArray()));
// Skip comment
while ((c = reader.ReadChar()) != 0);
while ((c = reader.ReadChar()) != 0) { }
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -47,9 +47,9 @@ namespace OpenRA.FileFormats
using (var writer = new BinaryWriter(data))
{
writer.Write(Encoding.ASCII.GetBytes("XCC by Olaf van der Spek"));
writer.Write(new byte[] {0x1A,0x04,0x17,0x27,0x10,0x19,0x80,0x00});
writer.Write(new byte[] { 0x1A, 0x04, 0x17, 0x27, 0x10, 0x19, 0x80, 0x00 });
writer.Write((int)(Entries.Aggregate(Entries.Length, (a,b) => a + b.Length) + 52)); // Size
writer.Write((int)(Entries.Aggregate(Entries.Length, (a, b) => a + b.Length) + 52)); // Size
writer.Write((int)0); // Type
writer.Write((int)0); // Version
writer.Write((int)0); // Game/Format (0 == TD)
@@ -64,4 +64,4 @@ namespace OpenRA.FileFormats
return data.ToArray();
}
}
}
}

View File

@@ -0,0 +1,187 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using OpenRA.FileFormats;
using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public sealed class BagFile : IFolder
{
static readonly uint[] Nothing = { };
readonly string bagFilename;
readonly Stream s;
readonly int bagFilePriority;
readonly Dictionary<uint, IdxEntry> index;
public BagFile(string filename, int priority)
{
bagFilename = filename;
bagFilePriority = priority;
// A bag file is always accompanied with an .idx counterpart
// For example: audio.bag requires the audio.idx file
var indexFilename = Path.ChangeExtension(filename, ".idx");
// Build the index and dispose the stream, it is no longer needed after this
List<IdxEntry> entries;
using (var indexStream = GlobalFileSystem.Open(indexFilename))
entries = new IdxReader(indexStream).Entries;
index = entries.ToDictionaryWithConflictLog(x => x.Hash,
"{0} (bag format)".F(filename),
null, x => "(offs={0}, len={1})".F(x.Offset, x.Length));
s = GlobalFileSystem.Open(filename);
}
public int Priority { get { return 1000 + bagFilePriority; } }
public string Name { get { return bagFilename; } }
public Stream GetContent(uint hash)
{
IdxEntry entry;
if (!index.TryGetValue(hash, out entry))
return null;
s.Seek(entry.Offset, SeekOrigin.Begin);
var waveHeaderMemoryStream = new MemoryStream();
var channels = (entry.Flags & 1) > 0 ? 2 : 1;
if ((entry.Flags & 2) > 0)
{
// PCM
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("RIFF"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length + 36));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("WAVE"));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fmt "));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(16));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)WavLoader.WaveType.Pcm));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(2 * channels * entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)(2 * channels)));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)16));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("data"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length));
}
if ((entry.Flags & 8) > 0)
{
// IMA ADPCM
var samplesPerChunk = (2 * (entry.ChunkSize - 4)) + 1;
var bytesPerSec = (int)Math.Floor(((double)(2 * entry.ChunkSize) / samplesPerChunk) * ((double)entry.SampleRate / 2));
var chunkSize = entry.ChunkSize > entry.Length ? entry.Length : entry.ChunkSize;
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("RIFF"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length + 52));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("WAVE"));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fmt "));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(20));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)WavLoader.WaveType.ImaAdpcm));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)channels));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.SampleRate));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(bytesPerSec));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)chunkSize));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)4));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)2));
waveHeaderMemoryStream.Write(BitConverter.GetBytes((short)samplesPerChunk));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("fact"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(4));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(4 * entry.Length));
waveHeaderMemoryStream.Write(Encoding.ASCII.GetBytes("data"));
waveHeaderMemoryStream.Write(BitConverter.GetBytes(entry.Length));
}
waveHeaderMemoryStream.Seek(0, SeekOrigin.Begin);
// Construct a merged stream
var mergedStream = new MergedStream(waveHeaderMemoryStream, s);
mergedStream.SetLength(waveHeaderMemoryStream.Length + entry.Length);
return mergedStream;
}
uint? FindMatchingHash(string filename)
{
var hash = IdxEntry.HashFilename(filename, PackageHashType.CRC32);
if (index.ContainsKey(hash))
return hash;
// Maybe we were given a raw hash?
uint raw;
if (!uint.TryParse(filename, NumberStyles.AllowHexSpecifier, CultureInfo.InvariantCulture, out raw))
return null;
if ("{0:X}".F(raw) == filename && index.ContainsKey(raw))
return raw;
return null;
}
public Stream GetContent(string filename)
{
var hash = FindMatchingHash(filename);
return hash.HasValue ? GetContent(hash.Value) : null;
}
public bool Exists(string filename)
{
return FindMatchingHash(filename).HasValue;
}
public IEnumerable<uint> ClassicHashes()
{
return Nothing;
}
public IEnumerable<uint> CrcHashes()
{
return index.Keys;
}
public IEnumerable<string> AllFileNames()
{
var lookup = new Dictionary<uint, string>();
if (GlobalFileSystem.Exists("global mix database.dat"))
{
var db = new XccGlobalDatabase(GlobalFileSystem.Open("global mix database.dat"));
foreach (var e in db.Entries)
{
var hash = IdxEntry.HashFilename(e, PackageHashType.CRC32);
if (!lookup.ContainsKey(hash))
lookup.Add(hash, e);
}
}
return index.Keys.Select(k => lookup.ContainsKey(k) ? lookup[k] : "{0:X}".F(k));
}
public void Write(Dictionary<string, byte[]> contents)
{
GlobalFileSystem.Unmount(this);
throw new NotImplementedException("Updating bag files unsupported");
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -15,37 +15,45 @@ using System.Linq;
namespace OpenRA.FileSystem
{
public class BigFile : IFolder
public sealed class BigFile : IFolder
{
public string Name { get; private set; }
public int Priority { get; private set; }
readonly Dictionary<string, Entry> entries = new Dictionary<string, Entry>();
readonly Stream s;
public BigFile(string filename, int priority)
{
Name = filename;
Priority = priority;
var s = GlobalFileSystem.Open(filename);
if (s.ReadASCII(4) != "BIGF")
throw new InvalidDataException("Header is not BIGF");
// Total archive size.
s.ReadUInt32();
var entryCount = s.ReadUInt32();
if (BitConverter.IsLittleEndian)
entryCount = int2.Swap(entryCount);
// First entry offset? This is apparently bogus for EA's .big files
// and we don't have to try seeking there since the entries typically start next in EA's .big files.
s.ReadUInt32();
for (var i = 0; i < entryCount; i++)
s = GlobalFileSystem.Open(filename);
try
{
var entry = new Entry(s);
entries.Add(entry.Path, entry);
if (s.ReadASCII(4) != "BIGF")
throw new InvalidDataException("Header is not BIGF");
// Total archive size.
s.ReadUInt32();
var entryCount = s.ReadUInt32();
if (BitConverter.IsLittleEndian)
entryCount = int2.Swap(entryCount);
// First entry offset? This is apparently bogus for EA's .big files
// and we don't have to try seeking there since the entries typically start next in EA's .big files.
s.ReadUInt32();
for (var i = 0; i < entryCount; i++)
{
var entry = new Entry(s);
entries.Add(entry.Path, entry);
}
}
catch
{
Dispose();
throw;
}
}
@@ -107,5 +115,10 @@ namespace OpenRA.FileSystem
{
throw new NotImplementedException();
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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.IO;
namespace OpenRA.FileSystem
{
public class D2kSoundResources : IFolder
public sealed class D2kSoundResources : IFolder
{
readonly Stream s;
@@ -30,22 +30,28 @@ namespace OpenRA.FileSystem
this.priority = priority;
s = GlobalFileSystem.Open(filename);
s.Seek(0, SeekOrigin.Begin);
filenames = new List<string>();
var headerLength = s.ReadUInt32();
while (s.Position < headerLength + 4)
try
{
var name = s.ReadASCIIZ();
var offset = s.ReadUInt32();
var length = s.ReadUInt32();
filenames = new List<string>();
var hash = PackageEntry.HashFilename(name, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, offset, length));
var headerLength = s.ReadUInt32();
while (s.Position < headerLength + 4)
{
var name = s.ReadASCIIZ();
var offset = s.ReadUInt32();
var length = s.ReadUInt32();
filenames.Add(name);
var hash = PackageEntry.HashFilename(name, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash, offset, length));
filenames.Add(name);
}
}
catch
{
Dispose();
throw;
}
}
@@ -76,7 +82,7 @@ namespace OpenRA.FileSystem
public string Name { get { return filename; } }
public int Priority { get { return 1000 + priority; }}
public int Priority { get { return 1000 + priority; } }
public IEnumerable<uint> ClassicHashes()
{
@@ -92,5 +98,10 @@ namespace OpenRA.FileSystem
{
throw new NotImplementedException("Cannot save Dune 2000 Sound Resources.");
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -13,7 +13,7 @@ using System.IO;
namespace OpenRA.FileSystem
{
public class Folder : IFolder
public sealed class Folder : IFolder
{
readonly string path;
readonly int priority;
@@ -39,7 +39,7 @@ namespace OpenRA.FileSystem
public Stream GetContent(string filename)
{
try { return File.OpenRead( Path.Combine( path, filename ) ); }
try { return File.OpenRead(Path.Combine(path, filename)); }
catch { return null; }
}
@@ -75,8 +75,10 @@ namespace OpenRA.FileSystem
foreach (var file in contents)
using (var dataStream = File.Create(Path.Combine(path, file.Key)))
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
}
public void Dispose() { }
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -17,7 +17,7 @@ using OpenRA.Primitives;
namespace OpenRA.FileSystem
{
public interface IFolder
public interface IFolder : IDisposable
{
Stream GetContent(string filename);
bool Exists(string filename);
@@ -74,6 +74,8 @@ namespace OpenRA.FileSystem
throw new NotImplementedException("The creation of .PAK archives is unimplemented");
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .big archives is unimplemented");
if (filename.EndsWith(".cab", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("The creation of .cab archives is unimplemented");
return new Folder(filename, order, content);
}
@@ -88,6 +90,7 @@ namespace OpenRA.FileSystem
return new MixFile(filename, type, order);
}
if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
@@ -100,6 +103,10 @@ namespace OpenRA.FileSystem
return new PakFile(filename, order);
if (filename.EndsWith(".big", StringComparison.InvariantCultureIgnoreCase))
return new BigFile(filename, order);
if (filename.EndsWith(".bag", StringComparison.InvariantCultureIgnoreCase))
return new BagFile(filename, order);
if (filename.EndsWith(".hdr", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldCABExtractor(filename, order);
return new Folder(filename, order);
}
@@ -124,6 +131,9 @@ namespace OpenRA.FileSystem
public static void UnmountAll()
{
foreach (var folder in MountedFolders)
folder.Dispose();
MountedFolders.Clear();
FolderPaths.Clear();
classicHashIndex = new Cache<uint, List<IFolder>>(_ => new List<IFolder>());
@@ -132,6 +142,9 @@ namespace OpenRA.FileSystem
public static bool Unmount(IFolder mount)
{
if (MountedFolders.Contains(mount))
mount.Dispose();
return MountedFolders.RemoveAll(f => f == mount) > 0;
}
@@ -163,52 +176,72 @@ namespace OpenRA.FileSystem
return null;
}
public static Stream Open(string filename) { return OpenWithExts(filename, ""); }
public static Stream OpenWithExts(string filename, params string[] exts)
public static Stream Open(string filename)
{
Stream s;
if (!TryOpenWithExts(filename, exts, out s))
if (!TryOpen(filename, 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)
public static bool TryOpen(string name, out Stream s)
{
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1)
{
foreach (var ext in exts)
{
s = GetFromCache(PackageHashType.Classic, filename + ext);
if (s != null)
return true;
var filename = name;
var foldername = string.Empty;
s = GetFromCache(PackageHashType.CRC32, filename + ext);
if (s != null)
return true;
}
// Used for faction specific packages; rule out false positive on Windows C:\ drive notation
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
foldername = divide.First();
filename = divide.Last();
}
foreach (var ext in exts)
// Check the cache for a quick lookup if the folder name is unknown
// TODO: This disables caching for explicit folder requests
if (filename.IndexOfAny(new char[] { '/', '\\' }) == -1 && !explicitFolder)
{
var possibleName = filename + ext;
var folder = MountedFolders
.Where(x => x.Exists(possibleName))
.MaxByOrDefault(x => x.Priority);
if (folder != null)
{
s = folder.GetContent(possibleName);
s = GetFromCache(PackageHashType.Classic, filename);
if (s != null)
return true;
}
s = GetFromCache(PackageHashType.CRC32, filename);
if (s != null)
return true;
}
// Ask each package individually
IFolder folder;
if (explicitFolder && !string.IsNullOrEmpty(foldername))
folder = MountedFolders.Where(x => x.Name == foldername).MaxByOrDefault(x => x.Priority);
else
folder = MountedFolders.Where(x => x.Exists(filename)).MaxByOrDefault(x => x.Priority);
if (folder != null)
{
s = folder.GetContent(filename);
return true;
}
s = null;
return false;
}
public static bool Exists(string filename) { return MountedFolders.Any(f => f.Exists(filename)); }
public static bool Exists(string name)
{
var explicitFolder = name.Contains(':') && !Directory.Exists(Path.GetDirectoryName(name));
if (explicitFolder)
{
var divide = name.Split(':');
var foldername = divide.First();
var filename = divide.Last();
return MountedFolders.Where(n => n.Name == foldername).Any(f => f.Exists(filename));
}
else
return MountedFolders.Any(f => f.Exists(name));
}
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();

View File

@@ -0,0 +1,94 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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.FileSystem
{
public class IdxEntry
{
public const string DefaultExtension = "wav";
public readonly uint Hash;
public readonly string Name;
public readonly string Extension;
public readonly uint Offset;
public readonly uint Length;
public readonly uint SampleRate;
public readonly uint Flags;
public readonly uint ChunkSize;
public IdxEntry(uint hash, uint offset, uint length, uint sampleRate, uint flags, uint chuckSize)
{
Hash = hash;
Offset = offset;
Length = length;
SampleRate = sampleRate;
Flags = flags;
ChunkSize = chuckSize;
}
public IdxEntry(Stream s)
{
var asciiname = s.ReadASCII(16);
var pos = asciiname.IndexOf('\0');
if (pos != 0)
asciiname = asciiname.Substring(0, pos);
Name = asciiname;
Extension = DefaultExtension;
Offset = s.ReadUInt32();
Length = s.ReadUInt32();
SampleRate = s.ReadUInt32();
Flags = s.ReadUInt32();
ChunkSize = s.ReadUInt32();
Hash = HashFilename(string.Concat(Name, ".", Extension), PackageHashType.CRC32);
}
public void Write(BinaryWriter w)
{
w.Write(Name.PadRight(16, '\0'));
w.Write(Offset);
w.Write(Length);
w.Write(SampleRate);
w.Write(Flags);
w.Write(ChunkSize);
}
public override string ToString()
{
string filename;
if (names.TryGetValue(Hash, out filename))
return "{0} - offset 0x{1:x8} - length 0x{2:x8}".F(filename, Offset, Length);
else
return "0x{0:x8} - offset 0x{1:x8} - length 0x{2:x8}".F(Hash, Offset, Length);
}
public static uint HashFilename(string name, PackageHashType type)
{
return PackageEntry.HashFilename(name, type);
}
static Dictionary<uint, string> names = new Dictionary<uint, string>();
public static void AddStandardName(string s)
{
// RA1 and TD
var hash = HashFilename(s, PackageHashType.Classic);
names.Add(hash, s);
// TS
var crcHash = HashFilename(s, PackageHashType.CRC32);
names.Add(crcHash, s);
}
}
}

View File

@@ -0,0 +1,526 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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;
using System.Linq;
using System.Text.RegularExpressions;
using ICSharpCode.SharpZipLib.Zip.Compression;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace OpenRA.FileSystem
{
public class InstallShieldCABExtractor : IDisposable, IFolder
{
const uint FileSplit = 0x1;
const uint FileObfuscated = 0x2;
const uint FileCompressed = 0x4;
const uint FileInvalid = 0x8;
const uint LinkPrev = 0x1;
const uint LinkNext = 0x2;
const uint MaxFileGroupCount = 71;
#region Nested Structs
struct FileGroup
{
public readonly string Name;
public readonly uint FirstFile;
public readonly uint LastFile;
public FileGroup(Stream reader, long offset)
{
var nameOffset = reader.ReadUInt32();
/* unknown */ reader.ReadBytes(18);
FirstFile = reader.ReadUInt32();
LastFile = reader.ReadUInt32();
reader.Seek(offset + (long)nameOffset, SeekOrigin.Begin);
Name = reader.ReadASCIIZ();
}
}
struct VolumeHeader
{
public readonly uint DataOffset;
public readonly uint DataOffsetHigh;
public readonly uint FirstFileIndex;
public readonly uint LastFileIndex;
public readonly uint FirstFileOffset;
public readonly uint FirstFileOffsetHigh;
public readonly uint FirstFileSizeExpanded;
public readonly uint FirstFileSizeExpandedHigh;
public readonly uint FirstFileSizeCompressed;
public readonly uint FirstFileSizeCompressedHigh;
public readonly uint LastFileOffset;
public readonly uint LastFileOffsetHigh;
public readonly uint LastFileSizeExpanded;
public readonly uint LastFileSizeExpandedHigh;
public readonly uint LastFileSizeCompressed;
public readonly uint LastFileSizeCompressedHigh;
public VolumeHeader(Stream reader)
{
DataOffset = reader.ReadUInt32();
DataOffsetHigh = reader.ReadUInt32();
FirstFileIndex = reader.ReadUInt32();
LastFileIndex = reader.ReadUInt32();
FirstFileOffset = reader.ReadUInt32();
FirstFileOffsetHigh = reader.ReadUInt32();
FirstFileSizeExpanded = reader.ReadUInt32();
FirstFileSizeExpandedHigh = reader.ReadUInt32();
FirstFileSizeCompressed = reader.ReadUInt32();
FirstFileSizeCompressedHigh = reader.ReadUInt32();
LastFileOffset = reader.ReadUInt32();
LastFileOffsetHigh = reader.ReadUInt32();
LastFileSizeExpanded = reader.ReadUInt32();
LastFileSizeExpandedHigh = reader.ReadUInt32();
LastFileSizeCompressed = reader.ReadUInt32();
LastFileSizeCompressedHigh = reader.ReadUInt32();
}
}
struct CommonHeader
{
public const long Size = 16;
public readonly uint Version;
public readonly uint VolumeInfo;
public readonly long CabDescriptorOffset;
public readonly uint CabDescriptorSize;
public CommonHeader(Stream reader)
{
Version = reader.ReadUInt32();
VolumeInfo = reader.ReadUInt32();
CabDescriptorOffset = (long)reader.ReadUInt32();
CabDescriptorSize = reader.ReadUInt32();
}
}
struct CabDescriptor
{
public readonly long FileTableOffset;
public readonly uint FileTableSize;
public readonly uint FileTableSize2;
public readonly uint DirectoryCount;
public readonly uint FileCount;
public readonly long FileTableOffset2;
public CabDescriptor(Stream reader, CommonHeader commonHeader)
{
reader.Seek(commonHeader.CabDescriptorOffset + 12, SeekOrigin.Begin);
FileTableOffset = (long)reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
FileTableSize = reader.ReadUInt32();
FileTableSize2 = reader.ReadUInt32();
DirectoryCount = reader.ReadUInt32();
/* unknown */ reader.ReadBytes(8);
FileCount = reader.ReadUInt32();
FileTableOffset2 = (long)reader.ReadUInt32();
}
}
struct FileDescriptor
{
public readonly ushort Flags;
public readonly uint ExpandedSize;
public readonly uint CompressedSize;
public readonly uint DataOffset;
public readonly byte[] MD5;
public readonly uint NameOffset;
public readonly ushort DirectoryIndex;
public readonly uint LinkToPrevious;
public readonly uint LinkToNext;
public readonly byte LinkFlags;
public readonly ushort Volume;
public readonly string Filename;
public FileDescriptor(Stream reader, long tableOffset)
{
Flags = reader.ReadUInt16();
ExpandedSize = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
CompressedSize = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
DataOffset = reader.ReadUInt32();
/* unknown */ reader.ReadUInt32();
MD5 = reader.ReadBytes(16);
/* unknown */ reader.ReadBytes(16);
NameOffset = reader.ReadUInt32();
DirectoryIndex = reader.ReadUInt16();
/* unknown */ reader.ReadBytes(12);
LinkToPrevious = reader.ReadUInt32();
LinkToNext = reader.ReadUInt32();
LinkFlags = reader.ReadBytes(1)[0];
Volume = reader.ReadUInt16();
var posSave = reader.Position;
reader.Seek(tableOffset + NameOffset, SeekOrigin.Begin);
Filename = reader.ReadASCIIZ();
reader.Seek(posSave, SeekOrigin.Begin);
}
}
class CabReader : IDisposable
{
readonly FileDescriptor fileDes;
public uint RemainingArchiveStream;
public uint RemainingFileStream;
readonly uint index;
readonly string commonName;
ushort volumeNumber;
Stream cabFile;
public CabReader(FileDescriptor fileDes, uint index, string commonName)
{
this.fileDes = fileDes;
this.index = index;
this.commonName = commonName;
volumeNumber = (ushort)((uint)fileDes.Volume - 1u);
RemainingArchiveStream = 0;
if ((fileDes.Flags & FileCompressed) > 0)
RemainingFileStream = fileDes.CompressedSize;
else
RemainingFileStream = fileDes.ExpandedSize;
cabFile = null;
NextFile();
}
public void CopyTo(Stream dest)
{
if ((fileDes.Flags & FileCompressed) != 0)
{
var inf = new Inflater(true);
var buffer = new byte[165535];
do
{
var bytesToExtract = cabFile.ReadUInt16();
RemainingArchiveStream -= 2u;
RemainingFileStream -= 2u;
inf.SetInput(GetBytes(bytesToExtract));
RemainingFileStream -= bytesToExtract;
while (!inf.IsNeedingInput)
{
var inflated = inf.Inflate(buffer);
dest.Write(buffer, 0, inflated);
}
inf.Reset();
}
while (RemainingFileStream > 0);
}
else
{
do
{
RemainingFileStream -= RemainingArchiveStream;
dest.Write(GetBytes(RemainingArchiveStream), 0, (int)RemainingArchiveStream);
}
while (RemainingFileStream > 0);
}
}
public byte[] GetBytes(uint count)
{
if (count < RemainingArchiveStream)
{
RemainingArchiveStream -= count;
return cabFile.ReadBytes((int)count);
}
else
{
var outArray = new byte[count];
var read = cabFile.Read(outArray, 0, (int)RemainingArchiveStream);
if (RemainingFileStream > RemainingArchiveStream)
{
NextFile();
RemainingArchiveStream -= (uint)cabFile.Read(outArray, read, (int)count - read);
}
return outArray;
}
}
public void Dispose()
{
cabFile.Dispose();
}
public void NextFile()
{
if (cabFile != null)
cabFile.Dispose();
++volumeNumber;
cabFile = GlobalFileSystem.Open("{0}{1}.cab".F(commonName, volumeNumber));
if (cabFile.ReadUInt32() != 0x28635349)
throw new InvalidDataException("Not an Installshield CAB package");
uint fileOffset;
if ((fileDes.Flags & FileSplit) != 0)
{
cabFile.Seek(CommonHeader.Size, SeekOrigin.Current);
var head = new VolumeHeader(cabFile);
if (index == head.LastFileIndex)
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = head.LastFileSizeCompressed;
else
RemainingArchiveStream = head.LastFileSizeExpanded;
fileOffset = head.LastFileOffset;
}
else if (index == head.FirstFileIndex)
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = head.FirstFileSizeCompressed;
else
RemainingArchiveStream = head.FirstFileSizeExpanded;
fileOffset = head.FirstFileOffset;
}
else
throw new Exception("Cannot Resolve Remaining Stream");
}
else
{
if ((fileDes.Flags & FileCompressed) != 0)
RemainingArchiveStream = fileDes.CompressedSize;
else
RemainingArchiveStream = fileDes.ExpandedSize;
fileOffset = fileDes.DataOffset;
}
cabFile.Seek(fileOffset, SeekOrigin.Begin);
}
}
#endregion
readonly Stream hdrFile;
readonly CommonHeader commonHeader;
readonly CabDescriptor cabDescriptor;
readonly List<uint> directoryTable;
readonly Dictionary<uint, string> directoryNames = new Dictionary<uint, string>();
readonly Dictionary<uint, FileDescriptor> fileDescriptors = new Dictionary<uint, FileDescriptor>();
readonly Dictionary<string, uint> fileLookup = new Dictionary<string, uint>();
int priority;
string commonName;
public int Priority { get { return priority; } }
public string Name { get { return commonName; } }
public InstallShieldCABExtractor(string hdrFilename, int priority = -1)
{
var fileGroups = new List<FileGroup>();
var fileGroupOffsets = new List<uint>();
this.priority = priority;
hdrFile = GlobalFileSystem.Open(hdrFilename);
// Strips archive number AND file extension
commonName = Regex.Replace(hdrFilename, @"\d*\.[^\.]*$", "");
var signature = hdrFile.ReadUInt32();
if (signature != 0x28635349)
throw new InvalidDataException("Not an Installshield CAB package");
commonHeader = new CommonHeader(hdrFile);
cabDescriptor = new CabDescriptor(hdrFile, commonHeader);
/* unknown */ hdrFile.ReadBytes(14);
for (var i = 0U; i < MaxFileGroupCount; ++i)
fileGroupOffsets.Add(hdrFile.ReadUInt32());
hdrFile.Seek(commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset, SeekOrigin.Begin);
directoryTable = new List<uint>();
for (var i = 0U; i < cabDescriptor.DirectoryCount; ++i)
directoryTable.Add(hdrFile.ReadUInt32());
foreach (var offset in fileGroupOffsets)
{
var nextOffset = offset;
while (nextOffset != 0)
{
hdrFile.Seek((long)nextOffset + 4 + commonHeader.CabDescriptorOffset, SeekOrigin.Begin);
var descriptorOffset = hdrFile.ReadUInt32();
nextOffset = hdrFile.ReadUInt32();
hdrFile.Seek((long)descriptorOffset + commonHeader.CabDescriptorOffset, SeekOrigin.Begin);
fileGroups.Add(new FileGroup(hdrFile, commonHeader.CabDescriptorOffset));
}
}
hdrFile.Seek(commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset + cabDescriptor.FileTableOffset2, SeekOrigin.Begin);
foreach (var fileGroup in fileGroups)
{
for (var index = fileGroup.FirstFile; index <= fileGroup.LastFile; ++index)
{
AddFileDescriptorToList(index);
var fileDescriptor = fileDescriptors[index];
var fullFilePath = "{0}\\{1}\\{2}".F(fileGroup.Name, DirectoryName((uint)fileDescriptor.DirectoryIndex), fileDescriptor.Filename);
fileLookup.Add(fullFilePath, index);
}
}
}
public string DirectoryName(uint index)
{
if (directoryNames.ContainsKey(index))
return directoryNames[index];
hdrFile.Seek(commonHeader.CabDescriptorOffset +
cabDescriptor.FileTableOffset +
directoryTable[(int)index],
SeekOrigin.Begin);
var test = hdrFile.ReadASCIIZ();
return test;
}
public bool Exists(string filename)
{
return fileLookup.ContainsKey(filename);
}
public uint DirectoryCount()
{
return cabDescriptor.DirectoryCount;
}
public string FileName(uint index)
{
if (!fileDescriptors.ContainsKey(index))
AddFileDescriptorToList(index);
return fileDescriptors[index].Filename;
}
void AddFileDescriptorToList(uint index)
{
hdrFile.Seek(commonHeader.CabDescriptorOffset +
cabDescriptor.FileTableOffset +
cabDescriptor.FileTableOffset2 +
index * 0x57,
SeekOrigin.Begin);
var fd = new FileDescriptor(hdrFile,
commonHeader.CabDescriptorOffset + cabDescriptor.FileTableOffset);
fileDescriptors.Add(index, fd);
}
public uint FileCount()
{
return cabDescriptor.FileCount;
}
public void ExtractFile(uint index, string fileName)
{
using (var destfile = File.Open(fileName, FileMode.Create))
GetContentById(index, destfile);
}
public void Write(Dictionary<string, byte[]> input)
{
throw new NotImplementedException("Cannot Add Files To Cab");
}
public IEnumerable<uint> ClassicHashes()
{
return fileLookup.Keys.Select(k => PackageEntry.HashFilename(k, PackageHashType.Classic));
}
public Stream GetContentById(uint index)
{
var fileDes = fileDescriptors[index];
if ((fileDes.Flags & FileInvalid) != 0)
throw new Exception("File Invalid");
if ((fileDes.LinkFlags & LinkPrev) != 0)
return GetContentById(fileDes.LinkToPrevious);
if ((fileDes.Flags & FileObfuscated) != 0)
throw new NotImplementedException("Haven't implemented obfustcated files");
var output = new MemoryStream((int)fileDes.ExpandedSize);
using (var reader = new CabReader(fileDes, index, commonName))
reader.CopyTo(output);
if (output.Length != fileDes.ExpandedSize)
throw new Exception("Did not fully extract Expected = {0}, Got = {1}".F(fileDes.ExpandedSize, output.Length));
output.Position = 0;
return output;
}
public void GetContentById(uint index, Stream output)
{
var fileDes = fileDescriptors[index];
if ((fileDes.Flags & FileInvalid) != 0)
throw new Exception("File Invalid");
if ((fileDes.LinkFlags & LinkPrev) != 0)
{
GetContentById(fileDes.LinkToPrevious, output);
return;
}
if ((fileDes.Flags & FileObfuscated) != 0)
throw new NotImplementedException("Haven't implemented obfustcated files");
using (var reader = new CabReader(fileDes, index, commonName))
reader.CopyTo(output);
if (output.Length != fileDes.ExpandedSize)
throw new Exception("Did not fully extract Expected = {0}, Got = {1}".F(fileDes.ExpandedSize, output.Length));
}
public Stream GetContent(string fileName)
{
return GetContentById(fileLookup[fileName]);
}
public IEnumerable<uint> CrcHashes()
{
yield break;
}
public IEnumerable<string> AllFileNames()
{
return fileLookup.Keys;
}
public void Dispose()
{
hdrFile.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -15,7 +15,7 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public class InstallShieldPackage : IFolder
public sealed class InstallShieldPackage : IFolder
{
readonly Dictionary<uint, PackageEntry> index = new Dictionary<uint, PackageEntry>();
readonly List<string> filenames;
@@ -28,72 +28,81 @@ namespace OpenRA.FileSystem
{
this.filename = filename;
this.priority = priority;
filenames = new List<string>();
s = GlobalFileSystem.Open(filename);
try
{
// Parse package header
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
// Parse package header
var reader = new BinaryReader(s);
var signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var tocAddress = reader.ReadInt32();
reader.ReadBytes(4);
var dirCount = reader.ReadUInt16();
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var TOCAddress = reader.ReadInt32();
reader.ReadBytes(4);
var DirCount = reader.ReadUInt16();
// Parse the directory list
s.Seek(tocAddress, SeekOrigin.Begin);
var tocReader = new BinaryReader(s);
// Parse the directory list
s.Seek(TOCAddress, SeekOrigin.Begin);
var TOCreader = new BinaryReader(s);
var fileCountInDirs = new List<uint>();
var fileCountInDirs = new List<uint>();
// Parse directories
for (var i = 0; i < DirCount; i++)
fileCountInDirs.Add(ParseDirectory(TOCreader));
// Parse files
foreach (var fileCount in fileCountInDirs)
for (var i = 0; i < fileCount; i++)
ParseFile(reader);
// Parse directories
for (var i = 0; i < dirCount; i++)
fileCountInDirs.Add(ParseDirectory(tocReader));
// Parse files
foreach (var fileCount in fileCountInDirs)
for (var i = 0; i < fileCount; i++)
ParseFile(reader);
}
catch
{
Dispose();
throw;
}
}
static uint ParseDirectory(BinaryReader reader)
{
// Parse directory header
var FileCount = reader.ReadUInt16();
var ChunkSize = reader.ReadUInt16();
var NameLength = reader.ReadUInt16();
reader.ReadChars(NameLength); //var DirName = new String(reader.ReadChars(NameLength));
var fileCount = reader.ReadUInt16();
var chunkSize = reader.ReadUInt16();
var nameLength = reader.ReadUInt16();
reader.ReadChars(nameLength); // var DirName = new String(reader.ReadChars(NameLength));
// Skip to the end of the chunk
reader.ReadBytes(ChunkSize - NameLength - 6);
return FileCount;
reader.ReadBytes(chunkSize - nameLength - 6);
return fileCount;
}
uint AccumulatedData = 0;
uint accumulatedData = 0;
void ParseFile(BinaryReader reader)
{
reader.ReadBytes(7);
var CompressedSize = reader.ReadUInt32();
var compressedSize = reader.ReadUInt32();
reader.ReadBytes(12);
var ChunkSize = reader.ReadUInt16();
var chunkSize = reader.ReadUInt16();
reader.ReadBytes(4);
var NameLength = reader.ReadByte();
var FileName = new String(reader.ReadChars(NameLength));
var nameLength = reader.ReadByte();
var fileName = new string(reader.ReadChars(nameLength));
var hash = PackageEntry.HashFilename(FileName, PackageHashType.Classic);
var hash = PackageEntry.HashFilename(fileName, PackageHashType.Classic);
if (!index.ContainsKey(hash))
index.Add(hash, new PackageEntry(hash,AccumulatedData, CompressedSize));
filenames.Add(FileName);
AccumulatedData += CompressedSize;
index.Add(hash, new PackageEntry(hash, accumulatedData, compressedSize));
filenames.Add(fileName);
accumulatedData += compressedSize;
// Skip to the end of the chunk
reader.ReadBytes(ChunkSize - NameLength - 30);
reader.ReadBytes(chunkSize - nameLength - 30);
}
public Stream GetContent(uint hash)
@@ -133,12 +142,17 @@ namespace OpenRA.FileSystem
return index.ContainsKey(PackageEntry.HashFilename(filename, PackageHashType.Classic));
}
public int Priority { get { return 2000 + priority; }}
public int Priority { get { return 2000 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save InstallShieldPackages.");
}
public void Dispose()
{
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -17,7 +17,7 @@ using OpenRA.FileFormats;
namespace OpenRA.FileSystem
{
public sealed class MixFile : IFolder, IDisposable
public sealed class MixFile : IFolder
{
readonly Dictionary<uint, PackageEntry> index;
readonly long dataStart;
@@ -37,9 +37,17 @@ namespace OpenRA.FileSystem
File.Delete(filename);
s = File.Create(filename);
index = new Dictionary<uint, PackageEntry>();
contents.Add("local mix database.dat", new XccLocalDatabase(contents.Keys.Append("local mix database.dat")).Data());
Write(contents);
try
{
index = new Dictionary<uint, PackageEntry>();
contents.Add("local mix database.dat", new XccLocalDatabase(contents.Keys.Append("local mix database.dat")).Data());
Write(contents);
}
catch
{
Dispose();
throw;
}
}
public MixFile(string filename, PackageHashType type, int priority)
@@ -47,30 +55,36 @@ namespace OpenRA.FileSystem
this.filename = filename;
this.priority = priority;
this.type = type;
s = GlobalFileSystem.Open(filename);
// Detect format type
s.Seek(0, SeekOrigin.Begin);
var isCncMix = s.ReadUInt16() != 0;
// The C&C mix format doesn't contain any flags or encryption
var isEncrypted = false;
if (!isCncMix)
isEncrypted = (s.ReadUInt16() & 0x2) != 0;
List<PackageEntry> entries;
if (isEncrypted)
try
{
long unused;
entries = ParseHeader(DecryptHeader(s, 4, out dataStart), 0, out unused);
}
else
entries = ParseHeader(s, isCncMix ? 0 : 4, out dataStart);
// Detect format type
var isCncMix = s.ReadUInt16() != 0;
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)
);
// The C&C mix format doesn't contain any flags or encryption
var isEncrypted = false;
if (!isCncMix)
isEncrypted = (s.ReadUInt16() & 0x2) != 0;
List<PackageEntry> entries;
if (isEncrypted)
{
long unused;
entries = ParseHeader(DecryptHeader(s, 4, out dataStart), 0, out unused);
}
else
entries = ParseHeader(s, isCncMix ? 0 : 4, out dataStart);
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));
}
catch (Exception)
{
Dispose();
throw;
}
}
static List<PackageEntry> ParseHeader(Stream s, long offset, out long headerEnd)
@@ -83,7 +97,7 @@ namespace OpenRA.FileSystem
for (var i = 0; i < numFiles; i++)
items.Add(new PackageEntry(s));
headerEnd = offset + 6 + numFiles*PackageEntry.Size;
headerEnd = offset + 6 + numFiles * PackageEntry.Size;
return items;
}
@@ -101,8 +115,8 @@ namespace OpenRA.FileSystem
var numFiles = ms.ReadUInt16();
// Decrypt the full header - round bytes up to a full block
var blockCount = (13 + numFiles*PackageEntry.Size)/8;
headerEnd = offset + 80 + blockCount*8;
var blockCount = (13 + numFiles * PackageEntry.Size) / 8;
headerEnd = offset + 80 + blockCount * 8;
return Decrypt(ReadBlocks(s, offset + 80, blockCount), fish);
}
@@ -113,7 +127,7 @@ namespace OpenRA.FileSystem
var ms = new MemoryStream();
var writer = new BinaryWriter(ms);
foreach(var t in decrypted)
foreach (var t in decrypted)
writer.Write(t);
writer.Flush();
@@ -123,10 +137,19 @@ namespace OpenRA.FileSystem
static uint[] ReadBlocks(Stream s, long offset, int count)
{
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", "Non-negative number required.");
if (count < 0)
throw new ArgumentOutOfRangeException("count", "Non-negative number required.");
if (offset + (count * 2) > s.Length)
throw new ArgumentException("Bytes to read {0} and offset {1} greater than stream length {2}.".F(count * 2, offset, s.Length));
s.Seek(offset, SeekOrigin.Begin);
// A block is a single encryption unit (represented as two 32-bit integers)
var ret = new uint[2*count];
var ret = new uint[2 * count];
for (var i = 0; i < ret.Length; i++)
ret[i] = s.ReadUInt32();
@@ -167,7 +190,7 @@ namespace OpenRA.FileSystem
return hash.HasValue ? GetContent(hash.Value) : null;
}
static readonly uint[] Nothing = {};
static readonly uint[] Nothing = { };
public IEnumerable<uint> ClassicHashes()
{
if (type == PackageHashType.Classic)
@@ -219,7 +242,7 @@ namespace OpenRA.FileSystem
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
public void Write(Dictionary<string, byte[]> contents)
{
// Cannot modify existing mixfile - rename existing file and
@@ -261,8 +284,7 @@ namespace OpenRA.FileSystem
public void Dispose()
{
if (s != null)
s.Dispose();
s.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -20,6 +20,7 @@ namespace OpenRA.FileSystem
public class PackageEntry
{
public const int Size = 12;
public readonly uint Hash;
public readonly uint Offset;
public readonly uint Length;
@@ -48,7 +49,7 @@ namespace OpenRA.FileSystem
public override string ToString()
{
string filename;
if (Names.TryGetValue(Hash, out filename))
if (names.TryGetValue(Hash, out filename))
return "{0} - offset 0x{1:x8} - length 0x{2:x8}".F(filename, Offset, Length);
else
return "0x{0:x8} - offset 0x{1:x8} - length 0x{2:x8}".F(Hash, Offset, Length);
@@ -56,55 +57,54 @@ namespace OpenRA.FileSystem
public static uint HashFilename(string name, PackageHashType type)
{
switch(type)
switch (type)
{
case PackageHashType.Classic:
{
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
var ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
var reader = new BinaryReader(ms);
var len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}
case PackageHashType.CRC32:
{
name = name.ToUpperInvariant();
var l = name.Length;
var a = l >> 2;
if ((l & 3) != 0)
case PackageHashType.Classic:
{
name += (char)(l - (a << 2));
var i = 3 - (l & 3);
while (i-- != 0)
name += name[a << 2];
}
return CRC32.Calculate(Encoding.ASCII.GetBytes(name));
}
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
default: throw new NotImplementedException("Unknown hash type `{0}`".F(type));
using (var ms = new MemoryStream(Encoding.ASCII.GetBytes(name)))
{
var len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + ms.ReadUInt32();
return result;
}
}
case PackageHashType.CRC32:
{
name = name.ToUpperInvariant();
var l = name.Length;
var a = l >> 2;
if ((l & 3) != 0)
{
name += (char)(l - (a << 2));
var i = 3 - (l & 3);
while (i-- != 0)
name += name[a << 2];
}
return CRC32.Calculate(Encoding.ASCII.GetBytes(name));
}
default: throw new NotImplementedException("Unknown hash type `{0}`".F(type));
}
}
static Dictionary<uint, string> Names = new Dictionary<uint,string>();
static Dictionary<uint, string> names = new Dictionary<uint, string>();
public static void AddStandardName(string s)
{
var hash = HashFilename(s, PackageHashType.Classic); // RA1 and TD
Names.Add(hash, s);
names.Add(hash, s);
var crcHash = HashFilename(s, PackageHashType.CRC32); // TS
Names.Add(crcHash, s);
names.Add(crcHash, s);
}
public const int Size = 12;
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -21,34 +21,42 @@ namespace OpenRA.FileSystem
public string Filename;
}
public class PakFile : IFolder
public sealed class PakFile : IFolder
{
string filename;
int priority;
Dictionary<string, Entry> index;
Stream stream;
readonly string filename;
readonly int priority;
readonly Dictionary<string, Entry> index;
readonly 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)
try
{
var file = stream.ReadASCIIZ();
var next = stream.ReadUInt32();
var length = (next == 0 ? (uint)stream.Length : next) - offset;
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;
// Ignore duplicate files
if (index.ContainsKey(file))
continue;
index.Add(file, new Entry { Offset = offset, Length = length, Filename = file });
offset = next;
index.Add(file, new Entry { Offset = offset, Length = length, Filename = file });
offset = next;
}
}
catch
{
Dispose();
throw;
}
}
@@ -92,5 +100,10 @@ namespace OpenRA.FileSystem
public int Priority { get { return 1000 + priority; } }
public string Name { get { return filename; } }
public void Dispose()
{
stream.Dispose();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -17,11 +17,11 @@ using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileSystem
{
public sealed class ZipFile : IFolder, IDisposable
public sealed class ZipFile : IFolder
{
string filename;
readonly string filename;
readonly int priority;
SZipFile pkg;
int priority;
static ZipFile()
{
@@ -58,7 +58,11 @@ namespace OpenRA.FileSystem
public Stream GetContent(string filename)
{
using (var z = pkg.GetInputStream(pkg.GetEntry(filename)))
var entry = pkg.GetEntry(filename);
if (entry == null)
return null;
using (var z = pkg.GetInputStream(entry))
{
var ms = new MemoryStream();
z.CopyTo(ms);

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,11 +11,11 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Net;
using System.Threading;
using MaxMind.GeoIP2;
using OpenRA.FileSystem;
using OpenRA.Graphics;
using OpenRA.Network;
@@ -27,13 +27,16 @@ namespace OpenRA
{
public static class Game
{
public static MouseButtonPreference mouseButtonPreference = new MouseButtonPreference();
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 ModData modData;
public static ModData ModData;
public static Settings Settings;
public static ICursor Cursor;
static WorldRenderer worldRenderer;
internal static OrderManager orderManager;
internal static OrderManager OrderManager;
static Server.Server server;
public static MersenneTwister CosmeticRandom = new MersenneTwister(); // not synced
@@ -41,30 +44,28 @@ namespace OpenRA
public static Renderer Renderer;
public static bool HasInputFocus = false;
public static DatabaseReader GeoIpDatabase;
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
{
IConnection connection = new NetworkConnection(host, port);
if (recordReplay)
connection = new ReplayRecorderConnection(connection, ChooseReplayFilename);
connection = new ReplayRecorderConnection(connection, TimestampedFilename);
var om = new OrderManager(host, port, password, connection);
JoinInner(om);
return om;
}
static string ChooseReplayFilename()
static string TimestampedFilename()
{
return DateTime.UtcNow.ToString("OpenRA-yyyy-MM-ddTHHmmssZ");
}
static void JoinInner(OrderManager om)
{
if (orderManager != null) orderManager.Dispose();
orderManager = om;
if (OrderManager != null) OrderManager.Dispose();
OrderManager = om;
lastConnectionState = ConnectionState.PreConnecting;
ConnectionStateChanged(orderManager);
ConnectionStateChanged(OrderManager);
}
public static void JoinReplay(string replayFile)
@@ -82,20 +83,23 @@ namespace OpenRA
public static int RunTime { get { return (int)Game.stopwatch.ElapsedMilliseconds; } }
public static int RenderFrame = 0;
public static int NetFrameNumber { get { return orderManager.NetFrameNumber; } }
public static int LocalTick { get { return orderManager.LocalFrameNumber; } }
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 int NetFrameNumber { get { return OrderManager.NetFrameNumber; } }
public static int LocalTick { get { return OrderManager.LocalFrameNumber; } }
public static event Action<string, int> OnRemoteDirectConnect = (a, b) => { };
public static event Action<OrderManager> ConnectionStateChanged = _ => { };
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
public static int LocalClientId { get { return orderManager.Connection.LocalClientId; } }
public static int LocalClientId { get { return OrderManager.Connection.LocalClientId; } }
public static void RemoteDirectConnect(string host, int port)
{
OnRemoteDirectConnect(host, port);
}
// 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
@@ -104,8 +108,8 @@ namespace OpenRA
{
return Ui.OpenWindow(widget, new WidgetArgs(args)
{
{ "world", worldRenderer.world },
{ "orderManager", orderManager },
{ "world", worldRenderer.World },
{ "orderManager", OrderManager },
{ "worldRenderer", worldRenderer },
});
}
@@ -113,10 +117,10 @@ 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 modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
return ModData.WidgetLoader.LoadWidget(new WidgetArgs(args)
{
{ "world", world },
{ "orderManager", orderManager },
{ "orderManager", OrderManager },
{ "worldRenderer", worldRenderer },
}, parent, id);
}
@@ -129,33 +133,38 @@ namespace OpenRA
}
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, bool isShellmap)
internal static void StartGame(string mapUID, WorldType type)
{
// Dispose of the old world before creating a new one.
if (worldRenderer != null)
worldRenderer.Dispose();
Cursor.SetCursor(null);
BeforeGameStart();
Map map;
using (new PerfTimer("PrepareMap"))
map = modData.PrepareMap(mapUID);
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);
OrderManager.World = new World(map, OrderManager, type) { Timestep = Timestep };
if (orderManager.GameStarted)
worldRenderer = new WorldRenderer(OrderManager.World);
using (new PerfTimer("LoadComplete"))
OrderManager.World.LoadComplete(worldRenderer);
if (OrderManager.GameStarted)
return;
Ui.MouseFocusWidget = null;
Ui.KeyboardFocusWidget = null;
orderManager.LocalFrameNumber = 0;
orderManager.LastTickTime = RunTime;
orderManager.StartGame();
OrderManager.LocalFrameNumber = 0;
OrderManager.LastTickTime = RunTime;
OrderManager.StartGame();
worldRenderer.RefreshPalette();
Cursor.SetCursor("default");
GC.Collect();
}
@@ -164,8 +173,8 @@ namespace OpenRA
{
get
{
var id = orderManager.Connection.LocalClientId;
var client = orderManager.LobbyInfo.ClientWithIndex(id);
var id = OrderManager.Connection.LocalClientId;
var client = OrderManager.LobbyInfo.ClientWithIndex(id);
return client != null && client.IsAdmin;
}
}
@@ -174,15 +183,19 @@ namespace OpenRA
public static Modifiers GetModifierKeys() { return modifiers; }
internal static void HandleModifierKeys(Modifiers mods) { modifiers = mods; }
public static void InitializeSettings(Arguments args)
{
Settings = new Settings(Platform.ResolvePath("^", "settings.yaml"), args);
}
internal static void Initialize(Arguments args)
{
Console.WriteLine("Platform is {0}", Platform.CurrentPlatform);
AppDomain.CurrentDomain.AssemblyResolve += GlobalFileSystem.ResolveAssembly;
Settings = new Settings(Platform.ResolvePath("^", "settings.yaml"), args);
InitializeSettings(args);
Log.LogPath = Platform.ResolvePath("^", "Logs");
Log.AddChannel("perf", "perf.log");
Log.AddChannel("debug", "debug.log");
Log.AddChannel("sync", "syncreport.log");
@@ -199,14 +212,7 @@ namespace OpenRA
Settings.Server.AllowPortForward = false;
}
try
{
GeoIpDatabase = new DatabaseReader("GeoLite2-Country.mmdb");
}
catch (Exception e)
{
Log.Write("geoip", "DatabaseReader failed: {0}", e);
}
GeoIP.Initialize();
GlobalFileSystem.Mount(Platform.GameDir); // Needed to access shaders
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", null };
@@ -218,7 +224,7 @@ namespace OpenRA
Settings.Graphics.Renderer = r;
try
{
Renderer.Initialize(Settings.Graphics.Mode);
Renderer = new Renderer(Settings.Graphics, Settings.Server);
break;
}
catch (Exception e)
@@ -228,8 +234,6 @@ namespace OpenRA
}
}
Renderer = new Renderer();
try
{
Sound.Create(Settings.Sound.Engine);
@@ -258,13 +262,22 @@ namespace OpenRA
LobbyInfoChanged = () => { };
ConnectionStateChanged = om => { };
BeforeGameStart = () => { };
OnRemoteDirectConnect = (a, b) => { };
delayedActions = new ActionQueue();
Ui.ResetAll();
if (worldRenderer != null)
worldRenderer.Dispose();
worldRenderer = null;
if (server != null)
server.Shutdown();
if (orderManager != null)
orderManager.Dispose();
if (OrderManager != null)
OrderManager.Dispose();
if (ModData != null)
ModData.Dispose();
ModData = null;
// Fall back to default if the mod doesn't exist
if (!ModMetadata.AllMods.ContainsKey(mod))
@@ -273,20 +286,45 @@ namespace OpenRA
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopMusic();
Sound.StopVideo();
Sound.Initialize();
modData = new ModData(mod);
Renderer.InitializeFonts(modData.Manifest);
modData.InitializeLoaders();
using (new PerfTimer("LoadMaps"))
modData.MapCache.LoadMaps();
ModData = new ModData(mod, !Settings.Server.Dedicated);
ModData.InitializeLoaders();
if (!Settings.Server.Dedicated)
Renderer.InitializeFonts(ModData.Manifest);
PerfHistory.items["render"].hasNormalTick = false;
PerfHistory.items["batches"].hasNormalTick = false;
PerfHistory.items["render_widgets"].hasNormalTick = false;
PerfHistory.items["render_flip"].hasNormalTick = false;
using (new PerfTimer("LoadMaps"))
ModData.MapCache.LoadMaps();
if (Cursor != null)
Cursor.Dispose();
if (Settings.Graphics.HardwareCursors)
{
try
{
Cursor = new HardwareCursor(ModData.CursorProvider);
}
catch (Exception e)
{
Log.Write("debug", "Failed to initialize hardware cursors. Falling back to software cursors.");
Log.Write("debug", "Error was: " + e.Message);
Console.WriteLine("Failed to initialize hardware cursors. Falling back to software cursors.");
Console.WriteLine("Error was: " + e.Message);
Cursor = new SoftwareCursor(ModData.CursorProvider);
Settings.Graphics.HardwareCursors = false;
}
}
else
Cursor = new SoftwareCursor(ModData.CursorProvider);
PerfHistory.Items["render"].HasNormalTick = false;
PerfHistory.Items["batches"].HasNormalTick = false;
PerfHistory.Items["render_widgets"].HasNormalTick = false;
PerfHistory.Items["render_flip"].HasNormalTick = false;
JoinLocal();
@@ -312,7 +350,7 @@ namespace OpenRA
if (Settings.Server.DedicatedLoop)
{
Console.WriteLine("Starting a new server instance...");
modData.MapCache.LoadMaps();
ModData.MapCache.LoadMaps();
continue;
}
@@ -322,45 +360,12 @@ namespace OpenRA
Environment.Exit(0);
}
else
{
var window = args != null ? args.GetValue("Launch.Window", null) : null;
if (!string.IsNullOrEmpty(window))
{
var installData = modData.Manifest.ContentInstaller;
if (installData.InstallerBackgroundWidget != null)
Ui.LoadWidget(installData.InstallerBackgroundWidget, Ui.Root, new WidgetArgs());
Widgets.Ui.OpenWindow(window, new WidgetArgs());
}
else
{
modData.LoadScreen.StartGame();
Settings.Save();
var replay = args != null ? args.GetValue("Launch.Replay", null) : null;
if (!string.IsNullOrEmpty(replay))
Game.JoinReplay(replay);
}
}
ModData.LoadScreen.StartGame(args);
}
public static void TestAndContinue()
public static void LoadEditor(string mapUid)
{
Ui.ResetAll();
var installData = modData.Manifest.ContentInstaller;
if (!installData.TestFiles.All(f => GlobalFileSystem.Exists(f)))
{
var args = new WidgetArgs()
{
{ "continueLoading", () => InitializeMod(Game.Settings.Game.Mod, null) },
};
if (installData.InstallerBackgroundWidget != null)
Ui.LoadWidget(installData.InstallerBackgroundWidget, Ui.Root, args);
Ui.OpenWindow(installData.InstallerMenuWidget, args);
}
else
LoadShellMap();
StartGame(mapUid, WorldType.Editor);
}
public static void LoadShellMap()
@@ -368,13 +373,13 @@ namespace OpenRA
var shellmap = ChooseShellmap();
using (new PerfTimer("StartGame"))
StartGame(shellmap, true);
StartGame(shellmap, WorldType.Shellmap);
}
static string ChooseShellmap()
{
var shellmaps = modData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.UseAsShellmap)
var shellmaps = ModData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.Visibility.HasFlag(MapVisibility.Shellmap))
.Select(m => m.Uid);
if (!shellmaps.Any())
@@ -392,13 +397,40 @@ namespace OpenRA
public static void RunAfterTick(Action a) { delayedActions.Add(a); }
public static void RunAfterDelay(int delay, Action a) { delayedActions.Add(a, delay); }
static float cursorFrame = 0f;
static void TakeScreenshotInner()
{
Log.Write("debug", "Taking screenshot");
Bitmap bitmap;
using (new PerfTimer("Renderer.TakeScreenshot"))
bitmap = Renderer.TakeScreenshot();
ThreadPool.QueueUserWorkItem(_ =>
{
var mod = ModData.Manifest.Mod;
var directory = Platform.ResolvePath("^", "Screenshots", mod.Id, mod.Version);
Directory.CreateDirectory(directory);
var filename = TimestampedFilename();
var format = Settings.Graphics.ScreenshotFormat;
var extension = ImageCodecInfo.GetImageEncoders().FirstOrDefault(x => x.FormatID == format.Guid)
.FilenameExtension.Split(';').First().ToLowerInvariant().Substring(1);
var destination = Path.Combine(directory, string.Concat(filename, extension));
using (new PerfTimer("Save Screenshot ({0})".F(format)))
bitmap.Save(destination, format);
bitmap.Dispose();
Game.RunAfterTick(() => Debug("Saved screenshot " + filename));
});
}
static void InnerLogicTick(OrderManager orderManager)
{
var tick = RunTime;
var world = orderManager.world;
var world = orderManager.World;
var uiTickDelta = tick - Ui.LastTickTime;
if (uiTickDelta >= Timestep)
@@ -410,11 +442,11 @@ namespace OpenRA
Viewport.TicksSinceLastMove += uiTickDelta / Timestep;
Sync.CheckSyncUnchanged(world, Ui.Tick);
cursorFrame += 0.5f;
Cursor.Tick();
}
var worldTimestep = world == null ? Timestep : world.Timestep;
var worldTickDelta = (tick - orderManager.LastTickTime);
var worldTickDelta = tick - orderManager.LastTickTime;
if (worldTimestep != 0 && worldTickDelta >= worldTimestep)
{
using (new PerfSample("tick_time"))
@@ -423,7 +455,6 @@ namespace OpenRA
// 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;
@@ -467,17 +498,19 @@ namespace OpenRA
{
delayedActions.PerformActions();
if (orderManager.Connection.ConnectionState != lastConnectionState)
if (OrderManager.Connection.ConnectionState != lastConnectionState)
{
lastConnectionState = orderManager.Connection.ConnectionState;
ConnectionStateChanged(orderManager);
lastConnectionState = OrderManager.Connection.ConnectionState;
ConnectionStateChanged(OrderManager);
}
InnerLogicTick(orderManager);
if (worldRenderer != null && orderManager.world != worldRenderer.world)
InnerLogicTick(worldRenderer.world.orderManager);
InnerLogicTick(OrderManager);
if (worldRenderer != null && OrderManager.World != worldRenderer.World)
InnerLogicTick(worldRenderer.World.OrderManager);
}
public static bool TakeScreenshot = false;
static void RenderTick()
{
using (new PerfSample("render"))
@@ -488,7 +521,7 @@ namespace OpenRA
if (worldRenderer != null)
{
Renderer.BeginFrame(worldRenderer.Viewport.TopLeft, worldRenderer.Viewport.Zoom);
Sound.SetListenerPosition(worldRenderer.Position(worldRenderer.Viewport.CenterLocation));
Sound.SetListenerPosition(worldRenderer.Viewport.CenterPosition);
worldRenderer.Draw();
}
else
@@ -496,23 +529,33 @@ namespace OpenRA
using (new PerfSample("render_widgets"))
{
Game.Renderer.WorldVoxelRenderer.BeginFrame();
Ui.PrepareRenderables();
Game.Renderer.WorldVoxelRenderer.EndFrame();
Ui.Draw();
if (modData != null && modData.CursorProvider != null)
if (ModData != null && ModData.CursorProvider != null)
{
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
modData.CursorProvider.DrawCursor(Renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
Cursor.SetCursor(Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default");
Cursor.Render(Renderer);
}
}
using (new PerfSample("render_flip"))
Renderer.EndFrame(new DefaultInputHandler(orderManager.world));
Renderer.EndFrame(new DefaultInputHandler(OrderManager.World));
if (TakeScreenshot)
{
TakeScreenshot = false;
TakeScreenshotInner();
}
}
PerfHistory.items["render"].Tick();
PerfHistory.items["batches"].Tick();
PerfHistory.items["render_widgets"].Tick();
PerfHistory.items["render_flip"].Tick();
PerfHistory.Items["render"].Tick();
PerfHistory.Items["batches"].Tick();
PerfHistory.Items["render_widgets"].Tick();
PerfHistory.Items["render_flip"].Tick();
}
static void Loop()
@@ -547,15 +590,12 @@ namespace OpenRA
// (if ever).
// This also means that the 'logicInterval' cannot be longer than this
// value.
const int maxLogicTicksBehind = 250;
const int MaxLogicTicksBehind = 250;
// Try to maintain at least this many FPS, even if it slows down logic.
// This is easily observed when playing back a replay at max speed,
// the frame rate will slow down to this value to allow the replay logic
// to run faster.
// Try to maintain at least this many FPS during replays, even if it slows down logic.
// However, if the user has enabled a framerate limit that is even lower
// than this, then that limit will be used.
const int minRenderFps = 10;
const int MinReplayFps = 10;
// Timestamps for when the next logic and rendering should run
var nextLogic = RunTime;
@@ -566,7 +606,7 @@ namespace OpenRA
{
// Ideal time between logic updates. Timestep = 0 means the game is paused
// but we still call LogicTick() because it handles pausing internally.
var logicInterval = worldRenderer != null && worldRenderer.world.Timestep != 0 ? worldRenderer.world.Timestep : Game.Timestep;
var logicInterval = worldRenderer != null && worldRenderer.World.Timestep != 0 ? worldRenderer.World.Timestep : Game.Timestep;
// Ideal time between screen updates
var maxFramerate = Settings.Graphics.CapFramerate ? Settings.Graphics.MaxFramerate.Clamp(1, 1000) : 1000;
@@ -575,43 +615,46 @@ namespace OpenRA
var now = RunTime;
// If the logic has fallen behind too much, skip it and catch up
if (now - nextLogic > maxLogicTicksBehind)
if (now - nextLogic > MaxLogicTicksBehind)
nextLogic = now;
// When's the next update (logic or render)
var nextUpdate = Math.Min(nextLogic, nextRender);
if (now >= nextUpdate)
{
var forceRender = now >= forcedNextRender;
if (now >= nextLogic)
{
nextLogic += logicInterval;
LogicTick();
// Force at least one render per tick during regular gameplay
if (OrderManager.World != null && !OrderManager.World.IsReplay)
forceRender = true;
}
var haveSomeTimeUntilNextLogic = now < nextLogic;
var isTimeToRender = now >= nextRender;
var forceRender = now >= forcedNextRender;
if ((isTimeToRender && haveSomeTimeUntilNextLogic) || forceRender)
{
nextRender = now + renderInterval;
// Pick the minimum allowed FPS (the lower between 'minRenderFps'
// Pick the minimum allowed FPS (the lower between 'minReplayFPS'
// and the user's max frame rate) and convert it to maximum time
// allowed between screen updates.
// We do this before rendering to include the time rendering takes
// in this interval.
var maxRenderInterval = Math.Max(1000 / minRenderFps, renderInterval);
var maxRenderInterval = Math.Max(1000 / MinReplayFps, renderInterval);
forcedNextRender = now + maxRenderInterval;
RenderTick();
}
}
else
{
Thread.Sleep(nextUpdate - now);
}
}
}
@@ -630,11 +673,15 @@ namespace OpenRA
finally
{
// Ensure that the active replay is properly saved
if (orderManager != null)
orderManager.Dispose();
if (OrderManager != null)
OrderManager.Dispose();
}
Renderer.Device.Dispose();
if (worldRenderer != null)
worldRenderer.Dispose();
ModData.Dispose();
ChromeProvider.Deinitialize();
Renderer.Dispose();
OnQuit();
@@ -653,7 +700,7 @@ namespace OpenRA
public static void AddChatLine(Color color, string name, string text)
{
orderManager.AddChatLine(color, name, text);
OrderManager.AddChatLine(color, name, text);
}
public static void Debug(string s, params object[] args)
@@ -663,10 +710,10 @@ namespace OpenRA
public static void Disconnect()
{
if (orderManager.world != null)
orderManager.world.traitDict.PrintReport();
if (OrderManager.World != null)
OrderManager.World.TraitDict.PrintReport();
orderManager.Dispose();
OrderManager.Dispose();
CloseServer();
JoinLocal();
}
@@ -679,12 +726,12 @@ namespace OpenRA
public static T CreateObject<T>(string name)
{
return modData.ObjectCreator.CreateObject<T>(name);
return ModData.ObjectCreator.CreateObject<T>(name);
}
public static void CreateServer(ServerSettings settings)
{
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, ModData);
}
public static int CreateLocalServer(string map)
@@ -697,14 +744,14 @@ namespace OpenRA
AllowPortForward = false
};
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, ModData);
return server.Port;
}
public static bool IsCurrentWorld(World world)
{
return orderManager != null && orderManager.world == world;
return OrderManager != null && OrderManager.World == world;
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -18,9 +18,14 @@ namespace OpenRA
{
public class GameInformation
{
public string Mod;
public string Version;
public string MapUid;
public string MapTitle;
public DateTime StartTimeUtc;
// Game end timestamp (when the recoding stopped).
public DateTime EndTimeUtc;
@@ -28,7 +33,7 @@ namespace OpenRA
// 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 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; } }
@@ -78,7 +83,7 @@ namespace OpenRA
nodes.Add(new MiniYamlNode("Root", FieldSaver.Save(this)));
for (var i=0; i<Players.Count; i++)
for (var i = 0; i < Players.Count; i++)
nodes.Add(new MiniYamlNode("Player@{0}".F(i), FieldSaver.Save(Players[i])));
return nodes.WriteToString();
@@ -108,12 +113,12 @@ namespace OpenRA
Name = runtimePlayer.PlayerName,
IsHuman = !runtimePlayer.IsBot,
IsBot = runtimePlayer.IsBot,
FactionName = runtimePlayer.Country.Name,
FactionId = runtimePlayer.Country.Race,
FactionName = runtimePlayer.Faction.Name,
FactionId = runtimePlayer.Faction.InternalName,
Color = runtimePlayer.Color,
Team = client.Team,
SpawnPoint = runtimePlayer.SpawnPoint,
IsRandomFaction = runtimePlayer.Country.Race != client.Country,
IsRandomFaction = runtimePlayer.Faction.InternalName != client.Race,
IsRandomSpawnPoint = runtimePlayer.SpawnPoint != client.SpawnPoint
};
@@ -133,34 +138,36 @@ namespace OpenRA
public class Player
{
//
// Start-up information
//
// 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

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -16,28 +16,50 @@ using OpenRA.Traits;
namespace OpenRA
{
//TODO: This is not exported into the documentation yet.
[Desc("A unit/building inside the game. Every rules starts with one and adds trait to it.",
"Special actors like world or player are usually defined in system.yaml and affect everything.")]
/// <summary>
/// A unit/building inside the game. Every rules starts with one and adds trait to it.
/// </summary>
public class ActorInfo
{
[Desc("The actor name can be anything, but the sprites used in the Render*: traits default to this one.",
"If you add an ^ in front of the name, the engine will recognize this as a collection of traits",
"that can be inherited by others (using Inherits:) and not a real unit.",
"You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.")]
/// <summary>
/// The actor name can be anything, but the sprites used in the Render*: traits default to this one.
/// If you add an ^ in front of the name, the engine will recognize this as a collection of traits
/// that can be inherited by others (using Inherits:) and not a real unit.
/// You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.
/// </summary>
public readonly string Name;
public readonly TypeDictionary Traits = new TypeDictionary();
List<ITraitInfo> constructOrderCache = null;
public ActorInfo( string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits )
public ActorInfo(string name, MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
try
{
var mergedNode = MergeWithParent(node, allUnits).ToDictionary();
var allParents = new HashSet<string>();
var abstractActorType = name.StartsWith("^");
// Guard against circular inheritance
allParents.Add(name);
var mergedNode = MergeWithParents(node, allUnits, allParents).ToDictionary();
Name = name;
foreach (var t in mergedNode)
if (t.Key != "Inherits" && !t.Key.StartsWith("-"))
Traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value));
{
if (t.Key[0] == '-')
throw new YamlException("Bogus trait removal: " + t.Key);
if (t.Key != "Inherits" && !t.Key.StartsWith("Inherits@"))
try
{
Traits.Add(LoadTraitInfo(t.Key.Split('@')[0], t.Value));
}
catch (FieldLoader.MissingFieldsException e)
{
if (!abstractActorType)
throw new YamlException(e.Message);
}
}
}
catch (YamlException e)
{
@@ -45,33 +67,33 @@ namespace OpenRA
}
}
static MiniYaml GetParent( MiniYaml node, Dictionary<string, MiniYaml> allUnits )
static Dictionary<string, MiniYaml> GetParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits)
{
MiniYaml inherits;
node.ToDictionary().TryGetValue( "Inherits", out inherits );
if( inherits == null || string.IsNullOrEmpty( inherits.Value ) )
return null;
return node.Nodes.Where(n => n.Key == "Inherits" || n.Key.StartsWith("Inherits@"))
.ToDictionary(n => n.Value.Value, n =>
{
MiniYaml i;
if (!allUnits.TryGetValue(n.Value.Value, out i))
throw new YamlException(
"Bogus inheritance -- parent type {0} does not exist".F(n.Value.Value));
MiniYaml parent;
allUnits.TryGetValue( inherits.Value, out parent );
if (parent == null)
throw new InvalidOperationException(
"Bogus inheritance -- actor type {0} does not exist".F(inherits.Value));
return parent;
return i;
});
}
static MiniYaml MergeWithParent( MiniYaml node, Dictionary<string, MiniYaml> allUnits )
static MiniYaml MergeWithParents(MiniYaml node, Dictionary<string, MiniYaml> allUnits, HashSet<string> allParents)
{
var parent = GetParent( node, allUnits );
if (parent != null)
{
var result = MiniYaml.MergeStrict(node, MergeWithParent(parent, allUnits));
var parents = GetParents(node, allUnits);
// strip the '-'
result.Nodes.RemoveAll(a => a.Key.StartsWith("-"));
return result;
foreach (var kv in parents)
{
if (!allParents.Add(kv.Key))
throw new YamlException(
"Bogus inheritance -- duplicate inheritance of {0}.".F(kv.Key));
node = MiniYaml.MergeStrict(node, MergeWithParents(kv.Value, allUnits, allParents));
}
return node;
}
@@ -81,37 +103,62 @@ namespace OpenRA
throw new YamlException("Junk value `{0}` on trait node {1}"
.F(my.Value, traitName));
var info = Game.CreateObject<ITraitInfo>(traitName + "Info");
FieldLoader.Load(info, my);
try
{
FieldLoader.Load(info, my);
}
catch (FieldLoader.MissingFieldsException e)
{
var header = "Trait name " + traitName + ": " + (e.Missing.Length > 1 ? "Required properties missing" : "Required property missing");
throw new FieldLoader.MissingFieldsException(e.Missing, header);
}
return info;
}
public IEnumerable<ITraitInfo> TraitsInConstructOrder()
{
var ret = new List<ITraitInfo>();
var t = Traits.WithInterface<ITraitInfo>().ToList();
var index = 0;
while (t.Count != 0)
if (constructOrderCache != null)
return constructOrderCache;
var source = Traits.WithInterface<ITraitInfo>().Select(i => new
{
var prereqs = PrerequisitesOf(t[index]);
var unsatisfied = prereqs.Where(n => !ret.Any(x =>
Trait = i,
Type = i.GetType(),
Dependencies = PrerequisitesOf(i).ToList()
}).ToList();
var resolved = source.Where(s => !s.Dependencies.Any()).ToList();
var unresolved = source.Except(resolved);
var testResolve = new Func<Type, Type, bool>((a, b) => a == b || a.IsAssignableFrom(b));
var more = unresolved.Where(u => u.Dependencies.All(d => resolved.Exists(r => testResolve(d, r.Type))));
// Re-evaluate the vars above until sorted
while (more.Any())
resolved.AddRange(more);
if (unresolved.Any())
{
var exceptionString = "ActorInfo(\"" + Name + "\") failed to initialize because of the following:\r\n";
var missing = unresolved.SelectMany(u => u.Dependencies.Where(d => !source.Any(s => testResolve(d, s.Type)))).Distinct();
exceptionString += "Missing:\r\n";
foreach (var m in missing)
exceptionString += m + " \r\n";
exceptionString += "Unresolved:\r\n";
foreach (var u in unresolved)
{
var type = x.GetType();
return type == n || n.IsAssignableFrom(type);
}));
if (!unsatisfied.Any())
{
ret.Add(t[index]);
t.RemoveAt(index);
index = 0;
var deps = u.Dependencies.Where(d => !resolved.Exists(r => r.Type == d));
exceptionString += u.Type + ": { " + string.Join(", ", deps) + " }\r\n";
}
else if (++index >= t.Count)
throw new InvalidOperationException("Trait prerequisites not satisfied (or prerequisite loop) Actor={0} Unresolved={1} Missing={2}".F(
Name,
t.Select(x => x.GetType().Name).JoinWith(","),
unsatisfied.Select(x => x.Name).JoinWith(",")));
throw new Exception(exceptionString);
}
return ret;
constructOrderCache = resolved.Select(r => r.Trait).ToList();
return constructOrderCache;
}
static IEnumerable<Type> PrerequisitesOf(ITraitInfo info)
@@ -130,11 +177,11 @@ namespace OpenRA
.Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(UsesInit<>))
.Select(i => i.GetGenericArguments()[0])).ToList();
inits.Add( typeof(OwnerInit) ); /* not exposed by a trait; this is used by the Actor itself */
inits.Add(typeof(OwnerInit)); /* not exposed by a trait; this is used by the Actor itself */
return inits.Select(
i => Pair.New(
i.Name.Replace( "Init", "" ), i ));
i.Name.Replace("Init", ""), i));
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -15,27 +15,35 @@ namespace OpenRA.GameRules
{
public class MusicInfo
{
public readonly string Filename = null;
public readonly string Title = null;
public readonly string Filename;
public readonly string Title;
public readonly bool Hidden;
public int Length { get; private set; } // seconds
public bool Exists { get; private set; }
public MusicInfo( string key, MiniYaml value )
public MusicInfo(string key, MiniYaml value)
{
Title = value.Value;
var nd = value.ToDictionary();
if (nd.ContainsKey("Hidden"))
bool.TryParse(nd["Hidden"].Value, out Hidden);
var ext = nd.ContainsKey("Extension") ? nd["Extension"].Value : "aud";
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key)+"."+ext;
Filename = (nd.ContainsKey("Filename") ? nd["Filename"].Value : key) + "." + ext;
if (!GlobalFileSystem.Exists(Filename))
return;
Exists = true;
using (var s = GlobalFileSystem.Open(Filename))
{
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
}
}
public void Reload()
@@ -45,10 +53,12 @@ namespace OpenRA.GameRules
Exists = true;
using (var s = GlobalFileSystem.Open(Filename))
{
if (Filename.ToLowerInvariant().EndsWith("wav"))
Length = (int)WavLoader.WaveLength(s);
else
Length = (int)AudLoader.SoundLength(s);
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -22,7 +22,6 @@ namespace OpenRA
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;
@@ -32,7 +31,6 @@ namespace OpenRA
IDictionary<string, SoundInfo> voices,
IDictionary<string, SoundInfo> notifications,
IDictionary<string, MusicInfo> music,
IDictionary<string, string> movies,
IDictionary<string, TileSet> tileSets,
IDictionary<string, SequenceProvider> sequences)
{
@@ -41,7 +39,6 @@ namespace OpenRA
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);
}

56
OpenRA.Game/GameRules/RulesetCache.cs Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -17,8 +17,10 @@ using OpenRA.Support;
namespace OpenRA
{
public class RulesetCache
public sealed class RulesetCache : IDisposable
{
static readonly List<MiniYamlNode> NoMapRules = new List<MiniYamlNode>();
readonly ModData modData;
readonly Dictionary<string, ActorInfo> actorCache = new Dictionary<string, ActorInfo>();
@@ -26,7 +28,6 @@ namespace OpenRA
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>();
@@ -42,12 +43,11 @@ namespace OpenRA
this.modData = modData;
}
public Ruleset LoadDefaultRules()
{
return LoadMapRules(new Map());
}
public Ruleset LoadMapRules(Map map)
/// <summary>
/// Cache and return the Ruleset for a given map.
/// If a map isn't specified then return the default mod Ruleset.
/// </summary>
public Ruleset Load(Map map = null)
{
var m = modData.Manifest;
@@ -56,27 +56,38 @@ namespace OpenRA
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));
actors = LoadYamlRules(actorCache, m.Rules,
map != null ? map.RuleDefinitions : NoMapRules,
(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));
weapons = LoadYamlRules(weaponCache, m.Weapons,
map != null ? map.WeaponDefinitions : NoMapRules,
(k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
using (new PerfTimer("Voices"))
voices = LoadYamlRules(voiceCache, m.Voices, map.VoiceDefinitions, (k, _) => new SoundInfo(k.Value));
voices = LoadYamlRules(voiceCache, m.Voices,
map != null ? map.VoiceDefinitions : NoMapRules,
(k, _) => new SoundInfo(k.Value));
using (new PerfTimer("Notifications"))
notifications = LoadYamlRules(notificationCache, m.Notifications, map.NotificationDefinitions, (k, _) => new SoundInfo(k.Value));
notifications = LoadYamlRules(notificationCache, m.Notifications,
map != null ? map.NotificationDefinitions : NoMapRules,
(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);
music = LoadYamlRules(musicCache, m.Music,
NoMapRules,
(k, _) => new MusicInfo(k.Key, k.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);
return new Ruleset(actors, weapons, voices, notifications, music, tileSets, sequences);
}
Dictionary<string, T> LoadYamlRules<T>(
@@ -137,5 +148,12 @@ namespace OpenRA
return items;
}
public void Dispose()
{
foreach (var cache in sequenceCaches.Values)
cache.Dispose();
sequenceCaches.Clear();
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -16,12 +16,12 @@ namespace OpenRA.GameRules
{
public class SoundInfo
{
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Variants;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Prefixes;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Voices;
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Notifications;
public readonly string DefaultVariant = ".aud" ;
public readonly string DefaultPrefix = "" ;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Variants;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Prefixes;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Voices;
[FieldLoader.Ignore] public readonly Dictionary<string, string[]> Notifications;
public readonly string DefaultVariant = ".aud";
public readonly string DefaultPrefix = "";
public readonly string[] DisableVariants = { };
public readonly string[] DisablePrefixes = { };
@@ -36,16 +36,16 @@ namespace OpenRA.GameRules
public readonly Lazy<Dictionary<string, SoundPool>> VoicePools;
public readonly Lazy<Dictionary<string, SoundPool>> NotificationsPools;
public SoundInfo( MiniYaml y )
public SoundInfo(MiniYaml y)
{
FieldLoader.Load( this, y );
FieldLoader.Load(this, y);
Variants = Load(y, "Variants");
Prefixes = Load(y, "Prefixes");
Voices = Load(y, "Voices");
Notifications = Load(y, "Notifications");
VoicePools = Exts.Lazy(() => Voices.ToDictionary(a => a.Key, a => new SoundPool(a.Value)));
NotificationsPools = Exts.Lazy(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
NotificationsPools = Exts.Lazy(() => Notifications.ToDictionary(a => a.Key, a => new SoundPool(a.Value)));
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,8 +19,8 @@ namespace OpenRA.GameRules
public class ProjectileArgs
{
public WeaponInfo Weapon;
public IEnumerable<int> DamageModifiers;
public IEnumerable<int> InaccuracyModifiers;
public int[] DamageModifiers;
public int[] InaccuracyModifiers;
public int Facing;
public WPos Source;
public Actor SourceActor;
@@ -30,10 +30,10 @@ namespace OpenRA.GameRules
public interface IProjectileInfo { IEffect Create(ProjectileArgs args); }
public class WeaponInfo
public sealed class WeaponInfo
{
[Desc("The maximum range the weapon can fire.")]
public readonly WRange Range = WRange.Zero;
public readonly WDist Range = WDist.Zero;
[Desc("The sound played when the weapon is fired.")]
public readonly string[] Report = null;
@@ -46,8 +46,6 @@ namespace OpenRA.GameRules
public readonly bool Charges = false;
public readonly string Palette = "effect";
[Desc("What types of targets are affected.")]
public readonly string[] ValidTargets = { "Ground", "Water" };
@@ -58,17 +56,22 @@ namespace OpenRA.GameRules
public readonly int BurstDelay = 5;
[Desc("The minimum range the weapon can fire.")]
public readonly WRange MinRange = WRange.Zero;
public readonly WDist MinRange = WDist.Zero;
[FieldLoader.LoadUsing("LoadProjectile")]
public readonly IProjectileInfo Projectile;
[FieldLoader.LoadUsing("LoadWarheads")]
public readonly List<Warhead> Warheads = new List<Warhead>();
public readonly List<IWarhead> Warheads = new List<IWarhead>();
readonly HashSet<string> validTargetSet;
readonly HashSet<string> invalidTargetSet;
public WeaponInfo(string name, MiniYaml content)
{
FieldLoader.Load(this, content);
validTargetSet = new HashSet<string>(ValidTargets);
invalidTargetSet = new HashSet<string>(InvalidTargets);
}
static object LoadProjectile(MiniYaml yaml)
@@ -83,10 +86,10 @@ namespace OpenRA.GameRules
static object LoadWarheads(MiniYaml yaml)
{
var retList = new List<Warhead>();
var retList = new List<IWarhead>();
foreach (var node in yaml.Nodes.Where(n => n.Key.StartsWith("Warhead")))
{
var ret = Game.CreateObject<Warhead>(node.Value.Value + "Warhead");
var ret = Game.CreateObject<IWarhead>(node.Value.Value + "Warhead");
FieldLoader.Load(ret, node.Value);
retList.Add(ret);
}
@@ -94,6 +97,11 @@ namespace OpenRA.GameRules
return retList;
}
public bool IsValidTarget(IEnumerable<string> targetTypes)
{
return validTargetSet.Overlaps(targetTypes) && !invalidTargetSet.Overlaps(targetTypes);
}
/// <summary>Checks if the weapon is valid against (can target) the target.</summary>
public bool IsValidAgainst(Target target, World world, Actor firedBy)
{
@@ -110,8 +118,7 @@ namespace OpenRA.GameRules
return false;
var cellInfo = world.Map.GetTerrainInfo(cell);
if (!ValidTargets.Intersect(cellInfo.TargetTypes).Any()
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
if (!IsValidTarget(cellInfo.TargetTypes))
return false;
return true;
@@ -124,8 +131,7 @@ namespace OpenRA.GameRules
public bool IsValidAgainst(Actor victim, Actor firedBy)
{
var targetable = victim.TraitOrDefault<ITargetable>();
if (targetable == null || !ValidTargets.Intersect(targetable.TargetTypes).Any()
|| InvalidTargets.Intersect(targetable.TargetTypes).Any())
if (targetable == null || !IsValidTarget(targetable.TargetTypes))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
@@ -138,8 +144,7 @@ namespace OpenRA.GameRules
public bool IsValidAgainst(FrozenActor victim, Actor firedBy)
{
var targetable = victim.Info.Traits.GetOrDefault<ITargetableInfo>();
if (targetable == null || !ValidTargets.Intersect(targetable.GetTargetTypes()).Any()
|| InvalidTargets.Intersect(targetable.GetTargetTypes()).Any())
if (targetable == null || !IsValidTarget(targetable.GetTargetTypes()))
return false;
if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,12 +10,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Support;
namespace OpenRA.Graphics
{
public class Animation
{
public Sequence CurrentSequence { get; private set; }
readonly int defaultTick = 40; // 25 fps == 40 ms
public ISpriteSequence CurrentSequence { get; private set; }
public bool IsDecoration = false;
public Func<bool> Paused;
@@ -26,7 +29,6 @@ namespace OpenRA.Graphics
string name;
readonly int defaultTick = 40; // 25 fps == 40 ms
bool tickAlways;
public string Name { get { return name; } }
@@ -43,11 +45,11 @@ namespace OpenRA.Graphics
{
this.sequenceProvider = sequenceProvider;
this.name = name.ToLowerInvariant();
this.tickFunc = () => {};
this.tickFunc = () => { };
this.facingFunc = facingFunc;
}
int CurrentFrame { get { return backwards ? CurrentSequence.Start + CurrentSequence.Length - frame - 1 : frame; } }
public int CurrentFrame { get { return backwards ? CurrentSequence.Start + CurrentSequence.Length - frame - 1 : frame; } }
public Sprite Image { get { return CurrentSequence.GetSprite(CurrentFrame, facingFunc()); } }
public IEnumerable<IRenderable> Render(WPos pos, WVec offset, int zOffset, PaletteReference palette, float scale)
@@ -79,6 +81,8 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
@@ -94,6 +98,8 @@ namespace OpenRA.Graphics
return false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
var tick = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
timeUntilNextFrame = Math.Min(tick, timeUntilNextFrame);
frame %= CurrentSequence.Length;
return true;
}
@@ -103,6 +109,8 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
@@ -127,10 +135,30 @@ namespace OpenRA.Graphics
backwards = false;
tickAlways = true;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = func();
tickFunc = () => frame = func();
}
public void PlayFetchDirection(string sequenceName, Func<int> direction)
{
tickAlways = false;
CurrentSequence = sequenceProvider.GetSequence(name, sequenceName);
timeUntilNextFrame = CurrentSequence != null ? CurrentSequence.Tick : defaultTick;
frame = 0;
tickFunc = () =>
{
var d = direction();
if (d > 0 && ++frame >= CurrentSequence.Length)
frame = 0;
if (d < 0 && --frame < 0)
frame = CurrentSequence.Length - 1;
};
}
int timeUntilNextFrame;
Action tickFunc;
@@ -169,9 +197,14 @@ namespace OpenRA.Graphics
}
}
public Sequence GetSequence(string sequenceName)
public ISpriteSequence GetSequence(string sequenceName)
{
return sequenceProvider.GetSequence(name, sequenceName);
}
public string GetRandomExistingSequence(string[] sequences, MersenneTwister random)
{
return sequences.Where(s => HasSequence(s)).RandomOrDefault(random);
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -50,5 +50,4 @@ namespace OpenRA.Graphics
return new AnimationWithOffset(a, null, null, null, null);
}
}
}
}

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2015 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,
@@ -17,8 +17,8 @@ namespace OpenRA.Graphics
{
struct Collection
{
public string src;
public Dictionary<string, MappedImage> regions;
public string Src;
public Dictionary<string, MappedImage> Regions;
}
static Dictionary<string, Collection> collections;
@@ -27,6 +27,8 @@ namespace OpenRA.Graphics
public static void Initialize(IEnumerable<string> chromeFiles)
{
Deinitialize();
collections = new Dictionary<string, Collection>();
cachedSheets = new Dictionary<string, Sheet>();
cachedSprites = new Dictionary<string, Dictionary<string, Sprite>>();
@@ -37,6 +39,17 @@ namespace OpenRA.Graphics
LoadCollection(c.Key, c.Value);
}
public static void Deinitialize()
{
if (cachedSheets != null)
foreach (var sheet in cachedSheets.Values)
sheet.Dispose();
collections = null;
cachedSheets = null;
cachedSprites = null;
}
public static void Save(string file)
{
var root = new List<MiniYamlNode>();
@@ -49,19 +62,20 @@ namespace OpenRA.Graphics
static MiniYaml SaveCollection(Collection collection)
{
var root = new List<MiniYamlNode>();
foreach (var kv in collection.regions)
root.Add(new MiniYamlNode(kv.Key, kv.Value.Save(collection.src)));
foreach (var kv in collection.Regions)
root.Add(new MiniYamlNode(kv.Key, kv.Value.Save(collection.Src)));
return new MiniYaml(collection.src, root);
return new MiniYaml(collection.Src, root);
}
static void LoadCollection(string name, MiniYaml yaml)
{
Game.modData.LoadScreen.Display();
if (Game.ModData.LoadScreen != null)
Game.ModData.LoadScreen.Display();
var collection = new Collection()
{
src = yaml.Value,
regions = yaml.Nodes.ToDictionary(n => n.Key, n => new MappedImage(yaml.Value, n.Value))
Src = yaml.Value,
Regions = yaml.Nodes.ToDictionary(n => n.Key, n => new MappedImage(yaml.Value, n.Value))
};
collections.Add(name, collection);
@@ -83,17 +97,17 @@ namespace OpenRA.Graphics
}
MappedImage mi;
if (!collection.regions.TryGetValue(imageName, out mi))
if (!collection.Regions.TryGetValue(imageName, out mi))
return null;
// Cached sheet
Sheet sheet;
if (cachedSheets.ContainsKey(mi.src))
sheet = cachedSheets[mi.src];
if (cachedSheets.ContainsKey(mi.Src))
sheet = cachedSheets[mi.Src];
else
{
sheet = new Sheet(mi.src);
cachedSheets.Add(mi.src, sheet);
sheet = new Sheet(mi.Src);
cachedSheets.Add(mi.Src, sheet);
}
// Cache the sprite
@@ -102,6 +116,7 @@ namespace OpenRA.Graphics
cachedCollection = new Dictionary<string, Sprite>();
cachedSprites.Add(collectionName, cachedCollection);
}
var image = mi.GetImage(sheet);
cachedCollection.Add(imageName, image);

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