Compare commits

...

1077 Commits

Author SHA1 Message Date
Matthias Mailänder
967128a14c Merge pull request #5037 from pchote/range-revert
Restore old defence range values.
2014-04-05 12:12:12 +02:00
Paul Chote
1f82b13d0d Restore old defence range values.
This reverts commit 9e35e01e3a.
2014-04-05 22:53:09 +13:00
Matthias Mailänder
8eefff1127 Merge pull request #5035 from pchote/wall-concrete-fix
Wall concrete fix
2014-04-05 10:24:56 +02:00
Paul Chote
19caf7b6f2 Fix walls not being buildable on concrete. Fixes #5031. 2014-04-05 20:47:16 +13:00
Paul Chote
d4dc1b49e1 Update changelog. 2014-04-05 20:28:24 +13:00
Matthias Mailänder
6a879cda8c Merge pull request #5029 from ScottNZ/mechanic
Fix some AttackMedic/mech bugs/regressions
2014-04-05 09:25:26 +02:00
ScottNZ
4ae72f5f5d Fix the wrong cursor being used for AttackMedic when out of range 2014-04-05 19:51:02 +13:00
ScottNZ
f6dd2c2c68 Fix mechanics being able to repair husks and defensive buildings 2014-04-05 19:50:59 +13:00
Matthias Mailänder
e13d213098 Merge pull request #5033 from pchote/wonderwall
Wall and D2K turret polish
2014-04-05 08:29:45 +02:00
Matthias Mailänder
1be67ec4d3 Merge pull request #5024 from ScottNZ/balance
Closes #3272
2014-04-05 08:09:46 +02:00
Paul Chote
4025db45a3 Fix turret muzzleflash. 2014-04-05 18:09:20 +13:00
Paul Chote
15c2930eeb Allow turrets to connect to walls in D2K. Fixes #5032. 2014-04-05 18:09:06 +13:00
Paul Chote
82ac8d8d80 Support multiple wall-type connections for D2K. 2014-04-05 17:05:42 +13:00
Paul Chote
52b4ac0aed Update neighbours when walls are destroyed or sold. Fixes #2351. 2014-04-05 16:36:34 +13:00
ScottNZ
a29111a9a8 Add a missing sequence to thf 2014-04-05 15:42:18 +13:00
ScottNZ
5eb91d2811 Add hijacker 2014-04-05 13:58:40 +13:00
ScottNZ
d4bc4ac827 Rename BuildingCaptureNotification.cs to CaptureNotification.cs 2014-04-05 13:58:19 +13:00
ScottNZ
f8e1779f24 Add an option to cancel activities when captured to Capturable 2014-04-05 13:58:02 +13:00
Matthias Mailänder
1ac4c6d1e1 Merge pull request #5023 from cjshmyr/mech
RA - moved husk capturing from engineer to mechanic
2014-04-04 17:53:34 +02:00
Matthias Mailänder
b8831bb59d Merge pull request #5025 from Ripsn/eventbounds
Closes #4987
2014-04-04 12:43:03 +02:00
Ripsn
c8547d6004 Update CHANGELOG for Eventbounds 2014-04-04 19:22:55 +13:00
Ripsn
59a1cfe914 Fixed - Small portion of Production tab on Right side unresponsive 2014-04-04 19:09:56 +13:00
Curtis Shmyr
1be6339590 RA - moved husk capturing from engineer to mechanic 2014-04-03 22:46:23 -06:00
Matthias Mailänder
b8646f98ab Merge pull request #5016 from obrakmann/disable-shellmaps
Disable shellmaps temporarily
2014-04-03 17:56:23 +02:00
Oliver Brakmann
4d71e37ab0 Disable shellmaps temporarily 2014-04-03 17:24:01 +02:00
Paul Chote
94b2debaa4 Merge pull request #4941 from Mailaender/kill-husks
Made husks targetable with force fire only
2014-04-04 03:56:33 +13:00
Matthias Mailänder
c76ebbdc46 exclusive force fire on husks and bridges 2014-04-03 15:57:41 +02:00
Matthias Mailänder
db19846972 Merge pull request #5021 from pchote/msam-icon
Fix mobile SAM icon override.
2014-04-03 15:53:15 +02:00
Paul Chote
70c2156325 Fix mobile SAM icon override. Fixes #5004. 2014-04-04 02:30:15 +13:00
Paul Chote
5265366287 Merge pull request #4872 from Mailaender/password-hotkeys
Mapped password field Enter/ESC to buttons
2014-04-04 02:23:57 +13:00
Paul Chote
d7f3128978 Merge pull request #5012 from Mailaender/cnc-powerdown-regression
Fixed missing disabled overlay for TD defenses
2014-04-03 21:31:58 +13:00
Matthias Mailänder
718ba1f1d1 Merge pull request #5020 from cjshmyr/balancing
Various balance changes
2014-04-03 09:13:26 +02:00
Matthias Mailänder
e8601d8df9 Merge pull request #5019 from cjshmyr/newmap
Add RA map - Seaside 2
2014-04-03 09:05:36 +02:00
Matthias Mailänder
4f9f258413 automatic upgrade rules for new DisabledOverlay 2014-04-03 07:22:39 +02:00
Curtis Shmyr
ae5a3ca548 Chronotank teleport distance increased and teleport cooldown decreased 2014-04-02 21:37:45 -06:00
Curtis Shmyr
dde4923e7b Buff shock trooper 2014-04-02 21:33:45 -06:00
Curtis Shmyr
af1801cfb2 Decrease MRJ cost 2014-04-02 21:28:31 -06:00
Curtis Shmyr
cb2a3fe1fe Added ra map - seaside 2 2014-04-02 21:09:55 -06:00
Matthias Mailänder
95d8d1d45d show disabled overlay when TD defenses power down
closes #5005
2014-04-02 21:24:40 +02:00
Matthias Mailänder
c9d1431987 Merge pull request #4953 from pchote/modchooser
Overhauled mod selector.
2014-04-02 20:59:42 +02:00
Paul Chote
38f1aff0bb Update changelog. 2014-04-03 07:21:56 +13:00
Paul Chote
c720cb0b41 Extract mod selector into its own mod. 2014-04-03 07:21:56 +13:00
Paul Chote
fa775a88c1 Replace ra logo psd with svg. 2014-04-03 07:15:03 +13:00
Paul Chote
de4898badf Add RGBASpriteWidget. 2014-04-03 07:15:03 +13:00
Paul Chote
3f63eb4ec6 Allow SheetBuilder to be used from mod code. 2014-04-03 07:15:03 +13:00
Paul Chote
b5c63175e2 Allow button tooltip labels to be set by UI logic. 2014-04-03 07:15:03 +13:00
Paul Chote
8694698a1a Fix tooltips not displaying in the pre-shellmap environment. 2014-04-03 07:15:03 +13:00
Paul Chote
a5223a519c Allow custom button types. 2014-04-03 07:15:02 +13:00
Paul Chote
aa77536e96 Support borderless panel types. 2014-04-03 07:15:02 +13:00
Matthias Mailänder
31991c3679 Merge pull request #5011 from pchote/psydev-changelog
Update changelog for recent C&C merges.
2014-04-02 19:16:38 +02:00
Paul Chote
1acede6041 Update changelog for recent C&C changes. 2014-04-02 22:23:36 +13:00
Matthias Mailänder
a4e3d7ee5f Merge pull request #5008 from pchote/spritewidget
Split ShpImageWidget into SpriteWidget and SpriteSequenceWidget.
2014-04-02 09:56:06 +02:00
Paul Chote
13f6075638 Merge pull request #5007 from psydev/patch-4
Allow Chinook to land in tiberium
2014-04-02 20:32:41 +13:00
Paul Chote
ff9c0f693b Merge pull request #5006 from psydev/patch-3
Give ARTY a 75% chance of exploding
2014-04-02 20:32:25 +13:00
Paul Chote
6be25468bb Animate the C&C color picker preview. 2014-04-02 19:24:07 +13:00
Paul Chote
143d3aa083 Replace ShpImageWidget -> SpriteSequenceWidget. 2014-04-02 19:24:07 +13:00
Paul Chote
bf0c7297e2 Clean up the AssetBrowser logic. 2014-04-02 19:24:07 +13:00
psydev
6b8fd4efd9 Allow Chinook to land in tiberium
Seems to not make sense that it can't land in tiberium, especially since Chem Troopers can walk through it undamaged, and since tiberium is not quite as deadly in recent patches.
2014-04-01 04:03:41 -07:00
psydev
296d9c5072 Give ARTY a 75% chance of exploding
The odds of exploding should be high, but not 100%, I think.
2014-04-01 03:12:21 -07:00
Paul Chote
1ea48b0167 Add a lighter-weight SpriteWidget to eventually replace ShpWidget. 2014-04-01 22:16:10 +13:00
Paul Chote
146b49e251 Merge pull request #5003 from Mailaender/valid-c4-target
Added checks for valid targets to C4 demolition
2014-04-01 19:14:00 +13:00
Matthias Mailänder
3d6086187e don't crash when C4 target.Actor is null
closes #4975
2014-04-01 07:41:28 +02:00
Paul Chote
b82510023f Merge pull request #5001 from Mailaender/fly-valid-target
Added checks for valid targets when flying
2014-04-01 18:25:51 +13:00
Paul Chote
ecb5b71d3e Merge pull request #4971 from Mailaender/dpkg-copyright
Tweak the DEBIAN copyright file
2014-04-01 18:09:52 +13:00
Paul Chote
e41fca3d47 Merge pull request #5002 from Mailaender/server-browser-inner-nre
Catched null reference exception in RefreshServerListInner
2014-04-01 18:08:05 +13:00
Paul Chote
b3e3b1bd7c Merge pull request #4986 from Mailaender/scroll-velocity
Scroll velocity polish
2014-04-01 18:06:09 +13:00
Paul Chote
bdfac27d14 Merge pull request #4984 from Mailaender/tileset-fixes
Tileset YAML improvements
2014-04-01 17:53:01 +13:00
Matthias Mailänder
c7ed2aacaf check for valid targets when flying
closes #4972
2014-03-31 13:45:13 +02:00
Matthias Mailänder
7fb53e336a catch null reference exception in RefreshServerListInner
closes #4964
2014-03-31 13:27:50 +02:00
Matthias Mailänder
c4b28b9016 Merge pull request #4996 from obrakmann/fix4991
Remove husks from radar
2014-03-30 21:07:55 +02:00
Matthias Mailänder
043b02ebf8 adhere more to DEBIAN packaging guidelines 2014-03-30 21:03:32 +02:00
Oliver Brakmann
031461e188 Make husks not appear on radar. Fixes #4991. 2014-03-30 12:56:02 +02:00
Matthias Mailänder
98a3d7d55d scroll the game server list faster
closes #3462
2014-03-29 20:06:17 +01:00
Matthias Mailänder
64b4f62af0 hard-coded TooltipTemplate to YAML 2014-03-29 20:02:52 +01:00
Matthias Mailänder
d514689ec7 hard-coded ScrollVelocity to YAML 2014-03-29 19:50:31 +01:00
Matthias Mailänder
f7551016c4 setup editor categories for INTERIOR 2014-03-29 19:33:55 +01:00
Matthias Mailänder
af5eed22a8 fixed the ant hill tile 2014-03-29 19:33:55 +01:00
Matthias Mailänder
153aba469d Merge pull request #4970 from Phrohdoh/LineBuild
Added LineBuildNode trait to filter which structure(s) a LineBuild actor can be attached to.
Closes #2248
2014-03-29 12:55:07 +01:00
Matthias Mailänder
9c92980635 Merge pull request #4974 from ihptru/legacy-maps-fix
Adds spawn points to imported legacy maps
Fixes #4794
2014-03-29 09:30:30 +01:00
Igor Popov
647dc749f0 Legacy map import fix spawn slots definition 2014-03-28 17:19:49 +04:00
Taryn
61749e145d Added LineBuildNode trait to filter which structure(s) a LineBuild actor can be attached to. 2014-03-27 20:47:46 -05:00
Matthias Mailänder
758babcad4 Merge pull request #4899 from obrakmann/gdi04a
Add port of scg04ea mission
2014-03-25 19:01:49 +01:00
Matthias Mailänder
c1f936b24c Merge pull request #4914 from Kanar/MB
Minibibs for CNC and RA
2014-03-25 18:36:34 +01:00
Kanar
fc2d0510d8 Adds minibibs for bibless buildings in RA and C&C. 2014-03-25 13:23:05 +01:00
Matthias Mailänder
5f31fbb009 Merge pull request #4962 from obrakmann/fix4954
Fix missing ZOffset in FIX's damaged-idle sequence. Fixes #4954
2014-03-25 07:51:43 +01:00
Oliver Brakmann
4c00b73818 Fix missing ZOffset in FIX's damaged-idle sequence. Fixes #4954 2014-03-24 21:28:42 +01:00
Matthias Mailänder
951e441ff9 Merge pull request #4959 from ScottNZ/beacon
Add atom bomb beacon poster to ra
2014-03-24 20:57:15 +01:00
Matthias Mailänder
096ce9e9a3 Merge pull request #4960 from ScottNZ/balance
Buff ftrk a bit
2014-03-24 20:40:29 +01:00
ScottNZ
ee05bd20fc Buff ftrk a bit. Primarily addresses its weakness against aircraft 2014-03-24 20:31:47 +13:00
ScottNZ
b9fdf6b66a Add atom bomb beacon poster to ra 2014-03-24 20:08:54 +13:00
Oliver Brakmann
c0a3a8d09a Add port of scg04ea mission 2014-03-23 14:16:05 +01:00
Oliver Brakmann
7b3974d688 Add Reinforcements.ReinforceWithCargo 2014-03-23 14:16:05 +01:00
Matthias Mailänder
af1db08503 Merge pull request #4948 from pchote/replay-browser
Show player and spawn details in the replay browser.
closes #4879
2014-03-23 08:45:23 +01:00
Paul Chote
55ad12d9a3 Show player and spawn details in the replay browser. 2014-03-23 13:00:53 +13:00
Matthias Mailänder
272e872357 Merge pull request #4942 from pchote/more-replays
Overhaul observer shroud selector.
2014-03-22 12:20:40 +01:00
Paul Chote
71357950f7 Update changelog. 2014-03-22 23:20:29 +13:00
Paul Chote
3a8c94d8f8 Hook up observer view keybindings. Fixes #4435.
Uses 0-9 to select view (plus shift to cycle backwards), '-' for                 combined shroud and '=' for world view.
2014-03-22 23:18:52 +13:00
Paul Chote
a31cdec87a Move control group logic into its own logic class. 2014-03-22 22:32:41 +13:00
Paul Chote
8beb9ffc57 Add LogicKeyListenerWidget for binding keys to UI logic. 2014-03-22 22:32:41 +13:00
Matthias Mailänder
8b207274ee Merge pull request #4854 from obrakmann/lua
More Lua updates
2014-03-22 09:28:23 +01:00
Matthias Mailänder
f744939530 Merge pull request #4918 from cjshmyr/ctnk
Chronotank group teleportation with hotkey, closes #2500
2014-03-22 09:08:11 +01:00
Paul Chote
2c8fc4603a Add flags and player colours to the observer selector. 2014-03-22 20:01:09 +13:00
Curtis Shmyr
6ced7b274c Chronotank teleporation by holding SHIFT or ALT and issuing a move order 2014-03-22 00:13:24 -06:00
Paul Chote
104b520b21 Divide the shroud selector into groups. 2014-03-22 16:02:11 +13:00
Curtis Shmyr
21544ce235 Merge pull request #4938 from pchote/map-derp
Isolate gameplay map state from the map cache.
2014-03-21 18:33:54 -06:00
Paul Chote
37101ba88e Isolate gameplay map state from the map cache. Fixes #4937. 2014-03-22 13:03:45 +13:00
Oliver Brakmann
ca786f6039 Add Production.BuildTeamFromTemplate
Production.BuildTeamFromTemplate allows the production of teams from a
list of
actor types, assigning a function to that team once it is complete.

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

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

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

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

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

SAM Site
- Increased buildtime from 18s to 36s

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

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

done :|

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

fixed indentation & inf in front of trees

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

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

And yes, I'm pretty sure it should be Visceroid and not Viceroid. The majority of Westwood documents and Tiberian Suns' rules.ini clearly spell it with an 's' added before the 'c'.
2013-12-26 13:16:09 +01:00
Matthias Mailänder
3a4c4eb481 Merge pull request #4371 from pchote/more-world-coords
Convert remaining yaml definitions to world coordinates
2013-12-26 03:22:07 -08:00
Paul Chote
e8d1b9b9e5 Update changelog. 2013-12-26 20:44:21 +13:00
Paul Chote
996877d9e5 Upgrade mod rules to match engine changes. 2013-12-26 20:42:13 +13:00
Paul Chote
bd334a6295 Introduce a mod/map upgrade tool. 2013-12-26 19:58:23 +13:00
Paul Chote
0b8dafcdf0 Convert actor speed to world coordinates. 2013-12-26 19:45:13 +13:00
Paul Chote
c7914ec68f Convert Exit to world coordinates. 2013-12-26 19:45:13 +13:00
Paul Chote
f116c516ce Add FieldLoader support for CPos and CVec. 2013-12-26 19:45:13 +13:00
Paul Chote
7a034a6609 Move CPos and CVec into FileFormats. 2013-12-26 19:45:13 +13:00
Paul Chote
ecdae4cbbe Convert weapons to world coords. 2013-12-26 19:45:12 +13:00
Paul Chote
aca897fa76 Implement IComparable on WRange. 2013-12-26 19:45:12 +13:00
Paul Chote
c49b06fdde Convert Health Radius to world coordinates. 2013-12-26 19:44:50 +13:00
Paul Chote
aa2f865d5d Convert Altitude to world coords.
Removes the obsolete AltitudeInit: use CenterPositionInit instead.
2013-12-26 17:25:07 +13:00
Paul Chote
c42a6f8386 Convert terrain rendering to world coords. 2013-12-26 17:23:13 +13:00
Paul Chote
1a31368953 Convert range circle rendering to world coords. 2013-12-26 17:23:12 +13:00
Paul Chote
253349e3eb Merge pull request #4317 from Mailaender/d2k-grenadier
Added the Atreides grenadier
2013-12-25 14:16:11 -08:00
Paul Chote
d71a0c3e5d Merge pull request #4369 from Mailaender/chmod-x-brimstone
Removed executable bits from brimstone map
2013-12-25 13:41:55 -08:00
Matthias Mailänder
4f17209260 Merge pull request #4364 from ihptru/freshing-maps
re-InitializeLoaders on Dedicated server restart, will fresh list of maps too
2013-12-25 11:30:31 -08:00
Matthias Mailänder
50fb67cb60 Merge pull request #4367 from ScottNZ/editor
Fix legacy map importer NRE. Closes #4366
2013-12-25 11:23:15 -08:00
MicroGraphics
f00c82a110 polished rushouse , changed footprint
made it smaller and worked with a blurring-tool, so it fits better to
the westwood-stuff
2013-12-25 16:32:17 +01:00
Matthias Mailänder
9db32178b3 remove executable bits from brimstone map 2013-12-25 09:39:43 +01:00
ScottNZ
5e42554b2b Fix legacy map importer NRE. Closes #4366 2013-12-25 12:52:07 +13:00
Igor Popov
88ee768bc7 more reasonable message when map was not found on server 2013-12-24 22:30:08 +04:00
Igor Popov
12199da97f re-InitializeLoaders on Dedicated server restart, will fresh list of maps too 2013-12-24 22:23:57 +04:00
s1ww
3c769d6579 Adding detailed 5 players ffa conquest map (format 6) 2013-12-23 17:47:58 +01:00
Matthias Mailänder
35e906c606 Merge pull request #4347 from ihptru/battle-lake
update battle-lake.oramap, fixes #3245;
2013-12-23 00:39:29 -08:00
Matthias Mailänder
63f3a9e611 Merge pull request #4346 from MicroGraphics/bleed
Added a Snowhut and new map "Snow Town"
2013-12-23 00:34:28 -08:00
Matthias Mailänder
99a559c202 Merge pull request #4353 from ihptru/patch-1
Update launch-dedicated.sh
2013-12-23 00:19:10 -08:00
Igor Popov
75372ff706 Update launch-dedicated.sh
do not hardcode Map
2013-12-23 09:03:20 +03:00
Matthias Mailänder
be56f1ebeb update CHANGELOG 2013-12-22 22:31:49 +01:00
MicroGraphics
43586a1178 New Map Snow Town 2013-12-21 20:16:09 +01:00
Igor Popov
04b3387f0e update battle-lake.oramap, fixes #3245; 2013-12-21 21:17:47 +04:00
MicroGraphics
8e9364e5a4 snowhut 2013-12-21 13:52:38 +01:00
Matthias Mailänder
6a0c0ae202 Merge pull request #4340 from pchote/harv-delivery
Allow DeliveryBuildings: to be specified on Harvester
2013-12-20 13:52:31 -08:00
Matthias Mailänder
b6d5f53465 Merge pull request #4321 from ScottNZ/lua
Lua fixes/polish
2013-12-20 13:46:56 -08:00
Chris Forbes
b55b64e86c Allow DeliveryBuildings: to be specified on Harvester
This allows multiple harv/proc type pairs, requested in #4323.
2013-12-21 10:27:46 +13:00
Paul Chote
15f9a6a0a4 Merge pull request #4339 from Mailaender/download-content
More generic OpenRA download redirect URL
2013-12-20 13:25:25 -08:00
Matthias Mailänder
5ebeb1b077 use the new OpenRA download redirect URL 2013-12-20 22:20:53 +01:00
Matthias Mailänder
c86d7b85a4 updated the Bountysource link 2013-12-20 14:55:35 +01:00
Matthias Mailänder
639cf857af Merge pull request #4337 from ihptru/editor-fix
Editor fix of #4333;
2013-12-20 05:49:46 -08:00
ScottNZ
7ca5d56c1f Move the TraitInfo stuff into rules.lua 2013-12-20 22:53:37 +13:00
Paul Chote
883b014888 Generalize reinforcement insertion / extraction. 2013-12-20 20:32:42 +13:00
ScottNZ
09b694095c Add Map.GetNamedActor for map actor lookup 2013-12-20 19:20:56 +13:00
Igor Popov
613262d597 add xaionaro to AUTHORS at last 2013-12-20 01:53:46 +04:00
Igor Popov
a8074ea23a initialize Options in Editor for a new map; fix when trying to add custom assets for map which does not exist yet; ( fixes #4333 ) 2013-12-20 01:46:13 +04:00
ScottNZ
3cf06119f7 Update packaging scripts for mods/common 2013-12-19 19:26:59 +13:00
ScottNZ
061eb412ca Rename SupportPowers.Parabomb to SupportPowers.Airstrike 2013-12-19 19:26:58 +13:00
ScottNZ
a4f3caa6e7 Moved mods/ra/lua to mods/common/lua 2013-12-19 19:26:58 +13:00
ScottNZ
23cb4defa3 Update KopiLua.dll with some more dangerous bits removed, and remove strong naming from KopiLua/NLua 2013-12-19 19:26:58 +13:00
ScottNZ
e8fb96c55f Add Lua cargo insertion code and Utils.Skip. Needed for Allies 03 Classic. 2013-12-19 19:26:58 +13:00
ScottNZ
b2e9de810e Add CPos.New etc functions to Lua standard library and helpers to LuaScriptInterface.cs. Rename Team.Create to Team.New. 2013-12-19 19:26:57 +13:00
ScottNZ
8e9835f2fa Merge pull request #4331 from pchote/requires-fix
Allow mods to define a list of compatible map sources.
2013-12-18 19:22:09 -08:00
Paul Chote
6406e1d052 Allow mods to define a list of compatible map sources. Fixes #4319. 2013-12-19 14:44:20 +13:00
Matthias Mailänder
58fd9b8d1d Merge pull request #4327 from pchote/map-upgrade-fix
Persist custom map package contents on save. Fixes #4318.
2013-12-18 14:47:50 -08:00
Matthias Mailänder
29b3d790b2 Merge pull request #4328 from pchote/crate-palette-fix
Polish crate rendering
2013-12-18 14:46:53 -08:00
Matthias Mailänder
0a24aa0ac6 Merge pull request #4326 from pchote/renderer-fix
Throw a sensible exception when no renderers are available.
2013-12-18 14:35:15 -08:00
ScottNZ
fbefebfb93 Merge pull request #4330 from MicroGraphics/patch-1
Update AUTHORS
2013-12-18 14:06:27 -08:00
MicroGraphics
1f2ec0932a Update AUTHORS 2013-12-18 23:02:50 +01:00
Paul Chote
83bb3f97f6 Update changelog. 2013-12-19 09:25:16 +13:00
Paul Chote
c1b894959e Fix RA crate artwork. 2013-12-19 09:22:10 +13:00
Paul Chote
d4ab156352 Fix C&C crate artwork. 2013-12-19 09:21:52 +13:00
Paul Chote
1b41848623 Fix palette modifiers and the effect palette. 2013-12-18 22:48:09 +13:00
Paul Chote
56894f811a Use effect palette for crates. Fixes #4316. 2013-12-18 22:27:20 +13:00
Paul Chote
9ef971a159 Update CHANGELOG. 2013-12-18 22:22:24 +13:00
Paul Chote
50ad3b64d8 Persist custom map package contents on save. Fixes #4318. 2013-12-18 22:14:49 +13:00
Paul Chote
b96c36f38f Fix most of the style violations in Game.cs. 2013-12-18 21:45:04 +13:00
Paul Chote
ff5cbc65c5 Throw a sensible exception when no renderers are available. Fixes #4322. 2013-12-18 21:42:45 +13:00
Matthias Mailänder
37ea791841 added the Atreides grenadier 2013-12-15 13:07:26 +01:00
Matthias Mailänder
9acfbc30e5 this is now sprite to PNG 2013-12-15 12:03:21 +01:00
Matthias Mailänder
dfc56f6201 document where we ripped it from
off by one
2013-12-15 12:03:21 +01:00
ScottNZ
7ae831381a Merge pull request #4315 from pchote/cnc-shellmap-fix
C&C shellmap polish fix.
2013-12-15 01:18:04 -08:00
Paul Chote
7e89763eb9 Fix initial HTNK turret facing in C&C shellmap. 2013-12-15 22:12:02 +13:00
Paul Chote
d63dcc5dd1 Add a lua actor facing helper. 2013-12-15 22:12:02 +13:00
ScottNZ
49ba44fbaa Merge pull request #4313 from pchote/gifts
Change crate graphics for christmas.
2013-12-14 21:17:23 -08:00
Paul Chote
e9e2e353f7 Change crate graphics for christmas. Closes #4296. 2013-12-15 18:16:15 +13:00
ScottNZ
74461f91bc Merge pull request #4306 from Mailaender/ra-aircraft-husk-sight
Reveal shroud for RA aircraft husks
2013-12-14 19:51:27 -08:00
Matthias Mailänder
b6753fb076 update CHANGELOG 2013-12-14 10:41:57 +01:00
Paul Chote
f1372acf3f Merge pull request #4305 from Mailaender/rpm-freetype
Fixed broken FreeType 2 RPM dependency on Fedora
2013-12-14 01:33:15 -08:00
Matthias Mailänder
58f8b7228f reveal shroud for aircraft husks falling down 2013-12-13 15:23:42 +01:00
Matthias Mailänder
f99dd6748b Merge pull request #4301 from pchote/cnc-helicopter-husk-sight
Add sight to helicopter husks.
2013-12-13 06:12:58 -08:00
Matthias Mailänder
1aa95ab8a4 Merge pull request #4303 from pchote/batch-fix
Fix two serious perf regressions.
2013-12-13 05:54:06 -08:00
Matthias Mailänder
d14fd27ac1 fix broken FreeType 2 RPM dependency
* http://pkgs.org/download/freetype on Fedora
* http://pkgs.org/download/freetype2 on everything else
2013-12-13 14:38:16 +01:00
Paul Chote
393b1bbc0a Remove ContrailFader when complete. Fixes #4302. 2013-12-13 22:36:30 +13:00
Paul Chote
45ccf0035e Only render the frozen actors that are visible. Fixes #4300. 2013-12-13 22:36:25 +13:00
Paul Chote
d0752736fc Add sight to helicopter husks. Fixes #4298. 2013-12-13 21:30:11 +13:00
Matthias Mailänder
88c9b6d73b Merge pull request #4299 from pchote/shroud-fix
Always initialise the fog palette.
2013-12-13 00:01:35 -08:00
Paul Chote
e424d7c6c1 Always initialise the fog palette. Fixes #4297. 2013-12-13 17:49:31 +13:00
Matthias Mailänder
1bbe200e32 Merge pull request #4295 from pchote/utility-fix
Fix bitrotted utility description.
2013-12-11 23:48:09 -08:00
Paul Chote
ffcfe051e0 Fix bitrotted command descriptions. 2013-12-12 20:30:48 +13:00
Paul Chote
8f71861a6b Remove mod argument from GenerateMinimap.
It is redundant now that we enforce v6 maps.
2013-12-12 20:30:48 +13:00
Matthias Mailänder
f76caa5fb7 Merge pull request #4290 from pchote/text-fix
Attempt to parse unexpected key events as text.
2013-12-11 09:17:28 -08:00
Matthias Mailänder
0c199126cc Merge pull request #4289 from pchote/ore-spawn-fix
Don't spawn resources at maximum density.
2013-12-11 09:09:34 -08:00
Matthias Mailänder
0b73478869 Merge pull request #4291 from pchote/fix-the-frelling-editor
Fixes #4269.
2013-12-11 09:05:18 -08:00
Matthias Mailänder
bdd6c29539 Merge pull request #4271 from pchote/smudges
Use original D2K craters.
2013-12-11 04:39:07 -08:00
Paul Chote
c09e4ff541 Fixes #4269. 2013-12-11 23:13:46 +13:00
Paul Chote
e15637ad7f Fix typos spelling in changelog. 2013-12-11 22:55:46 +13:00
Paul Chote
f984dd16eb Update CHANGELOG. 2013-12-11 22:54:32 +13:00
Paul Chote
3abadd1ec6 Use the original D2K craters. 2013-12-11 22:54:00 +13:00
Paul Chote
8c7f77d2c7 Convert SmudgeLayer to sequences. 2013-12-11 22:53:33 +13:00
Paul Chote
719c9c1cd2 Attempt to parse unexpected key events as text. Fixes #4232. 2013-12-11 22:42:56 +13:00
Matthias Mailänder
f5123981fa Merge pull request #4287 from pchote/shroud
Rewrite shroud renderer.
2013-12-11 01:28:22 -08:00
Paul Chote
efd1f7f621 Merge pull request #4286 from ScottNZ/bleed
Fix cnc's nuke not damaging air units (a regression from a recent commit...
2013-12-11 01:27:56 -08:00
Paul Chote
0e33f5d3d9 Merge pull request #4288 from Mailaender/stats-fix
Fix death count in observer stats
2013-12-11 01:24:28 -08:00
Paul Chote
439d800f03 Don't spawn resources at maximum density. Fixes #4278. 2013-12-11 22:20:17 +13:00
Matthias Mailänder
a15e73a699 don't count units twice and forget about buildings
closes #4283
2013-12-11 09:43:02 +01:00
Paul Chote
186cc55d6e Update CHANGELOG. 2013-12-11 20:54:40 +13:00
Paul Chote
4d70996012 New shroud renderer. Fixes #2162. Fixes #3024. Fixes #4034.
Uses the original tile sprites in C&C and D2K and uses a smoother transition in all mods.
2013-12-11 20:51:49 +13:00
Paul Chote
4e814a8c2e Move ShroudRenderer into a trait. 2013-12-11 19:22:55 +13:00
Paul Chote
089973280d Add Multiply blend mode for D2K move-flash and shroud. 2013-12-11 19:22:54 +13:00
ScottNZ
f4d2e7cd6f Fix cnc's nuke not damaging air units (a regression from a recent commit to remove its PerCell damage model) 2013-12-11 17:45:33 +13:00
Matthias Mailänder
89d1d17b80 Merge pull request #4279 from ScottNZ/balance
Rework ra nuke to deal more damage to vehicles
2013-12-10 04:16:52 -08:00
ScottNZ
8bd05909e4 Update CHANGELOG for atom bomb changes 2013-12-10 23:19:09 +13:00
ScottNZ
e1c14cc114 Rework ra nuke to deal more damage to vehicles. Fixes #4220 2013-12-10 23:11:45 +13:00
ScottNZ
06a26e19ab Merge pull request #4277 from pchote/ore-fix
Remove custom terrain when clearing resources.
2013-12-10 01:01:51 -08:00
Paul Chote
fa067fa905 Remove custom terrain when clearing resources. Fixes #4272. 2013-12-10 16:52:41 +13:00
Matthias Mailänder
653155eda3 Merge pull request #4276 from pchote/initial-map
Improved automatic map selection.
2013-12-09 14:22:47 -08:00
Paul Chote
b8e492eda6 Attempt to pick a more sensible starting map. Fixes #4273. 2013-12-10 09:15:56 +13:00
Paul Chote
7b01b74ffc Save the map choice from the Skirmish button. 2013-12-10 09:12:42 +13:00
Matthias Mailänder
4d6c21d4c4 Merge pull request #4268 from pchote/d2k-palette-fix
D2K palette fixes
2013-12-09 01:22:52 -08:00
Paul Chote
844a1355c7 Disable shadow on terrain palette.
Fixes black spots on cliffs.
2013-12-09 19:50:47 +13:00
Paul Chote
ef28f4eb94 Clamp texture coordinates. Fixes #2343. 2013-12-09 19:49:39 +13:00
Paul Chote
18ccb50054 Merge pull request #4147 from Mailaender/cycle-hotkeys
Fixed and improved cycle hotkeys
2013-12-08 11:15:10 -08:00
Matthias Mailänder
e0efa00d95 StyleCop 2013-12-08 12:04:50 +01:00
Matthias Mailänder
2e6646bd73 cycle production buildings ordered by products 2013-12-08 12:02:44 +01:00
Matthias Mailänder
c19a739ae9 Merge pull request #4264 from pchote/cnc-nuke
Remove PerCell damage from C&C.
2013-12-08 01:59:16 -08:00
Paul Chote
a4ef4124ce Merge pull request #4253 from Mailaender/enforce-requiresmod
Enforce Map.RequiresMod
2013-12-08 01:55:05 -08:00
Matthias Mailänder
5794e69d52 enforce Map.RequiresMod so we don't get suprised by breakages 2013-12-08 10:46:55 +01:00
Paul Chote
0a13633036 Merge pull request #4265 from Mailaender/allies04-quickfix
Fixed crash when disguising the spy as an infantry without stand2 animations
2013-12-08 01:43:41 -08:00
Matthias Mailänder
4d77e961b5 Merge pull request #4262 from pchote/prereq-crash-fix
Prerequisites crash fix.
2013-12-08 01:42:31 -08:00
Matthias Mailänder
cbffc7ca09 fixed crash when disguising the spy 2013-12-08 10:34:56 +01:00
Paul Chote
e0eff775e2 Merge pull request #4263 from ScottNZ/lua
Small Lua cleanup
2013-12-08 01:34:33 -08:00
Paul Chote
ca83a82ba3 Remove PerCell damage from C&C.
Fixes bogus nuke damage.
2013-12-08 22:29:46 +13:00
Paul Chote
f30622a885 Merge pull request #4258 from Mailaender/packaging-corrections
Packaging Script Corrections
2013-12-08 00:44:39 -08:00
Paul Chote
bbc19df512 Fix StyleCop issues in TechTree. 2013-12-08 21:40:59 +13:00
ScottNZ
11b9c3ad80 Return useful requested things in supportpowers.lua 2013-12-08 21:39:45 +13:00
ScottNZ
6e7229f97f Clean up reinforcements.lua 2013-12-08 21:39:37 +13:00
Paul Chote
e76dbcd4bf Silently ignore bogus prerequisites instead of crashing. Fixes #4225. 2013-12-08 21:34:49 +13:00
Matthias Mailänder
9923d162c5 we don't ship non-managed code anymore 2013-12-08 09:33:49 +01:00
Matthias Mailänder
660c0c74b2 add missing FreeType 2 dependency to RPM
http://pkgs.org/download/freetype2
2013-12-08 09:33:49 +01:00
Matthias Mailänder
10736a7a6c make install SDL2 2013-12-08 09:33:49 +01:00
Matthias Mailänder
404dd70e9e only tab-indent hierarchy
don't align because this differs per editor configuration
2013-12-08 09:33:49 +01:00
Matthias Mailänder
8c2670916c credit all thirdparty libraries 2013-12-08 09:33:46 +01:00
Matthias Mailänder
2ba6b481ee Merge pull request #4261 from pchote/rank-fix
Veterency fixes
2013-12-08 00:27:04 -08:00
Matthias Mailänder
3fa5aef8d4 Merge pull request #4260 from pchote/editor-fix
Fix editor parsing templates.
2013-12-08 00:15:48 -08:00
Paul Chote
708c549d27 Improve rank chevron positioning. Closes #4196. 2013-12-08 21:12:25 +13:00
Paul Chote
943156aed3 Fix initial experience granting. 2013-12-08 21:11:43 +13:00
Matthias Mailänder
269b7e25c1 Merge pull request #4257 from pchote/map-format
Fix map format incompatibilities
2013-12-08 00:11:08 -08:00
Paul Chote
a13de137e7 Fix editor parsing templates. Fixes #4247. 2013-12-08 17:51:18 +13:00
Paul Chote
2e785df6c7 Update CHANGELOG. 2013-12-08 11:33:11 +13:00
Paul Chote
cd2a1cb30f Upgrade shipped maps to format 6. 2013-12-08 11:33:04 +13:00
Paul Chote
8f737719fd Rename utility --minimap to --map-preview. 2013-12-08 11:26:07 +13:00
Paul Chote
250a7cb349 Move map upgrading to OpenRA.Utility. 2013-12-08 11:25:54 +13:00
Paul Chote
73f4f880cc Fix map Options serialisation. Fixes #4107. 2013-12-08 11:18:58 +13:00
Paul Chote
510e812c02 Bump the map format 5 -> 6.
Version 6 ensures that maps define RequiresMod.
2013-12-08 11:18:58 +13:00
Paul Chote
f5f6f1e7aa Allow maps to be saved during initialisation. 2013-12-08 10:38:35 +13:00
Matthias Mailänder
127c9bb98c update CHANGELOG 2013-12-07 12:20:10 +01:00
Matthias Mailänder
b72ea8c227 added a new hotkey to cycle production buildings except conyards 2013-12-07 12:20:10 +01:00
Matthias Mailänder
316161a3e0 add audio feedback on mouse-wheel and hotkey build palette cycle 2013-12-07 12:20:07 +01:00
Matthias Mailänder
bcba26a04e don't hardcode SHIFT modifier for backwards tab cycle
closes #4144
2013-12-07 12:19:32 +01:00
Matthias Mailänder
28cf6d36f4 Merge pull request #4250 from ihptru/updatemaps
Update distributed maps with RequiresMod where it's missing
2013-12-07 01:19:06 -08:00
Matthias Mailänder
b06784dfdd Merge pull request #4252 from ScottNZ/lua
Delete LuaInterface code
2013-12-07 01:15:41 -08:00
ScottNZ
dfba973690 Delete LuaInterface code 2013-12-07 18:55:34 +13:00
Igor Popov
f5d5a3ca8e Update distributed maps with RequiresMod where it's missing 2013-12-07 03:50:41 +04:00
Matthias Mailänder
c293474c79 Merge pull request #4249 from ihptru/requiresmod
fix #4236; Editor has to add RequiresMod to map.yaml
2013-12-06 13:57:36 -08:00
Igor Popov
1434d4ae8f fix 4236; Editor has to add RequiresMod to map.yaml 2013-12-07 01:37:48 +04:00
Paul Chote
af17cb2c0c Merge pull request #4234 from Mailaender/minimap-utility
Added a minimap renderer to OpenRA.Utility.exe
2013-12-06 11:52:19 -08:00
Paul Chote
f3243de08b Merge pull request #4244 from Mailaender/fps-settings
Made the FPS settings fool proof
2013-12-06 11:51:25 -08:00
Paul Chote
ec157f7811 Merge pull request #4245 from Mailaender/nod01-bridge
Enforce a non-destructible bridge in Nod01
2013-12-06 11:46:29 -08:00
Matthias Mailänder
4c5c0974ad don't attack neutral world owner plus invulnerable bridge
closes #4230
2013-12-06 15:10:07 +01:00
Matthias Mailänder
784284969e clamp the max framerate setting to useful borders
and update on the fly
2013-12-06 14:49:12 +01:00
Matthias Mailänder
173b99c76a don't crash if max framerate is 0
fixes #4221
2013-12-06 14:48:32 +01:00
Matthias Mailänder
afb83e3007 Merge pull request #4241 from pchote/spice
Polish D2K spice rendering.
2013-12-06 02:43:23 -08:00
Paul Chote
001dc88dc9 Merge pull request #4239 from ScottNZ/lua-new
Move to a managed Lua implementation
2013-12-06 02:37:04 -08:00
Paul Chote
b1eb083746 Merge pull request #4240 from Mailaender/select-all-hotkey
Added the Select All units on screen hotkey
2013-12-06 02:33:57 -08:00
Paul Chote
c3e4cb5069 Remove spice1.shp. 2013-12-06 23:28:26 +13:00
Matthias Mailänder
4b70448823 reorder hotkeys
the way they appear in the GUI and similiar ones together
2013-12-06 11:26:54 +01:00
Matthias Mailänder
08166c0a64 added a new hotkey to select all units on screen
closes #4182
2013-12-06 11:26:52 +01:00
Paul Chote
3ca220ef17 Merge pull request #4237 from Mailaender/map-lint
Allow map.yaml checks with OpenRA.Lint.exe
2013-12-06 02:12:55 -08:00
ScottNZ
1a4888b050 PerfSample Lua Tick execution 2013-12-06 23:11:33 +13:00
ScottNZ
5799cfdcf2 Split mission.lua into mission.lua, reinforcements.lua and supportpowers.lua. Fixes #4204 2013-12-06 23:11:32 +13:00
ScottNZ
df7487ec01 Add KopiLua/NLua words to AUTHORS 2013-12-06 23:11:32 +13:00
ScottNZ
0d0de71840 Add KopiLua/NLua to packaging scripts 2013-12-06 23:11:25 +13:00
Matthias Mailänder
e65cfe00c1 update CHANGELOG 2013-12-06 11:07:56 +01:00
Paul Chote
fc8063a223 Merge pull request #4231 from Mailaender/visceroid-habitat
Made visceroids feel at home in Tiberium
2013-12-06 02:04:34 -08:00
Matthias Mailänder
3e2690a1ad Update CHANGELOG 2013-12-06 11:00:39 +01:00
Paul Chote
f7eb6a29d5 Merge pull request #4228 from Mailaender/pak-folder-fix
Moved Pak.cs to the correct directory
2013-12-06 01:53:36 -08:00
Paul Chote
1b898d5b31 Merge pull request #4242 from ScottNZ/bleed
Update CHANGELOG for recent ra oil derrick change
2013-12-06 01:48:48 -08:00
ScottNZ
dcace8924e Update CHANGELOG for recent ra oil derrick change 2013-12-06 22:44:46 +13:00
Paul Chote
9eaf496d72 Update CHANGELOG. 2013-12-06 22:31:39 +13:00
Paul Chote
ca2749dcc0 Support soft edges on D2K spice tiles. Fixes #2247. 2013-12-06 22:27:51 +13:00
Paul Chote
410cd1c7b1 Reorganise ResourceLayer implementation. 2013-12-06 22:24:07 +13:00
ScottNZ
3315c43295 Remove old Lua/LuaInterface installation/packaging 2013-12-06 21:53:08 +13:00
ScottNZ
452a0c0e25 Add Lua reserved name checking and exception hooks 2013-12-06 21:53:07 +13:00
ScottNZ
c39bd53e2a Override Lua's print function with Internal.Debug 2013-12-06 21:53:07 +13:00
ScottNZ
aca618ceef Introduce LuaScriptContext function cache 2013-12-06 21:53:06 +13:00
ScottNZ
4ea217ef7b Provide an empty table to Internal.New if args is nil to keep NLua happy 2013-12-06 21:53:06 +13:00
ScottNZ
1cf1086122 Swap LuaInterface for NLua and KopiLua 2013-12-06 21:52:59 +13:00
Matthias Mailänder
16edd98300 self-document it 2013-12-05 21:01:27 +01:00
Matthias Mailänder
e05e17c22e optionally lint check a mod + map.yaml
closes #3850
2013-12-05 21:01:27 +01:00
Matthias Mailänder
60f6a07014 verbose RALint for make test 2013-12-05 21:01:23 +01:00
Matthias Mailänder
8d9282811b fixed System.IO.InvalidDataException`: Non-power-of-two array 2013-12-05 19:31:24 +01:00
Matthias Mailänder
52ecac7336 allow mod override
e.g. useful for legacy maps where RequiresMod: is not set
2013-12-05 19:27:40 +01:00
Matthias Mailänder
5a4fc712a9 added --minimap to OpenRA Utility
closes #4195
2013-12-05 17:41:03 +01:00
Matthias Mailänder
06b0ce621f mixed line endings → Unix line endings 2013-12-05 17:14:55 +01:00
Matthias Mailänder
2d17ec41b6 speed up visceroids on Tiberium
slow them down everywhere else
2013-12-05 13:10:04 +01:00
Matthias Mailänder
e6eb7a9768 heal visceroids on tiberium
closes #3302
2013-12-05 13:09:13 +01:00
Matthias Mailänder
989165d71c move Pak.cs to the correct directory
case-sensitive OS require it to compile using MonoDevelop
2013-12-05 09:43:22 +01:00
Matthias Mailänder
0b5b3b22b4 Merge pull request #4223 from ScottNZ/lua-missions
Add back the smudge that was missing in allies-02-classic
2013-12-03 14:07:34 -08:00
Matthias Mailänder
dafd68b392 Merge pull request #4222 from pchote/brimstone-polish
Start with a construction yard on the D2K Brimstone map.
2013-12-03 14:02:51 -08:00
ScottNZ
84b99687c9 Add back the smudge that was missing in allies-02-classic 2013-12-04 10:57:05 +13:00
Paul Chote
2fd2167665 Merge pull request #4191 from Mailaender/MD4.2-tabs
Fixed tabs instead of spaces for MonoDevelop >= 4.2
2013-12-03 13:53:30 -08:00
ScottNZ
983409037c Merge pull request #4212 from pchote/crater-fix
Fix an off-by-one error in SmudgeLayer.
2013-12-03 13:52:07 -08:00
Paul Chote
2016448471 Fix Brimstone starting configuration.
Starting with a walled MCV is terrible for polish.
This gives the player a construction yard instead.
2013-12-04 10:24:55 +13:00
Paul Chote
19ddb61d18 Don't show make animations for starting actors. 2013-12-04 10:24:55 +13:00
Matthias Mailänder
14df1ac6df Merge pull request #4214 from pchote/framelimiter-focus
Remove TextField focus when becoming disabled.
2013-12-03 12:02:18 -08:00
Paul Chote
701e9e2684 Remove TextField focus when becoming disabled. Fixes #4153. 2013-12-04 08:53:29 +13:00
Matthias Mailänder
3895d79e5c Merge pull request #4215 from pchote/mcv-fix
Obey order.Queued in DeployTransform.
2013-12-03 06:35:43 -08:00
Matthias Mailänder
93bec5e14b Merge pull request #4216 from pchote/cnc-shellmap
Rewrite C&C shellmap in lua
2013-12-03 06:33:06 -08:00
Matthias Mailänder
efdc14e1d5 Merge pull request #4218 from ScottNZ/balance
Increase ra oil derrick cash trickler period to 375. Closes #4217
2013-12-03 05:00:27 -08:00
ScottNZ
42961b9dd5 Increase ra oil derrick cash trickler period to 375 2013-12-04 00:26:56 +13:00
Paul Chote
568988b435 Rewrite C&C shellmap script in lua. 2013-12-03 23:45:59 +13:00
Paul Chote
79b52e4c66 Add ScriptedMove and Teleport functions to lua library. 2013-12-03 23:26:37 +13:00
Paul Chote
0948c353e5 Obey order.Queued in DeployTransform. Fixes #4211. 2013-12-03 18:52:47 +13:00
Paul Chote
473f8dfbb8 Fix an off-by-one error in SmudgeLayer. Fixes #4139. 2013-12-03 18:16:40 +13:00
Matthias Mailänder
599faba94e Merge pull request #4208 from pchote/sprite-fix
SpriteReader fixes
2013-12-02 12:33:05 -08:00
Paul Chote
29fcb3dc35 Fix dune 2 shp parsing. 2013-12-02 20:49:36 +13:00
Paul Chote
c2413b63f7 Remove duplicated Format2 implementation. 2013-12-02 20:44:39 +13:00
Paul Chote
4d12ea0941 Style clean Format80. 2013-12-02 20:43:29 +13:00
Paul Chote
b6cce50ccc Fix crash when loading 0x0 shps. Fixes #4192. 2013-12-02 20:43:29 +13:00
ScottNZ
863e368ff5 Merge pull request #4207 from chrisforbes/deferred-lua-dispose
defer disposal of lua context to main thread
2013-12-01 21:51:52 -08:00
Chris Forbes
870685995d defer disposal of lua context to main thread 2013-12-02 17:50:09 +13:00
Matthias Mailänder
3d47fd503d Merge pull request #4193 from pchote/pak
Add a Pak parser for Dune II archives.
2013-12-01 01:33:32 -08:00
Paul Chote
57c2e75a59 Add a Pak parser for Dune II archives. 2013-12-01 22:09:32 +13:00
Matthias Mailänder
7fac962c09 Merge pull request #4185 from pchote/frame-rework
Rewrite sprite handling.
2013-11-30 14:46:54 -08:00
Paul Chote
8cfd3756c4 Fix d2k asset browser on case sensitive filesystems. 2013-12-01 11:28:50 +13:00
Paul Chote
867d4cd096 Remove mod dll dependency on OpenRA.Utility. Fixes #3298. 2013-12-01 11:28:50 +13:00
Paul Chote
1e7f436448 Overhaul asset browser. 2013-12-01 11:28:50 +13:00
Paul Chote
30f150fc91 Fix mod chooser list 2013-12-01 10:12:56 +13:00
Paul Chote
e3e2758bfb Remove --userdir argument from Utility --extract. 2013-12-01 09:59:15 +13:00
Paul Chote
6881dcc710 Fix UI rendering of offset sprites. 2013-12-01 09:49:27 +13:00
Paul Chote
21f2e88d83 Update CHANGELOG. 2013-12-01 09:49:27 +13:00
Paul Chote
314f819940 Load terrain from any SpriteSource. 2013-12-01 09:49:25 +13:00
Paul Chote
bfd50b97e2 Clean up ShpTSReader code. 2013-12-01 09:48:45 +13:00
Paul Chote
3f2be59056 Clean up ShpReader code. 2013-12-01 09:48:44 +13:00
Paul Chote
ed163aea82 Fix D2 shp parsing and make it a proper frame source. 2013-12-01 09:48:44 +13:00
Paul Chote
246c5e4526 Update Utility --shp to match. 2013-12-01 09:48:44 +13:00
Paul Chote
e636f99c48 Change Utility --png to accept all ISpriteSources. 2013-12-01 09:48:44 +13:00
Paul Chote
e4fe2b49f4 Make terrain tiles ISpriteSources. 2013-12-01 09:48:42 +13:00
Paul Chote
f92ce8bf51 Define a consistent interface for sprite loading. Fixes #4176. 2013-12-01 09:47:49 +13:00
Paul Chote
20a6c75ba4 Rewrite ShpTSReader. Closes #3746. 2013-12-01 09:47:49 +13:00
Paul Chote
5b947090f4 Use the normal extension checking rules for .r8. 2013-12-01 09:47:49 +13:00
Paul Chote
f153516151 Introduce proper support for non-shp sprites in cursors and ShpImageWidget. 2013-12-01 09:47:48 +13:00
Paul Chote
01155a655a Allow empty sprites to be allocated. 2013-12-01 09:47:48 +13:00
Matthias Mailänder
152c5d2049 fix tabs instead of spaces for MonoDevelop >= 4.2 2013-11-30 17:52:13 +01:00
Matthias Mailänder
cebc77085f Merge pull request #4189 from pchote/health-lookups
Move HealthExts.IsDead and Kill to Actor.
2013-11-30 07:18:47 -08:00
Paul Chote
0fe839add0 Move HealthExts.IsDead and Kill to Actor. 2013-12-01 00:14:47 +13:00
Paul Chote
9acba84acc Merge pull request #4188 from Mailaender/lonestar-oilb
Fixed crash in Fort Lonestar on map load
2013-11-30 01:58:23 -08:00
Matthias Mailänder
68b9fbf796 don't crash Fort Lonestar on map load 2013-11-30 09:44:48 +01:00
Matthias Mailänder
4f0c35b848 Merge pull request #4184 from pchote/changelog-fix
Fix changelog entry.
2013-11-29 23:56:44 -08:00
Paul Chote
244f573197 Remove reference to server browser. 2013-11-30 11:51:26 +13:00
Matthias Mailänder
5577d38129 Merge pull request #4183 from pchote/label-crash-fix
Fix C&C tooltip crash (regression from #4156).
2013-11-29 14:21:11 -08:00
Paul Chote
925d53484f Merge pull request #4179 from ScottNZ/lua
Lua stuffs
2013-11-29 14:17:17 -08:00
Paul Chote
afecaf6d54 Fix C&C tooltip crash (regression from #4156). 2013-11-30 10:53:11 +13:00
ScottNZ
aa5ea1a3ce Fix bots not deploying their mcv as a result of the DeployTransform change 2013-11-30 09:59:22 +13:00
ScottNZ
e640122d3f Update CHANGELOG 2013-11-29 23:49:49 +13:00
ScottNZ
0ca8f41114 Add two Lua-powered single player missions 2013-11-29 23:49:41 +13:00
ScottNZ
1c09d4434b Fix Einstein's voice 2013-11-29 23:49:29 +13:00
ScottNZ
f7c39aaf3b Add some additional mission notifications to ra's notifications.yaml 2013-11-29 23:49:14 +13:00
ScottNZ
e4d477b0e0 Add Lua standard library and supporting C#/yaml 2013-11-29 23:48:44 +13:00
ScottNZ
6a14434cff Add a CenterPosition helper to Viewport 2013-11-29 23:01:50 +13:00
ScottNZ
e4e6169f7f Add a function to World for setting just the local pause state, and add a lock variable to prevent further pause state changes 2013-11-29 23:01:18 +13:00
ScottNZ
b69508fb6b Remove MustBeDestroyed from ^TechBuilding 2013-11-29 22:58:04 +13:00
ScottNZ
0527c883b9 Move DeployTransform logic into its own method, and remove its CancelActivity call so it works properly when queued 2013-11-29 22:56:24 +13:00
ScottNZ
9312a7e03a Add husk for V19 (oil pump) 2013-11-29 22:54:42 +13:00
Matthias Mailänder
6e4187cca1 Merge pull request #4177 from pchote/disable-stuff
Remove language selector and IRC chat from the visible game UI.
2013-11-29 01:19:14 -08:00
Paul Chote
c861d7a930 Add server filter checkboxes to C&C. 2013-11-28 22:17:08 +13:00
Paul Chote
76c332acca Disable IRC chat in the server browser. 2013-11-28 22:14:29 +13:00
Paul Chote
a99d7fee82 Disable language selector. 2013-11-28 22:05:14 +13:00
Paul Chote
54c81eb2c7 Merge pull request #4156 from reaperrr/widgets04
Improved Widget text customizability rev.2
2013-11-27 00:47:00 -08:00
Matthias Mailänder
58bf488ad0 Merge pull request #4054 from cjshmyr/healthbars
Added 2 new settings for unit health bars (fixes #3867)
2013-11-24 13:08:50 -08:00
Curtis Shmyr
d30f60809b Added 2 settings for unit health bars: always show unit health, and team health bar colors 2013-11-24 12:12:52 -07:00
reaperrr
1f789b4296 var instead of SpriteFont on TimerWidget. 2013-11-22 13:49:18 +01:00
reaperrr
f743cedb10 Adds improved UI customizability to changelog. 2013-11-22 13:36:55 +01:00
reaperrr
09606e8ffd Moved duplicate float2 before if as suggested. 2013-11-22 13:36:22 +01:00
reaperrr
4c92280b7e Moved duplicated int2 in ButtonWidget before if as suggested. 2013-11-22 13:34:46 +01:00
Paul Chote
90fa7743c3 Merge pull request #4166 from Mailaender/minor-fixes
Minor fixes to yet unused artwork
2013-11-22 01:40:33 -08:00
Paul Chote
bad95a3652 Merge pull request #4159 from reaperrr/camobox-cloaksound-fix
Disables cloak sound on camouflaged pillbox.
2013-11-22 00:07:35 -08:00
Paul Chote
3e74e224c3 Merge pull request #4149 from Mailaender/speedup-array-bounds
Fixed crash when the last production building was killed while the mouse was still hovering over the build palette
2013-11-21 23:57:23 -08:00
Paul Chote
7777a3673e Merge pull request #4148 from Mailaender/rank-hardening
Hardened the new Rank effect against crashes
2013-11-21 23:53:21 -08:00
Matthias Mailänder
2c889af346 fixed neutral tech center remap in make animation 2013-11-21 22:00:20 +01:00
reaperrr
703145fc14 Changelog entry for removed cloak sounds on camo pillbox. 2013-11-21 21:54:19 +01:00
Matthias Mailänder
07c9c70426 use the TS move flash instead of the RA one 2013-11-21 21:38:53 +01:00
Chris Forbes
593a1ff0d6 Merge pull request #4151 from Mailaender/assetbrowser-renovation
Asset Browser Renovation
2013-11-21 12:15:40 -08:00
reaperrr
60e861e6e4 Sets cloak and uncloak sound defaults to null. 2013-11-21 16:33:56 +01:00
Matthias Mailänder
f5f6545ba0 Merge pull request #4160 from reaperrr/desert-church-fix
Makes desert church garrisonable by Sniper.
2013-11-20 13:53:45 -08:00
reaperrr
4664e3ed2b Makes desert church garrisonable by Sniper. Closes #4152. 2013-11-20 16:27:25 +01:00
reaperrr
45afbcb38e Disables cloak sound on camouflaged pillbox. Closes #4154. 2013-11-20 16:18:02 +01:00
Paul Chote
9883658d0f Merge pull request #4140 from ScottNZ/lua-wip
Add map scripting support
2013-11-19 16:25:07 -08:00
reaperrr
701c5b6aac Disables ButtonWidget contrast default (accidental left-over from testing). 2013-11-19 15:53:13 +01:00
reaperrr
f9c2e90c6b Moves TextFieldWidget defaults to metrics.yaml. 2013-11-19 01:42:16 +01:00
reaperrr
e73b3705c6 Moves defaults for HotkeyEntryWidget to global settings in metrics.yaml. 2013-11-19 01:41:32 +01:00
reaperrr
394a2b5166 Makes ButtonWidget and Widgets based on it more customizable, sets defaults in metrics.yaml. 2013-11-19 01:39:57 +01:00
reaperrr
915bf2cff0 Makes TimerWidget LabelWidget-based for better customizability. Sets defaults for LabelWidget in metrics.yaml. 2013-11-19 01:37:01 +01:00
ScottNZ
6327a88b68 Update CHANGELOG for Lua support and 'make install' changes 2013-11-18 20:59:25 +13:00
Matthias Mailänder
94d1936286 fix shortcut on Linux 2013-11-18 20:56:04 +13:00
Matthias Mailänder
fcd8997c25 break RPM auto dependency generation completely apart
so it installs this noarch
which is in fact x86_64 (because of the build server)
even on i586
2013-11-18 20:56:04 +13:00
Matthias Mailänder
5f92b69211 don't terminate the RPM build because we ship .so in noarch
TODO: this is horrible!
2013-11-18 20:56:03 +13:00
Matthias Mailänder
c257b3e74b fix duplicate / 2013-11-18 20:56:03 +13:00
Matthias Mailänder
2062a1bf9b install openra to /usr/lib now that we ship native libraries 2013-11-18 20:56:02 +13:00
Matthias Mailänder
1d60b86b9b fix indentions 2013-11-18 20:56:02 +13:00
Matthias Mailänder
a0d0bc9830 clean up exe laying around elsewhere 2013-11-18 20:56:02 +13:00
Matthias Mailänder
17a024202b we now have .so and .dylib 2013-11-18 20:56:01 +13:00
Matthias Mailänder
6498e0ec7a moved KDE stuff into local git ignore 2013-11-18 20:56:01 +13:00
Matthias Mailänder
3e5255d619 remove old and misleading note 2013-11-18 20:56:00 +13:00
Matthias Mailänder
acd7efd957 install the Lua libraries on Mac OS and Linux 2013-11-18 20:56:00 +13:00
ScottNZ
d01ee2a75e Update build, package and installer scripts for LuaInterface 2013-11-18 20:56:00 +13:00
ScottNZ
e730580030 Add LuaInterface dependencies 2013-11-18 20:55:59 +13:00
ScottNZ
cd0b3d8862 Add map scripting support 2013-11-18 20:55:59 +13:00
ScottNZ
b2f46a56ea Add FindType method to ObjectCreator 2013-11-18 20:55:58 +13:00
ScottNZ
0a50371a37 Add LuaInterface project 2013-11-18 20:55:58 +13:00
ScottNZ
55423b159a Move RASpecialPowers into OpenRA.Mods.RA.Scripting 2013-11-18 20:55:57 +13:00
Matthias Mailänder
d9148edc8d updated CHANGELOG 2013-11-17 23:37:31 +01:00
Matthias Mailänder
da235d7aee .IsDead() includes the .Destroyed check 2013-11-17 23:32:32 +01:00
Matthias Mailänder
8a13cd6c6a additional checks to avoid giving dead actors a rank sign
closes #4134
2013-11-17 23:28:02 +01:00
Matthias Mailänder
dd848ddd11 PaulCop clean 2013-11-17 22:43:59 +01:00
Matthias Mailänder
9e50f577a0 fixed index outside bounds of the array when 0 productions left
closes #4137
2013-11-17 22:16:31 +01:00
Matthias Mailänder
e981275cb1 added a palette chooser and colorpicker dropdown to the browser 2013-11-17 21:27:47 +01:00
Matthias Mailänder
d9ac907315 abbreviate the user support folder as in mod.yaml 2013-11-17 17:22:20 +01:00
Matthias Mailänder
6171ea7cf3 harden asset browser against invalid user input and allow R8
closes #3980
2013-11-17 17:19:47 +01:00
Matthias Mailänder
f6bd53c15e StyleCop 2013-11-17 16:09:23 +01:00
Matthias Mailänder
d973ed307f don't crash the asset browser when loading sprites with 1 frame
closes #4125
2013-11-17 16:07:32 +01:00
Matthias Mailänder
5d3987dee3 Update CHANGELOG
side effect from #3676
2013-11-17 08:37:23 +01:00
Matthias Mailänder
a8a5a88e8f Merge pull request #4138 from pchote/remove-mod-merging
Remove runtime mod merging
2013-11-16 11:04:44 -08:00
Paul Chote
8026b6ded6 Merge pull request #4141 from Mailaender/proximity
Removed Proxmity trait everywhere
2013-11-15 22:48:56 -08:00
Matthias Mailänder
b875e9f0a2 remove bit-rotted Proxmity trait 2013-11-15 14:32:18 +01:00
Paul Chote
d6f1debe22 Stylecop clean Manifest. 2013-11-15 09:54:42 +13:00
Paul Chote
a08dbdba05 Stylecop clean Mod. 2013-11-15 09:54:42 +13:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
Chris Forbes
4d893cb1f2 Merge pull request #4129 from ScottNZ/refactor
Refactor
2013-11-12 00:06:01 -08:00
Chris Forbes
e8f961b13c Merge pull request #4130 from ScottNZ/lua-wip
Rewrite our Equals implementations
2013-11-12 00:05:51 -08:00
ScottNZ
3f117d751b Fix HackyAI confusing an empty sequence for null 2013-11-12 20:27:36 +13:00
ScottNZ
74e2baeb48 Fix a few spelling errors 2013-11-12 19:39:41 +13:00
ScottNZ
49b1e69f44 Fix a stack overflow 2013-11-12 19:39:40 +13:00
ScottNZ
dfd19187fe Fix closure removal in Download.cs 2013-11-12 19:39:40 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
8197f29606 Rename type parameter "ValueType" to "T" in HackyAI.cs 2013-11-12 19:39:39 +13:00
ScottNZ
f1f1a2b166 Add missing license notice to ResourceClaim.cs 2013-11-12 19:39:38 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
ScottNZ
86a3e14f2d Remove constructor base() redundancies 2013-11-12 17:31:55 +13:00
ScottNZ
7c5f3cc0f1 Replace some Where-FirstOrDefault chains with a single call to FirstOrDefault 2013-11-12 17:21:31 +13:00
ScottNZ
c373bc22e8 Rewrite our Equals implementations so they don't crash when comparing incompatible objects 2013-11-12 17:12:56 +13:00
Chris Forbes
9643609c31 Merge pull request #4128 from pchote/deb-fix
Fix debian package and packaging.
2013-11-11 13:19:33 -08:00
Matthias Mailänder
b659d83239 Fix debian package and packaging. 2013-11-12 10:15:37 +13:00
Paul Chote
eb46b5a131 Merge pull request #4126 from ScottNZ/flashtarget-crash
Fix FlashTarget crash
2013-11-11 03:20:16 -08:00
ScottNZ
fb4e1b4805 Fix FlashTarget crash 2013-11-11 23:49:00 +13:00
Paul Chote
1959326c4d Merge pull request #4117 from Mailaender/nsis-mods-hotfix
Install mods to OpenRA\mods sub-folder using NSIS!
2013-11-11 02:20:47 -08:00
Matthias Mailänder
43a878887c hotfix broken mods folder 2013-11-10 12:27:53 +01:00
1213 changed files with 33590 additions and 38338 deletions

13
.gitignore vendored
View File

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

45
AUTHORS
View File

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

242
CHANGELOG
View File

@@ -1,6 +1,192 @@
NEW:
All Mods:
Added the ability to place map beacons for highlighting areas to teammates (Hotkey: F9).
The default pause hotkey has changed to F8.
Structures under attack and friendly superweapon launch targets will now be highlighted on the radar.
Fixed unloading passengers moving unnecessarily far from their transport.
Fixed the unload cursor sometimes being displayed for transports even when they were unable to unload.
An error dialog is now displayed when server connections are lost.
Added AttackMove and Guard abilities to Aircraft and Helicopters.
Aircraft and Helicopters can now be guarded by other units.
Unified the main menu navigation between TD and other mods:
Moved Create Game and Direct Connect facilities to the server browser.
Added skirmish mode to RA and D2k to complement TD's skirmish mode.
Added an Extras submenu for miscellaneous game extras.
Husks are now rendered with a black overlay.
Allow force fire to destroy husks.
A player's units, and allied units, now move out of the way when blocking production facilities.
Added cheat button to grow map resources.
Fixed units staying selected and contributing to control groups when becoming cloaked or hidden in fog.
Swapped the cursors used for sabotaging and capturing buildings/units.
Added Ctrl+T shortcut for selection of all units matching the types of the currently selected ones across the screen and map.
Added a toggle spectators to multiplayer.
Removed the ability of commandos to plant C4 on walls.
Order lines are now shown on unit selection.
Fixed chat synchronization in replays.
Added a combined shroud view of every player to the replay viewer and spectator mode.
Improved the observer/replay view selector with teams, factions, player colors, and hotkeys.
Added playback speed controls to replays.
Fixed the game sometimes crashing when deploying and activating the guard cursor at the same time.
Build time is now set when an item reaches the front of a queue, instead of immediately when queued.
The attack cursor now changes if the target is out of range.
The server browser will now show map details from other mods if the maps are available online.
Fixed a crash when connecting to a server with an unavailable map.
Added a warning dialog when force starting a match.
Added a new mod selection window, which now appears on the first game start.
Fixed walls not updating when neighboring sections were sold or destroyed.
Dune 2000:
Engineers can now regain control over husks.
Added the Atreides grenadier from the 1.06 patch.
Added randomized tiles for Sand and Rock terrain.
Shroud is now displayed by default again (disable it in the lobby settings).
Removed the build radius restrictions.
Added the BLOXXMAS terrain tiles from the 1.06 patch.
Saboteur can now plant C4 on vehicles.
Added concrete plates and building weathering.
Turrets now integrate with walls (visually, and as line building targets).
Fixed unclickable area on the right edge of the production palette.
Red Alert:
Mechanics can now regain control over husks.
Engineers are now remapped to team colors.
Added some remap to the bottom edge of SAM sites.
Chinook rotors now counter-rotate.
Transports will now open their doors when at shore.
Tanya can now plant C4 on bridges.
Submarine torpedoes can now hit bridges when force fired.
Increased torpedo splash damage and raised multiplier vs. concrete.
Fixed transparency glitches in the sniper icon.
Removed health bars and selection boxes from walls.
Renamed Flak Truck to Mobile Flak.
Increased the shroud reveal range of Mobile Flak from 4 to 6.
Increased the turret rotation speed of Mobile Flak from 5 to 10.
Increased the hitpoints of Mobile Flak from 120 to 150.
Fixed Tanya being unavailable after using the Chronosphere on a vehicle she is in.
Tanya can now plant C4 on vehicles.
Decreased the cost of Mobile Radar Jammer from 1000 to 800.
Increased the hitpoints of Shock Trooper from 80 to 100.
Fixed Shock Trooper tooltip having the incorrect unit name.
Removed the TakeCover trait from Shock Trooper.
Parachute bomb air strike will reveal the whole target area.
Adjusted AA Guns to fire their guns alternately at a high fire rate, and added contrails to their bullets.
Decreased AA Gun ZSU-23 damage from 25 to 12.
Increased SAM Site power cost from -20 to -40.
Decreased SAM Site Nike damage from 100 to 50.
Increased Radar Dome cost from 1600 to 1800.
Added a snow variation of the Allied Barracks by Kilkakon.
Added a desert variation of the Allied Barracks by Kilkakon.
Added a desert variation of the Missile Silo by Kilkakon.
Removed the temperate shellmap and improved the design and performance of the desert shellmap.
Removed the hardcoded missions. These will be later reimplemented.
Removed maps: Battle Lake, Crossing the River, Doughnut Hole, Ice Woods, Island Hoppers (KOTH), Mad Scramble, Nishnekolymsk, Strip Mine, Free Coasts
Fixed spies staying on the minimap after infiltration.
Added maps: Blitzkrieg and Burlesca by s1w.
Added map: Seaside 2 by hamb.
Both Allied and Soviet factions now build general-purpose mines instead of AT and AP mines respectively.
Added new attack-move cursor artwork.
Added Phase Transport, an Allied high-tech infantry transport which can cloak.
Added Hijacker, a Soviet infantry unit with a vehicle hijacking ability.
Attack Dogs, Snipers, Mobile Radar Jammers, Camo Pillboxes, Phase Transports, Radar Domes, and Spy Planes can now detect cloaked units.
Removed the submarine detection ability from Cruiser and Transport.
Added the submarine detection ability to Submarines and Missile Subs.
Increased the submarine detection range of Gunboat from 3 to 4.
Fixed Spies having an enemy color health bar when disguised as a friendly unit (occurred using the Team Health Colors setting).
Chrono Tanks can now be teleported in groups by holding SHIFT or ALT and issuing a move order.
Increased the maximum teleport distance in cells for Chrono Tank from 10 to 12.
Decreased the teleport cooldown in seconds for Chrono Tank from 30 to 20.
Added Minibibs for bibless buildings.
Fixed Small portion of Production tab on Right side was unresponsive
Fixed unclickable area on the right edge of the production palette.
Tiberian Dawn:
Engineers can now regain control over husks.
Chinook rotors now counter-rotate.
Commando can now plant C4 on bridges.
Added the Asset Browser to the Extras menu.
Removed health bars and selection boxes from walls.
Changed Nod Obelisk HP to 600 from 400, same as Advanced Guard Tower
Fixed dinosaurs not being able to collect crates.
A10 air strike will only reveal the target area.
Reduced Guard Tower vision from 7 to 6.
Increased Guard Tower build time from 12 seconds to 24 seconds.
Reduced Gun Turret vision from 7 to 6.
Increased Gun Turret build time from 15 seconds to 30 seconds.
Increased Sam Site build time from 18 seconds to 36 seconds.
Reduced Advanced Guard Tower vision from 9 to 7.
Increased Advanced Guard Tower build time from 24 seconds to 48 seconds.
Reduced Obelisk vision from 8 to 7.
Increased Obelisk build time from 36 seconds to 52 seconds.
Decreased Tiberium damage rate by a factor of 3.
Decreased Visceroid health by 25% and removed their ability to gain experience.
Increased the chance of Tiberium or chemical deaths spawning a Visceroid from 2% to 10%.
Increased Obelisk of Light laser damage from 200 to 360.
Fixed Obelisk of Light charge animation and sound not playing.
Replaced or improved several mouse cursors.
Added Minibibs for bibless buildings.
The Construction Yard fans now turn in the color picker preview.
The chance of artillery exploding on death has been reduced from 100% to 75%.
Fixed Chinook being unable to land on tiberium.
Engine:
Converted Aircraft CruiseAltitude to world coordinates.
Converted Health Radius to world coordinates.
Converted production exits to world coordinates.
Converted weapon projectiles to world coordinates.
Converted actor speed to world coordinates.
Added support for rectangular cells with forced perspective.
Added initial support for Tmp(TS) sprites.
Added GainsUnitUpgrades trait for leveling specific unit upgrades - firepower, armor, speed.
Added support for crates to level up specific unit upgrades.
Merged CrateDrop functionality into CrateSpawner.
Added support to CrateSpawner for spawning multiple types of crates.
Added a new Launch.Replay=$FILEPATH parameter for OpenRA.Game.exe to instantly start watching a *.rep file.
Added HackyAI settings: ExcessPowerFactor, MinimumExcessPower, IdleBaseUnitsMaximum, RushAttackScanRadius, ProtectUnitScanRadius, RallyPointScanRadius. See the traits documentation for more information.
Added HitAnimPalette trait for LaserZap projectiles. Laser hit animations can now specify individual palettes. Defaults to effect palette.
Added RenderNameTag trait to show the player's name above an actor.
Fixed performance issues with units pathing to naval transports.
Fixed unit moving to transports that have moved.
Updated shroud-based traits to use world units.
Renamed AttackTesla into AttackCharge and un-hardcoded initial charge delay and delay for additional charges.
Updated RenderBuildingCharge so you can set a custom charge sequence name (default is active).
Added IEffectiveOwner interface for traits/logic that temporarily alter an actor's apparent owner.
Renamed Spy trait to Disguise, SpyToolTip trait to DisguiseToolTip, and RenderSpy trait to RenderDisguise.
Overhauled the internal map management and preview generation code.
Muzzleflash definitions have moved from WithMuzzleFlash to each Armament. Only one WithMuzzleFlash is now required per actor.
Added an AttackGarrisoned trait that allows passengers to fire through a set of defined ports.
Maps can define initial cargo for actors by adding "Cargo: actora, actorb, ..." to the actor reference.
Modified Teleport activity to use the best/closest open cell to the target destination for teleports (for ChronoshiftPower this only applies on the return trip).
Renamed ChronoshiftDeploy trait to PortableChrono.
Added LineBuildNode trait to filter which structure(s) a LineBuild actor can be attached to.
Server:
Message of the day is now shared between all mods and a default motd.txt gets created in the user directory.
Asset Browser:
Filenames are now listed in alphabetical order
Map Editor:
Removed legacy INI/MPR map import.
Fixed being unable to use the flood fill tool on similar grass/snow/desert tiles.
Utility:
Added an improved INI/MPR map import.
Added an --upgrade-mod feature to upgrade the yaml of mods to the latest specifications.
Packaging:
Removed portable install option from Windows installer as the game left without write access breaks content download and error log generation.
Added HTML documentation to the Windows installer.
Fixed broken FreeType 2 dependency for Fedora RPM.
Added SDL 2 as a dependency for the RPM package.
Mod / Custom map compatibility:
Altitude is no longer parsed from actor templates in maps. Specify CenterPosition instead.
system.yaml has been split into four files for all mods: system-actor.yaml, system-ai.yaml, system-player.yaml and system-world.yaml.
Run `OpenRA.Utility.exe --upgrade-mod <mod> 20131223` to automatically upgrade mod rules.
Run `OpenRA.Utility.exe --upgrade-map <map path> 20131223` to automatically upgrade custom map rules.
Added a new trait Demolishable for buildings to handle the C4 demolition.
Mods that use custom TileSize must specify both width and height.
If you spot black tiles in your Dune 2000 ARRAKIS maps, replace them with the remaining sand and rock tiles. Go to Map → Fix Open Areas to randomize them.
The TestFile check in mod.yaml has been renamed to TestFiles (plural!) and now supports a comma-separated list of assets that are required to load the game.
DisabledOverlay has been split from RenderBuilding. Use it together with RequiresPower and CanPowerDown for buildings or directly with Husk.
Added support for custom map previews that replace the minimap in the game browser and lobby. Add map.png inside the map package.
The UI definition files have changed. Refer to the RA or TD mod.yaml and adjust the ChromeLayout of your mod.yaml to match.
A new cursor definition is required for "attackoutsiderange".
Mods can now include a 96x96 logo.png for the mod selector.
Mods can now include a 296x196 preview.png for the mod selector.
20131223:
All mods:
Added global chat to the server browser.
Fixed dead units sometimes exploding or leaving husks when they weren't in the world.
Added hover and disabled button states [RA / D2K / TS]
Added double click start support to the replay browser.
@@ -13,6 +199,17 @@ NEW:
Improved the ingame chat interface and input, with it defaulting to Team Chat.
Redesigned the settings panel.
Re-added move flashes.
Added a setting to always display unit status bars (can also be toggled by hotkey).
Added a setting for team health bar colors.
Added a new hotkey to select all units on screen (default: CTRL + A).
Added a new hotkey to jump to production buildings (default: TAB).
Changed default hotkey (PageUp/Down) for build palette cycling and made reverse user configurable.
Improved shroud/fog rendering.
Asset Browser:
Fixed crashes when trying to load invalid filenames or sprites with just 1 frame.
Added support for all sprite types.
Added palette chooser and colorpicker dropdown boxes.
Overhauled layout.
Red Alert:
Added MAD Tank.
Fixed a crash in Monster Tank Madness.
@@ -38,6 +235,8 @@ NEW:
Reduced Mechanic price from $800 to $500.
Added a 20% chance to eject a driver from destroyed vehicles.
Added production speed-ups for additional production buildings of the same type. Up to 50% faster production can be achieved with 7 production buildings.
Decreased the Oil Derrick cash rate from every 10 seconds to every 15 seconds.
Overhauled the Atom Bomb's damage model and introduced damage falloff over a wide radius.
Athena:
Reduced strategic victory timer to 3 minutes.
Increased the size of the starting islands.
@@ -45,6 +244,10 @@ NEW:
Fixed ant hills using the wrong tile ID.
Adjusted Zombie build palette position.
Fixed attack dogs causing crashes by attacking non-infantry.
Disabled cloak/uncloak sound for camouflaged Pillbox.
Added two Lua-powered single player missions, ported from Red Alert's single player campaign.
Fixed aircraft falling down not revealing shroud.
Fixed floating crate artwork.
Tiberian Dawn:
C&C mod renamed to Tiberian Dawn to resolve naming ambiguities.
Fixed Bio Lab wrongly belonging to a hostile faction in East vs West 3.
@@ -59,31 +262,54 @@ NEW:
Added cash tick sounds.
Disabled the main menu target reticle showing when a window is open.
Added a display of the faction logos when the shellmap is disabled.
Viceroids now heal on and move faster on Tiberium.
Implemented the original shroud artwork.
Fixed helicopters falling down not revealing shroud.
Fixed effect (explosions, etc) saturation when the ingame menu is activated.
Added shadow to crate artwork.
Dune 2000:
Added buildable concrete walls.
Fixed some cliffs being passable.
Fixed infantry sometimes using the wrong animation when standing.
Fixed A* debug overlay.
Fixed R8 offsets for sprites with embedded palettes.
Implemented proper spice rendering.
Implemented the original shroud artwork.
Engine:
Replays are now saved in per-mod and per-version folders.
Added password protection support for servers.
Added language translation support.
Added game ID and version information to exception and sync reports.
Map folders are now explicitly specified in mod.yaml.
Most UI widgets are now customizable in terms of font type, color, contrast and had their global defaults moved from code to metrics.yaml.
Replaced the OS X binary launcher with a script to use a new SDL2 renderer.
Improved cash tick sound playback.
Added modifier support to hotkeys.
Fixed a desync related to projectile contrails.
Fixed corrupted replays (which would immediately desync).
Removed runtime mod merging.
Added support for map scripting with Lua.
Overhauled sprite loading code.
Improved error message when loading corrupted sprites.
Rewritten shp(ts) parser makes more efficient use of texture space.
Added support for the dune 2 shp and pak formats.
Map format 6 requires the RequiresMod to be defined.
Added a multiplicitive blend mode.
Build system and packages:
Added GeoIP to Makefile so it is installed properly.
Added desktop shortcut creation support to the Makefile and Windows installer.
COPYING and CHANGELOG are now shipped on all platforms.
Fixed 'make docs' crashing when the game assets are not installed.
Renamed Game.Mods launch argument to Game.Mod.
Linux packages now install to /usr/lib/openra for consistency with other Mono applications.
Added an optional map.yaml check to the OpenRA.Lint.exe command line tool.
Map Editor:
Fixed custom assets being removed when saving an oramap.
Mod / Custom map compatibility:
Mods can now include traits from TD and D2K in RA.
Mods can now customize UI text settings like font type/color/contrast for most widgets and set global defaults in metrics.yaml.
New sections MapFolders and Translations added to mod.yaml.
Mods must now explicitly specify the mods that they can inherit maps from by defining `SupportsMapsFrom: parent_mod' in mod.yaml.
Renamed CarpetBomb trait to AttackBomber, and additional functionality added. An Armament trait is now required to specify the weapons.
Renamed Capture trait to ExternalCapture.
Renamed CapturableBar trait to ExternalCapturableBar.
@@ -99,6 +325,20 @@ NEW:
Removed traits from World: SpatialBins.
Added InvalidTargets property to weapons.
Added modifier support for build palette hotkeys.
The Requires: option for inheriting from a parent mod has been removed. Mods can directly reference the parent mod files instead.
Icons definitions have moved from the unit's rules to its sequence.
Mouse cursors (cursors.yaml) must now specify their file extension.
OpenRA.Utility --png will now generate a set of frames for any sprite type [shp(td)/shp(ts)/shp(d2)/r8/tmp(td)/tmp(ra)].
OpenRA.Utility --shp now requires a list of frames to be combined into a shp.
Removed Utility --tmp-png, --r8, --fromd2 commands (use --png instead).
Removed Asset Browser file extraction / conversion (use the Utility instead).
Added OpenRA.Utility --map-preview for generating minimap previews.
Added OpenRA.Utility --map-upgrade for updating maps from format 5 to format 6.
The map format has been changed. All user-installed maps will be upgraded on the first mod launch, or using OpenRA.Utility --map-upgrade.
Unified sprite loading allows any sprite type to be used anywhere: shp can now be used for terrain, and tmp for units.
Harvestable resource definitions (ResourceTypes) have changed, and now specify their artwork using sequences.
Shroud definitions (ShroudRenderer / ShroudPalette) have changed, and now specifies its artwork using sequences.
Crater and smudge definitions (SmudgeLayer) have changed, and now specify their artwork using sequences.
20130915:
All mods:

View File

@@ -19,7 +19,6 @@
#endregion
using System;
using System.IO;
namespace GeoIP
{

View File

@@ -19,7 +19,6 @@
#endregion
using System;
using System.IO;
namespace GeoIP
{

View File

@@ -19,7 +19,6 @@
#endregion
using System;
using System.IO;
namespace GeoIP
{

View File

@@ -19,7 +19,6 @@
#endregion
using System;
using System.IO;
public class Region
{

View File

@@ -29,13 +29,14 @@ or build it from the command-line with MSBuild.
Copy both the native DLLs from .\packaging\windows
and the CLI images from .\thirdparty to the main folder.
Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
Run the game with `OpenRA.Game.exe Game.Mod=ra` for Red Alert
or `OpenRA.Game.exe Game.Mod=cnc` for Command & Conquer
Debian/Ubuntu
-------------
* mono-gmcs
* libmono-winforms2.0-cil
* cli-common-dev (>= 2.10)
* freetype
* openal

254
Makefile
View File

@@ -48,8 +48,10 @@ prefix ?= /usr/local
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
bindir ?= $(prefix)/bin
libexecdir ?= $(prefix)/lib
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
DATA_INSTALL_DIR = $(DESTDIR)$(datadir)/openra
# TODO: separate data and binaries properly
DATA_INSTALL_DIR = $(DESTDIR)$(libexecdir)/openra
# install tools
RM = rm
@@ -63,7 +65,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755
INSTALL_DATA = $(INSTALL) -m644
# program targets
CORE = fileformats rcg rgl rsdl rnull game utility geoip irc
CORE = fileformats rcg rgl rsdl rsdl2 rnull game utility geoip irc
TOOLS = editor tsbuild ralint
VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`)
@@ -73,126 +75,124 @@ VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev
######################## PROGRAM TARGET RULES ##########################
#
# Core binaries
fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
fileformats_TARGET = OpenRA.FileFormats.dll
fileformats_KIND = library
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll
PROGRAMS = fileformats
fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
fileformats_TARGET = OpenRA.FileFormats.dll
fileformats_KIND = library
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll
PROGRAMS = fileformats
fileformats: $(fileformats_TARGET)
geoip_SRCS := $(shell find GeoIP/ -iname '*.cs')
geoip_TARGET = GeoIP.dll
geoip_KIND = library
geoip_LIBS = $(COMMON_LIBS)
PROGRAMS += geoip
geoip_SRCS := $(shell find GeoIP/ -iname '*.cs')
geoip_TARGET = GeoIP.dll
geoip_KIND = library
geoip_LIBS = $(COMMON_LIBS)
PROGRAMS += geoip
geoip: $(geoip_TARGET)
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_DEPS = $(fileformats_TARGET)
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \
thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs')
game_TARGET = OpenRA.Game.exe
game_KIND = winexe
game_DEPS = $(fileformats_TARGET)
game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs')
irc_TARGET = OpenRA.Irc.dll
irc_KIND = library
irc_DEPS = $(fileformats_TARGET) $(game_TARGET)
irc_LIBS = $(COMMON_LIBS) $(irc_DEPS)
PROGRAMS += irc
irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs')
irc_TARGET = OpenRA.Irc.dll
irc_KIND = library
irc_DEPS = $(fileformats_TARGET) $(game_TARGET)
irc_LIBS = $(COMMON_LIBS) $(irc_DEPS)
PROGRAMS += irc
irc: $(irc_TARGET)
# Renderer dlls
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rsdl_DEPS)
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll $(rsdl_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll $(rcg_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll $(rcg_DEPS)
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS)
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll $(rgl_DEPS)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
rsdl2_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2\#.dll $(rsdl2_DEPS)
rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs')
rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll
rsdl2_KIND = library
rsdl2_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET) $(rgl_TARGET)
rsdl2_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.OpenGl.dll thirdparty/SDL2\#.dll $(rsdl2_DEPS)
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rcg rgl rsdl2 rnull rsdl
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) $(rnull_DEPS)
PROGRAMS += rcg rgl rsdl2 rnull rsdl
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rsdl2_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
##### Official Mods #####
STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET)
STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET) thirdparty/KopiLua.dll thirdparty/NLua.dll
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
# Red Alert
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
mod_ra_KIND = library
mod_ra_DEPS = $(STD_MOD_DEPS) $(utility_TARGET) $(geoip_TARGET) $(irc_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(utility_TARGET) $(geoip_TARGET) $(irc_TARGET)
PROGRAMS += mod_ra
mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs')
mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
mod_ra_KIND = library
mod_ra_DEPS = $(STD_MOD_DEPS) $(geoip_TARGET) $(irc_TARGET)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(geoip_TARGET) $(irc_TARGET)
PROGRAMS += mod_ra
mod_ra: $(mod_ra_TARGET)
# Command and Conquer
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_cnc
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_cnc
mod_cnc: $(mod_cnc_TARGET)
# Dune 2000
mod_d2k_SRCS := $(shell find OpenRA.Mods.D2k/ -iname '*.cs')
mod_d2k_TARGET = mods/d2k/OpenRA.Mods.D2k.dll
mod_d2k_KIND = library
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_d2k
mod_d2k_SRCS := $(shell find OpenRA.Mods.D2k/ -iname '*.cs')
mod_d2k_TARGET = mods/d2k/OpenRA.Mods.D2k.dll
mod_d2k_KIND = library
mod_d2k_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET) $(mod_cnc_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_TARGET)
# Tiberian Sun
mod_ts_SRCS := $(shell find OpenRA.Mods.TS/ -iname '*.cs')
mod_ts_TARGET = mods/ts/OpenRA.Mods.TS.dll
mod_ts_KIND = library
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_ts
mod_ts_SRCS := $(shell find OpenRA.Mods.TS/ -iname '*.cs')
mod_ts_TARGET = mods/ts/OpenRA.Mods.TS.dll
mod_ts_KIND = library
mod_ts_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_ts_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
PROGRAMS += mod_ts
mod_ts: $(mod_ts_TARGET)
##### Tools #####
# Map Editor
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
editor_KIND = winexe
editor_DEPS = $(fileformats_TARGET) $(game_TARGET)
editor_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll System.Data.dll $(editor_DEPS)
editor_EXTRA = -resource:OpenRA.Editor.Form1.resources -resource:OpenRA.Editor.MapSelect.resources
editor_FLAGS = -win32icon:OpenRA.Editor/OpenRA.Editor.Icon.ico
PROGRAMS += editor
PROGRAMS += editor
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
OpenRA.Editor.Form1.resources:
@@ -200,32 +200,32 @@ OpenRA.Editor.Form1.resources:
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
# Analyses mod yaml for easy to detect errors
ralint_SRCS := $(shell find OpenRA.Lint/ -iname '*.cs')
ralint_TARGET = OpenRA.Lint.exe
ralint_KIND = exe
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint_SRCS := $(shell find OpenRA.Lint/ -iname '*.cs')
ralint_TARGET = OpenRA.Lint.exe
ralint_KIND = exe
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += ralint
ralint: $(ralint_TARGET)
test:
@mono --debug OpenRA.Lint.exe ra
@echo "OpenRA.Lint: ra mod yaml checks passed."
@mono --debug OpenRA.Lint.exe cnc
@echo "OpenRA.Lint: cnc mod yaml checks passed."
@mono --debug OpenRA.Lint.exe d2k
@echo "OpenRA.Lint: d2k mod yaml checks passed."
@mono --debug OpenRA.Lint.exe ts
@echo "OpenRA.Lint: ts mod yaml checks passed."
@echo "OpenRA.Lint: checking Red Alert mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ra
@echo "OpenRA.Lint: checking Tiberian Dawn mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose cnc
@echo "OpenRA.Lint: checking Dune 2000 mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose d2k
@echo "OpenRA.Lint: checking Tiberian Sun mod MiniYAML..."
@mono --debug OpenRA.Lint.exe --verbose ts
# Builds and exports tilesets from a bitmap
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = OpenRA.TilesetBuilder.exe
tsbuild_KIND = winexe
tsbuild_DEPS = $(fileformats_TARGET) $(game_TARGET)
tsbuild_LIBS = $(COMMON_LIBS) $(tsbuild_DEPS) System.Windows.Forms.dll
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.FormBuilder.resources -resource:OpenRA.TilesetBuilder.FormNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
OpenRA.TilesetBuilder.FormBuilder.resources:
resgen2 OpenRA.TilesetBuilder/FormBuilder.resx OpenRA.TilesetBuilder.FormBuilder.resources 1> /dev/null
OpenRA.TilesetBuilder.FormNew.resources:
@@ -238,12 +238,12 @@ tsbuild: OpenRA.TilesetBuilder.FormBuilder.resources OpenRA.TilesetBuilder.FormN
##### Launchers / Utilities #####
# Backend for the launcher apps - queries game/mod info and applies actions to an install
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
utility_DEPS = $(fileformats_TARGET) $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll System.Windows.Forms.dll
PROGRAMS += utility
utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs')
utility_TARGET = OpenRA.Utility.exe
utility_KIND = exe
utility_DEPS = $(fileformats_TARGET) $(game_TARGET)
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.SharpZipLib.dll System.Windows.Forms.dll
PROGRAMS += utility
utility: $(utility_TARGET)
@@ -314,6 +314,7 @@ install-core: default
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)/mods"
@$(CP_R) mods/common "$(DATA_INSTALL_DIR)/mods/"
@$(CP_R) mods/cnc "$(DATA_INSTALL_DIR)/mods/"
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) "$(DATA_INSTALL_DIR)/mods/cnc"
@$(CP_R) mods/ra "$(DATA_INSTALL_DIR)/mods/"
@@ -331,18 +332,21 @@ install-core: default
@$(CP_R) cg "$(DATA_INSTALL_DIR)"
@$(CP) *.ttf "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/Tao/* "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/SDL2\#* "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/SharpFont.dll "$(DATA_INSTALL_DIR)"
@$(CP) thirdparty/SharpFont.dll.config "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/KopiLua.dll "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) thirdparty/NLua.dll "$(DATA_INSTALL_DIR)"
@echo "#!/bin/sh" > openra
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra
@echo 'DATADIR="$${ROOTDIR}'"$(datadir)"'"' >> openra
@echo 'cd "$${DATADIR}/openra"' >> openra
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
@echo "#!/bin/sh" > openra
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra
@echo 'EXECDIR="$${ROOTDIR}'"$(libexecdir)"'"' >> openra
@echo 'cd "$${EXECDIR}/openra"' >> openra
@echo 'exec mono OpenRA.Game.exe "$$@"' >> openra
@$(INSTALL_DIR) "$(BIN_INSTALL_DIR)"
@$(INSTALL_PROGRAM) -m +rx openra "$(BIN_INSTALL_DIR)"
@-$(RM) openra
@@ -352,12 +356,12 @@ install-tools: tools
@$(INSTALL_DIR) "$(DATA_INSTALL_DIR)"
@$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) "$(DATA_INSTALL_DIR)"
@echo "#!/bin/sh" > openra-editor
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor
@echo 'cd "$${DATADIR}/openra"' >> openra-editor
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
@echo "#!/bin/sh" > openra-editor
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor
@echo 'EXECDIR="$${ROOTDIR}'"$(libexecdir)"'"' >> openra-editor
@echo 'cd "$${EXECDIR}/openra"' >> 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

View File

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

View File

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

View File

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

View File

@@ -50,8 +50,8 @@ namespace OpenRA.Editor
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
var mod = Game.modData.Manifest.Mods[0];
Text = "{0} Mod Version: {1} - OpenRA Editor".F(Mod.AllMods[mod].Title, Mod.AllMods[mod].Version);
var mod = Game.modData.Manifest.Mod;
Text = "{0} Mod Version: {1} - OpenRA Editor".F(mod.Title, mod.Version);
loadedMapName = null;
};
@@ -145,7 +145,7 @@ namespace OpenRA.Editor
{
Rules.LoadRules(manifest, map);
tileset = Rules.TileSets[map.Tileset];
tilesetRenderer = new TileSetRenderer(tileset, new Size(manifest.TileSize, manifest.TileSize));
tilesetRenderer = new TileSetRenderer(tileset, manifest.TileSize);
var shadowIndex = new int[] { 3, 4 };
var palette = new Palette(FileSystem.Open(tileset.Palette), shadowIndex);
@@ -343,6 +343,7 @@ namespace OpenRA.Editor
SaveAsClicked(sender, e);
else
{
surface1.Map.RequiresMod = currentMod;
surface1.Map.Save(loadedMapName);
dirty = false;
}
@@ -392,7 +393,8 @@ namespace OpenRA.Editor
if (DialogResult.OK == nmd.ShowDialog())
{
var map = Map.FromTileset(nmd.TheaterBox.SelectedItem as string);
var tileset = OpenRA.Rules.TileSets[nmd.TheaterBox.SelectedItem as string];
var map = Map.FromTileset(tileset);
map.Resize((int)nmd.MapWidth.Value, (int)nmd.MapHeight.Value);
map.ResizeCordon((int)nmd.CordonLeft.Value, (int)nmd.CordonTop.Value,
@@ -400,6 +402,7 @@ namespace OpenRA.Editor
map.Players.Clear();
map.MakeDefaultPlayers();
map.FixOpenAreas();
NewMap(map);
}
@@ -435,37 +438,6 @@ namespace OpenRA.Editor
Close();
}
void ImportLegacyMapClicked(object sender, EventArgs e)
{
using (var ofd = new OpenFileDialog { RestoreDirectory = true,
Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" })
if (DialogResult.OK == ofd.ShowDialog())
{
/* massive hack: we should be able to call NewMap() with the imported Map object,
* but something's not right internally in it, unless loaded via the real maploader */
var savePath = Path.Combine(Path.GetTempPath(), "OpenRA.Import");
Directory.CreateDirectory(savePath);
var errors = new List<string>();
var map = LegacyMapImporter.Import(ofd.FileName, a => errors.Add(a));
if (errors.Count > 0)
using (var eld = new ErrorListDialog(errors))
eld.ShowDialog();
map.MakeDefaultPlayers();
map.Save(savePath);
LoadMap(savePath);
loadedMapName = null; /* editor needs to think this hasnt been saved */
Directory.Delete(savePath, true);
MakeDirty();
}
}
void OnFormClosing(object sender, FormClosingEventArgs e)
{
if (!dirty) return;
@@ -513,18 +485,7 @@ namespace OpenRA.Editor
void FixOpenAreas(object sender, EventArgs e)
{
dirty = true;
var r = new Random();
for (var j = surface1.Map.Bounds.Top; j < surface1.Map.Bounds.Bottom; j++)
for (var i = surface1.Map.Bounds.Left; i < surface1.Map.Bounds.Right; i++)
{
var tr = surface1.Map.MapTiles.Value[i, j];
if (tr.Type == 0xff || tr.Type == 0xffff || tr.Type == 1 || tr.Type == 2)
tr.Index = (byte)r.Next(0, surface1.TileSetRenderer.Data(tr.Type).Count);
surface1.Map.MapTiles.Value[i, j] = tr;
}
surface1.Map.FixOpenAreas();
surface1.Chunks.Clear();
surface1.Invalidate();
}
@@ -597,7 +558,7 @@ namespace OpenRA.Editor
void DeveloperBountiesToolStripMenuItemClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://www.bountysource.com/#repos/OpenRA/OpenRA");
System.Diagnostics.Process.Start("https://www.bountysource.com/trackers/36085-openra");
}
void SourceCodeToolStripMenuItemClick(object sender, EventArgs e)
@@ -700,7 +661,7 @@ namespace OpenRA.Editor
{
int imageLength = 0;
int type = surface1.Map.MapResources.Value[x, y].Type;
var template = surface1.ResourceTemplates.Where(a => a.Value.Info.ResourceType == type).FirstOrDefault().Value;
var template = surface1.ResourceTemplates.FirstOrDefault(a => a.Value.Info.ResourceType == type).Value;
if (type == 1)
imageLength = 12;
else if (type == 2)
@@ -753,4 +714,4 @@ namespace OpenRA.Editor
surface1.IsErasing = eraserToolStripButton.Checked;
}
}
}
}

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Editor
if (DirectoryIsEmpty(MapFolderPath))
return;
foreach (var map in ModData.FindMapsIn(MapFolderPath))
foreach (var map in MapCache.FindMapsIn(MapFolderPath))
{
ListViewItem map1 = new ListViewItem();
map1.Tag = map;
@@ -79,7 +79,7 @@ namespace OpenRA.Editor
}
catch (Exception ed)
{
Console.WriteLine("No map preview image found: {0}", ed.ToString());
Console.WriteLine("No map preview image found: {0}", ed);
}
}
}

View File

@@ -96,7 +96,6 @@
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ITool.cs" />
<Compile Include="LegacyMapImporter.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
@@ -165,6 +164,7 @@
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="TileSetRenderer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

View File

@@ -22,38 +22,11 @@ namespace OpenRA.Editor
[STAThread]
static void Main(string[] args)
{
if (args.Length >= 2 && args[0] == "--convert")
{
Game.modData = new ModData(args[1]);
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
UpgradeMaps(args[1]);
return;
}
Application.CurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args));
}
static void UpgradeMaps(string mod)
{
var mapFolderPath = new string[] { Environment.CurrentDirectory, "mods", mod, "maps" }
.Aggregate(Path.Combine);
foreach (var path in ModData.FindMapsIn(mapFolderPath))
{
var map = new Map(path);
// Touch the lazy bits to initialize them
map.Actors.Force();
map.Smudges.Force();
map.MapTiles.Force();
map.MapResources.Force();
map.Save(path);
}
}
}
}

View File

@@ -8,9 +8,10 @@
*/
#endregion
using System;
using System.Collections;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Traits;
@@ -18,11 +19,11 @@ namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ShpReader shp, Palette p)
static Bitmap RenderShp(ISpriteSource shp, Palette p)
{
var frame = shp[0];
var frame = shp.Frames.First();
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
@@ -34,9 +35,9 @@ namespace OpenRA.Editor
byte* q = (byte*)data.Scan0.ToPointer();
var stride2 = data.Stride;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride2 + i] = frame.Image[i + shp.Width * j];
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride2 + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
@@ -76,13 +77,14 @@ namespace OpenRA.Editor
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
{
var image = info.SpriteNames[0];
var image = info.EditorSprite;
using (var s = FileSystem.OpenWithExts(image, exts))
{
var shp = new ShpReader(s);
var frame = shp[shp.ImageCount - 1];
// TODO: Do this properly
var shp = new ShpReader(s) as ISpriteSource;
var frame = shp.Frames.Last();
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
var bitmap = new Bitmap(frame.Size.Width, frame.Size.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
@@ -92,13 +94,13 @@ namespace OpenRA.Editor
byte* q = (byte*)data.Scan0.ToPointer();
var stride = data.Stride;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride + i] = frame.Image[i + shp.Width * j];
for (var i = 0; i < frame.Size.Width; i++)
for (var j = 0; j < frame.Size.Height; j++)
q[j * stride + i] = frame.Data[i + frame.Size.Width * j];
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.ImageCount - 1 };
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.Frames.Count() - 1 };
}
}
}

View File

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

View File

@@ -107,7 +107,6 @@ namespace OpenRA.Editor
public Dictionary<int2, Bitmap> Chunks = new Dictionary<int2, Bitmap>();
public Surface()
: base()
{
BackColor = Color.Black;
@@ -258,7 +257,7 @@ namespace OpenRA.Editor
Bitmap RenderChunk(int u, int v)
{
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize.Width, ChunkSize * TileSetRenderer.TileSize.Height);
var bitmap = new Bitmap(ChunkSize * TileSetRenderer.TileSize, ChunkSize * TileSetRenderer.TileSize);
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
@@ -275,9 +274,9 @@ namespace OpenRA.Editor
var tile = TileSetRenderer.Data(tr.Type);
var index = (tr.Index < tile.Count) ? tr.Index : (byte)0;
var rawImage = tile[index];
for (var x = 0; x < TileSetRenderer.TileSize.Width; x++)
for (var y = 0; y < TileSetRenderer.TileSize.Height; y++)
p[(j * TileSetRenderer.TileSize.Width + y) * stride + i * TileSetRenderer.TileSize.Width + x] = Palette.GetColor(rawImage[x + TileSetRenderer.TileSize.Width * y]).ToArgb();
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = Palette.GetColor(rawImage[x + TileSetRenderer.TileSize * y]).ToArgb();
if (Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].Type != 0)
{
@@ -288,12 +287,12 @@ namespace OpenRA.Editor
int* q = (int*)srcdata.Scan0.ToPointer();
var srcstride = srcdata.Stride >> 2;
for (var x = 0; x < TileSetRenderer.TileSize.Width; x++)
for (var y = 0; y < TileSetRenderer.TileSize.Height; y++)
for (var x = 0; x < TileSetRenderer.TileSize; x++)
for (var y = 0; y < TileSetRenderer.TileSize; y++)
{
var c = q[y * srcstride + x];
if ((c & 0xff000000) != 0) /* quick & dirty, i cbf doing real alpha */
p[(j * TileSetRenderer.TileSize.Width + y) * stride + i * TileSetRenderer.TileSize.Width + x] = c;
p[(j * TileSetRenderer.TileSize + y) * stride + i * TileSetRenderer.TileSize + x] = c;
}
resourceImage.UnlockBits(srcdata);
@@ -304,14 +303,16 @@ namespace OpenRA.Editor
bitmap.UnlockBits(data);
if (ShowGrid)
{
using (var g = SGraphics.FromImage(bitmap))
{
var ts = Game.modData.Manifest.TileSize;
var rect = new Rectangle(0, 0, bitmap.Width, bitmap.Height);
ControlPaint.DrawGrid(g, rect, new Size(2, Game.CellSize), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(Game.CellSize, 2), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(Game.CellSize, Game.CellSize), Color.Red);
ControlPaint.DrawGrid(g, rect, new Size(2, ts.Height), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, 2), Color.DarkRed);
ControlPaint.DrawGrid(g, rect, new Size(ts.Width, ts.Height), Color.Red);
}
}
return bitmap;
}
@@ -319,15 +320,15 @@ namespace OpenRA.Editor
{
var vX = (int)Math.Floor((mousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((mousePos.Y - Offset.Y) / Zoom);
return new CPos(vX / TileSetRenderer.TileSize.Width, vY / TileSetRenderer.TileSize.Height);
return new CPos(vX / TileSetRenderer.TileSize, vY / TileSetRenderer.TileSize);
}
public CPos GetBrushLocationBR()
{
var vX = (int)Math.Floor((mousePos.X - Offset.X) / Zoom);
var vY = (int)Math.Floor((mousePos.Y - Offset.Y) / Zoom);
return new CPos((vX + TileSetRenderer.TileSize.Width - 1) / TileSetRenderer.TileSize.Width,
(vY + TileSetRenderer.TileSize.Height - 1) / TileSetRenderer.TileSize.Height);
return new CPos((vX + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize,
(vY + TileSetRenderer.TileSize - 1) / TileSetRenderer.TileSize);
}
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
@@ -341,11 +342,11 @@ namespace OpenRA.Editor
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
{
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize.Width / 2 : 0;
float drawX = TileSetRenderer.TileSize.Width * location.X * Zoom + Offset.X - offsetX;
float offsetX = centered ? bmp.Width / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawX = TileSetRenderer.TileSize * location.X * Zoom + Offset.X - offsetX;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize.Height / 2 : 0;
float drawY = TileSetRenderer.TileSize.Height * location.Y * Zoom + Offset.Y - offsetY;
float offsetY = centered ? bmp.Height / 2 - TileSetRenderer.TileSize / 2 : 0;
float drawY = TileSetRenderer.TileSize * location.Y * Zoom + Offset.Y - offsetY;
return new float2(drawX, drawY);
}
@@ -413,24 +414,24 @@ namespace OpenRA.Editor
var bmp = Chunks[x];
var drawX = TileSetRenderer.TileSize.Width * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize.Height * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
var drawX = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
var drawY = TileSetRenderer.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
RectangleF sourceRect = new RectangleF(0, 0, bmp.Width, bmp.Height);
RectangleF destRect = new RectangleF(drawX, drawY, bmp.Width * Zoom, bmp.Height * Zoom);
e.Graphics.DrawImage(bmp, destRect, sourceRect, GraphicsUnit.Pixel);
}
e.Graphics.DrawRectangle(CordonPen,
Map.Bounds.Left * TileSetRenderer.TileSize.Width * Zoom + Offset.X,
Map.Bounds.Top * TileSetRenderer.TileSize.Height * Zoom + Offset.Y,
Map.Bounds.Width * TileSetRenderer.TileSize.Width * Zoom,
Map.Bounds.Height * TileSetRenderer.TileSize.Height * Zoom);
Map.Bounds.Left * TileSetRenderer.TileSize * Zoom + Offset.X,
Map.Bounds.Top * TileSetRenderer.TileSize * Zoom + Offset.Y,
Map.Bounds.Width * TileSetRenderer.TileSize * Zoom,
Map.Bounds.Height * TileSetRenderer.TileSize * Zoom);
e.Graphics.DrawRectangle(SelectionPen,
(SelectionStart.X * TileSetRenderer.TileSize.Width * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize.Height * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize.Width * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize.Height * Zoom);
(SelectionStart.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(SelectionStart.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
(SelectionEnd - SelectionStart).X * TileSetRenderer.TileSize * Zoom,
(SelectionEnd - SelectionStart).Y * TileSetRenderer.TileSize * Zoom);
if (IsPaste)
{
@@ -439,10 +440,10 @@ namespace OpenRA.Editor
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
e.Graphics.DrawRectangle(PastePen,
(loc.X * TileSetRenderer.TileSize.Width * Zoom) + Offset.X,
(loc.Y * TileSetRenderer.TileSize.Height * Zoom) + Offset.Y,
width * (TileSetRenderer.TileSize.Width * Zoom),
height * (TileSetRenderer.TileSize.Height * Zoom));
(loc.X * TileSetRenderer.TileSize * Zoom) + Offset.X,
(loc.Y * TileSetRenderer.TileSize * Zoom) + Offset.Y,
width * (TileSetRenderer.TileSize * Zoom),
height * (TileSetRenderer.TileSize * Zoom));
}
foreach (var ar in Map.Actors.Value)
@@ -458,8 +459,8 @@ namespace OpenRA.Editor
foreach (var ar in Map.Actors.Value)
if (!ar.Key.StartsWith("Actor")) // if it has a custom name
e.Graphics.DrawStringContrast(Font, ar.Key,
(int)(ar.Value.Location().X * TileSetRenderer.TileSize.Width * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize.Height * Zoom + Offset.Y),
(int)(ar.Value.Location().X * TileSetRenderer.TileSize * Zoom + Offset.X),
(int)(ar.Value.Location().Y * TileSetRenderer.TileSize * Zoom + Offset.Y),
Brushes.White,
Brushes.Black);
@@ -469,7 +470,7 @@ namespace OpenRA.Editor
{
if (i % 8 == 0)
{
PointF point = new PointF(i * TileSetRenderer.TileSize.Width * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize.Height * Zoom + Offset.Y);
PointF point = new PointF(i * TileSetRenderer.TileSize * Zoom + Offset.X, (Map.Bounds.Top - 8) * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
@@ -478,7 +479,7 @@ namespace OpenRA.Editor
{
if (i % 8 == 0)
{
PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize.Width * Zoom + Offset.X, i * TileSetRenderer.TileSize.Height * Zoom + Offset.Y);
PointF point = new PointF((Map.Bounds.Left - 8) * TileSetRenderer.TileSize * Zoom + Offset.X, i * TileSetRenderer.TileSize * Zoom + Offset.Y);
e.Graphics.DrawString((i - Map.Bounds.Left).ToString(), MarkerFont, TextBrush, point);
}
}
@@ -490,7 +491,7 @@ namespace OpenRA.Editor
if (currentTool == null)
{
var x = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == GetBrushLocation());
if (x.Key != null)
if (x.Key != null && actorTemplates.ContainsKey(x.Value.Type))
DrawActorBorder(e.Graphics, x.Value.Location(), actorTemplates[x.Value.Type]);
}
}

View File

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

View File

@@ -54,11 +54,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CPos o = (CPos)obj;
return o == this;
var o = obj as CPos?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }

View File

@@ -65,11 +65,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
CVec o = (CVec)obj;
return o == this;
var o = obj as CVec?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1}".F(X, Y); }

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -83,12 +82,6 @@ namespace OpenRA
return (k & mod) == mod;
}
public static bool IsValidInput(this KeyInput key)
{
return char.IsLetter(key.UnicodeChar) || char.IsDigit(key.UnicodeChar) ||
char.IsSymbol(key.UnicodeChar) || char.IsSeparator(key.UnicodeChar) ||
char.IsPunctuation(key.UnicodeChar);
}
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k)
where V : new()

View File

@@ -247,6 +247,18 @@ namespace OpenRA.FileFormats
return InvalidValueAction(value, fieldType, fieldName);
}
else if (fieldType == typeof(CPos))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType.IsEnum)
{
if (!Enum.GetNames(fieldType).Select(a => a.ToLower()).Contains(value.ToLower()))
@@ -270,6 +282,12 @@ namespace OpenRA.FileFormats
return ret;
}
else if (fieldType == typeof(Size))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new Size(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType == typeof(int2))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
@@ -314,7 +332,7 @@ namespace OpenRA.FileFormats
return null;
}
static object ParseYesNo(string p, System.Type fieldType, string field)
static object ParseYesNo(string p, Type fieldType, string field)
{
p = p.ToLowerInvariant();
if (p == "yes") return true;

View File

@@ -48,7 +48,7 @@ namespace OpenRA.FileFormats
public static MiniYamlNode SaveField(object o, string field)
{
return new MiniYamlNode(field, FieldSaver.FormatValue(o, o.GetType().GetField(field)));
return new MiniYamlNode(field, FormatValue(o, o.GetType().GetField(field)));
}
public static string FormatValue(object v, Type t)

View File

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

View File

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

View File

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

View File

@@ -56,7 +56,7 @@ namespace OpenRA.FileFormats
IniSection ProcessSection(string line)
{
Match m = sectionPattern.Match(line);
if (m == null || !m.Success)
if (!m.Success)
return null;
string sectionName = m.Groups[1].Value.ToLowerInvariant();

View File

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

View File

@@ -9,11 +9,8 @@
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{

View File

@@ -57,6 +57,8 @@ namespace OpenRA.FileFormats
throw new NotImplementedException("Creating .RS archives is unsupported");
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .Z archives is unsupported");
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .PAK archives is unsupported");
else
return new Folder(filename, order, content);
}
@@ -77,6 +79,8 @@ namespace OpenRA.FileFormats
return new D2kSoundResources(filename, order);
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(filename, order);
else if (filename.EndsWith(".PAK", StringComparison.InvariantCultureIgnoreCase))
return new PakFile(filename, order);
else
return new Folder(filename, order);
}
@@ -97,7 +101,7 @@ namespace OpenRA.FileFormats
name = Platform.SupportDir + name.Substring(1);
FolderPaths.Add(name);
Action a = () => FileSystem.MountInner(OpenPackage(name, annotation, order++));
Action a = () => MountInner(OpenPackage(name, annotation, order++));
if (optional)
try { a(); }
@@ -197,8 +201,8 @@ namespace OpenRA.FileFormats
if (assemblyCache.TryGetValue(filename, out a))
return a;
if (FileSystem.Exists(filename))
using (var s = FileSystem.Open(filename))
if (Exists(filename))
using (var s = Open(filename))
{
var buf = new byte[s.Length];
s.Read(buf, 0, buf.Length);

View File

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

View File

@@ -11,7 +11,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{

View File

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

View File

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

View File

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

View File

@@ -10,7 +10,6 @@
using System;
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats.Graphics
{
@@ -32,7 +31,7 @@ namespace OpenRA.FileFormats.Graphics
IGraphicsDevice Create( Size size, WindowMode windowMode );
}
public enum BlendMode { None, Alpha, Additive, Subtractive }
public enum BlendMode { None, Alpha, Additive, Subtractive, Multiply }
public interface IGraphicsDevice
{

View File

@@ -9,8 +9,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,264 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
public interface ISpriteFrame
{
Size Size { get; }
Size FrameSize { get; }
float2 Offset { get; }
byte[] Data { get; }
}
public interface ISpriteSource
{
IEnumerable<ISpriteFrame> Frames { get; }
bool CacheWhenLoadingTileset { get; }
}
public enum SpriteType { Unknown, ShpTD, ShpTS, ShpD2, TmpTD, TmpRA, TmpTS, R8 }
public static class SpriteSource
{
static bool IsTmpRA(Stream s)
{
var start = s.Position;
s.Position += 20;
var a = s.ReadUInt32();
s.Position += 2;
var b = s.ReadUInt16();
s.Position = start;
return a == 0 && b == 0x2c73;
}
static bool IsTmpTD(Stream s)
{
var start = s.Position;
s.Position += 16;
var a = s.ReadUInt32();
var b = s.ReadUInt32();
s.Position = start;
return a == 0 && b == 0x0D1AFFFF;
}
static bool IsTmpTS(Stream s)
{
var start = s.Position;
s.Position += 8;
var sx = s.ReadUInt32();
var sy = s.ReadUInt32();
// Find the first frame
var offset = s.ReadUInt32();
if (offset > s.Length - 52)
{
s.Position = start;
return false;
}
s.Position = offset + 12;
var test = s.ReadUInt32();
s.Position = start;
return test == sx * sy / 2 + 52;
}
static bool IsShpTS(Stream s)
{
var start = s.Position;
// First word is zero
if (s.ReadUInt16() != 0)
{
s.Position = start;
return false;
}
// Sanity Check the image count
s.Position += 4;
var imageCount = s.ReadUInt16();
if (s.Position + 24 * imageCount > s.Length)
{
s.Position = start;
return false;
}
// Check the size and format flag
// Some files define bogus frames, so loop until we find a valid one
s.Position += 4;
ushort w, h, f = 0;
byte type;
do
{
w = s.ReadUInt16();
h = s.ReadUInt16();
type = s.ReadUInt8();
}
while (w == 0 && h == 0 && f++ < imageCount);
s.Position = start;
return type < 4;
}
static bool IsShpTD(Stream s)
{
var start = s.Position;
// First word is the image count
var imageCount = s.ReadUInt16();
if (imageCount == 0)
{
s.Position = start;
return false;
}
// Last offset should point to the end of file
var finalOffset = start + 14 + 8 * imageCount;
if (finalOffset > s.Length)
{
s.Position = start;
return false;
}
s.Position = finalOffset;
var eof = s.ReadUInt32();
if (eof != s.Length)
{
s.Position = start;
return false;
}
// Check the format flag on the first frame
s.Position = start + 17;
var b = s.ReadUInt8();
s.Position = start;
return b == 0x20 || b == 0x40 || b == 0x80;
}
static bool IsShpD2(Stream s)
{
var start = s.Position;
// First word is the image count
var imageCount = s.ReadUInt16();
if (imageCount == 0)
{
s.Position = start;
return false;
}
// Test for two vs four byte offset
var testOffset = s.ReadUInt32();
var offsetSize = (testOffset & 0xFF0000) > 0 ? 2 : 4;
// Last offset should point to the end of file
var finalOffset = start + 2 + offsetSize * imageCount;
if (finalOffset > s.Length)
{
s.Position = start;
return false;
}
s.Position = finalOffset;
var eof = offsetSize == 2 ? s.ReadUInt16() : s.ReadUInt32();
if (eof + 2 != s.Length)
{
s.Position = start;
return false;
}
// Check the format flag on the first frame
var b = s.ReadUInt16();
s.Position = start;
return b == 5 || b <= 3;
}
static bool IsR8(Stream s)
{
var start = s.Position;
// First byte is nonzero
if (s.ReadUInt8() == 0)
{
s.Position = start;
return false;
}
// Check the format of the first frame
s.Position = start + 25;
var d = s.ReadUInt8();
s.Position = start;
return d == 8;
}
public static SpriteType DetectSpriteType(Stream s)
{
if (IsShpTD(s))
return SpriteType.ShpTD;
if (IsShpTS(s))
return SpriteType.ShpTS;
if (IsR8(s))
return SpriteType.R8;
if (IsTmpRA(s))
return SpriteType.TmpRA;
if (IsTmpTD(s))
return SpriteType.TmpTD;
if (IsTmpTS(s))
return SpriteType.TmpTS;
if (IsShpD2(s))
return SpriteType.ShpD2;
return SpriteType.Unknown;
}
public static ISpriteSource LoadSpriteSource(Stream s, string filename)
{
var type = DetectSpriteType(s);
switch (type)
{
case SpriteType.ShpTD:
return new ShpReader(s);
case SpriteType.ShpTS:
return new ShpTSReader(s);
case SpriteType.R8:
return new R8Reader(s);
case SpriteType.TmpRA:
return new TmpRAReader(s);
case SpriteType.TmpTD:
return new TmpTDReader(s);
case SpriteType.TmpTS:
return new TmpTSReader(s);
case SpriteType.ShpD2:
return new ShpD2Reader(s);
case SpriteType.Unknown:
default:
throw new InvalidDataException(filename + " is not a valid sprite file");
}
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.IO;

View File

@@ -95,11 +95,8 @@ namespace OpenRA.FileFormats
public override bool Equals(object obj)
{
if (obj == null)
return false;
HSLColor o = (HSLColor)obj;
return o == this;
var o = obj as HSLColor?;
return o != null && o == this;
}
}
}

View File

@@ -8,11 +8,6 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
namespace OpenRA
{
public struct Hotkey
@@ -72,10 +67,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
return (Hotkey)obj == this;
var o = obj as Hotkey?;
return o != null && o == this;
}
public override string ToString() { return "{0} {1}".F(Key, Modifiers.ToString("F")); }

View File

@@ -8,9 +8,7 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -9,33 +9,35 @@
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
/* describes what is to be loaded in order to run a set of mods */
// Describes what is to be loaded in order to run a mod
public class Manifest
{
public readonly Mod Mod;
public readonly string[]
Mods, Folders, MapFolders, Rules, ServerTraits,
Folders, MapFolders, Rules, ServerTraits,
Sequences, VoxelSequences, Cursors, Chrome, Assemblies, ChromeLayout,
Weapons, Voices, Notifications, Music, Movies, Translations, TileSets,
ChromeMetrics, PackageContents;
ChromeMetrics, PackageContents, LuaScripts, MapCompatibility;
public readonly Dictionary<string, string> Packages;
public readonly MiniYaml LoadScreen;
public readonly MiniYaml LobbyDefaults;
public readonly Dictionary<string, Pair<string,int>> Fonts;
public readonly int TileSize = 24;
public readonly Dictionary<string, Pair<string, int>> Fonts;
public readonly Size TileSize = new Size(24, 24);
public Manifest(string[] mods)
public Manifest(string mod)
{
Mods = mods;
var yaml = new MiniYaml(null, mods
.Select(m => MiniYaml.FromFile("mods{0}{1}{0}mod.yaml".F(Path.DirectorySeparatorChar, m)))
.Aggregate(MiniYaml.MergeLiberal)).NodesDict;
var path = new[] { "mods", mod, "mod.yaml" }.Aggregate(Path.Combine);
var yaml = new MiniYaml(null, MiniYaml.FromFile(path)).NodesDict;
Mod = FieldLoader.Load<Mod>(yaml["Metadata"]);
Mod.Id = mod;
// TODO: Use fieldloader
Folders = YamlList(yaml, "Folders");
@@ -58,6 +60,7 @@ namespace OpenRA.FileFormats
TileSets = YamlList(yaml, "TileSets");
ChromeMetrics = YamlList(yaml, "ChromeMetrics");
PackageContents = YamlList(yaml, "PackageContents");
LuaScripts = YamlList(yaml, "LuaScripts");
LoadScreen = yaml["LoadScreen"];
LobbyDefaults = yaml["LobbyDefaults"];
@@ -66,13 +69,23 @@ namespace OpenRA.FileFormats
int.Parse(x.Value.NodesDict["Size"].Value)));
if (yaml.ContainsKey("TileSize"))
TileSize = int.Parse(yaml["TileSize"].Value);
TileSize = FieldLoader.GetValue<Size>("TileSize", yaml["TileSize"].Value);
// Allow inherited mods to import parent maps.
var compat = new List<string>();
compat.Add(mod);
if (yaml.ContainsKey("SupportsMapsFrom"))
foreach (var c in yaml["SupportsMapsFrom"].Value.Split(','))
compat.Add(c.Trim());
MapCompatibility = compat.ToArray();
}
static string[] YamlList(Dictionary<string, MiniYaml> yaml, string key)
{
if (!yaml.ContainsKey(key))
return new string[] {};
return new string[] { };
return yaml[key].NodesDict.Keys.ToArray();
}

View File

@@ -8,9 +8,6 @@
*/
#endregion
using System;
using System.Drawing;
namespace OpenRA.FileFormats
{
public class PlayerReference
@@ -20,6 +17,7 @@ namespace OpenRA.FileFormats
public bool OwnsWorld = false;
public bool NonCombatant = false;
public bool Playable = false;
public bool Spectating = false;
public string Bot = null;
public string StartingUnitsClass = null;
public bool AllowBots = true;

View File

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

View File

@@ -10,8 +10,6 @@
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -20,8 +18,9 @@ namespace OpenRA.FileFormats
public class TerrainTypeInfo
{
public string Type;
public string[] TargetTypes = { };
public string[] AcceptsSmudgeType = { };
public bool IsWater = false;
public bool IsWater = false; // TODO: Remove this
public Color Color;
public string CustomCursor;
@@ -87,7 +86,7 @@ namespace OpenRA.FileFormats
public Dictionary<ushort, TileTemplate> Templates = new Dictionary<ushort, TileTemplate>();
public string[] EditorTemplateOrder;
static readonly string[] Fields = { "Name", "TileSize", "Id", "SheetSize", "Palette", "Extensions" };
static readonly string[] Fields = { "Name", "Id", "SheetSize", "Palette", "Extensions" };
public TileSet() { }

View File

@@ -16,21 +16,20 @@ namespace OpenRA.FileFormats
{
public class Mod
{
public static readonly Dictionary<string, Mod> AllMods = ValidateMods(Directory.GetDirectories("mods").Select(x => x.Substring(5)).ToArray());
public string Id;
public string Title;
public string Description;
public string Version;
public string Author;
public string Requires;
public static readonly Dictionary<string, Mod> AllMods = ValidateMods(Directory.GetDirectories("mods").Select(x => x.Substring(5)).ToArray());
public static Dictionary<string, Mod> ValidateMods(string[] mods)
{
var ret = new Dictionary<string, Mod>();
foreach (var m in mods)
{
var yamlPath = new[] { "mods", m, "mod.yaml" }.Aggregate( Path.Combine );
var yamlPath = new[] { "mods", m, "mod.yaml" }.Aggregate(Path.Combine);
if (!File.Exists(yamlPath))
continue;
@@ -43,14 +42,8 @@ namespace OpenRA.FileFormats
ret.Add(m, mod);
}
return ret;
}
public string[] WithPrerequisites()
{
return Id.Iterate(m => AllMods[m].Requires)
.TakeWhile(m => m != null)
.ToArray();
return ret;
}
}
}

View File

@@ -90,19 +90,16 @@
<Compile Include="FileFormats\Format40.cs" />
<Compile Include="FileFormats\Format80.cs" />
<Compile Include="FileFormats\IniFile.cs" />
<Compile Include="Graphics\Dune2ShpReader.cs" />
<Compile Include="Graphics\IGraphicsDevice.cs" />
<Compile Include="Graphics\IInputHandler.cs" />
<Compile Include="Graphics\PngLoader.cs" />
<Compile Include="Graphics\ShpReader.cs" />
<Compile Include="Graphics\ShpWriter.cs" />
<Compile Include="Graphics\Vertex.cs" />
<Compile Include="Graphics\VqaReader.cs" />
<Compile Include="InstallUtils.cs" />
<Compile Include="Manifest.cs" />
<Compile Include="Map\PlayerReference.cs" />
<Compile Include="Map\SmudgeReference.cs" />
<Compile Include="Map\Terrain.cs" />
<Compile Include="Map\TileReference.cs" />
<Compile Include="Map\TileSet.cs" />
<Compile Include="MiniYaml.cs" />
@@ -144,7 +141,6 @@
<Compile Include="StreamExts.cs" />
<Compile Include="FileFormats\WavLoader.cs" />
<Compile Include="Graphics\R8Reader.cs" />
<Compile Include="Graphics\TileSetRenderer.cs" />
<Compile Include="Keycode.cs" />
<Compile Include="Hotkey.cs" />
<Compile Include="FileSystem\FileSystem.cs" />
@@ -153,6 +149,14 @@
<Compile Include="FileSystem\MixFile.cs" />
<Compile Include="FileSystem\ZipFile.cs" />
<Compile Include="FileSystem\D2kSoundResources.cs" />
<Compile Include="Graphics\SpriteSource.cs" />
<Compile Include="Graphics\TmpRAReader.cs" />
<Compile Include="Graphics\TmpTDReader.cs" />
<Compile Include="Graphics\ShpD2Reader.cs" />
<Compile Include="FileSystem\Pak.cs" />
<Compile Include="CPos.cs" />
<Compile Include="CVec.cs" />
<Compile Include="Graphics\TmpTSReader.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View File

@@ -8,7 +8,6 @@
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

View File

@@ -23,7 +23,7 @@ namespace OpenRA.FileFormats.Primitives
public event Action<object, object> OnSet = (o, n) => { };
public event Action OnRefresh = () => { };
public ObservableCollection() : base() { }
public ObservableCollection() { }
public ObservableCollection(IList<T> list) : base(list) { }
protected override void SetItem(int index, T item)
@@ -53,7 +53,7 @@ namespace OpenRA.FileFormats.Primitives
public IEnumerable ObservedItems
{
get { return base.Items; }
get { return Items; }
}
}
}

View File

@@ -9,7 +9,6 @@
#endregion
using System.Collections.Generic;
using System;
using System.Drawing;
namespace OpenRA.FileFormats
@@ -40,10 +39,8 @@ namespace OpenRA.FileFormats
public override bool Equals(object obj)
{
if (!(obj is Pair<T, U>))
return false;
return (Pair<T, U>)obj == this;
var o = obj as Pair<T, U>?;
return o != null && o == this;
}
public override int GetHashCode()

View File

@@ -73,11 +73,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
float2 o = (float2)obj;
return o == this;
var o = obj as float2?;
return o != null && o == this;
}
public static readonly float2 Zero = new float2(0, 0);

View File

@@ -43,11 +43,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
int2 o = (int2)obj;
return o == this;
var o = obj as int2?;
return o != null && o == this;
}
public static readonly int2 Zero = new int2(0, 0);

View File

@@ -11,9 +11,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
namespace OpenRA
{

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Drawing;
namespace OpenRA
{
@@ -40,11 +39,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
WAngle o = (WAngle)obj;
return o == this;
var o = obj as WAngle?;
return o != null && o == this;
}
public int Sin() { return new WAngle(Angle - 256).Cos(); }

View File

@@ -8,10 +8,8 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Drawing;
namespace OpenRA
{
@@ -56,11 +54,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
WPos o = (WPos)obj;
return o == this;
var o = obj as WPos?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1},{2}".F(X, Y, Z); }

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Drawing;
using System.Linq;
namespace OpenRA
@@ -17,7 +16,7 @@ namespace OpenRA
/// <summary>
/// 1d world distance - 1024 units = 1 cell.
/// </summary>
public struct WRange
public struct WRange : IComparable, IComparable<WRange>
{
public readonly int Range;
@@ -80,13 +79,21 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
WRange o = (WRange)obj;
return o == this;
var o = obj as WRange?;
return o != null && o == this;
}
public int CompareTo(object obj)
{
var o = obj as WRange?;
if (o == null)
return 1;
return Range.CompareTo(o.Value.Range);
}
public int CompareTo(WRange other) { return Range.CompareTo(other.Range); }
public override string ToString() { return "{0}".F(Range); }
}
}

View File

@@ -8,9 +8,6 @@
*/
#endregion
using System;
using System.Drawing;
namespace OpenRA
{
/// <summary>
@@ -97,11 +94,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
WRot o = (WRot)obj;
return o == this;
var o = obj as WRot?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1},{2}".F(Roll, Pitch, Yaw); }

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Drawing;
namespace OpenRA
{
@@ -83,11 +82,8 @@ namespace OpenRA
public override bool Equals(object obj)
{
if (obj == null)
return false;
WVec o = (WVec)obj;
return o == this;
var o = obj as WVec?;
return o != null && o == this;
}
public override string ToString() { return "{0},{1},{2}".F(X, Y, Z); }

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -28,8 +28,11 @@ namespace OpenRA
Lazy<IOccupySpace> occupySpace;
Lazy<IFacing> facing;
Lazy<Health> health;
Lazy<IEffectiveOwner> effectiveOwner;
public IOccupySpace OccupiesSpace { get { return occupySpace.Value; } }
public IEffectiveOwner EffectiveOwner { get { return effectiveOwner.Value; } }
public CPos Location { get { return occupySpace.Value.TopLeft; } }
public WPos CenterPosition { get { return occupySpace.Value.CenterPosition; } }
@@ -72,6 +75,8 @@ namespace OpenRA
}
facing = Lazy.New(() => TraitOrDefault<IFacing>());
health = Lazy.New(() => TraitOrDefault<Health>());
effectiveOwner = Lazy.New(() => TraitOrDefault<IEffectiveOwner>());
applyIRender = (x, wr) => x.Render(this, wr);
applyRenderModifier = (m, p, wr) => p.ModifyRender(this, wr, m);
@@ -92,7 +97,11 @@ namespace OpenRA
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
@@ -210,5 +219,26 @@ namespace OpenRA
t.OnOwnerChanged(this, oldOwner, newOwner);
});
}
public bool IsDead()
{
if (Destroyed)
return true;
return (health.Value == null) ? false : health.Value.IsDead;
}
public bool IsDisguised()
{
return effectiveOwner.Value != null && effectiveOwner.Value.Disguised;
}
public void Kill(Actor attacker)
{
if (health.Value == null)
return;
health.Value.InflictDamage(this, attacker, health.Value.MaxHP, null, true);
}
}
}

View File

@@ -21,53 +21,45 @@ namespace OpenRA
internal TypeDictionary dict;
public ActorInitializer( Actor actor, TypeDictionary dict )
public ActorInitializer(Actor actor, TypeDictionary dict)
{
this.self = actor;
this.dict = dict;
}
public T Get<T>() where T : IActorInit { return dict.Get<T>(); }
public U Get<T,U>() where T : IActorInit<U> { return dict.Get<T>().Value( world ); }
public U Get<T, U>() where T : IActorInit<U> { return dict.Get<T>().Value(world); }
public bool Contains<T>() where T : IActorInit { return dict.Contains<T>(); }
}
public interface IActorInit {}
public interface IActorInit { }
public interface IActorInit<T> : IActorInit
{
T Value( World world );
T Value(World world);
}
public class FacingInit : IActorInit<int>
{
[FieldFromYamlKey] public readonly int value = 128;
public FacingInit() { }
public FacingInit( int init ) { value = init; }
public int Value( World world ) { return value; }
public FacingInit(int init) { value = init; }
public int Value(World world) { return value; }
}
public class TurretFacingInit : IActorInit<int>
{
[FieldFromYamlKey] public readonly int value = 128;
public TurretFacingInit() { }
public TurretFacingInit( int init ) { value = init; }
public int Value( World world ) { return value; }
}
public class AltitudeInit : IActorInit<int>
{
[FieldFromYamlKey] public readonly int value = 0;
public AltitudeInit() { }
public AltitudeInit( int init ) { value = init; }
public int Value( World world ) { return value; }
public TurretFacingInit(int init) { value = init; }
public int Value(World world) { return value; }
}
public class LocationInit : IActorInit<CPos>
{
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
public LocationInit() { }
public LocationInit( CPos init ) { value = init.ToInt2(); }
public LocationInit(CPos init) { value = init.ToInt2(); }
public CPos Value(World world) { return (CPos)value; }
}
@@ -94,18 +86,20 @@ namespace OpenRA
Player player;
public OwnerInit() { }
public OwnerInit( string playerName ) { this.PlayerName = playerName; }
public OwnerInit(string playerName) { this.PlayerName = playerName; }
public OwnerInit( Player player ) {
public OwnerInit(Player player)
{
this.player = player;
this.PlayerName = player.InternalName;
}
public Player Value( World world )
public Player Value(World world)
{
if( player != null )
if (player != null)
return player;
return world.Players.First( x => x.InternalName == PlayerName );
return world.Players.First(x => x.InternalName == PlayerName);
}
}
}

View File

@@ -21,7 +21,7 @@ namespace OpenRA
public static string FormatErrorMessage(Exception e)
{
var ex = e as System.Net.WebException;
var ex = e as WebException;
if (ex == null)
return e.Message;
@@ -46,15 +46,29 @@ namespace OpenRA
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadFileCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += () => Cancel();
wc.DownloadFileCompleted += (_, a) => { Game.OnQuit -= () => Cancel(); };
Game.OnQuit += Cancel;
wc.DownloadFileCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadFileAsync(new Uri(url), path);
}
public Download(string url, Action<DownloadProgressChangedEventArgs> onProgress, Action<DownloadDataCompletedEventArgs, bool> onComplete)
{
wc = new WebClient();
wc.Proxy = null;
wc.DownloadProgressChanged += (_, a) => onProgress(a);
wc.DownloadDataCompleted += (_, a) => onComplete(a, cancelled);
Game.OnQuit += Cancel;
wc.DownloadDataCompleted += (_, a) => { Game.OnQuit -= Cancel; };
wc.DownloadDataAsync(new Uri(url));
}
public void Cancel()
{
Game.OnQuit -= () => Cancel();
Game.OnQuit -= Cancel;
wc.CancelAsync();
cancelled = true;
}

View File

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

View File

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

View File

@@ -9,10 +9,7 @@
#endregion
using System.Collections.Generic;
using OpenRA.Effects;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Effects
{

View File

@@ -1,6 +1,6 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
@@ -27,8 +27,6 @@ namespace OpenRA
{
public static class Game
{
public static int CellSize { get { return modData.Manifest.TileSize; } }
public static MouseButtonPreference mouseButtonPreference = new MouseButtonPreference();
public static ModData modData;
@@ -75,17 +73,18 @@ namespace OpenRA
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; // 120ms net tick for 40ms local tick
public const int NetTickScale = 3; // 120 ms net tick for 40 ms local tick
public const int Timestep = 40;
public const int TimestepJankThreshold = 250; // Don't catch up for delays larger than 250ms
public static event Action<OrderManager> ConnectionStateChanged = _ => { };
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
public static int LocalClientId { get { return orderManager.Connection.LocalClientId; } }
// Hacky workaround for orderManager visibility
public static Widget OpenWindow(World world, string widget)
{
return Ui.OpenWindow(widget, new WidgetArgs() {{ "world", world }, { "orderManager", orderManager }, { "worldRenderer", worldRenderer }});
return Ui.OpenWindow(widget, new WidgetArgs() { { "world", world }, { "orderManager", orderManager }, { "worldRenderer", worldRenderer } });
}
// Who came up with the great idea of making these things
@@ -103,7 +102,7 @@ namespace OpenRA
// Load a widget with world, orderManager, worldRenderer args, without adding it to the widget tree
public static Widget LoadWidget(World world, string id, Widget parent, WidgetArgs args)
{
return Game.modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
return modData.WidgetLoader.LoadWidget(new WidgetArgs(args)
{
{ "world", world },
{ "orderManager", orderManager },
@@ -135,23 +134,23 @@ namespace OpenRA
// worldRenderer is null during the initial install/download screen
if (worldRenderer != null)
{
Game.Renderer.BeginFrame(worldRenderer.Viewport.TopLeft.ToFloat2(), worldRenderer.Viewport.Zoom);
Renderer.BeginFrame(worldRenderer.Viewport.TopLeft.ToFloat2(), worldRenderer.Viewport.Zoom);
Sound.SetListenerPosition(worldRenderer.Position(worldRenderer.Viewport.CenterLocation));
worldRenderer.Draw();
}
else
Game.Renderer.BeginFrame(float2.Zero, 1f);
Renderer.BeginFrame(float2.Zero, 1f);
using (new PerfSample("render_widgets"))
{
Ui.Draw();
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
CursorProvider.DrawCursor(Game.Renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
CursorProvider.DrawCursor(Renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
}
using (new PerfSample("render_flip"))
{
Game.Renderer.EndFrame(new DefaultInputHandler(orderManager.world));
Renderer.EndFrame(new DefaultInputHandler(orderManager.world));
}
}
@@ -165,16 +164,34 @@ namespace OpenRA
static void TickInner(OrderManager orderManager)
{
int t = Environment.TickCount;
int dt = t - orderManager.LastTickTime;
if (dt >= Settings.Game.Timestep)
var tick = Environment.TickCount;
var world = orderManager.world;
var uiTickDelta = tick - Ui.LastTickTime;
if (uiTickDelta >= Timestep)
{
// Explained below for the world tick calculation
var integralTickTimestep = (uiTickDelta / Timestep) * Timestep;
Ui.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : Timestep;
Viewport.TicksSinceLastMove += uiTickDelta / Timestep;
Sync.CheckSyncUnchanged(world, Ui.Tick);
cursorFrame += 0.5f;
}
var worldTimestep = world == null ? Timestep : world.Timestep;
var worldTickDelta = (tick - orderManager.LastTickTime);
if (worldTimestep != 0 && worldTickDelta >= worldTimestep)
using (new PerfSample("tick_time"))
{
orderManager.LastTickTime += Settings.Game.Timestep;
Ui.Tick();
var world = orderManager.world;
if (orderManager.GameStarted)
++Viewport.TicksSinceLastMove;
// Tick the world to advance the world time to match real time:
// If dt < TickJankThreshold then we should try and catch up by repeatedly ticking
// If dt >= TickJankThreshold then we should accept the jank and progress at the normal rate
// dt is rounded down to an integer tick count in order to preserve fractional tick components.
var integralTickTimestep = (worldTickDelta / worldTimestep) * worldTimestep;
orderManager.LastTickTime += integralTickTimestep >= TimestepJankThreshold ? integralTickTimestep : worldTimestep;
Sound.Tick();
Sync.CheckSyncUnchanged(world, orderManager.TickImmediate);
@@ -207,8 +224,6 @@ namespace OpenRA
orderManager.LastTickTime = Environment.TickCount;
Sync.CheckSyncUnchanged(world, () => world.TickRender(worldRenderer));
cursorFrame += 0.5f;
}
}
}
@@ -220,13 +235,14 @@ namespace OpenRA
LobbyInfoChanged();
}
public static event Action BeforeGameStart = () => {};
public static event Action BeforeGameStart = () => { };
internal static void StartGame(string mapUID, bool isShellmap)
{
BeforeGameStart();
var map = modData.PrepareMap(mapUID);
orderManager.world = new World(modData.Manifest, map, orderManager, isShellmap);
orderManager.world.Timestep = Timestep;
worldRenderer = new WorldRenderer(orderManager.world);
orderManager.world.LoadComplete(worldRenderer);
@@ -249,21 +265,9 @@ namespace OpenRA
{
get
{
var client= orderManager.LobbyInfo.ClientWithIndex(
orderManager.Connection.LocalClientId);
return ((client!=null) && client.IsAdmin);
}
}
public static Dictionary<String, Mod> CurrentMods
{
get
{
// Initialization hasn't completed yet
if (Mod.AllMods == null || modData == null)
return null;
return Mod.AllMods.Where(k => modData.Manifest.Mods.Contains(k.Key)).ToDictionary(k => k.Key, k => k.Value);
var id = orderManager.Connection.LocalClientId;
var client = orderManager.LobbyInfo.ClientWithIndex(id);
return client != null && client.IsAdmin;
}
}
@@ -296,9 +300,12 @@ namespace OpenRA
}
FileSystem.Mount("."); // Needed to access shaders
var renderers = new [] { Settings.Graphics.Renderer, "Sdl2", "Gl", "Cg" };
var renderers = new[] { Settings.Graphics.Renderer, "Sdl2", "Gl", "Cg", null };
foreach (var r in renderers)
{
if (r == null)
throw new InvalidOperationException("No suitable renderers were found. Check graphics.log for details.");
Settings.Graphics.Renderer = r;
try
{
@@ -311,6 +318,7 @@ namespace OpenRA
Console.WriteLine("Renderer initialization failed. Fallback in place. Check graphics.log for details.");
}
}
Renderer = new Renderer();
try
@@ -326,25 +334,22 @@ namespace OpenRA
}
Console.WriteLine("Available mods:");
foreach(var mod in Mod.AllMods)
foreach (var mod in Mod.AllMods)
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
InitializeWithMods(Settings.Game.Mods);
InitializeWithMod(Settings.Game.Mod, args.GetValue("Launch.Replay", null));
if (Settings.Server.DiscoverNatDevices)
{
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, () =>
UPnP.TryStoppingNatDiscovery()
);
}
RunAfterDelay(Settings.Server.NatDiscoveryTimeout, UPnP.TryStoppingNatDiscovery);
}
public static void InitializeWithMods(string[] mods)
public static void InitializeWithMod(string mod, string replay)
{
// Clear static state if we have switched mods
LobbyInfoChanged = () => {};
AddChatLine = (a,b,c) => {};
ConnectionStateChanged = om => {};
BeforeGameStart = () => {};
LobbyInfoChanged = () => { };
AddChatLine = (a, b, c) => { };
ConnectionStateChanged = om => { };
BeforeGameStart = () => { };
Ui.ResetAll();
worldRenderer = null;
@@ -353,19 +358,21 @@ namespace OpenRA
if (orderManager != null)
orderManager.Dispose();
// Discard any invalid mods, set RA as default
var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray();
if (mm.Length == 0) mm = new[] { "ra" };
Console.WriteLine("Loading mods: {0}", mm.JoinWith(","));
Settings.Game.Mods = mm;
// Fall back to default if the mod doesn't exist
if (!Mod.AllMods.ContainsKey(mod))
mod = new GameSettings().Mod;
Console.WriteLine("Loading mod: {0}", mod);
Settings.Game.Mod = mod;
Sound.StopMusic();
Sound.StopVideo();
Sound.Initialize();
modData = new ModData(mm);
modData = new ModData(mod);
Renderer.InitializeFonts(modData.Manifest);
modData.InitializeLoaders();
modData.MapCache.LoadMaps();
PerfHistory.items["render"].hasNormalTick = false;
PerfHistory.items["batches"].hasNormalTick = false;
@@ -374,39 +381,43 @@ namespace OpenRA
JoinLocal();
if (Game.Settings.Server.Dedicated)
if (Settings.Server.Dedicated)
{
while (true)
{
Game.Settings.Server.Map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
Game.Settings.Save();
Game.CreateServer(new ServerSettings(Game.Settings.Server));
Settings.Server.Map = WidgetUtils.ChooseInitialMap(Settings.Server.Map);
Settings.Save();
CreateServer(new ServerSettings(Settings.Server));
while (true)
{
System.Threading.Thread.Sleep(100);
if ((server.State == Server.ServerState.GameStarted)
&& (server.Conns.Count<=1))
if (server.State == Server.ServerState.GameStarted && server.Conns.Count < 1)
{
Console.WriteLine("No one is playing, shutting down...");
server.Shutdown();
break;
}
}
if (Game.Settings.Server.DedicatedLoop)
if (Settings.Server.DedicatedLoop)
{
Console.WriteLine("Starting a new server instance...");
modData.MapCache.LoadMaps();
continue;
}
else
break;
break;
}
System.Environment.Exit(0);
Environment.Exit(0);
}
else
{
modData.LoadScreen.StartGame();
Settings.Save();
if (!string.IsNullOrEmpty(replay))
Game.JoinReplay(replay);
}
}
@@ -417,33 +428,49 @@ namespace OpenRA
static string ChooseShellmap()
{
var shellmaps = modData.AvailableMaps
.Where(m => m.Value.UseAsShellmap);
var shellmaps = modData.MapCache
.Where(m => m.Status == MapStatus.Available && m.Map.UseAsShellmap)
.Select(m => m.Uid);
if (shellmaps.Count() == 0)
if (!shellmaps.Any())
throw new InvalidDataException("No valid shellmaps available");
return shellmaps.Random(CosmeticRandom).Key;
return shellmaps.Random(CosmeticRandom);
}
static bool quit;
public static event Action OnQuit = () => {};
public static event Action OnQuit = () => { };
static double idealFrameTime;
public static void SetIdealFrameTime(int fps)
{
idealFrameTime = 1.0 / fps;
}
internal static void Run()
{
if (Settings.Graphics.MaxFramerate < 1)
{
Settings.Graphics.MaxFramerate = new GraphicSettings().MaxFramerate;
Settings.Graphics.CapFramerate = false;
}
SetIdealFrameTime(Settings.Graphics.MaxFramerate);
while (!quit)
{
var idealFrameTime = 1.0 / Settings.Graphics.MaxFramerate;
var sw = new Stopwatch();
Tick(orderManager);
if (Settings.Graphics.CapFramerate)
{
var waitTime = idealFrameTime - sw.ElapsedTime();
var sw = new Stopwatch();
Tick(orderManager);
var waitTime = Math.Min(idealFrameTime - sw.ElapsedTime(), 1);
if (waitTime > 0)
System.Threading.Thread.Sleep( TimeSpan.FromSeconds(waitTime) );
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(waitTime));
}
else
Tick(orderManager);
}
OnQuit();
@@ -451,11 +478,11 @@ namespace OpenRA
public static void Exit() { quit = true; }
public static Action<Color,string,string> AddChatLine = (c,n,s) => {};
public static Action<Color, string, string> AddChatLine = (c, n, s) => { };
public static void Debug(string s, params object[] args)
{
AddChatLine(Color.White, "Debug", String.Format(s,args));
AddChatLine(Color.White, "Debug", string.Format(s, args));
}
public static void Disconnect()
@@ -474,15 +501,14 @@ namespace OpenRA
server.Shutdown();
}
public static T CreateObject<T>( string name )
public static T CreateObject<T>(string name)
{
return modData.ObjectCreator.CreateObject<T>(name);
}
public static void CreateServer(ServerSettings settings)
{
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort),
Game.Settings.Game.Mods, settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Any, settings.ListenPort), settings, modData);
}
public static int CreateLocalServer(string map)
@@ -492,11 +518,10 @@ namespace OpenRA
Name = "Skirmish Game",
Map = map,
AdvertiseOnline = false,
AllowPortForward = false
AllowPortForward = false
};
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0),
Game.Settings.Game.Mods, settings, modData);
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0), settings, modData);
return server.Port;
}
@@ -505,29 +530,5 @@ namespace OpenRA
{
return orderManager != null && orderManager.world == world;
}
public static bool DownloadMap(string mapHash)
{
try
{
var mod = Game.CurrentMods.FirstOrDefault().Value.Id;
var dirPath = "{1}maps{0}{2}".F(Path.DirectorySeparatorChar, Platform.SupportDir, mod);
if(!Directory.Exists(dirPath))
Directory.CreateDirectory(dirPath);
var mapPath = "{1}{0}{2}".F(Path.DirectorySeparatorChar, dirPath, mapHash+".oramap");
Console.Write("Trying to download map to {0} ... ".F(mapPath));
WebClient webClient = new WebClient();
webClient.DownloadFile(Game.Settings.Game.MapRepository + mapHash, mapPath);
Game.modData.AvailableMaps.Add(mapHash, new Map(mapPath));
Console.WriteLine("done");
return true;
}
catch (WebException e)
{
Log.Write("debug", "Could not download map '{0}'", mapHash);
Log.Write("debug", e.ToString());
return false;
}
}
}
}

View File

@@ -10,12 +10,9 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.Server;
namespace OpenRA.GameRules
{
@@ -78,7 +75,6 @@ namespace OpenRA.GameRules
public bool SanityCheckUnsyncedCode = false;
public int Samples = 25;
public bool IgnoreVersionMismatch = false;
public bool DeveloperMenu = false;
public bool ShowFatalErrorDialog = true;
public string FatalErrorDialogFaq = "http://github.com/OpenRA/OpenRA/wiki/FAQ";
@@ -88,7 +84,7 @@ namespace OpenRA.GameRules
{
public string Renderer = "Gl";
public WindowMode Mode = WindowMode.PseudoFullscreen;
public int2 FullscreenSize = new int2(0,0);
public int2 FullscreenSize = new int2(0, 0);
public int2 WindowedSize = new int2(1024, 768);
public bool PixelDouble = false;
public bool CapFramerate = true;
@@ -127,7 +123,8 @@ namespace OpenRA.GameRules
public class GameSettings
{
public string[] Mods = { "ra" };
public string Mod = "modchooser";
public string PreviousMod = "ra";
public bool ShowShellmap = true;
@@ -136,12 +133,11 @@ namespace OpenRA.GameRules
public float ViewportEdgeScrollStep = 10f;
public bool UseClassicMouseStyle = false;
// Internal game settings
public int Timestep = 40;
public bool AlwaysShowStatusBars = false;
public bool TeamHealthColors = false;
public bool AllowDownloading = true;
public string MapRepository = "http://content.open-ra.org/map/";
public string MapRepository = "http://resource.openra.net/map/";
}
public class KeySettings
@@ -149,12 +145,21 @@ namespace OpenRA.GameRules
public Hotkey CycleBaseKey = new Hotkey(Keycode.BACKSPACE, Modifiers.None);
public Hotkey ToLastEventKey = new Hotkey(Keycode.SPACE, Modifiers.None);
public Hotkey ToSelectionKey = new Hotkey(Keycode.HOME, Modifiers.None);
public Hotkey SelectAllUnitsKey = new Hotkey(Keycode.A, Modifiers.Ctrl);
public Hotkey SelectUnitsByTypeKey = new Hotkey(Keycode.T, Modifiers.Ctrl);
public Hotkey PauseKey = new Hotkey(Keycode.F9, Modifiers.None);
public Hotkey PauseKey = new Hotkey(Keycode.F8, Modifiers.None);
public Hotkey PlaceBeaconKey = new Hotkey(Keycode.F9, Modifiers.None);
public Hotkey SellKey = new Hotkey(Keycode.F10, Modifiers.None);
public Hotkey PowerDownKey = new Hotkey(Keycode.F11, Modifiers.None);
public Hotkey RepairKey = new Hotkey(Keycode.F12, Modifiers.None);
public Hotkey NextProductionTabKey = new Hotkey(Keycode.PAGEDOWN, Modifiers.None);
public Hotkey PreviousProductionTabKey = new Hotkey(Keycode.PAGEUP, Modifiers.None);
public Hotkey CycleProductionBuildingsKey = new Hotkey(Keycode.TAB, Modifiers.None);
public Hotkey ToggleStatusBarsKey = new Hotkey(Keycode.INSERT, Modifiers.None);
public Hotkey AttackMoveKey = new Hotkey(Keycode.A, Modifiers.None);
public Hotkey StopKey = new Hotkey(Keycode.S, Modifiers.None);
public Hotkey ScatterKey = new Hotkey(Keycode.X, Modifiers.None);
@@ -162,7 +167,8 @@ namespace OpenRA.GameRules
public Hotkey StanceCycleKey = new Hotkey(Keycode.Z, Modifiers.None);
public Hotkey GuardKey = new Hotkey(Keycode.D, Modifiers.None);
public Hotkey CycleTabsKey = new Hotkey(Keycode.TAB, Modifiers.None);
public Hotkey ObserverCombinedView = new Hotkey(Keycode.MINUS, Modifiers.None);
public Hotkey ObserverWorldView = new Hotkey(Keycode.EQUALS, Modifiers.None);
}
public class IrcSettings
@@ -183,7 +189,7 @@ namespace OpenRA.GameRules
public class Settings
{
string SettingsFile;
string settingsFile;
public PlayerSettings Player = new PlayerSettings();
public GameSettings Game = new GameSettings();
@@ -198,31 +204,31 @@ namespace OpenRA.GameRules
public Settings(string file, Arguments args)
{
SettingsFile = file;
settingsFile = file;
Sections = new Dictionary<string, object>()
{
{"Player", Player},
{"Game", Game},
{"Sound", Sound},
{"Graphics", Graphics},
{"Server", Server},
{"Debug", Debug},
{"Keys", Keys},
{"Irc", Irc}
{ "Player", Player },
{ "Game", Game },
{ "Sound", Sound },
{ "Graphics", Graphics },
{ "Server", Server },
{ "Debug", Debug },
{ "Keys", Keys },
{ "Irc", Irc }
};
// Override fieldloader to ignore invalid entries
var err1 = FieldLoader.UnknownFieldAction;
var err2 = FieldLoader.InvalidValueAction;
FieldLoader.UnknownFieldAction = (s,f) =>
FieldLoader.UnknownFieldAction = (s, f) =>
{
Console.WriteLine( "Ignoring unknown field `{0}` on `{1}`".F( s, f.Name ) );
Console.WriteLine("Ignoring unknown field `{0}` on `{1}`".F(s, f.Name));
};
if (File.Exists(SettingsFile))
if (File.Exists(settingsFile))
{
var yaml = MiniYaml.DictFromFile(SettingsFile);
var yaml = MiniYaml.DictFromFile(settingsFile);
foreach (var kv in Sections)
if (yaml.ContainsKey(kv.Key))
@@ -232,8 +238,8 @@ namespace OpenRA.GameRules
// Override with commandline args
foreach (var kv in Sections)
foreach (var f in kv.Value.GetType().GetFields())
if (args.Contains(kv.Key+"."+f.Name))
FieldLoader.LoadField( kv.Value, f.Name, args.GetValue(kv.Key+"."+f.Name, "") );
if (args.Contains(kv.Key + "." + f.Name))
FieldLoader.LoadField(kv.Value, f.Name, args.GetValue(kv.Key + "." + f.Name, ""));
FieldLoader.UnknownFieldAction = err1;
FieldLoader.InvalidValueAction = err2;
@@ -242,19 +248,19 @@ namespace OpenRA.GameRules
public void Save()
{
var root = new List<MiniYamlNode>();
foreach( var kv in Sections )
root.Add( new MiniYamlNode( kv.Key, FieldSaver.SaveDifferences(kv.Value, Activator.CreateInstance(kv.Value.GetType())) ) );
foreach (var kv in Sections)
root.Add(new MiniYamlNode(kv.Key, FieldSaver.SaveDifferences(kv.Value, Activator.CreateInstance(kv.Value.GetType()))));
root.WriteToFile(SettingsFile);
root.WriteToFile(settingsFile);
}
void LoadSectionYaml(MiniYaml yaml, object section)
{
var defaults = Activator.CreateInstance(section.GetType());
FieldLoader.InvalidValueAction = (s,t,f) =>
FieldLoader.InvalidValueAction = (s, t, f) =>
{
var ret = defaults.GetType().GetField(f).GetValue(defaults);
Console.WriteLine("FieldLoader: Cannot parse `{0}` into `{2}:{1}`; substituting default `{3}`".F(s,t.Name,f,ret) );
Console.WriteLine("FieldLoader: Cannot parse `{0}` into `{2}:{1}`; substituting default `{3}`".F(s, t.Name, f, ret));
return ret;
};

View File

@@ -8,7 +8,6 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;

View File

@@ -18,8 +18,8 @@ namespace OpenRA.GameRules
{
public class WarheadInfo
{
[Desc("Distance (in pixels) from the explosion center at which damage is 1/2.")]
public readonly int Spread = 1;
[Desc("Distance from the explosion center at which damage is 1/2.")]
public readonly WRange Spread = new WRange(43);
[FieldLoader.LoadUsing("LoadVersus")]
[Desc("Damage vs each armortype. 0% = can't target.")]
public readonly Dictionary<string, float> Versus;
@@ -99,17 +99,17 @@ namespace OpenRA.GameRules
public class WeaponInfo
{
public readonly float Range = 0;
public readonly WRange Range = WRange.Zero;
public readonly string[] Report = null;
[Desc("Rate of Fire")]
public readonly int ROF = 1;
public readonly int Burst = 1;
public readonly bool Charges = false;
public readonly bool Underwater = false;
public readonly string Palette = "effect";
public readonly string[] ValidTargets = { "Ground", "Water" };
public readonly string[] InvalidTargets = { };
public readonly int BurstDelay = 5;
public readonly float MinRange = 0;
public readonly WRange MinRange = WRange.Zero;
[FieldLoader.LoadUsing("LoadProjectile")] public IProjectileInfo Projectile;
[FieldLoader.LoadUsing("LoadWarheads")] public List<WarheadInfo> Warheads;
@@ -179,13 +179,12 @@ namespace OpenRA.GameRules
if (!world.Map.IsInMap(cell))
return false;
if (ValidTargets.Contains("Ground") && world.GetTerrainType(cell) != "Water")
return true;
var cellInfo = world.GetTerrainInfo(cell);
if (!ValidTargets.Intersect(cellInfo.TargetTypes).Any()
|| InvalidTargets.Intersect(cellInfo.TargetTypes).Any())
return false;
if (ValidTargets.Contains("Water") && world.GetTerrainType(cell) == "Water")
return true;
return false;
return true;
}
return false;

View File

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

View File

@@ -8,7 +8,6 @@
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
namespace OpenRA.Graphics

View File

@@ -79,12 +79,8 @@ namespace OpenRA.Graphics
return cachedSprites[collection][image];
MappedImage mi;
try { mi = collections[collection].regions[image]; }
catch (KeyNotFoundException)
{
throw new InvalidOperationException(
"Collection `{0}` does not have an image `{1}`".F(collection, image));
}
if (!collections[collection].regions.TryGetValue(image, out mi))
return null;
// Cached sheet
Sheet sheet;

View File

@@ -8,8 +8,6 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
@@ -17,6 +15,8 @@ namespace OpenRA.Graphics
{
public struct ContrailRenderable : IRenderable
{
public int Length { get { return trail.Length; } }
readonly World world;
// Store trail positions in a circular buffer

View File

@@ -10,11 +10,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Graphics
{

View File

@@ -8,7 +8,6 @@
*/
#endregion
using System.Xml;
using OpenRA.FileFormats;
namespace OpenRA.Graphics

View File

@@ -9,8 +9,6 @@
#endregion
using System.Drawing;
using System.IO;
using System.Xml;
using OpenRA.FileFormats;
using System.Collections.Generic;

View File

@@ -13,7 +13,6 @@ using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Graphics
@@ -114,7 +113,7 @@ namespace OpenRA.Graphics
{
var mapX = x + map.Bounds.Left;
var mapY = y + map.Bounds.Top;
var custom = map.CustomTerrain[mapX,mapY];
var custom = map.CustomTerrain[mapX, mapY];
if (custom == null)
continue;
*(c + (y * bitmapData.Stride >> 2) + x) = world.TileSet.Terrain[custom].Color.ToArgb();
@@ -186,9 +185,9 @@ namespace OpenRA.Graphics
return bitmap;
}
public static Bitmap RenderMapPreview(Map map)
public static Bitmap RenderMapPreview(Map map, bool actualSize)
{
Bitmap terrain = TerrainBitmap(map);
Bitmap terrain = TerrainBitmap(map, actualSize);
return AddStaticResources(map, terrain);
}
}

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;

View File

@@ -68,5 +68,14 @@ namespace OpenRA.Graphics
return units[unit].ContainsKey(seq);
}
public static IEnumerable<string> Sequences(string unit)
{
if (!units.ContainsKey(unit))
throw new InvalidOperationException(
"Unit `{0}` does not have all sequences defined.".F(unit));
return units[unit].Keys;
}
}
}

View File

@@ -10,6 +10,7 @@
using System;
using System.Drawing;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
@@ -38,13 +39,13 @@ namespace OpenRA.Graphics
public static Sheet AllocateSheet()
{
return new Sheet(new Size(Renderer.SheetSize, Renderer.SheetSize));;
return new Sheet(new Size(Renderer.SheetSize, Renderer.SheetSize));
}
internal SheetBuilder(SheetType t)
public SheetBuilder(SheetType t)
: this(t, AllocateSheet) {}
internal SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
public SheetBuilder(SheetType t, Func<Sheet> allocateSheet)
{
channel = TextureChannel.Red;
type = t;
@@ -52,15 +53,28 @@ namespace OpenRA.Graphics
this.allocateSheet = allocateSheet;
}
public Sprite Add(ISpriteFrame frame) { return Add(frame.Data, frame.Size, frame.Offset); }
public Sprite Add(byte[] src, Size size) { return Add(src, size, float2.Zero); }
public Sprite Add(byte[] src, Size size, float2 spriteOffset)
{
// Don't bother allocating empty sprites
if (size.Width == 0 || size.Height == 0)
return new Sprite(current, Rectangle.Empty, spriteOffset, channel, BlendMode.Alpha);
var rect = Allocate(size, spriteOffset);
Util.FastCopyIntoChannel(rect, src);
current.CommitData();
return rect;
}
public Sprite Add(Bitmap src)
{
var rect = Allocate(src.Size);
Util.FastCopyIntoSprite(rect, src);
current.CommitData();
return rect;
}
public Sprite Add(Size size, byte paletteIndex)
{
var data = new byte[size.Width * size.Height];

View File

@@ -1,210 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Drawing;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
public class ShroudRenderer
{
World world;
Map map;
Sprite[] shadowBits = Game.modData.SpriteLoader.LoadAllSprites("shadow");
Sprite[,] sprites, fogSprites;
int shroudHash;
bool initializePalettes = true;
PaletteReference fogPalette, shroudPalette;
static readonly byte[][] SpecialShroudTiles =
{
new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
new byte[] { 32, 32, 25, 25, 19, 19, 20, 20 },
new byte[] { 33, 33, 33, 33, 26, 26, 26, 26, 21, 21, 21, 21, 23, 23, 23, 23 },
new byte[] { 36, 36, 36, 36, 30, 30, 30, 30 },
new byte[] { 34, 16, 34, 16, 34, 16, 34, 16, 27, 22, 27, 22, 27, 22, 27, 22 },
new byte[] { 44 },
new byte[] { 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 31, 31, 31, 31, 31, 31 },
new byte[] { 40 },
new byte[] { 35, 24, 17, 18 },
new byte[] { 39, 39, 29, 29 },
new byte[] { 45 },
new byte[] { 43 },
new byte[] { 38, 28 },
new byte[] { 42 },
new byte[] { 41 },
new byte[] { 46 },
};
public ShroudRenderer(World world)
{
this.world = world;
this.map = world.Map;
sprites = new Sprite[map.MapSize.X, map.MapSize.Y];
fogSprites = new Sprite[map.MapSize.X, map.MapSize.Y];
// Force update on first render
shroudHash = -1;
}
Sprite ChooseShroud(Shroud s, int i, int j)
{
if (!s.IsExplored(i, j))
return shadowBits[0xf];
// bits are for unexploredness: up, right, down, left
var v = 0;
// bits are for unexploredness: TL, TR, BR, BL
var u = 0;
if (!s.IsExplored(i, j - 1)) { v |= 1; u |= 3; }
if (!s.IsExplored(i + 1, j)) { v |= 2; u |= 6; }
if (!s.IsExplored(i, j + 1)) { v |= 4; u |= 12; }
if (!s.IsExplored(i - 1, j)) { v |= 8; u |= 9; }
var uSides = u;
if (!s.IsExplored(i - 1, j - 1)) u |= 1;
if (!s.IsExplored(i + 1, j - 1)) u |= 2;
if (!s.IsExplored(i + 1, j + 1)) u |= 4;
if (!s.IsExplored(i - 1, j + 1)) u |= 8;
return shadowBits[SpecialShroudTiles[u ^ uSides][v]];
}
Sprite ChooseFog(Shroud s, int i, int j)
{
if (!s.IsVisible(i, j)) return shadowBits[0xf];
if (!s.IsExplored(i, j)) return shadowBits[0xf];
// bits are for unexploredness: up, right, down, left
var v = 0;
// bits are for unexploredness: TL, TR, BR, BL
var u = 0;
if (!s.IsVisible(i, j - 1)) { v |= 1; u |= 3; }
if (!s.IsVisible(i + 1, j)) { v |= 2; u |= 6; }
if (!s.IsVisible(i, j + 1)) { v |= 4; u |= 12; }
if (!s.IsVisible(i - 1, j)) { v |= 8; u |= 9; }
var uSides = u;
if (!s.IsVisible(i - 1, j - 1)) u |= 1;
if (!s.IsVisible(i + 1, j - 1)) u |= 2;
if (!s.IsVisible(i + 1, j + 1)) u |= 4;
if (!s.IsVisible(i - 1, j + 1)) u |= 8;
return shadowBits[SpecialShroudTiles[u ^ uSides][v]];
}
void GenerateSprites(Shroud shroud)
{
var hash = shroud != null ? shroud.Hash : 0;
if (shroudHash == hash)
return;
shroudHash = hash;
if (shroud == null)
{
// Players with no shroud see the whole map so we only need to set the edges
var b = map.Bounds;
for (int i = b.Left; i < b.Right; i++)
for (int j = b.Top; j < b.Bottom; j++)
{
var v = 0;
var u = 0;
if (j == b.Top) { v |= 1; u |= 3; }
if (i == b.Right - 1) { v |= 2; u |= 6; }
if (j == b.Bottom - 1) { v |= 4; u |= 12; }
if (i == b.Left) { v |= 8; u |= 9; }
var uSides = u;
if (i == b.Left && j == b.Top) u |= 1;
if (i == b.Right - 1 && j == b.Top) u |= 2;
if (i == b.Right - 1 && j == b.Bottom - 1) u |= 4;
if (i == b.Left && j == b.Bottom - 1) u |= 8;
sprites[i, j] = fogSprites[i, j] = shadowBits[SpecialShroudTiles[u ^ uSides][v]];
}
}
else
{
for (int i = map.Bounds.Left; i < map.Bounds.Right; i++)
for (int j = map.Bounds.Top; j < map.Bounds.Bottom; j++)
sprites[i, j] = ChooseShroud(shroud, i, j);
for (int i = map.Bounds.Left; i < map.Bounds.Right; i++)
for (int j = map.Bounds.Top; j < map.Bounds.Bottom; j++)
fogSprites[i, j] = ChooseFog(shroud, i, j);
}
}
internal void Draw(WorldRenderer wr, Shroud shroud)
{
if (initializePalettes)
{
if (world.LobbyInfo.GlobalSettings.Fog)
fogPalette = wr.Palette("fog");
shroudPalette = world.LobbyInfo.GlobalSettings.Fog ? wr.Palette("shroud") : wr.Palette("shroudfog");
initializePalettes = false;
}
GenerateSprites(shroud);
// We draw the shroud when disabled to hide the sharp map edges
var clipRect = wr.Viewport.CellBounds;
DrawShroud(wr, clipRect, sprites, shroudPalette);
if (world.LobbyInfo.GlobalSettings.Fog)
DrawShroud(wr, clipRect, fogSprites, fogPalette);
}
void DrawShroud(WorldRenderer wr, Rectangle clip, Sprite[,] s, PaletteReference pal)
{
for (var j = clip.Top; j < clip.Bottom; j++)
{
var starti = clip.Left;
var last = shadowBits[0x0f];
for (var i = clip.Left; i < clip.Right; i++)
{
if ((s[i, j] == shadowBits[0x0f] && last == shadowBits[0x0f])
|| (s[i, j] == shadowBits[0] && last == shadowBits[0]))
continue;
if (starti != i)
{
// Stretch a solid black sprite over the rows above
// TODO: This doesn't make sense for isometric terrain
Game.Renderer.WorldSpriteRenderer.DrawSprite(
s[starti, j],
Game.CellSize * new float2(starti, j),
pal,
new float2(Game.CellSize * (i - starti), Game.CellSize));
starti = i + 1;
}
Game.Renderer.WorldSpriteRenderer.DrawSprite(s[i, j], Game.CellSize * new float2(i, j), pal);
starti = i + 1;
last = s[i, j];
}
// Stretch a solid black sprite over the rows to the left
// TODO: This doesn't make sense for isometric terrain
if (starti < clip.Right)
Game.Renderer.WorldSpriteRenderer.DrawSprite(s[starti, j],
Game.CellSize * new float2(starti, j), pal,
new float2(Game.CellSize * (clip.Right - starti), Game.CellSize));
}
}
}
}

View File

@@ -11,7 +11,6 @@
using System;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using OpenRA.FileFormats;
using SharpFont;

View File

@@ -8,7 +8,6 @@
*/
#endregion
using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
@@ -17,39 +16,25 @@ namespace OpenRA.Graphics
{
public class SpriteLoader
{
public SpriteLoader(string[] exts, SheetBuilder sheetBuilder)
{
SheetBuilder = sheetBuilder;
this.exts = exts;
sprites = new Cache<string, Sprite[]>(LoadSprites);
}
readonly SheetBuilder SheetBuilder;
readonly Cache<string, Sprite[]> sprites;
readonly string[] exts;
Sprite[] LoadSprites(string filename)
public SpriteLoader(string[] exts, SheetBuilder sheetBuilder)
{
// TODO: Cleanly abstract file type detection
if (filename.ToLower().EndsWith("r8"))
{
var r8 = new R8Reader(FileSystem.Open(filename));
return r8.Select(a => SheetBuilder.Add(a.Image, a.Size, a.Offset)).ToArray();
}
SheetBuilder = sheetBuilder;
BinaryReader reader = new BinaryReader(FileSystem.OpenWithExts(filename, exts));
// Include extension-less version
this.exts = exts.Append("").ToArray();
sprites = new Cache<string, Sprite[]>(CacheSpriteFrames);
}
var ImageCount = reader.ReadUInt16();
if (ImageCount == 0)
{
var shp = new ShpTSReader(FileSystem.OpenWithExts(filename, exts));
return shp.Select(a => SheetBuilder.Add(a.Image, shp.Size)).ToArray();
}
else
{
var shp = new ShpReader(FileSystem.OpenWithExts(filename, exts));
return shp.Frames.Select(a => SheetBuilder.Add(a.Image, shp.Size)).ToArray();
}
Sprite[] CacheSpriteFrames(string filename)
{
var stream = FileSystem.OpenWithExts(filename, exts);
return SpriteSource.LoadSpriteSource(stream, filename).Frames
.Select(a => SheetBuilder.Add(a))
.ToArray();
}
public Sprite[] LoadAllSprites(string filename) { return sprites[filename]; }

View File

@@ -8,9 +8,6 @@
*/
#endregion
using System;
using System.Drawing;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.Traits;
@@ -33,12 +30,15 @@ namespace OpenRA.Graphics
int nv = 0;
for (var j = map.Bounds.Top; j < map.Bounds.Bottom; j++)
{
for (var i = map.Bounds.Left; i < map.Bounds.Right; i++)
{
var tile = wr.Theater.TileSprite(map.MapTiles.Value[i, j]);
Util.FastCreateQuad(vertices, Game.CellSize * new float2(i, j), tile, terrainPalette, nv, tile.size);
var pos = wr.ScreenPosition(new CPos(i, j).CenterPosition) - 0.5f * tile.size;
Util.FastCreateQuad(vertices, pos, tile, terrainPalette, nv, tile.size);
nv += 4;
}
}
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length);
vertexBuffer.SetData(vertices, nv);

View File

@@ -9,7 +9,6 @@
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
namespace OpenRA.Graphics

View File

@@ -14,8 +14,6 @@ using System.Drawing;
using System.IO;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.Traits;
namespace OpenRA.Graphics
{
@@ -25,27 +23,31 @@ namespace OpenRA.Graphics
Dictionary<ushort, Sprite[]> templates;
Sprite missingTile;
Sprite[] LoadTemplate(string filename, string[] exts, Cache<string, R8Reader> r8Cache, int[] frames)
Sprite[] LoadTemplate(string filename, string[] exts, Dictionary<string, ISpriteSource> sourceCache, int[] frames)
{
if (exts.Contains(".R8") && FileSystem.Exists(filename+".R8"))
ISpriteSource source;
if (!sourceCache.ContainsKey(filename))
{
return frames.Select(f =>
{
if (f < 0)
return null;
using (var s = FileSystem.OpenWithExts(filename, exts))
source = SpriteSource.LoadSpriteSource(s, filename);
var image = r8Cache[filename][f];
return sheetBuilder.Add(image.Image, new Size(image.Size.Width, image.Size.Height));
}).ToArray();
if (source.CacheWhenLoadingTileset)
sourceCache.Add(filename, source);
}
else
source = sourceCache[filename];
if (frames != null)
{
var ret = new List<Sprite>();
var srcFrames = source.Frames.ToArray();
foreach (var i in frames)
ret.Add(sheetBuilder.Add(srcFrames[i]));
return ret.ToArray();
}
using (var s = FileSystem.OpenWithExts(filename, exts))
{
var t = new Terrain(s);
return t.TileBitmapBytes
.Select(b => b != null ? sheetBuilder.Add(b, new Size(t.Width, t.Height)) : null)
.ToArray();
}
return source.Frames.Select(f => sheetBuilder.Add(f)).ToArray();
}
public Theater(TileSet tileset)
@@ -60,11 +62,11 @@ namespace OpenRA.Graphics
return new Sheet(new Size(tileset.SheetSize, tileset.SheetSize));
};
var r8Cache = new Cache<string, R8Reader>(s => new R8Reader(FileSystem.OpenWithExts(s, ".R8")));
var sourceCache = new Dictionary<string, ISpriteSource>();
templates = new Dictionary<ushort, Sprite[]>();
sheetBuilder = new SheetBuilder(SheetType.Indexed, allocate);
foreach (var t in tileset.Templates)
templates.Add(t.Value.Id, LoadTemplate(t.Value.Image, tileset.Extensions, r8Cache, t.Value.Frames));
templates.Add(t.Value.Id, LoadTemplate(t.Value.Image, tileset.Extensions, sourceCache, t.Value.Frames));
// 1x1px transparent tile
missingTile = sheetBuilder.Add(new byte[1], new Size(1, 1));
@@ -73,11 +75,13 @@ namespace OpenRA.Graphics
public Sprite TileSprite(TileReference<ushort, byte> r)
{
Sprite[] template;
if (templates.TryGetValue(r.Type, out template))
if (template.Length > r.Index && template[r.Index] != null)
return template[r.Index];
if (!templates.TryGetValue(r.Type, out template))
return missingTile;
return missingTile;
if (r.Index >= template.Length)
return missingTile;
return template[r.Index];
}
public Sheet Sheet { get { return sheetBuilder.Current; } }

View File

@@ -9,6 +9,8 @@
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
@@ -59,6 +61,36 @@ namespace OpenRA.Graphics
}
}
public static void FastCopyIntoSprite(Sprite dest, Bitmap src)
{
var destStride = dest.sheet.Size.Width;
var width = dest.bounds.Width;
var height = dest.bounds.Height;
var srcData = src.LockBits(src.Bounds(),
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
unsafe
{
var c = (int*)srcData.Scan0;
// Cast the data to an int array so we can copy the src data directly
fixed (byte* bd = &dest.sheet.Data[0])
{
var data = (int*)bd;
var x = dest.bounds.Left;
var y = dest.bounds.Top;
for (var j = 0; j < height; j++)
for (var i = 0; i < width; i++)
data[(y + j) * destStride + x + i] = *(c + (j * srcData.Stride >> 2) + i);
}
}
src.UnlockBits(srcData);
}
public static float[] IdentityMatrix()
{
return Exts.MakeArray(16, j => (j % 5 == 0) ? 1.0f : 0);
@@ -258,7 +290,7 @@ namespace OpenRA.Graphics
for (var i = 0; i < 8; i++)
{
var vec = new float[] {bounds[ix[i]], bounds[iy[i]], bounds[iz[i]], 1};
var tvec = Util.MatrixVectorMultiply(mtx, vec);
var tvec = MatrixVectorMultiply(mtx, vec);
ret[0] = Math.Min(ret[0], tvec[0]/tvec[3]);
ret[1] = Math.Min(ret[1], tvec[1]/tvec[3]);

View File

@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Support;
namespace OpenRA.Graphics
{
@@ -41,6 +40,9 @@ namespace OpenRA.Graphics
// Viewport geometry (world-px)
public int2 CenterLocation { get; private set; }
public WPos CenterPosition { get { return worldRenderer.Position(CenterLocation); } }
public int2 TopLeft { get { return CenterLocation - viewportSize / 2; } }
public int2 BottomRight { get { return CenterLocation + viewportSize / 2; } }
int2 viewportSize;

View File

@@ -9,11 +9,8 @@
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
namespace OpenRA.Graphics
{

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