Compare commits

...

3888 Commits

Author SHA1 Message Date
Chris Forbes
0680b06383 Merge pull request #2771 from Mailaender/bleed
add Valkirie to AUTHORS
2013-03-14 17:12:06 -07:00
Matthias Mailänder
2dd8426dec add @Valkirie to AUTHORS
he contributed the initial HackyAI extensions
2013-03-14 22:15:27 +01:00
Chris Forbes
b1eef4ec55 Merge pull request #2769 from Mailaender/bleed
Adds a Travis build check button to the repository frontpage
2013-03-14 11:40:14 -07:00
Chris Forbes
b36d83b7cd Merge pull request #2768 from Mailaender/bot-hotfixes
Fix Desync when Bots fire Super Weapons
2013-03-14 11:35:52 -07:00
Matthias Mailänder
75a1115685 add a Travis build check button 2013-03-14 12:40:26 +01:00
Matthias Mailänder
36e820308f AI support power activation needs to go through order manager
fixes a desync whenever it will do so only on the host

+island map AI which will only build navy / air force to test
it and have a suitable bot for those map types (fixes pathfinder
eating up all CPU because it can't reach you with ground units)
2013-03-14 10:48:36 +01:00
Matthias Mailänder
431961401f Merge pull request #2765 from BugraC/myPatch
I added myself to the Authors file
2013-03-13 00:46:51 -07:00
Bugra Cuhadaroglu
d6953b88ea I added myself the Authors.
Thank you very much guys!
2013-03-12 23:00:47 -04:00
Scott_NZ
6bbef8d33f Fix crash in CaptureActor.Tick when trying to capture a dead actor 2013-03-13 11:14:45 +13:00
Chris Forbes
e4806e4d39 Merge pull request #2761 from Mailaender/production-speedup-hotfix
Fixes #2753 ClassicProductionQueue related crashes
2013-03-12 11:35:58 -07:00
Matthias Mailänder
6d6664d930 make classic production queue speedup less error prone
- avoid float modifiers because of rounding errors and desync
- try not to crash when the last production building is gone
- don't do LINQ queries on selfsame buildings if not required
2013-03-12 12:49:16 +01:00
Matthias Mailänder
7676ef6a14 Merge pull request #2760 from ScottNZ/devmode
Make FACT buildable when "Build Everything" is turned on
2013-03-12 01:42:55 -07:00
Scott_NZ
712b29d233 Make FACT buildable when "Build Everything" is turned on 2013-03-12 21:13:21 +13:00
Matthias Mailänder
65455ee1ca Merge pull request #2556 from ihptru/maptitle
return mapTitle in ra and d2k lobby
2013-03-12 00:46:58 -07:00
Bugra Cuhadaroglu
0d86595ba8 Ranks not showing in Replay Viewer
This will fix the problem.
2013-03-12 12:37:26 +13:00
Matthias Mailänder
4ab2fa21eb Merge pull request #2756 from chrisforbes/master
Fix desync on win or lose
2013-03-11 14:43:03 -07:00
Chris Forbes
1f3710b90e Merge pull request #2757 from Mailaender/desktop-fix
Fix missing .desktop file in latest playtests
2013-03-11 14:20:42 -07:00
Matthias Mailänder
c8a457bdce simplify desktop file installation on Linux
the old Ubuntu build machine is unable to do it
2013-03-11 22:18:53 +01:00
Chris Forbes
67ca37326e fix desync on win/lose 2013-03-12 10:15:04 +13:00
Chris Forbes
2dd53e6d99 Merge pull request #2612 from Mailaender/burning-trees
Destructible trees for both CnC and RA mod
2013-03-11 13:16:49 -07:00
Chris Forbes
623fce3cdf Merge pull request #2754 from Mailaender/auto-target-desync-hotfix
Hotfix: Addresses Desync Issues in AutoTarget Trait
2013-03-11 13:08:10 -07:00
Matthias Mailänder
97d850e481 use integer math to calculate next auto-target scan-time
to combat random desync problem because of rounding problems
2013-03-11 14:02:28 +01:00
Bugra Cuhadaroglu
7cbc4a29bf Fix #2720 - Diagonal scrolling area in viewport corners are too small
I added two options, one is for EdgeScrollThreshold and the other one is
EdgeCornerScrollThreshold. You can modify these threshold as much as you
want.

[Squashed down into one commit -- chrisf]
2013-03-11 16:32:42 +13:00
Chris Forbes
9db06ca222 Merge pull request #2748 from BugraC/bleed
Csproj BuildEvents problem in both Linux and Windows
2013-03-10 19:23:26 -07:00
Chris Forbes
63e5ce2bc5 Merge pull request #2749 from Mailaender/chrome-yaml-fixes
Chrome yaml fixes
2013-03-10 19:23:09 -07:00
Matthias Mailänder
8bb1d83fb7 add new lobby buttons to d2k chrome as well 2013-03-11 03:18:02 +01:00
Matthias Mailänder
947c9d73ce add new developer cheats to cnc chrome
fixes a crash
2013-03-11 03:13:25 +01:00
Matthias Mailänder
66855072de update changelog for new playtest release 2013-03-11 02:53:32 +01:00
Bugra Cuhadaroglu
c145dc2379 Csproj BuildEvents problem in both Linux and Windows
I have found this error with the OpenRa.Mods.RA csproj: copy
"thirdparty/FuzzyLogicLibrary.dll" "$(SolutionDir)", this should be: cd
"$(SolutionDir)thirdparty/"
copy "FuzzyLogicLibrary.dll" "$(SolutionDir)" in two seperated codes,
this FuzzyLogicLibrary.dll copy error can be fixed in both Windows and
Linux environment
2013-03-10 21:17:54 -04:00
Chris Forbes
f2b7c2c2ad Merge pull request #2715 from xaionaro/bleed
Adapted to dpkg's "--instdir"-like options.
2013-03-10 18:13:31 -07:00
Chris Forbes
6bfeb12d33 Merge pull request #2747 from psydev/patch-6
added a blue tiberium blossom tree.
2013-03-10 18:13:05 -07:00
psydev
09bef2d4c2 Gave blue tiberium blossom a sequence; changed #2
Blossom tree has a sequence. 
There are two blossom trees in C&C, so I will use the first one (split2) for green tiberium and the 2nd one (split3) for blue tiberium. The old split3 still exists for backwards-compatibility, but will now show the split2 image. Only the blue tiberium blossom tree will show the split3 image.
2013-03-10 18:00:21 -07:00
psydev
53fec13183 added a blue tiberium blossom tree. 2013-03-10 17:55:54 -07:00
Chris Forbes
6427ad1cf9 Merge pull request #2683 from Mailaender/survival01
Survival01 by @NukemBro
2013-03-10 16:20:59 -07:00
Chris Forbes
c5d97fea69 Merge pull request #2738 from Mailaender/a-star
A-star debug overlay
2013-03-10 16:20:34 -07:00
Chris Forbes
7a41b10618 Merge pull request #2744 from ScottNZ/lobby
Add "Assign Teams" lobby drop down button
2013-03-10 16:20:19 -07:00
Chris Forbes
2032a7efa4 Merge pull request #2745 from Mailaender/more-settings
Add hidden settings to the GUI
2013-03-10 16:20:04 -07:00
Scott_NZ
bd292b56cf Ignore spectators when counting clients for the assignteams command 2013-03-11 01:20:08 +13:00
Scott_NZ
7af91f1747 Disable the button/order when there aren't enough clients to assign 2013-03-11 00:29:23 +13:00
Matthias Mailänder
17d032b190 destructible trees for both CnC and RA mod
- move DeadBuildingState to OpenRA.Mods.RA
- don't loop sequences with length > 1
2013-03-10 10:08:59 +01:00
Matthias Mailänder
9d6c8453fd add hidden MaxFPS settings to ra/d2k GUI 2013-03-10 09:42:05 +01:00
Matthias Mailänder
6bbe5f633c expose hidden Debug settings to ra/d2k GUI
- performance text switch
- performace text update rate
- AI debug messages
- trait report threshold ticks
2013-03-10 09:40:08 +01:00
Matthias Mailänder
ba8c9bb1b1 added hidden audio settings to ra/d2k GUI
- video volume
- map music (was shellmap music)
- sound engine
2013-03-10 09:34:15 +01:00
Scott_NZ
8c46b421de Add "Assign Teams" lobby drop down button 2013-03-10 20:46:29 +13:00
Matthias Mailänder
1a6a7da9c1 apply recent refactoring to quad renderer 2013-03-10 07:47:00 +01:00
James Dunne
d8c752ecb9 DebugOverlay improvements to only render inside viewing range. 2013-03-10 07:35:36 +01:00
James Dunne
7e913c4bb7 Lame attempts to improve A*. 2013-03-10 07:33:31 +01:00
Matthias Mailänder
2abde381a7 Exposed PathSearch.owner and removed Player argument from PathFinder functions. 2013-03-10 07:33:31 +01:00
Matthias Mailänder
493eb10b96 Now coloring A* cells by owning player color. Added checkbox to cheats menu. 2013-03-10 07:33:25 +01:00
Matthias Mailänder
7d0de5645f Added QuadRenderer to render shaded/colored quads. Added DebugOverlay to World to show A* bidi search cost per cell. 2013-03-10 07:32:35 +01:00
Matthias Mailänder
290310fbe8 Added Mission Survival01 mission 2013-03-10 07:28:21 +01:00
Chris Forbes
19e6a588b8 Merge pull request #2589 from Mailaender/travis
Travis CI support
2013-03-09 21:11:54 -08:00
Chris Forbes
b39f540e4b Merge pull request #2736 from Mailaender/better-bots
Better AI Bots
2013-03-09 21:11:29 -08:00
Chris Forbes
e45fc0079c Merge pull request #2729 from Mailaender/sync
Dump some more values into the debug log to investigate desyncs
2013-03-09 21:10:42 -08:00
Chris Forbes
25971bf98f Merge pull request #2725 from psydev/patch-5
defaults.yaml: unit speeds fix; husk burn; tanks explode small
2013-03-09 21:09:51 -08:00
Chris Forbes
3f273674f7 Merge pull request #2737 from Mailaender/shroud-sync
add Shroud, CreatesShroud and RevealsShroud to syncreport.log
2013-03-09 21:09:31 -08:00
Chris Forbes
da566f3648 Merge pull request #2731 from pchote/renderer-cleanup2
Renderer refactoring - Duplication
2013-03-09 21:08:34 -08:00
Chris Forbes
70e823f526 Merge pull request #2739 from Mailaender/shroud-dev-cheats
Additional Developer Shroud Cheats
2013-03-09 21:07:41 -08:00
Chris Forbes
0411b34bbd Merge pull request #2741 from Mailaender/classic-mods
Classic mods
2013-03-09 21:06:41 -08:00
Matthias Mailänder
49cfa21ddb separate spy disguise and infiltrate
- add thief to classic-ra & monster tank madness
- remove crude workarounds for allies04
2013-03-09 13:48:31 +01:00
Matthias Mailänder
7675a69cec add copy FuzzyLogicLibrary.dll to csproj files for msbuild 2013-03-08 19:27:11 +01:00
Matthias Mailänder
ca6cc3fbe1 add unused Red Alert actors for legacy map import
- thief
- chan
- general
- mobile radar jammer
2013-03-08 11:22:59 +01:00
Matthias Mailänder
455c66e2eb fix HPAD renaming in GDI01 2013-03-08 09:40:12 +01:00
Matthias Mailänder
de30f0a917 make fog of war rendering optional for classic mods 2013-03-08 09:40:12 +01:00
Matthias Mailänder
b16b171b1e cnc classic helis rearm at hpad and repair at fix
don't crash due to missing sequences for GDI/NOD hpads
2013-03-08 09:40:12 +01:00
Matthias Mailänder
804729deac remove line build feature for walls in classic mods 2013-03-08 09:40:12 +01:00
Matthias Mailänder
f3e0ff8758 fix #2709 CustomBuildTimeValue should not desync
remove redundant code by outsourcing raw build time calculation
2013-03-08 09:40:11 +01:00
Matthias Mailänder
e3fbd40278 added classic engineer capture rules 2013-03-08 09:40:11 +01:00
Matthias Mailänder
f2703dd65d apply recent palette refactoring changes to classic mods 2013-03-08 09:40:11 +01:00
Matthias Mailänder
2f917982fd add a quick RA classic loadscreen replacement to avoid confusion 2013-03-08 09:40:11 +01:00
Matthias Mailänder
f29238df6e add production queue speedup to classic mods 2013-03-08 09:40:11 +01:00
Matthias Mailänder
71b1cf9cb2 move Nod01 to cnc-classic mod; fix FMV, music; avoid menu crash 2013-03-08 09:40:11 +01:00
Dan9550
20737415fa started work on NOD_01 2013-03-08 09:40:11 +01:00
Matthias Mailänder
6e9ac71168 fix GDI01 FMV problems and gunboat crash
- show video not only the sound
- start the game after video playback
- don't crash after the win/loose movies are played
- don't crash when moving the gunboat
2013-03-08 09:40:11 +01:00
Cody Brittain
15032e3a40 Update mods/cnc-classic/rules/defaults.yaml
Fix a building explosion sound
2013-03-08 09:40:10 +01:00
Cody Brittain
eed8cf2cf0 Update mods/cnc-classic/mod.yaml
Update mod Name and Description
2013-03-08 09:40:10 +01:00
Cody Brittain
27235df950 Update mods/cnc-classic/rules/structures.yaml
Turret no longer buildable by GDI, Guard Tower no longer buildable by Nod
2013-03-08 09:40:10 +01:00
Cody Brittain
0902dcb7f3 Update mods/cnc-classic/rules/vehicles.yaml
Just a compromise
2013-03-08 09:40:10 +01:00
Cody Brittain
8bdcbe727f Update mods/cnc-classic/rules/system.yaml
Fix sound
2013-03-08 09:40:10 +01:00
Matthias Mailänder
e4a7e9716e Add contributers of cnc-classic 2013-03-08 09:40:10 +01:00
Matthias Mailänder
7052b72f48 remove roof from classic hover craft to fix rendering of cargo 2013-03-08 09:40:10 +01:00
Matthias Mailänder
3e5ee4dc1b add movement flash sequence to cnc-classic 2013-03-08 09:40:10 +01:00
Matthias Mailänder
190342a2c8 remove traits we don't need in cnc-classic 2013-03-08 09:40:10 +01:00
Matthias Mailänder
82568376a0 move GDI01 to classic mod and fix crash on startup 2013-03-08 09:40:10 +01:00
Matthias Mailänder
e47cc68ee2 fix RALint cnc-classic errors 2013-03-08 09:40:09 +01:00
Matthias Mailänder
d56bf2ee34 added a few explosion animations 2013-03-08 09:40:09 +01:00
psydev
07f0fcde33 created weapons.yaml
I'm can't remember what differences, if any, there are between cnc and cnc-classic for this file. I edited it ~6 months ago.
2013-03-08 09:40:09 +01:00
psydev
de3814dcd2 Create explosions.yaml
CNC Classic uses many different explosion types (imitating C&C Gold). Decided they should get their own file. 
Explosions are not perfect renditions of C&C Gold's (in particular, I have not estimated precisely how much damage they do to surrounding units). Graphics are mostly identical, though.
2013-03-08 09:40:09 +01:00
psydev
cc2440d0a2 added explosions.yaml to mod 2013-03-08 09:40:09 +01:00
psydev
3123f6672b replaced vehicles.yaml
Completely replaced vehicles.yaml. All values should correspond with C&C Gold. 
(Cost, HP, speed, armor type, vision, pre-reqs, explosion type...)
-Re-ordered units list from basic at the top to advanced at the bottom.
2013-03-08 09:40:09 +01:00
psydev
382997086d re-write defaults.yaml
Re-writing defaults.yaml to enter values from C&C Gold. 
Vehicles & tanks have a small explosion by default now.
2013-03-08 09:40:09 +01:00
psydev
43995ebb28 re-wrote structures.yaml
Structures should now have same values C&C Gold now. 
Helipad is not perfect (unit does not spawn in the center)
There may be issues with how the ion cannon does damage differently to weapons factory vs. airfield (also an issue in regular CNC fork).
List of buildings has been organized from basic to advanced, and in-game build menu has been changed to be more logical.
2013-03-08 09:40:09 +01:00
psydev
1725fdcf8a re-wrote infantry.yaml
Unit values are now same as C&C Gold, including new unit dependencies.
(vision range is approximate, due to rendering differences for sight range)
2013-03-08 09:40:09 +01:00
psydev
e0362f3c36 made some minor money changes (start, crate)
Starting money now 5000 instead of 10,000
Crates now give 2000 instead of 1000
Warning audio (low power, silos needed) 20 seconds instead of 10.
2013-03-08 09:40:08 +01:00
Matthias Mailänder
53fefa7c10 cnc-classic mod with ClassicProductionQueue and skin by Harisson 2013-03-08 09:40:08 +01:00
Matthias Mailänder
1d0ae1a39b move classic maps to classic mod 2013-03-08 09:40:08 +01:00
Dan9550
b6a3d1c2ae just tweaked a spawn point 2013-03-08 09:40:08 +01:00
Dan9550
11dcabae73 added maps converted from c&c and covert ops 2013-03-08 09:40:08 +01:00
Matthias Mailänder
d61cc913c0 don't hardcode the RALoadScreenImage 2013-03-08 09:40:08 +01:00
Matthias Mailänder
527790f962 move SpeedUp to ClassicProductionQueueInfo 2013-03-08 09:40:08 +01:00
Matthias Mailänder
ecd4ff68a4 speed up production if multiple buildings of the same type exist 2013-03-08 09:40:07 +01:00
Matthias Mailänder
d4ea8aad8d fix mysterious ralint problem in ra-classic weapon yaml 2013-03-08 09:40:07 +01:00
Matthias Mailänder
f44a14c81e added classic-ra dialog reskin & improved allies chrome by JOo 2013-03-08 09:40:07 +01:00
Matthias Mailänder
7caf2956d7 merge RA Classic 0.1 yaml rules by @Iran 2013-03-08 09:40:07 +01:00
Matthias Mailänder
7398914af9 add a classic allies chrome reskin prototype by JOo 2013-03-08 09:40:07 +01:00
Matthias Mailänder
fb82d554fa add contributers of ra-classic to AUTHORS 2013-03-08 09:40:02 +01:00
Paul Chote
8a53819f50 Redirect IShader calls via respective *Renderers. 2013-03-08 18:21:35 +13:00
Matthias Mailänder
58c3b52a1a add reset exploration developer cheat 2013-03-07 20:32:00 +01:00
Matthias Mailänder
4a26d3f36e fix AutoTarget sync
- ISync interface was missing
- UnitStance enum was unhashable
2013-03-07 13:00:41 +01:00
Paul Chote
21e8e3a78d Remove unnecessary duplication between renderers. 2013-03-08 00:07:26 +13:00
Matthias Mailänder
7bf00a766f add a stripped down ra-classic mod cloning the current ra rules 2013-03-07 11:25:42 +01:00
Matthias Mailänder
8f69ea9da6 added classic map pack converted by @dan9550 2013-03-07 11:25:41 +01:00
Matthias Mailänder
60923e3413 log panicking infantry to the syncreport.log 2013-03-07 08:33:02 +01:00
Matthias Mailänder
72841a51e6 add shroud, creates shroud and reveals shroud to syncreport 2013-03-06 16:05:31 +01:00
Matthias Mailänder
5d441d2591 add Vladimir Komarov to AUTHORS
he contributed the fuzzy-ai
2013-03-06 11:53:26 +01:00
Matthias Mailänder
b001c83bd5 backport rallypoint changes to ai update branch 2013-03-06 11:53:19 +01:00
Vladimir Komarov
b1afeb4408 fix comparing with null 2013-03-06 11:49:45 +01:00
Matthias Mailänder
f6d4b860ee husks are invalid targets 2013-03-06 11:49:45 +01:00
Matthias Mailänder
5d2b704608 fix Makefile, prepare FuzzyLogicLibrary for packaging 2013-03-06 11:49:45 +01:00
Matthias Mailänder
d0f61faf4a add generalized ai variables 2013-03-06 11:49:45 +01:00
Matthias Mailänder
0e1229e8d1 fix air 2013-03-06 11:49:45 +01:00
Matthias Mailänder
d785430db5 fix refinery production 2013-03-06 11:49:45 +01:00
Matthias Mailänder
59d0cff410 rename lists in HackyAI.cs and fix function 2013-03-06 11:49:40 +01:00
Matthias Mailänder
e0b7242f1b adding new ai functional 2013-03-06 11:17:02 +01:00
Matthias Mailänder
3f56e00173 Merge pull request #2721 from psydev/patch-1
weapons.yaml update for CNC
2013-03-05 10:59:03 -08:00
psydev
f8fd6681c8 fixed APC gun mistkae -- now shoots at air too 2013-03-04 09:01:10 -08:00
Matthias Mailänder
a02fddd1a0 log the nextScanTime for ChooseTarget in AutoTarget
for debugging purposes to investigate desyncs
2013-03-04 10:25:20 +01:00
Paul Chote
786c3b1f1a Rename uniform setters to avoid future ambiguity. 2013-03-04 19:06:42 +13:00
psydev
01cb3a40d7 scaled back tank firing rate a bit
Originally I increased the tank firing rate by 2x, but I think 1.5x makes more sense. (Now fairly comparable to RA values). Going to leave it here.
Reduced Artillery damage vs. wood from 75% to 50%.
Slight tweak to recon bike damage 
Slight tweak to Stealth Tank damage vs. heavy armor
2013-03-03 19:31:33 -08:00
Chris Forbes
8931a1f4c1 Merge pull request #2722 from psydev/patch-2
vehicles.yaml update; a few smaller updates.
2013-03-03 17:46:39 -08:00
Chris Forbes
daa8e087f3 Merge pull request #2724 from psydev/patch-4
system.yaml: blue tiberium fix; crate fix (no mcvs)
2013-03-03 17:46:21 -08:00
Matthias Mailänder
29e917ae88 division through cell size to coarse cell coordinate vector 2013-03-03 23:11:03 +01:00
Matthias Mailänder
ef36c446bd log projectile dest as it is affected by inaccuracy calc
want to debug if this is the source of problems
2013-03-03 22:31:23 +01:00
Matthias Mailänder
76644537e2 give the users some hints when crashing due to desync 2013-03-03 19:34:10 +01:00
psydev
db521dad74 unit speeds fix; husk burn; tanks explode small
Vehicle speeds adjusted, now 80% on clear, like tanks. Intended to coincide with speed changes here: https://github.com/OpenRA/OpenRA/pull/2722
Husks burn 10 seconds now instead of 40. More fitting for cnc.
Tanks UnitExplodeSmall now by default.
2013-03-03 05:41:04 -08:00
psydev
8b504bc4b1 blue tiberium fix. crate fix (no mcvs)
Blue tiberium now poisons infantry
Crates no longer provide MCVs
levelup crate removed
crate lifetime increased
2013-03-03 05:35:01 -08:00
psydev
7503de33a5 vehicles.yaml update
see https://github.com/OpenRA/OpenRA/pull/2671 for details and rationales
2013-03-03 05:27:44 -08:00
psydev
9df613ee27 weapons.yaml update for CNC
See https://github.com/OpenRA/OpenRA/pull/2655 for details and rationales.
2013-03-03 05:03:04 -08:00
Scott_NZ
2f3def3f86 Updated CHANGELOG 2013-03-04 01:08:55 +13:00
Chris Forbes
5426e2c831 Merge pull request #2718 from Mailaender/admin-indicator
remove admin indicator icon to avoid confusion/overlapping
2013-03-03 01:35:15 -08:00
Chris Forbes
38b2b6cb4e Merge pull request #2557 from ihptru/fix2480
fix #2480; Direct Connect to different mod causes crash (saying 'missing...
2013-03-02 13:45:28 -08:00
Chris Forbes
94415d9cfb Merge pull request #2717 from Mailaender/gems-terrain
fixes #2716
2013-03-02 13:37:06 -08:00
Chris Forbes
2fb822e1c1 Merge pull request #2719 from Mailaender/hotkeys
Additional Hotkeys
2013-03-02 13:35:38 -08:00
Matthias Mailänder
0978d21439 fix problems in MultiTapDetection 2013-03-02 16:52:59 +01:00
Matthias Mailänder
775b0409c4 don't hard-code the pause-key 2013-03-02 15:56:13 +01:00
Matthias Mailänder
1083f8cf55 double-tap 0-9: select and center the control group 2013-03-02 15:55:42 +01:00
Matthias Mailänder
4cf8f9a434 remove admin indicator icon to avoid confusion/overlapping
print admin names in bold text instead
2013-03-02 15:01:11 +01:00
Matthias Mailänder
6152fa2890 fixes #2716
Gems were non-pathable and therefore also uncollectible
2013-03-02 14:58:17 +01:00
Matthias Mailänder
c0a702a386 new hotkey to center your view on the current selection 2013-03-02 11:53:45 +01:00
xaionaro
a332f3189b Adapted to dpkg's "--instdir"-like options.
For example, this may be useful if it is used a lot of versions of openra on debian
2013-03-02 13:36:33 +04:00
Okunev Yu Dmitry
e042ec5f3f Merge pull request #1 from OpenRA/bleed
Bleed
2013-03-02 00:19:25 -08:00
Chris Forbes
336076c248 Merge pull request #2665 from Mailaender/pvecfloat-combat
Fix floating point inconsistencies to reduce desyncs
2013-03-02 00:01:53 -08:00
Chris Forbes
c21b60f555 Merge pull request #2675 from Mailaender/simple-hotkey-config
user-configurable hotkey via in-game settings
2013-03-02 00:01:01 -08:00
Chris Forbes
efd0d81dca Merge pull request #2714 from ScottNZ/lobby
Revert client colours to their preferred colours after the map is changed
2013-03-02 00:00:04 -08:00
Scott_NZ
63467cd000 Revert client colours to their preferred colours after the map is changed to a map which doesn't lock colours. 2013-03-02 16:18:09 +13:00
Chris Forbes
46f4685eec Merge pull request #2712 from Mailaender/gems-minimap-color
Render crystals in a different color on the mini-map
2013-03-01 15:06:07 -08:00
Chris Forbes
af3a5cf939 Merge pull request #2713 from pchote/parachute-fix
Fix crash when an opponent uses Paratroopers.
2013-03-01 14:41:23 -08:00
Paul Chote
fb0ce8c06a Fix crash when an opponent uses Paratroopers. 2013-03-02 10:09:38 +13:00
Matthias Mailänder
8358597fd2 render crystals in a different color on the mini-map 2013-03-01 21:06:09 +01:00
Matthias Mailänder
b31f830cb1 key config settings code cleanup
- move label and textfield widget lookup into SetupKeyBinding
- fix wonkey indentions
- remove explicit private in WorldCommandWidget
2013-03-01 19:13:21 +01:00
Chris Forbes
561d47a6a1 Merge pull request #2705 from Mailaender/low-power-gap-crashfix
Fix NullReferenceException in UnHideActor
2013-03-01 01:57:23 -08:00
Chris Forbes
b8b0111aa2 Merge pull request #2706 from Mailaender/cnc-proc-desync-fix
Remove custom build time for Tiberium refinery to fix desyncs
2013-03-01 01:54:51 -08:00
Chris Forbes
f204f25474 Merge pull request #2707 from Mailaender/cnc-lobby-crashfix
Fix #2663 Crash when displaying the spawn tooltip in cnc mod
2013-03-01 01:54:18 -08:00
Matthias Mailänder
47075e1cd0 generate random numbers as floats
as they get converted from double before use anyway
2013-03-01 10:53:41 +01:00
Matthias Mailänder
793dfa5748 don't convert cell size to float for bullet inaccuracy
change it back to int / int / float
from int / float / float
was int / int / float before
2013-03-01 10:49:51 +01:00
Matthias Mailänder
0b493bcb09 remove redundant int to int conversion in rendered circles 2013-03-01 10:48:28 +01:00
Matthias Mailänder
dd476bbf5c add the total number of values extracted from RNG to sync report 2013-03-01 10:48:28 +01:00
Matthias Mailänder
fc5350c9f8 fix #2663 crash when displaying the spawn tooltip in cnc
don't hard-code ra border chrome in shared lobbyutils
2013-03-01 10:30:41 +01:00
Matthias Mailänder
b2c867bf2b remove custom build time for tiberium refinery
- this can be enabled again in cnc-classic
- needs a fix as it causes desyncs
2013-03-01 10:10:26 +01:00
Matthias Mailänder
3d8d116106 fix NullReferenceException in UnHideActor 2013-03-01 10:07:33 +01:00
Matthias Mailänder
4b2f08f21f convert start to int2 as CellContaining() spit that out before 2013-02-28 21:59:18 +01:00
Matthias Mailänder
233088077b don't convert to float2 in ReturnToBase as it was int2 before 2013-02-28 21:59:18 +01:00
Matthias Mailänder
a59621910e avoid floating point operation with heli fly int coordinates 2013-02-28 21:59:18 +01:00
Matthias Mailänder
05b6b59dad use Combat.IsInRange instead of float2.WithinEpsilon for heli 2013-02-28 21:59:18 +01:00
Matthias Mailänder
2bc7570674 remove conditional compile left-over junk 2013-02-28 21:59:18 +01:00
Matthias Mailänder
0085ac130b use PVecFloat in Combat sub-routines 2013-02-28 21:59:18 +01:00
Chris Forbes
7e1ee0e2e5 fix #2661: desyncs with shroud/exploration cheats 2013-03-01 09:29:03 +13:00
Chris Forbes
6bd3de8ec8 Fixed #2696: Sequences: Allow stride to be specified.
This allows you to use just some of the frames of an animation
which has multiple facings.

For example, if you have an animation which has 8 facings, and 6 frames
of animation per facing, but you only want to show 3 of them, you can now do:

    Facings: 8
    Length: 3       # the number of frames in each facing to actually use
    Stride: 6       # the number of frames per facing present in the SHP

If Stride is not specified, it defaults to Length, which is the old behavior.
It is an error to specify a stride less than the length -- this would produce
overlapping facings, or weirder.
2013-02-28 09:08:41 +13:00
Chris Forbes
fab7f2c4b6 Merge pull request #2684 from xaionaro/bleed
fixed a issue with pinging Master-server
2013-02-27 11:50:18 -08:00
Chris Forbes
ea799e5735 Merge pull request #2701 from psydev/patch-49
[cnc] structure sequences tick-rates corrected
2013-02-27 11:49:37 -08:00
Chris Forbes
3ab4112631 Merge remote-tracking branch 'pchote/cleanup' 2013-02-28 08:45:47 +13:00
Scott_NZ
817e6f1ec1 Have Tanya not shoot her pistols at buildings, and have her shoot pistols at barrels instead of using C4 on them 2013-02-27 17:57:53 +13:00
Scott_NZ
81c8f0360f Let's not crash if WeaponInfo.Report[] is empty 2013-02-26 18:08:55 +13:00
psydev
bec29d81c5 cnc-structure sequences tickrate fixed
Strucutre animations were too fast in many cases. These values seem to match up correctly to C&C 95.

Obelisk - Have not yet fixed (will do so when I fix how it fires)
SAM site - Someone may later decide to speed up how fast it pops up, for gameplay purposes
2013-02-25 16:05:11 -08:00
Paul Chote
3a11aeb434 Cache PaletteReference in RenderSimple. 2013-02-26 09:35:41 +13:00
Paul Chote
dddec1ec61 Add INotifyOwnerChanged interface 2013-02-26 09:35:41 +13:00
Paul Chote
82426e0e45 Move Palette from ModData to WorldRenderer. 2013-02-26 09:35:41 +13:00
Paul Chote
3033eb8be0 Die with a helpful error if a palette doesn't exist. 2013-02-26 09:35:41 +13:00
Paul Chote
e9665cf9f3 Remove WorldRenderer.GetPaletteIndex. 2013-02-26 09:35:41 +13:00
Paul Chote
9bc743068a Remove WorldRenderer.GetPalette. 2013-02-26 09:35:41 +13:00
Paul Chote
72a9954491 Simplify PaletteReference interface. 2013-02-26 09:35:40 +13:00
Paul Chote
f2fe30a7bb Remove PaletteReference.FromName from TeslaZap. 2013-02-26 09:35:39 +13:00
Paul Chote
ce39c79477 Apply consistent formatting to PBOG (no code changes). 2013-02-26 09:32:16 +13:00
Paul Chote
6fc4807a10 Remove PaletteReference.FromName from PBOG. 2013-02-26 09:31:19 +13:00
Paul Chote
f890ea010e Pass WorldRenderer to RenderAsTerrain for palette lookup. 2013-02-26 09:24:43 +13:00
Paul Chote
5b360a7fe2 Use PaletteReferences in ShroudRenderer. 2013-02-26 09:24:43 +13:00
Paul Chote
55efd53ef7 Make RenderSimple.Palette protected. 2013-02-26 09:24:43 +13:00
Paul Chote
fa5cf96f40 Ditto for Corpse. 2013-02-26 09:24:43 +13:00
Paul Chote
e33c783fc1 Ditto for GpsDot. 2013-02-26 09:24:42 +13:00
Scott_NZ
1438030e82 Add mood haze effect for Allies 04 2013-02-26 00:10:03 +13:00
Scott_NZ
09e4d64f99 Fix Allies 02 warnings 2013-02-25 23:40:31 +13:00
Scott_NZ
b5bd6191c2 Don't crash (due to replay file being in use) if we have two instances of the game playing 2013-02-25 21:24:17 +13:00
Scott_NZ
e57de0ebce Allies 02 code maintenance. Add FreeActorInit so free harvesters with procs can be disabled etc 2013-02-25 21:24:17 +13:00
Scott_NZ
3bc9e7d2e4 Fix some playerstatistics related crashes for other mods 2013-02-25 21:24:17 +13:00
Scott_NZ
6b636b166c Check Crates setting in CrateSpawner too 2013-02-25 21:24:17 +13:00
Scott_NZ
026a86ba75 Add 'Crates' lobby checkbox and setting for enabling/disabling crate drops 2013-02-25 21:24:17 +13:00
Paul Chote
5a4bd14835 Ditto for RallyPoint. 2013-02-25 21:12:01 +13:00
Paul Chote
43159a0e05 Remove RepairIndicator dependence on target RenderSimple.
This also fixes the case where the building palette doesn't
match the indicator, and saves 2 trait lookups per tick.
2013-02-25 21:12:01 +13:00
Paul Chote
3380817865 Pass WorldRenderer to Render(). 2013-02-25 21:11:33 +13:00
Paul Chote
d6fcaafd78 Let parachute cargo render themselves.
This allows for tanks and other multi-sprite
actors to render correctly while dropping.
2013-02-25 21:10:16 +13:00
Paul Chote
0703f3f164 Extract auto-selection-size into its own interface. 2013-02-25 21:10:08 +13:00
Chris Forbes
a083554218 Merge pull request #2669 from Generalcamo/patch-7
Add support for Nyergud's Music Upgrade pack
2013-02-24 18:20:31 -08:00
Chris Forbes
c34c62ad42 Merge pull request #2672 from psydev/patch-48
[cnc] inftry detect cloaked in next tile(C&C orig)
2013-02-24 18:16:24 -08:00
Chris Forbes
fc3c091a48 Merge pull request #2670 from psydev/patch-47
[cnc] added names for explosions
2013-02-24 18:14:00 -08:00
Paul Chote
000a5eaa56 Pass WorldRenderer to IRenderModifiers and replace more palette lookups. 2013-02-24 15:45:03 +13:00
Paul Chote
48d713aafd Pass a PaletteReference to RenderPreview. 2013-02-24 15:43:20 +13:00
Paul Chote
885eec7444 Move effects to WorldRenderer palette lookup. 2013-02-24 15:43:20 +13:00
Paul Chote
95871e6cc1 Add a cache of PaletteReferences to WorldRenderer.
I don't expect any perf improvements by using this
cache, as you're simply moving the row lookup from
render-time to fetch-time. However, this is a
cleaner abstraction, and allows us to fail early
if the palette doesn't exist.
2013-02-24 15:43:19 +13:00
Paul Chote
f0ba0ce2e8 Wrap palette references with a PaletteRef object. 2013-02-24 15:43:15 +13:00
Paul Chote
a166815348 Remove duplication between world/chrome shaders. 2013-02-23 09:53:46 +13:00
Paul Chote
35a149ea87 Apply consistent formatting to Renderer (no code changes). 2013-02-23 09:46:16 +13:00
Paul Chote
0287993c31 Add bitmap export to palette (for debugging). 2013-02-22 17:11:18 +13:00
Paul Chote
2d10f6b739 Remove unnecessary indirection from palette creation. 2013-02-22 17:06:29 +13:00
Paul Chote
db7887687b Remove hardcoded list of palette mod exclusions. 2013-02-22 15:04:41 +13:00
Paul Chote
f593807617 Rework color picker palette modification.
The old method had the lobby code dig around inside
the palette modification machinery, which was a giant
hack preventing necessary streamlining.
2013-02-22 15:04:41 +13:00
Chris Forbes
6da02b7b92 Merge pull request #2662 from psydev/patch-40
[cnc] Obelisk AutoTargeted, airstrike cooldown, +misc.
2013-02-20 12:24:57 -08:00
xaionaro
86c99c47c9 https://github.com/OpenRA/OpenRA/issues/2564
fixed a issue with pinging Master-server

Sometimes initial TickCount is less than zero, so (Environment.TickCount - lastPing) can be less than "MasterPingInterval * 1000". That's why PingMasterServer() is not calling for a long time until somebody connected.
2013-02-13 20:51:37 +04:00
Scott_NZ
3b3e39b375 Don't allow MCV/FACT to be sold
This is almost always done to exploit the `free mcv` logic in the crates.
2013-02-13 15:25:47 +13:00
Scott_NZ
4b3feed324 Make a lack of random map yaml be non-fatal 2013-02-12 22:47:34 +13:00
Scott_NZ
57dd8bb91e Add Random Map lobby button 2013-02-12 22:21:34 +13:00
Scott_NZ
34b1f90200 Anti-basewalk balance adjustments. Includes moving fact over to wood and giving it 500 more health, increasing superweapon healths and moving mslo to wood, moving pbox to heavy 2013-02-11 18:00:30 +13:00
Scott_NZ
128e2c9e1f Add objectives to MonsterTankMadness 2013-02-11 00:54:53 +13:00
psydev
d0669823a2 changing name of big_poof, for consistency
Changed "big_poof" to simply "poof". 

The word "big" will only appear if there are small, medium and large versions of the explosion.
Otherwise, it will just be "explosion" and "small_explosion".
2013-02-09 15:26:41 -08:00
Matthias Mailänder
1f99b1ec8e make hotkey user-configurable via in-game settings 2013-02-09 14:08:36 +01:00
Scott_NZ
2c5eeb551e Adjust MonsterTankMadnessScript super tank movement times 2013-02-09 12:19:41 +13:00
Scott_NZ
54906702bd Fix alliedBaseProc unused variable warning 2013-02-09 12:19:41 +13:00
Scott_NZ
ec56311a3d Fix victory on start of MMM 2013-02-09 12:19:41 +13:00
Scott_NZ
cdd09ea24f Finish early version of Monster Tank Madness 2013-02-09 12:19:40 +13:00
Scott_NZ
1ecdbc1d90 Fix spyvoice/reveal range for truk.hijackable in Allies 04 2013-02-09 12:19:40 +13:00
Scott_NZ
b1a5195c51 Let's not fail right at the beginning, count units too ;) 2013-02-09 12:19:40 +13:00
Scott_NZ
03f03ff501 More MonsterTankMadness work. Add routines for super tanks, civilian evacuees, proving grounds camera, base transfer, Demitri extraction 2013-02-09 12:19:40 +13:00
Scott_NZ
3c5967a623 Add ore capping to MissionUtils. Add world.CreateActor extension in MissionUtils. 2013-02-09 12:19:40 +13:00
Scott_NZ
9013e8376c Start work on Monster Tank Madness mission 2013-02-09 12:19:40 +13:00
Scott_NZ
9b5b054297 Add delphi. Have einstein/delphi panic 2013-02-09 12:19:39 +13:00
Scott_NZ
4e161f0c91 Change V19 tooltip to Oil Pump 2013-02-09 12:19:39 +13:00
Scott_NZ
6bbd54ab93 Put e1 inside the soviet 01 classic pillboxes. Add check for mission complete 2013-02-09 12:19:39 +13:00
Scott_NZ
87190762d1 Add V19 civilian building 2013-02-09 12:19:39 +13:00
Scott_NZ
f4da36065f Add ability to have randomised reports for weapons 2013-02-09 12:19:39 +13:00
Scott_NZ
e71135b511 Better error messages when merging duplicate yaml 2013-02-09 12:17:16 +13:00
psydev
dfc880807e [cnc] Airstrike cooldown 3 mins. (from 4). tweaks.
Air Strike cooldown time reduced from 4 minutes to 3. (Ion Cannon is 3). [games are short in CNC, and waiting 4 minutes for your first airstrike is a long time.]
HQ's hitpoints reduced to 750, so it can be nuked in one shot. (but not Ion Cannon'd) 
Airfield HP reduced to 1500, so Ion + Airstrike can destroy it. (For some reason, it doesn't die as easily as Weapons Factory, despite having the same HP)
2013-02-06 16:06:47 -08:00
psydev
d12853ddf7 [cnc] inftry detect cloaked in next tile(C&C orig)
Infantry can detect cloaked units in the next tile. This behaviour was in the original C&C Gold.
(Even though it says range=2, it is actually just in the next tile)

Fixed GrenadierExplode.
2013-02-06 14:20:09 -08:00
psydev
f1019ab332 [cnc] added names for explosions
Easier-to-understand names for explosions, which can be used in the future. Can phase out old names/numbers slowly.
Also included some explosions from the C&C Content which were not in use and did not have names.
2013-02-06 12:21:04 -08:00
Cody Brittain
96d1f8d83b Update mods/cnc/mod.yaml
Add support for Nyergud's Music Upgrade Pack
2013-02-06 08:35:27 -05:00
psydev
c4fc0e57b3 [cnc] Obelisk now AutoTargeted by units, etc.
Obelisk of light was missing "-AutoTargetIgnore". All the guard towers have it, but for some reason the Obelisk didn't.
2013-02-04 18:39:26 -08:00
Chris Forbes
6403c5e6af Fixed #2651: Units not in world should not be added to the attack force
Otherwise, a pillbox's e1 passenger is counted as part of the attack
force and ends up jamming HackyAI's attack logic until it is destroyed.
2013-02-05 07:09:05 +13:00
Scott_NZ
b3fbafad59 Use Action<bool> for objective delegate type 2013-02-03 14:27:43 +13:00
Scott_NZ
7594c4eab2 Clamp reveal range to 0-50 in PlayerStatistics to stop crashes for actors with reveal ranges > 50 2013-02-03 14:27:43 +13:00
Scott_NZ
4163f1d6b0 Clean up Allies 04 yaml. Adjust hero spy reveal range from 5 to 6. Add TRUK as buildable unit 2013-02-03 14:27:43 +13:00
Scott_NZ
ea716200a7 Allies 04: Fix multiple waves of spies being able to infiltrate the lab 2013-02-03 14:27:43 +13:00
Kenny
2bd9b7a640 Enabling mobile gap generators. 2013-01-31 16:57:04 +13:00
Kenny
4f670d516d Shroud creators now only temporarily block explored shroud.
On powerdown or removal from the game, any previously explored terrain will become visible once again.
2013-01-31 16:57:04 +13:00
Matthias Mailänder
f5835244c7 use markdown for readme and contributing guidelines
- https://github.com/github/markup
- https://github.com/blog/1184-contributing-guidelines
2013-01-31 16:32:46 +13:00
psydev
b00b1c36bc Helipad reduced to $1000. Palette order fixed.
Helipad price reduced to $1000. Should make helicopter transports more accessible. Should also make having a few "support helis" flying around a more viable strategy, for non-standard builds.
Fixed palette order to be better grouped and in more progressive order. 
Re-arranged document so that it's sorted better.
2013-01-31 16:30:48 +13:00
psydev
b2ddc6cfd8 [CNC] Chinook priced reduced to $750
Halved Chinook price, $1500 to $750.
Infantry should be a more feasible strategy, and transporting them quickly will make them more usable.
This should be good for Nod especially since they don't have APCs.
2013-01-31 16:29:52 +13:00
Matthias Mailänder
0d6dbdc58b increment debian copyright year 2013-01-31 16:28:14 +13:00
Matthias Mailänder
78baf76ae1 adhere to SPDX for RPM 2013-01-31 16:28:14 +13:00
Matthias Mailänder
43c43e25c4 adhere to opendesktop menu-spec
Version= is the version of the .desktop file specification!
2013-01-31 16:28:14 +13:00
Cody Brittain
32daf025ab cnc: Update cloaking, building destroyed sounds
- Use trans1.aud as the cloak sound, on both STNK and cloak
  given from crates

- Use crumble.aud rather than xplobig4.aud for building destruction
2013-01-31 16:23:03 +13:00
ScottNZ
750bdb7bba Update CHANGELOG
Some typos/wording issues fixed
2013-01-28 19:47:31 +13:00
Scott_NZ
8a796416a4 Remove AutoTargetIgnore for stek after Einstein is freed 2013-01-28 00:33:09 +13:00
Scott_NZ
691e6cf9e8 Have the Soviets build infantry after Einstein is found. Remove jeep cargo limit 2013-01-28 00:33:08 +13:00
Scott_NZ
de208e7a2f Fix nonworking attack code in Allies 01 2013-01-28 00:33:08 +13:00
Scott_NZ
63a72c5d28 Remove unused variable 2013-01-28 00:33:08 +13:00
Scott_NZ
b6b4b89008 Refactor cash code in Allies campaign. Adjust starting cash to 10000 in SP Allies 03 2013-01-28 00:33:08 +13:00
Scott_NZ
0b65735d86 Make the LSTs unbuildable 2013-01-28 00:33:07 +13:00
Scott_NZ
44215ae6f1 Add new trait interface INotifyTransformed and use it in Allies 04 to make the transport remove its cargo capacity after it unloads its passengers 2013-01-28 00:33:07 +13:00
Scott_NZ
fba5b80980 Allies 04: Add more town stuff. Remove leftover hind stuff. Only have patrol 3 on hard difficulty 2013-01-28 00:33:07 +13:00
Scott_NZ
3f6af59612 Add AutoTargetIgnore for the new bridges 2013-01-28 00:33:07 +13:00
Scott_NZ
693a622322 Fix Soviets not attacking town properly. Remove hind patrol. 2013-01-28 00:33:07 +13:00
Scott_NZ
60e9d3f660 Add c3 civilian, made by JOo 2013-01-28 00:33:06 +13:00
Scott_NZ
1d40858f70 Have the Soviets attack the town in Allies 04 2013-01-28 00:33:06 +13:00
Scott_NZ
5188529ff6 Allies 04: Adjust one of the patrol routes 2013-01-28 00:33:06 +13:00
Scott_NZ
2079db79f7 Allies 04: Hack in a fix to stop player hero spies infiltrating buildings they shouldn't 2013-01-28 00:33:05 +13:00
Scott_NZ
d73eec068f Fix some bad Allies 01 bounty yaml 2013-01-28 00:33:05 +13:00
Scott_NZ
8a32e5761c Change map player clientindex to 0 2013-01-28 00:33:05 +13:00
Scott_NZ
12e1a531fe Tidy campaign stuff 2013-01-28 00:33:05 +13:00
Scott_NZ
32830da3c2 Remove bounties from things in Allies 01 2013-01-28 00:33:05 +13:00
Scott_NZ
9f47e75492 Allies 01: only set eligible units to defensive stance 2013-01-28 00:33:04 +13:00
Scott_NZ
e975681c16 Add more time to complete Allies 04 - the bridge destruction makes the mission more difficult 2013-01-28 00:33:04 +13:00
Scott_NZ
a968d296bb Remove v01.sniper from Allies 04 2013-01-28 00:33:04 +13:00
Scott_NZ
031240ffc1 Campaign: reduce failed/accomplished code duplication 2013-01-28 00:33:04 +13:00
Scott_NZ
dfc4b07b1a Campaign: Don't rely on world.issueorder anymore 2013-01-28 00:33:04 +13:00
Scott_NZ
63241dbf69 Allies 04. Make the v01.sniper trivial so players can ignore it. 2013-01-28 00:33:03 +13:00
Scott_NZ
5b7523b9e0 Allies 04: Make Soviets sell buildings when they are low on health. Have the bridge be destroyed by a Soviet tank 2013-01-28 00:33:03 +13:00
Matthias Mailänder
4b228a71ef Update CHANGELOG
- Dune 2000
- Editor/Remapping
- GUI improvements by Carko
- More verbose about Volkov changes
- Preparations for i18n
2013-01-27 12:17:20 +01:00
Matthias Mailänder
0f864c3192 treat compiler warnings as errors 2013-01-18 00:23:50 +01:00
Matthias Mailänder
e475d0d0b9 Added travis script 2013-01-18 00:23:19 +01:00
Cody Brittain
1635ace182 Update CHANGELOG
Just a couple things added
2013-01-18 11:09:26 +13:00
Matthias Mailänder
b4e3ce5de6 fix make for mono 3
error CS1902: Invalid debug option `+'.
Valid options are `full' or `pdbonly'
2013-01-18 11:08:10 +13:00
Carko
50ceb7c4dd Fixed the asynchronous map loading behavior when changing filter 2013-01-18 11:00:56 +13:00
Carko
4395a04d57 Asynchronous loading of map previews in the map chooser dialog 2013-01-18 11:00:56 +13:00
Matthias Mailänder
c5313375f0 pull mouse button preference from global property 2013-01-18 10:57:41 +13:00
Matthias Mailänder
2503ddfde4 let Chronotank/Minelayer accept left-click-orders 2013-01-18 10:57:41 +13:00
Matthias Mailänder
b356cca528 improve the classic mouse behaivor
- don't require to deselect units to change selection
- fix issue with broken building placement on right-click orders
- don't select enemy units when left-click attacking
- build palette won't interfere with unit orders anymore
2013-01-18 10:57:41 +13:00
Matthias Mailänder
d52394bb47 add classic left-click orders 2013-01-18 10:57:40 +13:00
Scott_NZ
1da2d89ced Only play movies in Allies 01 and Soviet 01 Classic if there's one client 2013-01-15 17:43:39 +13:00
ScottNZ
a88a7d9834 Update CHANGELOG 2013-01-13 16:06:05 +13:00
Scott_NZ
9507fde91d Fix untargetable barrel in Soviet 01 2013-01-13 00:24:28 +13:00
Scott_NZ
742a27158a Make oil derricks repairable by engineers 2013-01-12 18:55:59 +13:00
Scott_NZ
5ed383e3e2 Change mech hotkey to c 2013-01-12 18:35:01 +13:00
Scott_NZ
1679837e46 Fix mechanic being able to repair infantry. Adjust mechanic repair damage from 20 to 10 2013-01-11 17:17:14 +13:00
Scott_NZ
eb3685fe67 Fix a lack of difficulty dropdown yaml in other mods (d2k/cnc) causing crashes 2013-01-09 21:50:20 +13:00
Carko
50f8465d1e Removed mouse capture while composing text in chat (fixes #2486) 2013-01-09 16:47:39 +13:00
Cody Brittain
5502864a1f Update mods/ra/music.yaml
Mud no longer crashes: Bring it back in.
2013-01-09 07:56:30 +13:00
Carko
d572e59d2e Checking for build prerequisites before showing them in a tooltip 2013-01-09 07:54:01 +13:00
Carko
e313bbfb31 Added a build limit of 1 to Tanya and Volkov
Added the build limit of 1 to MSLO
2013-01-09 07:54:01 +13:00
Carko
a51c5fd9ca Added Buildable->BuildLimit option to limit the number of actors a player can build of the type 2013-01-09 07:54:01 +13:00
Sam Hegarty
0c104cfc3a Add a 'Shutting down' state to the gameserver.
Tell the masterserver about it, so it can quickly remove games
from the list when they are finished, rather than waiting for the
5 minute TTL to expire.
2013-01-08 23:02:28 +13:00
Chris Forbes
3a77082c66 silence warnings in allies03/04 2013-01-08 22:54:38 +13:00
Scott_NZ
975e4db452 Change facing of the 2 guarding heavy tanks in Allies 04 2013-01-08 22:44:10 +13:00
Scott_NZ
d92f184bc9 Add civilian movement and balance changes in Allies 04 2013-01-08 22:44:10 +13:00
Scott_NZ
2eea5cc3b2 Give SAM sites turret facings in Allies 04 2013-01-08 22:44:09 +13:00
Scott_NZ
0e8cb14099 Allies 04: Give money to players after they receive mcvs 2013-01-08 22:44:09 +13:00
Scott_NZ
1ec3b2ffe2 Fix whitespace in objectives 2013-01-08 22:44:09 +13:00
Scott_NZ
c836d69385 Add easy mode to Allies 01 which is like the classic mission 2013-01-08 22:44:09 +13:00
Scott_NZ
11c45e4388 Start unbreaking ScaredyCat 2013-01-08 22:44:08 +13:00
Scott_NZ
3b9fac9c84 Prevent warning in Allies 04 code 2013-01-08 22:44:08 +13:00
Scott_NZ
185558985e Have civilians come out of disturbed buildings 2013-01-08 22:44:08 +13:00
Scott_NZ
e3d25f6fed Give MISS a tooltip 2013-01-08 22:44:07 +13:00
Scott_NZ
200071e713 Add reinforcements paradrops 2013-01-08 22:44:07 +13:00
Scott_NZ
bdb7bb97cd Split long objective strings over several lines 2013-01-08 22:44:07 +13:00
Scott_NZ
82809f27f7 Reduce mission music code duplication 2013-01-08 22:44:06 +13:00
Scott_NZ
c8e84b3a11 Add license notice 2013-01-08 22:44:06 +13:00
Scott_NZ
9581f07242 Add first version of Soviet 01 classic 2013-01-08 22:44:06 +13:00
Scott_NZ
411aedafa0 Setup c3-c10 placeholder civilians. 2013-01-08 22:44:05 +13:00
Scott_NZ
f7f307c3bf LegacyMapImporter: Remove Italy as it's a bogus country. Change Germany to black. Collapse some duplicate cases. 2013-01-08 22:44:05 +13:00
Scott_NZ
c10df031bd Convert classic waypoints to waypoint not mpspawn 2013-01-08 22:44:05 +13:00
Scott_NZ
a56228aba1 Add Italy country 2013-01-08 22:44:05 +13:00
Scott_NZ
1b09544314 Default to allies for neutral in ra, gdi in cnc 2013-01-08 22:44:04 +13:00
Scott_NZ
2dc18594a2 Handle RA with GoodGuy/BadGuy players 2013-01-08 22:44:04 +13:00
Scott_NZ
baa7a58a10 Don't blow up if classic maps have Multi{0} in them either 2013-01-08 22:44:04 +13:00
Scott_NZ
bb5212d2bb Fix classic SP maps failing to import into the editor 2013-01-08 22:44:03 +13:00
Scott_NZ
38db7d1e50 Make the Soviets repair their buildings in Allies 04 2013-01-08 22:44:03 +13:00
Scott_NZ
3371085da0 Move viewport to reinforcements location after infiltration 2013-01-08 22:44:03 +13:00
Scott_NZ
5c688370ed Add difficulty options to Allies 04 2013-01-08 22:44:03 +13:00
Scott_NZ
ab01722d96 Clean up the patrol code 2013-01-08 22:44:02 +13:00
Scott_NZ
ae5cb9864a Adjust timer text 2013-01-08 22:44:02 +13:00
Scott_NZ
43e5838555 Adjusted wording of objectives 2013-01-08 22:44:02 +13:00
Scott_NZ
cf8b02de26 Add 25 min countdown timer for destroying the enemy base. 2013-01-08 22:44:01 +13:00
Scott_NZ
d3ede583c2 Make OILB trivial too 2013-01-08 22:44:01 +13:00
Scott_NZ
cda871d2eb Add missing colon 2013-01-08 22:44:01 +13:00
Scott_NZ
2ea3b77b7a Create new actors so the effects aren't carried over to built units in Allies 04. Make yak buildable by Allies again in Allies 02. Make STEK autotargetignore in Allies 01. Make MISS autotargetignore in Allies 04. 2013-01-08 22:44:00 +13:00
Scott_NZ
3ab04e4c30 Fix crash with patrols. Add more room for the Allied base 2013-01-08 22:44:00 +13:00
Scott_NZ
3b2190d720 Fixed the supply truck not being able to carry 2 passengers 2013-01-08 22:44:00 +13:00
Scott_NZ
b3691dcce9 Add base guard, hind and second objective 2013-01-08 22:44:00 +13:00
Scott_NZ
722bc00c9b Add checkpoint at the large base 2013-01-08 22:43:59 +13:00
Scott_NZ
fe07da8634 Give control of the hijacked vehicle to another passenger if the driver leaves 2013-01-08 22:43:59 +13:00
Scott_NZ
54feab66e0 Add hijackable truck to Allies 04 2013-01-08 22:43:59 +13:00
Scott_NZ
fda897c69e Add more patrols 2013-01-08 22:43:58 +13:00
Scott_NZ
31d3616b8d Actually add the Allies 04 script. Also we have dog patrols now 2013-01-08 22:43:58 +13:00
Scott_NZ
eb6bab36a0 Begin Allies 04 script 2013-01-08 22:43:58 +13:00
Scott_NZ
81f9798307 More mapping of Allies 04 2013-01-08 22:43:58 +13:00
Scott_NZ
d1dafd5782 More Allies 04 mapping 2013-01-08 22:43:57 +13:00
Scott_NZ
799a2ea541 Fixed difficulty code indentation 2013-01-08 22:43:57 +13:00
Scott_NZ
4b2e45bbae Refactor default difficulty setting into its own method 2013-01-08 22:43:57 +13:00
Scott_NZ
32721ac8cb Reposition info widgets/countdown timer widgets in centre top of vp 2013-01-08 22:43:56 +13:00
Scott_NZ
6871d2ed37 Have paradrops and mammoths come sooner if we're on hard difficulty 2013-01-08 22:43:56 +13:00
Scott_NZ
bdfa6f6ecc Slight refactor 2013-01-08 22:43:56 +13:00
Scott_NZ
c59fbd5f9d Adjust Allies 03 difficulties 2013-01-08 22:43:56 +13:00
Scott_NZ
54916cc548 Add Easy difficulty to Allies 03 2013-01-08 22:43:55 +13:00
Scott_NZ
3ff3ed39fb Fix slight logic error with difficulty 2013-01-08 22:43:55 +13:00
Scott_NZ
a8dbedd486 Fix default difficulty not being serialised 2013-01-08 22:43:55 +13:00
Scott_NZ
988a68dae5 Attempt to fix NRE that hamb got 2013-01-08 22:43:55 +13:00
Scott_NZ
9a9c5911a6 Hard difficulty for allies 03 2013-01-08 22:43:54 +13:00
Scott_NZ
bfb07e9948 Add support for mission difficulties 2013-01-08 22:43:54 +13:00
Scott_NZ
dda4e2c33a Add objective for MGG 2013-01-08 22:42:50 +13:00
Scott_NZ
05e143662d Make Allies 02 easier in SP mode 2013-01-08 22:42:50 +13:00
Scott_NZ
9e2f15bde4 Allies 03 code cleanup 2013-01-08 22:42:50 +13:00
Scott_NZ
8f90423793 Update units evacuated immediately in Allies 03 2013-01-08 22:42:50 +13:00
Scott_NZ
eecc002236 More balancing improvements to Allies 03: remove arty, agun, reduce number of yaks and paradrops 2013-01-08 22:42:49 +13:00
Scott_NZ
4167d3291a Offset MGG husk spinner 2013-01-08 22:42:49 +13:00
Scott_NZ
3be6229cf2 Add MGG husk 2013-01-08 22:42:49 +13:00
Scott_NZ
5f693945f0 Take all ore/cash from Allies 01 player 2013-01-08 22:42:49 +13:00
Scott_NZ
82f478716c Add AutoTargetIgnore to barrels 2013-01-08 22:42:48 +13:00
Scott_NZ
6544069aa2 More Allies 03 balancing adjustments 2013-01-08 22:42:48 +13:00
Scott_NZ
8486a4fbae Adjust Allies 03 balancing 2013-01-08 22:42:48 +13:00
Scott_NZ
edd1138556 Use classic RA country colours in missions 2013-01-08 22:42:48 +13:00
Scott_NZ
14ed3ae816 Add paradropping at endgame in Allies 03 2013-01-08 22:42:47 +13:00
Scott_NZ
d5db9e88d4 Put bridge across water 2013-01-08 22:42:47 +13:00
Scott_NZ
f0a4fa7712 Add more airfields to destroy in Allies 03, and have reinforcements in Allies 02 and Allies 03 come in gradually. 2013-01-08 22:42:47 +13:00
Scott_NZ
1f92768193 Remove FirstUnshroudedOrDefault from MissionUtils.cs 2013-01-08 22:42:46 +13:00
Scott_NZ
ccfcf0a1ee Have the minimum difference between attack frames in Allies 03 be lower for 2 players 2013-01-08 22:42:46 +13:00
Scott_NZ
51626bf0db Outlined Allies 04 map 2013-01-08 22:42:46 +13:00
Scott_NZ
be6da2452a Change Allies map types to Campaign 2013-01-08 22:42:46 +13:00
Scott_NZ
ec423db4e5 Don't hog the CPU trying to path to the enemy base in Allies 03, to line up with Allies 02 2013-01-08 22:42:45 +13:00
Scott_NZ
4c7f215559 Rename 'economic' to 'economy' in stats panel 2013-01-08 22:42:45 +13:00
Scott_NZ
0f9da06309 Have graph lines not draw over the axes 2013-01-08 22:42:45 +13:00
Scott_NZ
4ce6cabc46 Better numbers for the LineGraph y axis 2013-01-08 22:42:45 +13:00
Scott_NZ
b2b13b98b7 Use a default max value of 5000 on the line graph if it's too low 2013-01-08 22:42:44 +13:00
Scott_NZ
4c729ca5ed Refactored GraphWidget to LineGraphWidget 2013-01-08 22:42:44 +13:00
Scott_NZ
a78f8865b8 Moved the graph widget into OpenRA.Game - it doesn't really have any dependencies on the RA mod 2013-01-08 22:42:44 +13:00
Scott_NZ
d5b37d4343 Cleanup, refactoring of stats graph widget. 2013-01-08 22:42:44 +13:00
Scott_NZ
e424883857 Improve graph. Add things like scales/axis labelling. 2013-01-08 22:42:43 +13:00
Scott_NZ
b6e8c9c9ea Start implementing graphs for the stats panel 2013-01-08 22:42:43 +13:00
Scott_NZ
ed9bb72dbe Add more things to the Combat tab 2013-01-08 22:42:43 +13:00
Scott_NZ
9753808936 Renamed OrderCounter to PlayerStatistics. Simplify income to simply earned/min. 2013-01-08 22:42:43 +13:00
Scott_NZ
82fdbc4bc6 Move OrderCounter into Orders subnamespace 2013-01-08 22:42:42 +13:00
Scott_NZ
d7f3b81e4c Add Map Control statistic 2013-01-08 22:42:42 +13:00
Scott_NZ
36f349ecba Add Order counter for rough APM estimation. Rename Support to Production and move the production icons there 2013-01-08 22:42:42 +13:00
Scott_NZ
30a374b9e9 Add total earned/spent tracking 2013-01-08 22:42:42 +13:00
Scott_NZ
2a0b9a8596 Display support powers 2013-01-08 22:42:41 +13:00
Scott_NZ
9a9324946f Add dropdown for economic information 2013-01-08 22:42:41 +13:00
Scott_NZ
babf1556e3 Refactor the stats YAML and logic to more easily support swapping in data 2013-01-08 22:42:41 +13:00
Scott_NZ
bb1c87b084 Add clocks and text overlays for the production icons 2013-01-08 22:42:41 +13:00
Scott_NZ
1c584fb158 Consolidate the production icons into a single widget. Add income tracking for players. 2013-01-08 22:42:40 +13:00
Scott_NZ
83e1855919 Add indication of what players are building 2013-01-08 22:42:40 +13:00
Scott_NZ
4bc04769ec Subscribe to click event directly in the setup method 2013-01-08 22:42:40 +13:00
Scott_NZ
178358c29a Fixed Stats panel player selection silliness 2013-01-08 22:42:40 +13:00
Scott_NZ
42b16f74a1 Slightly adjust the width of the templates 2013-01-08 22:42:39 +13:00
Scott_NZ
9b493ad9e7 Remove unused usings 2013-01-08 22:42:39 +13:00
Scott_NZ
d7d5baae0e Add an observer stats panel 2013-01-08 22:42:39 +13:00
Scott_NZ
a8e434b74d Add radar for spectators 2013-01-08 22:42:39 +13:00
Scott_NZ
07d5ba8405 Remove Soviet econ hacks and power checks in Allies 02. 2013-01-08 22:42:39 +13:00
Scott_NZ
a5141f9908 proc.nofreeactor was causing harv to not unload properly. Just spawn a normal proc after we've changed the owner of the Allied base. 2013-01-08 22:42:38 +13:00
Scott_NZ
d15fb82b08 Allies 02 SP mode bug fixes 2013-01-08 22:42:38 +13:00
Scott_NZ
947b27a227 Make Allies 02 work in SP mode 2013-01-08 22:42:38 +13:00
Scott_NZ
b49110bf5c Ignore spies if they are disguised in Allies 03 2013-01-08 22:42:38 +13:00
Scott_NZ
8578958e40 Difficulty/balance changes 2013-01-08 22:42:37 +13:00
Scott_NZ
65e78ca8b0 Additional ore mines 2013-01-08 22:42:37 +13:00
Scott_NZ
608bf9ada1 Have the mggs come offmap, we don't want the player building too many. 2013-01-08 22:42:37 +13:00
Scott_NZ
4373831317 Remove econ hacks in Allies 03 and have the Soviets actually build their yaks. 2013-01-08 22:42:37 +13:00
Scott_NZ
aa78d63d72 Increased minimum attack increment 2013-01-08 22:42:36 +13:00
Scott_NZ
400d94caba Give the Soviets a Soviet construction yard in case the Allies lose theirs - they can capture this as a last resort. Make yaks buildable by Allies if they capture the Airfield buildings. 2013-01-08 22:42:36 +13:00
Scott_NZ
1660c4fe7c Reduce some code duplication 2013-01-08 22:42:36 +13:00
Scott_NZ
e643f12371 Attempted fix for Allies 03 crash (#2471) 2013-01-08 22:42:36 +13:00
Scott_NZ
339c0bc520 Fix weird plane spawn/management logic. Have Soviets ignore units that are concealed by gap generators 2013-01-08 22:42:36 +13:00
Scott_NZ
e15c240a8f Remove some old noise from the map 2013-01-08 22:42:35 +13:00
Scott_NZ
7bd66c2560 Render the shroud range circle for mgg 2013-01-08 22:42:35 +13:00
Scott_NZ
1f8fd404e5 Much better yak management. Map improvements. 2013-01-08 22:42:35 +13:00
Scott_NZ
93e951eb75 Added mobile gap generator. It is currently unbuildable and it does not generate shroud - this requires some additional shroud work since you can paint shroud across the map by moving it. 2013-01-08 22:42:35 +13:00
Scott_NZ
c52cd77c4c Add mechanic 2013-01-08 22:42:34 +13:00
Scott_NZ
0da911c9f8 Delete mods/d2k/bits/turret1.aud (not mods/d2k/bits/TURRET1.aud). This old, unused file was causing oddities for users with NTFS since we had two different files in the repository with filenames that differ only by case, and NTFS has case-insensitive filenames. 2013-01-08 22:42:34 +13:00
Igor Popov
395aa0fc10 dedicated: never let Bot become an admin 2013-01-08 22:34:03 +13:00
Carko
e10920d4ea Added the spawnpoint map tooltip that displays players name in the lobby (closes #2024) 2013-01-08 22:22:25 +13:00
Carko
914afa2dee Removed StringSplitOptions.RemoveEmptyEntries when counting wrapped text lines 2013-01-08 22:11:56 +13:00
Carko
ca1e0b4c48 Added word wrapping to in-game chat (fixes #2093) 2013-01-08 22:11:56 +13:00
Carko
70cf48dcaf Added a power bin tooltip that shows provided and drained power 2013-01-08 22:08:12 +13:00
Igor Popov
68130c85f3 fix #2453; MOTD for lobby (to be fetched from file); different motd for each mod 2013-01-08 21:57:25 +13:00
Chris Forbes
d0aea18b3e Added new map: "Bad Neighbors" from Nukem 2013-01-08 21:57:09 +13:00
Curtis Shmyr
ac301b22e2 Editor - Template categories are now ordered by whats specified in the tileset yaml 2013-01-08 20:11:22 +13:00
Curtis Shmyr
b56125fa39 Added terrain category types to RA Snow tileset 2013-01-08 20:11:22 +13:00
Curtis Shmyr
b362ddac15 Fixed terrain categories for two river tiles in RA Temperat 2013-01-08 20:11:22 +13:00
Curtis Shmyr
5f2aa810b1 Add terrain category types to RA desert tileset 2013-01-08 20:11:22 +13:00
Curtis Shmyr
189a6c337e Fix Water Cliff terrain types in temperate / desert tilesets 2013-01-08 20:11:22 +13:00
Curtis Shmyr
9c552839ea update CHANGELOG 2013-01-08 20:11:22 +13:00
Curtis Shmyr
79aa7901cf Added RA map: ghost town 2013-01-08 20:11:22 +13:00
Igor Popov
ad2dbffe75 fix #2480; Direct Connect to different mod causes crash (saying 'missing map') 2013-01-07 00:27:45 +04:00
Igor Popov
3b77b04b95 return mapTitle in ra and d2k lobby 2013-01-06 23:25:24 +04:00
Carko
88959b2e6c Changed scroll velocity in the map chooser to be better suited for mouse scrolling 2013-01-03 11:37:59 +13:00
Carko
f256742a0d Fixed repairing landed airplanes (most likely #2365)
When an airplane was landed and ordered to another airstrip or service depot, the aproach distance was not properly calculated since it was not taken into effect that its current altitude is zero.
2013-01-03 11:36:11 +13:00
Chris Forbes
22e2d3d0f4 Merge pull request #2507 from Lookingglass/per-player-shrouds
Per-player shrouds
2012-12-22 12:26:40 -08:00
Chris Forbes
3eed137117 Merge pull request #2526 from Mailaender/strings
made all in-game strings customisable via .yaml files
2012-12-22 12:25:33 -08:00
Chris Forbes
e28be10dd4 Merge pull request #2525 from Mailaender/custom-tech
don't hardcode custom prerequisites anymore
2012-12-22 12:25:03 -08:00
Chris Forbes
90361cb631 Merge pull request #2524 from hunnybunny95/patch-1
Fixed airfield name.
2012-12-22 12:24:42 -08:00
Matthias Mailänder
c3b959846c customisable Ready/Hold text for CnC mod
make those strings also translatable
2012-12-22 19:21:05 +01:00
Matthias Mailänder
39884e16fa customisable text printed on RA support power icons 2012-12-22 18:59:45 +01:00
Matthias Mailänder
f107f8a87b expose strings from build palette widget to chrome yaml
prepare for localisation efforts
2012-12-22 18:25:18 +01:00
Matthias Mailänder
8246b2f35f don't hardcode custom prerequisites anymore
to make those strings translatable
2012-12-22 17:42:57 +01:00
hunnybunny95
f13d12acec Fixed airfield name.
The name of the airfield was airstrip... which is wrong since the icon says airfield whilte the building is called airstrip... its even called AFLD in the code so... just a simple fix :)
2012-12-21 21:57:19 +01:00
Kenny
4090be72d4 Adding Shroud trait to CNC / D2K mods 2012-12-16 20:00:17 -08:00
Chris Forbes
90d30005f6 Merge pull request #2498 from Mailaender/volkov
make Volkov a true Cyborg
2012-12-16 18:16:39 -08:00
Chris Forbes
7c968a8f88 Merge pull request #2509 from Lookingglass/lg-maps
Three new 5-player RA maps
2012-12-16 12:35:04 -08:00
Kenny
e4ab86e6f9 Three new 5-player RA maps:
- The White Pentagon - snow based land/water map with minimal obstructions.
- Black Gold - Resource starved map with each starting position receiving 8 oil derricks.
- Texas Sea - Similar to Black Gold, but every starting position is on a tiny island.
2012-12-13 15:39:14 -08:00
Kenny
f41fb32d60 Introducing per-player shrouds.
- Each player has their own shroud and their visibility does not extend outside of the shroud. 
- Units and buildings can no longer target other units outside of their visibility. Buildings can still be targetted if they have been explored.
- GPS will provide visibility in the fog-of-war.
- Spies that infiltrate radar domes will gain their victim's exploration and reset it on all clients (if the victim does not have GPS)
2012-12-13 15:16:56 -08:00
Matthias Mailänder
5249a17d48 d2k: add Tuck's Sietch remake
by DraLUSAD from
http://www.sleipnirstuff.com/forum/viewtopic.php?f=83&t=16009
2012-12-12 09:46:26 +13:00
Matthias Mailänder
99256bcad0 cnc: fix wrong civilian field remapping at least in-game
the editor hack is RA specific
2012-12-12 09:43:45 +13:00
Matthias Mailänder
f402c37b14 Don't remap civilian buildings/fields in-game.
V16 field was mostly affected because it consists mostly of remapped colors.
2012-12-12 09:43:45 +13:00
Matthias Mailänder
494ab2db4d add @Generalcamo to AUTHORS
original Volkov contribution came from
http://content.open-ra.org/index.php?p=detail&table=units&id=132
2012-12-10 23:12:49 +01:00
Matthias Mailänder
5d4160bc82 make Volkov a true Cyborg
- Added new Armor value: Cybernetic
- Use sounds/graphics from DE censored version
- Heals near repair pad (instead of hospital)
- Medic can't heal him
- Dogs can't eat him
- Tanks need to attempts to crush him
- +25% HP (now same factor as 4tnk:1tnk compared to e1)
2012-12-10 16:42:43 +01:00
Chris Forbes
b9194e4305 d2k: fix crash on attackmove medic 2012-12-04 11:39:37 +13:00
Chris Forbes
8ab1fbe83a Merge pull request #2482 from reaperrr/patch-1
Update mods/cnc/music.yaml
2012-12-03 13:11:11 -08:00
Matthias Mailänder
96a088f998 merge Dune 2000 "Rounded Edges" mod
Changes include:
 - bibs have been removed
 - building offset and selection boxes adapted
 - units and turrets leave husks
 - siege tank barrel won't rotate anymore
 - AI capable of building all units using all queues
 - bullet traces
 - windtrap animations
 - unit balance (mix of Dune II, Dune 2000 and Red Alert)
 - repair pad animation
 - no more obsessive "silos needed"
 - defense building queue → heavy armor queue
 - medics (using thumper graphics)
 - no buildable aircrafts anymore
 - harvesting has been slowed down
2012-12-04 10:08:14 +13:00
Matthias Mailänder
7d4399d7cc fixes #2481
Don't save in system pathes because UNIX needs root and shipped maps
should not be changed. Use $HOME/maps/$MOD instead.
2012-12-04 10:06:42 +13:00
Matthias Mailänder
107c37f33d RA: Snow craters fix by MrFlibble
Small graphical patch fixing some snow craters and scorch marks
2012-12-04 10:05:31 +13:00
Matthias Mailänder
88949024e6 RA: add shadow to supply truck
copied from the demolition truck
2012-12-04 10:04:12 +13:00
Matthias Mailänder
aad0b3d2d8 fixed wrong palette remapping for neutral buildings in editor
for TEMPERAT (fields) and DESERT (buildings, trees, rocks)
2012-11-26 12:21:50 +01:00
Matthias Mailänder
4e0e53c714 Merge pull request #8 from cjshmyr/desert
RA Desert patches by Curtis
2012-11-26 01:04:53 -08:00
Curtis Shmyr
87a2817234 RA Desert - Use ExcludeTileset instead of RequiresTileset for specific tileset actors (looks cleaner) 2012-11-25 18:16:08 -07:00
Curtis Shmyr
f3e796e972 RA Desert - Removed fenc.des which was another barbed wire shp 2012-11-25 17:33:29 -07:00
Curtis Shmyr
7d5a843684 RA Desert - Added a missing shrub. Added building yaml definitions. Hide Temperate and Snow actors from Desert tileset editor. 2012-11-25 17:30:19 -07:00
Matthias Mailänder
f914929eb7 Merge pull request #7 from cjshmyr/desert
Add patches by Curtis:
- fixes desert shorelines
- found missing wc13.des
- remove ice redundancy in sequences.yaml
2012-11-25 09:09:24 -08:00
Curtis Shmyr
8f7b776556 Desert tileset - use proper wc13.des tile 2012-11-21 20:51:33 -07:00
reaperrr
aeaa58a01b Update mods/cnc/music.yaml
'I Am' was the name of the band that made this song (with Mr. Klepacki on drums), the track is actually called Destructible Times. Also brought titles of Warfare/Full Stop as well as Heavy Gear/Demolition in line with other double-named tracks.
2012-11-22 00:21:41 +01:00
Curtis Shmyr
4dacd3be26 Fix up shoreline pieces to have beach terrain types (for water transport use) 2012-11-20 21:21:31 -07:00
Curtis Shmyr
05929bdfe9 Remove extra sequence entries for ice01 ice02 ice03 ice04 ice05 2012-11-20 21:14:52 -07:00
Matthias Mailänder
0690041347 fix most of the palette issues with RA desert in OpenRA.Editor
TODO: use the palette as defined in YAML;
defaults are wrong for DESERT rocks, trees, walls and ore mine
2012-11-19 14:53:25 +01:00
Matthias Mailänder
842fd8b4e5 update VS project file 2012-11-17 13:16:34 +01:00
Matthias Mailänder
7a89e3d67a added DESERT rocks 2012-11-17 13:16:26 +01:00
Matthias Mailänder
5ecc6224b0 add bridges to DESERT 2012-11-17 13:15:16 +01:00
Matthias Mailänder
f5c592291c add Harisson to AUTHORS 2012-11-17 13:15:16 +01:00
Matthias Mailänder
7f229a3fde add ice sequences, fixes related crash 2012-11-17 13:15:16 +01:00
Matthias Mailänder
c859fb1186 fix the remaining issues with the ra desert terrain
- extract mix file as it is easier to work with SHPs
- light palette rotator now excludes terrain palette
- water palette rotator now excludes player palette
- use wire fence, sand bags and brick wall from cnc
- draw ressources with player palette (workaround)
- delete all test maps
2012-11-17 13:15:16 +01:00
Matthias Mailänder
6dceb30632 add 2 testmaps for desert tileset 2012-11-17 13:15:16 +01:00
Matthias Mailänder
f3dc31be40 add PlayerPaletteFromCurrentTileset and desert tileset for RA
some things left to do:
ore, walls and silo/hbox need some work
2012-11-17 13:15:06 +01:00
Matthias Mailänder
a2f5ffd59e made WaterPaletteRotation more configurable
Base is now configurable per terrain
ExcludePalettes is now exposed to yaml
2012-11-17 13:13:32 +01:00
hunnybunny95
a2c66a32b0 Fixed hotkeys for aircraft 2012-11-16 04:47:50 +01:00
hunnybunny95
72139675ac Fixed hotkeys for vehicles 2012-11-16 04:46:00 +01:00
hunnybunny95
2b57f04dc0 Fixed hotkeys for ships 2012-11-16 04:45:15 +01:00
hunnybunny95
15e09fa83b Fixed hotkeys for infantry 2012-11-16 04:44:34 +01:00
Sunny Sproket
55ee1d41f3 Added "room-convergence" map 2012-11-13 09:38:26 +13:00
Matthias Mailänder
2e7908366a fixes #2465
gpsdot.shp shadow uses index 3
2012-11-13 09:26:59 +13:00
Chris Forbes
6ab4fda9a6 Balanced "Bombardment Islands" map (from czech army) 2012-11-13 09:26:59 +13:00
Curtis Shmyr
a5ba41cae8 Make ctnks missiles explode a bit sooner (still reaching their target) 2012-11-10 19:53:10 -07:00
Curtis Shmyr
5e9cdad044 No more sound attentuation for PlayNotification - fixes #2466 2012-11-10 19:52:21 -07:00
Curtis Shmyr
c14de26c07 Actually fixed RA map bomber-john 2012-11-04 10:27:45 -07:00
Curtis Shmyr
e5f506c81d update CHANGELOG 2012-11-03 23:06:27 -06:00
Curtis Shmyr
4160f08c6c Fix bomber-john RA map crash #2439 2012-11-03 22:53:11 -06:00
Curtis Shmyr
4ad0d1682e Improve ctnk health and damage vs heavy armor, reduce damage vs inf 2012-11-04 17:47:03 +13:00
NukemBro
8fb4fc9a14 Re-add RA map Chaos Canyon now with proper cordon - fixes #2432 2012-11-04 17:47:03 +13:00
Curtis Shmyr
5a0187e1db Temporarily drop RA map chaos canyon 2012-11-04 17:47:03 +13:00
Curtis Shmyr
7f5141c338 #2447 - Disguised spies are now hidden under GPS 2012-11-04 17:47:03 +13:00
Iran
354cabf8d1 -- add ice tile entries to sequences.yaml
fixes crashes on maps using these ice tiles.
2012-11-04 17:47:03 +13:00
Scott_NZ
fd734c8553 Improve the Soviet attacks more 2012-11-04 16:20:46 +13:00
Scott_NZ
9238de6a47 Add airbase and airbase secondary objective. Improve Soviet attacks. Enable players to capture sam sites as well as destroy them to complete the objective in Allies 02 2012-11-03 21:41:46 +13:00
Scott_NZ
b2c5f488a7 Rename Evacuees player to Allies. Make AA gun buildable. 2012-11-03 13:33:38 +13:00
Scott_NZ
c634867cdd Reduce threshold, unused variables 2012-11-03 13:33:38 +13:00
Scott_NZ
d7f2273788 Increase duration between spawn for SP 2012-11-03 13:33:38 +13:00
Scott_NZ
5c1a982fdd Remove evacuee buildings to stop the players building on the other side of the map 2012-11-03 13:33:38 +13:00
Scott_NZ
0300a67da8 The Allies 02 Soviet reinforcements at 16 minutes are a bit too insane 2012-11-03 13:33:37 +13:00
Scott_NZ
862dfb3275 Improvements to map layout 2012-11-03 13:33:37 +13:00
Scott_NZ
03121ed826 Add yak strafing, support for SP as well as MP, additional Soviet spawn point 2012-11-03 13:33:37 +13:00
Scott_NZ
0cdff00cb6 First version of Allies 03 2012-11-03 13:33:36 +13:00
Scott_NZ
787facec65 Allies02: Make Allied infantry buildable by the Allies1 player when they capture the Soviet barracks. Remove ctnk from the build menu 2012-11-03 13:33:36 +13:00
Scott_NZ
44d63b9103 Barrels were not scorching the terrain 2012-11-03 13:33:36 +13:00
Scott_NZ
49571fc78a Increase deaths threshold to 200 2012-11-03 13:33:35 +13:00
Scott_NZ
60569bc97c Fix open areas for allies maps 2012-11-03 13:33:35 +13:00
Chris Forbes
b37510c30e nerf dtrk speed from 8 to 6 2012-10-23 19:26:51 +13:00
Kenny
343b7bf3e1 Increasing cost to $2500 as well as reducing armor to 50 hit points. 2012-10-22 14:42:36 +13:00
Curtis Shmyr
7a2423a742 Fix #2449 - ctnk line of sight improved 2012-10-21 16:50:01 -06:00
Curtis Shmyr
57dfc739c6 Fix #2433 - crash when ctnk order generator was active if ctnk dies 2012-10-21 16:46:58 -06:00
Curtis Shmyr
f3d4b6541c Fixed ctnk desync #2448 2012-10-21 15:43:30 -06:00
Curtis Shmyr
d1c20d6c72 Fix #2434 and #2442 2012-10-21 14:55:25 -06:00
Curtis Shmyr
e4beb8236e Update CHANGELOG 2012-10-20 12:28:45 -06:00
Chris Forbes
7574124ff0 added forest-path map for tournament 2012-10-19 11:56:39 +13:00
Scott_NZ
e1cb4d60c4 Fix crash when spectators are present 2012-10-15 16:28:38 +13:00
Igor Popov
1d62329969 fix #2425; Bots should be removed when switching to a map which doesn't allow them 2012-10-15 08:17:04 +13:00
Curtis Shmyr
36813ff52f Fix chronotank's missiles from exploding too soon 2012-10-13 17:31:12 -06:00
Curtis Shmyr
267141749d Chronotank charge pips down from 5->2, pips are blue and jump radius is blue 2012-10-13 16:50:11 -06:00
Curtis Shmyr
edd41c5be1 Chronotank jump cooldown lowered from 60 seconds to 30 2012-10-13 16:50:10 -06:00
Curtis Shmyr
5dc0439173 Fix flak truck description 2012-10-13 16:50:10 -06:00
Curtis Shmyr
4dbee1c0e3 Lower cost of TTNK (1500->1350) and update description to reflect current balance 2012-10-13 16:50:09 -06:00
Curtis Shmyr
76baba89c1 Retune chronotank's weapons to match its description 2012-10-13 16:50:08 -06:00
Curtis Shmyr
5da96941e1 Fix demo truck description 2012-10-13 16:50:07 -06:00
Curtis Shmyr
c2ec8cd372 Fix Volkov's description 2012-10-13 16:50:06 -06:00
Chris Forbes
b73a0a9720 fix off-by-one in new tile query 2012-10-14 10:07:08 +13:00
Chris Forbes
6f3b21616f fix warnings in allies scripts 2012-10-13 14:31:45 +13:00
Chris Forbes
1792f16929 Merge remote-tracking branch 'scott/allies' 2012-10-13 13:52:21 +13:00
Chris Forbes
8dfd02e69e fix HackyAI's husk fetish 2012-10-13 13:45:35 +13:00
Chris Forbes
c8b1c1b999 tidy slightly in idle harv handler 2012-10-13 13:42:34 +13:00
Curtis Shmyr
da9422824a Trans heli now costs 900, increased health, increased cargo count to 8 2012-10-13 13:30:36 +13:00
Chris Forbes
403b51ca4b remove duplication in Mobile 2012-10-13 12:55:51 +13:00
Chris Forbes
3fad0983b9 simplify Mobile using new ordering from FindTilesInCircle 2012-10-13 12:55:51 +13:00
Chris Forbes
bbab5237d1 get rid of crazy wasted work in HackyAI 2012-10-13 12:55:51 +13:00
Chris Forbes
699838332d Order results from FindTilesInCircle by distance 2012-10-13 12:55:51 +13:00
Chris Forbes
6e237b53e1 remove unused trait lookup in ChronoshiftDeploy.ResolveOrder 2012-10-13 11:43:06 +13:00
Curtis Shmyr
36990601db Remove extra newline on Volkov's description 2012-10-13 11:38:00 +13:00
Curtis Shmyr
82f9549f01 Improve mammoth tank tusk turn rate (5->10) 2012-10-13 11:37:55 +13:00
Curtis Shmyr
656503c0c5 Increase range of Tanya's colt45 from 5.75 to 7 2012-10-13 11:37:52 +13:00
Curtis Shmyr
83fc70f415 Added Chrono Tank to Allies 2012-10-13 11:37:46 +13:00
Scott_NZ
bd8ba636c9 Shift v2s to 4 minutes; improve the additional units code 2012-10-12 20:59:35 +13:00
Scott_NZ
6eb2f2bffe Don't hard code 100 into the objectives string 2012-10-12 16:06:43 +13:00
Scott_NZ
d9a6cc6b1c Should be greater than or equal to when comparing with death threshold 2012-10-11 22:57:19 +13:00
Scott_NZ
8c3aabb215 Support for updating objectives without flashing the objectives button. Added a secondary objective: lose fewer than 100 units. 2012-10-11 22:55:02 +13:00
Scott_NZ
d44d9f67f2 Promote the 'MainPresence' objective to primary. 2012-10-11 22:36:40 +13:00
Scott_NZ
8f8800803b Make the Soviet V2s buildable immediately. Fix the Soviet reinforcements not arriving properly. Remove the Soviet reinforcements timer. Rework the bottom left of the map. 2012-10-11 22:35:13 +13:00
Scott_NZ
52007b6277 Move the timer positions 2012-10-09 20:56:11 +13:00
Scott_NZ
795008011e Explosive barrel explosions now cascade with a small delay between each explosion. 2012-10-09 01:51:25 +13:00
Scott_NZ
ec6b8646e9 Improve barrel explosions in Allies 01 by increasing the explosion damage and the health of the power plants/oil derrick. 2012-10-09 00:25:49 +13:00
Scott_NZ
40206f8280 Improved control over the 'final' Soviet wave 2012-10-08 23:34:38 +13:00
Scott_NZ
887a9e7c9c Make medic/spy available to the Allies1 player 2012-10-08 23:34:02 +13:00
Scott_NZ
e4218ede41 Improve the Soviet base, and rebalance the power. 2012-10-08 21:16:30 +13:00
Scott_NZ
f4d0f80cd3 Increase the difficulty of the final wave and shift some of the Soviet power plants around 2012-10-08 20:51:03 +13:00
Scott_NZ
8661fb6b8d Add final attack for Soviets 2012-10-08 19:39:18 +13:00
Scott_NZ
c212095a40 Improve the stability of CountdownTimer 2012-10-08 17:16:42 +13:00
Chris Forbes
f337c7fb40 fix 2422; tesla ignoring weapon offset 2012-10-07 19:23:50 +13:00
Scott_NZ
073a8ee079 Sync up the countdown timer and the objectives button flash with the game speed 2012-10-05 22:03:35 +13:00
Scott_NZ
a4b01cf114 Improved the Allies 02 map layout 2012-10-05 22:02:51 +13:00
Scott_NZ
cba069a039 Improve the effectiveness of the parabombs 2012-10-05 16:23:58 +13:00
Scott_NZ
bf4829205c Have the parabomber come from a different direction. Have the Soviet tanks go straight for the enemy base structures. 2012-10-04 23:59:33 +13:00
Scott_NZ
328dce26ba Add some dogs around the Soviet base to make it harder to use spies 2012-10-04 22:57:34 +13:00
Scott_NZ
0524708e05 Add Yak harrassment 2012-10-02 21:52:45 +13:00
Scott_NZ
7e376330d0 Have the reinforcements money come in as supply trucks instead 2012-10-02 21:52:45 +13:00
Scott_NZ
762db8b304 Have the countdown timer flash in the last 10 seconds, and increase the money amount when reinforcements arrive 2012-10-02 21:52:44 +13:00
Scott_NZ
37479b3cfd Tank wave at 11 minutes, just before the reinforcements arrive 2012-10-02 21:52:44 +13:00
Scott_NZ
07c2330245 Add 2 additional paradrop badgers to the paradrop attack, and a parabomb attack 2012-10-02 21:52:44 +13:00
Scott_NZ
0c6daf191c Add button highlighting/glow effect, to be used for the objective button when the objectives update 2012-10-02 21:52:43 +13:00
Scott_NZ
b897579a20 Send the waves instantly 2012-10-02 21:52:43 +13:00
Scott_NZ
fcc0bcf438 Improve the Soviet attack routines for Allies 01 2012-10-02 21:52:43 +13:00
Scott_NZ
0cd258f24f Dynamically position the timer so that it isn't cut off 2012-10-02 21:52:43 +13:00
Scott_NZ
43e99bf9f5 Add heal animation for the heal crate 2012-10-02 21:52:42 +13:00
Scott_NZ
83d10ba838 Add mission objectives logic/backend 2012-10-02 21:52:42 +13:00
Scott_NZ
48997725c3 Don't let tran reveal shroud 2012-10-02 21:52:42 +13:00
Scott_NZ
631f899f18 Begin work on objectives UI 2012-10-02 21:52:42 +13:00
Scott_NZ
2a4a9d778f Redo some of the fencing near the Soviet base 2012-10-02 21:52:41 +13:00
Scott_NZ
2e2b4d04db Small map/behaviour adjustments 2012-10-02 21:52:41 +13:00
Scott_NZ
deede92fbc Update objective code for Einstein helicopter, avoid race condition with checking if allies2 has been killed 2012-10-02 21:52:41 +13:00
Scott_NZ
e3b2e84792 Focus on the town more; create additional crash site there and and move Einstein there for players to save. 2012-10-02 21:52:41 +13:00
Scott_NZ
e07d55f5f4 Open up the rear of the Soviet base for infiltration by the allies1 player. 2012-10-02 21:52:40 +13:00
Scott_NZ
1803b412c3 Convert Allies 02 over to enum objectives 2012-10-02 21:52:40 +13:00
Scott_NZ
8dd7bfdb67 Move the objective flag stuff to MissionUtils 2012-10-02 21:52:40 +13:00
Scott_NZ
d1400ab4fa Set the enum values explicitly 2012-10-02 21:52:40 +13:00
Scott_NZ
67c40f3119 Use enum-based objectives for Allies 01 2012-10-02 21:52:39 +13:00
Scott_NZ
68d0201538 Add more utils to MissionUtils. Extract Allies 02 countdown timer to its own class file 2012-10-02 21:52:39 +13:00
Scott_NZ
d30d3ed05a Create MissionUtils.cs for shared mission code 2012-10-02 21:52:39 +13:00
Scott_NZ
43f2895eb8 Put reinf ticks back to 12 minutes 2012-10-02 21:52:39 +13:00
Scott_NZ
185e3cffb4 Repackage maps 2012-10-02 21:52:38 +13:00
Scott_NZ
d68196a3b0 Fixed some constant naming 2012-10-02 21:52:38 +13:00
Scott_NZ
4551302c09 Reduce Tanya's and Einstein's weights to 0 so they can still board chinook helicopters if they are full 2012-10-02 21:52:38 +13:00
Scott_NZ
56f36e45db New crate type 'HealUnitsCrateAction' which heals all of the units that the collecting player has. Very rare. New 'ContainsCrate' trait which goes along with this - could be used to hide crates inside churches for example like in the original RA missions. 2012-10-02 21:52:38 +13:00
Scott_NZ
8fabf1504a Add a nearEnough field for RallyPoints (to be used as an argument for their AttackMove activities) so the Soviets don't get stuck on their rally point, and scatter the units a bit before they attack 2012-10-02 21:52:37 +13:00
Scott_NZ
fd96d08ce8 Smoke effect for the chinook husk 2012-10-02 21:52:37 +13:00
Scott_NZ
0e801f9d3a Rework bottom right of Allies 2 map: add more space, more Soviet soldiers, put the captive Engineer outside. Move the southern Soviet outpost up to where the second SAM site is. Move the Soviet rally point up a bit. 2012-10-02 21:52:37 +13:00
Scott_NZ
e5ab56e843 Rework bottom right of the Allies 02 map, move captive Engineer outside. Set Tanya's stance to ReturnFire so attack-move works. 2012-10-02 21:52:37 +13:00
Scott_NZ
ff0ad9cb41 Set fcom tooltip to Forward Command 2012-10-02 21:52:36 +13:00
Chris Forbes
3e81a4bd70 remove PowerBarWidget entirely 2012-09-25 19:51:03 +12:00
Chris Forbes
84f7aa56e1 make ResourceBarWidget generic 2012-09-25 19:44:20 +12:00
Chris Forbes
c42f270ce0 move all databinding for the silobar into ui logic 2012-09-25 19:39:33 +12:00
Chris Forbes
af31ae4931 tidy up SiloBarWidget to be almost completely independent of ore 2012-09-25 19:27:33 +12:00
Chris Forbes
8b6308d3a2 reduce differences between PowerBarWidget and SiloBarWidget 2012-09-25 18:56:24 +12:00
Chris Forbes
6ecc4c18dc fixed 2036 -- add targetlines for defenses 2012-09-25 18:42:36 +12:00
Chris Forbes
56557b8766 convert dtrk to use MiniNuke 2012-09-24 21:07:16 +12:00
Chris Forbes
83ba80f4c9 add MiniNuke weapon for dtrk 2012-09-24 21:06:49 +12:00
Chris Forbes
65227c3c09 remove nuke crate 2012-09-24 21:03:33 +12:00
Chris Forbes
1b5474f377 retune nuke 2012-09-24 21:02:22 +12:00
Chris Forbes
38b5e2f7ca set up demo truck to explode on chronoshift 2012-09-24 20:36:03 +12:00
Chris Forbes
0ff3c56d4f add Chronoshiftable:ExplodeInstead option 2012-09-24 20:34:54 +12:00
Chris Forbes
4888732fb7 fix reversed ordernames in DemoTruck 2012-09-24 20:24:35 +12:00
Chris Forbes
3079e2b488 fixed Explodes dep on demotruck 2012-09-24 20:22:36 +12:00
Curtis Shmyr
34d96878b8 Added demo truck to soviet's arensal; still problems to fix 2012-09-24 20:08:56 +12:00
Chris Forbes
61e548151b clear queue-per-building production queue on mcv repack 2012-09-23 18:00:06 +12:00
Chris Forbes
7cc7dcc559 add INotifyTransform hook for just before something transforms 2012-09-23 17:58:53 +12:00
Chris Forbes
757c9ca63c Fixed 2387 - dont shade possible build items in cnc just because something else is building 2012-09-23 17:45:13 +12:00
Chris Forbes
5cb86f8937 repair cost for units is always at least 1 per tick 2012-09-23 17:38:23 +12:00
Chris Forbes
cd1a29f1ea repair cost is always at least 1 per tick 2012-09-23 17:37:35 +12:00
Igor Popov
79b4765d9f fix: port in Direct Connect was dumped to default by force 2012-09-23 17:27:19 +12:00
Igor Popov
05e9dcd5ce dedicated: load another initial map if current key is not present in dictionary 2012-09-23 17:20:47 +12:00
Igor Popov
4c915ce8fe dedicated: configurable MOTD 2012-09-23 17:20:47 +12:00
Igor Popov
5d5fe3f5a1 dedicated: proper reason why DEV_VERSION is kicked. 2012-09-23 17:20:46 +12:00
Igor Popov
5bacf69445 dedicated: cleaner 2012-09-23 17:20:46 +12:00
Igor Popov
0a858ac353 cleaner 2012-09-23 17:20:46 +12:00
Igor Popov
b7258e61f3 remove bogus comment 2012-09-23 17:20:46 +12:00
Igor Popov
bd45ffa022 dedicated: start a new server instance once previous game is finished (configurable) 2012-09-23 17:20:46 +12:00
Igor Popov
b45f9568d0 dedicated: force tell master server if amount of clients is 0 2012-09-23 17:20:46 +12:00
Igor Popov
f8290b8a7e dedicated: handle admin 2012-09-23 17:20:46 +12:00
Igor Popov
21b002ce22 dedicated: drop DEV_VERSION 2012-09-23 17:20:45 +12:00
Igor Popov
1fbd8f6cc6 dedicated: null SoundEngine 2012-09-23 17:20:45 +12:00
Igor Popov
2798f0d841 dedicated: handle non-existing map 2012-09-23 17:20:45 +12:00
Igor Popov
bf73cdbd01 basic dedicated server support 2012-09-23 17:20:45 +12:00
Chris Forbes
03229eca0c remove sounds from sniper cloak/uncloak; enable uncloak-on-move for sniper. 2012-09-23 17:17:07 +12:00
Chris Forbes
489fdc1893 add CloakInfo.UncloakOnMove option 2012-09-23 17:15:16 +12:00
Chris Forbes
e2b2082660 fix armor types on war factory and airfield 2012-09-20 10:14:44 +12:00
Chris Forbes
5ab2e2b225 adjust building prices 2012-09-20 10:13:14 +12:00
Chris Forbes
caa58e46c3 buff 4tank self-heal; nerf turret rotation 2012-09-19 17:35:06 +12:00
Chris Forbes
e9f4338852 remove vestigial mods/*/packages handling from installer 2012-09-16 14:13:24 +12:00
Scott_NZ
f146cedad5 Improve the thresholds a bit 2012-09-16 12:27:33 +12:00
Scott_NZ
cc449f81f8 Describe the map size in words 2012-09-16 12:27:33 +12:00
Chris Forbes
085e29d22b dead things are no longer valid targets 2012-09-16 11:24:36 +12:00
Chris Forbes
f8427fa242 refuse to start the game unless required slots are full. 2012-09-16 11:05:00 +12:00
Chris Forbes
eb9b6a3842 propagate Required flag to Slot 2012-09-16 10:58:48 +12:00
Chris Forbes
43fc1219f0 add Required field to PlayerReference 2012-09-16 10:51:49 +12:00
Igor Popov
1469620831 new interior map by sunny_s: room-warzone 2012-09-16 10:43:40 +12:00
Chris Forbes
036997a7a0 update authors file 2012-09-16 10:17:51 +12:00
Kyrre Soerensen
b4d9c40dc8 maps: Replace Baywatch with Hasselhoff (better ore distribution)
Signed-off-by: Kyrre Soerensen <kyrre@ksorensen.net>
2012-09-16 10:14:32 +12:00
Chris Forbes
62257459fd fix NRE in ReturnToBase bailout if no suitable building is found 2012-09-14 23:20:39 +12:00
Chris Forbes
ea641f081f use ChooseAirfield in ReturnToBase.Tick bailout 2012-09-14 23:20:18 +12:00
Chris Forbes
a641c7a87d add parameter to ReturnToBase.ChooseAirfield for whether the building must be unreserved 2012-09-14 23:14:02 +12:00
Chris Forbes
605a1eacf6 fix Gl renderer; texture binding was totally busted 2012-09-13 08:14:21 +12:00
Chris Forbes
da3adf4f8e fix bogus extra death sounds in ra VolkovVoice 2012-09-13 07:35:25 +12:00
Chris Forbes
8680405b68 show no-deploy cursor if locked 2012-09-13 07:27:15 +12:00
Chris Forbes
5ad2d1892f take lock in DeployTransform if we're a building 2012-09-13 07:25:39 +12:00
Chris Forbes
b723e350c8 remove spurious interlock in Sell 2012-09-13 07:16:04 +12:00
Chris Forbes
0b665bc35b move counter-capture logic down into Capturable; remove spurious interlock on CaptureInProgress 2012-09-13 07:14:56 +12:00
Chris Forbes
c012ea90dd get rid of capturing lock in Sellable 2012-09-13 07:10:28 +12:00
Chris Forbes
b0b0fac847 get rid of Sellable.Selling state 2012-09-13 07:09:44 +12:00
Chris Forbes
c253e59c57 take lock while capture in progress 2012-09-13 07:08:02 +12:00
Chris Forbes
952e277d35 take lock in Sellable.ResolveOrder 2012-09-13 07:05:58 +12:00
Chris Forbes
f984934270 add Building.Locked, and Lock()/Unlock() conveniences 2012-09-13 07:05:58 +12:00
Chris Forbes
fb58840cea ignore spectators for readiness check 2012-09-04 11:24:59 +12:00
Chris Forbes
3d8dc80f03 complain about junk values like the recent volkov breakage 2012-09-04 10:55:26 +12:00
Chris Forbes
d970195394 fix bogus armor definition for Volkov 2012-09-03 09:26:27 +12:00
Scott_NZ
c33c9e9f69 Fixes #2386 (Add map size to map list) 2012-08-28 16:18:15 +12:00
Chris Forbes
6d3a932453 Revert "Removed the "tip" jutting out of 3 buildings, so they are rectangular instead of awkwardly shaped."
This reverts commit 22bddf9645.
2012-08-25 15:32:29 +12:00
Scott_NZ
622650785c Set Allied units to defensive stance in Allies 01 2012-08-25 15:20:59 +12:00
Scott_NZ
362dc8128e Don't crash and burn if vqa files aren't found 2012-08-25 15:20:58 +12:00
Scott_NZ
f8e73afbee Improve the music-playing code - crash prevention and some polish 2012-08-25 15:20:58 +12:00
Scott_NZ
dbbe026b88 Actually fix the desync issues 2012-08-25 15:20:58 +12:00
Scott_NZ
4b36a9bf7f Fix desync issues 2012-08-25 15:20:58 +12:00
Matthias Mailänder
70a5333b40 fixes #2363
typo leading to a crash when clicking a disabled tab
2012-08-22 12:40:38 +12:00
Igor Popov
e8359b08c6 change IsAdmin indicator to d2k like 2012-08-22 12:38:10 +12:00
Scott_NZ
cebc0b66a5 Make the Viewport code easier to follow 2012-08-20 20:45:56 +12:00
Scott_NZ
6ac86cbc1a Fix UnitsNearActor basing itself off the Soviet WP, instead of the actual actor. Move the power code to the unit building method so the Soviets don't build units completely, even if they have enough money. 2012-08-20 20:45:54 +12:00
Curtis Shmyr
60ceb800e1 Remove contrails from pbox vulcan - was not working as intended 2012-08-20 15:06:36 +12:00
Igor Popov
5f47b7b7fc add 3v3 d2k map by Combine; add 2 ra maps by Holloweye (conquest + minigame) 2012-08-20 13:54:11 +12:00
Scott_NZ
7e2866714c Overhaul Soviet base 2012-08-20 03:32:09 +12:00
Scott_NZ
7e8313b808 Add music to Allies 02 2012-08-19 17:19:45 +12:00
Scott_NZ
bfd28abb70 FMV videos for Allies 01, also adjust music to play a random track 2012-08-19 17:00:03 +12:00
Scott_NZ
1afc0cbfce Remove fast unit production for Soviets, this is too overwhelming 2012-08-19 13:05:05 +12:00
Scott_NZ
82bcd19d2e Fix crash when Media.PlayFMVFullscreen is called 2012-08-19 12:56:12 +12:00
Scott_NZ
49049a715b Give allies base more reinforcements after 12 mins 2012-08-19 12:55:38 +12:00
Scott_NZ
3114a5b85e Add Soviet apc/flamer rush after 7 minutes 2012-08-18 17:26:18 +12:00
Scott_NZ
222f17a586 Minor refactor 2012-08-18 01:45:05 +12:00
Scott_NZ
91027e9961 Use FirstOrDefault when getting closest building 2012-08-18 00:01:35 +12:00
Scott_NZ
a06a7a8ccb Replace arty with fix/2tnk 2012-08-18 00:00:44 +12:00
Scott_NZ
a8bae22dd3 Give arty back so the allies stand a chance 2012-08-17 23:27:19 +12:00
Scott_NZ
daa89f52b6 Add lethal Soviet attacks and increase heavy tank production 2012-08-17 23:13:35 +12:00
Scott_NZ
22c1059904 Rework water area near the town 2012-08-17 20:28:05 +12:00
Scott_NZ
c0138966e7 Rework Allied base a bit 2012-08-17 20:02:39 +12:00
Scott_NZ
0f14263b82 Make walls not contribute to allied building check 2012-08-17 17:48:47 +12:00
Scott_NZ
dfc6304efa Increase the difficulty 2012-08-17 17:31:18 +12:00
Scott_NZ
632d717af8 Fix HeliLand constructor 2012-08-16 22:04:10 +12:00
Scott_NZ
a74a3aa3b5 Disable bots 2012-08-16 21:47:22 +12:00
Scott_NZ
c90c351692 Spaces in csproj 2012-08-16 21:47:21 +12:00
Scott_NZ
5612a57842 and some more 2012-08-16 21:47:20 +12:00
Scott_NZ
6e3c8c9745 Fix some old VS-induced nastiess 2012-08-16 21:47:19 +12:00
Scott_NZ
0920c67017 Require ra mod, pack allies 02 2012-08-16 21:47:18 +12:00
Scott_NZ
1ed0d80348 Fix static readonly field capitalisation conventions 2012-08-16 21:47:17 +12:00
Scott_NZ
c41fcb15b0 Fail Allies01/Allies02 if the extraction helicopter is destroyed 2012-08-16 21:47:16 +12:00
Scott_NZ
6c79b454bf Improve Allies base 2012-08-16 21:47:16 +12:00
Scott_NZ
610e40b8d6 Give Allies2 player some cash when they receive reinforcements 2012-08-16 21:47:15 +12:00
Scott_NZ
5038018aa5 Give the Soviets money as they need it. 2012-08-16 21:47:14 +12:00
Scott_NZ
cce12e781f Kill the allied players if they fail the mission. Also fail the mission if the Allies2 player loses all of their buildings. 2012-08-16 21:47:13 +12:00
Scott_NZ
245de3abcb Making HBOX unbuildable was crashing the game 2012-08-16 21:47:12 +12:00
Scott_NZ
11f9fa1942 Some code polish 2012-08-16 21:47:11 +12:00
Scott_NZ
85fa7eb8c4 Modify tech tree, disable bots 2012-08-16 21:47:10 +12:00
Scott_NZ
62d7168d41 Make the mission not unwinnable if Einstein can't cross the bridge because it is destroyed 2012-08-16 21:47:09 +12:00
Scott_NZ
2a053daa2e Add Soviet attacks, scrap chinook timer since we might have pathing issues if Tanya is on the island and we have off-map attacks. Counter this by bringing back reinforcements timer 2012-08-16 21:47:09 +12:00
Scott_NZ
21a903fe2d Remove an ai activation check, we want it to always activate even if the host is a spectator 2012-08-16 21:47:08 +12:00
Scott_NZ
83fc546fbe Reposition Soviet barracks/kennel 2012-08-16 21:47:07 +12:00
Scott_NZ
f648223c39 Improve the deploy routine so that baseCenter is still set even if the mcv is a fact 2012-08-16 21:47:06 +12:00
Scott_NZ
583c3f9a64 Produce dogs, adjust allied building positions 2012-08-16 21:47:05 +12:00
Scott_NZ
0d9c78670e Basic Soviet AI. This is flawed right now as it will just charge all of its starting units towards Tanya 2012-08-16 21:47:04 +12:00
Scott_NZ
32a37d8c0f Stop the hacky AI unpacking the fact into a mcv if it starts with a fact instead of a mcv 2012-08-16 21:47:03 +12:00
Scott_NZ
168ff6dc82 Remove "timer started" conflict 2012-08-16 21:47:03 +12:00
Scott_NZ
03f904155e Reinforcements voice with chopper extraction 2012-08-16 21:47:02 +12:00
Scott_NZ
f479f9a32d Have reinforcements come immediately.. 2012-08-16 21:47:01 +12:00
Scott_NZ
bdbb9d2a9f Add oil facility outside allies2 2012-08-16 21:47:00 +12:00
Scott_NZ
e3ae0ceae3 Add some more map detail 2012-08-16 21:46:59 +12:00
Scott_NZ
34ea82e267 Improved Soviet base layout further 2012-08-16 21:46:58 +12:00
Scott_NZ
fe7e016e33 Improved layout of Soviet base 2012-08-16 21:46:57 +12:00
Scott_NZ
f901355bef Make tran unselectable 2012-08-16 21:46:56 +12:00
Scott_NZ
60fb45c909 Move the sam site around to make a new outpost on the top left, add engineer rescue 2012-08-16 21:46:56 +12:00
Scott_NZ
9ccfb2c322 Make the mission actually winnable 2012-08-16 21:46:55 +12:00
Scott_NZ
0c9f39df78 Clean up allies01/allies02 code by storing world object 2012-08-16 21:46:54 +12:00
Scott_NZ
7fffb71ac4 Clean up timer code, add chinook extraction of Einstein 2012-08-16 21:46:53 +12:00
Scott_NZ
bf0cee9057 Redo outpost: move it into the town and put a miss in the old position. The player can rescue engineers from miss to capture the outpost. 2012-08-16 21:46:52 +12:00
Scott_NZ
55b17f70a8 Adjust to 6 mins 2012-08-16 21:46:51 +12:00
Scott_NZ
c9318cd2dd Chinook timer 2012-08-16 21:46:50 +12:00
Scott_NZ
ffd2588f50 Improved the soviet base 2012-08-16 21:46:49 +12:00
Scott_NZ
c3b9b37122 Bit of cleanup, add position parameter 2012-08-16 21:46:48 +12:00
Scott_NZ
a30d82b333 Convert timer actions to be properties 2012-08-16 21:46:47 +12:00
Scott_NZ
81e2c1d2d7 Implement basic reinforcements for allies2 2012-08-16 21:46:46 +12:00
Scott_NZ
5f2ffc0508 Clean up the timer widget code 2012-08-16 21:46:45 +12:00
Scott_NZ
00297b607b Add drawing widget for reinforcements 2012-08-16 21:46:45 +12:00
Scott_NZ
1c702048a1 Make allies 01 less loud 2012-08-16 21:46:44 +12:00
Scott_NZ
fdd356c2e7 Improve allied base, stop tanya autotargeting 2012-08-16 21:46:43 +12:00
Scott_NZ
1e64a63fa4 Have the starting camera viewport position be determined by the local player 2012-08-16 21:46:42 +12:00
Scott_NZ
05f079758a Begin building basic Allies 02 framework 2012-08-16 21:46:41 +12:00
Scott_NZ
b220bbeda2 Wire up SAM 4 2012-08-16 21:46:40 +12:00
Scott_NZ
0a358a8846 Soviet base: construction yard, sam site, silos 2012-08-16 21:46:39 +12:00
Scott_NZ
ed43c1b482 Modified the bridge to stop crossing with sea units, and opened up the mountain for an alternative route to the Soviet outpost 2012-08-16 21:46:39 +12:00
Scott_NZ
c505954b07 bleh, tabify 2012-08-16 21:46:38 +12:00
Scott_NZ
d5279d123f Start work on Allies 02 script, reveal sam site locations 2012-08-16 21:46:37 +12:00
Scott_NZ
9be501fc3d Improve the objective text in Allies 01 - Einstein/Tanya can't be killed 2012-08-16 21:46:36 +12:00
Scott_NZ
1721d7e025 Add Kennel to allies 02 2012-08-16 21:46:35 +12:00
Scott_NZ
881484d06a Some allies 02 map work - add sub pen and rework the Soviet base a bit 2012-08-16 21:46:34 +12:00
Scott_NZ
537cfb8fd3 Add Kennel to Allies 01 2012-08-16 21:46:33 +12:00
Scott_NZ
41f1ea36fe Add Kennel structure 2012-08-16 21:46:32 +12:00
Scott_NZ
486d340028 Bridges 2012-08-16 21:46:32 +12:00
Scott_NZ
e2bbd22144 Add allies-02 map yaml/bin 2012-08-16 21:46:31 +12:00
Scott_NZ
43d0363a55 Formatting improvements from Husk/Allies01 2012-08-16 21:46:30 +12:00
NukemBro
b253de508b Added new RA map: Chaos Canyon 2012-08-16 09:34:24 +12:00
Chris Forbes
1da82aeba9 slow sniper rof to 70 2012-08-16 09:30:03 +12:00
Chris Forbes
db4d6aaf22 sniper requires dome 2012-08-15 21:55:18 +12:00
Matthias Mailänder
5ea86873c6 fixes #2360, fixes #2227
use notifications.yaml for biolab production queue (crash fix)
remove bio prerequisite for visceroid (won't work after capture)
2012-08-15 08:52:03 +12:00
Chris Forbes
0f126fd630 tidy in defaults.yaml 2012-08-15 08:51:15 +12:00
Chris Forbes
ecc2a7241f fix case on WastedAfterwards 2012-08-15 08:51:14 +12:00
Matthias Mailänder
fbf68db0c0 change some d2k weapon sounds 2012-08-15 08:51:12 +12:00
Matthias Mailänder
9ce8c90d25 added Harissons high-quality temperate terrain expansion
new brigdes, fjords, debris, cliffs
2012-08-15 08:51:01 +12:00
Matthias Mailänder
affa9ca336 revert CaptureActor.Range, PascalCase conventions, compatibilty
the hardcoded Range=3 was crap for smaller/bigger buildings
try not to break TransformOnCapture as it is used for cnc husks
2012-08-15 08:49:49 +12:00
Chris Forbes
3a1c4d1e6f sniper is soviet-only; use initial stance correctly 2012-08-15 08:49:20 +12:00
Matthias Mailänder
45fbecbcd0 sniper can go into pillbox and garrision church 2012-08-15 08:49:16 +12:00
Matthias Mailänder
02f28f54c7 add sniper to ra 2012-08-15 08:49:12 +12:00
Matthias Mailänder
81f035904e remove TODO list, use bug-tracker 2012-08-15 08:48:48 +12:00
Matthias Mailänder
8e2d712688 fix cnc snow theatre crash 2012-08-14 11:01:36 +12:00
Matthias Mailänder
29b63bc3c0 add hospital and biolab sequences 2012-08-14 11:01:34 +12:00
Matthias Mailänder
d98cdd5331 new d2k map: Venac ditch by Combine
http://content.open-ra.org/?p=detail&table=maps&id=635
2012-08-14 11:01:18 +12:00
Matthias Mailänder
94905afa3c better cropped volkov icon, thanks to BaronOfStuff 2012-08-14 10:45:09 +12:00
Matthias Mailänder
a659892227 added emperor palace icon, thanks to D2k Sardaukar and Grand Leo 2012-08-14 10:44:51 +12:00
Chris Forbes
82eddfdf98 #2354 fixed - multiple collection of crates 2012-08-09 10:25:45 +12:00
Chris Forbes
063191b09e fix #2353 - missing dep between d2k and cnc mods broke parallel make 2012-08-08 07:36:49 +12:00
Curtis Shmyr
3fc6f62aea Conflicts:
OpenRA.Mods.RA/SupportPowers/IronCurtainPower.cs
2012-07-31 09:20:22 +12:00
Scott_NZ
48f934f188 Set up tran husks, and stop husk placement causing crashes 2012-07-31 09:12:22 +12:00
psydev
192af5d60f Tank shells do 100% vs. armor again. Buff turret. MRLS fixed.
Conflicts:

	mods/cnc/weapons.yaml
2012-07-31 09:10:32 +12:00
psydev
53a7b0987b Fixed structure build menus
Made the building menu more logical. Rows according to tech tree. 

power / refinery / silos       0/10/15
barracks / outpost / starport    20/30/40
light factory / heavy factory / repair bay   50/60/70
high-tech factory / ix tech center / palace    80/90/100

If you want to move silos to the Defense queue, then I would re-arrange it slightly.
2012-07-31 08:24:54 +12:00
psydev
a3897dbc15 Sonic tank moved to end of build menu (100)
Sonic tank moved to bottom of vehicle build menu (set palette order to 100)
2012-07-31 08:23:08 +12:00
Chris Forbes
55651738a7 add heli crash shps 2012-07-30 09:22:36 +12:00
psydev
22bddf9645 Removed the "tip" jutting out of 3 buildings, so they are rectangular instead of awkwardly shaped.
- heavy factory
- high tech factory
- ix research center
2012-07-25 08:58:18 +12:00
psydev
2a37e6233e Added "AutoTargetIgnore:" to ^Building: 2012-07-25 08:57:50 +12:00
Matthias Mailänder
c1722e1270 remove broken sandworm and thumper, fixes #2332 2012-07-25 08:57:05 +12:00
Matthias Mailänder
95c27ef943 deviatortank should require tech building 2012-07-25 08:57:01 +12:00
Matthias Mailänder
3aafde7e18 slower infantry feet animation 2012-07-25 08:56:54 +12:00
Matthias Mailänder
85678de9f0 made silos more flexible for d2k mod 2012-07-24 08:29:18 +12:00
Matthias Mailänder
bda4bfa4f3 d2k: tooltip for $ icon is now starport instead of ship 2012-07-23 09:34:16 +12:00
Matthias Mailänder
481624e3f0 fixed d2k crash: Unit pips does not have a sequence pip-red 2012-07-23 09:34:06 +12:00
ew07002
d1f12ff801 Add some usability features to the TilesetBuilder
- title bar shows tile position (x, y and tile nr (from left top))
 - make 'overlays' button a toggle button and properly sync state with
   tileset surface
 - add export option for 'Template CellID <-> tile number' mapping
 - overlay pen color is now white (todo: make configurable)
2012-07-23 09:33:57 +12:00
Matthias Mailänder
eae482d413 tweak d2k aircrafts a little 2012-07-23 09:33:53 +12:00
Matthias Mailänder
abd774d017 d2k: faster aircrafts, slower trikes, concrete buildings
avoid capturing light buildings by deviator weapon
2012-07-23 09:33:51 +12:00
Matthias Mailänder
f2c630731e added some files from content.open-ra.org, fixes #2182
adds Volkov with some minor changes (no C4, range fixes)
adds soviet forward command center build animation
adds icon for mines (not visible in-game yet)
2012-07-23 09:33:46 +12:00
Matthias Mailänder
3e3977776d fixes #2322 (stuck units when leaving repair pad)
by adding bibs and defining a sane default rallypoint exit cell
2012-07-21 00:01:26 +02:00
Matthias Mailänder
36fbddbb5c fix d2k production queues
ClassicProductionQueue gets support for new notification system
d2k now uses the ClassicProductionQueue system to avoid spamming
Starport has cheaper threshold prices
adds a new production queue but has long delivery times
also no starport price fluctuation to improve balancing
2012-07-20 23:05:28 +02:00
Matthias Mailänder
e33d988301 d2k UI reskinning complete, thanks to @JOoGraphics 2012-07-20 20:00:09 +02:00
Matthias Mailänder
a55167c9ac another d2k loadscreen made by @katzsmile 2012-07-19 23:16:05 +02:00
Matthias Mailänder
d0a4555a1f new admin icon that does fit and some more icons for the future 2012-07-19 21:37:24 +02:00
Matthias Mailänder
4724ac6b00 experimenting with concrete plates
pretty useless at the moment, removed by default
2012-07-19 20:08:59 +02:00
Matthias Mailänder
d998367d35 d2k UI improvements by @JOoGraphics 2012-07-19 17:56:41 +02:00
Matthias Mailänder
0e9e7d0a9d added http://dunefont.co.nr/ to artsrc
maybe used for logos, splashscreens or menus later
2012-07-18 22:08:46 +02:00
Matthias Mailänder
5e1e5903d6 reworked d2k dialog UI, thanks to @JOoGraphics 2012-07-18 19:11:06 +02:00
Matthias Mailänder
25fae5d109 fixed d2k harvester dock animation 2012-07-17 22:03:30 +02:00
Matthias Mailänder
44b8630c71 support reversed remapping for d2k 2012-07-17 17:01:37 +02:00
Matthias Mailänder
6204bfcabf added hospital/bio lab to RA 2012-07-17 14:18:10 +02:00
Matthias Mailänder
1355a9f837 added extra d2k buildings for creeps/neutral
new SHPs, needs update for d2k-packages.zip
2012-07-17 14:02:22 +02:00
Matthias Mailänder
db8f22cdbf d2k harvester unload a little less ugly, RALint fixes
frames were swapped, offset and turnaround still wrong
remember: this changes unload.shp (copy to dl-mirrors)
2012-07-16 22:23:56 +02:00
Matthias Mailänder
860ec9d85f added passenger seat to trike/raider 2012-07-16 21:11:27 +02:00
Matthias Mailänder
5f2f25b758 added d2k superweapons, fixed c4/nuke cursor 2012-07-16 21:02:55 +02:00
Matthias Mailänder
3728685c67 fixed UPnP more crashes
proper timeout: does not crash/lag if no UPnP devices are found
close all ports, sockets, responses after they have been used
so it does not crash when port forwarding for the 2nd time
put all exceptions logs into OpenRA sourcecode
2012-07-15 22:31:02 +02:00
Matthias Mailänder
5e6b8deec1 remove ugly test map again 2012-07-15 18:39:48 +02:00
Matthias Mailänder
21f2b0df43 fixed a crash when siege tanks are built 2012-07-15 18:39:17 +02:00
Chris Forbes
2100484598 fix name of the-duell map for d2k; space breaks rpm build 2012-07-15 12:40:58 +12:00
James Dunne
ba1a36f26e Units heading in generally opposite directions are now considered blockers; this fixes pathing deadlocks. 2012-07-05 23:53:31 -05:00
James Dunne
9c9a16d80e Path planning no longer considers moving friendly units as blockers. 2012-07-05 23:52:34 -05:00
Chris Forbes
3d8e215598 Merge pull request #2296 from ScottNZ/bleed
Allies 01 fixes
2012-07-05 20:06:44 -07:00
James Dunne
ce806fdbe6 Prevent too many instances of a single sound starting at once in an absolute location and attenuate volume of new sounds based on number active sounds already playing. 2012-07-06 14:41:24 +12:00
Matthias Mailänder
208a3a47fe don't crash when sound rules are not loaded
e.g. when trying to get the gamefiles
2012-07-06 14:37:24 +12:00
Matthias Mailänder
f0708ecfb2 cut out the black tile 2012-07-06 14:37:17 +12:00
Matthias Mailänder
653d72086c A10 crash site to terrain
it is not transparent and will look wrong in desert/winter
2012-07-06 14:37:14 +12:00
Matthias Mailänder
9258ba3ec7 new spice shp with 20 densities
hopefully nicer looking spices tiles
and less insane growth rate
avoided edge tiles because of #2247
2012-07-06 14:36:56 +12:00
Matthias Mailänder
d851c5646e a10cr dimensions fixed 2012-07-06 14:36:52 +12:00
Matthias Mailänder
ac0d3779f1 added @Nyerguds awesome cnc A10 crash site
ripped from a Westwood beta screenshot
2012-07-06 14:36:49 +12:00
Matthias Mailänder
9a0d62dc85 removed pyle again (no changes) 2012-07-06 14:36:44 +12:00
James Dunne
59e1703b41 Added mouse-wheel support for flipping tabs in build palette. 2012-07-06 14:32:26 +12:00
James Dunne
e49a439c79 You win chrisf =P 2012-07-03 19:05:46 -05:00
James Dunne
b2e9085371 More detailed exception reporting on crash. 2012-07-03 15:37:37 -05:00
Matthias Mailänder
8cea309ec6 more SHP fixes by Nyerguds
- The SSM Launcher (mlrs.shp) was updated because the very last
  turret frame without missiles had messed up house colours
- buildings that showed remap color instead of real yellow:
* Civilian Oil Derrick (Made correct remap for v19.shp)
* Advanced Communications Center (shadow under the big dish
  turned to remap, in both eye.shp and eyemake.shp)
* Tiberium Silo (random remap pixels in the collapse frame
  of silo.shp, and the entire lower right edge on silomake.shp)
* Barracks (remap pixels showing up in the
  normally gray buildup on pylemake.shp)
2012-07-03 09:21:54 +12:00
Matthias Mailänder
a59dfa555c map clear radar color for interior to black 2012-07-03 09:21:54 +12:00
Matthias Mailänder
e22126ca02 added ice floes to ra 2012-07-03 09:21:54 +12:00
Matthias Mailänder
867f112dfe base cnc snow on temperat to remove snowy greenland tiles 2012-07-03 09:21:54 +12:00
Matthias Mailänder
24e6e23000 fixed building dimensions as d2k now has bibs 2012-07-03 09:21:54 +12:00
Matthias Mailänder
498adc86a9 add bibs for d2k
copy & paste with gimp and OpenRA.Utility
2012-07-03 09:21:54 +12:00
Matthias Mailänder
a20d1c95c8 noticable SHP fixes from C&C 1.06c rev3
including a snow theatre now fixed with few backfalls to winter
hand of nod with logo (like in the beta)
fence fixes (one frame did not fit to the rest)
factory retains the shadow of the make animation
nicer ion cannon icon from a westwood render
2012-07-03 09:21:54 +12:00
ScottNZ
4a101cf1b1 Convert line endings 2012-07-02 16:19:57 +12:00
ScottNZ
583b11a2b2 Remove bad/duplicate UnloadCargo line 2012-07-02 14:03:26 +12:00
ScottNZ
b3c5137add Merge 2012-07-02 13:46:28 +12:00
Chris Forbes
3dc39b2c9d fixed #2167 -- silly inconsistency between InfDeath and dieN sequence numbering 2012-07-02 09:42:20 +12:00
ScottNZ
5897a44fc5 Remove unneeded barrel YAML overrides 2012-07-02 04:22:23 +12:00
ScottNZ
8b0f15f80b Bring Soviet patrol back a bit 2012-07-02 04:21:10 +12:00
ScottNZ
1262cf0f29 Bit of cleanup 2012-07-02 03:54:55 +12:00
ScottNZ
b74e63f42d Drain Soviet resources so the ore truck doesn't stay at the refinery 2012-07-01 20:30:25 +12:00
Matthias Mailänder
e89ee2c131 new AttackLoyalty, range and stay alive option for Capture
AttackLoyalty for d2k Deviator which captures units
also shooting a fake missile (see issue #2251)

CaptureActor now supports Generals styles gameplay
but is disabled by default (see issue #2274)
fixes the annoyance that engineers will not take
the shortest root to the building by the way

removing ProvidesCustomPrerequisite because it's
tooltip messages relies on hardcoded hacks
2012-07-01 20:26:25 +12:00
Chris Forbes
c2321e3eea fixed #2284 - crash in upnp when device found but it doesnt want to talk upnp 2012-07-01 20:14:14 +12:00
Matthias Mailänder
22a49ba7c6 added HarvesterAttackNotifier.cs to .csproj
Conflicts:
	mods/d2k/rules/system.yaml
2012-07-01 20:00:57 +12:00
Chris Forbes
4d614e9122 include d2k mod in official packages 2012-07-01 20:00:12 +12:00
Chris Forbes
e0069fd62a make UnloadCargo.unloadAll configurable; go back to all by default 2012-07-01 19:45:31 +12:00
Matthias Mailänder
c75c72b525 made palette shadowindex configurable 2012-07-01 19:37:57 +12:00
Chris Forbes
007b2c5434 make click-without-drag feel better in editor 2012-07-01 18:37:46 +12:00
Chris Forbes
b8a932a084 try to make selection feel better 2012-07-01 18:31:46 +12:00
Curtis Shmyr
61c3932340 Selection tool / copy paste for editor 2012-07-01 18:23:46 +12:00
Chris Forbes
c2029e9d5c fixed #2166 - filtering of passengers to show with RenderCargo 2012-07-01 18:22:19 +12:00
Chris Forbes
d0548d6766 Drop EvaAlerts from OpenRA.Game.csproj 2012-07-01 18:10:17 +12:00
Chris Forbes
5a40c5df03 tidy health transfer 2012-07-01 18:08:10 +12:00
Matthias Mailänder
f5ba36a735 Unload only 1 cargo per mouseclick, for more control 2012-07-01 18:07:33 +12:00
Matthias Mailänder
efe2f2e043 UnloadCargo rallypoint fixes #2016 2012-07-01 18:07:05 +12:00
Matthias Mailänder
6681382819 unclock factory exits 2012-07-01 14:53:45 +12:00
Matthias Mailänder
7a578a0679 notifications (formerly EVAalerts) centralized and race specific
outsourced into notifications.yaml
triggered with PlayNotification(...)

(v2: less redundant code for PlayVoice/Notifications)

added harvester under attack and battlecontrol terminated
2012-07-01 14:39:30 +12:00
Chris Forbes
5fee165692 fixed #2289 - missing chrono effects on return 2012-07-01 14:24:49 +12:00
Chris Forbes
0a4669b925 Add SimpleTeleport for non-chrono jumps (used in scripts etc) 2012-07-01 14:05:21 +12:00
Chris Forbes
109546d20f fixed #2286 - chrono kills passengers on return too 2012-07-01 13:31:04 +12:00
James Dunne
f5c606266d Fixed shift-tab keyboard shortcut in build palette. 2012-07-01 13:08:00 +12:00
ScottNZ
facf958bae Move towards extraction LZ if einstein isn't in the world. 2012-07-01 13:02:23 +12:00
Matthias Mailänder
480db8be42 non-capturable hospital with heal-zone
will heal engineer, capturing it is useless;
heal-zone makes less sense, but it looks nicer
(otherwise infantry drawn on top of the building)
2012-07-01 13:02:23 +12:00
James Dunne
7c4e32bd94 Applied ToDictionaryWithConflictLog to MixFile reader. 2012-07-01 13:01:54 +12:00
James Dunne
854a9c4eb7 Added new ToDictionaryWithConflictLog to help diagnose ToDictionary bombs. 2012-07-01 13:01:24 +12:00
ScottNZ
cbb0b17c31 Add AutoTargetIgnore for stek 2012-07-01 12:52:36 +12:00
Chris Forbes
f2ab8a8541 generalize rough cursor to be customizable for any terrain type 2012-07-01 12:49:14 +12:00
Matthias Mailänder
63d21eac8c arrakis tileset categorized for editor
thanks to CombineCnR
2012-07-01 12:41:29 +12:00
Matthias Mailänder
579ff04f68 fixes #2253
rough mouse-cursor for infantry-only areas
blue move cursor for d2k rally points
2012-07-01 12:41:23 +12:00
ScottNZ
18d75feb15 Adjust the patrol starting position 2012-07-01 12:14:12 +12:00
James Dunne
11da96fe22 Fix for #2277: Failing to load sounds/music should never crash. 2012-07-01 09:11:27 +12:00
Chris Forbes
9201b1cced fixed #2198 - crates are collected when landing on top of a unit 2012-07-01 09:04:49 +12:00
ScottNZ
e02397da3e Use Sound.PlayMusic for Hell March 2012-07-01 03:47:08 +12:00
ScottNZ
6014f648f4 Add e1, dog, e1 soviet patrol 2012-07-01 03:29:05 +12:00
ScottNZ
2c55a008f1 Reduced cruiser range from 32 to 25 to reduce risk of friendly fire. Increased barrel hitpoints. Removed jeep cargo ability as a workaround for Einstein being removed from the game world and Soviet forces not attacking. 2012-06-30 23:33:09 +12:00
ScottNZ
b9be918b6c Remove some code noise and improved the chinook cargo check 2012-06-30 23:27:14 +12:00
ScottNZ
781cbc00d3 Make Einstein run out of the building when he appears. 2012-06-30 20:27:39 +12:00
Chris Forbes
b9365a149f remove old crates list 2012-06-30 17:06:15 +12:00
James Dunne
1d4f1c657f Fix for crash after selling all refineries. 2012-06-30 16:37:50 +12:00
James Dunne
9a66d7b530 Harvesters will return to ordered-to location if told to harvest a specific cell while full after delivery instead of the last successfully harvested cell which may be far away. 2012-06-30 16:37:50 +12:00
Chris Forbes
3a87b934a6 fixed #2257 - reenable PrimaryBuilding support for afld/hpad 2012-06-30 16:10:13 +12:00
Chris Forbes
9845d0e035 fixed #2260 - spec chat should use contrast 2012-06-30 16:05:33 +12:00
James Dunne
3754e791e5 Fix for null ref exception after refinery is sold. 2012-06-29 22:55:45 -05:00
James Dunne
643154de15 Harvesters obey player when told to stop or move somewhere else. 2012-06-29 22:38:24 -05:00
ScottNZ
af8b29aee5 Map polishing: removed mpspawn. Removed unneeded YAML. 3tnk now starts facing north. Changed soldier next to barrels from e1 to e2. Adjusted the player colour to a lighter blue. Adjusted the chinook despawn location. e2 now always explode when they die to make the barrel chain reaction reliable. Reduced HP of barrels also. 2012-06-29 09:09:39 +12:00
ScottNZ
36c0ec753d Move viewport to where the player starts 2012-06-29 09:09:39 +12:00
Matthias Mailänder
9115fc4397 fixes #2157
Tooltip descriptions now showup in CnC.
2012-06-29 09:06:15 +12:00
Matthias Mailänder
0d59a4dcd7 fixes #2005
Don't save floats in settings.yaml using country-specific
decimal separators which can be misunderstood as
group seperators which will put values out-of-range.
2012-06-29 09:00:28 +12:00
Chris Forbes
e0c3c53c00 fix up music error 2012-06-29 09:00:28 +12:00
Generalcamo
11654cc893 More Strings Corrected.
Some tracks are missing, however I don't know the file name of those.
2012-06-29 08:45:45 +12:00
Generalcamo
bb85ea75e4 More Strings Corrected. I notice a few Counterstrike tracks are missing, they might be in the aftermath file though. Will check. 2012-06-29 08:45:44 +12:00
Generalcamo
2450576dbe Once Again, corrected strings. Also added a track 2012-06-29 08:45:44 +12:00
Generalcamo
dd81b6d872 Corrected Music Strings, added a voiced track
The music strings have been taken from Frank Klepacki's Website and the CD. In some cases, I have added parenthesis to show the names that many people give them
2012-06-29 08:45:44 +12:00
James Dunne
3160034d66 Now checking AcceptsSmudgeType for all cells to smudge and picking appropriate SmudgeLayer to render with. 2012-06-27 23:54:49 -05:00
James Dunne
d0d3813173 Water will not be smudged/scorched any more from nukes. All resources in range of nuke are destroyed now, not just the ones on the edge of the circle. 2012-06-27 22:56:48 -05:00
James Dunne
2ff4a76955 Fixed zombie aircraft flying around after being told to fall to earth. 2012-06-27 22:02:29 -05:00
Matthias Mailänder
9626ed356c fixed crash when mod not found, don't save broken settings
default mod is Red Alert
2012-06-28 13:10:41 +12:00
Matthias Mailänder
5ecf8d3b7f added real allyrepair, fixed flagfly shadow 2012-06-28 13:10:41 +12:00
Matthias Mailänder
8041b17032 fixed turret facing order, added rocket turret 2012-06-28 13:10:41 +12:00
Matthias Mailänder
b9cda8fcca relative altitude for carryall cargo 2012-06-28 13:10:41 +12:00
Matthias Mailänder
ed6a625c69 nonstandard build time value for a cnc classic mod fixes #2164
remove the testcase in structures.yaml if unwanted for cnc mod
2012-06-28 13:10:41 +12:00
Matthias Mailänder
d498ff1085 +RenderBuildingSeparateTurret 2012-06-28 13:10:40 +12:00
James Dunne
f8a0dd59b7 Fixed null reference bug. 2012-06-27 18:38:12 -05:00
James Dunne
8e602104af Harvesters - made search radius configurable for both initial search from proc and search from harvest location. 2012-06-27 18:00:42 -05:00
James Dunne
aac78773f4 Upgraded to VS2010 2012-06-26 20:39:56 -05:00
Matthias Mailänder
d3915ad291 string AcceptsSmudgeType replaces boolean AcceptSmudge
because Dune 2000 has different craters for rock and sand
2012-06-27 13:19:52 +12:00
Matthias Mailänder
b61e4a6083 don't mount unneeded RA game files
voices and tilesets already completely replaced
2012-06-27 13:19:52 +12:00
Matthias Mailänder
5318380bfa auto-restart the game after getting the game-files 2012-06-27 13:19:52 +12:00
Matthias Mailänder
a64629f1c5 remove ready/hold/group pip from BuildPaletteWidget
and render as text instead
2012-06-27 13:19:52 +12:00
Matthias Mailänder
5231da1ea3 READY/ON HOLD as DrawText instead of SHP 2012-06-27 13:13:55 +12:00
Chris Forbes
aa06751de5 categorize the rest of the temperat tileset 2012-06-26 20:12:01 +12:00
Chris Forbes
f10eb9e082 add category headers in editor 2012-06-26 19:58:04 +12:00
Chris Forbes
9966b4efd1 group tiles by category 2012-06-26 19:33:11 +12:00
Chris Forbes
0ec3e8b227 add Category to tileset entries 2012-06-26 19:33:02 +12:00
Chris Forbes
984a498ed2 Finish fixing #2136 2012-06-26 19:24:59 +12:00
Igor Popov
c122e6f54d indicate-admin: implementation (ra) 2012-06-26 18:58:31 +12:00
Chris Forbes
1924cc71f1 fix canceling of WaitFor 2012-06-26 11:48:15 +12:00
Chris Forbes
220473bf74 remove duplication in UOG 2012-06-26 11:31:13 +12:00
James Dunne
4373f577d8 Added ResourceClaimLayer trait to World for cnc and d2k. 2012-06-24 21:41:16 -05:00
James Dunne
2f773e49ef Fixed null ref exception while playing cnc. 2012-06-24 21:41:16 -05:00
James Dunne
03ec1f08cf Made ResourceClaimLayer trait optional on World actor to fix cnc and d2k. 2012-06-24 21:41:16 -05:00
James Dunne
a0f9f98b1c Removed unnecessary mobile local. 2012-06-24 21:00:25 -05:00
James Dunne
b59a0e8c0d Fixed harvesters for AI to search the entire map when no more resources nearby. 2012-06-24 20:26:01 -05:00
James Dunne
1fa70d259f Removed INudge in favor of INotifyBlockingMove. 2012-06-24 20:26:01 -05:00
James Dunne
1f0da42a15 Refineries now show which harvesters are linked by holding down ALT key. 2012-06-24 20:26:01 -05:00
James Dunne
845379e577 Harvesters no longer block each other during low-ore contention and wait for a random amount of time while idle to search for more resources. 2012-06-24 20:26:00 -05:00
James Dunne
80123b6aa4 Many harvester behavior improvements; summary below.
Implemented Harvester territory marking with a simple resource claim system in ResourceClaimLayer trait added to World.
Added customCost for PathSearch to support new Harvester search preferences.
Explicit delivery order forces harvester to always deliver to that refinery.
Explicit harvest order frees harvester from forced delivery refinery and allows for auto-balancing.
Harvesters auto-balance refinery choice such that no more than 3 harvesters are linked to any one refinery at a time.
Harvesters try very hard to not block the refinery dock location.
Harvesters try to avoid enemy territory when searching for resources.
Group-select harvest order intelligently disperses harvesters around the order location.
Fixed PathFinder caching to not be a sliding window. This is a correctness issue. Sliding window causes no-route paths to be cached permanently in tight move loops and doesn't allow eventual progress to be made. This may have negative performance implications.
2012-06-24 20:26:00 -05:00
Matthias Mailänder
1aafc9f726 fix utilty remap, remapped flag/poweroff to d2k.pal 2012-06-25 10:21:39 +12:00
Chris Forbes
8607575e2b Merge remote-tracking branch 'matt/patch-2' 2012-06-25 09:52:24 +12:00
Chris Forbes
162c386bdd Merge remote-tracking branch 'matt/bleed' 2012-06-25 09:40:22 +12:00
Chris Forbes
445e5ec84b fix #2215 - add shadow.shp based on RA but with proper size for d2k 2012-06-25 09:27:39 +12:00
Matthias Mailänder
54c35e3721 fixed some selection boxes 2012-06-25 09:07:44 +12:00
Chris Forbes
a2b92d0fe4 Merge commit 'matt/dune^'
Conflicts:
	.gitignore
	mods/d2k/rules/system.yaml
2012-06-25 09:05:49 +12:00
Chris Forbes
2ed12f1d95 Merge remote-tracking branch 'scott/bleed'
Conflicts:
	OpenRA.Mods.RA/Missions/Allies01Script.cs
2012-06-25 08:45:16 +12:00
James Dunne
fe5bcdeab9 Fix for PaletteFormat break in Editor. 2012-06-24 13:58:49 -05:00
ScottNZ
9c6bc45f8f Fix whitespace 2012-06-25 05:34:06 +12:00
ScottNZ
2cc749118f Make it more overwhelming at the fifth wave and each wave after that 2012-06-25 05:19:25 +12:00
ScottNZ
331388bfe8 Merge pull request #1 from Mailaender/patch-5
Added Prof. Einstein sequences and rules
2012-06-24 09:31:38 -07:00
Matthias Mailänder
079a52ee65 added Einstein 2012-06-24 19:27:05 +03:00
Matthias Mailänder
5b470650b7 added Einstein 2012-06-24 19:26:03 +03:00
Matthias Mailänder
380875ad3e added Einstein 2012-06-24 19:24:26 +03:00
Matthias Mailänder
79976a4bfe transpose infantry/ornithocopter 2012-06-24 15:48:11 +02:00
Matthias Mailänder
769b5d7dc6 fixed OpenRA.Utility --remap
now uses the mod parameter again
2012-06-24 12:32:52 +02:00
Matthias Mailänder
2a95c5f668 fix PlayerColorPalette in Editor 2012-06-24 11:56:52 +02:00
Chris Forbes
1bf649d27d Merge remote-tracking branch 'matt/bleed' 2012-06-24 21:34:37 +12:00
ScottNZ
bda92f3898 Only send the heavy tank on the last wave, this is the first mission after all 2012-06-24 21:28:46 +12:00
Matthias Mailänder
7220025a62 make orni flap slower 2012-06-24 11:21:50 +02:00
Matthias Mailänder
0b6eda0815 replaced RA sounds by Dune 2000 ones 2012-06-23 16:00:20 +02:00
Matthias Mailänder
e70e778775 make ornithocopter flap (broken)
needs frame resorting similiar to the infantry
2012-06-23 14:20:34 +02:00
ScottNZ
7fb659bd3a Make the mission a bit harder - add a heavy tank to each wave 2012-06-23 20:41:43 +12:00
Matthias Mailänder
b109436cc3 race specific BaseAttackNotifier 2012-06-22 18:21:29 +02:00
ScottNZ
6ba0c448c8 Remove killing of player when they fail the mission, this is more fun and it's also really loud when all the units die at once 2012-06-22 15:27:07 +12:00
ScottNZ
ed5ff9cd31 Bleep when objective shown 2012-06-22 13:39:36 +12:00
ScottNZ
1146790dc1 Reworked the left side of the map to make it useful, and moved one of the spawnpoints there. 2012-06-22 13:07:24 +12:00
James Dunne
cf1d4d0efb Fixed radar click position - was not respecting zoom setting for emulating the mouse coordinate. 2012-06-21 19:41:23 -05:00
James Dunne
b127ae8027 Added sub-pixel position/vector types.
Updated Sync code to handle new sub-pixel types.
2012-06-21 19:41:12 -05:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Matthias Mailänder
6bc3249685 voices now support prefixes
required for d2k
2012-06-21 15:31:12 +02:00
ScottNZ
3ab197f400 Buff the Allies a bit - give them some riflemen. 2012-06-21 23:34:34 +12:00
ScottNZ
9ff69b7946 Add EVA voices
Use new WaitFor when waiting for Einstein
Have a small delay before the Soviets counterattack
Have the Soviets Attack-Move towards Einstein during the counterattack, this makes them much more damaging
Spawn the signal flare only after Einstein has been spawned, also add EVA voice for this
2012-06-21 22:53:20 +12:00
Chris Forbes
0b98a8ce5e Merge remote-tracking branch 'scott/bleed' 2012-06-21 11:54:54 +12:00
James Dunne
2e26047b23 Added myself to AUTHORS. 2012-06-20 18:20:26 -05:00
Chris Forbes
2cdd1f7376 fix #2126 - crash on spawning a corpse for an actor which has already been destroyed 2012-06-21 09:50:02 +12:00
Matthias Mailänder
033dd10192 git ignore some KDE crap 2012-06-20 23:46:53 +02:00
Matthias Mailänder
9f5a8512d2 race specific ProductionQueue audio 2012-06-20 23:40:08 +02:00
Chris Forbes
5c4e49cc3f fix #2196 - crash when cycling stances while a unit dies 2012-06-21 09:33:47 +12:00
James Dunne
8eb4782a49 Fixed socket code constantly throwing exceptions about non-blocking. 2012-06-21 09:29:02 +12:00
Chris Forbes
99eb3b046d fix #2239 - add WaitFor(predicate) 2012-06-21 09:26:05 +12:00
Matthias Mailänder
ac0389d04f race specific notifications/mcv-crate 2012-06-20 21:35:23 +02:00
Matthias Mailänder
6929ed024a added harvester unload, thumper which spawns sandworms
worm won't attack, dogjaw is stupid and moving mine did not work
2012-06-20 16:57:09 +02:00
Matthias Mailänder
f4cb798c8b small code optimisations as suggested 2012-06-20 09:51:00 +02:00
ScottNZ
8f6b8b75bc Remove redundant call to InternalName when mission failed 2012-06-20 18:17:13 +12:00
ScottNZ
cb3daab5fa Tabify lines 2012-06-20 17:48:03 +12:00
James Dunne
4d16ca238c Fixed broken Install from CD code in RA. 2012-06-20 09:47:19 +12:00
Matthias Mailänder
84d623397b made PaletteFormat configurable
as suggested in issue #2219
2012-06-19 21:36:10 +02:00
Matthias Mailänder
26b75f406f new settings Transparent for cursors.yaml 2012-06-19 07:43:06 +02:00
ScottNZ
b30e4ab432 Use SharedRandom to stop desync 2012-06-19 14:43:11 +12:00
ScottNZ
b0e10c9ada Don't need lzRange 2012-06-19 12:57:45 +12:00
Matthias Mailänder
c6a1031ab7 fix cnc palette issues
cursor not supporting transparency which is only needed for d2k
2012-06-18 17:44:03 +02:00
Matthias Mailänder
7cbed30dc6 fix cnc palette issues
cursor not supporting transparency; wrong icon, fx palette
2012-06-18 17:40:22 +02:00
Matthias Mailänder
ce0099f5d2 fix settings for d2k and cnc
no UPnP for CnC singleplayer skirmishes, use RA chromes at D2k
2012-06-18 17:07:56 +02:00
Matthias Mailänder
45a5e317c0 Merge remote-tracking branch 'openra/bleed' into bleed 2012-06-18 16:38:17 +02:00
ScottNZ
11ddd88d60 Remove more unneeded code, use CallFunc activity to make Tanya laugh when she disembarks. 2012-06-19 01:45:46 +12:00
ScottNZ
ce05b8dfec Use IsInMap & IsInWorld to detect whether Einstein has been saved 2012-06-19 01:27:42 +12:00
ScottNZ
f5d397030c Remove unneeded UnitsNearExtractionLZ code 2012-06-19 01:19:09 +12:00
ScottNZ
874799c2c3 Made Soviet attack waves a bit saner 2012-06-19 01:04:18 +12:00
ScottNZ
20af089fcd Added Allies 01 SP map and Allies01Script.cs 2012-06-18 22:13:24 +12:00
unknown
21ab0b461c Added straightforward hover behavior for all units. Give a unit a nonzero Altitude: in its Mobile: block and the WithShadow: trait to make it hover. 2012-06-18 20:53:38 +12:00
Chris Forbes
7af0e64708 allow --transpose to do multiple operations in one pass 2012-06-18 20:38:37 +12:00
Matthias Mailänder
527c6dc36b "repair" infantry at hospital 2012-06-18 03:30:53 +03:00
Matthias Mailänder
8831a93375 make the hospital become a repairunit (for infantry) 2012-06-18 03:29:17 +03:00
Matthias Mailänder
677efcbced add notifications 2012-06-18 02:18:01 +02:00
Chris Forbes
4f1a7ff5fb add --transpose option to utility 2012-06-18 11:22:24 +12:00
Matthias Mailänder
c9edf7d0dc added Renderer Dropdown in RA Settings 2012-06-18 09:30:52 +12:00
Chris Forbes
d64ecac74e Merge pull request #2223 from Mailaender/dune
Latest updates from the Dune 2000 mod
2012-06-16 22:30:00 -07:00
Matthias Mailänder
c804be6f01 fix passable edges in Cliff terrain tiles
made all special units equally expensive, found harvester unload
2012-06-16 21:19:46 +02:00
Matthias Mailänder
959875c709 added special infantry, fixed UI, added new map 2012-06-16 14:17:35 +02:00
Igor Popov
4d94cb5593 2 maps: Bomber John(minigame->new); Free Coasts(conquest->replace) 2012-06-16 14:46:32 +12:00
Matthias Mailänder
c1fb5dd5f5 added engineer, bazooka 2012-06-15 22:43:03 +02:00
Matthias Mailänder
db0e1eabc7 replace RA conyard with D2k carryall for colorpicker 2012-06-15 17:03:40 +02:00
Matthias Mailänder
801ff5cc17 make cursor always transparent, fix Arrakis tileset
transparency bugs some cnc cursors, slice BLOXBASE better
2012-06-15 11:06:59 +02:00
Chris Forbes
94f7f1c473 clean up game timeout 2012-06-15 15:14:56 +12:00
Chris Forbes
9862b8ccee remove sequence save junk 2012-06-15 15:06:52 +12:00
Matthias Mailänder
722c7a5f7d +resampled sounds, readded and completed Arrakis tileset
all tilesets combined into one without redundancy
2012-06-14 21:09:44 +02:00
Matthias Mailänder
72d038e04e fixes mouse cursor not being transparent 2012-06-11 23:28:42 +02:00
Matthias Mailänder
b83188d435 add the first Sounds
manually resampled to 16 bit 22050 Hz and converted to AUD
2012-06-11 21:19:40 +02:00
Matthias Mailänder
f9cbd1bbbf experimenting with auto-downloader, sandworm 2012-06-10 21:13:40 +02:00
Curtis Shmyr
4e88166673 Added two new RA maps by Tirili: Ice Woods & Nishnekolymsk 2012-06-10 12:56:24 -06:00
Chris Forbes
f3d68f4944 remove some junk ai profiles 2012-06-10 19:52:25 +12:00
Chris Forbes
3827a5436a #2191 fixed -- custom OGs canceled on win/lose 2012-06-10 17:17:38 +12:00
Igor Popov
4a7417347a fix #2199; Game Timer (min 10 seconds) 2012-06-10 17:08:49 +12:00
Matthias Mailänder
dc6b286d25 remove unneccessary dependencies, make SendTo less spammy 2012-06-10 16:46:19 +12:00
Matthias Mailänder
aa36a56b27 UPnP source code fixes
as suggested by Chris Forbes
2012-06-10 16:46:19 +12:00
Chris Forbes
a831e72fa2 Merge remote-tracking branch 'tuc/simplepause' 2012-06-10 16:35:41 +12:00
Matthias Mailänder
b96158adcb new AI with optimized build order
Eisenhower builds less refineries, more units and techs faster
2012-06-10 16:34:31 +12:00
Chris Forbes
5414875d00 update .gitignore; remove spurious mono file 2012-06-10 16:32:02 +12:00
Chris Forbes
fd4b10c6bd Merge remote-tracking branch 'matt/dune' 2012-06-10 16:27:19 +12:00
Matthias Mailänder
d110b45679 added install rules for d2k mod, fixes carryall landing 2012-06-09 22:46:13 +02:00
Matthias Mailänder
22e0828566 fixing BLOXBASE problems
t264 not found and BASE.tsx gets deleted too early
2012-06-09 20:57:22 +02:00
Matthias Mailänder
c3052d863a tsbuilder is required for mod_d2k
adding it to core
2012-06-09 20:39:06 +02:00
Matthias Mailänder
0b4455515d added utility reference to Makefile for d2k mod 2012-06-09 20:33:50 +02:00
Matthias Mailänder
4ed74c6cc0 adding in-game GUI gamefile extractor/converter
also fixing EOL for TilesetBuilder with monoDevelop
2012-06-09 19:53:59 +02:00
Matthias Mailänder
ebf64f67cf updated BLOXBAT terrain 2012-06-09 11:43:39 +02:00
Matthias Mailänder
b16849768d adding chrome/settings.yaml
was in gitignore
2012-06-08 21:07:20 +02:00
Matthias Mailänder
f140c6ec9c added TilesetBuilder command line, added Tileset extractor
removing all copyrighted raw tileset files
2012-06-08 19:31:10 +02:00
Matthias Mailänder
8f1d06ff31 added TilesetBuilder2 and fixed it for Dune 2000
does not support TerrainTypes other than "clear" yet
2012-06-07 19:22:45 +02:00
Igor Popov
3f0fafb380 Add banlist (Server.Ban settings item) support to game servers 2012-06-07 12:14:26 +12:00
Remco van der Zon
84124de79d Game can now be paused by pressing f3 as well. 2012-06-06 11:22:46 +02:00
Remco van der Zon
8ad4e08651 Unit order client != null check fixed (int != null -> always true!) .
Removed if-else branch in favour of sugar construct a?b:c.

Note: One should (at least) consider to move var client = ... to the
start of the switch construct. 4 branches of this switch are using this.
(DRY)
2012-06-06 10:54:21 +02:00
Remco van der Zon
8f981977e0 TimeWidget does not collide anymore with koth layout.
Screen resolution should be 1024x786+
2012-06-06 10:47:13 +02:00
Matthias Mailänder
676210422f added spice bloom
indestructable, seeds ressources like mine or blossom tree
2012-06-05 19:50:44 +02:00
Matthias Mailänder
749301899e added smudge
palette problems and engine does not care for terrain type
2012-06-05 18:14:17 +02:00
Chris Forbes
1bb1e00a0d fix #2195 - barrels should not be capturable or sellable 2012-06-05 19:41:30 +12:00
Matthias Mailänder
83ee6b758e fix CD rip logic a little
will still fail on setup.z
2012-06-02 21:17:42 +02:00
Matthias Mailänder
accaf027fe added (broken) content installer, moved instruction to GUI
still depends on the hacky bash script and CD extractor crashes
2012-06-02 17:46:31 +02:00
Matthias Mailänder
9b1e798b35 added spice as a ressource
still needs work though
2012-06-02 15:36:31 +02:00
Matthias Mailänder
cffaabb3bf added d2k mouse pointer, fixed aircrafts 2012-06-02 11:41:18 +02:00
Matthias Mailänder
5ab5bc9f7c removed need to define Harvester/BaseBuildingUnit manually 2012-05-28 23:36:46 +02:00
Matthias Mailänder
d9c4aada8a updated the README
so people can try this on their own
2012-05-28 20:29:15 +02:00
Matthias Mailänder
27fa99852b add D2k crates, started fixing infantry
infantry directions are correct, but movement is still wrong
2012-05-28 20:14:56 +02:00
Matthias Mailänder
ec7795fa99 added more Dune 2000 EVA voices
currently Atreides only
2012-05-28 14:00:43 +02:00
Matthias Mailänder
8e74df6155 fixing RALint.exe d2k and ordos missing defense buildings 2012-05-28 10:37:10 +02:00
Matthias Mailänder
4984d07960 made HackyAI more flexible for Dune 2000 mod 2012-05-28 10:36:17 +02:00
Matthias Mailänder
2a312911cb fixes repair pad
and update TODO
2012-05-27 18:28:52 +02:00
Matthias Mailänder
a20e30312e added Ordos 2012-05-27 15:17:03 +02:00
Matthias Mailänder
e0e1011d30 added Harkonnen 2012-05-27 12:45:35 +02:00
Matthias Mailänder
1fcf044980 added flags, worked on the UI
looks crappy, needs someone who is good at this
2012-05-27 10:40:08 +02:00
Matthias Mailänder
2287f1f662 inherit units that differ only slightly for each faction 2012-05-26 20:20:01 +02:00
Matthias Mailänder
ffbc76919e make Dune 2000 an independent mod
Arrakis tileset now loads properly
2012-05-26 18:13:51 +02:00
Matthias Mailänder
083952a531 added Dune 2000 music, voices 2012-05-26 13:06:02 +02:00
Curtis Shmyr
bd29d382c7 fix #2080 - added option to toggle shellmap in CNC 2012-05-26 18:40:55 +12:00
Curtis Shmyr
8df09da816 Spy - add voice when sending infiltrate order 2012-05-26 18:40:55 +12:00
Curtis Shmyr
4778ef803e Spy - don't reset exploration if team has GPS 2012-05-26 18:40:55 +12:00
Curtis Shmyr
37f91542a9 Change cargo ownership when capturing actors with cargo 2012-05-26 18:40:55 +12:00
Curtis Shmyr
e1907364e6 Fix #2086 - don't let player capture if that same player (or friendly ally) is already capturing 2012-05-26 18:40:55 +12:00
Matthias Mailänder
7f48a242db fixed refinery, factories
a little hacky though
2012-05-25 22:27:26 +02:00
Matthias Mailänder
4362a215d9 fixed wall, silo; add ornithocopter, sonic tank, infantry
orni does not flap, no sonic wave weapon, infantry frames broken
2012-05-25 17:46:58 +02:00
Matthias Mailänder
72b2e03dd0 added tech buildings, repair pad, startport, tanks 2012-05-24 16:26:38 +02:00
Matthias Mailänder
f7c1eb2933 +heavy factory, radar outpost, brick wall 2012-05-23 20:04:45 +02:00
psydev
5dd46b1b16 Give Mammoth 8-sec. cooldown for heal, like in RA. 2012-05-23 09:35:34 +12:00
Matthias Mailänder
68a731ed5e fixing MCV facings and flickering bug 2012-05-22 23:19:05 +02:00
Matthias Mailänder
4c667be946 fixed vehicles driving backwards
also fixed the bazooka for quad
2012-05-22 22:17:48 +02:00
Matthias Mailänder
66f82c6c2a added harvester, trike/quad now working, fixed mod inheritances
RenderCargo: works, moved R8Reader to Utility namespace
2012-05-22 21:02:25 +02:00
Chris Forbes
ff32864b47 #2160 fixed - RenderCargo support for relative altitude 2012-05-22 19:42:51 +12:00
Chris Forbes
e9656795a2 RenderCargo depends on IMove on the containing actor 2012-05-22 19:24:53 +12:00
Chris Forbes
3fbb81b4fc remove more spurious trait lookups in RenderCargo 2012-05-22 19:19:49 +12:00
Chris Forbes
442138e1f8 clean up spurious trait lookup in RenderCargo 2012-05-22 19:18:28 +12:00
Chris Forbes
2d39b1dfac #2089 fixed - Explodes filtering on InfDeath 2012-05-22 19:14:25 +12:00
Chris Forbes
3b704e25fa #2159 fixed -- missiles lose guidance and run out their remaining fuel if the target dies 2012-05-22 19:01:49 +12:00
Chris Forbes
c068be453a #2119 fixed - better error message for multiple definitions of the same yaml field 2012-05-22 18:17:03 +12:00
Chris Forbes
6f8f940f31 #2130 fixed -- #comments can be used at the end of any lines 2012-05-22 18:05:04 +12:00
Chris Forbes
c000640928 remove dead function from LobbyLogic 2012-05-22 17:42:19 +12:00
earthpig
059347af40 bots (once again) build pillboxes. 2012-05-22 17:20:23 +12:00
earthpig
f0001856bc To go along with introducing the 'cloaked hbox', ensure that the cloak is disabled if at low power. 2012-05-22 17:18:54 +12:00
earthpig
8c218b67ab Bring back hbox, with both the new garrison stuff and with stealth until firing. 2012-05-22 17:18:26 +12:00
Matthias Mailänder
5426a5fd3c put d2k mod stuff into it's own branch 2012-05-20 15:50:39 +02:00
psydev
d1241c438a Helicopters targetable when landed 2012-05-18 10:45:39 +12:00
Chris Forbes
bc7aa9a491 make Health.MaxHP not readonly; some people want to frob it at runtime 2012-05-17 10:04:06 +12:00
Remco van der Zon
ae94d7ecc7 Chat-text displayed when the game is paused and unpaused.
: The game is (un-)paused by <PLAYERNAME>
2012-05-16 19:11:46 +02:00
Remco van der Zon
7e1986ecbc Timer shows text "(paused)" when game is in pause. 2012-05-16 19:04:43 +02:00
Remco van der Zon
a07697be03 Pause the game option.
Game is paused when PAUSE on the keyboard has been hit. It can also be unpaused this way.
2012-05-16 17:35:10 +02:00
Remco van der Zon
b99e664726 A Game-tick can execute viewport.Tick itself,
removed this dependency from World.
2012-05-10 19:54:57 +02:00
psydev
881b4ba277 cnc - changed various unit speeds; gave increased sight to MCV and MSAM. 2012-05-07 07:42:48 +12:00
psydev
3058bfbc17 cnc - updated several building hitpoints 2012-05-07 07:42:48 +12:00
Remco van der Zon
8a08365666 Fixed bug in cash ticks, normal settings.
No sound was heared when repairing buildings or on low power.
Fixed.
2012-05-07 07:42:48 +12:00
Remco van der Zon
6c96a106e7 Red Alert CashTicks
Three options for cash ticks:
Extreme: current behavoir (every cash countdown tick is heard)
Normal: RedAlert countdown style (only one cash countdown tick every ~1 or 2 seconds)
Disabled: No cash tickdown or tickup is heard.

Thanks to Tirili for hints on the settings system.
2012-05-06 20:03:09 +12:00
psydev
6291c8396b cnc - add new explosion: chemball 2012-05-06 19:59:53 +12:00
psydev
79afa07118 cnc - made helicopter selection bounds a bit smaller 2012-05-06 19:58:13 +12:00
Chris Forbes
0e43043a33 cnc: fix crash loading yaml for ArtilleryShell.ContrailLength 2012-05-06 11:27:03 +12:00
psydev
c06fc02915 Changed production menu hotkeys from YUIOP to QWERT (what they are in C&C3). It's more ergonomic and close to the other command keys like A, S, Z, F. It is hard to use the YUIOP keys, because they're too far, even though they are very efficient.
The QWERT setup is a good way to run a menu. I think should reserve them for that and use other keys for unit commands.
2012-05-04 17:11:09 +12:00
psydev
8badbb3d60 Re-ordering the build menu a bit. Seems like guard tower should go before gun turret since it's more basic, cheaper and more often used. 2012-05-04 16:54:45 +12:00
psydev
57283b4a80 Increase range, cost and a modified damage on the MRLS (up vs. light armor, down vs. wood; 2 more bursts). Inaccuracy doubled from 30 to 60. Also increased MinRange from 2 to 4, and added burst delay while increasing rate of fire slightly (burst delay will add 24 to the rate of fire value, making it 70). Justification for these changes is to help fight against recon bike spam and stealth tank spam.
Increase APC gun damage from 6 to 12 (is currently pathetic against helis)

misc:
Made Artillery shell explosion appear bigger
Added contrail to Artillery shell
2012-05-04 16:54:36 +12:00
earthpig
d9992eea6a cnc - Increase rocket launcher cost from 800 to 1200 to reflect changes in range. 2012-05-04 16:51:52 +12:00
earthpig
c8c4507acf Few things with Zhukov AI. 2012-05-01 14:51:21 -07:00
psydev
5a37c84a8b improve chem warrior, flamethrower, grenadier and napalm drop 2012-05-02 09:10:53 +12:00
Chris Forbes
63898820f1 ra: drop mjolnir-1 map 2012-05-02 09:08:28 +12:00
psydev
63359e156c Increasing speed of flamethrowers and grenadiers 2012-05-02 09:01:26 +12:00
psydev
d683d69f3c Increase A-10 speed from 25 to 40 2012-05-02 09:01:05 +12:00
Chris Forbes
609d5bd611 ra: fix Flame Turret -> Flame Tower in unit name 2012-05-02 08:32:43 +12:00
psydev
0b894d3b31 Make silo first item in support/defense queue. 2012-05-02 08:30:38 +12:00
psydev
3a838a05cd Remove bib from HPAD 2012-05-02 08:29:06 +12:00
psydev
0a0b136b80 See ground beneath A-10 airstrike's flightpath 2012-05-02 08:27:26 +12:00
psydev
82549c6407 Increase Chinook capacity to 10 2012-05-02 08:26:27 +12:00
Chris Forbes
d737930bb0 #2076 fixed - missing widget id for WICW 2012-05-01 19:59:48 +12:00
Curtis Shmyr
dad67713fb Fix recent break in SupportPowerManager 2012-04-30 16:35:56 -06:00
psydev
a1082152a4 Urgent! Include in this release (fixes non-targeting of defensive towers/turrets). I made units no longer target ordinary buildings, but forgot to re-include targeting of the structures that shoot at you. 2012-05-01 07:26:06 +12:00
psydev
9f729b0c45 Made Chem Warriors walk through tiberium instead of around it and reduced their penalty for running through it to what would normally be "rough" terrain (80% instead of 70%).
Gave Commando Red Pip while passenger in APC/helicopter (can we get a more distinct color for engineer? Bright yellow or orange that contrasts from regular green, and/or pale blue).
Increased Commando shroud reveal to 6, since that will equal what 5 ought to be (infantry and vehicles have differences in sight range even when they have the same value, it seems http://i.imgur.com/Z6nWG.jpg)
2012-04-30 22:15:21 +12:00
psydev
ee7d8659d5 Removed bib from repair bay, to make it like the one from Red Alert.
Increased sight range of Construction Yard to 10.
2012-04-30 22:14:23 +12:00
psydev
4448c3e51b cnc: various balance changes, part 2
Infantry sight range +1 -- it seems that they have lower sight range than vehicles for some reason. See http://i.imgur.com/Z6nWG.jpg for infantry and vehicle, both with RevealsShroud: 5, but vehicle sees further. So, effectively 5 for infantry becomes 4, which seems reasonable.
Reduced probability of SpawnViceroid from 10% to 2%. 2% will still happen often enough if Chem Warriors are used predominantly, but with 10%, units were constantly turning to Viceroids, which was a pain. You could also send 10 infantry to opponent's tib field in early game and spawn a viceroid and kill their harvester or harass them.
Turned off units auto-targeting regular buildings, because often will attack silo over an obelisk or enemy unit. Auto-target should remain on for defensive towers/turrets, though.
2012-04-30 22:07:48 +12:00
psydev
174e925e5a cnc: various balance changes
As usual I'm trying to be conservative and only apply what I feel is suitable / minimally necessary.
Weapons:
Biggest change: Increased artillery range from 6 to 12, added contrail to bullet and changed impact sound to default C&C. Minimum range 2 given.
Napalm is currently very ineffective; increased spread to 20 range to make more likely to kill targets, ROF slightly increased
MRLS rocket ranged increased from 8 to 12, with minimum range 2.
Guard tower range increased from 4 to 5 (Pillbox is 6, for comparison) and damage increased from 20 to 40.
Grenadier death explosion reduced in damage from 25-10 and in blast radius.
2012-04-30 22:07:32 +12:00
earthpig
e7a8cdf951 Normal AI: Gone.
Zhukov AI: Bit of a turtle, but sends large attacks with arty/v2.
Rommel AI: Modified Hard AI.
2012-04-30 21:51:46 +12:00
Curtis Shmyr
45f5c054d5 Fix #2070; cannot sell when building is being captured 2012-04-30 21:37:09 +12:00
psydev
15dcd6a9f6 Harvester armor heavy 2012-04-30 21:35:35 +12:00
Chris Forbes
9c86196b16 fix crash in ChooseBuildTabOnSelect in replay 2012-04-30 21:32:57 +12:00
Curtis Shmyr
9185dc65d5 Initial pbox pax changes 2012-04-30 21:18:10 +12:00
Chris Forbes
e0bfa287ee new flamer integrated 2012-04-30 21:13:15 +12:00
Chris Forbes
80f142c8ea flamer that doesnt suck 2012-04-30 20:51:10 +12:00
Chris Forbes
7050fbc6e1 add napalm1 SHP and wiring in ra/sequences 2012-04-30 20:38:42 +12:00
Chris Forbes
2c938bc305 add sniper SHP 2012-04-30 20:33:36 +12:00
Chris Forbes
cd6bfb1b9a add better flame projectile SHP 2012-04-30 20:33:21 +12:00
Chris Forbes
11b253e4c3 add gate SHPs 2012-04-30 20:33:03 +12:00
earthpig
d625e2624a Fixed #2010 - arty in line now only has only 75% chance of exploding
When an arty in a group of them dies, each individual arty only has a 75% chance of perpetuating the genocide of arty.... so usually, it'll stop before killing your whole line but not before seriously hurting it.
2012-04-29 19:20:46 +12:00
earthpig
a544bc966b #2048 fixed: make AI behavior more varied 2012-04-29 19:15:55 +12:00
psydev
9a3aae6586 cnc: change AI to not be totally useless 2012-04-29 10:56:47 +12:00
psydev
390e607e66 cnc: remove nuke crate 2012-04-29 10:55:46 +12:00
psydev
22b18f99db cnc: remove hide-map crate 2012-04-29 10:54:51 +12:00
Chris Forbes
c30d46c014 #2051 fixed -- Widget.Get() throws by default 2012-04-27 19:39:07 +12:00
Chris Forbes
5d1a071287 fix crash in colorpicker 2012-04-26 21:42:07 +12:00
Chris Forbes
16e00c1f12 shimmering cloak in cnc 2012-04-25 22:24:38 +12:00
Chris Forbes
87271a0a56 make cloak palette configurable 2012-04-25 21:45:38 +12:00
Chris Forbes
dadc496c19 beef up OpenRA.FileFormats.Set a little; use it in CncMenuPaletteEffect rather than making new List<string> every frame 2012-04-25 21:43:00 +12:00
Chris Forbes
a0940e7ae5 unify water palette rotation 2012-04-25 21:32:33 +12:00
Chris Forbes
ca1fbb187b misc whitespace tidyups 2012-04-25 21:31:27 +12:00
Chris Forbes
89025a3042 make attackmove on spawn work properly for things that cant attackmove 2012-04-25 21:11:31 +12:00
earthpig
49f3f740e3 New units now AttackMove to their designated rally point. 2012-04-25 20:52:51 +12:00
Chris Forbes
4b4bbdf626 fix recent breakage in support powers 2012-04-25 01:58:37 +12:00
Chris Forbes
cebf908bb2 Fixed #2041 -- Force attack always targeted ground
Revert "Force attacks always go through, regardless of what is beneath them."

This reverts commit b2c72d6990.
2012-04-25 00:22:07 +12:00
Chris Forbes
75c105cb85 fix right edge of cheats close button 2012-04-25 00:06:48 +12:00
Chris Forbes
6669a66292 #2028 fixed - observer and dead map in cnc works again 2012-04-24 20:29:46 +12:00
Chris Forbes
6e3aa46008 #2039 fixed - add Sound.Engine config item, default is "AL" for OpenAL sound engine; "Null" gives you no sound 2012-04-24 20:23:41 +12:00
Chris Forbes
84a50e8e86 unify cheats panels 2012-04-24 20:04:21 +12:00
Chris Forbes
6559d8d8bc fix cnc direct connect panel 2012-04-24 19:47:04 +12:00
Chris Forbes
926686beff fix cnc cheats panel 2012-04-24 19:44:06 +12:00
Chris Forbes
6ab171af8b #2027 fixed - allow custom starting units for each faction 2012-04-24 19:29:53 +12:00
Chris Forbes
c4916bd997 #2038 fixed - add shadow to crates on the ground 2012-04-24 19:17:41 +12:00
Chris Forbes
f86332fd99 change pillbox hotkey to p 2012-04-20 14:41:45 +12:00
Chris Forbes
8d843cd8ad dropped map No Fly Zone 2012-04-19 11:04:51 +12:00
Chris Forbes
0904ac3a70 remove spurious trait lookup 2012-04-13 13:32:59 +12:00
Chris Forbes
8488223eee fix misspelling of Received 2012-04-13 13:28:31 +12:00
Chris Forbes
da3ba159db make failure of a lintpass nonfatal 2012-04-13 12:47:42 +12:00
Chris Forbes
3e0f52db1a fix cnc chrome yaml issues 2012-04-09 13:10:40 +12:00
Chris Forbes
062c49dac3 fix bogus widget id setup for resolution picker 2012-04-09 13:10:40 +12:00
Chris Forbes
533f9044cc strip redundant Id: elements from chrome yaml 2012-04-09 13:10:40 +12:00
Chris Forbes
b9eb3a0ad0 Patch widget loader to convert @key into Id member of widgets 2012-04-09 13:10:40 +12:00
Chris Forbes
dbd09ea843 Add building infiltrated sound to owner of spy on infiltrate 2012-04-09 10:33:39 +12:00
Chris Forbes
a4e1915aff warn the lobby when a client joins with DEV_VERSION 2012-04-09 09:40:22 +12:00
Chris Forbes
9d2833fc2b fix spelling error in comment 2012-04-09 09:39:57 +12:00
Chris Forbes
ab4c21f80c fix crash in server in StartGame if there are unvalidated connections 2012-04-09 09:18:54 +12:00
Chris Forbes
f7fea5ffce fix spelling error in Crate* comments 2012-04-07 11:06:26 +12:00
Chris Forbes
87e9a69ae0 fixed #2001: passengers shooting while in transports 2012-04-07 11:05:59 +12:00
Chris Forbes
25fb2a7be3 tidy 2012-04-07 10:29:25 +12:00
Chris Forbes
10c1b996ed tidy up disabled handling 2012-04-06 19:34:43 +12:00
Nukem
aa21ddaa4d Added new RA map: Tainted Peak 2012-04-06 18:36:50 +12:00
Chris Forbes
eab0e7ddf9 add range circle for gap generator 2012-04-06 18:35:04 +12:00
Curtis Shmyr
891cba456b give Gap Generator to allies 2012-04-06 18:23:30 +12:00
Chris Forbes
beb6b01796 show cashticks for DonateSupplies in spec 2012-04-06 18:14:58 +12:00
Chris Forbes
a52af4843e add cashtick for InfiltrateForCash 2012-04-06 18:14:11 +12:00
Chris Forbes
8dec48fee3 add spy reward for infiltrating refinery 2012-04-06 18:07:39 +12:00
Chris Forbes
b081103866 add infiltrate for exploration(reset) ability 2012-04-06 17:47:17 +12:00
Chris Forbes
4a76e2ad33 slight tidy in InfiltrateForSupportPower 2012-04-06 17:36:39 +12:00
Chris Forbes
b39eeddb45 adjust priority of Spy actions to prefer disguise/infiltrate when they match 2012-04-06 16:37:12 +12:00
Chris Forbes
7d4186c236 add SilencedPPK weapon for spy 2012-04-06 16:27:04 +12:00
Chris Forbes
01a724d632 only allow SpyInfiltrate/Disguise orders on Spy when not doing ForceAttack 2012-04-06 16:13:33 +12:00
Chris Forbes
ca1549df2a allow forceattack to be allowed/banned on UnitOrderTargeter 2012-04-06 16:05:35 +12:00
hasufell
0ae8e41612 add music themes which are available on cd-content 2012-04-06 14:47:04 +12:00
Curtis Shmyr
bc8c433a72 Modified Capturable to have a capture time; fixes #2002 2012-04-06 14:47:04 +12:00
Chris Forbes
7187b14459 drop Daejeon map 2012-04-03 16:21:19 +12:00
Chris Forbes
07d25d97ab fix missing escape keybinds in ra 2012-04-03 09:54:40 +12:00
Chris Forbes
4d5f89909e tanya is only available to allies 2012-04-03 09:54:29 +12:00
Chris Forbes
60fa61840d Spy drops disguise on attacking 2012-04-02 13:28:58 +12:00
Curtis Shmyr
499234e5dd Fixed #1321; no main menu after lobby disconnect/failed retry 2012-04-02 10:13:17 +12:00
hasufell
1010276cd5 make paths modifiable, fix broken install-rules, fix INSTALL 2012-04-02 09:21:51 +12:00
Curtis Shmyr
fdef80c53a Modify Cargo trait to support initial passengers 2012-03-23 15:16:48 +13:00
Kenny Hoxworth
22d3709967 Allow the targeting of water tiles by default. This still doesn't allow targeting of underwater, which is they way it should be. Now ground based units will be allowed to force-attack water tiles. 2012-03-23 10:07:11 +13:00
Kenny Hoxworth
b2c72d6990 Force attacks always go through, regardless of what is beneath them. 2012-03-23 10:06:59 +13:00
Chris Forbes
6f688275c5 include source location when complaining about bad miniyaml indents 2012-03-16 18:43:41 +13:00
Chris Forbes
5b8334b26d drop ILogicWithInit, no longer used 2012-03-16 18:43:41 +13:00
Chris Forbes
23ea8493ba fix crash in cnc replay viewing with radar 2012-03-16 18:43:40 +13:00
Chris Forbes
cc9dbd43c3 fix permissions on apc turrets 2012-03-13 09:11:35 +13:00
Chris Forbes
8308f82926 use the correct user for deployment 2012-03-04 13:08:50 +13:00
Chris Forbes
11f322a758 Fix smoke being triggered by healing as well as damage 2012-03-04 12:54:35 +13:00
Chris Forbes
6376615781 make 4tnk use damage cooldown for heal 2012-03-04 12:44:44 +13:00
Chris Forbes
f4b302e01a add support for damage cooldown on SelfHealing 2012-03-04 12:39:46 +13:00
Chris Forbes
703d6648d7 fix C2 ProximityCaptor sillyness 2012-03-04 12:31:02 +13:00
Curtis Shmyr
f19807f0ca Changed TTNK cost to 1500, hit points to 150 2012-03-03 16:18:11 -07:00
Curtis Shmyr
a523510922 Changed E4 (flamethrower) build prerequisite to FTUR 2012-03-03 16:12:13 -07:00
Chris Forbes
47194fab71 Add defend stance support for turreted units 2012-03-04 11:42:21 +13:00
Chris Forbes
75e32c0573 don't fetch IFacing unless we actually need it, in Attack 2012-03-04 11:17:46 +13:00
Chris Forbes
38b5a8d4f8 Fix #1327 - div/0 in Drag with extreme movement speeds 2012-03-03 18:17:21 +13:00
wuschel
522c88dcda Added map by wuschel: Ares National Park 2012-03-03 18:07:47 +13:00
Curtis Shmyr
3375a5de51 Oil derricks are not required to be destroyed when eliminating a player 2012-03-03 18:07:29 +13:00
Chris Forbes
68933880b9 Fix #1349 - Add configurable threshold for RepairableNear, default is 4 cells. 2012-03-03 18:05:31 +13:00
Chris Forbes
469a393585 give RepairableNear access to its info 2012-03-03 18:01:50 +13:00
Chris Forbes
be1fdbdd56 Fix #1348 -- Tesla Coils now support Stop (S) order 2012-03-03 17:44:41 +13:00
Curtis Shmyr
2972728b5e Ctrl-Shift-numkey performs unit grouping into existing groups 2012-02-19 08:47:43 +13:00
Sam Hegarty
78ba76250d Remove dependency on mesa-dri-drivers-experimental for the rpm package
- this package is no longer available in recent releases of Fedora
      and shouldn't be REQUIRED anymore.
2012-02-17 19:58:18 +13:00
Curtis Shmyr
603014b163 Added 3 maps by wuschel: Poseidon, Ares and Apollo 2012-02-13 09:11:54 +13:00
Nukem
6b85518b74 Added new map by Nukem: Breaking Point 2012-02-13 09:11:54 +13:00
Blarget2
d3578273db Added new map by Blarget2: Temperal 2012-02-13 09:11:54 +13:00
Curtis Shmyr
54f3c76da8 Removed random sbag in Mjolnir-2 2012-02-13 09:11:54 +13:00
Curtis Shmyr
95b908b234 Fixed bug where bots weren't given proper client index 2012-02-13 09:11:54 +13:00
Curtis Shmyr
3b94728869 Reduced amount of mines MNLY.AT carries from 5 to 3 2012-02-13 09:11:32 +13:00
Curtis Shmyr
b8b9d34404 Aircraft can use friendly service depots/airfields/helipads 2012-02-13 09:11:32 +13:00
Chris Forbes
a5cfc20e0b dont reinvent base64 decoding 2012-02-13 09:10:01 +13:00
Chris Forbes
3cf09e656f Add support for negative prerequisites (#1323) 2012-02-13 09:10:01 +13:00
Chris Forbes
1f8859f26b remove useless TUtil type alias from IronCurtainPower 2012-02-13 09:10:01 +13:00
Chris Forbes
6555bc9dbc use curl instead of wget 2012-02-13 09:10:01 +13:00
Chris Forbes
49fb0228fa fix upload script to use scp rather than ftp; ftp no longer available on the webserver 2012-02-13 09:10:00 +13:00
Nikita Tsukanov
ad29926391 Removed Connection.PlayerIndex == 0 checks if favor of Session.Player.IsAdmin 2012-01-09 15:37:55 +04:00
Chris Forbes
85293a482e remove spurious allowMovement parameter from ScanAndAttack 2012-01-07 20:33:56 +13:00
Chris Forbes
6315864f84 add Defend unit stance 2012-01-07 20:33:56 +13:00
Chris Forbes
c169bc3c51 fix #1320 bogus use of Game.CosmeticRandom from server thread 2012-01-07 20:33:56 +13:00
Chris Forbes
1de3db0903 Don't take a NRE in GiveUnitCrateAction.GetSuitableCells if not Mobile 2012-01-07 20:33:56 +13:00
Chris Forbes
965fe88755 #1284 fixed; don't show spawnpoints on serverbrowser thumbnails 2011-12-31 11:32:59 +13:00
Chris Forbes
809b716d0d tidy silly Enum.GetValues type nonsense 2011-12-31 11:02:38 +13:00
Chris Forbes
004c59d273 sort the serverlist by whether we can join the game 2011-12-31 10:58:31 +13:00
Chris Forbes
c34b254fd8 stop repairing a building if we don't like its owner (fixes interaction with capture) 2011-12-31 10:50:18 +13:00
Chris Forbes
0d25b6b5c9 use spacebar to go to last attack event 2011-12-31 10:48:30 +13:00
Chris Forbes
85eeb8b819 tidy 2011-12-28 08:16:51 +13:00
Chris Forbes
e84d90fc3a more general tidying 2011-12-28 08:13:36 +13:00
Chris Forbes
418b8d40f9 improve TraitDictionary error messages 2011-12-28 08:02:09 +13:00
Chris Forbes
9581595a3d remove spurious null checks in Shroud -- all actors have an owner, always. 2011-12-27 21:53:31 +13:00
Chris Forbes
0aa7ba6bd4 remove sillyness in DelayedAction.CompareTo 2011-12-27 21:48:42 +13:00
Chris Forbes
2793d1076a clean up inconsistency in InvisibleToEnemy 2011-12-27 21:23:25 +13:00
Chris Forbes
d57dfd1997 tidy 2011-12-27 21:23:25 +13:00
Chris Forbes
f8122047b6 ShpLoader is no longer IEnumerable 2011-12-27 18:10:52 +13:00
Chris Forbes
d115c6305c general tidying in ShpReader 2011-12-27 18:02:32 +13:00
Chris Forbes
f63cdf37d7 tidy usings in Graphics.Util 2011-12-27 14:53:18 +13:00
Chris Forbes
dd88a1269a move MakeArray to FileFormats.Exts 2011-12-27 14:52:11 +13:00
Chris Forbes
523183431b remove some duplication and dead code 2011-12-27 14:48:10 +13:00
Chris Forbes
132c678594 add --remap cmdlet to OpenRA Utility, remaps between ra/cnc/etc palettes. 2011-12-27 11:48:22 +13:00
Chris Forbes
f8127ab9df don't start writing replays until gamestart 2011-12-24 21:07:53 +13:00
Chris Forbes
d61055af8f work toward deferrable start of replay saving 2011-12-24 20:39:33 +13:00
Chris Forbes
4e6ff7616c tidy in FileSystem 2011-12-24 19:41:45 +13:00
Chris Forbes
f2dd5eb0a3 simplify UOG 2011-12-24 12:19:59 +13:00
Chris Forbes
f7e35899cf tidy ReplayConnection 2011-12-24 10:11:31 +13:00
Chris Forbes
727b897994 split ReplayRecorderConnection out into its own file 2011-12-24 10:05:14 +13:00
Chris Forbes
8029973e33 cull RA maps Paramount and Pandemonium, not played enough 2011-12-23 18:30:26 +13:00
Chris Forbes
bd4345c2d0 tidy in UnitOrders 2011-12-23 16:57:24 +13:00
Chris Forbes
4bcd19f57c remove bogus SurrenderOnDisconnect feature 2011-12-23 16:46:40 +13:00
Chris Forbes
bc38e99495 add base attack notification support to cnc 2011-12-23 16:43:10 +13:00
Chris Forbes
c1e6e3f9b9 don't announce self-damage 2011-12-23 16:41:29 +13:00
Chris Forbes
480c35ab58 add base attack notification 2011-12-23 16:31:29 +13:00
Chris Forbes
fdafb9d411 fix broken capitalization of variantExt 2011-12-19 14:40:05 +13:00
Chris Forbes
23a9e0503d don't crash on missing voice phrases 2011-12-19 14:39:00 +13:00
alzeih
aa9dd73fe5 Fix #1236 - Aircraft with full health landing on FIX costs the player money
Note: still allows a plane on full health to land on FIX.
2011-12-14 00:01:58 +13:00
alzeih
1b0724719d Make LineRenderer understand Zoom internally 2011-12-13 23:58:39 +13:00
alzeih
c8ae6127f3 Fix #1128 - Use Line Width support in LaserZap 2011-12-13 23:58:34 +13:00
Chris Forbes
40029c6688 use string.F() extension method everywhere possible; fix various small issues in error messages 2011-12-13 23:57:23 +13:00
Chris Forbes
af3d00836a remove spurious Clone() from TooltipContainerWidget; all it did was make the error message *worse* 2011-12-13 23:48:32 +13:00
Chris Forbes
bf5be88c75 rename Ui.RootWidget to just Ui.Root 2011-12-13 23:46:58 +13:00
Chris Forbes
58f6816d84 convert silly DoXXX names to just XXX 2011-12-13 23:44:40 +13:00
Chris Forbes
ed429a3b30 split Widget static bits into Ui static class 2011-12-13 23:38:59 +13:00
Chris Forbes
83055f0a17 convert RootWidget prop back to field, now that it has trivial get/set 2011-12-13 22:30:51 +13:00
Chris Forbes
dd55c0ad93 remove spurious parens on return 2011-12-13 22:27:10 +13:00
alzeih
1bea7e3286 Fix #1297 - CNC server browser status text placement is wrong 2011-12-13 22:09:59 +13:00
alzeih
b508f7c300 Fix #1269 - Transport Helicopter Loading while in the Air
Note that weight is now checked for cargo (this might break things)
2011-12-13 12:38:39 +13:00
Chris Forbes
7e590b05c1 fix broken 'burn' sequence for snow t11 2011-12-13 12:28:15 +13:00
Chris Forbes
6c027372ab fix naming of event handlers in editor 2011-12-10 09:08:31 +13:00
Chris Forbes
6bac11f071 fix formatting in editor.Form1 2011-12-10 09:08:31 +13:00
Chris Forbes
87a420623b tidy FileSystem.Exists 2011-12-10 09:08:31 +13:00
Chris Forbes
1e4f1a9f19 remove duplication in FileSystem.Open[WithExts] 2011-12-10 09:08:31 +13:00
Chris Forbes
410cad6f1e use priority correctly in FileSystem.OpenWithExts 2011-12-09 22:16:20 +13:00
Chris Forbes
69a869a44d fix empty array init style in Manifest 2011-12-09 22:08:25 +13:00
Chris Forbes
de88cb33f3 fix indent in Manifest 2011-12-09 22:07:15 +13:00
Chris Forbes
5ea756506b update comment in map save 2011-12-09 22:03:53 +13:00
Chris Forbes
fb1b7ac706 remove useless comments around actor loading 2011-12-09 22:02:07 +13:00
Chris Forbes
3003e49277 remove spurious extra FieldLoader.Load() call in Map.cs 2011-12-09 21:58:57 +13:00
Chris Forbes
a7c3052243 remove some silly duplication in Map.cs 2011-12-09 21:54:04 +13:00
Chris Forbes
c3a6674da0 fix bogus sequences in cnc 2011-12-09 20:28:26 +13:00
Chris Forbes
9d6094f798 fix bogus 'burn' sequence for t15 2011-12-08 13:05:32 +13:00
Chris Forbes
2747fadd96 #657 give a useful error message when a sequence references frames outside the range that actually exist 2011-12-03 19:23:14 +13:00
Chris Forbes
66c59add94 write RadarWidget transforms sanely 2011-12-03 11:38:09 +13:00
Chris Forbes
4610461a81 fix naming convention in RadarWidget 2011-12-03 11:29:27 +13:00
Chris Forbes
c1cbe0f0f5 Simplify some of the mess in RadarBinWidget 2011-12-03 11:28:42 +13:00
Chris Forbes
a566a372f5 (2/2) #1210 Remove QueueResupplyActivities entirely, just queue ResupplyAircraft 2011-12-03 10:16:10 +13:00
Chris Forbes
7b06e39390 (1/2) #1210 Untangling QueueResupplyActivities 2011-12-03 10:16:10 +13:00
Chris Forbes
b8c4ff8668 tidy GetTargetQueue 2011-11-29 11:46:57 +13:00
Chris Forbes
3d25e59e9e update AUTHORS 2011-11-29 10:13:17 +13:00
Chris Forbes
1df572e6ee tidy in MasterServerPinger 2011-11-29 10:01:55 +13:00
Kenny Hoxworth
98d4af18a4 Don't cancel the FlyAttack activity if the activity has already been canceled. The Tick routine calls Cancel() on FlyAttack, which removes any NextActivity that may have been set by an outside listener. This is the case with a rare bug causing planes to be killed, removed from the playable game, but still existing in the game world. 2011-11-29 08:57:04 +13:00
Matthew Bowra-Dean
0f97466a75 Remove spurious .swp file 2011-11-28 09:19:46 +13:00
Chris Forbes
58a6c01c3b add framelimiter as per Joseph_Vissarion's patch 2011-11-26 16:17:34 +13:00
Chris Forbes
8bdab6a5f2 tidy in Settings 2011-11-26 15:54:43 +13:00
Mark Olson
f043aa6366 DISCONNECT should use a LeaveGame'ish method.
It should be moved out of IngameChromeLogic, but I don't know where to..
2011-11-25 18:03:12 +13:00
Mark Olson
8933b201f1 Add buttons to Observe or Leave after a user's game ends. 2011-11-25 18:03:04 +13:00
Mark Olson
2bb968d0d3 Hide Chrome once we have Won or Lost 2011-11-25 18:01:34 +13:00
Raymond Martineau
bf222425fc Fix bug #1271 2011-11-25 17:49:05 +13:00
Chris Forbes
0ea9e06c22 remove spurious parameter from ScanAndAttack 2011-11-25 17:41:19 +13:00
Chris Forbes
54e8266e37 tidy AttackOrderTargeter 2011-11-25 17:38:58 +13:00
Chris Forbes
2679e91b03 remove duplication in cnc order button wiring 2011-11-25 17:22:22 +13:00
Chris Forbes
2462902d8b remove some duplication in binding order buttons 2011-11-25 15:12:04 +13:00
Chris Forbes
55f811faf5 remove some duplication in global order OGs 2011-11-25 15:11:49 +13:00
Chris Forbes
45c41b6696 allow building repair always 2011-11-24 15:23:08 +13:00
Chris Forbes
6040b55d17 update CHANGELOG 2011-11-08 09:17:23 +13:00
Curtis S
77fc6199fe New serverbrowser for RA and CNC 2011-11-06 22:49:40 -07:00
Curtis S
49bf93085f Added support to GivesBounty for setting player Stances which give bounties 2011-11-06 13:24:20 -07:00
Curtis S
aa7d688905 Update ra mapchooser chrome as per lobby code merge 2011-11-06 10:12:16 -07:00
Chris Forbes
83929af62a tidy 2011-11-06 22:13:21 +13:00
Chris Forbes
6cb8ee1f9f expose appropriate *Inits, and make them work in editor 2011-11-06 18:17:13 +13:00
Chris Forbes
772734d032 merge cnc and ra lobby, fixes #1267, #1224, #106, others 2011-11-06 17:01:00 +13:00
Chris Forbes
4576eaadd6 more tidy 2011-11-06 11:39:49 +13:00
Chris Forbes
c20d71c9af make CncLobbyLogic tolerant of missing music button 2011-11-06 11:38:44 +13:00
Chris Forbes
40b89d177f make some cnc helper functions not public 2011-11-06 11:34:08 +13:00
Chris Forbes
314db743fc change CncConnectingLogic to CncConnectionLogic to match filename 2011-11-06 11:21:47 +13:00
Chris Forbes
9b5c7c2379 remove dead GetInheritanceChain in ActorInfo 2011-11-06 11:09:30 +13:00
Chris Forbes
564fdd650d add mechanism for traits to export the *Inits they can use 2011-11-05 12:29:55 +13:00
Chris Forbes
bd90666c07 tidy 2011-11-05 11:40:13 +13:00
Chris Forbes
cd155b21c9 tidy up some bizarre namespacing 2011-11-04 20:13:41 +13:00
Chris Forbes
cbee1513f3 fix formatting in CanPowerDown 2011-11-04 20:02:09 +13:00
Chris Forbes
6932db1d05 fixed #1264 - squish sound is positioned now 2011-11-04 19:45:02 +13:00
Chris Forbes
718742be4a fixed #1263 - don't trash the current directory on exporting a minimap 2011-11-04 19:28:19 +13:00
Chris Forbes
4ad7af8a58 fixed #1245 - repopulate the player chooser in the editor after refreshing the playerlist 2011-11-04 19:21:33 +13:00
Chris Forbes
57e2d4f9b1 fixed #1237 - crash in UpdateCurrentMap 2011-11-04 19:16:53 +13:00
Chris Forbes
5a029e337a fixed #1257 - predict stance changes on the client 2011-11-04 19:09:46 +13:00
Chris Forbes
bc5efa3fc5 #1241 fixed - crash in ChooseBuildTabOnSelect.SelectionChanged 2011-11-04 19:03:38 +13:00
Chris Forbes
192cbaf744 fix namespace for ChooseBuildTabOnSelect 2011-11-04 19:00:34 +13:00
Chris Forbes
053d661ed7 #1251 fixed - ss,msub,stnk have correct initial stance and can autotarget 2011-11-04 16:40:43 +13:00
Chris Forbes
9ac912fa0e #1262 fixed -- initial unit stance via AutoTarget:InitialStance: 2011-11-04 16:33:20 +13:00
Chris Forbes
b6c2b928cb fixed #1249 - use unit priority logic to select initial unit in doubleclick 2011-11-04 08:46:14 +13:00
Chris Forbes
58b437b7ea fix #1246 2011-11-04 08:29:46 +13:00
Curtis S
7498af6b66 Update CHANGELOG 2011-11-01 20:54:04 -06:00
Chris Forbes
b88a32759c fixed #800 - infantry can walk on AT mines 2011-11-01 22:16:35 +13:00
Chris Forbes
c9fd874b07 unify colorpickers across ra and cnc 2011-11-01 22:00:29 +13:00
Chris Forbes
a060d99780 add dropdown in editor for choosing owner of new actors 2011-11-01 22:00:29 +13:00
Seru
7bc7fbc006 Added ra map: Asymetric Battle 2011-11-01 22:00:29 +13:00
Nukem
ce8bcd1576 Updated ra map: Pandemonium 2011-11-01 22:00:29 +13:00
Curtis S
465f917836 Removed ra map: bavarian redux 2011-11-01 22:00:29 +13:00
Curtis S
de7fbfc927 Fixed a spawnpoint on map River War 2 2011-11-01 22:00:28 +13:00
Chris Forbes
2eac701aab make SpawnMPUnits initial unit configurable 2011-11-01 22:00:28 +13:00
Chris Forbes
0edda0fb31 make bot building repair controllable via yaml 2011-11-01 22:00:28 +13:00
Raymond Martineau
72c6a428c9 Fix exception, requiring usage of IComparable 2011-11-01 22:00:28 +13:00
Chris Forbes
986bf039fa remove HackyAI -> MPStartLocations dep; implement aggro as per alzeih's old patch 2011-11-01 22:00:28 +13:00
Chris Forbes
4dc3013cd0 slight tidy to HackyAI 2011-11-01 22:00:28 +13:00
Chris Forbes
58cae272c6 push unit queues for HackyAI out to yaml 2011-11-01 22:00:28 +13:00
Chris Forbes
1df9003fec fixed #1169 - bot rallypoint debug changed to BotDebug() 2011-11-01 22:00:20 +13:00
Chris Forbes
f83c9fd4d7 add IEnum<T>.JoinWith, use it to clean up a bunch of things 2011-11-01 21:57:58 +13:00
Chris Forbes
8111ccbea6 tidy projectfiles, Map 2011-11-01 21:57:58 +13:00
Chris Forbes
c50aae25d3 remove spurious .ToArray() in MainMenuButtonsLogic 2011-11-01 21:57:57 +13:00
Chris Forbes
7a6f4d3b04 relax items type for DropDownButtonLogic.ShowDropDown 2011-11-01 21:57:57 +13:00
Chris Forbes
eaa4d06052 tidy readiness checks in lobby 2011-11-01 21:57:57 +13:00
Chris Forbes
53599f062c fix indent in UnitOrders 2011-11-01 21:57:57 +13:00
Chris Forbes
2a64df997a fixed #1244 - cnc lobby crash on player joining 2011-10-31 09:12:10 +13:00
Chris Forbes
5bb535b50c factor out Marshal.SizeOf calls 2011-10-31 09:11:47 +13:00
Chris Forbes
77ebd5d6de removing more renderer code duplication; cleanup 2011-10-31 09:11:47 +13:00
Chris Forbes
9279161de6 tidy in OreRefinery, Harvester, CncLobbyLogic, ScaredyCat 2011-10-31 09:11:33 +13:00
Chris Forbes
268f06caf0 use actor type string rather than ProductionItem in ChooseBuildLocation 2011-10-31 09:10:01 +13:00
Chris Forbes
3a5cce1f1f Split HackyAI.BaseBuilder into its own file; Move hackyAI components into OpenRA.Mods.RA.AI namespace and dir 2011-10-31 09:10:01 +13:00
Chris Forbes
bfddbeeb02 fixed #1232 -- bots repair their own damaged buildings 2011-10-31 09:10:01 +13:00
Chris Forbes
92f5d67ef1 fix stupid naming in Reservable 2011-10-31 09:10:01 +13:00
Chris Forbes
e602e086f3 remove unused ReplaceWithActor trait 2011-10-24 17:27:11 +13:00
Chris Forbes
35b0231746 fixed #669 -- helicopters bob slightly in flight 2011-10-24 17:12:23 +13:00
Curtis S
f5807f5f3b Fix #1230: crash when no hpad owned by player 2011-10-23 14:53:33 -06:00
Curtis S
d9fbee6e01 Update CHANGELOG 2011-10-23 18:44:23 +13:00
Curtis S
a04ab94717 Hellfire (longbow) missiles now fire in bursts of 2 2011-10-22 18:50:03 -06:00
Tirili
4f505eb6a1 Add ability to disable the shellmap 2011-10-23 13:24:26 +13:00
Tirili
6174ccc882 Change World.DisableTick to World.EnableTick 2011-10-23 13:11:39 +13:00
Chris Forbes
7cc0a45727 give migs 4 salvos x 2 missiles, slightly increase damage per missile 2011-10-23 12:55:13 +13:00
Chris Forbes
deeef336a1 group IPostRenderSelection impls by type, not by actor 2011-10-23 12:40:08 +13:00
Chris Forbes
ce8267992a remove self parameter from IPostRenderSelection.RenderAfterWorld 2011-10-23 12:23:15 +13:00
Chris Forbes
b9ac25e044 split sprite-based and line-based things in Selectable into two traits 2011-10-23 12:13:11 +13:00
Chris Forbes
4168e54715 tidy in Selectable 2011-10-23 11:50:53 +13:00
Chris Forbes
aef3ff6e65 remove some redundant SelectableInfo lookups 2011-10-23 11:49:38 +13:00
Curtis S
eebfb34ea2 Fix #1187; aircraft rearm properly now 2011-10-22 13:41:09 -06:00
Curtis S
b1b9d1fca2 Fixed open areas on map Man to Man 2011-10-22 13:27:34 -06:00
Curtis S
7d9641e195 Update helis logic for returning to hpad, to mirror that of planes returning to aflds 2011-10-22 13:26:51 -06:00
Curtis S
9e21282341 Fix #725; planes don't stack afld / planes will fly to empty aflds 2011-10-22 13:23:30 -06:00
Curtis S
935c2eff31 Changed SupplyTruck's order string to something more appropriate 2011-10-22 13:21:42 -06:00
Chris Forbes
ff86c4d7fa update AUTHORS 2011-10-22 16:43:03 +13:00
Nukem
143f9e0e84 added RA map: Man to Man 2011-10-22 13:05:48 +13:00
Christer Ulfsparre
dec8c8ba4b Added ability to join a server on startup, for gamelist apps. 2011-10-22 12:33:46 +13:00
Chris Forbes
c0b5455016 fixed #649 - remember last played map 2011-10-22 11:51:32 +13:00
Chris Forbes
e7ed9a1ff7 tidy up select-all-on-screen 2011-10-22 11:30:09 +13:00
Chris Forbes
eec751f76a remove duplicated edgescroll code in cnc 2011-10-22 10:25:50 +13:00
Chris Forbes
52cec1e170 reduce default tooltip delay in cnc to a playable level 2011-10-21 23:20:30 +13:00
Chris Forbes
a290af6fb5 tidy SiloBarWidget 2011-10-21 23:12:06 +13:00
Chris Forbes
c8122a13ff tidy in ProductionPaletteWidget 2011-10-21 23:00:23 +13:00
Chris Forbes
00372f4748 more general tidying in CNC widget code 2011-10-21 22:58:49 +13:00
Chris Forbes
4c26710ccb swap args to PlayerColorRemap 2011-10-21 22:15:51 +13:00
Chris Forbes
4a30019536 add equality comparisons to ColorRamp 2011-10-21 22:11:18 +13:00
Chris Forbes
0c2e1f81da tidy in ColorRamp 2011-10-21 22:10:30 +13:00
Chris Forbes
7106f1fe74 another formatting tweak 2011-10-21 19:38:19 +13:00
Chris Forbes
0a977b2940 work around for broken type inference engine in gmcs-2.6.7 2011-10-21 19:38:06 +13:00
Chris Forbes
6010034b4a remove ObjectCreator.Param and all associated nonsense 2011-10-21 18:16:07 +13:00
Chris Forbes
4c8e048c2c relax ObjectCreator.Param requirement on non-renamed args 2011-10-21 17:38:00 +13:00
Chris Forbes
88bfee872f more tidy in DrawLineToTarget 2011-10-21 17:03:18 +13:00
Chris Forbes
3548dacad3 collapse useless layer of crap in DrawLineToTarget 2011-10-21 16:52:50 +13:00
Chris Forbes
b7b2db9ace remove some insanity in DrawLineToTarget 2011-10-21 16:34:54 +13:00
Chris Forbes
b119c14599 fix whitespace in Settings 2011-10-21 10:22:43 +13:00
Curtis S
d47c4f7ca2 Fixed a spawnpoint in map daejeon 2011-10-19 18:15:44 -06:00
Chris Forbes
808464f4d5 get RA replay browser closer to CNC version 2011-10-19 20:04:05 +13:00
Chris Forbes
f5c4a94f93 change currentSummary -> currentReplay in CncReplayBrowserLogic 2011-10-19 19:57:04 +13:00
Chris Forbes
a7c276849d fix formatting 2011-10-19 19:54:05 +13:00
Chris Forbes
10733c3a31 remove useless .ToString() calls in replay browsers 2011-10-19 19:50:02 +13:00
Chris Forbes
03ddbac83b change ReplaySummary to Replay; move to OpenRA.Network 2011-10-19 19:45:13 +13:00
Chris Forbes
a3897dc7a8 tidy DirectConnectLogic 2011-10-19 19:38:47 +13:00
Chris Forbes
2d4b00ec2a remove useless calls to ToArray() in *DirectConnectLogic 2011-10-19 19:34:23 +13:00
Chris Forbes
42aa8a57c5 unify {RA,Cnc}DownloadPackagesLogic 2011-10-19 19:32:28 +13:00
Chris Forbes
1c69f5bef9 add (another) backup file pattern to .gitignore 2011-10-19 16:02:01 +13:00
Chris Forbes
511c956117 fix title of map properties dialog 2011-10-19 10:13:46 +13:00
Chris Forbes
a5547eac97 fix typo in Bridge 2011-10-19 10:11:18 +13:00
Chris Forbes
325ec41182 remove dead functions from Arguments.cs 2011-10-18 21:58:17 +13:00
Chris Forbes
a1dd5cedd4 clean up duplicate trait lookup in RASpecialPowers 2011-10-18 21:52:58 +13:00
Chris Forbes
c790c41465 unify bot spawn choosers in CNC and RA 2011-10-18 21:39:12 +13:00
Chris Forbes
7161b8062e remove useless 'map' arg on ConvertToPreview 2011-10-18 20:55:49 +13:00
Chris Forbes
eddc4cc4b1 remove useless map var in CncLobbyLogic too 2011-10-18 20:47:48 +13:00
Chris Forbes
12968ff9b9 tidy LobbyLogic spawn chooser 2011-10-18 20:43:00 +13:00
Chris Forbes
7ef93f2cf5 remove useless var in LobbyLogic 2011-10-18 20:38:06 +13:00
Chris Forbes
59fdceb4fd convert Map.SpawnPoints to int2[]; tidy 2011-10-18 20:34:00 +13:00
Chris Forbes
0f7a744ef7 replace ridiculous GetSpawnColors function with something tidier 2011-10-18 20:23:10 +13:00
Chris Forbes
50010faf58 move duplicates of GetSpawnColors to LobbyInfo 2011-10-18 20:15:31 +13:00
Chris Forbes
89ea4d1e0a unify C&C and RA colorpicker palette manipulation code 2011-10-18 20:09:24 +13:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
227bbc109e fix wonky indent in WorldRenderer.cs 2011-10-18 14:55:51 +13:00
Chris Forbes
737756be51 fix formatting in Game.cs 2011-10-18 13:54:50 +13:00
Chris Forbes
1d5201d797 remove OpenRA.Renderer.SdlCommon.dll in windows uninstall 2011-10-17 17:36:00 +13:00
Curtis S
e29f838425 fixed author on map Paramount 2011-10-16 22:34:27 -06:00
Nukem
3432ce256a added RA map: Engagement 2011-10-16 22:33:11 -06:00
Nukem
cd8f8dbc0f added ore wells to ra map Mass Confliction 2011-10-16 15:15:40 -06:00
Sprog
b912f69212 Added RA map: Bombardment Islands 2011-10-16 15:12:32 -06:00
Curtis S
4812eb95b6 show bot info to all players in lobby 2011-10-16 15:06:13 -06:00
Curtis S
ea0348977e fixed playercount on ra map Battle Lake 2011-10-16 13:56:30 -06:00
Chris Forbes
2566b44627 preserve whole CountryInfo object in ProductionQueue 2011-10-15 13:46:36 +13:00
Chris Forbes
3716f0561c fix formatting 2011-10-15 13:01:45 +13:00
Chris Forbes
1e32014190 add CountryInfo.Selectable 2011-10-15 13:00:19 +13:00
Chris Forbes
d9d0e74d74 remove dead HttpUtil class 2011-10-15 12:38:23 +13:00
Chris Forbes
3991026cf3 add a new menu item to setup default players in editor 2011-10-15 12:29:17 +13:00
Chris Forbes
d202f9627f fix #1205 -- desync when AI builds harvs 2011-10-14 08:24:45 +13:00
Chris Forbes
770cdf38b6 update CHANGELOG for release 2011-10-13 09:48:50 +13:00
Chris Forbes
1e67984806 fix #1099 -- bogus armor on FTNK 2011-10-13 09:39:10 +13:00
Curtis S
5b23fd4873 update CHANGELOG 2011-10-11 22:08:57 -06:00
Nukem
35d167a4fd Added RA map by Nukem: HotZone 2011-10-11 22:08:10 -06:00
Curtis S
32d466ba10 update CHANGELOG 2011-10-11 21:43:12 -06:00
Chris Forbes
6ef8dbf282 updated changelog 2011-10-12 08:16:34 +13:00
Bellator
8de52cf7bc add Battle Lake map 2011-10-12 08:14:09 +13:00
Chris Forbes
261c4c5b62 update AUTHORS 2011-10-12 07:55:28 +13:00
Raymond Martineau
603a29b70d Flame turret range fix (previously outranged by infantry, despite being strong vs. infantry) 2011-10-12 07:53:18 +13:00
Curtis S
0d0d91113c update AUTHORS 2011-10-10 20:14:30 -06:00
Riderr3
536388ab5c Added new RA map by Riderr3: Drop Zone W 2011-10-10 20:13:52 -06:00
Curtis S
03b3649e54 changed MEDI cost to 300; changed SHOK cost to 500 2011-10-10 20:02:45 -06:00
Curtis S
16aec6ba90 Enabled tank squish in RA for 2tnk/3tnk/4tnk/ttnk/harv/mcv 2011-10-10 20:02:04 -06:00
Chris Forbes
47757161d6 fix cancel interaction with UnloadCargo activity; punt to the end of the frame 2011-10-11 14:47:16 +13:00
Chris Forbes
26b9feaf4b support transforming to a different actor type as a result of a passenger entering or leaving 2011-10-11 14:42:36 +13:00
Chris Forbes
c4256faf18 preserve cargo across transform 2011-10-11 14:42:35 +13:00
Chris Forbes
c39050fdda support setting initial cargo of units via ActorInit 2011-10-11 14:42:35 +13:00
Chris Forbes
f085b79491 add hooks for passengers entering/leaving a vehicle 2011-10-11 14:42:35 +13:00
Chris Forbes
206cb88146 update INSTALL file 2011-10-11 09:57:56 +13:00
Chris Forbes
eda7f17ad8 update AUTHORS 2011-10-11 09:52:24 +13:00
Chris Forbes
7f1918d07b add stance cycling on 'z' 2011-10-11 09:33:50 +13:00
Chris Forbes
59e4dd666a updated CHANGELOG 2011-10-11 08:06:37 +13:00
Nukem
1a15398605 add Chokepoint map 2011-10-11 08:06:26 +13:00
Bellator
75e65bf4c5 add Tiberium Oasis map 2011-10-11 08:06:24 +13:00
Bellator
81316a240b add Mad Scramble map 2011-10-11 08:06:24 +13:00
Chris Forbes
ac263697da fix #1197 -- bottom cordon of hectic was right against the map edge 2011-10-11 08:06:24 +13:00
Chris Forbes
20c4db914c implement selectable rules of engagement for AutoTarget 2011-10-11 08:06:23 +13:00
Curtis S
ea3ad0e378 Temp fix for #1200: SystemInformation.DoubleClickTime caused segfault in libx11 on some debian systems 2011-10-11 08:06:23 +13:00
Chris Forbes
2c415a8fd6 add tmp->png conversion to utility 2011-10-11 08:06:23 +13:00
Chris Forbes
a34b2d8c53 combine tileset.{Tiles,Templates}; image data now accessed via Templates[].Data 2011-10-11 08:06:23 +13:00
Chris Forbes
e2cbfb920b tidy in TileSet 2011-10-11 08:06:23 +13:00
Chris Forbes
1f1c2b25b0 move RenderTemplate onto TileSet 2011-10-11 08:06:23 +13:00
Chris Forbes
eaf15fa6b5 tidy in TileSet 2011-10-11 08:06:23 +13:00
Nukem
d2740847cf new AI configuration -- supports 3 difficulty levels 2011-10-11 08:06:06 +13:00
Curtis S
62e9f5c3f7 Removed pointless var in spawn picking logic 2011-10-10 17:15:45 +13:00
Curtis S
9d8ff12d23 Updated RA map Center of Attention 2011-10-10 17:15:43 +13:00
Chris Forbes
7864aeed37 remove obsolete Tao.Platform.Windows packaged dep 2011-10-10 16:25:26 +13:00
Chris Forbes
dc8726a6a0 fix multitap for keyboard events, in a way that doesnt break scrolling etc 2011-10-10 13:07:31 +13:00
Curtis S
3027c9d6f2 update CHANGELOG 2011-10-08 19:12:48 -06:00
Curtis S
bdf9447798 Added 3 RA maps by RAGEQUIT 2011-10-08 18:59:29 -06:00
Curtis S
756a3e551d Removed random sandbag from vegetation oramap 2011-10-08 18:45:04 -06:00
Curtis S
2da46a418f Added more options for bots in RA game lobby 2011-10-08 18:44:21 -06:00
Chris Forbes
88554a5039 temp disable multitap keys (not used yet); breaks keyboard scrolling 2011-10-09 12:48:36 +13:00
Chris Forbes
9f86ef526f move LobbyUtils into its own file 2011-10-09 12:02:57 +13:00
Chris Forbes
57308773a2 grid layout mapchooser in cnc too 2011-10-09 11:12:57 +13:00
Chris Forbes
d6f4b61b1c fixed #1187 - aircraft now reload when ordered back to base via F 2011-10-08 22:22:42 +13:00
Chris Forbes
6922ff3bf9 have ReturnOnIdle use QueueResupplyActivities so it works for airfields that can both rearm and repair 2011-10-08 22:17:15 +13:00
Chris Forbes
1702a9e9f5 tidy helicopter 2011-10-08 22:11:01 +13:00
Chris Forbes
38b6d3527b remove duplicate of ReserveSpawnBuilding from heli 2011-10-08 22:08:38 +13:00
Chris Forbes
9719e10edd drop spurious 'self' from ReserveSpawnBuilding, GetActorBelow 2011-10-08 22:07:15 +13:00
Chris Forbes
c7f780eb1d factor out GetActorBelow from ReserveSpawnBuilding 2011-10-08 22:04:21 +13:00
Chris Forbes
a193eeb202 Convert RA mapchooser to use a grid of minimap images 2011-10-08 21:35:46 +13:00
Chris Forbes
957c1cc74c tidy in ShpImageWidget 2011-10-08 18:16:12 +13:00
Chris Forbes
92bdec7f1d factor out layout policy for ScrollPanelWidget; add GridLayout option. 2011-10-08 18:15:24 +13:00
Chris Forbes
cf46a7ed5f scroll maplist to the top when changing filter 2011-10-08 17:36:48 +13:00
Chris Forbes
f966c08fed remove playercount labels in RA mapchooser 2011-10-08 17:20:52 +13:00
Chris Forbes
be8682fc19 move TextAlign out of LabelWidget 2011-10-08 17:20:52 +13:00
Chris Forbes
12b8774e6d game mode selector in map chooser 2011-10-08 17:20:09 +13:00
Chris Forbes
6c78bb481d fix ctor formatting 2011-10-08 17:19:44 +13:00
Chris Forbes
f79dfd51a2 add gamemode filter to EnumerateMaps 2011-10-08 17:09:01 +13:00
Chris Forbes
8e3bcb892f tidy multitap code up a lot 2011-10-08 17:09:01 +13:00
Curtis S
9b826d91a4 Fixed bogus yaml removals in koth maps 2011-10-07 21:55:41 -06:00
Curtis S
d802cbfd9d Fixed tank squish anims for CNC 2011-10-06 22:06:56 -06:00
Curtis S
22288d10e2 Added RA map by hamb: Vegetation 2011-10-06 20:24:53 -06:00
Curtis S
ce336b46fd fix #1196: can't capture civ buildings 2011-10-06 18:30:47 -06:00
Curtis S
9fdfca6ee5 Added MultiTap support 2011-10-07 09:54:35 +13:00
Chris Forbes
5ced7e270c fixed #536 -- add grid to editor 2011-10-07 09:34:23 +13:00
Chris Forbes
87223f5b64 show map name in ra lobby 2011-10-07 07:58:16 +13:00
Chris Forbes
52daca603b kill CncInstallMusicLogic 2011-10-07 00:02:00 +13:00
Chris Forbes
0fbc6c0a54 move CncInstallMusicLogic into its own file 2011-10-06 23:46:04 +13:00
Chris Forbes
e9a4ec5403 unify disk check between music install and game install for cnc 2011-10-06 23:43:32 +13:00
Chris Forbes
281f706b02 tidy 2011-10-06 23:37:52 +13:00
Chris Forbes
8ab40bc5e8 tidy CncIngameMenuLogic 2011-10-06 23:35:27 +13:00
Chris Forbes
928cfb1f31 fixed #1195 - allow custom delivery vehicle in ProductionAirdrop 2011-10-06 23:31:09 +13:00
Chris Forbes
dea66818cd fix indent in CncReplayBrowserLogic 2011-10-06 23:24:30 +13:00
Chris Forbes
c18dcca1bc fix spelling error in ProductionAirdrop 2011-10-06 23:23:47 +13:00
Chris Forbes
1cf12df1c4 tidy 2011-10-06 23:18:00 +13:00
Chris Forbes
b9e22f50ed tidy derp in CncColorPickerPaletteModifier 2011-10-06 23:17:00 +13:00
Chris Forbes
2bc260c833 move Activity from OpenRA.Traits.Activities namespace to OpenRA.Traits 2011-10-06 23:11:58 +13:00
Chris Forbes
3cf15b870a remove needless cast in CncLobbyLogic.AddChatLine 2011-10-06 22:58:32 +13:00
Chris Forbes
ec8c5849eb remove dead SlotDropDownOption type in CncLobbyLogic 2011-10-06 22:58:31 +13:00
Chris Forbes
c76ebe51a5 remove duplicate ShowRaceDropDown 2011-10-06 22:58:31 +13:00
Chris Forbes
8f560d79fd remove duplicate ShowTeamDropDown 2011-10-06 22:58:30 +13:00
Chris Forbes
6d469a1414 move ShowSlotDropDown to LobbyUtils; kill the cnc clone of it 2011-10-06 22:58:30 +13:00
Chris Forbes
57ac95123e make ShowSlotDropDown static 2011-10-06 22:58:29 +13:00
Chris Forbes
c260635228 remove duplication of lobby name widget setup in CncLobbyLogic 2011-10-06 22:58:28 +13:00
Chris Forbes
2a48e01d91 move SetupNameWidget function into new LobbyUtils static class 2011-10-06 22:58:28 +13:00
Chris Forbes
d3b5939613 remove duplication between CncMapChooserLogic and MapChooserLogic 2011-10-06 22:58:27 +13:00
Chris Forbes
bdcd8097e5 start reducing differences between cnc and ra mapchoosers 2011-10-06 22:58:27 +13:00
Chris Forbes
dfa456a537 tidy mapchooser files 2011-10-06 22:58:26 +13:00
Chris Forbes
f936bbeaf7 tidy 2011-10-06 22:58:26 +13:00
Chris Forbes
e02a6e7ec4 tidy more 2011-10-06 22:58:25 +13:00
Chris Forbes
baa79c2dbc tidy usings in lintpasses 2011-10-06 22:58:24 +13:00
Chris Forbes
23e101deb0 Updated CHANGELOG 2011-10-06 09:02:51 +13:00
Chris Forbes
0a88a6da8e fix #1083 -- allow rank crate to give multiple levels 2011-10-04 23:19:41 +13:00
Chris Forbes
84234e8794 tidy in ActorMap 2011-10-04 22:57:37 +13:00
Chris Forbes
9eecd7ba6b tidy Traits.Util usings 2011-10-04 22:55:19 +13:00
Chris Forbes
9c35debd46 more formatting tidy 2011-10-04 22:54:02 +13:00
Chris Forbes
dc850d3f73 tidy in Armor.cs 2011-10-04 22:49:58 +13:00
Chris Forbes
05ce48b732 tidy in RenderBuildingWarFactory 2011-10-04 22:44:23 +13:00
Chris Forbes
554032ad5f allow null player in RenderSimple.RenderPreview in prep for editor usage 2011-10-04 22:40:46 +13:00
Chris Forbes
e5a1658d87 less code in utility 2011-10-04 22:36:30 +13:00
Chris Forbes
2df7a657d3 remove spurious STAThread attribute from Utility main 2011-10-04 22:35:05 +13:00
Chris Forbes
8174e7fffb move WithDefault onto Exts 2011-10-04 22:33:52 +13:00
Chris Forbes
49a758f031 add --transparent flag to shp->png conversion utility 2011-10-04 22:31:02 +13:00
Chris Forbes
fb8fdb5899 move load from file wrapper for palette into Palette.cs 2011-10-04 22:28:51 +13:00
Chris Forbes
6de9c0b432 remove PrimaryBuilding support from afld/hpad; it doesnt make much sense for 1-unit-per-building 2011-10-04 22:18:36 +13:00
Chris Forbes
c42a39e064 fix #625 -- aircraft smoke should not be visible under fog 2011-10-04 22:11:57 +13:00
Chris Forbes
4fd3e6a390 fix #1151 -- husks should not be selectable 2011-10-04 21:57:20 +13:00
Curtis S
1dc0fbb625 updated CHANGELOG 2011-10-04 21:49:55 +13:00
Curtis S
b0747cafa8 Minor terrain fixes for maps 2011-10-04 21:49:54 +13:00
Curtis S
04a8801f08 Added 3 new RA maps by Nukem 2011-10-04 21:49:46 +13:00
Curtis S
06043512db Added new RA map by bellator: Arctic Triangle Affair 2011-10-04 21:49:43 +13:00
Curtis S
0d4f48822a Removed RA map: middle-mayhem.oramap 2011-10-04 21:49:40 +13:00
Curtis S
06e1a6a38d Changed pressure's (ra map) game type to Conquest 2011-10-04 21:49:36 +13:00
Chris Forbes
1776b17205 fix busted indent in Repair.cs 2011-10-04 13:17:59 +13:00
Chris Forbes
c27af37541 fix busted indents in Plane.cs 2011-09-30 11:06:15 +13:00
Curtis S
174ec12ff0 Fixed ingame crash caused by using "F" on planes when owning no AFLDs 2011-09-30 08:24:17 +13:00
Chris Forbes
4f5bfceb3f remove done todo 2011-09-28 10:04:51 +13:00
Jeff Harris
edecd166a2 Added: Mac launcher readme file with details of how to build the launcher correctly 2011-09-26 08:44:52 +13:00
Jeff Harris
632ae08b87 Updated: Launcher.Mac binary now only contains PPC and x86 code so x64 macs dont try to execv x86 mono (usually crashes) 2011-09-26 08:44:46 +13:00
Chris Forbes
e4afaf4344 remove SequenceEditor, it's no longer useful 2011-09-26 08:40:40 +13:00
Chris Forbes
9663316c6c fix #1138 -- shortcut description on linux 2011-09-26 08:40:40 +13:00
Chris Forbes
ed1b8080df fix formatting in Game.cs 2011-09-26 08:40:40 +13:00
Chris Forbes
567a82fd5d move CanJoin onto GameServer 2011-09-26 08:40:40 +13:00
Chris Forbes
f9eb62beee tidy uid->map lookup in ServerBrowser implementations 2011-09-26 08:40:40 +13:00
Chris Forbes
6b602d5262 tidy up SpawnViceroid 2011-09-26 08:40:40 +13:00
Chris Forbes
7cbd2cb9b6 what kind of name is 'cpts' for a variable? 2011-09-26 08:40:40 +13:00
Chris Forbes
54922a74b1 spliit CncDirectConnectLogic into its own file 2011-09-26 08:40:40 +13:00
Chris Forbes
07175277f1 remove spurious 'refreshing' var 2011-09-26 08:40:40 +13:00
Chris Forbes
c4d10f5637 start similarly tidying CncServerBrowserLogic 2011-09-26 08:40:40 +13:00
Chris Forbes
fdd0897927 untangle default selection in ServerBrowserLogic 2011-09-26 08:40:40 +13:00
Chris Forbes
623fde709f DirectConnectLogic in its own file 2011-09-26 08:40:40 +13:00
Chris Forbes
d3cdb82479 start tidying ServerBrowserLogic 2011-09-26 08:40:39 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
0eb98ef3b5 use OrderBy().ThenBy() rather than relying on unspecified stability of OrderBy(). 2011-09-26 08:40:39 +13:00
Chris Forbes
f3ee2d589b tidy whitespace 2011-09-26 08:40:39 +13:00
Chris Forbes
cef45a890a tidy usings 2011-09-26 08:40:39 +13:00
Chris Forbes
67933fe253 tidy usings in MainMenuButtonsLogic 2011-09-26 08:40:39 +13:00
Chris Forbes
7b3de29f05 simplify teamchat code 2011-09-26 08:40:39 +13:00
Chris Forbes
1216cef981 remove (broken) cloning support from ChatDisplayWidget; doesn't make any sense. 2011-09-26 08:40:39 +13:00
Chris Forbes
d3bfcfea5c remove ChatLine.wrapped; never used 2011-09-26 08:40:39 +13:00
Chris Forbes
1c2f857222 just fetch the font once in ChatDisplayWidget 2011-09-26 08:40:39 +13:00
Chris Forbes
9fcddc0df2 remove duplicated mod prerequisite chain walk; write it clearly 2011-09-26 08:40:39 +13:00
Chris Forbes
23202eff0c untangle Mod.cs inserting of .Id 2011-09-26 08:40:38 +13:00
Chris Forbes
73f4997f6d remove spurious Standalone flag from mod metadata 2011-09-26 08:40:38 +13:00
Chris Forbes
ef71020835 style issue on CncLoadScreen 2011-09-26 08:40:38 +13:00
Chris Forbes
420052b12c remove duplicated path setup in Mod.cs 2011-09-26 08:40:38 +13:00
Chris Forbes
e7900d069d move ActiveModVersion,ActiveModTitle out of cnc-specific code 2011-09-26 08:40:38 +13:00
Chris Forbes
15d846bfb0 rename 'preferences' to 'settings' in various internal cnc bits; UI strings were 'settings' already 2011-09-26 08:39:58 +13:00
Chris Forbes
635315b0af rename SpecialPowerBinWidget to SupportPowerBinWidget 2011-09-24 20:56:41 +12:00
Chris Forbes
4bc963d621 clean up duplication in RA SpecialPowerBinWidget overlay handling 2011-09-24 20:54:16 +12:00
Chris Forbes
b83fa764d4 clean up whitespace in CncWaterPaletteRotation 2011-09-24 20:48:20 +12:00
Chris Forbes
589d201a16 make ShowMouseScrollDropdown static; it needs nothing from the instance. 2011-09-24 20:45:46 +12:00
Chris Forbes
6a78eec512 remove duplicated ShowWindowModeDropdown function from CncSettingsLogic 2011-09-24 20:44:38 +12:00
Chris Forbes
c608b45ef0 move cnc shellmap music toggle into Sound settings group where it belongs 2011-09-24 20:37:03 +12:00
Chris Forbes
68801ba7b5 fix formatting issues in settings 2011-09-24 20:34:21 +12:00
Chris Forbes
657e8ad250 remove misleading dead assignments on saving, before using vars as out params 2011-09-24 20:32:57 +12:00
Chris Forbes
a1fc76acc3 remove hardcoded 20px offset in TimerWidget 2011-09-24 20:28:34 +12:00
Chris Forbes
73676c8f0c remove spurious RenderBounds call 2011-09-24 20:24:18 +12:00
Chris Forbes
1eec17d430 clean up duplication in TimerWidget 2011-09-24 20:22:46 +12:00
Chris Forbes
b76ec11304 remove needless Stopwatch instance from TimerWidget 2011-09-24 20:21:46 +12:00
Chris Forbes
6c39f19a73 remove match timer configuration crap 2011-09-24 20:17:27 +12:00
Chris Forbes
3b2efc7b0b fix #1184 -- useless error message when forgetting to define Render:Image: on a derived actor type 2011-09-24 19:58:34 +12:00
Chris Forbes
e829e4b5aa fix formatting nit in SequenceProvider 2011-09-24 19:57:33 +12:00
Chris Forbes
f6661d5e47 fix sequences being ignored when the only sequences in the mod are provided by a map 2011-09-24 19:57:08 +12:00
Chris Forbes
2063277654 remove dead SaveSequencesForUnit 2011-09-24 19:56:29 +12:00
Curtis S
c1ec8fdd5c Update CHANGELOG 2011-09-18 23:08:02 -06:00
Curtis S
589f590fdc Added 3 RA maps by Nukem 2011-09-18 23:07:25 -06:00
Curtis S
538779e249 Added RA map by ihptru: Free Coasts 2011-09-18 20:53:32 -06:00
Curtis S
025dccaa3f Removed Neutral's colorramp in Styrian Mountains 2011-09-18 20:50:23 -06:00
Chris Forbes
776a1aa817 fix newlines in source files 2011-09-17 11:26:17 +12:00
Chris Forbes
9480846250 remove spurious constructor from MoveAdjacentTo 2011-09-17 11:24:39 +12:00
Chris Forbes
24c74dcdd9 remove needless duplicate Health trait query 2011-09-17 11:09:37 +12:00
Chris Forbes
bc8f02375f fixed #1171 -- don't shade buildable things just because we're building something else 2011-09-16 20:56:24 +12:00
Curtis S
c1f522db63 Fix #1157: Removed HARV minining from cell in front / using MoveAdjacentTo in logic. Was causing harvesters to get stuck - need to revisit this. 2011-09-15 20:49:33 -06:00
Chris Forbes
16fa2f2c1e sort file lists in projectfiles, fix newlines 2011-09-16 08:57:11 +12:00
Chris Forbes
7458deab81 update CHANGELOG 2011-09-14 09:30:11 +12:00
Curtis S
4e52dca3b6 Fixed PlayerIsAllowedToRepair - player requires FACT for repairs 2011-09-13 22:24:26 +12:00
Curtis S
575641155c Proper CNC palette fix for allyrepair.shp 2011-09-13 22:24:19 +12:00
Curtis S
561bec9ada Fix #1165 - PowerdownIndicator now works for replays/spec 2011-09-13 22:24:10 +12:00
Chris Forbes
be1a041a8c fixed #1071 -- adjust cnc resource parameters 2011-09-13 10:36:04 +12:00
Chris Forbes
44f65f15ea increase SYRD cost to 1000 2011-09-12 09:53:35 +12:00
Chris Forbes
25e257f2fa increase SPEN cost to 800 2011-09-12 09:53:26 +12:00
Chris Forbes
446193ecc7 reduce LST speed to 8 2011-09-12 09:40:44 +12:00
Chris Forbes
9942c4cbf8 require DOME for destroyer 2011-09-12 09:38:57 +12:00
Chris Forbes
a8097b1872 updated CHANGELOG 2011-09-11 17:49:54 +12:00
Chris Forbes
2b9d21feb7 fix #1162 (use large_slash for aircraft crashing into water) 2011-09-11 17:49:54 +12:00
Chris Forbes
9de1ed9761 fix #1146 (bogus client lookup) 2011-09-11 17:49:54 +12:00
Chris Forbes
ea190fcf86 combine LobbyCommands and PlayerCommands 2011-09-11 17:49:53 +12:00
Chris Forbes
21ae6ee983 convert FileExtractor into a Utility cmdlet 2011-09-11 17:49:53 +12:00
Curtis S
03adb7f2c3 Added new RA map by Tirili: Seven Stairs 2011-09-10 23:47:24 -06:00
Curtis S
c9c716aae4 Added 4 new RA maps by Nukem 2011-09-10 23:47:09 -06:00
Curtis S
9ee794ee1f Added RA map by Knivesron: Drop Zone Battle of Tikiaki 2011-09-10 23:07:57 -06:00
Curtis S
b2cf3d9513 Added RA map by Holloweye: Drop Zone 2011-09-10 23:06:43 -06:00
Curtis S
7306f92d22 1159: Implemented Nukem's RA AI rules 2011-09-10 22:42:44 -06:00
Curtis S
2cc6a67a95 Harvs built by HackyAI now call FindResources 2011-09-10 22:40:06 -06:00
Curtis S
460696192b PowerdownIndicator will only show to owner and teammates 2011-09-10 22:38:19 -06:00
Curtis S
be9948426c 1078: Added ally repairing for CNC and RA 2011-09-10 16:41:40 -06:00
Curtis S
1d052bbfa2 Powered down buildings now display a "powered off" animation 2011-09-08 20:31:16 +12:00
Chris Forbes
00c6c5c88d update CHANGELOG 2011-09-07 20:51:45 +12:00
Chris Forbes
a3818a6aa2 fix MoveAdjacentTo so it doesnt suck so much 2011-09-07 20:43:18 +12:00
Chris Forbes
cc18a6a515 enable building of LST in yaml 2011-09-07 18:45:16 +12:00
Chris Forbes
aec4e6b5e8 remove .manifest from root 2011-09-07 18:40:44 +12:00
Chris Forbes
75a8139e3b Update CHANGELOG for release 2011-09-06 08:39:01 +12:00
Chris Forbes
9cbf69608a updated CHANGELOG 2011-09-04 14:17:04 +12:00
Chris Forbes
3b22a8588f fix #1129 -- laserzap tolerates null explosion 2011-09-04 11:10:21 +12:00
Chris Forbes
082603dd54 don't offer attackmove OG in cases for other players' stuff 2011-09-04 10:49:26 +12:00
Chris Forbes
014e63383b fix comment in WorldCommandWidget 2011-09-04 10:45:10 +12:00
Chris Forbes
19c7cd650d boost sam rof slightly 2011-09-04 10:28:51 +12:00
Chris Forbes
ee0de12318 boost longbow aa missile speed 2011-09-04 10:28:23 +12:00
Chris Forbes
e64c7680e8 fix #1141 -- lobby kick being broken in ra 2011-09-04 08:53:16 +12:00
Chris Forbes
f62fc7acd3 Updated CHANGELOG 2011-09-03 10:12:54 +12:00
Chris Forbes
8316ffc07e remove spurious trait lookup in AutoHeal 2011-09-01 16:18:36 +12:00
Curtis S
2cce16fe3d Minor ore changes to Doughnut map 2011-08-30 21:51:52 -06:00
Curtis S
43c5137dce Fixed ore distribution on mjolnir-2 2011-08-30 21:51:33 -06:00
Curtis S
6f70b113c8 Fix #1132; Infantry/Husks don't stay above water when bridge beneath is destroyed 2011-08-30 20:58:57 -06:00
Curtis S
3d48c454dc Vehicle husks should not appear on water 2011-08-30 20:55:27 -06:00
Curtis S
29b32dd656 Added new RA map: Doughnut 2011-08-29 17:13:00 +12:00
Curtis S
dc181f495f Added new RA map: Mjolnir 2 2011-08-29 17:12:54 +12:00
Chris Forbes
4b2717118f fix #1130 -- LaserZap beam color is configurable 2011-08-27 13:40:30 +12:00
Curtis S
02d644a09f Reduced Inaccuracy of Cruiser's 8Inch from 120 to 80 2011-08-27 08:21:31 +12:00
Chris Forbes
7b9f389ed1 Updated CHANGELOG 2011-08-22 18:33:31 +12:00
Chris Forbes
064b996ea2 slight tidy in nuke 2011-08-22 07:14:24 +12:00
Chris Forbes
2231436c2f fixed #837 -- hind, yak weapons ignore walls 2011-08-21 22:28:43 +12:00
Chris Forbes
dd306c7b7c fixed #766 -- minelayers not entering FIX properly 2011-08-21 22:17:50 +12:00
Chris Forbes
be7c4193a4 remove duplicated Tick 2011-08-21 22:05:41 +12:00
Chris Forbes
fe40fbf7f7 removed duplicated ResolveOrder 2011-08-21 22:05:41 +12:00
Chris Forbes
c0fd252b9f removed duplicate AttackActivity from AttackPopupTurreted 2011-08-21 22:05:41 +12:00
Chris Forbes
33ec2b3f5e have AttackPopupTurreted inherit AttackTurreted 2011-08-21 22:05:41 +12:00
Chris Forbes
7437e8fabb fix naming of turret member 2011-08-21 21:34:47 +12:00
Chris Forbes
c11b7041f4 push turret facing check down to turret 2011-08-21 21:32:39 +12:00
Chris Forbes
6a092dbfda declare AttackTurreted -> Turreted dep; do trait lookup at spawn time 2011-08-21 21:27:36 +12:00
Chris Forbes
78a0c3e506 move Attack traits into Attack dir 2011-08-21 21:10:49 +12:00
Chris Forbes
05d1c8ee82 move AttackPopupTurreted into RA where it can be fixed. 2011-08-21 21:05:29 +12:00
Chris Forbes
6daeb73471 stop spraying all these damned parentheses where they aren't needed 2011-08-21 21:02:19 +12:00
Chris Forbes
3a5682a1f7 remove Quit option from ingame menu; rename Disconnect to Abort Mission 2011-08-21 20:56:37 +12:00
Chris Forbes
2c5c069480 slow down power bar lerp slightly; extract constant 2011-08-21 20:49:34 +12:00
Chris Forbes
8b33c6c8b0 tidy up spurious typenames in PowerBinWidget 2011-08-21 20:45:47 +12:00
Chris Forbes
6346373e0c remove power manager lookup every render 2011-08-21 20:44:37 +12:00
Chris Forbes
339d5c3405 fix phantom radarbin 2011-08-21 20:40:32 +12:00
Chris Forbes
896cbaae39 clean up ModData package mounting 2011-08-21 20:26:00 +12:00
Chris Forbes
840f6131ac tidy up some spurious trait lookups in HackyAI 2011-08-21 19:39:44 +12:00
Chris Forbes
5a3f5d9f3a move BuildState into BaseBuilder where it belongs 2011-08-21 19:37:22 +12:00
Chris Forbes
b95f49d6f3 remove pointless null checks for owner 2011-08-21 19:34:45 +12:00
Chris Forbes
ee2be405ca fix AppearsFriendlyTo/AppearsHostileTo 2011-08-21 19:31:20 +12:00
Chris Forbes
da4811abe8 rip out ActorStance garbage 2011-08-21 18:59:20 +12:00
Curtis S
8e9045d7f4 Removed ra maps fire alley, isle wars 3, ore isle 2011-08-21 18:51:22 +12:00
Chris Forbes
0e3d07f0b2 adjust size of mcv husk 2011-08-21 18:49:54 +12:00
Chris Forbes
42ab7908d0 adjust size of harvester husk 2011-08-21 18:49:06 +12:00
Chris Forbes
d75784df64 factor out build palette overlays; add timers 2011-08-21 14:26:28 +12:00
Chris Forbes
96860033fb #1121 fixed -- [Sync] and ISync inheritance rules made the same 2011-08-21 10:58:16 +12:00
Chris Forbes
8cc455d23f fix #1105; decloak sound was never used 2011-08-21 10:21:07 +12:00
Chris Forbes
f7fdd885fb produce much better exceptions for missing files in map packages 2011-08-20 14:23:09 +12:00
Chris Forbes
8428eb0499 tidy up new-map-from-tileset support 2011-08-20 14:17:56 +12:00
Chris Forbes
1fe5c1d60f catch map load failures 2011-08-20 14:13:52 +12:00
Chris Forbes
a9d25b603c factor out duplicated hardcoded font in CashTick 2011-08-17 07:52:35 +12:00
Chris Forbes
e922051282 factor formatting code out of CashTick ctor 2011-08-17 07:52:35 +12:00
Chris Forbes
257bd6f431 fixed #849 -- forceMove plumbing removed, noone uses it. 2011-08-17 07:52:35 +12:00
Chris Forbes
67b4ef3084 #1108 changed BuildingInfo.WaterBound to a list of terraintypes. makes it possible to have buildings with custom terrain requirements 2011-08-17 07:52:35 +12:00
Chris Forbes
55ec88316a #1050 Extract generic PlayMusicOnMapLoad trait from cnc shellmap script 2011-08-17 07:52:34 +12:00
Curtis S
c47833e9a0 Fixed a frame in harvempty.shp 2011-08-15 19:15:57 -06:00
Chris Forbes
36f6e503ef clean up some of the noise in Move 2011-08-15 14:48:17 +12:00
Chris Forbes
a74fd17d39 remove a Turreted lookup every render for RenderBuildingTurreted 2011-08-15 14:32:10 +12:00
Chris Forbes
1aa80e0377 fix #960 -- HackyAI shouldn't put itself in low power so much. 2011-08-15 14:23:54 +12:00
Chris Forbes
cc716ab8c7 #1106 fixed -- mac-specific hack should only be applied on a mac. 2011-08-15 14:15:55 +12:00
Chris Forbes
6dd0452c95 drop unused SupportDir= option from 'openra' script produced by 'make install' 2011-08-13 15:01:42 +12:00
Chris Forbes
f3ea06c373 Include OpenRA.Renderer.SdlCommon.dll in 'make install'.
Merged from gentoo ebuild, https://github.com/cerebrum/dr/blob/master/games-strategy/openra/files/Makefile_rsdl.patch
2011-08-13 15:01:42 +12:00
Curtis S
499d9736cc Fix #802; BRIK health reduced to 500. Arty effectiveness remains the same. 2011-08-13 15:01:42 +12:00
Curtis S
cc8a9552b5 Made ATEK a prerequisite for Allied Longbow 2011-08-13 15:01:42 +12:00
Curtis S
d420701e5a Split hellfire missiles into AA/AG definitions 2011-08-13 15:01:42 +12:00
Chris Forbes
99f2f1bab2 fixed #1098; idle animation speed for e2 2011-08-13 15:01:42 +12:00
Chris Forbes
7902c9847e rename Technician -> Civilian 2011-08-13 15:01:42 +12:00
Chris Forbes
5546e977a8 add audio feedback for Stop order 2011-08-13 15:01:42 +12:00
Chris Forbes
c4666df6b9 fix long line in Mobile 2011-08-13 15:01:41 +12:00
Chris Forbes
54df44d43a split recoil into PrimaryRecoil/SecondaryRecoil; make recovery rate configurable per turret; #1069 2011-08-13 15:01:41 +12:00
Chris Forbes
954b0a617f don't consider HideMapCrateAction if the player has GPS 2011-08-13 15:01:41 +12:00
Chris Forbes
ca385e41ea fix bogus file name for HideMapCrateAction 2011-08-13 15:01:41 +12:00
Chris Forbes
9f0f8d381f map scatter->move for audio; #1093 2011-08-13 15:01:41 +12:00
Chris Forbes
d3def71340 Add ReturnToBase (F) support for aircraft; #1084 2011-08-13 15:01:41 +12:00
Chris Forbes
663a323f29 remove trait lookup spam everywhere for IOccupySpace. 2011-08-13 15:01:41 +12:00
Chris Forbes
aff3111eac internals for #919 2011-08-13 15:01:41 +12:00
Curtis S
b6560e6026 Fixed #1090; pilots don't drop for dead players 2011-08-13 15:01:40 +12:00
Chris Forbes
132ca5c667 update text for instant charge time option 2011-08-13 15:01:40 +12:00
Chris Forbes
f2867fbc61 UnregisterEvents functions do not need to be public 2011-08-13 15:01:40 +12:00
Chris Forbes
8d9f7b715d remove Lock Teams checkbox from RA lobby 2011-08-09 08:51:36 +12:00
Chris Forbes
9b9f13ed1b remove some duplication in LobbyLogic's color picker handling 2011-08-09 08:51:36 +12:00
Chris Forbes
e329c9dc55 fix some whitespace issues in LobbyLogic 2011-08-09 08:51:36 +12:00
Chris Forbes
89a209ff52 remove bogus FirstOrDefault + deref in Teleport; just use Trait<> 2011-08-09 08:51:36 +12:00
Paul Chote
5d3ed6aa6a Remove obsolete bits from linux packaging 2011-08-09 08:51:36 +12:00
Paul Chote
21197c702e Update CHANGELOG 2011-08-09 08:51:36 +12:00
Chris Forbes
3051b147f5 fix whitespace in NullGraphicsDevice 2011-08-09 08:51:36 +12:00
Chris Forbes
4e11702a99 fix #1088; gpsdot should not be given to opponents 2011-08-09 08:51:36 +12:00
Chris Forbes
a79cc0a0e0 drop unused parameter on IGraphicsDevice.Clear() 2011-08-09 08:51:36 +12:00
Chris Forbes
2bf7cb1496 fix #1052; tidy up *Init; route initial turret facing for husks through new TurretFacingInit 2011-08-09 08:51:36 +12:00
Chris Forbes
096fe7759c fix ThrowsParticles/ThrowsParticle naming inconsistency 2011-08-09 08:51:35 +12:00
Chris Forbes
18481afda2 fix #1063; don't issue orders while dragging a selection box 2011-08-09 08:51:35 +12:00
Chris Forbes
78e6d69103 fix #1064; always show an arrow while dragging a selection box 2011-08-09 08:51:35 +12:00
Chris Forbes
cfa8298190 remove duplication of initial map choice logic 2011-08-09 08:51:35 +12:00
Chris Forbes
b748e4b11b fix whitespace issues in CncMenuLogic 2011-08-09 08:51:35 +12:00
Chris Forbes
8844ea8e2f fix #1082; setting a bot's color no longer clobbers saved player color 2011-08-09 08:51:35 +12:00
Chris Forbes
5a9cb18881 fix #1070; allow GiveCashCrateAction to generate a cashtick 2011-08-09 08:51:35 +12:00
Chris Forbes
fa78793927 fix #1057 -- bogus trait lookup in RenderUnitSpinner 2011-08-09 08:51:35 +12:00
Chris Forbes
ddc1311d87 Make RenderUnit require IFacing; RenderSimple can be used for crates, mines, etc; fix husk facing init 2011-08-09 08:51:35 +12:00
Chris Forbes
7044d81a40 remove dead makedist.cmd 2011-08-09 08:51:35 +12:00
Chris Forbes
833533b4c3 fix #1056 2011-08-09 08:51:35 +12:00
Chris Forbes
7429c8ef89 don't look up IFacing (twice!) every frame for every actor with RenderUnit; fixes #1054 2011-08-09 08:51:35 +12:00
Chris Forbes
2797ea72cb fix stupid default support dir. if there's something we can't identify reliably, it's going to be a *nix 2011-08-09 08:51:28 +12:00
Matthew Bowra-Dean
21f172228d Fix compilation with Visual Studio
OpenRA.Renderer.SdlCommon was missing the /unsafe compiler flag and RALint was missing a reference to System.Drawing.
2011-08-08 11:17:10 +12:00
Paul Chote
c84f53c10d Extract tile overlays into a shp instead of rolling our own in code; Remove UIOverlay. Fixes #1061. 2011-07-27 21:48:32 +12:00
Paul Chote
08ed7f0316 Hook up empty/full harvester husk variants in RA. 2011-07-27 20:09:37 +12:00
Paul Chote
5fe5addc0c Make Harvester.Fullness an int 2011-07-27 20:00:23 +12:00
Paul Chote
d62ef64fa6 Make ralint give useful stacktraces under mono 2011-07-27 19:58:37 +12:00
Paul Chote
ad12352f41 Add mcv husk by Daniel Hernandez 2011-07-27 19:26:41 +12:00
Paul Chote
a4814b82c8 Display cost/power tooltip labels in red if there are insufficient funds/power. Fixes #1076. 2011-07-27 17:38:37 +12:00
Paul Chote
1c7a9ce08e Fix desert civ building animations (bug #1097). 2011-07-27 16:59:44 +12:00
Paul Chote
4e68ad2b12 Fix default civ building husk walkability 2011-07-27 16:57:23 +12:00
Paul Chote
9df7348683 Add two missing desert buildings 2011-07-27 16:57:12 +12:00
Paul Chote
b216d73ac9 Fix civ structure sequence ordering 2011-07-27 16:34:46 +12:00
Paul Chote
2b3f58e3a4 Fix hospital animation and add husk 2011-07-27 13:36:49 +12:00
Paul Chote
39a3dfffd1 Disallow capturing hospitals until they give something useful 2011-07-27 13:36:49 +12:00
Paul Chote
4c60639a0d Remove build radius from tech structures 2011-07-27 13:36:49 +12:00
Paul Chote
8087f16df0 `The Sentinel' tweaks: replace blue tib fields with hospitals; move starting spawns closer to the center; remove excess tib trees. 2011-07-27 13:36:49 +12:00
Paul Chote
0946bf52c3 Tweak tib and add oil derricks to Chokepoint. 2011-07-27 13:36:49 +12:00
Paul Chote
e62ec6caa1 Remove extra tib trees from `Instant Karma' 2011-07-27 13:36:49 +12:00
Paul Chote
86bc01cf65 Fix tib trees in `dead in motion' (bug #1072) 2011-07-27 13:36:49 +12:00
Paul Chote
8a6a3eac85 Make nod airfield fly the width of the map instead of spawning a fixed distance outside the map. Increase aircraft speed to compensate. Fixes #283. 2011-07-27 13:36:49 +12:00
Paul Chote
d9174b7e3b Kill RenderSimple.OverrideTileset/OverrideImage. 2011-07-27 13:36:48 +12:00
Paul Chote
64ab44c3ea Log a message when trying to render a nonexistent actor in the editor 2011-07-27 13:36:48 +12:00
Paul Chote
d98649e7e1 Switch `minus two' to desert variants. 2011-07-27 13:36:48 +12:00
Paul Chote
2778752a17 Switch `instant karma' to desert variants. 2011-07-27 13:36:48 +12:00
Paul Chote
a0d1686fd1 Fix bogus desert variant in shellmap 2011-07-27 13:36:48 +12:00
Paul Chote
e1691a4a70 Switch `chokepoint' to desert variants. 2011-07-27 13:36:48 +12:00
Paul Chote
6fecb82c98 Switch `break of day' to desert variants. 2011-07-27 13:36:48 +12:00
Paul Chote
7211cd10c6 Define desert variants of civilian buildings as real actors instead of visual hacks. 2011-07-27 13:36:48 +12:00
Paul Chote
17d72f17d9 Add an EditorTilesetFilter trait for filtering the actor palette based on tileset. 2011-07-27 13:36:47 +12:00
Paul Chote
9f7c5791f9 Make vehicle husks unselectable 2011-07-27 13:36:47 +12:00
Paul Chote
7e3cfd7ee9 Don't show a selection cursor over targetable but unselectable actors 2011-07-27 13:36:47 +12:00
Paul Chote
aa2ae95ce1 Kill DeadBuildingState.Zombie 2011-07-27 13:36:47 +12:00
Paul Chote
f9017567c1 Implement dead civilian buildings ask husks. Fixes #149. 2011-07-27 13:36:47 +12:00
Paul Chote
d6ab8b2456 Fix tech structures: cannot sell, can repair, fix husks. 2011-07-27 13:36:47 +12:00
Paul Chote
3972836cd6 Don't allow engineers to repair neutral structures, it conflicts with capturing. 2011-07-27 13:36:47 +12:00
Paul Chote
d8ec459b97 Declare RenderSimple dep in WithFire 2011-07-27 13:36:47 +12:00
Paul Chote
d9bd49bac3 Tweak East vs West 3. Fixes #921. 2011-07-27 13:36:47 +12:00
Paul Chote
4138c5aeb7 Display version in the load screen 2011-07-27 13:36:46 +12:00
Paul Chote
00ba03cbce Fix #1062 2011-07-27 13:36:46 +12:00
Paul Chote
304601b5ca Split some useful bits from CncIngameMenuLogic into CncWidgetUtils for use elsewhere 2011-07-27 13:36:46 +12:00
Paul Chote
648979c8ae Fix a crash in Demolish 2011-07-27 13:36:40 +12:00
Paul Chote
cf9ac8d801 Fix a dumb crash & avoid a trait lookup in DragHusk 2011-07-26 10:01:32 +12:00
Paul Chote
59116fc5b8 Include mod version on the ingame menu (Feature #1075) 2011-07-26 01:19:02 +12:00
Paul Chote
0a5f81c39e Drag husks to their final location. Fixes #730. 2011-07-25 23:50:11 +12:00
Paul Chote
49cbaeb1d2 Fix a crash when an infantry is crushed and killed by conventional means in the same tick. 2011-07-25 22:23:21 +12:00
Paul Chote
8ad3f47608 Further resource tweaks:
- Resource value reduced by 25%
 - Resource spawn rate increased by 15%
 - Unload rate decreased by 50%
 - Harvest rate increased by 25%
2011-07-25 22:23:21 +12:00
Paul Chote
9270c9c6b7 Don't clear RA production queues whenever anything dies. 2011-07-25 22:23:21 +12:00
Paul Chote
eba178a427 Resource changes (Feature #970):
- Harvester capacity ~halved
 - Harvester harvesting rate halved
 - Resource value ~doubled
 - Silo/Refinery capacity increased slightly
2011-07-25 22:23:21 +12:00
Paul Chote
eadf6fe6cf Rename RenderBuildingOre -> RenderBuildingSilo 2011-07-25 22:23:21 +12:00
Paul Chote
2231940056 Harvesters harvest the cell in front of them; fix harvester target lines; split harvester activities into their own (correctly named) files. 2011-07-25 22:23:21 +12:00
Paul Chote
a5b2ff4c75 Remove unused proc sequences 2011-07-25 22:23:21 +12:00
Paul Chote
996a5407a9 Use proc tower lights as a fullness indicator (Feature #1035). 2011-07-25 22:23:20 +12:00
Paul Chote
97c608a9b9 Fix harvempty.shp and harvhalf.shp 2011-07-25 22:23:20 +12:00
Paul Chote
69d23e01aa Remove references to unused mix files 2011-07-25 22:23:20 +12:00
Paul Chote
6c129eed3c Split pip artwork into their own files and kill the hardcoded size/offset junk. Add a blue pip to support C&C blue tib. Fixes #836. 2011-07-25 22:23:20 +12:00
Paul Chote
c793e8571f Update CHANGELOG 2011-07-25 22:23:20 +12:00
Paul Chote
ab132fb743 Increase reload time of mammoth missiles 2011-07-25 22:23:20 +12:00
Paul Chote
f4a03e3d73 Increase missile ROT and remove arming delay to ensure that missiles can hit adjacent targets. 2011-07-25 22:23:19 +12:00
Paul Chote
54b7e8f344 Split apache guns into AA/AG variants too. Fixes #946. 2011-07-25 22:23:19 +12:00
Paul Chote
e30e49006f Split orca missiles into AA and AG variants to avoid splash damage leakage. 2011-07-25 22:23:19 +12:00
Paul Chote
22d3e16225 Installing from CD: Volume names / mount points are unreliable identifiers - check for specific files on the disk instead. 2011-07-25 22:23:19 +12:00
Paul Chote
a165a80101 Fix imported map spawn ownership 2011-07-25 22:23:19 +12:00
Paul Chote
abf63b3054 Remove GameInitInfoWidget and routing startup via widgets in RA. 2011-07-25 22:23:19 +12:00
Paul Chote
2d269155b1 Reimplement installing from CD in RA. 2011-07-25 22:23:19 +12:00
Paul Chote
bf6be0424f Remove file prompting and drop all the remaining utility communication plumbing. 2011-07-25 22:23:18 +12:00
Paul Chote
9ec229bef7 Fix utility to use Platform.SupportDir (#1067); drop the --SupportDir arg and the path passed to --settings-value; Update OSX launcher to match. 2011-07-25 22:23:18 +12:00
Paul Chote
ac9a5efd8e Use GL_ARB_vertex_buffer_object calls instead of gl 1.5 core calls. 2011-07-25 22:23:18 +12:00
Paul Chote
f88ea4c25a Add RA settings UI for PixelDouble 2011-07-25 22:23:18 +12:00
Paul Chote
a94a57db32 Add C&C settings UI for PixelDouble 2011-07-25 22:23:18 +12:00
Paul Chote
d2c033dcd3 Add a PixelDouble preference for rendering at 2x zoom. Allowing arbitrary zoom levels leads to too many rendering artifacts. 2011-07-25 22:23:18 +12:00
Paul Chote
626b83ba12 Fix lines not being centered in the middle of a pixel 2011-07-25 22:23:17 +12:00
Paul Chote
8516fa8748 fix viewport scroll limits 2011-07-25 22:23:17 +12:00
Paul Chote
0bfc9a957f Fix radar viewport rectangle 2011-07-25 22:23:17 +12:00
Paul Chote
0b0e3d5f14 Drop unnecessary `this' uses from Viewport. 2011-07-25 22:23:17 +12:00
Paul Chote
6183621a72 Scale line-width to match zoom. 2011-07-25 22:23:17 +12:00
Paul Chote
fc783ddf80 Support custom zoom levels 2011-07-25 22:23:17 +12:00
Paul Chote
926b396605 Fix bogus naming of Shaders/Renderers. Split LineRenderer into world and chrome variants. 2011-07-25 22:23:16 +12:00
Paul Chote
4fa0962d49 Check for bogus subject clients in ValidateOrder. Fixes crash in #1001. 2011-07-25 22:23:16 +12:00
Paul Chote
2b3ee9e5bc Replace fullscreen checkbox and misleading width/height fields in RA settings menu with a mode/resolution selector like C&C. Fixes bugs #118, #791. 2011-07-25 22:23:16 +12:00
Paul Chote
704c784b51 Remove power and silo icon placeholders 2011-07-25 22:23:16 +12:00
Paul Chote
9b96bfb33b Fix #931 ("Unit Ready" played when a production structure is destroyed). 2011-07-25 22:23:16 +12:00
Paul Chote
d42cf25789 Packaging fixes for renderer deduplication. 2011-07-25 22:23:15 +12:00
Paul Chote
c79f5b5365 Ignore damage modifiers when killing a unit via actor.Kill(). Fixes surrender desync (#460); Fixes invulnerable actors surviving in situations where they should be killed (bridge death, losing/surrender, etc). 2011-07-25 22:23:15 +12:00
Paul Chote
6ede28fdbe Fix mammoth tank not crushing infantry 2011-07-25 22:23:15 +12:00
Paul Chote
ac7c25efa3 Prioritize alerted tabs when switching group / via hotkey. 2011-07-25 22:23:15 +12:00
Paul Chote
1bafd35d61 Rework ProductionTabsWidget getting/setting of the current queue. 2011-07-25 22:23:15 +12:00
Paul Chote
9fb72c9063 Play click sound when using `tab' to cycle queues. 2011-07-25 22:23:15 +12:00
Paul Chote
7be84a5390 Remove demo.mix from the packaged build, not the local copy. 2011-07-25 22:23:14 +12:00
Paul Chote
b8ba48ee67 Switch to observer ui on victory/defeat (Feature #1002). 2011-07-25 22:23:14 +12:00
Paul Chote
8f62ce9b25 Show `-' instead of 0 for unteamed players in the objectives panel. 2011-07-25 22:23:14 +12:00
Paul Chote
ee3be9c89b Laser tweaks:
- Expose the beam duration to the projectileinfo
 - Play an explosion animation at the target
 - Beam tracks moving targets
 - Disable player beam color in C&C
2011-07-25 22:23:14 +12:00
Paul Chote
d9d20338bf Increase orca reload time 2011-07-25 22:23:14 +12:00
Paul Chote
e724a3b200 Decrease stnk speed slightly, increase it's health 2011-07-25 22:23:14 +12:00
Chris Forbes
71cf332ee1 trim some crap out of Contrail 2011-07-25 22:23:13 +12:00
Chris Forbes
e4e443b0ab remove unused SidebarButtonWidget 2011-07-25 22:23:13 +12:00
Chris Forbes
e81cbceb99 aircraft sync debug traits dont really need to do trait lookups every time the synchash is taken.. 2011-07-25 22:23:13 +12:00
Chris Forbes
5055e0be62 clean up PlayerResources trait lookup in MoneyBinWidget 2011-07-25 22:23:13 +12:00
Chris Forbes
ac71e60a4b remove SplitOreAndCash from MoneyBinWidget; noone uses it anymore 2011-07-25 22:23:13 +12:00
Chris Forbes
41baa3b7b0 add escape keybinding to settings dialog 2011-07-25 22:23:13 +12:00
Chris Forbes
2ac1d001a4 add enter/escape bindings to replaybrowser 2011-07-25 22:23:13 +12:00
Chris Forbes
7d506f0ab6 rename gamelobby.yaml -> lobby.yaml 2011-07-25 22:23:12 +12:00
Chris Forbes
2a99cdb935 split map-chooser out of gamelobby.yaml 2011-07-25 22:23:12 +12:00
Chris Forbes
14733841e5 add escape/enter bindings for other join-game dialogs 2011-07-25 22:23:12 +12:00
Chris Forbes
0b97122c41 add escape/enter bindings for server browser dialog 2011-07-25 22:23:12 +12:00
Chris Forbes
00543825e7 setup escape/enter bindings for create-server dialog 2011-07-25 22:23:12 +12:00
Chris Forbes
8d2b6edaf1 split create server dialog into its own yaml file 2011-07-25 22:23:12 +12:00
Chris Forbes
fc9ab25c3f add escape key binding to ingame options button 2011-07-25 22:23:12 +12:00
Chris Forbes
70dfcffaea add another lint pass to ensure that every (non-template) actor type is actually constructible 2011-07-25 22:23:12 +12:00
Chris Forbes
b3bdc2df85 declare RenderUnitTurreted -> Turreted,AttackBase deps; remove spurious TraitOrDefault on AttackBase which just failed later; fixes #1053 2011-07-25 22:23:12 +12:00
Chris Forbes
315c00f67f clean up Contrail trait lookups; fixes #1058 2011-07-25 22:23:11 +12:00
Chris Forbes
0bca88d9d3 remove silly trait lookup in RenderBuildingCharge 2011-07-25 22:23:11 +12:00
Chris Forbes
fc15aa47ad dont really need to setup palettes every frame in ResourceLayer 2011-07-25 22:23:11 +12:00
Chris Forbes
5aaca5bb32 drop ISelectionColorModifier; unused 2011-07-19 21:14:12 +12:00
Chris Forbes
3a1613667b drop unnecessary ISync from ProximityCapturable 2011-07-19 21:14:12 +12:00
Chris Forbes
0d018d3eff tidying some font uses in BuildPaletteWidget 2011-07-19 21:14:12 +12:00
Chris Forbes
4448089cb7 use text rendering to show hold/ready indicators rather than SHP 2011-07-19 21:14:12 +12:00
Chris Forbes
8544930db9 ProximityCapturable simplifications 2011-07-19 21:14:12 +12:00
Chris Forbes
70a582df33 more simplification of Strategic* 2011-07-19 21:14:12 +12:00
Chris Forbes
e7228680e8 make RALint quiet unless -v or --verbose is passed 2011-07-19 21:14:12 +12:00
Chris Forbes
68fd2c9744 clean up usings after prev 2011-07-19 21:14:12 +12:00
Chris Forbes
643e0ee7a2 move CheckActorReferences out of the core lint code 2011-07-19 21:14:11 +12:00
Chris Forbes
3340e124e4 simplify Strategic* 2011-07-19 21:14:11 +12:00
Chris Forbes
33704977b9 remove ScrollingTextWidget 2011-07-19 21:14:11 +12:00
Chris Forbes
3d2635fca5 drop CursorSheetBuilder; use normal SheetBuilder for cursors now. 2011-07-19 21:14:11 +12:00
Chris Forbes
5609c8d041 drop format2 support from CursorSheetBuilder 2011-07-19 21:14:11 +12:00
Chris Forbes
d634f9db90 convert cnc mouse3 to td/ra format 2011-07-19 21:14:11 +12:00
Chris Forbes
4b5d6572ef convert RA cursors to TD/RA format 2011-07-17 18:37:27 +12:00
Chris Forbes
2a16172a20 add d2k -> ra shp conversion support to utility 2011-07-17 18:37:12 +12:00
Chris Forbes
239be241ff fix broken cleanup of import folder in editor after failed import; #1012 2011-07-17 17:55:53 +12:00
Chris Forbes
a635e8a4d8 add Passenger to crate; remove special cases in Cargo to support not having Passenger; #851 2011-07-17 17:55:53 +12:00
Chris Forbes
a95b59081f remove duplicated GL setup code 2011-07-17 17:55:52 +12:00
Chris Forbes
2fcb11d7cc remove duplicated SDL input handling 2011-07-17 17:55:52 +12:00
Chris Forbes
31c2306a57 get rid of Cg versions of Texture and VertexBuffer 2011-07-17 17:55:52 +12:00
Chris Forbes
b0ccc58516 remove unused vsync parameter from renderers 2011-07-17 17:55:52 +12:00
Chris Forbes
df1201b4c2 start moving common parts of the renderer into OpenRA.Renderer.SdlCommon 2011-07-17 17:55:52 +12:00
Chris Forbes
2ac6ccd3a4 add player parameter to ReinforceFromSea in prep for using it elsewhere 2011-07-17 17:55:52 +12:00
Chris Forbes
8221b8acca declare Burns -> RenderSimple dep; remove first tick weirdness 2011-07-17 17:55:52 +12:00
Chris Forbes
4a0b7bb003 put AnimationWithOffset in its own file 2011-07-17 17:55:52 +12:00
Chris Forbes
59616671b6 add harvester husks 2011-07-17 17:55:51 +12:00
Chris Forbes
74b894b69f replace Range with MinimumValue/MaximumValue 2011-07-17 17:55:51 +12:00
Chris Forbes
a52e5a92ae adjust copy ctor for SliderWidget -- copying the isMoving state makes *no sense*; Value should be copied though 2011-07-17 17:55:51 +12:00
Chris Forbes
0efe82018a rewrite SliderWidget to be simpler and have much less fail 2011-07-17 17:55:51 +12:00
Chris Forbes
fe6a99c993 fixed #42 -- show harvester fullness in sprites 2011-07-17 17:55:51 +12:00
Chris Forbes
9dd0ad980b remove backwards compatibility crap from RA edgescroll config 2011-07-17 12:43:12 +12:00
Chris Forbes
5c5eb5d5b5 remove config item for match timer in RA 2011-07-17 12:41:21 +12:00
Chris Forbes
2d79c7c424 clean up graphics settings in SettingsMenuLogic.cs 2011-07-17 12:37:54 +12:00
Chris Forbes
10cb967711 tidy SettingsMenuLogic audio settings 2011-07-17 12:33:05 +12:00
Chris Forbes
f973b1a29f SliderWidget's OnChange event has a parameter for a reason.. 2011-07-17 12:30:45 +12:00
Chris Forbes
a302b7999a trim usings after prev 2011-07-17 12:25:32 +12:00
Chris Forbes
413dd0cce4 move CncColorPickerLogic into its own file 2011-07-17 12:23:42 +12:00
Chris Forbes
af05856a5f fix foreach/closure bugs in CncLobbyLogic when setting up spectators 2011-07-17 12:15:20 +12:00
Chris Forbes
c05215c477 fix foreach/closure bugs in RA LobbyLogic; factor out name widget setup 2011-07-17 12:10:49 +12:00
Chris Forbes
8b78bc0602 move ReserveSpawnBuilding out of Plane.Tick and name it 2011-07-17 11:57:07 +12:00
Chris Forbes
2d8b72a5ff fix usings in Spy.cs 2011-07-17 11:38:45 +12:00
Chris Forbes
37656a02d9 have RALint check actor type in EjectOnDeath 2011-07-17 11:28:40 +12:00
Chris Forbes
5f315bc404 split unit smoke out into WithSmoke trait; remove duplication 2011-07-17 11:27:20 +12:00
Chris Forbes
d6819a19b8 declare WithRotor -> RenderSimple dep 2011-07-17 11:08:02 +12:00
Chris Forbes
cfc499e459 tidy usings for MapChooserLogic 2011-07-17 10:52:05 +12:00
Chris Forbes
c401e9c8fb tidy up ra music player 2011-07-17 10:52:05 +12:00
Chris Forbes
f8a9511a15 have RALint check CrateAction.ExcludedActorTypes 2011-07-17 10:32:03 +12:00
Chris Forbes
835d671752 fix 1036 -- GiveUnitCrateAction can give units which don't have BuildableInfo, to anyone 2011-07-17 10:29:00 +12:00
Chris Forbes
6a99ff7931 reinstate CrateAction.ExcludedActorTypes; custom maps use this. 2011-07-16 19:09:28 +12:00
Paul Chote
21ab82f91d Increase infantry crushability slightly. 2011-07-16 05:03:42 +12:00
Paul Chote
5722db0e34 Make Civilians crushable 2011-07-16 05:03:19 +12:00
Paul Chote
87e02ee7b1 Update CHANGELOG 2011-07-16 00:05:44 +12:00
Curtis S
2748c54002 Added new RA map by Buddha: Snowy Island 2011-07-16 00:05:44 +12:00
Curtis S
70a3b0aaba New version of RA Map: Center Of Attention 2011-07-16 00:05:44 +12:00
Chris Forbes
2a08b28094 remove need for #pragma in Bridge.cs 2011-07-16 00:05:44 +12:00
Chris Forbes
b1eea4a4d3 remove the need for warning suppression in Lazy/Cached 2011-07-16 00:05:44 +12:00
Paul Chote
f9b1c4fcc3 Work around a non-interactable window bug exposed by earlier graphics refactoring. 2011-07-15 23:57:29 +12:00
Paul Chote
eabcc51738 Fix gun firing offset (Bug #940). 2011-07-15 21:31:48 +12:00
Paul Chote
e40581149a Fix mtnk firing offset (Bug #938). 2011-07-15 21:31:48 +12:00
Paul Chote
3ae34fabf1 Fix ltnk firing offsets (Bug #939). 2011-07-15 21:31:48 +12:00
Paul Chote
e39d45d108 Add a delay before playing the win/lose audio notification. 2011-07-15 21:31:48 +12:00
Paul Chote
bc1a50693c Toggle repair/sell button state when active. 2011-07-15 21:31:48 +12:00
Paul Chote
1c29c95614 Use toggle artwork for production tabs. Change tab label color on alerted tabs. Contributes towards #1006. 2011-07-15 21:31:48 +12:00
Paul Chote
8f4c2371c7 Rename TooltipButton -> ToggleButton and add an active state. Use for production group icons. 2011-07-15 21:31:48 +12:00
Paul Chote
fef8008c87 Add click sounds to production tabs. Contributes towards #1006. 2011-07-15 21:31:47 +12:00
Paul Chote
05acdc9b98 Clean up some uses of rect.Contains(int2). 2011-07-15 21:31:47 +12:00
Paul Chote
8390644fbe Fix scrollthumb hover state 2011-07-15 21:31:47 +12:00
Paul Chote
4d2310b077 Add left and right arrows for the tabstrip. Rearrange chrome.png layout slightly. 2011-07-15 21:31:47 +12:00
Paul Chote
affc99e1cd Remove obsolete buttons.psd from artsrc. 2011-07-15 21:31:47 +12:00
Paul Chote
a9b479dfea Show (Dead) in the player list in the objectives screen (Bug #1031). 2011-07-15 21:31:47 +12:00
Paul Chote
d6b5b282bf Fix player name color in objectives screen (Bug #1030). 2011-07-15 21:31:47 +12:00
Paul Chote
e333ea89c9 Remove mods/cnc/packages reference from C&C's mod.yaml to match RA. Packages are now loaded exclusively from the support dir for both mods. Completes fix for #1016. 2011-07-15 21:31:47 +12:00
Curtis S
60adc57ca2 Removed .\mods\ra\packages reference in mod.yaml 2011-07-15 21:31:47 +12:00
Curtis S
e73969cb26 Reduced MSUB damage from 400 to 300 2011-07-15 21:31:47 +12:00
Curtis S
33ad765e3b Changed msub cloak time from 50 ticks to 100 2011-07-15 21:31:47 +12:00
Curtis S
4be76fcfc0 Added CashTrickler trait to RA oil derrick 2011-07-15 21:31:47 +12:00
Curtis S
403b05b4db Fixed palette issues in RA oil derrick SHP 2011-07-15 21:31:46 +12:00
Paul Chote
725b0cda40 Fix Production Palette audio (Bug #1004). 2011-07-15 21:31:46 +12:00
Paul Chote
5fceaaec58 New APC turret; art by Daniel Hernandez. 2011-07-15 20:10:22 +12:00
Paul Chote
089cdf14ad Remove the baked harvester animation from proc. Fixes #1009. 2011-07-15 20:10:22 +12:00
Paul Chote
24d220213e Remove extraneous spaces after weapon names 2011-07-15 20:10:22 +12:00
Paul Chote
c981b4322e Increase bike damage by ~16%, give weapon a sensible name. 2011-07-15 20:10:22 +12:00
Paul Chote
6090fda144 Increase building repair rate, cost. 2011-07-15 20:10:21 +12:00
Paul Chote
6433e6b356 Halve Mammoth Tank regen rate 2011-07-15 20:10:21 +12:00
Paul Chote
39338c1d3a Update CHANGELOG 2011-07-15 20:10:21 +12:00
Paul Chote
e9bd03b686 Add crushable infantry support, enabled in C&C. 2011-07-15 20:10:21 +12:00
Paul Chote
7173d193cf Pass the sequence name to the Corpse effect instead of an InfDeath number. Only play death animations for standard deaths. 2011-07-15 20:10:21 +12:00
Paul Chote
19ead53223 Add a WarnCrush method to ICrushable which is called when a crusher begins to enter the cell. 2011-07-15 20:10:21 +12:00
Paul Chote
74d13286a8 Add a force flag to nudging which skips the ownership and idle checks 2011-07-15 20:10:21 +12:00
Paul Chote
98ae8c7630 Take ownership into account when determining crushability. Fixes the important half of #951 (tanks crushing your own walls). 2011-07-14 21:00:50 +12:00
Paul Chote
64b88819a9 Add plumbing to support ownership checks in MobileInfo.CanEnterCell. 2011-07-14 21:00:50 +12:00
Paul Chote
47ba4cb285 Add click sounds to ingame buttons 2011-07-14 21:00:45 +12:00
Paul Chote
195aecec0e Add chat notification audio 2011-07-14 20:29:14 +12:00
Paul Chote
f724da5628 Tweak lobby chat panel 2011-07-14 20:29:14 +12:00
Paul Chote
3f468353fc Fix player name color in lobby chat. 2011-07-14 20:29:14 +12:00
Paul Chote
562931196f Give observers a minimap 2011-07-14 20:29:14 +12:00
Paul Chote
9eb7a3c27b Tweak button positions 2011-07-14 20:29:14 +12:00
Paul Chote
b82b716506 Add icons for options/sell/repair 2011-07-14 20:29:14 +12:00
Paul Chote
dc0c0e744a Production group icons 2011-07-14 20:29:14 +12:00
Paul Chote
32322b1658 Add tooltip descriptions to support powers 2011-07-14 20:29:14 +12:00
Paul Chote
5b2d2265e3 Add 8 maps by Petrenko, remove evw2. 2011-07-14 20:29:14 +12:00
Paul Chote
2049030ad4 Show remaining build time, remove unnecessary calculations from production palette 2011-07-14 20:29:13 +12:00
Paul Chote
29a90021f6 Fix production tabs crash 2011-07-14 20:29:13 +12:00
Paul Chote
07ae0688ff Fix unexplored terrain tooltip 2011-07-14 20:29:13 +12:00
Paul Chote
ef8ed398ce Tweak special powers widget: move unnecessary calculations out of Draw(); display the charge time over the icon. 2011-07-14 20:29:13 +12:00
Paul Chote
574133429a Fix control groups 2011-07-14 20:29:13 +12:00
Paul Chote
3d9a8cc002 Fix a tooltip crash. 2011-07-14 20:29:13 +12:00
Paul Chote
b2bfc5368a Initial production tooltip 2011-07-14 20:29:13 +12:00
Paul Chote
6199ec1404 Hide the objectives panel when opening submenus 2011-07-14 20:29:13 +12:00
Paul Chote
d70e5d3c42 Simple support power tooltips 2011-07-14 20:29:12 +12:00
Paul Chote
e078c8f8d8 Add owner name/flag to world tooltip. 2011-07-14 20:29:12 +12:00
Paul Chote
c965899b8c Better support for dynamic tooltip sizes 2011-07-14 20:29:12 +12:00
Paul Chote
dd7e270780 Update tooltip every render - fixes tooltips for actors changing under the cursor. 2011-07-14 20:29:12 +12:00
Paul Chote
7c72c1564e Add tooltip hook to SupportPowers; save some batches. 2011-07-14 20:29:12 +12:00
Paul Chote
ca77f20f19 Save batches in ProductionPalette 2011-07-14 20:29:12 +12:00
Paul Chote
5f3483ed17 Improve edge-scroll behavior 2011-07-14 20:29:12 +12:00
Paul Chote
ca8605d3ee Remove dialog4 2011-07-14 20:29:12 +12:00
Paul Chote
b1fe085b4d Remove incorrectly hardcoded "dialog4" from WidgetUtils.GetBorderSizes(). 2011-07-14 20:29:12 +12:00
Paul Chote
06990e356f Simple world tooltip. 2011-07-14 20:29:12 +12:00
Paul Chote
88d68f7790 Containers shouldn't steal mouseover focus 2011-07-14 20:29:11 +12:00
Paul Chote
2f9114fcf8 Power/Silo bar tooltips. 2011-07-14 20:29:11 +12:00
Paul Chote
b4489028de Polish button tooltips. Add tooltips/hotkeys for menu/sell/repair 2011-07-14 20:29:11 +12:00
Paul Chote
460451c402 Start implementing new tooltip bits. Test tooltips added for buttons and production palette. 2011-07-14 20:29:11 +12:00
Chris Forbes
608bdc8fcd pull some validation out of individual lobby/player commands 2011-07-14 20:29:11 +12:00
Chris Forbes
2ec88a6f64 remove duplicated NextPowerOf2 definition 2011-07-14 20:29:11 +12:00
Chris Forbes
2259a0e7a5 remove duplication of DrawSelectionBox 2011-07-14 20:29:11 +12:00
Chris Forbes
2ab2ee17c1 remove duplicated HarvestThisTile function from Harvest.cs 2011-07-14 20:29:11 +12:00
Chris Forbes
332d6d82fe add using rather than fully qualifying StackTrace typename 2011-07-14 20:29:11 +12:00
Chris Forbes
6f477a2c14 fix broken detection of desktop resolution on linux 2011-07-14 20:29:10 +12:00
Chris Forbes
88d0c9238c more debug output from Cg renderer setup 2011-07-14 20:29:10 +12:00
Chris Forbes
b06647a079 reduce noise in Renderer 2011-07-14 20:29:10 +12:00
Chris Forbes
ceaca47747 don't use ScrollDirection.Set when it's not needed 2011-07-14 20:29:10 +12:00
Chris Forbes
1196948a13 remove duplicated box-drawing code from WICW 2011-07-14 20:29:10 +12:00
Chris Forbes
2a7be6debd add missing using for MouseScrollType 2011-07-14 20:29:10 +12:00
Chris Forbes
496135d321 clean up ViewportScrollControllerWidget.GetCursor 2011-07-14 20:29:10 +12:00
Chris Forbes
2da523e824 drop unused WorldRenderer.DrawBox 2011-07-14 20:29:10 +12:00
Chris Forbes
98ebb7c87e add DrawRect helper to LineRenderer, use it in both Radar*Widgets 2011-07-14 20:29:09 +12:00
Chris Forbes
5af4476cd8 split AnnounceOnKill into its own file 2011-07-14 20:29:09 +12:00
Chris Forbes
5633d84d21 add lint pass to check whether types with ISync actually have any [Sync] members 2011-07-14 20:29:09 +12:00
Chris Forbes
513b852a67 fix [Sync] being allowed in places that don't make sense 2011-07-14 20:29:09 +12:00
Chris Forbes
74335f0734 fix bogus indent in ObjectCreator 2011-07-14 20:29:09 +12:00
Chris Forbes
b1ee735f3b put CheckAutotargetWiring in its own file 2011-07-14 20:29:09 +12:00
Chris Forbes
60a3f170ab clean up remaining non-generic GetValue uses 2011-07-14 20:29:09 +12:00
Chris Forbes
913ca89d4f use generic GetValue<> in VoiceInfo 2011-07-14 20:29:09 +12:00
Chris Forbes
914b3e1bee use generic GetValue<> in MobileInfo custom loader 2011-07-14 20:29:09 +12:00
Chris Forbes
33e6c7d39f fix namespace on cnc ProductionQueueFromSelection 2011-07-14 20:29:09 +12:00
Chris Forbes
c6cdee6075 more noise reduction in SVC 2011-07-14 20:29:09 +12:00
Chris Forbes
d0ac8b9766 remove spam from SVC 2011-07-14 20:29:08 +12:00
Chris Forbes
6565f7b32c removing some noise from SVC 2011-07-14 20:29:08 +12:00
Chris Forbes
5b481c2445 add Bits<> support to FieldLoader 2011-07-14 20:29:08 +12:00
Chris Forbes
c7c97ec743 rename ColorHSLR.cs to ColorRamp.cs to match classname 2011-07-14 20:29:08 +12:00
Chris Forbes
95e29e06df add Bits/BitAllocator types 2011-07-14 20:29:08 +12:00
Chris Forbes
47e25bb5a1 use common version of AreMutualAllies in PC 2011-07-14 20:29:08 +12:00
Chris Forbes
85bb56fd8f use common version of AreMutualAllies in SPW 2011-07-14 20:29:08 +12:00
Chris Forbes
f37cf32021 use AreMutualAllies in SVC 2011-07-14 20:29:08 +12:00
Chris Forbes
4e1c845303 add common version of AreMutualAllies to WorldUtils 2011-07-14 20:29:07 +12:00
Chris Forbes
c9c31345aa fix broken indent in WorldUtils.cs 2011-07-14 20:29:07 +12:00
Chris Forbes
1076ebb884 declare SVC -> CVC dep, rather than silently not working 2011-07-14 20:29:07 +12:00
Chris Forbes
002a8edb4c remove RatioRequired, CriticalRatioRequired from SVC, use info members 2011-07-14 20:29:07 +12:00
Chris Forbes
6f920e9011 cleanup StrategicVictoryConditions.cs 2011-07-14 20:29:07 +12:00
Chris Forbes
a9c00bdfba fix vis,naming of StrategicVictoryConditions.self 2011-07-14 20:29:07 +12:00
Chris Forbes
e44b965785 fixed #999 -- replace order/first[ordefault] with .ClosestTo(point) 2011-07-14 20:29:07 +12:00
Chris Forbes
5c3a6c81ae tidy HackyAI 2011-07-14 20:29:07 +12:00
Chris Forbes
c1a6b3470a fix indent in HackyAI.DeployMcv 2011-07-14 20:29:06 +12:00
Chris Forbes
b6bdff6f85 [2/2] fixed #998 -- clean up HackyAI.BuildRandom 2011-07-14 20:29:06 +12:00
Chris Forbes
56a38b9463 [1/2] fixed #998 -- clean up HackyAI.BuildRandom 2011-07-14 20:29:06 +12:00
Chris Forbes
6f2d1c54d6 fixed #983 -- don't crash in HackyAI if we can't find a target. 2011-07-14 20:29:06 +12:00
Chris Forbes
14de16eeba fix indent in HackyAI.Activate 2011-07-14 20:29:06 +12:00
Chris Forbes
b69ed51fb1 remove spurious second BuildRandom(Vehicle) call 2011-07-14 20:29:06 +12:00
Chris Forbes
bccac29297 simplify FieldSaver.FormatValue 2011-07-14 20:29:06 +12:00
Chris Forbes
be1754d424 bug #997 -- remove duplication from HackyAIInfo 2011-07-14 20:29:06 +12:00
Chris Forbes
847a248a26 bug #997 -- introduce generic version of FieldLoader.GetValue 2011-07-14 20:29:06 +12:00
Chris Forbes
7e162ad744 remove done todos from hackyai 2011-07-14 20:29:06 +12:00
Chris Forbes
0cb1f98e7e fixed #994 - use FormatTimeSeconds in MusicPlayerLogic 2011-07-14 20:29:06 +12:00
Chris Forbes
8610222e2c remove spurious typenames from WidgetUtils.WrapText 2011-07-14 20:29:05 +12:00
Chris Forbes
5b5bca9903 split FormatTime, FormatTimeSeconds 2011-07-14 20:29:05 +12:00
Chris Forbes
d40b071ab1 tidy in WidgetUtils 2011-07-14 20:29:05 +12:00
Chris Forbes
99b8c765c7 fixed #996 -- Rules.InstalledMusic 2011-07-14 20:29:05 +12:00
Chris Forbes
1a2dc8ec1c fixed #995 - remove duplication in next/prev song in MusicPlayerLogic.cs 2011-07-14 20:29:05 +12:00
Chris Forbes
b71e8bfe85 work on #993 -- removed OnMouseUp from DeveloperModeLogic.cs 2011-07-14 20:29:05 +12:00
Chris Forbes
897f578fc4 work on #993 -- removed OnMouseUp from DiplomacyLogic.cs 2011-07-14 20:29:05 +12:00
Chris Forbes
b9834c5b88 work on #993 -- removed OnMouseUp from MapChooserLogic.cs 2011-07-14 20:29:05 +12:00
Chris Forbes
accf94d664 work on #993 -- removed OnMouseUp from ReplayBrowserLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
3bdea009e3 work on #993 -- removed OnMouseUp from CreateServerMenuLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
c4985a043b work on #993 -- removed OnMouseUp from IngameObserverChromeLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
50303107d8 work on #993 -- removed OnMouseUp from SettingsMenuLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
f666dc08f5 work on #993 -- removed OnMouseUp from LobbyLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
bd018484e1 work on #993 -- removed OnMouseUp from IngameChromeLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
dfd73ce209 work on #993 -- removed OnMouseUp from MainMenuButtonsLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
980dc265ef work on #993 -- removed OnMouseUp from ServerBrowserLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
c32e0186b9 work on #993 -- removed OnMouseUp from ConnectionDialogsLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
8e780759bf work on #993 -- removed OnMouseUp from GameInitLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
14f29eb30e work on #993 -- removed OnMouseUp from MusicPLayerLogic.cs 2011-07-14 20:29:04 +12:00
Chris Forbes
d5ee3655f3 fixed #992: removed spurious double-semicolons 2011-07-14 20:29:03 +12:00
Chris Forbes
d95b579ead Makefile: fix various issues
* Add missing dependency between shippable binaries and fixheader
* Remove spam when fixheader is used
* Remove error message on from clean
* Fix minimal rebuilds
* Use strict variables to avoid shelling out so often for file lists
* Reenable RALint checking of mods

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2011-07-14 20:29:03 +12:00
Chris Forbes
cd63da85d8 remove FieldLoader.LoadAttribute; replace with FieldLoader.IgnoreAttribute 2011-07-14 20:29:03 +12:00
Chris Forbes
a4648cfbcc move SheetSize to Graphics section of settings 2011-07-14 20:29:03 +12:00
Chris Forbes
54dee43590 test for required extensions in Cg renderer too 2011-07-14 20:29:03 +12:00
Chris Forbes
dcd9627c22 fixed #989: don't do renderer setup in a reflected call. 2011-07-14 20:29:03 +12:00
Chris Forbes
a07e151ab5 drop bogus comment in renderer 2011-07-14 20:29:03 +12:00
Paul Chote
0c95b43c87 Save some dumb perf in Widget.RenderBounds. 2011-07-14 20:29:03 +12:00
Paul Chote
e9d67860de Proper mouseover support. 2011-07-14 20:29:02 +12:00
Paul Chote
1114293035 Apply consistent widget method names. Semantic change: Widgets that want to tick when !Visible must override TickOuter() instead of Tick(). 2011-07-14 20:29:02 +12:00
Paul Chote
193999a040 Move OnMouseUp onto ButtonWidget and drop its unnecessary plumbing. 2011-07-14 20:29:02 +12:00
Paul Chote
8189ef109e Reorganize Widget into static/nonstatic. 2011-07-14 20:29:02 +12:00
Paul Chote
e58e354c4b Move IsDisabled checking for OnMouseDown into ButtonWidget. Remove unnecessary bool plumbing. 2011-07-14 20:29:02 +12:00
Paul Chote
bbeaf2047b Remove OnMouseDown from Widget. Define it on just the widgets that want it. 2011-07-14 20:29:02 +12:00
Paul Chote
7a69daa99c Remove Widget.OnMouseMove. 2011-07-14 20:29:01 +12:00
Paul Chote
f905c87b97 New support powers bin 2011-07-14 20:29:01 +12:00
Paul Chote
e787c46a81 Remove border from buildclock overlay. 2011-07-14 20:29:01 +12:00
Paul Chote
5f8beb632a Switch tabs when a queue is lost, hide tab-strip when there are no queues available, rename queueType -> queueGroup. 2011-07-14 20:29:01 +12:00
Paul Chote
a065ba0338 Keyboard support for production palette:
y/u/i/o/p map to Buildings/Defense/Infantry/Vehicles/Aircraft.
Tab or successive y/u/i/o/p will switch tabs within a category.
Successive clicks on category icons will also switch tabs.
Shift + keyboard/click cycles tabs in reverse.
2011-07-14 20:29:01 +12:00
Paul Chote
c1f7152857 Change Widget key support: Move (unused) Widget.OnKeyPress hook onto ButtonWidget; Buttons will respond to keys with modifiers. 2011-07-14 20:28:35 +12:00
Paul Chote
6877c29fa6 Reimplement production queue switching from selection. 2011-07-03 07:02:17 +12:00
Paul Chote
70faee4e9c Remove obsoleted artwork 2011-07-03 06:32:05 +12:00
Paul Chote
8950ef7bcb Hook up sell/repair buttons 2011-07-03 06:29:41 +12:00
Paul Chote
f96840df36 Rewrite production palette. Tooltips will be reimplemented later. 2011-07-03 06:20:02 +12:00
Paul Chote
c76811c5e1 Rewrite production tabs (again): Avoid doing a pile of work every tick; support multiple queue types grouped under one category; Tab numbering is sticky. 2011-07-03 01:48:14 +12:00
Paul Chote
b85fce3b41 Disable queue buttons when there are no tabs 2011-07-02 21:37:31 +12:00
Paul Chote
fe380b13ac Rewrite ProductionTabsWidget. 2011-07-02 21:18:26 +12:00
Paul Chote
d5e63538ad Port production palette from ui2 branch. Needs reworking. Unfinished. 2011-07-02 07:32:34 +12:00
Paul Chote
dba77daae0 Fix namespace 2011-07-02 07:31:39 +12:00
Paul Chote
e922e8028c Hook up tib storage bar 2011-07-02 06:23:48 +12:00
Paul Chote
7e67fdb446 Wire up power bar 2011-07-02 04:27:40 +12:00
Paul Chote
1f92286b51 Wire up cash display 2011-07-02 03:53:13 +12:00
Paul Chote
7e42175a94 Mock up sidebar using existing widgets 2011-07-02 03:45:42 +12:00
Paul Chote
717471a522 New faction flags 2011-07-02 01:31:18 +12:00
Paul Chote
9b3cedd37f Show map title in the lobby 2011-07-01 23:37:53 +12:00
Daniel Hernandez
0224b3b745 Fix stnk husk (Fixes #985). 2011-07-01 23:22:07 +12:00
Paul Chote
3dec6016e7 Remove diplomacy menu, lock teams option (Feature #950). 2011-07-01 23:19:50 +12:00
Paul Chote
fa6b9983d3 Conquest objectives panel (Feature #949). 2011-07-01 23:07:50 +12:00
Paul Chote
c81735911e Add Funcs for custom label Color/ContrastColor 2011-07-01 23:04:48 +12:00
Paul Chote
97186d8bd9 Support custom checkbox symbols. Add a crossed variant to C&C. Correctly copies checkbox state when copying checkboxes. 2011-07-01 23:04:48 +12:00
Paul Chote
7c63138e3f Mechanism for showing mission objectives in the ingame menu. Fixes #948. 2011-07-01 02:34:30 +12:00
Paul Chote
aaa78649fc Make overflow tabs clickable. Fixes #550. 2011-07-01 00:42:53 +12:00
Paul Chote
c2519375b2 Reduce grenadier death damage. Fixes #957. 2011-07-01 00:35:09 +12:00
Paul Chote
0f3be08491 Halve tiberium damage to infantry, deal it smoothly. 2011-07-01 00:19:46 +12:00
Paul Chote
a835edfab1 Increase tiberium pathing penalty for infantry. Fixes #953. 2011-07-01 00:16:28 +12:00
Paul Chote
9cbf372698 Use new reveal-map and heal crate effects. Fixes #977. 2011-07-01 00:12:27 +12:00
Paul Chote
17fa312108 Use new cloak crate effect 2011-07-01 00:08:43 +12:00
Paul Chote
11a9bc7e43 Remove ExcludedActors from crate actions. Use a tag trait for cloakable actors. Ban MCV from receiving cloak. 2011-07-01 00:07:04 +12:00
Paul Chote
f360559869 Remove some crap from Cloak. 2011-06-30 23:54:42 +12:00
Paul Chote
fc10b79e1d Capturable Biolab allows production of player-controlled viceroids. 2011-06-30 20:20:00 +12:00
Paul Chote
0236dd04ae Work around capturable tech bug. 2011-06-30 20:17:49 +12:00
Paul Chote
9657d697fc Add dino/vice icons, dino voices, crate effects from Sole Survivor 2011-06-30 20:16:16 +12:00
Paul Chote
b58e091892 Write graphics.log on Cg renderer errors. Fixes second half of #967. Untested. 2011-06-29 11:37:52 +12:00
Paul Chote
d62a21da14 Improve GLSL renderer debug logging: Define GL_INVALID_OPERATION error code (was previously error 1282); Include GL_RENDERER, GL_VERSION, GL_SHADING_LANGUAGE_VERSION in graphics.log; write graphics.log when CheckGlError fails. Fixes #966 and half of #967. 2011-06-29 11:33:25 +12:00
Chris Forbes
0e45968573 remove 'private' keyword where possible 2011-06-29 09:15:39 +12:00
Chris Forbes
587b2ef0d1 convert Buildable trait construction to concise style 2011-06-29 07:50:20 +12:00
Paul Chote
3305d5fad9 Update CHANGELOG 2011-06-29 02:26:41 +12:00
Paul Chote
adc9318a05 Add Muzzleflash to RA SAM Site. 2011-06-29 02:03:58 +12:00
Paul Chote
05dead8271 Don't ship demo.mix in packages 2011-06-29 00:05:10 +12:00
Paul Chote
3816cca667 Remove Tundra map and the snow tileset. Fixes #969. 2011-06-29 00:05:10 +12:00
Paul Chote
c58284d06f Increase ATWR range by 1. Fixes #941 (detection circle not visible). 2011-06-29 00:05:10 +12:00
Paul Chote
a7670f10ea Reduce SAM Site range. Fixes #954. 2011-06-29 00:05:10 +12:00
Paul Chote
05826c0c9b Fix Apache tooltip, halve it's damage. Fixes #952. 2011-06-29 00:05:10 +12:00
Chris Forbes
11dc069104 fix RALint prereqs checking 2011-06-28 23:36:39 +12:00
Chris Forbes
0080762bbc fixed #359 -- diplomacy panel shows player colors 2011-06-28 23:21:49 +12:00
Chris Forbes
43d8750aad fixed #728: BuildableInfo.BaseNormal -> GivesBuildableArea 2011-06-28 23:11:20 +12:00
Chris Forbes
fb027a5650 fix broken palette handling in editor on linux/mac 2011-06-28 22:05:10 +12:00
Chris Forbes
9ae566cd68 remove some inconsistency from linux packaging script 2011-06-28 21:02:52 +12:00
Paul Chote
3d442afcab Update AUTHORS 2011-06-28 02:03:18 +12:00
Daniel Hernandez
5e0817fc37 Remappable oil derricks. Fixes #502. 2011-06-27 20:43:30 +12:00
Paul Chote
09bcc16cb1 Fix capturable tech structures. 2011-06-27 20:24:05 +12:00
Paul Chote
9886c1f6fe Fix unremappable pixels in heli.shp (Fixes #965). 2011-06-27 20:10:02 +12:00
Paul Chote
de44833457 Don't mangle shadows/cursors 2011-06-27 18:35:47 +12:00
Paul Chote
ebc0cea217 Fix #961 2011-06-27 18:30:44 +12:00
Paul Chote
3ec5693f69 Fix repair depot crash 2011-06-26 16:12:18 +12:00
Paul Chote
2cdc3c4288 Fix e3 firing offset. Fixes #936. 2011-06-26 02:29:25 +12:00
Paul Chote
31cb1c017f Fix e4, e5 firing offsets. 2011-06-26 02:29:25 +12:00
Paul Chote
98f4db750b Support for changing infantry barrel offsets when prone. Fixes #935. 2011-06-26 02:29:25 +12:00
Paul Chote
9b8e927c33 Fix Ion Cannon cursor 2011-06-25 22:04:00 +12:00
Chris Forbes
8df0d973fa add RA:Aftermath music 2011-06-25 18:48:01 +12:00
Chris Forbes
9f5ee7fc1a add RA:Counterstrike music 2011-06-25 18:44:31 +12:00
Chris Forbes
cf4769979d fixed #899 -- OpenRA.Utility --png was missing unlock 2011-06-25 18:20:32 +12:00
Chris Forbes
a3601b1214 drop redundant virtuals from WithMuzzleFlash 2011-06-25 18:12:05 +12:00
Daniel Hernandez
6da5724af8 added new 2x2 oil derrick 2011-06-25 17:51:51 +12:00
Paul Chote
a4e319b9d2 Define a specific harvest cursor. Use attack for cnc harvest. 2011-06-25 17:40:34 +12:00
Paul Chote
fd2d15c0fe Work around #937. May have negative perf impact. 2011-06-25 16:43:51 +12:00
Paul Chote
fc37733c3c Add a screen-space offset to barrel positions, and fix HTNK firing offsets. Fixes #803, 929. 2011-06-25 15:25:22 +12:00
Paul Chote
b64c5e001e Add support for C&C Covert Ops music (fixes half of #824). 2011-06-25 14:43:45 +12:00
Paul Chote
24a649d491 Fix artillery firing offset. Fixes #928. 2011-06-25 14:06:54 +12:00
Paul Chote
2f07a38de0 Fix JEEP turret offset (Fixes #927) 2011-06-25 13:57:05 +12:00
Paul Chote
81d1444b4a Fix turreted muzzleflashes. 2011-06-25 13:54:30 +12:00
Paul Chote
016a082a76 Add Great Shot!' and Map theme' scores. Use Map theme for the shellmap. Fixes #913. 2011-06-25 13:32:16 +12:00
Chris Forbes
fabb89f4da disable component UI in windows installer 2011-06-25 12:26:45 +12:00
Lawrence Wang
1fa4cf5c0a Bug 856- Removal of extra few lines of code 2011-06-25 11:54:19 +12:00
Lawrence Wang
de5db51f25 Fixed #856 - created trait for ammo reload time, set for some aircraft 2011-06-25 11:54:12 +12:00
Chris Forbes
6be55b61aa fixed #934 -- convert all AttackBase.MuzzleFlash uses to WithMuzzleFlash 2011-06-25 11:51:04 +12:00
Chris Forbes
29b81be5bb removed obsolete data sln 2011-06-25 11:41:13 +12:00
Paul Chote
a59ff827b8 Update CHANGELOG 2011-06-25 00:18:17 +12:00
Paul Chote
b39880a845 SAM site muzzleflash (Fixes #923) 2011-06-25 00:17:49 +12:00
Paul Chote
6817332317 Rework apache weapon and firing offsets. Has duel machine guns with 10 shots, reloads all of its ammo every 8 seconds. Damage increased, and can now attack air. Fixes second half of #930. 2011-06-24 23:58:52 +12:00
Paul Chote
44c86928ec Rework orca weapons and firing offsets. Now fires a volley of 10 rockets, which reload at 2 per 3 seconds. Fixes half of #930. 2011-06-24 23:58:30 +12:00
Paul Chote
3b55b92573 Fix BGGY turret location (Fixes #926) 2011-06-24 20:56:45 +12:00
Paul Chote
24266ebc93 Autodetect CD instead of prompting the user. Fixes #911. Requires testing under Windows and Linux. 2011-06-24 19:08:29 +12:00
Paul Chote
dc9b0adba9 Kill unused map installation code. 2011-06-24 17:26:33 +12:00
Paul Chote
916e63710c Fix #892 2011-06-24 17:08:58 +12:00
Paul Chote
8122d63a74 Remove SSM from Nod 2011-06-24 01:40:00 +12:00
Paul Chote
edbc7a028b Artillery goes back to Nod 2011-06-24 01:21:17 +12:00
Paul Chote
06c32a728a Update CHANGELOG 2011-06-24 00:40:58 +12:00
Paul Chote
35a5fc3356 Work around for #902. 2011-06-24 00:40:58 +12:00
Paul Chote
2d34169d79 Fix harv/proc/selling interaction. Fix formatting issues in OreRefinery. (Fixes #901, #903) 2011-06-24 00:40:58 +12:00
Paul Chote
122c7ec569 Don't show bounty cashticks of $0. 2011-06-24 00:40:58 +12:00
Paul Chote
ef8b6b2e71 Remove FlyOffMap.Interruptable. Fixes #906. 2011-06-24 00:40:58 +12:00
Paul Chote
78502317aa APC becomes an Anti-Air transport. Will need new turret artwork. 2011-06-24 00:40:57 +12:00
Paul Chote
1848405795 Rocket Launcher (MSAM) rework. Now fires 6 unguided rockets, has a fixed turret, cannot target air. 2011-06-24 00:40:57 +12:00
Paul Chote
41def5fef5 Split STNK weapon from MSAM, give it burst 2, and set correct barrel offsets. Doubles effective STNK damage. (Fixes #907) 2011-06-23 18:45:35 +12:00
Paul Chote
60a4a06ee4 Restore APC cargo pips (Fixes #910). 2011-06-23 18:13:08 +12:00
Paul Chote
ec3d467858 HackyAI supports teams (Fixes #917). 2011-06-23 17:41:38 +12:00
Paul Chote
6ed0c574be Update CHANGELOG 2011-06-22 22:33:57 +12:00
Paul Chote
099ede0428 Halve bridge strength 2011-06-21 20:44:19 +12:00
Paul Chote
65f1427bf2 Fix some other bogus bits in Bridge 2011-06-21 20:35:19 +12:00
Paul Chote
5e220a9ac7 Fix #306 2011-06-21 20:35:08 +12:00
Paul Chote
af4093f380 Swap the default value for FlyOffMap.Interruptible. The common case (scripted aircraft) don't want to be interruptible. Fixes badr desync caused by the mono 2.6.7 compiler dropping initializers for bools that default to true. 2011-06-21 14:20:08 +12:00
Paul Chote
74b2b36a40 Clean up and merge #883 2011-06-21 13:34:38 +12:00
Curtis S
bb2e514dfd Fixed title in ra map "Center of Attention" 2011-06-21 13:14:05 +12:00
Paul Chote
6feccab5db Add map-player check to SurrenderOnDisconnect 2011-06-21 03:41:36 +12:00
Paul Chote
1cdfd44d43 Fix #897. 2011-06-21 03:40:39 +12:00
Paul Chote
ce65127e34 Fix observer tooltips (Bug #769) 2011-06-21 02:51:50 +12:00
Paul Chote
e33995d71b Don't display a tooltip for actors without the Tooltip trait 2011-06-21 02:48:52 +12:00
Paul Chote
088573f2b7 Disable controls instead of hiding when ready. Fixes #889 2011-06-20 22:50:32 +12:00
Paul Chote
7838896c81 Display bot spawns to everyone, not just the host. 2011-06-20 22:50:32 +12:00
Paul Chote
43aae99dd0 Fix #888 2011-06-20 22:50:32 +12:00
Paul Chote
49dfbd43b7 Fix #896 2011-06-20 22:50:32 +12:00
Paul Chote
347a80f0a7 Unbitrot GDI01. The broken rules overrides have been left as a testcase for #768 2011-06-20 22:50:32 +12:00
Paul Chote
c014731a2f Fix Map.PlayerCount 2011-06-20 22:50:31 +12:00
Paul Chote
bafa411329 Expose LockTeam/LockSpawn to mappers 2011-06-20 22:50:31 +12:00
Paul Chote
8875d1adee Skirmish starts with the last used map. 2011-06-20 22:50:31 +12:00
Paul Chote
4fa9a2ba2b Group the music button on the left 2011-06-20 22:50:31 +12:00
Paul Chote
e00bfd487d Hook up the spawn selector. 2011-06-20 22:50:31 +12:00
Paul Chote
c80fbaacd5 Add a spawnpoint selector for bots (selector logic unimplemented) 2011-06-20 22:50:30 +12:00
Paul Chote
b4ce97691b Use images instead of checkboxes for non-editable status fields and fix player template naming: local/remote -> editable/non-editable. 2011-06-20 22:50:30 +12:00
Paul Chote
ac68f9dab3 Remove Bot: label from bots in the slot dropdown. 2011-06-20 22:50:30 +12:00
Paul Chote
e7543f28df Fix naming of Player.PlayerReference. 2011-06-20 22:50:29 +12:00
Paul Chote
91b31b1981 Rewrite ChooseInitialStance to support bot teams and remove obsolete crap. 2011-06-20 22:50:29 +12:00
Paul Chote
4f172d7ed8 Make bots first-class players.
- Bots have their own Clients, with unique ClientIDs
 - Hosts can set bot team/color in the lobby
 - Bots are kicked when switching to a smaller map without enough slots
 - Order validator assumes that only client 0 has permission to issue bot orders
2011-06-20 22:50:29 +12:00
Paul Chote
0c9190a1af Enforce color/race/team locking 2011-06-20 22:50:28 +12:00
Paul Chote
19d74fef52 Server support for host changing other client's race/color/team/spawn 2011-06-20 22:50:28 +12:00
Paul Chote
d2df5722b5 Fix the lobby slots.
- lobbyInfo.Slots is now a dictionary, keyed by the name of the PlayerReference that the slot is tied to.
 - LockRace/Color/Team is now specified on the slot, avoiding map lookups in the lobby
 - Observers are no longer tied to slots -> players will join as observers instead of crashing the game if there are no available slots
 - Observers are able to change their name and color
2011-06-20 22:50:27 +12:00
Paul Chote
e934baa6e9 Better bot spawning code; better random color and proper player names. 2011-06-20 22:50:27 +12:00
Paul Chote
0899916406 Disable diplomacy and cheats for observers 2011-06-20 22:50:26 +12:00
Paul Chote
532bd42aed Remove obsolete Player index cruft 2011-06-20 22:50:26 +12:00
Paul Chote
bcbd18bb52 Skirmish mode starts with a bot selected. 2011-06-20 22:50:22 +12:00
Paul Chote
c6182f6039 Fix player connected chat message 2011-06-20 14:39:03 +12:00
Chris Forbes
3409d8f046 remove type-specific functions for ChromeMetrics.Get; use FieldLoader 2011-06-20 14:39:03 +12:00
Paul Chote
7095f293ff Fix #865 2011-06-20 14:39:03 +12:00
Paul Chote
63e77755b7 Fix #864 - don't display the depressed state if the checkbox is disabled 2011-06-20 14:38:59 +12:00
Paul Chote
d043f4807f Make the checkbox depressed state optional, and disabled in ra. 2011-06-20 14:34:29 +12:00
Paul Chote
94bca753d2 Fix #866 2011-06-20 13:03:23 +12:00
Paul Chote
9bf0a97327 Fix RMBO death sequences 2011-06-20 13:03:23 +12:00
Paul Chote
fe5ef82cdf Allow bot players to be created via map.yaml 2011-06-20 13:03:23 +12:00
Paul Chote
64497c9b2f Fix exploding walls 2011-06-20 13:03:23 +12:00
Paul Chote
2f86208a9a Swap mod and replay buttons 2011-06-20 13:03:23 +12:00
Paul Chote
568814b15a Display cnc mod version in the main menu 2011-06-20 13:03:23 +12:00
Paul Chote
7fb46bb2b6 Work around CreateLocalServer miscompile 2011-06-20 13:03:20 +12:00
Paul Chote
00b730ab0f Update changelog 2011-06-01 19:18:26 +12:00
Paul Chote
b487476ea9 Remove Game.AfterGameStart 2011-06-01 19:18:21 +12:00
Paul Chote
2ebb2ae921 Remove static handler crap from widget delegates - Register/unregister events manually (ra & cnc). 2011-06-01 19:15:55 +12:00
Paul Chote
add29e845e Fix orphaned DropDown panels (eg when exiting menus using a hotkey) 2011-06-01 18:53:41 +12:00
Paul Chote
ad3f378545 Add a hook for widgets being removed, and ensure widgets are removed consistently. 2011-06-01 18:50:59 +12:00
Paul Chote
bbce4368d9 Remove some crap from ra ServerBrowserLogic 2011-05-31 21:22:29 +12:00
Mike Bundy
fcceac1730 GPS fix 2011-05-31 20:44:01 +12:00
Curtis S
b64f883658 Moved Medic cost down to 500 from 800 2011-05-31 20:44:01 +12:00
Curtis S
571386f987 Added 13 new RA maps by buddha, hamb, seru 2011-05-31 20:44:01 +12:00
Curtis S
ed26c7c0b4 Fixed open grass areas in koth-crossroads 2011-05-31 20:44:01 +12:00
Curtis S
5f8e5d6da5 Fixed open grass/water/sea areas on community made maps 2011-05-31 20:44:01 +12:00
Paul Chote
9a2f04ce2d Fix cheats button width 2011-05-31 20:44:00 +12:00
Paul Chote
bce8e0ab1d Fix ftnk firing offsets. 2011-05-31 20:44:00 +12:00
Paul Chote
e79d8133d4 Fix ATWR firing offsets. Add a burst delay. 2011-05-31 20:44:00 +12:00
Paul Chote
489487c96c Fix OBLI fire offset 2011-05-31 20:44:00 +12:00
Paul Chote
9b858af2b7 Add muzzleflash to GTWR. WithMuzzleFlash now actually uses the turret position. 2011-05-31 20:44:00 +12:00
Paul Chote
99611f66de Nerf FTNK 2011-05-31 20:44:00 +12:00
Paul Chote
41819354ac Fix selection box dragging behind other ui elements 2011-05-31 20:44:00 +12:00
Paul Chote
6512db14cf Fix #845 (spawnpoint artwork leaks across mod change) 2011-05-30 22:15:15 +12:00
Paul Chote
c07abc48b2 Remove some nonfunctional code in BuildPaletteWidget 2011-05-30 22:15:15 +12:00
Paul Chote
b425d770c5 Correct parameter order in IOrderTargeter.CanTargetLocation interface definition 2011-05-30 22:15:15 +12:00
Paul Chote
922f4754f9 Drop the ControlGroupModifier setting. Use Cmd on osx for group addition. 2011-05-30 22:15:15 +12:00
Paul Chote
2d43d656c2 Remove bs settings state tracking 2011-05-30 22:15:14 +12:00
Paul Chote
81515705ec Add keyboard shortcut support to ButtonWidgets.
Hook up 'escape' and 'return' as appropriate for moving through menus.
2011-05-30 22:15:14 +12:00
Paul Chote
124f19f00b Bind skirmish servers to a random available port 2011-05-30 22:15:14 +12:00
Paul Chote
a288c5df15 Use static ctors for static setup. 2011-05-30 22:15:14 +12:00
Chris Forbes
a5fdfbfd60 fix water artifacts on cnc shellmap 2011-05-30 22:03:47 +12:00
Chris Forbes
f84312acb9 add editor hack for fixing open areas in existing ra maps 2011-05-30 21:59:25 +12:00
Chris Forbes
5531715652 fixed 850 -- rallypoint flags staying original owner's color after capture 2011-05-30 21:35:35 +12:00
Chris Forbes
368468e323 format RenderSimple 2011-05-30 21:32:54 +12:00
Chris Forbes
61cde675ea fixed 741 -- use the correct superweapon building when more than one is available and some are disabled 2011-05-30 21:26:05 +12:00
Chris Forbes
7ac57014fb tidy 2011-05-30 21:17:25 +12:00
Chris Forbes
596e64e527 remove ReverseEnterTransport -- 852 2011-05-30 21:15:56 +12:00
Chris Forbes
d54c632812 remove unused LinkProc function 2011-05-30 20:59:11 +12:00
Chris Forbes
09027d4770 fixup in RenderCargo 2011-05-30 20:58:18 +12:00
Chris Forbes
05bb335ce2 fix missing center panel part on fancy tooltips 2011-05-30 20:52:16 +12:00
Chris Forbes
0ba41acf4a add muzzle flashes to pbox/hbox 2011-05-30 20:50:45 +12:00
Chris Forbes
e24c8971b6 fixed 796 -- AttackTurreted sets IsAttacking correctly now. 2011-05-30 20:14:43 +12:00
Chris Forbes
24586ac056 fixed 771 -- adds Passenger.Weight, Cargo.MaxWeight, Cargo.PipCount 2011-05-30 20:09:22 +12:00
Chris Forbes
faf0ea387f small cleanup 2011-05-30 19:37:16 +12:00
Chris Forbes
6fd4b565c9 reinstate required hack in GainsExperience.InnerModifyRender 2011-05-23 22:16:21 +12:00
Chris Forbes
4cafabc1f3 fixed 773 -- ftur firing offset 2011-05-23 19:59:48 +12:00
Chris Forbes
aca4d2ebbb fixed 823 -- mouse interaction with password fields uses the metrics of the mask character, not the actual content 2011-05-23 19:57:40 +12:00
Chris Forbes
0d63e9f999 fix glitchyness on repairing veteran units 2011-05-23 19:48:59 +12:00
Chris Forbes
0bd4d6d417 remove unused duplicated function from GraphicsDevice 2011-05-23 19:47:20 +12:00
Chris Forbes
5ecc1ebefc split IGraphicsDevice.{Present,PumpInput} 2011-05-22 22:10:48 +12:00
Chris Forbes
77686adc1a remove batch spam from PerfGraphWidget 2011-05-22 22:05:49 +12:00
Chris Forbes
ef03d46f13 eradicate 'delegate' misuse 2011-05-22 22:02:09 +12:00
Chris Forbes
4b12a19af0 remove Renderer.Resolution duplication everywhere -- it's not free. 2011-05-22 21:38:54 +12:00
Chris Forbes
5ad2c43761 remove duplicated crap from CncLoadScreen 2011-05-22 21:34:59 +12:00
Chris Forbes
fdfa3fc1d3 start cleaning GameInitDelegate 2011-05-22 21:33:48 +12:00
Chris Forbes
41124a12f2 remove bogus empty delegates dir from Game 2011-05-22 21:33:47 +12:00
Chris Forbes
66c72d14d8 split scrollthumb/button in chrome data; fixes screwed up RA scrollthumbs 2011-05-22 21:33:47 +12:00
Chris Forbes
d8ff3b8d3a fix 704 -- parachute offsets are configurable, and sensible now for infantry 2011-05-22 21:33:46 +12:00
Chris Forbes
b792d07c8c start reworking player setup 2011-05-22 21:33:34 +12:00
Chris Forbes
cf5d49a328 fix some subtle crap in map upgrader 2011-05-22 20:41:38 +12:00
Chris Forbes
3bbcbf4701 fix #772 -- GivesBounty uses Actor.GetSellValue 2011-05-22 20:41:37 +12:00
Chris Forbes
0807f4ca8d 782 fixed -- friendly units no longer trigger mines 2011-05-22 20:41:37 +12:00
Chris Forbes
4c36403b75 783 fixed -- mines are visible to spec and allies now 2011-05-22 20:41:36 +12:00
Chris Forbes
f319307b43 fix 776 -- support custom SHPs & bright/dim zap count in TeslaZap projectile type 2011-05-22 20:41:35 +12:00
Chris Forbes
81eaf091c2 fix 752 -- utility --png takes a palette filename as well 2011-05-22 20:41:35 +12:00
Chris Forbes
a0e015746f move MakeSystemPalette out of editor.RenderUtils; rename to Palette.AsSystemPalette() 2011-05-22 20:41:34 +12:00
Chris Forbes
e839ae33d8 hax 2011-05-22 20:41:34 +12:00
Chris Forbes
90cea9f73d expose temp VBO tuning parameters in settings 2011-05-22 20:41:31 +12:00
Chris Forbes
cd6f77ca7c move terrain palette constant lookup outside terrain setup inner loop 2011-05-22 20:39:01 +12:00
Chris Forbes
83c80377d0 formatting in Building 2011-05-22 20:39:01 +12:00
Chris Forbes
b3908606c3 remove some silly cost centers in Building 2011-05-22 20:39:00 +12:00
Chris Forbes
af083a39f0 actually emit the list of missing extensions in the error message. 2011-05-22 20:38:59 +12:00
Chris Forbes
f406504147 add render_flip to perf history 2011-05-22 20:38:59 +12:00
Chris Forbes
fe392bd42d add render_widgets to perf history 2011-05-22 20:38:58 +12:00
Chris Forbes
52f79f232e correctly requote arguments to zenity 2011-05-22 20:38:58 +12:00
Chris Forbes
9434dd993a slight cleanup in Renderer 2011-05-22 20:38:57 +12:00
Chris Forbes
a52d7fb496 fix leaky textures & vbos 2011-05-22 20:38:56 +12:00
Chris Forbes
75588b050e improve error message in CreateDevice 2011-05-22 20:38:56 +12:00
Chris Forbes
1d406bde75 #753 fixed 2011-05-22 20:38:55 +12:00
Chris Forbes
bc48044788 fix #742 tsla & ttnk offsets (from djohe) 2011-05-22 20:38:55 +12:00
Chris Forbes
0eff17240c fix #743 (from djohe) 2011-05-22 20:38:54 +12:00
Chris Forbes
b22bb84349 make AttackMoveActivity a bit less aggressive about pwning the tick perf 2011-05-22 20:38:54 +12:00
Chris Forbes
375eb90a88 fix perf of HackyAI AssignRoles, to some extent 2011-05-22 20:38:53 +12:00
Chris Forbes
9b3e6c5c4a remove FP sillyness from FindUnits & friends 2011-05-22 20:38:52 +12:00
Chris Forbes
ccc245ded4 reintroduce Cached<T>; use for Actor.Bounds, Actor.ExtendedBounds, which replace Actor.GetBounds(bool) 2011-05-22 20:38:48 +12:00
Chris Forbes
b12a35af4c more trivial cleanups 2011-05-22 20:36:25 +12:00
Chris Forbes
599ee25cb1 adjust strictness of Production query in ChooseBuildTabOnSelect 2011-05-22 20:36:25 +12:00
Paul Chote
d4baf2d757 Refactor UnitInfluence trait -> world.ActorMap 2011-05-22 19:32:53 +12:00
Paul Chote
d6496cb5be Remove GainsExperience from mcv, harv, e6. 2011-05-22 19:32:53 +12:00
Paul Chote
4f7074fdf9 Don't give a levelup crate if the unit can't gain experience 2011-05-22 19:32:53 +12:00
Chris Forbes
668dfa1f6f don't show cashticks when there is no refund 2011-05-22 19:32:52 +12:00
Paul Chote
b0fd954b80 BRIK after AFLD/WEAP 2011-05-22 19:32:52 +12:00
Paul Chote
b9ceaae4dd All vehicles leave husks 2011-05-22 19:32:52 +12:00
Paul Chote
d8262486f9 Fix bogus attack-move with harv and apc 2011-05-22 19:32:52 +12:00
Paul Chote
13a2dc6866 Ftnk explodes on death. 2011-05-22 19:32:52 +12:00
Paul Chote
6f6e1b342c Tweak proc price, footprint 2011-05-22 19:32:52 +12:00
Paul Chote
7a2b78b1d8 Fix diplomacy/cheats menu stacking 2011-05-22 19:32:25 +12:00
Chris Forbes
cd756885a6 remove MasterServerQuery in favour of ServerList 2011-05-22 18:41:33 +12:00
Paul Chote
53426030ee Fix hover for ra dropdowns (also scrollpanels) 2011-05-22 18:41:33 +12:00
Paul Chote
325fd509b0 Remove obsoleted dropdown & label code 2011-05-22 18:41:33 +12:00
Paul Chote
d029b1ff6f Use new mechanism for stances / color picker 2011-05-22 18:41:32 +12:00
Paul Chote
0c9692c0b1 Use new mechanism for mod list 2011-05-22 18:41:32 +12:00
Paul Chote
078972e3be Use new mechanism for ra dropdowns 2011-05-22 18:41:32 +12:00
Paul Chote
ab298e1eae Remove redundancy from dropdown setup 2011-05-22 18:41:32 +12:00
Paul Chote
d7a0445e59 Remove ContainerWidget.Background 2011-05-22 18:41:32 +12:00
Paul Chote
7a21309d67 Use ScrollItem for ra music list 2011-05-22 18:41:32 +12:00
Paul Chote
46c870b967 Use ScrollItem for ra map browser 2011-05-22 18:41:32 +12:00
Paul Chote
db417545e6 Use ScrollItem for ra replay browser 2011-05-22 18:41:32 +12:00
Paul Chote
1d24c5f49c Use ScrollItem in ra server browser 2011-05-22 18:41:32 +12:00
Paul Chote
dc6bd60fcc Kill CheckboxWidget.Bind and related 2011-05-22 18:41:32 +12:00
Paul Chote
b1cc004194 Remove obsolete calls from ra SettingsMenuDelegate 2011-05-22 18:41:31 +12:00
Paul Chote
dbd16076a5 Remove unused video player from ra 2011-05-22 18:41:31 +12:00
Paul Chote
5cb0be6c4b Remove obsolete calls from ra DeveloperModeDelegate 2011-05-22 18:41:31 +12:00
Paul Chote
35673a058a Remove obsolete Bold field from widgets 2011-05-22 18:41:31 +12:00
Paul Chote
8eb4e663d2 Fix obsolete Game.Disconnect() 2011-05-22 18:41:31 +12:00
Paul Chote
16cd1679dd Fix special power bin position 2011-05-22 18:41:31 +12:00
Paul Chote
74d068423b Give a sensible error instead of spawning inaccessible filepickers when Fullscreen. 2011-05-22 18:41:30 +12:00
Paul Chote
cb53bcd17d Loadscreen tweaks 2011-05-22 18:41:30 +12:00
Paul Chote
13ceafb658 Fix music install crash. 2011-05-22 18:41:30 +12:00
Paul Chote
bafd12b88e Loadscreen progress bar 2011-05-22 18:41:30 +12:00
Paul Chote
126e489a10 More fluff 2011-05-22 18:41:30 +12:00
Paul Chote
f2f59e3f93 Eva logo. Disable scanlines 2011-05-22 18:41:30 +12:00
Paul Chote
e73248f55c Use the scrollbar arrow "pressed" variants 2011-05-22 18:41:29 +12:00
Paul Chote
75cee824be Move checkbox and button bits to chrome.svg 2011-05-22 18:41:29 +12:00
Paul Chote
3faf78ddd0 New spawnpoint artwork 2011-05-22 18:41:29 +12:00
Paul Chote
eb6c55e289 Merge music buttons into chrome.svg 2011-05-22 18:41:29 +12:00
Paul Chote
939a667229 Merge install logo into chrome.png. Display faction logos on install screen 2011-05-22 18:41:29 +12:00
Paul Chote
f577525fad Remove redundant cnc art src 2011-05-22 18:41:29 +12:00
Paul Chote
aef6223c6c Add logos to the loadscreen 2011-05-22 18:41:29 +12:00
Paul Chote
dcaa161bd1 Diplomacy menu 2011-05-22 18:41:28 +12:00
Paul Chote
84a99be18e Split CncIngameMenuLogic into its own file 2011-05-22 18:41:28 +12:00
Paul Chote
aaecd6ce92 "Battle control terminated" 2011-05-22 18:41:28 +12:00
Paul Chote
18c9a719ac Mission Accomplished / Lost notifications (cnc + ra) 2011-05-22 18:41:28 +12:00
Paul Chote
9f17afe289 Fix racing ticks at gamestart 2011-05-22 18:41:28 +12:00
Paul Chote
797a95ad93 Fade in the menu palette effect over a few frames 2011-05-22 18:41:25 +12:00
Paul Chote
9822afcdb8 New loadscreen 2011-05-21 17:26:20 +12:00
Paul Chote
3ea1534082 Show current title and volume slider in music player 2011-05-21 17:26:20 +12:00
Paul Chote
91a3aafa67 Split the download/install logic into multiple files. 2011-05-21 17:26:20 +12:00
Paul Chote
c76d2e37dc Make the sound engine less dumb about music. Fix the music player not knowing about already playing tracks. 2011-05-21 17:26:20 +12:00
Paul Chote
42d8722cbc Merge DropDownButtons 2011-05-21 17:26:20 +12:00
Paul Chote
58e3a1f41e Use the new dropdowns everywhere 2011-05-21 17:26:20 +12:00
Paul Chote
b2c60e0876 Fix graphics mode dropdown 2011-05-21 17:26:20 +12:00
Paul Chote
5bc0ef69ad Pass WidgetArgs to Widget.Initialize. Use this to allow for custom substitutions. 2011-05-21 17:26:20 +12:00
Paul Chote
b417118429 Prototype text dropdown 2011-05-21 17:26:20 +12:00
Paul Chote
e8d652ad63 New method for attaching panels to dropdowns. Implemented for colorpicker. 2011-05-21 17:26:20 +12:00
Paul Chote
85c519c073 Normalize checkboxes 2011-05-21 17:26:19 +12:00
Paul Chote
14af766427 Remove some duplication from widgets that draw fake buttons. 2011-05-21 17:26:19 +12:00
Paul Chote
b3f9725872 Mark another obsolete field 2011-05-21 17:26:19 +12:00
Paul Chote
04e5794678 Normalize slider 2011-05-21 17:26:19 +12:00
Paul Chote
e09cd16042 Normalize scrollpanel 2011-05-21 17:26:19 +12:00
Paul Chote
adb67699e1 Move ScrollItem upstream 2011-05-21 17:26:19 +12:00
Paul Chote
e09ccef48b Normalize TextFields 2011-05-21 17:26:19 +12:00
Chris Forbes
aa772db9a7 fix crashy behavior in TextFieldWidget 2011-05-21 17:26:19 +12:00
Chris Forbes
a96b1ce01c add property support to FieldLoader 2011-05-21 17:26:19 +12:00
Chris Forbes
310ecc34ce clean up usings everywhere 2011-05-21 17:26:18 +12:00
Paul Chote
eb8aafced0 Normalize ButtonWidgets 2011-05-21 17:26:18 +12:00
Paul Chote
3eb3ae76f0 Fix progressbars 2011-05-21 17:26:18 +12:00
Paul Chote
a9bbb5f5c2 Improve manifest parsing 2011-05-21 17:26:18 +12:00
Paul Chote
e2bd20f888 Reorder sequence loading to save batches 2011-05-21 17:26:18 +12:00
Paul Chote
239a96718d Throw a slightly more useful error on duplicate keys 2011-05-21 17:26:18 +12:00
Paul Chote
d7f009b218 Use the font dictionary everywhere 2011-05-21 17:26:18 +12:00
Paul Chote
e1c8658fdc Fonts are now defined in mod.yaml 2011-05-21 17:26:18 +12:00
Paul Chote
ab423fbe8c Mark some bits obsolete 2011-05-21 17:26:18 +12:00
Paul Chote
2075c7033b Refactor scrollpanel items into their own widget 2011-05-21 17:26:18 +12:00
Paul Chote
033880862d Remove last uses of Bold: in cnc 2011-05-21 17:26:18 +12:00
Paul Chote
a65021b550 Merge most of the new ui into a single texture 2011-05-21 17:26:17 +12:00
Paul Chote
810953ea94 Cheats menu 2011-05-21 17:26:17 +12:00
Paul Chote
0b0fac3c4b Shellmap music 2011-05-21 17:26:17 +12:00
Paul Chote
cb565e5d3c Wire up the settings panel 2011-05-21 17:26:17 +12:00
Paul Chote
ce901427bc Nonfunctional settings panel prototype 2011-05-21 17:26:17 +12:00
Paul Chote
76545db7fd Allow custom CncCheckbox fonts. Tweak CncScrollbar rendering. 2011-05-21 17:26:17 +12:00
Paul Chote
665b6c2b8e Fix server browser 2011-05-21 17:26:17 +12:00
Paul Chote
87cfd0a077 Fix sidebar interaction 2011-05-21 17:26:17 +12:00
Paul Chote
32640d0300 Remove range slider, add a random button 2011-05-21 17:26:17 +12:00
Paul Chote
3e2a49934c Don't use a static variable for player palette preview. 2011-05-21 17:26:16 +12:00
Paul Chote
1526b6ff37 Make Game.LoadWidget / Widget.LoadWidget consistent. 2011-05-21 17:26:16 +12:00
Paul Chote
21267688b0 Split the colorpicker logic into its own handler. Game.LoadWidget no longer adds the loaded widget to the RootWidget. 2011-05-21 17:26:16 +12:00
Paul Chote
529ed51034 Nit: use ServerSettings to pass info to the server 2011-05-21 17:26:16 +12:00
Paul Chote
f4ea4c5daa Add a WidgetArgs type to work around gmcs not understanding lambda -> Action -> object. 2011-05-21 17:26:16 +12:00
Paul Chote
603379aa96 Fix nits 2011-05-21 17:26:16 +12:00
Paul Chote
61facc7bb1 Let panels handle closing themselves 2011-05-21 17:26:16 +12:00
Paul Chote
5fffc9d816 Don't tell the master server about local servers 2011-05-21 17:26:16 +12:00
Paul Chote
f0f591c6fb Initial settings menu copied from the old impl. 2011-05-21 17:26:16 +12:00
Paul Chote
be79529d9e Perf debug 2011-05-21 17:26:15 +12:00
Paul Chote
00f0773dc1 Clear state correctly on mod transition 2011-05-21 17:26:15 +12:00
Paul Chote
e8926ccad3 Initial no-frills mod selector 2011-05-21 17:26:15 +12:00
Paul Chote
fb4a5d4083 Fix mapchooser button order 2011-05-21 17:26:15 +12:00
Paul Chote
80d5b67bb9 Music installation 2011-05-21 17:26:15 +12:00
Paul Chote
dfb07153c6 Rollover etc CncDropDownButtonWidgets 2011-05-21 17:26:15 +12:00
Paul Chote
86159f9ddc Fix lobby color picker 2011-05-21 17:26:15 +12:00
Paul Chote
c4f40babb5 Reimplement music player 2011-05-21 17:26:14 +12:00
Paul Chote
7c18614bf3 Fix observers 2011-05-21 17:26:14 +12:00
Paul Chote
ab28f5867f Disallow watching replays with zero duration. 2011-05-21 17:26:14 +12:00
Paul Chote
814845730f Work around a race condition with local servers. 2011-05-21 17:26:14 +12:00
Paul Chote
33a4f5e29e Support loopback servers for solo play 2011-05-21 17:26:14 +12:00
Paul Chote
b1a6eec3d3 Stop using MasterServerQuery in server browser 2011-05-21 17:26:14 +12:00
Paul Chote
2f9ec67510 Fix the server browser player count 2011-05-21 17:26:14 +12:00
Paul Chote
655eb123b9 Give more polished error messages 2011-05-21 17:26:14 +12:00
Paul Chote
3d493d3ace Package download works. Download error messages need polish. 2011-05-21 17:26:14 +12:00
Paul Chote
37577afc36 Polish 2011-05-21 17:26:13 +12:00
Paul Chote
6a1f3cfc18 Installing from CD reimplemented 2011-05-21 17:26:13 +12:00
Paul Chote
93e55d0866 Install logo 2011-05-21 17:26:13 +12:00
Paul Chote
372d2f5426 Saner load code for cnc. Installing not yet implemented. 2011-05-21 17:26:10 +12:00
Paul Chote
3d347848f3 Remove another hardcoded widget reference and prepare for saner init code. 2011-05-21 17:25:45 +12:00
Paul Chote
2e1e8fd7e8 Apply desat effect on ingame menu too 2011-05-21 17:25:45 +12:00
Paul Chote
d95138b600 Use the same mechanism for loading ingame and shellmap ui. 2011-05-21 17:25:45 +12:00
Paul Chote
07d5f91325 Add scanlines 2011-05-21 17:25:45 +12:00
Paul Chote
6fa9eeb5bb Prompt before quit / surrender 2011-05-21 17:25:45 +12:00
Paul Chote
33b35f768e Nits 2011-05-21 17:25:44 +12:00
Paul Chote
8957caeaca Basic ingame menu reimplemented. 2011-05-21 17:25:44 +12:00
Paul Chote
5e32cd38eb Fix initial selected map, naming. 2011-05-21 17:25:44 +12:00
Paul Chote
7db1b5a1a0 Add a hover state for scrollpanel entries 2011-05-21 17:25:44 +12:00
Paul Chote
fdf9927854 Remember the last map. Disable the server desc and password fields. Draw the chat entry box on top of the display box. 2011-05-21 17:25:44 +12:00
Paul Chote
805f61cc4b Bugfix when connecting via server browser 2011-05-21 17:25:44 +12:00
Paul Chote
fd6c0a90c6 Show the host/port in the dialogs. Show the failed dialog in the lobby when the server vanishes. 2011-05-21 17:25:43 +12:00
Paul Chote
5c59f7703d Reimplement connecting / connection failed dialogs. 2011-05-21 17:25:43 +12:00
Paul Chote
a607a60b8f New textfield with support for hover and disabled states. 2011-05-21 17:25:43 +12:00
Paul Chote
1881a6b713 Generalize the map chooser to work anywhere. Hook it up in server creation. 2011-05-21 17:25:42 +12:00
Paul Chote
1c1b89948a Add a server password field and map name 2011-05-21 17:13:20 +12:00
Paul Chote
09526ee2dd New create server layout 2011-05-21 17:13:20 +12:00
Paul Chote
99eb6ab774 Start reimplementing server creation 2011-05-21 17:13:20 +12:00
Paul Chote
9f4eba9003 Tweaks. The primary button feels better on the right. 2011-05-21 17:13:20 +12:00
Paul Chote
c9dd1aa4bd Improved replay browser 2011-05-21 17:13:20 +12:00
Paul Chote
14a904ab7a Start reimplementing replay browser 2011-05-21 17:13:18 +12:00
Paul Chote
57530c819b Direct Connect panel 2011-05-21 16:28:20 +12:00
Paul Chote
dded6040d6 Convert remaining buttons and checkboxes to cnc variants 2011-05-21 16:28:20 +12:00
Paul Chote
1e66d57ef1 Refactor font code out of LabelWidget 2011-05-21 16:28:17 +12:00
Paul Chote
188a16fc08 Cnc scrollpanel with support for rollover etc. 2011-05-21 16:27:38 +12:00
Paul Chote
d349c5341e Map chooser 2011-05-21 16:27:38 +12:00
Paul Chote
44d3412c7b Fix checkbox active area 2011-05-21 16:27:38 +12:00
Paul Chote
16c3f75269 Color tweaks 2011-05-21 16:27:38 +12:00
Paul Chote
8685d34703 New chat display 2011-05-21 16:27:37 +12:00
Paul Chote
5647917fda New checkboxes (independent from old checkboxes) that support hover and disable. 2011-05-21 16:27:37 +12:00
Paul Chote
c15d2f5cfe Simply the common case for buttons. 2011-05-21 16:27:37 +12:00
Paul Chote
b73575f37b Missed a couple of static bits. 2011-05-21 16:27:37 +12:00
Paul Chote
6cb0cb7d0e Can now start a game and disconnect from lobby without triggering a reload.
It is now possible to crash the game by starting a new server before the previous one has had time to timeout and release the port binding (the previous loadscreen pause meant this was always hidden).
2011-05-21 16:27:37 +12:00
Paul Chote
03264fa2ca Start reimplementing lobby. 2011-05-21 16:27:37 +12:00
Paul Chote
28cf48459b New menu buttons that support hover and a disabled state 2011-05-21 16:27:37 +12:00
Paul Chote
845b32281d Reimplement server browser 2011-05-21 16:27:37 +12:00
Paul Chote
6e3a88f670 Remove most of the chrome yaml. It will all be rewritten. 2011-05-21 16:27:37 +12:00
Paul Chote
a3b430c24a Remove engine references to MAINMENU_BG. Don't push the menu background onto the window list. Crashes whenever a delegate tries to open MAINMENU_BG. 2011-05-21 16:27:37 +12:00
Paul Chote
f74b1b6d27 Hook up Skirmish button 2011-05-21 16:27:36 +12:00
Paul Chote
8661415e67 Settings submenu 2011-05-21 16:27:36 +12:00
Paul Chote
7dd6857ae7 Add a Multiplayer menu 2011-05-21 16:27:36 +12:00
Paul Chote
3e6d1fc1e2 New button layout 2011-05-21 16:27:36 +12:00
Paul Chote
79674b7418 buttons 2011-05-21 16:27:36 +12:00
Paul Chote
7a49a3436e Shellmap border 2011-05-21 16:27:36 +12:00
Paul Chote
f3244d5750 Add a targeting reticle 2011-05-21 16:27:36 +12:00
Paul Chote
214697a506 Tweak menu layout 2011-05-21 16:27:36 +12:00
Paul Chote
550b4495a8 Add a black&white palettemod 2011-05-21 16:27:34 +12:00
Paul Chote
b825ddbb05 Convert cnc shellmap oramap -> directory 2011-05-21 16:27:07 +12:00
Chris Forbes
24d9e292dd wire up ButtonWidget.VisualHeight to ChromeMetrics as an example 2011-05-21 16:27:06 +12:00
Chris Forbes
b183366d54 add ChromeMetrics for values we dont want to duplicate everywhere 2011-05-21 16:27:06 +12:00
Paul Chote
c270f9ff4a Refactor text wrapping into WidgetUtils 2011-05-21 16:27:06 +12:00
Paul Chote
f3a54a802a Add color support to LabelWidget 2011-05-21 16:27:06 +12:00
Paul Chote
24712825eb Throw a useful exception on duplicated widget Id. 2011-05-21 16:27:06 +12:00
Paul Chote
388324dd69 Throw a sane exception when trying to load an invalid widget. 2011-05-21 16:27:06 +12:00
Chris Forbes
178e4664c7 790 fixed -- Widget.EventHandler was never used, removed 2011-05-21 16:27:06 +12:00
Chris Forbes
ec82e6fe68 make ScrollPanelWidget mouse interaction cheaper 2011-05-21 16:27:06 +12:00
Chris Forbes
0c9a1a03ce make ProgressBarWidget cheaper 2011-05-21 16:27:05 +12:00
Chris Forbes
4d4a07b791 make ScrollPanelWidget cheaper 2011-05-21 16:27:04 +12:00
Chris Forbes
9ee7fcdff1 mark some nonsense in LabelWidget 2011-05-21 16:27:03 +12:00
Chris Forbes
8d78ad2fec fix comment in CheckboxWidget 2011-05-21 16:27:03 +12:00
Chris Forbes
788e4780c6 s/order/event/ in ButtonWidget 2011-05-21 16:27:03 +12:00
Chris Forbes
8adca1960d fix comment spelling in ButtonWidget 2011-05-21 16:27:02 +12:00
Chris Forbes
1cf63ec803 Make ButtonWidget cheaper 2011-05-21 16:27:01 +12:00
Chris Forbes
072a42536e Make DropDownButtonWidget cheaper 2011-05-21 16:27:01 +12:00
Paul Chote
b08d8a02f4 Support custom margins and background on TextFieldWidget 2011-05-21 16:27:00 +12:00
Paul Chote
890136d447 Allow Labels to use any defined font. Add a new font type. 2011-05-21 16:26:59 +12:00
Paul Chote
4ad4c4dfb0 Support contrast on labels 2011-05-21 16:26:59 +12:00
Matthew Bowra-Dean
20458fc552 Move Platform.cs to OpenRA.FileFormats, fix #765. 2011-05-21 11:35:04 +12:00
Matthew Bowra-Dean
608126483e Fix #789 2011-05-21 11:34:59 +12:00
Chris Forbes
6277def7a0 fix utility filepicker on windows 2011-05-18 20:53:54 +12:00
Chris Forbes
7b3f178595 remove --pipe sillyness from Utility; obsoletes fmode's patch 2011-05-18 20:45:03 +12:00
Chris Forbes
4d6b2c7954 IBOless rendering with quads; considerably reduces renderer complexity 2011-05-18 20:42:10 +12:00
Chris Forbes
8e1bc25006 fix compile failure on windows due to missing #ziplib reference 2011-05-18 20:30:33 +12:00
Paul Chote
e0401f61de Rebuild osx launcher with xcode 3 2011-05-11 22:01:03 +12:00
Paul Chote
a6d258fa53 Disable installing from cd 2011-05-11 22:00:57 +12:00
Paul Chote
766ae84bd9 Update changelog 2011-05-11 22:00:15 +12:00
Paul Chote
16e0a6551a Disable capturable husks in cnc 2011-05-11 21:33:59 +12:00
Paul Chote
820895bf85 Update zenity wrapper - untested. 2011-05-04 20:24:04 +12:00
Paul Chote
22cd7ae1ad Fix osx launcher. TODO: needs testing on 10.5 2011-05-04 20:24:04 +12:00
Paul Chote
221d6ebd4f Make it actually work 2011-05-04 20:24:04 +12:00
Paul Chote
07dac11144 Install cnc from cd 2011-05-04 20:24:03 +12:00
Paul Chote
4efebcd6b2 Save packages to the support dir by default, but continue to support mods/*/packages 2011-05-04 20:24:03 +12:00
Paul Chote
96c3679cc9 Strip installer functionality from Utility 2011-05-04 20:24:03 +12:00
Paul Chote
83c026e12b Don't rely on the utility for ra package extraction. Untested. 2011-05-04 20:24:03 +12:00
Paul Chote
0102a9ad93 Don't rely on the utility for zip extraction. 2011-05-04 20:24:03 +12:00
Chris Forbes
65c6a23900 style nits & lambda reduction in ClassicProductionQueue.cs 2011-05-04 19:39:28 +12:00
Chris Forbes
fcdb16c938 remove warning from GpsWatcher 2011-05-04 19:31:50 +12:00
Chris Forbes
de8180f217 moar 2011-05-04 19:30:11 +12:00
Chris Forbes
7341b1f8f8 batch-process INotifyIdle, and add PerfSample wrappers for tick_idle and tick_activities 2011-05-04 19:23:40 +12:00
Chris Forbes
de6ac7e650 cache IMove in Actor 2011-05-04 19:23:05 +12:00
Chris Forbes
efaf0208f5 rationalize queue cycling 2011-05-04 18:56:53 +12:00
Chris Forbes
71313a264d adjust strictness in BuildPaletteWidget 2011-05-04 18:46:44 +12:00
Chris Forbes
433fc27744 fix capitalization of playerResources in RenderBuildingOre 2011-05-04 18:46:17 +12:00
Chris Forbes
ea32b1bc6d remove a bunch of trait lookups for PlayerResources 2011-05-04 18:40:33 +12:00
Chris Forbes
d86e0ec522 rename ITraitPrerequisite<T> to Requires<T> 2011-05-04 18:02:35 +12:00
Chris Forbes
8aa206ef95 fix bogus copy in Blast.cs 2011-05-04 18:02:35 +12:00
Chris Forbes
068ee3320e saner IPostRender dispatch 2011-05-04 18:02:34 +12:00
Paul Chote
6676d59847 Cache IOccupySpace and IHasLocation for some free perf 2011-05-04 11:20:41 +12:00
Paul Chote
2d7f3086f6 Nits 2011-05-04 10:46:51 +12:00
Paul Chote
6495478433 Kill Util.Centered 2011-05-04 09:21:30 +12:00
Paul Chote
71f79ad068 Add a testcase 2011-05-03 22:40:43 +12:00
Paul Chote
6cb5616c77 Fix the color picker 2011-05-03 22:40:35 +12:00
Paul Chote
8f962853f9 Support arbitrary per-player palettes. Will crash if I missed any cases that don't explicitly set the Renderable palette. 2011-05-03 22:21:31 +12:00
Chris Forbes
b937489f2d remove some inaccuracies in HACKING 2011-05-03 17:40:02 +12:00
Chris Forbes
0bc427c683 make helicopters actually inherit the plane stuff as intended. oops. 2011-05-03 08:21:56 +12:00
Chris Forbes
64782fb254 use ToList rather than List<T>.ctor 2011-05-02 22:23:36 +12:00
Chris Forbes
bd0a953d66 clean up text render of SPW 2011-05-02 22:18:42 +12:00
Chris Forbes
aea8b8da99 remove some more insanity from SPW 2011-05-02 22:14:24 +12:00
Chris Forbes
ba7522bed6 remove a little of the most blatant idiocy from StrategicProgressWidget 2011-05-02 22:09:27 +12:00
Chris Forbes
00e9015671 fix minelayer going to faraway FIX 2011-05-02 21:38:16 +12:00
Chris Forbes
093f159d8e tuned gpsdot to be somewhat nicer 2011-05-02 21:15:09 +12:00
Chris Forbes
2912c921de add custom icon for harvester 2011-05-02 20:00:56 +12:00
Chris Forbes
dd4c5508fa gpsdot has sprites 2011-05-02 19:51:15 +12:00
Mike Bundy
25962d58c6 GpsDot removed when actor .Destroyed. GpsDot removed from BADR 2011-05-02 19:34:36 +12:00
Mike Bundy
bcbac667db Changes how GPS is watched. Changes GPS ability. 2011-05-02 19:31:40 +12:00
Chris Forbes
7923f7d83a add --shp and --png commands to util 2011-05-02 19:18:27 +12:00
Chris Forbes
9d7ac73410 pull BuildingInfluence trait lookup out of the inner loop of building placement 2011-05-02 10:47:25 +12:00
Curtis S
f7bd3951e3 Fixed creeps owning badrs in some map yamls 2011-05-01 15:22:25 +12:00
Chris Forbes
702f787899 fix entering helicopters 2011-05-01 15:20:35 +12:00
Chris Forbes
5675f02c84 fix koth maps; drop nuclear winter 2011-05-01 15:20:34 +12:00
Paul Chote
5c7f1aa237 Fix deb packaging 2011-05-01 12:21:24 +12:00
Chris Forbes
eb3f4ef21d remove random Application.DoEvents() from Game.cs 2011-04-30 14:31:02 +12:00
Chris Forbes
7155747337 remove IShader.Commit 2011-04-30 14:29:32 +12:00
Chris Forbes
279413f05b dont crash on disconnect from lobby 2011-04-30 11:14:25 +12:00
Chris Forbes
f84832a24a remove some duplication in parachute use 2011-04-29 19:52:36 +12:00
Chris Forbes
b26d2e07e9 formatting 2011-04-29 19:50:31 +12:00
Chris Forbes
2b0f553d9d remove a silly lookup in RenderSimpleInfo 2011-04-29 19:47:44 +12:00
Chris Forbes
0b0e857b13 write traitreport to a file on disconnect, not stdout 2011-04-29 19:38:54 +12:00
Chris Forbes
3a0dcf3ae4 trim some crap 2011-04-29 19:37:36 +12:00
Chris Forbes
9ebea704ad clean up CrateDrop 2011-04-29 17:48:29 +12:00
Chris Forbes
71ca0f028e remove some sillyness from LightPaletteRotator 2011-04-29 17:25:13 +12:00
Chris Forbes
2d82f68a89 remove a dumb traitinfo lookup every tick in Crate 2011-04-29 17:20:16 +12:00
Paul Chote
88b7e70d64 Retain old deb package naming to avoid breaking the website 2011-04-24 13:30:40 +12:00
Chris Forbes
60ce83e696 cleanup cargo, remove some traitcalls 2011-04-23 10:58:46 +12:45
Chris Forbes
24798adf72 simplify & patch Passenger 2011-04-23 10:43:03 +12:45
Chris Forbes
c7ee613ca0 add trait query report on disconnect 2011-04-22 11:12:50 +12:45
Chris Forbes
e829c01ee6 else after return is silly 2011-04-22 10:32:47 +12:45
Chris Forbes
c34d987e4a remove a couple of trait lookups 2011-04-22 10:31:47 +12:45
Chris Forbes
8dc3fbead6 fix ra crash on placing refinery 2011-04-22 10:23:22 +12:45
Chris Forbes
00c4d1b469 remove FlyAttackLoop 2011-04-19 18:40:24 +12:00
Chris Forbes
4bf484bbe9 make paratroopers use FlyAttack rather than FlyAttackLoop 2011-04-19 18:39:31 +12:00
Chris Forbes
cd9f2bf716 make CrateDrop use FlyAttack rather than FlyAttackLoop 2011-04-19 18:38:25 +12:00
Chris Forbes
4ea9cdb003 allow FlyAttack to work without AttackPlane 2011-04-19 18:37:12 +12:00
Paul Chote
ca379ce007 Remove some needless allocations 2011-04-18 10:50:36 +12:00
Paul Chote
24908b7269 Split Harvest activity into saner chunks; fix pathfinding. 2011-04-18 10:47:10 +12:00
Paul Chote
eff37461d8 Pull Visible crap out of Harvester 2011-04-18 09:34:58 +12:00
Paul Chote
63e40aec68 Remove some crap from OreRefinery 2011-04-18 09:34:43 +12:00
Chris Forbes
73352937ff fix 705 for cnc 2011-04-18 09:09:20 +12:00
Chris Forbes
9d10bb6c69 fix 705 for ra 2011-04-18 09:08:26 +12:00
Chris Forbes
9481408136 remove some duplication from HackyAI 2011-04-18 08:23:16 +12:00
Chris Forbes
2317325591 add a lint pass to catch Mirey's bogus autotarget wiring cases 2011-04-18 07:37:29 +12:00
Paul Chote
a0941db61b Fix warfactory roof glitch 2011-04-17 20:02:02 +12:00
Paul Chote
5adc90a76e Fix map-placed SAM sites 2011-04-17 19:35:49 +12:00
Chris Forbes
76b3e2325b make RenderBuildingOre slightly more robust; remove some junk 2011-04-17 19:22:21 +12:00
Chris Forbes
ae645bbafe fix missing explosion on war factory; remove some nonsense 2011-04-17 19:22:21 +12:00
Chris Forbes
4f76876f05 remove one of the Move constructors 2011-04-17 19:22:21 +12:00
Chris Forbes
9541023456 664 fixed 2011-04-17 19:22:21 +12:00
Chris Forbes
5e0f57d730 tabify 2011-04-17 19:22:21 +12:00
Chris Forbes
e4dcf256aa quick fix for 702 2011-04-17 19:22:21 +12:00
Paul Chote
5a0aea7eb1 *.exe should remain executable 2011-04-17 13:51:35 +12:00
Paul Chote
3f06d6b867 Fix version string order 2011-04-17 13:02:00 +12:00
Paul Chote
35c925bcbe Update the description 2011-04-17 12:54:35 +12:00
Paul Chote
f0df830b69 Put the openra binary in /usr/games 2011-04-17 12:43:36 +12:00
Paul Chote
5862c795a9 Fix changelog format (still not compliant because it doesn't have * before the entries, but close enough...) 2011-04-17 12:34:35 +12:00
Paul Chote
a93ed12ce0 Put the changelog and copyright files in the correct location 2011-04-17 11:54:13 +12:00
Paul Chote
561eda4ba9 Remove postinst and postrm scripts 2011-04-17 11:34:18 +12:00
Paul Chote
952cd47e7a Update copyright, make myself maintainer, remove nonstandard Uploaders field. 2011-04-17 11:33:11 +12:00
Paul Chote
e7b71e7c66 Fonts are provided by ttf-freefont 2011-04-17 11:16:12 +12:00
Paul Chote
9bc0ad5605 Remove the packages directory from the repo/packages (running a source build should now do the correct thing wrt package downloading) 2011-04-17 11:04:41 +12:00
Paul Chote
aa9eb6058d Make built files nonexecutable 2011-04-17 10:46:58 +12:00
Paul Chote
72a783a647 Remove executable bit from files 2011-04-17 10:40:47 +12:00
Paul Chote
b2167adf1a Kill QueuedActivity 2011-04-16 15:37:31 +12:00
Paul Chote
bfceced8a0 Update changelog 2011-04-16 14:15:43 +12:00
Paul Chote
6b5f455c38 Rename CancelableActivity.cs -> Activity.cs 2011-04-16 13:24:34 +12:00
Paul Chote
4f83e994d0 Tidy up Activity.Cancel(), make Tick abstract 2011-04-16 13:18:22 +12:00
alzeih
0a67c68c45 GetTargetQueue -> GetTargets + Exts 2011-04-16 12:57:55 +12:00
alzeih
820f67e46b more for Activity 2011-04-16 12:56:10 +12:00
alzeih
255bac6aff QueuedActivity's Insert is broken 2011-04-16 12:50:13 +12:00
Paul Chote
4e89326134 Fix #701 - cannot select spawnpoints > 8. 2011-04-16 12:10:45 +12:00
Paul Chote
e5506f2455 Rename RenderWarFactory -> RenderBuildingWarFactory 2011-04-16 12:05:02 +12:00
Chris Forbes
9bd5c153ad interfaces cleanup 2011-04-16 12:01:23 +12:00
Chris Forbes
8a4f49485b remove defunct IOrderCursor interface 2011-04-16 12:01:23 +12:00
Chris Forbes
447fd05723 unify handling of order expose + issue for plane/heli; was identical 2011-04-16 12:01:23 +12:00
Chris Forbes
865f3e1b74 factor out resupply activity queueing for plane/heli into aircraft 2011-04-16 11:59:42 +12:00
Mike Bundy
0cb133e038 Bug Fix: GPS is shared across owned ATEKs 2011-04-16 11:59:42 +12:00
Paul Chote
794dcac4d2 Create INotifyDamageStateChanged for nearly everything else that used INotifyDamage. 2011-04-16 11:51:34 +12:00
Paul Chote
8b00e1cfa5 Remove some bogus duplication in Sell (caused the double-sell bug). 2011-04-16 11:39:32 +12:00
Paul Chote
7b0a9136ab Remove some bogosity from RenderBuilding 2011-04-16 11:19:37 +12:00
Paul Chote
1c2574f4f4 Add an INotifyKilled interface, which is what most things that used INotifyDamaged actually cared about. 2011-04-16 10:58:35 +12:00
Chris Forbes
d9fc84b55e cleanup InflictDamage a bit 2011-04-14 22:44:32 +12:00
Paul Chote
7109428058 Fix double-sell fail 2011-04-14 15:50:16 +12:00
Chris Forbes
f45ec6f918 691,697 fixed 2011-04-14 12:13:08 +12:00
Chris Forbes
d221cb1902 report maxplayers to master server 2011-04-13 20:33:10 +12:00
Chris Forbes
93a2e478f9 fix 'exploit detected' spam when selecting someone else's units and pressing s/f/x 2011-04-13 20:13:54 +12:00
Chris Forbes
005d0a6a32 split out aircraft and ships into their own files for cnc too 2011-04-13 19:59:05 +12:00
Chris Forbes
5f76f1ca7f split ships out into their own yaml too 2011-04-13 14:39:49 +12:00
Chris Forbes
33815eaa4e split aircraft out into their own yaml file 2011-04-13 13:27:09 +12:00
Chris Forbes
7be167b4fd fix crash in SatelliteLaunch ctor 2011-04-13 11:37:15 +12:00
Caleb Anderson
5adda21b28 fix build 2011-04-13 07:22:10 +12:00
Chris Forbes
c19881cae3 694 fixed -- the same building can now do both repair and rearm for aircraft 2011-04-12 08:49:58 +12:00
Chris Forbes
e4d2839254 spacing nit 2011-04-12 08:47:55 +12:00
Paul Chote
61db3b3965 Kill HPFraction 2011-04-12 08:42:13 +12:00
Paul Chote
cd64d62b7e Fix bogus silo/wall rendering 2011-04-12 08:42:13 +12:00
Paul Chote
715425d821 Capturable husks for cnc 2011-04-12 08:42:07 +12:00
Paul Chote
362170ee67 Tweak capturing traits 2011-04-12 08:41:25 +12:00
Paul Chote
a31ef3d8e2 Use MakeAnimation activity for make animations 2011-04-12 08:41:25 +12:00
Chris Forbes
394ee0dfe6 add seru's 'Pressure' map 2011-04-12 08:30:11 +12:00
Caleb Anderson
3fe4d32674 helis don't fail to attack on diagonal approach 2011-04-12 08:17:11 +12:00
Mike Bundy
bca2797bb4 Bug Fix: Helicopters spawning under each other 2011-04-10 23:36:49 +01:00
Mike Bundy
7a63858812 Bug Fix: Cash ticks for TRUK and Bounties only show for allies 2011-04-10 21:22:42 +01:00
Chris Forbes
d2d0e4be96 better support for contrail coloring everywhere 2011-04-10 11:15:43 +12:00
Chris Forbes
79079ebe07 working missile trails 2011-04-10 11:15:42 +12:00
Chris Forbes
5fd3cc7977 internal machinery for contrails on missiles 2011-04-10 11:15:41 +12:00
Chris Forbes
6710ad975e split out ContrailHistory from the trait machinery 2011-04-10 11:15:40 +12:00
Chris Forbes
c4a72f016a remove some more bits 2011-04-10 11:15:39 +12:00
Chris Forbes
c2966978f3 start trimming down prox code 2011-04-10 11:15:37 +12:00
Paul Chote
fe4fd8cab0 Use MakeAnimation for selling; Support selling non-buildings 2011-04-10 11:03:42 +12:00
Paul Chote
e4d8680bd5 Pull the make animation crap out of Transforms 2011-04-10 10:53:04 +12:00
Paul Chote
43f81501a8 Split Capturable into its own trait 2011-04-10 10:07:00 +12:00
Chris Forbes
40f6c4e332 clean up unnecessary junk from MoveAdjacentTo 2011-04-09 15:21:16 +12:00
Chris Forbes
3325739035 fix pathing to repair pad being bogus 2011-04-09 15:20:18 +12:00
Chris Forbes
f851e6a212 fix a silly glitch in unit repairing 2011-04-09 15:14:19 +12:00
Chris Forbes
260b95f96d fix utility crashing on windows (hack) 2011-04-09 14:26:47 +12:00
Chris Forbes
abb895d8be fix logfile opening to be sensible 2011-04-09 14:26:46 +12:00
Chris Forbes
19ad0bf0cc improve util arg parsing 2011-04-09 14:26:45 +12:00
Chris Forbes
ba72276b83 some more sanity in util 2011-04-09 14:26:44 +12:00
Chris Forbes
fddfdd5073 remove some crap code in Util 2011-04-09 14:26:43 +12:00
Chris Forbes
b633802ec2 remove one use of Path.DirectorySeparatorChar 2011-04-09 14:26:42 +12:00
Chris Forbes
48a359e202 cleanup header of FileSystem.cs 2011-04-09 14:26:41 +12:00
Chris Forbes
6105859b25 remove some junk from GameInitDelegate 2011-04-09 14:26:40 +12:00
Paul Chote
110f1aacc2 Normalize yaml lineendings 2011-04-09 12:14:33 +12:00
Paul Chote
4c92293814 Remove UnitInfluenceDebug checkbox 2011-04-09 12:10:16 +12:00
Chris Forbes
c99be90548 remove an unused OT 2011-04-09 12:02:21 +12:00
Mike Bundy
3e04b17b46 Feature: Bounties added to Buildings/Units at 10% of value + 1.25 for each lvl 2011-04-09 11:04:59 +12:00
Chris Forbes
7d29d90338 from mirey: pilot parachutes from shot down plane, sometimes 2011-04-09 11:01:17 +12:00
Chris Forbes
ca81871b7b fix broken merging of yaml overrides in maps; we now have a strict mode and a liberal mode. 2011-04-09 10:55:54 +12:00
Chris Forbes
7cd983a83b fix line endings on various yamls 2011-04-09 10:55:53 +12:00
Paul Chote
c775b5ba68 Remove some dead code from UOG. 2011-04-09 10:32:36 +12:00
Paul Chote
c87188e93f Fix ownership of deb contents 2011-04-09 09:04:25 +12:00
Chris Forbes
f47c2a678c remove some unnecessary semantics-muddying 2011-04-08 09:47:42 +12:00
Paul Chote
aba14eec23 Squash compiler warnings 2011-04-07 21:26:57 +12:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Caleb Anderson
1a49b46af1 Added myself to authors 2011-04-07 20:05:16 +12:00
Chris Forbes
a97ae5a4d5 fix bogus split2/split3 yaml 2011-04-06 09:24:54 +12:00
Curtis S
88d63d07e6 Adds TRUK to both sides - donates cash to others 2011-04-06 09:16:42 +12:00
Chris Forbes
b4fe4818a9 remove slight sillyness from ralint output 2011-04-06 07:21:06 +12:00
Erasmus Schroder
a2060b26ed HackyAI: Corrected squadsize, removed unnecessary lines. 2011-04-06 07:20:04 +12:00
Erasmus Schroder
8e56bdc197 Made HackyAI attackers scan for enemy units 2011-04-06 07:20:01 +12:00
Chris Forbes
9f3107f642 fix #688 2011-04-06 07:16:54 +12:00
Chris Forbes
24a205d992 actually working custom lint passes 2011-04-05 21:56:31 +12:00
Chris Forbes
55c609ee16 fix bug 609 -- removing traits that arent on an actor is an error. 2011-04-05 21:26:32 +12:00
Chris Forbes
576e9b90f6 remove slight fail 2011-04-05 21:26:02 +12:00
Mike Bundy
4d4cd6940b Fixed Bug: Game crash when ATEK destroyed as GPS launched 2011-04-04 12:40:53 +12:00
Curtis S
f6b8e36f36 v2rl arty bridge behaviour fix 2011-04-04 11:22:00 +12:00
Mike Bundy
e544333d9e Bug Fix: Selling ATEK loses GPS 2011-04-04 11:17:37 +12:00
Chris Forbes
1af23079eb make it crash nicely when you inherit from a bogus actor type 2011-04-04 11:14:07 +12:00
Chris Forbes
cee021ef17 fix AudLoader failing to load sounds that use only half of the final byte 2011-04-04 11:13:58 +12:00
Paul Chote
1f12306924 Fix default utility not passing supportdir to zip/install-ra. Fix game crash when utility crashes during extract. 2011-03-30 21:47:48 +13:00
Paul Chote
e63f9c34f8 Log the gpu vendor into graphics.log 2011-03-30 21:14:49 +13:00
Paul Chote
c746a3e81a Upgrade osx launcher project to xcode 4, remove unnecessary webkit reference, fix bogus arg passing to OpenRA.Utility (now passes everything) 2011-03-30 21:07:49 +13:00
Paul Chote
3dda9ee607 Write a utility.log to the logs dir when the utility crashes 2011-03-30 20:52:54 +13:00
Paul Chote
5d762b1f9c Fix root cause for `world owned by creep' bugs 2011-03-29 21:13:01 +13:00
Paul Chote
23eb077417 #672 - Textfield support for home and end 2011-03-26 10:35:58 +13:00
Paul Chote
ea626d4b39 RMBO voices on build and kill. 2011-03-25 20:04:23 +13:00
Paul Chote
a14968810c Add new voice keys for rmbo in preparation for following patches 2011-03-25 19:17:53 +13:00
Paul Chote
2f29e462a8 Fix #661 - map placed SAMs cannot attack 2011-03-25 18:54:53 +13:00
Paul Chote
8c18949861 Change C4Demolition from minutes to ticks; actually use this value. 2011-03-23 21:07:11 +13:00
Paul Chote
6ecf8aaf20 Set autotarget range to sight for all cnc infantry 2011-03-23 20:35:50 +13:00
Paul Chote
b7262b6490 Allow Autotarget to have a custom scan radius, use it for VICE. 2011-03-23 20:31:27 +13:00
Paul Chote
3071cd8240 Kill RenderUnitRotor in favour of RenderUnit + WithRotor. 2011-03-23 08:05:09 +13:00
Paul Chote
c7e2619a98 Explicitly declare dependency on Attack* from AutoTarget/AutoHeal. 2011-03-22 21:36:06 +13:00
Paul Chote
1ceede4322 Fix #656 - base cycling fired on both key down and key up. 2011-03-22 21:21:34 +13:00
Paul Chote
a745f3dc40 Update changelog 2011-03-20 08:47:54 +13:00
Paul Chote
0d53346138 Fix bogus ClampToWorld behavior (allowed helicopters to fly outside map) 2011-03-19 21:01:14 +13:00
Chris Forbes
41a6e94e87 fix visual glitchyness on creating actors that will be selected in their first tick 2011-03-19 19:48:16 +13:00
Chris Forbes
708cdcd855 add CashTick to building refunds 2011-03-19 18:58:04 +13:00
Chris Forbes
0236da0a28 fix up ralint a bit 2011-03-19 18:53:50 +13:00
Chris Forbes
18e1de1d4b prefer to circle over something friendly than leave the map 2011-03-19 18:44:39 +13:00
Chris Forbes
73a34886ec oops 2011-03-19 18:44:38 +13:00
Chris Forbes
2d480c900f patch plane to circle after move 2011-03-19 18:44:37 +13:00
Chris Forbes
0cf022c87a rename FlyCircle -> FlyAttackLoop, for accuracy; new FlyCircleto fly a hold 2011-03-19 18:44:36 +13:00
Paul Chote
dea199400d Fix #630 - Muzzleflashes on cnc apache 2011-03-19 18:40:12 +13:00
Paul Chote
8e079c310a Give Oil Derricks a small sight range 2011-03-19 17:48:56 +13:00
Paul Chote
a5af4e85ce Tweak CashTick and Oil Derricks 2011-03-19 17:48:56 +13:00
Paul Chote
08158a6929 Allow the control group modifier key to be customized. 2011-03-19 17:48:56 +13:00
Paul Chote
6ba6940aad Support the meta key modifier 2011-03-19 17:48:56 +13:00
Chris Forbes
72e0b58912 fix csproj bogosity 2011-03-19 17:28:45 +13:00
Paul Chote
0d2a692d8d Fix bogus prereqs in ra. 2011-03-18 11:27:16 +13:00
Paul Chote
e043f38c00 Whoops, forgot to commit the changelog 2011-03-18 11:01:57 +13:00
alzeih
53f4337129 Don't change mods if the same one is selected in the dropdown 2011-03-18 10:49:29 +13:00
Paul Chote
eb69b697b1 Fix bogus handling of special keyboard characters everywhere else. Textfields now only accept valid characters, support right-delete. 2011-03-18 10:48:12 +13:00
Paul Chote
7d6d488176 Fix #549 - Shift + tab doesn't cycle build tabs backwards. 2011-03-18 09:44:28 +13:00
Paul Chote
c568759e49 Fix #595 - IDisposable crash. 2011-03-17 22:26:28 +13:00
Paul Chote
d05b979e53 Tweak cnc proc cashtick 2011-03-17 22:26:28 +13:00
Paul Chote
86e8c3974f Fix #611 - prereqs handled by traits. Make both cnc power plants valid for prereqs. 2011-03-17 22:26:28 +13:00
Paul Chote
6d1defc53e Use CashTick on harv unloading. 2011-03-17 22:24:17 +13:00
Paul Chote
ffac0221cf CashTick IEffect for Oil Derricks. 2011-03-17 22:24:17 +13:00
Chris Forbes
a3994df925 queries dies 2011-03-17 22:09:10 +13:00
Chris Forbes
caa52b2780 remove CachedView 2011-03-17 22:09:09 +13:00
Chris Forbes
149324ea92 remove most of the crap from queries 2011-03-17 22:09:08 +13:00
Chris Forbes
eba7641125 remove old Sell handler from Building 2011-03-17 22:08:53 +13:00
Chris Forbes
da36ce19e2 fix sellable compile fail 2011-03-17 20:09:43 +13:00
Chris Forbes
7e25947689 yaml changes for sellable 2011-03-17 19:14:20 +13:00
Chris Forbes
4eaa7d5cf2 split out Sellable into its own trait; yaml requires update 2011-03-17 19:14:17 +13:00
Chris Forbes
ff44e34d89 dont be detected by friendly detectors 2011-03-16 20:48:34 +13:00
Chris Forbes
8bef8d5a72 have spies appear a convincing color on radar too 2011-03-16 20:30:23 +13:00
Chris Forbes
048386e6fa add ExperienceInit (MapActor's 'Experience:' key, int) 2011-03-16 19:30:58 +13:00
Chris Forbes
f3dfc422ab fixed #635 2011-03-16 19:16:38 +13:00
Chris Forbes
3b89110202 fix some bogosity in MasterServerPinger (still not right) 2011-03-16 11:02:17 +13:00
Chris Forbes
73d27c822e add IgnoresDisguise; support it in AppearsHostileTo / AppearsFriendlyTo 2011-03-16 09:51:26 +13:00
Chris Forbes
a21deea60b spam the CellInfo messages into the debug log, not the chat 2011-03-15 12:18:08 +13:00
Chris Forbes
981e57bde8 some more overloads etc 2011-03-15 12:18:03 +13:00
Chris Forbes
c313920c7c include the utility in the core target, since the game needs it for package download now 2011-03-15 10:14:56 +13:00
Chris Forbes
cf9e81ea29 fix #645 2011-03-15 09:41:46 +13:00
Chris Forbes
4f79aca484 fix #643 2011-03-15 09:32:25 +13:00
Chris Forbes
5ad196acc3 fix #646 2011-03-15 09:30:24 +13:00
Chris Forbes
e66ebef73c some more bits for .gitignore 2011-03-15 09:29:19 +13:00
Paul Chote
c00d20e3c0 Update changelog 2011-03-13 21:22:13 +13:00
Paul Chote
795101aac9 Grenadiers explode on death 2011-03-13 21:21:16 +13:00
Paul Chote
0dd9a437b8 support power charge bars in cnc 2011-03-13 21:18:39 +13:00
Chris Forbes
febd92341f patched pchote's map 2011-03-13 15:54:33 +13:00
Chris Forbes
1368bc0731 missing project file change 2011-03-13 15:46:43 +13:00
alzeih
f4e4f987be RA - AppearsFriendlyTo and AppearsHostileTo actor extensions 2011-03-13 15:44:27 +13:00
alzeih
cf8cfdc42d SpyToolTip - Display tooltip of disguised unit to other players, and a modified one for the local player. 2011-03-13 14:14:32 +13:00
alzeih
26f1452930 text / text2 / text3 dies 2011-03-13 14:14:32 +13:00
alzeih
544befb553 Move disguise into Spy from RenderSpy 2011-03-13 14:14:32 +13:00
alzeih
b5efc97996 Fix #604 2011-03-13 12:26:37 +13:00
alzeih
22aa1308ce give GameServer some UsefulMods so we have the remote mod version in the ServerBrowser. 2011-03-13 12:26:27 +13:00
Chris Forbes
900e55900a fix boxes tooltip 'Tree' 2011-03-13 12:12:58 +13:00
Chris Forbes
116ef15fdb GotoNextBase dies in a fire; INotifyKeyPress dies 2011-03-13 12:12:57 +13:00
Paul Chote
3c41efea04 Check for GL extensions before we try to use things that may fail. 2011-03-13 02:46:16 +13:00
Paul Chote
c7d25bb991 Fix a crash with null textfields. 2011-03-13 02:32:48 +13:00
Chris Forbes
a33cca57ec fix a crash in perf graph 2011-03-13 02:27:32 +13:00
Chris Forbes
16eefe6280 increase strength of chrono effect 2011-03-13 00:44:31 +13:00
Chris Forbes
c9be0f44f4 spoilers: cursor dies 2011-03-13 00:39:37 +13:00
Chris Forbes
911ecb2ffa add missing copyright header to Mod.cs 2011-03-13 00:00:27 +13:00
Chris Forbes
56a8653bc6 #582 dont use water explosions for impacts ABOVE water 2011-03-12 23:41:28 +13:00
Chris Forbes
f58e9a2a99 do transport unload on 'f' 2011-03-12 23:34:59 +13:00
Chris Forbes
2eec1b2016 dont show yellow selection boxen 2011-03-12 23:34:58 +13:00
Paul Chote
d1dd3a64f8 Fix evw3 crash. 2011-03-12 23:32:41 +13:00
Chris Forbes
82dea40261 provide a way to grab the laggy clients 2011-03-12 22:55:40 +13:00
Chris Forbes
606873a09e fix warnings in Selectable.cs 2011-03-12 22:33:29 +13:00
Chris Forbes
fe90cbdab8 blah 2011-03-12 22:33:28 +13:00
Chris Forbes
8a14662bc1 remove unitinfluence debug, not needed anymore 2011-03-12 22:33:27 +13:00
Chris Forbes
cf6a1583c6 fix bogosity in SupportPowerManager 2011-03-12 22:33:26 +13:00
Chris Forbes
c3728ce674 blah 2011-03-12 22:33:25 +13:00
Chris Forbes
1e3f365cf2 move all the Game.Exts junk either down into FileFormats or into WorldUtils 2011-03-12 22:33:24 +13:00
Paul Chote
f4494d67b2 Kill chrome.xml. 2011-03-12 22:23:46 +13:00
Paul Chote
0cfbeab864 Export chrome.xml to yaml 2011-03-12 21:54:19 +13:00
Paul Chote
0084566478 Standalone radar widget for new sidebar 2011-03-12 18:58:42 +13:00
Paul Chote
631630fbff Custom button widget for new sidebar 2011-03-12 18:58:42 +13:00
Chris Forbes
19b2e3e521 #601 fixed -- dont require explicit port on Direct Connect 2011-03-12 18:52:35 +13:00
Chris Forbes
ed0ae15d49 fix interior boxes 2011-03-09 22:04:54 +13:00
Chris Forbes
fbc7200472 fix #572 crash when switching mods while playing music 2011-03-08 20:24:52 +13:00
Chris Forbes
0770524c05 add support power charge bar 2011-03-08 20:02:02 +13:00
Chris Forbes
6d36272134 #597 fix crash when spawning mapactors if there is no player in the slot. said actors are not spawned now. 2011-03-08 19:40:16 +13:00
Chris Forbes
e9a1c3f477 fix indent; make this work for Cg renderer too 2011-03-08 19:28:57 +13:00
Chris Forbes
16cb275a5f fix rendering of very large maps 2011-03-08 19:24:15 +13:00
Chris Forbes
682cfcd466 wire up BuildAnywhere so it actually works 2011-03-07 20:25:05 +13:00
Chris Forbes
14a2b68b7d add chrome + plumbing for BuildAnywhere devhack 2011-03-07 20:20:44 +13:00
Chris Forbes
7cf07f5765 make forcing evaluation of lazyness explicit 2011-03-07 19:53:39 +13:00
Chris Forbes
ae58da10bf remove some silly allocation from InvisibleToOthers 2011-03-06 11:35:31 +13:00
Chris Forbes
d7ed0233b0 fix crash with cloaking units and replays 2011-03-06 11:34:19 +13:00
Chris Forbes
020c2a8a4a fix a rare crash in cnc docking 2011-03-06 11:31:54 +13:00
Chris Forbes
d4f58015c7 issue the right order for deploy 2011-03-06 10:36:07 +13:00
Chris Forbes
10a546d3ae remap tsla to 'u' to remove conflict 2011-03-06 10:35:48 +13:00
Chris Forbes
65a54ba13a add audio feedback to stop/scatter/deploy junk 2011-03-06 10:22:40 +13:00
Chris Forbes
1a6ff61836 clean up dumb mess of exit-flags in WorldInteractionControllerWidget 2011-03-06 10:15:31 +13:00
Chris Forbes
d2d425731f change hotkey for ftur to 't' to free up 'f' for deploy/special 2011-03-06 10:14:51 +13:00
Chris Forbes
69ea44310b remove another 40M/min of boxing junk by specializing the key comparer on SpriteFont's dict 2011-03-06 08:59:25 +13:00
Chris Forbes
8d1a69e8ff enhance Cache to allow specializing the key comparer 2011-03-06 08:56:39 +13:00
Chris Forbes
516efa1dc8 remove another 11M/min from GainsExperience.ModifyRender 2011-03-05 22:17:51 +13:00
Chris Forbes
6971d6dbbb remove another 50M/min of delegates being constructed as part of the render 2011-03-05 22:15:03 +13:00
Chris Forbes
0480f1e984 Avoid constructing a delegate on every TraitDict query -- saving 250M/min 2011-03-05 21:53:23 +13:00
Chris Forbes
ea022a0e06 change PlayThen and PlayRepeating definitions to not allocate Action objects like crazy 2011-03-05 21:52:34 +13:00
Chris Forbes
269347ef01 specialize pair's comparison to do something sensible with <char,Color> saving 16M. 2011-03-05 21:51:49 +13:00
Chris Forbes
feecc70a4f remove another bit of insignificant but silly allocation 2011-03-05 18:49:50 +13:00
Chris Forbes
03bda8b511 strip all the allocation out of WaterPaletteRotation too (saves ~25M/min) 2011-03-05 18:34:52 +13:00
Chris Forbes
c1ad99bb99 dont allocate a full new palette texture every frame in HardwarePalette.Update 2011-03-05 18:29:30 +13:00
Chris Forbes
533df844d8 pool CellInfo[,] to save massive amounts of memory (now uses only 512K for CellInfos on default-sized maps) 2011-03-05 18:28:59 +13:00
Chris Forbes
9f92f50597 fix missing unload on jeep 2011-03-05 14:03:33 +13:00
Chris Forbes
94766263c5 add one passenger slot to jeep 2011-03-05 13:23:37 +13:00
Chris Forbes
298baac061 add rollovers for health/production 2011-03-05 13:19:13 +13:00
Chris Forbes
d9881885aa fix bots getting stuck in ra 2011-03-05 13:10:43 +13:00
Chris Forbes
a1f1b5882e fix crates dropping on buildings etc 2011-03-05 12:00:28 +13:00
Chris Forbes
a676bdae71 grenadiers have a 50% chance of exploding on death 2011-03-05 11:27:24 +13:00
Chris Forbes
d6c8bbd52a use Target stuff for Reservables 2011-03-05 11:16:33 +13:00
Chris Forbes
b7b9b68cc0 add Chance (%) value to Explodes: 2011-03-05 11:14:43 +13:00
Chris Forbes
85fe83d608 ignore reservations being collected in worlds other than the one the OM is attached to. 2011-03-05 11:09:56 +13:00
Chris Forbes
7c6d35e318 remove productionbar info leak 2011-03-05 10:10:42 +13:00
Chris Forbes
68de6a8f8b fix cnc tab art 2011-03-02 23:23:09 +13:00
Chris Forbes
43dccb073d support ProductionBar properly in cnc too 2011-03-02 23:22:57 +13:00
Chris Forbes
0bfcb4585c fix glitchy vis on exiting a transport 2011-03-02 23:13:32 +13:00
Chris Forbes
d1b632a4a0 normalize the handling of flares in paradrop and airstrike cases 2011-03-02 23:05:58 +13:00
Chris Forbes
9b2fe9fead make ftur suck less 2011-03-02 22:59:45 +13:00
Chris Forbes
604c8c590b fix vehicle speed on ore being insane 2011-03-02 22:51:05 +13:00
Chris Forbes
df5cb1ddf8 slightly reduce cost of 3tnk 2011-03-02 22:49:36 +13:00
Chris Forbes
1a599cb8c2 dont give ground control with defenses 2011-03-02 22:48:55 +13:00
Chris Forbes
89a96a9fe7 make ProductionBar actually work for all RA stuff 2011-03-02 22:35:44 +13:00
Chris Forbes
c62e025c45 add temp hacked ProductionBar -- not wired to ProductionQueue properly yet. 2011-03-02 22:20:34 +13:00
Chris Forbes
770dbcee52 tweak; save a bit of memory 2011-03-02 22:18:16 +13:00
Chris Forbes
036800531c add support for aux. bars in selection 2011-03-02 22:16:47 +13:00
Chris Forbes
338cff3c45 adjust DisplayHp EWMA 2011-03-02 22:11:00 +13:00
Chris Forbes
e122debc7a remove tent prereq on apc (made it useless) 2011-03-02 22:03:39 +13:00
Chris Forbes
0da7009eea shiny healthbars 2011-03-02 22:03:10 +13:00
Chris Forbes
4a71672a5f fix ftrk not firing over walls 2011-03-02 21:39:57 +13:00
Chris Forbes
9d91dba2d6 fix AA not firing over walls 2011-03-02 21:39:33 +13:00
Chris Forbes
662cf91bdc improve accuracy of arty 2011-03-02 21:37:38 +13:00
Chris Forbes
46987e1688 2/3/4tnk require fix 2011-03-02 21:30:09 +13:00
Chris Forbes
aec1724387 arty requires dome; apc buffed and goes to soviet 2011-03-02 21:29:04 +13:00
Chris Forbes
9ebf880158 increase dome cost to 1.4k 2011-03-02 21:27:40 +13:00
Chris Forbes
8dba72ecfa increase fix cost to 1k 2011-03-02 21:27:09 +13:00
Chris Forbes
a954d21210 tweaks to heli/hind 2011-03-02 21:20:11 +13:00
Chris Forbes
ad72c80bab actors without Health are not dead. 2011-03-02 20:56:46 +13:00
Chris Forbes
11384f692b remove bogus resx 2011-02-28 22:47:39 +13:00
Chris Forbes
772b3a2f9d only add Neutral player if it doesnt exist in the map definition. 2011-02-28 22:46:24 +13:00
Chris Forbes
8aaaf1e44c center error dialog 2011-02-28 22:36:45 +13:00
Chris Forbes
b878bde331 add graceful handling of bogus actor types in import 2011-02-28 22:36:23 +13:00
Chris Forbes
ea40cb015d fix dumb bug in map importer 2011-02-28 22:29:11 +13:00
Chris Forbes
12f8200a0b rename another handler in editor 2011-02-28 22:24:02 +13:00
Chris Forbes
4b853ca9e8 fix another issue with the importer -- it didnt bother to restore the current directory if canceled 2011-02-28 22:23:16 +13:00
Chris Forbes
88436bda45 add ability to throw nonfatal errors in the map importer, and display them. 2011-02-28 22:19:02 +13:00
Chris Forbes
c2b0cec2ea add a sensible error when trying to save a map using a bogus tileset 2011-02-28 22:18:44 +13:00
Chris Forbes
ba949126ab fix the other half of the prox desync 2011-02-28 20:39:24 +13:00
Chris Forbes
8d99652eea add option to show actor names in the editor 2011-02-28 20:36:33 +13:00
Chris Forbes
e1c0c24a47 fix lobby showing Closed with bot in some cases 2011-02-28 20:36:32 +13:00
Chris Forbes
42b88276b1 blah 2011-02-28 20:36:12 +13:00
Chris Forbes
39fef604c2 fix desync in ProximityCapturable 2011-02-28 20:36:02 +13:00
Chris Forbes
c5684fcba5 fix crash on startup 2011-02-28 20:35:09 +13:00
Paul Chote
ced2247af8 Add more info to Reservable dispose exception. 2011-02-26 13:05:58 +13:00
Paul Chote
f74d2318d8 Unreserve helipads on heli death. 2011-02-26 12:57:25 +13:00
Paul Chote
2ffc66416b Update INSTALL. 2011-02-26 00:58:55 +13:00
Paul Chote
05979a7a72 Remove cnc Wargames and Yellowstone II maps. 2011-02-25 11:29:43 +13:00
Chris Forbes
e5ef334941 fix noob error in TakeCover 2011-02-24 20:10:29 +13:00
Paul Chote
8e8b80ba85 Update seaside map by nudalz. 2011-02-24 20:08:32 +13:00
Chris Forbes
252d3e7981 move DefaultShellmapScript.cs into Missions/ 2011-02-24 18:50:17 +13:00
Chris Forbes
ad2ae8b763 report memory usage for textures 2011-02-24 18:48:55 +13:00
Chris Forbes
a8d849a1cb support TrailInterval on bullets too 2011-02-24 18:48:55 +13:00
Chris Forbes
551c94b77c add TrailInterval support for Missile 2011-02-24 18:48:55 +13:00
Chris Forbes
b90a90f8cc refactor texture code a bit 2011-02-24 18:48:54 +13:00
Paul Chote
869448296a Sync RTB path hash. 2011-02-24 17:51:41 +13:00
Paul Chote
7f39909dc8 Throw an exception if a reservation is eaten by the GC. Better to die early with a known error than to desync later. 2011-02-24 17:26:14 +13:00
Paul Chote
fa6a98cca3 Unreserve reservation on death. 2011-02-24 17:17:20 +13:00
Paul Chote
0723723b30 Upgrade maps to v5. 2011-02-23 22:02:48 +13:00
Paul Chote
1df42a7d5e Give upgraded mpspawns an owner. 2011-02-23 21:56:58 +13:00
Chris Forbes
e90177ca58 blah 2011-02-23 21:55:52 +13:00
Paul Chote
0f78fb22e5 add WIP evw3 map. 2011-02-23 21:55:52 +13:00
Paul Chote
ecf866f28a Allow editor to load a map via commandline. 2011-02-23 21:55:52 +13:00
Paul Chote
05e5ee7ca4 Update Rubicon, add new ra map by Arcturus 2011-02-23 21:55:49 +13:00
Paul Chote
5a30750e33 Fix VICE. 2011-02-23 21:54:58 +13:00
Paul Chote
754e45094c Remove ProximityCaptor from cnc. 2011-02-23 21:54:57 +13:00
Paul Chote
0bc8d37bdf Hacky fix for map upgrading 2011-02-17 22:31:07 +13:00
Paul Chote
89b7f3d725 Fix ra rules. 2011-02-17 22:17:00 +13:00
Paul Chote
169baf6df9 Fix ra sequences 2011-02-17 22:05:10 +13:00
Paul Chote
eb9054a4d6 Fix default ColorRamp 2011-02-17 21:50:16 +13:00
Paul Chote
d6e8b554d2 Only save non-default PlayerReference fields 2011-02-17 21:48:36 +13:00
Paul Chote
18d73aef53 Split out RenderInfantryPanic. 2011-02-17 21:38:04 +13:00
Paul Chote
06bf38b526 Split out RenderInfantryProne 2011-02-17 21:10:44 +13:00
Paul Chote
6b80cfc9d4 Refactoring 2011-02-17 20:52:47 +13:00
Paul Chote
9a04a7fa9f Move IdleAnimation into RenderInfantry 2011-02-17 20:15:20 +13:00
Paul Chote
4a3d254c0c Start RenderInfantry rework. TODO: fix ra sequences, split Prone/Panicked into RenderInfantry* overrides, integrate idle anims. 2011-02-17 19:53:58 +13:00
Chris Forbes
437caf9c12 fix map saving 2011-02-16 20:38:26 +13:00
Chris Forbes
30f05fb359 add another thirdparty map 2011-02-16 19:22:19 +13:00
Chris Forbes
618d109a49 embed the correct icon for the editor 2011-02-16 16:56:51 +13:00
Chris Forbes
40647b41e7 remove some crap 2011-02-16 11:51:05 +13:00
Paul Chote
266e2717f5 Remove AvoidUnitsNear pathfinding heuristic (causes problems with crates and crushing). 2011-02-15 22:51:32 +13:00
Paul Chote
3c9de06db0 Remove redundant sequences 2011-02-15 22:41:55 +13:00
Paul Chote
b6328b356c ScaredyCat trait for civilians. 2011-02-15 22:38:13 +13:00
Paul Chote
fa86502795 Emit e6,e1 on sell. 2011-02-15 22:17:43 +13:00
Paul Chote
df4a860dfe Fix crash on surrender 2011-02-15 22:17:25 +13:00
Chris Forbes
3e28fce7ba remove various leftover crap from editor 2011-02-15 16:18:14 +13:00
Chris Forbes
5bd9273a7d fix issues with mpspawn and waypoint sprites 2011-02-15 16:09:53 +13:00
Chris Forbes
2b85c7e0b9 fix stack overflow in Map.Resize() 2011-02-15 15:46:16 +13:00
Chris Forbes
786eafd7fa fix ra production (oops) 2011-02-15 08:28:50 +13:00
Chris Forbes
dd54f3b88b fix install script 2011-02-15 08:20:17 +13:00
Chris Forbes
d80f581e98 fix div-by-zero with empty minefield 2011-02-15 08:09:31 +13:00
Chris Forbes
99bbd0ec7a fixup bogus non-reinit of Producable in ProductionQueue; make initial race of a building sticky 2011-02-15 08:02:56 +13:00
Chris Forbes
7e4550e628 blah 2011-02-14 21:17:46 +13:00
Chris Forbes
d8b68a3250 #543 sam sites should start closed, when placed as mapactors 2011-02-14 21:15:28 +13:00
Chris Forbes
ce4b938ce5 #526 fixed (FIX speed increased) 2011-02-14 21:01:13 +13:00
Chris Forbes
bc32d32d54 remove FP from RepairableBuilding 2011-02-13 22:12:46 +13:00
Chris Forbes
0f0facedd1 #540 move 'allow cheats' to lobby from prelobby 2011-02-13 17:28:40 +13:00
Chris Forbes
447b34ab38 blah 2011-02-13 16:27:30 +13:00
Chris Forbes
c1aebff8a8 refresh GPS on stance change 2011-02-13 16:26:06 +13:00
Chris Forbes
6281fa481f add hook for stance change notifications 2011-02-13 16:22:34 +13:00
Chris Forbes
cbf95e8f1a fix #348 crash with blank game name 2011-02-13 16:16:40 +13:00
Chris Forbes
508130a87f only elevate on windows 6+ 2011-02-13 15:52:11 +13:00
Chris Forbes
c50b6f47f7 blah 2011-02-13 15:50:06 +13:00
Chris Forbes
f894705568 add chrisf's PNG loader for use by modding tools 2011-02-13 15:31:10 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
ea5e2c0588 Blue tib should damage inf too. 2011-02-12 10:17:41 +13:00
Paul Chote
c5cf51185b define liedown, standup, cheer, die6 sequences for all cnc infantry (where applicable) 2011-02-12 10:13:26 +13:00
Paul Chote
8e87c63b0f Viceroids shouldn't smoke 2011-02-11 23:15:37 +13:00
Paul Chote
ab08273412 Improved death anim speeds 2011-02-11 23:11:06 +13:00
Paul Chote
03f014ffb9 Visceroid spawning. Add tib death anims for e1 and e2. Others will crash. 2011-02-11 23:05:01 +13:00
Paul Chote
51138fcdc3 Give VICE Chemspray weapon. Fix bogus armor assignments (will unbalance nearly everything, but give a better start for fixing things). 2011-02-11 22:25:16 +13:00
Paul Chote
1d1d0e8bd2 Lazy smudges, fix importer. 2011-02-11 21:50:11 +13:00
Paul Chote
79f3fccceb Lazy actor loading 2011-02-11 21:50:11 +13:00
Paul Chote
c2db816837 Kill MapStub 2011-02-11 21:50:11 +13:00
Paul Chote
73020a9419 Make binary info loading lazy 2011-02-11 21:50:11 +13:00
Paul Chote
b134ba41f4 Convert Waypoints to actors 2011-02-11 21:50:11 +13:00
Paul Chote
4a7be2e0c8 Remove redundant MapStub fields. 2011-02-11 21:50:11 +13:00
Paul Chote
c5d410938d Foo 2011-02-11 21:50:11 +13:00
Paul Chote
5f6d2df503 Drop support for older map formats. 2011-02-11 21:50:11 +13:00
Paul Chote
37ebda2847 Upgrade maps to format 4 2011-02-11 21:50:11 +13:00
Paul Chote
e761ce4998 Fix editor 2011-02-11 21:50:10 +13:00
Paul Chote
db770eb997 Bake PickAny tiles on map save. Translate maxvalue index to random tile for backwards compat. 2011-02-11 21:50:10 +13:00
Paul Chote
9407c55262 Drop TopLeft and BottomRight from MapFormat 5. Use Bounds directly. 2011-02-11 21:50:10 +13:00
Paul Chote
7332c5a6df Fix editor conversion 2011-02-11 21:50:10 +13:00
Paul Chote
6ef330c357 Fix Waypoint == Startpoint assumption in MapFormat 5. 2011-02-11 21:50:10 +13:00
Paul Chote
8844ca0fdd Add (laser-)viceroids. Needs a proper weapon. 2011-02-11 21:50:10 +13:00
Paul Chote
48482cf09a Add an AttackWander trait for creeps. Remove a pile of bogosity from AttackMove. 2011-02-11 21:50:10 +13:00
Paul Chote
fae355f5b6 Add support for a "Creeps" faction that is hostile to all combatant players. Add a mod field to be used for map installation. 2011-02-11 21:50:10 +13:00
Chris Forbes
56952c1ab8 put RA AA structures in their own group for range circles 2011-02-11 07:11:30 +13:00
Chris Forbes
a515f95aed adjust range circle rendering 2011-02-11 07:11:29 +13:00
Chris Forbes
bfa38e3058 display range circles for other actors owned by us, and having a compatible RenderRangeCircleInfo.RangeCircleType during building placement 2011-02-11 07:11:29 +13:00
Chris Forbes
b0beee6b7b fetch the max range from AttackBaseInfo rather than making it up completely 2011-02-11 07:11:28 +13:00
Chris Forbes
3369373879 initial setup for decorating the PlaceBuilding OG 2011-02-11 07:11:28 +13:00
Paul Chote
9d73299595 Append CHANGELOG to debian changelog. 2011-02-10 20:24:02 +13:00
Paul Chote
d9fe383ce6 Remove obsoleted code 2011-02-10 20:24:01 +13:00
Paul Chote
2559092983 Place a minimum requirement on mono-runtime to prevent fail on ubuntu 10.04. 2011-02-10 20:24:01 +13:00
Paul Chote
bb8c1912ca Delicious copy pastas 2011-02-10 20:24:01 +13:00
Paul Chote
9da906d751 Fix a typo 2011-02-10 20:24:01 +13:00
Paul Chote
734c90f85e Write a utility wrapper for linux. Untested / Unfinished. 2011-02-10 20:24:01 +13:00
Caleb Anderson
03bbe8d0a0 Windowed mode defaults to center of screen 2011-02-10 19:26:49 +13:00
Paul Chote
7402f8e4f7 Follow suit with rpm and arch packages. Untested. 2011-02-08 16:32:01 +13:00
Paul Chote
695ca4a23b Simplify the uploader script. Untested. 2011-02-08 16:27:02 +13:00
Paul Chote
627d275e84 Don't pass ftp user/pass on the commandline. openra user on the build machine has a .netrc setup with the correct credentials. 2011-02-08 15:54:59 +13:00
Paul Chote
5f8e2ccf5c Fix a typo in the upload script. 2011-02-08 15:39:39 +13:00
Paul Chote
3794a6b5f2 Use debian naming conventions for .deb. 2011-02-08 14:44:56 +13:00
Paul Chote
501155da0d Remove unnecessary renaming of windows and mac packages. 2011-02-08 14:18:46 +13:00
Paul Chote
5f6dd59743 Packaging changes: Include CHANGELOG, use full tag as version string. 2011-02-08 14:08:31 +13:00
Paul Chote
65b580374e Update CHANGELOG 2011-02-07 22:52:47 +13:00
Paul Chote
a4f1e5f103 Add Rubicon map by Arcturus 2011-02-07 22:45:00 +13:00
Paul Chote
0bd733d7a0 Fix bogus rebase 2011-02-07 20:10:52 +13:00
Chris Forbes
23c0524738 fix utility elevation 2011-02-07 18:51:12 +13:00
Paul Chote
e2af08f812 Add a scatter key 2011-02-06 13:15:47 +13:00
Paul Chote
47aad3b04b Remove unused LocalStorage from proc. 2011-02-06 13:10:09 +13:00
Paul Chote
e3fda8c68e Remove unused stance code 2011-02-06 13:06:39 +13:00
Paul Chote
7f8e75c089 Update changelog with current changes. 2011-02-06 11:11:42 +13:00
Paul Chote
b3967a3d8d Add a CHANGELOG file containing release history. 2011-02-06 10:30:31 +13:00
Chris Forbes
1ee788f095 fix uploader so it actually works 2011-02-06 09:38:19 +13:00
Matthew Bowra-Dean
700b6d6d5e Packaging changes for new website. 2011-02-06 09:38:19 +13:00
geckosoft
0f17fa34a8 Added ProximityCaptor and filtering of possible captors for KOTH 2011-02-05 19:22:06 +13:00
Paul Chote
de26b63fd2 Fix capturing etc 2011-02-05 18:13:30 +13:00
Paul Chote
4b0ab1c461 Remove detectors from subs (prevents them from revealing themselves) 2011-02-05 12:45:32 +13:00
Paul Chote
0c954367a0 Fix installing ra from disk 2011-02-05 12:44:33 +13:00
Paul Chote
8765e986b1 Fix cnc download size 2011-02-05 12:34:05 +13:00
Chris Forbes
ed6a83db89 reduce scope of OpenRA.Utility.Program.actions 2011-02-05 11:54:33 +13:00
Chris Forbes
6afbb5550a fix some more stuff in utility 2011-02-05 11:54:33 +13:00
Chris Forbes
8d41f0d680 blah 2011-02-05 11:54:32 +13:00
Chris Forbes
3d5f00fbe9 more cleanup 2011-02-05 11:54:32 +13:00
Chris Forbes
c3c16c4fd8 remove some duplication in Utility 2011-02-05 11:54:31 +13:00
Chris Forbes
2fa4285281 fix crap init of constant dict in utility 2011-02-05 11:54:31 +13:00
Paul Chote
7693f3d16a Craters and scorches smoke. 2011-02-05 09:19:31 +13:00
Paul Chote
afcb724793 Fix subcell crushing properly. 2011-02-05 08:47:53 +13:00
Paul Chote
639a7e316b Fix crates 2011-02-04 21:49:18 +13:00
Paul Chote
fdb85d67eb Disable map and music install until they can be finished. 2011-02-04 20:36:18 +13:00
Paul Chote
0ddcff7ec7 Apply some misc balance stick to cnc 2011-02-04 20:17:58 +13:00
Paul Chote
c79ac2f504 Fix dead actor crash 2011-02-04 20:05:42 +13:00
Chris Forbes
39a9bd7e20 Fix GPS being given to *everyone* 2011-02-04 18:45:47 +13:00
Paul Chote
504fe9e427 Fix infantry group damage 2011-02-04 18:39:04 +13:00
Paul Chote
45e89491d7 Work around a crash. 2011-02-04 18:39:04 +13:00
Paul Chote
b69388b5e7 Fix jerky movement 2011-02-04 18:39:03 +13:00
Paul Chote
e28ed916aa Improve spacing 2011-02-04 18:39:03 +13:00
Paul Chote
310556877f Fix GDI01 2011-02-04 18:39:03 +13:00
Paul Chote
9c63292a83 Allow units to move between subcells. Visually not quite right. 2011-02-04 18:39:03 +13:00
Chris Forbes
4aaafd18f1 fix compile failure 2011-02-04 18:39:03 +13:00
Paul Chote
73a08624ef Hacky fix for group movement 2011-02-04 18:39:03 +13:00
Paul Chote
7c2a7db794 Fold SharesCell into Mobile 2011-02-04 18:39:03 +13:00
Paul Chote
4b3c6cc62a Add a SubCell field to UIM. Allow UIM to query for units by subcell. 2011-02-04 18:39:03 +13:00
Paul Chote
451e06190f Sync harvester contents. Add ISync to ProductionQueue. 2011-02-03 08:27:35 +13:00
Paul Chote
bf2f3cacd9 Sync ProductionQueue 2011-02-02 10:33:33 +13:00
Paul Chote
8002ed0893 (cnc) Support structures don't grant build radius. 2011-02-02 09:22:23 +13:00
Paul Chote
d85411f816 SAM and ATWR require power (#518 and #519). 2011-02-02 09:12:51 +13:00
Paul Chote
2daeb45bfe Fix a subtle bug with flying units in spatialbins. Fixes #489. 2011-02-01 22:06:09 +13:00
Paul Chote
467c2a969d Fix missiles 2011-02-01 18:19:38 +13:00
Chris Forbes
ee144373a0 Fix unshareable GPS 2011-02-01 18:08:21 +13:00
Paul Chote
e234816c13 Extract parameters into Info for mods to tweak. 2011-02-01 17:11:17 +13:00
Paul Chote
8fca705077 Sam sites take 50% damage when closed. 2011-01-31 21:21:38 +13:00
Paul Chote
5f65d4102b cnc sams rotate to home position before closing, lower ROT to something sane. 2011-01-31 21:17:07 +13:00
Paul Chote
cd5e7409ef First attempt. Problems: doesn't move back to zero-facing before closing. Flickers turret-up frame sometimes when being attacked. 2011-01-30 23:11:16 +13:00
Chris Forbes
0c4bf5b2b3 split Target out into its own file 2011-01-30 21:47:04 +13:00
Chris Forbes
51ab2b4969 fix targets staying valid across owner changes 2011-01-30 21:45:08 +13:00
Paul Chote
6e1cb23f10 "Repairing" eva notification for ra and cnc. 2011-01-30 18:35:44 +13:00
Chris Forbes
d595b36cf5 add note in legacymapimporter about colorramp bitrot 2011-01-30 17:47:44 +13:00
Chris Forbes
c8a68659a0 add INotifyOtherCaptured, for reacting to other units changing ownership 2011-01-30 17:43:25 +13:00
Chris Forbes
a0926a49ec hack around bad interaction between firing anims and idle anims finishing 2011-01-30 17:38:34 +13:00
Paul Chote
ccf04240cf Fix some more cases of stale Player references after capture. 2011-01-30 17:35:40 +13:00
Paul Chote
7f3f783187 Update cached PlayerResources when a silo is captured. 2011-01-30 17:35:40 +13:00
Chris Forbes
7a4380e7bd fix exploitable SetStance order 2011-01-30 17:33:04 +13:00
Chris Forbes
79a46272ac remove some crap from viewport 2011-01-30 17:27:39 +13:00
Chris Forbes
1c8cd44465 fix bogosity in SpecialPowerBinWidget (manifests as crash after mod change) 2011-01-30 16:53:20 +13:00
Chris Forbes
3c9891cdea blah 2011-01-30 15:55:46 +13:00
Matthew Bowra-Dean
7b7900bda2 [windows] Fix mod sections in installer to not show expansion buttons. 2011-01-30 14:29:26 +13:00
Chris Forbes
39aa171425 fix visibility of perf graph in ingame and observer roots too. 2011-01-30 14:23:09 +13:00
Chris Forbes
5fce6ec2c4 blah 2011-01-30 14:23:08 +13:00
Chris Forbes
4be20e7aac move waypoint namer into WaypointTool 2011-01-30 14:23:07 +13:00
Chris Forbes
40f88e5c47 clean up editor drawing code some more 2011-01-30 14:23:07 +13:00
Chris Forbes
81468a5190 yet more duplication removal 2011-01-30 14:23:06 +13:00
Chris Forbes
c3b08a60b8 more cleanup 2011-01-30 14:23:06 +13:00
Chris Forbes
8874b6ef72 remove an unused function 2011-01-30 14:23:05 +13:00
Chris Forbes
1dc8de3fc1 split out hardcoded editor tools into ITool impls 2011-01-30 14:23:05 +13:00
Paul Chote
4b538fd2fe Fix palette issues with Oil Derricks and walls (fixes #501). 2011-01-29 13:21:55 +13:00
Paul Chote
9b17bfe697 Fix AFLD production eva (#494). 2011-01-29 13:04:26 +13:00
Paul Chote
d45db9eb9c Shift production audio onto ProductionQueue. 2011-01-29 12:58:56 +13:00
Paul Chote
9a4fb0a5b9 Fix RMBO c4 2011-01-29 12:10:07 +13:00
Chris Forbes
4d7cf23521 updated Nuclear Winter maps from nudalz 2011-01-28 18:40:54 +13:00
Chris Forbes
1e241ebd56 fix editor init 2011-01-28 18:37:00 +13:00
Chris Forbes
add5c0ee6d restore ability to force mod on commandline in editor 2011-01-28 18:10:40 +13:00
Chris Forbes
95e259db3b slightly clean up usings 2011-01-28 18:07:07 +13:00
Chris Forbes
ce8d787a9c fix crash in build palette keyboard handler after winning/losing 2011-01-28 17:32:35 +13:00
Chris Forbes
a8d848b3c4 fix LockTeams checkbox by not using the binder 2011-01-28 17:31:24 +13:00
Paul Chote
0f3b6a7cd4 Add nuclear winter' and seaside' maps by nudalz. 2011-01-28 17:18:06 +13:00
Paul Chote
22c146d056 Fix mod selector visibility on returning to main menu. 2011-01-28 16:42:07 +13:00
Paul Chote
1185386f96 [windows] Remove mod-specific start menu shortcuts and don't download packages in the installer. 2011-01-28 09:15:38 +13:00
Paul Chote
08fd311c4b Hide cnc install `From CD' button. 2011-01-28 09:10:14 +13:00
Paul Chote
687406ccbd Remove mod.html 2011-01-28 09:01:06 +13:00
Paul Chote
37f26c652b Fix installing from cd 2011-01-28 08:59:55 +13:00
Matthew Bowra-Dean
3aac953522 Removed outdated debian menu file. 2011-01-28 08:49:33 +13:00
Matthew Bowra-Dean
5d623b6ca8 Add mod selector to map editor. 2011-01-28 08:49:33 +13:00
Chris Forbes
e543c3b8c1 fix cursors in ra mod 2011-01-28 08:22:23 +13:00
Chris Forbes
6ddce1c171 remove shared 'window' field, fix crashes in GameIniDelegate 2011-01-28 07:34:57 +13:00
Chris Forbes
d3ddefbaa3 add ActionQueue, rather than leaving random variables lying around in Game.cs 2011-01-27 21:46:36 +13:00
Chris Forbes
c1fefe0b96 fix projectfile so it compiles 2011-01-27 21:25:07 +13:00
Paul Chote
8470399a0c [osx] Load packages from the support dir. 2011-01-27 20:50:04 +13:00
Paul Chote
492c025844 Load last mod on startup. 2011-01-27 20:50:04 +13:00
Paul Chote
38b98bf358 Hide the menubar only when going fullscreen. 2011-01-27 20:50:04 +13:00
Paul Chote
746c3d068c Use the existing settings mechanism for --settings-value. Allows the defaults to be queried. 2011-01-27 20:50:04 +13:00
Paul Chote
562d07f11a Fix sln 2011-01-27 20:50:03 +13:00
Paul Chote
ef462c5164 Take SpecialPackageRoot into account when installing packages 2011-01-27 20:50:03 +13:00
Paul Chote
817ac42954 Call as non-admin if gksudo and kdesu aren't available. 2011-01-27 20:50:03 +13:00
Matthew Bowra-Dean
1474cd147a Executable permissions on openra-bin 2011-01-27 20:50:03 +13:00
Matthew Bowra-Dean
d74c93c66e Fixed syntax error in package-all.sh. 2011-01-27 20:50:03 +13:00
Matthew Bowra-Dean
4eaf97f90e Reverted packaging changes from launchers. 2011-01-27 20:50:03 +13:00
Paul Chote
a81c865620 Install Music button - installing not implemented. 2011-01-27 20:50:03 +13:00
Paul Chote
1c67242210 Fix prompt title. 2011-01-27 20:50:03 +13:00
Paul Chote
96a6bda142 Remove obsolete maps dir 2011-01-27 20:50:03 +13:00
Paul Chote
580b9014b3 Install map button (does not verify that maps are valid). 2011-01-27 20:50:03 +13:00
Matthew Bowra-Dean
4c053dae24 Elevation for utility app on unix platforms that have gksudo or kdesudo. Small change to Folder.cs to create empty folder if it doesn't exist. 2011-01-27 20:50:03 +13:00
Paul Chote
1bdadb6631 Clear widgets on mod change 2011-01-27 20:50:03 +13:00
Paul Chote
646863b85b Remove unused InitDelegates() method. Don't mutate the Children list directly. 2011-01-27 20:50:03 +13:00
Paul Chote
3fe549d0a4 don't fork bomb. 2011-01-27 20:50:02 +13:00
Paul Chote
5353ae32a6 Authenticate windows commands. Untested. 2011-01-27 20:50:02 +13:00
Paul Chote
a6900c256d Implement --display-filepicker in OpenRA.Utility. Remove all the functionality that windows doesn't support. 2011-01-27 20:50:02 +13:00
Paul Chote
44d8e83773 Rework OpenRA.Utility 2011-01-27 20:50:02 +13:00
Paul Chote
c93bdf73aa Have a single utility app per platform. Route zip extraction and ra package install to the .net utility app under osx. 2011-01-27 20:50:02 +13:00
Paul Chote
8e5f307ba8 Remove some duplication 2011-01-27 20:50:02 +13:00
Paul Chote
724a72c98e Show the mod switcher during the initial install screen. 2011-01-27 20:50:02 +13:00
Paul Chote
a3f26cec46 Fix sound after mod switching. 2011-01-27 20:50:02 +13:00
Paul Chote
aa319ee403 Begin refactoring utility process launching. 2011-01-27 20:50:02 +13:00
Paul Chote
388e5df377 Show mod version in the main menu. 2011-01-27 20:50:02 +13:00
Paul Chote
d39adf67b2 Indeterminate progress bar 2011-01-27 20:50:02 +13:00
Paul Chote
3609de8ca5 Fix compile warnings 2011-01-27 20:50:02 +13:00
Paul Chote
be9d8d96ce Fix the utility app 2011-01-27 20:50:02 +13:00
Paul Chote
2c0a928b48 Fix terrain being drawn using the cursor palette. 2011-01-27 20:50:02 +13:00
Paul Chote
11aab8705e Display the selector in all menus. Fix information leakage from previous mod. 2011-01-27 20:50:01 +13:00
Paul Chote
37fc836b46 Ingame mod selector ui. 2011-01-27 20:50:01 +13:00
Paul Chote
f44903b50f Support ingame mod switching. 2011-01-27 20:50:01 +13:00
Paul Chote
d32e2be941 Extract zips using background thread. 2011-01-27 20:50:01 +13:00
Paul Chote
84cc94bcb6 Implement install from cd for ra (the cnc installshield decompressor is bugged, so not implementing it yet). 2011-01-27 20:50:01 +13:00
Paul Chote
9227e09f18 Refactoring. Add a missing file. 2011-01-27 20:50:01 +13:00
Paul Chote
b7357b1711 Fix crash when canceling download, fix a runtime warning in osx. 2011-01-27 20:50:01 +13:00
Paul Chote
792c82c2d4 Automatically extract packages. Fix ra. 2011-01-27 20:50:01 +13:00
Paul Chote
5ce5d48b04 Extracting packages 2011-01-27 20:50:01 +13:00
Paul Chote
775ccc112b Progress bars. 2011-01-27 20:50:01 +13:00
Paul Chote
421058866d Better install menu and package downloading. 2011-01-27 20:50:01 +13:00
Paul Chote
7dad013b31 Fix cnc. 2011-01-27 20:50:01 +13:00
Paul Chote
42a5b0a993 Fix the hyperspeed shellmap by setting the initial tick time *after* we're done loading. 2011-01-27 20:50:00 +13:00
Paul Chote
ea9003d6fc Port cursors to yaml. 2011-01-27 20:50:00 +13:00
Paul Chote
827a19adef Fix the cursor during init. 2011-01-27 20:50:00 +13:00
Paul Chote
6a90f00298 Start tidying things up 2011-01-27 20:50:00 +13:00
Paul Chote
abcc43222a Add missing files. 2011-01-27 20:50:00 +13:00
Paul Chote
908a927929 Add "Install from web" "Install from CD" and "Quit" buttons to the install menu. "From CD" prompts a system file picker (osx only). 2011-01-27 20:50:00 +13:00
Paul Chote
6c14b78b7c Load the game into an intermediate state where RAInitDelegate can install packages, etc (an even bigger hack). 2011-01-27 20:50:00 +13:00
Paul Chote
6776d6f906 Load the main menu without loading mixes or creating a shellmap world. A giant hack. 2011-01-27 20:50:00 +13:00
Paul Chote
8d2a78abc6 Expose a native filepicker dialog. 2011-01-27 20:50:00 +13:00
Paul Chote
108b90f192 Allow the ra/cnc package dir to be overridden at launch-time. 2011-01-27 20:50:00 +13:00
Paul Chote
3c1f5e18f9 Use Pseudofullscreen under all platforms by default. 2011-01-27 20:50:00 +13:00
Paul Chote
cae65ddd05 Gut the osx launcher of everything except for the necessary platform shims (Ensure mono is installed, set DYLD_LIBRARY_PATH, Hide dock/menubar if running in fullscreen).
TODO: Parse the yaml to disable menubar only if running fullscreen, register openra:// urls.
2011-01-27 20:50:00 +13:00
Chris Forbes
8cda9d6d8b restore previous sequence after IdleAnimation; apply randomness to idle animation wait 2011-01-27 18:36:36 +13:00
Paul Chote
0bd466a9e9 Use a lookup table for fvecs. 2011-01-27 12:05:13 +13:00
Paul Chote
9db41f5638 Remove fp from facing calculation. 2011-01-27 12:01:02 +13:00
Chris Forbes
ad0e0a18bd fix format80 encoder to actually work 2011-01-26 21:47:54 +13:00
Chris Forbes
6f807c4501 fix bogus writing of EOF header 2011-01-26 21:47:53 +13:00
Chris Forbes
1b3f769f34 shp writer 2011-01-26 21:47:53 +13:00
Chris Forbes
848622054d unstatic SpriteLoader 2011-01-26 21:09:07 +13:00
Chris Forbes
f032322948 remove System.Xml using from SequenceProvider 2011-01-26 21:07:54 +13:00
Chris Forbes
1d7f57941e rename SpriteSheetBuilder to SpriteLoader; it's dumb otherwise 2011-01-26 21:07:54 +13:00
Chris Forbes
0f84ac5215 RenderBuilding.BuildingPreview pushed down to RenderSimple and renamed to .RenderPreview() 2011-01-26 21:06:05 +13:00
Chris Forbes
e6c6e8aa96 remove a bit of dumb duplication 2011-01-26 21:06:05 +13:00
Chris Forbes
180d58c35a only bother hashing traits that have ISync 2011-01-26 21:00:31 +13:00
Chris Forbes
f52620f6fc add ISync to all traits that have [Sync] members 2011-01-26 21:00:28 +13:00
Chris Forbes
b7ea695f0c better error when no sequences defined at all 2011-01-26 20:55:23 +13:00
Paul Chote
272ba08c21 Likewise for PlayerResources 2011-01-25 18:26:15 +13:00
Paul Chote
58f1589f95 Add debug traits to Aircraft so we can see what is desyncing. 2011-01-25 18:19:36 +13:00
Paul Chote
b9e32e5c06 Load maps from <support dir>/maps/<mod>/ too. 2011-01-21 17:38:28 +13:00
Paul Chote
2fca9b0b19 Fix broken first tick rendering in BuildPaletteWidget. 2011-01-20 00:51:13 +13:00
Paul Chote
1fb42f47b6 Remove redundant serverbrowser checks (these are now handled by the handshake process). 2011-01-20 00:32:43 +13:00
Paul Chote
481cc7807b Don't require a WorldRenderer to draw non-world-rendering widgets. 2011-01-19 20:41:32 +13:00
Paul Chote
e3c090a201 More drop messages. 2011-01-15 13:56:52 +13:00
Paul Chote
2f31928a53 Fix packaging clean script. 2011-01-15 13:51:38 +13:00
Paul Chote
06612d0f68 Add a mechanism for custom drop messages. Implement for kick. 2011-01-15 13:49:46 +13:00
Chris Forbes
d835c14988 fix crash in windows launcher 2011-01-11 11:25:50 +13:00
Chris Forbes
a25087a9f3 fix weap door crash in cnc 2011-01-09 17:32:59 +13:00
Chris Forbes
b362d9f9fc fix bogus interpretation of range parameter 2011-01-09 16:09:58 +13:00
Chris Forbes
cb3eca9d5f remove unused NukeLaunch.Silo field 2011-01-09 14:26:32 +13:00
Chris Forbes
4b3f0e9a4b fix breakage in ServerBrowserDelegate which prevented any joins 2011-01-09 14:23:50 +13:00
Chris Forbes
808cc59c59 fix bogus colors in chat 2011-01-09 14:02:15 +13:00
Chris Forbes
727d72123f sync GpsPower.Granted 2011-01-09 13:35:25 +13:00
Chris Forbes
c76822531e shareable, revokable gps 2011-01-09 13:31:53 +13:00
Chris Forbes
9387029b51 remove some sillyness in PlayerResources.Tick 2011-01-09 13:24:54 +13:00
Chris Forbes
b4109b12ca less dumb PlayerResources init 2011-01-09 13:23:29 +13:00
Chris Forbes
70afea85a9 new map format introduced: 4. format3 player colors are automatically upgraded to ColorRamp 2011-01-08 18:17:19 +13:00
Chris Forbes
3426b52247 add ColorRamp type; change everything to use it; maps not yet upgraded 2011-01-08 18:17:18 +13:00
Chris Forbes
e2ff40dc7f better fix for chrono bug 2011-01-08 17:30:29 +13:00
Chris Forbes
07abeffc5e #363 tabs should change color visibly when a building is ready 2011-01-08 16:22:18 +13:00
Chris Forbes
126e200e2e fix chronoshift/shroud interaction desync 2011-01-08 16:08:05 +13:00
alzeih
5c343caeaf Mod version validation
- Game.CurrentMods property to query the current mods when no orderManager accessible
- Server sends mod versions to master server on ping
- Client sends mod versions on handshake response
- Validate match on server side of handshake, not client side
2011-01-08 16:00:29 +13:00
Paul Chote
8264c6c8dc Play "Unable to build more" eva when the production exit is blocked. Also fixes #484. 2011-01-08 13:15:30 +13:00
Chris Forbes
db63724aeb add contrast surround to timer & chat which are displayed straight over the world 2011-01-08 12:21:12 +13:00
Chris Forbes
303525a5ba be fast by default; add 'Check Sync around Unsynced Code' option in debug panel 2011-01-08 11:49:31 +13:00
Chris Forbes
93a56f9a18 #250 resources should have a list of allowed terrain types 2011-01-08 09:31:36 +13:00
Chris Forbes
712eb437ea blah 2011-01-07 20:38:36 +13:00
Paul Chote
e46b00f9c4 Missed a file when unmangling a dirty rebase. 2011-01-07 20:33:14 +13:00
Paul Chote
9f38df013e Target uses int2. 2011-01-07 20:21:47 +13:00
Paul Chote
60e3f7621f Remove fp from CenterLocation and aircraft. 2011-01-07 20:14:22 +13:00
Paul Chote
d395c5e05d Remove dead helicopter instability code, and some unnecessary fp. 2011-01-07 20:00:53 +13:00
Chris Forbes
975682c57b fix silly debug popup in JSBridge 2011-01-07 15:34:28 +13:00
Matthew Bowra-Dean
e50dc9a550 Remove arch 64 package for the moment until packaging tools are sorted out 2011-01-07 15:29:50 +13:00
Matthew Bowra-Dean
63ee3ebf9f Make sure build root is correct (no override from rpmmacros). 2011-01-07 15:29:50 +13:00
Matthew Bowra-Dean
a993116085 Few more changes to rpm. 2011-01-07 15:29:49 +13:00
Matthew Bowra-Dean
eb158e6d21 pkgbuild and RPM fixes 2011-01-07 15:29:48 +13:00
Matthew Bowra-Dean
6a7c968e25 More fixes. 2011-01-07 15:29:47 +13:00
Matthew Bowra-Dean
5665d40e29 Separate root dirs for different architectures. 2011-01-07 15:29:47 +13:00
Matthew Bowra-Dean
3aff455fba Fix some syntax errors 2011-01-07 15:29:46 +13:00
Matthew Bowra-Dean
0d038f00ba 64bit linux packages 2011-01-07 15:29:45 +13:00
Paul Chote
8dcba13491 Fix osx launcher. 2011-01-06 18:51:40 +13:00
Paul Chote
0cef2e4f53 CheckboxWidget delegate methods. 2011-01-06 11:40:06 +13:00
Paul Chote
7443b3ce89 Fix button MouseUp handling. 2011-01-05 23:19:37 +13:00
Paul Chote
7cabe920db Restrict ClickThrough to what it was originally intended for. 2011-01-05 23:15:03 +13:00
Paul Chote
5254deedcb Remove some bogosity from widget mouse handling. 2011-01-05 23:01:17 +13:00
Paul Chote
df460d7407 Add extension methods to Rectangle/RectangleF, remove a pile of ToPoint()'s. 2011-01-05 22:24:11 +13:00
Paul Chote
3e1db3e8ae Move MapPreviewWidget.HandleInputInner to the lobby delegate. 2011-01-05 22:23:23 +13:00
Paul Chote
7b5b84b1b7 Unstatic MakeButton and MakeModifiers. Fixes mouse clicks in vs `Release' builds. 2011-01-05 15:32:21 +13:00
Paul Chote
2e9a0b8162 Fix for nonstandard mono paths. 2011-01-05 15:26:47 +13:00
Paul Chote
22bf9e7aff Further refactoring of Repair. 2011-01-05 13:29:38 +13:00
Paul Chote
40b0408ce7 Fix #453. Bogus crash when desyncing. 2011-01-05 13:09:25 +13:00
Paul Chote
c6fb1b641e Fix MouseButton orthogonality and remove unnecessary winforms dep. 2011-01-05 12:56:11 +13:00
Matthew Bowra-Dean
6998871adf Fix GTK launcher to change to correct working directory. 2011-01-05 09:13:53 +13:00
Matthew Bowra-Dean
2885fbb99b Few more tweaks to packaging 2011-01-05 09:13:37 +13:00
Chris Forbes
cc1c183d66 fix initial placement and facing of mig/yak on afld 2011-01-05 09:12:29 +13:00
Chris Forbes
418284672c clean up some potential fp misbehavior in Repair.cs 2011-01-05 09:12:29 +13:00
Chris Forbes
558647b987 blah 2011-01-05 09:12:28 +13:00
Chris Forbes
f03e6e6258 make it sortof work 2011-01-05 09:12:28 +13:00
Chris Forbes
f44ac769bf use a closure for the request state rather than dicts 2011-01-05 09:12:27 +13:00
Paul Chote
e02ed86088 Content mix files may be inside main.mix. redalert.mix should always be there. 2011-01-04 20:18:54 +13:00
Chris Forbes
dcbb6ee4eb small tweak to HttpUtil - we don't support 1.1, so dont pretend we do; also, set WebClient.Proxy everywhere to null 2011-01-04 20:02:23 +13:00
Chris Forbes
fe720186f5 add fast HttpUtil.DownloadData() 2011-01-04 17:53:00 +13:00
Matthew Bowra-Dean
0803d10746 Changed linux package target platforms to i686 (due to gtklauncher) 2011-01-04 17:50:55 +13:00
Matthew Bowra-Dean
d26ee1094a Rework GTK launcher and linux packages slightly 2011-01-04 17:35:50 +13:00
Matthew Bowra-Dean
68a38c85f9 Uses process IDs in dictionary for httpRequests 2011-01-04 17:34:07 +13:00
Matthew Bowra-Dean
4de390d173 Fix missed call to Call function in Windows launcher. 2011-01-04 17:34:07 +13:00
Matthew Bowra-Dean
fb8812a7fd Fix for concurrent child processes while using pipes for IPC. 2011-01-04 17:34:07 +13:00
Paul Chote
c8a74ef05a fix make install. 2011-01-04 17:12:03 +13:00
Paul Chote
de562939d4 Hacky fix for LabelWidget eating our MouseMove events. 2011-01-04 14:42:38 +13:00
Paul Chote
cc356bcfee Refactoring. 2011-01-04 14:34:00 +13:00
Paul Chote
ece50b0d57 RA Harvester docking sequence. 2011-01-04 14:34:00 +13:00
Paul Chote
76216b8dd9 Move damage sounds and shaking from Building/RenderBuilding into their own traits. Fix wall damage/death sounds under cnc. 2011-01-04 14:34:00 +13:00
Paul Chote
4a47641656 Tweak cnc wall sounds. 2011-01-04 14:34:00 +13:00
Paul Chote
03185fe46b Fix #429. Capturable Oil Derricks. 2011-01-04 14:34:00 +13:00
Paul Chote
cbd3baa6d4 Fix #469. C&C Nuke detonation sound. 2011-01-04 14:33:59 +13:00
Paul Chote
6287b132a0 #438. Show # Players in the map selector. 2011-01-04 14:33:59 +13:00
Paul Chote
6e7156e023 Mousewheel scrolls ScrollPanel. 2011-01-04 14:33:59 +13:00
Paul Chote
1ced0d7ab9 Require LMB for common widget interactions. 2011-01-04 14:33:59 +13:00
Chris Forbes
abeffbbbf7 fix a bunch of errors in the editor; fix minimap export to not suck 2011-01-04 13:45:10 +13:00
Chris Forbes
7f7c7217ba fix missing includes in gtklaunch 2011-01-04 12:53:33 +13:00
Matthew Bowra-Dean
a4de4cc266 Added renderer selection to GTK launcher. 2011-01-02 16:12:07 +13:00
Matthew Bowra-Dean
8ead8635c2 Updated dependencies for gtk launcher, statically link libmicrohttpd 2011-01-02 16:12:07 +13:00
Matthew Bowra-Dean
ecea2471ca Updated linux packaging scripts to remove the need for post install actions and to use the launcher. 2011-01-02 16:12:06 +13:00
Matthew Bowra-Dean
a3e67611e6 Use graphical sudo client for operations that potentially require elevation in gtk launcher. 2011-01-02 16:12:05 +13:00
Matthew Bowra-Dean
562ab0eee0 httpRequest implemented properly in Windows launcher. 2011-01-02 16:12:05 +13:00
Matthew Bowra-Dean
ad478e8872 httpRequest JS bridge function implemented in gtk launcher. 2011-01-02 16:12:04 +13:00
Matthew Bowra-Dean
ec572635b7 metadata JS bridge function implemented. 2011-01-02 16:12:04 +13:00
Matthew Bowra-Dean
44fae60dbd String handling in JS bridge changed to safer glib functions. Added path sanitization. 2011-01-02 16:12:03 +13:00
Matthew Bowra-Dean
0a1e6d16bd Converted most of GTK launcher to use glib's string functions. 2011-01-02 16:12:03 +13:00
Matthew
9739e7f51f Download extraction in GTK+ Launcher. 2011-01-02 16:12:02 +13:00
Matthew
1e4196e8d3 Download cancellation 2011-01-02 16:12:02 +13:00
Matthew Bowra-Dean
2e309b46e8 Downloading works. Still to come: cancelling downloads and extraction. 2011-01-02 16:12:01 +13:00
Matthew Bowra-Dean
5991ecdcf5 Makefile target for gtklauncher. 2011-01-02 16:12:01 +13:00
Matthew Bowra-Dean
360c572e14 launchMod working in JS bridge. 2011-01-02 16:12:00 +13:00
Matthew Bowra-Dean
16a84ba86e Selects last played mod in launcher. 2011-01-02 16:12:00 +13:00
Matthew Bowra-Dean
fcec3cb590 Updated utility app for better compatibility with GTK launcher. 2011-01-02 16:11:59 +13:00
Matthew Bowra-Dean
61f7e1df7f Generate mod tree in GTK tree view. 2011-01-02 16:11:59 +13:00
Matthew Bowra-Dean
650195e31c Utility app helper functions for listing mods in the GTK+ launcher. 2011-01-02 16:11:58 +13:00
Matthew Bowra-Dean
6fbc7bc7c4 Print mod list in an order where dependencies come after prerequisites. 2011-01-02 16:11:58 +13:00
Matthew Bowra-Dean
7e41e75643 Made existsInMod work, added stub for launchMod. 2011-01-02 16:11:57 +13:00
Matthew Bowra-Dean
df00b8cf23 Some refactoring. 2011-01-02 16:11:57 +13:00
Matthew Bowra-Dean
69ee1399b9 Bind to JavaScriptCore. Serve files through embedded web server. 2011-01-02 16:11:56 +13:00
Matthew Bowra-Dean
a561dd376e Proof of concept browser + embedded web server communicating via XMLHttpRequest.
Compile with "gcc -Wall `pkg-config --cflags --libs gtk+-2.0 webkit-1.0 libmicrohttpd` -o launcher main.c server.c"
Requires GTK, libwebkit and libmicrohttpd.
2011-01-02 16:11:55 +13:00
Matthew Bowra-Dean
c9bd3e8a1f Start of GTK launcher in C.
Webkit embedded in GTK window.
2011-01-02 16:11:55 +13:00
Matthew Bowra-Dean
a4493f48d5 httpRequest in win launcher uses utility program. Clean up usings and add missing license notices. 2011-01-02 16:11:54 +13:00
Paul Chote
de5d9abec3 Delayed unloading. Remove LocalStorage from proc. 2011-01-02 15:27:29 +13:00
Paul Chote
3674accd0c Improved cnc proc/harv docking. 2011-01-02 14:56:29 +13:00
Paul Chote
9ffdce7957 Fix #439; Dropdowns stay open when the host force-starts the game. 2011-01-02 14:54:25 +13:00
Paul Chote
38df0a28cd Remove fp from building refund calculation. 2011-01-02 14:54:25 +13:00
Paul Chote
f659f55801 Sync StoresOre.Stored 2011-01-02 14:54:25 +13:00
Paul Chote
f3da258763 Remove GetSiloFullness. 2011-01-02 14:54:25 +13:00
Chris Forbes
2048900c10 fix some dumbness in Production/ITeleportable 2011-01-02 14:41:48 +13:00
Chris Forbes
7b5a8cf089 #394 nuke without a launch site crashes -- fixed 2011-01-01 21:52:43 +13:00
Chris Forbes
a4bbce32b8 cleanup SyncReport.cs header 2011-01-01 21:43:37 +13:00
Chris Forbes
19aed01822 show real player names in syncreport 2011-01-01 21:42:57 +13:00
Chris Forbes
ba2ec557bc fix another dumb bug in ZipFile 2011-01-01 21:24:42 +13:00
Paul Chote
a8b4e640e7 Fix dropdown lists. Visual tweaks. 2011-01-01 17:54:09 +13:00
Paul Chote
d1966ab476 Improved scrollpanel thumb behavior. 2011-01-01 17:21:40 +13:00
Paul Chote
d90dec9c8e Remove a pile of unnecessary state management from Scrollpanels. 2011-01-01 16:47:52 +13:00
Chris Forbes
e2b739cd3e fix bogus spawn on central-conflict 2011-01-01 15:29:45 +13:00
Chris Forbes
dffb5293d0 hack up ZipFile to fix #464; filesystem needs rework to be sane 2011-01-01 15:28:07 +13:00
Chris Forbes
cf2ad68a7c add very basic Format80 encoder 2011-01-01 09:27:39 +13:00
Chris Forbes
119b0c063d don't show a kick button for the host while ready 2011-01-01 00:20:04 +13:00
Paul Chote
b948b9d2b7 Draggable thumbs 2010-12-31 23:59:23 +13:00
Paul Chote
d98e09e096 Draw scrollbar thumbs. 2010-12-31 23:19:13 +13:00
Chris Forbes
cf17bc7e5c clean up perf graph a bit 2010-12-31 20:31:57 +13:00
Paul Chote
42096cc5c9 Foo 2010-12-31 18:26:03 +13:00
Paul Chote
1d3b2334d0 Drop any remaining connections on gamestart. 2010-12-31 17:47:44 +13:00
Paul Chote
64304635b7 Fix dropping unvalidated clients. 2010-12-31 16:52:17 +13:00
Paul Chote
dc9de20553 Fix packaging scripts for BSD sed. 2010-12-31 13:36:37 +13:00
Paul Chote
486fa9a978 Handshake mod versions and map. Bump the protocol version. 2010-12-31 13:35:21 +13:00
Paul Chote
e2d1eec56e Shift Client creation to the client, sent in the handshake response. Fixes the `Newbie' bug and removes a lot of fragmented behaviour on player join. 2010-12-31 12:51:19 +13:00
Paul Chote
8f9e32dcc0 Client/server handshake. Only checks that the correct mods are active. 2010-12-31 11:41:25 +13:00
Paul Chote
dc012c0faf Fix server shutdown crash under mono. 2010-12-30 20:29:11 +13:00
Paul Chote
4f6f3eb80d Upgrade maps to oramap format. Save type field. 2010-12-30 18:00:44 +13:00
Paul Chote
fd49ca75d7 Forgot launcher files. 2010-12-30 17:51:23 +13:00
Paul Chote
cb50182fac Bugfixes: ZipFile.GetInputStream().GetAllBytes/.Length doesn't work; Divide by zero when no shellmaps are available; UseAsShellmap isn't saved by the editor; Duplicate maps crashes game. 2010-12-30 17:43:44 +13:00
Paul Chote
47bbc3a6de Wire up the rest of saving. Save-as will now properly overwrite existing contents. 2010-12-30 17:43:44 +13:00
Paul Chote
39ed6087cb Use utility app for http requests; Make them async. 2010-12-30 15:17:56 +13:00
Matthew Bowra-Dean
428999fc0b Create an empty zip file if it doesn't exist. 2010-12-30 02:21:39 +13:00
Paul Chote
b7975031bc Wire up most of saving again. 2010-12-29 22:13:51 +13:00
Paul Chote
e652a15b01 Remove some duplication 2010-12-29 21:41:04 +13:00
Paul Chote
fc6438e311 Use Filepaths instead of IFolders where possible. 2010-12-29 21:25:43 +13:00
Paul Chote
829fe6530a Start fixing the editor 2010-12-29 19:03:45 +13:00
Paul Chote
58797c0d37 packaging cleanup script. 2010-12-29 17:52:16 +13:00
Paul Chote
f6d9923305 Add SharpZipLib dep to INSTALL. 2010-12-29 11:51:29 +13:00
Paul Chote
c3ff679f3a Make map saving independent of Container type. Saving zip/oramap/mix untested as the editor cannot load non-folder maps. 2010-12-29 11:39:26 +13:00
Chris Forbes
fa36c71023 fix game failing to load compressed maps; convert 'a path beyond.' 2010-12-29 00:55:10 +13:00
Matthew
d4033f57bc Fix Makefile for Ubuntu. 2010-12-28 23:10:44 +13:00
Matthew Bowra-Dean
13f6a13ad9 Write maps to zip file from editor 2010-12-28 22:36:08 +13:00
Chris Forbes
44e668e804 choose a random map with MapStub.UseAsShellmap as the shellmap, rather than hardcoding a sha1 in mod.yaml; add editor support for the new flag too. 2010-12-28 19:13:56 +13:00
Chris Forbes
aecf19ed64 fix hash of RA shellmap 2010-12-28 19:04:33 +13:00
Chris Forbes
2a0c0bb991 remove unused Game.ConnectedToLobby event 2010-12-28 18:54:10 +13:00
Chris Forbes
99a0bd9609 remove legacy .uid junk 2010-12-28 18:53:15 +13:00
Chris Forbes
c20b3b90f4 dont use the .uid file hack -- compute them on demand 2010-12-28 18:52:19 +13:00
Chris Forbes
1cee570207 blah 2010-12-28 18:44:44 +13:00
Chris Forbes
382435e629 blah 2010-12-28 18:42:46 +13:00
Chris Forbes
637dbee32f remove support for loading from maps/ 2010-12-28 18:41:46 +13:00
Chris Forbes
81f6843791 bind .oramap -> ZipFile; search for .zip and .oramap in the map enumerator 2010-12-28 18:40:52 +13:00
Chris Forbes
cc6d445ef1 blah 2010-12-28 18:32:18 +13:00
Chris Forbes
cc2efdfa4a start reworking map enumerator 2010-12-28 18:27:40 +13:00
Chris Forbes
f7b34e1c5e #339 heli spawn offset is wrong fixed, and ReservableProduction folded back into Production 2010-12-28 18:27:00 +13:00
Chris Forbes
4d0f3b1554 #447 lock teams by default 2010-12-28 17:33:16 +13:00
Chris Forbes
ae1710896a add a tiny font; add labels in PerfGraphWidget 2010-12-28 17:24:20 +13:00
Chris Forbes
6425fc8a4b #268 fixed 2010-12-28 17:01:01 +13:00
Chris Forbes
38d267e439 fix sln file 2010-12-28 16:34:49 +13:00
Chris Forbes
95cf0bb827 fix bogus version subst. 2010-12-28 14:53:31 +13:00
Chris Forbes
d42bdfa102 show replays most recent first 2010-12-27 21:22:32 +13:00
Chris Forbes
5a7c62e24a fix bogus formatstring in ChooseReplayFilename() 2010-12-27 21:19:38 +13:00
Chris Forbes
29818ba60c remove dead RejoinLobby function 2010-12-27 21:10:58 +13:00
Chris Forbes
1c4f4b7886 removing some duplication 2010-12-27 21:03:51 +13:00
Chris Forbes
e127095437 remove some dumb state-tracking from OreRefinery 2010-12-27 20:03:19 +13:00
Chris Forbes
d8eaa7c841 shuffle exits 2010-12-27 19:43:32 +13:00
Chris Forbes
888fe35f08 make repath much less aggressive while attacking, to fix perf 2010-12-27 19:17:02 +13:00
Chris Forbes
59fdbe8725 CanTargetUnit -> CanTargetUnit 2010-12-27 18:43:32 +13:00
Chris Forbes
24a5b3ba03 simplification 2010-12-27 18:42:28 +13:00
Chris Forbes
9d768fa1c1 move some MobileInfo-related bits onto MobileInfo 2010-12-27 18:41:07 +13:00
Chris Forbes
31b98c0eb4 fix misleading name 2010-12-27 18:36:06 +13:00
Chris Forbes
3dd52a59c9 work around a verifier limitation 2010-12-27 18:30:24 +13:00
Chris Forbes
f3997ba3bd blah 2010-12-27 18:26:13 +13:00
Chris Forbes
4a94cf656b remove a redundant method from queries. 2010-12-27 18:26:12 +13:00
Chris Forbes
439bb7d02f multiplying by 0 makes the world hard to sync 2010-12-27 18:26:11 +13:00
Chris Forbes
9ad23b10f0 fix chronoshift being hard to cancel 2010-12-27 18:26:11 +13:00
Chris Forbes
e2a0134c5b not java. 2010-12-27 18:26:10 +13:00
Chris Forbes
c6f1740875 add a note for later 2010-12-27 18:26:09 +13:00
Chris Forbes
50834911fe don't disable everyone's shroud when someone's GPS goes up 2010-12-27 18:26:08 +13:00
Chris Forbes
2cce1ce23c fix warnings, and bogosity in projectfiles 2010-12-27 18:26:07 +13:00
Chris Forbes
3d47584cd8 use bidi pathing for moving into range (MoveToAdjacent-style hack) 2010-12-27 15:33:59 +13:00
Chris Forbes
3ce055da80 fix cnc mod script the same way 2010-12-24 14:13:12 +13:00
Chris Forbes
51d3743b18 fix ra mod script 2010-12-24 14:12:06 +13:00
Chris Forbes
ce609195cd make kicking actually work 2010-12-24 12:31:37 +13:00
Chris Forbes
54cf2e7993 add kick command to LobbyCommands 2010-12-24 12:31:36 +13:00
Paul Chote
b5b6b47e95 Implement metadata and httpRequest in the windows launcher. Untested. 2010-12-24 12:13:28 +13:00
Paul Chote
6ff0e41650 Remove fp from Aircraft. 2010-12-24 12:01:39 +13:00
Paul Chote
fcdb3b536d Latest version and MOTD in osx launcher. 2010-12-24 11:41:35 +13:00
Paul Chote
14ad5099a0 Show the mod version in the launcher 2010-12-24 11:41:35 +13:00
Paul Chote
dc3bf2515a Remove VERSION file, and version / motd display from the ingame menu. Write git-version into the individual mod versions. 2010-12-24 11:41:35 +13:00
Paul Chote
275dfc43be New launch mechanism: removes wrapper app bundle, and supports paths with spaces. 2010-12-24 11:41:34 +13:00
Chris Forbes
3149f3efa2 fix up some of the capturing duplication 2010-12-23 14:25:39 +13:00
Chris Forbes
e8a85db309 squash some warnings 2010-12-23 08:50:07 +13:00
Chris Forbes
c1fb6c2732 remove ability to not save syncreports 2010-12-23 08:48:54 +13:00
Chris Forbes
68e8565561 reduce size of attack forces to reduce base blockages 2010-12-23 08:42:45 +13:00
Chris Forbes
92e6570f50 fix a crash, add a normal bot (harder) 2010-12-23 08:42:45 +13:00
Chris Forbes
e94e21fd32 add name to cnc bot too 2010-12-23 08:42:44 +13:00
Chris Forbes
d320a689a2 wire up bot creation properly in CreateMPPlayers etc 2010-12-23 08:42:44 +13:00
Chris Forbes
29fbeb2c5d add enumeration of bots 2010-12-23 08:42:43 +13:00
Paul Chote
7ef884532d Fix osx launcher crash when there is a space in the launcher path. Launching the game still doesn't work in this case. 2010-12-22 20:35:43 +13:00
Paul Chote
54c49dfa15 OS X launcher: Create download directory if it doesn't exist. 2010-12-21 21:29:50 +13:00
Chris Forbes
8809cbb4f1 blah 2010-12-21 18:00:42 +13:00
Chris Forbes
112dd3b1f6 remove some random crap 2010-12-21 17:59:41 +13:00
Chris Forbes
92b0f77867 #381 fixed (thanks, [Arcturus]) 2010-12-20 20:00:41 +13:00
Chris Forbes
dcec748911 fix #436 bridges in wrong place in render sequence 2010-12-20 19:43:25 +13:00
Chris Forbes
7d61e75862 #413 fixed 2010-12-20 19:38:28 +13:00
Chris Forbes
2d2bb58054 fix #451 2010-12-20 19:32:00 +13:00
Chris Forbes
bd0b3edccb fix AI jamming up its base by enforcing 1-cell gaps 2010-12-20 19:19:54 +13:00
Chris Forbes
d66439aa0c fix cnc rules bug so it loads 2010-12-20 17:36:29 +13:00
Chris Forbes
c85dbfb53d fix dumb bug in replay viewer 2010-12-19 20:49:14 +13:00
Chris Forbes
d6c71c6618 fix crash in RA music dialog 2010-12-19 19:14:00 +13:00
Chris Forbes
7802931e54 SAM requires power to operate 2010-12-19 18:51:14 +13:00
Chris Forbes
14737cc1dc nerf 1tnk pretty hard; add more hp for 2tnk but increase price slightly 2010-12-19 18:48:51 +13:00
Matthew Bowra-Dean
d8d33811e4 Added minimize button to launcher. 2010-12-19 18:41:36 +13:00
Chris Forbes
c99f89c987 fix crash on server overfill, fix another problem preventing spec slots from autofilling 2010-12-19 18:40:10 +13:00
Chris Forbes
7c76b25a44 blah 2010-12-19 18:40:09 +13:00
Chris Forbes
4fdc8222e8 blah 2010-12-19 18:40:09 +13:00
Chris Forbes
07d2e54bcc fix another crash in replay browser 2010-12-19 17:48:53 +13:00
Chris Forbes
f3d0e4b8ed fix a crash in the replay browser 2010-12-19 17:48:53 +13:00
Chris Forbes
2fad6f3bf1 move replay viewer delegate into mod 2010-12-19 17:48:52 +13:00
Chris Forbes
9482955a83 blah, cleanup 2010-12-19 17:48:51 +13:00
Chris Forbes
9d75c8d820 fix breakage 2010-12-19 17:48:51 +13:00
Chris Forbes
e3925b752d add support for replay viewer to cnc 2010-12-19 17:48:50 +13:00
Chris Forbes
f990006587 hack around the local player being set in replays 2010-12-19 17:48:50 +13:00
Chris Forbes
0b7bee480c extract [final] lobbyinfo from replay order stream; show map name & preview in replay browser 2010-12-19 17:48:49 +13:00
Chris Forbes
05f4aeea9f show duration in the replay browser 2010-12-19 17:48:49 +13:00
Chris Forbes
5f37b9e7d2 fix crash in replay playback (no world) 2010-12-19 17:48:48 +13:00
Chris Forbes
734b464de3 wire up replay browser to actually start a game. doesnt work. 2010-12-19 17:48:48 +13:00
Chris Forbes
4206cf1b09 refactor game joining; add replay joining support 2010-12-19 17:48:47 +13:00
Chris Forbes
17e3ef131c actually populate the replay browser; fix listbox ContentHeight not being reset. 2010-12-19 17:48:47 +13:00
Chris Forbes
2c13ebc6e7 wire cancel button for replay viewer 2010-12-19 17:48:46 +13:00
Chris Forbes
4f3b16cab2 add non-functional replay browser 2010-12-19 17:48:46 +13:00
Chris Forbes
25ebdea758 hack in stop order support to various classes. not happy with this. 2010-12-19 17:48:18 +13:00
Paul Chote
8b82df8298 Remove broken powered-techtree hack. 2010-12-07 22:35:40 +13:00
Paul Chote
0298a9e3a9 Remove debug logging from ChronoshiftPower. 2010-12-07 22:27:16 +13:00
Paul Chote
f2f60fb1f7 Don't apply palette effects to shroud/fog. 2010-12-07 22:26:27 +13:00
Paul Chote
b07eb9b8a1 Fast charge devhack. 2010-12-07 22:21:52 +13:00
Paul Chote
f5bffc4da9 Restore sane timings. 2010-12-07 22:19:58 +13:00
Paul Chote
55d60bd466 Don't crash if two powers have the same icon. 2010-12-07 22:00:26 +13:00
Paul Chote
c2a945b7ed Fix Spy infiltration. 2010-12-07 22:00:26 +13:00
Paul Chote
48b7cdad44 InfiltrateForSupportPower / Sonar pulse. 2010-12-07 22:00:20 +13:00
Paul Chote
c7500084df Parabomb crates. Multiple can be collected and queued. Support uncharged powers (0 charge time) with appropriate tooltip. 2010-12-07 21:50:33 +13:00
Paul Chote
d1850e8b4b Fix a time format bug. Fix subsequent gps bug. 2010-12-07 21:49:33 +13:00
Paul Chote
c465a58976 Sonar Pulse power. It still doesn't do anything. 2010-12-07 21:49:26 +13:00
Paul Chote
6b05b2c2f0 Iron Curtain. 2010-12-07 21:45:04 +13:00
Paul Chote
cd10fb1db0 GPS Satellite. 2010-12-07 21:45:04 +13:00
Paul Chote
172e1eb295 Paratroopers, Spyplane. 2010-12-07 21:45:04 +13:00
Paul Chote
9e16eb513f Reimplemented chronoshift. (still has desync) 2010-12-07 21:45:04 +13:00
Paul Chote
24b322053c Fix ra shellmap; reimplement ra nuke. 2010-12-07 21:45:04 +13:00
Paul Chote
e52771c367 Reimplement Ion Cannon and cnc nuke. Disable ra shellmap nukes. 2010-12-07 21:45:04 +13:00
Paul Chote
76f792bfdf New special powers mechanism. Only cnc Airstrike has been reimplemented so far. Special power crates, and spy bonuses have also been disabled. 2010-12-07 21:45:03 +13:00
Paul Chote
c6fad7fe98 Render IPreRenderSelection independently of OG. 2010-12-07 21:45:03 +13:00
Paul Chote
915cb589b3 Fix some more special power exploits 2010-12-07 21:45:03 +13:00
Chris Forbes
664692cef9 #398 c4 vs friendly buildings goes through the motions, but does nothing 2010-12-06 20:46:44 +13:00
Chris Forbes
220579ff85 wire 's' (default binding) to issue 'Stop' order to each selected actor 2010-12-06 20:43:09 +13:00
Chris Forbes
1a8e964c04 clean up usings 2010-12-06 14:35:37 +13:00
Chris Forbes
3a309ec916 remap hotkeys 's' -> 'y' in prep for adding 'stop' order 2010-12-05 12:29:11 +13:00
Chris Forbes
d46c64fad5 blah 2010-12-05 12:24:11 +13:00
Chris Forbes
3f47715c36 harvesters show colors for each resource type 2010-12-05 12:10:52 +13:00
Chris Forbes
94715a1561 add AutoTargetIgnore to ^Wall in ra and cnc 2010-12-05 11:41:14 +13:00
Chris Forbes
a752c47b5a allow marking things with AutoTargetIgnore so AutoTarget won't go for them 2010-12-05 11:39:44 +13:00
Chris Forbes
4d0535daa9 fix exploit in sonar pulse power 2010-12-05 11:36:05 +13:00
Chris Forbes
a3e64d1733 add AutoTargetIgnore 2010-12-05 11:32:30 +13:00
Chris Forbes
2618a7dadc fix perf of floodfill in editor 2010-12-05 11:31:24 +13:00
Chris Forbes
5617465294 remove sync attribute from DisplayCash/DisplayOre 2010-12-04 11:14:40 +13:00
Chris Forbes
9c20fba4a0 fix spy crashing things when disguised as a unit with fewer idle anims 2010-12-04 11:02:53 +13:00
Chris Forbes
05718f9e8e #400 bogus pip color for e7 fixed 2010-12-04 10:36:01 +13:00
Chris Forbes
81dad0bd34 tidying 2010-12-04 10:35:34 +13:00
Chris Forbes
c177cf9f9a #401 bogus footprint for ATWR fixed 2010-12-03 20:49:43 +13:00
Chris Forbes
e1761d8969 cleanup some usings 2010-12-03 20:43:27 +13:00
Paul Chote
0ae464d1f7 New attack-move cursor for cnc. 2010-12-02 10:28:34 +13:00
Paul Chote
4913d82bce Autotarget sets target line 2010-12-01 21:14:10 +13:00
Paul Chote
4f6027e772 Add Autotarget to cnc helis. 2010-12-01 21:03:41 +13:00
Paul Chote
fa84cfb26e Rebalance Invulnerability and Chronoshift. 2010-12-01 18:43:12 +13:00
Paul Chote
971287e989 Fix shroud crash 2010-12-01 18:22:46 +13:00
Paul Chote
deed6c7267 Make LST unbuildable; it is completely broken. 2010-12-01 13:19:56 +13:00
Paul Chote
f58f460355 Fix copypasta bogosity that mono accepts as valid code. 2010-12-01 13:19:09 +13:00
Paul Chote
2c897d4454 Fix ra shellmap low power and broken GAP position 2010-11-30 23:16:40 +13:00
Paul Chote
b4101c03ee MSLO requires power and can be powered down. 2010-11-30 23:13:51 +13:00
Paul Chote
200e90a590 Right click cancel chronoshift targeting. 2010-11-30 23:02:45 +13:00
Paul Chote
be8f042e49 Fix autoattack target flashes 2010-11-30 22:53:11 +13:00
Paul Chote
4b1eb993e4 Swap map selector button order 2010-11-30 22:30:18 +13:00
Paul Chote
f6ce673345 Fix KOTH maps 2010-11-30 22:28:28 +13:00
Paul Chote
08eeec4d99 More lobby polish (mainly map chooser). 2010-11-30 21:20:57 +13:00
Matthew Bowra-Dean
564a4598b9 Added renderer selection to Windows launcher. 2010-11-30 19:08:34 +13:00
Matthew Bowra-Dean
7e25b6e58e Moved map description to bottom of labels. 2010-11-30 19:08:24 +13:00
Matthew Bowra-Dean
57f74606f0 Added author and description to map chooser, fixes #290. Added word wrap to the LabelWidget to support it. 2010-11-30 19:08:18 +13:00
Paul Chote
b44cb9ad57 Pulse the rally point circles when a new location is set. 2010-11-30 19:07:41 +13:00
Paul Chote
dfd5906d7f Refactor AutoHeal. 2010-11-30 14:20:15 +13:00
Paul Chote
2e7b5e8712 Fix moonwalking infantry 2010-11-30 14:17:39 +13:00
Paul Chote
eb8682fd0e Fix AutoHeal 2010-11-30 13:37:10 +13:00
Paul Chote
2d224a207c Fix idle animations / prone. 2010-11-30 12:51:25 +13:00
Paul Chote
5070a81db4 Move CancelableActivity into the Activities namespace. Remove the Idle activity. 2010-11-30 11:11:14 +13:00
Paul Chote
e97dd2ee47 make currentActivity private. 2010-11-29 13:47:50 +13:00
Paul Chote
da74c6ad23 Add some logging to see what is going on. 2010-11-29 13:43:00 +13:00
Paul Chote
c7f1d08748 Some thoughts towards improving our bogus idle handling. Untested. 2010-11-29 13:15:44 +13:00
Paul Chote
7850acc6fb Fix AttackLeap. 2010-11-29 11:52:27 +13:00
Matthew Bowra-Dean
ec5b9a1150 Select last mod at start of launcher. Don't run download action elevated. 2010-11-28 23:12:19 +13:00
Matthew Bowra-Dean
83f67a9d48 Revert Window installer to not having launcher as default. 2010-11-28 23:12:18 +13:00
Paul Chote
fb799ad436 Fix dropdown miscompile bug under mono 2.6.7. 2010-11-28 22:23:50 +13:00
Paul Chote
60186efca6 Change rpm deps to target fedora. 2010-11-28 15:35:07 +13:00
Paul Chote
20ab3b6caa Fix observers in cnc. 2010-11-28 15:26:34 +13:00
Paul Chote
32db66eb7e Normalize ra/cnc chrome yaml 2010-11-28 15:24:31 +13:00
Paul Chote
112844a9f7 Normalize lineendings. 2010-11-28 15:14:31 +13:00
Paul Chote
745df591e0 Hide the join slot buttons when ready. 2010-11-28 15:11:57 +13:00
Paul Chote
9c7759d131 More polish. 2010-11-28 15:09:25 +13:00
Paul Chote
4bb70f11e9 Tweak header positioning and scrollpanel scissoring (don't draw contents over the 1px border). 2010-11-28 13:53:38 +13:00
Paul Chote
ce5ca9dbca Color selector as a drop panel. 2010-11-28 13:44:53 +13:00
Paul Chote
0b9a984b7a Team dropdown. 2010-11-28 12:00:14 +13:00
Paul Chote
45cd6caeec Faction dropdown flags. 2010-11-28 11:46:14 +13:00
Paul Chote
4c517c0e59 Initial lobby rework progress 2010-11-28 11:25:42 +13:00
Paul Chote
7884cb310b Polish: Offset button children by pressed state. 2010-11-28 11:18:03 +13:00
Paul Chote
306bece709 Tweak ra lobby scrollpanel margins. 2010-11-28 10:41:41 +13:00
Paul Chote
748a055a24 Disable FrozenUnderFog for this release. 2010-11-28 10:29:05 +13:00
Paul Chote
240b26a265 Remove bogus WorldGameOver trait. 2010-11-28 09:54:29 +13:00
Paul Chote
ac82121460 Fix diplomacy stance cycling exploit. 2010-11-28 09:42:37 +13:00
Matthew Bowra-Dean
3189a4f457 Give sensible default range to CarpetBomb and make sure its target location is in the correct units. 2010-11-28 01:45:24 +13:00
Paul Chote
291e7588e1 Workaround for persistent dropdowns. 2010-11-27 23:55:09 +13:00
Matthew Bowra-Dean
b8e274e0f9 Revert misguided attempt at allowing preservation of user installed maps. 2010-11-27 23:25:34 +13:00
Paul Chote
e81a1f78a4 Fix visibility that mono 2.8 happily ignores. 2010-11-27 22:39:50 +13:00
Matthew Bowra-Dean
51c3455ffe Linux post install scripts brought up to date with Utility app syntax changes. 2010-11-27 22:19:40 +13:00
Matthew Bowra-Dean
583fa0aa39 Made PipeAccessRights explicit to get around Mono fail. 2010-11-27 18:54:43 +13:00
Matthew Bowra-Dean
f768f8d969 Include SharpZipLib in Windows installer. 2010-11-27 18:54:42 +13:00
Matthew Bowra-Dean
0e26f0ce26 Updated packaging scripts for winlauncher. 2010-11-27 18:54:42 +13:00
Matthew Bowra-Dean
2a8beca0f8 Updated Windows installer for launcher. 2010-11-27 18:54:42 +13:00
Matthew Bowra-Dean
b5813ebff8 Update Makefile for Winlauncher 2010-11-27 18:54:42 +13:00
Matthew Bowra-Dean
0f6f36411a Fix cnc & ra mod page layout on Windows. 2010-11-27 18:54:42 +13:00
Paul Chote
f798639125 New loadscreen artwork for cnc; needs texturing. 2010-11-27 18:54:28 +13:00
Paul Chote
6014095ab3 Untextured GDI and Nod logos. 2010-11-27 17:16:37 +13:00
Paul Chote
52e265557c Oil Derricks spurt fire when dead. 2010-11-27 15:50:46 +13:00
Paul Chote
f9f9fbf3e4 Reinit the sheetbuilder too - appending more sprites to the old sheets isn't the best of ideas. Fixes "Terrain sprites span multiple sheets" on cnc tundra map. 2010-11-27 15:11:38 +13:00
Paul Chote
d559b5cdb7 Rallypoint Polish: Improved artwork, correct positioning, doesn't disappear when the building is offscreen, targeting cursor. 2010-11-27 14:54:29 +13:00
Paul Chote
d6733e62d6 Extra sounds extracted from the c&c demo. 2010-11-27 14:08:31 +13:00
Paul Chote
00a0aac7a3 Scale is now set via a field on Render* and interacts properly with chronoshift and building previews. 2010-11-27 13:30:08 +13:00
Paul Chote
840ade5b78 Remove LineBuild preview (no preview is better than broken preview). 2010-11-27 13:18:06 +13:00
geckosoft
13d3137ae4 Fixed: Issue #376 : Captured Refineries cannot receive Ore + harv not unlinked 2010-11-27 11:28:22 +13:00
Paul Chote
62c652a645 Fix a fog information leak introduced by 8d8c6c67. 2010-11-27 11:28:22 +13:00
Paul Chote
76428cbda2 Move ShroudRenderer into Graphics. 2010-11-27 11:28:22 +13:00
Paul Chote
434ea26950 Fix cloaked units. 2010-11-27 11:28:22 +13:00
Paul Chote
9655b34e5f Fix FrozenUnderFog; add to cnc. 2010-11-27 11:28:22 +13:00
Paul Chote
e91caa4e7a Save some perf. 2010-11-27 11:28:22 +13:00
Paul Chote
3b0810a096 Simply the localplayer hack, and prevent vis dirtying when shroud is disabled. 2010-11-27 11:28:17 +13:00
Paul Chote
1d81e71bcb Allow vis to extend outside the map, but not explored. 2010-11-27 11:20:04 +13:00
Paul Chote
29ac9a594a Add a hack to support our old "no player means total vis" behavior. 2010-11-27 11:20:04 +13:00
Paul Chote
fb0e399ab9 Consolidate viewport clip calculations into one place (except for TerrainRenderer, but changing that calculation crashes my gfx card). 2010-11-27 11:20:04 +13:00
Paul Chote
7c5c989eb2 Introduce World.LocalShroud. Breaks targeting stealth tanks. Probably breaks FrozenUnderFog. 2010-11-27 11:20:04 +13:00
Paul Chote
41fd19c766 Begin refactoring Shroud. ShroudRenderer is now internal to WorldRenderer; all traits interact with Shroud directly. Gives soft-edges at the map border for free, but breaks shellmap and observers. 2010-11-27 11:20:03 +13:00
Paul Chote
b423889c06 Remove a pile of duplication from target lines.
Remove MoveFlash.
2010-11-27 11:20:03 +13:00
Paul Chote
5f43923b80 Polish: Show the "move-blocked" cursor for locations outside the map. Clamp move orders to the map bounds for these orders. 2010-11-27 11:20:03 +13:00
Paul Chote
5470264f00 Show move-blocked cursor if we can know the unit can't move there. 2010-11-27 11:20:03 +13:00
Paul Chote
06ed722b7a Render healthbars / target lines / minefield grids *above* shroud. 2010-11-27 11:20:02 +13:00
Paul Chote
8565b7be0c Always render actor selection boxes. 2010-11-27 11:20:02 +13:00
Paul Chote
a3861823c9 Fix scissoring for LocalPlayer != null. 2010-11-27 11:20:02 +13:00
Paul Chote
84fd45ad69 Scissor to map edge. 2010-11-27 11:20:02 +13:00
Paul Chote
dd6a431af2 Start scripting the cnc shellmap. 2010-11-27 11:20:02 +13:00
Paul Chote
fa31fb199f Setup factions on cnc shellmap 2010-11-27 11:20:02 +13:00
Paul Chote
fbeb638582 Center the viewport by default. 2010-11-27 11:20:01 +13:00
Paul Chote
1aebd59062 Fix some compiler warnings 2010-11-27 11:20:01 +13:00
Paul Chote
7182908728 Rename ListBoxWidget -> ScrollPanelWidget. 2010-11-27 11:20:01 +13:00
Paul Chote
58a92de5a1 Move widget delegates into Mods. 2010-11-27 11:20:01 +13:00
Paul Chote
4ea04f461a Fix license info. 2010-11-27 11:19:39 +13:00
Paul Chote
26c084cfb8 Update makefile. 2010-11-27 11:17:00 +13:00
Matthew Bowra-Dean
ac513557a1 Removed old code, made installing mods work. 2010-11-26 01:01:12 +13:00
Matthew Bowra-Dean
db5b5698a7 Implemented remaining JS bridge functions for Win launcher. 2010-11-26 00:47:22 +13:00
Paul Chote
1f61d22489 RA package download/install (copied from cnc) 2010-11-25 22:51:30 +13:00
Paul Chote
520f602f23 Disable some currently unimplemented bits (to be re-enabled later). 2010-11-25 22:51:30 +13:00
Paul Chote
8c5c63a4b5 Use the launcher in osx packaged builds. Leopard support. Fix some wording. Remove old osx launcher project. 2010-11-25 22:51:29 +13:00
Paul Chote
a0741ba26b Set the game path to the launcher resource dir. Can be overwritten using the system defaults mechanism. 2010-11-25 22:51:29 +13:00
Paul Chote
9f21d944d1 Gl renderer is now default, don't need to override it. 2010-11-25 22:51:28 +13:00
Paul Chote
10f9e3e787 Zip extraction support. 2010-11-25 22:51:28 +13:00
Paul Chote
eff5e409c0 More utility tweaks 2010-11-25 22:51:28 +13:00
Paul Chote
f108735f74 Keep the bs inside the launcher 2010-11-25 22:51:28 +13:00
Paul Chote
e62149398b Clean up after failed extraction. 2010-11-25 22:51:28 +13:00
Paul Chote
d6e831eb07 Utility changes to support extracting a zip relative to a mod. Can also be used to install new mods. 2010-11-25 22:51:28 +13:00
Paul Chote
dcf3912d24 Add mono version check 2010-11-25 22:51:28 +13:00
Paul Chote
efad699d4b Prompt user when quitting with active downloads. Remove js debug logging. 2010-11-25 22:51:28 +13:00
Paul Chote
77a35fd132 Close the app when the main window is closed. Terminate all in progress downloads when the app is closed. 2010-11-25 22:51:28 +13:00
Paul Chote
2fe7e10750 Handle download errors 2010-11-25 22:51:27 +13:00
Paul Chote
6f66a19b18 Clean up file downloading. 2010-11-25 22:51:27 +13:00
Paul Chote
2fc88e439d Progress towards in-launcher download ui. Works, but is very fragile. 2010-11-25 22:51:27 +13:00
Paul Chote
b4b05c3f4e Notify javascript when download status changes. Allow js to query information about a download. 2010-11-25 22:51:27 +13:00
Paul Chote
0ee1d39bac Refactor download mechanism to allow multiple concurrent downloads. Allow downloads to be cancelled. Allow js to query if files exist in the cache. Fix some compiler warnings. 2010-11-25 22:51:27 +13:00
Paul Chote
c3521a2490 Expose the package downloading to js. Todo: cancel support, status callbacks. 2010-11-25 22:51:27 +13:00
Paul Chote
cb93955cc5 Generalize package downloading to support arbitrary urls and download locations. 2010-11-25 22:51:27 +13:00
Matthew Bowra-Dean
666efc94d1 Bring Makefile up to date with Win launcher changes. 2010-11-25 22:51:27 +13:00
Matthew Bowra-Dean
d2a52fd529 Bring Windows launcher into line with pchote's ideas. 2010-11-25 22:51:26 +13:00
Paul Chote
085685a769 Use ~/Library/Application Support/OpenRA/ as the support dir. 2010-11-25 22:51:26 +13:00
Paul Chote
034196ddd6 Build a list of parent mods before launching. 2010-11-25 22:51:26 +13:00
Paul Chote
3dc16bdbb4 Support launching an arbitrary mod. Hook up package detection for cnc. 2010-11-25 22:51:26 +13:00
Paul Chote
f42f39f9c9 Refactor JSBridge to simplify adding new methods. Add log(message) and a stub for fileExistsInMod(file,mod). 2010-11-25 22:51:26 +13:00
Paul Chote
40235db52e Bind the js bridge properly. Display the selected mod page on load. 2010-11-25 22:51:25 +13:00
Paul Chote
810b73e1f0 Fix encoding issue with OpenRA.Utility. Refactor SidebarEntry. Add launcher pages to all mods. 2010-11-25 22:51:25 +13:00
Paul Chote
82850cf4fb Use window.external instead of Launcher in js for windows support. Tweak the OpenRA.Utility calls - still doesn't work 100%. 2010-11-25 22:51:25 +13:00
Paul Chote
21e597ca2d Hook up the "Play" button to launch the game. 2010-11-25 22:51:25 +13:00
Paul Chote
ed8203c896 Load mod.html into the right pane when clicked. Refactoring. 2010-11-25 22:51:25 +13:00
Paul Chote
de7668e8ff Add a WebView in preparation for the page info. Refactor SidebarEntry out of Mod. Add an "Other" category with links for support/credits+legal. 2010-11-25 22:51:25 +13:00
Paul Chote
7271dd5248 List installed mods in the sidebar. Changes utility mod info syntax. 2010-11-25 22:51:24 +13:00
Paul Chote
16dd07bab3 Add support for launching the game. 2010-11-25 22:51:24 +13:00
Paul Chote
5cbfc45819 Beginnings of the new mac launcher. 2010-11-25 22:51:24 +13:00
Chris Forbes
6a238ab51a open/closed/bot dropdown for cnc lobby too 2010-11-25 20:04:56 +13:00
Chris Forbes
4d9c2a30df Dropdown listboxes 2010-11-25 20:04:56 +13:00
Chris Forbes
8b18927c67 #378 crash in IdleHealActivity fixed 2010-11-25 19:48:28 +13:00
Chris Forbes
d77563bdb0 reduce coverage of UiOverlay sprites so you can see the building you're placing 2010-11-24 20:10:14 +13:00
Paul Chote
d0466714c8 Allow Chronoshifted/paradropped units to pick up crates, etc. 2010-11-24 15:55:41 +13:00
Paul Chote
08c9c1a92f Make Iron Curtain targeting consistent with Chronoshift. 2010-11-24 15:49:52 +13:00
Paul Chote
ea3943daf4 Do the same for chronoshifted units 2010-11-24 15:45:47 +13:00
Paul Chote
6ac92c45f1 Cache the sprites. Draw linebuild cells too. 2010-11-24 15:31:29 +13:00
Paul Chote
96cd0e2259 Render building previews 2010-11-24 13:43:07 +13:00
Paul Chote
fc5830a687 Added int2.Clamp(Rectangle). All queries for map geometry use map.Bounds. 2010-11-24 12:24:48 +13:00
Paul Chote
1dfe437641 Refactor Viewport. 2010-11-24 11:57:18 +13:00
Paul Chote
b8eda5a152 Tidy more uses of BottomRight/TopLeft, bogus location of FormatTime. 2010-11-24 11:37:18 +13:00
Paul Chote
de8603832f Use Map.Bounds instead. 2010-11-24 11:12:37 +13:00
Paul Chote
f11bcd27cc Kill Map.XOffset / Map.YOffset. 2010-11-24 10:26:38 +13:00
Paul Chote
00dc91cf49 Standardise Theater -> Tileset. 2010-11-24 10:09:51 +13:00
Paul Chote
8b0255e2f7 Fix the RA shellmap. 2010-11-23 22:53:14 +13:00
Paul Chote
3a2279f378 Set cursor position based on mouse click location. 2010-11-23 21:39:34 +13:00
geckosoft
8085bcb232 Textfield cursor support and forward-delete (rewritten by pchote). 2010-11-23 21:39:34 +13:00
Chris Forbes
5e6f325df1 #377 fixed 2010-11-23 21:39:34 +13:00
Chris Forbes
f892eb629e fix exploitability of nuke and ion cannon 2010-11-23 21:39:34 +13:00
Chris Forbes
1629958970 remove bogus sandbag-in-water on equal-opportunity 2010-11-23 21:39:34 +13:00
Chris Forbes
2079627030 fix APB spawn 2010-11-23 21:39:34 +13:00
Paul Chote
2072b78489 Remove duplication from PasswordFieldWidget. 2010-11-23 21:39:34 +13:00
Paul Chote
3d1d4a1aff AOE Chronosphere 2010-11-23 21:39:31 +13:00
Paul Chote
41665f7e95 AOE Iron Curtain 2010-11-23 21:38:28 +13:00
geckosoft
604aae5980 Fixed: #281 for regular (read: right-click) commands (Modified by pchote) 2010-11-23 15:59:05 +13:00
geckosoft
ac613f7bea Fixed: #334 Flares should now be destroyed if the drop plane is destroyed 2010-11-23 15:59:05 +13:00
geckosoft
46d0a6d00d Fixed: Potential exploit with ChronoshiftPower 2010-11-23 15:59:05 +13:00
geckosoft
402afc82ca Fixed: Potential exploit on Iron Curtain 2010-11-23 15:59:04 +13:00
geckosoft
1cd59a0892 Fixed: Iron Curtainable doesnt stack 'InvulnEffect' effects anymore 2010-11-23 15:59:04 +13:00
geckosoft
7b7bcf1005 Fixed: Crash when selling iron curtained' buildings 2010-11-23 15:59:04 +13:00
geckosoft
be701007df Changed: DrawRangeCircle now accepts a float instead of an int 2010-11-23 15:59:04 +13:00
geckosoft
fef6285436 Fixed: issue #277 (Surrender button no longer visible when won or lost) 2010-11-23 15:59:04 +13:00
Matthew Bowra-Dean
b3c4afa620 Bring Makefile up to date. 2010-11-23 15:59:04 +13:00
Paul Chote
8df1813afd Rework the makefile. 2010-11-23 15:59:04 +13:00
Paul Chote
6a28bcb49a GL Renderer: Print available extensions on error and test for vbos. 2010-11-23 15:59:04 +13:00
Chris Forbes
730ed8c597 finished removing ctors from Order 2010-11-23 15:33:15 +13:00
Chris Forbes
7b5be4a0ec remove more ctors 2010-11-23 15:30:21 +13:00
Chris Forbes
30fb1250b3 remove some stupid duplication in HackyAI 2010-11-23 15:27:27 +13:00
Chris Forbes
a363bf841c remove some dead code 2010-11-23 15:25:10 +13:00
Chris Forbes
da5830845b remove another ctor 2010-11-23 15:24:45 +13:00
Chris Forbes
23e6eada26 another ctor removed 2010-11-23 15:20:11 +13:00
Chris Forbes
490b0801a0 start removing weird ctors on Order 2010-11-23 15:14:48 +13:00
Chris Forbes
49ab704a84 add ctor & readonlys for required args 2010-11-23 14:04:39 +13:00
Chris Forbes
4a12b78f14 experiment -- _Order is a mutable builder-object for Order, implicitly convertible 2010-11-23 13:59:43 +13:00
Chris Forbes
656dbdcd28 add Order.ExtraLocation as a second int2 parameter 2010-11-23 13:56:04 +13:00
Chris Forbes
88398afba6 symmetry between reading and writing int2 2010-11-23 13:06:37 +13:00
Chris Forbes
2f74207bf6 tighten order encoding 2010-11-23 12:58:59 +13:00
Chris Forbes
f4f9abe4d4 import 'A Path Beyond' from original RA 2010-11-22 08:21:22 +13:00
Matthew Bowra-Dean
e50b8ec7dc Added Gecko to AUTHORS 2010-11-21 23:11:22 +13:00
Chris Forbes
70f92494b2 fixed player setup for koth-crossroads 2010-11-21 22:10:43 +13:00
Matthew Bowra-Dean
c07fee3b3b More fixes for upload scripts. 2010-11-21 20:25:50 +13:00
Matthew Bowra-Dean
07b635672e Fix upload-all.sh subscript calling. 2010-11-21 20:07:48 +13:00
Matthew Bowra-Dean
edc4c7ab2b +x on upload-all.sh 2010-11-21 19:59:57 +13:00
Matthew Bowra-Dean
6edcc36f17 Fixed upload scripts. 2010-11-21 19:51:50 +13:00
Matthew Bowra-Dean
3a2a6c231e checkout-and-build script updated. 2010-11-21 18:28:30 +13:00
Chris Forbes
cf26e4aa8a improve appearance of smoketrails 2010-11-21 18:28:29 +13:00
Paul Chote
8ca1da8828 Remove Cg dep from linux packages 2010-11-21 13:30:48 +13:00
Paul Chote
5764bc1c1c Tweak the packaging scripts. Add a starting point for the uploader. 2010-11-21 13:10:22 +13:00
Paul Chote
dba7335594 Fix a pile of compiler warnings. 2010-11-21 13:10:22 +13:00
Paul Chote
1461309dba Use the Gl renderer by default on all platforms. 2010-11-21 13:10:22 +13:00
Paul Chote
d7e8388600 Make our IFolder zip support actually work. 2010-11-21 13:10:22 +13:00
Paul Chote
e79d039aa0 Add an install from cd option for cnc. Remove music install options. 2010-11-21 13:10:21 +13:00
Paul Chote
3d8b3efb9e Don't die when installing over an existing set of packages 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
58367fdeac Fixed a case where package downloading erroring out will hang the Utility app. 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
63d54952d0 Downloading packages now shows progress to the user. Utility app no longer immediately exits after downloading packages. 2010-11-21 13:10:21 +13:00
Paul Chote
5904563653 Fix packaging scripts (OpenRA.Utility wasn't built, and SharpZipLib wasn't included). 2010-11-21 13:10:21 +13:00
Paul Chote
5d0b750a64 Hack to allow temp download dir to be specified relative to home dir. 2010-11-21 13:10:21 +13:00
Paul Chote
43e99631a8 Build all renderers on make game 2010-11-21 13:10:21 +13:00
Paul Chote
8cd6d60839 Rewrite the download status over the same console line. May break the windows launcher (which doesn't run under osx, so can't test). 2010-11-21 13:10:21 +13:00
Paul Chote
047d012fff Fix broken dependencies in the Makefile. 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
0064543989 Allow building of Winforms launcher with Mono 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
b61b7b5431 Only modify pipe ACL when running as admin 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
0c319e88c3 Utility now uses named pipe if passed --pipe. Installing mods now works properly too. 2010-11-21 13:10:21 +13:00
Matthew Bowra-Dean
da384af339 Refactoring of OpenRA.Utility. Whole lot of work on OpenRA.Launcher
Mod configuration dialog now fully functional, launch button also works.
2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
f98f3d0b39 Mod tree in configure mods dialog. 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
439c366ba2 Winforms launcher beginnings. 2010-11-21 13:10:20 +13:00
Matthew
d93c42e89c added another function to the Utility app. 2010-11-21 13:10:20 +13:00
Matthew
850d26a628 Install RA packages from CD. Fixes bug in case-sensitive filesystems for Folder.cs. 2010-11-21 13:10:20 +13:00
Matthew
c3e79405f7 Make sure mod package dir exists before extraction. 2010-11-21 13:10:20 +13:00
Paul Chote
03b23d88d2 Make the OSX packaged build use the Gl renderer. 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
d5d6cea84c More Windows installer fixes 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
fb173af647 Fixed Windows installer file list. 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
a1bc31883b Changed shaders dir to renderer specific shader dirs in file list. 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
52854c77c2 Added new files to packages, made RPM script auto-generate its file list 2010-11-21 13:10:20 +13:00
Matthew
8f58e41304 Fixed pkgbuild and reimplemented RPM scripts. 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
25525b4155 Fixed PKGBUILD 2010-11-21 13:10:20 +13:00
Matthew Bowra-Dean
66cc0bd8ff Made debian package to architecture independent. Brought arch package up to date. 2010-11-21 13:10:19 +13:00
Paul Chote
01c6127545 Remove gacutil steps from rpm and pkgbuild 2010-11-21 13:10:19 +13:00
Paul Chote
2794e1f62d Actually remove the mdb files, and simplify calling syntax 2010-11-21 13:10:19 +13:00
Paul Chote
83c9e9e6dd A few fixes when running package scripts under debian. 2010-11-21 13:10:19 +13:00
Paul Chote
39742d02bb Produce a windows installer (untested). 2010-11-21 13:10:19 +13:00
Paul Chote
f1b68a5207 Begin rework of packaging scripts. Restructure packaging system, and make osx and debian packages work.
Changed semantics:
- package upload is handled by a separate script
- dropped syntax highlighting (unnecessary, and had concurrency issues)
- `make install' is no longer used in the packaging process
- debian package changelog points to the forum, instead of showing out of date info
- debian package ships tao dlls in the game root, and doesn't insert them in the gac
- debian package refers users to the website for help manually installing packages
2010-11-21 13:10:19 +13:00
Paul Chote
493631cd90 Switch to the ARB apis and add capability and compile/link status checking. 2010-11-21 13:10:19 +13:00
Matthew Bowra-Dean
9a1ce6945b Make OpenRA.Renderer.Gl compile into the right place with VS. 2010-11-21 13:10:19 +13:00
Paul Chote
ccf66cde2f Expose Graphics.Renderer setting; Refactor Renderer.Null. 2010-11-21 13:10:19 +13:00
Paul Chote
233e9326f0 Cleanup some cruft. 2010-11-21 13:10:19 +13:00
Bob
ba97c99f98 assign texunits to samplers, instead of (wrongly) using unitid==textureid 2010-11-21 13:10:19 +13:00
Paul Chote
37edd072a6 shp shaders 2010-11-21 13:10:18 +13:00
Paul Chote
00358e9fe8 Working line shader 2010-11-21 13:10:18 +13:00
Paul Chote
888710cbc5 Enable alpha blending 2010-11-21 13:10:18 +13:00
Paul Chote
518e00c78a Fix setting uniforms; chrome-rgba shader works, but lacks alpha blending. 2010-11-21 13:10:18 +13:00
Paul Chote
f2a20a182e Begin work on the glsl renderer. Renders blue blocks for chrome-rgba. 2010-11-21 13:10:18 +13:00
Paul Chote
a058eb06b2 Duplicate the Cg renderer as a base for the glsl renderer. 2010-11-21 13:10:18 +13:00
Paul Chote
64a7592fed Rename OpenRA.Gl -> OpenRA.Renderer.Cg 2010-11-21 13:10:18 +13:00
Paul Chote
bfb076b9bc Refactor IShader to take a name instead of a stream. 2010-11-21 13:10:18 +13:00
Chris Forbes
5292272902 #186 unlimited power devhack 2010-11-21 12:36:18 +13:00
Chris Forbes
1db3ce4b59 some usings cleanup 2010-11-21 12:25:22 +13:00
Chris Forbes
060d544390 add smoke trails for damaged aircraft 2010-11-21 11:48:09 +13:00
Chris Forbes
b0e3364a77 make unit smoke optional 2010-11-21 11:28:16 +13:00
Chris Forbes
d78dde4db1 fix ModData still being bogus about custom sequences 2010-11-21 11:26:22 +13:00
Chris Forbes
a94b2df865 #361 weap doesnt play sell animation correctly -- fixed 2010-11-21 11:14:36 +13:00
Chris Forbes
e4bb788fb9 #366 only host can see AI players in a lobby -- fixed 2010-11-21 11:11:29 +13:00
Chris Forbes
6dcc401342 add missing EditorAppearance for trees & cnc rocks 2010-11-21 10:59:36 +13:00
Chris Forbes
26a7e06b40 finish initial work on koth-crossroads 2010-11-21 10:59:35 +13:00
Chris Forbes
2ba8120d79 WiP KoTH map 'crossroads' 2010-11-21 10:59:35 +13:00
geckosoft
b9b045098b Changed: People can no longer build structures near the strategic point, once they captured it, without having a regular structure near. 2010-11-21 10:59:35 +13:00
geckosoft
a0682d80c0 Fixed: koth-island-hoppers (map) now correctly sets MustBeClear 2010-11-21 10:59:34 +13:00
geckosoft
1ff39761b7 Fixed: Bug in StrategicProgressWidget.FindFirstWinningPlayer 2010-11-21 10:59:34 +13:00
geckosoft
bddd058b38 Changed: Rules for the koth map (need to hold it for 2 seconds, both poins, and it gets reset if the hold is broken) 2010-11-21 10:59:33 +13:00
geckosoft
8efb717cf4 Changed: Cleaned up the StrategicProgressWidget a bit 2010-11-21 10:59:33 +13:00
geckosoft
65ac607d90 Fixed: ProximityCaptureable now allows allies nearby 2010-11-21 10:59:33 +13:00
geckosoft
0af653b101 Changed: KotH Island Hoppers (map) should be working now! victory after holding it for 5 minutes. 2010-11-21 10:59:32 +13:00
geckosoft
175b07c0ff Added: StrategicProgressWidget to show the capturing progress (including custom gfx)
Fixed: Sync on unsyncable field type
Added: StrategicProgressWidget to both cnc & ra
2010-11-21 10:59:32 +13:00
geckosoft
585cba8af8 Added: StrategicVictoryConditions & StrategicPoint => allows 'koth' gameplay if used 2010-11-21 10:59:32 +13:00
geckosoft
2a7525122e Changed: Made ConquestVictoryConditions public (same for Surrender / Win methods) 2010-11-21 10:59:31 +13:00
geckosoft
7f7c293856 Added: Island Hoppers KoTH map (wip, not done yet) 2010-11-21 10:59:31 +13:00
geckosoft
fbb117705e Changed: Owner maps to Self.Owner now IF captured, otherwise returns the OriginalOwner 2010-11-21 10:59:30 +13:00
geckosoft
78dea9eecb Added: ProximityCaptureable 2010-11-21 10:59:30 +13:00
geckosoft
be9f52e029 Changed: Mounts the map' IFolder with least possible priority, allowing the map to has its own assets 2010-11-21 10:59:26 +13:00
geckosoft
000dd6de7b ed: Made it possible for maps to define custom & override existing voices 2010-11-21 10:57:36 +13:00
geckosoft
5e8e4dd9d5 Changed: Made it possible for maps to define custom & override existing weapons 2010-11-21 10:57:36 +13:00
geckosoft
b31a35d34b Changed: Made it possible for maps to contain custom sequences (allowing 100% custom map-specific units to be 'build') 2010-11-21 10:57:16 +13:00
Matthew Bowra-Dean
414b3a03c3 Updated docs. 2010-11-18 17:47:24 +13:00
Bob
a7f42dcf0c fix interaction between autoattack and idleanimation 2010-11-16 20:32:00 +13:00
Chris Forbes
7bd7f4e56b remove bogus AttackMoveInteraction trait from cnc 2010-11-15 20:03:49 +13:00
Chris Forbes
9584c78500 hack around ICE in gmcs-2.6.7; feature wasn't used anyway 2010-11-15 19:59:07 +13:00
Chris Forbes
bc7a9c14d0 fix helicopters landing in silly places 2010-11-14 21:27:17 +13:00
Chris Forbes
c1eacc225d fix DrawLineToTarget drawing from the ground below flying units 2010-11-14 21:27:17 +13:00
Chris Forbes
e56bbe367d add missing WorldCommand trait to cnc 2010-11-14 21:27:16 +13:00
Bob
6cf9939ab3 remove staticness on Server 2010-11-14 21:26:50 +13:00
Bob
b2f3b8f2af make AutoTarget use an activity. add AutoTarget to teslatank 2010-11-14 19:44:58 +13:00
Bob
80e897abfb add Util.RunActivity, and have Actor.Tick use it. fix medic autoheal 2010-11-14 18:36:36 +13:00
Bob
d152d21338 fix teslazap OutOfMemory exception 2010-11-14 17:32:23 +13:00
Bob
f4e04ece12 fix tesla animations and firing at multiple targets 2010-11-14 16:35:53 +13:00
Bob
e7a07ea9c3 Add target param to INotifyAttack. Remove target field from AttackOmni 2010-11-14 16:03:01 +13:00
Bob
f8e6245903 make order queuing work for buildings and turreted units, too 2010-11-14 15:48:02 +13:00
geckosoft
7c146a9d5d Changed: Made "Move" orders queueable 2010-11-13 17:54:16 +13:00
geckosoft
846286c988 Added: QueuedActivity (to be used for chaining orders) 2010-11-13 17:53:00 +13:00
geckosoft
ba25bc6df4 Added: More constructor overloads for Order (accepting a queued boolean now)
Added: Changed all IssueOrders to make use of the IOrderTargeter.IsQueued
Added: A 'hack' for SetChronoTankDestination so it also sets the queued value
2010-11-13 17:52:48 +13:00
geckosoft
622f9bfe71 Added: forceQueue to IOrderTarget' CanTargetUnit / CanTargetLocation
Added: forceQueue to all related methods
Added: Only shows the select cursor IF hovering over a unit AND the orders return the 'default' icon
2010-11-13 17:46:36 +13:00
geckosoft
8df47f5a60 Added: UnitStanceDefensive 2010-11-13 17:44:45 +13:00
geckosoft
d2a0647085 Added: OnOrder & OnTick event at UnitStance 2010-11-13 17:43:55 +13:00
geckosoft
0e750a3f25 Cleanup: Idle activity now reuses itself instead of returning null (causing another Idle object to be created) 2010-11-13 17:43:41 +13:00
geckosoft
0e6dbe28a8 Changed: Renamed UnitStanceGuard => UnitStanceHoldGround 2010-11-13 17:43:09 +13:00
geckosoft
cc0c45bceb Removed: Reference to AttackMoveInteraction.cs from the project 2010-11-13 17:42:55 +13:00
geckosoft
af3e734561 Changed: HackyAI uses AttackMove now instead of Move 2010-11-13 17:42:14 +13:00
geckosoft
1ac61c5e3e Changed: AttackMove actually works 2010-11-13 17:40:38 +13:00
geckosoft
5d3622b79d Removed: Unused AttackMoveInteraction 2010-11-13 17:39:58 +13:00
geckosoft
b3ddf1ae86 Changed: Rendering of the colored shape (adds a shadow + resizes the shape on larger actors) 2010-11-13 17:39:34 +13:00
geckosoft
17770631a2 Added: Rendering of 'SelectionColor'ed shapes at top left of the selection rectangle (using a simple format to define shapes) 2010-11-13 17:38:47 +13:00
geckosoft
05f6958286 Changed: From running on the local player, to running on all players 2010-11-13 17:38:41 +13:00
geckosoft
bd9c748b17 Fixed: SurrenderOnDisconnect (needs testing 2010-11-13 17:33:16 +13:00
geckosoft
6b40abb58c Implemented: Stances
Added: Basic stances (Aggressive, Guard (Hold Ground), Hold Fire, None (dummy), Return Fire)
Added: WorldCommandWidget (to be able to set said stances)
Added: WorldCommandWidget to ra (cnc will follow, later on)
Changed: Added support to AttackBase for firing with movement disabled + utility method ScanForTarget (used by stances)
Added: AssignUnitStance (attach this to unit-producing actors, together with what stances can be picked as 'default')
2010-11-13 17:26:42 +13:00
geckosoft
6d67ab2240 Changed: Attack-move now only triggers when you use 'a' without any modifier 2010-11-13 17:08:46 +13:00
geckosoft
8b3512e2f1 Changed: Build palette hotkeys cannot be triggered anymore when used together with a modifier 2010-11-13 17:08:30 +13:00
geckosoft
5b71bee4c8 Added: ISelectionColorModifier 2010-11-13 17:08:00 +13:00
Bob
75e7124af0 oops 2010-11-13 17:07:48 +13:00
geckosoft
9ad55d5e28 Changed: AttackMoveInteraction now uses a + the 'right' mouse button to do an attack-move (extra nice thing => it wont lose focus of the selected units!) 2010-11-13 17:04:27 +13:00
geckosoft
9e93edf336 Changed: Made GenericSelectTarget & GenericSelectTargetWithBuilding more generic (now it accepts an optional 'expected' mouse button) default => left (as it was hardcoded) 2010-11-13 17:03:24 +13:00
geckosoft
5608756a24 Moved: AutoAttack key handling out of core => RA
Added: AttackMoveInteraction to RA & CNC rules
2010-11-13 17:02:48 +13:00
geckosoft
ebca421856 Moved: BaseBuilding out of core => RA
Implemented: INotifyKeyPress for World traits (to respond on key pressed)
Moved: GotoNextBase (backspace key) out of core => RA
Added: GotoNextBase trait to both RA & CNC
2010-11-13 17:01:35 +13:00
Bob
22e61a5700 refactor QueueAttack -> GetAttackActivity 2010-11-13 16:42:13 +13:00
Bob
7306de3730 make attacks queuable 2010-11-13 15:53:10 +13:00
Bob
10ed3db71d made all orders queuable 2010-11-13 15:53:08 +13:00
Bob
04e05d9aed remove the default impl of QueueAttack; implement it in AttackFrontal and AttackLeap 2010-11-13 14:59:33 +13:00
Chris Forbes
caae95f12e make Server.Server public so it works. 2010-11-10 11:34:37 +13:00
Paul Chote
dfa14f16d3 Move ServerTraits into Mods. 2010-11-10 10:30:26 +13:00
Paul Chote
8e007131c9 Define ServerTraits in mod.yaml 2010-11-10 10:30:26 +13:00
Paul Chote
ed4c588701 Allow custom commands to be parsed when the player is in a ready state. 2010-11-10 10:30:26 +13:00
Paul Chote
d33806e932 More refactoring 2010-11-10 10:30:25 +13:00
Paul Chote
e83838e9ff Pass the client into InterpretCommand 2010-11-10 10:30:25 +13:00
Paul Chote
b77dcd476c Pull the master server communication into a ServerTrait 2010-11-10 10:30:25 +13:00
Paul Chote
836b3a598b Pull out potentially mod-specific player join code (slightly bogus, will fix properly later) 2010-11-10 10:30:25 +13:00
Paul Chote
967b16fc0e Pull LoadMap out of the server 2010-11-10 10:30:25 +13:00
Paul Chote
ee3437d0f6 Pull the traits into their own files 2010-11-10 10:30:25 +13:00
Paul Chote
e20c736e3f Handle server orders in their own traits - needs further refactoring 2010-11-10 10:30:25 +13:00
Paul Chote
a98d20ea72 Start hacking on a server traits model 2010-11-10 10:30:25 +13:00
Paul Chote
38486e8184 Move some mod-specific UI code out of Game 2010-11-10 10:30:25 +13:00
Paul Chote
047a09bbbd Excise previous server extensions code 2010-11-10 10:30:24 +13:00
Paul Chote
d55e58ea1c Map Tweaks: Remove algernon, remove hospital on chokepoint, fix broken water tiles on wargames. 2010-11-09 23:22:34 +13:00
Paul Chote
17afe80a54 Included attribution 2010-11-09 21:44:58 +13:00
Paul Chote
42bf568d80 Use Blast to decrypt data on extraction. 2010-11-09 21:17:09 +13:00
Paul Chote
50157c43de Port Blast from zlib/contribute to c# 2010-11-09 20:10:51 +13:00
Paul Chote
41988a1298 Save PackageEntries into the index so the compressed data can be extracted. 2010-11-09 14:33:02 +13:00
Paul Chote
86058ec19f Initial IFolder Installshield (.Z) package impl. Parses the package header/toc and prints a file list. 2010-11-09 13:29:37 +13:00
Paul Chote
356c750b23 Refactor Package -> MixFile; group filesystem related classes in FileFormats. 2010-11-09 11:02:13 +13:00
Bob
26cbb9d9c6 fix wrong output in Order.ToString 2010-11-07 21:17:11 +13:00
Chris Forbes
4a0b78c1e6 make all other engine widgets public, for Gecko 2010-11-07 17:16:51 +13:00
Bob
fcb7c845ba adjust Mobile so that it also can't double-add to uim 2010-11-07 17:16:17 +13:00
Bob
12f9c0bce9 fix uim-crate crash 2010-11-07 17:16:14 +13:00
Bob
47ed79b912 rename some of Mobile's Activity-builders 2010-11-07 17:16:11 +13:00
Chris Forbes
a265d11a5f make JoinServer public [at Gecko's request] 2010-11-07 08:41:16 +13:00
Bob
8a96c5f7b5 fix infantry entering buildings 2010-11-06 22:27:28 +13:00
Chris Forbes
5e5456191c fix missing assembly reference FileFormats -> System.Windows.Forms in makefile 2010-11-06 20:33:12 +13:00
Chris Forbes
aae7f56e7d extend RevealMapCrateAction to optionally reveal for allies 2010-11-06 20:18:18 +13:00
Chris Forbes
3645b3ee13 increase ParaBomb spread 3 -> 6 2010-11-06 20:02:01 +13:00
Chris Forbes
e0f357390c clean up usings in AirstrikePower 2010-11-06 19:58:41 +13:00
Chris Forbes
9c3cb62838 reduce redeye damage 50 -> 40 2010-11-06 19:55:53 +13:00
Chris Forbes
14225b8e79 reduce dragon damage from 60 to 50 2010-11-06 19:55:10 +13:00
Chris Forbes
e01bf735d9 reduce cooldown on Chronoshift and Invulnerability to 2min each; reduce invuln duration to 30 seconds 2010-11-06 19:51:57 +13:00
Chris Forbes
1904f8ced1 fix weap door never closing 2010-11-06 17:47:11 +13:00
Caleb Anderson
3caca8c323 some noise on shellmap 2010-11-06 17:00:36 +13:00
Chris Forbes
dd7ce2d45e fix dumb crash in UIM 2010-11-06 16:56:50 +13:00
geckosoft
f793f4548b Added: A PasswordField widget (based on the TextField widget) 2010-11-06 16:49:46 +13:00
Chris Forbes
56675a61f5 rationalize the mess of Sound.Play[ToPlayer] functions. 2010-11-06 16:49:08 +13:00
Bob
3dd27fcb77 fix crash involving crushing and dead walls 2010-11-06 16:35:51 +13:00
Chris Forbes
13d76f8e9c removed editor -> ra dep; added EditorAppearance for inconvenient bits that the editor must have _some_ understanding of, but can't see 2010-11-06 15:10:29 +13:00
Bob
9a2cdcde11 move Selectable.Radius into Health 2010-11-06 14:35:26 +13:00
Bob
155e7320cb add support for decimal to fieldLoader. use decimal for speedmodifiers 2010-11-06 14:10:56 +13:00
Chris Forbes
750fd84494 reinstate order validation for ra & cnc 2010-11-06 13:36:53 +13:00
Bob
924adc68a9 fix aircraft desync 2010-11-06 13:36:11 +13:00
Bob
0f8d9d7fb3 fix heli repusion from grounded helis. cleanup flight code 2010-11-06 12:44:25 +13:00
Bob
801aa1156f move aircraft code into Mods.RA/Air/ 2010-11-06 12:18:04 +13:00
Bob
aa0c14c214 Fix crash when generating a syncreport when blaming something other than Tick. 2010-11-06 12:08:33 +13:00
Bob
8fcbb670d8 rename AllowOreAt => AllowResourceAt 2010-11-06 11:53:41 +13:00
Bob
85a26ecdf7 fix invincible aircraft, infantry 2010-11-06 11:06:12 +13:00
Bob
480c5edd75 move Building et al into Mods/ 2010-11-06 11:05:45 +13:00
Bob
fdfa1ddf97 extract DrawGrid from DrawBuildingGrid 2010-11-05 19:50:18 +13:00
Bob
80caf1818b fix off-by-one in IsInRange. use CenterLocation in combat code where appropriate 2010-11-05 19:50:17 +13:00
Bob
5c0cd50797 remove unnecessary parameters from Aircraft.MovementSpeedForCell, and rename to MovementSpeed 2010-11-05 19:50:17 +13:00
Bob
8129d5d7dc use CenterLocation, not Location, to determine facing during attack 2010-11-05 19:50:17 +13:00
Bob
a77b7af5fd add Target overload for IsInRange 2010-11-05 19:50:16 +13:00
Bob
ecf41722c3 rename TargetableSquares -> TargetableCells 2010-11-05 19:50:16 +13:00
Bob
39b09780f6 refactor Targetable into Targetable{Unit,Building} and ITargetable 2010-11-05 19:50:15 +13:00
Bob
98dec6dc8e revert sanity check that building is entirely within map (trees break it) 2010-11-05 19:50:15 +13:00
Bob
50b1ba3acc attack if in range of any cell of a building 2010-11-05 19:50:15 +13:00
Bob
c3fc7b98f3 use UIM (was BIM) to determine what cells a building blocks 2010-11-05 19:50:14 +13:00
geckosoft
f5b8b18d86 Core: Added trait 'SurrenderOnDisconnect' and the core changes required to make this work 2010-11-05 19:48:32 +13:00
geckosoft
e7c61fac5c Core: Added the attacker to IDamageModifier' GetDamageModifier 2010-11-05 19:48:31 +13:00
geckosoft
2640603f6c Added 'Health' and 'PreviousHealth' to the AttackInfo (so we can know how many 'real' damage is done!) 2010-11-05 19:48:31 +13:00
Chris Forbes
1a011276bf (gecko) add more overloads for Renderable, to support scaling 2010-11-05 19:48:31 +13:00
Chris Forbes
bc7cf09287 (gecko) Add support for custom order generators 2010-11-05 19:48:30 +13:00
Chris Forbes
7762241653 (gecko) Send damage notifications to the owner's player actor too. 2010-11-05 19:48:30 +13:00
geckosoft
9489196911 Added a new trait : Scale 2010-11-05 19:48:29 +13:00
Chris Forbes
e32e060d37 (gecko) make production queue content accessible to mod code 2010-11-05 19:48:29 +13:00
Chris Forbes
5e3fce6820 (gecko) Return the ISound when playing sounds, so you can stop it later 2010-11-05 19:48:28 +13:00
Chris Forbes
6655b6ba6a (gecko) make IonCannon and NukeLaunch effects public 2010-11-05 19:48:28 +13:00
Chris Forbes
0b4b003c10 (gecko) Make Parachute public so it can be used in other mods 2010-11-05 19:48:27 +13:00
geckosoft
380e7e8b20 Core: Made stuff public so people (read: openrg) can have its own lobby, based on the core lobby 2010-11-05 19:48:27 +13:00
geckosoft
9b3533abc0 Core: Made Corpse public 2010-11-05 19:48:27 +13:00
Chris Forbes
1409016cbd (gecko) Allow mods to override order validation 2010-11-05 19:48:26 +13:00
Chris Forbes
4aa1fb4b86 refactor mouse position label hooking for Surface 2010-11-02 11:16:30 +13:00
Chris Forbes
40126c52e8 render actors using correct palettes in editor 2010-11-02 10:30:22 +13:00
Chris Forbes
dd600d4590 indent, etc 2010-11-02 09:50:58 +13:00
Chris Forbes
532f420338 build 8bpp bitmaps in OpenRA.Editor 2010-11-02 09:39:35 +13:00
Chris Forbes
e25878e78d ai: dont build defenses if in low power; dont build random stuff if no power-producing item is available on the same queue 2010-11-02 07:51:07 +13:00
Chris Forbes
002cc4842a start reducing duplication in HackyAI 2010-11-02 07:27:31 +13:00
Chris Forbes
eac548ac8b disable bot debug by default 2010-11-01 20:38:28 +13:00
Chris Forbes
3fc4d1b219 fix cnc crashing on startup 2010-11-01 20:31:12 +13:00
Chris Forbes
80e3b8be0d more cleanups 2010-11-01 20:28:28 +13:00
Chris Forbes
fa35f6caa4 cleanups 2010-11-01 20:25:03 +13:00
Chris Forbes
526cf6059a remove Misc.cs; put its contents in sensible places. 2010-11-01 20:15:32 +13:00
Caleb Anderson
1527e472b6 potential fix for bug 312 : PlaceBuilding.ResolveOrder does not validate the requested build location 2010-11-01 18:42:51 +13:00
Bob
94f7c6db97 determine which sprites to render during Render, not Tick 2010-11-01 18:39:50 +13:00
Bob
e3ddb8f757 cache world.LocalPlayer instead of fetching it repeatedly within loops 2010-11-01 18:39:44 +13:00
Chris Forbes
d7d0d371c6 (bob) refactor input dispatch; remove public Dispatch*Input from game; (chris) fix build failures due to rebase past gecko 2010-11-01 18:39:37 +13:00
Chris Forbes
527c60daa7 some cleanup on gecko's stuff 2010-11-01 18:34:44 +13:00
geckosoft
c30050396a Fixed: Possible crash 2010-11-01 17:55:33 +13:00
geckosoft
60a8acf4d4 Added: Another hook for server extensions 2010-11-01 17:55:32 +13:00
geckosoft
5164c3cd7d Hack: Changed the ChooseFreePlayerIndex (hack on its own..) to loop till 256 instead of 8 (ie increasing max player support to 256) 2010-11-01 17:55:32 +13:00
geckosoft
6276e659cd Fixed: A crash when the host disconnects 2010-11-01 17:55:31 +13:00
geckosoft
298314626e Added: Dedicated server support
Added: The ability to not render anything when using the client as a dedicated server
Added: The basic server extension (NullServerExtension)
Exposed: Made some fields public, so that the server extension can access it
2010-11-01 17:55:31 +13:00
geckosoft
0112bc4df7 Added : Some missing changes to make WorldGameOver work (ie missing RejoinLobby etc)
Warning: Please add the following manually (if you cant find it):
	in Game.cs
		find
			'case ConnectionState.Connected:'
		add
			if (ConnectedToLobby != null) ConnectedToLobby();

Tried my best to add it in the patch but it failed :(
2010-11-01 17:55:31 +13:00
geckosoft
c8dbed938a Enable: WorldGameOver at the 'ra' mod (ie after 10 second delay, it'll return all players to the lobby) 2010-11-01 17:55:30 +13:00
geckosoft
278f35e4aa Added: If the 'Owner' ('who' said something) @ chat is null or "" it'll just render the text 2010-11-01 17:55:30 +13:00
geckosoft
dd38e45f2e Added: Lobby server command "spectator" - will attempt to put the player in an available spectator slot 2010-11-01 17:55:29 +13:00
geckosoft
3e08f9b1b1 Added: LocalAssemblies / LocalRules to Manifest.cs (can be used to add a custom set of rules / assemblies to be loaded, other than the ones defined in the mod) 2010-11-01 17:55:29 +13:00
geckosoft
8392a44314 Added: Support for not-synced traits (ITraitNotSynced) 2010-11-01 17:55:28 +13:00
geckosoft
d050d1a4b9 Added : OpenRA.Renderer.Null 2010-11-01 03:50:21 +01:00
geckosoft
56598ce2ff Fixed: crash when starting a new game after disconnecting from own server 2010-11-01 03:46:38 +01:00
geckosoft
2fb72155eb Added: Missing IngameObserverChromeDelegate.cs file (for spectator)
Fixed: Some spectator gui issues (@ gamelobby.yaml / LobbyDelegate.cs)
2010-11-01 03:35:55 +01:00
geckosoft
030bd4b28d Core: Added basic support for Spectators
TODO: Someone modify the files for cnc (chrome / rules)
2010-10-31 04:03:31 +01:00
Matthew Bowra-Dean
b9c40ad3ce Cleanup
Removed OpenRAUploader (long since obsolete) and master server hack from master server upgrade.
2010-10-28 23:03:14 +13:00
Matthew Bowra-Dean
4490a90332 Changed IFolder implementations' priorities to be based on listing order in mod.yaml 2010-10-28 22:21:54 +13:00
Matthew
15d6facdb9 Fix crash in WorldInteractionControllerWidget. 2010-10-25 17:14:14 +13:00
Chris Forbes
b80962b365 fix ore/tib growth -- we can always grow in a cell that already contains our resource type. buildable/terraintype checks only come into it when growing into *new* cells 2010-10-25 11:34:31 +13:00
Chris Forbes
814c6a8713 aircraft crash nicely now 2010-10-25 11:34:30 +13:00
Chris Forbes
eea89c1d33 make FallsToEarth significantly more flexible 2010-10-25 11:34:29 +13:00
Chris Forbes
9ec0367ecb add support for an explosion on aircraft falling out of the sky 2010-10-25 11:34:28 +13:00
Bob
f5fe1013ee remove AttackDefault; use AttackFrontal instead 2010-10-25 09:51:14 +13:00
Bob
c338d28d35 fix 'decided on Attack but ordered Heal' message on medic 2010-10-25 09:14:49 +13:00
Chris Forbes
2f962452e5 fix compile failure in prev 2010-10-25 09:14:22 +13:00
Bob
10f5e68f7f fix #166 (shroud artifacting at bounds) 2010-10-25 09:06:23 +13:00
Chris Forbes
1cde37f32b update cnc to work with updated engine (AttackBase -> AttackDefault) 2010-10-25 08:45:49 +13:00
Chris Forbes
291899de8a glitch-free. 2010-10-25 08:32:14 +13:00
Caleb Anderson
cc70669f1a use player color option 2010-10-25 08:29:55 +13:00
Caleb Anderson
c568dfa486 Contrail trait 2010-10-25 08:29:54 +13:00
Caleb Anderson
ff7daf8727 MoveViewport takes a float to allow for smoother panning. Added more scripting to shellmap 2010-10-25 08:16:08 +13:00
Caleb Anderson
fc72066ed2 Fixing last mouse position commit :( 2010-10-25 08:16:08 +13:00
Caleb Anderson
253ccd6d9b Status bar with mouse position in editor 2010-10-25 08:16:07 +13:00
Bob
01accaeb38 fix cargo 2010-10-25 08:03:13 +13:00
Bob
46c3bc09a1 fix harv bug in c&c 2010-10-25 08:03:12 +13:00
Bob
2f0b7566e5 partial fix for tsla 2010-10-25 08:03:12 +13:00
Bob
9b8ec714d2 add AutoTarget to v2 2010-10-25 08:03:11 +13:00
Bob
5d408fe3c7 make AttackMove use an activity 2010-10-25 08:03:11 +13:00
Bob
aa0b7bedf0 pass target to DoAttack 2010-10-25 08:03:10 +13:00
Bob
c5358f7c82 call DoAttack from activities instead of from Tick in AttackPlane/AttackHeli 2010-10-25 08:03:10 +13:00
Bob
158d6e5647 move CheckFire in Weapon 2010-10-25 08:03:09 +13:00
Bob
e091781104 use new AttackDefault trait instead of AttackBase; make AttackBase abstract 2010-10-25 08:03:09 +13:00
Bob
25582cb9f8 move CancelableActivity into its own file 2010-10-25 08:03:08 +13:00
Bob
fece294cc6 move RemoveSelf activity into Mods/ 2010-10-25 08:03:07 +13:00
Bob
c3501f68e3 move TurnActivity into Mods/ 2010-10-25 08:03:07 +13:00
Bob
c4ee5fbd41 add self param to OnCancel 2010-10-25 08:03:06 +13:00
Caleb Anderson
9a54074b1b motd failure avoidance 2010-10-23 21:27:36 +13:00
Chris Forbes
10e918c375 increase ftrk range 6 -> 8; spread 3 -> 5 2010-10-23 19:14:53 +13:00
Chris Forbes
bbcad99fa7 increase agun range 6 -> 10; increase zsu-23 spread 3 -> 5 2010-10-23 18:52:04 +13:00
Chris Forbes
c8198a1a1c reduce hind cost 2000 -> 1500 2010-10-23 18:52:03 +13:00
Chris Forbes
8d5241f419 reduce hpad cost 1500 -> 300; increase heli,hind cost 1200 -> 2000 2010-10-23 18:52:03 +13:00
Chris Forbes
448b681c5b reduce AFLD cost 1100 -> 300; increase YAK cost 800 -> 1000; increase MIG cost 1200 -> 2000 2010-10-23 18:52:02 +13:00
Chris Forbes
826f7a29b5 remove dead .mpr maps 2010-10-23 18:52:02 +13:00
Chris Forbes
0629b1e2d2 quick hack to fix aircraft fail in prev 2010-10-23 18:49:42 +13:00
Bob
0d9cf63dd2 move Mobile et al into Mods/ 2010-10-22 11:31:13 +13:00
Bob
6513bd5fe0 don't use Move directly 2010-10-22 11:10:32 +13:00
Bob
f933e3de3f fix entering buildings from the east or south 2010-10-22 10:20:34 +13:00
Bob
88a8d84153 use new Enter activity for engy, spy, c4 2010-10-21 20:58:07 +13:00
Bob
8e4f5da791 fix ironcurtain 2010-10-21 18:29:43 +13:00
Bob
a61d21e501 fix sync-checking in replays 2010-10-21 15:33:24 +13:00
Matthew Bowra-Dean
2bcf33661a Give folders higher priority than packages in FileSystem. Also fixes bug where folder contents were not being cached with the correct hash. 2010-10-21 07:44:26 +13:00
Matthew Bowra-Dean
f6df7a06f2 fixes #323 2010-10-21 07:43:52 +13:00
Bob
de92a2fc0c remove UIM-debug from settings (now in DeveloperMode trait) 2010-10-20 20:49:10 +13:00
Bob
6012f1d592 fix a water-walk bug 2010-10-20 20:39:18 +13:00
Chris Forbes
caf676dc33 fix client quits 2010-10-20 20:33:28 +13:00
Chris Forbes
e3ae1bec75 add Yellowstone II map 2010-10-19 21:04:00 +13:00
Chris Forbes
b98b517e35 add some decent 4p cnc maps 2010-10-19 19:25:05 +13:00
Chris Forbes
5d9f25eef5 add Slendermang's 'Into the River Below' C&C map 2010-10-18 18:54:16 +13:00
Chris Forbes
5bf69eb539 strip some dead crap from UnitOrders 2010-10-18 18:44:47 +13:00
Chris Forbes
09f7778294 fix bogus base-cycler 2010-10-18 18:07:08 +13:00
Bob
c8ec5f3579 fix sync 2010-10-17 13:38:16 +13:00
Chris Forbes
a54c7ecc18 reduce ra AFLD power requirement from 50 to 20 2010-10-17 12:34:21 +13:00
Chris Forbes
0064caf1f4 fix cnc missiles a bit; add trails to cnc sam missiles 2010-10-17 12:34:02 +13:00
Chris Forbes
fc2fbd4689 nerf v2 reload slightly (250 -> 280) 2010-10-17 12:27:49 +13:00
Chris Forbes
0f0793cde5 buff arty slightly 2010-10-17 12:27:12 +13:00
Chris Forbes
2fed6f61e9 fix version string showing up twice in bottom-right corner 2010-10-17 10:42:25 +13:00
Bob
3df310df6e halve bandwidth usage 2010-10-16 22:25:31 +13:00
Bob
c2b3a749ca change IConnection interface wrt sending 2010-10-16 21:05:14 +13:00
2205 changed files with 144654 additions and 76987 deletions

18
.gitignore vendored
View File

@@ -7,10 +7,11 @@ obj
*.suo
*.user
*.sln.cache
*.manifest
mods/*/*.dll
# Red Alert binary files
mods/*/packages/*.[mM][iI][xX]
# ReSharper crap
_ReSharper.*/
#binary stuff
/*.dll
@@ -21,6 +22,8 @@ mods/*/packages/*.[mM][iI][xX]
# backup files by various editors
*~
*.orig
\#*
.*.sw?
# dependency DLLs (different for every platform!)
cg.dll
cgGL.dll
@@ -31,8 +34,6 @@ cgGL.dll
*.pidb
*.userprefs
packaging/windows/*.exe
# osx crap
.DS_Store
@@ -44,6 +45,13 @@ packaging/osx/launcher/OpenRA.xcodeproj/*.mode1v3
temp.c
temp.o
temp.s
OpenRA.Launcher.Mac/build/
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.pbxuser
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.perspectivev3
OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
*.config
*.resources
# KDE crap
*.kate-swp
*.directory

22
.travis.yml Normal file
View File

@@ -0,0 +1,22 @@
# Travis-CI Build for OpenRA
# see travis-ci.org for details
# Mono/.NET are not officially supported. The following is a workaround.
language: c
# Make sure build dependencies are installed.
install:
- sudo apt-get install mono-gmcs cli-common-dev libgl1-mesa-dev libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libopenal-dev libalut-dev
# Run the build script which will automatically call RALint.
script:
- make all
# Only watch the development branch.
branches:
only:
- bleed
# Notify developers when needed.
notifications:
irc: "irc.freenode.net#openra"

63
AUTHORS
View File

@@ -1,10 +1,53 @@
AUTHORS
The OpenRA developers are:
* Chris Forbes
* Robert Pepperell
* Matthew Bowra-Dean
* Paul Chote
* Alli Witheford
* Joakim Lindberg
* Andrew Riedi
AUTHORS
The OpenRA developers are:
* Alli Witheford (alzeih)
* Caleb Anderson (RobotCaleb)
* Chris Forbes (chrisf)
* Curtis Shmyr (hamb)
* Daniel Hernandez (Mancano)
* Matthew Bowra-Dean (beedee)
* Mike Bundy (kehaar)
Also thanks to:
* Akseli Virtanen (RAGEQUIT)
* Andrew Riedi
* Barnaby Smith (mvi)
* Bellator
* Bugra Cuhadaroglu (BugraC)
* Christer Ulfsparre (Holloweye)
* Cody Brittain (Generalcamo)
* Daniel Derejvanik (Harisson)
* Danny (Dan9550)
* Erasmus Schroder (rasco)
* Igor Popov (ihptru)
* Iran
* James Dunne (jsd)
* Jeff Harris (jeff_1amstudios)
* Jes (-Jes-)
* Joakim Lindberg (booom3)
* JOo
* Kenny Hoxworth (hoxworth)
* Krishnakanth Mallik
* Kyrre Soerensen (zypres)
* Lawrence Wang
* Lesueur Benjamin (Valkirie)
* Mark Olson (markolson)
* Matthew Gatland (mgatland)
* Matthias Mailänder (Mailaender)
* Maarten Meuris (Nyerguds)
* Max Ugrumov (katzsmile)
* Max621
* Nukem
* Paolo Chiodi (paolochiodi)
* Paul Dovydaitis (pdovy)
* Psydev
* Raymond Martineau (mart0258)
* Riderr3
* Tim Mylemans (gecko)
* Tirili
* Vladimir Komarov (VrKomarov)
Past developers included:
* Paul Chote (pchote)
* Robert Pepperell (ytinasni)

1251
CHANGELOG Normal file

File diff suppressed because it is too large Load Diff

19
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,19 @@
# OpenRA Contributing Guidelines
## Bug reports
* Have you read the [FAQ](https://github.com/OpenRA/OpenRA/wiki/FAQ)?
* Add the appropriate log files on crashes.
* Please be specific on how to reproduce the problem.
## Patches
* [Coding standard](https://github.com/OpenRA/OpenRA/wiki/Coding-Standard)
* [Branches and Releases](https://github.com/OpenRA/OpenRA/wiki/Branches-and-Releases)
* [Licensing](http://www.gnu.org/licenses/quick-guide-gplv3.html)
Please `git rebase` to the latest revision of the bleed branch.
Don't forget to add youself to [AUTHORS](https://github.com/OpenRA/OpenRA/blob/bleed/AUTHORS).
While your pull-request is in review it will be helpful if you join [IRC](irc://chat.freenode.net/openra) to discuss the changes.

View File

@@ -1,52 +0,0 @@
using System;
using System.IO;
using OpenRA.FileFormats;
namespace FileExtractor
{
public class FileExtractor
{
int Length = 256;
public FileExtractor (string[] args)
{
if (args.Length != 2)
{
Console.WriteLine("usage: FileExtractor mod[,mod]* filename");
return;
}
var mods = args[0].Split(',');
var manifest = new Manifest(mods);
FileSystem.LoadFromManifest( manifest );
try
{
var readStream = FileSystem.Open(args[1]);
var writeStream = new FileStream(args[1], FileMode.OpenOrCreate, FileAccess.Write);
WriteOutFile(readStream, writeStream);
}
catch (FileNotFoundException)
{
Console.WriteLine(String.Format("No Such File {0}", args[1]));
}
}
void WriteOutFile (Stream readStream, Stream writeStream)
{
Byte[] buffer = new Byte[Length];
int bytesRead = readStream.Read(buffer,0,Length);
while( bytesRead > 0 )
{
writeStream.Write(buffer,0,bytesRead);
bytesRead = readStream.Read(buffer,0,Length);
}
readStream.Close();
writeStream.Close();
}
}
}

View File

@@ -1,43 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{210645C7-E99E-46B6-863E-E211AE6C7D70}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>FileExtractor</RootNamespace>
<AssemblyName>FileExtractor</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
<Name>OpenRA.FileFormats</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="FileExtractor.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,13 +0,0 @@
using System;
namespace FileExtractor
{
public class MainClass
{
public static void Main (string[] args)
{
new FileExtractor(args);
}
}
}

0
FreeSans.ttf Executable file → Normal file
View File

28
HACKING
View File

@@ -3,7 +3,7 @@ HACKING
There are n main sections to OpenRA: UI, Rendering, unit behaviour, ...
All units/structures/most things in the map are Actors. Actors contain a collection of traits.
Traits consist of an info class and a class that does stuff
Traits consist of an info class and a class that does stuff. There is one instance of the infoclass shared across all actors of the same type. Each actor gets its own instance of the trait class itself. Infoclasses are responsible for instantiating their corresponding trait class -- see ITraitInfo, and TraitInfo<T> for the trivial implementation of this. In some cases the trait class's constructor needs some args, in which case TraitInfo<T> can't be used. This is a limitation of C# generics.
Actor assembly is done via the mod's yaml files. A section exists for each actor type,
and within that section we list the traits the actor should have.
@@ -15,13 +15,10 @@ which are automatically loaded into the corresponding fields on the trait's ITra
as possible - all cross-trait references should be in terms of an interface from
TraitInterfaces.cs.
- Things an actor can be *doing* are represented as IActivity implementations.
Actor has a queue of these. There's a standard set of activities in
OpenRa.Game/Traits/Activities, and mods tend to define more as they need them. (RA
defines various special-infantry actions as activities).
- Things an actor can be *doing* are represented as Activity subclasses.
Actor has a queue of these. The standard set of activities are in OpenRA.Mods.RA/Activities. Ground vehicle movement is more complex, and has bits in OpenRA.Mods.RA/Move. Aircraft use different bits again, in OpenRA.Mods.RA/Air. There are some bits elsewhere for custom infantry behaviors, etc. In some cases, a trait or activity will maintain an internal subqueue of activities. This works exactly the same way as the actor's main activity queue -- its state is evolved by Util.RunActivity().
- Units offer orders they can perform (given context) through traits that implement IIssueOrder.
Every trait with this interface is given a chance to generate orders for the current context.
- Units offer orders they can perform (given context) through traits that implement IIssueOrder. There are two parts to this -- an Orders collection, which exposes IOrderTargeter objects, which describe orders that the actor *could* generate, and the rules for choosing which to perform when the "default action" button is pressed (RMB). The second part is IssueOrder() itself, which resolves an IOrderTargeter into an actual order object to be sent.
- For more complex things that require modal UI (like special abilities,
RA-style sell/repair buttons, etc) we have IOrderGenerator implementations. This can
@@ -52,36 +49,27 @@ containing art assets (typically .mix files), yaml files defining actor defintio
and ini files containing legacy information that have yet to be ported over to
the (relatively new) yaml system.
The unit artwork itself must be defined in a Sequences file (typically Sequences.xml;
check mod.yaml for a list of what the mod uses); the format is self explanatory. There is
also the SequenceEditor tool to make this easy.
The unit artwork itself must be defined in one or more sequences files. These are specified in the manifest. RA puts everything in mods/ra/sequences.yaml.
check mod.yaml for a list of what the mod uses); the format is self explanatory.
Chrome artwork is similarly defined in Chrome.xml. Chrome is already mod dependent. Sortof ;)
mod-dependent *behavior* would be nice too, not just skinning. This is a property of the traits
however; once we port UI into traits this will become a non-issue.
Rendering
OpenRa.Game/Chrome.cs is the user interface.
Three renderers (SpriteRenderer, LineRenderer, Rgba?Renderer) render most stuff. Don't forget
to flush the renderer (if you want to see anything).
UserSettings stores the data loaded from settings.ini (or defaults). Eventually we need to be
able to save values changed in game into settings.ini (not yet implemented)
Bugs: There is a list of known bugs and features at http://red-bull.ijw.co.nz:3690/OpenRA .
Bugs: There is a list of known bugs and features at http://bugs.open-ra.org/ .
We also have a website at http://www.open-ra.org/ .
Our IRC channel is #openra on irc.freenode.net .
As far as using git, get your own repository on github. You probably want to set up the gitbot
to spam irc when you make commits (its nice to know). Push your changes into your git
repository, and it will/might :P be merged into chrisforbes/OpenRA .
As far as using git, get your own repository on github. Push your changes into your git repository, and it will/might :P be merged into http://github.com/OpenRA/OpenRA .
See http://help.github.com/ for working with GitHub and see http://progit.org/ for working
with Git.
Other things we probably want to put in here:
- A guide on how to add a generic unit via yaml using existing traits
- and then introduce some element that requires a simple trait change.

165
INSTALL
View File

@@ -1,99 +1,66 @@
Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation. For more information,
see LICENSE.
To run OpenRA, several files are needed from the original game disks.
The required files for the Red Alert mod are:
EITHER:
* conquer.mix
* temperat.mix
* interior.mix
* snow.mix
* sounds.mix
* allies.mix
* russian.mix
OR:
* main.mix
AND:
* redalert.mix
These need to be copied into the mods/ra/packages/ directory.
The required files for the Command and Conquer mod are:
* cclocal.mix
* speech.mix
* conquer.mix
* sounds.mix
* tempicnh.mix
* temperat.mix
* winter.mix
* desert.mix
These need to be copied into the mods/cnc/packages/ directory.
If you have a case-sensitive filesystem you must change the filenames to
lower case.
Red Alert and C&C have been released by EA Games as freeware. They can be
downloaded from http://www.commandandconquer.com/classic
Unfortunately the installer is 16-bit and so wont run on 64-bit operating
systems. This can be worked around by using the Red Alert Setup Manager
(http://ra.afraid.org/html/downloads/utilities-3.html).
Make sure you apply the no-CD protection fix so all the files needed
are installed to the hard drive.
Dependencies - Make sure you have these installed, or you'll
have very strange errors.
WINDOWS:
* .NET Framework >= 3.5-SP1
(http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en)
* Tao Framework >= 2.1.0
(http://sourceforge.net/projects/taoframework/)
(required libs: Tao.OpenGL, Tao.Cg, Tao.Platform.Windows)
* OpenAL >= 1.1
(http://connect.creativelabs.com/openal/Downloads/oalinst.zip)
* Cg Toolkit >= 2.2
(http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_October2009_Setup.exe)
To compile OpenRA, open the OpenRA.sln solution in the main folder,
or build it from the command-line with MSBuild.
Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
UBUNTU (substitute comparable packages for other linux distros):
* mono-gmcs
* freetype
* libmono-corlib1.0-cil
* libmono-winforms2.0-cil
* libopenal1
* libsdl1.2-dev
* nvidia-cg-toolkit (download the latest version from
http://developer.nvidia.com/object/cg_download.html)
OpenRA is incompatible with Compiz, please disable desktop effects when trying
to run OpenRA or the game will crash.
You will need to copy the Tao dependencies (.dll and .config) from the
thirdparty/Tao directory into the game root, or install them permanently into
your GAC with the following script
#!/bin/sh
gacutil -i thirdparty/Tao/Tao.Cg.dll
gacutil -i thirdparty/Tao/Tao.OpenGl.dll
gacutil -i thirdparty/Tao/Tao.OpenAl.dll
gacutil -i thirdparty/Tao/Tao.Sdl.dll
gacutil -i thirdparty/Tao/Tao.FreeType.dll
To compile OpenRA, run `make' from the command line.
Run the game with `mono OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `mono OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
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.
To run OpenRA, several files are needed from the original game disks.
These files are now downloaded and installed by the game,
so so no explicit action is required.
Dependencies - Make sure you have these installed, or you'll
have very strange errors.
WINDOWS:
* .NET Framework >= 3.5-SP1
(http://www.microsoft.com/downloads/details.aspx?FamilyID=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en)
* Tao Framework >= 2.1.0
This is now bundled with OpenRA, copy the files in thirdparty/Tao to the game root directory.
* OpenAL >= 1.1
(http://connect.creativelabs.com/openal/Downloads/oalinst.zip)
* Cg Toolkit >= 2.2
(http://developer.download.nvidia.com/cg/Cg_2.2/Cg-2.2_October2009_Setup.exe)
To compile OpenRA, open the OpenRA.sln solution in the main folder,
or build it from the command-line with MSBuild.
Run the game with `OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
UBUNTU (substitute comparable packages for other linux distros):
* mono-runtime (>= 2.6.7),
* mono-gmcs
* freetype
* libmono-corlib1.0-cil
* libmono-winforms2.0-cil
* libopenal1
* libsdl1.2-dev
* nvidia-cg-toolkit (for Cg renderer)
OpenRA does not work with some older versions of Compiz. On affected systems, disable desktop effects before playing. This is fixed in Ubuntu Natty and later.
The following dlls can also be installed into your system GAC. This is not
recommended because we ship a custom Tao.FreeType that can conflict with
other applications that use Tao:
gacutil -i Tao.Cg.dll
gacutil -i Tao.OpenGl.dll
gacutil -i Tao.OpenAl.dll
gacutil -i Tao.Sdl.dll
gacutil -i Tao.FreeType.dll
gacutil -i ICSharpCode.SharpZipLib.dll
To compile OpenRA, run `make' from the command line.
To install run 'make install'.
Run the game with `mono OpenRA.Game.exe Game.Mods=ra` for Red Alert
or `mono OpenRA.Game.exe Game.Mods=cnc` for Command & Conquer
SLACKWARE:
The following packages from slackbuilds.org are required, on 13.37 32bit:
* libgdiplus
* mono
* openAL
* nvidia-cg-toolkit (for Cg renderer)

350
Makefile
View File

@@ -1,112 +1,221 @@
CSC = gmcs
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
DEFINE = DEBUG;TRACE
PROGRAMS =fileformats gl game ra cnc seqed editor ralint filex tsbuild utility
prefix = /usr/local
datarootdir = $(prefix)/share
datadir = $(datarootdir)
bindir = $(prefix)/bin
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
INSTALL_DIR = $(DESTDIR)$(datadir)/openra
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
CSC = gmcs
CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror
DEFINE = DEBUG;TRACE
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll
PHONY = core tools package all mods clean distclean
COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll
.SUFFIXES:
core: game renderers mods utility tsbuild
tools: editor ralint tsbuild
package: core editor
mods: mod_ra mod_cnc mod_d2k
all: core tools
clean:
@-rm -f *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
distclean: clean
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 thirdparty/WindowsBase.dll
#
# Core binaries
#
fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs')
fileformats_TARGET = OpenRA.FileFormats.dll
fileformats_KIND = library
fileformats_LIBS = $(COMMON_LIBS) thirdparty/Tao/Tao.Sdl.dll System.Windows.Forms.dll
PROGRAMS = fileformats
fileformats: $(fileformats_TARGET)
gl_SRCS = $(shell find OpenRA.Gl/ -iname '*.cs')
gl_TARGET = OpenRA.Gl.dll
gl_KIND = library
gl_DEPS = $(fileformats_TARGET) $(game_TARGET)
gl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(gl_DEPS) $(game_TARGET)
game_SRCS = $(shell find OpenRA.Game/ -iname '*.cs')
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/Tao/Tao.FreeType.dll
game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico
PROGRAMS += game
game: $(game_TARGET)
ra_SRCS = $(shell find OpenRA.Mods.RA/ -iname '*.cs')
ra_TARGET = mods/ra/OpenRA.Mods.RA.dll
ra_KIND = library
ra_DEPS = $(fileformats_TARGET) $(game_TARGET)
ra_LIBS = $(COMMON_LIBS) $(ra_DEPS)
#
# Renderer dlls
#
rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs')
rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll
rsdl_KIND = library
rsdl_DEPS = $(fileformats_TARGET) $(game_TARGET)
rsdl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rsdl_DEPS)
cnc_SRCS = $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
cnc_KIND = library
cnc_DEPS = $(fileformats_TARGET) $(game_TARGET) $(ra_TARGET)
cnc_LIBS = $(COMMON_LIBS) $(cnc_DEPS)
rcg_SRCS := $(shell find OpenRA.Renderer.Cg/ -iname '*.cs')
rcg_TARGET = OpenRA.Renderer.Cg.dll
rcg_KIND = library
rcg_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rcg_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rcg_DEPS)
seqed_SRCS = $(shell find SequenceEditor/ -iname '*.cs')
seqed_TARGET = SequenceEditor.exe
seqed_KIND = winexe
seqed_DEPS = $(fileformats_TARGET)
seqed_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
seqed_EXTRA = -resource:SequenceEditor.Form1.resources
rgl_SRCS := $(shell find OpenRA.Renderer.Gl/ -iname '*.cs')
rgl_TARGET = OpenRA.Renderer.Gl.dll
rgl_KIND = library
rgl_DEPS = $(fileformats_TARGET) $(game_TARGET) $(rsdl_TARGET)
rgl_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
thirdparty/Tao/Tao.Cg.dll thirdparty/Tao/Tao.OpenGl.dll thirdparty/Tao/Tao.Sdl.dll \
$(rgl_DEPS)
editor_SRCS = $(shell find OpenRA.Editor/ -iname '*.cs')
editor_TARGET = OpenRA.Editor.exe
rnull_SRCS := $(shell find OpenRA.Renderer.Null/ -iname '*.cs')
rnull_TARGET = OpenRA.Renderer.Null.dll
rnull_KIND = library
rnull_DEPS = $(fileformats_TARGET) $(game_TARGET)
rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \
$(rnull_DEPS)
PROGRAMS += rcg rgl rnull rsdl
renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET)
#
# Official Mods
#
# Red Alert
STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET)
STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET)
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)
mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS)
mod_ra_EXTRA_CMDS = mono --debug RALint.exe ra
PROGRAMS += mod_ra
mod_ra: $(mod_ra_TARGET)
# Command and Conquer
mod_cnc_SRCS := $(shell find OpenRA.Mods.Cnc/ -iname '*.cs')
mod_cnc_TARGET = mods/cnc/OpenRA.Mods.Cnc.dll
mod_cnc_KIND = library
mod_cnc_DEPS = $(STD_MOD_DEPS) $(mod_ra_TARGET)
mod_cnc_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET)
mod_cnc_EXTRA_CMDS = mono --debug RALint.exe cnc
PROGRAMS += mod_cnc
mod_cnc: $(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) $(utility_TARGET)
mod_d2k_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_ra_TARGET) $(utility_TARGET)
mod_d2k_EXTRA_CMDS = mono --debug RALint.exe d2k
PROGRAMS += mod_d2k
mod_d2k: $(mod_d2k_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
ralint_SRCS = $(shell find RALint/ -iname '*.cs')
ralint_TARGET = RALint.exe
ralint_KIND = exe
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
PROGRAMS += editor
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
OpenRA.Editor.Form1.resources:
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
filex_SRCS = $(shell find FileExtractor/ -iname '*.cs')
filex_TARGET = FileExtractor.exe
filex_KIND = exe
filex_DEPS = $(fileformats_TARGET)
filex_LIBS = $(COMMON_LIBS) $(filex_DEPS)
# Analyses mod yaml for easy to detect errors
ralint_SRCS := $(shell find RALint/ -iname '*.cs')
ralint_TARGET = RALint.exe
ralint_KIND = exe
ralint_DEPS = $(fileformats_TARGET) $(game_TARGET)
ralint_LIBS = $(COMMON_LIBS) $(ralint_DEPS)
ralint_EXTRA_CMDS = cp thirdparty/FuzzyLogicLibrary.dll .
PROGRAMS += ralint
ralint: $(ralint_TARGET)
tsbuild_SRCS = $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
tsbuild_TARGET = TilesetBuilder.exe
# 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.Form1.resources
tsbuild_EXTRA = -resource:OpenRA.TilesetBuilder.frmBuilder.resources -resource:OpenRA.TilesetBuilder.frmNew.resources -resource:OpenRA.TilesetBuilder.Surface.resources
PROGRAMS += tsbuild
OpenRA.TilesetBuilder.frmBuilder.resources:
resgen2 OpenRA.TilesetBuilder/frmBuilder.resx OpenRA.TilesetBuilder.frmBuilder.resources 1> /dev/null
OpenRA.TilesetBuilder.frmNew.resources:
resgen2 OpenRA.TilesetBuilder/frmNew.resx OpenRA.TilesetBuilder.frmNew.resources 1> /dev/null
OpenRA.TilesetBuilder.Surface.resources:
resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null
tsbuild: OpenRA.TilesetBuilder.frmBuilder.resources OpenRA.TilesetBuilder.frmNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET)
utility_SRCS = $(shell find OpenRA.Utility/ -iname '*.cs')
#
# Launchers / Utilities
#
# Patches binary headers to work around a mono bug
fixheader.exe: packaging/fixheader.cs
@echo CSC fixheader.exe
@$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
# 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) thirdparty/ICSharpCode.SharpZipLib.dll
utility_LIBS = $(COMMON_LIBS) $(utility_DEPS)
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)
.PHONY: $(PHONY) $(PROGRAMS)
#
# Generate build rules for each target defined above in PROGRAMS
#
define BUILD_ASSEMBLY
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS) fixheader.exe
@echo CSC $$(@)
@$(CSC) $$($(1)_LIBS:%=-r:%) \
-out:$$(@) $(CSFLAGS) $$($(1)_FLAGS) \
-define:"$(DEFINE)" \
-t:"$$($(1)_KIND)" \
$$($(1)_EXTRA) \
$$($(1)_SRCS)
@mono fixheader.exe $$(@) > /dev/null
@test `echo $$(@) | sed 's/^.*\.//'` = "dll" && chmod a-x $$(@) || ``
@$$($(1)_EXTRA_CMDS)
endef
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
# -platform:x86
.SUFFIXES:
.PHONY: clean all game tool default mods mod_ra mod_cnc install uninstall editor_res editor tsbuild ralint seqed filex utility
game: $(fileformats_TARGET) $(gl_TARGET) $(game_TARGET) $(ra_TARGET) $(cnc_TARGET) $(utility_TARGET)
clean:
@-rm *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
distclean: clean
CORE = fileformats gl game editor utility
#
# Install / Uninstall for *nix
#
prefix ?= /usr/local
datarootdir ?= $(prefix)/share
datadir ?= $(datarootdir)
bindir ?= $(prefix)/bin
BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
INSTALL_DIR = $(DESTDIR)$(datadir)/openra
INSTALL = install
INSTALL_PROGRAM = $(INSTALL)
CORE = fileformats rcg rgl rsdl rnull game editor utility tsbuild
install: all
@-echo "Installing OpenRA to $(INSTALL_DIR)"
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) $(cnc_TARGET) $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra
@$(INSTALL_PROGRAM) $(mod_ra_TARGET) $(INSTALL_DIR)/mods/ra
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/d2k
@$(INSTALL_PROGRAM) $(mod_d2k_TARGET) $(INSTALL_DIR)/mods/d2k
@-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc
@cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc
@cp -r mods/cnc/chrome $(INSTALL_DIR)/mods/cnc
@@ -115,9 +224,7 @@ install: all
@cp -r mods/cnc/sequences $(INSTALL_DIR)/mods/cnc
@cp -r mods/cnc/tilesets $(INSTALL_DIR)/mods/cnc
@cp -r mods/cnc/uibits $(INSTALL_DIR)/mods/cnc
@$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra
@$(INSTALL_PROGRAM) $(ra_TARGET) $(INSTALL_DIR)/mods/ra
@-cp $(foreach f,$(shell ls mods/ra --hide=*.dll),mods/ra/$(f)) $(INSTALL_DIR)/mods/ra
@cp -r mods/ra/maps $(INSTALL_DIR)/mods/ra
@cp -r mods/ra/bits $(INSTALL_DIR)/mods/ra
@@ -126,69 +233,40 @@ install: all
@cp -r mods/ra/tilesets $(INSTALL_DIR)/mods/ra
@cp -r mods/ra/uibits $(INSTALL_DIR)/mods/ra
@cp -r shaders $(INSTALL_DIR)
@-cp $(foreach f,$(shell ls mods/d2k --hide=*.dll),mods/d2k/$(f)) $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/maps $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/bits $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/chrome $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/rules $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/tilesets $(INSTALL_DIR)/mods/d2k
@cp -r mods/d2k/uibits $(INSTALL_DIR)/mods/d2k
@cp -r glsl $(INSTALL_DIR)
@cp -r cg $(INSTALL_DIR)
@cp *.ttf $(INSTALL_DIR)
@cp --parents -r thirdparty/Tao $(INSTALL_DIR)
@$(INSTALL_PROGRAM) thirdparty/WindowsBase.dll $(INSTALL_DIR)
@cp thirdparty/Tao/* $(INSTALL_DIR)
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR)
@-$(INSTALL_PROGRAM) VERSION $(INSTALL_DIR)
@echo "#!/bin/sh" > openra
@echo "cd "$(datadir)"/openra" >> openra
@echo "mono "$(datadir)"/openra/OpenRA.Game.exe SupportDir=~/.openra \"$$""@\"" >> openra
@$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll $(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-editor
@echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor
@echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor
@echo 'DATADIR="$${ROOTDIR}/'"$(datadir)"'"' >> openra-editor
@echo 'cd "$${DATADIR}/openra"' >> openra-editor
@echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor
@$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR)
@$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
@echo "OpenRA is now installed. You will now want to download"
@echo "http://open-ra.org/get-dependency.php?file=ra-packages and"
@echo "http://open-ra.org/get-dependency.php?file=cnc-packages"
@echo "and extract their contents to"
@echo "$(INSTALL_DIR)/mods/ra/packages and "
@echo "$(INSTALL_DIR)/mods/cnc/packages respectively."
@echo "It is also advised to install the contents of $(INSTALL_DIR)/thirdparty to the Mono Global Assembly Cache \
with gacutil."
@$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR)
uninstall:
@-rm -r $(INSTALL_DIR)
@-rm $(DESTDIR)$(bindir)/openra
mod_ra: $(ra_TARGET) $(ralint_TARGET)
mono RALint.exe ra
mod_cnc: $(cnc_TARGET) $(ralint_TARGET)
mono RALint.exe cnc
mods: mod_ra mod_cnc
OpenRA.Editor.MapSelect.resources:
resgen2 OpenRA.Editor/MapSelect.resx OpenRA.Editor.MapSelect.resources 1> /dev/null
OpenRA.Editor.Form1.resources:
resgen2 OpenRA.Editor/Form1.resx OpenRA.Editor.Form1.resources 1> /dev/null
editor: OpenRA.Editor.MapSelect.resources OpenRA.Editor.Form1.resources $(editor_TARGET)
ralint: $(ralint_TARGET)
seqed: SequenceEditor.Form1.resources $(seqed_TARGET)
SequenceEditor.Form1.resources:
resgen2 SequenceEditor/Form1.resx SequenceEditor.Form1.resources 1> /dev/null
filex: $(filex_TARGET)
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
OpenRA.TilesetBuilder.Form1.resources:
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
tools: editor ralint seqed filex tsbuild
all: game tools
fixheader: packaging/fixheader.cs
@$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%)
define BUILD_ASSEMBLY
$$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS) fixheader
@echo CSC $$(@)
@$(CSC) $$($(1)_LIBS:%=-r:%) \
-out:$$(@) $(CSFLAGS) $$($(1)_FLAGS) \
-define:"$(DEFINE)" \
-t:"$$($(1)_KIND)" \
$$($(1)_EXTRA) \
$$($(1)_SRCS)
@mono fixheader.exe $$(@)
endef
$(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
@-rm $(DESTDIR)$(bindir)/openra-editor

View File

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

View File

@@ -0,0 +1,49 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Windows.Forms;
using OpenRA.FileFormats;
namespace OpenRA.Editor
{
public partial class ActorPropertiesDialog : Form
{
public ActorPropertiesDialog()
{
InitializeComponent();
}
public void AddRow(string name, Control c)
{
flowLayoutPanel1.Controls.Add(new Label
{
Text = name,
Width = flowLayoutPanel1.Width * 3 / 10,
Height = 25,
TextAlign = ContentAlignment.MiddleLeft,
});
c.Width = flowLayoutPanel1.Width * 6 / 10 - 25;
c.Height = 25;
flowLayoutPanel1.Controls.Add(c);
}
public Control MakeEditorControl(Type t, Func<object> getter, Action<object> setter)
{
var r = new TextBox();
r.Text = FieldSaver.FormatValue(getter(), t);
r.LostFocus += (e,_) => setter(FieldLoader.GetValue("<editor internals>", t, r.Text));
r.Enabled = false;
return r;
}
}
}

View File

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

View File

@@ -1,40 +1,36 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Drawing;
using OpenRA.GameRules;
using OpenRA.Traits;
namespace OpenRA.Editor
{
class ActorTemplate
{
public Bitmap Bitmap;
public ActorInfo Info;
public bool Centered;
}
class BrushTemplate
{
public Bitmap Bitmap;
public ushort N;
}
class ResourceTemplate
{
public Bitmap Bitmap;
public ResourceTypeInfo Info;
public int Value;
}
class WaypointTemplate
{
}
}
#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.GameRules;
using OpenRA.Traits;
namespace OpenRA.Editor
{
class ActorTemplate
{
public Bitmap Bitmap;
public ActorInfo Info;
public EditorAppearanceInfo Appearance;
}
class BrushTemplate
{
public Bitmap Bitmap;
public ushort N;
}
class ResourceTemplate
{
public Bitmap Bitmap;
public ResourceTypeInfo Info;
public int Value;
}
}

View File

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

123
OpenRA.Editor/BrushTool.cs Normal file
View File

@@ -0,0 +1,123 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using OpenRA.FileFormats;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class BrushTool : ITool
{
BrushTemplate Brush;
public BrushTool(BrushTemplate brush) { this.Brush = brush; }
public void Apply(Surface surface)
{
// change the bits in the map
var template = surface.TileSet.Templates[Brush.N];
var tile = template.Data;
var pos = surface.GetBrushLocation();
if (surface.GetModifiers() == Keys.Shift)
{
FloodFillWithBrush(surface, pos);
return;
}
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
{
if (surface.Map.IsInMap(new CVec(u, v) + pos))
{
var z = u + v * template.Size.X;
if (tile.TileBitmapBytes[z] != null)
surface.Map.MapTiles.Value[u + pos.X, v + pos.Y] =
new TileReference<ushort, byte>
{
type = Brush.N,
index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z,
};
var ch = new int2((pos.X + u) / Surface.ChunkSize, (pos.Y + v) / Surface.ChunkSize);
if (surface.Chunks.ContainsKey(ch))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
}
}
public void Preview(Surface surface, SGraphics g)
{
g.DrawImage(Brush.Bitmap,
surface.TileSet.TileSize * surface.GetBrushLocation().X * surface.Zoom + surface.GetOffset().X,
surface.TileSet.TileSize * surface.GetBrushLocation().Y * surface.Zoom + surface.GetOffset().Y,
Brush.Bitmap.Width * surface.Zoom,
Brush.Bitmap.Height * surface.Zoom);
}
void FloodFillWithBrush(Surface s, CPos pos)
{
var queue = new Queue<CPos>();
var replace = s.Map.MapTiles.Value[pos.X, pos.Y];
var touched = new bool[s.Map.MapSize.X, s.Map.MapSize.Y];
Action<int, int> maybeEnqueue = (x, y) =>
{
if (s.Map.IsInMap(x, y) && !touched[x, y])
{
queue.Enqueue(new CPos(x, y));
touched[x, y] = true;
}
};
queue.Enqueue(pos);
while (queue.Count > 0)
{
var p = queue.Dequeue();
if (!s.Map.MapTiles.Value[p.X, p.Y].Equals(replace))
continue;
var a = FindEdge(s, p, new CVec(-1, 0), replace);
var b = FindEdge(s, p, new CVec(1, 0), replace);
for (var x = a.X; x <= b.X; x++)
{
s.Map.MapTiles.Value[x, p.Y] = new TileReference<ushort, byte> { type = Brush.N, index = (byte)0 };
if (s.Map.MapTiles.Value[x, p.Y - 1].Equals(replace))
maybeEnqueue(x, p.Y - 1);
if (s.Map.MapTiles.Value[x, p.Y + 1].Equals(replace))
maybeEnqueue(x, p.Y + 1);
}
}
/* todo: optimize */
foreach (var ch in s.Chunks.Values) ch.Dispose();
s.Chunks.Clear();
}
CPos FindEdge(Surface s, CPos p, CVec d, TileReference<ushort, byte> replace)
{
for (; ; )
{
var q = p + d;
if (!s.Map.IsInMap(q)) return p;
if (!s.Map.MapTiles.Value[q.X, q.Y].Equals(replace)) return p;
p = q;
}
}
}
}

100
OpenRA.Editor/ErrorListDialog.Designer.cs generated Normal file
View File

@@ -0,0 +1,100 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class ErrorListDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.listBox1 = new System.Windows.Forms.ListBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(10, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(610, 23);
this.label1.TabIndex = 0;
this.label1.Text = "Your map import completed, but with errors:";
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(13, 30);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(607, 316);
this.listBox1.TabIndex = 1;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(545, 359);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Close";
this.button1.UseVisualStyleBackColor = true;
//
// ErrorListDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(632, 394);
this.Controls.Add(this.button1);
this.Controls.Add(this.listBox1);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ErrorListDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Import Errors";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Button button1;
}
}

View File

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

1131
OpenRA.Editor/Form1.Designer.cs generated Normal file → Executable file

File diff suppressed because it is too large Load Diff

992
OpenRA.Editor/Form1.cs Normal file → Executable file
View File

@@ -1,424 +1,568 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Editor
{
public partial class Form1 : Form
{
public Form1(string[] mods)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
currentMod = mods.FirstOrDefault() ?? "ra";
Text = "OpenRA Editor (mod:{0})".F(currentMod);
Game.modData = new ModData(currentMod);
Rules.LoadRules(Game.modData.Manifest, new Map());
surface1.AfterChange += OnMapChanged;
}
void OnMapChanged()
{
MakeDirty();
pmMiniMap.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
}
void MakeDirty() { dirty = true; }
string loadedMapName;
string currentMod = "ra";
TileSet tileset;
bool dirty = false;
void LoadMap(string mapname)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = mapname;
Game.modData = new ModData(currentMod);
// load the map
var map = new Map(new Folder(mapname));
// upgrade maps that have no player definitions. editor doesnt care,
// but this breaks the game pretty badly.
if (map.Players.Count == 0)
map.Players.Add("Neutral", new PlayerReference("Neutral",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
PrepareMapResources(Game.modData.Manifest, map);
dirty = false;
}
void NewMap(Map map)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = null;
Game.modData = new ModData(currentMod);
PrepareMapResources(Game.modData.Manifest, map);
MakeDirty();
}
// this code is insanely stupid, and mostly my fault -- chrisf
void PrepareMapResources(Manifest manifest, Map map)
{
Rules.LoadRules(manifest, map);
tileset = Rules.TileSets[map.Theater];
tileset.LoadTiles();
var palette = new Palette(FileSystem.Open(tileset.Palette), true);
surface1.Bind(map, tileset, palette);
// construct the palette of tiles
var palettes = new[] { tilePalette, actorPalette, resourcePalette };
foreach (var p in palettes) { p.Visible = false; p.SuspendLayout(); }
foreach (var t in tileset.Templates)
{
try
{
var bitmap = RenderUtils.RenderTemplate(tileset, (ushort)t.Key, palette);
var ibox = new PictureBox
{
Image = bitmap,
Width = bitmap.Width / 2,
Height = bitmap.Height / 2,
SizeMode = PictureBoxSizeMode.StretchImage
};
var brushTemplate = new BrushTemplate { Bitmap = bitmap, N = t.Key };
ibox.Click += (_, e) => surface1.SetBrush(brushTemplate);
var template = t.Value;
tilePalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{1}:{0} ({2}x{3})".F(
template.Image,
template.Id,
template.Size.X,
template.Size.Y));
}
catch { }
}
var actorTemplates = new List<ActorTemplate>();
foreach (var a in Rules.Info.Keys)
{
try
{
var info = Rules.Info[a];
if (!info.Traits.Contains<RenderSimpleInfo>()) continue;
var template = RenderUtils.RenderActor(info, tileset, palette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetActor(template);
actorPalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{0}".F(
info.Name));
actorTemplates.Add(template);
}
catch { }
}
surface1.BindActorTemplates(actorTemplates);
var resourceTemplates = new List<ResourceTemplate>();
foreach (var a in Rules.Info["world"].Traits.WithInterface<ResourceTypeInfo>())
{
try
{
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, palette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetResource(template);
resourcePalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{0}:{1}cr".F(
template.Info.Name,
template.Info.ValuePerUnit));
resourceTemplates.Add(template);
}
catch { }
}
surface1.BindResourceTemplates(resourceTemplates);
foreach (var p in palettes)
{
p.Visible = true;
p.ResumeLayout();
}
pmMiniMap.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
}
void ResizeClicked(object sender, EventArgs e)
{
using (var rd = new ResizeDialog())
{
rd.width.Value = surface1.Map.MapSize.X;
rd.height.Value = surface1.Map.MapSize.Y;
rd.cordonLeft.Value = surface1.Map.TopLeft.X;
rd.cordonTop.Value = surface1.Map.TopLeft.Y;
rd.cordonRight.Value = surface1.Map.BottomRight.X;
rd.cordonBottom.Value = surface1.Map.BottomRight.Y;
if (DialogResult.OK != rd.ShowDialog())
return;
surface1.Map.TopLeft = new int2((int)rd.cordonLeft.Value, (int)rd.cordonTop.Value);
surface1.Map.BottomRight = new int2((int)rd.cordonRight.Value, (int)rd.cordonBottom.Value);
if ((int)rd.width.Value != surface1.Map.MapSize.X || (int)rd.height.Value != surface1.Map.MapSize.Y)
{
surface1.Map.Resize((int)rd.width.Value, (int)rd.height.Value);
surface1.Bind(surface1.Map, surface1.TileSet, surface1.Palette); // rebind it to invalidate all caches
}
surface1.Invalidate();
}
}
void SaveClicked(object sender, EventArgs e)
{
if (loadedMapName == null)
SaveAsClicked(sender, e);
else
{
surface1.Map.PlayerCount = surface1.Map.Waypoints.Count;
surface1.Map.Save(loadedMapName);
dirty = false;
}
}
void SaveAsClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect())
{
nms.MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", currentMod, "maps" }
.Aggregate(Path.Combine);
nms.txtNew.ReadOnly = false;
nms.btnOk.Text = "Save";
nms.txtNew.Text = "unnamed";
nms.txtPathOut.ReadOnly = false;
if (DialogResult.OK == nms.ShowDialog())
{
if (nms.txtNew.Text == "")
nms.txtNew.Text = "unnamed";
string mapfoldername = Path.Combine(nms.MapFolderPath, nms.txtNew.Text);
loadedMapName = mapfoldername;
try
{
Directory.CreateDirectory(mapfoldername);
}
catch (Exception ed)
{
MessageBox.Show("Directory creation failed: {0}", ed.ToString());
}
SaveClicked(sender, e);
}
}
}
void OpenClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect())
{
nms.MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", currentMod, "maps" }
.Aggregate(Path.Combine);
nms.txtNew.ReadOnly = true;
nms.txtPathOut.ReadOnly = true;
nms.btnOk.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())
{
string mapfoldername = Path.Combine(nms.MapFolderPath, nms.txtNew.Text);
LoadMap(mapfoldername);
}
}
}
void NewClicked(object sender, EventArgs e)
{
using (var nmd = new NewMapDialog())
{
nmd.theater.Items.Clear();
nmd.theater.Items.AddRange(Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.theater.SelectedIndex = 0;
if (DialogResult.OK == nmd.ShowDialog())
{
var map = new Map(nmd.theater.SelectedItem as string);
map.Resize((int)nmd.width.Value, (int)nmd.height.Value);
map.TopLeft = new int2((int)nmd.cordonLeft.Value, (int)nmd.cordonTop.Value);
map.BottomRight = new int2((int)nmd.cordonRight.Value, (int)nmd.cordonBottom.Value);
map.Players.Add("Neutral", new PlayerReference("Neutral", Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
NewMap(map);
}
}
}
void PropertiesClicked(object sender, EventArgs e)
{
using (var pd = new PropertiesDialog())
{
pd.title.Text = surface1.Map.Title;
pd.desc.Text = surface1.Map.Description;
pd.author.Text = surface1.Map.Author;
pd.selectable.Checked = surface1.Map.Selectable;
if (DialogResult.OK != pd.ShowDialog())
return;
surface1.Map.Title = pd.title.Text;
surface1.Map.Description = pd.desc.Text;
surface1.Map.Author = pd.author.Text;
surface1.Map.Selectable = pd.selectable.Checked;
}
}
void SpawnPointsClicked(object sender, EventArgs e) { surface1.SetWaypoint(new WaypointTemplate()); }
void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = true; }
void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = false; }
void CloseClicked(object sender, EventArgs e)
{
Close();
}
void ImportLegacyMapClicked(object sender, EventArgs e)
{
var currentDirectory = Directory.GetCurrentDirectory();
using (var ofd = new OpenFileDialog { Filter = "Legacy maps (*.ini;*.mpr)|*.ini;*.mpr" })
if (DialogResult.OK == ofd.ShowDialog())
{
Directory.SetCurrentDirectory( currentDirectory );
/* 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 map = LegacyMapImporter.Import(ofd.FileName);
map.Players.Add("Neutral", new PlayerReference("Neutral",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));
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;
switch (MessageBox.Show("The map has been modified since it was last saved. " + "\r\n" + "Save changes now?",
"Unsaved Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation))
{
case DialogResult.Yes: SaveClicked(null, EventArgs.Empty); break;
case DialogResult.No: break;
case DialogResult.Cancel: e.Cancel = true; break;
}
}
private void layersFloaterToolStripMenuItem_Click(object sender, EventArgs e)
{
var pb = new PaletteBox();
pb.Show();
}
private void mnuMinimapToPNG_Click(object sender, EventArgs e)
{
try
{
saveFileDialog.InitialDirectory = new string[] { Environment.CurrentDirectory, "maps" }
.Aggregate(Path.Combine);
FileInfo file = new FileInfo(loadedMapName + ".png");
string name = file.Name;
saveFileDialog.FileName = name;
saveFileDialog.ShowDialog();
if (saveFileDialog.FileName == "")
{
saveFileDialog.FileName = name;
}
else
{
Bitmap png = new Bitmap(pmMiniMap.Image);
png.Save(saveFileDialog.FileName, System.Drawing.Imaging.ImageFormat.Png);
}
}
catch { }
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Editor
{
public partial class Form1 : Form
{
public Form1(string[] args)
{
InitializeComponent();
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
currentMod = args.FirstOrDefault() ?? "ra";
toolStripComboBox1.Items.AddRange(Mod.AllMods.Keys.ToArray());
toolStripComboBox1.SelectedIndexChanged += (_, e) =>
{
tilePalette.SuspendLayout();
actorPalette.SuspendLayout();
resourcePalette.SuspendLayout();
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
tilePalette.ResumeLayout();
actorPalette.ResumeLayout();
resourcePalette.ResumeLayout();
surface1.Bind(null, null, null, null);
pmMiniMap.Image = null;
currentMod = toolStripComboBox1.SelectedItem as string;
Text = "OpenRA Editor (mod:{0})".F(currentMod);
Game.modData = new ModData(currentMod);
FileSystem.LoadFromManifest(Game.modData.Manifest);
Rules.LoadRules(Game.modData.Manifest, new Map());
loadedMapName = null;
};
toolStripComboBox1.SelectedItem = currentMod;
surface1.AfterChange += OnMapChanged;
surface1.MousePositionChanged += s => toolStripStatusLabelMousePosition.Text = s;
surface1.ActorDoubleClicked += ActorDoubleClicked;
if (args.Length >= 2)
LoadMap(args[1]);
}
void OnMapChanged()
{
MakeDirty();
pmMiniMap.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
}
void ActorDoubleClicked(KeyValuePair<string,ActorReference> kv)
{
using( var apd = new ActorPropertiesDialog() )
{
var name = kv.Key;
apd.AddRow("(Name)", apd.MakeEditorControl(typeof(string), () => name, v => name = (string)v));
apd.AddRow("(Type)", apd.MakeEditorControl(typeof(string), () => kv.Value.Type, v => kv.Value.Type = (string)v));
var objSaved = kv.Value.Save();
// TODO: make this work properly
foreach( var init in Rules.Info[kv.Value.Type].GetInitKeys() )
apd.AddRow(init.First,
apd.MakeEditorControl(init.Second,
() => objSaved.NodesDict.ContainsKey( init.First ) ? objSaved.NodesDict[init.First].Value : null,
_ => {}));
apd.ShowDialog();
// TODO: writeback
}
}
void MakeDirty() { dirty = true; }
string loadedMapName;
string currentMod = "ra";
TileSet tileset;
bool dirty = false;
void LoadMap(string mapname)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = mapname;
// load the map
var map = new Map(mapname);
// upgrade maps that have no player definitions. editor doesnt care,
// but this breaks the game pretty badly.
if (map.Players.Count == 0)
map.MakeDefaultPlayers();
PrepareMapResources(Game.modData.Manifest, map);
dirty = false;
}
void NewMap(Map map)
{
tilePalette.Controls.Clear();
actorPalette.Controls.Clear();
resourcePalette.Controls.Clear();
loadedMapName = null;
PrepareMapResources(Game.modData.Manifest, map);
MakeDirty();
}
// this code is insanely stupid, and mostly my fault -- chrisf
void PrepareMapResources(Manifest manifest, Map map)
{
Rules.LoadRules(manifest, map);
tileset = Rules.TileSets[map.Tileset];
tileset.LoadTiles();
int[] ShadowIndex = { 3, 4 };
var palette = new Palette(FileSystem.Open(tileset.Palette), ShadowIndex);
// required for desert terrain in RA
var playerPalette = tileset.PlayerPalette ?? tileset.Palette;
var PlayerPalette = new Palette(FileSystem.Open(playerPalette), ShadowIndex);
surface1.Bind(map, tileset, palette, PlayerPalette);
// construct the palette of tiles
var palettes = new[] { tilePalette, actorPalette, resourcePalette };
foreach (var p in palettes) { p.Visible = false; p.SuspendLayout(); }
string[] templateOrder = tileset.EditorTemplateOrder ?? new string[]{};
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => templateOrder.ToList().IndexOf(t.Key)))
{
var category = tc.Key ?? "(Uncategorized)";
var categoryHeader = new Label
{
BackColor = SystemColors.Highlight,
ForeColor = SystemColors.HighlightText,
Text = category,
AutoSize = false,
Height = 24,
TextAlign = ContentAlignment.MiddleLeft,
Width = tilePalette.ClientSize.Width,
};
// hook this manually, anchoring inside FlowLayoutPanel is flaky.
tilePalette.Resize += (_,e) => categoryHeader.Width = tilePalette.ClientSize.Width;
if (tilePalette.Controls.Count > 0)
tilePalette.SetFlowBreak(
tilePalette.Controls[tilePalette.Controls.Count - 1], true);
tilePalette.Controls.Add(categoryHeader);
foreach( var t in tc )
{
try
{
var bitmap = tileset.RenderTemplate((ushort)t.Key, palette);
var ibox = new PictureBox
{
Image = bitmap,
Width = bitmap.Width / 2,
Height = bitmap.Height / 2,
SizeMode = PictureBoxSizeMode.StretchImage
};
var brushTemplate = new BrushTemplate { Bitmap = bitmap, N = t.Key };
ibox.Click += (_, e) => surface1.SetTool(new BrushTool(brushTemplate));
var template = t.Value;
tilePalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{1}:{0} ({2}x{3})".F(
template.Image,
template.Id,
template.Size.X,
template.Size.Y));
}
catch { }
}
}
var actorTemplates = new List<ActorTemplate>();
foreach (var a in Rules.Info.Keys)
{
try
{
var info = Rules.Info[a];
if (!info.Traits.Contains<RenderSimpleInfo>()) continue;
var etf = info.Traits.GetOrDefault<EditorTilesetFilterInfo>();
if (etf != null && etf.ExcludeTilesets != null
&& etf.ExcludeTilesets.Contains(tileset.Id)) continue;
if (etf != null && etf.RequireTilesets != null
&& !etf.RequireTilesets.Contains(tileset.Id)) continue;
var TemplatePalette = PlayerPalette;
var rsi = info.Traits.GetOrDefault<RenderSimpleInfo>();
// exception for desert buildings
if (rsi != null && rsi.Palette != null && rsi.Palette.Contains("terrain"))
TemplatePalette = palette;
var template = RenderUtils.RenderActor(info, tileset, TemplatePalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ActorTool(template));
actorPalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{0}".F(
info.Name));
actorTemplates.Add(template);
}
catch { }
}
surface1.BindActorTemplates(actorTemplates);
var resourceTemplates = new List<ResourceTemplate>();
foreach (var a in Rules.Info["world"].Traits.WithInterface<ResourceTypeInfo>())
{
try
{
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, PlayerPalette);
var ibox = new PictureBox
{
Image = template.Bitmap,
Width = 32,
Height = 32,
SizeMode = PictureBoxSizeMode.Zoom,
BorderStyle = BorderStyle.FixedSingle
};
ibox.Click += (_, e) => surface1.SetTool(new ResourceTool(template));
resourcePalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{0}:{1}cr".F(
template.Info.Name,
template.Info.ValuePerUnit));
resourceTemplates.Add(template);
}
catch { }
}
surface1.BindResourceTemplates(resourceTemplates);
foreach (var p in palettes)
{
p.Visible = true;
p.ResumeLayout();
}
pmMiniMap.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
propertiesToolStripMenuItem.Enabled = true;
resizeToolStripMenuItem.Enabled = true;
saveToolStripMenuItem.Enabled = true;
saveAsToolStripMenuItem.Enabled = true;
mnuMinimapToPNG.Enabled = true; // todo: what is this VB naming bullshit doing here?
PopulateActorOwnerChooser();
}
void PopulateActorOwnerChooser()
{
actorOwnerChooser.Items.Clear();
actorOwnerChooser.Items.AddRange(surface1.Map.Players.Values.ToArray());
actorOwnerChooser.SelectedIndex = 0;
surface1.NewActorOwner = (actorOwnerChooser.SelectedItem as PlayerReference).Name;
}
void ResizeClicked(object sender, EventArgs e)
{
using (var rd = new ResizeDialog())
{
rd.width.Value = surface1.Map.MapSize.X;
rd.height.Value = surface1.Map.MapSize.Y;
rd.cordonLeft.Value = surface1.Map.Bounds.Left;
rd.cordonTop.Value = surface1.Map.Bounds.Top;
rd.cordonRight.Value = surface1.Map.Bounds.Right;
rd.cordonBottom.Value = surface1.Map.Bounds.Bottom;
if (DialogResult.OK != rd.ShowDialog())
return;
surface1.Map.ResizeCordon((int)rd.cordonLeft.Value,
(int)rd.cordonTop.Value,
(int)rd.cordonRight.Value,
(int)rd.cordonBottom.Value);
if ((int)rd.width.Value != surface1.Map.MapSize.X || (int)rd.height.Value != surface1.Map.MapSize.Y)
{
surface1.Map.Resize((int)rd.width.Value, (int)rd.height.Value);
surface1.Bind(surface1.Map, surface1.TileSet, surface1.Palette, surface1.PlayerPalette); // rebind it to invalidate all caches
}
surface1.Invalidate();
}
}
void SaveClicked(object sender, EventArgs e)
{
if (loadedMapName == null)
SaveAsClicked(sender, e);
else
{
surface1.Map.Save(loadedMapName);
dirty = false;
}
}
void SaveAsClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.txtNew.ReadOnly = false;
nms.btnOk.Text = "Save";
nms.txtNew.Text = "unnamed";
nms.txtPathOut.ReadOnly = false;
if (DialogResult.OK == nms.ShowDialog())
{
if (nms.txtNew.Text == "")
nms.txtNew.Text = "unnamed";
// TODO: Allow the user to choose map format (directory vs oramap)
loadedMapName = Path.Combine(nms.MapFolderPath, nms.txtNew.Text + ".oramap");
SaveClicked(sender, e);
}
}
}
void OpenClicked(object sender, EventArgs e)
{
using (var nms = new MapSelect(currentMod))
{
nms.txtNew.ReadOnly = true;
nms.txtPathOut.ReadOnly = true;
nms.btnOk.Text = "Open";
if (DialogResult.OK == nms.ShowDialog())
LoadMap(nms.txtNew.Tag as string);
}
}
void NewClicked(object sender, EventArgs e)
{
using (var nmd = new NewMapDialog())
{
nmd.theater.Items.Clear();
nmd.theater.Items.AddRange(Rules.TileSets.Select(a => a.Value.Id).ToArray());
nmd.theater.SelectedIndex = 0;
if (DialogResult.OK == nmd.ShowDialog())
{
var map = Map.FromTileset(nmd.theater.SelectedItem as string);
map.Resize((int)nmd.width.Value, (int)nmd.height.Value);
map.ResizeCordon((int)nmd.cordonLeft.Value, (int)nmd.cordonTop.Value,
(int)nmd.cordonRight.Value, (int)nmd.cordonBottom.Value);
map.Players.Clear();
map.MakeDefaultPlayers();
NewMap(map);
}
}
}
void PropertiesClicked(object sender, EventArgs e)
{
using (var pd = new PropertiesDialog())
{
pd.title.Text = surface1.Map.Title;
pd.desc.Text = surface1.Map.Description;
pd.author.Text = surface1.Map.Author;
pd.selectable.Checked = surface1.Map.Selectable;
pd.useAsShellmap.Checked = surface1.Map.UseAsShellmap;
if (DialogResult.OK != pd.ShowDialog())
return;
surface1.Map.Title = pd.title.Text;
surface1.Map.Description = pd.desc.Text;
surface1.Map.Author = pd.author.Text;
surface1.Map.Selectable = pd.selectable.Checked;
surface1.Map.UseAsShellmap = pd.useAsShellmap.Checked;
}
}
void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = true; }
void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Space) surface1.IsPanning = false; }
void CloseClicked(object sender, EventArgs e)
{
Close();
}
void 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;
switch (MessageBox.Show("The map has been modified since it was last saved. " + "\r\n" + "Save changes now?",
"Unsaved Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation))
{
case DialogResult.Yes: SaveClicked(null, EventArgs.Empty); break;
case DialogResult.No: break;
case DialogResult.Cancel: e.Cancel = true; break;
}
}
void ExportMinimap(object sender, EventArgs e)
{
using( var sfd = new SaveFileDialog() {
InitialDirectory = Path.Combine(Environment.CurrentDirectory, "maps"),
DefaultExt = "*.png",
Filter = "PNG Image (*.png)|*.png",
Title = "Export Minimap to PNG",
FileName = Path.ChangeExtension(loadedMapName, ".png"),
RestoreDirectory = true } )
if (DialogResult.OK == sfd.ShowDialog())
pmMiniMap.Image.Save(sfd.FileName);
}
void ShowActorNamesClicked(object sender, EventArgs e)
{
showActorNamesToolStripMenuItem.Checked ^= true;
surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked;
}
void ShowGridClicked(object sender, EventArgs e)
{
showGridToolStripMenuItem.Checked ^= true;
surface1.ShowGrid = showGridToolStripMenuItem.Checked;
surface1.Chunks.Clear();
}
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,
Rules.TileSets[surface1.Map.Tileset].Templates[tr.type].Data.TileBitmapBytes.Count);
surface1.Map.MapTiles.Value[i, j] = tr;
}
surface1.Chunks.Clear();
surface1.Invalidate();
}
void SetupDefaultPlayers(object sender, EventArgs e)
{
dirty = true;
surface1.Map.Players.Clear();
surface1.Map.MakeDefaultPlayers();
surface1.Chunks.Clear();
surface1.Invalidate();
PopulateActorOwnerChooser();
}
void DrawPlayerListItem(object sender, DrawItemEventArgs e)
{
// color block
var player = e.Index >= 0 ? (PlayerReference)(sender as ComboBox).Items[e.Index] : null;
e.DrawBackground();
e.DrawFocusRectangle();
if (player == null)
return;
var color = player.ColorRamp.GetColor(0);
using( var brush = new SolidBrush(color) )
e.Graphics.FillRectangle( brush, e.Bounds.Left + 2, e.Bounds.Top + 2, e.Bounds.Height + 6, e.Bounds.Height - 4 );
using( var foreBrush = new SolidBrush(e.ForeColor) )
e.Graphics.DrawString( player.Name, e.Font, foreBrush, e.Bounds.Left + e.Bounds.Height + 12, e.Bounds.Top );
}
void OnSelectedPlayerChanged(object sender, EventArgs e)
{
var player = actorOwnerChooser.SelectedItem as PlayerReference;
surface1.NewActorOwner = player.Name;
}
private void copySelectionToolStripMenuItem_Click(object sender, EventArgs e)
{
surface1.CopySelection();
}
}
}

1092
OpenRA.Editor/Form1.resx Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,20 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
namespace OpenRA.Traits.Activities
{
public class Idle : CancelableActivity
{
public override IActivity Tick(Actor self) { return NextActivity; }
}
}
#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 SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
interface ITool
{
void Apply(Surface surface);
void Preview(Surface surface, SGraphics g);
}
}

View File

@@ -1,470 +1,502 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using OpenRA;
using OpenRA.FileFormats;
using OpenRA.Traits;
using System.Drawing;
using System.Globalization;
namespace OpenRA.Editor
{
public class LegacyMapImporter
{
// Mapping from ra overlay index to type string
static string[] raOverlayNames =
{
"sbag", "cycl", "brik", "fenc", "wood",
"gold01", "gold02", "gold03", "gold04",
"gem01", "gem02", "gem03", "gem04",
"v12", "v13", "v14", "v15", "v16", "v17", "v18",
"fpls", "wcrate", "scrate", "barb", "sbag",
};
static Dictionary<string, Pair<byte, byte>> overlayResourceMapping = new Dictionary<string, Pair<byte, byte>>()
{
// RA Gems, Gold
{ "gold01", new Pair<byte,byte>(1,0) },
{ "gold02", new Pair<byte,byte>(1,1) },
{ "gold03", new Pair<byte,byte>(1,2) },
{ "gold04", new Pair<byte,byte>(1,3) },
{ "gem01", new Pair<byte,byte>(2,0) },
{ "gem02", new Pair<byte,byte>(2,1) },
{ "gem03", new Pair<byte,byte>(2,2) },
{ "gem04", new Pair<byte,byte>(2,3) },
// cnc tiberium
{ "ti1", new Pair<byte,byte>(1,0) },
{ "ti2", new Pair<byte,byte>(1,1) },
{ "ti3", new Pair<byte,byte>(1,2) },
{ "ti4", new Pair<byte,byte>(1,3) },
{ "ti5", new Pair<byte,byte>(1,4) },
{ "ti6", new Pair<byte,byte>(1,5) },
{ "ti7", new Pair<byte,byte>(1,6) },
{ "ti8", new Pair<byte,byte>(1,7) },
{ "ti9", new Pair<byte,byte>(1,8) },
{ "ti10", new Pair<byte,byte>(1,9) },
{ "ti11", new Pair<byte,byte>(1,10) },
{ "ti12", new Pair<byte,byte>(1,11) },
};
static Dictionary<string, string> overlayActorMapping = new Dictionary<string, string>() {
// Fences
{"sbag","sbag"},
{"cycl","cycl"},
{"brik","brik"},
{"fenc","fenc"},
{"wood","wood"},
// Fields
{"v12","v12"},
{"v13","v13"},
{"v14","v14"},
{"v15","v15"},
{"v16","v16"},
{"v17","v17"},
{"v18","v18"},
// Crates
// {"wcrate","crate"},
// {"scrate","crate"},
};
static Dictionary<string,Pair<Color,Color>> namedColorMapping = new Dictionary<string, Pair<Color, Color>>()
{
{"gold",Pair.New(Color.FromArgb(246,214,121),Color.FromArgb(40,32,8))},
{"blue",Pair.New(Color.FromArgb(226,230,246),Color.FromArgb(8,20,52))},
{"red",Pair.New(Color.FromArgb(255,20,0),Color.FromArgb(56,0,0))},
{"neutral",Pair.New(Color.FromArgb(238,238,238),Color.FromArgb(44,28,24))},
{"orange",Pair.New(Color.FromArgb(255,230,149),Color.FromArgb(56,0,0))},
{"teal",Pair.New(Color.FromArgb(93,194,165),Color.FromArgb(0,32,32))},
{"salmon",Pair.New(Color.FromArgb(210,153,125),Color.FromArgb(56,0,0))},
{"green",Pair.New(Color.FromArgb(160,240,140),Color.FromArgb(20,20,20))},
{"white",Pair.New(Color.FromArgb(255,255,255),Color.FromArgb(75,75,75))},
{"black",Pair.New(Color.FromArgb(80,80,80),Color.FromArgb(5,5,5))},
};
int MapSize;
int ActorCount = 0;
Map Map = new Map();
List<string> Players = new List<string>();
LegacyMapImporter(string filename)
{
ConvertIniMap(filename);
}
public static Map Import(string filename)
{
var converter = new LegacyMapImporter(filename);
return converter.Map;
}
enum IniMapFormat { RedAlert = 3, /* otherwise, cnc (2 variants exist, we don't care to differentiate) */ };
public void ConvertIniMap(string iniFile)
{
var file = new IniFile(FileSystem.Open(iniFile));
var basic = file.GetSection("Basic");
var map = file.GetSection("Map");
var legacyMapFormat = (IniMapFormat)int.Parse(basic.GetValue("NewINIFormat", "0"));
var XOffset = int.Parse(map.GetValue("X", "0"));
var YOffset = int.Parse(map.GetValue("Y", "0"));
var Width = int.Parse(map.GetValue("Width", "0"));
var Height = int.Parse(map.GetValue("Height", "0"));
MapSize = (legacyMapFormat == IniMapFormat.RedAlert) ? 128 : 64;
Map.Title = basic.GetValue("Name", "(null)");
Map.Author = "Westwood Studios";
Map.Tileset = Truncate(map.GetValue("Theater", "TEMPERAT"), 8);
Map.MapSize.X = MapSize;
Map.MapSize.Y = MapSize;
Map.TopLeft = new int2(XOffset, YOffset);
Map.BottomRight = new int2(XOffset + Width, YOffset + Height);
Map.Selectable = true;
if (legacyMapFormat == IniMapFormat.RedAlert)
{
UnpackRATileData(ReadPackedSection(file.GetSection("MapPack")));
UnpackRAOverlayData(ReadPackedSection(file.GetSection("OverlayPack")));
ReadRATrees(file);
}
else // CNC
{
UnpackCncTileData(FileSystem.Open(iniFile.Substring(0, iniFile.Length - 4) + ".bin"));
ReadCncOverlay(file);
ReadCncTrees(file);
}
LoadActors(file, "STRUCTURES");
LoadActors(file, "UNITS");
LoadActors(file, "INFANTRY");
LoadSmudges(file, "SMUDGE");
foreach (var p in Players)
LoadPlayer(file, p, (legacyMapFormat == IniMapFormat.RedAlert));
var wp = file.GetSection("Waypoints")
.Where(kv => int.Parse(kv.Value) > 0)
.Select(kv => Pair.New(int.Parse(kv.Key),
LocationFromMapOffset(int.Parse(kv.Value), MapSize)))
.ToArray();
Map.PlayerCount = wp.Count();
foreach (var kv in wp)
Map.Waypoints.Add("spawn" + kv.First, kv.Second);
}
static int2 LocationFromMapOffset(int offset, int mapSize)
{
return new int2(offset % mapSize, offset / mapSize);
}
static MemoryStream ReadPackedSection(IniSection mapPackSection)
{
StringBuilder sb = new StringBuilder();
for (int i = 1; ; i++)
{
string line = mapPackSection.GetValue(i.ToString(), null);
if (line == null)
break;
sb.Append(line.Trim());
}
byte[] data = Convert.FromBase64String(sb.ToString());
List<byte[]> chunks = new List<byte[]>();
BinaryReader reader = new BinaryReader(new MemoryStream(data));
try
{
while (true)
{
uint length = reader.ReadUInt32() & 0xdfffffff;
byte[] dest = new byte[8192];
byte[] src = reader.ReadBytes((int)length);
/*int actualLength =*/
Format80.DecodeInto(src, dest);
chunks.Add(dest);
}
}
catch (EndOfStreamException) { }
MemoryStream ms = new MemoryStream();
foreach (byte[] chunk in chunks)
ms.Write(chunk, 0, chunk.Length);
ms.Position = 0;
return ms;
}
static byte ReadByte(Stream s)
{
int ret = s.ReadByte();
if (ret == -1)
throw new NotImplementedException();
return (byte)ret;
}
static ushort ReadWord(Stream s)
{
ushort ret = ReadByte(s);
ret |= (ushort)(ReadByte(s) << 8);
return ret;
}
void UnpackRATileData(MemoryStream ms)
{
Map.MapTiles = new TileReference<ushort, byte>[MapSize, MapSize];
for (int i = 0; i < MapSize; i++)
for (int j = 0; j < MapSize; j++)
Map.MapTiles[i, j] = new TileReference<ushort, byte>();
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
Map.MapTiles[i, j].type = ReadWord(ms);
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
{
Map.MapTiles[i, j].index = ReadByte(ms);
if (Map.MapTiles[i, j].type == 0xff || Map.MapTiles[i, j].type == 0xffff)
Map.MapTiles[i, j].index = byte.MaxValue;
}
}
void UnpackRAOverlayData(MemoryStream ms)
{
Map.MapResources = new TileReference<byte, byte>[MapSize, MapSize];
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
{
byte o = ReadByte(ms);
var res = Pair.New((byte)0, (byte)0);
if (o != 255 && overlayResourceMapping.ContainsKey(raOverlayNames[o]))
res = overlayResourceMapping[raOverlayNames[o]];
Map.MapResources[i, j] = new TileReference<byte, byte>(res.First, res.Second);
if (o != 255 && overlayActorMapping.ContainsKey(raOverlayNames[o]))
Map.Actors.Add("Actor" + ActorCount++,
new ActorReference(overlayActorMapping[raOverlayNames[o]])
{
new LocationInit( new int2(i, j) ),
new OwnerInit( "Neutral" )
});
}
}
void ReadRATrees(IniFile file)
{
IniSection terrain = file.GetSection("TERRAIN", true);
if (terrain == null)
return;
foreach (KeyValuePair<string, string> kv in terrain)
{
var loc = int.Parse(kv.Key);
Map.Actors.Add("Actor" + ActorCount++,
new ActorReference(kv.Value.ToLowerInvariant())
{
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
new OwnerInit("Neutral")
});
}
}
void UnpackCncTileData(Stream ms)
{
Map.MapTiles = new TileReference<ushort, byte>[MapSize, MapSize];
for (int i = 0; i < MapSize; i++)
for (int j = 0; j < MapSize; j++)
Map.MapTiles[i, j] = new TileReference<ushort, byte>();
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
{
Map.MapTiles[i, j].type = ReadByte(ms);
Map.MapTiles[i, j].index = ReadByte(ms);
if (Map.MapTiles[i, j].type == 0xff)
Map.MapTiles[i, j].index = byte.MaxValue;
}
}
void ReadCncOverlay(IniFile file)
{
IniSection overlay = file.GetSection("OVERLAY", true);
if (overlay == null)
return;
Map.MapResources = new TileReference<byte, byte>[MapSize, MapSize];
foreach (KeyValuePair<string, string> kv in overlay)
{
var loc = int.Parse(kv.Key);
int2 cell = new int2(loc % MapSize, loc / MapSize);
var res = Pair.New((byte)0, (byte)0);
if (overlayResourceMapping.ContainsKey(kv.Value.ToLower()))
res = overlayResourceMapping[kv.Value.ToLower()];
Map.MapResources[cell.X, cell.Y] = new TileReference<byte, byte>(res.First, res.Second);
if (overlayActorMapping.ContainsKey(kv.Value.ToLower()))
Map.Actors.Add("Actor" + ActorCount++,
new ActorReference(overlayActorMapping[kv.Value.ToLower()])
{
new LocationInit(cell),
new OwnerInit("Neutral")
});
}
}
void ReadCncTrees(IniFile file)
{
IniSection terrain = file.GetSection("TERRAIN", true);
if (terrain == null)
return;
foreach (KeyValuePair<string, string> kv in terrain)
{
var loc = int.Parse(kv.Key);
Map.Actors.Add("Actor" + ActorCount++,
new ActorReference(kv.Value.Split(',')[0].ToLowerInvariant())
{
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
new OwnerInit("Neutral")
});
}
}
void LoadActors(IniFile file, string section)
{
foreach (var s in file.GetSection(section, true))
{
//Structures: num=owner,type,health,location,turret-facing,trigger
//Units: num=owner,type,health,location,facing,action,trigger
//Infantry: num=owner,type,health,location,subcell,action,facing,trigger
var parts = s.Value.Split(',');
var loc = int.Parse(parts[3]);
if (parts[0] == "")
parts[0] = "Neutral";
if (!Players.Contains(parts[0]))
Players.Add(parts[0]);
var stance = ActorStance.Stance.None;
switch(parts[5])
{
case "Area Guard":
case "Guard":
stance = ActorStance.Stance.Guard;
break;
case "Defend Base":
stance = ActorStance.Stance.Defend;
break;
case "Hunt":
case "Rampage":
case "Attack Base":
case "Attack Units":
case "Attack Civil.":
case "Attack Tarcom":
stance = ActorStance.Stance.Hunt;
break;
case "Retreat":
case "Return":
stance = ActorStance.Stance.Retreat;
break;
// do we care about `Harvest' and `Sticky'?
}
var actor = new ActorReference(parts[1].ToLowerInvariant())
{
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
new OwnerInit(parts[0]),
new HealthInit(float.Parse(parts[2], NumberFormatInfo.InvariantInfo)/256),
new FacingInit((section == "INFANTRY") ? int.Parse(parts[6]) : int.Parse(parts[4])),
new ActorStanceInit(stance),
};
if (section == "INFANTRY")
actor.Add(new SubcellInit(int.Parse(parts[4])));
Map.Actors.Add("Actor" + ActorCount++,actor);
}
}
void LoadSmudges(IniFile file, string section)
{
foreach (var s in file.GetSection(section, true))
{
//loc=type,loc,depth
var parts = s.Value.Split(',');
var loc = int.Parse(parts[1]);
Map.Smudges.Add(new SmudgeReference(parts[0].ToLowerInvariant(), new int2(loc % MapSize, loc / MapSize), int.Parse(parts[2])));
}
}
void LoadPlayer(IniFile file, string section, bool isRA)
{
var c = (section == "BadGuy") ? "red" :
(isRA) ? "blue" : "gold";
var color = namedColorMapping[c];
var pr = new PlayerReference
{
Name = section,
OwnsWorld = (section == "Neutral"),
NonCombatant = (section == "Neutral"),
Race = (isRA) ? ((section == "BadGuy") ? "soviet" : "allies") : ((section == "BadGuy") ? "nod" : "gdi"),
Color = color.First,
Color2 = color.Second,
};
var Neutral = new List<string>(){"Neutral"};
foreach (var s in file.GetSection(section, true))
{
Console.WriteLine(s.Key);
switch(s.Key)
{
case "Credits":
pr.InitialCash = int.Parse(s.Value);
break;
case "Allies":
pr.Allies = s.Value.Split(',').Intersect(Players).Except(Neutral).ToArray();
pr.Enemies = s.Value.Split(',').SymmetricDifference(Players).Except(Neutral).ToArray();
break;
}
}
Map.Players.Add(section, pr);
}
static string Truncate(string s, int maxLength)
{
return s.Length <= maxLength ? s : s.Substring(0, maxLength);
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Editor
{
public class LegacyMapImporter
{
// Mapping from ra overlay index to type string
static string[] raOverlayNames =
{
"sbag", "cycl", "brik", "fenc", "wood",
"gold01", "gold02", "gold03", "gold04",
"gem01", "gem02", "gem03", "gem04",
"v12", "v13", "v14", "v15", "v16", "v17", "v18",
"fpls", "wcrate", "scrate", "barb", "sbag",
};
static Dictionary<string, Pair<byte, byte>> overlayResourceMapping = new Dictionary<string, Pair<byte, byte>>()
{
// RA Gems, Gold
{ "gold01", new Pair<byte,byte>(1,0) },
{ "gold02", new Pair<byte,byte>(1,1) },
{ "gold03", new Pair<byte,byte>(1,2) },
{ "gold04", new Pair<byte,byte>(1,3) },
{ "gem01", new Pair<byte,byte>(2,0) },
{ "gem02", new Pair<byte,byte>(2,1) },
{ "gem03", new Pair<byte,byte>(2,2) },
{ "gem04", new Pair<byte,byte>(2,3) },
// cnc tiberium
{ "ti1", new Pair<byte,byte>(1,0) },
{ "ti2", new Pair<byte,byte>(1,1) },
{ "ti3", new Pair<byte,byte>(1,2) },
{ "ti4", new Pair<byte,byte>(1,3) },
{ "ti5", new Pair<byte,byte>(1,4) },
{ "ti6", new Pair<byte,byte>(1,5) },
{ "ti7", new Pair<byte,byte>(1,6) },
{ "ti8", new Pair<byte,byte>(1,7) },
{ "ti9", new Pair<byte,byte>(1,8) },
{ "ti10", new Pair<byte,byte>(1,9) },
{ "ti11", new Pair<byte,byte>(1,10) },
{ "ti12", new Pair<byte,byte>(1,11) },
};
static Dictionary<string, string> overlayActorMapping = new Dictionary<string, string>() {
// Fences
{"sbag","sbag"},
{"cycl","cycl"},
{"brik","brik"},
{"fenc","fenc"},
{"wood","wood"},
// Fields
{"v12","v12"},
{"v13","v13"},
{"v14","v14"},
{"v15","v15"},
{"v16","v16"},
{"v17","v17"},
{"v18","v18"},
// Crates
// {"wcrate","crate"},
// {"scrate","crate"},
};
// todo: fix this -- will have bitrotted pretty badly.
static Dictionary<string,Pair<Color,Color>> namedColorMapping = new Dictionary<string, Pair<Color, Color>>()
{
{"gold",Pair.New(Color.FromArgb(246,214,121),Color.FromArgb(40,32,8))},
{"blue",Pair.New(Color.FromArgb(226,230,246),Color.FromArgb(8,20,52))},
{"red",Pair.New(Color.FromArgb(255,20,0),Color.FromArgb(56,0,0))},
{"neutral",Pair.New(Color.FromArgb(238,238,238),Color.FromArgb(44,28,24))},
{"orange",Pair.New(Color.FromArgb(255,230,149),Color.FromArgb(56,0,0))},
{"teal",Pair.New(Color.FromArgb(93,194,165),Color.FromArgb(0,32,32))},
{"salmon",Pair.New(Color.FromArgb(210,153,125),Color.FromArgb(56,0,0))},
{"green",Pair.New(Color.FromArgb(160,240,140),Color.FromArgb(20,20,20))},
{"white",Pair.New(Color.FromArgb(255,255,255),Color.FromArgb(75,75,75))},
{"black",Pair.New(Color.FromArgb(80,80,80),Color.FromArgb(5,5,5))},
};
int MapSize;
int ActorCount = 0;
Map Map = new Map();
List<string> Players = new List<string>();
Action<string> errorHandler;
LegacyMapImporter(string filename, Action<string> errorHandler)
{
this.errorHandler = errorHandler;
ConvertIniMap(filename);
}
public static Map Import(string filename, Action<string> errorHandler)
{
var converter = new LegacyMapImporter(filename, errorHandler);
return converter.Map;
}
enum IniMapFormat { RedAlert = 3, /* otherwise, cnc (2 variants exist, we don't care to differentiate) */ };
public void ConvertIniMap(string iniFile)
{
var file = new IniFile(FileSystem.Open(iniFile));
var basic = file.GetSection("Basic");
var map = file.GetSection("Map");
var legacyMapFormat = (IniMapFormat)int.Parse(basic.GetValue("NewINIFormat", "0"));
var XOffset = int.Parse(map.GetValue("X", "0"));
var YOffset = int.Parse(map.GetValue("Y", "0"));
var Width = int.Parse(map.GetValue("Width", "0"));
var Height = int.Parse(map.GetValue("Height", "0"));
MapSize = (legacyMapFormat == IniMapFormat.RedAlert) ? 128 : 64;
Map.Title = basic.GetValue("Name", "(null)");
Map.Author = "Westwood Studios";
Map.Tileset = Truncate(map.GetValue("Theater", "TEMPERAT"), 8);
Map.MapSize.X = MapSize;
Map.MapSize.Y = MapSize;
Map.Bounds = Rectangle.FromLTRB(XOffset, YOffset, XOffset + Width, YOffset + Height);
Map.Selectable = true;
Map.Smudges = Lazy.New(() => new List<SmudgeReference>());
Map.Actors = Lazy.New(() => new Dictionary<string, ActorReference>());
Map.MapResources = Lazy.New(() => new TileReference<byte, byte>[MapSize, MapSize]);
Map.MapTiles = Lazy.New(() => new TileReference<ushort, byte>[MapSize, MapSize]);
if (legacyMapFormat == IniMapFormat.RedAlert)
{
UnpackRATileData(ReadPackedSection(file.GetSection("MapPack")));
UnpackRAOverlayData(ReadPackedSection(file.GetSection("OverlayPack")));
ReadRATrees(file);
}
else // CNC
{
UnpackCncTileData(FileSystem.Open(iniFile.Substring(0, iniFile.Length - 4) + ".bin"));
ReadCncOverlay(file);
ReadCncTrees(file);
}
LoadActors(file, "STRUCTURES");
LoadActors(file, "UNITS");
LoadActors(file, "INFANTRY");
LoadSmudges(file, "SMUDGE");
foreach (var p in Players)
LoadPlayer(file, p, (legacyMapFormat == IniMapFormat.RedAlert));
var wps = file.GetSection("Waypoints")
.Where(kv => int.Parse(kv.Value) > 0)
.Select(kv => Pair.New(int.Parse(kv.Key),
LocationFromMapOffset(int.Parse(kv.Value), MapSize)))
.ToArray();
// Add waypoint actors
foreach( var kv in wps )
{
var a = new ActorReference("waypoint");
a.Add(new LocationInit((CPos)kv.Second));
a.Add(new OwnerInit("Neutral"));
Map.Actors.Value.Add("waypoint" + kv.First, a);
}
}
static int2 LocationFromMapOffset(int offset, int mapSize)
{
return new int2(offset % mapSize, offset / mapSize);
}
static MemoryStream ReadPackedSection(IniSection mapPackSection)
{
var sb = new StringBuilder();
for (int i = 1; ; i++)
{
var line = mapPackSection.GetValue(i.ToString(), null);
if (line == null)
break;
sb.Append(line.Trim());
}
var data = Convert.FromBase64String(sb.ToString());
var chunks = new List<byte[]>();
var reader = new BinaryReader(new MemoryStream(data));
try
{
while (true)
{
var length = reader.ReadUInt32() & 0xdfffffff;
var dest = new byte[8192];
var src = reader.ReadBytes((int)length);
/*int actualLength =*/
Format80.DecodeInto(src, dest);
chunks.Add(dest);
}
}
catch (EndOfStreamException) { }
var ms = new MemoryStream();
foreach (var chunk in chunks)
ms.Write(chunk, 0, chunk.Length);
ms.Position = 0;
return ms;
}
static byte ReadByte(Stream s)
{
int ret = s.ReadByte();
if (ret == -1)
throw new NotImplementedException();
return (byte)ret;
}
static ushort ReadWord(Stream s)
{
ushort ret = ReadByte(s);
ret |= (ushort)(ReadByte(s) << 8);
return ret;
}
void UnpackRATileData(MemoryStream ms)
{
for (int i = 0; i < MapSize; i++)
for (int j = 0; j < MapSize; j++)
Map.MapTiles.Value[i, j] = new TileReference<ushort, byte>();
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
Map.MapTiles.Value[i, j].type = ReadWord(ms);
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
Map.MapTiles.Value[i, j].index = ReadByte(ms);
}
void UnpackRAOverlayData(MemoryStream ms)
{
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
{
byte o = ReadByte(ms);
var res = Pair.New((byte)0, (byte)0);
if (o != 255 && overlayResourceMapping.ContainsKey(raOverlayNames[o]))
res = overlayResourceMapping[raOverlayNames[o]];
Map.MapResources.Value[i, j] = new TileReference<byte, byte>(res.First, res.Second);
if (o != 255 && overlayActorMapping.ContainsKey(raOverlayNames[o]))
Map.Actors.Value.Add("Actor" + ActorCount++,
new ActorReference(overlayActorMapping[raOverlayNames[o]])
{
new LocationInit( new CPos(i, j) ),
new OwnerInit( "Neutral" )
});
}
}
void ReadRATrees(IniFile file)
{
var terrain = file.GetSection("TERRAIN", true);
if (terrain == null)
return;
foreach (KeyValuePair<string, string> kv in terrain)
{
var loc = int.Parse(kv.Key);
Map.Actors.Value.Add("Actor" + ActorCount++,
new ActorReference(kv.Value.ToLowerInvariant())
{
new LocationInit(new CPos(loc % MapSize, loc / MapSize)),
new OwnerInit("Neutral")
});
}
}
void UnpackCncTileData(Stream ms)
{
for (int i = 0; i < MapSize; i++)
for (int j = 0; j < MapSize; j++)
Map.MapTiles.Value[i, j] = new TileReference<ushort, byte>();
for (int j = 0; j < MapSize; j++)
for (int i = 0; i < MapSize; i++)
{
Map.MapTiles.Value[i, j].type = ReadByte(ms);
Map.MapTiles.Value[i, j].index = ReadByte(ms);
}
}
void ReadCncOverlay(IniFile file)
{
var overlay = file.GetSection("OVERLAY", true);
if (overlay == null)
return;
foreach (KeyValuePair<string, string> kv in overlay)
{
var loc = int.Parse(kv.Key);
var cell = new CPos(loc % MapSize, loc / MapSize);
var res = Pair.New((byte)0, (byte)0);
if (overlayResourceMapping.ContainsKey(kv.Value.ToLower()))
res = overlayResourceMapping[kv.Value.ToLower()];
Map.MapResources.Value[cell.X, cell.Y] = new TileReference<byte, byte>(res.First, res.Second);
if (overlayActorMapping.ContainsKey(kv.Value.ToLower()))
Map.Actors.Value.Add("Actor" + ActorCount++,
new ActorReference(overlayActorMapping[kv.Value.ToLower()])
{
new LocationInit(cell),
new OwnerInit("Neutral")
});
}
}
void ReadCncTrees(IniFile file)
{
var terrain = file.GetSection("TERRAIN", true);
if (terrain == null)
return;
foreach (KeyValuePair<string, string> kv in terrain)
{
var loc = int.Parse(kv.Key);
Map.Actors.Value.Add("Actor" + ActorCount++,
new ActorReference(kv.Value.Split(',')[0].ToLowerInvariant())
{
new LocationInit(new CPos(loc % MapSize, loc / MapSize)),
new OwnerInit("Neutral")
});
}
}
void LoadActors(IniFile file, string section)
{
foreach (var s in file.GetSection(section, true))
{
//Structures: num=owner,type,health,location,turret-facing,trigger
//Units: num=owner,type,health,location,facing,action,trigger
//Infantry: num=owner,type,health,location,subcell,action,facing,trigger
try
{
var parts = s.Value.Split(',');
var loc = int.Parse(parts[3]);
if (parts[0] == "")
parts[0] = "Neutral";
if (!Players.Contains(parts[0]))
Players.Add(parts[0]);
var actor = new ActorReference(parts[1].ToLowerInvariant())
{
new LocationInit(new CPos(loc % MapSize, loc / MapSize)),
new OwnerInit(parts[0]),
new HealthInit(float.Parse(parts[2], NumberFormatInfo.InvariantInfo)/256),
new FacingInit((section == "INFANTRY") ? int.Parse(parts[6]) : int.Parse(parts[4])),
};
if (section == "INFANTRY")
actor.Add(new SubCellInit(int.Parse(parts[4])));
if (!Rules.Info.ContainsKey(parts[1].ToLowerInvariant()))
errorHandler("Ignoring unknown actor type: `{0}`".F(parts[1].ToLowerInvariant()));
else
Map.Actors.Value.Add("Actor" + ActorCount++, actor);
}
catch (Exception)
{
errorHandler("Malformed actor definition: `{0}`".F(s));
}
}
}
void LoadSmudges(IniFile file, string section)
{
foreach (var s in file.GetSection(section, true))
{
//loc=type,loc,depth
var parts = s.Value.Split(',');
var loc = int.Parse(parts[1]);
Map.Smudges.Value.Add(new SmudgeReference(parts[0].ToLowerInvariant(), new int2(loc % MapSize, loc / MapSize), int.Parse(parts[2])));
}
}
void LoadPlayer(IniFile file, string section, bool isRA)
{
string c;
string race;
switch (section)
{
case "Spain":
c = "gold";
race = "allies";
break;
case "England":
c = "green";
race = "allies";
break;
case "Ukraine":
c = "orange";
race = "soviet";
break;
case "Germany":
c = "black";
race = "allies";
break;
case "France":
c = "teal";
race = "allies";
break;
case "Turkey":
c = "salmon";
race = "allies";
break;
case "Greece":
case "GoodGuy":
c = isRA? "blue" : "gold";
race = isRA ? "allies" : "gdi";
break;
case "USSR":
case "BadGuy":
c = "red";
race = isRA ? "soviet" : "nod";
break;
case "Special":
case "Neutral":
default:
c = "neutral";
race = isRA ? "allies" : "gdi";
break;
}
var color = namedColorMapping[c];
var pr = new PlayerReference
{
Name = section,
OwnsWorld = section == "Neutral",
NonCombatant = section == "Neutral",
Race = race,
ColorRamp = new ColorRamp(
(byte)((color.First.GetHue() / 360.0f) * 255),
(byte)(color.First.GetSaturation() * 255),
(byte)(color.First.GetBrightness() * 255),
(byte)(color.Second.GetBrightness() * 255))
};
var neutral = new [] {"Neutral"};
foreach (var s in file.GetSection(section, true))
{
Console.WriteLine(s.Key);
switch(s.Key)
{
case "Credits":
pr.InitialCash = int.Parse(s.Value);
break;
case "Allies":
pr.Allies = s.Value.Split(',').Intersect(Players).Except(neutral).ToArray();
pr.Enemies = s.Value.Split(',').SymmetricDifference(Players).Except(neutral).ToArray();
break;
}
}
Map.Players.Add(section, pr);
}
static string Truncate(string s, int maxLength)
{
return s.Length <= maxLength ? s : s.Substring(0, maxLength);
}
}
}

View File

@@ -1,375 +1,385 @@
namespace OpenRA.Editor
{
partial class MapSelect
{
/// <summary>
/// TODO
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// TODO
/// </summary>
/// <param name="disposing">TODO</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// TODO
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect));
this.MapList = new System.Windows.Forms.ListView();
this.colMapName = new System.Windows.Forms.ColumnHeader("(отсутствует)");
this.MapIconsList = new System.Windows.Forms.ImageList(this.components);
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.lblNew = new System.Windows.Forms.Label();
this.txtNew = new System.Windows.Forms.TextBox();
this.pbMinimap = new System.Windows.Forms.PictureBox();
this.pnlBottom = new System.Windows.Forms.Panel();
this.txtPathOut = new System.Windows.Forms.TextBox();
this.lblPathOut = new System.Windows.Forms.Label();
this.lblPath = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.lblMapList = new System.Windows.Forms.Label();
this.txtDesc = new System.Windows.Forms.TextBox();
this.lblDesc = new System.Windows.Forms.Label();
this.txtTheater = new System.Windows.Forms.TextBox();
this.lblTheater = new System.Windows.Forms.Label();
this.txtAuthor = new System.Windows.Forms.TextBox();
this.lblAuthor = new System.Windows.Forms.Label();
this.txtTitle = new System.Windows.Forms.TextBox();
this.lblMapName = new System.Windows.Forms.Label();
this.lblMinimap = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit();
this.pnlBottom.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// MapList
//
this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colMapName});
this.MapList.FullRowSelect = true;
this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.MapList.LargeImageList = this.MapIconsList;
this.MapList.Location = new System.Drawing.Point(15, 25);
this.MapList.MultiSelect = false;
this.MapList.Name = "MapList";
this.MapList.Size = new System.Drawing.Size(273, 294);
this.MapList.SmallImageList = this.MapIconsList;
this.MapList.StateImageList = this.MapIconsList;
this.MapList.TabIndex = 0;
this.MapList.UseCompatibleStateImageBehavior = false;
this.MapList.View = System.Windows.Forms.View.Details;
this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged);
//
// colMapName
//
this.colMapName.Text = "Map name";
this.colMapName.Width = 240;
//
// MapIconsList
//
this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24);
this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent;
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(407, 35);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Location = new System.Drawing.Point(326, 35);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Open";
this.btnOk.UseVisualStyleBackColor = true;
//
// lblNew
//
this.lblNew.AutoSize = true;
this.lblNew.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblNew.Location = new System.Drawing.Point(12, 40);
this.lblNew.Name = "lblNew";
this.lblNew.Size = new System.Drawing.Size(69, 13);
this.lblNew.TabIndex = 3;
this.lblNew.Text = "Map name:";
//
// txtNew
//
this.txtNew.BackColor = System.Drawing.SystemColors.Window;
this.txtNew.Location = new System.Drawing.Point(88, 37);
this.txtNew.Name = "txtNew";
this.txtNew.ReadOnly = true;
this.txtNew.Size = new System.Drawing.Size(232, 20);
this.txtNew.TabIndex = 1;
//
// pbMinimap
//
this.pbMinimap.BackColor = System.Drawing.Color.Black;
this.pbMinimap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pbMinimap.Location = new System.Drawing.Point(32, 25);
this.pbMinimap.Name = "pbMinimap";
this.pbMinimap.Size = new System.Drawing.Size(124, 124);
this.pbMinimap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbMinimap.TabIndex = 5;
this.pbMinimap.TabStop = false;
//
// pnlBottom
//
this.pnlBottom.Controls.Add(this.pictureBox1);
this.pnlBottom.Controls.Add(this.txtPathOut);
this.pnlBottom.Controls.Add(this.lblPathOut);
this.pnlBottom.Controls.Add(this.lblPath);
this.pnlBottom.Controls.Add(this.btnCancel);
this.pnlBottom.Controls.Add(this.btnOk);
this.pnlBottom.Controls.Add(this.txtNew);
this.pnlBottom.Controls.Add(this.lblNew);
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(0, 332);
this.pnlBottom.MaximumSize = new System.Drawing.Size(0, 70);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(494, 70);
this.pnlBottom.TabIndex = 6;
//
// txtPathOut
//
this.txtPathOut.BackColor = System.Drawing.SystemColors.Window;
this.txtPathOut.Location = new System.Drawing.Point(55, 10);
this.txtPathOut.Name = "txtPathOut";
this.txtPathOut.ReadOnly = true;
this.txtPathOut.Size = new System.Drawing.Size(265, 20);
this.txtPathOut.TabIndex = 0;
this.txtPathOut.TextChanged += new System.EventHandler(this.txtPathOut_TextChanged);
//
// lblPathOut
//
this.lblPathOut.AutoSize = true;
this.lblPathOut.Location = new System.Drawing.Point(55, 13);
this.lblPathOut.Name = "lblPathOut";
this.lblPathOut.Size = new System.Drawing.Size(0, 13);
this.lblPathOut.TabIndex = 6;
//
// lblPath
//
this.lblPath.AutoSize = true;
this.lblPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblPath.Location = new System.Drawing.Point(12, 13);
this.lblPath.Name = "lblPath";
this.lblPath.Size = new System.Drawing.Size(37, 13);
this.lblPath.TabIndex = 5;
this.lblPath.Text = "Path:";
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lblMapList);
this.splitContainer1.Panel1.Controls.Add(this.MapList);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.txtDesc);
this.splitContainer1.Panel2.Controls.Add(this.lblDesc);
this.splitContainer1.Panel2.Controls.Add(this.txtTheater);
this.splitContainer1.Panel2.Controls.Add(this.lblTheater);
this.splitContainer1.Panel2.Controls.Add(this.txtAuthor);
this.splitContainer1.Panel2.Controls.Add(this.lblAuthor);
this.splitContainer1.Panel2.Controls.Add(this.txtTitle);
this.splitContainer1.Panel2.Controls.Add(this.lblMapName);
this.splitContainer1.Panel2.Controls.Add(this.lblMinimap);
this.splitContainer1.Panel2.Controls.Add(this.pbMinimap);
this.splitContainer1.Size = new System.Drawing.Size(494, 332);
this.splitContainer1.SplitterDistance = 300;
this.splitContainer1.TabIndex = 7;
//
// lblMapList
//
this.lblMapList.AutoSize = true;
this.lblMapList.Location = new System.Drawing.Point(12, 9);
this.lblMapList.Name = "lblMapList";
this.lblMapList.Size = new System.Drawing.Size(81, 13);
this.lblMapList.TabIndex = 1;
this.lblMapList.Text = "Available maps:";
//
// txtDesc
//
this.txtDesc.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtDesc.Location = new System.Drawing.Point(16, 289);
this.txtDesc.Name = "txtDesc";
this.txtDesc.ReadOnly = true;
this.txtDesc.Size = new System.Drawing.Size(162, 20);
this.txtDesc.TabIndex = 14;
//
// lblDesc
//
this.lblDesc.AutoSize = true;
this.lblDesc.Location = new System.Drawing.Point(13, 273);
this.lblDesc.Name = "lblDesc";
this.lblDesc.Size = new System.Drawing.Size(63, 13);
this.lblDesc.TabIndex = 13;
this.lblDesc.Text = "Description:";
//
// txtTheater
//
this.txtTheater.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtTheater.Location = new System.Drawing.Point(16, 252);
this.txtTheater.Name = "txtTheater";
this.txtTheater.ReadOnly = true;
this.txtTheater.Size = new System.Drawing.Size(162, 20);
this.txtTheater.TabIndex = 12;
//
// lblTheater
//
this.lblTheater.AutoSize = true;
this.lblTheater.Location = new System.Drawing.Point(13, 236);
this.lblTheater.Name = "lblTheater";
this.lblTheater.Size = new System.Drawing.Size(47, 13);
this.lblTheater.TabIndex = 11;
this.lblTheater.Text = "Theater:";
//
// txtAuthor
//
this.txtAuthor.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtAuthor.Location = new System.Drawing.Point(16, 214);
this.txtAuthor.Name = "txtAuthor";
this.txtAuthor.ReadOnly = true;
this.txtAuthor.Size = new System.Drawing.Size(162, 20);
this.txtAuthor.TabIndex = 10;
//
// lblAuthor
//
this.lblAuthor.AutoSize = true;
this.lblAuthor.Location = new System.Drawing.Point(13, 198);
this.lblAuthor.Name = "lblAuthor";
this.lblAuthor.Size = new System.Drawing.Size(41, 13);
this.lblAuthor.TabIndex = 9;
this.lblAuthor.Text = "Author:";
//
// txtTitle
//
this.txtTitle.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtTitle.Location = new System.Drawing.Point(16, 177);
this.txtTitle.Name = "txtTitle";
this.txtTitle.ReadOnly = true;
this.txtTitle.Size = new System.Drawing.Size(162, 20);
this.txtTitle.TabIndex = 8;
//
// lblMapName
//
this.lblMapName.AutoSize = true;
this.lblMapName.Location = new System.Drawing.Point(13, 161);
this.lblMapName.Name = "lblMapName";
this.lblMapName.Size = new System.Drawing.Size(30, 13);
this.lblMapName.TabIndex = 7;
this.lblMapName.Text = "Title:";
//
// lblMinimap
//
this.lblMinimap.AutoSize = true;
this.lblMinimap.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblMinimap.Location = new System.Drawing.Point(29, 9);
this.lblMinimap.Name = "lblMinimap";
this.lblMinimap.Size = new System.Drawing.Size(71, 13);
this.lblMinimap.TabIndex = 6;
this.lblMinimap.Text = "Map preview:";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(336, -9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(54, 35);
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
//
// MapSelect
//
this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(494, 402);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.pnlBottom);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MapSelect";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Select map";
this.Load += new System.EventHandler(this.MapSelect_Load);
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).EndInit();
this.pnlBottom.ResumeLayout(false);
this.pnlBottom.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
public System.Windows.Forms.ListView MapList;
public System.Windows.Forms.Button btnCancel;
public System.Windows.Forms.Button btnOk;
public System.Windows.Forms.Label lblNew;
public System.Windows.Forms.TextBox txtNew;
public System.Windows.Forms.ColumnHeader colMapName;
public System.Windows.Forms.ImageList MapIconsList;
public System.Windows.Forms.PictureBox pbMinimap;
public System.Windows.Forms.Panel pnlBottom;
public System.Windows.Forms.SplitContainer splitContainer1;
public System.Windows.Forms.Label lblMinimap;
public System.Windows.Forms.TextBox txtTheater;
public System.Windows.Forms.Label lblTheater;
public System.Windows.Forms.TextBox txtAuthor;
public System.Windows.Forms.Label lblAuthor;
public System.Windows.Forms.TextBox txtTitle;
public System.Windows.Forms.Label lblMapName;
public System.Windows.Forms.TextBox txtDesc;
public System.Windows.Forms.Label lblDesc;
public System.Windows.Forms.Label lblMapList;
public System.Windows.Forms.Label lblPathOut;
public System.Windows.Forms.Label lblPath;
public System.Windows.Forms.TextBox txtPathOut;
private System.Windows.Forms.PictureBox pictureBox1;
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class MapSelect
{
/// <summary>
/// TODO
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// TODO
/// </summary>
/// <param name="disposing">TODO</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// TODO
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapSelect));
this.MapList = new System.Windows.Forms.ListView();
this.colMapName = new System.Windows.Forms.ColumnHeader("(отсутствует)");
this.MapIconsList = new System.Windows.Forms.ImageList(this.components);
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.lblNew = new System.Windows.Forms.Label();
this.txtNew = new System.Windows.Forms.TextBox();
this.pbMinimap = new System.Windows.Forms.PictureBox();
this.pnlBottom = new System.Windows.Forms.Panel();
this.txtPathOut = new System.Windows.Forms.TextBox();
this.lblPathOut = new System.Windows.Forms.Label();
this.lblPath = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.lblMapList = new System.Windows.Forms.Label();
this.txtDesc = new System.Windows.Forms.TextBox();
this.lblDesc = new System.Windows.Forms.Label();
this.txtTheater = new System.Windows.Forms.TextBox();
this.lblTheater = new System.Windows.Forms.Label();
this.txtAuthor = new System.Windows.Forms.TextBox();
this.lblAuthor = new System.Windows.Forms.Label();
this.txtTitle = new System.Windows.Forms.TextBox();
this.lblMapName = new System.Windows.Forms.Label();
this.lblMinimap = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).BeginInit();
this.pnlBottom.SuspendLayout();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// MapList
//
this.MapList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.MapList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colMapName});
this.MapList.FullRowSelect = true;
this.MapList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.MapList.LargeImageList = this.MapIconsList;
this.MapList.Location = new System.Drawing.Point(15, 25);
this.MapList.MultiSelect = false;
this.MapList.Name = "MapList";
this.MapList.Size = new System.Drawing.Size(273, 294);
this.MapList.SmallImageList = this.MapIconsList;
this.MapList.StateImageList = this.MapIconsList;
this.MapList.TabIndex = 0;
this.MapList.UseCompatibleStateImageBehavior = false;
this.MapList.View = System.Windows.Forms.View.Details;
this.MapList.SelectedIndexChanged += new System.EventHandler(this.MapList_SelectedIndexChanged);
//
// colMapName
//
this.colMapName.Text = "Map name";
this.colMapName.Width = 240;
//
// MapIconsList
//
this.MapIconsList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.MapIconsList.ImageSize = new System.Drawing.Size(24, 24);
this.MapIconsList.TransparentColor = System.Drawing.Color.Transparent;
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(407, 35);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOk
//
this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOk.Location = new System.Drawing.Point(326, 35);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(75, 23);
this.btnOk.TabIndex = 2;
this.btnOk.Text = "Open";
this.btnOk.UseVisualStyleBackColor = true;
//
// lblNew
//
this.lblNew.AutoSize = true;
this.lblNew.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblNew.Location = new System.Drawing.Point(12, 40);
this.lblNew.Name = "lblNew";
this.lblNew.Size = new System.Drawing.Size(69, 13);
this.lblNew.TabIndex = 3;
this.lblNew.Text = "Map name:";
//
// txtNew
//
this.txtNew.BackColor = System.Drawing.SystemColors.Window;
this.txtNew.Location = new System.Drawing.Point(88, 37);
this.txtNew.Name = "txtNew";
this.txtNew.ReadOnly = true;
this.txtNew.Size = new System.Drawing.Size(232, 20);
this.txtNew.TabIndex = 1;
//
// pbMinimap
//
this.pbMinimap.BackColor = System.Drawing.Color.Black;
this.pbMinimap.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pbMinimap.Location = new System.Drawing.Point(32, 25);
this.pbMinimap.Name = "pbMinimap";
this.pbMinimap.Size = new System.Drawing.Size(124, 124);
this.pbMinimap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbMinimap.TabIndex = 5;
this.pbMinimap.TabStop = false;
//
// pnlBottom
//
this.pnlBottom.Controls.Add(this.pictureBox1);
this.pnlBottom.Controls.Add(this.txtPathOut);
this.pnlBottom.Controls.Add(this.lblPathOut);
this.pnlBottom.Controls.Add(this.lblPath);
this.pnlBottom.Controls.Add(this.btnCancel);
this.pnlBottom.Controls.Add(this.btnOk);
this.pnlBottom.Controls.Add(this.txtNew);
this.pnlBottom.Controls.Add(this.lblNew);
this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlBottom.Location = new System.Drawing.Point(0, 332);
this.pnlBottom.MaximumSize = new System.Drawing.Size(0, 70);
this.pnlBottom.Name = "pnlBottom";
this.pnlBottom.Size = new System.Drawing.Size(494, 70);
this.pnlBottom.TabIndex = 6;
//
// txtPathOut
//
this.txtPathOut.BackColor = System.Drawing.SystemColors.Window;
this.txtPathOut.Location = new System.Drawing.Point(55, 10);
this.txtPathOut.Name = "txtPathOut";
this.txtPathOut.ReadOnly = true;
this.txtPathOut.Size = new System.Drawing.Size(265, 20);
this.txtPathOut.TabIndex = 0;
this.txtPathOut.TextChanged += new System.EventHandler(this.txtPathOut_TextChanged);
//
// lblPathOut
//
this.lblPathOut.AutoSize = true;
this.lblPathOut.Location = new System.Drawing.Point(55, 13);
this.lblPathOut.Name = "lblPathOut";
this.lblPathOut.Size = new System.Drawing.Size(0, 13);
this.lblPathOut.TabIndex = 6;
//
// lblPath
//
this.lblPath.AutoSize = true;
this.lblPath.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblPath.Location = new System.Drawing.Point(12, 13);
this.lblPath.Name = "lblPath";
this.lblPath.Size = new System.Drawing.Size(37, 13);
this.lblPath.TabIndex = 5;
this.lblPath.Text = "Path:";
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.lblMapList);
this.splitContainer1.Panel1.Controls.Add(this.MapList);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.txtDesc);
this.splitContainer1.Panel2.Controls.Add(this.lblDesc);
this.splitContainer1.Panel2.Controls.Add(this.txtTheater);
this.splitContainer1.Panel2.Controls.Add(this.lblTheater);
this.splitContainer1.Panel2.Controls.Add(this.txtAuthor);
this.splitContainer1.Panel2.Controls.Add(this.lblAuthor);
this.splitContainer1.Panel2.Controls.Add(this.txtTitle);
this.splitContainer1.Panel2.Controls.Add(this.lblMapName);
this.splitContainer1.Panel2.Controls.Add(this.lblMinimap);
this.splitContainer1.Panel2.Controls.Add(this.pbMinimap);
this.splitContainer1.Size = new System.Drawing.Size(494, 332);
this.splitContainer1.SplitterDistance = 300;
this.splitContainer1.TabIndex = 7;
//
// lblMapList
//
this.lblMapList.AutoSize = true;
this.lblMapList.Location = new System.Drawing.Point(12, 9);
this.lblMapList.Name = "lblMapList";
this.lblMapList.Size = new System.Drawing.Size(81, 13);
this.lblMapList.TabIndex = 1;
this.lblMapList.Text = "Available maps:";
//
// txtDesc
//
this.txtDesc.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtDesc.Location = new System.Drawing.Point(16, 289);
this.txtDesc.Name = "txtDesc";
this.txtDesc.ReadOnly = true;
this.txtDesc.Size = new System.Drawing.Size(162, 20);
this.txtDesc.TabIndex = 14;
//
// lblDesc
//
this.lblDesc.AutoSize = true;
this.lblDesc.Location = new System.Drawing.Point(13, 273);
this.lblDesc.Name = "lblDesc";
this.lblDesc.Size = new System.Drawing.Size(63, 13);
this.lblDesc.TabIndex = 13;
this.lblDesc.Text = "Description:";
//
// txtTheater
//
this.txtTheater.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtTheater.Location = new System.Drawing.Point(16, 252);
this.txtTheater.Name = "txtTheater";
this.txtTheater.ReadOnly = true;
this.txtTheater.Size = new System.Drawing.Size(162, 20);
this.txtTheater.TabIndex = 12;
//
// lblTheater
//
this.lblTheater.AutoSize = true;
this.lblTheater.Location = new System.Drawing.Point(13, 236);
this.lblTheater.Name = "lblTheater";
this.lblTheater.Size = new System.Drawing.Size(47, 13);
this.lblTheater.TabIndex = 11;
this.lblTheater.Text = "Tileset:";
//
// txtAuthor
//
this.txtAuthor.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtAuthor.Location = new System.Drawing.Point(16, 214);
this.txtAuthor.Name = "txtAuthor";
this.txtAuthor.ReadOnly = true;
this.txtAuthor.Size = new System.Drawing.Size(162, 20);
this.txtAuthor.TabIndex = 10;
//
// lblAuthor
//
this.lblAuthor.AutoSize = true;
this.lblAuthor.Location = new System.Drawing.Point(13, 198);
this.lblAuthor.Name = "lblAuthor";
this.lblAuthor.Size = new System.Drawing.Size(41, 13);
this.lblAuthor.TabIndex = 9;
this.lblAuthor.Text = "Author:";
//
// txtTitle
//
this.txtTitle.BackColor = System.Drawing.SystemColors.ButtonFace;
this.txtTitle.Location = new System.Drawing.Point(16, 177);
this.txtTitle.Name = "txtTitle";
this.txtTitle.ReadOnly = true;
this.txtTitle.Size = new System.Drawing.Size(162, 20);
this.txtTitle.TabIndex = 8;
//
// lblMapName
//
this.lblMapName.AutoSize = true;
this.lblMapName.Location = new System.Drawing.Point(13, 161);
this.lblMapName.Name = "lblMapName";
this.lblMapName.Size = new System.Drawing.Size(30, 13);
this.lblMapName.TabIndex = 7;
this.lblMapName.Text = "Title:";
//
// lblMinimap
//
this.lblMinimap.AutoSize = true;
this.lblMinimap.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.lblMinimap.Location = new System.Drawing.Point(29, 9);
this.lblMinimap.Name = "lblMinimap";
this.lblMinimap.Size = new System.Drawing.Size(71, 13);
this.lblMinimap.TabIndex = 6;
this.lblMinimap.Text = "Map preview:";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(336, -9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(54, 35);
this.pictureBox1.TabIndex = 7;
this.pictureBox1.TabStop = false;
this.pictureBox1.Visible = false;
//
// MapSelect
//
this.AcceptButton = this.btnOk;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(494, 402);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.pnlBottom);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MapSelect";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Select map";
this.Load += new System.EventHandler(this.MapSelect_Load);
((System.ComponentModel.ISupportInitialize)(this.pbMinimap)).EndInit();
this.pnlBottom.ResumeLayout(false);
this.pnlBottom.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
}
#endregion
public System.Windows.Forms.ListView MapList;
public System.Windows.Forms.Button btnCancel;
public System.Windows.Forms.Button btnOk;
public System.Windows.Forms.Label lblNew;
public System.Windows.Forms.TextBox txtNew;
public System.Windows.Forms.ColumnHeader colMapName;
public System.Windows.Forms.ImageList MapIconsList;
public System.Windows.Forms.PictureBox pbMinimap;
public System.Windows.Forms.Panel pnlBottom;
public System.Windows.Forms.SplitContainer splitContainer1;
public System.Windows.Forms.Label lblMinimap;
public System.Windows.Forms.TextBox txtTheater;
public System.Windows.Forms.Label lblTheater;
public System.Windows.Forms.TextBox txtAuthor;
public System.Windows.Forms.Label lblAuthor;
public System.Windows.Forms.TextBox txtTitle;
public System.Windows.Forms.Label lblMapName;
public System.Windows.Forms.TextBox txtDesc;
public System.Windows.Forms.Label lblDesc;
public System.Windows.Forms.Label lblMapList;
public System.Windows.Forms.Label lblPathOut;
public System.Windows.Forms.Label lblPath;
public System.Windows.Forms.TextBox txtPathOut;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@@ -1,66 +1,93 @@
using System;
using System.IO;
using System.Windows.Forms;
using OpenRA.FileFormats;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public partial class MapSelect : Form
{
public string MapFolderPath;
public MapSelect()
{
InitializeComponent();
MapIconsList.Images.Add(pictureBox1.Image);
}
void MapSelect_Load(object sender, EventArgs e)
{
DirectoryInfo directory = new DirectoryInfo(MapFolderPath);
DirectoryInfo[] directories = directory.GetDirectories();
MapList.Items.Clear();
txtPathOut.Text = MapFolderPath;
foreach (DirectoryInfo subDirectory in directories)
{
ListViewItem map1 = new ListViewItem(subDirectory.Name);
map1.ImageIndex = 0;
MapList.Items.Add(map1);
}
// hack
if (txtNew.Text != "unnamed")
MapList.Items[0].Selected = true;
}
void MapList_SelectedIndexChanged(object sender, EventArgs e)
{
if (MapList.SelectedItems.Count == 1)
{
txtNew.Text = MapList.SelectedItems[0].Text;
var map = new Map(new Folder(Path.Combine(MapFolderPath, MapList.SelectedItems[0].Text)));
txtTitle.Text = map.Title;
txtAuthor.Text = map.Author;
txtTheater.Text = map.Theater;
txtDesc.Text = map.Description;
pbMinimap.Image = null;
try
{
pbMinimap.Image = Minimap.AddStaticResources(map, Minimap.TerrainBitmap(map, true));
}
catch (Exception ed)
{
Console.WriteLine("No map preview image found: {0}", ed.ToString());
}
finally { }
}
}
void txtPathOut_TextChanged(object sender, EventArgs e)
{
MapFolderPath = txtPathOut.Text;
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.Graphics;
namespace OpenRA.Editor
{
public partial class MapSelect : Form
{
public string MapFolderPath;
public bool DirectoryIsEmpty(string path)
{
return !Directory.GetFileSystemEntries(path).Any();
}
public MapSelect(string currentMod)
{
MapFolderPath = new string[] { Platform.SupportDir, "maps", currentMod }
.Aggregate(Path.Combine);
if (!Directory.Exists(MapFolderPath))
Directory.CreateDirectory(MapFolderPath);
InitializeComponent();
MapIconsList.Images.Add(pictureBox1.Image);
}
void MapSelect_Load(object sender, EventArgs e)
{
MapList.Items.Clear();
txtPathOut.Text = MapFolderPath;
if (DirectoryIsEmpty(MapFolderPath))
return;
foreach (var map in ModData.FindMapsIn(MapFolderPath))
{
ListViewItem map1 = new ListViewItem();
map1.Tag = map;
map1.Text = Path.GetFileNameWithoutExtension(map);
map1.ImageIndex = 0;
MapList.Items.Add(map1);
}
// hack
if (txtNew.Text != "unnamed")
MapList.Items[0].Selected = true;
}
void MapList_SelectedIndexChanged(object sender, EventArgs e)
{
if (MapList.SelectedItems.Count == 1)
{
txtNew.Text = MapList.SelectedItems[0].Text;
txtNew.Tag = MapList.SelectedItems[0].Tag;
var map = new Map(txtNew.Tag as string);
txtTitle.Text = map.Title;
txtAuthor.Text = map.Author;
txtTheater.Text = map.Tileset;
txtDesc.Text = map.Description;
pbMinimap.Image = null;
try
{
pbMinimap.Image = Minimap.AddStaticResources(map, Minimap.TerrainBitmap(map, true));
}
catch (Exception ed)
{
Console.WriteLine("No map preview image found: {0}", ed.ToString());
}
finally { }
}
}
void txtPathOut_TextChanged(object sender, EventArgs e)
{
MapFolderPath = txtPathOut.Text;
}
}
}

View File

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

View File

@@ -1,286 +1,296 @@
namespace OpenRA.Editor
{
partial class NewMapDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.cordonBottom = new System.Windows.Forms.NumericUpDown();
this.cordonTop = new System.Windows.Forms.NumericUpDown();
this.cordonRight = new System.Windows.Forms.NumericUpDown();
this.cordonLeft = new System.Windows.Forms.NumericUpDown();
this.height = new System.Windows.Forms.NumericUpDown();
this.width = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.theater = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit();
this.SuspendLayout();
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(229, 160);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(310, 160);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 8;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 77);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Cordon Right/Bottom";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(31, 51);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 11;
this.label2.Text = "Cordon Left/Top";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(31, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Size";
//
// cordonBottom
//
this.cordonBottom.Location = new System.Drawing.Point(280, 75);
this.cordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonBottom.Name = "cordonBottom";
this.cordonBottom.Size = new System.Drawing.Size(105, 20);
this.cordonBottom.TabIndex = 5;
this.cordonBottom.Value = new decimal(new int[] {
112,
0,
0,
0});
this.cordonBottom.Enter += new System.EventHandler(this.SelectText);
//
// cordonTop
//
this.cordonTop.Location = new System.Drawing.Point(280, 49);
this.cordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonTop.Name = "cordonTop";
this.cordonTop.Size = new System.Drawing.Size(105, 20);
this.cordonTop.TabIndex = 3;
this.cordonTop.Value = new decimal(new int[] {
16,
0,
0,
0});
this.cordonTop.Enter += new System.EventHandler(this.SelectText);
//
// cordonRight
//
this.cordonRight.Location = new System.Drawing.Point(169, 75);
this.cordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonRight.Name = "cordonRight";
this.cordonRight.Size = new System.Drawing.Size(105, 20);
this.cordonRight.TabIndex = 4;
this.cordonRight.Value = new decimal(new int[] {
112,
0,
0,
0});
this.cordonRight.Enter += new System.EventHandler(this.SelectText);
//
// cordonLeft
//
this.cordonLeft.Location = new System.Drawing.Point(169, 49);
this.cordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonLeft.Name = "cordonLeft";
this.cordonLeft.Size = new System.Drawing.Size(105, 20);
this.cordonLeft.TabIndex = 2;
this.cordonLeft.Value = new decimal(new int[] {
16,
0,
0,
0});
this.cordonLeft.Enter += new System.EventHandler(this.SelectText);
//
// height
//
this.height.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.height.Location = new System.Drawing.Point(280, 23);
this.height.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.height.Name = "height";
this.height.Size = new System.Drawing.Size(105, 20);
this.height.TabIndex = 1;
this.height.Value = new decimal(new int[] {
128,
0,
0,
0});
this.height.Enter += new System.EventHandler(this.SelectText);
//
// width
//
this.width.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.width.Location = new System.Drawing.Point(169, 23);
this.width.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.width.Name = "width";
this.width.Size = new System.Drawing.Size(105, 20);
this.width.TabIndex = 0;
this.width.Value = new decimal(new int[] {
128,
0,
0,
0});
this.width.Enter += new System.EventHandler(this.SelectText);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 124);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 13);
this.label4.TabIndex = 14;
this.label4.Text = "Theater";
//
// theater
//
this.theater.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.theater.FormattingEnabled = true;
this.theater.Location = new System.Drawing.Point(169, 121);
this.theater.Name = "theater";
this.theater.Size = new System.Drawing.Size(216, 21);
this.theater.TabIndex = 6;
//
// NewMapDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(418, 210);
this.Controls.Add(this.theater);
this.Controls.Add(this.label4);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cordonBottom);
this.Controls.Add(this.cordonTop);
this.Controls.Add(this.cordonRight);
this.Controls.Add(this.cordonLeft);
this.Controls.Add(this.height);
this.Controls.Add(this.width);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "NewMapDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "New Map";
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.height)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.width)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.NumericUpDown cordonBottom;
public System.Windows.Forms.NumericUpDown cordonTop;
public System.Windows.Forms.NumericUpDown cordonRight;
public System.Windows.Forms.NumericUpDown cordonLeft;
public System.Windows.Forms.NumericUpDown height;
public System.Windows.Forms.NumericUpDown width;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.ComboBox theater;
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class NewMapDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.cordonBottom = new System.Windows.Forms.NumericUpDown();
this.cordonTop = new System.Windows.Forms.NumericUpDown();
this.cordonRight = new System.Windows.Forms.NumericUpDown();
this.cordonLeft = new System.Windows.Forms.NumericUpDown();
this.height = new System.Windows.Forms.NumericUpDown();
this.width = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
this.theater = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit();
this.SuspendLayout();
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(229, 160);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(310, 160);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 8;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 77);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 9;
this.label3.Text = "Cordon Right/Bottom";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(31, 51);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 11;
this.label2.Text = "Cordon Left/Top";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(31, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Size";
//
// cordonBottom
//
this.cordonBottom.Location = new System.Drawing.Point(280, 75);
this.cordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonBottom.Name = "cordonBottom";
this.cordonBottom.Size = new System.Drawing.Size(105, 20);
this.cordonBottom.TabIndex = 5;
this.cordonBottom.Value = new decimal(new int[] {
112,
0,
0,
0});
this.cordonBottom.Enter += new System.EventHandler(this.SelectText);
//
// cordonTop
//
this.cordonTop.Location = new System.Drawing.Point(280, 49);
this.cordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonTop.Name = "cordonTop";
this.cordonTop.Size = new System.Drawing.Size(105, 20);
this.cordonTop.TabIndex = 3;
this.cordonTop.Value = new decimal(new int[] {
16,
0,
0,
0});
this.cordonTop.Enter += new System.EventHandler(this.SelectText);
//
// cordonRight
//
this.cordonRight.Location = new System.Drawing.Point(169, 75);
this.cordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonRight.Name = "cordonRight";
this.cordonRight.Size = new System.Drawing.Size(105, 20);
this.cordonRight.TabIndex = 4;
this.cordonRight.Value = new decimal(new int[] {
112,
0,
0,
0});
this.cordonRight.Enter += new System.EventHandler(this.SelectText);
//
// cordonLeft
//
this.cordonLeft.Location = new System.Drawing.Point(169, 49);
this.cordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonLeft.Name = "cordonLeft";
this.cordonLeft.Size = new System.Drawing.Size(105, 20);
this.cordonLeft.TabIndex = 2;
this.cordonLeft.Value = new decimal(new int[] {
16,
0,
0,
0});
this.cordonLeft.Enter += new System.EventHandler(this.SelectText);
//
// height
//
this.height.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.height.Location = new System.Drawing.Point(280, 23);
this.height.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.height.Name = "height";
this.height.Size = new System.Drawing.Size(105, 20);
this.height.TabIndex = 1;
this.height.Value = new decimal(new int[] {
128,
0,
0,
0});
this.height.Enter += new System.EventHandler(this.SelectText);
//
// width
//
this.width.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.width.Location = new System.Drawing.Point(169, 23);
this.width.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.width.Name = "width";
this.width.Size = new System.Drawing.Size(105, 20);
this.width.TabIndex = 0;
this.width.Value = new decimal(new int[] {
128,
0,
0,
0});
this.width.Enter += new System.EventHandler(this.SelectText);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 124);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(44, 13);
this.label4.TabIndex = 14;
this.label4.Text = "Tileset";
//
// theater
//
this.theater.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.theater.FormattingEnabled = true;
this.theater.Location = new System.Drawing.Point(169, 121);
this.theater.Name = "theater";
this.theater.Size = new System.Drawing.Size(216, 21);
this.theater.TabIndex = 6;
//
// NewMapDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(418, 210);
this.Controls.Add(this.theater);
this.Controls.Add(this.label4);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cordonBottom);
this.Controls.Add(this.cordonTop);
this.Controls.Add(this.cordonRight);
this.Controls.Add(this.cordonLeft);
this.Controls.Add(this.height);
this.Controls.Add(this.width);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "NewMapDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "New Map";
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.height)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.width)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.NumericUpDown cordonBottom;
public System.Windows.Forms.NumericUpDown cordonTop;
public System.Windows.Forms.NumericUpDown cordonRight;
public System.Windows.Forms.NumericUpDown cordonLeft;
public System.Windows.Forms.NumericUpDown height;
public System.Windows.Forms.NumericUpDown width;
private System.Windows.Forms.Label label4;
public System.Windows.Forms.ComboBox theater;
}
}

View File

@@ -1,27 +1,28 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class NewMapDialog : Form
{
public NewMapDialog()
{
InitializeComponent();
}
private void SelectText(object sender, System.EventArgs e)
{
(sender as NumericUpDown).Select(0, (sender as NumericUpDown).ToString().Length);
}
}
}
#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.Windows.Forms;
namespace OpenRA.Editor
{
public partial class NewMapDialog : Form
{
public NewMapDialog()
{
InitializeComponent();
}
void SelectText(object sender, System.EventArgs e)
{
var ud = sender as NumericUpDown;
ud.Select(0, ud.ToString().Length);
}
}
}

View File

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

View File

@@ -1,160 +1,207 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00038B75-405B-44F5-8691-BD2546DBE224}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Editor</RootNamespace>
<AssemblyName>OpenRA.Editor</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>OpenRA.Editor.Icon.ico</ApplicationIcon>
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActorTemplate.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="LegacyMapImporter.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapSelect.Designer.cs">
<DependentUpon>MapSelect.cs</DependentUpon>
</Compile>
<Compile Include="NewMapDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewMapDialog.Designer.cs">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</Compile>
<Compile Include="PaletteBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PaletteBox.Designer.cs">
<DependentUpon>PaletteBox.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="PropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PropertiesDialog.Designer.cs">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MapSelect.resx">
<DependentUpon>MapSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewMapDialog.resx">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PaletteBox.resx">
<DependentUpon>PaletteBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PropertiesDialog.resx">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ResizeDialog.resx">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="RenderUtils.cs" />
<Compile Include="ResizeDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ResizeDialog.Designer.cs">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</Compile>
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
<Name>OpenRA.FileFormats</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="OpenRA.Editor.Icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{00038B75-405B-44F5-8691-BD2546DBE224}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenRA.Editor</RootNamespace>
<AssemblyName>OpenRA.Editor</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>OpenRA.Editor.Icon.ico</ApplicationIcon>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActorPropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ActorPropertiesDialog.Designer.cs">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
</Compile>
<Compile Include="ActorTemplate.cs" />
<Compile Include="ActorTool.cs" />
<Compile Include="BrushTool.cs" />
<Compile Include="ErrorListDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ErrorListDialog.Designer.cs">
<DependentUpon>ErrorListDialog.cs</DependentUpon>
</Compile>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="ITool.cs" />
<Compile Include="LegacyMapImporter.cs" />
<Compile Include="MapSelect.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MapSelect.Designer.cs">
<DependentUpon>MapSelect.cs</DependentUpon>
</Compile>
<Compile Include="NewMapDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewMapDialog.Designer.cs">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="PropertiesDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PropertiesDialog.Designer.cs">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="ActorPropertiesDialog.resx">
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MapSelect.resx">
<DependentUpon>MapSelect.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewMapDialog.resx">
<DependentUpon>NewMapDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PropertiesDialog.resx">
<DependentUpon>PropertiesDialog.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ResizeDialog.resx">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="RenderUtils.cs" />
<Compile Include="ResizeDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ResizeDialog.Designer.cs">
<DependentUpon>ResizeDialog.cs</DependentUpon>
</Compile>
<Compile Include="ResourceTool.cs" />
<Compile Include="Surface.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
<Name>OpenRA.FileFormats</Name>
</ProjectReference>
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
<Name>OpenRA.Game</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="OpenRA.Editor.Icon.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,165 +0,0 @@
namespace OpenRA.Editor
{
partial class PaletteBox
{
/// <summary>
/// Требуется переменная конструктора.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Освободить все используемые ресурсы.
/// </summary>
/// <param name="disposing">истинно, если управляемый ресурс должен быть удален; иначе ложно.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// Обязательный метод для поддержки конструктора - не изменяйте
/// содержимое данного метода при помощи редактора кода.
/// </summary>
private void InitializeComponent()
{
this.LayerBox = new System.Windows.Forms.ComboBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.pbtilePalette = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.pbactorPalette = new System.Windows.Forms.FlowLayoutPanel();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.pbresourcePalette = new System.Windows.Forms.FlowLayoutPanel();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.tabPage3.SuspendLayout();
this.SuspendLayout();
//
// LayerBox
//
this.LayerBox.Dock = System.Windows.Forms.DockStyle.Top;
this.LayerBox.FormattingEnabled = true;
this.LayerBox.Location = new System.Drawing.Point(0, 0);
this.LayerBox.Name = "LayerBox";
this.LayerBox.Size = new System.Drawing.Size(194, 21);
this.LayerBox.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 21);
this.tabControl1.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(194, 357);
this.tabControl1.TabIndex = 1;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.pbtilePalette);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(186, 331);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Templates";
this.tabPage1.UseVisualStyleBackColor = true;
//
// pbtilePalette
//
this.pbtilePalette.AutoScroll = true;
this.pbtilePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pbtilePalette.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbtilePalette.Location = new System.Drawing.Point(3, 3);
this.pbtilePalette.Name = "pbtilePalette";
this.pbtilePalette.Size = new System.Drawing.Size(180, 325);
this.pbtilePalette.TabIndex = 1;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.pbactorPalette);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(186, 331);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Actors";
this.tabPage2.UseVisualStyleBackColor = true;
//
// pbactorPalette
//
this.pbactorPalette.AutoScroll = true;
this.pbactorPalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pbactorPalette.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbactorPalette.Location = new System.Drawing.Point(3, 3);
this.pbactorPalette.Name = "pbactorPalette";
this.pbactorPalette.Size = new System.Drawing.Size(180, 325);
this.pbactorPalette.TabIndex = 2;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.pbresourcePalette);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(186, 331);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "Resources";
this.tabPage3.UseVisualStyleBackColor = true;
//
// pbresourcePalette
//
this.pbresourcePalette.AutoScroll = true;
this.pbresourcePalette.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.pbresourcePalette.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbresourcePalette.Location = new System.Drawing.Point(0, 0);
this.pbresourcePalette.Name = "pbresourcePalette";
this.pbresourcePalette.Size = new System.Drawing.Size(186, 331);
this.pbresourcePalette.TabIndex = 3;
//
// PaletteBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(194, 378);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.LayerBox);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PaletteBox";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Palette Box";
this.TopMost = true;
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
public System.Windows.Forms.ComboBox LayerBox;
public System.Windows.Forms.TabControl tabControl1;
public System.Windows.Forms.TabPage tabPage1;
public System.Windows.Forms.FlowLayoutPanel pbtilePalette;
public System.Windows.Forms.TabPage tabPage2;
public System.Windows.Forms.FlowLayoutPanel pbactorPalette;
public System.Windows.Forms.TabPage tabPage3;
public System.Windows.Forms.FlowLayoutPanel pbresourcePalette;
}
}

View File

@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class PaletteBox : Form
{
public PaletteBox()
{
InitializeComponent();
}
}
}

View File

@@ -1,29 +1,59 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Globalization;
using System.Windows.Forms;
namespace OpenRA.Editor
{
static class Program
{
[STAThread]
static void Main( string[] args )
{
Application.CurrentCulture = CultureInfo.InvariantCulture;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args));
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using OpenRA.FileFormats;
namespace OpenRA.Editor
{
static class Program
{
[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

@@ -1,36 +1,46 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenRA.Editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("OpenRA.Editor")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e18ea68f-f344-46c9-b026-8bda76fa91f8")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.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.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenRA.Editor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("OpenRA.Editor")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e18ea68f-f344-46c9-b026-8bda76fa91f8")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

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

View File

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

View File

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

View File

@@ -1,159 +1,182 @@
namespace OpenRA.Editor
{
partial class PropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.title = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.desc = new System.Windows.Forms.TextBox();
this.selectable = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.author = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(196, 193);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 14;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(277, 193);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 15;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 16;
this.label1.Text = "Title";
//
// title
//
this.title.Location = new System.Drawing.Point(66, 47);
this.title.Name = "title";
this.title.Size = new System.Drawing.Size(286, 20);
this.title.TabIndex = 17;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 16;
this.label2.Text = "Desc";
//
// desc
//
this.desc.Location = new System.Drawing.Point(66, 73);
this.desc.Name = "desc";
this.desc.Size = new System.Drawing.Size(286, 20);
this.desc.TabIndex = 17;
//
// selectable
//
this.selectable.AutoSize = true;
this.selectable.Location = new System.Drawing.Point(118, 138);
this.selectable.Name = "selectable";
this.selectable.Size = new System.Drawing.Size(130, 17);
this.selectable.TabIndex = 18;
this.selectable.Text = "Show in Map Chooser";
this.selectable.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Author";
//
// author
//
this.author.Location = new System.Drawing.Point(66, 99);
this.author.Name = "author";
this.author.Size = new System.Drawing.Size(286, 20);
this.author.TabIndex = 17;
//
// PropertiesDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(370, 228);
this.Controls.Add(this.selectable);
this.Controls.Add(this.author);
this.Controls.Add(this.label3);
this.Controls.Add(this.desc);
this.Controls.Add(this.label2);
this.Controls.Add(this.title);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "PropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "PropertiesDialog";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox title;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox desc;
public System.Windows.Forms.CheckBox selectable;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox author;
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class PropertiesDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.title = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.desc = new System.Windows.Forms.TextBox();
this.selectable = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.author = new System.Windows.Forms.TextBox();
this.useAsShellmap = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// button2
//
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(196, 193);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 14;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(277, 193);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 15;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 50);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 16;
this.label1.Text = "Title";
//
// title
//
this.title.Location = new System.Drawing.Point(66, 47);
this.title.Name = "title";
this.title.Size = new System.Drawing.Size(286, 20);
this.title.TabIndex = 17;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(32, 13);
this.label2.TabIndex = 16;
this.label2.Text = "Desc";
//
// desc
//
this.desc.Location = new System.Drawing.Point(66, 73);
this.desc.Name = "desc";
this.desc.Size = new System.Drawing.Size(286, 20);
this.desc.TabIndex = 17;
//
// selectable
//
this.selectable.AutoSize = true;
this.selectable.Location = new System.Drawing.Point(118, 138);
this.selectable.Name = "selectable";
this.selectable.Size = new System.Drawing.Size(130, 17);
this.selectable.TabIndex = 18;
this.selectable.Text = "Show in Map Chooser";
this.selectable.UseVisualStyleBackColor = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(38, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Author";
//
// author
//
this.author.Location = new System.Drawing.Point(66, 99);
this.author.Name = "author";
this.author.Size = new System.Drawing.Size(286, 20);
this.author.TabIndex = 17;
//
// checkBox1
//
this.useAsShellmap.AutoSize = true;
this.useAsShellmap.Location = new System.Drawing.Point(118, 161);
this.useAsShellmap.Name = "checkBox1";
this.useAsShellmap.Size = new System.Drawing.Size(105, 17);
this.useAsShellmap.TabIndex = 18;
this.useAsShellmap.Text = "Use as Shellmap";
this.useAsShellmap.UseVisualStyleBackColor = true;
//
// PropertiesDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(370, 228);
this.Controls.Add(this.useAsShellmap);
this.Controls.Add(this.selectable);
this.Controls.Add(this.author);
this.Controls.Add(this.label3);
this.Controls.Add(this.desc);
this.Controls.Add(this.label2);
this.Controls.Add(this.title);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "PropertiesDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Map Properties";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
public System.Windows.Forms.TextBox title;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.TextBox desc;
public System.Windows.Forms.CheckBox selectable;
private System.Windows.Forms.Label label3;
public System.Windows.Forms.TextBox author;
public System.Windows.Forms.CheckBox useAsShellmap;
}
}

View File

@@ -1,22 +1,22 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class PropertiesDialog : Form
{
public PropertiesDialog()
{
InitializeComponent();
}
}
}
#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.Windows.Forms;
namespace OpenRA.Editor
{
public partial class PropertiesDialog : Form
{
public PropertiesDialog()
{
InitializeComponent();
}
}
}

View File

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

View File

@@ -1,136 +1,105 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Drawing;
using System.Drawing.Imaging;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
public static Bitmap RenderTemplate(TileSet ts, ushort n, Palette p)
{
var template = ts.Templates[n];
var tile = ts.Tiles[n];
var bitmap = new Bitmap(ts.TileSize * template.Size.X, ts.TileSize * template.Size.Y);
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
int* q = (int*)data.Scan0.ToPointer();
var stride = data.Stride >> 2;
for (var u = 0; u < template.Size.X; u++)
for (var v = 0; v < template.Size.Y; v++)
if (tile.TileBitmapBytes[u + v * template.Size.X] != null)
{
var rawImage = tile.TileBitmapBytes[u + v * template.Size.X];
for (var i = 0; i < ts.TileSize; i++)
for (var j = 0; j < ts.TileSize; j++)
q[(v * ts.TileSize + j) * stride + u * ts.TileSize + i] = p.GetColor(rawImage[i + ts.TileSize * j]).ToArgb();
}
else
{
for (var i = 0; i < ts.TileSize; i++)
for (var j = 0; j < ts.TileSize; j++)
q[(v * ts.TileSize + j) * stride + u * ts.TileSize + i] = Color.Transparent.ToArgb();
}
}
bitmap.UnlockBits(data);
return bitmap;
}
static Bitmap RenderShp(ShpReader shp, Palette p)
{
var frame = shp[0];
var bitmap = new Bitmap(shp.Width, shp.Height);
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
int* q = (int*)data.Scan0.ToPointer();
var stride2 = data.Stride >> 2;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride2 + i] = p.GetColor(frame.Image[i + shp.Width * j]).ToArgb();
}
bitmap.UnlockBits(data);
return bitmap;
}
public static ActorTemplate RenderActor(ActorInfo info, TileSet tileset, Palette p)
{
var ri = info.Traits.Get<RenderSimpleInfo>();
string image = null;
if (ri.OverrideTheater != null)
for (int i = 0; i < ri.OverrideTheater.Length; i++)
if (ri.OverrideTheater[i] == tileset.Id)
image = ri.OverrideImage[i];
image = image ?? ri.Image ?? info.Name;
using (var s = FileSystem.OpenWithExts(image, tileset.Extensions))
{
var shp = new ShpReader(s);
var bitmap = RenderShp(shp, p);
try
{
using (var s2 = FileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpReader(s2);
var roofBitmap = RenderShp(shp2, p);
using (var g = System.Drawing.Graphics.FromImage(bitmap))
g.DrawImage(roofBitmap, 0, 0);
}
}
catch { }
return new ActorTemplate { Bitmap = bitmap, Info = info, Centered = !info.Traits.Contains<BuildingInfo>() };
}
}
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
{
var image = info.SpriteNames[0];
using (var s = FileSystem.OpenWithExts(image, exts))
{
var shp = new ShpReader(s);
var frame = shp[shp.ImageCount - 1];
var bitmap = new Bitmap(shp.Width, shp.Height);
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
int* q = (int*)data.Scan0.ToPointer();
var stride = data.Stride >> 2;
for (var i = 0; i < shp.Width; i++)
for (var j = 0; j < shp.Height; j++)
q[j * stride + i] = p.GetColor(frame.Image[i + shp.Width * j]).ToArgb();
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.ImageCount - 1 };
}
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.Drawing.Imaging;
using OpenRA.FileFormats;
using OpenRA.Traits;
namespace OpenRA.Editor
{
static class RenderUtils
{
static Bitmap RenderShp(ShpReader shp, Palette p)
{
var frame = shp[0];
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
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];
}
bitmap.UnlockBits(data);
return bitmap;
}
public static ActorTemplate RenderActor(ActorInfo info, TileSet tileset, Palette p)
{
var image = RenderSimple.GetImage(info);
using (var s = FileSystem.OpenWithExts(image, tileset.Extensions))
{
var shp = new ShpReader(s);
var bitmap = RenderShp(shp, p);
try
{
using (var s2 = FileSystem.OpenWithExts(image + "2", tileset.Extensions))
{
var shp2 = new ShpReader(s2);
var roofBitmap = RenderShp(shp2, p);
using (var g = System.Drawing.Graphics.FromImage(bitmap))
g.DrawImage(roofBitmap, 0, 0);
}
}
catch { }
return new ActorTemplate
{
Bitmap = bitmap,
Info = info,
Appearance = info.Traits.GetOrDefault<EditorAppearanceInfo>()
};
}
}
public static ResourceTemplate RenderResourceType(ResourceTypeInfo info, string[] exts, Palette p)
{
var image = info.SpriteNames[0];
using (var s = FileSystem.OpenWithExts(image, exts))
{
var shp = new ShpReader(s);
var frame = shp[shp.ImageCount - 1];
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
bitmap.Palette = p.AsSystemPalette();
var data = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
unsafe
{
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];
}
bitmap.UnlockBits(data);
return new ResourceTemplate { Bitmap = bitmap, Info = info, Value = shp.ImageCount - 1 };
}
}
}
}

View File

@@ -1,226 +1,236 @@
namespace OpenRA.Editor
{
partial class ResizeDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.width = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cordonLeft = new System.Windows.Forms.NumericUpDown();
this.cordonTop = new System.Windows.Forms.NumericUpDown();
this.cordonRight = new System.Windows.Forms.NumericUpDown();
this.cordonBottom = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.height = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit();
this.SuspendLayout();
//
// width
//
this.width.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.width.Location = new System.Drawing.Point(161, 18);
this.width.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.width.Name = "width";
this.width.Size = new System.Drawing.Size(105, 20);
this.width.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Size";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Cordon Left/Top";
//
// cordonLeft
//
this.cordonLeft.Location = new System.Drawing.Point(161, 44);
this.cordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonLeft.Name = "cordonLeft";
this.cordonLeft.Size = new System.Drawing.Size(105, 20);
this.cordonLeft.TabIndex = 0;
//
// cordonTop
//
this.cordonTop.Location = new System.Drawing.Point(272, 44);
this.cordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonTop.Name = "cordonTop";
this.cordonTop.Size = new System.Drawing.Size(105, 20);
this.cordonTop.TabIndex = 0;
//
// cordonRight
//
this.cordonRight.Location = new System.Drawing.Point(161, 70);
this.cordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonRight.Name = "cordonRight";
this.cordonRight.Size = new System.Drawing.Size(105, 20);
this.cordonRight.TabIndex = 0;
//
// cordonBottom
//
this.cordonBottom.Location = new System.Drawing.Point(272, 70);
this.cordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonBottom.Name = "cordonBottom";
this.cordonBottom.Size = new System.Drawing.Size(105, 20);
this.cordonBottom.TabIndex = 0;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Cordon Right/Bottom";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(302, 111);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(221, 111);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// height
//
this.height.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.height.Location = new System.Drawing.Point(272, 18);
this.height.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.height.Name = "height";
this.height.Size = new System.Drawing.Size(105, 20);
this.height.TabIndex = 0;
//
// ResizeDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(409, 146);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cordonBottom);
this.Controls.Add(this.cordonTop);
this.Controls.Add(this.cordonRight);
this.Controls.Add(this.cordonLeft);
this.Controls.Add(this.height);
this.Controls.Add(this.width);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResizeDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resize Map";
((System.ComponentModel.ISupportInitialize)(this.width)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.height)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
public System.Windows.Forms.NumericUpDown width;
public System.Windows.Forms.NumericUpDown cordonLeft;
public System.Windows.Forms.NumericUpDown cordonTop;
public System.Windows.Forms.NumericUpDown cordonRight;
public System.Windows.Forms.NumericUpDown cordonBottom;
public System.Windows.Forms.NumericUpDown height;
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.Editor
{
partial class ResizeDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.width = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.cordonLeft = new System.Windows.Forms.NumericUpDown();
this.cordonTop = new System.Windows.Forms.NumericUpDown();
this.cordonRight = new System.Windows.Forms.NumericUpDown();
this.cordonBottom = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.height = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.width)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.height)).BeginInit();
this.SuspendLayout();
//
// width
//
this.width.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.width.Location = new System.Drawing.Point(161, 18);
this.width.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.width.Name = "width";
this.width.Size = new System.Drawing.Size(105, 20);
this.width.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(23, 20);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 1;
this.label1.Text = "Size";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(23, 46);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 13);
this.label2.TabIndex = 1;
this.label2.Text = "Cordon Left/Top";
//
// cordonLeft
//
this.cordonLeft.Location = new System.Drawing.Point(161, 44);
this.cordonLeft.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonLeft.Name = "cordonLeft";
this.cordonLeft.Size = new System.Drawing.Size(105, 20);
this.cordonLeft.TabIndex = 0;
//
// cordonTop
//
this.cordonTop.Location = new System.Drawing.Point(272, 44);
this.cordonTop.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonTop.Name = "cordonTop";
this.cordonTop.Size = new System.Drawing.Size(105, 20);
this.cordonTop.TabIndex = 0;
//
// cordonRight
//
this.cordonRight.Location = new System.Drawing.Point(161, 70);
this.cordonRight.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonRight.Name = "cordonRight";
this.cordonRight.Size = new System.Drawing.Size(105, 20);
this.cordonRight.TabIndex = 0;
//
// cordonBottom
//
this.cordonBottom.Location = new System.Drawing.Point(272, 70);
this.cordonBottom.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.cordonBottom.Name = "cordonBottom";
this.cordonBottom.Size = new System.Drawing.Size(105, 20);
this.cordonBottom.TabIndex = 0;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(107, 13);
this.label3.TabIndex = 1;
this.label3.Text = "Cordon Right/Bottom";
//
// button1
//
this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.button1.Location = new System.Drawing.Point(302, 111);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Cancel";
this.button1.UseVisualStyleBackColor = true;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(221, 111);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
//
// height
//
this.height.Increment = new decimal(new int[] {
8,
0,
0,
0});
this.height.Location = new System.Drawing.Point(272, 18);
this.height.Maximum = new decimal(new int[] {
2048,
0,
0,
0});
this.height.Name = "height";
this.height.Size = new System.Drawing.Size(105, 20);
this.height.TabIndex = 0;
//
// ResizeDialog
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(409, 146);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cordonBottom);
this.Controls.Add(this.cordonTop);
this.Controls.Add(this.cordonRight);
this.Controls.Add(this.cordonLeft);
this.Controls.Add(this.height);
this.Controls.Add(this.width);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "ResizeDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Resize Map";
((System.ComponentModel.ISupportInitialize)(this.width)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonLeft)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonTop)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonRight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.cordonBottom)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.height)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
public System.Windows.Forms.NumericUpDown width;
public System.Windows.Forms.NumericUpDown cordonLeft;
public System.Windows.Forms.NumericUpDown cordonTop;
public System.Windows.Forms.NumericUpDown cordonRight;
public System.Windows.Forms.NumericUpDown cordonBottom;
public System.Windows.Forms.NumericUpDown height;
}
}

View File

@@ -1,22 +1,22 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ResizeDialog : Form
{
public ResizeDialog()
{
InitializeComponent();
}
}
}
#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.Windows.Forms;
namespace OpenRA.Editor
{
public partial class ResizeDialog : Form
{
public ResizeDialog()
{
InitializeComponent();
}
}
}

View File

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

View File

@@ -0,0 +1,50 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using OpenRA.FileFormats;
using SGraphics = System.Drawing.Graphics;
namespace OpenRA.Editor
{
class ResourceTool : ITool
{
ResourceTemplate Resource;
public ResourceTool(ResourceTemplate resource) { Resource = resource; }
public void Apply(Surface surface)
{
surface.Map.MapResources.Value[surface.GetBrushLocation().X, surface.GetBrushLocation().Y]
= new TileReference<byte, byte>
{
type = (byte)Resource.Info.ResourceType,
index = (byte)random.Next(Resource.Info.SpriteNames.Length)
};
var ch = new int2((surface.GetBrushLocation().X) / Surface.ChunkSize,
(surface.GetBrushLocation().Y) / Surface.ChunkSize);
if (surface.Chunks.ContainsKey(ch))
{
surface.Chunks[ch].Dispose();
surface.Chunks.Remove(ch);
}
}
public void Preview(Surface surface, SGraphics g)
{
surface.DrawImage(g, Resource.Bitmap, surface.GetBrushLocation(), false, null);
}
Random random = new Random();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,80 @@
#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;
namespace OpenRA.FileFormats
{
public struct ColorRamp
{
public byte H,S,L,R;
public ColorRamp(byte h, byte s, byte l, byte r)
{
H = h; S = s; L = l; R = r;
}
/* returns a color along the Lum ramp */
public Color GetColor( float t )
{
return ColorFromHSL( H / 255f, S / 255f, float2.Lerp( L / 255f, L*R / (255f * 255f), t ) );
}
public override string ToString()
{
return "{0},{1},{2},{3}".F(H, S, L, R);
}
// hk is hue in the range [0,1] instead of [0,360]
static Color ColorFromHSL(float hk, float s, float l)
{
// Convert from HSL to RGB
var q = (l < 0.5f) ? l * (1 + s) : l + s - (l * s);
var p = 2 * l - q;
float[] trgb = { hk + 1 / 3.0f, hk, hk - 1/3.0f };
float[] rgb = { 0, 0, 0 };
for (int k = 0; k < 3; k++)
{
while (trgb[k] < 0) trgb[k] += 1.0f;
while (trgb[k] > 1) trgb[k] -= 1.0f;
}
for (int k = 0; k < 3; k++)
{
if (trgb[k] < 1 / 6.0f) { rgb[k] = (p + ((q - p) * 6 * trgb[k])); }
else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5) { rgb[k] = q; }
else if (trgb[k] >= 0.5f && trgb[k] < 2.0f / 3) { rgb[k] = (p + ((q - p) * 6 * (2.0f / 3 - trgb[k]))); }
else { rgb[k] = p; }
}
return Color.FromArgb((int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255));
}
public static bool operator ==(ColorRamp me, ColorRamp other)
{
return (me.H == other.H && me.S == other.S && me.L == other.L && me.R == other.R );
}
public static bool operator !=(ColorRamp me, ColorRamp other) { return !(me == other); }
public override int GetHashCode() { return H.GetHashCode() ^ S.GetHashCode() ^ L.GetHashCode() ^ R.GetHashCode(); }
public override bool Equals(object obj)
{
if (obj == null)
return false;
ColorRamp o = (ColorRamp)obj;
return o == this;
}
}
}

View File

@@ -1,45 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Packaging;
using System.Linq;
namespace OpenRA.FileFormats
{
public class CompressedPackage : IFolder
{
readonly uint[] hashes;
readonly Stream s;
readonly ZipPackage pkg;
public CompressedPackage(string filename)
{
s = FileSystem.Open(filename);
pkg = (ZipPackage)ZipPackage.Open(s, FileMode.Open);
hashes = pkg.GetParts()
.Select(p => PackageEntry.HashFilename(p.Uri.LocalPath)).ToArray();
}
public Stream GetContent(string filename)
{
return pkg.GetPart(new Uri(filename)).GetStream(FileMode.Open);
}
public IEnumerable<uint> AllFileHashes() { return hashes; }
public bool Exists(string filename)
{
return hashes.Contains(PackageEntry.HashFilename(filename));
}
}
}

View File

@@ -1,107 +1,107 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.FileFormats
{
public static class Evaluator
{
public static int Evaluate(string expr)
{
return Evaluate(expr, new Dictionary<string, int>());
}
public static int Evaluate(string expr, Dictionary<string, int> syms)
{
var toks = Tokens(expr, "+-*/()");
var postfix = ToPostfix(toks, syms);
var s = new Stack<int>();
foreach (var t in postfix)
{
switch (t[0])
{
case '+': ApplyBinop(s, (x, y) => y + x); break;
case '-': ApplyBinop(s, (x, y) => y - x); break;
case '*': ApplyBinop(s, (x, y) => y * x); break;
case '/': ApplyBinop(s, (x, y) => y / x); break;
default: s.Push(int.Parse(t)); break;
}
}
return s.Pop();
}
static void ApplyBinop( Stack<int> s, Func<int,int,int> f )
{
var x = s.Pop();
var y = s.Pop();
s.Push( f(x,y) );
}
static IEnumerable<string> ToPostfix(IEnumerable<string> toks, Dictionary<string, int> syms)
{
var s = new Stack<string>();
foreach (var t in toks)
{
if (t[0] == '(') s.Push(t);
else if (t[0] == ')')
{
var temp = "";
while ((temp = s.Pop()) != "(") yield return temp;
}
else if (char.IsNumber(t[0])) yield return t;
else if (char.IsLetter(t[0]))
{
if (!syms.ContainsKey(t))
throw new InvalidOperationException("Substitution `{0}` undefined".F(t));
yield return syms[t].ToString();;
}
else
{
while (s.Count > 0 && Prec[t] <= Prec[s.Peek()]) yield return s.Pop();
s.Push(t);
}
}
while (s.Count > 0) yield return s.Pop();
}
static readonly Dictionary<string, int> Prec
= new Dictionary<string, int> { { "+", 0 }, { "-", 0 }, { "*", 1 }, { "/", 1 }, { "(", -1 } };
static IEnumerable<string> Tokens(string expr, string ops)
{
var s = "";
foreach (var c in expr)
{
if (char.IsWhiteSpace(c))
{
if (s != "") yield return s;
s = "";
}
else if (ops.Contains(c))
{
if (s != "") yield return s;
s = "";
yield return "" + c;
}
else
s += c;
}
if (s != "") yield return s;
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.FileFormats
{
public static class Evaluator
{
public static int Evaluate(string expr)
{
return Evaluate(expr, new Dictionary<string, int>());
}
public static int Evaluate(string expr, Dictionary<string, int> syms)
{
var toks = Tokens(expr, "+-*/()");
var postfix = ToPostfix(toks, syms);
var s = new Stack<int>();
foreach (var t in postfix)
{
switch (t[0])
{
case '+': ApplyBinop(s, (x, y) => y + x); break;
case '-': ApplyBinop(s, (x, y) => y - x); break;
case '*': ApplyBinop(s, (x, y) => y * x); break;
case '/': ApplyBinop(s, (x, y) => y / x); break;
default: s.Push(int.Parse(t)); break;
}
}
return s.Pop();
}
static void ApplyBinop( Stack<int> s, Func<int,int,int> f )
{
var x = s.Pop();
var y = s.Pop();
s.Push( f(x,y) );
}
static IEnumerable<string> ToPostfix(IEnumerable<string> toks, Dictionary<string, int> syms)
{
var s = new Stack<string>();
foreach (var t in toks)
{
if (t[0] == '(') s.Push(t);
else if (t[0] == ')')
{
var temp = "";
while ((temp = s.Pop()) != "(") yield return temp;
}
else if (char.IsNumber(t[0])) yield return t;
else if (char.IsLetter(t[0]))
{
if (!syms.ContainsKey(t))
throw new InvalidOperationException("Substitution `{0}` undefined".F(t));
yield return syms[t].ToString();
}
else
{
while (s.Count > 0 && Prec[t] <= Prec[s.Peek()]) yield return s.Pop();
s.Push(t);
}
}
while (s.Count > 0) yield return s.Pop();
}
static readonly Dictionary<string, int> Prec
= new Dictionary<string, int> { { "+", 0 }, { "-", 0 }, { "*", 1 }, { "/", 1 }, { "(", -1 } };
static IEnumerable<string> Tokens(string expr, string ops)
{
var s = "";
foreach (var c in expr)
{
if (char.IsWhiteSpace(c))
{
if (s != "") yield return s;
s = "";
}
else if (ops.Contains(c))
{
if (s != "") yield return s;
s = "";
yield return "" + c;
}
else
s += c;
}
if (s != "") yield return s;
}
}
}

View File

@@ -1,99 +1,265 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA
{
public static class Exts
{
public static string F(this string fmt, params object[] args)
{
return string.Format(fmt, args);
}
public static void Do<T>( this IEnumerable<T> e, Action<T> fn )
{
foreach( var ee in e )
fn( ee );
}
public static IEnumerable<string> GetNamespaces(this Assembly a)
{
return a.GetTypes().Select(t => t.Namespace).Distinct().Where(n => n != null);
}
public static string ReadAllText(this Stream s)
{
using (s)
using (var sr = new StreamReader(s))
return sr.ReadToEnd();
}
public static byte[] ReadAllBytes(this Stream s)
{
using (s)
{
var data = new byte[s.Length - s.Position];
s.Read(data, 0, data.Length);
return data;
}
}
public static void Write(this Stream s, byte[] data)
{
s.Write(data, 0, data.Length);
}
public static IEnumerable<string> ReadAllLines(this Stream s)
{
using (var sr = new StreamReader(s))
for (; ; )
{
var line = sr.ReadLine();
if (line == null)
yield break;
else
yield return line;
}
}
public static bool HasAttribute<T>(this MemberInfo mi)
{
return mi.GetCustomAttributes(typeof(T), true).Length != 0;
}
public static T[] GetCustomAttributes<T>( this MemberInfo mi, bool inherit )
where T : class
{
return (T[])mi.GetCustomAttributes( typeof( T ), inherit );
}
public static T[] GetCustomAttributes<T>( this ParameterInfo mi )
where T : class
{
return (T[])mi.GetCustomAttributes( typeof( T ), true );
}
public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
{
if (val.CompareTo(min) < 0)
return min;
else if (val.CompareTo(max) > 0)
return max;
else
return val;
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA
{
public static class Exts
{
public static string F(this string fmt, params object[] args)
{
return string.Format(fmt, args);
}
public static T WithDefault<T>(T def, Func<T> f)
{
try { return f(); }
catch { return def; }
}
public static void Do<T>(this IEnumerable<T> e, Action<T> fn)
{
foreach (var ee in e)
fn(ee);
}
public static IEnumerable<string> GetNamespaces(this Assembly a)
{
return a.GetTypes().Select(t => t.Namespace).Distinct().Where(n => n != null);
}
public static string ReadAllText(this Stream s)
{
using (s)
using (var sr = new StreamReader(s))
return sr.ReadToEnd();
}
public static byte[] ReadAllBytes(this Stream s)
{
using (s)
{
var data = new byte[s.Length - s.Position];
s.Read(data, 0, data.Length);
return data;
}
}
public static void Write(this Stream s, byte[] data)
{
s.Write(data, 0, data.Length);
}
public static IEnumerable<string> ReadAllLines(this Stream s)
{
using (var sr = new StreamReader(s))
for (; ; )
{
var line = sr.ReadLine();
if (line == null)
yield break;
else
yield return line;
}
}
public static bool HasAttribute<T>(this MemberInfo mi)
{
return mi.GetCustomAttributes(typeof(T), true).Length != 0;
}
public static T[] GetCustomAttributes<T>(this MemberInfo mi, bool inherit)
where T : class
{
return (T[])mi.GetCustomAttributes(typeof(T), inherit);
}
public static T[] GetCustomAttributes<T>(this ParameterInfo mi)
where T : class
{
return (T[])mi.GetCustomAttributes(typeof(T), true);
}
public static T Clamp<T>(this T val, T min, T max) where T : IComparable<T>
{
if (val.CompareTo(min) < 0)
return min;
else if (val.CompareTo(max) > 0)
return max;
else
return val;
}
public static bool Contains(this Rectangle r, int2 p)
{
return r.Contains(p.ToPoint());
}
public static bool Contains(this RectangleF r, int2 p)
{
return r.Contains(p.ToPointF());
}
public static bool HasModifier(this Modifiers k, Modifiers mod)
{
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()
{
return d.GetOrAdd(k, _ => new V());
}
public static V GetOrAdd<K, V>(this Dictionary<K, V> d, K k, Func<K, V> createFn)
{
V ret;
if (!d.TryGetValue(k, out ret))
d.Add(k, ret = createFn(k));
return ret;
}
public static T Random<T>(this IEnumerable<T> ts, Thirdparty.Random r)
{
var xs = ts.ToArray();
return xs[r.Next(xs.Length)];
}
public static float Product(this IEnumerable<float> xs)
{
return xs.Aggregate(1f, (a, x) => a * x);
}
public static IEnumerable<T> SymmetricDifference<T>(this IEnumerable<T> xs, IEnumerable<T> ys)
{
// this is probably a shockingly-slow way to do this, but it's concise.
return xs.Except(ys).Concat(ys.Except(xs));
}
public static IEnumerable<T> Iterate<T>( this T t, Func<T,T> f )
{
for(;;) { yield return t; t = f(t); }
}
public static int NextPowerOf2(int v)
{
--v;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
++v;
return v;
}
public static Size NextPowerOf2(this Size s) { return new Size(NextPowerOf2(s.Width), NextPowerOf2(s.Height)); }
public static string JoinWith<T>(this IEnumerable<T> ts, string j)
{
return string.Join(j, ts.Select(t => t.ToString()).ToArray());
}
public static IEnumerable<T> Append<T>( this IEnumerable<T> ts, params T[] moreTs)
{
return ts.Concat(moreTs);
}
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
{
return ToDictionaryWithConflictLog(source, keySelector, x => x, debugName, logKey, logValue);
}
public static Dictionary<TKey, TElement> ToDictionaryWithConflictLog<TSource, TKey, TElement>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, string debugName, Func<TKey, string> logKey, Func<TElement, string> logValue)
{
// Fall back on ToString() if null functions are provided:
logKey = logKey ?? (s => s.ToString());
logValue = logValue ?? (s => s.ToString());
// Try to build a dictionary and log all duplicates found (if any):
var dupKeys = new Dictionary<TKey, List<string>>();
var d = new Dictionary<TKey, TElement>();
foreach (var item in source)
{
TKey key = keySelector(item);
TElement element = elementSelector(item);
// Check for a key conflict:
if (d.ContainsKey(key))
{
List<string> dupKeyMessages;
if (!dupKeys.TryGetValue(key, out dupKeyMessages))
{
// Log the initial conflicting value already inserted:
dupKeyMessages = new List<string>();
dupKeyMessages.Add(logValue(d[key]));
dupKeys.Add(key, dupKeyMessages);
}
// Log this conflicting value:
dupKeyMessages.Add(logValue(element));
continue;
}
d.Add(key, element);
}
// If any duplicates were found, log it and throw a descriptive error
if (dupKeys.Count > 0)
{
string badKeysFormatted = String.Join(", ", dupKeys.Select(p => "{0}: [{1}]".F(logKey(p.Key), String.Join(",", p.Value.ToArray()))).ToArray());
string msg = "{0}, duplicate values found for the following keys: {1}".F(debugName, badKeysFormatted);
Log.Write("debug", msg);
throw new ArgumentException(msg);
}
// Return the dictionary we built:
return d;
}
public static Color ColorLerp(float t, Color c1, Color c2)
{
return Color.FromArgb(
(int)(t * c2.A + (1 - t) * c1.A),
(int)(t * c2.R + (1 - t) * c1.R),
(int)(t * c2.G + (1 - t) * c1.G),
(int)(t * c2.B + (1 - t) * c1.B));
}
public static T[] MakeArray<T>(int count, Func<int, T> f)
{
T[] result = new T[count];
for (int i = 0; i < count; i++)
result[i] = f(i);
return result;
}
public static Rectangle Bounds(this Bitmap b) { return new Rectangle(0, 0, b.Width, b.Height); }
}
public static class Enum<T>
{
public static T Parse(string s) { return (T)Enum.Parse(typeof(T), s); }
public static T[] GetValues() { return (T[])Enum.GetValues(typeof(T)); }
}
}

View File

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

View File

@@ -1,155 +1,159 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.IO;
namespace OpenRA.FileFormats
{
[Flags]
enum SoundFlags
{
Stereo = 0x1,
_16Bit = 0x2,
}
enum SoundFormat
{
WestwoodCompressed = 1,
ImaAdpcm = 99,
}
struct Chunk
{
public int CompressedSize;
public int OutputSize;
public static Chunk Read(BinaryReader r)
{
Chunk c;
c.CompressedSize = r.ReadUInt16();
c.OutputSize = r.ReadUInt16();
if (0xdeaf != r.ReadUInt32())
throw new InvalidDataException("Chunk header is bogus");
return c;
}
}
public static class AudLoader
{
static int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static int[] StepTable = {
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
97, 107, 118, 130, 143, 157, 173, 190, 209,
230, 253, 279, 307, 337, 371, 408, 449, 494,
544, 598, 658, 724, 796, 876, 963, 1060, 1166,
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 };
static short DecodeSample(byte b, ref int index, ref int current)
{
var sb = (b & 8) != 0;
b &= 7;
var delta = (StepTable[index] * b) / 4 + StepTable[index] / 8;
if (sb) delta = -delta;
current += delta;
if (current > short.MaxValue) current = short.MaxValue;
if (current < short.MinValue) current = short.MinValue;
index += IndexAdjust[b];
if (index < 0) index = 0;
if (index > 88) index = 88;
return (short)current;
}
public static byte[] LoadSound(byte[] raw, ref int index)
{
var br = new BinaryReader(new MemoryStream(raw));
var dataSize = raw.Length;
var outputSize = raw.Length * 4;
var output = new byte[outputSize];
var offset = 0;
var currentSample = 0;
while (dataSize-- > 0)
{
var b = br.ReadByte();
var t = DecodeSample(b, ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
t = DecodeSample((byte)(b >> 4), ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
}
return output;
}
public static float SoundLength(Stream s)
{
var br = new BinaryReader(s);
var sampleRate = br.ReadUInt16();
/*var dataSize = */ br.ReadInt32();
var outputSize = br.ReadInt32();
var flags = (SoundFlags) br.ReadByte();
var samples = outputSize;
if (0 != (flags & SoundFlags.Stereo)) samples /= 2;
if (0 != (flags & SoundFlags._16Bit)) samples /= 2;
return samples / sampleRate;
}
public static byte[] LoadSound(Stream s)
{
var br = new BinaryReader(s);
/*var sampleRate =*/ br.ReadUInt16();
var dataSize = br.ReadInt32();
var outputSize = br.ReadInt32();
/*var flags = (SoundFlags)*/ br.ReadByte();
/*var format = (SoundFormat)*/ br.ReadByte();
var output = new byte[outputSize];
var offset = 0;
var index = 0;
var currentSample = 0;
while (dataSize > 0)
{
var chunk = Chunk.Read(br);
for (int n = 0; n < chunk.CompressedSize; n++)
{
var b = br.ReadByte();
var t = DecodeSample(b, ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
t = DecodeSample((byte)(b >> 4), ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
}
dataSize -= 8 + chunk.CompressedSize;
}
return output;
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
namespace OpenRA.FileFormats
{
[Flags]
enum SoundFlags
{
Stereo = 0x1,
_16Bit = 0x2,
}
enum SoundFormat
{
WestwoodCompressed = 1,
ImaAdpcm = 99,
}
struct Chunk
{
public int CompressedSize;
public int OutputSize;
public static Chunk Read(BinaryReader r)
{
Chunk c;
c.CompressedSize = r.ReadUInt16();
c.OutputSize = r.ReadUInt16();
if (0xdeaf != r.ReadUInt32())
throw new InvalidDataException("Chunk header is bogus");
return c;
}
}
public static class AudLoader
{
static int[] IndexAdjust = { -1, -1, -1, -1, 2, 4, 6, 8 };
static int[] StepTable = {
7, 8, 9, 10, 11, 12, 13, 14, 16,
17, 19, 21, 23, 25, 28, 31, 34, 37,
41, 45, 50, 55, 60, 66, 73, 80, 88,
97, 107, 118, 130, 143, 157, 173, 190, 209,
230, 253, 279, 307, 337, 371, 408, 449, 494,
544, 598, 658, 724, 796, 876, 963, 1060, 1166,
1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749,
3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484,
7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289,
16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 };
static short DecodeSample(byte b, ref int index, ref int current)
{
var sb = (b & 8) != 0;
b &= 7;
var delta = (StepTable[index] * b) / 4 + StepTable[index] / 8;
if (sb) delta = -delta;
current += delta;
if (current > short.MaxValue) current = short.MaxValue;
if (current < short.MinValue) current = short.MinValue;
index += IndexAdjust[b];
if (index < 0) index = 0;
if (index > 88) index = 88;
return (short)current;
}
public static byte[] LoadSound(byte[] raw, ref int index)
{
var br = new BinaryReader(new MemoryStream(raw));
var dataSize = raw.Length;
var outputSize = raw.Length * 4;
var output = new byte[outputSize];
var offset = 0;
var currentSample = 0;
while (dataSize-- > 0)
{
var b = br.ReadByte();
var t = DecodeSample(b, ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
t = DecodeSample((byte)(b >> 4), ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
}
return output;
}
public static float SoundLength(Stream s)
{
var br = new BinaryReader(s);
var sampleRate = br.ReadUInt16();
/*var dataSize = */ br.ReadInt32();
var outputSize = br.ReadInt32();
var flags = (SoundFlags) br.ReadByte();
var samples = outputSize;
if (0 != (flags & SoundFlags.Stereo)) samples /= 2;
if (0 != (flags & SoundFlags._16Bit)) samples /= 2;
return samples / sampleRate;
}
public static byte[] LoadSound(Stream s)
{
var br = new BinaryReader(s);
/*var sampleRate =*/ br.ReadUInt16();
var dataSize = br.ReadInt32();
var outputSize = br.ReadInt32();
/*var flags = (SoundFlags)*/ br.ReadByte();
/*var format = (SoundFormat)*/ br.ReadByte();
var output = new byte[outputSize];
var offset = 0;
var index = 0;
var currentSample = 0;
while (dataSize > 0)
{
var chunk = Chunk.Read(br);
for (int n = 0; n < chunk.CompressedSize; n++)
{
var b = br.ReadByte();
var t = DecodeSample(b, ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
if (offset < outputSize)
{
/* possible that only half of the final byte is used! */
t = DecodeSample((byte)(b >> 4), ref index, ref currentSample);
output[offset++] = (byte)t;
output[offset++] = (byte)(t >> 8);
}
}
dataSize -= 8 + chunk.CompressedSize;
}
return output;
}
}
}

View File

@@ -0,0 +1,279 @@
#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.
*
* This file is based on the blast routines (version 1.1 by Mark Adler)
* included in zlib/contrib
*/
#endregion
using System;
using System.IO;
namespace OpenRA.FileFormats
{
public static class Blast
{
public static readonly int MAXBITS = 13; // maximum code length
public static readonly int MAXWIN = 4096; // maximum window size
static byte[] litlen = new byte[] {
11, 124, 8, 7, 28, 7, 188, 13, 76, 4,
10, 8, 12, 10, 12, 10, 8, 23, 8, 9,
7, 6, 7, 8, 7, 6, 55, 8, 23, 24,
12, 11, 7, 9, 11, 12, 6, 7, 22, 5,
7, 24, 6, 11, 9, 6, 7, 22, 7, 11,
38, 7, 9, 8, 25, 11, 8, 11, 9, 12,
8, 12, 5, 38, 5, 38, 5, 11, 7, 5,
6, 21, 6, 10, 53, 8, 7, 24, 10, 27,
44, 253, 253, 253, 252, 252, 252, 13, 12, 45,
12, 45, 12, 61, 12, 45, 44, 173
};
// bit lengths of length codes 0..15
static byte[] lenlen = new byte[] { 2, 35, 36, 53, 38, 23 };
// bit lengths of distance codes 0..63
static byte[] distlen = new byte[] { 2, 20, 53, 230, 247, 151, 248 };
// base for length codes
static short[] lengthbase = new short[] {
3, 2, 4, 5, 6, 7, 8, 9, 10, 12,
16, 24, 40, 72, 136, 264
};
// extra bits for length codes
static byte[] extra = new byte[] {
0, 0, 0, 0, 0, 0, 0, 0, 1, 2,
3, 4, 5, 6, 7, 8
};
static Huffman litcode = new Huffman(litlen, litlen.Length, 256);
static Huffman lencode = new Huffman(lenlen, lenlen.Length, 16);
static Huffman distcode = new Huffman(distlen, distlen.Length, 64);
// Decode PKWare Compression Library stream.
public static byte[] Decompress(byte[] src)
{
BitReader br = new BitReader(src);
// Are literals coded?
int coded = br.ReadBits(8);
if (coded < 0 || coded > 1)
throw new NotImplementedException("Invalid datastream");
bool EncodedLiterals = (coded == 1);
// log2(dictionary size) - 6
int dict = br.ReadBits(8);
if (dict < 4 || dict > 6)
throw new InvalidDataException("Invalid dictionary size");
// output state
ushort next = 0; // index of next write location in out[]
bool first = true; // true to check distances (for first 4K)
byte[] outBuffer = new byte[MAXWIN]; // output buffer and sliding window
var ms = new MemoryStream();
// decode literals and length/distance pairs
do
{
// length/distance pair
if (br.ReadBits(1) == 1)
{
// Length
int symbol = Decode(lencode, br);
int len = lengthbase[symbol] + br.ReadBits(extra[symbol]);
if (len == 519) // Magic number for "done"
{
for (int i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
break;
}
// Distance
symbol = len == 2 ? 2 : dict;
int dist = Decode(distcode, br) << symbol;
dist += br.ReadBits(symbol);
dist++;
if (first && dist > next)
throw new InvalidDataException("Attempt to jump before data");
// copy length bytes from distance bytes back
do
{
int dest = next;
int source = dest - dist;
int copy = MAXWIN;
if (next < dist)
{
source += copy;
copy = dist;
}
copy -= next;
if (copy > len)
copy = len;
len -= copy;
next += (ushort)copy;
// copy with old-fashioned memcpy semantics
// in case of overlapping ranges. this is NOT
// the same as Array.Copy()
while( copy-- > 0 )
outBuffer[dest++] = outBuffer[source++];
// Flush window to outstream
if (next == MAXWIN)
{
for (int i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
next = 0;
first = false;
}
} while (len != 0);
}
else // literal value
{
int symbol = EncodedLiterals ? Decode(litcode, br) : br.ReadBits(8);
outBuffer[next++] = (byte)symbol;
if (next == MAXWIN)
{
for (int i = 0; i < next; i++)
ms.WriteByte(outBuffer[i]);
next = 0;
first = false;
}
}
} while (true);
return ms.ToArray();
}
// Decode a code using huffman table h.
static int Decode(Huffman h, BitReader br)
{
int code = 0; // len bits being decoded
int first = 0; // first code of length len
int index = 0; // index of first code of length len in symbol table
short next = 1;
while (true)
{
code |= br.ReadBits(1) ^ 1; // invert code
int count = h.Count[next++];
if (code < first + count)
return h.Symbol[index + (code - first)];
index += count;
first += count;
first <<= 1;
code <<= 1;
}
}
}
class BitReader
{
readonly byte[] src;
int offset = 0;
int bitBuffer = 0;
int bitCount = 0;
public BitReader(byte[] src)
{
this.src = src;
}
public int ReadBits(int count)
{
int ret = 0;
int filled = 0;
while (filled < count)
{
if (bitCount == 0)
{
bitBuffer = src[offset++];
bitCount = 8;
}
ret |= (bitBuffer & 1) << filled;
bitBuffer >>= 1;
bitCount--;
filled++;
}
return ret;
}
}
/*
* Given a list of repeated code lengths rep[0..n-1], where each byte is a
* count (high four bits + 1) and a code length (low four bits), generate the
* list of code lengths. This compaction reduces the size of the object code.
* Then given the list of code lengths length[0..n-1] representing a canonical
* Huffman code for n symbols, construct the tables required to decode those
* codes. Those tables are the number of codes of each length, and the symbols
* sorted by length, retaining their original order within each length.
*/
class Huffman
{
public short[] Count; // number of symbols of each length
public short[] Symbol; // canonically ordered symbols
public Huffman(byte[] rep, int n, short SymbolCount)
{
short[] length = new short[256]; // code lengths
int s = 0; // current symbol
// convert compact repeat counts into symbol bit length list
foreach (byte code in rep)
{
int num = (code >> 4) + 1; // Number of codes (top four bits plus 1)
byte len = (byte)(code & 15); // Code length (low four bits)
do
{
length[s++] = len;
} while (--num > 0);
}
n = s;
// count number of codes of each length
Count = new short[Blast.MAXBITS + 1];
for (int i = 0; i < n; i++)
Count[length[i]]++;
// no codes!
if (Count[0] == n)
return;
// check for an over-subscribed or incomplete set of lengths
int left = 1; // one possible code of zero length
for (int len = 1; len <= Blast.MAXBITS; len++)
{
left <<= 1;
// one more bit, double codes left
left -= Count[len];
// deduct count from possible codes
if (left < 0)
throw new InvalidDataException ("over subscribed code set");
}
// generate offsets into symbol table for each length for sorting
short[] offs = new short[Blast.MAXBITS + 1];
for (int len = 1; len < Blast.MAXBITS; len++)
offs[len + 1] = (short)(offs[len] + Count[len]);
// put symbols in table sorted by length, by symbol order within each length
Symbol = new short[SymbolCount];
for (short i = 0; i < n; i++)
if (length[i] != 0)
Symbol[offs[length[i]]++] = i;
}
}
}

View File

@@ -1,406 +1,406 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
namespace OpenRA.FileFormats
{
class Blowfish
{
public Blowfish(byte[] key)
{
for (int i = 0, j = 0; i < 18; ++i)
{
uint a = key[j++ % key.Length];
uint b = key[j++ % key.Length];
uint c = key[j++ % key.Length];
uint d = key[j++ % key.Length];
m_p[i] ^= a << 24 | b << 16 | c << 8 | d;
}
uint l = 0, r = 0;
for (int i = 0; i < 18; )
{
Encrypt(ref l, ref r);
m_p[i++] = l;
m_p[i++] = r;
}
for (int i = 0; i < 4; ++i)
for (int j = 0; j < 256; )
{
Encrypt(ref l, ref r);
m_s[i, j++] = l;
m_s[i, j++] = r;
}
}
public uint[] Encrypt(uint[] data) { return RunCipher(data, Encrypt); }
public uint[] Decrypt(uint[] data) { return RunCipher(data, Decrypt); }
delegate void CipherFunc( ref uint a, ref uint b );
uint[] RunCipher(uint[] data, CipherFunc f)
{
uint[] result = new uint[data.Length];
int size = data.Length / 2;
int i = 0;
while (size-- > 0)
{
uint a = SwapBytes(data[i]);
uint b = SwapBytes(data[i+1]);
f(ref a, ref b);
result[i++] = SwapBytes(a);
result[i++] = SwapBytes(b);
}
return result;
}
void Encrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[0];
bool x = false;
for( int i = 1; i <= 16; i++, x ^= true)
{
if (x)
Round(ref _a, _b, i);
else
Round(ref _b, _a, i);
}
_b ^= m_p[17];
a = _b;
b = _a;
}
void Decrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[17];
bool x = false;
for (int i = 16; i >= 1; i--, x ^= true)
{
if (x)
Round(ref _a, _b, i);
else
Round(ref _b, _a, i);
}
_b ^= m_p[0];
a = _b;
b = _a;
}
uint S(uint x, int i)
{
return m_s[i, (x >> ((3 - i) << 3)) & 0xff];
}
uint bf_f(uint x)
{
return ((S(x, 0) + S(x, 1)) ^ S(x, 2)) + S(x, 3);
}
void Round(ref uint a, uint b, int n)
{
a ^= bf_f(b) ^ m_p[n];
}
uint SwapBytes(uint i)
{
i = (i << 16) | (i >> 16);
i = ((i << 8) & 0xff00ff00) | ((i >> 8) & 0x00ff00ff);
return i;
}
uint[] m_p = new uint[] {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b
};
uint[,] m_s = new uint[,] {
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a
},
{
0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7
},
{
0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0
},
{
0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
}
};
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.FileFormats
{
class Blowfish
{
public Blowfish(byte[] key)
{
for (int i = 0, j = 0; i < 18; ++i)
{
uint a = key[j++ % key.Length];
uint b = key[j++ % key.Length];
uint c = key[j++ % key.Length];
uint d = key[j++ % key.Length];
m_p[i] ^= a << 24 | b << 16 | c << 8 | d;
}
uint l = 0, r = 0;
for (int i = 0; i < 18; )
{
Encrypt(ref l, ref r);
m_p[i++] = l;
m_p[i++] = r;
}
for (int i = 0; i < 4; ++i)
for (int j = 0; j < 256; )
{
Encrypt(ref l, ref r);
m_s[i, j++] = l;
m_s[i, j++] = r;
}
}
public uint[] Encrypt(uint[] data) { return RunCipher(data, Encrypt); }
public uint[] Decrypt(uint[] data) { return RunCipher(data, Decrypt); }
delegate void CipherFunc( ref uint a, ref uint b );
uint[] RunCipher(uint[] data, CipherFunc f)
{
uint[] result = new uint[data.Length];
int size = data.Length / 2;
int i = 0;
while (size-- > 0)
{
uint a = SwapBytes(data[i]);
uint b = SwapBytes(data[i+1]);
f(ref a, ref b);
result[i++] = SwapBytes(a);
result[i++] = SwapBytes(b);
}
return result;
}
void Encrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[0];
bool x = false;
for( int i = 1; i <= 16; i++, x ^= true)
{
if (x)
Round(ref _a, _b, i);
else
Round(ref _b, _a, i);
}
_b ^= m_p[17];
a = _b;
b = _a;
}
void Decrypt(ref uint a, ref uint b)
{
uint _a = a, _b = b;
_a ^= m_p[17];
bool x = false;
for (int i = 16; i >= 1; i--, x ^= true)
{
if (x)
Round(ref _a, _b, i);
else
Round(ref _b, _a, i);
}
_b ^= m_p[0];
a = _b;
b = _a;
}
uint S(uint x, int i)
{
return m_s[i, (x >> ((3 - i) << 3)) & 0xff];
}
uint bf_f(uint x)
{
return ((S(x, 0) + S(x, 1)) ^ S(x, 2)) + S(x, 3);
}
void Round(ref uint a, uint b, int n)
{
a ^= bf_f(b) ^ m_p[n];
}
uint SwapBytes(uint i)
{
i = (i << 16) | (i >> 16);
i = ((i << 8) & 0xff00ff00) | ((i >> 8) & 0x00ff00ff);
return i;
}
uint[] m_p = new uint[] {
0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
0x9216d5d9, 0x8979fb1b
};
uint[,] m_s = new uint[,] {
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99,
0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16,
0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e,
0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee,
0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013,
0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef,
0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e,
0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60,
0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440,
0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce,
0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a,
0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e,
0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677,
0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193,
0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032,
0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88,
0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239,
0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e,
0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0,
0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3,
0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98,
0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88,
0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe,
0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6,
0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d,
0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b,
0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7,
0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba,
0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463,
0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f,
0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09,
0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3,
0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb,
0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279,
0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8,
0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab,
0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82,
0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db,
0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573,
0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0,
0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b,
0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790,
0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8,
0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4,
0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0,
0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7,
0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c,
0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad,
0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1,
0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299,
0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9,
0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477,
0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf,
0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49,
0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af,
0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa,
0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5,
0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41,
0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915,
0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400,
0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915,
0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664,
0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a
},
{
0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623,
0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266,
0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1,
0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e,
0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6,
0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1,
0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e,
0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1,
0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737,
0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8,
0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff,
0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd,
0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701,
0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7,
0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41,
0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331,
0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf,
0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af,
0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e,
0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87,
0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c,
0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2,
0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16,
0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd,
0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b,
0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509,
0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e,
0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3,
0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f,
0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a,
0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4,
0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960,
0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66,
0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28,
0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802,
0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84,
0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510,
0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf,
0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14,
0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e,
0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50,
0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7,
0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8,
0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281,
0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99,
0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696,
0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128,
0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73,
0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0,
0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0,
0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105,
0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250,
0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3,
0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285,
0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00,
0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061,
0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb,
0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e,
0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735,
0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc,
0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9,
0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340,
0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20,
0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7
},
{
0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934,
0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068,
0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af,
0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840,
0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45,
0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504,
0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a,
0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb,
0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee,
0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6,
0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42,
0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b,
0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2,
0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb,
0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527,
0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b,
0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33,
0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c,
0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3,
0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc,
0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17,
0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564,
0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b,
0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115,
0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922,
0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728,
0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0,
0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e,
0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37,
0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d,
0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804,
0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b,
0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3,
0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb,
0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d,
0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c,
0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350,
0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9,
0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a,
0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe,
0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d,
0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc,
0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f,
0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61,
0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2,
0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9,
0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2,
0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c,
0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e,
0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633,
0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10,
0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169,
0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52,
0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027,
0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5,
0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62,
0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634,
0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76,
0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24,
0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc,
0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4,
0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c,
0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837,
0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0
},
{
0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b,
0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe,
0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b,
0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4,
0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8,
0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6,
0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304,
0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22,
0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4,
0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6,
0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9,
0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59,
0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593,
0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51,
0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28,
0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c,
0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b,
0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28,
0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c,
0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd,
0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a,
0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319,
0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb,
0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f,
0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991,
0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32,
0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680,
0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166,
0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae,
0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb,
0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5,
0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47,
0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370,
0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d,
0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84,
0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048,
0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8,
0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd,
0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9,
0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7,
0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38,
0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f,
0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c,
0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525,
0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1,
0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442,
0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964,
0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e,
0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8,
0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d,
0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f,
0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299,
0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02,
0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc,
0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614,
0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a,
0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6,
0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b,
0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0,
0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060,
0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e,
0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9,
0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f,
0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6
}
};
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +1,36 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
namespace OpenRA.FileFormats
{
public static class Format2
{
public static int DecodeInto(byte[] src, byte[] dest)
{
FastByteReader r = new FastByteReader(src);
int i = 0;
while (!r.Done())
{
byte cmd = r.ReadByte();
if (cmd == 0)
{
byte count = r.ReadByte();
while (count-- > 0)
dest[i++] = 0;
}
else
dest[i++] = cmd;
}
return i;
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.FileFormats
{
public static class Format2
{
public static int DecodeInto(byte[] src, byte[] dest)
{
FastByteReader r = new FastByteReader(src);
int i = 0;
while (!r.Done())
{
byte cmd = r.ReadByte();
if (cmd == 0)
{
byte count = r.ReadByte();
while (count-- > 0)
dest[i++] = 0;
}
else
dest[i++] = cmd;
}
return i;
}
}
}

View File

@@ -1,78 +1,78 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
namespace OpenRA.FileFormats
{
public static class Format40
{
public static int DecodeInto( byte[] src, byte[] dest )
{
var ctx = new FastByteReader(src);
int destIndex = 0;
while( true )
{
byte i = ctx.ReadByte();
if( ( i & 0x80 ) == 0 )
{
int count = i & 0x7F;
if( count == 0 )
{
// case 6
count = ctx.ReadByte();
byte value = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
}
else
{
// case 5
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[destIndex] ^= ctx.ReadByte();
}
}
else
{
int count = i & 0x7F;
if( count == 0 )
{
count = ctx.ReadWord();
if( count == 0 )
return destIndex;
if( ( count & 0x8000 ) == 0 )
{
// case 2
destIndex += ( count & 0x7FFF );
}
else if( ( count & 0x4000 ) == 0 )
{
// case 3
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
dest[destIndex] ^= ctx.ReadByte();
}
else
{
// case 4
byte value = ctx.ReadByte();
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
}
}
else
{
// case 1
destIndex += count;
}
}
}
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.FileFormats
{
public static class Format40
{
public static int DecodeInto( byte[] src, byte[] dest )
{
var ctx = new FastByteReader(src);
int destIndex = 0;
while( true )
{
byte i = ctx.ReadByte();
if( ( i & 0x80 ) == 0 )
{
int count = i & 0x7F;
if( count == 0 )
{
// case 6
count = ctx.ReadByte();
byte value = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
}
else
{
// case 5
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[destIndex] ^= ctx.ReadByte();
}
}
else
{
int count = i & 0x7F;
if( count == 0 )
{
count = ctx.ReadWord();
if( count == 0 )
return destIndex;
if( ( count & 0x8000 ) == 0 )
{
// case 2
destIndex += ( count & 0x7FFF );
}
else if( ( count & 0x4000 ) == 0 )
{
// case 3
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
dest[destIndex] ^= ctx.ReadByte();
}
else
{
// case 4
byte value = ctx.ReadByte();
for( int end = destIndex + ( count & 0x3FFF ) ; destIndex < end ; destIndex++ )
dest[ destIndex ] ^= value;
}
}
else
{
// case 1
destIndex += count;
}
}
}
}
}
}

View File

@@ -1,125 +1,150 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
namespace OpenRA.FileFormats
{
class FastByteReader
{
readonly byte[] src;
int offset = 0;
public FastByteReader(byte[] src)
{
this.src = src;
}
public bool Done() { return offset >= src.Length; }
public byte ReadByte() { return src[offset++]; }
public int ReadWord()
{
int x = ReadByte();
return x | (ReadByte() << 8);
}
public void CopyTo(byte[] dest, int offset, int count)
{
Array.Copy(src, this.offset, dest, offset, count);
this.offset += count;
}
}
public static class Format80
{
static void ReplicatePrevious( byte[] dest, int destIndex, int srcIndex, int count )
{
if( srcIndex > destIndex )
throw new NotImplementedException( string.Format( "srcIndex > destIndex {0} {1}", srcIndex, destIndex ) );
if( destIndex - srcIndex == 1 )
{
for( int 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 ];
}
}
public static int DecodeInto( byte[] src, byte[] dest )
{
var ctx = new FastByteReader(src);
int destIndex = 0;
while( true )
{
byte 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;
ReplicatePrevious( dest, destIndex, destIndex - rpos, count );
destIndex += count;
}
else if( ( i & 0x40 ) == 0 )
{
// case 1
int count = i & 0x3F;
if( count == 0 )
return destIndex;
ctx.CopyTo( dest, destIndex, count );
destIndex += count;
}
else
{
int count3 = i & 0x3F;
if( count3 == 0x3E )
{
// case 4
int count = ctx.ReadWord();
byte color = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = color;
}
else if( count3 == 0x3F )
{
// case 5
int count = ctx.ReadWord();
int srcIndex = ctx.ReadWord();
if( srcIndex >= destIndex )
throw new NotImplementedException( string.Format( "srcIndex >= destIndex {0} {1}", srcIndex, destIndex ) );
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = dest[ srcIndex++ ];
}
else
{
// case 3
int count = count3 + 3;
int srcIndex = ctx.ReadWord();
if( srcIndex >= destIndex )
throw new NotImplementedException( string.Format( "srcIndex >= destIndex {0} {1}", srcIndex, destIndex ) );
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = dest[ srcIndex++ ];
}
}
}
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.IO;
namespace OpenRA.FileFormats
{
class FastByteReader
{
readonly byte[] src;
int offset = 0;
public FastByteReader(byte[] src)
{
this.src = src;
}
public bool Done() { return offset >= src.Length; }
public byte ReadByte() { return src[offset++]; }
public int ReadWord()
{
int x = ReadByte();
return x | (ReadByte() << 8);
}
public void CopyTo(byte[] dest, int offset, int count)
{
Array.Copy(src, this.offset, dest, offset, count);
this.offset += count;
}
public int Remaining() { return src.Length - offset; }
}
public static class Format80
{
static void ReplicatePrevious( byte[] dest, int destIndex, int srcIndex, int count )
{
if( srcIndex > destIndex )
throw new NotImplementedException("srcIndex > destIndex {0} {1}".F(srcIndex, destIndex));
if( destIndex - srcIndex == 1 )
{
for( int 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 ];
}
}
public static int DecodeInto( byte[] src, byte[] dest )
{
var ctx = new FastByteReader(src);
int destIndex = 0;
while( true )
{
byte 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;
ReplicatePrevious( dest, destIndex, destIndex - rpos, count );
destIndex += count;
}
else if( ( i & 0x40 ) == 0 )
{
// case 1
int count = i & 0x3F;
if( count == 0 )
return destIndex;
ctx.CopyTo( dest, destIndex, count );
destIndex += count;
}
else
{
int count3 = i & 0x3F;
if( count3 == 0x3E )
{
// case 4
int count = ctx.ReadWord();
byte color = ctx.ReadByte();
for( int end = destIndex + count ; destIndex < end ; destIndex++ )
dest[ destIndex ] = color;
}
else if( count3 == 0x3F )
{
// case 5
int count = ctx.ReadWord();
int 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++ ];
}
else
{
// case 3
int count = count3 + 3;
int 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++ ];
}
}
}
}
public static byte[] Encode(byte[] src)
{
/* quick & dirty format80 encoder -- only uses raw copy operator, terminated with a zero-run. */
/* this does not produce good compression, but it's valid format80 */
var ctx = new FastByteReader(src);
var ms = new MemoryStream();
do
{
var len = Math.Min(ctx.Remaining(), 0x3F);
ms.WriteByte((byte)(0x80 | len));
while (len-- > 0)
ms.WriteByte(ctx.ReadByte());
}
while (!ctx.Done());
ms.WriteByte(0x80); // terminator -- 0-length run.
return ms.ToArray();
}
}
}

View File

@@ -1,151 +1,151 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace OpenRA.FileFormats
{
public class IniFile
{
Dictionary<string, IniSection> sections = new Dictionary<string, IniSection>();
public IniFile( Stream s )
{
Load( s );
}
public IniFile( params Stream[] streams )
{
foreach( var s in streams )
Load( s );
}
public void Load( Stream s )
{
StreamReader reader = new StreamReader( s );
IniSection currentSection = null;
while( !reader.EndOfStream )
{
string line = reader.ReadLine();
if( line.Length == 0 ) continue;
switch( line[ 0 ] )
{
case ';': break;
case '[': currentSection = ProcessSection( line ); break;
default: ProcessEntry( line, currentSection ); break;
}
}
}
Regex sectionPattern = new Regex( @"^\[([^]]*)\]" );
IniSection ProcessSection( string line )
{
Match m = sectionPattern.Match( line );
if( m == null || !m.Success )
return null;
string sectionName = m.Groups[ 1 ].Value.ToLowerInvariant();
IniSection ret;
if( !sections.TryGetValue( sectionName, out ret ) )
sections.Add( sectionName, ret = new IniSection( sectionName ) );
return ret;
}
bool ProcessEntry( string line, IniSection currentSection )
{
int comment = line.IndexOf( ';' );
if( comment >= 0 )
line = line.Substring( 0, comment );
line = line.Trim();
if( line.Length == 0 )
return false;
var key = line;
var value = "";
int eq = line.IndexOf( '=' );
if( eq >= 0 )
{
key = line.Substring( 0, eq );
value = line.Substring( eq + 1, line.Length - eq - 1 );
}
if( currentSection == null )
throw new InvalidOperationException( "No current INI section" );
if( !currentSection.Contains( key ) )
currentSection.Add( key, value );
return true;
}
public IniSection GetSection( string s )
{
return GetSection( s, false );
}
public IniSection GetSection( string s, bool allowFail )
{
IniSection section;
if( sections.TryGetValue( s.ToLowerInvariant(), out section ) )
return section;
if( allowFail )
return new IniSection( s );
throw new InvalidOperationException( "Section does not exist in map or rules: " + s );
}
public IEnumerable<IniSection> Sections { get { return sections.Values; } }
}
public class IniSection : IEnumerable<KeyValuePair<string, string>>
{
public string Name { get; private set; }
Dictionary<string, string> values = new Dictionary<string, string>();
public IniSection( string name )
{
Name = name;
}
public void Add( string key, string value )
{
values[key] = value;
}
public bool Contains( string key )
{
return values.ContainsKey( key );
}
public string GetValue( string key, string defaultValue )
{
string s;
return values.TryGetValue( key, out s ) ? s : defaultValue;
}
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return values.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
namespace OpenRA.FileFormats
{
public class IniFile
{
Dictionary<string, IniSection> sections = new Dictionary<string, IniSection>();
public IniFile( Stream s )
{
Load( s );
}
public IniFile( params Stream[] streams )
{
foreach( var s in streams )
Load( s );
}
public void Load( Stream s )
{
StreamReader reader = new StreamReader( s );
IniSection currentSection = null;
while( !reader.EndOfStream )
{
string line = reader.ReadLine();
if( line.Length == 0 ) continue;
switch( line[ 0 ] )
{
case ';': break;
case '[': currentSection = ProcessSection( line ); break;
default: ProcessEntry( line, currentSection ); break;
}
}
}
Regex sectionPattern = new Regex( @"^\[([^]]*)\]" );
IniSection ProcessSection( string line )
{
Match m = sectionPattern.Match( line );
if( m == null || !m.Success )
return null;
string sectionName = m.Groups[ 1 ].Value.ToLowerInvariant();
IniSection ret;
if( !sections.TryGetValue( sectionName, out ret ) )
sections.Add( sectionName, ret = new IniSection( sectionName ) );
return ret;
}
bool ProcessEntry( string line, IniSection currentSection )
{
int comment = line.IndexOf( ';' );
if( comment >= 0 )
line = line.Substring( 0, comment );
line = line.Trim();
if( line.Length == 0 )
return false;
var key = line;
var value = "";
int eq = line.IndexOf( '=' );
if( eq >= 0 )
{
key = line.Substring( 0, eq );
value = line.Substring( eq + 1, line.Length - eq - 1 );
}
if( currentSection == null )
throw new InvalidOperationException( "No current INI section" );
if( !currentSection.Contains( key ) )
currentSection.Add( key, value );
return true;
}
public IniSection GetSection( string s )
{
return GetSection( s, false );
}
public IniSection GetSection( string s, bool allowFail )
{
IniSection section;
if( sections.TryGetValue( s.ToLowerInvariant(), out section ) )
return section;
if( allowFail )
return new IniSection( s );
throw new InvalidOperationException( "Section does not exist in map or rules: " + s );
}
public IEnumerable<IniSection> Sections { get { return sections.Values; } }
}
public class IniSection : IEnumerable<KeyValuePair<string, string>>
{
public string Name { get; private set; }
Dictionary<string, string> values = new Dictionary<string, string>();
public IniSection( string name )
{
Name = name;
}
public void Add( string key, string value )
{
values[key] = value;
}
public bool Contains( string key )
{
return values.ContainsKey( key );
}
public string GetValue( string key, string defaultValue )
{
string s;
return values.TryGetValue( key, out s ) ? s : defaultValue;
}
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
{
return values.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

View File

@@ -1,159 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
namespace OpenRA.FileFormats
{
public static class FileSystem
{
static List<IFolder> mountedFolders = new List<IFolder>();
static Cache<uint, List<IFolder>> allFiles = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
static void MountInner(IFolder folder)
{
mountedFolders.Add(folder);
foreach( var hash in folder.AllFileHashes() )
{
var l = allFiles[hash];
if( !l.Contains( folder ) )
l.Add( folder );
}
}
static IFolder OpenPackage(string filename)
{
if (filename.EndsWith(".mix"))
return new Package(filename);
else if (filename.EndsWith(".zip"))
return new CompressedPackage(filename);
else
return new Folder(filename);
}
public static void Mount(string name)
{
name = name.ToLowerInvariant();
var optional = name.StartsWith("~");
if (optional) name = name.Substring(1);
var a = (Action)(() => FileSystem.MountInner(OpenPackage(name)));
if (optional)
try { a(); }
catch { }
else
a();
}
public static void UnmountAll()
{
mountedFolders.Clear();
allFiles = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
}
public static void LoadFromManifest( Manifest manifest )
{
UnmountAll();
foreach (var dir in manifest.Folders) Mount(dir);
foreach (var pkg in manifest.Packages) Mount(pkg);
}
static Stream GetFromCache( Cache<uint, List<IFolder>> index, string filename )
{
foreach( var folder in index[ PackageEntry.HashFilename( filename ) ] )
if (folder.Exists(filename))
return folder.GetContent(filename);
return null;
}
public static Stream Open(string filename)
{
if( filename.IndexOfAny( new char[] { '/', '\\' } ) == -1 )
{
var ret = GetFromCache( allFiles, filename );
if( ret != null )
return ret;
}
foreach( IFolder folder in mountedFolders )
{
if (folder.Exists(filename))
return folder.GetContent(filename);
}
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
}
public static Stream OpenWithExts( string filename, params string[] exts )
{
if( filename.IndexOfAny( new char[] { '/', '\\' } ) == -1 )
{
foreach( var ext in exts )
{
var s = GetFromCache( allFiles, filename + ext );
if( s != null )
return s;
}
}
foreach( var ext in exts )
{
foreach( IFolder folder in mountedFolders )
if (folder.Exists(filename + ext))
return folder.GetContent( filename + ext );
}
throw new FileNotFoundException( string.Format( "File not found: {0}", filename ), filename );
}
public static bool Exists(string filename)
{
foreach (var folder in mountedFolders)
if (folder.Exists(filename))
return true;
return false;
}
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();
public static Assembly ResolveAssembly(object sender, ResolveEventArgs e)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
if (assembly.FullName == e.Name)
return assembly;
}
string[] frags = e.Name.Split(',');
var filename = frags[0] + ".dll";
Assembly a;
if (assemblyCache.TryGetValue(filename, out a))
return a;
if (FileSystem.Exists(filename))
using (Stream s = FileSystem.Open(filename))
{
byte[] buf = new byte[s.Length];
s.Read(buf, 0, buf.Length);
a = Assembly.Load(buf);
assemblyCache.Add(filename, a);
return a;
}
return null;
}
}
}

View File

@@ -0,0 +1,184 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA.FileFormats
{
public static class FileSystem
{
static List<IFolder> mountedFolders = new List<IFolder>();
static Cache<uint, List<IFolder>> allFiles = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
static void MountInner(IFolder folder)
{
mountedFolders.Add(folder);
foreach( var hash in folder.AllFileHashes() )
{
var l = allFiles[hash];
if( !l.Contains( folder ) )
l.Add( folder );
}
}
static int order = 0;
static IFolder OpenPackage(string filename)
{
return OpenPackage(filename, order++);
}
public static IFolder CreatePackage(string filename, int order, Dictionary<string, byte[]> content)
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
return new MixFile(filename, order, content);
else if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
else if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order, content);
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
throw new NotImplementedException("Creating .Z archives is unsupported");
else
return new Folder(filename, order, content);
}
public static IFolder OpenPackage(string filename, int order)
{
if (filename.EndsWith(".mix", StringComparison.InvariantCultureIgnoreCase))
return new MixFile(filename, order);
else if (filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
else if (filename.EndsWith(".oramap", StringComparison.InvariantCultureIgnoreCase))
return new ZipFile(filename, order);
else if (filename.EndsWith(".Z", StringComparison.InvariantCultureIgnoreCase))
return new InstallShieldPackage(filename, order);
else
return new Folder(filename, order);
}
public static void Mount(string name)
{
var optional = name.StartsWith("~");
if (optional) name = name.Substring(1);
// paths starting with ^ are relative to the support dir
if (name.StartsWith("^"))
name = Platform.SupportDir+name.Substring(1);
var a = (Action)(() => FileSystem.MountInner(OpenPackage(name)));
if (optional)
try { a(); }
catch { }
else
a();
}
public static void UnmountAll()
{
mountedFolders.Clear();
allFiles = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
}
public static bool Unmount(IFolder mount)
{
return (mountedFolders.RemoveAll(f => f == mount) > 0);
}
public static void Mount(IFolder mount)
{
if (!mountedFolders.Contains(mount)) mountedFolders.Add(mount);
}
public static void LoadFromManifest( Manifest manifest )
{
UnmountAll();
foreach (var dir in manifest.Folders) Mount(dir);
foreach (var pkg in manifest.Packages) Mount(pkg);
}
static Stream GetFromCache( Cache<uint, List<IFolder>> index, string filename )
{
var folder = index[PackageEntry.HashFilename(filename)]
.Where(x => x.Exists(filename))
.OrderBy(x => x.Priority)
.FirstOrDefault();
if (folder != null)
return folder.GetContent(filename);
return null;
}
public static Stream Open(string filename) { return OpenWithExts(filename, ""); }
public static Stream OpenWithExts( string filename, params string[] exts )
{
if( filename.IndexOfAny( new char[] { '/', '\\' } ) == -1 )
{
foreach( var ext in exts )
{
var s = GetFromCache( allFiles, filename + ext );
if( s != null )
return s;
}
}
foreach( var ext in exts )
{
var folder = mountedFolders
.Where(x => x.Exists(filename + ext))
.OrderByDescending(x => x.Priority)
.FirstOrDefault();
if (folder != null)
return folder.GetContent(filename + ext);
}
throw new FileNotFoundException("File not found: {0}".F(filename), filename);
}
public static bool Exists(string filename) { return mountedFolders.Any(f => f.Exists(filename)); }
static Dictionary<string, Assembly> assemblyCache = new Dictionary<string, Assembly>();
public static Assembly ResolveAssembly(object sender, ResolveEventArgs e)
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
if (assembly.FullName == e.Name)
return assembly;
var frags = e.Name.Split(',');
var filename = frags[0] + ".dll";
Assembly a;
if (assemblyCache.TryGetValue(filename, out a))
return a;
if (FileSystem.Exists(filename))
using (var s = FileSystem.Open(filename))
{
var buf = new byte[s.Length];
s.Read(buf, 0, buf.Length);
a = Assembly.Load(buf);
assemblyCache.Add(filename, a);
return a;
}
return null;
}
}
}

View File

@@ -0,0 +1,76 @@
#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;
namespace OpenRA.FileFormats
{
public class Folder : IFolder
{
readonly string path;
int priority;
// Create a new folder package
public Folder(string path, int priority, Dictionary<string, byte[]> contents)
{
this.path = path;
this.priority = priority;
if (Directory.Exists(path))
Directory.Delete(path, true);
Write(contents);
}
public Folder(string path, int priority)
{
this.path = path;
this.priority = priority;
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
}
public Stream GetContent(string filename)
{
try { return File.OpenRead( Path.Combine( path, filename ) ); }
catch { return null; }
}
public IEnumerable<uint> AllFileHashes()
{
foreach( var filename in Directory.GetFiles( path, "*", SearchOption.TopDirectoryOnly ) )
yield return PackageEntry.HashFilename( Path.GetFileName(filename) );
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path,filename));
}
public int Priority
{
get { return priority; }
}
public void Write(Dictionary<string, byte[]> contents)
{
if (!Directory.Exists(path))
Directory.CreateDirectory(path);
foreach (var file in contents)
using (var dataStream = File.Create(Path.Combine(path, file.Key)))
using (var writer = new BinaryWriter(dataStream))
writer.Write(file.Value);
}
}
}

View File

@@ -0,0 +1,126 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
public class InstallShieldPackage : IFolder
{
readonly Dictionary<uint, PackageEntry> index = new Dictionary<uint, PackageEntry>();
readonly Stream s;
readonly long dataStart = 255;
int priority;
public InstallShieldPackage(string filename, int priority)
{
this.priority = priority;
s = FileSystem.Open(filename);
// Parse package header
BinaryReader reader = new BinaryReader(s);
uint signature = reader.ReadUInt32();
if (signature != 0x8C655D13)
throw new InvalidDataException("Not an Installshield package");
reader.ReadBytes(8);
/*var FileCount = */reader.ReadUInt16();
reader.ReadBytes(4);
/*var ArchiveSize = */reader.ReadUInt32();
reader.ReadBytes(19);
var TOCAddress = reader.ReadInt32();
reader.ReadBytes(4);
var DirCount = reader.ReadUInt16();
// Parse the directory list
s.Seek(TOCAddress, SeekOrigin.Begin);
BinaryReader TOCreader = new BinaryReader(s);
for (var i = 0; i < DirCount; i++)
ParseDirectory(TOCreader);
}
void ParseDirectory(BinaryReader reader)
{
// Parse directory header
var FileCount = reader.ReadUInt16();
var ChunkSize = reader.ReadUInt16();
var NameLength = reader.ReadUInt16();
reader.ReadChars(NameLength); //var DirName = new String(reader.ReadChars(NameLength));
// Skip to the end of the chunk
reader.ReadBytes(ChunkSize - NameLength - 6);
// Parse files
for (var i = 0; i < FileCount; i++)
ParseFile(reader);
}
uint AccumulatedData = 0;
void ParseFile(BinaryReader reader)
{
reader.ReadBytes(7);
var CompressedSize = reader.ReadUInt32();
reader.ReadBytes(12);
var ChunkSize = reader.ReadUInt16();
reader.ReadBytes(4);
var NameLength = reader.ReadByte();
var FileName = new String(reader.ReadChars(NameLength));
var hash = PackageEntry.HashFilename(FileName);
index.Add(hash, new PackageEntry(hash,AccumulatedData, CompressedSize));
AccumulatedData += CompressedSize;
// Skip to the end of the chunk
reader.ReadBytes(ChunkSize - NameLength - 30);
}
public Stream GetContent(uint hash)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
return null;
s.Seek( dataStart + e.Offset, SeekOrigin.Begin );
byte[] data = new byte[ e.Length ];
s.Read( data, 0, (int)e.Length );
return new MemoryStream(Blast.Decompress(data));
}
public Stream GetContent(string filename)
{
return GetContent(PackageEntry.HashFilename(filename));
}
public IEnumerable<uint> AllFileHashes()
{
return index.Keys;
}
public bool Exists(string filename)
{
return index.ContainsKey(PackageEntry.HashFilename(filename));
}
public int Priority
{
get { return 2000 + priority; }
}
public void Write(Dictionary<string, byte[]> contents)
{
throw new NotImplementedException("Cannot save InstallShieldPackages.");
}
}
}

View File

@@ -1,160 +1,224 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
public interface IFolder
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> AllFileHashes();
}
public class Package : IFolder
{
readonly Dictionary<uint, PackageEntry> index;
readonly bool isRmix, isEncrypted;
readonly long dataStart;
readonly Stream s;
public Package(string filename)
{
s = FileSystem.Open(filename);
BinaryReader reader = new BinaryReader(s);
uint signature = reader.ReadUInt32();
isRmix = 0 == (signature & ~(uint)(MixFileFlags.Checksum | MixFileFlags.Encrypted));
if (isRmix)
{
isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted);
if( isEncrypted )
{
index = ParseRaHeader( s, out dataStart ).ToDictionary(x => x.Hash);
return;
}
}
else
s.Seek( 0, SeekOrigin.Begin );
isEncrypted = false;
index = ParseTdHeader(s, out dataStart).ToDictionary(x => x.Hash);
}
const long headerStart = 84;
List<PackageEntry> ParseRaHeader(Stream s, out long dataStart)
{
BinaryReader reader = new BinaryReader(s);
byte[] keyblock = reader.ReadBytes(80);
byte[] blowfishKey = new BlowfishKeyProvider().DecryptKey(keyblock);
uint[] h = ReadUints(reader, 2);
Blowfish fish = new Blowfish(blowfishKey);
MemoryStream ms = Decrypt( h, fish );
BinaryReader reader2 = new BinaryReader(ms);
ushort numFiles = reader2.ReadUInt16();
reader2.ReadUInt32(); /*datasize*/
s.Position = headerStart;
reader = new BinaryReader(s);
int byteCount = 6 + numFiles * PackageEntry.Size;
h = ReadUints( reader, ( byteCount + 3 ) / 4 );
ms = Decrypt( h, fish );
dataStart = headerStart + byteCount + ( ( ~byteCount + 1 ) & 7 );
long ds;
return ParseTdHeader( ms, out ds );
}
static MemoryStream Decrypt( uint[] h, Blowfish fish )
{
uint[] decrypted = fish.Decrypt( h );
MemoryStream ms = new MemoryStream();
BinaryWriter writer = new BinaryWriter( ms );
foreach( uint t in decrypted )
writer.Write( t );
writer.Flush();
ms.Position = 0;
return ms;
}
uint[] ReadUints(BinaryReader r, int count)
{
uint[] ret = new uint[count];
for (int i = 0; i < ret.Length; i++)
ret[i] = r.ReadUInt32();
return ret;
}
List<PackageEntry> ParseTdHeader(Stream s, out long dataStart)
{
List<PackageEntry> items = new List<PackageEntry>();
BinaryReader reader = new BinaryReader(s);
ushort numFiles = reader.ReadUInt16();
/*uint dataSize = */reader.ReadUInt32();
for (int i = 0; i < numFiles; i++)
items.Add(new PackageEntry(reader));
dataStart = s.Position;
return items;
}
public Stream GetContent(uint hash)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
return null;
s.Seek( dataStart + e.Offset, SeekOrigin.Begin );
byte[] data = new byte[ e.Length ];
s.Read( data, 0, (int)e.Length );
return new MemoryStream(data);
}
public Stream GetContent(string filename)
{
return GetContent(PackageEntry.HashFilename(filename));
}
public IEnumerable<uint> AllFileHashes()
{
return index.Keys;
}
public bool Exists(string filename)
{
return index.ContainsKey(PackageEntry.HashFilename(filename));
}
}
[Flags]
enum MixFileFlags : uint
{
Checksum = 0x10000,
Encrypted = 0x20000,
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
public interface IFolder
{
Stream GetContent(string filename);
bool Exists(string filename);
IEnumerable<uint> AllFileHashes();
void Write(Dictionary<string, byte[]> contents);
int Priority { get; }
}
public class MixFile : IFolder
{
readonly Dictionary<uint, PackageEntry> index;
readonly bool isRmix, isEncrypted;
readonly long dataStart;
readonly Stream s;
int priority;
// Create a new MixFile
public MixFile(string filename, int priority, Dictionary<string, byte[]> contents)
{
this.priority = priority;
if (File.Exists(filename))
File.Delete(filename);
s = File.Create(filename);
Write(contents);
}
public MixFile(string filename, int priority)
{
this.priority = priority;
s = FileSystem.Open(filename);
BinaryReader reader = new BinaryReader(s);
uint signature = reader.ReadUInt32();
isRmix = 0 == (signature & ~(uint)(MixFileFlags.Checksum | MixFileFlags.Encrypted));
if (isRmix)
{
isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted);
if( isEncrypted )
{
index = ParseRaHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.RaHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
return;
}
}
else
s.Seek( 0, SeekOrigin.Begin );
isEncrypted = false;
index = ParseTdHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
"MixFile.TdHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
);
}
const long headerStart = 84;
List<PackageEntry> ParseRaHeader(Stream s, out long dataStart)
{
BinaryReader reader = new BinaryReader(s);
byte[] keyblock = reader.ReadBytes(80);
byte[] blowfishKey = new BlowfishKeyProvider().DecryptKey(keyblock);
uint[] h = ReadUints(reader, 2);
Blowfish fish = new Blowfish(blowfishKey);
MemoryStream ms = Decrypt( h, fish );
BinaryReader reader2 = new BinaryReader(ms);
ushort numFiles = reader2.ReadUInt16();
reader2.ReadUInt32(); /*datasize*/
s.Position = headerStart;
reader = new BinaryReader(s);
int byteCount = 6 + numFiles * PackageEntry.Size;
h = ReadUints( reader, ( byteCount + 3 ) / 4 );
ms = Decrypt( h, fish );
dataStart = headerStart + byteCount + ( ( ~byteCount + 1 ) & 7 );
long ds;
return ParseTdHeader( ms, out ds );
}
static MemoryStream Decrypt( uint[] h, Blowfish fish )
{
uint[] decrypted = fish.Decrypt( h );
MemoryStream ms = new MemoryStream();
BinaryWriter writer = new BinaryWriter( ms );
foreach( uint t in decrypted )
writer.Write( t );
writer.Flush();
ms.Position = 0;
return ms;
}
uint[] ReadUints(BinaryReader r, int count)
{
uint[] ret = new uint[count];
for (int i = 0; i < ret.Length; i++)
ret[i] = r.ReadUInt32();
return ret;
}
List<PackageEntry> ParseTdHeader(Stream s, out long dataStart)
{
List<PackageEntry> items = new List<PackageEntry>();
BinaryReader reader = new BinaryReader(s);
ushort numFiles = reader.ReadUInt16();
/*uint dataSize = */reader.ReadUInt32();
for (int i = 0; i < numFiles; i++)
items.Add(new PackageEntry(reader));
dataStart = s.Position;
return items;
}
public Stream GetContent(uint hash)
{
PackageEntry e;
if (!index.TryGetValue(hash, out e))
return null;
s.Seek( dataStart + e.Offset, SeekOrigin.Begin );
byte[] data = new byte[ e.Length ];
s.Read( data, 0, (int)e.Length );
return new MemoryStream(data);
}
public Stream GetContent(string filename)
{
return GetContent(PackageEntry.HashFilename(filename));
}
public IEnumerable<uint> AllFileHashes()
{
return index.Keys;
}
public bool Exists(string filename)
{
return index.ContainsKey(PackageEntry.HashFilename(filename));
}
public int Priority
{
get { return 1000 + priority; }
}
public void Write(Dictionary<string, byte[]> contents)
{
// Cannot modify existing mixfile - rename existing file and
// create a new one with original content plus modifications
FileSystem.Unmount(this);
// TODO: Add existing data to the contents list
if (index.Count > 0)
throw new NotImplementedException("Updating mix files unfinished");
// Construct a list of entries for the file header
uint dataSize = 0;
var items = new List<PackageEntry>();
foreach (var kv in contents)
{
uint length = (uint)kv.Value.Length;
uint hash = PackageEntry.HashFilename(Path.GetFileName(kv.Key));
items.Add(new PackageEntry(hash, dataSize, length));
dataSize += length;
}
// Write the new file
s.Seek(0,SeekOrigin.Begin);
using (var writer = new BinaryWriter(s))
{
// Write file header
writer.Write((ushort)items.Count);
writer.Write(dataSize);
foreach (var item in items)
item.Write(writer);
writer.Flush();
// Copy file data
foreach (var file in contents)
s.Write(file.Value);
}
}
}
[Flags]
enum MixFileFlags : uint
{
Checksum = 0x10000,
Encrypted = 0x20000,
}
}

View File

@@ -0,0 +1,117 @@
#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 ICSharpCode.SharpZipLib.Zip;
using SZipFile = ICSharpCode.SharpZipLib.Zip.ZipFile;
namespace OpenRA.FileFormats
{
public class ZipFile : IFolder
{
string filename;
SZipFile pkg;
int priority;
public ZipFile(string filename, int priority)
{
this.filename = filename;
this.priority = priority;
try
{
// pull the file into memory, dont keep it open.
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
}
catch (ZipException e)
{
Log.Write("debug", "Couldn't load zip file: {0}", e.Message);
}
}
// Create a new zip with the specified contents
public ZipFile(string filename, int priority, Dictionary<string, byte[]> contents)
{
this.priority = priority;
this.filename = filename;
if (File.Exists(filename))
File.Delete(filename);
pkg = SZipFile.Create(filename);
Write(contents);
}
public Stream GetContent(string filename)
{
using (var z = pkg.GetInputStream(pkg.GetEntry(filename)))
{
var ms = new MemoryStream();
int bufSize = 2048;
byte[] buf = new byte[bufSize];
while ((bufSize = z.Read(buf, 0, buf.Length)) > 0)
ms.Write(buf, 0, bufSize);
ms.Seek(0, SeekOrigin.Begin);
return ms;
}
}
public IEnumerable<uint> AllFileHashes()
{
foreach(ZipEntry entry in pkg)
yield return PackageEntry.HashFilename(entry.Name);
}
public bool Exists(string filename)
{
return pkg.GetEntry(filename) != null;
}
public int Priority
{
get { return 500 + priority; }
}
public void Write(Dictionary<string, byte[]> contents)
{
pkg.Close();
pkg = SZipFile.Create(filename);
pkg.BeginUpdate();
// TODO: Clear existing content?
foreach (var kvp in contents)
pkg.Add(new StaticMemoryDataSource(kvp.Value), kvp.Key);
pkg.CommitUpdate();
pkg.Close();
pkg = new SZipFile(new MemoryStream(File.ReadAllBytes(filename)));
}
}
class StaticMemoryDataSource : IStaticDataSource
{
byte[] data;
public StaticMemoryDataSource (byte[] data)
{
this.data = data;
}
public Stream GetSource()
{
return new MemoryStream(data);
}
}
}

View File

@@ -1,39 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileFormats
{
public class Folder : IFolder
{
readonly string path;
public Folder(string path) { this.path = path; }
public Stream GetContent(string filename)
{
try { return File.OpenRead( Path.Combine( path, filename ) ); }
catch { return null; }
}
public IEnumerable<uint> AllFileHashes()
{
foreach( var filename in Directory.GetFiles( path, "*", SearchOption.TopDirectoryOnly ) )
yield return PackageEntry.HashFilename( filename );
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path,filename));
}
}
}

View File

@@ -1,146 +1,146 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.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(BinaryReader reader)
{
Flags = (Dune2ImageFlags)reader.ReadUInt16();
Slices = reader.ReadByte();
Width = reader.ReadUInt16();
Height = reader.ReadByte();
FileSize = reader.ReadUInt16();
DataSize = reader.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 ? reader.ReadByte() : (byte)16;
LookupTable = new byte[n];
for (int i = 0; i < n; i++)
LookupTable[i] = reader.ReadByte();
}
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 stream)
{
BinaryReader reader = new BinaryReader(stream);
ImageCount = reader.ReadUInt16();
//Last offset is pointer to end of file.
uint[] offsets = new uint[ImageCount + 1];
uint temp = reader.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 ? reader.ReadUInt16() : reader.ReadUInt32()) + 2;
for (int i = 0; i < ImageCount; i++)
{
reader.BaseStream.Seek(offsets[i], SeekOrigin.Begin);
Dune2ImageHeader header = new Dune2ImageHeader(reader);
byte[] imgData = reader.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();
}
}
}
#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(BinaryReader reader)
{
Flags = (Dune2ImageFlags)reader.ReadUInt16();
Slices = reader.ReadByte();
Width = reader.ReadUInt16();
Height = reader.ReadByte();
FileSize = reader.ReadUInt16();
DataSize = reader.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 ? reader.ReadByte() : (byte)16;
LookupTable = new byte[n];
for (int i = 0; i < n; i++)
LookupTable[i] = reader.ReadByte();
}
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 stream)
{
BinaryReader reader = new BinaryReader(stream);
ImageCount = reader.ReadUInt16();
//Last offset is pointer to end of file.
uint[] offsets = new uint[ImageCount + 1];
uint temp = reader.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 ? reader.ReadUInt16() : reader.ReadUInt32()) + 2;
for (int i = 0; i < ImageCount; i++)
{
reader.BaseStream.Seek(offsets[i], SeekOrigin.Begin);
Dune2ImageHeader header = new Dune2ImageHeader(reader);
byte[] imgData = reader.ReadBytes(header.FileSize);
header.Image = new byte[header.Height * header.Width];
//Decode image data
if (header.Flags != Dune2ImageFlags.F2)
{
byte[] tempData = new byte[header.DataSize];
Format80.DecodeInto(imgData, tempData);
Format2.DecodeInto(tempData, header.Image);
}
else
Format2.DecodeInto(imgData, header.Image);
//Lookup values in lookup table
if (header.LookupTable != null)
for (int j = 0; j < header.Image.Length; j++)
header.Image[j] = header.LookupTable[header.Image[j]];
headers.Add(header);
}
}
public Dune2ImageHeader this[int index]
{
get { return headers[index]; }
}
public IEnumerator<Dune2ImageHeader> GetEnumerator()
{
return headers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}

View File

@@ -1,98 +1,95 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats.Graphics
{
[AttributeUsage( AttributeTargets.Assembly )]
public class RendererAttribute : Attribute
{
public readonly Type Type;
public RendererAttribute( Type graphicsDeviceType )
{
if( !typeof( IGraphicsDevice ).IsAssignableFrom( graphicsDeviceType ) )
throw new InvalidOperationException( "Incorrect type in RendererAttribute" );
Type = graphicsDeviceType;
}
}
public interface IGraphicsDevice
{
IVertexBuffer<Vertex> CreateVertexBuffer( int length );
IIndexBuffer CreateIndexBuffer( int length );
ITexture CreateTexture( Bitmap bitmap );
ITexture CreateTexture();
IShader CreateShader( Stream stream );
Size WindowSize { get; }
void Begin();
void End();
void Clear( Color color );
void Present();
void DrawIndexedPrimitives( PrimitiveType type, Range<int> vertexRange, Range<int> indexRange );
void DrawIndexedPrimitives( PrimitiveType type, int vertexPool, int numPrimitives );
void EnableScissor( int left, int top, int width, int height );
void DisableScissor();
}
public interface IVertexBuffer<T>
{
void Bind();
void SetData( T[] vertices, int length );
}
public interface IIndexBuffer
{
void Bind();
void SetData( ushort[] indices, int length );
}
public interface IShader
{
void SetValue( string name, float x, float y );
void SetValue( string param, ITexture texture );
void Commit();
void Render( Action a );
}
public interface ITexture
{
void SetData(Bitmap bitmap);
void SetData(uint[,] colors);
void SetData(byte[] colors, int width, int height);
}
public enum PrimitiveType
{
PointList,
LineList,
TriangleList,
}
public struct Range<T>
{
public readonly T Start, End;
public Range( T start, T end ) { Start = start; End = end; }
}
public enum WindowMode
{
Windowed,
Fullscreen,
PseudoFullscreen,
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats.Graphics
{
[AttributeUsage( AttributeTargets.Assembly )]
public class RendererAttribute : Attribute
{
public readonly Type Type;
public RendererAttribute( Type graphicsDeviceType )
{
if( !typeof( IDeviceFactory ).IsAssignableFrom( graphicsDeviceType ) )
throw new InvalidOperationException( "Incorrect type in RendererAttribute" );
Type = graphicsDeviceType;
}
}
public interface IDeviceFactory
{
IGraphicsDevice Create( Size size, WindowMode windowMode );
}
public interface IGraphicsDevice
{
IVertexBuffer<Vertex> CreateVertexBuffer( int length );
ITexture CreateTexture( Bitmap bitmap );
ITexture CreateTexture();
IShader CreateShader( string name );
Size WindowSize { get; }
void Clear();
void Present();
void PumpInput(IInputHandler inputHandler);
void DrawPrimitives( PrimitiveType type, int firstVertex, int numVertices );
void SetLineWidth( float width );
void EnableScissor( int left, int top, int width, int height );
void DisableScissor();
}
public interface IVertexBuffer<T>
{
void Bind();
void SetData( T[] vertices, int length );
}
public interface IShader
{
void SetVec(string name, float x, float y);
void SetTexture(string param, ITexture texture);
void Render(Action a);
}
public interface ITexture
{
void SetData(Bitmap bitmap);
void SetData(uint[,] colors);
void SetData(byte[] colors, int width, int height);
}
public enum PrimitiveType
{
PointList,
LineList,
TriangleList,
QuadList,
}
public struct Range<T>
{
public readonly T Start, End;
public Range( T start, T end ) { Start = start; End = end; }
}
public enum WindowMode
{
Windowed,
Fullscreen,
PseudoFullscreen,
}
}

View File

@@ -0,0 +1,75 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA
{
public interface IInputHandler
{
void ModifierKeys( Modifiers mods );
void OnKeyInput( KeyInput input );
void OnMouseInput( MouseInput input );
}
public struct MouseInput
{
public MouseInputEvent Event;
public MouseButton Button;
public int2 Location;
public Modifiers Modifiers;
public int MultiTapCount;
public MouseInput( MouseInputEvent ev, MouseButton button, int2 location, Modifiers mods, int multiTapCount )
{
this.Event = ev;
this.Button = button;
this.Location = location;
this.Modifiers = mods;
this.MultiTapCount = multiTapCount;
}
}
public enum MouseInputEvent { Down, Move, Up };
[Flags]
public enum MouseButton
{
None = 0,
Left = 1,
Right = 2,
Middle = 4,
WheelDown = 8,
WheelUp = 16
}
[Flags]
public enum Modifiers
{
None = 0,
Shift = 1,
Alt = 2,
Ctrl = 4,
Meta = 8,
}
public enum KeyInputEvent { Down, Up };
public struct KeyInput
{
public KeyInputEvent Event;
public char UnicodeChar;
public string KeyName;
public Modifiers Modifiers;
public int VirtKey;
public int MultiTapCount;
}
}

View File

@@ -0,0 +1,182 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 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.IO.Compression;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
namespace OpenRA.FileFormats.Graphics
{
public static class PngLoader
{
public static Bitmap Load(string filename)
{
using (var s = File.OpenRead(filename))
return Load(s);
}
public static Bitmap Load(Stream s)
{
using (var br = new BinaryReader(s))
{
var signature = new byte[] { 137, 80, 78, 71, 13, 10, 26, 10 };
foreach (var b in signature)
if (br.ReadByte() != b)
throw new InvalidDataException("PNG Signature is bogus");
Bitmap bitmap = null;
Color[] palette = null;
List<byte> data = new List<byte>();
for (; ; )
{
var length = IPAddress.NetworkToHostOrder(br.ReadInt32());
var type = Encoding.UTF8.GetString(br.ReadBytes(4));
var content = br.ReadBytes(length);
/*var crc = */br.ReadInt32();
using (var ms = new MemoryStream(content))
using (var cr = new BinaryReader(ms))
switch (type)
{
case "IHDR":
{
var width = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var height = IPAddress.NetworkToHostOrder(cr.ReadInt32());
var bitDepth = cr.ReadByte();
var colorType = (PngColorType)cr.ReadByte();
var compression = cr.ReadByte();
/*var filter = */cr.ReadByte();
var interlace = cr.ReadByte();
if (compression != 0) throw new InvalidDataException("Compression method not supported");
if (interlace != 0) throw new InvalidDataException("Interlacing not supported");
bitmap = new Bitmap(width, height, MakePixelFormat(bitDepth, colorType));
}
break;
case "PLTE":
{
palette = new Color[256];
for (var i = 0; i < 256; i++)
{
var r = cr.ReadByte(); var g = cr.ReadByte(); var b = cr.ReadByte();
palette[i] = Color.FromArgb(r, g, b);
}
}
break;
case "tRNS":
{
for (var i = 0; i < length; i++)
palette[i] = Color.FromArgb(cr.ReadByte(), palette[i]);
}
break;
case "IDAT":
{
data.AddRange(content);
}
break;
case "IEND":
{
var bits = bitmap.LockBits(bitmap.Bounds(),
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
using (var ns = new MemoryStream(data.ToArray()))
{
// 'zlib' flags bytes; confuses the DeflateStream.
/*var flags = (byte)*/ns.ReadByte();
/*var moreFlags = (byte)*/ns.ReadByte();
using (var ds = new DeflateStream(ns, CompressionMode.Decompress))
using (var dr = new BinaryReader(ds))
{
var prevLine = new byte[bitmap.Width]; // all zero
for (var y = 0; y < bitmap.Height; y++)
{
var filter = (PngFilter)dr.ReadByte();
var line = dr.ReadBytes(bitmap.Width);
for (var i = 0; i < bitmap.Width; i++)
line[i] = i > 0
? UnapplyFilter(filter, line[i], line[i - 1], prevLine[i], prevLine[i - 1])
: UnapplyFilter(filter, line[i], 0, prevLine[i], 0);
Marshal.Copy(line, 0, new IntPtr(bits.Scan0.ToInt64() + y * bits.Stride), line.Length);
prevLine = line;
}
}
}
bitmap.UnlockBits(bits);
using (var temp = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
{
var cp = temp.Palette;
for (var i = 0; i < 256; i++)
cp.Entries[i] = palette[i]; // finalize the palette.
bitmap.Palette = cp;
return bitmap;
}
}
}
}
}
}
static byte UnapplyFilter(PngFilter f, byte x, byte a, byte b, byte c)
{
switch (f)
{
case PngFilter.None: return x;
case PngFilter.Sub: return (byte)(x + a);
case PngFilter.Up: return (byte)(x + b);
case PngFilter.Average: return (byte)(x + (a + b) / 2);
case PngFilter.Paeth: return (byte)(x + Paeth(a, b, c));
default:
throw new InvalidOperationException("Unsupported Filter");
}
}
static byte Paeth(byte a, byte b, byte c)
{
var p = a + b - c;
var pa = Math.Abs(p - a);
var pb = Math.Abs(p - b);
var pc = Math.Abs(p - c);
return (pa <= pb && pa <= pc) ? a :
(pb <= pc) ? b : c;
}
[Flags]
enum PngColorType { Indexed = 1, Color = 2, Alpha = 4 };
enum PngFilter { None, Sub, Up, Average, Paeth };
static PixelFormat MakePixelFormat(byte bitDepth, PngColorType colorType)
{
if (bitDepth == 8 && colorType == (PngColorType.Indexed | PngColorType.Color))
return PixelFormat.Format8bppIndexed;
throw new InvalidDataException("Unknown pixelformat");
}
}
}

View File

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

View File

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

View File

@@ -1,28 +1,28 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Runtime.InteropServices;
namespace OpenRA.FileFormats.Graphics
{
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
{
public float x, y, z, u, v;
public float p, c;
public Vertex(float2 xy, float2 uv, float2 pc)
{
this.x = xy.X; this.y = xy.Y; this.z = 0;
this.u = uv.X; this.v = uv.Y;
this.p = pc.X; this.c = pc.Y;
}
}
}
#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.Runtime.InteropServices;
namespace OpenRA.FileFormats.Graphics
{
[StructLayout(LayoutKind.Sequential)]
public struct Vertex
{
public float x, y, z, u, v;
public float p, c;
public Vertex(float2 xy, float2 uv, float2 pc)
{
this.x = xy.X; this.y = xy.Y; this.z = 0;
this.u = uv.X; this.v = uv.Y;
this.p = pc.X; this.c = pc.Y;
}
}
}

View File

@@ -1,16 +1,16 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* 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 LICENSE.
* see COPYING.
*/
#endregion
using System;
using System.IO;
#endregion
using System;
using System.IO;
namespace OpenRA.FileFormats
{
public class VqaReader
@@ -19,7 +19,7 @@ namespace OpenRA.FileFormats
public readonly byte Framerate;
public readonly ushort Width;
public readonly ushort Height;
Stream stream;
int currentFrame;
ushort numColors;
@@ -32,75 +32,75 @@ namespace OpenRA.FileFormats
// Stores a list of subpixels, referenced by the VPTZ chunk
byte[] cbf;
byte[] cbp;
byte[] cbp;
int cbChunk = 0;
int cbOffset = 0;
// Top half contains block info, bottom half contains references to cbf array
byte[] origData;
// Final frame output
uint[,] frameData;
byte[] audioData; // audio for this frame: 22050Hz 16bit mono pcm, uncompressed.
public byte[] AudioData { get { return audioData; } }
uint[,] frameData;
byte[] audioData; // audio for this frame: 22050Hz 16bit mono pcm, uncompressed.
public byte[] AudioData { get { return audioData; } }
public int CurrentFrame { get { return currentFrame; } }
public VqaReader( Stream stream )
{
this.stream = stream;
BinaryReader reader = new BinaryReader( stream );
// Decode FORM chunk
if (new String(reader.ReadChars(4)) != "FORM")
throw new InvalidDataException("Invalid vqa (invalid FORM section)");
/*var length = */ reader.ReadUInt32();
if (new String(reader.ReadChars(8)) != "WVQAVQHD")
throw new InvalidDataException("Invalid vqa (not WVQAVQHD)");
/* var length = */reader.ReadUInt32();
/*var version = */reader.ReadUInt16();
/*var flags = */reader.ReadUInt16();
Frames = reader.ReadUInt16();
Width = reader.ReadUInt16();
Height = reader.ReadUInt16();
blockWidth = reader.ReadByte();
blockHeight = reader.ReadByte();
Framerate = reader.ReadByte();
cbParts = reader.ReadByte();
blocks = new int2(Width / blockWidth, Height / blockHeight);
numColors = reader.ReadUInt16();
/*var maxBlocks = */reader.ReadUInt16();
/*var unknown1 = */reader.ReadUInt16();
/*var unknown2 = */reader.ReadUInt32();
// Audio
/*var freq = */reader.ReadUInt16();
/*var channels = */reader.ReadByte();
/*var bits = */reader.ReadByte();
/*var unknown3 = */reader.ReadChars(14);
var frameSize = NextPowerOf2(Math.Max(Width,Height));
var frameSize = Exts.NextPowerOf2(Math.Max(Width,Height));
cbf = new byte[Width*Height];
cbp = new byte[Width*Height];
palette = new uint[numColors];
origData = new byte[2*blocks.X*blocks.Y];
frameData = new uint[frameSize,frameSize];
var type = new String(reader.ReadChars(4));
if (type != "FINF")
{
reader.ReadBytes(27);
type = new String(reader.ReadChars(4));
}
/*var length = */reader.ReadUInt16();
/*var unknown4 = */reader.ReadUInt16();
// Frame offsets
offsets = new UInt32[Frames];
for (int i = 0; i < Frames; i++)
@@ -108,79 +108,79 @@ namespace OpenRA.FileFormats
offsets[i] = reader.ReadUInt32();
if (offsets[i] > 0x40000000) offsets[i] -= 0x40000000;
offsets[i] <<= 1;
}
}
CollectAudioData();
Reset();
}
}
public void Reset()
{
currentFrame = cbOffset = cbChunk = 0;
LoadFrame();
}
void CollectAudioData()
{
var ms = new MemoryStream();
var adpcmIndex = 0;
bool compressed = false;
for (var i = 0; i < Frames; i++)
{
stream.Seek(offsets[i], SeekOrigin.Begin);
BinaryReader reader = new BinaryReader(stream);
var end = (i < Frames - 1) ? offsets[i + 1] : stream.Length;
while (reader.BaseStream.Position < end)
{
var type = new String(reader.ReadChars(4));
var length = int2.Swap(reader.ReadUInt32());
switch (type)
{
void CollectAudioData()
{
var ms = new MemoryStream();
var adpcmIndex = 0;
bool compressed = false;
for (var i = 0; i < Frames; i++)
{
stream.Seek(offsets[i], SeekOrigin.Begin);
BinaryReader reader = new BinaryReader(stream);
var end = (i < Frames - 1) ? offsets[i + 1] : stream.Length;
while (reader.BaseStream.Position < end)
{
var type = new String(reader.ReadChars(4));
var length = int2.Swap(reader.ReadUInt32());
switch (type)
{
case "SND0":
case "SND2":
var rawAudio = reader.ReadBytes((int)length);
ms.Write(rawAudio);
compressed = (type == "SND2");
break;
default:
reader.ReadBytes((int)length);
break;
}
if (reader.PeekChar() == 0) reader.ReadByte();
}
}
audioData = (compressed) ? AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex) : ms.ToArray();
}
break;
default:
reader.ReadBytes((int)length);
break;
}
if (reader.PeekChar() == 0) reader.ReadByte();
}
}
audioData = (compressed) ? AudLoader.LoadSound(ms.ToArray(), ref adpcmIndex) : ms.ToArray();
}
public void AdvanceFrame()
{
currentFrame++;
LoadFrame();
}
void LoadFrame()
{
{
if (currentFrame >= Frames)
return;
// Seek to the start of the frame
stream.Seek(offsets[currentFrame], SeekOrigin.Begin);
BinaryReader reader = new BinaryReader(stream);
var end = (currentFrame < Frames - 1) ? offsets[currentFrame+1] : stream.Length;
while(reader.BaseStream.Position < end)
{
var type = new String(reader.ReadChars(4));
var length = int2.Swap(reader.ReadUInt32());
switch(type)
{
{
case "VQFR":
DecodeVQFR(reader);
break;
@@ -189,17 +189,17 @@ namespace OpenRA.FileFormats
reader.ReadBytes((int)length);
break;
}
// Chunks are aligned on even bytes; advance by a byte if the next one is null
if (reader.PeekChar() == 0) reader.ReadByte();
}
}
// VQA Frame
public void DecodeVQFR(BinaryReader reader)
{
{
while(true)
{
{
// Chunks are aligned on even bytes; may be padded with a single null
if (reader.PeekChar() == 0) reader.ReadByte();
var type = new String(reader.ReadChars(4));
@@ -214,9 +214,9 @@ namespace OpenRA.FileFormats
case "CBF0":
cbf = reader.ReadBytes(subchunkLength);
break;
// frame-modifier chunk
case "CBP0":
case "CBP0":
case "CBPZ":
// Partial buffer is full; dump and recreate
if (cbChunk == cbParts)
@@ -225,16 +225,16 @@ namespace OpenRA.FileFormats
cbf = (byte[])cbp.Clone();
else
Format80.DecodeInto( cbp, cbf );
cbOffset = cbChunk = 0;
}
var bytes = reader.ReadBytes(subchunkLength);
bytes.CopyTo(cbp,cbOffset);
cbOffset += subchunkLength;
cbChunk++;
break;
// Palette
case "CPL0":
for (int i = 0; i < numColors; i++)
@@ -245,7 +245,7 @@ namespace OpenRA.FileFormats
palette[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
}
break;
// Frame data
case "VPTZ":
Format80.DecodeInto( reader.ReadBytes(subchunkLength), origData );
@@ -256,39 +256,36 @@ namespace OpenRA.FileFormats
}
}
}
int cachedFrame = -1;
public uint[,] FrameData { get
void DecodeFrameData( int frame )
{
if (cachedFrame != currentFrame)
cachedFrame = currentFrame;
for (var y = 0; y < blocks.Y; y++)
for (var x = 0; x < blocks.X; x++)
{
var px = origData[x + y*blocks.X];
var mod = origData[x + (y + blocks.Y)*blocks.X];
for (var j = 0; j < blockHeight; j++)
for (var i = 0; i < blockWidth; i++)
{
var cbfi = (mod*256 + px)*8 + j*blockWidth + i;
byte color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y*blockHeight + j, x*blockWidth + i] = palette[color];
}
}
}
public uint[,] FrameData
{
get
{
cachedFrame = currentFrame;
for (var y = 0; y < blocks.Y; y++)
for (var x = 0; x < blocks.X; x++)
{
var px = origData[x + y*blocks.X];
var mod = origData[x + (y + blocks.Y)*blocks.X];
for (var j = 0; j < blockHeight; j++)
for (var i = 0; i < blockWidth; i++)
{
var cbfi = (mod*256 + px)*8 + j*blockWidth + i;
byte color = (mod == 0x0f) ? px : cbf[cbfi];
frameData[y*blockHeight + j, x*blockWidth + i] = palette[color];
}
}
if (cachedFrame != currentFrame)
DecodeFrameData(currentFrame);
return frameData;
}
return frameData;
}}
int NextPowerOf2(int v)
{
--v;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
++v;
return v;
}
}
}

View File

@@ -0,0 +1,131 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ICSharpCode.SharpZipLib;
using ICSharpCode.SharpZipLib.Zip;
namespace OpenRA.FileFormats
{
public static class InstallUtils
{
static IEnumerable<ZipEntry> GetEntries(this ZipInputStream z)
{
for (; ; )
{
var e = z.GetNextEntry();
if (e != null) yield return e; else break;
}
}
public static string GetMountedDisk(Func<string, bool> isValidDisk)
{
var volumes = DriveInfo.GetDrives()
.Where(v => v.DriveType == DriveType.CDRom && v.IsReady)
.Select(v => v.RootDirectory.FullName);
return volumes.FirstOrDefault(v => isValidDisk(v));
}
// TODO: The package should be mounted into its own context to avoid name collisions with installed files
public static bool ExtractFromPackage(string srcPath, string package, string[] files, string destPath, Action<string> onProgress, Action<string> onError)
{
if (!Directory.Exists(destPath))
Directory.CreateDirectory(destPath);
if (!Directory.Exists(srcPath)) { onError("Cannot find "+package); return false; }
FileSystem.Mount(srcPath);
if (!FileSystem.Exists(package)) { onError("Cannot find "+package); return false; }
FileSystem.Mount(package);
foreach (string s in files)
{
var destFile = Path.Combine(destPath, s);
using (var sourceStream = FileSystem.Open(s))
using (var destStream = File.Create(destFile))
{
onProgress("Extracting "+s);
destStream.Write(sourceStream.ReadAllBytes());
}
}
return true;
}
public static bool CopyFiles(string srcPath, string[] files, string destPath, Action<string> onProgress, Action<string> onError)
{
foreach (var file in files)
{
var fromPath = Path.Combine(srcPath, file);
if (!File.Exists(fromPath))
{
onError("Cannot find "+file);
return false;
}
var destFile = Path.GetFileName(file).ToLowerInvariant();
onProgress("Extracting "+destFile);
File.Copy(fromPath, Path.Combine(destPath, destFile), true);
}
return true;
}
public static bool ExtractZip(string zipFile, string dest, Action<string> onProgress, Action<string> onError)
{
if (!File.Exists(zipFile))
{
onError("Invalid path: "+zipFile);
return false;
}
List<string> extracted = new List<string>();
try
{
var z = new ZipInputStream(File.OpenRead(zipFile));
z.ExtractZip(dest, extracted, s => onProgress("Extracting "+s));
}
catch (SharpZipBaseException)
{
foreach(var f in extracted)
File.Delete(f);
onError("Invalid archive");
return false;
}
return true;
}
// TODO: this belongs in FileSystem/ZipFile
static void ExtractZip(this ZipInputStream z, string destPath, List<string> extracted, Action<string> onProgress)
{
foreach (var entry in z.GetEntries())
{
if (!entry.IsFile) continue;
onProgress(entry.Name);
Directory.CreateDirectory(Path.Combine(destPath, Path.GetDirectoryName(entry.Name)));
var path = Path.Combine(destPath, entry.Name);
extracted.Add(path);
using (var f = File.Create(path))
{
int bufSize = 2048;
byte[] buf = new byte[bufSize];
while ((bufSize = z.Read(buf, 0, buf.Length)) > 0)
f.Write(buf, 0, bufSize);
}
}
z.Close();
}
}
}

View File

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

View File

@@ -1,62 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.FileFormats
{
public class MapStub
{
public IFolder Package { get; protected set; }
// Yaml map data
public string Uid { get; protected set; }
[FieldLoader.Load] public bool Selectable;
[FieldLoader.Load] public string Title;
[FieldLoader.Load] public string Description;
[FieldLoader.Load] public string Author;
[FieldLoader.Load] public int PlayerCount;
[FieldLoader.Load] public string Tileset;
[FieldLoader.LoadUsing( "LoadWaypoints" )]
public Dictionary<string, int2> Waypoints = new Dictionary<string, int2>();
public IEnumerable<int2> SpawnPoints { get { return Waypoints.Select(kv => kv.Value); } }
[FieldLoader.Load] public int2 TopLeft;
[FieldLoader.Load] public int2 BottomRight;
public int Width { get { return BottomRight.X - TopLeft.X; } }
public int Height { get { return BottomRight.Y - TopLeft.Y; } }
public MapStub() {} // Hack for the editor - not used for anything important
public MapStub(IFolder package)
{
Package = package;
var yaml = MiniYaml.FromStream(Package.GetContent("map.yaml"));
FieldLoader.Load( this, new MiniYaml( null, yaml ) );
Uid = Package.GetContent("map.uid").ReadAllText();
}
static object LoadWaypoints( MiniYaml y )
{
var ret = new Dictionary<string, int2>();
foreach( var wp in y.NodesDict[ "Waypoints" ].NodesDict )
{
string[] loc = wp.Value.Value.Split( ',' );
ret.Add( wp.Key, new int2( int.Parse( loc[ 0 ] ), int.Parse( loc[ 1 ] ) ) );
}
return ret;
}
}
}

View File

@@ -1,14 +1,15 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#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 System;
namespace OpenRA.FileFormats
{
@@ -17,34 +18,32 @@ namespace OpenRA.FileFormats
public string Name;
public string Palette;
public bool OwnsWorld = false;
public bool NonCombatant = false;
public bool Playable = false;
public bool NonCombatant = false;
public bool Playable = false;
public string Bot = null;
public bool DefaultStartingUnits = false;
public bool AllowBots = true;
public bool LockRace = false;
public string Race;
public bool AllowBots = true;
public bool Required = false;
public bool LockRace = false;
public string Race;
public bool LockColor = false;
public Color Color = Color.FromArgb(238,238,238);
public Color Color2 = Color.FromArgb(44,28,24);
public int InitialCash = 0;
public string[] Allies = {};
public ColorRamp ColorRamp = new ColorRamp(0,0,238,34);
public bool LockSpawn = false;
public int Spawn = 0;
public bool LockTeam = false;
public int Team = 0;
public int InitialCash = 0;
public string[] Allies = {};
public string[] Enemies = {};
public PlayerReference() {}
public PlayerReference(MiniYaml my)
{
FieldLoader.Load(this, my);
}
public PlayerReference(string name, string race, bool ownsworld, bool noncombatant)
{
Name = name;
Race = race;
OwnsWorld = ownsworld;
NonCombatant = noncombatant;
}
public PlayerReference(MiniYaml my) { FieldLoader.Load(this, my); }
public override string ToString() { return Name; }
}
}

View File

@@ -1,11 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.FileFormats
@@ -15,17 +15,17 @@ namespace OpenRA.FileFormats
public readonly string Type;
public readonly int2 Location;
public readonly int Depth;
public SmudgeReference( string type, int2 location, int depth )
{
Type = type;
Location = location;
Depth = depth;
}
public override string ToString ()
{
return string.Format("{0} {1},{2} {3}", Type, Location.X,Location.Y, Depth);
}
public override string ToString()
{
return "{0} {1},{2} {3}".F(Type, Location.X, Location.Y, Depth);
}
}
}

View File

@@ -1,76 +1,76 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileFormats
{
public class Terrain
{
public readonly List<byte[]> TileBitmapBytes = new List<byte[]>();
public Terrain( Stream stream, int size )
{
// Try loading as a cnc .tem
BinaryReader reader = new BinaryReader( stream );
int Width = reader.ReadUInt16();
int Height = reader.ReadUInt16();
if( Width != size || Height != size )
throw new InvalidDataException( "{0}x{1} != {2}x{2}".F(Width, Height, size ) );
/*NumTiles = */reader.ReadUInt16();
/*Zero1 = */reader.ReadUInt16();
/*uint Size = */reader.ReadUInt32();
uint ImgStart = reader.ReadUInt32();
/*Zero2 = */reader.ReadUInt32();
int IndexEnd, IndexStart;
if (reader.ReadUInt16() == 65535) // ID1 = FFFFh for cnc
{
/*ID2 = */reader.ReadUInt16();
IndexEnd = reader.ReadInt32();
IndexStart = reader.ReadInt32();
}
else // Load as a ra .tem
{
stream.Position = 0;
reader = new BinaryReader( stream );
Width = reader.ReadUInt16();
Height = reader.ReadUInt16();
/*NumTiles = */reader.ReadUInt16();
reader.ReadUInt16();
/*XDim = */reader.ReadUInt16();
/*YDim = */reader.ReadUInt16();
/*uint FileSize = */reader.ReadUInt32();
ImgStart = reader.ReadUInt32();
reader.ReadUInt32();
reader.ReadUInt32();
IndexEnd = reader.ReadInt32();
reader.ReadUInt32();
IndexStart = reader.ReadInt32();
}
stream.Position = IndexStart;
foreach( byte b in new BinaryReader(stream).ReadBytes(IndexEnd - IndexStart) )
{
if (b != 255)
{
stream.Position = ImgStart + b * size * size;
TileBitmapBytes.Add(new BinaryReader(stream).ReadBytes(size * size));
}
else
TileBitmapBytes.Add(null);
}
}
}
}
#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 Terrain( Stream stream, int size )
{
// Try loading as a cnc .tem
BinaryReader reader = new BinaryReader( stream );
int Width = reader.ReadUInt16();
int Height = reader.ReadUInt16();
if( Width != size || Height != size )
throw new InvalidDataException( "{0}x{1} != {2}x{2}".F(Width, Height, size ) );
/*NumTiles = */reader.ReadUInt16();
/*Zero1 = */reader.ReadUInt16();
/*uint Size = */reader.ReadUInt32();
uint ImgStart = reader.ReadUInt32();
/*Zero2 = */reader.ReadUInt32();
int IndexEnd, IndexStart;
if (reader.ReadUInt16() == 65535) // ID1 = FFFFh for cnc
{
/*ID2 = */reader.ReadUInt16();
IndexEnd = reader.ReadInt32();
IndexStart = reader.ReadInt32();
}
else // Load as a ra .tem
{
stream.Position = 0;
reader = new BinaryReader( stream );
Width = reader.ReadUInt16();
Height = reader.ReadUInt16();
/*NumTiles = */reader.ReadUInt16();
reader.ReadUInt16();
/*XDim = */reader.ReadUInt16();
/*YDim = */reader.ReadUInt16();
/*uint FileSize = */reader.ReadUInt32();
ImgStart = reader.ReadUInt32();
reader.ReadUInt32();
reader.ReadUInt32();
IndexEnd = reader.ReadInt32();
reader.ReadUInt32();
IndexStart = reader.ReadInt32();
}
stream.Position = IndexStart;
foreach( byte b in new BinaryReader(stream).ReadBytes(IndexEnd - IndexStart) )
{
if (b != 255)
{
stream.Position = ImgStart + b * size * size;
TileBitmapBytes.Add(new BinaryReader(stream).ReadBytes(size * size));
}
else
TileBitmapBytes.Add(null);
}
}
}
}

View File

@@ -1,11 +1,11 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
namespace OpenRA.FileFormats
@@ -14,20 +14,11 @@ namespace OpenRA.FileFormats
{
public T type;
public U index;
public U image;
public TileReference(T t, U i)
{
type = t;
index = i;
image = i;
}
public TileReference(T t, U i, U im)
{
type = t;
index = i;
image = im;
}
public override int GetHashCode() { return type.GetHashCode() ^ index.GetHashCode(); }

View File

@@ -1,157 +1,203 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA.FileFormats
{
public class TerrainTypeInfo
{
public string Type;
public bool Buildable = true;
public bool AcceptSmudge = true;
public bool IsWater = false;
public Color Color;
public TerrainTypeInfo() {}
public TerrainTypeInfo(MiniYaml my) { FieldLoader.Load(this, my); }
public MiniYaml Save() { return FieldSaver.Save(this); }
}
public class TileTemplate
{
[FieldLoader.Load] public ushort Id;
[FieldLoader.Load] public string Image;
[FieldLoader.Load] public int2 Size;
[FieldLoader.Load] public bool PickAny;
[FieldLoader.LoadUsing( "LoadTiles" )]
public Dictionary<byte, string> Tiles = new Dictionary<byte, string>();
public TileTemplate() {}
public TileTemplate(MiniYaml my)
{
FieldLoader.Load( this, my );
}
static object LoadTiles( MiniYaml y )
{
return y.NodesDict["Tiles"].NodesDict.ToDictionary(
t => byte.Parse(t.Key),
t => t.Value.Value );
}
public MiniYaml Save()
{
var root = new List<MiniYamlNode>();
foreach (var field in new string[] {"Id", "Image", "Size", "PickAny"})
{
FieldInfo f = this.GetType().GetField(field);
if (f.GetValue(this) == null) continue;
root.Add( new MiniYamlNode( field, FieldSaver.FormatValue( this, f ) ) );
}
root.Add( new MiniYamlNode( "Tiles", null,
Tiles.Select( x => new MiniYamlNode( x.Key.ToString(), x.Value ) ).ToList() ) );
return new MiniYaml(null, root);
}
}
public class TileSet
{
public string Name;
public string Id;
public string Palette;
public int TileSize = 24;
public string[] Extensions;
public Dictionary<string, TerrainTypeInfo> Terrain = new Dictionary<string, TerrainTypeInfo>();
public Dictionary<ushort, Terrain> Tiles = new Dictionary<ushort, Terrain>();
public Dictionary<ushort, TileTemplate> Templates = new Dictionary<ushort, TileTemplate>();
static List<string> fields = new List<string>() {"Name", "TileSize", "Id", "Palette", "Extensions"};
public TileSet() {}
public TileSet( string filepath )
{
var yaml = MiniYaml.DictFromFile( filepath );
// General info
FieldLoader.Load(this, yaml["General"]);
// TerrainTypes
Terrain = yaml["Terrain"].NodesDict.Values
.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type);
// Templates
Templates = yaml["Templates"].NodesDict.Values
.Select(y => new TileTemplate(y)).ToDictionary(t => t.Id);
}
public void LoadTiles()
{
foreach (var t in Templates)
using( Stream s = FileSystem.OpenWithExts(t.Value.Image, Extensions) )
{
if( !Tiles.ContainsKey( t.Key ) )
Tiles.Add( t.Key, new Terrain( s, TileSize ) );
}
}
public void Save(string filepath)
{
var root = new List<MiniYamlNode>();
var gen = new List<MiniYamlNode>();
foreach (var field in fields)
{
FieldInfo f = this.GetType().GetField(field);
if (f.GetValue(this) == null) continue;
gen.Add( new MiniYamlNode( field, FieldSaver.FormatValue( this, f ) ) );
}
root.Add( new MiniYamlNode( "General", null, gen ) );
root.Add( new MiniYamlNode( "Terrain", null,
Terrain.Select( t => new MiniYamlNode(
"TerrainType@{0}".F( t.Value.Type ),
t.Value.Save() ) ).ToList() ) );
root.Add( new MiniYamlNode( "Templates", null,
Templates.Select( t => new MiniYamlNode(
"Template@{0}".F( t.Value.Id ),
t.Value.Save() ) ).ToList() ) );
root.WriteToFile(filepath);
}
public byte[] GetBytes(TileReference<ushort,byte> r)
{
Terrain tile;
if( Tiles.TryGetValue( r.type, out tile ) )
return tile.TileBitmapBytes[ r.image ];
byte[] missingTile = new byte[ TileSize * TileSize ];
for( int i = 0 ; i < missingTile.Length ; i++ )
missingTile[ i ] = 0x36;
return missingTile;
}
public string GetTerrainType(TileReference<ushort, byte> r)
{
var tt = Templates[r.type].Tiles;
string ret;
if (!tt.TryGetValue(r.image, out ret))
return "Clear"; // Default walkable
return ret;
}
}
}
#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.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
namespace OpenRA.FileFormats
{
public class TerrainTypeInfo
{
public string Type;
public string[] AcceptsSmudgeType = { };
public bool IsWater = false;
public Color Color;
public string CustomCursor;
public TerrainTypeInfo() {}
public TerrainTypeInfo(MiniYaml my) { FieldLoader.Load(this, my); }
public MiniYaml Save() { return FieldSaver.Save(this); }
}
public class TileTemplate
{
public ushort Id;
public string Image;
public int2 Size;
public bool PickAny;
public string Category;
[FieldLoader.LoadUsing( "LoadTiles" )]
public Dictionary<byte, string> Tiles = new Dictionary<byte, string>();
public TileTemplate() {}
public TileTemplate(MiniYaml my) { FieldLoader.Load( this, my ); }
static object LoadTiles( MiniYaml y )
{
return y.NodesDict["Tiles"].NodesDict.ToDictionary(
t => byte.Parse(t.Key),
t => t.Value.Value );
}
static readonly string[] Fields = { "Id", "Image", "Size", "PickAny" };
public MiniYaml Save()
{
var root = new List<MiniYamlNode>();
foreach (var field in Fields)
{
FieldInfo f = this.GetType().GetField(field);
if (f.GetValue(this) == null) continue;
root.Add( new MiniYamlNode( field, FieldSaver.FormatValue( this, f ) ) );
}
root.Add( new MiniYamlNode( "Tiles", null,
Tiles.Select( x => new MiniYamlNode( x.Key.ToString(), x.Value ) ).ToList() ) );
return new MiniYaml(null, root);
}
public Terrain Data;
}
public class TileSet
{
public string Name;
public string Id;
public string Palette;
public string PlayerPalette;
public int TileSize = 24;
public string[] Extensions;
public int WaterPaletteRotationBase = 0x60;
public Dictionary<string, TerrainTypeInfo> Terrain = new Dictionary<string, TerrainTypeInfo>();
public Dictionary<ushort, TileTemplate> Templates = new Dictionary<ushort, TileTemplate>();
public string[] EditorTemplateOrder;
static readonly string[] fields = {"Name", "TileSize", "Id", "Palette", "Extensions"};
public TileSet() {}
public TileSet( string filepath )
{
var yaml = MiniYaml.DictFromFile( filepath );
// General info
FieldLoader.Load(this, yaml["General"]);
// TerrainTypes
Terrain = yaml["Terrain"].NodesDict.Values
.Select(y => new TerrainTypeInfo(y)).ToDictionary(t => t.Type);
// Templates
Templates = yaml["Templates"].NodesDict.Values
.Select(y => new TileTemplate(y)).ToDictionary(t => t.Id);
}
public void LoadTiles()
{
foreach (var t in Templates)
if (t.Value.Data == null)
using( var s = FileSystem.OpenWithExts(t.Value.Image, Extensions) )
t.Value.Data = new Terrain(s, TileSize);
}
public void Save(string filepath)
{
var root = new List<MiniYamlNode>();
var gen = new List<MiniYamlNode>();
foreach (var field in fields)
{
FieldInfo f = this.GetType().GetField(field);
if (f.GetValue(this) == null) continue;
gen.Add( new MiniYamlNode( field, FieldSaver.FormatValue( this, f ) ) );
}
root.Add( new MiniYamlNode( "General", null, gen ) );
root.Add( new MiniYamlNode( "Terrain", null,
Terrain.Select( t => new MiniYamlNode(
"TerrainType@{0}".F( t.Value.Type ),
t.Value.Save() ) ).ToList() ) );
root.Add( new MiniYamlNode( "Templates", null,
Templates.Select( t => new MiniYamlNode(
"Template@{0}".F( t.Value.Id ),
t.Value.Save() ) ).ToList() ) );
root.WriteToFile(filepath);
}
public byte[] GetBytes(TileReference<ushort,byte> r)
{
TileTemplate tile;
if( Templates.TryGetValue( r.type, out tile ) )
return tile.Data.TileBitmapBytes[ r.index ];
byte[] missingTile = new byte[ TileSize * TileSize ];
for( int i = 0 ; i < missingTile.Length ; i++ )
missingTile[ i ] = 0x36;
return missingTile;
}
public string GetTerrainType(TileReference<ushort, byte> r)
{
var tt = Templates[r.type].Tiles;
string ret;
if (!tt.TryGetValue(r.index, out ret))
return "Clear"; // Default walkable
return ret;
}
public Bitmap RenderTemplate(ushort n, Palette p)
{
var template = Templates[n];
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
{
byte* 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 (template.Data.TileBitmapBytes[u + v * template.Size.X] != null)
{
var rawImage = template.Data.TileBitmapBytes[u + v * template.Size.X];
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;
}
}
}

View File

@@ -1,240 +1,297 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
using MiniYamlNodes = List<MiniYamlNode>;
public class MiniYamlNode
{
public struct SourceLocation
{
public string Filename; public int Line;
}
public SourceLocation Location;
public string Key;
public MiniYaml Value;
public MiniYamlNode( string k, MiniYaml v )
{
Key = k;
Value = v;
}
public MiniYamlNode( string k, MiniYaml v, SourceLocation loc )
: this( k, v )
{
Location = loc;
}
public MiniYamlNode( string k, string v )
: this( k, v, null )
{
}
public MiniYamlNode( string k, string v, List<MiniYamlNode> n )
: this( k, new MiniYaml( v, n ) )
{
}
public MiniYamlNode( string k, string v, List<MiniYamlNode> n, SourceLocation loc )
: this( k, new MiniYaml( v, n ), loc )
{
}
}
public class MiniYaml
{
public string Value;
public List<MiniYamlNode> Nodes;
public Dictionary<string, MiniYaml> NodesDict { get { return Nodes.ToDictionary( x => x.Key, x => x.Value ); } }
public MiniYaml( string value ) : this( value, null ) { }
public MiniYaml( string value, List<MiniYamlNode> nodes )
{
Value = value;
Nodes = nodes ?? new List<MiniYamlNode>();
}
public static MiniYaml FromDictionary<K, V>( Dictionary<K, V> dict )
{
return new MiniYaml( null, dict.Select( x => new MiniYamlNode( x.Key.ToString(), new MiniYaml( x.Value.ToString() ) ) ).ToList() );
}
public static MiniYaml FromList<T>( List<T> list )
{
return new MiniYaml( null, list.Select( x => new MiniYamlNode( x.ToString(), new MiniYaml( null ) ) ).ToList() );
}
static List<MiniYamlNode> FromLines(string[] lines, string filename)
{
var levels = new List<List<MiniYamlNode>>();
levels.Add(new List<MiniYamlNode>());
var lineNo = 0;
foreach (var line in lines)
{
++lineNo;
var t = line.TrimStart(' ', '\t');
if (t.Length == 0 || t[0] == '#')
continue;
var level = line.Length - t.Length;
if (levels.Count <= level)
throw new InvalidOperationException("Bad indent in miniyaml");
while (levels.Count > level + 1)
levels.RemoveAt(levels.Count - 1);
var d = new List<MiniYamlNode>();
var rhs = SplitAtColon( ref t );
levels[ level ].Add( new MiniYamlNode( t, rhs, d, new MiniYamlNode.SourceLocation { Filename = filename, Line = lineNo } ) );
levels.Add(d);
}
return levels[ 0 ];
}
static string SplitAtColon( ref string t )
{
var colon = t.IndexOf(':');
if( colon == -1 )
return null;
var ret = t.Substring( colon + 1 ).Trim();
if( ret.Length == 0 )
ret = null;
t = t.Substring( 0, colon ).Trim();
return ret;
}
public static List<MiniYamlNode> FromFileInPackage( string path )
{
StreamReader reader = new StreamReader( FileSystem.Open(path) );
List<string> lines = new List<string>();
while( !reader.EndOfStream )
lines.Add(reader.ReadLine());
reader.Close();
return FromLines(lines.ToArray(), path);
}
public static Dictionary<string, MiniYaml> DictFromFile( string path )
{
return FromFile( path ).ToDictionary( x => x.Key, x => x.Value );
}
public static Dictionary<string, MiniYaml> DictFromStream( Stream stream )
{
return FromStream( stream ).ToDictionary( x => x.Key, x => x.Value );
}
public static List<MiniYamlNode> FromFile( string path )
{
return FromLines(File.ReadAllLines( path ), path);
}
public static List<MiniYamlNode> FromStream(Stream s)
{
using (var reader = new StreamReader(s))
return FromString(reader.ReadToEnd());
}
public static List<MiniYamlNode> FromString(string text)
{
return FromLines(text.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries), "<no filename available>");
}
public static List<MiniYamlNode> Merge( List<MiniYamlNode> a, List<MiniYamlNode> b )
{
if( a.Count == 0 )
return b;
if( b.Count == 0 )
return a;
var ret = new List<MiniYamlNode>();
var aDict = a.ToDictionary( x => x.Key );
var bDict = b.ToDictionary( x => x.Key );
var keys = aDict.Keys.Union( bDict.Keys ).ToList();
var noInherit = keys.Where( x => x.Length > 0 && x[ 0 ] == '-' ).Select( x => x.Substring( 1 ) ).ToList();
foreach( var key in keys )
{
MiniYamlNode aa, bb;
aDict.TryGetValue( key, out aa );
bDict.TryGetValue( key, out bb );
if( noInherit.Contains( key ) )
{
if( aa != null )
ret.Add( aa );
}
else
{
var loc = aa == null ? default( MiniYamlNode.SourceLocation ) : aa.Location;
var merged = ( aa == null || bb == null ) ? aa ?? bb : new MiniYamlNode( key, Merge( aa.Value, bb.Value ), loc );
ret.Add( merged );
}
}
return ret;
}
public static MiniYaml Merge( MiniYaml a, MiniYaml b )
{
if( a == null )
return b;
if( b == null )
return a;
return new MiniYaml( a.Value ?? b.Value, Merge( a.Nodes, b.Nodes ) );
}
public IEnumerable<string> ToLines(string name)
{
yield return name + ": " + Value;
if (Nodes != null)
foreach (var line in Nodes.ToLines(false))
yield return "\t" + line;
}
}
public static class MiniYamlExts
{
public static void WriteToFile(this MiniYamlNodes y, string filename)
{
File.WriteAllLines(filename, y.ToLines(true).Select(x => x.TrimEnd()).ToArray());
}
public static string WriteToString(this MiniYamlNodes y)
{
return string.Join("\n", y.ToLines(true).Select(x => x.TrimEnd()).ToArray());
}
public static IEnumerable<string> ToLines(this MiniYamlNodes y, bool lowest)
{
foreach (var kv in y)
{
foreach (var line in kv.Value.ToLines(kv.Key))
yield return line;
if (lowest)
yield return "";
}
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.FileFormats
{
using MiniYamlNodes = List<MiniYamlNode>;
public class MiniYamlNode
{
public struct SourceLocation
{
public string Filename; public int Line;
public override string ToString() { return "{0}:{1}".F(Filename, Line); }
}
public SourceLocation Location;
public string Key;
public MiniYaml Value;
public MiniYamlNode( string k, MiniYaml v )
{
Key = k;
Value = v;
}
public MiniYamlNode( string k, MiniYaml v, SourceLocation loc )
: this( k, v )
{
Location = loc;
}
public MiniYamlNode( string k, string v )
: this( k, v, null )
{
}
public MiniYamlNode( string k, string v, List<MiniYamlNode> n )
: this( k, new MiniYaml( v, n ) )
{
}
public MiniYamlNode( string k, string v, List<MiniYamlNode> n, SourceLocation loc )
: this( k, new MiniYaml( v, n ), loc )
{
}
public override string ToString()
{
return "{{YamlNode: {0} @ {1}}}".F(Key, Location);
}
}
public class MiniYaml
{
public string Value;
public List<MiniYamlNode> Nodes;
public Dictionary<string, MiniYaml> NodesDict
{
get
{
var ret = new Dictionary<string, MiniYaml>();
foreach (var y in Nodes)
{
if (ret.ContainsKey(y.Key))
throw new InvalidDataException("Duplicate key `{0}' in MiniYaml".F(y.Key));
ret.Add(y.Key, y.Value);
}
return ret;
}
}
public MiniYaml( string value ) : this( value, null ) { }
public MiniYaml( string value, List<MiniYamlNode> nodes )
{
Value = value;
Nodes = nodes ?? new List<MiniYamlNode>();
}
public static MiniYaml FromDictionary<K, V>( Dictionary<K, V> dict )
{
return new MiniYaml( null, dict.Select( x => new MiniYamlNode( x.Key.ToString(), new MiniYaml( x.Value.ToString() ) ) ).ToList() );
}
public static MiniYaml FromList<T>( List<T> list )
{
return new MiniYaml( null, list.Select( x => new MiniYamlNode( x.ToString(), new MiniYaml( null ) ) ).ToList() );
}
static List<MiniYamlNode> FromLines(string[] lines, string filename)
{
var levels = new List<List<MiniYamlNode>>();
levels.Add(new List<MiniYamlNode>());
var lineNo = 0;
foreach (var ll in lines)
{
var line = ll;
++lineNo;
if (line.Contains('#'))
line = line.Substring(0, line.IndexOf('#')).TrimEnd(' ', '\t');
var t = line.TrimStart(' ', '\t');
if (t.Length == 0)
continue;
var level = line.Length - t.Length;
var location = new MiniYamlNode.SourceLocation { Filename = filename, Line = lineNo };
if (levels.Count <= level)
throw new YamlException("Bad indent in miniyaml at {0}".F (location));
while (levels.Count > level + 1)
levels.RemoveAt(levels.Count - 1);
var d = new List<MiniYamlNode>();
var rhs = SplitAtColon( ref t );
levels[ level ].Add( new MiniYamlNode( t, rhs, d, location ) );
levels.Add(d);
}
return levels[ 0 ];
}
static string SplitAtColon( ref string t )
{
var colon = t.IndexOf(':');
if( colon == -1 )
return null;
var ret = t.Substring( colon + 1 ).Trim();
if( ret.Length == 0 )
ret = null;
t = t.Substring( 0, colon ).Trim();
return ret;
}
public static List<MiniYamlNode> FromFileInPackage( string path )
{
StreamReader reader = new StreamReader( FileSystem.Open(path) );
List<string> lines = new List<string>();
while( !reader.EndOfStream )
lines.Add(reader.ReadLine());
reader.Close();
return FromLines(lines.ToArray(), path);
}
public static Dictionary<string, MiniYaml> DictFromFile( string path )
{
return FromFile( path ).ToDictionary( x => x.Key, x => x.Value );
}
public static Dictionary<string, MiniYaml> DictFromStream( Stream stream )
{
return FromStream( stream ).ToDictionary( x => x.Key, x => x.Value );
}
public static List<MiniYamlNode> FromFile( string path )
{
return FromLines(File.ReadAllLines( path ), path);
}
public static List<MiniYamlNode> FromStream(Stream s)
{
using (var reader = new StreamReader(s))
return FromString(reader.ReadToEnd());
}
public static List<MiniYamlNode> FromString(string text)
{
return FromLines(text.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries), "<no filename available>");
}
public static List<MiniYamlNode> MergeLiberal(List<MiniYamlNode> a, List<MiniYamlNode> b)
{
return Merge(a, b, false);
}
public static List<MiniYamlNode> MergeStrict(List<MiniYamlNode> a, List<MiniYamlNode> b)
{
return Merge(a, b, true);
}
static List<MiniYamlNode> Merge( List<MiniYamlNode> a, List<MiniYamlNode> b, bool throwErrors )
{
if( a.Count == 0 )
return b;
if( b.Count == 0 )
return a;
var ret = new List<MiniYamlNode>();
var aDict = a.ToDictionaryWithConflictLog(x => x.Key, "MiniYaml.Merge", null, x => "{0} (at {1})".F(x.Key, x.Location));
var bDict = b.ToDictionaryWithConflictLog(x => x.Key, "MiniYaml.Merge", null, x => "{0} (at {1})".F(x.Key, x.Location));
var keys = aDict.Keys.Union( bDict.Keys ).ToList();
var noInherit = keys.Where(x => x.Length > 0 && x[0] == '-')
.ToDictionary(x => x.Substring(1), x => false);
foreach( var key in keys )
{
MiniYamlNode aa, bb;
aDict.TryGetValue( key, out aa );
bDict.TryGetValue( key, out bb );
if( noInherit.ContainsKey( key ) )
{
if (!throwErrors)
if (aa != null)
ret.Add(aa);
noInherit[key] = true;
}
else
{
var loc = aa == null ? default( MiniYamlNode.SourceLocation ) : aa.Location;
var merged = ( aa == null || bb == null ) ? aa ?? bb : new MiniYamlNode( key, Merge( aa.Value, bb.Value, throwErrors ), loc );
ret.Add( merged );
}
}
if (throwErrors)
if (noInherit.ContainsValue(false))
throw new YamlException("Bogus yaml removals: {0}".F(
noInherit.Where(x => !x.Value).JoinWith(", ")));
return ret;
}
public static MiniYaml MergeLiberal(MiniYaml a, MiniYaml b)
{
return Merge(a, b, false);
}
public static MiniYaml MergeStrict(MiniYaml a, MiniYaml b)
{
return Merge(a, b, true);
}
static MiniYaml Merge( MiniYaml a, MiniYaml b, bool throwErrors )
{
if( a == null )
return b;
if( b == null )
return a;
return new MiniYaml( a.Value ?? b.Value, Merge( a.Nodes, b.Nodes, throwErrors ) );
}
public IEnumerable<string> ToLines(string name)
{
yield return name + ": " + Value;
if (Nodes != null)
foreach (var line in Nodes.ToLines(false))
yield return "\t" + line;
}
}
public static class MiniYamlExts
{
public static void WriteToFile(this MiniYamlNodes y, string filename)
{
File.WriteAllLines(filename, y.ToLines(true).Select(x => x.TrimEnd()).ToArray());
}
public static string WriteToString(this MiniYamlNodes y)
{
return y.ToLines(true).Select(x => x.TrimEnd()).JoinWith("\n");
}
public static IEnumerable<string> ToLines(this MiniYamlNodes y, bool lowest)
{
foreach (var kv in y)
{
foreach (var line in kv.Value.ToLines(kv.Key))
yield return line;
if (lowest)
yield return "";
}
}
}
public class YamlException : Exception
{
public YamlException(string s) : base(s) { }
}
}

View File

@@ -1,39 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace OpenRA.FileFormats
{
public class Mod
{
public string Title;
public string Description;
public string Version;
public string Author;
public string[] RequiresMods;
public bool Standalone = false;
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)
{
if (!File.Exists("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml"))
continue;
var yaml = new MiniYaml(null, MiniYaml.FromFile("mods" + Path.DirectorySeparatorChar + m + Path.DirectorySeparatorChar + "mod.yaml"));
if (!yaml.NodesDict.ContainsKey("Metadata"))
{
continue;
}
ret.Add(m, FieldLoader.Load<Mod>(yaml.NodesDict["Metadata"]));
}
return ret;
}
}
}
#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
{
public class Mod
{
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 );
if (!File.Exists(yamlPath))
continue;
var yaml = new MiniYaml(null, MiniYaml.FromFile(yamlPath));
if (!yaml.NodesDict.ContainsKey("Metadata"))
continue;
var mod = FieldLoader.Load<Mod>(yaml.NodesDict["Metadata"]);
mod.Id = m;
ret.Add(m, mod);
}
return ret;
}
public string[] WithPrerequisites()
{
return Id.Iterate(m => AllMods[m].Requires)
.TakeWhile(m => m != null)
.ToArray();
}
}
}

View File

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

View File

@@ -1,85 +1,85 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace OpenRA.FileFormats
{
public class PackageEntry
{
public readonly uint Hash;
public readonly uint Offset;
public readonly uint Length;
public PackageEntry(uint hash, uint offset, uint length)
{
Hash = hash;
Offset = offset;
Length = length;
}
public PackageEntry(BinaryReader r)
{
Hash = r.ReadUInt32();
Offset = r.ReadUInt32();
Length = r.ReadUInt32();
}
public void Write(BinaryWriter w)
{
w.Write(Hash);
w.Write(Offset);
w.Write(Length);
}
public override string ToString()
{
string filename;
if (Names.TryGetValue(Hash, out filename))
return string.Format("{0} - offset 0x{1:x8} - length 0x{2:x8}", filename, Offset, Length);
else
return string.Format("0x{0:x8} - offset 0x{1:x8} - length 0x{2:x8}", Hash, Offset, Length);
}
public static uint HashFilename(string name)
{
if (name.Length > 12)
name = name.Substring(0, 12);
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
BinaryReader reader = new BinaryReader(ms);
int len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}
static Dictionary<uint, string> Names = new Dictionary<uint,string>();
public static void AddStandardName(string s)
{
uint hash = HashFilename(s);
Names.Add(hash, s);
}
public const int Size = 12;
}
}
#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.Text;
namespace OpenRA.FileFormats
{
public class PackageEntry
{
public readonly uint Hash;
public readonly uint Offset;
public readonly uint Length;
public PackageEntry(uint hash, uint offset, uint length)
{
Hash = hash;
Offset = offset;
Length = length;
}
public PackageEntry(BinaryReader r)
{
Hash = r.ReadUInt32();
Offset = r.ReadUInt32();
Length = r.ReadUInt32();
}
public void Write(BinaryWriter w)
{
w.Write(Hash);
w.Write(Offset);
w.Write(Length);
}
public override string ToString()
{
string filename;
if (Names.TryGetValue(Hash, out filename))
return "{0} - offset 0x{1:x8} - length 0x{2:x8}".F(filename, Offset, Length);
else
return "0x{0:x8} - offset 0x{1:x8} - length 0x{2:x8}".F(Hash, Offset, Length);
}
public static uint HashFilename(string name)
{
if (name.Length > 12)
name = name.Substring(0, 12);
name = name.ToUpperInvariant();
if (name.Length % 4 != 0)
name = name.PadRight(name.Length + (4 - name.Length % 4), '\0');
MemoryStream ms = new MemoryStream(Encoding.ASCII.GetBytes(name));
BinaryReader reader = new BinaryReader(ms);
int len = name.Length >> 2;
uint result = 0;
while (len-- != 0)
result = ((result << 1) | (result >> 31)) + reader.ReadUInt32();
return result;
}
static Dictionary<uint, string> Names = new Dictionary<uint,string>();
public static void AddStandardName(string s)
{
uint hash = HashFilename(s);
Names.Add(hash, s);
}
public const int Size = 12;
}
}

View File

@@ -1,48 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.IO;
namespace OpenRA.FileFormats
{
public static class PackageWriter
{
public static void CreateMix(string filename, List<string> contents)
{
// Construct a list of entries for the file header
uint dataSize = 0;
var items = new List<PackageEntry>();
foreach (var file in contents)
{
uint length = (uint)new FileInfo(file).Length;
uint hash = PackageEntry.HashFilename(Path.GetFileName(file));
items.Add(new PackageEntry(hash, dataSize, length));
dataSize += length;
}
using (var s = File.Create(filename))
using (var writer = new BinaryWriter(s))
{
// Write file header
writer.Write((ushort)items.Count);
writer.Write(dataSize);
foreach (var item in items)
item.Write(writer);
writer.Flush();
// Copy file data
foreach (var file in contents)
s.Write(File.ReadAllBytes(file));
}
}
}
}

View File

@@ -1,77 +1,126 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Drawing;
using System.IO;
namespace OpenRA.FileFormats
{
public class Palette
{
uint[] colors;
public Color GetColor(int index)
{
return Color.FromArgb((int)colors[index]);
}
public void SetColor(int index, Color color)
{
colors[index] = (uint)color.ToArgb();
}
public void SetColor(int index, uint color)
{
colors[index] = (uint)color;
}
public uint[] Values
{
get { return colors; }
}
public Palette(Stream s, bool remapTransparent)
{
colors = new uint[256];
using (BinaryReader reader = new BinaryReader(s))
{
for (int i = 0; i < 256; i++)
{
byte r = (byte)(reader.ReadByte() << 2);
byte g = (byte)(reader.ReadByte() << 2);
byte b = (byte)(reader.ReadByte() << 2);
colors[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
}
}
colors[0] = 0;
if (remapTransparent)
{
colors[1] = 178u << 24; // Hack for d2k; may have side effects
colors[3] = 178u << 24;
colors[4] = 140u << 24;
}
}
public Palette(Palette p, IPaletteRemap r)
{
colors = new uint[256];
for(int i = 0; i < 256; i++)
colors[i] = (uint)r.GetRemappedColor(Color.FromArgb((int)p.colors[i]),i).ToArgb();
}
public Palette(Palette p)
{
colors = (uint[])p.colors.Clone();
}
}
public interface IPaletteRemap { Color GetRemappedColor(Color original, int index); }
}
#region Copyright & License Information
/*
* Copyright 2007-2012 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System;
using System.Reflection;
namespace OpenRA.FileFormats
{
public class Palette
{
uint[] colors;
public Color GetColor(int index)
{
return Color.FromArgb((int)colors[index]);
}
public void SetColor(int index, Color color)
{
colors[index] = (uint)color.ToArgb();
}
public void SetColor(int index, uint color)
{
colors[index] = (uint)color;
}
public uint[] Values
{
get { return colors; }
}
public void ApplyRemap(IPaletteRemap r)
{
for(int i = 0; i < 256; i++)
colors[i] = (uint)r.GetRemappedColor(Color.FromArgb((int)colors[i]),i).ToArgb();
}
public Palette(Stream s, int[] remapShadow)
{
colors = new uint[256];
using (BinaryReader reader = new BinaryReader(s))
{
for (int i = 0; i < 256; i++)
{
byte r = (byte)(reader.ReadByte() << 2);
byte g = (byte)(reader.ReadByte() << 2);
byte b = (byte)(reader.ReadByte() << 2);
colors[i] = (uint)((255 << 24) | (r << 16) | (g << 8) | b);
}
}
colors[0] = 0; //convert black background to transparency
foreach (int i in remapShadow)
colors[i] = 140u << 24;
}
public Palette(Palette p, IPaletteRemap r)
{
colors = (uint[])p.colors.Clone();
ApplyRemap(r);
}
public Palette(Palette p)
{
colors = (uint[])p.colors.Clone();
}
public Palette(uint[] data)
{
if (data.Length != 256)
throw new InvalidDataException("Attempting to create palette with incorrect array size");
colors = (uint[])data.Clone();
}
public ColorPalette AsSystemPalette()
{
ColorPalette pal;
using (var b = new Bitmap(1, 1, PixelFormat.Format8bppIndexed))
pal = b.Palette;
for (var i = 0; i < 256; i++)
pal.Entries[i] = GetColor(i);
// hack around a mono bug -- the palette flags get set wrong.
if (Platform.CurrentPlatform != PlatformType.Windows)
typeof(ColorPalette).GetField("flags",
BindingFlags.Instance | BindingFlags.NonPublic).SetValue(pal, 1);
return pal;
}
public Bitmap AsBitmap()
{
var b = new Bitmap(256, 1, PixelFormat.Format32bppArgb);
var data = b.LockBits(new Rectangle(0, 0, b.Width, b.Height),
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
unsafe
{
uint* c = (uint*)data.Scan0;
for (var x = 0; x < 256; x++)
*(c + x) = colors[x];
}
b.UnlockBits(data);
return b;
}
public static Palette Load(string filename, int[] remap)
{
using(var s = File.OpenRead(filename))
return new Palette(s, remap);
}
}
public interface IPaletteRemap { Color GetRemappedColor(Color original, int index); }
}

View File

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

132
OpenRA.FileFormats/PlayerColorRemap.cs Normal file → Executable file
View File

@@ -1,79 +1,53 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace OpenRA.FileFormats
{
// TODO: ship this out of here.
public enum PaletteFormat { ra, cnc, d2k }
public class PlayerColorRemap : IPaletteRemap
{
Dictionary<int, Color> remapColors;
public PlayerColorRemap(Color c1, Color c2, PaletteFormat fmt)
{
var baseIndex = (fmt == PaletteFormat.cnc) ? 0xb0 : (fmt == PaletteFormat.d2k) ? 240 : 80;
var ramp = (fmt == PaletteFormat.cnc)
? new[] { 0, 2, 4, 6, 8, 10, 13, 15, 1, 3, 5, 7, 9, 11, 12, 14 }
: new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
remapColors = ramp.Select((x, i) => Pair.New(baseIndex + i, ColorLerp(x / 16f, c1, c2)))
.ToDictionary(u => u.First, u => u.Second);
}
static Color ColorLerp(float t, Color c1, Color c2)
{
return Color.FromArgb(255,
(int)(t * c2.R + (1 - t) * c1.R),
(int)(t * c2.G + (1 - t) * c1.G),
(int)(t * c2.B + (1 - t) * c1.B));
}
public Color GetRemappedColor(Color original, int index)
{
Color c;
return remapColors.TryGetValue(index, out c)
? c : original;
}
// hk is hue in the range [0,1] instead of [0,360]
public static Color ColorFromHSL(float hk, float s, float l)
{
// Convert from HSL to RGB
var q = (l < 0.5f) ? l * (1 + s) : l + s - (l * s);
var p = 2 * l - q;
float[] trgb = { hk + 1 / 3.0f,
hk,
hk - 1/3.0f };
float[] rgb = { 0, 0, 0 };
for (int k = 0; k < 3; k++)
{
while (trgb[k] < 0) trgb[k] += 1.0f;
while (trgb[k] > 1) trgb[k] -= 1.0f;
}
for (int k = 0; k < 3; k++)
{
if (trgb[k] < 1 / 6.0f) { rgb[k] = (p + ((q - p) * 6 * trgb[k])); }
else if (trgb[k] >= 1 / 6.0f && trgb[k] < 0.5) { rgb[k] = q; }
else if (trgb[k] >= 0.5f && trgb[k] < 2.0f / 3) { rgb[k] = (p + ((q - p) * 6 * (2.0f / 3 - trgb[k]))); }
else { rgb[k] = p; }
}
return Color.FromArgb((int)(rgb[0] * 255), (int)(rgb[1] * 255), (int)(rgb[2] * 255));
}
}
}
#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.Linq;
namespace OpenRA.FileFormats
{
public class PlayerColorRemap : IPaletteRemap
{
Dictionary<int, Color> remapColors;
public static int GetRemapIndex(int[] Ramp, int i)
{
return Ramp[i];
}
public PlayerColorRemap(int[] Ramp, ColorRamp c)
{
var c1 = c.GetColor(0);
var c2 = c.GetColor(1); // temptemp: this can be expressed better
var baseIndex = Ramp[0];
var RemapRamp = Ramp.Select(r => r - Ramp[0]).ToArray();
if (Ramp[0] > Ramp[15]) // reversed remapping
{
baseIndex = Ramp[15];
for (int i=15; i>0; i--)
RemapRamp = Ramp.Select(r => r - Ramp[15]).ToArray();
}
remapColors = RemapRamp.Select((x, i) => Pair.New(baseIndex + i, Exts.ColorLerp(x / 16f, c1, c2)))
.ToDictionary(u => u.First, u => u.Second);
}
public Color GetRemappedColor(Color original, int index)
{
Color c;
return remapColors.TryGetValue(index, out c)
? c : original;
}
}
}

View File

@@ -0,0 +1,62 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
namespace OpenRA.FileFormats
{
/// <summary>
/// A thread-safe action queue, suitable for passing units of work between threads.
/// </summary>
public class ActionQueue
{
object syncRoot = new object();
PriorityQueue<DelayedAction> actions = new PriorityQueue<DelayedAction>();
public void Add(Action a) { Add(a, 0); }
public void Add(Action a, int delay)
{
lock (syncRoot)
actions.Add(new DelayedAction(a, Environment.TickCount + delay));
}
public void PerformActions()
{
Action a = () => {};
lock (syncRoot)
{
var t = Environment.TickCount;
while (!actions.Empty && actions.Peek().Time <= t)
{
var da = actions.Pop();
a += da.Action;
}
}
a();
}
}
struct DelayedAction : IComparable<DelayedAction>
{
public int Time;
public Action Action;
public DelayedAction(Action action, int time)
{
Action = action;
Time = time;
}
public int CompareTo(DelayedAction other)
{
return Time.CompareTo(other.Time);
}
}
}

View File

@@ -0,0 +1,65 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.FileFormats
{
static class BitAllocator<T> where T : struct
{
static int nextVal = 1;
static Cache<string,int> bits;
static BitAllocator() { bits = new Cache<string, int>( _ => Allocate() ); }
static int Allocate()
{
if (nextVal == 0)
throw new InvalidOperationException(
"Too many values in BitAllocator<{0}>".F(typeof(T).Name));
var val = nextVal;
nextVal <<= 1;
return val;
}
public static int GetValue(string[] val)
{
return val.Select( a => bits[a] ).Aggregate( 0, (a,b) => a | b );
}
public static IEnumerable<string> GetStrings(int val)
{
for( var i = 0; i < 32; i++ )
{
var x = 1 << i;
if ((val & x) != 0)
yield return bits.Single( a => a.Value == x ).Key;
}
}
}
public struct Bits<T> where T : struct
{
public int Value;
public Bits(string[] val) { Value = BitAllocator<T>.GetValue(val); }
public Bits(Bits<T> other) { Value = other.Value; }
public override string ToString()
{
return BitAllocator<T>.GetStrings(Value).JoinWith(",");
}
public override int GetHashCode() { return Value.GetHashCode(); }
}
}

View File

@@ -1,49 +1,53 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public class Cache<T, U> : IEnumerable<KeyValuePair<T, U>>
{
Dictionary<T, U> hax = new Dictionary<T, U>();
Func<T,U> loader;
public Cache(Func<T,U> loader)
{
if (loader == null)
throw new ArgumentNullException();
this.loader = loader;
}
public U this[T key]
{
get
{
U result;
if (!hax.TryGetValue(key, out result))
hax.Add(key, result = loader(key));
return result;
}
}
public IEnumerator<KeyValuePair<T, U>> GetEnumerator() { return hax.GetEnumerator(); }
IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); }
public IEnumerable<T> Keys { get { return hax.Keys; } }
public IEnumerable<U> Values { get { return hax.Values; } }
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections;
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public class Cache<T, U> : IEnumerable<KeyValuePair<T, U>>
{
Dictionary<T, U> hax;
Func<T,U> loader;
public Cache(Func<T,U> loader, IEqualityComparer<T> c)
{
hax = new Dictionary<T, U>(c);
if (loader == null)
throw new ArgumentNullException();
this.loader = loader;
}
public Cache(Func<T, U> loader)
: this(loader, EqualityComparer<T>.Default) { }
public U this[T key]
{
get
{
U result;
if (!hax.TryGetValue(key, out result))
hax.Add(key, result = loader(key));
return result;
}
}
public IEnumerator<KeyValuePair<T, U>> GetEnumerator() { return hax.GetEnumerator(); }
IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); }
public IEnumerable<T> Keys { get { return hax.Keys; } }
public IEnumerable<U> Values { get { return hax.Values; } }
}
}

View File

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

View File

@@ -1,35 +1,40 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
namespace OpenRA
{
public class DisposableAction : IDisposable
{
public DisposableAction(Action a) { this.a = a; }
Action a;
bool disposed;
public void Dispose()
{
if (disposed) return;
disposed = true;
a();
GC.SuppressFinalize(this);
}
~DisposableAction()
{
Dispose();
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
namespace OpenRA
{
public class DisposableAction : IDisposable
{
public DisposableAction(Action onDispose, Action onFinalize)
{
this.onDispose = onDispose;
this.onFinalize = onFinalize;
}
Action onDispose;
Action onFinalize;
bool disposed;
public void Dispose()
{
if (disposed) return;
disposed = true;
onDispose();
GC.SuppressFinalize(this);
}
~DisposableAction()
{
onFinalize();
}
}
}

View File

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

View File

@@ -1,70 +1,90 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public struct Pair<T, U>
{
public T First;
public U Second;
public Pair(T first, U second)
{
First = first;
Second = second;
}
static IEqualityComparer<T> tc = EqualityComparer<T>.Default;
static IEqualityComparer<U> uc = EqualityComparer<U>.Default;
public static bool operator ==(Pair<T, U> a, Pair<T, U> b)
{
return tc.Equals(a.First, b.First) && uc.Equals(a.Second, b.Second);
}
public static bool operator !=(Pair<T, U> a, Pair<T, U> b)
{
return !(a == b);
}
public override bool Equals(object obj)
{
if (!(obj is Pair<T, U>))
return false;
return (Pair<T, U>)obj == this;
}
public override int GetHashCode()
{
return First.GetHashCode() ^ Second.GetHashCode();
}
public Pair<T, U> WithFirst(T t) { return new Pair<T, U>(t, Second); }
public Pair<T, U> WithSecond(U u) { return new Pair<T, U>(First, u); }
public static T AsFirst(Pair<T, U> p) { return p.First; }
public static U AsSecond(Pair<T, U> p) { return p.Second; }
public Pair<U, T> Swap() { return Pair.New(Second, First); }
public override string ToString()
{
return "({0},{1})".F(First, Second);
}
}
public static class Pair
{
public static Pair<T, U> New<T, U>(T t, U u) { return new Pair<T, U>(t, u); }
}
}
#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;
using System.Drawing;
namespace OpenRA.FileFormats
{
public struct Pair<T, U>
{
public T First;
public U Second;
public Pair(T first, U second)
{
First = first;
Second = second;
}
internal static IEqualityComparer<T> tc = EqualityComparer<T>.Default;
internal static IEqualityComparer<U> uc = EqualityComparer<U>.Default;
public static bool operator ==(Pair<T, U> a, Pair<T, U> b)
{
return tc.Equals(a.First, b.First) && uc.Equals(a.Second, b.Second);
}
public static bool operator !=(Pair<T, U> a, Pair<T, U> b)
{
return !(a == b);
}
public override bool Equals(object obj)
{
if (!(obj is Pair<T, U>))
return false;
return (Pair<T, U>)obj == this;
}
public override int GetHashCode()
{
return First.GetHashCode() ^ Second.GetHashCode();
}
public Pair<T, U> WithFirst(T t) { return new Pair<T, U>(t, Second); }
public Pair<T, U> WithSecond(U u) { return new Pair<T, U>(First, u); }
public static T AsFirst(Pair<T, U> p) { return p.First; }
public static U AsSecond(Pair<T, U> p) { return p.Second; }
public override string ToString()
{
return "({0},{1})".F(First, Second);
}
class PairEqualityComparer : IEqualityComparer<Pair<T, U>>
{
public bool Equals(Pair<T, U> x, Pair<T, U> y) { return x == y; }
public int GetHashCode(Pair<T, U> obj) { return obj.GetHashCode(); }
}
public static IEqualityComparer<Pair<T, U>> EqualityComparer { get { return new PairEqualityComparer(); } }
}
public static class Pair
{
public static Pair<T, U> New<T, U>(T t, U u) { return new Pair<T, U>(t, u); }
static Pair()
{
Pair<char,Color>.uc = new ColorEqualityComparer();
}
// avoid the default crappy one
class ColorEqualityComparer : IEqualityComparer<Color>
{
public bool Equals(Color x, Color y) { return x.ToArgb() == y.ToArgb(); }
public int GetHashCode(Color obj) { return obj.GetHashCode(); }
}
}
}

View File

@@ -1,103 +1,104 @@
#region Copyright & License Information
/*
* Copyright 2007-2010 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see LICENSE.
*/
#endregion
using System;
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public class PriorityQueue<T>
where T : IComparable<T>
{
List<T[]> items = new List<T[]>();
int level, index;
public PriorityQueue()
{
items.Add(new T[1]);
}
public void Add(T item)
{
int addLevel = level;
int addIndex = index;
while (addLevel >= 1 && Above(addLevel, addIndex).CompareTo(item) > 0)
{
items[addLevel][addIndex] = Above(addLevel, addIndex);
--addLevel;
addIndex >>= 1;
}
items[addLevel][addIndex] = item;
if (++index >= (1 << level))
{
index = 0;
if (items.Count <= ++level)
items.Add(new T[1 << level]);
}
}
public bool Empty { get { return (level == 0); } }
T At(int level, int index) { return items[level][index]; }
T Above(int level, int index) { return items[level - 1][index >> 1]; }
T Last()
{
int lastLevel = level;
int lastIndex = index;
if (--lastIndex < 0)
lastIndex = (1 << --lastLevel) - 1;
return At(lastLevel, lastIndex);
}
public T Pop()
{
if (level == 0 && index == 0)
throw new InvalidOperationException("Attempting to pop empty PriorityQueue");
T ret = At(0, 0);
BubbleInto(0, 0, Last());
if (--index < 0)
index = (1 << --level) - 1;
return ret;
}
void BubbleInto(int intoLevel, int intoIndex, T val)
{
int downLevel = intoLevel + 1;
int downIndex = intoIndex << 1;
if (downLevel > level || (downLevel == level && downIndex >= index))
{
items[intoLevel][intoIndex] = val;
return;
}
if (downLevel <= level && downIndex < index - 1 &&
At(downLevel, downIndex).CompareTo(At(downLevel, downIndex + 1)) >= 0)
++downIndex;
if (val.CompareTo(At(downLevel, downIndex)) <= 0)
{
items[intoLevel][intoIndex] = val;
return;
}
items[intoLevel][intoIndex] = At(downLevel, downIndex);
BubbleInto(downLevel, downIndex, val);
}
}
}
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
namespace OpenRA.FileFormats
{
public class PriorityQueue<T>
where T : IComparable<T>
{
List<T[]> items = new List<T[]>();
int level, index;
public PriorityQueue()
{
items.Add(new T[1]);
}
public void Add(T item)
{
int addLevel = level;
int addIndex = index;
while (addLevel >= 1 && Above(addLevel, addIndex).CompareTo(item) > 0)
{
items[addLevel][addIndex] = Above(addLevel, addIndex);
--addLevel;
addIndex >>= 1;
}
items[addLevel][addIndex] = item;
if (++index >= (1 << level))
{
index = 0;
if (items.Count <= ++level)
items.Add(new T[1 << level]);
}
}
public bool Empty { get { return (level == 0); } }
T At(int level, int index) { return items[level][index]; }
T Above(int level, int index) { return items[level - 1][index >> 1]; }
T Last()
{
int lastLevel = level;
int lastIndex = index;
if (--lastIndex < 0)
lastIndex = (1 << --lastLevel) - 1;
return At(lastLevel, lastIndex);
}
public T Peek() { return At(0,0); }
public T Pop()
{
if (level == 0 && index == 0)
throw new InvalidOperationException("Attempting to pop empty PriorityQueue");
T ret = At(0, 0);
BubbleInto(0, 0, Last());
if (--index < 0)
index = (1 << --level) - 1;
return ret;
}
void BubbleInto(int intoLevel, int intoIndex, T val)
{
int downLevel = intoLevel + 1;
int downIndex = intoIndex << 1;
if (downLevel > level || (downLevel == level && downIndex >= index))
{
items[intoLevel][intoIndex] = val;
return;
}
if (downLevel <= level && downIndex < index - 1 &&
At(downLevel, downIndex).CompareTo(At(downLevel, downIndex + 1)) >= 0)
++downIndex;
if (val.CompareTo(At(downLevel, downIndex)) <= 0)
{
items[intoLevel][intoIndex] = val;
return;
}
items[intoLevel][intoIndex] = At(downLevel, downIndex);
BubbleInto(downLevel, downIndex, val);
}
}
}

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