Compare commits
1365 Commits
playtest-2
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7310d0a0 | ||
|
|
0bf79635ec | ||
|
|
9ca391c814 | ||
|
|
0a82bfe552 | ||
|
|
a682670b97 | ||
|
|
fc1a3f9916 | ||
|
|
5927bce7b5 | ||
|
|
d153f3f74f | ||
|
|
039589c739 | ||
|
|
3f20415aff | ||
|
|
e795ab9174 | ||
|
|
0ab57c9abc | ||
|
|
c993140fe7 | ||
|
|
715e7a010f | ||
|
|
328c81e07b | ||
|
|
8509505c01 | ||
|
|
28f24cd03a | ||
|
|
ead0da4161 | ||
|
|
a3c0b1b9f6 | ||
|
|
ca2f48a439 | ||
|
|
04a1b56e03 | ||
|
|
a0bd6f0d46 | ||
|
|
813faee4aa | ||
|
|
851512a84e | ||
|
|
ba12aafd78 | ||
|
|
41d0860db4 | ||
|
|
227a7a61eb | ||
|
|
baacad8432 | ||
|
|
eb4f7a046f | ||
|
|
14468b4895 | ||
|
|
91442a0414 | ||
|
|
0167bbfbaa | ||
|
|
3e63751960 | ||
|
|
7f6eaf8d5e | ||
|
|
7e9c20df71 | ||
|
|
c00eee835f | ||
|
|
0880c1241d | ||
|
|
6307e51991 | ||
|
|
43bb75c135 | ||
|
|
6cedc424ed | ||
|
|
15324b1f1a | ||
|
|
2d6200792d | ||
|
|
28d740dfc3 | ||
|
|
aa6f12f0a1 | ||
|
|
a25aa23805 | ||
|
|
9b1555d3a1 | ||
|
|
594e3c14e6 | ||
|
|
942cbb2fe2 | ||
|
|
38f0d722c6 | ||
|
|
d53dcc859f | ||
|
|
65c9d4295b | ||
|
|
c731a7960e | ||
|
|
ed0e0a8a41 | ||
|
|
89228cd484 | ||
|
|
35f4230984 | ||
|
|
8226fd21f9 | ||
|
|
d0cf627b23 | ||
|
|
57d85e2c97 | ||
|
|
e9602ca4e9 | ||
|
|
f0876828f4 | ||
|
|
99c3272a81 | ||
|
|
7c31a8f28e | ||
|
|
989dd7eef4 | ||
|
|
8c811ed21d | ||
|
|
e562f8d2cc | ||
|
|
c41ad3d600 | ||
|
|
021e1116b8 | ||
|
|
b6d09b8829 | ||
|
|
78f961f653 | ||
|
|
3e787315d2 | ||
|
|
770d79da0b | ||
|
|
0172c5e5ce | ||
|
|
1fb2796ada | ||
|
|
46465da483 | ||
|
|
751b6594a8 | ||
|
|
ff04d0fa8f | ||
|
|
ff983157a6 | ||
|
|
604854f22d | ||
|
|
5381b1fbac | ||
|
|
2722fc5434 | ||
|
|
5ac47b49ce | ||
|
|
acf779ace3 | ||
|
|
451c453442 | ||
|
|
b8b258c6f9 | ||
|
|
9fe429aeb8 | ||
|
|
86b55a6444 | ||
|
|
5d564e2378 | ||
|
|
d54282be14 | ||
|
|
bb31654289 | ||
|
|
0680b06383 | ||
|
|
2dd8426dec | ||
|
|
b1eef4ec55 | ||
|
|
b36d83b7cd | ||
|
|
75a1115685 | ||
|
|
36e820308f | ||
|
|
431961401f | ||
|
|
d6953b88ea | ||
|
|
6bbef8d33f | ||
|
|
e4806e4d39 | ||
|
|
6d6664d930 | ||
|
|
7676ef6a14 | ||
|
|
712b29d233 | ||
|
|
65455ee1ca | ||
|
|
0d86595ba8 | ||
|
|
4ab2fa21eb | ||
|
|
1f3710b90e | ||
|
|
c8a457bdce | ||
|
|
67ca37326e | ||
|
|
2dd53e6d99 | ||
|
|
623fce3cdf | ||
|
|
97d850e481 | ||
|
|
7cbc4a29bf | ||
|
|
9db06ca222 | ||
|
|
63e5ce2bc5 | ||
|
|
8bb1d83fb7 | ||
|
|
947c9d73ce | ||
|
|
66855072de | ||
|
|
c145dc2379 | ||
|
|
f2b7c2c2ad | ||
|
|
6bfeb12d33 | ||
|
|
09bef2d4c2 | ||
|
|
53fec13183 | ||
|
|
6427ad1cf9 | ||
|
|
c5d97fea69 | ||
|
|
7a41b10618 | ||
|
|
2032a7efa4 | ||
|
|
bd292b56cf | ||
|
|
7af91f1747 | ||
|
|
17d032b190 | ||
|
|
9d6c8453fd | ||
|
|
6bbe5f633c | ||
|
|
ba8c9bb1b1 | ||
|
|
8c46b421de | ||
|
|
1a6a7da9c1 | ||
|
|
d8c752ecb9 | ||
|
|
7e913c4bb7 | ||
|
|
2abde381a7 | ||
|
|
493eb10b96 | ||
|
|
7d0de5645f | ||
|
|
290310fbe8 | ||
|
|
19e6a588b8 | ||
|
|
b39f540e4b | ||
|
|
e45fc0079c | ||
|
|
25971bf98f | ||
|
|
3f273674f7 | ||
|
|
da566f3648 | ||
|
|
70e823f526 | ||
|
|
0411b34bbd | ||
|
|
49cfa21ddb | ||
|
|
7675a69cec | ||
|
|
ca6cc3fbe1 | ||
|
|
455c66e2eb | ||
|
|
de30f0a917 | ||
|
|
b16b171b1e | ||
|
|
804729deac | ||
|
|
f3e0ff8758 | ||
|
|
e3fbd40278 | ||
|
|
f2703dd65d | ||
|
|
2f917982fd | ||
|
|
f29238df6e | ||
|
|
71b1cf9cb2 | ||
|
|
20737415fa | ||
|
|
6e9ac71168 | ||
|
|
15032e3a40 | ||
|
|
eed8cf2cf0 | ||
|
|
27235df950 | ||
|
|
0902dcb7f3 | ||
|
|
8bdcbe727f | ||
|
|
e4a7e9716e | ||
|
|
7052b72f48 | ||
|
|
3e5ee4dc1b | ||
|
|
190342a2c8 | ||
|
|
82568376a0 | ||
|
|
e47cc68ee2 | ||
|
|
d56bf2ee34 | ||
|
|
07f0fcde33 | ||
|
|
de3814dcd2 | ||
|
|
cc2440d0a2 | ||
|
|
3123f6672b | ||
|
|
382997086d | ||
|
|
43995ebb28 | ||
|
|
1725fdcf8a | ||
|
|
e0362f3c36 | ||
|
|
53fefa7c10 | ||
|
|
1d0ae1a39b | ||
|
|
b6a3d1c2ae | ||
|
|
11dcabae73 | ||
|
|
d61cc913c0 | ||
|
|
527790f962 | ||
|
|
ecd4ff68a4 | ||
|
|
d4ea8aad8d | ||
|
|
f44a14c81e | ||
|
|
7caf2956d7 | ||
|
|
7398914af9 | ||
|
|
fb82d554fa | ||
|
|
8a53819f50 | ||
|
|
58c3b52a1a | ||
|
|
4a26d3f36e | ||
|
|
21e8e3a78d | ||
|
|
7bf00a766f | ||
|
|
8f69ea9da6 | ||
|
|
60923e3413 | ||
|
|
72841a51e6 | ||
|
|
5d441d2591 | ||
|
|
b001c83bd5 | ||
|
|
b1afeb4408 | ||
|
|
f6d4b860ee | ||
|
|
5d2b704608 | ||
|
|
d0f61faf4a | ||
|
|
0e1229e8d1 | ||
|
|
d785430db5 | ||
|
|
59d0cff410 | ||
|
|
e0b7242f1b | ||
|
|
3f56e00173 | ||
|
|
f8fd6681c8 | ||
|
|
a02fddd1a0 | ||
|
|
786c3b1f1a | ||
|
|
01cb3a40d7 | ||
|
|
8931a1f4c1 | ||
|
|
daa8e087f3 | ||
|
|
29e917ae88 | ||
|
|
ef36c446bd | ||
|
|
76644537e2 | ||
|
|
db521dad74 | ||
|
|
8b504bc4b1 | ||
|
|
7503de33a5 | ||
|
|
9df613ee27 | ||
|
|
2f3def3f86 | ||
|
|
5426e2c831 | ||
|
|
38b2b6cb4e | ||
|
|
94415d9cfb | ||
|
|
2fb822e1c1 | ||
|
|
0978d21439 | ||
|
|
775b0409c4 | ||
|
|
1083f8cf55 | ||
|
|
4cf8f9a434 | ||
|
|
6152fa2890 | ||
|
|
c0a702a386 | ||
|
|
a332f3189b | ||
|
|
e042ec5f3f | ||
|
|
336076c248 | ||
|
|
c21b60f555 | ||
|
|
efd0d81dca | ||
|
|
63467cd000 | ||
|
|
46f4685eec | ||
|
|
af3a5cf939 | ||
|
|
fb0ce8c06a | ||
|
|
8358597fd2 | ||
|
|
b31f830cb1 | ||
|
|
561d47a6a1 | ||
|
|
b8b0111aa2 | ||
|
|
f204f25474 | ||
|
|
47075e1cd0 | ||
|
|
793dfa5748 | ||
|
|
0b493bcb09 | ||
|
|
dd476bbf5c | ||
|
|
fc5350c9f8 | ||
|
|
b2c867bf2b | ||
|
|
3d8d116106 | ||
|
|
4b2f08f21f | ||
|
|
233088077b | ||
|
|
a59621910e | ||
|
|
05b6b59dad | ||
|
|
2bc7570674 | ||
|
|
0085ac130b | ||
|
|
7e1ee0e2e5 | ||
|
|
6bd3de8ec8 | ||
|
|
fab7f2c4b6 | ||
|
|
ea799e5735 | ||
|
|
3ab4112631 | ||
|
|
817e6f1ec1 | ||
|
|
81c8f0360f | ||
|
|
bec29d81c5 | ||
|
|
3a11aeb434 | ||
|
|
dddec1ec61 | ||
|
|
82426e0e45 | ||
|
|
3033eb8be0 | ||
|
|
e9665cf9f3 | ||
|
|
9bc743068a | ||
|
|
72a9954491 | ||
|
|
f2fe30a7bb | ||
|
|
ce39c79477 | ||
|
|
6fc4807a10 | ||
|
|
f890ea010e | ||
|
|
5b360a7fe2 | ||
|
|
55efd53ef7 | ||
|
|
fa5cf96f40 | ||
|
|
e33c783fc1 | ||
|
|
1438030e82 | ||
|
|
09e4d64f99 | ||
|
|
b5bd6191c2 | ||
|
|
e57de0ebce | ||
|
|
3bc9e7d2e4 | ||
|
|
6b636b166c | ||
|
|
026a86ba75 | ||
|
|
5a4bd14835 | ||
|
|
43159a0e05 | ||
|
|
3380817865 | ||
|
|
d6fcaafd78 | ||
|
|
0703f3f164 | ||
|
|
a083554218 | ||
|
|
c34c62ad42 | ||
|
|
fc3c091a48 | ||
|
|
000a5eaa56 | ||
|
|
48d713aafd | ||
|
|
885eec7444 | ||
|
|
95871e6cc1 | ||
|
|
f0ba0ce2e8 | ||
|
|
a166815348 | ||
|
|
35a149ea87 | ||
|
|
0287993c31 | ||
|
|
2d10f6b739 | ||
|
|
db7887687b | ||
|
|
f593807617 | ||
|
|
6da02b7b92 | ||
|
|
86c99c47c9 | ||
|
|
3b3e39b375 | ||
|
|
4b3feed324 | ||
|
|
57dd8bb91e | ||
|
|
34b1f90200 | ||
|
|
128e2c9e1f | ||
|
|
d0669823a2 | ||
|
|
1f99b1ec8e | ||
|
|
2c5eeb551e | ||
|
|
54906702bd | ||
|
|
ec56311a3d | ||
|
|
cdd09ea24f | ||
|
|
1ecdbc1d90 | ||
|
|
b1a5195c51 | ||
|
|
03f03ff501 | ||
|
|
3c5967a623 | ||
|
|
9013e8376c | ||
|
|
9b5b054297 | ||
|
|
4e161f0c91 | ||
|
|
6bbd54ab93 | ||
|
|
87190762d1 | ||
|
|
f4da36065f | ||
|
|
e71135b511 | ||
|
|
dfc880807e | ||
|
|
d12853ddf7 | ||
|
|
f1019ab332 | ||
|
|
96d1f8d83b | ||
|
|
c4fc0e57b3 | ||
|
|
6403c5e6af | ||
|
|
b3fbafad59 | ||
|
|
7594c4eab2 | ||
|
|
4163f1d6b0 | ||
|
|
ea716200a7 | ||
|
|
2bd9b7a640 | ||
|
|
4f670d516d | ||
|
|
f5835244c7 | ||
|
|
b00b1c36bc | ||
|
|
b2ddc6cfd8 | ||
|
|
0d6dbdc58b | ||
|
|
78baf76ae1 | ||
|
|
43c43e25c4 | ||
|
|
32daf025ab | ||
|
|
750bdb7bba | ||
|
|
8a796416a4 | ||
|
|
691e6cf9e8 | ||
|
|
de208e7a2f | ||
|
|
63a72c5d28 | ||
|
|
b6b4b89008 | ||
|
|
0b65735d86 | ||
|
|
44215ae6f1 | ||
|
|
fba5b80980 | ||
|
|
3f6af59612 | ||
|
|
693a622322 | ||
|
|
60e9d3f660 | ||
|
|
1d40858f70 | ||
|
|
5188529ff6 | ||
|
|
2079db79f7 | ||
|
|
d73eec068f | ||
|
|
8a32e5761c | ||
|
|
12e1a531fe | ||
|
|
32830da3c2 | ||
|
|
9f47e75492 | ||
|
|
e975681c16 | ||
|
|
a968d296bb | ||
|
|
031240ffc1 | ||
|
|
dfc4b07b1a | ||
|
|
63241dbf69 | ||
|
|
5b7523b9e0 | ||
|
|
4b228a71ef | ||
|
|
0f864c3192 | ||
|
|
e475d0d0b9 | ||
|
|
1635ace182 | ||
|
|
b4e3ce5de6 | ||
|
|
50ceb7c4dd | ||
|
|
4395a04d57 | ||
|
|
c5313375f0 | ||
|
|
2503ddfde4 | ||
|
|
b356cca528 | ||
|
|
d52394bb47 | ||
|
|
1da2d89ced | ||
|
|
a88a7d9834 | ||
|
|
9507fde91d | ||
|
|
742a27158a | ||
|
|
5ed383e3e2 | ||
|
|
1679837e46 | ||
|
|
eb3685fe67 | ||
|
|
50f8465d1e | ||
|
|
5502864a1f | ||
|
|
d572e59d2e | ||
|
|
e313bbfb31 | ||
|
|
a51c5fd9ca | ||
|
|
0c104cfc3a | ||
|
|
3a77082c66 | ||
|
|
975e4db452 | ||
|
|
d92f184bc9 | ||
|
|
2eea5cc3b2 | ||
|
|
0e8cb14099 | ||
|
|
1ec3b2ffe2 | ||
|
|
c836d69385 | ||
|
|
11c45e4388 | ||
|
|
3b9fac9c84 | ||
|
|
185558985e | ||
|
|
e3d25f6fed | ||
|
|
200071e713 | ||
|
|
bdb7bb97cd | ||
|
|
82809f27f7 | ||
|
|
c8e84b3a11 | ||
|
|
9581f07242 | ||
|
|
411aedafa0 | ||
|
|
f7f307c3bf | ||
|
|
c10df031bd | ||
|
|
a56228aba1 | ||
|
|
1b09544314 | ||
|
|
2dc18594a2 | ||
|
|
baa7a58a10 | ||
|
|
bb5212d2bb | ||
|
|
38db7d1e50 | ||
|
|
3371085da0 | ||
|
|
5c688370ed | ||
|
|
ab01722d96 | ||
|
|
ae5cb9864a | ||
|
|
43e5838555 | ||
|
|
cf8b02de26 | ||
|
|
d3ede583c2 | ||
|
|
cda871d2eb | ||
|
|
2ea3b77b7a | ||
|
|
3ab04e4c30 | ||
|
|
3b2190d720 | ||
|
|
b3691dcce9 | ||
|
|
722bc00c9b | ||
|
|
fe07da8634 | ||
|
|
54feab66e0 | ||
|
|
fda897c69e | ||
|
|
31d3616b8d | ||
|
|
eb6bab36a0 | ||
|
|
81f9798307 | ||
|
|
d1dafd5782 | ||
|
|
799a2ea541 | ||
|
|
4b2e45bbae | ||
|
|
32721ac8cb | ||
|
|
6871d2ed37 | ||
|
|
bdfa6f6ecc | ||
|
|
c59fbd5f9d | ||
|
|
54916cc548 | ||
|
|
3ff3ed39fb | ||
|
|
a8dbedd486 | ||
|
|
988a68dae5 | ||
|
|
9a9c5911a6 | ||
|
|
bfb07e9948 | ||
|
|
dda4e2c33a | ||
|
|
05e143662d | ||
|
|
9e2f15bde4 | ||
|
|
8f90423793 | ||
|
|
eecc002236 | ||
|
|
4167d3291a | ||
|
|
3be6229cf2 | ||
|
|
5f693945f0 | ||
|
|
82f478716c | ||
|
|
6544069aa2 | ||
|
|
8486a4fbae | ||
|
|
edd1138556 | ||
|
|
14ed3ae816 | ||
|
|
d5db9e88d4 | ||
|
|
f0a4fa7712 | ||
|
|
1f92768193 | ||
|
|
ccfcf0a1ee | ||
|
|
51626bf0db | ||
|
|
be6da2452a | ||
|
|
ec423db4e5 | ||
|
|
4c7f215559 | ||
|
|
0f9da06309 | ||
|
|
4ce6cabc46 | ||
|
|
b2b13b98b7 | ||
|
|
4c729ca5ed | ||
|
|
a78f8865b8 | ||
|
|
d5b37d4343 | ||
|
|
e424883857 | ||
|
|
b6e8c9c9ea | ||
|
|
ed9bb72dbe | ||
|
|
9753808936 | ||
|
|
82fdbc4bc6 | ||
|
|
d7f3b81e4c | ||
|
|
36f349ecba | ||
|
|
30a374b9e9 | ||
|
|
2a0b9a8596 | ||
|
|
9a9324946f | ||
|
|
babf1556e3 | ||
|
|
bb1c87b084 | ||
|
|
1c584fb158 | ||
|
|
83e1855919 | ||
|
|
4bc04769ec | ||
|
|
178358c29a | ||
|
|
42b16f74a1 | ||
|
|
9b493ad9e7 | ||
|
|
d7d5baae0e | ||
|
|
a8e434b74d | ||
|
|
07d5ba8405 | ||
|
|
a5141f9908 | ||
|
|
d15fb82b08 | ||
|
|
947b27a227 | ||
|
|
b49110bf5c | ||
|
|
8578958e40 | ||
|
|
65e78ca8b0 | ||
|
|
608bf9ada1 | ||
|
|
4373831317 | ||
|
|
aa78d63d72 | ||
|
|
400d94caba | ||
|
|
1660c4fe7c | ||
|
|
e643f12371 | ||
|
|
339c0bc520 | ||
|
|
e15c240a8f | ||
|
|
7bd66c2560 | ||
|
|
1f8fd404e5 | ||
|
|
93e951eb75 | ||
|
|
c52cd77c4c | ||
|
|
0da911c9f8 | ||
|
|
395aa0fc10 | ||
|
|
e10920d4ea | ||
|
|
914afa2dee | ||
|
|
ca1e0b4c48 | ||
|
|
70cf48dcaf | ||
|
|
68130c85f3 | ||
|
|
d0aea18b3e | ||
|
|
ac301b22e2 | ||
|
|
b56125fa39 | ||
|
|
b362ddac15 | ||
|
|
5f2aa810b1 | ||
|
|
189a6c337e | ||
|
|
9c552839ea | ||
|
|
79aa7901cf | ||
|
|
ad2dbffe75 | ||
|
|
3b77b04b95 | ||
|
|
88959b2e6c | ||
|
|
f256742a0d | ||
|
|
22e2d3d0f4 | ||
|
|
3eed137117 | ||
|
|
e28be10dd4 | ||
|
|
90361cb631 | ||
|
|
c3b959846c | ||
|
|
39884e16fa | ||
|
|
f107f8a87b | ||
|
|
8246b2f35f | ||
|
|
f13d12acec | ||
|
|
4090be72d4 | ||
|
|
90d30005f6 | ||
|
|
7c968a8f88 | ||
|
|
e4ab86e6f9 | ||
|
|
f41fb32d60 | ||
|
|
5249a17d48 | ||
|
|
99256bcad0 | ||
|
|
f402c37b14 | ||
|
|
494ab2db4d | ||
|
|
5d4160bc82 | ||
|
|
b9194e4305 | ||
|
|
8ab1fbe83a | ||
|
|
96a088f998 | ||
|
|
7d4399d7cc | ||
|
|
107c37f33d | ||
|
|
88949024e6 | ||
|
|
aad0b3d2d8 | ||
|
|
4e0e53c714 | ||
|
|
87a2817234 | ||
|
|
f3e796e972 | ||
|
|
7d5a843684 | ||
|
|
f914929eb7 | ||
|
|
8f7b776556 | ||
|
|
aeaa58a01b | ||
|
|
4dacd3be26 | ||
|
|
05929bdfe9 | ||
|
|
0690041347 | ||
|
|
842fd8b4e5 | ||
|
|
7a89e3d67a | ||
|
|
5ecc6224b0 | ||
|
|
f5c592291c | ||
|
|
7f229a3fde | ||
|
|
c859fb1186 | ||
|
|
6dceb30632 | ||
|
|
f3dc31be40 | ||
|
|
a2f5ffd59e | ||
|
|
a2c66a32b0 | ||
|
|
72139675ac | ||
|
|
2b57f04dc0 | ||
|
|
15e09fa83b | ||
|
|
55ee1d41f3 | ||
|
|
2e7908366a | ||
|
|
6ab4fda9a6 | ||
|
|
a5ba41cae8 | ||
|
|
5e9cdad044 | ||
|
|
c14de26c07 | ||
|
|
e5f506c81d | ||
|
|
4160f08c6c | ||
|
|
4ad0d1682e | ||
|
|
8fb4fc9a14 | ||
|
|
5a0187e1db | ||
|
|
7f5141c338 | ||
|
|
354cabf8d1 | ||
|
|
fd734c8553 | ||
|
|
9238de6a47 | ||
|
|
b2c5f488a7 | ||
|
|
c634867cdd | ||
|
|
d7f2273788 | ||
|
|
5c1a982fdd | ||
|
|
0300a67da8 | ||
|
|
862dfb3275 | ||
|
|
03121ed826 | ||
|
|
0cdff00cb6 | ||
|
|
787facec65 | ||
|
|
44d63b9103 | ||
|
|
49571fc78a | ||
|
|
60569bc97c | ||
|
|
b37510c30e | ||
|
|
343b7bf3e1 | ||
|
|
7a2423a742 | ||
|
|
57dfc739c6 | ||
|
|
f3d4b6541c | ||
|
|
d1c20d6c72 | ||
|
|
e4beb8236e | ||
|
|
7574124ff0 | ||
|
|
e1cb4d60c4 | ||
|
|
1d62329969 | ||
|
|
36813ff52f | ||
|
|
267141749d | ||
|
|
edd41c5be1 | ||
|
|
5dc0439173 | ||
|
|
4dbee1c0e3 | ||
|
|
76baba89c1 | ||
|
|
5da96941e1 | ||
|
|
c2ec8cd372 | ||
|
|
b73a0a9720 | ||
|
|
6f3b21616f | ||
|
|
1792f16929 | ||
|
|
8dfd02e69e | ||
|
|
c8b1c1b999 | ||
|
|
da9422824a | ||
|
|
403b51ca4b | ||
|
|
3fad0983b9 | ||
|
|
bbab5237d1 | ||
|
|
699838332d | ||
|
|
6e237b53e1 | ||
|
|
36990601db | ||
|
|
82f9549f01 | ||
|
|
656503c0c5 | ||
|
|
83fc70f415 | ||
|
|
bd8ba636c9 | ||
|
|
6eb2f2bffe | ||
|
|
d9a6cc6b1c | ||
|
|
8c3aabb215 | ||
|
|
d44d9f67f2 | ||
|
|
8f8800803b | ||
|
|
52007b6277 | ||
|
|
795008011e | ||
|
|
ec6b8646e9 | ||
|
|
40206f8280 | ||
|
|
887a9e7c9c | ||
|
|
e4218ede41 | ||
|
|
f4d0f80cd3 | ||
|
|
8661fb6b8d | ||
|
|
c212095a40 | ||
|
|
f337c7fb40 | ||
|
|
073a8ee079 | ||
|
|
a4b01cf114 | ||
|
|
cba069a039 | ||
|
|
bf4829205c | ||
|
|
328dce26ba | ||
|
|
0524708e05 | ||
|
|
7e376330d0 | ||
|
|
762db8b304 | ||
|
|
37479b3cfd | ||
|
|
07c2330245 | ||
|
|
0c6daf191c | ||
|
|
b897579a20 | ||
|
|
fcc0bcf438 | ||
|
|
0cd258f24f | ||
|
|
43e99bf9f5 | ||
|
|
83d10ba838 | ||
|
|
48997725c3 | ||
|
|
631f899f18 | ||
|
|
2a4a9d778f | ||
|
|
2e2b4d04db | ||
|
|
deede92fbc | ||
|
|
e3b2e84792 | ||
|
|
e07d55f5f4 | ||
|
|
1803b412c3 | ||
|
|
8dd7bfdb67 | ||
|
|
d1400ab4fa | ||
|
|
67c40f3119 | ||
|
|
68d0201538 | ||
|
|
d30d3ed05a | ||
|
|
43f2895eb8 | ||
|
|
185e3cffb4 | ||
|
|
d68196a3b0 | ||
|
|
4551302c09 | ||
|
|
56f36e45db | ||
|
|
8fabf1504a | ||
|
|
fd96d08ce8 | ||
|
|
0e801f9d3a | ||
|
|
e5ab56e843 | ||
|
|
ff0ad9cb41 | ||
|
|
3e81a4bd70 | ||
|
|
84f7aa56e1 | ||
|
|
c42f270ce0 | ||
|
|
af31ae4931 | ||
|
|
8b6308d3a2 | ||
|
|
6ecc4c18dc | ||
|
|
56557b8766 | ||
|
|
83ba80f4c9 | ||
|
|
65227c3c09 | ||
|
|
1b5474f377 | ||
|
|
38b5e2f7ca | ||
|
|
0ff3c56d4f | ||
|
|
4888732fb7 | ||
|
|
3079e2b488 | ||
|
|
34d96878b8 | ||
|
|
61e548151b | ||
|
|
7cc7dcc559 | ||
|
|
757c9ca63c | ||
|
|
5cb86f8937 | ||
|
|
cd1a29f1ea | ||
|
|
79b4765d9f | ||
|
|
05e9dcd5ce | ||
|
|
4c915ce8fe | ||
|
|
5d5fe3f5a1 | ||
|
|
5bacf69445 | ||
|
|
0a858ac353 | ||
|
|
b7258e61f3 | ||
|
|
bd45ffa022 | ||
|
|
b45f9568d0 | ||
|
|
f8290b8a7e | ||
|
|
21b002ce22 | ||
|
|
1fbd8f6cc6 | ||
|
|
2798f0d841 | ||
|
|
bf73cdbd01 | ||
|
|
03229eca0c | ||
|
|
489fdc1893 | ||
|
|
e2b2082660 | ||
|
|
5ab2e2b225 | ||
|
|
caa58e46c3 | ||
|
|
e9f4338852 | ||
|
|
f146cedad5 | ||
|
|
cc449f81f8 | ||
|
|
085e29d22b | ||
|
|
f8427fa242 | ||
|
|
eb9b6a3842 | ||
|
|
43fc1219f0 | ||
|
|
1469620831 | ||
|
|
036997a7a0 | ||
|
|
b4d9c40dc8 | ||
|
|
62257459fd | ||
|
|
ea641f081f | ||
|
|
a641c7a87d | ||
|
|
605a1eacf6 | ||
|
|
da3adf4f8e | ||
|
|
8680405b68 | ||
|
|
5ad2d1892f | ||
|
|
b723e350c8 | ||
|
|
0b665bc35b | ||
|
|
c012ea90dd | ||
|
|
b0b0fac847 | ||
|
|
c253e59c57 | ||
|
|
952e277d35 | ||
|
|
f984934270 | ||
|
|
fb58840cea | ||
|
|
3d8dc80f03 | ||
|
|
d970195394 | ||
|
|
c33c9e9f69 | ||
|
|
6d3a932453 | ||
|
|
622650785c | ||
|
|
362dc8128e | ||
|
|
f8e73afbee | ||
|
|
dbbe026b88 | ||
|
|
4b36a9bf7f | ||
|
|
70a5333b40 | ||
|
|
e8359b08c6 | ||
|
|
cebc0b66a5 | ||
|
|
6ac86cbc1a | ||
|
|
60ceb800e1 | ||
|
|
5f47b7b7fc | ||
|
|
7e2866714c | ||
|
|
7e8313b808 | ||
|
|
bfd28abb70 | ||
|
|
1afc0cbfce | ||
|
|
82bcd19d2e | ||
|
|
49049a715b | ||
|
|
3114a5b85e | ||
|
|
222f17a586 | ||
|
|
91027e9961 | ||
|
|
a06a7a8ccb | ||
|
|
a8bae22dd3 | ||
|
|
daa89f52b6 | ||
|
|
22c1059904 | ||
|
|
c0138966e7 | ||
|
|
0f14263b82 | ||
|
|
dfc6304efa | ||
|
|
99a8aa6868 | ||
|
|
983fc1a7b6 | ||
|
|
632d717af8 | ||
|
|
a74a3aa3b5 | ||
|
|
c90c351692 | ||
|
|
5612a57842 | ||
|
|
6e3c8c9745 | ||
|
|
0920c67017 | ||
|
|
1ed0d80348 | ||
|
|
c41fcb15b0 | ||
|
|
6c79b454bf | ||
|
|
610e40b8d6 | ||
|
|
5038018aa5 | ||
|
|
cce12e781f | ||
|
|
245de3abcb | ||
|
|
11f9fa1942 | ||
|
|
85fa7eb8c4 | ||
|
|
62d7168d41 | ||
|
|
2a053daa2e | ||
|
|
21a903fe2d | ||
|
|
83fc546fbe | ||
|
|
f648223c39 | ||
|
|
583c3f9a64 | ||
|
|
0d9c78670e | ||
|
|
32a37d8c0f | ||
|
|
168ff6dc82 | ||
|
|
03f904155e | ||
|
|
f479f9a32d | ||
|
|
bdbb9d2a9f | ||
|
|
e3ae0ceae3 | ||
|
|
34ea82e267 | ||
|
|
fe7e016e33 | ||
|
|
f901355bef | ||
|
|
60fb45c909 | ||
|
|
9ccfb2c322 | ||
|
|
0c9f39df78 | ||
|
|
7fffb71ac4 | ||
|
|
bf0cee9057 | ||
|
|
55b17f70a8 | ||
|
|
c9318cd2dd | ||
|
|
ffd2588f50 | ||
|
|
c3b9b37122 | ||
|
|
a30d82b333 | ||
|
|
81e2c1d2d7 | ||
|
|
5f2ffc0508 | ||
|
|
00297b607b | ||
|
|
1c702048a1 | ||
|
|
fdd356c2e7 | ||
|
|
1e64a63fa4 | ||
|
|
05f079758a | ||
|
|
b220bbeda2 | ||
|
|
0a358a8846 | ||
|
|
ed43c1b482 | ||
|
|
c505954b07 | ||
|
|
d5279d123f | ||
|
|
9be501fc3d | ||
|
|
1721d7e025 | ||
|
|
881484d06a | ||
|
|
537cfb8fd3 | ||
|
|
41f1ea36fe | ||
|
|
486d340028 | ||
|
|
e2bbd22144 | ||
|
|
43d0363a55 | ||
|
|
b253de508b | ||
|
|
1da82aeba9 | ||
|
|
db4d6aaf22 | ||
|
|
5ea86873c6 | ||
|
|
0f126fd630 | ||
|
|
ecc2a7241f | ||
|
|
fbf68db0c0 | ||
|
|
9ce8c90d25 | ||
|
|
affa9ca336 | ||
|
|
3a1c4d1e6f | ||
|
|
45fbecbcd0 | ||
|
|
02f28f54c7 | ||
|
|
81f035904e | ||
|
|
8e2d712688 | ||
|
|
29b63bc3c0 | ||
|
|
d98cdd5331 | ||
|
|
94905afa3c | ||
|
|
a659892227 | ||
|
|
82eddfdf98 | ||
|
|
063191b09e | ||
|
|
3fc6f62aea | ||
|
|
48f934f188 | ||
|
|
192af5d60f | ||
|
|
53a7b0987b | ||
|
|
a3897dbc15 | ||
|
|
55651738a7 | ||
|
|
22bddf9645 | ||
|
|
2a37e6233e | ||
|
|
c1722e1270 | ||
|
|
95c27ef943 | ||
|
|
3aafde7e18 | ||
|
|
85678de9f0 | ||
|
|
bda4bfa4f3 | ||
|
|
481624e3f0 | ||
|
|
d1f12ff801 | ||
|
|
eae482d413 | ||
|
|
abd774d017 | ||
|
|
f2c630731e | ||
|
|
3e3977776d | ||
|
|
36fbddbb5c | ||
|
|
e33d988301 | ||
|
|
a55167c9ac | ||
|
|
d0a4555a1f | ||
|
|
4724ac6b00 | ||
|
|
d998367d35 | ||
|
|
0e9e7d0a9d | ||
|
|
5e1e5903d6 | ||
|
|
25fae5d109 | ||
|
|
44b8630c71 | ||
|
|
6204bfcabf | ||
|
|
1355a9f837 | ||
|
|
db8f22cdbf | ||
|
|
860ec9d85f | ||
|
|
5f2f25b758 | ||
|
|
3728685c67 | ||
|
|
5e6b8deec1 | ||
|
|
21f2b0df43 | ||
|
|
2100484598 | ||
|
|
ba1a36f26e | ||
|
|
9c9a16d80e | ||
|
|
3d8e215598 | ||
|
|
ce806fdbe6 | ||
|
|
208a3a47fe | ||
|
|
f0708ecfb2 | ||
|
|
653d72086c | ||
|
|
9258ba3ec7 | ||
|
|
d851c5646e | ||
|
|
ac0d3779f1 | ||
|
|
9a0d62dc85 | ||
|
|
59e1703b41 | ||
|
|
e49a439c79 | ||
|
|
b2e9085371 | ||
|
|
8cea309ec6 | ||
|
|
a59dfa555c | ||
|
|
e22126ca02 | ||
|
|
867f112dfe | ||
|
|
24e6e23000 | ||
|
|
498adc86a9 | ||
|
|
a20d1c95c8 | ||
|
|
4a101cf1b1 | ||
|
|
583b11a2b2 | ||
|
|
b3c5137add | ||
|
|
3dc39b2c9d | ||
|
|
5897a44fc5 | ||
|
|
8b0f15f80b | ||
|
|
1262cf0f29 | ||
|
|
b74e63f42d | ||
|
|
e89ee2c131 | ||
|
|
c2321e3eea | ||
|
|
22a49ba7c6 | ||
|
|
4d614e9122 | ||
|
|
e0069fd62a | ||
|
|
c75c72b525 | ||
|
|
007b2c5434 | ||
|
|
b8a932a084 | ||
|
|
61c3932340 | ||
|
|
c2029e9d5c | ||
|
|
d0548d6766 | ||
|
|
5a40c5df03 | ||
|
|
f5ba36a735 | ||
|
|
efe2f2e043 | ||
|
|
6681382819 | ||
|
|
7a578a0679 | ||
|
|
5fee165692 | ||
|
|
0a4669b925 | ||
|
|
109546d20f | ||
|
|
f5c606266d | ||
|
|
facf958bae | ||
|
|
480db8be42 | ||
|
|
7c4e32bd94 | ||
|
|
854a9c4eb7 | ||
|
|
cbb0b17c31 | ||
|
|
f2ab8a8541 | ||
|
|
63d21eac8c | ||
|
|
579ff04f68 | ||
|
|
18d75feb15 | ||
|
|
11da96fe22 | ||
|
|
9201b1cced | ||
|
|
e02397da3e | ||
|
|
6014f648f4 | ||
|
|
2c55a008f1 | ||
|
|
b9be918b6c | ||
|
|
781cbc00d3 | ||
|
|
b9365a149f | ||
|
|
1d4f1c657f | ||
|
|
9a66d7b530 | ||
|
|
3a87b934a6 | ||
|
|
9845d0e035 | ||
|
|
3754e791e5 | ||
|
|
643154de15 | ||
|
|
af8b29aee5 | ||
|
|
36c0ec753d | ||
|
|
9115fc4397 | ||
|
|
0d59a4dcd7 | ||
|
|
e0c3c53c00 | ||
|
|
11654cc893 | ||
|
|
bb85ea75e4 | ||
|
|
2450576dbe | ||
|
|
dd81b6d872 | ||
|
|
3160034d66 | ||
|
|
d0d3813173 | ||
|
|
2ff4a76955 | ||
|
|
9626ed356c | ||
|
|
5ecf8d3b7f | ||
|
|
8041b17032 | ||
|
|
b9cda8fcca | ||
|
|
ed6a625c69 | ||
|
|
d498ff1085 | ||
|
|
f8a0dd59b7 | ||
|
|
8e602104af | ||
|
|
aac78773f4 | ||
|
|
d3915ad291 | ||
|
|
b61e4a6083 | ||
|
|
5318380bfa | ||
|
|
a64629f1c5 | ||
|
|
5231da1ea3 | ||
|
|
aa06751de5 | ||
|
|
f10eb9e082 | ||
|
|
9966b4efd1 | ||
|
|
0ec3e8b227 | ||
|
|
984a498ed2 | ||
|
|
c122e6f54d | ||
|
|
1924cc71f1 | ||
|
|
220473bf74 | ||
|
|
4373f577d8 | ||
|
|
2f773e49ef | ||
|
|
03ec1f08cf | ||
|
|
a0f9f98b1c | ||
|
|
b59a0e8c0d | ||
|
|
1fa70d259f | ||
|
|
1f0da42a15 | ||
|
|
845379e577 | ||
|
|
80123b6aa4 | ||
|
|
1aafc9f726 | ||
|
|
8607575e2b | ||
|
|
162c386bdd | ||
|
|
445e5ec84b | ||
|
|
54c35e3721 | ||
|
|
a2b92d0fe4 | ||
|
|
2ed12f1d95 | ||
|
|
fe5bcdeab9 | ||
|
|
9c6bc45f8f | ||
|
|
2cc749118f | ||
|
|
331388bfe8 | ||
|
|
079a52ee65 | ||
|
|
5b470650b7 | ||
|
|
380875ad3e | ||
|
|
79976a4bfe | ||
|
|
769b5d7dc6 | ||
|
|
2a95c5f668 | ||
|
|
1bf649d27d | ||
|
|
bda92f3898 | ||
|
|
7220025a62 | ||
|
|
0b6eda0815 | ||
|
|
e70e778775 | ||
|
|
7fb659bd3a | ||
|
|
b109436cc3 | ||
|
|
6ba0c448c8 | ||
|
|
ed5ff9cd31 | ||
|
|
1146790dc1 | ||
|
|
cf1d4d0efb | ||
|
|
b127ae8027 | ||
|
|
9c49143534 | ||
|
|
6bc3249685 | ||
|
|
3ab197f400 | ||
|
|
9ff69b7946 | ||
|
|
0b98a8ce5e | ||
|
|
2e26047b23 | ||
|
|
2cdd1f7376 | ||
|
|
033dd10192 | ||
|
|
9f5a8512d2 | ||
|
|
5c4e49cc3f | ||
|
|
8eb4782a49 | ||
|
|
99eb3b046d | ||
|
|
ac0389d04f | ||
|
|
6929ed024a | ||
|
|
f4cb798c8b | ||
|
|
8f6b8b75bc | ||
|
|
cb3daab5fa | ||
|
|
4d16ca238c | ||
|
|
84d623397b | ||
|
|
26b75f406f | ||
|
|
b30e4ab432 | ||
|
|
b0e10c9ada | ||
|
|
c6a1031ab7 | ||
|
|
7cbed30dc6 | ||
|
|
ce0099f5d2 | ||
|
|
45a5e317c0 | ||
|
|
11ddd88d60 | ||
|
|
ce05b8dfec | ||
|
|
f5d397030c | ||
|
|
874799c2c3 | ||
|
|
20af089fcd | ||
|
|
21ab0b461c | ||
|
|
7af0e64708 | ||
|
|
527c6dc36b | ||
|
|
8831a93375 | ||
|
|
677efcbced | ||
|
|
4f1a7ff5fb | ||
|
|
c9edf7d0dc | ||
|
|
d64ecac74e | ||
|
|
c804be6f01 | ||
|
|
959875c709 | ||
|
|
4d94cb5593 | ||
|
|
c1fb5dd5f5 | ||
|
|
db0e1eabc7 | ||
|
|
801ff5cc17 | ||
|
|
94f7f1c473 | ||
|
|
9862b8ccee | ||
|
|
722c7a5f7d | ||
|
|
72d038e04e | ||
|
|
b83188d435 | ||
|
|
f9cbd1bbbf | ||
|
|
4e88166673 | ||
|
|
f3d68f4944 | ||
|
|
3827a5436a | ||
|
|
4a7417347a | ||
|
|
dc6b286d25 | ||
|
|
aa36a56b27 | ||
|
|
a831e72fa2 | ||
|
|
b96158adcb | ||
|
|
5414875d00 | ||
|
|
fd4b10c6bd | ||
|
|
d110b45679 | ||
|
|
22e0828566 | ||
|
|
c3052d863a | ||
|
|
0b4455515d | ||
|
|
4ed74c6cc0 | ||
|
|
ebf64f67cf | ||
|
|
b16849768d | ||
|
|
f140c6ec9c | ||
|
|
8f1d06ff31 | ||
|
|
3f0fafb380 | ||
|
|
84124de79d | ||
|
|
8ad4e08651 | ||
|
|
8f981977e0 | ||
|
|
676210422f | ||
|
|
749301899e | ||
|
|
1bb1e00a0d | ||
|
|
83ee6b758e | ||
|
|
accaf027fe | ||
|
|
9b1e798b35 | ||
|
|
cffaabb3bf | ||
|
|
5ab5bc9f7c | ||
|
|
d9c4aada8a | ||
|
|
27fa99852b | ||
|
|
ec7795fa99 | ||
|
|
8e74df6155 | ||
|
|
4984d07960 | ||
|
|
2a312911cb | ||
|
|
a20e30312e | ||
|
|
e0e1011d30 | ||
|
|
1fcf044980 | ||
|
|
2287f1f662 | ||
|
|
ffbc76919e | ||
|
|
083952a531 | ||
|
|
bd29d382c7 | ||
|
|
8df09da816 | ||
|
|
4778ef803e | ||
|
|
37f91542a9 | ||
|
|
e1907364e6 | ||
|
|
7f48a242db | ||
|
|
4362a215d9 | ||
|
|
72b2e03dd0 | ||
|
|
f7c1eb2933 | ||
|
|
5dd46b1b16 | ||
|
|
68a731ed5e | ||
|
|
4c667be946 | ||
|
|
66f82c6c2a | ||
|
|
ff32864b47 | ||
|
|
e9656795a2 | ||
|
|
3fbb81b4fc | ||
|
|
442138e1f8 | ||
|
|
2d39b1dfac | ||
|
|
3b704e25fa | ||
|
|
c068be453a | ||
|
|
6f8f940f31 | ||
|
|
c000640928 | ||
|
|
059347af40 | ||
|
|
f0001856bc | ||
|
|
8c218b67ab | ||
|
|
5426a5fd3c | ||
|
|
d1241c438a | ||
|
|
bc7aa9a491 | ||
|
|
ae94d7ecc7 | ||
|
|
7e1986ecbc | ||
|
|
a07697be03 | ||
|
|
b99e664726 | ||
|
|
881b4ba277 | ||
|
|
3058bfbc17 | ||
|
|
8a08365666 | ||
|
|
6c96a106e7 | ||
|
|
6291c8396b | ||
|
|
79afa07118 | ||
|
|
0e43043a33 | ||
|
|
c06fc02915 | ||
|
|
8badbb3d60 | ||
|
|
57283b4a80 | ||
|
|
d9992eea6a | ||
|
|
c8c4507acf | ||
|
|
5a37c84a8b | ||
|
|
63898820f1 | ||
|
|
63359e156c | ||
|
|
d683d69f3c | ||
|
|
609d5bd611 | ||
|
|
0b894d3b31 | ||
|
|
3a838a05cd | ||
|
|
0a0b136b80 | ||
|
|
82549c6407 | ||
|
|
d737930bb0 | ||
|
|
dad67713fb | ||
|
|
a1082152a4 | ||
|
|
9f729b0c45 | ||
|
|
ee7d8659d5 | ||
|
|
4448c3e51b | ||
|
|
174e925e5a | ||
|
|
e7a8cdf951 | ||
|
|
45f5c054d5 | ||
|
|
15dcd6a9f6 | ||
|
|
9c86196b16 | ||
|
|
9185dc65d5 | ||
|
|
e0bfa287ee | ||
|
|
80f142c8ea | ||
|
|
7050fbc6e1 | ||
|
|
2c938bc305 | ||
|
|
cd6bfb1b9a | ||
|
|
11b253e4c3 | ||
|
|
d625e2624a | ||
|
|
a544bc966b | ||
|
|
9a3aae6586 | ||
|
|
390e607e66 | ||
|
|
22b18f99db | ||
|
|
c30d46c014 | ||
|
|
5d1a071287 | ||
|
|
16e00c1f12 | ||
|
|
87271a0a56 | ||
|
|
dadc496c19 | ||
|
|
a0940e7ae5 | ||
|
|
ca1fbb187b | ||
|
|
89025a3042 | ||
|
|
49f3f740e3 | ||
|
|
4b4bbdf626 | ||
|
|
cebf908bb2 | ||
|
|
75c105cb85 | ||
|
|
6669a66292 | ||
|
|
6e3aa46008 | ||
|
|
84a50e8e86 | ||
|
|
6559d8d8bc | ||
|
|
926686beff | ||
|
|
6ab171af8b | ||
|
|
c4916bd997 | ||
|
|
f86332fd99 | ||
|
|
8d843cd8ad | ||
|
|
0904ac3a70 | ||
|
|
8488223eee | ||
|
|
da3ba159db | ||
|
|
3e0f52db1a | ||
|
|
062c49dac3 | ||
|
|
533f9044cc | ||
|
|
b9eb3a0ad0 | ||
|
|
dbd09ea843 | ||
|
|
a4e1915aff | ||
|
|
9d2833fc2b | ||
|
|
ab4c21f80c | ||
|
|
f7fea5ffce | ||
|
|
87e9a69ae0 | ||
|
|
25fb2a7be3 | ||
|
|
10c1b996ed | ||
|
|
aa21ddaa4d | ||
|
|
eab0e7ddf9 | ||
|
|
891cba456b | ||
|
|
beb6b01796 | ||
|
|
a52af4843e | ||
|
|
8dec48fee3 | ||
|
|
b081103866 | ||
|
|
4a76e2ad33 | ||
|
|
b39eeddb45 | ||
|
|
7d4186c236 | ||
|
|
01a724d632 | ||
|
|
ca1549df2a | ||
|
|
0ae8e41612 | ||
|
|
bc8c433a72 | ||
|
|
7187b14459 | ||
|
|
07d25d97ab | ||
|
|
4d5f89909e | ||
|
|
60fa61840d | ||
|
|
499234e5dd | ||
|
|
1010276cd5 | ||
|
|
fdef80c53a | ||
|
|
22d3709967 | ||
|
|
b2c72d6990 | ||
|
|
6f688275c5 | ||
|
|
5b8334b26d | ||
|
|
23ea8493ba | ||
|
|
cc9dbd43c3 | ||
|
|
8308f82926 | ||
|
|
11f322a758 | ||
|
|
6376615781 | ||
|
|
f4b302e01a | ||
|
|
703d6648d7 | ||
|
|
f19807f0ca | ||
|
|
a523510922 | ||
|
|
47194fab71 | ||
|
|
75e32c0573 | ||
|
|
38b5a8d4f8 | ||
|
|
522c88dcda | ||
|
|
3375a5de51 | ||
|
|
68933880b9 | ||
|
|
469a393585 | ||
|
|
be1fdbdd56 | ||
|
|
2972728b5e | ||
|
|
78ba76250d | ||
|
|
603014b163 | ||
|
|
6b85518b74 | ||
|
|
d3578273db | ||
|
|
54f3c76da8 | ||
|
|
95b908b234 | ||
|
|
3b94728869 | ||
|
|
b8b9d34404 | ||
|
|
a5cfc20e0b | ||
|
|
3cf09e656f | ||
|
|
1f8859f26b | ||
|
|
6555bc9dbc | ||
|
|
49fb0228fa | ||
|
|
ad29926391 | ||
|
|
85293a482e | ||
|
|
6315864f84 | ||
|
|
c169bc3c51 | ||
|
|
1de3db0903 | ||
|
|
965fe88755 | ||
|
|
809b716d0d | ||
|
|
004c59d273 | ||
|
|
c34b254fd8 | ||
|
|
0d25b6b5c9 | ||
|
|
85eeb8b819 | ||
|
|
e84d90fc3a | ||
|
|
418b8d40f9 | ||
|
|
9581595a3d | ||
|
|
0aa7ba6bd4 | ||
|
|
2793d1076a | ||
|
|
d57dfd1997 | ||
|
|
f8122047b6 | ||
|
|
d115c6305c | ||
|
|
f63cdf37d7 | ||
|
|
dd88a1269a | ||
|
|
523183431b | ||
|
|
132c678594 | ||
|
|
f8127ab9df | ||
|
|
d61055af8f | ||
|
|
4e6ff7616c | ||
|
|
f2dd5eb0a3 | ||
|
|
f7e35899cf | ||
|
|
727b897994 | ||
|
|
8029973e33 |
10
.gitattributes
vendored
Normal file
10
.gitattributes
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Enforce LF normalization on Windows
|
||||
* text=lf
|
||||
|
||||
# Custom for Visual Studio
|
||||
*.cs diff=csharp
|
||||
*.sln merge=union
|
||||
*.csproj merge=union
|
||||
*.vbproj merge=union
|
||||
*.fsproj merge=union
|
||||
*.dbproj merge=union
|
||||
21
.gitignore
vendored
21
.gitignore
vendored
@@ -10,8 +10,8 @@ obj
|
||||
*.manifest
|
||||
mods/*/*.dll
|
||||
|
||||
# Red Alert binary files
|
||||
mods/*/packages/*.[mM][iI][xX]
|
||||
# ReSharper crap
|
||||
_ReSharper.*/
|
||||
|
||||
#binary stuff
|
||||
/*.dll
|
||||
@@ -22,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
|
||||
@@ -32,8 +34,6 @@ cgGL.dll
|
||||
*.pidb
|
||||
*.userprefs
|
||||
|
||||
packaging/windows/*.exe
|
||||
|
||||
# osx crap
|
||||
.DS_Store
|
||||
|
||||
@@ -52,9 +52,10 @@ OpenRA.Launcher.Mac/OpenRA.xcodeproj/*.mode1v3
|
||||
*.config
|
||||
*.resources
|
||||
|
||||
# other crap
|
||||
Logs/
|
||||
Replays/
|
||||
settings.yaml
|
||||
\#*
|
||||
.*.sw?
|
||||
# KDE crap
|
||||
*.kate-swp
|
||||
*.directory
|
||||
|
||||
# auto-generated documentation
|
||||
DOCUMENTATION.md
|
||||
*.html
|
||||
22
.travis.yml
Normal file
22
.travis.yml
Normal 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"
|
||||
20
AUTHORS
20
AUTHORS
@@ -12,25 +12,43 @@ The OpenRA developers are:
|
||||
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
|
||||
* Sascha Biedermann (bidifx)
|
||||
* Tim Mylemans (gecko)
|
||||
|
||||
* Tirili
|
||||
* Vladimir Komarov (VrKomarov)
|
||||
|
||||
Past developers included:
|
||||
* Paul Chote (pchote)
|
||||
* Robert Pepperell (ytinasni)
|
||||
|
||||
19
CONTRIBUTING.md
Normal file
19
CONTRIBUTING.md
Normal 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.
|
||||
20
INSTALL
20
INSTALL
@@ -41,23 +41,19 @@ UBUNTU (substitute comparable packages for other linux distros):
|
||||
|
||||
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.
|
||||
|
||||
You will additionally need to copy the third party dependencies (.dll and .config) from the
|
||||
thirdparty and thirdparty/Tao directories into the game root:
|
||||
|
||||
cp -v thirdparty/*.dll thirdparty/Tao/* .
|
||||
|
||||
Alternatively, the dlls can be installed into your system GAC. This is not
|
||||
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 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
|
||||
gacutil -i thirdparty/ICSharpCode.SharpZipLib.dll
|
||||
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
|
||||
|
||||
|
||||
89
Makefile
89
Makefile
@@ -1,14 +1,14 @@
|
||||
CSC = gmcs
|
||||
CSFLAGS = -nologo -warn:4 -debug:+ -debug:full -optimize- -codepage:utf8 -unsafe
|
||||
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
|
||||
PHONY = core tools package all mods clean distclean
|
||||
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
|
||||
|
||||
.SUFFIXES:
|
||||
core: game renderers mod_ra mod_cnc utility
|
||||
core: game renderers mods utility tsbuild
|
||||
tools: editor ralint tsbuild
|
||||
package: core editor
|
||||
mods: mod_ra mod_cnc
|
||||
package: core editor docs
|
||||
mods: mod_ra mod_cnc mod_d2k
|
||||
all: core tools
|
||||
clean:
|
||||
@-rm -f *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources
|
||||
@@ -97,6 +97,16 @@ 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
|
||||
#
|
||||
@@ -122,20 +132,25 @@ 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)
|
||||
|
||||
# Builds and exports tilesets from a bitmap
|
||||
tsbuild_SRCS := $(shell find OpenRA.TilesetBuilder/ -iname '*.cs')
|
||||
tsbuild_TARGET = TilesetBuilder.exe
|
||||
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.Form1.resources:
|
||||
resgen2 OpenRA.TilesetBuilder/Form1.resx OpenRA.TilesetBuilder.Form1.resources 1> /dev/null
|
||||
tsbuild: OpenRA.TilesetBuilder.Form1.resources $(tsbuild_TARGET)
|
||||
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)
|
||||
|
||||
#
|
||||
# Launchers / Utilities
|
||||
@@ -180,15 +195,19 @@ $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog))))
|
||||
#
|
||||
# Install / Uninstall for *nix
|
||||
#
|
||||
prefix = /usr/local
|
||||
datarootdir = $(prefix)/share
|
||||
datadir = $(datarootdir)
|
||||
bindir = $(prefix)/bin
|
||||
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
|
||||
CORE = fileformats rcg rgl rsdl rnull game editor utility tsbuild
|
||||
|
||||
# Documentation (d2k depends on all mod libraries)
|
||||
docs:
|
||||
@mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md
|
||||
|
||||
install: all
|
||||
@-echo "Installing OpenRA to $(INSTALL_DIR)"
|
||||
@@ -196,6 +215,10 @@ install: all
|
||||
@$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR)
|
||||
@$(INSTALL_PROGRAM) -d $(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
|
||||
@@ -205,8 +228,6 @@ 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) $(mod_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
|
||||
@@ -215,20 +236,44 @@ install: all
|
||||
@cp -r mods/ra/rules $(INSTALL_DIR)/mods/ra
|
||||
@cp -r mods/ra/tilesets $(INSTALL_DIR)/mods/ra
|
||||
@cp -r mods/ra/uibits $(INSTALL_DIR)/mods/ra
|
||||
|
||||
@-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)
|
||||
@cp thirdparty/Tao/* $(INSTALL_DIR)
|
||||
@$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR)
|
||||
@$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll $(INSTALL_DIR)
|
||||
|
||||
@echo "#!/bin/sh" > openra
|
||||
@echo "cd "$(datadir)"/openra" >> openra
|
||||
@echo "mono "$(datadir)"/openra/OpenRA.Game.exe \"$$""@\"" >> openra
|
||||
@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)
|
||||
@$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR)
|
||||
|
||||
@-rm openra
|
||||
@-rm openra-editor
|
||||
|
||||
uninstall:
|
||||
@-rm -r $(INSTALL_DIR)
|
||||
@-rm $(DESTDIR)$(bindir)/openra
|
||||
@-rm $(DESTDIR)$(bindir)/openra-editor
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Editor
|
||||
for (var u = 0; u < template.Size.X; u++)
|
||||
for (var v = 0; v < template.Size.Y; v++)
|
||||
{
|
||||
if (surface.Map.IsInMap(new int2(u, v) + pos))
|
||||
if (surface.Map.IsInMap(new CVec(u, v) + pos))
|
||||
{
|
||||
var z = u + v * template.Size.X;
|
||||
if (tile.TileBitmapBytes[z] != null)
|
||||
@@ -69,17 +69,17 @@ namespace OpenRA.Editor
|
||||
Brush.Bitmap.Height * surface.Zoom);
|
||||
}
|
||||
|
||||
void FloodFillWithBrush(Surface s, int2 pos)
|
||||
void FloodFillWithBrush(Surface s, CPos pos)
|
||||
{
|
||||
var queue = new Queue<int2>();
|
||||
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) =>
|
||||
Action<int, int> maybeEnqueue = (x, y) =>
|
||||
{
|
||||
if (s.Map.IsInMap(x, y) && !touched[x, y])
|
||||
{
|
||||
queue.Enqueue(new int2(x, y));
|
||||
queue.Enqueue(new CPos(x, y));
|
||||
touched[x, y] = true;
|
||||
}
|
||||
};
|
||||
@@ -91,25 +91,25 @@ namespace OpenRA.Editor
|
||||
if (!s.Map.MapTiles.Value[p.X, p.Y].Equals(replace))
|
||||
continue;
|
||||
|
||||
var a = FindEdge(s, p, new int2(-1, 0), replace);
|
||||
var b = FindEdge(s, p, new int2(1, 0), replace);
|
||||
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);
|
||||
maybeEnqueue(x, p.Y - 1);
|
||||
if (s.Map.MapTiles.Value[x, p.Y + 1].Equals(replace))
|
||||
MaybeEnqueue(x, p.Y + 1);
|
||||
maybeEnqueue(x, p.Y + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* todo: optimize */
|
||||
/* TODO: optimize */
|
||||
foreach (var ch in s.Chunks.Values) ch.Dispose();
|
||||
s.Chunks.Clear();
|
||||
}
|
||||
|
||||
int2 FindEdge(Surface s, int2 p, int2 d, TileReference<ushort, byte> replace)
|
||||
CPos FindEdge(Surface s, CPos p, CVec d, TileReference<ushort, byte> replace)
|
||||
{
|
||||
for (; ; )
|
||||
{
|
||||
|
||||
616
OpenRA.Editor/Form1.Designer.cs
generated
616
OpenRA.Editor/Form1.Designer.cs
generated
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -55,6 +55,23 @@ namespace OpenRA.Editor
|
||||
this.surface1 = new OpenRA.Editor.Surface();
|
||||
this.tt = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
|
||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||
this.toolStripMenuItemNew = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItemOpen = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItemSave = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemProperties = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItemResize = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemShowActorNames = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItemShowGrid = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemFixOpenAreas = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripMenuItemSetupDefaultPlayers = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItemCopySelection = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.QuickhelpToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -65,23 +82,43 @@ namespace OpenRA.Editor
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cCRedAlertMapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bitmapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuExport = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mnuMinimapToPNG = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fullMapRenderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.propertiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.resizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.showActorNamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.fixOpenAreasToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.setupDefaultPlayersMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.copySelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripComboBox1 = new System.Windows.Forms.ToolStripComboBox();
|
||||
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
||||
this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openRAWebsiteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.openRAResourcesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.wikiDocumentationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.discussionForumsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.sourceCodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.issueTrackerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.developerBountiesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabelFiller = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabelMousePosition = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.LeftToolStripPanel = new System.Windows.Forms.ToolStripPanel();
|
||||
this.ContentPanel = new System.Windows.Forms.ToolStripContentPanel();
|
||||
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
@@ -97,8 +134,13 @@ namespace OpenRA.Editor
|
||||
this.splitContainer3.Panel1.SuspendLayout();
|
||||
this.splitContainer3.Panel2.SuspendLayout();
|
||||
this.splitContainer3.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.toolStripContainer1.BottomToolStripPanel.SuspendLayout();
|
||||
this.toolStripContainer1.ContentPanel.SuspendLayout();
|
||||
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
||||
this.toolStripContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
@@ -114,7 +156,7 @@ namespace OpenRA.Editor
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.surface1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(985, 744);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(985, 695);
|
||||
this.splitContainer1.SplitterDistance = 198;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
@@ -132,8 +174,8 @@ namespace OpenRA.Editor
|
||||
// splitContainer2.Panel2
|
||||
//
|
||||
this.splitContainer2.Panel2.Controls.Add(this.tabControl1);
|
||||
this.splitContainer2.Size = new System.Drawing.Size(198, 744);
|
||||
this.splitContainer2.SplitterDistance = 164;
|
||||
this.splitContainer2.Size = new System.Drawing.Size(198, 695);
|
||||
this.splitContainer2.SplitterDistance = 153;
|
||||
this.splitContainer2.TabIndex = 1;
|
||||
//
|
||||
// pmMiniMap
|
||||
@@ -143,7 +185,7 @@ namespace OpenRA.Editor
|
||||
this.pmMiniMap.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pmMiniMap.Location = new System.Drawing.Point(0, 0);
|
||||
this.pmMiniMap.Name = "pmMiniMap";
|
||||
this.pmMiniMap.Size = new System.Drawing.Size(198, 164);
|
||||
this.pmMiniMap.Size = new System.Drawing.Size(198, 153);
|
||||
this.pmMiniMap.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pmMiniMap.TabIndex = 1;
|
||||
this.pmMiniMap.TabStop = false;
|
||||
@@ -160,7 +202,7 @@ namespace OpenRA.Editor
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.Padding = new System.Drawing.Point(6, 0);
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(198, 576);
|
||||
this.tabControl1.Size = new System.Drawing.Size(198, 538);
|
||||
this.tabControl1.TabIndex = 0;
|
||||
//
|
||||
// tabPage1
|
||||
@@ -169,7 +211,7 @@ namespace OpenRA.Editor
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 20);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(190, 552);
|
||||
this.tabPage1.Size = new System.Drawing.Size(190, 514);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Templates";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
@@ -181,7 +223,7 @@ namespace OpenRA.Editor
|
||||
this.tilePalette.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tilePalette.Location = new System.Drawing.Point(3, 3);
|
||||
this.tilePalette.Name = "tilePalette";
|
||||
this.tilePalette.Size = new System.Drawing.Size(184, 546);
|
||||
this.tilePalette.Size = new System.Drawing.Size(184, 508);
|
||||
this.tilePalette.TabIndex = 1;
|
||||
//
|
||||
// tabPage2
|
||||
@@ -191,7 +233,7 @@ namespace OpenRA.Editor
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 20);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(190, 552);
|
||||
this.tabPage2.Size = new System.Drawing.Size(190, 514);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Actors";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
@@ -202,7 +244,7 @@ namespace OpenRA.Editor
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(3, 24);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(184, 525);
|
||||
this.panel1.Size = new System.Drawing.Size(184, 487);
|
||||
this.panel1.TabIndex = 4;
|
||||
//
|
||||
// actorPalette
|
||||
@@ -212,7 +254,7 @@ namespace OpenRA.Editor
|
||||
this.actorPalette.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.actorPalette.Location = new System.Drawing.Point(0, 0);
|
||||
this.actorPalette.Name = "actorPalette";
|
||||
this.actorPalette.Size = new System.Drawing.Size(184, 525);
|
||||
this.actorPalette.Size = new System.Drawing.Size(184, 487);
|
||||
this.actorPalette.TabIndex = 3;
|
||||
//
|
||||
// actorOwnerChooser
|
||||
@@ -233,7 +275,7 @@ namespace OpenRA.Editor
|
||||
this.tabPage3.Controls.Add(this.resourcePalette);
|
||||
this.tabPage3.Location = new System.Drawing.Point(4, 20);
|
||||
this.tabPage3.Name = "tabPage3";
|
||||
this.tabPage3.Size = new System.Drawing.Size(190, 552);
|
||||
this.tabPage3.Size = new System.Drawing.Size(190, 514);
|
||||
this.tabPage3.TabIndex = 2;
|
||||
this.tabPage3.Text = "Resources";
|
||||
this.tabPage3.UseVisualStyleBackColor = true;
|
||||
@@ -245,7 +287,7 @@ namespace OpenRA.Editor
|
||||
this.resourcePalette.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.resourcePalette.Location = new System.Drawing.Point(0, 0);
|
||||
this.resourcePalette.Name = "resourcePalette";
|
||||
this.resourcePalette.Size = new System.Drawing.Size(190, 552);
|
||||
this.resourcePalette.Size = new System.Drawing.Size(190, 514);
|
||||
this.resourcePalette.TabIndex = 3;
|
||||
//
|
||||
// surface1
|
||||
@@ -254,7 +296,7 @@ namespace OpenRA.Editor
|
||||
this.surface1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.surface1.Location = new System.Drawing.Point(0, 0);
|
||||
this.surface1.Name = "surface1";
|
||||
this.surface1.Size = new System.Drawing.Size(783, 744);
|
||||
this.surface1.Size = new System.Drawing.Size(783, 695);
|
||||
this.surface1.TabIndex = 5;
|
||||
this.surface1.Text = "surface1";
|
||||
//
|
||||
@@ -273,24 +315,193 @@ namespace OpenRA.Editor
|
||||
//
|
||||
// splitContainer3.Panel1
|
||||
//
|
||||
this.splitContainer3.Panel1.Controls.Add(this.menuStrip1);
|
||||
this.splitContainer3.Panel1.Controls.Add(this.toolStrip1);
|
||||
//
|
||||
// splitContainer3.Panel2
|
||||
//
|
||||
this.splitContainer3.Panel2.Controls.Add(this.splitContainer1);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(985, 773);
|
||||
this.splitContainer3.Size = new System.Drawing.Size(985, 724);
|
||||
this.splitContainer3.SplitterDistance = 25;
|
||||
this.splitContainer3.TabIndex = 6;
|
||||
//
|
||||
// toolStrip1
|
||||
//
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripMenuItemNew,
|
||||
this.toolStripMenuItemOpen,
|
||||
this.toolStripMenuItemSave,
|
||||
this.toolStripSeparator,
|
||||
this.toolStripMenuItemProperties,
|
||||
this.toolStripMenuItemResize,
|
||||
this.toolStripSeparator8,
|
||||
this.toolStripMenuItemShowActorNames,
|
||||
this.toolStripMenuItemShowGrid,
|
||||
this.toolStripSeparator10,
|
||||
this.toolStripMenuItemFixOpenAreas,
|
||||
this.toolStripMenuItemSetupDefaultPlayers,
|
||||
this.toolStripSeparator11,
|
||||
this.toolStripMenuItemCopySelection,
|
||||
this.toolStripSeparator7,
|
||||
this.QuickhelpToolStripButton});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
|
||||
this.toolStrip1.Size = new System.Drawing.Size(985, 25);
|
||||
this.toolStrip1.TabIndex = 0;
|
||||
this.toolStrip1.Text = "toolStrip1";
|
||||
//
|
||||
// toolStripMenuItemNew
|
||||
//
|
||||
this.toolStripMenuItemNew.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemNew.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemNew.Image")));
|
||||
this.toolStripMenuItemNew.ImageTransparentColor = System.Drawing.Color.Fuchsia;
|
||||
this.toolStripMenuItemNew.Name = "toolStripMenuItemNew";
|
||||
this.toolStripMenuItemNew.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemNew.Text = "&New...";
|
||||
this.toolStripMenuItemNew.ToolTipText = "Create a new blank map.";
|
||||
this.toolStripMenuItemNew.Click += new System.EventHandler(this.toolStripMenuItemNewClick);
|
||||
//
|
||||
// toolStripMenuItemOpen
|
||||
//
|
||||
this.toolStripMenuItemOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemOpen.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemOpen.Image")));
|
||||
this.toolStripMenuItemOpen.Name = "toolStripMenuItemOpen";
|
||||
this.toolStripMenuItemOpen.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemOpen.Text = "&Open...";
|
||||
this.toolStripMenuItemOpen.ToolTipText = "Open an existing map.";
|
||||
this.toolStripMenuItemOpen.Click += new System.EventHandler(this.toolStripMenuItemOpenClick);
|
||||
//
|
||||
// toolStripMenuItemSave
|
||||
//
|
||||
this.toolStripMenuItemSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemSave.Enabled = false;
|
||||
this.toolStripMenuItemSave.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemSave.Image")));
|
||||
this.toolStripMenuItemSave.Name = "toolStripMenuItemSave";
|
||||
this.toolStripMenuItemSave.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemSave.Text = "&Save";
|
||||
this.toolStripMenuItemSave.ToolTipText = "Quicksave current map.";
|
||||
this.toolStripMenuItemSave.Click += new System.EventHandler(this.toolStripMenuItemSaveClick);
|
||||
//
|
||||
// toolStripSeparator
|
||||
//
|
||||
this.toolStripSeparator.Name = "toolStripSeparator";
|
||||
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripMenuItemProperties
|
||||
//
|
||||
this.toolStripMenuItemProperties.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemProperties.Enabled = false;
|
||||
this.toolStripMenuItemProperties.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemProperties.Image")));
|
||||
this.toolStripMenuItemProperties.Name = "toolStripMenuItemProperties";
|
||||
this.toolStripMenuItemProperties.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemProperties.Text = "&Properties...";
|
||||
this.toolStripMenuItemProperties.ToolTipText = "Edit Metadata";
|
||||
this.toolStripMenuItemProperties.Click += new System.EventHandler(this.toolStripMenuItemPropertiesClick);
|
||||
//
|
||||
// toolStripMenuItemResize
|
||||
//
|
||||
this.toolStripMenuItemResize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemResize.Enabled = false;
|
||||
this.toolStripMenuItemResize.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemResize.Image")));
|
||||
this.toolStripMenuItemResize.Name = "toolStripMenuItemResize";
|
||||
this.toolStripMenuItemResize.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemResize.Text = "&Resize...";
|
||||
this.toolStripMenuItemResize.ToolTipText = "Change the map borders and dimensions.";
|
||||
this.toolStripMenuItemResize.Click += new System.EventHandler(this.toolStripMenuItemResizeClick);
|
||||
//
|
||||
// toolStripSeparator8
|
||||
//
|
||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||
this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripMenuItemShowActorNames
|
||||
//
|
||||
this.toolStripMenuItemShowActorNames.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemShowActorNames.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemShowActorNames.Image")));
|
||||
this.toolStripMenuItemShowActorNames.Name = "toolStripMenuItemShowActorNames";
|
||||
this.toolStripMenuItemShowActorNames.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemShowActorNames.Text = "Show Actor &Names";
|
||||
this.toolStripMenuItemShowActorNames.ToolTipText = "If the actor has a custom name, display it.";
|
||||
this.toolStripMenuItemShowActorNames.Click += new System.EventHandler(this.toolStripMenuItemShowActorNamesClick);
|
||||
//
|
||||
// toolStripMenuItemShowGrid
|
||||
//
|
||||
this.toolStripMenuItemShowGrid.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemShowGrid.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemShowGrid.Image")));
|
||||
this.toolStripMenuItemShowGrid.Name = "toolStripMenuItemShowGrid";
|
||||
this.toolStripMenuItemShowGrid.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemShowGrid.Text = "Show &Grid";
|
||||
this.toolStripMenuItemShowGrid.ToolTipText = "Enable a grid overlay for better orientation.";
|
||||
this.toolStripMenuItemShowGrid.Click += new System.EventHandler(this.toolStripMenuItemShowGridClick);
|
||||
//
|
||||
// toolStripSeparator10
|
||||
//
|
||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||
this.toolStripSeparator10.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripMenuItemFixOpenAreas
|
||||
//
|
||||
this.toolStripMenuItemFixOpenAreas.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemFixOpenAreas.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemFixOpenAreas.Image")));
|
||||
this.toolStripMenuItemFixOpenAreas.Name = "toolStripMenuItemFixOpenAreas";
|
||||
this.toolStripMenuItemFixOpenAreas.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemFixOpenAreas.Text = "&Fix Open Areas";
|
||||
this.toolStripMenuItemFixOpenAreas.ToolTipText = "Add some randomness into clear tiles.";
|
||||
this.toolStripMenuItemFixOpenAreas.Click += new System.EventHandler(this.toolStripMenuItemFixOpenAreasClick);
|
||||
//
|
||||
// toolStripMenuItemSetupDefaultPlayers
|
||||
//
|
||||
this.toolStripMenuItemSetupDefaultPlayers.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemSetupDefaultPlayers.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemSetupDefaultPlayers.Image")));
|
||||
this.toolStripMenuItemSetupDefaultPlayers.Name = "toolStripMenuItemSetupDefaultPlayers";
|
||||
this.toolStripMenuItemSetupDefaultPlayers.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemSetupDefaultPlayers.Text = "&Setup Default Players";
|
||||
this.toolStripMenuItemSetupDefaultPlayers.ToolTipText = "Setup the players for each spawnpoint placed.";
|
||||
this.toolStripMenuItemSetupDefaultPlayers.Click += new System.EventHandler(this.toolStripMenuItemSetupDefaultPlayersClick);
|
||||
//
|
||||
// toolStripSeparator11
|
||||
//
|
||||
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
||||
this.toolStripSeparator11.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// toolStripMenuItemCopySelection
|
||||
//
|
||||
this.toolStripMenuItemCopySelection.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripMenuItemCopySelection.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItemCopySelection.Image")));
|
||||
this.toolStripMenuItemCopySelection.Name = "toolStripMenuItemCopySelection";
|
||||
this.toolStripMenuItemCopySelection.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripMenuItemCopySelection.Text = "Copy Selection";
|
||||
this.toolStripMenuItemCopySelection.ToolTipText = "Copy the current selection and paste it again on left-click.";
|
||||
this.toolStripMenuItemCopySelection.Click += new System.EventHandler(this.toolStripMenuItemCopySelectionClick);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// QuickhelpToolStripButton
|
||||
//
|
||||
this.QuickhelpToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.QuickhelpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("QuickhelpToolStripButton.Image")));
|
||||
this.QuickhelpToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.QuickhelpToolStripButton.Name = "QuickhelpToolStripButton";
|
||||
this.QuickhelpToolStripButton.Size = new System.Drawing.Size(23, 22);
|
||||
this.QuickhelpToolStripButton.Text = "Help";
|
||||
this.QuickhelpToolStripButton.ToolTipText = "Display the mapping tutorial in the OpenRA wiki.";
|
||||
this.QuickhelpToolStripButton.Click += new System.EventHandler(this.helpToolStripButton_Click);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.mapToolStripMenuItem,
|
||||
this.toolStripComboBox1,
|
||||
this.toolStripLabel1});
|
||||
this.fileToolStripMenuItem,
|
||||
this.mapToolStripMenuItem,
|
||||
this.toolStripComboBox1,
|
||||
this.toolStripLabel1,
|
||||
this.helpToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
|
||||
this.menuStrip1.Size = new System.Drawing.Size(985, 27);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
@@ -298,16 +509,16 @@ namespace OpenRA.Editor
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.newToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.openToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem1,
|
||||
this.mnuExport,
|
||||
this.toolStripSeparator3,
|
||||
this.exitToolStripMenuItem});
|
||||
this.newToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.openToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.toolStripMenuItem1,
|
||||
this.mnuExport,
|
||||
this.toolStripSeparator3,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 23);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
@@ -317,21 +528,23 @@ namespace OpenRA.Editor
|
||||
this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image")));
|
||||
this.newToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Fuchsia;
|
||||
this.newToolStripMenuItem.Name = "newToolStripMenuItem";
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.newToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.newToolStripMenuItem.Text = "&New...";
|
||||
this.newToolStripMenuItem.ToolTipText = "Create a new blank map.";
|
||||
this.newToolStripMenuItem.Click += new System.EventHandler(this.NewClicked);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(120, 6);
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// openToolStripMenuItem
|
||||
//
|
||||
this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image")));
|
||||
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.openToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.openToolStripMenuItem.Text = "&Open...";
|
||||
this.openToolStripMenuItem.ToolTipText = "Open an existing map.";
|
||||
this.openToolStripMenuItem.Click += new System.EventHandler(this.OpenClicked);
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
@@ -339,54 +552,54 @@ namespace OpenRA.Editor
|
||||
this.saveToolStripMenuItem.Enabled = false;
|
||||
this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image")));
|
||||
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.saveToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.ToolTipText = "Quicksave current map.";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.SaveClicked);
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Enabled = false;
|
||||
this.saveAsToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveAsToolStripMenuItem.Image")));
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.saveAsToolStripMenuItem.Text = "Save &As...";
|
||||
this.saveAsToolStripMenuItem.ToolTipText = "Save the map while choosing a filename.";
|
||||
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.SaveAsClicked);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(120, 6);
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// toolStripMenuItem1
|
||||
//
|
||||
this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cCRedAlertMapToolStripMenuItem,
|
||||
this.bitmapToolStripMenuItem});
|
||||
this.cCRedAlertMapToolStripMenuItem});
|
||||
this.toolStripMenuItem1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMenuItem1.Image")));
|
||||
this.toolStripMenuItem1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(123, 22);
|
||||
this.toolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
|
||||
this.toolStripMenuItem1.Text = "&Import";
|
||||
//
|
||||
// cCRedAlertMapToolStripMenuItem
|
||||
//
|
||||
this.cCRedAlertMapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cCRedAlertMapToolStripMenuItem.Image")));
|
||||
this.cCRedAlertMapToolStripMenuItem.Name = "cCRedAlertMapToolStripMenuItem";
|
||||
this.cCRedAlertMapToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.cCRedAlertMapToolStripMenuItem.Text = "&C&&C / Red Alert Map...";
|
||||
this.cCRedAlertMapToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
||||
this.cCRedAlertMapToolStripMenuItem.Text = "&Legacy Map Format...";
|
||||
this.cCRedAlertMapToolStripMenuItem.ToolTipText = "Import an original C&C / Red Alert and convert it to the .oramap format.";
|
||||
this.cCRedAlertMapToolStripMenuItem.Click += new System.EventHandler(this.ImportLegacyMapClicked);
|
||||
//
|
||||
// bitmapToolStripMenuItem
|
||||
//
|
||||
this.bitmapToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("bitmapToolStripMenuItem.Image")));
|
||||
this.bitmapToolStripMenuItem.Name = "bitmapToolStripMenuItem";
|
||||
this.bitmapToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.bitmapToolStripMenuItem.Text = "&Bitmap...";
|
||||
this.bitmapToolStripMenuItem.Visible = false;
|
||||
//
|
||||
// mnuExport
|
||||
//
|
||||
this.mnuExport.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.mnuMinimapToPNG});
|
||||
this.mnuMinimapToPNG,
|
||||
this.fullMapRenderToolStripMenuItem});
|
||||
this.mnuExport.Image = ((System.Drawing.Image)(resources.GetObject("mnuExport.Image")));
|
||||
this.mnuExport.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.mnuExport.Name = "mnuExport";
|
||||
this.mnuExport.Size = new System.Drawing.Size(123, 22);
|
||||
this.mnuExport.Size = new System.Drawing.Size(152, 22);
|
||||
this.mnuExport.Text = "&Export";
|
||||
//
|
||||
// mnuMinimapToPNG
|
||||
@@ -396,29 +609,45 @@ namespace OpenRA.Editor
|
||||
this.mnuMinimapToPNG.Name = "mnuMinimapToPNG";
|
||||
this.mnuMinimapToPNG.Size = new System.Drawing.Size(163, 22);
|
||||
this.mnuMinimapToPNG.Text = "Minimap to PNG";
|
||||
this.mnuMinimapToPNG.ToolTipText = "Save the map radar display as an image.";
|
||||
this.mnuMinimapToPNG.Click += new System.EventHandler(this.ExportMinimap);
|
||||
//
|
||||
// fullMapRenderToolStripMenuItem
|
||||
//
|
||||
this.fullMapRenderToolStripMenuItem.Enabled = false;
|
||||
this.fullMapRenderToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("fullMapRenderToolStripMenuItem.Image")));
|
||||
this.fullMapRenderToolStripMenuItem.Name = "fullMapRenderToolStripMenuItem";
|
||||
this.fullMapRenderToolStripMenuItem.Size = new System.Drawing.Size(163, 22);
|
||||
this.fullMapRenderToolStripMenuItem.Text = "Full Map Render";
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(120, 6);
|
||||
this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("exitToolStripMenuItem.Image")));
|
||||
this.exitToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(123, 22);
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.ToolTipText = "Quit the map editor.";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.CloseClicked);
|
||||
//
|
||||
// mapToolStripMenuItem
|
||||
//
|
||||
this.mapToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.propertiesToolStripMenuItem,
|
||||
this.resizeToolStripMenuItem,
|
||||
this.showActorNamesToolStripMenuItem,
|
||||
this.showGridToolStripMenuItem,
|
||||
this.fixOpenAreasToolStripMenuItem,
|
||||
this.setupDefaultPlayersMenuItem});
|
||||
this.propertiesToolStripMenuItem,
|
||||
this.resizeToolStripMenuItem,
|
||||
this.toolStripSeparator9,
|
||||
this.showActorNamesToolStripMenuItem,
|
||||
this.showGridToolStripMenuItem,
|
||||
this.toolStripSeparator5,
|
||||
this.fixOpenAreasToolStripMenuItem,
|
||||
this.setupDefaultPlayersMenuItem,
|
||||
this.toolStripSeparator4,
|
||||
this.copySelectionToolStripMenuItem});
|
||||
this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
|
||||
this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 23);
|
||||
this.mapToolStripMenuItem.Text = "&Map";
|
||||
@@ -430,6 +659,7 @@ namespace OpenRA.Editor
|
||||
this.propertiesToolStripMenuItem.Name = "propertiesToolStripMenuItem";
|
||||
this.propertiesToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.propertiesToolStripMenuItem.Text = "&Properties...";
|
||||
this.propertiesToolStripMenuItem.ToolTipText = "Edit Metadata";
|
||||
this.propertiesToolStripMenuItem.Click += new System.EventHandler(this.PropertiesClicked);
|
||||
//
|
||||
// resizeToolStripMenuItem
|
||||
@@ -439,36 +669,69 @@ namespace OpenRA.Editor
|
||||
this.resizeToolStripMenuItem.Name = "resizeToolStripMenuItem";
|
||||
this.resizeToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.resizeToolStripMenuItem.Text = "&Resize...";
|
||||
this.resizeToolStripMenuItem.ToolTipText = "Change the map borders and dimensions.";
|
||||
this.resizeToolStripMenuItem.Click += new System.EventHandler(this.ResizeClicked);
|
||||
//
|
||||
// toolStripSeparator9
|
||||
//
|
||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||
this.toolStripSeparator9.Size = new System.Drawing.Size(182, 6);
|
||||
//
|
||||
// showActorNamesToolStripMenuItem
|
||||
//
|
||||
this.showActorNamesToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("showActorNamesToolStripMenuItem.Image")));
|
||||
this.showActorNamesToolStripMenuItem.Name = "showActorNamesToolStripMenuItem";
|
||||
this.showActorNamesToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.showActorNamesToolStripMenuItem.Text = "Show Actor &Names";
|
||||
this.showActorNamesToolStripMenuItem.Text = "Show &Actor Names";
|
||||
this.showActorNamesToolStripMenuItem.ToolTipText = "If the actor has a custom name, display it.";
|
||||
this.showActorNamesToolStripMenuItem.Click += new System.EventHandler(this.ShowActorNamesClicked);
|
||||
//
|
||||
// showGridToolStripMenuItem
|
||||
//
|
||||
this.showGridToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("showGridToolStripMenuItem.Image")));
|
||||
this.showGridToolStripMenuItem.Name = "showGridToolStripMenuItem";
|
||||
this.showGridToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.showGridToolStripMenuItem.Text = "Show &Grid";
|
||||
this.showGridToolStripMenuItem.ToolTipText = "Enable a grid overlay for better orientation.";
|
||||
this.showGridToolStripMenuItem.Click += new System.EventHandler(this.ShowGridClicked);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(182, 6);
|
||||
//
|
||||
// fixOpenAreasToolStripMenuItem
|
||||
//
|
||||
this.fixOpenAreasToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("fixOpenAreasToolStripMenuItem.Image")));
|
||||
this.fixOpenAreasToolStripMenuItem.Name = "fixOpenAreasToolStripMenuItem";
|
||||
this.fixOpenAreasToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.fixOpenAreasToolStripMenuItem.Text = "&Fix Open Areas";
|
||||
this.fixOpenAreasToolStripMenuItem.ToolTipText = "Add some randomness into clear tiles.";
|
||||
this.fixOpenAreasToolStripMenuItem.Click += new System.EventHandler(this.FixOpenAreas);
|
||||
//
|
||||
// setupDefaultPlayersMenuItem
|
||||
//
|
||||
this.setupDefaultPlayersMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("setupDefaultPlayersMenuItem.Image")));
|
||||
this.setupDefaultPlayersMenuItem.Name = "setupDefaultPlayersMenuItem";
|
||||
this.setupDefaultPlayersMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.setupDefaultPlayersMenuItem.Text = "&Setup Default Players";
|
||||
this.setupDefaultPlayersMenuItem.ToolTipText = "Setup the players for each spawnpoint placed.";
|
||||
this.setupDefaultPlayersMenuItem.Click += new System.EventHandler(this.SetupDefaultPlayers);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(182, 6);
|
||||
//
|
||||
// copySelectionToolStripMenuItem
|
||||
//
|
||||
this.copySelectionToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copySelectionToolStripMenuItem.Image")));
|
||||
this.copySelectionToolStripMenuItem.Name = "copySelectionToolStripMenuItem";
|
||||
this.copySelectionToolStripMenuItem.Size = new System.Drawing.Size(185, 22);
|
||||
this.copySelectionToolStripMenuItem.Text = "Copy Selection";
|
||||
this.copySelectionToolStripMenuItem.ToolTipText = "Copy the current selection and paste it again on left-click.";
|
||||
this.copySelectionToolStripMenuItem.Click += new System.EventHandler(this.copySelectionToolStripMenuItemClick);
|
||||
//
|
||||
// toolStripComboBox1
|
||||
//
|
||||
this.toolStripComboBox1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
@@ -479,16 +742,114 @@ namespace OpenRA.Editor
|
||||
// toolStripLabel1
|
||||
//
|
||||
this.toolStripLabel1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
this.toolStripLabel1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripLabel1.Image")));
|
||||
this.toolStripLabel1.Name = "toolStripLabel1";
|
||||
this.toolStripLabel1.Size = new System.Drawing.Size(71, 20);
|
||||
this.toolStripLabel1.Size = new System.Drawing.Size(87, 20);
|
||||
this.toolStripLabel1.Text = "Active Mod:";
|
||||
this.toolStripLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.toolStripLabel1.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal;
|
||||
this.toolStripLabel1.ToolTipText = "Choose the OpenRA mod whose tilesets and actors shall be used.";
|
||||
//
|
||||
// helpToolStripMenuItem
|
||||
//
|
||||
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.openRAWebsiteToolStripMenuItem,
|
||||
this.openRAResourcesToolStripMenuItem,
|
||||
this.wikiDocumentationToolStripMenuItem,
|
||||
this.discussionForumsToolStripMenuItem,
|
||||
this.sourceCodeToolStripMenuItem,
|
||||
this.issueTrackerToolStripMenuItem,
|
||||
this.developerBountiesToolStripMenuItem,
|
||||
this.toolStripSeparator6,
|
||||
this.aboutToolStripMenuItem});
|
||||
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
|
||||
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 23);
|
||||
this.helpToolStripMenuItem.Text = "&Help";
|
||||
//
|
||||
// openRAWebsiteToolStripMenuItem
|
||||
//
|
||||
this.openRAWebsiteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openRAWebsiteToolStripMenuItem.Image")));
|
||||
this.openRAWebsiteToolStripMenuItem.Name = "openRAWebsiteToolStripMenuItem";
|
||||
this.openRAWebsiteToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.openRAWebsiteToolStripMenuItem.Text = "OpenRA &Website";
|
||||
this.openRAWebsiteToolStripMenuItem.ToolTipText = "Visit the OpenRA homepage.";
|
||||
this.openRAWebsiteToolStripMenuItem.Click += new System.EventHandler(this.openRAWebsiteToolStripMenuItemClick);
|
||||
//
|
||||
// openRAResourcesToolStripMenuItem
|
||||
//
|
||||
this.openRAResourcesToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openRAResourcesToolStripMenuItem.Image")));
|
||||
this.openRAResourcesToolStripMenuItem.Name = "openRAResourcesToolStripMenuItem";
|
||||
this.openRAResourcesToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.openRAResourcesToolStripMenuItem.Text = "OpenRA &Resources";
|
||||
this.openRAResourcesToolStripMenuItem.ToolTipText = "Share your maps and replays by uploading on this file exchange community.";
|
||||
this.openRAResourcesToolStripMenuItem.Click += new System.EventHandler(this.openRAResourcesToolStripMenuItemClick);
|
||||
//
|
||||
// wikiDocumentationToolStripMenuItem
|
||||
//
|
||||
this.wikiDocumentationToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("wikiDocumentationToolStripMenuItem.Image")));
|
||||
this.wikiDocumentationToolStripMenuItem.Name = "wikiDocumentationToolStripMenuItem";
|
||||
this.wikiDocumentationToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.wikiDocumentationToolStripMenuItem.Text = "Wiki &Documentation";
|
||||
this.wikiDocumentationToolStripMenuItem.ToolTipText = "Read and contribute to the developer documentation.";
|
||||
this.wikiDocumentationToolStripMenuItem.Click += new System.EventHandler(this.wikiDocumentationToolStripMenuItemClick);
|
||||
//
|
||||
// discussionForumsToolStripMenuItem
|
||||
//
|
||||
this.discussionForumsToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("discussionForumsToolStripMenuItem.Image")));
|
||||
this.discussionForumsToolStripMenuItem.Name = "discussionForumsToolStripMenuItem";
|
||||
this.discussionForumsToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.discussionForumsToolStripMenuItem.Text = "Discussion &Forums";
|
||||
this.discussionForumsToolStripMenuItem.ToolTipText = "Discuss OpenRA related matters in a bulletin board forum.";
|
||||
this.discussionForumsToolStripMenuItem.Click += new System.EventHandler(this.discussionForumsToolStripMenuItemClick);
|
||||
//
|
||||
// sourceCodeToolStripMenuItem
|
||||
//
|
||||
this.sourceCodeToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("sourceCodeToolStripMenuItem.Image")));
|
||||
this.sourceCodeToolStripMenuItem.Name = "sourceCodeToolStripMenuItem";
|
||||
this.sourceCodeToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.sourceCodeToolStripMenuItem.Text = "Source &Code";
|
||||
this.sourceCodeToolStripMenuItem.ToolTipText = "Browse and download the source code. Fix what annoys you. Patches are welcome.";
|
||||
this.sourceCodeToolStripMenuItem.Click += new System.EventHandler(this.sourceCodeToolStripMenuItemClick);
|
||||
//
|
||||
// issueTrackerToolStripMenuItem
|
||||
//
|
||||
this.issueTrackerToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("issueTrackerToolStripMenuItem.Image")));
|
||||
this.issueTrackerToolStripMenuItem.Name = "issueTrackerToolStripMenuItem";
|
||||
this.issueTrackerToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.issueTrackerToolStripMenuItem.Text = "Issue &Tracker";
|
||||
this.issueTrackerToolStripMenuItem.ToolTipText = "Report problems and request features.";
|
||||
this.issueTrackerToolStripMenuItem.Click += new System.EventHandler(this.issueTrackerToolStripMenuItemClick);
|
||||
//
|
||||
// developerBountiesToolStripMenuItem
|
||||
//
|
||||
this.developerBountiesToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("developerBountiesToolStripMenuItem.Image")));
|
||||
this.developerBountiesToolStripMenuItem.Name = "developerBountiesToolStripMenuItem";
|
||||
this.developerBountiesToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.developerBountiesToolStripMenuItem.Text = "Developer &Bounties";
|
||||
this.developerBountiesToolStripMenuItem.ToolTipText = "Hire a developer to get OpenRA modified to your wishes.";
|
||||
this.developerBountiesToolStripMenuItem.Click += new System.EventHandler(this.developerBountiesToolStripMenuItemClick);
|
||||
//
|
||||
// toolStripSeparator6
|
||||
//
|
||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||
this.toolStripSeparator6.Size = new System.Drawing.Size(180, 6);
|
||||
//
|
||||
// aboutToolStripMenuItem
|
||||
//
|
||||
this.aboutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("aboutToolStripMenuItem.Image")));
|
||||
this.aboutToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(183, 22);
|
||||
this.aboutToolStripMenuItem.Text = "&About";
|
||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItemClick);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabelFiller,
|
||||
this.toolStripStatusLabelMousePosition});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 751);
|
||||
this.toolStripStatusLabelFiller,
|
||||
this.toolStripStatusLabelMousePosition});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(985, 22);
|
||||
this.statusStrip1.TabIndex = 7;
|
||||
@@ -497,32 +858,95 @@ namespace OpenRA.Editor
|
||||
// toolStripStatusLabelFiller
|
||||
//
|
||||
this.toolStripStatusLabelFiller.Name = "toolStripStatusLabelFiller";
|
||||
this.toolStripStatusLabelFiller.Size = new System.Drawing.Size(948, 17);
|
||||
this.toolStripStatusLabelFiller.Size = new System.Drawing.Size(932, 17);
|
||||
this.toolStripStatusLabelFiller.Spring = true;
|
||||
//
|
||||
// toolStripStatusLabelMousePosition
|
||||
//
|
||||
this.toolStripStatusLabelMousePosition.Image = ((System.Drawing.Image)(resources.GetObject("toolStripStatusLabelMousePosition.Image")));
|
||||
this.toolStripStatusLabelMousePosition.Name = "toolStripStatusLabelMousePosition";
|
||||
this.toolStripStatusLabelMousePosition.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.toolStripStatusLabelMousePosition.Size = new System.Drawing.Size(22, 17);
|
||||
this.toolStripStatusLabelMousePosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.toolStripStatusLabelMousePosition.Size = new System.Drawing.Size(38, 17);
|
||||
this.toolStripStatusLabelMousePosition.Text = "0,0";
|
||||
//
|
||||
// BottomToolStripPanel
|
||||
//
|
||||
this.BottomToolStripPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.BottomToolStripPanel.Location = new System.Drawing.Point(0, 25);
|
||||
this.BottomToolStripPanel.Name = "BottomToolStripPanel";
|
||||
this.BottomToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.BottomToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.BottomToolStripPanel.Size = new System.Drawing.Size(985, 0);
|
||||
//
|
||||
// TopToolStripPanel
|
||||
//
|
||||
this.TopToolStripPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.TopToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.TopToolStripPanel.Name = "TopToolStripPanel";
|
||||
this.TopToolStripPanel.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
this.TopToolStripPanel.RowMargin = new System.Windows.Forms.Padding(3, 0, 0, 0);
|
||||
this.TopToolStripPanel.Size = new System.Drawing.Size(985, 0);
|
||||
//
|
||||
// RightToolStripPanel
|
||||
//
|
||||
this.RightToolStripPanel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.RightToolStripPanel.Location = new System.Drawing.Point(985, 0);
|
||||
this.RightToolStripPanel.Name = "RightToolStripPanel";
|
||||
this.RightToolStripPanel.Orientation = System.Windows.Forms.Orientation.Vertical;
|
||||
this.RightToolStripPanel.RowMargin = new System.Windows.Forms.Padding(0, 3, 0, 0);
|
||||
this.RightToolStripPanel.Size = new System.Drawing.Size(0, 25);
|
||||
//
|
||||
// LeftToolStripPanel
|
||||
//
|
||||
this.LeftToolStripPanel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.LeftToolStripPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.LeftToolStripPanel.Name = "LeftToolStripPanel";
|
||||
this.LeftToolStripPanel.Orientation = System.Windows.Forms.Orientation.Vertical;
|
||||
this.LeftToolStripPanel.RowMargin = new System.Windows.Forms.Padding(0, 3, 0, 0);
|
||||
this.LeftToolStripPanel.Size = new System.Drawing.Size(0, 25);
|
||||
//
|
||||
// ContentPanel
|
||||
//
|
||||
this.ContentPanel.Size = new System.Drawing.Size(985, 25);
|
||||
//
|
||||
// toolStripContainer1
|
||||
//
|
||||
//
|
||||
// toolStripContainer1.BottomToolStripPanel
|
||||
//
|
||||
this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.statusStrip1);
|
||||
//
|
||||
// toolStripContainer1.ContentPanel
|
||||
//
|
||||
this.toolStripContainer1.ContentPanel.AutoScroll = true;
|
||||
this.toolStripContainer1.ContentPanel.Controls.Add(this.splitContainer3);
|
||||
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(985, 724);
|
||||
this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.toolStripContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStripContainer1.Name = "toolStripContainer1";
|
||||
this.toolStripContainer1.Size = new System.Drawing.Size(985, 773);
|
||||
this.toolStripContainer1.TabIndex = 8;
|
||||
this.toolStripContainer1.Text = "toolStripContainer1";
|
||||
//
|
||||
// toolStripContainer1.TopToolStripPanel
|
||||
//
|
||||
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(985, 773);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.splitContainer3);
|
||||
this.Controls.Add(this.toolStripContainer1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.KeyPreview = true;
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "OpenRA Editor";
|
||||
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown);
|
||||
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
@@ -539,12 +963,20 @@ namespace OpenRA.Editor
|
||||
this.splitContainer3.Panel1.PerformLayout();
|
||||
this.splitContainer3.Panel2.ResumeLayout(false);
|
||||
this.splitContainer3.ResumeLayout(false);
|
||||
this.toolStrip1.ResumeLayout(false);
|
||||
this.toolStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false);
|
||||
this.toolStripContainer1.BottomToolStripPanel.PerformLayout();
|
||||
this.toolStripContainer1.ContentPanel.ResumeLayout(false);
|
||||
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
|
||||
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
|
||||
this.toolStripContainer1.ResumeLayout(false);
|
||||
this.toolStripContainer1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -575,7 +1007,6 @@ namespace OpenRA.Editor
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
|
||||
private System.Windows.Forms.ToolStripMenuItem cCRedAlertMapToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem bitmapToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuExport;
|
||||
private System.Windows.Forms.ToolStripMenuItem mnuMinimapToPNG;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
@@ -592,7 +1023,44 @@ namespace OpenRA.Editor
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.FlowLayoutPanel actorPalette;
|
||||
private System.Windows.Forms.ComboBox actorOwnerChooser;
|
||||
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem copySelectionToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openRAWebsiteToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem issueTrackerToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem developerBountiesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem discussionForumsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem wikiDocumentationToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem openRAResourcesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
|
||||
private System.Windows.Forms.ToolStripMenuItem sourceCodeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripContainer toolStripContainer1;
|
||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
||||
private System.Windows.Forms.ToolStripButton QuickhelpToolStripButton;
|
||||
private System.Windows.Forms.ToolStripPanel BottomToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel TopToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel RightToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripPanel LeftToolStripPanel;
|
||||
private System.Windows.Forms.ToolStripContentPanel ContentPanel;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemNew;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemOpen;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemSave;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemProperties;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemResize;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemShowActorNames;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemShowGrid;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemFixOpenAreas;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemSetupDefaultPlayers;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
||||
private System.Windows.Forms.ToolStripButton toolStripMenuItemCopySelection;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
|
||||
private System.Windows.Forms.ToolStripMenuItem fullMapRenderToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -42,14 +42,17 @@ namespace OpenRA.Editor
|
||||
tilePalette.ResumeLayout();
|
||||
actorPalette.ResumeLayout();
|
||||
resourcePalette.ResumeLayout();
|
||||
surface1.Bind(null, null, null);
|
||||
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());
|
||||
|
||||
var mod = Game.modData.Manifest.Mods[0];
|
||||
Text = "{0} Mod Version: {1} - OpenRA Editor".F(Mod.AllMods[mod].Title, Mod.AllMods[mod].Version);
|
||||
|
||||
loadedMapName = null;
|
||||
};
|
||||
|
||||
@@ -138,38 +141,67 @@ namespace OpenRA.Editor
|
||||
Rules.LoadRules(manifest, map);
|
||||
tileset = Rules.TileSets[map.Tileset];
|
||||
tileset.LoadTiles();
|
||||
var palette = new Palette(FileSystem.Open(tileset.Palette), true);
|
||||
int[] ShadowIndex = { 3, 4 };
|
||||
var palette = new Palette(FileSystem.Open(tileset.Palette), ShadowIndex);
|
||||
|
||||
surface1.Bind(map, tileset, palette);
|
||||
// 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(); }
|
||||
foreach (var t in tileset.Templates)
|
||||
|
||||
string[] templateOrder = tileset.EditorTemplateOrder ?? new string[]{};
|
||||
foreach (var tc in tileset.Templates.GroupBy(t => t.Value.Category).OrderBy(t => templateOrder.ToList().IndexOf(t.Key)))
|
||||
{
|
||||
try
|
||||
var category = tc.Key ?? "(Uncategorized)";
|
||||
var categoryHeader = new Label
|
||||
{
|
||||
var bitmap = tileset.RenderTemplate((ushort)t.Key, palette);
|
||||
var ibox = new PictureBox
|
||||
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
|
||||
{
|
||||
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));
|
||||
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 { }
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
var actorTemplates = new List<ActorTemplate>();
|
||||
@@ -187,7 +219,13 @@ namespace OpenRA.Editor
|
||||
if (etf != null && etf.RequireTilesets != null
|
||||
&& !etf.RequireTilesets.Contains(tileset.Id)) continue;
|
||||
|
||||
var template = RenderUtils.RenderActor(info, tileset, palette);
|
||||
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,
|
||||
@@ -218,7 +256,7 @@ namespace OpenRA.Editor
|
||||
{
|
||||
try
|
||||
{
|
||||
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, palette);
|
||||
var template = RenderUtils.RenderResourceType(a, tileset.Extensions, PlayerPalette);
|
||||
var ibox = new PictureBox
|
||||
{
|
||||
Image = template.Bitmap,
|
||||
@@ -255,10 +293,13 @@ namespace OpenRA.Editor
|
||||
pmMiniMap.Image = Minimap.AddStaticResources(surface1.Map, Minimap.TerrainBitmap(surface1.Map, true));
|
||||
|
||||
propertiesToolStripMenuItem.Enabled = true;
|
||||
toolStripMenuItemProperties.Enabled = true;
|
||||
resizeToolStripMenuItem.Enabled = true;
|
||||
toolStripMenuItemResize.Enabled = true;
|
||||
saveToolStripMenuItem.Enabled = true;
|
||||
toolStripMenuItemSave.Enabled = true;
|
||||
saveAsToolStripMenuItem.Enabled = true;
|
||||
mnuMinimapToPNG.Enabled = true; // todo: what is this VB naming bullshit doing here?
|
||||
mnuMinimapToPNG.Enabled = true; // TODO: what is this VB naming bullshit doing here?
|
||||
|
||||
PopulateActorOwnerChooser();
|
||||
}
|
||||
@@ -293,7 +334,7 @@ namespace OpenRA.Editor
|
||||
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.Bind(surface1.Map, surface1.TileSet, surface1.Palette, surface1.PlayerPalette); // rebind it to invalidate all caches
|
||||
}
|
||||
|
||||
surface1.Invalidate();
|
||||
@@ -362,6 +403,7 @@ namespace OpenRA.Editor
|
||||
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);
|
||||
@@ -458,12 +500,14 @@ namespace OpenRA.Editor
|
||||
void ShowActorNamesClicked(object sender, EventArgs e)
|
||||
{
|
||||
showActorNamesToolStripMenuItem.Checked ^= true;
|
||||
toolStripMenuItemShowActorNames.Checked ^= true;
|
||||
surface1.ShowActorNames = showActorNamesToolStripMenuItem.Checked;
|
||||
}
|
||||
|
||||
void ShowGridClicked(object sender, EventArgs e)
|
||||
{
|
||||
showGridToolStripMenuItem.Checked ^= true;
|
||||
toolStripMenuItemShowGrid.Checked ^= true;
|
||||
surface1.ShowGrid = showGridToolStripMenuItem.Checked;
|
||||
surface1.Chunks.Clear();
|
||||
}
|
||||
@@ -491,6 +535,7 @@ namespace OpenRA.Editor
|
||||
void SetupDefaultPlayers(object sender, EventArgs e)
|
||||
{
|
||||
dirty = true;
|
||||
surface1.Map.Players.Clear();
|
||||
surface1.Map.MakeDefaultPlayers();
|
||||
|
||||
surface1.Chunks.Clear();
|
||||
@@ -522,5 +567,108 @@ namespace OpenRA.Editor
|
||||
var player = actorOwnerChooser.SelectedItem as PlayerReference;
|
||||
surface1.NewActorOwner = player.Name;
|
||||
}
|
||||
|
||||
private void copySelectionToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
surface1.CopySelection();
|
||||
}
|
||||
|
||||
private void openRAWebsiteToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://www.open-ra.org");
|
||||
}
|
||||
|
||||
private void openRAResourcesToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://content.open-ra.org");
|
||||
}
|
||||
|
||||
private void wikiDocumentationToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/wiki");
|
||||
}
|
||||
|
||||
private void discussionForumsToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://www.sleipnirstuff.com/forum/viewforum.php?f=80");
|
||||
}
|
||||
|
||||
private void issueTrackerToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/issues");
|
||||
}
|
||||
|
||||
private void developerBountiesToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("https://www.bountysource.com/#repos/OpenRA/OpenRA");
|
||||
}
|
||||
|
||||
private void sourceCodeToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA");
|
||||
}
|
||||
|
||||
private void aboutToolStripMenuItemClick(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("OpenRA and OpenRA Editor are Free/Libre Open Source Software released under the GNU General Public License version 3. See AUTHORS and COPYING for details.",
|
||||
"About",
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Asterisk);
|
||||
}
|
||||
|
||||
private void helpToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.Start("http://github.com/OpenRA/OpenRA/wiki/Mapping");
|
||||
}
|
||||
|
||||
private void toolStripMenuItemNewClick(object sender, EventArgs e)
|
||||
{
|
||||
NewClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemOpenClick(object sender, EventArgs e)
|
||||
{
|
||||
OpenClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemSaveClick(object sender, EventArgs e)
|
||||
{
|
||||
SaveClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemPropertiesClick(object sender, EventArgs e)
|
||||
{
|
||||
PropertiesClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemResizeClick(object sender, EventArgs e)
|
||||
{
|
||||
ResizeClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemShowActorNamesClick(object sender, EventArgs e)
|
||||
{
|
||||
ShowActorNamesClicked(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemFixOpenAreasClick(object sender, EventArgs e)
|
||||
{
|
||||
FixOpenAreas(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemSetupDefaultPlayersClick(object sender, EventArgs e)
|
||||
{
|
||||
SetupDefaultPlayers(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemCopySelectionClick(object sender, EventArgs e)
|
||||
{
|
||||
copySelectionToolStripMenuItemClick(sender, e);
|
||||
}
|
||||
|
||||
private void toolStripMenuItemShowGridClick(object sender, EventArgs e)
|
||||
{
|
||||
ShowGridClicked(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,58 +120,230 @@
|
||||
<metadata name="tt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>76, 17</value>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>429, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="toolStripMenuItemNew.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHPSURBVDhPpZFNTxNRFIb7W1y4NZpI4k/QrRs3rjSu/QMk
|
||||
NjHGYCFgYYIWsaJidAKoUWqEgFiwGjE2ERREKEOZZtpa23H6OWX6OHN7CQaxNfFNTm5Oct7nnvten6fN
|
||||
6AV+rPixM/2sTRzGNgKYGz0kF/2IgXayNIXNF8fADJB8fcY9e0lMHqGw3v1vAO9mLAXqMSx9zD2jot/6
|
||||
cg3l3qSogbvPWViMHwxcVQ+hzZ6maEzgUKCcfSZ6faqDXV0PP6Xj1PmDIWIDMwjVWQHxNhF94ba0Q8/Q
|
||||
OC8XlgRk/v0+iLU1SCJyFCfdSerNWdcYFBnUjLC0Q9fgQ2HeLWltSotdbP5C6gr6zAkSKzcoa32k435p
|
||||
B6fR4NbYPENq9E/A7+odfiwte3K9VGp1cmaZ8VerHD957u+AwE1V2vZUtXfIWxW2Mz9Rp5dbA64OPJC2
|
||||
puz6DmaxRuq7xddkjtHIx9aAy30j0up+huNglWoYuSLftvPE19LcefK2NeBS97AwO06DUsUmky+RSBX4
|
||||
tJ4ltqQTejTXGtDZFXJDa1CpNkPTDJPPG1neLevMfNBQ7k+3B3iheWl7gXlvDrtrh9Q5lNEpgiOR9k/w
|
||||
BtqVHP9f+Xy/AI/l932QyhfPAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACeUlE
|
||||
QVQ4T6WSWUiUURiG/4suurJIjUIwskQsEAMjqosQpUVNKbdCSRPKrQVDMddmXEedGdcpFXNGnUYdrSzF
|
||||
sEIoFInQcqHE1CwoKsXUUMnt6XfEye0munjgnO+c9+HjO0cA/osNi2tJLdA6SXN13MwoI12lJ06uiV8+
|
||||
W3d5IwIjVXiGKvwX11djSs2TRFlUito7ILIAoVab7SvCWhqrZYq1omXC4gpPe4Ur8AjNMQjo69IwPVZj
|
||||
4PeojtlhNfoyBXXalKSNBJ5hSjxCcnELzkeoKVcyNVq5Kjz/rZDZnggqSzOoKEpDXZBEcU4id+Sx5Mui
|
||||
RcdfmVClyWLqh8YYXhDD9MVCT/CGrBPcK5Hx62uxMdxUm2XgiT6Tep2MhxVp6NXJ6IqllKlucTc3niJl
|
||||
LKqsGINMqChOY+JTnqHtwRYJdZVK5gelMJSymo9ibSAOeiPhXTid1T5cD3IvF9SqZMb7M+CznEdVCtqe
|
||||
ypcurWz9bQC0ezHX6sr0M0c+lNtx5cKJcVGwXyjJlfDzvZSh1gTqdHIWBiTQHbIU7AwSg+eYa3Nnuvk4
|
||||
E41HGak9gDTUmvPOZjmGGRQqExjpiuG+NouOl2InvRGi4BJ0+LPw6gwzL04x2XSM0ToHvlfZ0p66FT9X
|
||||
KxxsTGwMAlVmLN3NiTzQZkJ/IrwR233tzUyLG5PPHRmrP8Sw3o4vmr30yE2RBO/Bfp9Fg/EV8tKjqSnL
|
||||
oOdxGO3ZgpE2+SaaZZtpSNpCdbw56mgLbt/YhZ/L7oVD9pYuRkF2ShTZksukxwQSd813cbJc9HHm7MnD
|
||||
OB2x46CdNbZWFljuNGP7NhN2mJqIuRX/YOXm30H4A70P0TsBWkcYAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACPklE
|
||||
QVQ4T6WS70uTURTH9y/03jdBL3prU2O4FqvBU66hLB2GFtKvJ9Isfy3TJEXLVHT5A7QVLp20Wk3CiUb+
|
||||
AH8gJmIsJSs1l7TEoabYRDD4ds99dI9Le1MHzvPi3OfzufeeexQA/iv5p7MjAEp32xpaXat45lhGc5Mf
|
||||
j6zzqKv9BkuVF/dLZ1BU+Bn5eR+Qkz2OG9c9DN0SENjbA9TWbFDxr7G+sQl9Yi/OJL7iyUISuF6ucEF5
|
||||
2Q8q7hkE+5fXcdT4GkqlCFOCk8qSwPF0iQuKCr9TcVdsw198K4gwuJF3axanjS20JAlsjQtccNM8TcWQ
|
||||
2Am/n/LjoOBCZsYk4mJttCwJGup9XJB+bZyKwfgTHvL4EKZ1QBRHYTBY6RdJUFM9xwXi5VEq8tgL7hn5
|
||||
in3RTUg+24+YmDr6TRJUlM+iuwvsKYGUC29hOjfIu00NozvTsWlnCe5DvOkNBMEiC0qKp9DuBpsBoMX+
|
||||
i737T5TeW+RNpYbRndNSPUH4VFwbdLoyWXA7fxLO58AT2yYbnAD0SRkhaTxvRtLVAgmOZfBJJ7TaYllg
|
||||
zplgMFD9IMB3JkjBliLUAsY+LWBiZhFi9l0c17dyWH3MDo2mQBbQWFofInhsEhB8JbcSH71L8M6vIuuO
|
||||
BZFaO4ObEXnkMdTRubIgLfUdu/cahw/onNh/SMCL9gG4u4bQ3TeCweExnDCYoNQ0IorB4aoGqFSZIYL4
|
||||
SxcH+HjShNGQ0DvTU1G3qWF0Z9qVkuDDUemy4N8Tit/kKu4LI/ykxwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemProperties.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAAB/klE
|
||||
QVQ4T6WQ30tTUQDHz39QD0UQRlAPIkgPxh6yhCRCykGBL0WZjOytLKdl7KGHJmFYtAjH7uUWy3XvMswf
|
||||
d3Ou8MdWils1ggZCRQ43lbbAwYpB4vbtnDMzrrsMw4cvB87h8/l+OQTAlqJ7ydL/7MEhGvQ9vQdZ6oLT
|
||||
boVouwV7t4XFIvkFKMGB0nB23rqeX187kPl0CR/VJi5hsBh9VBo2nzuqgdPh0/gxeRhJXwWs8g3cDDSC
|
||||
uH0fwKKMvIMyNI6/8DVTPT/bzh7RwAtqOWZdZWjpacZlbwOIMvIe+XweqdSCBo5HLLhqMnK4tfE4YmoV
|
||||
QsIeeLp240rDXpzpPIXmfiOI7AlzAYMXo3c4PO4fpOdJzAVNXMImHyzfierK7TBU7ELlvh0Pj7XXwOSu
|
||||
B+kdnsFqLo9kMo7O6xeQSMSQpZ8RDr3hktm+A6gz7IfgGoThxEX6UvgrKjAbb9eCOIemObAx6ZUcpqeC
|
||||
MJ+vRWQug0B0WSNgoZJt5MnA22L4dw6LmRV8/p6l8E8Oq6FUkYCFSC8CHJKUUThcPg7bJA/uCyq6HcPr
|
||||
kSeW9AXC84l/zXQ2a/7CmwuzWbNCYdGb0Bc4lLHCAtkPR6+Pw7bHdIGoXWB7GdMX2OXXtHkVS6w5WWie
|
||||
XGtms0VvnMN33d/0BT2uV/xhsykSbLz4v4D8ATko6xzt+1ySAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemResize.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAH3SURBVDhPrZJfSFNxFMf3rBk+iIH2oOCTIAlZSGCQPqgIqQ/5tHQpPiikBpIpCnuxYkWCokQg
|
||||
qDcoNYZETZAhbII0dh92DdPNvJuj4f7epWa2vOvrzg/u8uqQkA4cztPn8/uee4/mv5RxgQfN2Xkbm9zc
|
||||
EpujUyY2+w0TbJ5ZBL/9sAyCx2cWMcqZYHj5Dv3PJsF/FjE8aUZrH4eWXg7Njzjoeqb+ShU4/iee7MO4
|
||||
jIB0gPsDI9B2PIYkScmORCK4Vt2iTkUvH4djhzI2fbsJeBC88EUl8Hg8aoESW1bg3zKiP2JY2/qO27pe
|
||||
VGu7k3A4HIbL5TqdYIybZ/DPXzLCuwcQt/exIkZR0dAF3rHKYhMcDAbhcDjUAoKfvzJC2ovhayL2+tYO
|
||||
hM0o+PUIbta349adDgYGAgH4/X7Y7fbTCfQvOHTqx9DY9QS19/oSL3eirK4NlwrKMD1nZqDX62UpLBaL
|
||||
WqAfeo3VjW9oevAUn/gV1Nx9iGW7wCQEp2cXsSmKIhOkTNBjMLI9lV1DoVAysvG9GWlZheCmPyIzrzy1
|
||||
gI6EvrIiIQHt7fP54Ha78WbWhAvZV5CRW5paQBd2/Fed7Mz8CmTkXMfFyzdSC+g86WU6EqfTCUEQYLPZ
|
||||
YLVaGXCyr1bq1AK6bbL+SxeXa1FS1awWnK80miNVQhp+0k4xYAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemShowActorNames.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAGOSURBVDhPY/j//z9FGKsgKRirIAiHFm92CyjctB+bHDLGKgjCGa37/gcWbvzftvBaCDZ5GMYq
|
||||
6Je/XtQ3d81/35x1/23j5r7FpgaGsQq6Zaya7Zi8fLZFzML/xgH9QNznj00dCGMVdExa9sUqdqGoWdi0
|
||||
00b+ff8N/LpvYFMHwhgCrmlLE+1iF54AsU3DZ7mZhE79r+fT+U/Pp8MFXS0IYwg4Ji68ahk1WwvGNw6d
|
||||
/ApowH9dz9ZdyOpgGIXjEDdX2Sp61n/DgP4Let7tVw38+67q+fV+0fFs/a9knfNX0SpLBVk9CKNwbGNm
|
||||
bwT6e5+6fZGJik2ulaZThZWmW6OWpmvDfxWbApAhG5HVgzCcYRczg9s4ZNoXTecKUWQFIKzuWDEFaPt/
|
||||
BYsMjCgFExbh06SMgiZt13St+eoQUvoSWYGyXUmEvFnSf2WgC1RsC/4rWqR/UDBL44bJgwl9v25RoGYt
|
||||
JatMLXmTBHgAgrCSTYGoLFBMUjtQS1zTV0tSJ0hL1jgB1QBKMFZB4vF/BgBJP5kepjxMJgAAAABJRU5E
|
||||
rkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemShowGrid.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAFYSURBVDhPY6AqyJt9/z+UyZA1/TacHd93Cc4OaTwJZ2MAZAPSJt+Es2M6z8PZAbVHMQ0AaQTh
|
||||
7Bn3/mcAbU6fcuN/ysSr/xOBNsd2nfsf0Xr6P8hmkGafyoP/PUr3/ncp3I5pUNZUhLNBmqFMhpDm43C2
|
||||
R+luTI0wALIZykRxdmDtETjbpXAnpgEgZ2cgORukOaId5OzjQGcfBjvbDeTsgu3/7XK3/rfJ3PjfMm0d
|
||||
pkEozgZqhjJRnA3SDGViAlCAQZnA0D4MZzshOdsifS2mAfE9VyDOBoc2wtkgm0F+dsje+t86c9N/89R1
|
||||
/02TVv03jF/x3yB6KaZByKEN8jOUieJskGYoExMEITkbObSRA0wvBpvNcGfvBycSkJ8doKFtDtRskrQa
|
||||
7Gy96GX/daIW/9eKWAjGUO0IgBLa2QhnG8Uvh7OxaoQBZGdbpCJCG9nZeA0gHTAwAACOffGU2o3WzAAA
|
||||
AABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemFixOpenAreas.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAE/SURBVDhPY0ACokCsBaVhAJsYVsBvbGzsD6T/Q2l+HGI4gTwQ/wcBEA3lYxMDGQKjUQAxLpDH
|
||||
ogYFIJsOY8MwjI/uIjAABRBMEQjg8jt2cSAnC00Qp01AAJOHGQoG6IpxugCIMTRjcwEIoCvGZSgYoIcB
|
||||
NiBv6q79v3Rmwv+0Pv//EU32Xzwr9GqgcnCAbisIgMViGzz6G1cn/t9yZer/C892/e/fnfU/vF/3v3m2
|
||||
ZA9EGVAhFifCxWLanH9uvDzh/8Zrk8Dh1bMn9X//nnSQAd+B8mAAshksCaKhfLiYT7Xh/21X5oDZMLDp
|
||||
0lSQASC1YIDXBRbZ0j+7dyX9b9+VANbcvjMB7AKzLIkfQHk4wBkGJqni3cE9Gv97d6WAbQbRIL5xivhU
|
||||
iDIiANC5HUD8CeRsoM1fjJPFJzEwMDAAAD8wxIeEhxEyAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemSetupDefaultPlayers.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAD0SURBVDhPY0AD/9FoogEuDaQZdCzROe5YsvOJwwnODw7EO1S7KomLQaXwArAtIM33WrNef1ra
|
||||
/f9NT/7/U/H2X9f6mXeCVRDjEpDNIM0/N876/3FS8f9byTb/Fzhp34ZK4wVg00HOBtkM0vyiKvT/1WDN
|
||||
/z3G8q/AKohxAcjPIGeDbAZpXmch9mteYfb/Gct2EhWQ/0EBBvIzyNkgm8t8A/9X10/6DwLEGoICXCKK
|
||||
/vfP2fr/2p1nJBkCUwSmHUMLwIZcv/ucJENQAMyQG3coMMQprBBsyO17T8k3xNgj+b9rZBF1DAFhqBDp
|
||||
AGQIlEkNwMAAAP7JtzLCVbRNAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripMenuItemCopySelection.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAJVSURBVDhPpZPdS5NhGMZ3LKJ/gzsrHg3sIFsm5A46cC3ImmnWOy0/lrMtpdbct5tbH5Op6eZH
|
||||
6lrvtOYqTTdxrUyCTgoKlSwiAjHICAOro7VdPe+7aRSyhC64eeDhvn73/b4Xj+BvRcc8WRPDphKnUYG2
|
||||
iwxam07AY6sqsTVXZKVa0itypyeHQrD63LhZ1MxVTqolvSZZF5ke7dwKQFIt6RUYvJLD9tm3AmxvA2rO
|
||||
uO+1iv0ey6a52yIX0zMj1fJvsb02srEFB7Coy7a3/obYXjsPSLzVQlt3GNp6aXrAk4nBzEf3+oWRQA8J
|
||||
+ztIcOiq1N/rQGKpCecZMTrN9VK2x0R8XQbi7dAJh10tmSmrQPD4bl/2s7CXmR0fBI0Q4ZEOTPraMe67
|
||||
huCAA4EbbRj1tIJ1m0EBoADc6tIzbrs6CaFTc7ncvy3PAGtzfCW+zCL+OYqfn2YQ+xhCfDWyeb8yH8B1
|
||||
ayOc+hohD5hiXYVc7rx5qRnxhUboa/OhO50HrXwnWqoJjA17EV9UIfayHu8eHIW+4QgMytLkfxkbsBfe
|
||||
9lgRW5nC+sMSrE0dwPe5UhgUeyhoN3RnduHHUxnWoxJ8DRXjVX8+lBVFUJ0sTgL8bksul/nyCx/mhwqw
|
||||
eHM/PkSq8H66EsrjO/AmKMHrETEWvCLeHGrLg0ImwtmyfclP8HWbsv1uU3W7vg4ODcOXjT4gmj2/qqb2
|
||||
EJrkB3GuspifzJnV5QWM4pjodxKdZmWmU1cjvHypitgvnCIUQMwqGaEAoqmREAogFEAayosIN/kP8/9J
|
||||
IPgFAlSB3U6URz4AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="QuickhelpToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIVSURBVDhPtVJNaxNRFM1PyE+Yn1AUXLjK0uWgDWQZwUUX
|
||||
KsGFBEEcCkIwqBEpGiydsSo2kupsasdo7Yi2toh0sFZjG5JpiZo20/TpVOmH5njvm8BYahEXHji8+968
|
||||
c+55l4n8F0zM+rhVWkHmdg29A/PoK1Yw8uIjOp/3xpvqBgrjLeilZbjNLXxZ34bwt6jexMVCGRndQenl
|
||||
0p+NWHzPXoP3rQ3bAbQhQM0E5Np2BKprbZzrm8TIs8puE+68+r0NwwZiacCwALEBCVcAqet8JlAjk1PZ
|
||||
JzsNJt6u4+FMS3ZmMV9mmFNAMhesbBZLC6oFdOsd8oVXocmdx018Ej9k1FgqiJ0zgS6qlR6BVI4iEFRN
|
||||
IJlxMF/1cfTMcGiQvbskB6ZqgairJ6BCTJKYu9tlAUW1oSRsNDwfB+JXQ4PzN6s07W0ZPxDS5aSgJEFn
|
||||
06Y9CaOqSauJRvMr9qmXQ4P8/RoWvU16eyBUEq5kbigwiKoOMTBQ0zbKlTq6TxihwejkZ1iOJwfEwmiC
|
||||
BQ49yaW50J7Fh0xJw3IxbM3hwo2x0ICRHZzFgveTunYERK5lgo5YMxx8WPFw5Li+U8wYm66jNz+Naov+
|
||||
Beqiao58N5NrPluoryJO0QeKU7sNGKPPazh9aRzGo/eYmVvEMk270fTlmzl2N3XW9xL/jv7iaxw7+wAH
|
||||
E9ew//AVxE8OItv/9O/Cf0ck8gud2vKswuxNZgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>198, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="newToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHNSURBVDhPjZNdTxNREIb5LV54azSRxJ8gt95445XGa/8A
|
||||
CU0MMVgIWNmgRSioGN0AapQaISAWrEaITQTkQyhL2WbbWtt1+7ll+7h7SDdBocskk3Mm58xzZt7JaWmx
|
||||
bTdyk9/rPsz0fbYmz2JqfvSdHhJLPpxzTzMUid13F0D3k/h41V57iU+dI7/dfTqA8zKGBLUohjpurxER
|
||||
7/24i/RkSnj/47csLsWOB27IZ1DmrlDQJrHIU8q8EbE63UrD7oVe09p243iIqEAPQGVOQJxKRJwfdgE9
|
||||
gxO8X1wRkIWv/1Ri7A0QD5/HSrWT/HTNTgwIDapayAV0DTwXyQ0/IqwSvXU4hWQn6uwl4usPKCl9pGI+
|
||||
F2DV6zwaX2BQjgjIiZPpHXrpJjU2di7lao2sXmLiwwYXL18/GeB/KP8HqJgH5Iwy++k/yDOrzQF3+p8d
|
||||
AZi1A/RCleQvg81ElrHwt+aA232jLqBmWRjFKlq2wM/9HLGtFCOvPjcHdHQPCYBl1SmWTdK5IvFknu/b
|
||||
GaIrKsEX880B7V1B6rZq5cqhaIqms7aT4cuqyuyygvR0xhvgiOao7Qjm9Byyyw7K80hj0wRGw94tOGPy
|
||||
cs8fetoLfwGP5fd9L1vD4gAAAABJRU5ErkJggg==
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHPSURBVDhPpZFNTxNRFIb7W1y4NZpI4k/QrRs3rjSu/QMk
|
||||
NjHGYCFgYYIWsaJidAKoUWqEgFiwGjE2ERREKEOZZtpa23H6OWX6OHN7CQaxNfFNTm5Oct7nnvten6fN
|
||||
6AV+rPixM/2sTRzGNgKYGz0kF/2IgXayNIXNF8fADJB8fcY9e0lMHqGw3v1vAO9mLAXqMSx9zD2jot/6
|
||||
cg3l3qSogbvPWViMHwxcVQ+hzZ6maEzgUKCcfSZ6faqDXV0PP6Xj1PmDIWIDMwjVWQHxNhF94ba0Q8/Q
|
||||
OC8XlgRk/v0+iLU1SCJyFCfdSerNWdcYFBnUjLC0Q9fgQ2HeLWltSotdbP5C6gr6zAkSKzcoa32k435p
|
||||
B6fR4NbYPENq9E/A7+odfiwte3K9VGp1cmaZ8VerHD957u+AwE1V2vZUtXfIWxW2Mz9Rp5dbA64OPJC2
|
||||
puz6DmaxRuq7xddkjtHIx9aAy30j0up+huNglWoYuSLftvPE19LcefK2NeBS97AwO06DUsUmky+RSBX4
|
||||
tJ4ltqQTejTXGtDZFXJDa1CpNkPTDJPPG1neLevMfNBQ7k+3B3iheWl7gXlvDrtrh9Q5lNEpgiOR9k/w
|
||||
BtqVHP9f+Xy/AI/l932QyhfPAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="openToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACeklE
|
||||
QVQ4T6WTWUiUURiG/4suurJIjUIwskQsEANDqosQpUVNKbdCSRPKrQVDMddmXEedGdcpFXNGnUYdrSzF
|
||||
sEIoFInQcqHE1CwoKsXUUMnt6Z+RLMtA8OK5OZz3Oe/5OEcAhPWwpnBaodZZmqfjWmY5GSo98XJNwq9D
|
||||
1yQIilLhFaYIMIQuxZaZJ4uy6FS1T2BUIUKdNsdPhL9pqpEp/ne18PiiE94RCjzDco0C+rs1zIzXGvkx
|
||||
pmNuRI2+XEG9NjV5NYlXuBLP0DzcQwoQaiuUTI9VrQgvfC5irjeSqrJMKovTURcmU5KbxE15HAWyGNH5
|
||||
e/BCtSab6a+a5ZMXxTD9cdAbsir/CG6Xyvj+qcRY2xBurss28lCfRYNOxr3KdPTqFHQlUspV17mVl0Cx
|
||||
Mg5VdqyxjVBZks7k+3wMtYdaJdRXKVkYksJw6kreiWuD8dAXBa8j6Krx5UqwR4WgVqUwMZAJH+Tcr1bQ
|
||||
/ki+tOnPK7wKhA5v5tvcmHnsxNsKOy6ePTohCvYKpXkSvr2RMtyWSL1OzuKgBHpClwRdwWLwNPPtHsy0
|
||||
HGGy6RCjdfuQhllzxsUs1zBMoUiZyGh3LHe02XQ+E5v0RYqC89AZwOLzk8w+Pc5U82HG6h34Um1LR9pm
|
||||
/N2scLAxsTEKVFlx9LQkcVebBQNJ8FKs+8KH2VZ3pp44Md7gyIjejo+a3fTKTZGE7MJ+j0Xj8lPOz4ih
|
||||
tjyT3gfhdOQIy7TLN9Ai20hj8iZqEsxRx1hw4+oO/F13LjraW7ouC3JSo8mRXCAjNoj4y36GyXLO14VT
|
||||
xw7gfNCO/XbW2FpZYLndjK1bTNhmarLyIa3nKxuyPwG9D9E7Fbto+QAAAABJRU5ErkJggg==
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACeUlE
|
||||
QVQ4T6WSWUiUURiG/4suurJIjUIwskQsEAMjqosQpUVNKbdCSRPKrQVDMddmXEedGdcpFXNGnUYdrSzF
|
||||
sEIoFInQcqHE1CwoKsXUUMnt6XfEye0munjgnO+c9+HjO0cA/osNi2tJLdA6SXN13MwoI12lJ06uiV8+
|
||||
W3d5IwIjVXiGKvwX11djSs2TRFlUito7ILIAoVab7SvCWhqrZYq1omXC4gpPe4Ur8AjNMQjo69IwPVZj
|
||||
4PeojtlhNfoyBXXalKSNBJ5hSjxCcnELzkeoKVcyNVq5Kjz/rZDZnggqSzOoKEpDXZBEcU4id+Sx5Mui
|
||||
RcdfmVClyWLqh8YYXhDD9MVCT/CGrBPcK5Hx62uxMdxUm2XgiT6Tep2MhxVp6NXJ6IqllKlucTc3niJl
|
||||
LKqsGINMqChOY+JTnqHtwRYJdZVK5gelMJSymo9ibSAOeiPhXTid1T5cD3IvF9SqZMb7M+CznEdVCtqe
|
||||
ypcurWz9bQC0ezHX6sr0M0c+lNtx5cKJcVGwXyjJlfDzvZSh1gTqdHIWBiTQHbIU7AwSg+eYa3Nnuvk4
|
||||
E41HGak9gDTUmvPOZjmGGRQqExjpiuG+NouOl2InvRGi4BJ0+LPw6gwzL04x2XSM0ToHvlfZ0p66FT9X
|
||||
KxxsTGwMAlVmLN3NiTzQZkJ/IrwR233tzUyLG5PPHRmrP8Sw3o4vmr30yE2RBO/Bfp9Fg/EV8tKjqSnL
|
||||
oOdxGO3ZgpE2+SaaZZtpSNpCdbw56mgLbt/YhZ/L7oVD9pYuRkF2ShTZksukxwQSd813cbJc9HHm7MnD
|
||||
OB2x46CdNbZWFljuNGP7NhN2mJqIuRX/YOXm30H4A70P0TsBWkcYAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="saveToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACMklE
|
||||
QVQ4T6WT3UuTcRTH9y90303QRbc1NYZrMRs86hzKsmFoIb09kqZpunxJUqxMxZYvkK1w6sTlahJOKvIF
|
||||
TJEUMZaSlZkrWuJQU3QiGHz7nZ+wn0vrQh84Nw98Puc553wfBQDFXorDL18EQOXuXEGHaxlPHItoafbj
|
||||
kXUW9XU/YLnnxd3yaZSWfEZR4Qfk5Y7japaHoVBwAYF9vUBd7Tq9/Oeztr4BfVIfTic95xUUuJ4tcUFl
|
||||
xa//wv7FNRw3voJSKcN0yikEjrYFLigt+bmjgDoT/NW3hDCDG4UFMzhpbBUCW+McF1w3f9km2Aq/n/Lj
|
||||
kORCTvYkEuJtQtDwwMcFmVfGQwR/w0MeH/ZrHZDlURgMViGorfnOBfKl0aBgJ7h35Bv2RTYj5cwbxMbW
|
||||
C0FV5Qx6usFOCaSeH4bp7CDfNi2MZqbPps6bcD8STa8hSRYhuFU2hS43WAaAVvtvdvdVlN+Z50ulhdHM
|
||||
GemeIByX0AmdrkIIbhRNwtkONNk2WHAC0Cdnh5TxnBnJl4t557h4Bsc4odWWCYE5b4LBQM39AO9MAgXL
|
||||
WJhawtinOUxMz0POvY0T+g4Oq6Ps0GiKhYBiaX2I4GeTgOC0/Gp89C7AO7uMazctCNfaGdyC8GOPoY7M
|
||||
F4KM9Hds7hU+80GdEweOSHjaNQB39xB6+kcw+HYM0QYTlJpGRDD4sKoBKlVOiCDx4oUBHk9KGIWE7kyn
|
||||
om3Twmhm6kpF8NGITCGgn2K39QfkKu4LIHJHnwAAAABJRU5ErkJggg==
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACPklE
|
||||
QVQ4T6WS70uTURTH9y/03jdBL3prU2O4FqvBU66hLB2GFtKvJ9Isfy3TJEXLVHT5A7QVLp20Wk3CiUb+
|
||||
AH8gJmIsJSs1l7TEoabYRDD4ds99dI9Le1MHzvPi3OfzufeeexQA/iv5p7MjAEp32xpaXat45lhGc5Mf
|
||||
j6zzqKv9BkuVF/dLZ1BU+Bn5eR+Qkz2OG9c9DN0SENjbA9TWbFDxr7G+sQl9Yi/OJL7iyUISuF6ucEF5
|
||||
2Q8q7hkE+5fXcdT4GkqlCFOCk8qSwPF0iQuKCr9TcVdsw198K4gwuJF3axanjS20JAlsjQtccNM8TcWQ
|
||||
2Am/n/LjoOBCZsYk4mJttCwJGup9XJB+bZyKwfgTHvL4EKZ1QBRHYTBY6RdJUFM9xwXi5VEq8tgL7hn5
|
||||
in3RTUg+24+YmDr6TRJUlM+iuwvsKYGUC29hOjfIu00NozvTsWlnCe5DvOkNBMEiC0qKp9DuBpsBoMX+
|
||||
i737T5TeW+RNpYbRndNSPUH4VFwbdLoyWXA7fxLO58AT2yYbnAD0SRkhaTxvRtLVAgmOZfBJJ7TaYllg
|
||||
zplgMFD9IMB3JkjBliLUAsY+LWBiZhFi9l0c17dyWH3MDo2mQBbQWFofInhsEhB8JbcSH71L8M6vIuuO
|
||||
BZFaO4ObEXnkMdTRubIgLfUdu/cahw/onNh/SMCL9gG4u4bQ3TeCweExnDCYoNQ0IorB4aoGqFSZIYL4
|
||||
SxcH+HjShNGQ0DvTU1G3qWF0Z9qVkuDDUemy4N8Tit/kKu4LI/ykxwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="saveAsToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABh0RVh0U29m
|
||||
dHdhcmUAUGFpbnQuTkVUIHYyLjY0giIQKQAAAuxJREFUOE+Vk2lIlFEUho/1x6XUSiVBgqQQosgy0VRy
|
||||
NxlcskSlQsUkcpd0bFxScy3Lbai0UMfGHJdRc5/QwEpaQFBrSEz9kUtqbqWmlYRv1+v8KPpTLxw4fPc+
|
||||
z+Xcy0f/Eze3gwQMkDgxjRCfAAQFqVb+Id7exrS6GkNpWQepIE/447m4EIiKmueLivYVamtdpZbmZWpv
|
||||
X6SmxgWqrZmlCuk0lZVOUGGBkmSyDjIzUyOFwguACPniTFSlpmdxmBXaWlfQ+GgJDQ2fUV01h3LJNIqL
|
||||
PuK2eAw5Nz4gJaUBnZ0uDE5AT48fdHS3iIFmYqd+3TgZDfXreNK5xjb8ndHxl+jqcmedCP39PjAy0ryq
|
||||
VIaSQGBPVF+3yOoL6uRraG5a2iR+y8zsLORyU9aJWIXA0NAEG2Nra2/j45OscoEqH86jtuY7ams/cWgj
|
||||
6+vsvge7mXgDToTyjSf0d+/DWb82LtDS0uc8ScpmqLRkms29Aql0bJNm6VM+Q+NNC9YJ0dvrAQdXZ9id
|
||||
6oafr1wlMOA83SuepKK7E6h4sASJZGiTZsnOy0L1FRNMFVnhpLMZEot6YOr6GGe8pH8KxIUTlHtrFK9f
|
||||
AXn5U7C0a4O5Yyf09sexjYasDLD1qAR7beUICngBgeAeF2hqqkZgT0SZGSNQtIO9BFBasob83EVkZ01D
|
||||
KBxGdNQAoiP6cP7cU7ifVsDFRawS6HGerqWOUFLiILtE4H4xEBxRjsO2DjB39kRIQjYikzPhcyENbh4d
|
||||
cBLUw94+hws0NHZxnuJF70kY+w6SMiA35xvCYuqxfaceDhxzwPJPYHxuBb7B12FlL4e1oww2JzJUgp2c
|
||||
p5jLAxQV+ZafHh47hkOOIoSLklBS04Lh0UkMjgzB0T0MR6xlMLORwtIqmQvU1XdwniLC+ig8tN85IqwH
|
||||
3j6NsHMpREBgBS5eqkRgYAn8/e/A2iYOVjbpOM5gS4sYlUCX86Srs4f9ovzbP8fY2InU1LawjugX1Iz1
|
||||
h1pVBKcAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="cCRedAlertMapToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
@@ -221,85 +393,353 @@
|
||||
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
|
||||
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
|
||||
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
|
||||
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAAN5JREFUOE+FUwEOAyEI
|
||||
8+k+7X7GoFBWmZdtISYgtS3csrXsFtvzf2Mv8/8d4Hkec2SLM+IHzJsjdwVAcxQrtl8OsDgBxPMGgKJG
|
||||
SQkwMlI2zSCS+cuL0YCceHEDAcBbM6gTQOhDDpnBxHqVOsmgdYvmfCxk7q+JpDZN4yQOJhOAOtmslGna
|
||||
MYE3AN2HeBEmyvhYZ44mL5rRXkijgoAZAA3nCVBzbzM5vuE8x8xmbGIzqE1LkNwHOO2RZmZOjQYTjoWF
|
||||
g/YYr+qn2QBQSl2ofL8oC6Wb2hIOM8WD+bXOex/mMAFDkP1eQgAAAABJRU5ErkJggg==
|
||||
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALDAAACwwBP0AiyAAAANZJREFUOE+NUAkOwyAM
|
||||
4+k8rT9jthMHyqJpSG4gPkgZa4zVYf6DCXtnJp7nWdioEp2ZtQ2QGXUkKEajTFXJ22SIPMEewCCG3NNU
|
||||
AA+xQqibD05inq8QBUio9TZzggrwNOxBoz2gABtFpMC3yWhzIvpzB1jMqtszRI+ZIdS1AWpwkyhhE/Iz
|
||||
4ATF5ySewBx74gEFVAiIL1Hud3+pvgPQKGGKbTAfHNc27wCAxC3UfwLxDtGj2ZMR8QYHYTKCNmywFp89
|
||||
gUyJIi6YP0OkKyIBpiDx3UvEeawP5jABQ7IsMkAAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="bitmapToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<data name="toolStripMenuItem1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACR0lE
|
||||
QVQ4T6WTXUiTARSGdxkRRBdB0IUREV1EKRFEYYuQAklL8sKQfphUoJSUWJbLxAVZWqyBio5WajorM1PL
|
||||
xExUlLQfbU5n0lygRerMP/qxOZ92vpjfCKLAi3P5Puc957xHA2gWUoo49147gWUqbSPrdjOXChrQm56S
|
||||
lFVFvKEcXaqV2OQiohMt7Esw+6Ro5gGeWfhbff0BY9NzDI3N0f/JS6fLy7rd6f8HcNsdOI6EYD8cjK3V
|
||||
roiLawdYu+vivwHSWcQM1THz/DQv96+ixeHlVvU71oQFAGTmP+37bdsPBf8WZ4fRFhVEXdcsBQ9srN6Z
|
||||
pjqQhQUCAmcW29JZxA8fvaWyY5YcawdBOy6oANm2H9A3MMypDLNS7b1flJnFtnQWcVmrB2NhMytD9SpA
|
||||
TiUA5+CYInQOjWPrH2V7RBzmijdo9x5VKr+yj6ImD9nmelZsS1UBcme/+OPIJIOfv/Gi201ZXQ/hMfFU
|
||||
Peuktqnbd3QN+U/cXM6tYfmW8ypAQiKdh91TTE7PYHNOYKl6z916F3m+eSNjT1B4vxHjzWoFYrhRwbLN
|
||||
51SAJOynx8vo5Ay9rimKHzu5XtJDpuU1WZY2Eg1WgrXRJOpNxKdcUyBLN6WoAInnyPh3XvW6KW/4MC9O
|
||||
z2ki+Wo1CWklROkMCiT8wEm0kXEsCTmrAiTbDtcEpTVdZOS1oDfWk5xZ6RPeQZeUR8zxK0Qe1BO65xjr
|
||||
t0YotXhjAEAeQ7It8ZSESUjkznIq2bYsTGYW29JZxIs2nFEdLOSdfwFwpvLxRKIY2AAAAABJRU5ErkJg
|
||||
gg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALOSURBVDhPfZPdS1NhHMdPWKREEhWE3fRXFBHUXS9ahnZV
|
||||
kV2UvVx5UUQXZmnLJc5ZvmRN2YVhdBGsFxqjFU4jaIavIxWNHXWbb2c7U7c8m+n2yfO00hX0gS8858fv
|
||||
931+z3N+j7SeJEn6An00f2nG2mul4kMF123XufbiGk0dTYwHx4n/iJNKT2dqYYr6z/W0DbahLCusJFaE
|
||||
dHTj7oluDG8MmB1mIlok3USJKhhdRnzffaLgf7i+umh0NKZ3Yuo0IUfkVMoa7XI7tiFb6mu1k2SSxI8E
|
||||
9q63XHpySXQojcyO0NxjSaWsoWoqe2r3kFGWgf2bPRWFaDSKFtE4Yz6NZ8KDZHbVIMf/3V3nmecZUqnE
|
||||
1sqtdIx3iFgsFmNOncM94CavMhdJv+XfJJIJtBWN+HJcSL+8hq4GNpVuIseU88ckqATxjfs4db8QqaCu
|
||||
QAR1+qf72f9oP3ste4X2WfZxoOUA2cZs0cmWu1twjDpYnF8kPBOm5EkJ0nFTHrGlmDBwB9zsMu5ie/V2
|
||||
dlTvYGf1TnbX7CazMhPptsSGWxuwdFmIhqOEJlVKHq8anDIX0jncKQxiyzFGw6N4w16hycgkLT0tZN3J
|
||||
YnP5Zp4OPIVlCAQC9Hr6KKotQjLY7nKj7YYw+Bun18m2e9vYWLaR1v5WEdPPPzE2wav2l+Qb85G8s14O
|
||||
lR3Er/pJJBJCOtPRabIrV89+U8LabdXHkVAohCzL+L1+Lj64gOlV9a9humK5TJWtSvyihYUFtEWNpfgS
|
||||
5e3l1H6qhfjqzsEg8pjM2Lcxnjuec7Ti8NpIq1GVs3VnqH9TjzavMReaIxwMoyoqISVEwB8Qbfu8Pl67
|
||||
XnOk4ggfhzrT38Ps/CznG89T3FCM0/2OweFBpv0zKH5FrJ2fnJRaS8k1HMPe8za9eD3vPe+52nyVogfn
|
||||
yDecIK88l5P38iluKqbO/pBgJLiuWJJ+AqhM3amQCvIQAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="mnuMinimapToPNG.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACR0lE
|
||||
QVQ4T6WTXUiTARSGdxkRRBdB0IUREV1EKRFEYYuQAklL8sKQfphUoJSUWJbLxAVZWqyBio5WajorM1PL
|
||||
xExUlLQfbU5n0lygRerMP/qxOZ92vpjfCKLAi3P5Puc957xHA2gWUoo49147gWUqbSPrdjOXChrQm56S
|
||||
lFVFvKEcXaqV2OQiohMt7Esw+6Ro5gGeWfhbff0BY9NzDI3N0f/JS6fLy7rd6f8HcNsdOI6EYD8cjK3V
|
||||
roiLawdYu+vivwHSWcQM1THz/DQv96+ixeHlVvU71oQFAGTmP+37bdsPBf8WZ4fRFhVEXdcsBQ9srN6Z
|
||||
pjqQhQUCAmcW29JZxA8fvaWyY5YcawdBOy6oANm2H9A3MMypDLNS7b1flJnFtnQWcVmrB2NhMytD9SpA
|
||||
TiUA5+CYInQOjWPrH2V7RBzmijdo9x5VKr+yj6ImD9nmelZsS1UBcme/+OPIJIOfv/Gi201ZXQ/hMfFU
|
||||
Peuktqnbd3QN+U/cXM6tYfmW8ypAQiKdh91TTE7PYHNOYKl6z916F3m+eSNjT1B4vxHjzWoFYrhRwbLN
|
||||
51SAJOynx8vo5Ay9rimKHzu5XtJDpuU1WZY2Eg1WgrXRJOpNxKdcUyBLN6WoAInnyPh3XvW6KW/4MC9O
|
||||
z2ki+Wo1CWklROkMCiT8wEm0kXEsCTmrAiTbDtcEpTVdZOS1oDfWk5xZ6RPeQZeUR8zxK0Qe1BO65xjr
|
||||
t0YotXhjAEAeQ7It8ZSESUjkznIq2bYsTGYW29JZxIs2nFEdLOSdfwFwpvLxRKIY2AAAAABJRU5ErkJg
|
||||
gg==
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAB+UlE
|
||||
QVQ4T6WRX0hTYRjGve0iiAq6CovsphHWRaXrogshbEIgiEzbjFLQq266WZG76I8kRIRtIZJhW2NOq5Ga
|
||||
uTkbrmZzf2gyTY8ipIwlYkJIIZP563xHZhtbF9YDz3l53vO9v/N93ykA/svKo883w5vRaZzeKV6NxOh1
|
||||
R+keimB7G8TaF6DL6afzpY+OHi/tdg9PbG5M1iF5NAOwU53WNIiyBRBfFvpmbGJeX0bk3FFsxQdgc/OP
|
||||
ZYnya30Dly+aDegdnhCBGV0ZX8+r8JwppPXIbqWXqeRGisTKmnwEVzbAPhgWgeGSw4yWHsJyfD/Gwl1K
|
||||
b3ZZwuxro8nRwE2rAU90TDl/FkBclNBT1T7aj+1VhtOA+wN36ZFsNIcMXLbrqL1VqwBOXagXr7cAz15/
|
||||
ECGvah5Wc3u8GV3/JSpM5aj1pbmADsd7EfKq7o6Oxu56Kswa1DfOojVocwHiv6aVkq/aE17F5Iyznkzx
|
||||
6YufymsXOVFVTPX1KryxAOYXrmzAY8s7EbaHVXUhtMYwLc8l1n4mFS8u/WBqfoXI9FLuDtIAMVxUE+SR
|
||||
I4W6McRJ/QAtXRJzi6vMLnwnKi3z8XMcsT4vYI/Gz9V7KXkHkxRVDnKw3ELJlX7cgThjEwnGYwlGggt/
|
||||
B4ia6TbZDzqze2nnAERjp94G/Lsp+A2CB/zdurHUfAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="fullMapRenderToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsRAAALEQF/ZF+RAAACRElE
|
||||
QVQ4T6WTXUiTcRSHdxkRRBdB0IUREV1ETSKIwoyQAsmV5IUhfaBUoJSUWJbLxAVZWixBRUcrNT8qM1PL
|
||||
hpmoKGkf2pzOpLlAi9QtndKHzfm084a9uzCKujjv1Z7n/M85v2mA/yrlk3eng8DKKWsn62YLFwob0ec8
|
||||
JimrhnhDJbGp5cQkFxOVaGZPgsmPBgi8M/y2Pn8D99Qsw+5ZBj746HL6WLMz/e8ELpsd+6FgbAe1WNts
|
||||
ClxSP8jqHef/LJDOAjNsYfrpSZ7vXUGr3ceN2jesCgsQyMzzwfJs2wHtTzg7jPbIICzdMxTes7Jye5oq
|
||||
kIXNB8vM8mzpLPD9B6+p7pwht7yToG3nVIFsew7uHxzhRIZJqY6+T8rM8mzpLHBFmxdjUQvLQ/SqQE4l
|
||||
sGPIrYCO4XGsA2NsjYjDVPWK0N2HlSqo7qe42Uu2qYFlW1JVgdx5Dn4/6mHo4xee9biosPQSHh1PzZMu
|
||||
6pt7/L/WUPDIxcW8OpZuOqsKJCQCj7gm8UxNY3VMYK55y+0GJ/n+eXUxxyi624Txeq0iMVyrYsnGM6pA
|
||||
Evbd62PMM02fc5KShw6ulvaSaX5JlrmdREM52tAoEvU5xKdcUSSLN6SoAonn6PhXXvS5qGx89wtOz20m
|
||||
+XItCWmlRMYaFEn4vuOE6uJYFHxaFUi27c4Jyuq6ychvRW9sIDmz2g/eIjYpn+ijl9Dt1xOy6whrN0co
|
||||
tXB9gED+GJJtiackTEIid5ZTybZlYTKzPFs6C7xg3SlV8O+F5gdwpvLxKZ4mxAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="mnuExport.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALTSURBVDhPdZJbbIthGMd77caFuHDhRkhwIdwhEXHIIhO2
|
||||
kDiFTIYEsYkhs5DIxIYYY6fuvAljmaHWnbANOxjbugN2ajtVrbZbv21fuyrr168/XzunCv+b932f5/n9
|
||||
87zP+6r+VoPOQa7WiLraQnaVjUtlQ1wr66auVc+Pkv+r+ImZu60Oeq3fGP8iMenxM+72obeI3Kl9S0p+
|
||||
4/9NMqpM9FvdSHKAQIAwBY+SX8bqEDmSXE7pw9fhRvm1Jro+uRUwnBz4IPDR5gqLu1wiW4/k8PzN8G+T
|
||||
vJqBsCJZ2XcP2Vm5t5K1sQ8x212huCTJ+Ka99PYb2LD/xoxBTmUPRqsYKggq6NNncBAVX8fSqCou5HUy
|
||||
6f76IwuiKPJlSiAhtZzM289RXSx4gV+WQ8lgF4MmgV2J9SyMvE/SzTY+j7kYm/Rid3qwCx48nikE5ygF
|
||||
5Q0cPHcb1anrT3+1b7RMEJ1QxfIdWjYfq2dHopbdSbVsP11NZJyGTUcrlUEKiBNjNDV3setEIar4K3VM
|
||||
+/whg1dvrSzeXsqKnRo2x9Wy5kAFS5Tzoqhi5kXkM2ddBgazA9eEg5dtOrbF5aGKPn6L98qdgwoa1bQZ
|
||||
WLbzFnPXqzmT9RLdoJ22PiuNHWaausyMCU5sVjP3NE3sSShClaxupPhRR8jgp6pb9MyPVLMgIpsiTS8+
|
||||
n0xAmZPk+4btswWbxcTJlDJS8+pnXuJYigZxyhuC/X4ptGpbDMxelcas1WkMm0bxelwKbGVwSE9TSwdb
|
||||
lL8QgoPKvNNMcnYNsiwhTc9MmoCfksc9ZJW34xQE7ApsNI7wolXH7uNqKup04b8xPqWCc9cf4By18dUz
|
||||
zpQo4HWP454YxWFT2lbu/a5/gENnC7la9Cwc/qnD5++xISady7laml91MzJiRD+sp72zl/TCx2zcn861
|
||||
koZ/w38qvbSRfadLWK+YRcTeJCaplMS0R/8AVarvzz+nF884LWEAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="exitToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMVSURBVDhPZZOLT9N3FMX7vy1ZhiKttEh5zrpWJjgjsFF0
|
||||
bGN0gmFzD7PF6AAlbDHLQghzBYuOltLW0lJmqVBaZ1sBBcOjtOIqfX12W0ic4SS//B753XPPufd8Ff9H
|
||||
bm+Pbf88kf5BQj29BL+6jP9iJ/PfXGXN8YBcOs3Br4eRz+V4Zh4n9vUV4kODJAZvEv/uB5bbO/DpGrDV
|
||||
6gkP3SafzR4mKXSOXO9jo+9n8gszsOgF8yiZH6+xefELYudaWdCfwX6iDs9nJtIvd98mWRkeYetmPzwP
|
||||
8jrg4NXwbdLyvmPqZrXVyOIHHzJTUY2v/hQ2dRWezm7I5/dJ4otLRLp7IOrnpdeGX57npChmNLL6sZFA
|
||||
7UlcJw087P0eh+40zspaLMc0REfu7BOEbgywLR1zITfRaz+xEQiSiMbwftSC44iKaW09a1MOCgjd+oUp
|
||||
VQW2ci2T+sZ9KzMt7aT++B0mRkj2XyflEf8iL/n4H9xtn7JudxaLE745/I3ncGq0RRt3VdriZhTuhrNk
|
||||
xW9u4AZxUxdPm1tZHx4lK4PNZ3PkpXjDZufvej0z0t0lFooE5VVECjZc7zeQ6Opmp8vE6idGHqqrcdXo
|
||||
2AmHi52zmQy+C59je6cEz4kanHJNHhA8kUYK55nzPG5qZqWljUDdKZzVOqKSh4z4Sy4Eye7KPbbMbEcn
|
||||
thKZiaaK+zKDcWUlkVEziqWBIZFVz5Khkfnzbaw9kBwINu5PMler48m3V8m92iW1HSfcd0sGWImlTMNd
|
||||
TQ1bjxZR/Lv+AmudAY+QhEw9ZBIJNq1TzMr63EdVuI8oCX55Sb7v8MLh5J5SzZ/vleHpMJHbO4j2iuUv
|
||||
JkrL8er0BCS6XgmOU1mBW1uHS63FXqZmVjLhPN3EWOlxxtU1bM7536Qxm0oR/vU3xkqUTMrPdimarqzG
|
||||
XlHFlKzNqhbZosZcUsadUjXLYxOHz0SB5JnVjs1wViSqJG3lTIgKixCajx5n9N1jWA1NPLdNk5PNHJS9
|
||||
jUKA0skkq/es+C5fYbq5HUfLBWYv9fLUbOH15tabM1CEQvEf0mmgVGzBvO0AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="propertiesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACCklE
|
||||
QVQ4T6WT30tTUQDHz39QD0UQSpAPIkgPyR60AiUiyoGBL4qZjOyt0tZP9tBDk1AsXIhj93ILdd27DPPH
|
||||
3VwrUrdK2ioJHAgVOdoPaQsarBg43L6ec+akuRsEPnw5D4fP5/vlXg4BQHaSf8LjjwdqaTA2cg+y1Ith
|
||||
qxmi5Tas/SYWk+QRoPgmtNsLcPq7GYX8+XoTqaUL+KR2cAmDxeBgqeBv2NhWzwUFOBk4g5/zRxB3V8Es
|
||||
38AtbzuIw/0RLMrMeyhTs2CzGdRtaOTn1dajvLkAR9VKLNvLcHmoExddzSDKzAfkcjkkEtEiOLxoQpdB
|
||||
z+Er7ScQUg/DL5TD2bsfl5oPoKWnCZ3jehDZGeAC1hwL3uXNs55Jep7Gis/AJWxyTeVe1FXvhq5qH6oP
|
||||
7nlw/NoxGByNIKPT77CezSEeD6Pn+jlEIiGk6X8N+F9zyfLYIZzUVUCwT0J36jy9yX83KjDq7zSADE8t
|
||||
cGB7kpksFt76YDzbgMWVFLzBX0WCTcku8mjiTSm8lkUslcHnH2kK/+aw6k+UCJiESE+9XCApz2Gzu5Gk
|
||||
sEVy4r6got82vRV5blVbIDyZ21rAZrPmL7w5P5s1KxQWXRFtgU15lV8ge2AbdXPY8pAuEIsXWJ6FtAVW
|
||||
+SWSmXWssuZ4vnl+s5nNFl1hMLjP8U1bMGR/wS/+N9tf7o6eMpNtADko6xybtEXLAAAAAElFTkSuQmCC
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAAB/klE
|
||||
QVQ4T6WQ30tTUQDHz39QD0UQRlAPIkgPxh6yhCRCykGBL0WZjOytLKdl7KGHJmFYtAjH7uUWy3XvMswf
|
||||
d3Ou8MdWils1ggZCRQ43lbbAwYpB4vbtnDMzrrsMw4cvB87h8/l+OQTAlqJ7ydL/7MEhGvQ9vQdZ6oLT
|
||||
boVouwV7t4XFIvkFKMGB0nB23rqeX187kPl0CR/VJi5hsBh9VBo2nzuqgdPh0/gxeRhJXwWs8g3cDDSC
|
||||
uH0fwKKMvIMyNI6/8DVTPT/bzh7RwAtqOWZdZWjpacZlbwOIMvIe+XweqdSCBo5HLLhqMnK4tfE4YmoV
|
||||
QsIeeLp240rDXpzpPIXmfiOI7AlzAYMXo3c4PO4fpOdJzAVNXMImHyzfierK7TBU7ELlvh0Pj7XXwOSu
|
||||
B+kdnsFqLo9kMo7O6xeQSMSQpZ8RDr3hktm+A6gz7IfgGoThxEX6UvgrKjAbb9eCOIemObAx6ZUcpqeC
|
||||
MJ+vRWQug0B0WSNgoZJt5MnA22L4dw6LmRV8/p6l8E8Oq6FUkYCFSC8CHJKUUThcPg7bJA/uCyq6HcPr
|
||||
kSeW9AXC84l/zXQ2a/7CmwuzWbNCYdGb0Bc4lLHCAtkPR6+Pw7bHdIGoXWB7GdMX2OXXtHkVS6w5WWie
|
||||
XGtms0VvnMN33d/0BT2uV/xhsykSbLz4v4D8ATko6xzt+1ySAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="resizeToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6
|
||||
JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAADLklE
|
||||
QVQ4T3WS60/ScRjFf39CL3rR1ovurduWbbU2t7ZqdlkXt7Lrym6O1VoXcdYqQ54wKlGxABE1CzWF0nIm
|
||||
lZcoTbyUNJFIzDJSJK+E0qy8wInvz+i2erazfd+cz3m+zw4nTS+FLOeZNim3Vp6UU5sqvf5MSZqnyjhV
|
||||
pfKUvEx54kqp8rCkWHVQVKSJPHtbs+tUgSYiOicVAMfEqfR1dVFCGSqrX94cHQeN/aXhbyD3Zz91uf3U
|
||||
9tFHTQ4fzVtH9BOQVdKcW2F6/eKkWA1zcxu6vUAQMmCzk/3AErLtDyFrrY035z16T3PXin8B5LfqZE6P
|
||||
HyZzKw5FX+Yh4XtjwZKZGV3lNPIkhhojplON3Uc3S9/Q7LDfADKtKYklMsgTkwV7joixKHQr2Nq2fSET
|
||||
5uQwqtsyjcot45R510ozV8f/2iAhsyolCNh9WIyFoRGYHbIGfYN+SVd7Nznzk8ll0FLzKxdZO3xkaOjG
|
||||
GYUxcIIfRxSlPU4N/rn1fS8JJVlU1WCT3npggVLfAIWuHjJtNRIyjIhTPEKM7D6OSop4RcXpwZ2Wl11l
|
||||
gHanmze/c36ioc8jyRlFjSzljxl2daI9Pwuv1Cnw9PRjZeQ1cCcSS68Fza6+IXL2fCG7w0ssmc3o2IR8
|
||||
gbc1PQU9NUp48sNRcUyAkPBL4AIlUbLk3gEvS6YXrW6p0dx9UZ5n4gHjzBmYAAPPYwRwazeiMXYWqjcs
|
||||
wLSVInAHRYWq0TEf9Q+NUEsg+fr9t2nF1U71leyqn+u3vPuIl2298HZ2wnxkO5q2LYOtxoKpK86D23tW
|
||||
r+7zfCVzywAVGT/QVV2LvNDo0Eo0j3mAtbUTiRnFOJ94Axp9LfIKK5Ctq0RDmw9TQuPAsW7bHYNUYLCQ
|
||||
JL2GRAqjtMDYwV+8wzUAWeY9eIfHYW0fxNodxyGWZeOSPBvzl27C5OXnwG0T5irmr79wgdWTNYyVJFL8
|
||||
kAeo8wyBA/rx2jGErBIH0nXPsWmPEHcM9YgURGPS0jMTZfiXGKDfM4Y0fVOgA/UgRQWECTpExaqxUyDF
|
||||
wuUbJjb4H0AQfxtrDqiweLMUc8LEmLEqnv9zUMzM9B1/cM83lepxTAAAAABJRU5ErkJggg==
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAH3SURBVDhPrZJfSFNxFMf3rBk+iIH2oOCTIAlZSGCQPqgIqQ/5tHQpPiikBpIpCnuxYkWCokQg
|
||||
qDcoNYZETZAhbII0dh92DdPNvJuj4f7epWa2vOvrzg/u8uqQkA4cztPn8/uee4/mv5RxgQfN2Xkbm9zc
|
||||
EpujUyY2+w0TbJ5ZBL/9sAyCx2cWMcqZYHj5Dv3PJsF/FjE8aUZrH4eWXg7Njzjoeqb+ShU4/iee7MO4
|
||||
jIB0gPsDI9B2PIYkScmORCK4Vt2iTkUvH4djhzI2fbsJeBC88EUl8Hg8aoESW1bg3zKiP2JY2/qO27pe
|
||||
VGu7k3A4HIbL5TqdYIybZ/DPXzLCuwcQt/exIkZR0dAF3rHKYhMcDAbhcDjUAoKfvzJC2ovhayL2+tYO
|
||||
hM0o+PUIbta349adDgYGAgH4/X7Y7fbTCfQvOHTqx9DY9QS19/oSL3eirK4NlwrKMD1nZqDX62UpLBaL
|
||||
WqAfeo3VjW9oevAUn/gV1Nx9iGW7wCQEp2cXsSmKIhOkTNBjMLI9lV1DoVAysvG9GWlZheCmPyIzrzy1
|
||||
gI6EvrIiIQHt7fP54Ha78WbWhAvZV5CRW5paQBd2/Fed7Mz8CmTkXMfFyzdSC+g86WU6EqfTCUEQYLPZ
|
||||
YLVaGXCyr1bq1AK6bbL+SxeXa1FS1awWnK80miNVQhp+0k4xYAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="showActorNamesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAGOSURBVDhPY/j//z9FGKsgKRirIAiHFm92CyjctB+bHDLGKgjCGa37/gcWbvzftvBaCDZ5GMYq
|
||||
6Je/XtQ3d81/35x1/23j5r7FpgaGsQq6Zaya7Zi8fLZFzML/xgH9QNznj00dCGMVdExa9sUqdqGoWdi0
|
||||
00b+ff8N/LpvYFMHwhgCrmlLE+1iF54AsU3DZ7mZhE79r+fT+U/Pp8MFXS0IYwg4Ji68ahk1WwvGNw6d
|
||||
/ApowH9dz9ZdyOpgGIXjEDdX2Sp61n/DgP4Let7tVw38+67q+fV+0fFs/a9knfNX0SpLBVk9CKNwbGNm
|
||||
bwT6e5+6fZGJik2ulaZThZWmW6OWpmvDfxWbApAhG5HVgzCcYRczg9s4ZNoXTecKUWQFIKzuWDEFaPt/
|
||||
BYsMjCgFExbh06SMgiZt13St+eoQUvoSWYGyXUmEvFnSf2WgC1RsC/4rWqR/UDBL44bJgwl9v25RoGYt
|
||||
JatMLXmTBHgAgrCSTYGoLFBMUjtQS1zTV0tSJ0hL1jgB1QBKMFZB4vF/BgBJP5kepjxMJgAAAABJRU5E
|
||||
rkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="showGridToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAFYSURBVDhPY6AqyJt9/z+UyZA1/TacHd93Cc4OaTwJZ2MAZAPSJt+Es2M6z8PZAbVHMQ0AaQTh
|
||||
7Bn3/mcAbU6fcuN/ysSr/xOBNsd2nfsf0Xr6P8hmkGafyoP/PUr3/ncp3I5pUNZUhLNBmqFMhpDm43C2
|
||||
R+luTI0wALIZykRxdmDtETjbpXAnpgEgZ2cgORukOaId5OzjQGcfBjvbDeTsgu3/7XK3/rfJ3PjfMm0d
|
||||
pkEozgZqhjJRnA3SDGViAlCAQZnA0D4MZzshOdsifS2mAfE9VyDOBoc2wtkgm0F+dsje+t86c9N/89R1
|
||||
/02TVv03jF/x3yB6KaZByKEN8jOUieJskGYoExMEITkbObSRA0wvBpvNcGfvBycSkJ8doKFtDtRskrQa
|
||||
7Gy96GX/daIW/9eKWAjGUO0IgBLa2QhnG8Uvh7OxaoQBZGdbpCJCG9nZeA0gHTAwAACOffGU2o3WzAAA
|
||||
AABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="fixOpenAreasToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAE/SURBVDhPY0ACokCsBaVhAJsYVsBvbGzsD6T/Q2l+HGI4gTwQ/wcBEA3lYxMDGQKjUQAxLpDH
|
||||
ogYFIJsOY8MwjI/uIjAABRBMEQjg8jt2cSAnC00Qp01AAJOHGQoG6IpxugCIMTRjcwEIoCvGZSgYoIcB
|
||||
NiBv6q79v3Rmwv+0Pv//EU32Xzwr9GqgcnCAbisIgMViGzz6G1cn/t9yZer/C892/e/fnfU/vF/3v3m2
|
||||
ZA9EGVAhFifCxWLanH9uvDzh/8Zrk8Dh1bMn9X//nnSQAd+B8mAAshksCaKhfLiYT7Xh/21X5oDZMLDp
|
||||
0lSQASC1YIDXBRbZ0j+7dyX9b9+VANbcvjMB7AKzLIkfQHk4wBkGJqni3cE9Gv97d6WAbQbRIL5xivhU
|
||||
iDIiANC5HUD8CeRsoM1fjJPFJzEwMDAAAD8wxIeEhxEyAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="setupDefaultPlayersMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAD0SURBVDhPY0AD/9FoogEuDaQZdCzROe5YsvOJwwnODw7EO1S7KomLQaXwArAtIM33WrNef1ra
|
||||
/f9NT/7/U/H2X9f6mXeCVRDjEpDNIM0/N876/3FS8f9byTb/Fzhp34ZK4wVg00HOBtkM0vyiKvT/1WDN
|
||||
/z3G8q/AKohxAcjPIGeDbAZpXmch9mteYfb/Gct2EhWQ/0EBBvIzyNkgm8t8A/9X10/6DwLEGoICXCKK
|
||||
/vfP2fr/2p1nJBkCUwSmHUMLwIZcv/ucJENQAMyQG3coMMQprBBsyO17T8k3xNgj+b9rZBF1DAFhqBDp
|
||||
AGQIlEkNwMAAAP7JtzLCVbRNAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="copySelectionToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAJVSURBVDhPpZPdS5NhGMZ3LKJ/gzsrHg3sIFsm5A46cC3ImmnWOy0/lrMtpdbct5tbH5Op6eZH
|
||||
6lrvtOYqTTdxrUyCTgoKlSwiAjHICAOro7VdPe+7aRSyhC64eeDhvn73/b4Xj+BvRcc8WRPDphKnUYG2
|
||||
iwxam07AY6sqsTVXZKVa0itypyeHQrD63LhZ1MxVTqolvSZZF5ke7dwKQFIt6RUYvJLD9tm3AmxvA2rO
|
||||
uO+1iv0ey6a52yIX0zMj1fJvsb02srEFB7Coy7a3/obYXjsPSLzVQlt3GNp6aXrAk4nBzEf3+oWRQA8J
|
||||
+ztIcOiq1N/rQGKpCecZMTrN9VK2x0R8XQbi7dAJh10tmSmrQPD4bl/2s7CXmR0fBI0Q4ZEOTPraMe67
|
||||
huCAA4EbbRj1tIJ1m0EBoADc6tIzbrs6CaFTc7ncvy3PAGtzfCW+zCL+OYqfn2YQ+xhCfDWyeb8yH8B1
|
||||
ayOc+hohD5hiXYVc7rx5qRnxhUboa/OhO50HrXwnWqoJjA17EV9UIfayHu8eHIW+4QgMytLkfxkbsBfe
|
||||
9lgRW5nC+sMSrE0dwPe5UhgUeyhoN3RnduHHUxnWoxJ8DRXjVX8+lBVFUJ0sTgL8bksul/nyCx/mhwqw
|
||||
eHM/PkSq8H66EsrjO/AmKMHrETEWvCLeHGrLg0ImwtmyfclP8HWbsv1uU3W7vg4ODcOXjT4gmj2/qqb2
|
||||
EJrkB3GuspifzJnV5QWM4pjodxKdZmWmU1cjvHypitgvnCIUQMwqGaEAoqmREAogFEAayosIN/kP8/9J
|
||||
IPgFAlSB3U6URz4AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripLabel1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAI3SURBVDhPpVBtT1JxHPUz9GHatDSlWfbIxEkCAQJe
|
||||
DJUIKEBEx4OkIiiKPC10QS7XyrU2KRFQUKcBEup06hfoVc1euLVe6OnvbVdN75vWi/O7+5+dh91TBuC/
|
||||
wEraS6Yta/EZuvP6I/Pqkxk2DYMLhL1kvGQvmjC1F0FsNwTDsvrbec1ZsJKWnO4gthtEcNMDXUY1z6Zh
|
||||
QB/HeidsXwzoKTxFV04L04rmKLoTxPi2D49T1I+2Wfn31rh0X/FBtM8aYCXm13svMLkbRmwnhOhOABPb
|
||||
fkS2fAhtDMO/7sZYyQXJ9AMiZwnoLujxipiPW/sKnTAuqaBfpKDNtpBvK7QZJQkYhPBNA5GzBJClYVxW
|
||||
w5mz0K26LAVNRo6OeSlUaTGUSSG8pX6o40rwondxf7wOt8O1xHpuRE1aifCmF+qFZrSlJXiUEqElKYBs
|
||||
jg/NAoXBNQcG8nb05624Eai5GNCeUCCw4YEq9adVMdeE5kQjxJ94aE/LidEG5+ce9BJwRqtOA8jSIEvD
|
||||
nNHBR/61JdlEt0pnGyD6WA9BnIs+0ip/9xC1Y9W/OCOVuDZUcRpwbPYT4yhZWpdVYaj4HO61XrgKDrpV
|
||||
mRTTrcRMm86CPtSMBCNkJFmCD0/RiY44RY/FnbgFxbQYjlULbCtdqPFeJXKWANl74UnrQN5BmxnBzQCH
|
||||
mM2wLBlQ6Sk/4RnQR/yWD8EUD42TXNS/vIN7kbqfjOD6aNVh9fCVw0p3+UGF6/JXhmfw1+PfgbLfYY/G
|
||||
d6iLJ+UAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="openRAWebsiteToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAANqSURBVDhPXZJvTNR1AIdv03KuXL2pteV8QbnVVmuU
|
||||
xESolRtJG5GxZJIgaN75h0MZZOMMwoOSIPRohAiecnceIGjHcdyheHfA8efAu+Pu4OD412FIBhThKMxJ
|
||||
29PvWJr24nn3fZ7fvt/fRwQ8QnpXapRAvcCkwJ8CdwVmBZqktpRt/z//sLha4EJQuPaTFudcK9Yb3TSP
|
||||
ddPot3DJX8MBa9KyuDXRtMeU8OQjAUF6TKBLPfItM0suxuZ9DM73o5t0YwwMo/b5UHn6qfd0Udp3giRd
|
||||
vHdnfdxTDwe01f4TBBbbGV60M7QwhHvWQ834EA2BCRSucYp7/Zzs6EM3ZKHULiNe875pJSDIkQL3pv5o
|
||||
p3nByKXbRlrmO2i56ePsyCjfD44hNbqQGuwUOIxUTpbh+kVHbFX03zHl78YFA5eNgQqcvxqpXdBz8fc+
|
||||
+ua8lLiHKHaMIm52ITGbyRiuJDMgJ2NChsZTyoXeQraeiroaDEwN/GZAPVVFyZxS+LoP+5yH9KtuxHon
|
||||
n/U5kIwfJXZUTKx/H0mDaeRey8Q2ruWtws23goGlidtW8keOIx3/nMqf26iddJJUd500i43isSukjNSw
|
||||
vzaSfedD+dC8k7SGvfRPN7FZHnZHJO1MufPjgpUcbyZpXgXnbphJrrWT3DhI/Jke0s09yLw6PlVv4bgh
|
||||
kYSKl5BoEum/qScsN/Qv0cG25Gn3bCMKXz5FE23IHZ3sUDs5rI1CqolAogojVRnKF7qPqXeUktUQR/Sp
|
||||
5zCPqHhd9tqMSBhGk87/Hc2Bao70FJDnqWOXtptDmnAa+8u57CpbEescChTmLFT2IvZrowkvXBsMtIlS
|
||||
m3dEC8NYHpwzkmU+QIYlHanJyl7hvkH5ZOthvrlyiK9MYvIMqciNEips+eyqjmTjl6LllSEl1H2gL2k/
|
||||
isF/hrz2bHJtZj6pepmL1xVoe0tQ9RRxrrtQiBzktE2OWLuNF3IeX3o+W7R2JfCRKmadMAzv1y1HsM/8
|
||||
QPVAO9tPhxBTul7418+ypfhpks9HUN6Rxx5NNCE5a+6+Intxw4MpB3mv7J11wjBMbxdFLCu7q1DaDJzt
|
||||
sKDstKIfaGRT4RPsVm0l5NiaxVdlG9ff9x4E7hNR8Ob28Lw3WjblhE4Lj7T0L7dCclbd23BsFc9ki1b/
|
||||
dx7RPxe0rmcJTZoRAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="openRAResourcesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAI6SURBVDhPfZFtSFNRHMb3TQj61pe+VIJ9mPMGldcGyYJe1I2I1qbN6HVL2EJrKGzRmsWkJGaQ
|
||||
RK8Mnc7MuVywNNmLLpNi0YtIm4X2NspkaC5LW7q1p3svbEzv1R88PJzDOT/+nMNzPX2PpXH2B2F3D6Ht
|
||||
0Qs6ZgC85cIIlsPieIICyckVJbyH/hDV3Nxoc8PzLJiSNFBbbIHDO0w1MPYlguevx+DyDTFrmuutvczl
|
||||
VCjYgvuPX1HNTTzxj5GkRBRsgc0VoHrxBNauQVxr7sVcbAGRH3OMgBSr6GNsQZNzkGo28wsJTM/EEJ6Y
|
||||
WVlw195PNfcE3ydnMRqexm1/Nyq8Rsg7L0Fm8kFZ2wJhuXE1I7h5z8MIMon9jWMy+gefx39Ca7PBMHoG
|
||||
jmgHYslZnHhzHLvMduQp6lu2yg1ZPHo8Gq4JrN4RlPaUw/DtGNp/taLntx+HOz9hj3UE2ZYK5FRpC9MC
|
||||
mmQymX64D1+jUF4NQHReglJPMdRhGY4+CGJn4wQEPj3WuqRYp1N3LxJkPlzo4xTISg/233kHUa0U+wIl
|
||||
KGp+i8LL48htUmNNxwFsqNEk0gK6l6ZY78aO+jh2N4RQ5CyBsF2DbYYIyHM+5JiV2Hha42cE9BdxJV9u
|
||||
BFk9DGHdFLbbykCa9NhSHQShHIBAZQJxqErE+tfMCBRX1m8+cutlvnYApO4UCnRdIFRe8BUW8MW6s4RE
|
||||
u4rzYmZyZXXZRNnFxk0HLwTzpMZ5/l5dn0BSIyXElVkAeP8B187ybforr3QAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="wikiDocumentationToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ4SURBVDhPpZN9SFNRGMZvBAVFUUFCQlEUUZBCnQoF
|
||||
+6CMUiwNhUap2ebEr8BKlJKZqGEl1tRELaggNrGJZraKLaOv3TWnEU3ZAnOI5JhzG24T3Bg83XPiDqIJ
|
||||
QX889+Oc9/2d533vezkA/yV2yX9gIqKkHTw53/aRZLe8I2JQxo0BklbTS45XdZMjFU/IgbKHJKGkg+2L
|
||||
yajttaCm5ysU3V9QpTaj/DGPzFuv4tLrn8cVt+lRfO81CpQvIG3sQ26DBnvyW5BY2kk4WScP2f3PCIVC
|
||||
ES0sLKCf/45Tdf3TqdU9032frAgGg39oV04jEorawQB57QaWODIygqGhIfA8D5/Ph2+2H7D/dCEcDmN4
|
||||
eBgmkwmDg4MMsP1MPYis+Tcgu/U9A9Akr9eLmZkZjI2NQavVwm63Y35+HnNzc5idncXExAQDbM5QIC73
|
||||
NjihaZDcecMA9BTqwGAwYHR0FF1dXbDZbAxgNpthNBqh1+tZibGpldghqQeX1/aBNosB6ClutxtOp5MB
|
||||
1Gp1BECduVwujI+PM8D65EvYmnkdXHbzW9osZkuskzqwWCwRQCAQiPRGp9MxwJqDJdh08ho4SZMOKQoN
|
||||
A4gOHA4HA6hUKlitVgbweDysN6KDlYkFiD1RDi7r5kscrVQxgCgaQGFTU1Pw+/3sXVyn5dH78n1SxCSX
|
||||
gUuvewZhsiBMFoi8FfF5Tdh5tgHbsmpRrtTgyt2niDl2GWsPX8SqpCKsSJBj2d4LWLo7F+sOlYJLrdYg
|
||||
p3EgqracVmBj2tWoe1SrkwrBCbO9qIPEwlbslysXdbAk/tzff5coAfBoQ0rFpPC5JoVnXbQYqqiL/y5w
|
||||
vwBd8t4lLDBzngAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="discussionForumsToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHISURBVDhPjZCxT1NRFMa7kpA4sRkSBxIGF535N0hY
|
||||
hEH+Ao27LDDQkHTWRZk0QCIMIuYShjIZSghLIUVMrS3tq21fW1773rMef+e2j4TyGhx+ee+ee77v3PMl
|
||||
5lZ2p2ENPo3gAzyHSRFJDKMGqf2Tgml6gXEjrvs0oNzwzGY6Z+h7PcpgW8V1mmvtwPxuBcZp+cZp+qbs
|
||||
dm09X2mpwfuRBjpVxZWB6KrRNcV6xxRqHXu+z2Cn2QlMlcnaXEJ8cFr89vJNujaf/BougH7p86E+oADL
|
||||
MK0GG1WEftizYp386u1hg1yE1YTX9bnuQy5CLkIugnZTDRaTGxmTyVVM8Kdneba6F6qY/YXVhFyEXIRc
|
||||
hFfaOmupwbndg58Z+KiJfznK676hTlUxuVgRuQivE3Kx51sGA5N3exkr3oUWuQi52GZWuxHnq56U+P9V
|
||||
bavBZSQegx34DFNwRS7SDXu3xPqKCnXykh/lphpkI4MJWIJHg/PK2taxnHx3hEwsavbTactFyZX1/ayK
|
||||
PXhxs8IwXM6C63q+kIsK/kIOTiEFD7QvVhxB0xm5qLgLT+J67hQiEIyDCx14GtejxBYVRA9hCx7H3UfE
|
||||
Fv8fSfwDwZ8JlGSjAbkAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="sourceCodeToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAF+SURBVDhPrZDLSkJRGIWPiagPVO9QbxE1aWqjgkZNwmpQ
|
||||
3lIkSI0wzcCo0MiiC6RdLFSQog5aKOaFtMQ0deX+PaJZBx204OfsffZaH2tv7t/kPonir3H5wrB7grDt
|
||||
+NnMC/bfYuZuyVfk4NM8rc2OYwyNjItDto8iZGRSGpXgMzw4LUdrJp3NA+95uAVZEGJtOQ7uyBjPxSHR
|
||||
SiAzyMAZOfifAvRfY9mncGuEWFsbe1dkVBgVkOqleC2kCcTWTF/VGkFaICHWltV9QcZaHRQa0A0QoFPF
|
||||
UoUAg8Nj4gDWQKKTwHntIghTvV6ncCpbFAesuk7JzMTufxO7FXZAuVJFLl9CLJkXB5jsPsH+U9XGnQrF
|
||||
MhLpD9zHcuIA/bqXAuZNHzRru5gzODGzaIFq1oSJ6SWMTqoRekiLA9hBt9jLv71/4jlVQJTP4jKS7A1g
|
||||
DZapwVajgbXZYKrRQKXGWfClvwbs0TofLvKYgT+UwGEg1hvAvr1GFMAO+p1miuO+Ab7ZFVkV6pPjAAAA
|
||||
AElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="issueTrackerToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAALnSURBVDhPdZDrL1txGMf3D+z13oqOUavSlp621Gq2
|
||||
F7NiLhuZ2yRkExLDlNnMvSN0iE3EMKZza11Kx2hdasssWUhGsmwum5Bt6jI2jiLx3TlEU5u9+Jzf8+T3
|
||||
+36f831OAPgvHj1CeHQLJHTt3sb3d1O5bv395kgj6RcxLHuxhoB7O18Tq/CxFjW7RAtf8H5Z3tMcac7R
|
||||
E7WC5MPeTc03iVpcV2IeXFT65Qu3hNXcveDbogJLjbmgEXcRa+6dhImu3VXEurDJBQIlD4I6HjIMiTDM
|
||||
tyO1KALSaM6dQ80RAyqnxK3VFeJmYs1bdQHqyRr0fmyAYiQPrEd2iOjxRctoBZyLz8KpwAGOeUxqaiex
|
||||
TuU0Z6dy7nkoBWgaK0Huqyika4KRoomEuIIAq8AeUQ3X4OVnO3X4ns65Q+WEsNGlXqwkjFfVflC+L0am
|
||||
NhxJal+EPfdEfmcQJoZuoWqwEI459hCF2LSbDeiPoIH3lqjjgqjhQjVejozuUCSqfBBWJ0F4oy8+9Edi
|
||||
ZaoV+r44sDKYYKbZbtin2MSbDWiIp1xTSLM/inTxSGiRIrTWE4H1l9HbH48lag+7G9OY6AiCTzYbdkmn
|
||||
984kMGAbZ30gpuE/5mzeVEehdECGsGdeCKj1RmV3IsbbrsC01A3TNwVWZ7SofSKGNNXhFK1hxFjdMxsI
|
||||
y1zknCIWsrUyBNZIUdyVhrZGKZY/qWCaz4bhIRc7KyqM15zfG6uSBBzqzAY0XDl7mJFsheqhclSqovBF
|
||||
n45tYz3I6RswyJ2xNSfD2uxL6EqIxXelxMl/DGgc05nDnLsO0NVewk9qcVtfk7H5OfiAqTAqSgnmhsvQ
|
||||
kcsuOdaAJkvOHZ0zKLD9o2J/+ubUdSoCZ/8kZ2NBfu+EIYe1OJzlwDzWgPq9BXJ5BturepiM1A6MrRao
|
||||
sft7EgujDRhIt2091uBNIWf5tdyJHMljk9Qksj+Tib4MewzetyMpEalPsyH1MgapS7Ee+QMga508U1fU
|
||||
1wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="developerBountiesToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJ8SURBVDhPhZLLT1NBGMW70K2JS7cmxrjU+A9oIGIg
|
||||
FGhEUYkYRYIYaiyCUPqgD2p42hb6BkqLoKUWegt9UKm0JQrSGjdaQErRmLhzY4pE0OPcIRBKfSzO5M7M
|
||||
/Z3vzDfDAfBftUdb06oZ2aE/7WUt7FdbRJE2x3VQhqQQBxqzTDIm+/UwLE+b4j3wffLAsKBFs68Bdczd
|
||||
DJMMYK9I5LQxxsIMHCt2eNfGoXnZAYG7FjWjt3ZNskBWrS9a0oaYFr6Pbjz9YIdt0YyGCQEmUmPoiKpQ
|
||||
7ajE9aFyapIFK0OStH5BAy+B26JKKMNSWBNGDCQMeLw0ACblREtQhKvWS+tZBvJp8brutZrEdSP5bQkb
|
||||
W98x8nYIihnxNrzqhDQoxOWB0s0dhg7a+a5jsueiH73zj+hZ2yJKCusjvUh9TUIVkcG9OgrJlJCtjPLB
|
||||
Mly08A5QA+18p0hGIvXMdVP4ybKNxJbQyiws90u34UATWxlzX2bR7H+AEmOhghqwkbRzXZgkDRpZHqRn
|
||||
7X+vh5zEVoVlGE+OQhRoRJXrBoVnP4cRWguAZ+LivCb3MEcxLbESwfJGD0/qGeo8fPS908G+2EdgB61W
|
||||
P3WPwFFMLjOo9VdvlPWXIk+dK8jpPnOKowhJjrAp2EeiX1DTuLaEZRsma5XOCjCLLqhn21GkLwgU9OSp
|
||||
89Q5RzOa2OS9b7bGLRAwfGhedWJsxQGhtx4XzMUQEhOeqSjJ1eWfzdeeO7EDZhjUMfzjLcHmreCqD3ec
|
||||
VSCGKDYU/iKd9vOM3Kb90F7RodZ1+yB5XWOVwxU/+a4aNupmqaXkNOn0btS/affj5nDFyWu2KzFyVfl7
|
||||
f/i3wPkNOLzMGxqYvkUAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="aboutToolStripMenuItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJnSURBVDhPbZLtS1NxFMfvf9F/EARBEEFEQdCrXgRGvTMM
|
||||
ClN8URBYkaDUC31RCCZFkj3YnGhmpuh0s+FS51Nr6iLnfMB0W27uSe/udrfr7vp0vdtQs8+Ly+X7Pef8
|
||||
Ducc4V98YYXhHyJ9DoneaYnu8Qg2Z4DNaIJ8yGH+AGNuEeNoBPuKzFJAYS2kshqQ+er0Yuibo2NgFjm9
|
||||
c7BIVss0O2N0TkZQtSIFtpMqW8mM/i8m0rQPOKlu7EeUUnsFHIvbNPZ59aACgajMmduTnCr7Qjgm5VV4
|
||||
0zVGbZOZ1G4HybTKq/4Vrb2tvJ1jJ5Ol1jBPbYuLtJJ7PUeasmoDo45lhG/uEPWt3/PGHhshmbnlMP5w
|
||||
PK9oBRVF+6aw2Bzce9qN0GNb4vkHR87dx+eRX5wosVBUadUmnWtbzaioaQmPe5HSqvcIQ1PrvPw4o5v7
|
||||
cXiCnC4e5fzNQXzhmK5lsyqppIh/bZXymlYEu2uDeqNDM3aXtcfcSohz16xcLDcR3BJ1LaOqSGIEj2eB
|
||||
Gw9bEJa9UeqaR/QB7ce9HuXsFQuXSk1IiqxrcUlCjm9ittq5VW1E2E1q6pzCYl/UAwpM/Axx5GQnRy+0
|
||||
4YvmhhYNbyKLfipq3vG6azy36xXt9UcvLIjJlB60S9ugh2NFbRy/bOCTdUGbltZ6Kkh79xDXH7QQ207u
|
||||
HcqUa50nzWb8waCWukNWkUgoMRKJCFI0iBL302sa5uqdJmbmvYfvfNbto6qhh5qGLqadLlLSb7Yja9hG
|
||||
J7hfZ+RuXScz7v8kFghpO+0wOah43E5x5VtKtBarn/UyPOU5eNOCIPwFCBKiGq2sGKsAAAAASUVORK5C
|
||||
YII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>313, 17</value>
|
||||
</metadata>
|
||||
<data name="toolStripStatusLabelMousePosition.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAFNSURBVDhPxZDNSgJhGIW9hSCCbqRFl2B0CUKLoJWLQFoGCUKbVkURFlTQj9li6MckE81FgUqk
|
||||
iUhWlP0Yk43ZjOOYzpzGz28ammwUNz1wePngPec7vBYDoLNr/iegYdLUwPheaTN/oJm6hgTsRjK4eeS+
|
||||
lc0VkLx6xszyHjdin3T19vX3kO0WkAAmnIYRoSxhcTOAcedCyTE1N022/8IbSFCbDl+uwOFawoB1lIiu
|
||||
/oIcZuMgRm06igLcPrBwe4IYsk2Y32qVOaU2nVpNBleqwB9JwmoSQBq4vWFqayKr3/NiFU8sj/3QhWkA
|
||||
YX79iFqbSNU62KKI61wRzPF5+waza4fUCtRlGe+8hPt8CZfZV+z44+0baAGKWl2UPvFSEJC5e0M0lceW
|
||||
euCOGnwIIiLRNIJnKfhOEqS6xxeDezvUWQOb3UkWW2lweIwGWCxff/dVb00F4NUAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>45</value>
|
||||
</metadata>
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace OpenRA.Editor
|
||||
// {"scrate","crate"},
|
||||
};
|
||||
|
||||
// todo: fix this -- will have bitrotted pretty badly.
|
||||
// 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))},
|
||||
@@ -174,10 +174,10 @@ namespace OpenRA.Editor
|
||||
// Add waypoint actors
|
||||
foreach( var kv in wps )
|
||||
{
|
||||
var a = new ActorReference("mpspawn");
|
||||
a.Add(new LocationInit(kv.Second));
|
||||
var a = new ActorReference("waypoint");
|
||||
a.Add(new LocationInit((CPos)kv.Second));
|
||||
a.Add(new OwnerInit("Neutral"));
|
||||
Map.Actors.Value.Add("spawn" + kv.First, a);
|
||||
Map.Actors.Value.Add("waypoint" + kv.First, a);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -189,27 +189,27 @@ namespace OpenRA.Editor
|
||||
|
||||
static MemoryStream ReadPackedSection(IniSection mapPackSection)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var sb = new StringBuilder();
|
||||
for (int i = 1; ; i++)
|
||||
{
|
||||
string line = mapPackSection.GetValue(i.ToString(), null);
|
||||
var 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));
|
||||
var data = Convert.FromBase64String(sb.ToString());
|
||||
var chunks = new List<byte[]>();
|
||||
var 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);
|
||||
var length = reader.ReadUInt32() & 0xdfffffff;
|
||||
var dest = new byte[8192];
|
||||
var src = reader.ReadBytes((int)length);
|
||||
|
||||
/*int actualLength =*/
|
||||
Format80.DecodeInto(src, dest);
|
||||
@@ -219,8 +219,8 @@ namespace OpenRA.Editor
|
||||
}
|
||||
catch (EndOfStreamException) { }
|
||||
|
||||
MemoryStream ms = new MemoryStream();
|
||||
foreach (byte[] chunk in chunks)
|
||||
var ms = new MemoryStream();
|
||||
foreach (var chunk in chunks)
|
||||
ms.Write(chunk, 0, chunk.Length);
|
||||
|
||||
ms.Position = 0;
|
||||
@@ -276,7 +276,7 @@ namespace OpenRA.Editor
|
||||
Map.Actors.Value.Add("Actor" + ActorCount++,
|
||||
new ActorReference(overlayActorMapping[raOverlayNames[o]])
|
||||
{
|
||||
new LocationInit( new int2(i, j) ),
|
||||
new LocationInit( new CPos(i, j) ),
|
||||
new OwnerInit( "Neutral" )
|
||||
});
|
||||
}
|
||||
@@ -284,7 +284,7 @@ namespace OpenRA.Editor
|
||||
|
||||
void ReadRATrees(IniFile file)
|
||||
{
|
||||
IniSection terrain = file.GetSection("TERRAIN", true);
|
||||
var terrain = file.GetSection("TERRAIN", true);
|
||||
if (terrain == null)
|
||||
return;
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace OpenRA.Editor
|
||||
Map.Actors.Value.Add("Actor" + ActorCount++,
|
||||
new ActorReference(kv.Value.ToLowerInvariant())
|
||||
{
|
||||
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
|
||||
new LocationInit(new CPos(loc % MapSize, loc / MapSize)),
|
||||
new OwnerInit("Neutral")
|
||||
});
|
||||
}
|
||||
@@ -316,14 +316,14 @@ namespace OpenRA.Editor
|
||||
|
||||
void ReadCncOverlay(IniFile file)
|
||||
{
|
||||
IniSection overlay = file.GetSection("OVERLAY", true);
|
||||
var overlay = file.GetSection("OVERLAY", true);
|
||||
if (overlay == null)
|
||||
return;
|
||||
|
||||
foreach (KeyValuePair<string, string> kv in overlay)
|
||||
{
|
||||
var loc = int.Parse(kv.Key);
|
||||
int2 cell = new int2(loc % MapSize, loc / MapSize);
|
||||
var cell = new CPos(loc % MapSize, loc / MapSize);
|
||||
|
||||
var res = Pair.New((byte)0, (byte)0);
|
||||
if (overlayResourceMapping.ContainsKey(kv.Value.ToLower()))
|
||||
@@ -343,7 +343,7 @@ namespace OpenRA.Editor
|
||||
|
||||
void ReadCncTrees(IniFile file)
|
||||
{
|
||||
IniSection terrain = file.GetSection("TERRAIN", true);
|
||||
var terrain = file.GetSection("TERRAIN", true);
|
||||
if (terrain == null)
|
||||
return;
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace OpenRA.Editor
|
||||
Map.Actors.Value.Add("Actor" + ActorCount++,
|
||||
new ActorReference(kv.Value.Split(',')[0].ToLowerInvariant())
|
||||
{
|
||||
new LocationInit(new int2(loc % MapSize, loc / MapSize)),
|
||||
new LocationInit(new CPos(loc % MapSize, loc / MapSize)),
|
||||
new OwnerInit("Neutral")
|
||||
});
|
||||
}
|
||||
@@ -375,13 +375,12 @@ namespace OpenRA.Editor
|
||||
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 int2(loc % MapSize, loc / MapSize)),
|
||||
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])),
|
||||
@@ -415,8 +414,51 @@ namespace OpenRA.Editor
|
||||
|
||||
void LoadPlayer(IniFile file, string section, bool isRA)
|
||||
{
|
||||
var c = section == "BadGuy" ? "red" :
|
||||
isRA ? "blue" : "gold";
|
||||
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];
|
||||
|
||||
@@ -425,7 +467,7 @@ namespace OpenRA.Editor
|
||||
Name = section,
|
||||
OwnsWorld = section == "Neutral",
|
||||
NonCombatant = section == "Neutral",
|
||||
Race = isRA ? (section == "BadGuy" ? "soviet" : "allies") : (section == "BadGuy" ? "nod" : "gdi"),
|
||||
Race = race,
|
||||
ColorRamp = new ColorRamp(
|
||||
(byte)((color.First.GetHue() / 360.0f) * 255),
|
||||
(byte)(color.First.GetSaturation() * 255),
|
||||
@@ -433,7 +475,7 @@ namespace OpenRA.Editor
|
||||
(byte)(color.Second.GetBrightness() * 255))
|
||||
};
|
||||
|
||||
var Neutral = new [] {"Neutral"};
|
||||
var neutral = new [] {"Neutral"};
|
||||
foreach (var s in file.GetSection(section, true))
|
||||
{
|
||||
Console.WriteLine(s.Key);
|
||||
@@ -443,8 +485,8 @@ namespace OpenRA.Editor
|
||||
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();
|
||||
pr.Allies = s.Value.Split(',').Intersect(Players).Except(neutral).ToArray();
|
||||
pr.Enemies = s.Value.Split(',').SymmetricDifference(Players).Except(neutral).ToArray();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
13
OpenRA.Editor/MapSelect.Designer.cs
generated
13
OpenRA.Editor/MapSelect.Designer.cs
generated
@@ -12,15 +12,10 @@ namespace OpenRA.Editor
|
||||
{
|
||||
partial class MapSelect
|
||||
{
|
||||
/// <summary>
|
||||
/// TODO
|
||||
/// </summary>
|
||||
// TODO:
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// TODO
|
||||
/// </summary>
|
||||
/// <param name="disposing">TODO</param>
|
||||
// TODO:
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
@@ -32,9 +27,7 @@ namespace OpenRA.Editor
|
||||
|
||||
#region Код, автоматически созданный конструктором форм Windows
|
||||
|
||||
/// <summary>
|
||||
/// TODO
|
||||
/// </summary>
|
||||
// TODO:
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
|
||||
@@ -20,11 +20,19 @@ namespace OpenRA.Editor
|
||||
{
|
||||
public string MapFolderPath;
|
||||
|
||||
public bool DirectoryIsEmpty(string path)
|
||||
{
|
||||
return !Directory.GetFileSystemEntries(path).Any();
|
||||
}
|
||||
|
||||
public MapSelect(string currentMod)
|
||||
{
|
||||
MapFolderPath = new string[] { Environment.CurrentDirectory, "mods", currentMod, "maps" }
|
||||
MapFolderPath = new string[] { Platform.SupportDir, "maps", currentMod }
|
||||
.Aggregate(Path.Combine);
|
||||
|
||||
if (!Directory.Exists(MapFolderPath))
|
||||
Directory.CreateDirectory(MapFolderPath);
|
||||
|
||||
InitializeComponent();
|
||||
MapIconsList.Images.Add(pictureBox1.Image);
|
||||
}
|
||||
@@ -34,6 +42,9 @@ namespace OpenRA.Editor
|
||||
MapList.Items.Clear();
|
||||
txtPathOut.Text = MapFolderPath;
|
||||
|
||||
if (DirectoryIsEmpty(MapFolderPath))
|
||||
return;
|
||||
|
||||
foreach (var map in ModData.FindMapsIn(MapFolderPath))
|
||||
{
|
||||
ListViewItem map1 = new ListViewItem();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<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>
|
||||
@@ -13,6 +13,25 @@
|
||||
<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>
|
||||
@@ -25,6 +44,7 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@@ -35,6 +55,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@@ -98,6 +119,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="ActorPropertiesDialog.resx">
|
||||
<DependentUpon>ActorPropertiesDialog.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
@@ -122,6 +144,7 @@
|
||||
<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>
|
||||
@@ -157,6 +180,23 @@
|
||||
<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.
|
||||
|
||||
114
OpenRA.Editor/Properties/Resources.Designer.cs
generated
114
OpenRA.Editor/Properties/Resources.Designer.cs
generated
@@ -1,71 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
// 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
|
||||
{
|
||||
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
36
OpenRA.Editor/Properties/Settings.Designer.cs
generated
36
OpenRA.Editor/Properties/Settings.Designer.cs
generated
@@ -1,30 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:2.0.50727.4927
|
||||
// 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", "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;
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Editor
|
||||
|
||||
bitmap.Palette = p.AsSystemPalette();
|
||||
|
||||
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var data = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
||||
|
||||
unsafe
|
||||
@@ -84,7 +84,7 @@ namespace OpenRA.Editor
|
||||
|
||||
var bitmap = new Bitmap(shp.Width, shp.Height, PixelFormat.Format8bppIndexed);
|
||||
bitmap.Palette = p.AsSystemPalette();
|
||||
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var data = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
||||
|
||||
unsafe
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace OpenRA.Editor
|
||||
public Map Map { get; private set; }
|
||||
public TileSet TileSet { get; private set; }
|
||||
public Palette Palette { get; private set; }
|
||||
public Palette PlayerPalette { get; private set; }
|
||||
public int2 Offset;
|
||||
|
||||
public int2 GetOffset() { return Offset; }
|
||||
@@ -38,6 +39,12 @@ namespace OpenRA.Editor
|
||||
public bool ShowActorNames;
|
||||
public bool ShowGrid;
|
||||
|
||||
public bool IsPaste { get { return TileSelection != null && ResourceSelection != null; } }
|
||||
public TileReference<ushort, byte>[,] TileSelection;
|
||||
public TileReference<byte, byte>[,] ResourceSelection;
|
||||
public CPos SelectionStart;
|
||||
public CPos SelectionEnd;
|
||||
|
||||
public string NewActorOwner;
|
||||
|
||||
public event Action AfterChange = () => { };
|
||||
@@ -49,17 +56,18 @@ namespace OpenRA.Editor
|
||||
|
||||
public Keys GetModifiers() { return ModifierKeys; }
|
||||
|
||||
public void Bind(Map m, TileSet ts, Palette p)
|
||||
public void Bind(Map m, TileSet ts, Palette p, Palette pp)
|
||||
{
|
||||
Map = m;
|
||||
TileSet = ts;
|
||||
Palette = p;
|
||||
PlayerPalette = pp;
|
||||
PlayerPalettes = null;
|
||||
Chunks.Clear();
|
||||
Tool = null;
|
||||
}
|
||||
|
||||
public void SetTool(ITool tool) { Tool = tool; }
|
||||
public void SetTool(ITool tool) { Tool = tool; ClearSelection(); }
|
||||
|
||||
public void BindActorTemplates(IEnumerable<ActorTemplate> templates)
|
||||
{
|
||||
@@ -83,6 +91,8 @@ namespace OpenRA.Editor
|
||||
UpdateStyles();
|
||||
}
|
||||
|
||||
static readonly Pen SelectionPen = new Pen(Color.Blue);
|
||||
static readonly Pen PastePen = new Pen(Color.Green);
|
||||
static readonly Pen CordonPen = new Pen(Color.Red);
|
||||
int2 MousePos;
|
||||
|
||||
@@ -157,23 +167,23 @@ namespace OpenRA.Editor
|
||||
void Erase()
|
||||
{
|
||||
// Crash preventing
|
||||
var BrushLocation = GetBrushLocation();
|
||||
var brushLocation = GetBrushLocation();
|
||||
|
||||
if (Map == null || BrushLocation.X >= Map.MapSize.X ||
|
||||
BrushLocation.Y >= Map.MapSize.Y ||
|
||||
BrushLocation.X < 0 ||
|
||||
BrushLocation.Y < 0)
|
||||
if (Map == null || brushLocation.X >= Map.MapSize.X ||
|
||||
brushLocation.Y >= Map.MapSize.Y ||
|
||||
brushLocation.X < 0 ||
|
||||
brushLocation.Y < 0)
|
||||
return;
|
||||
|
||||
Tool = null;
|
||||
|
||||
var key = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == BrushLocation);
|
||||
var key = Map.Actors.Value.FirstOrDefault(a => a.Value.Location() == brushLocation);
|
||||
if (key.Key != null) Map.Actors.Value.Remove(key.Key);
|
||||
|
||||
if (Map.MapResources.Value[BrushLocation.X, BrushLocation.Y].type != 0)
|
||||
if (Map.MapResources.Value[brushLocation.X, brushLocation.Y].type != 0)
|
||||
{
|
||||
Map.MapResources.Value[BrushLocation.X, BrushLocation.Y] = new TileReference<byte, byte>();
|
||||
var ch = new int2((BrushLocation.X) / ChunkSize, (BrushLocation.Y) / ChunkSize);
|
||||
Map.MapResources.Value[brushLocation.X, brushLocation.Y] = new TileReference<byte, byte>();
|
||||
var ch = new int2((brushLocation.X) / ChunkSize, (brushLocation.Y) / ChunkSize);
|
||||
if (Chunks.ContainsKey(ch))
|
||||
{
|
||||
Chunks[ch].Dispose();
|
||||
@@ -182,12 +192,20 @@ namespace OpenRA.Editor
|
||||
}
|
||||
|
||||
AfterChange();
|
||||
ClearSelection();
|
||||
}
|
||||
|
||||
void Draw()
|
||||
{
|
||||
if (Tool != null) Tool.Apply(this);
|
||||
AfterChange();
|
||||
if (Tool != null)
|
||||
{
|
||||
Tool.Apply(this);
|
||||
AfterChange();
|
||||
}
|
||||
else if (IsPaste)
|
||||
PasteSelection();
|
||||
else
|
||||
SelectionEnd = GetBrushLocationBR();
|
||||
}
|
||||
|
||||
protected override void OnMouseDown(MouseEventArgs e)
|
||||
@@ -199,7 +217,12 @@ namespace OpenRA.Editor
|
||||
if (!IsPanning)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right) Erase();
|
||||
if (e.Button == MouseButtons.Left) Draw();
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
Draw();
|
||||
if (!IsPaste)
|
||||
SelectionStart = SelectionEnd = GetBrushLocation();
|
||||
}
|
||||
}
|
||||
|
||||
Invalidate();
|
||||
@@ -212,7 +235,7 @@ namespace OpenRA.Editor
|
||||
|
||||
var bitmap = new Bitmap(ChunkSize * TileSet.TileSize, ChunkSize * TileSet.TileSize);
|
||||
|
||||
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var data = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
unsafe
|
||||
@@ -234,7 +257,7 @@ namespace OpenRA.Editor
|
||||
if (Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].type != 0)
|
||||
{
|
||||
var resourceImage = ResourceTemplates[Map.MapResources.Value[u * ChunkSize + i, v * ChunkSize + j].type].Bitmap;
|
||||
var srcdata = resourceImage.LockBits(new Rectangle(0, 0, resourceImage.Width, resourceImage.Height),
|
||||
var srcdata = resourceImage.LockBits(resourceImage.Bounds(),
|
||||
ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
|
||||
|
||||
int* q = (int*)srcdata.Scan0.ToPointer();
|
||||
@@ -267,31 +290,42 @@ namespace OpenRA.Editor
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public int2 GetBrushLocation()
|
||||
public CPos GetBrushLocation()
|
||||
{
|
||||
var vX = (int)Math.Floor((MousePos.X - Offset.X) / Zoom);
|
||||
var vY = (int)Math.Floor((MousePos.Y - Offset.Y) / Zoom);
|
||||
return new int2(vX / TileSet.TileSize, vY / TileSet.TileSize);
|
||||
return new CPos(vX / TileSet.TileSize, vY / TileSet.TileSize);
|
||||
}
|
||||
|
||||
public void DrawActor(SGraphics g, int2 p, ActorTemplate t, ColorPalette cp)
|
||||
public CPos GetBrushLocationBR()
|
||||
{
|
||||
var vX = (int)Math.Floor((MousePos.X - Offset.X) / Zoom);
|
||||
var vY = (int)Math.Floor((MousePos.Y - Offset.Y) / Zoom);
|
||||
return new CPos((vX + TileSet.TileSize - 1) / TileSet.TileSize,
|
||||
(vY + TileSet.TileSize - 1) / TileSet.TileSize);
|
||||
}
|
||||
|
||||
public void DrawActor(SGraphics g, CPos p, ActorTemplate t, ColorPalette cp)
|
||||
{
|
||||
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
|
||||
DrawImage(g, t.Bitmap, p, centered, cp);
|
||||
var actorPalette = cp;
|
||||
if (t.Appearance != null && t.Appearance.UseTerrainPalette)
|
||||
actorPalette = Palette.AsSystemPalette();
|
||||
DrawImage(g, t.Bitmap, p, centered, actorPalette);
|
||||
}
|
||||
|
||||
float2 GetDrawPosition(int2 location, Bitmap bmp, bool centered)
|
||||
float2 GetDrawPosition(CPos location, Bitmap bmp, bool centered)
|
||||
{
|
||||
float OffsetX = centered ? bmp.Width / 2 - TileSet.TileSize / 2 : 0;
|
||||
float DrawX = TileSet.TileSize * location.X * Zoom + Offset.X - OffsetX;
|
||||
float offsetX = centered ? bmp.Width / 2 - TileSet.TileSize / 2 : 0;
|
||||
float drawX = TileSet.TileSize * location.X * Zoom + Offset.X - offsetX;
|
||||
|
||||
float OffsetY = centered ? bmp.Height / 2 - TileSet.TileSize / 2 : 0;
|
||||
float DrawY = TileSet.TileSize * location.Y * Zoom + Offset.Y - OffsetY;
|
||||
float offsetY = centered ? bmp.Height / 2 - TileSet.TileSize / 2 : 0;
|
||||
float drawY = TileSet.TileSize * location.Y * Zoom + Offset.Y - offsetY;
|
||||
|
||||
return new float2(DrawX, DrawY);
|
||||
return new float2(drawX, drawY);
|
||||
}
|
||||
|
||||
public void DrawImage(SGraphics g, Bitmap bmp, int2 location, bool centered, ColorPalette cp)
|
||||
public void DrawImage(SGraphics g, Bitmap bmp, CPos location, bool centered, ColorPalette cp)
|
||||
{
|
||||
var drawPos = GetDrawPosition(location, bmp, centered);
|
||||
|
||||
@@ -304,7 +338,7 @@ namespace OpenRA.Editor
|
||||
if (cp != null) bmp.Palette = restorePalette;
|
||||
}
|
||||
|
||||
void DrawActorBorder(SGraphics g, int2 p, ActorTemplate t)
|
||||
void DrawActorBorder(SGraphics g, CPos p, ActorTemplate t)
|
||||
{
|
||||
var centered = t.Appearance == null || !t.Appearance.RelativeToTopLeft;
|
||||
var drawPos = GetDrawPosition(p, t.Bitmap, centered);
|
||||
@@ -318,8 +352,8 @@ namespace OpenRA.Editor
|
||||
{
|
||||
var pr = Map.Players[name];
|
||||
var pcpi = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>();
|
||||
var remap = new PlayerColorRemap(pcpi.PaletteFormat, pr.ColorRamp);
|
||||
return new Palette(Palette, remap).AsSystemPalette();
|
||||
var remap = new PlayerColorRemap(pcpi.RemapIndex, pr.ColorRamp);
|
||||
return new Palette(PlayerPalette, remap).AsSystemPalette();
|
||||
}
|
||||
|
||||
Cache<string, ColorPalette> PlayerPalettes;
|
||||
@@ -352,7 +386,7 @@ namespace OpenRA.Editor
|
||||
var x = new int2(u / ChunkSize, v / ChunkSize);
|
||||
if (!Chunks.ContainsKey(x)) Chunks[x] = RenderChunk(u / ChunkSize, v / ChunkSize);
|
||||
|
||||
Bitmap bmp = Chunks[x];
|
||||
var bmp = Chunks[x];
|
||||
|
||||
float DrawX = TileSet.TileSize * (float)ChunkSize * (float)x.X * Zoom + Offset.X;
|
||||
float DrawY = TileSet.TileSize * (float)ChunkSize * (float)x.Y * Zoom + Offset.Y;
|
||||
@@ -367,6 +401,25 @@ namespace OpenRA.Editor
|
||||
Map.Bounds.Width * TileSet.TileSize * Zoom,
|
||||
Map.Bounds.Height * TileSet.TileSize * Zoom);
|
||||
|
||||
e.Graphics.DrawRectangle(SelectionPen,
|
||||
(SelectionStart.X * TileSet.TileSize * Zoom) + Offset.X,
|
||||
(SelectionStart.Y * TileSet.TileSize * Zoom) + Offset.Y,
|
||||
(SelectionEnd - SelectionStart).X * TileSet.TileSize * Zoom,
|
||||
(SelectionEnd - SelectionStart).Y * TileSet.TileSize * Zoom);
|
||||
|
||||
if (IsPaste)
|
||||
{
|
||||
var loc = GetBrushLocation();
|
||||
var width = Math.Abs((SelectionStart - SelectionEnd).X);
|
||||
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
|
||||
|
||||
e.Graphics.DrawRectangle(PastePen,
|
||||
(loc.X * TileSet.TileSize * Zoom) + Offset.X,
|
||||
(loc.Y * TileSet.TileSize * Zoom) + Offset.Y,
|
||||
width * (TileSet.TileSize * Zoom),
|
||||
height * (TileSet.TileSize * Zoom));
|
||||
}
|
||||
|
||||
foreach (var ar in Map.Actors.Value)
|
||||
{
|
||||
if (ActorTemplates.ContainsKey(ar.Value.Type))
|
||||
@@ -395,13 +448,74 @@ namespace OpenRA.Editor
|
||||
DrawActorBorder(e.Graphics, x.Value.Location(), ActorTemplates[x.Value.Type]);
|
||||
}
|
||||
}
|
||||
|
||||
public void CopySelection()
|
||||
{
|
||||
// Grab tiles and resources within selection (doesn't do actors)
|
||||
var start = SelectionStart;
|
||||
var end = SelectionEnd;
|
||||
|
||||
if (start == end) return;
|
||||
|
||||
int width = Math.Abs((start - end).X);
|
||||
int height = Math.Abs((start - end).Y);
|
||||
|
||||
TileSelection = new TileReference<ushort, byte>[width, height];
|
||||
ResourceSelection = new TileReference<byte, byte>[width, height];
|
||||
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
//TODO: crash prevention
|
||||
TileSelection[x, y] = Map.MapTiles.Value[start.X + x, start.Y + y];
|
||||
ResourceSelection[x, y] = Map.MapResources.Value[start.X + x, start.Y + y];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PasteSelection()
|
||||
{
|
||||
var loc = GetBrushLocation();
|
||||
var width = Math.Abs((SelectionStart - SelectionEnd).X);
|
||||
var height = Math.Abs((SelectionStart - SelectionEnd).Y);
|
||||
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
var mapX = loc.X + x;
|
||||
var mapY = loc.Y + y;
|
||||
|
||||
//TODO: crash prevention for outside of bounds
|
||||
Map.MapTiles.Value[mapX, mapY] = TileSelection[x, y];
|
||||
Map.MapResources.Value[mapX, mapY] = ResourceSelection[x, y];
|
||||
|
||||
var ch = new int2(mapX / ChunkSize, mapY / ChunkSize);
|
||||
if (Chunks.ContainsKey(ch))
|
||||
{
|
||||
Chunks[ch].Dispose();
|
||||
Chunks.Remove(ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
AfterChange();
|
||||
}
|
||||
|
||||
void ClearSelection()
|
||||
{
|
||||
SelectionStart = CPos.Zero;
|
||||
SelectionEnd = CPos.Zero;
|
||||
TileSelection = null;
|
||||
ResourceSelection = null;
|
||||
}
|
||||
}
|
||||
|
||||
static class ActorReferenceExts
|
||||
{
|
||||
public static int2 Location(this ActorReference ar)
|
||||
public static CPos Location(this ActorReference ar)
|
||||
{
|
||||
return ar.InitDict.Get<LocationInit>().value;
|
||||
return (CPos)ar.InitDict.Get<LocationInit>().value;
|
||||
}
|
||||
|
||||
public static void DrawStringContrast(this SGraphics g, Font f, string s, int x, int y, Brush fg, Brush bg)
|
||||
|
||||
@@ -21,8 +21,6 @@ namespace OpenRA.FileFormats
|
||||
H = h; S = s; L = l; R = r;
|
||||
}
|
||||
|
||||
public static readonly ColorRamp Empty = new ColorRamp(0,0,0,0);
|
||||
|
||||
/* returns a color along the Lum ramp */
|
||||
public Color GetColor( float t )
|
||||
{
|
||||
@@ -35,7 +33,7 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
|
||||
// hk is hue in the range [0,1] instead of [0,360]
|
||||
public static Color ColorFromHSL(float hk, float s, float l)
|
||||
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);
|
||||
|
||||
@@ -172,6 +172,8 @@ namespace OpenRA
|
||||
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());
|
||||
@@ -181,5 +183,83 @@ namespace OpenRA
|
||||
{
|
||||
return ts.Concat(moreTs);
|
||||
}
|
||||
|
||||
public static Dictionary<TKey, TSource> ToDictionaryWithConflictLog<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, string debugName, Func<TKey, string> logKey, Func<TSource, string> logValue)
|
||||
{
|
||||
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)); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ namespace OpenRA.FileFormats
|
||||
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 ) );
|
||||
}
|
||||
|
||||
@@ -320,6 +325,10 @@ namespace OpenRA.FileFormats
|
||||
((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;
|
||||
@@ -342,4 +351,11 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
|
||||
public class FieldFromYamlKeyAttribute : Attribute { }
|
||||
|
||||
// mirrors DescriptionAttribute from System.ComponentModel but we dont want to have to use that everywhere.
|
||||
public class DescAttribute : Attribute
|
||||
{
|
||||
public readonly string[] Lines;
|
||||
public DescAttribute(params string[] lines) { Lines = lines; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,24 +19,6 @@ namespace OpenRA.FileFormats
|
||||
{
|
||||
const string pubkeyStr = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
|
||||
|
||||
static sbyte[] char2num = {
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
|
||||
|
||||
class PublicKey
|
||||
{
|
||||
public uint[] key1 = new uint[64];
|
||||
@@ -128,25 +110,9 @@ namespace OpenRA.FileFormats
|
||||
|
||||
void init_pubkey()
|
||||
{
|
||||
int i = 0;
|
||||
uint i2, tmp;
|
||||
byte[] keytmp = new byte[256];
|
||||
|
||||
init_bignum(pubkey.key2, 0x10001, 64);
|
||||
|
||||
i2 = 0;
|
||||
while (i < pubkeyStr.Length)
|
||||
{
|
||||
tmp = (uint)char2num[pubkeyStr[i++]];
|
||||
tmp <<= 6; tmp |= (uint)(byte)char2num[pubkeyStr[i++]];
|
||||
tmp <<= 6; tmp |= (uint)(byte)char2num[pubkeyStr[i++]];
|
||||
tmp <<= 6; tmp |= (uint)(byte)char2num[pubkeyStr[i++]];
|
||||
keytmp[i2++] = (byte)((tmp >> 16) & 0xff);
|
||||
keytmp[i2++] = (byte)((tmp >> 8) & 0xff);
|
||||
keytmp[i2++] = (byte)(tmp & 0xff);
|
||||
}
|
||||
|
||||
key_to_bignum(pubkey.key1, keytmp, 64);
|
||||
key_to_bignum(pubkey.key1, Convert.FromBase64String(pubkeyStr), 64);
|
||||
pubkey.len = bitlen_bignum(pubkey.key1, 64) - 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,21 +158,20 @@ namespace OpenRA.FileFormats
|
||||
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 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))
|
||||
using (var s = FileSystem.Open(filename))
|
||||
{
|
||||
byte[] buf = new byte[s.Length];
|
||||
var buf = new byte[s.Length];
|
||||
s.Read(buf, 0, buf.Length);
|
||||
a = Assembly.Load(buf);
|
||||
assemblyCache.Add(filename, a);
|
||||
|
||||
@@ -58,7 +58,9 @@ namespace OpenRA.FileFormats
|
||||
isEncrypted = 0 != (signature & (uint)MixFileFlags.Encrypted);
|
||||
if( isEncrypted )
|
||||
{
|
||||
index = ParseRaHeader( s, out dataStart ).ToDictionary(x => x.Hash);
|
||||
index = ParseRaHeader(s, out dataStart).ToDictionaryWithConflictLog(x => x.Hash,
|
||||
"MixFile.RaHeader", null, x => "(offs={0}, len={1})".F(x.Offset, x.Length)
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -66,7 +68,9 @@ namespace OpenRA.FileFormats
|
||||
s.Seek( 0, SeekOrigin.Begin );
|
||||
|
||||
isEncrypted = false;
|
||||
index = ParseTdHeader(s, out dataStart).ToDictionary(x => x.Hash);
|
||||
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;
|
||||
|
||||
@@ -40,7 +40,6 @@ namespace OpenRA.FileFormats.Graphics
|
||||
IShader CreateShader( string name );
|
||||
|
||||
Size WindowSize { get; }
|
||||
int GpuMemoryUsed { get; }
|
||||
|
||||
void Clear();
|
||||
void Present();
|
||||
@@ -61,9 +60,9 @@ namespace OpenRA.FileFormats.Graphics
|
||||
|
||||
public interface IShader
|
||||
{
|
||||
void SetValue( string name, float x, float y );
|
||||
void SetValue( string param, ITexture texture );
|
||||
void Render( Action a );
|
||||
void SetVec(string name, float x, float y);
|
||||
void SetTexture(string param, ITexture texture);
|
||||
void Render(Action a);
|
||||
}
|
||||
|
||||
public interface ITexture
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace OpenRA.FileFormats.Graphics
|
||||
|
||||
case "IEND":
|
||||
{
|
||||
var bits = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var bits = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
||||
|
||||
using (var ns = new MemoryStream(data.ToArray()))
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
@@ -30,9 +30,9 @@ namespace OpenRA.FileFormats
|
||||
|
||||
public ImageHeader( BinaryReader reader )
|
||||
{
|
||||
Offset = reader.ReadUInt32();
|
||||
Format = (Format)( Offset >> 24 );
|
||||
Offset &= 0xFFFFFF;
|
||||
var data = reader.ReadUInt32();
|
||||
Offset = data & 0xffffff;
|
||||
Format = (Format)(data >> 24);
|
||||
|
||||
RefOffset = reader.ReadUInt16();
|
||||
RefFormat = (Format)reader.ReadUInt16();
|
||||
@@ -48,14 +48,9 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
}
|
||||
|
||||
public enum Format
|
||||
{
|
||||
Format20 = 0x20,
|
||||
Format40 = 0x40,
|
||||
Format80 = 0x80,
|
||||
}
|
||||
public enum Format { Format20 = 0x20, Format40 = 0x40, Format80 = 0x80 }
|
||||
|
||||
public class ShpReader : IEnumerable<ImageHeader>
|
||||
public class ShpReader
|
||||
{
|
||||
public readonly int ImageCount;
|
||||
public readonly ushort Width;
|
||||
@@ -69,40 +64,37 @@ namespace OpenRA.FileFormats
|
||||
|
||||
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++ )
|
||||
using( var reader = new BinaryReader( stream ) )
|
||||
{
|
||||
ImageHeader h = headers[ i ];
|
||||
if( h.Format == Format.Format20 )
|
||||
h.RefImage = headers[ i - 1 ];
|
||||
ImageCount = reader.ReadUInt16();
|
||||
reader.ReadUInt16();
|
||||
reader.ReadUInt16();
|
||||
Width = reader.ReadUInt16();
|
||||
Height = reader.ReadUInt16();
|
||||
reader.ReadUInt32();
|
||||
|
||||
else if( h.Format == Format.Format40 )
|
||||
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++ )
|
||||
{
|
||||
if( !offsets.TryGetValue( h.RefOffset, out h.RefImage ) )
|
||||
throw new InvalidDataException( "Reference doesnt point to image data {0}->{1}".F(h.Offset, h.RefOffset) );
|
||||
}
|
||||
}
|
||||
var h = headers[ i ];
|
||||
if( h.Format == Format.Format20 )
|
||||
h.RefImage = headers[ i - 1 ];
|
||||
|
||||
foreach( ImageHeader h in headers )
|
||||
Decompress( stream, h );
|
||||
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 ]
|
||||
@@ -133,7 +125,7 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
case Format.Format80:
|
||||
{
|
||||
byte[] imageBytes = new byte[ Width * Height ];
|
||||
var imageBytes = new byte[ Width * Height ];
|
||||
Format80.DecodeInto( ReadCompressedData( stream, h ), imageBytes );
|
||||
h.Image = imageBytes;
|
||||
break;
|
||||
@@ -147,33 +139,24 @@ namespace OpenRA.FileFormats
|
||||
{
|
||||
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 );
|
||||
var compressedLength = (int)( stream.Length - stream.Position );
|
||||
|
||||
byte[] compressedBytes = new byte[ compressedLength ];
|
||||
var compressedBytes = new byte[ compressedLength ];
|
||||
stream.Read( compressedBytes, 0, compressedLength );
|
||||
|
||||
//MemoryStream ms = new MemoryStream( compressedBytes );
|
||||
return compressedBytes;
|
||||
}
|
||||
|
||||
byte[] CopyImageData( byte[] baseImage )
|
||||
{
|
||||
byte[] imageData = new byte[ Width * Height ];
|
||||
var 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();
|
||||
}
|
||||
public IEnumerable<ImageHeader> Frames { get { return headers; } }
|
||||
|
||||
public static ShpReader Load(string filename)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.FileFormats
|
||||
public readonly string[]
|
||||
Mods, Folders, Packages, Rules, ServerTraits,
|
||||
Sequences, Cursors, Chrome, Assemblies, ChromeLayout,
|
||||
Weapons, Voices, Music, Movies, TileSets, ChromeMetrics;
|
||||
Weapons, Voices, Notifications, Music, Movies, TileSets, ChromeMetrics;
|
||||
public readonly MiniYaml LoadScreen;
|
||||
public readonly Dictionary<string, Pair<string,int>> Fonts;
|
||||
public readonly int TileSize = 24;
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.FileFormats
|
||||
.Select(m => MiniYaml.FromFile("mods/" + m + "/mod.yaml"))
|
||||
.Aggregate(MiniYaml.MergeLiberal)).NodesDict;
|
||||
|
||||
// Todo: Use fieldloader
|
||||
// TODO: Use fieldloader
|
||||
Folders = YamlList(yaml, "Folders");
|
||||
Packages = YamlList(yaml, "Packages");
|
||||
Rules = YamlList(yaml, "Rules");
|
||||
@@ -44,6 +44,7 @@ namespace OpenRA.FileFormats
|
||||
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");
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace OpenRA.FileFormats
|
||||
public string Bot = null;
|
||||
public bool DefaultStartingUnits = false;
|
||||
public bool AllowBots = true;
|
||||
public bool Required = false;
|
||||
|
||||
public bool LockRace = false;
|
||||
public string Race;
|
||||
|
||||
@@ -20,9 +20,10 @@ namespace OpenRA.FileFormats
|
||||
public class TerrainTypeInfo
|
||||
{
|
||||
public string Type;
|
||||
public bool AcceptSmudge = true;
|
||||
public string[] AcceptsSmudgeType = { };
|
||||
public bool IsWater = false;
|
||||
public Color Color;
|
||||
public string CustomCursor;
|
||||
|
||||
public TerrainTypeInfo() {}
|
||||
public TerrainTypeInfo(MiniYaml my) { FieldLoader.Load(this, my); }
|
||||
@@ -36,6 +37,7 @@ namespace OpenRA.FileFormats
|
||||
public string Image;
|
||||
public int2 Size;
|
||||
public bool PickAny;
|
||||
public string Category;
|
||||
|
||||
[FieldLoader.LoadUsing( "LoadTiles" )]
|
||||
public Dictionary<byte, string> Tiles = new Dictionary<byte, string>();
|
||||
@@ -76,10 +78,13 @@ namespace OpenRA.FileFormats
|
||||
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"};
|
||||
|
||||
@@ -166,7 +171,7 @@ namespace OpenRA.FileFormats
|
||||
|
||||
bitmap.Palette = p.AsSystemPalette();
|
||||
|
||||
var data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var data = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
||||
|
||||
unsafe
|
||||
|
||||
@@ -105,22 +105,26 @@ namespace OpenRA.FileFormats
|
||||
levels.Add(new List<MiniYamlNode>());
|
||||
|
||||
var lineNo = 0;
|
||||
foreach (var line in lines)
|
||||
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 || t[0] == '#')
|
||||
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");
|
||||
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, new MiniYamlNode.SourceLocation { Filename = filename, Line = lineNo } ) );
|
||||
levels[ level ].Add( new MiniYamlNode( t, rhs, d, location ) );
|
||||
|
||||
levels.Add(d);
|
||||
}
|
||||
@@ -196,8 +200,8 @@ namespace OpenRA.FileFormats
|
||||
|
||||
var ret = new List<MiniYamlNode>();
|
||||
|
||||
var aDict = a.ToDictionary( x => x.Key );
|
||||
var bDict = b.ToDictionary( x => x.Key );
|
||||
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] == '-')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<?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>
|
||||
@@ -12,10 +12,25 @@
|
||||
<AssemblyName>OpenRA.FileFormats</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<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>
|
||||
@@ -27,6 +42,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Optimize>false</Optimize>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
@@ -37,6 +53,7 @@
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@@ -116,6 +133,23 @@
|
||||
<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.
|
||||
@@ -124,4 +158,4 @@
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* 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,
|
||||
@@ -39,7 +39,13 @@ namespace OpenRA.FileFormats
|
||||
get { return colors; }
|
||||
}
|
||||
|
||||
public Palette(Stream s, bool remapTransparent)
|
||||
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];
|
||||
|
||||
@@ -54,20 +60,15 @@ namespace OpenRA.FileFormats
|
||||
}
|
||||
}
|
||||
|
||||
colors[0] = 0;
|
||||
if (remapTransparent)
|
||||
{
|
||||
colors[1] = 178u << 24; // Hack for d2k; may have side effects
|
||||
colors[3] = 178u << 24;
|
||||
colors[4] = 140u << 24;
|
||||
}
|
||||
colors[0] = 0; //convert black background to transparency
|
||||
foreach (int i in remapShadow)
|
||||
colors[i] = 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();
|
||||
colors = (uint[])p.colors.Clone();
|
||||
ApplyRemap(r);
|
||||
}
|
||||
|
||||
public Palette(Palette p)
|
||||
@@ -75,6 +76,13 @@ namespace OpenRA.FileFormats
|
||||
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;
|
||||
@@ -92,12 +100,27 @@ namespace OpenRA.FileFormats
|
||||
return pal;
|
||||
}
|
||||
|
||||
public static Palette Load( string filename, bool remap )
|
||||
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); }
|
||||
public interface IPaletteRemap { Color GetRemappedColor(Color original, int index); }
|
||||
}
|
||||
|
||||
@@ -14,33 +14,33 @@ 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(PaletteFormat fmt, ColorRamp c)
|
||||
public static int GetRemapIndex(int[] Ramp, int i)
|
||||
{
|
||||
var c1 = c.GetColor(0);
|
||||
var c2 = c.GetColor(1); /* temptemp: this can be expressed better */
|
||||
|
||||
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);
|
||||
return Ramp[i];
|
||||
}
|
||||
|
||||
public static Color ColorLerp(float t, Color c1, Color c2)
|
||||
public PlayerColorRemap(int[] Ramp, ColorRamp c)
|
||||
{
|
||||
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));
|
||||
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)
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.FileFormats
|
||||
|
||||
public int CompareTo(DelayedAction other)
|
||||
{
|
||||
return Math.Sign(Time - other.Time);
|
||||
return Time.CompareTo(other.Time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenRA.Collections
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
public class Set<T> : IEnumerable<T>
|
||||
{
|
||||
@@ -44,5 +44,13 @@ namespace OpenRA.Collections
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
public bool Contains( T obj ) { return data.ContainsKey(obj); }
|
||||
|
||||
public Set( params T[] ts )
|
||||
{
|
||||
foreach( var t in ts )
|
||||
Add(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,4 +101,18 @@ namespace OpenRA
|
||||
public float LengthSquared { get { return X * X + Y * Y; } }
|
||||
public float Length { get { return (float)Math.Sqrt(LengthSquared); } }
|
||||
}
|
||||
|
||||
public class EWMA
|
||||
{
|
||||
readonly float animRate;
|
||||
float? value;
|
||||
|
||||
public EWMA(float animRate) { this.animRate = animRate; }
|
||||
|
||||
public float Update(float newValue)
|
||||
{
|
||||
value = float2.Lerp(value ?? newValue, newValue, animRate);
|
||||
return value.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
OpenRA.FileFormats/Thirdparty/Random.cs
vendored
4
OpenRA.FileFormats/Thirdparty/Random.cs
vendored
@@ -20,6 +20,7 @@ namespace OpenRA.Thirdparty
|
||||
int index = 0;
|
||||
|
||||
public int Last;
|
||||
public int TotalCount = 0;
|
||||
|
||||
public Random() : this(Environment.TickCount) { }
|
||||
|
||||
@@ -41,13 +42,14 @@ namespace OpenRA.Thirdparty
|
||||
y ^= y >> 18;
|
||||
|
||||
index = (index + 1) % 624;
|
||||
TotalCount++;
|
||||
Last = (int)(y % int.MaxValue);
|
||||
return Last;
|
||||
}
|
||||
|
||||
public int Next(int low, int high) { return low + Next() % (high - low); }
|
||||
public int Next(int high) { return Next() % high; }
|
||||
public double NextDouble() { return Math.Abs(Next() / (double)0x7fffffff); }
|
||||
public float NextFloat() { return Math.Abs(Next() / (float)0x7fffffff); }
|
||||
|
||||
void Generate()
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA
|
||||
@@ -32,9 +33,9 @@ namespace OpenRA
|
||||
|
||||
public IOccupySpace OccupiesSpace { get { return occupySpace.Value; } }
|
||||
|
||||
public int2 Location { get { return occupySpace.Value.TopLeft; } }
|
||||
public CPos Location { get { return occupySpace.Value.TopLeft; } }
|
||||
|
||||
public int2 CenterLocation
|
||||
public PPos CenterLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -43,9 +44,10 @@ namespace OpenRA
|
||||
return HasLocation.PxPosition;
|
||||
}
|
||||
}
|
||||
|
||||
public Shroud.ActorVisibility Sight;
|
||||
|
||||
[Sync]
|
||||
public Player Owner;
|
||||
[Sync] public Player Owner;
|
||||
|
||||
Activity currentActivity;
|
||||
public Group Group;
|
||||
@@ -71,7 +73,7 @@ namespace OpenRA
|
||||
AddTrait(trait.Create(init));
|
||||
}
|
||||
|
||||
Move = Lazy.New( () => TraitOrDefault<IMove>() );
|
||||
Move = Lazy.New(() => TraitOrDefault<IMove>());
|
||||
|
||||
Size = Lazy.New(() =>
|
||||
{
|
||||
@@ -79,17 +81,23 @@ namespace OpenRA
|
||||
if (si != null && si.Bounds != null)
|
||||
return new int2(si.Bounds[0], si.Bounds[1]);
|
||||
|
||||
// auto size from render
|
||||
var firstSprite = TraitsImplementing<IRender>().SelectMany(ApplyIRender).FirstOrDefault();
|
||||
if (firstSprite.Sprite == null) return int2.Zero;
|
||||
return (firstSprite.Sprite.size * firstSprite.Scale).ToInt2();
|
||||
return TraitsImplementing<IAutoSelectionSize>().Select(x => x.SelectionSize(this)).FirstOrDefault();
|
||||
});
|
||||
|
||||
ApplyIRender = x => x.Render(this);
|
||||
ApplyRenderModifier = (m, p) => p.ModifyRender(this, m);
|
||||
if (this.HasTrait<RevealsShroud>())
|
||||
{
|
||||
Sight = new Shroud.ActorVisibility
|
||||
{
|
||||
range = this.Trait<RevealsShroud>().RevealRange,
|
||||
vis = Shroud.GetVisOrigins(this).ToArray()
|
||||
};
|
||||
}
|
||||
|
||||
Bounds = Cached.New( () => CalculateBounds(false) );
|
||||
ExtendedBounds = Cached.New( () => CalculateBounds(true) );
|
||||
ApplyIRender = (x, wr) => x.Render(this, wr);
|
||||
ApplyRenderModifier = (m, p, wr) => p.ModifyRender(this, wr, m);
|
||||
|
||||
Bounds = Cached.New(() => CalculateBounds(false));
|
||||
ExtendedBounds = Cached.New(() => CalculateBounds(true));
|
||||
}
|
||||
|
||||
public void Tick()
|
||||
@@ -97,7 +105,12 @@ namespace OpenRA
|
||||
Bounds.Invalidate();
|
||||
ExtendedBounds.Invalidate();
|
||||
|
||||
currentActivity = Util.RunActivity( this, currentActivity );
|
||||
currentActivity = Traits.Util.RunActivity( this, currentActivity );
|
||||
}
|
||||
|
||||
public void UpdateSight()
|
||||
{
|
||||
Sight.vis = Shroud.GetVisOrigins(this).ToArray();
|
||||
}
|
||||
|
||||
public bool IsIdle
|
||||
@@ -108,13 +121,13 @@ namespace OpenRA
|
||||
OpenRA.FileFormats.Lazy<int2> Size;
|
||||
|
||||
// note: these delegates are cached to avoid massive allocation.
|
||||
Func<IRender, IEnumerable<Renderable>> ApplyIRender;
|
||||
Func<IEnumerable<Renderable>, IRenderModifier, IEnumerable<Renderable>> ApplyRenderModifier;
|
||||
public IEnumerable<Renderable> Render()
|
||||
Func<IRender, WorldRenderer, IEnumerable<Renderable>> ApplyIRender;
|
||||
Func<IEnumerable<Renderable>, IRenderModifier, WorldRenderer, IEnumerable<Renderable>> ApplyRenderModifier;
|
||||
public IEnumerable<Renderable> Render(WorldRenderer wr)
|
||||
{
|
||||
var mods = TraitsImplementing<IRenderModifier>();
|
||||
var sprites = TraitsImplementing<IRender>().SelectMany(ApplyIRender);
|
||||
return mods.Aggregate(sprites, ApplyRenderModifier);
|
||||
var sprites = TraitsImplementing<IRender>().SelectMany(x => ApplyIRender(x, wr));
|
||||
return mods.Aggregate(sprites, (m,p) => ApplyRenderModifier(m,p,wr));
|
||||
}
|
||||
|
||||
// When useAltitude = true, the bounding box is extended
|
||||
@@ -123,22 +136,22 @@ namespace OpenRA
|
||||
// at its current altitude
|
||||
Rectangle CalculateBounds(bool useAltitude)
|
||||
{
|
||||
var size = Size.Value;
|
||||
var size = (PVecInt)(Size.Value);
|
||||
var loc = CenterLocation - size / 2;
|
||||
|
||||
var si = Info.Traits.GetOrDefault<SelectableInfo>();
|
||||
if (si != null && si.Bounds != null && si.Bounds.Length > 2)
|
||||
{
|
||||
loc.X += si.Bounds[2];
|
||||
loc.Y += si.Bounds[3];
|
||||
loc += new PVecInt(si.Bounds[2], si.Bounds[3]);
|
||||
}
|
||||
|
||||
var move = Move.Value;
|
||||
if (move != null)
|
||||
{
|
||||
loc.Y -= move.Altitude;
|
||||
loc -= new PVecInt(0, move.Altitude);
|
||||
|
||||
if (useAltitude)
|
||||
size = new int2(size.X, size.Y + move.Altitude);
|
||||
size = new PVecInt(size.X, size.Y + move.Altitude);
|
||||
}
|
||||
|
||||
return new Rectangle(loc.X, loc.Y, size.X, size.Y);
|
||||
@@ -227,15 +240,20 @@ namespace OpenRA
|
||||
} );
|
||||
}
|
||||
|
||||
// todo: move elsewhere.
|
||||
// TODO: move elsewhere.
|
||||
public void ChangeOwner(Player newOwner)
|
||||
{
|
||||
World.AddFrameEndTask(w =>
|
||||
{
|
||||
var oldOwner = Owner;
|
||||
|
||||
// momentarily remove from world so the ownership queries don't get confused
|
||||
w.Remove(this);
|
||||
Owner = newOwner;
|
||||
w.Add(this);
|
||||
|
||||
foreach (var t in this.TraitsImplementing<INotifyOwnerChanged>())
|
||||
t.OnOwnerChanged(this, oldOwner, newOwner);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,20 +62,28 @@ namespace OpenRA
|
||||
public int Value( World world ) { return value; }
|
||||
}
|
||||
|
||||
public class LocationInit : IActorInit<int2>
|
||||
public class LocationInit : IActorInit<CPos>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
|
||||
public LocationInit() { }
|
||||
public LocationInit( int2 init ) { value = init; }
|
||||
public int2 Value( World world ) { return value; }
|
||||
public LocationInit( CPos init ) { value = init.ToInt2(); }
|
||||
public CPos Value(World world) { return (CPos)value; }
|
||||
}
|
||||
|
||||
public class CenterLocationInit : IActorInit<int2>
|
||||
public class SubCellInit : IActorInit<SubCell>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly int value = 0;
|
||||
public SubCellInit() { }
|
||||
public SubCellInit(int init) { value = init; }
|
||||
public SubCell Value(World world) { return (SubCell)value; }
|
||||
}
|
||||
|
||||
public class CenterLocationInit : IActorInit<PPos>
|
||||
{
|
||||
[FieldFromYamlKey] public readonly int2 value = int2.Zero;
|
||||
public CenterLocationInit() { }
|
||||
public CenterLocationInit( int2 init ) { value = init; }
|
||||
public int2 Value( World world ) { return value; }
|
||||
public CenterLocationInit(PPos init) { value = init.ToInt2(); }
|
||||
public PPos Value(World world) { return (PPos)value; }
|
||||
}
|
||||
|
||||
public class OwnerInit : IActorInit<Player>
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA
|
||||
world.ActorRemoved += a => Remove( a, a.OccupiesSpace );
|
||||
}
|
||||
|
||||
public IEnumerable<Actor> GetUnitsAt( int2 a )
|
||||
public IEnumerable<Actor> GetUnitsAt(CPos a)
|
||||
{
|
||||
if (!map.IsInMap(a)) yield break;
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenRA
|
||||
yield return i.actor;
|
||||
}
|
||||
|
||||
public IEnumerable<Actor> GetUnitsAt( int2 a, SubCell sub )
|
||||
public IEnumerable<Actor> GetUnitsAt(CPos a, SubCell sub)
|
||||
{
|
||||
if (!map.IsInMap(a)) yield break;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenRA
|
||||
yield return i.actor;
|
||||
}
|
||||
|
||||
public bool HasFreeSubCell(int2 a)
|
||||
public bool HasFreeSubCell(CPos a)
|
||||
{
|
||||
if (!AnyUnitsAt(a))
|
||||
return true;
|
||||
@@ -64,12 +64,12 @@ namespace OpenRA
|
||||
SubCell.BottomLeft, SubCell.BottomRight }.Any(b => !AnyUnitsAt(a,b));
|
||||
}
|
||||
|
||||
public bool AnyUnitsAt(int2 a)
|
||||
public bool AnyUnitsAt(CPos a)
|
||||
{
|
||||
return influence[ a.X, a.Y ] != null;
|
||||
}
|
||||
|
||||
public bool AnyUnitsAt(int2 a, SubCell sub)
|
||||
public bool AnyUnitsAt(CPos a, SubCell sub)
|
||||
{
|
||||
for( var i = influence[ a.X, a.Y ] ; i != null ; i = i.next )
|
||||
if (i.subCell == sub || i.subCell == SubCell.FullCell)
|
||||
|
||||
71
OpenRA.Game/CPos.cs
Normal file
71
OpenRA.Game/CPos.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Cell coordinate position in the world (coarse).
|
||||
/// </summary>
|
||||
public struct CPos
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public CPos(int x, int y) { X = x; Y = y; }
|
||||
|
||||
public static readonly CPos Zero = new CPos(0, 0);
|
||||
|
||||
public static explicit operator CPos(int2 a) { return new CPos(a.X, a.Y); }
|
||||
|
||||
public static CPos operator +(CVec a, CPos b) { return new CPos(a.X + b.X, a.Y + b.Y); }
|
||||
public static CPos operator +(CPos a, CVec b) { return new CPos(a.X + b.X, a.Y + b.Y); }
|
||||
public static CPos operator -(CPos a, CVec b) { return new CPos(a.X - b.X, a.Y - b.Y); }
|
||||
|
||||
public static CVec operator -(CPos a, CPos b) { return new CVec(a.X - b.X, a.Y - b.Y); }
|
||||
|
||||
public static bool operator ==(CPos me, CPos other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(CPos me, CPos other) { return !(me == other); }
|
||||
|
||||
public static CPos Max(CPos a, CPos b) { return new CPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static CPos Min(CPos a, CPos b) { return new CPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
public PPos ToPPos() { return new PPos(Game.CellSize * X, Game.CellSize * Y); }
|
||||
|
||||
public CPos Clamp(Rectangle r)
|
||||
{
|
||||
return new CPos(Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
CPos o = (CPos)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
|
||||
}
|
||||
|
||||
public static class RectangleExtensions
|
||||
{
|
||||
public static CPos TopLeftAsCPos(this Rectangle r) { return new CPos(r.Left, r.Top); }
|
||||
public static CPos BottomRightAsCPos(this Rectangle r) { return new CPos(r.Right, r.Bottom); }
|
||||
}
|
||||
}
|
||||
76
OpenRA.Game/CVec.cs
Normal file
76
OpenRA.Game/CVec.cs
Normal 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;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Cell coordinate vector (coarse).
|
||||
/// </summary>
|
||||
public struct CVec
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public CVec(int x, int y) { X = x; Y = y; }
|
||||
public CVec(Size p) { X = p.Width; Y = p.Height; }
|
||||
|
||||
public static readonly CVec Zero = new CVec(0, 0);
|
||||
|
||||
public static explicit operator CVec(int2 a) { return new CVec(a.X, a.Y); }
|
||||
public static explicit operator CVec(float2 a) { return new CVec((int)a.X, (int)a.Y); }
|
||||
|
||||
public static CVec operator +(CVec a, CVec b) { return new CVec(a.X + b.X, a.Y + b.Y); }
|
||||
public static CVec operator -(CVec a, CVec b) { return new CVec(a.X - b.X, a.Y - b.Y); }
|
||||
public static CVec operator *(int a, CVec b) { return new CVec(a * b.X, a * b.Y); }
|
||||
public static CVec operator *(CVec b, int a) { return new CVec(a * b.X, a * b.Y); }
|
||||
public static CVec operator /(CVec a, int b) { return new CVec(a.X / b, a.Y / b); }
|
||||
|
||||
public static CVec operator -(CVec a) { return new CVec(-a.X, -a.Y); }
|
||||
|
||||
public static bool operator ==(CVec me, CVec other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(CVec me, CVec other) { return !(me == other); }
|
||||
|
||||
public static CVec Max(CVec a, CVec b) { return new CVec(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static CVec Min(CVec a, CVec b) { return new CVec(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static int Dot(CVec a, CVec b) { return a.X * b.X + a.Y * b.Y; }
|
||||
|
||||
public CVec Sign() { return new CVec(Math.Sign(X), Math.Sign(Y)); }
|
||||
public CVec Abs() { return new CVec(Math.Abs(X), Math.Abs(Y)); }
|
||||
public int LengthSquared { get { return X * X + Y * Y; } }
|
||||
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
|
||||
public CVec Clamp(Rectangle r)
|
||||
{
|
||||
return new CVec(
|
||||
Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top))
|
||||
);
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
CVec o = (CVec)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Effects
|
||||
@@ -25,12 +26,12 @@ namespace OpenRA.Effects
|
||||
this.delay = delay;
|
||||
}
|
||||
|
||||
public void Tick( World world )
|
||||
public void Tick(World world)
|
||||
{
|
||||
if (--delay <= 0)
|
||||
world.AddFrameEndTask(w => { w.Remove(this); a(); });
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render() { yield break; }
|
||||
public IEnumerable<Renderable> Render(WorldRenderer wr) { yield break; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Effects
|
||||
@@ -32,14 +33,14 @@ namespace OpenRA.Effects
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
}
|
||||
|
||||
public IEnumerable<Renderable> Render()
|
||||
public IEnumerable<Renderable> Render(WorldRenderer wr)
|
||||
{
|
||||
if (!target.IsInWorld)
|
||||
yield break;
|
||||
|
||||
if (remainingTicks % 2 == 0)
|
||||
foreach (var r in target.Render())
|
||||
yield return r.WithPalette("highlight");
|
||||
foreach (var r in target.Render(wr))
|
||||
yield return r.WithPalette(wr.Palette("highlight"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,14 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Effects
|
||||
{
|
||||
public interface IEffect
|
||||
{
|
||||
void Tick( World world );
|
||||
IEnumerable<Renderable> Render();
|
||||
void Tick(World world);
|
||||
IEnumerable<Renderable> Render(WorldRenderer r);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace OpenRA
|
||||
{
|
||||
public static int CellSize { get { return modData.Manifest.TileSize; } }
|
||||
|
||||
public static MouseButtonPreference mouseButtonPreference = new MouseButtonPreference();
|
||||
|
||||
public static ModData modData;
|
||||
static WorldRenderer worldRenderer;
|
||||
|
||||
@@ -50,18 +52,13 @@ namespace OpenRA
|
||||
|
||||
public static void JoinServer(string host, int port)
|
||||
{
|
||||
var replayFilename = ChooseReplayFilename();
|
||||
string path = Path.Combine( Platform.SupportDir, "Replays" );
|
||||
if( !Directory.Exists( path ) ) Directory.CreateDirectory( path );
|
||||
var replayFile = File.Create( Path.Combine( path, replayFilename ) );
|
||||
|
||||
JoinInner(new OrderManager(host, port,
|
||||
new ReplayRecorderConnection(new NetworkConnection(host, port), replayFile)));
|
||||
new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename)));
|
||||
}
|
||||
|
||||
static string ChooseReplayFilename()
|
||||
{
|
||||
return DateTime.UtcNow.ToString("OpenRA-yyyy-MM-ddTHHmmssZ.rep");
|
||||
return DateTime.UtcNow.ToString("OpenRA-yyyy-MM-ddTHHmmssZ");
|
||||
}
|
||||
|
||||
static void JoinInner(OrderManager om)
|
||||
@@ -171,7 +168,7 @@ namespace OpenRA
|
||||
{
|
||||
var isNetTick = LocalTick % NetTickScale == 0;
|
||||
|
||||
if (!isNetTick || orderManager.IsReadyForNextFrame)
|
||||
if ((!isNetTick || orderManager.IsReadyForNextFrame) && !orderManager.GamePaused )
|
||||
{
|
||||
++orderManager.LocalFrameNumber;
|
||||
|
||||
@@ -193,6 +190,8 @@ namespace OpenRA
|
||||
else
|
||||
if (orderManager.NetFrameNumber == 0)
|
||||
orderManager.LastTickTime = Environment.TickCount;
|
||||
|
||||
viewport.Tick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,11 +220,19 @@ namespace OpenRA
|
||||
orderManager.LastTickTime = Environment.TickCount;
|
||||
orderManager.StartGame();
|
||||
worldRenderer.RefreshPalette();
|
||||
|
||||
if (!isShellmap)
|
||||
Sound.PlayNotification(null, "Speech", "StartGame", null);
|
||||
}
|
||||
|
||||
public static bool IsHost
|
||||
{
|
||||
get { return orderManager.Connection.LocalClientId == 0; }
|
||||
get
|
||||
{
|
||||
var client= orderManager.LobbyInfo.ClientWithIndex (
|
||||
orderManager.Connection.LocalClientId);
|
||||
return ((client!=null) && client.IsAdmin);
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<String, Mod> CurrentMods
|
||||
@@ -244,7 +251,6 @@ namespace OpenRA
|
||||
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
||||
|
||||
Settings = new Settings(Platform.SupportDir + "settings.yaml", args);
|
||||
Settings.Save();
|
||||
|
||||
Log.LogPath = Platform.SupportDir + "Logs" + Path.DirectorySeparatorChar;
|
||||
Log.AddChannel("perf", "perf.log");
|
||||
@@ -259,7 +265,7 @@ namespace OpenRA
|
||||
foreach(var mod in Mod.AllMods)
|
||||
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
||||
|
||||
Sound.Create();
|
||||
Sound.Create(Settings.Sound.Engine);
|
||||
InitializeWithMods(Settings.Game.Mods);
|
||||
}
|
||||
|
||||
@@ -278,11 +284,11 @@ namespace OpenRA
|
||||
if (orderManager != null)
|
||||
orderManager.Dispose();
|
||||
|
||||
// Discard any invalid mods
|
||||
// Discard any invalid mods, set RA as default
|
||||
var mm = mods.Where( m => Mod.AllMods.ContainsKey( m ) ).ToArray();
|
||||
if (mm.Length == 0) mm = new[] { "ra" };
|
||||
Console.WriteLine("Loading mods: {0}", mm.JoinWith(","));
|
||||
Settings.Game.Mods = mm;
|
||||
Settings.Save();
|
||||
|
||||
Sound.StopMusic();
|
||||
Sound.StopVideo();
|
||||
@@ -301,7 +307,40 @@ namespace OpenRA
|
||||
JoinLocal();
|
||||
viewport = new Viewport(new int2(Renderer.Resolution), Rectangle.Empty, Renderer);
|
||||
|
||||
modData.LoadScreen.StartGame();
|
||||
if (Game.Settings.Server.Dedicated)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Game.Settings.Server.Map = WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map);
|
||||
Game.Settings.Save();
|
||||
Game.CreateServer(new ServerSettings(Game.Settings.Server));
|
||||
while(true)
|
||||
{
|
||||
System.Threading.Thread.Sleep(100);
|
||||
|
||||
if((server.State == Server.ServerState.GameStarted)
|
||||
&& (server.conns.Count<=1))
|
||||
{
|
||||
Console.WriteLine("No one is playing, shutting down...");
|
||||
server.Shutdown();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Game.Settings.Server.DedicatedLoop)
|
||||
{
|
||||
Console.WriteLine("Starting a new server instance...");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
System.Environment.Exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
modData.LoadScreen.StartGame();
|
||||
Settings.Save();
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadShellMap()
|
||||
@@ -390,6 +429,7 @@ namespace OpenRA
|
||||
// Work around a miscompile in mono 2.6.7:
|
||||
// booleans that default to true cannot be set false by an initializer
|
||||
settings.AdvertiseOnline = false;
|
||||
settings.AllowUPnP = false;
|
||||
|
||||
server = new Server.Server(new IPEndPoint(IPAddress.Loopback, 0),
|
||||
Game.Settings.Game.Mods, settings, modData);
|
||||
|
||||
@@ -16,8 +16,15 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
//TODO: This is not exported into the documentation yet.
|
||||
[Desc("A unit/building inside the game. Every rules starts with one and adds trait to it.",
|
||||
"Special actors like world or player are usually defined in system.yaml and affect everything.")]
|
||||
public class ActorInfo
|
||||
{
|
||||
[Desc("The actor name can be anything, but the sprites used in the Render*: traits default to this one.",
|
||||
"If you add an ^ in front of the name, the engine will recognize this as a collection of traits",
|
||||
"that can be inherited by others (using Inherits:) and not a real unit.",
|
||||
"You can remove inherited traits by adding a - infront of them as in -TraitName: to inherit everything, but this trait.")]
|
||||
public readonly string Name;
|
||||
public readonly TypeDictionary Traits = new TypeDictionary();
|
||||
|
||||
@@ -70,6 +77,9 @@ namespace OpenRA
|
||||
|
||||
static ITraitInfo LoadTraitInfo(string traitName, MiniYaml my)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(my.Value))
|
||||
throw new YamlException("Junk value `{0}` on trait node {1}"
|
||||
.F(my.Value, traitName));
|
||||
var info = Game.CreateObject<ITraitInfo>(traitName + "Info");
|
||||
FieldLoader.Load(info, my);
|
||||
return info;
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace OpenRA
|
||||
{
|
||||
public static Dictionary<string, ActorInfo> Info;
|
||||
public static Dictionary<string, WeaponInfo> Weapons;
|
||||
public static Dictionary<string, VoiceInfo> Voices;
|
||||
public static Dictionary<string, SoundInfo> Voices;
|
||||
public static Dictionary<string, SoundInfo> Notifications;
|
||||
public static Dictionary<string, MusicInfo> Music;
|
||||
public static Dictionary<string, string> Movies;
|
||||
public static Dictionary<string, TileSet> TileSets;
|
||||
@@ -30,7 +31,8 @@ namespace OpenRA
|
||||
// Added support to extend the list of rules (add it to m.LocalRules)
|
||||
Info = LoadYamlRules(m.Rules, map.Rules, (k, y) => new ActorInfo(k.Key.ToLowerInvariant(), k.Value, y));
|
||||
Weapons = LoadYamlRules(m.Weapons, map.Weapons, (k, _) => new WeaponInfo(k.Key.ToLowerInvariant(), k.Value));
|
||||
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new VoiceInfo(k.Value));
|
||||
Voices = LoadYamlRules(m.Voices, map.Voices, (k, _) => new SoundInfo(k.Value));
|
||||
Notifications = LoadYamlRules(m.Notifications, map.Notifications, (k, _) => new SoundInfo(k.Value));
|
||||
Music = LoadYamlRules(m.Music, new List<MiniYamlNode>(), (k, _) => new MusicInfo(k.Key, k.Value));
|
||||
Movies = LoadYamlRules(m.Movies, new List<MiniYamlNode>(), (k, v) => k.Value.Value);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -19,6 +19,9 @@ using OpenRA.Server;
|
||||
|
||||
namespace OpenRA.GameRules
|
||||
{
|
||||
public enum MouseScrollType { Disabled, Standard, Inverted }
|
||||
public enum SoundCashTicks { Disabled, Normal, Extreme }
|
||||
|
||||
public class ServerSettings
|
||||
{
|
||||
public string Name = "OpenRA Game";
|
||||
@@ -26,8 +29,14 @@ namespace OpenRA.GameRules
|
||||
public int ExternalPort = 1234;
|
||||
public bool AdvertiseOnline = true;
|
||||
public string MasterServer = "http://master.open-ra.org/";
|
||||
public bool AllowUPnP = false;
|
||||
public bool AllowCheats = false;
|
||||
public string Map = null;
|
||||
public string[] Ban = null;
|
||||
public int TimeOut = 0;
|
||||
public bool Dedicated = false;
|
||||
public bool DedicatedLoop = true;
|
||||
public bool LockBots = false;
|
||||
|
||||
public ServerSettings() { }
|
||||
|
||||
@@ -38,8 +47,14 @@ namespace OpenRA.GameRules
|
||||
ExternalPort = other.ExternalPort;
|
||||
AdvertiseOnline = other.AdvertiseOnline;
|
||||
MasterServer = other.MasterServer;
|
||||
AllowUPnP = other.AllowUPnP;
|
||||
AllowCheats = other.AllowCheats;
|
||||
Map = other.Map;
|
||||
Ban = other.Ban;
|
||||
TimeOut = other.TimeOut;
|
||||
Dedicated = other.Dedicated;
|
||||
DedicatedLoop = other.DedicatedLoop;
|
||||
LockBots = other.LockBots;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +90,10 @@ namespace OpenRA.GameRules
|
||||
public float VideoVolume = 0.5f;
|
||||
public bool Shuffle = false;
|
||||
public bool Repeat = false;
|
||||
public bool ShellmapMusic = true;
|
||||
public bool MapMusic = true;
|
||||
public string Engine = "AL";
|
||||
|
||||
public SoundCashTicks SoundCashTickType = SoundCashTicks.Extreme;
|
||||
}
|
||||
|
||||
public class PlayerSettings
|
||||
@@ -85,8 +103,6 @@ namespace OpenRA.GameRules
|
||||
public string LastServer = "localhost:1234";
|
||||
}
|
||||
|
||||
public enum MouseScrollType { Disabled, Standard, Inverted }
|
||||
|
||||
public class GameSettings
|
||||
{
|
||||
public string[] Mods = { "ra" };
|
||||
@@ -98,12 +114,35 @@ namespace OpenRA.GameRules
|
||||
public MouseScrollType MouseScroll = MouseScrollType.Standard;
|
||||
public float ViewportEdgeScrollStep = 10f;
|
||||
|
||||
public bool UseClassicMouseStyle = false;
|
||||
|
||||
// Internal game settings
|
||||
public int Timestep = 40;
|
||||
|
||||
public string ConnectTo = "";
|
||||
}
|
||||
|
||||
public class KeySettings
|
||||
{
|
||||
public string PauseKey = "f3";
|
||||
|
||||
public string CycleBaseKey = "backspace";
|
||||
public string ToLastEventKey = "space";
|
||||
public string ToSelectionKey = "home";
|
||||
public string SellKey = "v";
|
||||
public string PowerDownKey = "b";
|
||||
public string RepairKey = "n";
|
||||
|
||||
public string AttackMoveKey = "a";
|
||||
public string StopKey = "s";
|
||||
public string ScatterKey = "x";
|
||||
public string StanceCycleKey = "z";
|
||||
public string DeployKey = "f";
|
||||
|
||||
public string CycleTabsKey = "tab";
|
||||
}
|
||||
|
||||
|
||||
public class Settings
|
||||
{
|
||||
string SettingsFile;
|
||||
@@ -114,6 +153,7 @@ namespace OpenRA.GameRules
|
||||
public GraphicSettings Graphics = new GraphicSettings();
|
||||
public ServerSettings Server = new ServerSettings();
|
||||
public DebugSettings Debug = new DebugSettings();
|
||||
public KeySettings Keys = new KeySettings();
|
||||
|
||||
public Dictionary<string, object> Sections;
|
||||
|
||||
@@ -128,6 +168,7 @@ namespace OpenRA.GameRules
|
||||
{"Graphics", Graphics},
|
||||
{"Server", Server},
|
||||
{"Debug", Debug},
|
||||
{"Keys", Keys},
|
||||
};
|
||||
|
||||
// Override fieldloader to ignore invalid entries
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#region Copyright & License Information
|
||||
#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
|
||||
@@ -15,12 +15,16 @@ using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.GameRules
|
||||
{
|
||||
public class VoiceInfo
|
||||
public class SoundInfo
|
||||
{
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Variants;
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Prefixes;
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Voices;
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Notifications;
|
||||
public readonly string DefaultVariant = ".aud" ;
|
||||
public readonly string DefaultPrefix = "" ;
|
||||
public readonly string[] DisableVariants = { };
|
||||
public readonly string[] DisablePrefixes = { };
|
||||
|
||||
static Dictionary<string, string[]> Load( MiniYaml y, string name )
|
||||
{
|
||||
@@ -31,30 +35,28 @@ namespace OpenRA.GameRules
|
||||
: new Dictionary<string, string[]>();
|
||||
}
|
||||
|
||||
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, VoicePool>> Pools;
|
||||
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, SoundPool>> VoicePools;
|
||||
public readonly OpenRA.FileFormats.Lazy<Dictionary<string, SoundPool>> NotificationsPools;
|
||||
|
||||
public VoiceInfo( MiniYaml y )
|
||||
public SoundInfo( MiniYaml y )
|
||||
{
|
||||
FieldLoader.Load( this, y );
|
||||
Variants = Load(y, "Variants");
|
||||
Prefixes = Load(y, "Prefixes");
|
||||
Voices = Load(y, "Voices");
|
||||
Notifications = Load(y, "Notifications");
|
||||
|
||||
if (!Voices.ContainsKey("Attack"))
|
||||
Voices.Add("Attack", Voices["Move"]);
|
||||
|
||||
if (!Voices.ContainsKey("AttackMove"))
|
||||
Voices.Add("AttackMove", Voices["Move"]);
|
||||
|
||||
Pools = Lazy.New(() => Voices.ToDictionary( a => a.Key, a => new VoicePool(a.Value) ));
|
||||
VoicePools = Lazy.New(() => Voices.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
|
||||
NotificationsPools = Lazy.New(() => Notifications.ToDictionary( a => a.Key, a => new SoundPool(a.Value) ));
|
||||
}
|
||||
}
|
||||
|
||||
public class VoicePool
|
||||
public class SoundPool
|
||||
{
|
||||
readonly string[] clips;
|
||||
readonly List<string> liveclips = new List<string>();
|
||||
|
||||
public VoicePool(params string[] clips)
|
||||
public SoundPool(params string[] clips)
|
||||
{
|
||||
this.clips = clips;
|
||||
}
|
||||
@@ -18,21 +18,35 @@ namespace OpenRA.GameRules
|
||||
{
|
||||
public class WarheadInfo
|
||||
{
|
||||
public readonly int Spread = 1; // distance (in pixels) from the explosion center at which damage is 1/2.
|
||||
[Desc("Distance (in pixels) from the explosion center at which damage is 1/2.")]
|
||||
public readonly int Spread = 1;
|
||||
[FieldLoader.LoadUsing( "LoadVersus" )]
|
||||
public readonly Dictionary<string, float> Versus; // damage vs each armortype
|
||||
public readonly bool Ore = false; // can this damage ore?
|
||||
public readonly string Explosion = null; // explosion effect to use
|
||||
public readonly string WaterExplosion = null; // explosion effect on hitting water (usually a splash)
|
||||
public readonly string SmudgeType = null; // type of smudge to apply
|
||||
public readonly int[] Size = { 0, 0 }; // size of the explosion. provide 2 values for a ring effect (outer/inner)
|
||||
public readonly int InfDeath = 0; // infantry death animation to use
|
||||
public readonly string ImpactSound = null; // sound to play on impact
|
||||
public readonly string WaterImpactSound = null; // sound to play on impact with water
|
||||
public readonly int Damage = 0; // how much (raw) damage to deal
|
||||
public readonly int Delay = 0; // delay in ticks before dealing the damage. 0=instant (old model)
|
||||
public readonly DamageModel DamageModel = DamageModel.Normal; // which damage model to use
|
||||
public readonly bool PreventProne = false; // whether we should prevent prone response in infantry.
|
||||
[Desc("Damage vs each armortype. 0% = can't target.")]
|
||||
public readonly Dictionary<string, float> Versus;
|
||||
[Desc("Can this damage ore?")]
|
||||
public readonly bool Ore = false;
|
||||
[Desc("Explosion effect to use.")]
|
||||
public readonly string Explosion = null;
|
||||
[Desc("Explosion effect on hitting water (usually a splash).")]
|
||||
public readonly string WaterExplosion = null;
|
||||
[Desc("Type of smudge to apply to terrain.")]
|
||||
public readonly string[] SmudgeType = { };
|
||||
[Desc("Size of the explosion. provide 2 values for a ring effect (outer/inner).")]
|
||||
public readonly int[] Size = { 0, 0 };
|
||||
[Desc("Infantry death animation to use")]
|
||||
public readonly int InfDeath = 1;
|
||||
[Desc("Sound to play on impact.")]
|
||||
public readonly string ImpactSound = null;
|
||||
[Desc("Sound to play on impact with water")]
|
||||
public readonly string WaterImpactSound = null;
|
||||
[Desc("How much (raw) damage to deal")]
|
||||
public readonly int Damage = 0;
|
||||
[Desc("Delay in ticks before dealing the damage, 0 = instant (old model).")]
|
||||
public readonly int Delay = 0;
|
||||
[Desc("Which damage model to use.")]
|
||||
public readonly DamageModel DamageModel = DamageModel.Normal;
|
||||
[Desc("Whether we should prevent prone response for infantry.")]
|
||||
public readonly bool PreventProne = false;
|
||||
|
||||
public float EffectivenessAgainst(Actor self)
|
||||
{
|
||||
@@ -72,11 +86,11 @@ namespace OpenRA.GameRules
|
||||
{
|
||||
public WeaponInfo weapon;
|
||||
public Actor firedBy;
|
||||
public int2 src;
|
||||
public PPos src;
|
||||
public int srcAltitude;
|
||||
public int facing;
|
||||
public Target target;
|
||||
public int2 dest;
|
||||
public PPos dest;
|
||||
public int destAltitude;
|
||||
public float firepowerModifier = 1.0f;
|
||||
}
|
||||
@@ -86,12 +100,13 @@ namespace OpenRA.GameRules
|
||||
public class WeaponInfo
|
||||
{
|
||||
public readonly float Range = 0;
|
||||
public readonly string Report = null;
|
||||
public readonly string[] Report = null;
|
||||
[Desc("Rate of Fire")]
|
||||
public readonly int ROF = 1;
|
||||
public readonly int Burst = 1;
|
||||
public readonly bool Charges = false;
|
||||
public readonly bool Underwater = false;
|
||||
public readonly string[] ValidTargets = { "Ground" };
|
||||
public readonly string[] ValidTargets = { "Ground", "Water" };
|
||||
public readonly int BurstDelay = 5;
|
||||
public readonly float MinRange = 0;
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ namespace OpenRA.Graphics
|
||||
this.DisableFunc = d;
|
||||
}
|
||||
|
||||
public Renderable Image(Actor self, string pal)
|
||||
public Renderable Image(Actor self, PaletteReference pal)
|
||||
{
|
||||
var p = self.CenterLocation;
|
||||
var loc = p - 0.5f * Animation.Image.size
|
||||
var loc = p.ToFloat2() - 0.5f * Animation.Image.size
|
||||
+ (OffsetFunc != null ? OffsetFunc() : float2.Zero);
|
||||
var r = new Renderable(Animation.Image, loc, pal, p.Y);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* 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,
|
||||
@@ -14,20 +14,37 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public static class CursorProvider
|
||||
{
|
||||
public static HardwarePalette Palette;
|
||||
static Dictionary<string, CursorSequence> cursors;
|
||||
|
||||
public static void Initialize(string[] sequenceFiles)
|
||||
{
|
||||
cursors = new Dictionary<string, CursorSequence>();
|
||||
var sequences = new MiniYaml(null, sequenceFiles.Select(s => MiniYaml.FromFile(s)).Aggregate(MiniYaml.MergeLiberal));
|
||||
int[] ShadowIndex = { };
|
||||
|
||||
if (sequences.NodesDict.ContainsKey("ShadowIndex"))
|
||||
{
|
||||
Array.Resize(ref ShadowIndex, ShadowIndex.Length + 1);
|
||||
ShadowIndex[ShadowIndex.Length - 1] = Convert.ToInt32(sequences.NodesDict["ShadowIndex"].Value);
|
||||
}
|
||||
|
||||
var palettes = new Dictionary<string, Palette>();
|
||||
foreach (var s in sequences.NodesDict["Palettes"].Nodes)
|
||||
Game.modData.Palette.AddPalette(s.Key, new Palette(FileSystem.Open(s.Value.Value), false));
|
||||
palettes.Add(s.Key, new Palette(FileSystem.Open(s.Value.Value), ShadowIndex));
|
||||
|
||||
Palette = new HardwarePalette();
|
||||
foreach (var p in palettes)
|
||||
Palette.AddPalette(p.Key, p.Value, false);
|
||||
|
||||
// Generate initial palette texture
|
||||
Palette.Update(new IPaletteModifier[] {});
|
||||
|
||||
foreach (var s in sequences.NodesDict["Cursors"].Nodes)
|
||||
LoadSequencesForCursor(s.Key, s.Value);
|
||||
@@ -46,6 +63,17 @@ namespace OpenRA.Graphics
|
||||
return cursors.ContainsKey(cursor);
|
||||
}
|
||||
|
||||
public static void DrawCursor(Renderer renderer, string cursorName, int2 lastMousePos, int cursorFrame)
|
||||
{
|
||||
var cursorSequence = CursorProvider.GetCursorSequence(cursorName);
|
||||
var cursorSprite = cursorSequence.GetSprite(cursorFrame);
|
||||
|
||||
renderer.SpriteRenderer.DrawSprite(cursorSprite,
|
||||
lastMousePos - cursorSequence.Hotspot,
|
||||
Palette.GetPaletteIndex(cursorSequence.Palette),
|
||||
cursorSprite.size);
|
||||
}
|
||||
|
||||
public static CursorSequence GetCursorSequence(string cursor)
|
||||
{
|
||||
try { return cursors[cursor]; }
|
||||
|
||||
@@ -25,11 +25,13 @@ namespace OpenRA.Graphics
|
||||
ITexture texture;
|
||||
Dictionary<string, Palette> palettes;
|
||||
Dictionary<string, int> indices;
|
||||
Dictionary<string, bool> allowsMods;
|
||||
|
||||
public HardwarePalette()
|
||||
{
|
||||
palettes = new Dictionary<string, Palette>();
|
||||
indices = new Dictionary<string, int>();
|
||||
allowsMods = new Dictionary<string, bool>();
|
||||
texture = Game.Renderer.Device.CreateTexture();
|
||||
}
|
||||
|
||||
@@ -49,22 +51,24 @@ namespace OpenRA.Graphics
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void AddPalette(string name, Palette p)
|
||||
public void AddPalette(string name, Palette p, bool allowModifiers)
|
||||
{
|
||||
if (palettes.ContainsKey(name))
|
||||
throw new InvalidOperationException("Palette {0} has already been defined".F(name));
|
||||
|
||||
palettes.Add(name, p);
|
||||
indices.Add(name, allocated++);
|
||||
allowsMods.Add(name, allowModifiers);
|
||||
}
|
||||
|
||||
uint[,] data = new uint[MaxPalettes, 256];
|
||||
public void Update(IEnumerable<IPaletteModifier> paletteMods)
|
||||
{
|
||||
var copy = palettes.ToDictionary(p => p.Key, p => new Palette(p.Value));
|
||||
var modifiable = copy.Where(p => allowsMods[p.Key]).ToDictionary(p => p.Key, p => p.Value);
|
||||
|
||||
foreach (var mod in paletteMods)
|
||||
mod.AdjustPalette(copy);
|
||||
mod.AdjustPalette(modifiable);
|
||||
|
||||
foreach (var pal in copy)
|
||||
{
|
||||
|
||||
@@ -77,5 +77,12 @@ namespace OpenRA.Graphics
|
||||
for (float y = r.Top; y < r.Bottom; y++)
|
||||
DrawLine(new float2(r.Left, y), new float2(r.Right, y), color, color);
|
||||
}
|
||||
|
||||
public void SetShaderParams(ITexture palette, Size screen, float zoom, float2 scroll)
|
||||
{
|
||||
shader.SetVec("Scroll", (int)scroll.X, (int)scroll.Y);
|
||||
shader.SetVec("r1", zoom*2f/screen.Width, -zoom*2f/screen.Height);
|
||||
shader.SetVec("r2", -1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,13 +32,11 @@ namespace OpenRA.Graphics
|
||||
var height = map.Bounds.Height;
|
||||
|
||||
if (!actualSize)
|
||||
{
|
||||
width = height = Exts.NextPowerOf2(Math.Max(map.Bounds.Width, map.Bounds.Height));
|
||||
}
|
||||
|
||||
var terrain = new Bitmap(width, height);
|
||||
|
||||
var bitmapData = terrain.LockBits(new Rectangle(0, 0, terrain.Width, terrain.Height),
|
||||
var bitmapData = terrain.LockBits(terrain.Bounds(),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
|
||||
unsafe
|
||||
@@ -69,7 +67,7 @@ namespace OpenRA.Graphics
|
||||
Bitmap terrain = new Bitmap(terrainBitmap);
|
||||
var tileset = Rules.TileSets[map.Tileset];
|
||||
|
||||
var bitmapData = terrain.LockBits(new Rectangle(0, 0, terrain.Width, terrain.Height),
|
||||
var bitmapData = terrain.LockBits(terrain.Bounds(),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
|
||||
unsafe
|
||||
@@ -104,7 +102,7 @@ namespace OpenRA.Graphics
|
||||
var map = world.Map;
|
||||
var size = Exts.NextPowerOf2(Math.Max(map.Bounds.Width, map.Bounds.Height));
|
||||
var bitmap = new Bitmap(size, size);
|
||||
var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
|
||||
unsafe
|
||||
@@ -132,7 +130,7 @@ namespace OpenRA.Graphics
|
||||
var map = world.Map;
|
||||
var size = Exts.NextPowerOf2(Math.Max(map.Bounds.Width, map.Bounds.Height));
|
||||
var bitmap = new Bitmap(size, size);
|
||||
var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
|
||||
unsafe
|
||||
@@ -141,7 +139,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
foreach (var t in world.ActorsWithTrait<IRadarSignature>())
|
||||
{
|
||||
if (!world.LocalShroud.IsVisible(t.Actor))
|
||||
if (!world.RenderedShroud.IsVisible(t.Actor))
|
||||
continue;
|
||||
|
||||
var color = t.Trait.RadarSignatureColor(t.Actor);
|
||||
@@ -160,10 +158,10 @@ namespace OpenRA.Graphics
|
||||
var map = world.Map;
|
||||
var size = Exts.NextPowerOf2(Math.Max(map.Bounds.Width, map.Bounds.Height));
|
||||
var bitmap = new Bitmap(size, size);
|
||||
if (world.LocalShroud.Disabled)
|
||||
if (world.RenderedShroud.Disabled)
|
||||
return bitmap;
|
||||
|
||||
var bitmapData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height),
|
||||
var bitmapData = bitmap.LockBits(bitmap.Bounds(),
|
||||
ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);
|
||||
|
||||
var shroud = Color.Black.ToArgb();
|
||||
@@ -178,9 +176,9 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
var mapX = x + map.Bounds.Left;
|
||||
var mapY = y + map.Bounds.Top;
|
||||
if (!world.LocalShroud.IsExplored(mapX, mapY))
|
||||
if (!world.RenderedShroud.IsExplored(mapX, mapY))
|
||||
*(c + (y * bitmapData.Stride >> 2) + x) = shroud;
|
||||
else if (!world.LocalShroud.IsVisible(mapX,mapY))
|
||||
else if (!world.RenderedShroud.IsVisible(mapX,mapY))
|
||||
*(c + (y * bitmapData.Stride >> 2) + x) = fog;
|
||||
}
|
||||
}
|
||||
|
||||
67
OpenRA.Game/Graphics/QuadRenderer.cs
Normal file
67
OpenRA.Game/Graphics/QuadRenderer.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
#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.FileFormats.Graphics;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public class QuadRenderer : Renderer.IBatchRenderer
|
||||
{
|
||||
Renderer renderer;
|
||||
IShader shader;
|
||||
|
||||
Vertex[] vertices = new Vertex[Renderer.TempBufferSize];
|
||||
int nv = 0;
|
||||
|
||||
public QuadRenderer(Renderer renderer, IShader shader)
|
||||
{
|
||||
this.renderer = renderer;
|
||||
this.shader = shader;
|
||||
}
|
||||
|
||||
public void Flush()
|
||||
{
|
||||
if (nv > 0)
|
||||
{
|
||||
shader.Render(() =>
|
||||
{
|
||||
var vb = renderer.GetTempVertexBuffer();
|
||||
vb.SetData(vertices, nv);
|
||||
renderer.DrawBatch(vb, 0, nv, PrimitiveType.QuadList);
|
||||
});
|
||||
|
||||
nv = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void FillRect(RectangleF r, Color color)
|
||||
{
|
||||
Renderer.CurrentBatchRenderer = this;
|
||||
|
||||
if (nv + 4 > Renderer.TempBufferSize)
|
||||
Flush();
|
||||
|
||||
vertices[nv] = new Vertex(new float2(r.Left, r.Top), new float2(color.R / 255.0f, color.G / 255.0f), new float2(color.B / 255.0f, color.A / 255.0f));
|
||||
vertices[nv + 1] = new Vertex(new float2(r.Right, r.Top), new float2(color.R / 255.0f, color.G / 255.0f), new float2(color.B / 255.0f, color.A / 255.0f));
|
||||
vertices[nv + 2] = new Vertex(new float2(r.Right, r.Bottom), new float2(color.R / 255.0f, color.G / 255.0f), new float2(color.B / 255.0f, color.A / 255.0f));
|
||||
vertices[nv + 3] = new Vertex(new float2(r.Left, r.Bottom), new float2(color.R / 255.0f, color.G / 255.0f), new float2(color.B / 255.0f, color.A / 255.0f));
|
||||
|
||||
nv += 4;
|
||||
}
|
||||
|
||||
public void SetShaderParams(ITexture palette, Size screen, float zoom, float2 scroll)
|
||||
{
|
||||
shader.SetVec("Scroll", (int)scroll.X, (int)scroll.Y);
|
||||
shader.SetVec("r1", zoom*2f/screen.Width, -zoom*2f/screen.Height);
|
||||
shader.SetVec("r2", -1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,9 @@ namespace OpenRA.Graphics
|
||||
internal static int SheetSize;
|
||||
internal static int TempBufferSize;
|
||||
internal static int TempBufferCount;
|
||||
internal IShader WorldSpriteShader { get; private set; }
|
||||
internal IShader WorldLineShader { get; private set; }
|
||||
internal IShader LineShader { get; private set; }
|
||||
internal IShader RgbaSpriteShader { get; private set; }
|
||||
internal IShader SpriteShader { get; private set; }
|
||||
|
||||
public SpriteRenderer WorldSpriteRenderer { get; private set; }
|
||||
public QuadRenderer WorldQuadRenderer { get; private set; }
|
||||
public LineRenderer WorldLineRenderer { get; private set; }
|
||||
public LineRenderer LineRenderer { get; private set; }
|
||||
public SpriteRenderer RgbaSpriteRenderer { get; private set; }
|
||||
@@ -50,20 +46,15 @@ namespace OpenRA.Graphics
|
||||
TempBufferCount = Game.Settings.Graphics.NumTempBuffers;
|
||||
SheetSize = Game.Settings.Graphics.SheetSize;
|
||||
|
||||
WorldSpriteShader = device.CreateShader("world-shp");
|
||||
WorldLineShader = device.CreateShader("world-line");
|
||||
LineShader = device.CreateShader("chrome-line");
|
||||
RgbaSpriteShader = device.CreateShader("chrome-rgba");
|
||||
SpriteShader = device.CreateShader("chrome-shp");
|
||||
WorldSpriteRenderer = new SpriteRenderer(this, device.CreateShader("shp"));
|
||||
WorldLineRenderer = new LineRenderer(this, device.CreateShader("line"));
|
||||
LineRenderer = new LineRenderer(this, device.CreateShader("line"));
|
||||
WorldQuadRenderer = new QuadRenderer(this, device.CreateShader("line"));
|
||||
RgbaSpriteRenderer = new SpriteRenderer(this, device.CreateShader("rgba"));
|
||||
SpriteRenderer = new SpriteRenderer(this, device.CreateShader("shp"));
|
||||
|
||||
WorldSpriteRenderer = new SpriteRenderer( this, WorldSpriteShader );
|
||||
WorldLineRenderer = new LineRenderer(this, WorldLineShader);
|
||||
LineRenderer = new LineRenderer(this, LineShader);
|
||||
RgbaSpriteRenderer = new SpriteRenderer( this, RgbaSpriteShader );
|
||||
SpriteRenderer = new SpriteRenderer( this, SpriteShader );
|
||||
|
||||
for( int i = 0 ; i < TempBufferCount ; i++ )
|
||||
tempBuffers.Enqueue( device.CreateVertexBuffer( TempBufferSize ) );
|
||||
for (int i = 0; i < TempBufferCount; i++)
|
||||
tempBuffers.Enqueue(device.CreateVertexBuffer(TempBufferSize));
|
||||
}
|
||||
|
||||
public void InitializeFonts(Manifest m)
|
||||
@@ -76,26 +67,15 @@ namespace OpenRA.Graphics
|
||||
public void BeginFrame(float2 scroll, float zoom)
|
||||
{
|
||||
device.Clear();
|
||||
float2 r1 = new float2(2f/Resolution.Width, -2f/Resolution.Height);
|
||||
float2 r2 = new float2(-1, 1);
|
||||
var zr1 = zoom*r1;
|
||||
|
||||
SetShaderParams( WorldSpriteShader, zr1, r2, scroll );
|
||||
SetShaderParams( WorldLineShader, zr1, r2, scroll );
|
||||
SetShaderParams( LineShader, r1, r2, scroll );
|
||||
SetShaderParams( RgbaSpriteShader, r1, r2, scroll );
|
||||
SetShaderParams( SpriteShader, r1, r2, scroll );
|
||||
WorldSpriteRenderer.SetShaderParams(PaletteTexture, Resolution, zoom, scroll);
|
||||
WorldLineRenderer.SetShaderParams(PaletteTexture, Resolution, zoom, scroll);
|
||||
WorldQuadRenderer.SetShaderParams(PaletteTexture, Resolution, zoom, scroll);
|
||||
SpriteRenderer.SetShaderParams(PaletteTexture, Resolution, 1f, float2.Zero);
|
||||
LineRenderer.SetShaderParams(PaletteTexture, Resolution, 1f, float2.Zero);
|
||||
RgbaSpriteRenderer.SetShaderParams(PaletteTexture, Resolution, 1f, float2.Zero);
|
||||
}
|
||||
|
||||
void SetShaderParams( IShader s, float2 r1, float2 r2, float2 scroll )
|
||||
{
|
||||
s.SetValue( "Palette", PaletteTexture );
|
||||
s.SetValue( "Scroll", (int) scroll.X, (int) scroll.Y );
|
||||
s.SetValue( "r1", r1.X, r1.Y );
|
||||
s.SetValue( "r2", r2.X, r2.Y );
|
||||
}
|
||||
|
||||
public void EndFrame( IInputHandler inputHandler )
|
||||
public void EndFrame(IInputHandler inputHandler)
|
||||
{
|
||||
Flush();
|
||||
device.PumpInput(inputHandler);
|
||||
@@ -129,14 +109,17 @@ namespace OpenRA.Graphics
|
||||
// which makes the window non-interactive in Windowed/Pseudofullscreen mode.
|
||||
static Screen FixOSX() { return Screen.PrimaryScreen; }
|
||||
|
||||
internal static void Initialize( WindowMode windowMode )
|
||||
internal static void Initialize(WindowMode windowMode)
|
||||
{
|
||||
if (Platform.CurrentPlatform == PlatformType.OSX)
|
||||
FixOSX();
|
||||
|
||||
var resolution = GetResolution( windowMode );
|
||||
var rendererPath = Path.GetFullPath( "OpenRA.Renderer.{0}.dll".F(Game.Settings.Graphics.Renderer) );
|
||||
device = CreateDevice( Assembly.LoadFile( rendererPath ), resolution.Width, resolution.Height, windowMode );
|
||||
var resolution = GetResolution(windowMode);
|
||||
|
||||
string renderer = Game.Settings.Server.Dedicated ? "Null" : Game.Settings.Graphics.Renderer;
|
||||
var rendererPath = Path.GetFullPath("OpenRA.Renderer.{0}.dll".F(renderer));
|
||||
|
||||
device = CreateDevice(Assembly.LoadFile(rendererPath), resolution.Width, resolution.Height, windowMode);
|
||||
}
|
||||
|
||||
static Size GetResolution(WindowMode windowmode)
|
||||
@@ -147,12 +130,12 @@ namespace OpenRA.Graphics
|
||||
return new Size(size.X, size.Y);
|
||||
}
|
||||
|
||||
static IGraphicsDevice CreateDevice( Assembly rendererDll, int width, int height, WindowMode window )
|
||||
static IGraphicsDevice CreateDevice(Assembly rendererDll, int width, int height, WindowMode window)
|
||||
{
|
||||
foreach( RendererAttribute r in rendererDll.GetCustomAttributes( typeof( RendererAttribute ), false ) )
|
||||
foreach (RendererAttribute r in rendererDll.GetCustomAttributes(typeof(RendererAttribute), false))
|
||||
{
|
||||
var factory = (IDeviceFactory) r.Type.GetConstructor( Type.EmptyTypes ).Invoke( null );
|
||||
return factory.Create( new Size( width, height ), window );
|
||||
var factory = (IDeviceFactory)r.Type.GetConstructor(Type.EmptyTypes).Invoke(null);
|
||||
return factory.Create(new Size(width, height), window);
|
||||
}
|
||||
|
||||
throw new InvalidOperationException("Renderer DLL is missing RendererAttribute to tell us what type to use!");
|
||||
@@ -161,7 +144,7 @@ namespace OpenRA.Graphics
|
||||
internal IVertexBuffer<Vertex> GetTempVertexBuffer()
|
||||
{
|
||||
var ret = tempBuffers.Dequeue();
|
||||
tempBuffers.Enqueue( ret );
|
||||
tempBuffers.Enqueue(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -173,8 +156,8 @@ namespace OpenRA.Graphics
|
||||
get { return currentBatchRenderer; }
|
||||
set
|
||||
{
|
||||
if( currentBatchRenderer == value ) return;
|
||||
if( currentBatchRenderer != null )
|
||||
if (currentBatchRenderer == value) return;
|
||||
if (currentBatchRenderer != null)
|
||||
currentBatchRenderer.Flush();
|
||||
currentBatchRenderer = value;
|
||||
}
|
||||
@@ -183,7 +166,7 @@ namespace OpenRA.Graphics
|
||||
public void EnableScissor(int left, int top, int width, int height)
|
||||
{
|
||||
Flush();
|
||||
Device.EnableScissor( left, top, width, height );
|
||||
Device.EnableScissor(left, top, width, height);
|
||||
}
|
||||
|
||||
public void DisableScissor()
|
||||
|
||||
@@ -18,19 +18,19 @@ namespace OpenRA.Graphics
|
||||
public class Sequence
|
||||
{
|
||||
readonly Sprite[] sprites;
|
||||
readonly int start, length, facings, tick;
|
||||
readonly int start, length, stride, facings, tick;
|
||||
|
||||
public readonly string Name;
|
||||
public int Start { get { return start; } }
|
||||
public int End { get { return start + length; } }
|
||||
public int Length { get { return length; } }
|
||||
public int Stride { get { return stride; } }
|
||||
public int Facings { get { return facings; } }
|
||||
public int Tick { get { return tick; } }
|
||||
|
||||
string srcOverride;
|
||||
public Sequence(string unit, string name, MiniYaml info)
|
||||
{
|
||||
srcOverride = info.Value;
|
||||
var srcOverride = info.Value;
|
||||
Name = name;
|
||||
var d = info.NodesDict;
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace OpenRA.Graphics
|
||||
else
|
||||
length = int.Parse(d["Length"].Value);
|
||||
|
||||
if (d.ContainsKey("Stride"))
|
||||
stride = int.Parse(d["Stride"].Value);
|
||||
else
|
||||
stride = length;
|
||||
|
||||
if(d.ContainsKey("Facings"))
|
||||
facings = int.Parse(d["Facings"].Value);
|
||||
@@ -55,33 +59,18 @@ namespace OpenRA.Graphics
|
||||
else
|
||||
tick = 40;
|
||||
|
||||
if (start < 0 || start + facings * length > sprites.Length)
|
||||
if (length > stride)
|
||||
throw new InvalidOperationException(
|
||||
"{0}: Sequence {1}.{2}: Length must be <= stride"
|
||||
.F(info.Nodes[0].Location, unit, name));
|
||||
|
||||
if (start < 0 || start + facings * stride > sprites.Length)
|
||||
throw new InvalidOperationException(
|
||||
"{6}: Sequence {0}.{1} uses frames [{2}..{3}] of SHP `{4}`, but only 0..{5} actually exist"
|
||||
.F(unit, name, start, start + facings * length - 1, srcOverride ?? unit, sprites.Length - 1,
|
||||
.F(unit, name, start, start + facings * stride - 1, srcOverride ?? unit, sprites.Length - 1,
|
||||
info.Nodes[0].Location));
|
||||
}
|
||||
|
||||
public MiniYaml Save()
|
||||
{
|
||||
var root = new List<MiniYamlNode>();
|
||||
|
||||
root.Add(new MiniYamlNode("Start", start.ToString()));
|
||||
|
||||
if (length > 1 && (start != 0 || length != sprites.Length - start))
|
||||
root.Add(new MiniYamlNode("Length", length.ToString()));
|
||||
else if (length > 1 && length == sprites.Length - start)
|
||||
root.Add(new MiniYamlNode("Length", "*"));
|
||||
|
||||
if (facings > 1)
|
||||
root.Add(new MiniYamlNode("Facings", facings.ToString()));
|
||||
|
||||
if (tick != 40)
|
||||
root.Add(new MiniYamlNode("Tick", tick.ToString()));
|
||||
|
||||
return new MiniYaml(srcOverride, root);
|
||||
}
|
||||
|
||||
public Sprite GetSprite( int frame )
|
||||
{
|
||||
return GetSprite( frame, 0 );
|
||||
@@ -90,7 +79,7 @@ namespace OpenRA.Graphics
|
||||
public Sprite GetSprite(int frame, int facing)
|
||||
{
|
||||
var f = Traits.Util.QuantizeFacing( facing, facings );
|
||||
return sprites[ (f * length) + ( frame % length ) + start ];
|
||||
return sprites[ (f * stride) + ( frame % length ) + start ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,21 +15,25 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
public class ShroudRenderer
|
||||
{
|
||||
Traits.Shroud shroud;
|
||||
World world;
|
||||
Traits.Shroud shroud {
|
||||
get {
|
||||
return world.RenderedShroud;
|
||||
}
|
||||
}
|
||||
|
||||
Sprite[] shadowBits = Game.modData.SpriteLoader.LoadAllSprites("shadow");
|
||||
Sprite[,] sprites, fogSprites;
|
||||
|
||||
bool dirty = true;
|
||||
Map map;
|
||||
|
||||
public ShroudRenderer(World world)
|
||||
{
|
||||
this.shroud = world.LocalShroud;
|
||||
this.world = world;
|
||||
this.map = world.Map;
|
||||
|
||||
sprites = new Sprite[map.MapSize.X, map.MapSize.Y];
|
||||
fogSprites = new Sprite[map.MapSize.X, map.MapSize.Y];
|
||||
shroud.Dirty += () => dirty = true;
|
||||
}
|
||||
|
||||
static readonly byte[][] SpecialShroudTiles =
|
||||
@@ -101,11 +105,20 @@ namespace OpenRA.Graphics
|
||||
return shadowBits[SpecialShroudTiles[u ^ uSides][v]];
|
||||
}
|
||||
|
||||
internal void Draw( WorldRenderer wr )
|
||||
bool initializePalettes = true;
|
||||
PaletteReference fogPalette, shroudPalette;
|
||||
internal void Draw(WorldRenderer wr)
|
||||
{
|
||||
if (dirty)
|
||||
if (initializePalettes)
|
||||
{
|
||||
dirty = false;
|
||||
fogPalette = wr.Palette("fog");
|
||||
shroudPalette = wr.Palette("shroud");
|
||||
initializePalettes = false;
|
||||
}
|
||||
|
||||
if (shroud != null && shroud.dirty)
|
||||
{
|
||||
shroud.dirty = false;
|
||||
for (int i = map.Bounds.Left; i < map.Bounds.Right; i++)
|
||||
for (int j = map.Bounds.Top; j < map.Bounds.Bottom; j++)
|
||||
sprites[i, j] = ChooseShroud(i, j);
|
||||
@@ -116,14 +129,13 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
|
||||
var clipRect = Game.viewport.WorldBounds(wr.world);
|
||||
DrawShroud( wr, clipRect, fogSprites, "fog" );
|
||||
DrawShroud( wr, clipRect, sprites, "shroud" );
|
||||
DrawShroud(wr, clipRect, sprites, shroudPalette);
|
||||
if (wr.world.WorldActor.HasTrait<Fog>())
|
||||
DrawShroud(wr, clipRect, fogSprites, fogPalette);
|
||||
}
|
||||
|
||||
void DrawShroud( WorldRenderer wr, Rectangle clip, Sprite[,] s, string pal )
|
||||
void DrawShroud(WorldRenderer wr, Rectangle clip, Sprite[,] s, PaletteReference pal)
|
||||
{
|
||||
var shroudPalette = wr.GetPaletteIndex(pal);
|
||||
|
||||
for (var j = clip.Top; j < clip.Bottom; j++)
|
||||
{
|
||||
var starti = clip.Left;
|
||||
@@ -138,14 +150,14 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
s[starti, j].DrawAt(
|
||||
Game.CellSize * new float2(starti, j),
|
||||
shroudPalette,
|
||||
pal.Index,
|
||||
new float2(Game.CellSize * (i - starti), Game.CellSize));
|
||||
starti = i + 1;
|
||||
}
|
||||
|
||||
s[i, j].DrawAt(
|
||||
Game.CellSize * new float2(i, j),
|
||||
shroudPalette);
|
||||
pal.Index);
|
||||
starti = i + 1;
|
||||
last = s[i, j];
|
||||
}
|
||||
@@ -153,7 +165,7 @@ namespace OpenRA.Graphics
|
||||
if (starti < clip.Right)
|
||||
s[starti, j].DrawAt(
|
||||
Game.CellSize * new float2(starti, j),
|
||||
shroudPalette,
|
||||
pal.Index,
|
||||
new float2(Game.CellSize * (clip.Right - starti), Game.CellSize));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Graphics
|
||||
Sprite[] LoadSprites(string filename)
|
||||
{
|
||||
var shp = new ShpReader(FileSystem.OpenWithExts(filename, exts));
|
||||
return shp.Select(a => SheetBuilder.Add(a.Image, shp.Size)).ToArray();
|
||||
return shp.Frames.Select(a => SheetBuilder.Add(a.Image, shp.Size)).ToArray();
|
||||
}
|
||||
|
||||
public Sprite[] LoadAllSprites(string filename) { return sprites[filename]; }
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats.Graphics;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
@@ -27,14 +28,11 @@ namespace OpenRA.Graphics
|
||||
this.shader = shader;
|
||||
}
|
||||
|
||||
public SpriteRenderer(Renderer renderer)
|
||||
: this(renderer, renderer.SpriteShader) { }
|
||||
|
||||
public void Flush()
|
||||
{
|
||||
if (nv > 0)
|
||||
{
|
||||
shader.SetValue( "DiffuseTexture", currentSheet.Texture );
|
||||
shader.SetTexture("DiffuseTexture", currentSheet.Texture);
|
||||
shader.Render(() =>
|
||||
{
|
||||
var vb = renderer.GetTempVertexBuffer();
|
||||
@@ -49,12 +47,12 @@ namespace OpenRA.Graphics
|
||||
|
||||
public void DrawSprite(Sprite s, float2 location, WorldRenderer wr, string palette)
|
||||
{
|
||||
DrawSprite(s, location, wr.GetPaletteIndex(palette), s.size);
|
||||
DrawSprite(s, location, wr.Palette(palette).Index, s.size);
|
||||
}
|
||||
|
||||
public void DrawSprite(Sprite s, float2 location, WorldRenderer wr, string palette, float2 size)
|
||||
{
|
||||
DrawSprite(s, location, wr.GetPaletteIndex(palette), size);
|
||||
DrawSprite(s, location, wr.Palette(palette).Index, size);
|
||||
}
|
||||
|
||||
public void DrawSprite(Sprite s, float2 location, int paletteIndex, float2 size)
|
||||
@@ -72,7 +70,6 @@ namespace OpenRA.Graphics
|
||||
nv += 4;
|
||||
}
|
||||
|
||||
|
||||
// For RGBASpriteRenderer, which doesn't use palettes
|
||||
public void DrawSprite(Sprite s, float2 location)
|
||||
{
|
||||
@@ -83,5 +80,19 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
DrawSprite(s, location, 0, size);
|
||||
}
|
||||
|
||||
public void DrawVertexBuffer(IVertexBuffer<Vertex> buffer, int start, int length, PrimitiveType type, Sheet sheet)
|
||||
{
|
||||
shader.SetTexture("DiffuseTexture", sheet.Texture);
|
||||
shader.Render(() => renderer.DrawBatch(buffer, start, length, type));
|
||||
}
|
||||
|
||||
public void SetShaderParams(ITexture palette, Size screen, float zoom, float2 scroll)
|
||||
{
|
||||
shader.SetTexture("Palette", palette);
|
||||
shader.SetVec("Scroll", (int)scroll.X, (int)scroll.Y);
|
||||
shader.SetVec("r1", zoom*2f/screen.Width, -zoom*2f/screen.Height);
|
||||
shader.SetVec("r2", -1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
int nv = 0;
|
||||
|
||||
var terrainPalette = Game.modData.Palette.GetPaletteIndex("terrain");
|
||||
var terrainPalette = wr.Palette("terrain").Index;
|
||||
|
||||
for( int j = map.Bounds.Top; j < map.Bounds.Bottom; j++ )
|
||||
for( int i = map.Bounds.Left; i < map.Bounds.Right; i++ )
|
||||
@@ -50,7 +50,7 @@ namespace OpenRA.Graphics
|
||||
nv += 4;
|
||||
|
||||
if (tileMapping[map.MapTiles.Value[i, j]].sheet != terrainSheet)
|
||||
throw new InvalidOperationException("Terrain sprites span multiple sheets");
|
||||
throw new InvalidOperationException("Terrain sprites span multiple sheets. Try increasing Game.Settings.Graphics.SheetSize.");
|
||||
}
|
||||
|
||||
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer( vertices.Length );
|
||||
@@ -72,9 +72,9 @@ namespace OpenRA.Graphics
|
||||
if (firstRow < 0) firstRow = 0;
|
||||
if (lastRow > map.Bounds.Height) lastRow = map.Bounds.Height;
|
||||
|
||||
if (world.LocalPlayer != null && !world.LocalShroud.Disabled && world.LocalShroud.Bounds.HasValue)
|
||||
if (world.RenderedPlayer != null && !world.RenderedShroud.Disabled && world.RenderedShroud.Bounds.HasValue)
|
||||
{
|
||||
var r = world.LocalShroud.Bounds.Value;
|
||||
var r = world.RenderedShroud.Bounds.Value;
|
||||
if (firstRow < r.Top - map.Bounds.Top)
|
||||
firstRow = r.Top - map.Bounds.Top;
|
||||
|
||||
@@ -84,11 +84,9 @@ namespace OpenRA.Graphics
|
||||
|
||||
if( lastRow < firstRow ) lastRow = firstRow;
|
||||
|
||||
Game.Renderer.WorldSpriteShader.SetValue( "DiffuseTexture", terrainSheet.Texture );
|
||||
Game.Renderer.WorldSpriteShader.Render(() =>
|
||||
Game.Renderer.DrawBatch(vertexBuffer,
|
||||
verticesPerRow * firstRow, verticesPerRow * (lastRow - firstRow),
|
||||
PrimitiveType.QuadList));
|
||||
Game.Renderer.WorldSpriteRenderer.DrawVertexBuffer(
|
||||
vertexBuffer, verticesPerRow * firstRow, verticesPerRow * (lastRow - firstRow),
|
||||
PrimitiveType.QuadList, terrainSheet);
|
||||
|
||||
foreach (var r in world.WorldActor.TraitsImplementing<IRenderOverlay>())
|
||||
r.Render( wr );
|
||||
|
||||
@@ -8,40 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using OpenRA.FileFormats.Graphics;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public static class Util
|
||||
{
|
||||
public static string[] ReadAllLines(Stream s)
|
||||
{
|
||||
List<string> result = new List<string>();
|
||||
using (StreamReader reader = new StreamReader(s))
|
||||
while(!reader.EndOfStream)
|
||||
{
|
||||
var line = reader.ReadLine();
|
||||
if( !string.IsNullOrEmpty( line ) && line[0] != '#' )
|
||||
result.Add( line );
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
}
|
||||
|
||||
public static T[] MakeArray<T>(int count, Converter<int, T> f)
|
||||
{
|
||||
T[] result = new T[count];
|
||||
for (int i = 0; i < count; i++)
|
||||
result[i] = f(i);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static float[] channelSelect = { 0.75f, 0.25f, -0.25f, -0.75f };
|
||||
|
||||
public static void FastCreateQuad(Vertex[] vertices, float2 o, Sprite r, int palette, int nv, float2 size)
|
||||
@@ -59,6 +31,7 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
|
||||
static readonly int[] channelMasks = { 2, 1, 0, 3 }; // yes, our channel order is nuts.
|
||||
|
||||
public static void FastCopyIntoChannel(Sprite dest, byte[] src)
|
||||
{
|
||||
var data = dest.sheet.Data;
|
||||
@@ -79,28 +52,5 @@ namespace OpenRA.Graphics
|
||||
destOffset += destSkip;
|
||||
}
|
||||
}
|
||||
|
||||
public static Color Lerp(float t, Color a, Color b)
|
||||
{
|
||||
return Color.FromArgb(
|
||||
LerpChannel(t, a.A, b.A),
|
||||
LerpChannel(t, a.R, b.R),
|
||||
LerpChannel(t, a.G, b.G),
|
||||
LerpChannel(t, a.B, b.B));
|
||||
}
|
||||
|
||||
public static int LerpARGBColor(float t, int c1, int c2)
|
||||
{
|
||||
int a = LerpChannel(t, (c1 >> 24) & 255, (c2 >> 24) & 255);
|
||||
int r = LerpChannel(t, (c1 >> 16) & 255, (c2 >> 16) & 255);
|
||||
int g = LerpChannel(t, (c1 >> 8) & 255, (c2 >> 8) & 255);
|
||||
int b = LerpChannel(t, c1 & 255, c2 & 255);
|
||||
return (a << 24) | (r << 16) | (g << 8) | b;
|
||||
}
|
||||
|
||||
public static int LerpChannel(float t, int a, int b)
|
||||
{
|
||||
return (int)((1 - t) * a + t * b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,14 +127,9 @@ namespace OpenRA.Graphics
|
||||
using( new PerfSample("render_widgets") )
|
||||
{
|
||||
Ui.Draw();
|
||||
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
|
||||
var cursorSequence = CursorProvider.GetCursorSequence(cursorName);
|
||||
var cursorSprite = cursorSequence.GetSprite((int)cursorFrame);
|
||||
|
||||
renderer.SpriteRenderer.DrawSprite(cursorSprite,
|
||||
Viewport.LastMousePos - cursorSequence.Hotspot,
|
||||
Game.modData.Palette.GetPaletteIndex(cursorSequence.Palette),
|
||||
cursorSprite.size);
|
||||
var cursorName = Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default";
|
||||
CursorProvider.DrawCursor(renderer, cursorName, Viewport.LastMousePos, (int)cursorFrame);
|
||||
}
|
||||
|
||||
using( new PerfSample("render_flip") )
|
||||
@@ -149,18 +144,18 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
|
||||
// Convert from viewport coords to cell coords (not px)
|
||||
public float2 ViewToWorld(MouseInput mi) { return ViewToWorld(mi.Location); }
|
||||
public float2 ViewToWorld(int2 loc)
|
||||
public CPos ViewToWorld(MouseInput mi) { return ViewToWorld(mi.Location); }
|
||||
public CPos ViewToWorld(int2 loc)
|
||||
{
|
||||
return (1f / Game.CellSize) * (1f/Zoom*loc.ToFloat2() + Location);
|
||||
return (CPos)( (1f / Game.CellSize) * (1f/Zoom*loc.ToFloat2() + Location) ).ToInt2();
|
||||
}
|
||||
|
||||
public int2 ViewToWorldPx(int2 loc) { return (1f/Zoom*loc.ToFloat2() + Location).ToInt2(); }
|
||||
public int2 ViewToWorldPx(MouseInput mi) { return ViewToWorldPx(mi.Location); }
|
||||
public PPos ViewToWorldPx(int2 loc) { return (PPos)(1f/Zoom*loc.ToFloat2() + Location).ToInt2(); }
|
||||
public PPos ViewToWorldPx(MouseInput mi) { return ViewToWorldPx(mi.Location); }
|
||||
|
||||
public void Center(float2 loc)
|
||||
{
|
||||
scrollPosition = NormalizeScrollPosition((Game.CellSize*loc - 1f/(2*Zoom)*screenSize.ToFloat2()).ToInt2());
|
||||
scrollPosition = NormalizeScrollPosition((Game.CellSize * loc - 1f/(2*Zoom)*screenSize.ToFloat2()).ToInt2());
|
||||
}
|
||||
|
||||
public void Center(IEnumerable<Actor> actors)
|
||||
@@ -168,9 +163,9 @@ namespace OpenRA.Graphics
|
||||
if (!actors.Any()) return;
|
||||
|
||||
var avgPos = actors
|
||||
.Select(a => a.CenterLocation)
|
||||
.Select(a => (PVecInt)a.CenterLocation)
|
||||
.Aggregate((a, b) => a + b) / actors.Count();
|
||||
scrollPosition = NormalizeScrollPosition((avgPos - 1f/(2*Zoom)*screenSize.ToFloat2()).ToInt2());
|
||||
scrollPosition = NormalizeScrollPosition(((PVecFloat)avgPos - (PVecFloat)(1f / (2 * Zoom) * screenSize.ToFloat2())).ToInt2());
|
||||
}
|
||||
|
||||
// Rectangle (in viewport coords) that contains things to be drawn
|
||||
@@ -202,7 +197,7 @@ namespace OpenRA.Graphics
|
||||
cachedScroll = scrollPosition;
|
||||
}
|
||||
|
||||
var b = world.LocalShroud.Bounds;
|
||||
var b = world.RenderedShroud.Bounds;
|
||||
return (b.HasValue) ? Rectangle.Intersect(cachedRect, b.Value) : cachedRect;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,27 +17,54 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
public class PaletteReference
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly int Index;
|
||||
public readonly Palette Palette;
|
||||
public PaletteReference(string name, int index, Palette palette)
|
||||
{
|
||||
Name = name;
|
||||
Index = index;
|
||||
Palette = palette;
|
||||
}
|
||||
}
|
||||
|
||||
public class WorldRenderer
|
||||
{
|
||||
public readonly World world;
|
||||
internal readonly TerrainRenderer terrainRenderer;
|
||||
internal readonly ShroudRenderer shroudRenderer;
|
||||
internal readonly HardwarePalette palette;
|
||||
internal Cache<string, PaletteReference> palettes;
|
||||
|
||||
internal WorldRenderer(World world)
|
||||
{
|
||||
this.world = world;
|
||||
this.palette = Game.modData.Palette;
|
||||
foreach( var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>( world ) )
|
||||
palette = new HardwarePalette();
|
||||
|
||||
palettes = new Cache<string, PaletteReference>(CreatePaletteReference);
|
||||
foreach (var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>(world))
|
||||
pal.Trait.InitPalette( this );
|
||||
|
||||
// Generate initial palette texture
|
||||
palette.Update(new IPaletteModifier[] {});
|
||||
|
||||
terrainRenderer = new TerrainRenderer(world, this);
|
||||
shroudRenderer = new ShroudRenderer(world);
|
||||
}
|
||||
|
||||
public int GetPaletteIndex(string name) { return palette.GetPaletteIndex(name); }
|
||||
public Palette GetPalette(string name) { return palette.GetPalette(name); }
|
||||
public void AddPalette(string name, Palette pal) { palette.AddPalette(name, pal); }
|
||||
PaletteReference CreatePaletteReference(string name)
|
||||
{
|
||||
var pal = palette.GetPalette(name);
|
||||
if (pal == null)
|
||||
throw new InvalidOperationException("Palette `{0}` does not exist".F(name));
|
||||
|
||||
return new PaletteReference(name, palette.GetPaletteIndex(name), pal);
|
||||
}
|
||||
|
||||
public PaletteReference Palette(string name) { return palettes[name]; }
|
||||
public void AddPalette(string name, Palette pal, bool allowModifiers) { palette.AddPalette(name, pal, allowModifiers); }
|
||||
|
||||
class SpriteComparer : IComparer<Renderable>
|
||||
{
|
||||
@@ -53,13 +80,14 @@ namespace OpenRA.Graphics
|
||||
var comparer = new SpriteComparer();
|
||||
|
||||
var actors = world.FindUnits(
|
||||
new int2(Game.CellSize*bounds.Left, Game.CellSize*bounds.Top),
|
||||
new int2(Game.CellSize*bounds.Right, Game.CellSize*bounds.Bottom));
|
||||
bounds.TopLeftAsCPos().ToPPos(),
|
||||
bounds.BottomRightAsCPos().ToPPos()
|
||||
);
|
||||
|
||||
var renderables = actors.SelectMany(a => a.Render())
|
||||
var renderables = actors.SelectMany(a => a.Render(this))
|
||||
.OrderBy(r => r, comparer);
|
||||
|
||||
var effects = world.Effects.SelectMany(e => e.Render());
|
||||
var effects = world.Effects.SelectMany(e => e.Render(this));
|
||||
|
||||
return renderables.Concat(effects);
|
||||
}
|
||||
@@ -76,8 +104,8 @@ namespace OpenRA.Graphics
|
||||
|
||||
terrainRenderer.Draw(this, Game.viewport);
|
||||
foreach (var a in world.traitDict.ActorsWithTraitMultiple<IRenderAsTerrain>(world))
|
||||
foreach (var r in a.Trait.RenderAsTerrain(a.Actor))
|
||||
r.Sprite.DrawAt(r.Pos, this.GetPaletteIndex(r.Palette), r.Scale);
|
||||
foreach (var r in a.Trait.RenderAsTerrain(this, a.Actor))
|
||||
r.Sprite.DrawAt(r.Pos, r.Palette.Index, r.Scale);
|
||||
|
||||
foreach (var a in world.Selection.Actors)
|
||||
if (!a.Destroyed)
|
||||
@@ -90,7 +118,7 @@ namespace OpenRA.Graphics
|
||||
world.OrderGenerator.RenderBeforeWorld(this, world);
|
||||
|
||||
foreach (var image in SpritesToRender())
|
||||
image.Sprite.DrawAt(image.Pos, this.GetPaletteIndex(image.Palette), image.Scale);
|
||||
image.Sprite.DrawAt(image.Pos, image.Palette.Index, image.Scale);
|
||||
|
||||
// added for contrails
|
||||
foreach (var a in world.ActorsWithTrait<IPostRender>())
|
||||
@@ -140,25 +168,21 @@ namespace OpenRA.Graphics
|
||||
selectable.DrawRollover(this, unit);
|
||||
}
|
||||
|
||||
public void DrawLocus(Color c, int2[] cells)
|
||||
public void DrawLocus(Color c, CPos[] cells)
|
||||
{
|
||||
var dict = cells.ToDictionary(a => a, a => 0);
|
||||
var wlr = Game.Renderer.WorldLineRenderer;
|
||||
|
||||
foreach (var t in dict.Keys)
|
||||
{
|
||||
if (!dict.ContainsKey(t + new int2(-1, 0)))
|
||||
wlr.DrawLine(Game.CellSize * t, Game.CellSize * (t + new int2(0, 1)),
|
||||
c, c);
|
||||
if (!dict.ContainsKey(t + new int2(1, 0)))
|
||||
wlr.DrawLine(Game.CellSize * (t + new int2(1, 0)), Game.CellSize * (t + new int2(1, 1)),
|
||||
c, c);
|
||||
if (!dict.ContainsKey(t + new int2(0, -1)))
|
||||
wlr.DrawLine(Game.CellSize * t, Game.CellSize * (t + new int2(1, 0)),
|
||||
c, c);
|
||||
if (!dict.ContainsKey(t + new int2(0, 1)))
|
||||
wlr.DrawLine(Game.CellSize * (t + new int2(0, 1)), Game.CellSize * (t + new int2(1, 1)),
|
||||
c, c);
|
||||
if (!dict.ContainsKey(t + new CVec(-1, 0)))
|
||||
wlr.DrawLine(t.ToPPos().ToFloat2(), (t + new CVec(0, 1)).ToPPos().ToFloat2(), c, c);
|
||||
if (!dict.ContainsKey(t + new CVec(1, 0)))
|
||||
wlr.DrawLine((t + new CVec(1, 0)).ToPPos().ToFloat2(), (t + new CVec(1, 1)).ToPPos().ToFloat2(), c, c);
|
||||
if (!dict.ContainsKey(t + new CVec(0, -1)))
|
||||
wlr.DrawLine(t.ToPPos().ToFloat2(), (t + new CVec(1, 0)).ToPPos().ToFloat2(), c, c);
|
||||
if (!dict.ContainsKey(t + new CVec(0, 1)))
|
||||
wlr.DrawLine((t + new CVec(0, 1)).ToPPos().ToFloat2(), (t + new CVec(1, 1)).ToPPos().ToFloat2(), c, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,6 +197,16 @@ namespace OpenRA.Graphics
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawRangeCircleWithContrast(Color fg, float2 location, float range, Color bg, int offset)
|
||||
{
|
||||
if (offset > 0) {
|
||||
DrawRangeCircle(bg, location, range + (float) offset/Game.CellSize);
|
||||
DrawRangeCircle(bg, location, range - (float) offset/Game.CellSize);
|
||||
}
|
||||
|
||||
DrawRangeCircle(fg, location, range);
|
||||
}
|
||||
|
||||
public void RefreshPalette()
|
||||
{
|
||||
palette.Update( world.WorldActor.TraitsImplementing<IPaletteModifier>() );
|
||||
|
||||
@@ -39,6 +39,6 @@ namespace OpenRA
|
||||
id, actors.Select(a => "#{0} {1}".F(a.ActorID, a.Info.Name)).JoinWith(",")));
|
||||
}
|
||||
|
||||
/* todo: add lazy group path crap, groupleader, pruning, etc */
|
||||
/* TODO: add lazy group path crap, groupleader, pruning, etc */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -15,32 +15,53 @@ namespace OpenRA
|
||||
public class NullInputHandler : IInputHandler
|
||||
{
|
||||
// ignore all input
|
||||
public void ModifierKeys( Modifiers mods ) { }
|
||||
public void OnKeyInput( KeyInput input ) { }
|
||||
public void OnMouseInput( MouseInput input ) { }
|
||||
public void ModifierKeys(Modifiers mods) { }
|
||||
public void OnKeyInput(KeyInput input) { }
|
||||
public void OnMouseInput(MouseInput input) { }
|
||||
}
|
||||
|
||||
public class DefaultInputHandler : IInputHandler
|
||||
{
|
||||
readonly World world;
|
||||
public DefaultInputHandler( World world )
|
||||
public DefaultInputHandler(World world)
|
||||
{
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public void ModifierKeys( Modifiers mods )
|
||||
public void ModifierKeys(Modifiers mods)
|
||||
{
|
||||
Game.HandleModifierKeys( mods );
|
||||
Game.HandleModifierKeys(mods);
|
||||
}
|
||||
|
||||
public void OnKeyInput( KeyInput input )
|
||||
public void OnKeyInput(KeyInput input)
|
||||
{
|
||||
Sync.CheckSyncUnchanged(world, () => Ui.HandleKeyPress(input));
|
||||
}
|
||||
|
||||
public void OnMouseInput( MouseInput input )
|
||||
public void OnMouseInput(MouseInput input)
|
||||
{
|
||||
Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input));
|
||||
}
|
||||
}
|
||||
|
||||
public class MouseButtonPreference
|
||||
{
|
||||
|
||||
public MouseButton Action
|
||||
{
|
||||
get
|
||||
{
|
||||
return Game.Settings.Game.UseClassicMouseStyle ? MouseButton.Left : MouseButton.Right;
|
||||
}
|
||||
}
|
||||
|
||||
public MouseButton Cancel
|
||||
{
|
||||
get
|
||||
{
|
||||
return Game.Settings.Game.UseClassicMouseStyle ? MouseButton.Right : MouseButton.Left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace OpenRA
|
||||
public string Description;
|
||||
public string Author;
|
||||
public string Tileset;
|
||||
public string[] Difficulties;
|
||||
|
||||
[FieldLoader.Ignore] public Lazy<Dictionary<string, ActorReference>> Actors;
|
||||
|
||||
@@ -56,17 +57,11 @@ namespace OpenRA
|
||||
[FieldLoader.Ignore] public Dictionary<string, PlayerReference> Players = new Dictionary<string, PlayerReference>();
|
||||
[FieldLoader.Ignore] public Lazy<List<SmudgeReference>> Smudges;
|
||||
|
||||
// Rules overrides
|
||||
[FieldLoader.Ignore] public List<MiniYamlNode> Rules = new List<MiniYamlNode>();
|
||||
|
||||
// Sequences overrides
|
||||
[FieldLoader.Ignore] public List<MiniYamlNode> Sequences = new List<MiniYamlNode>();
|
||||
|
||||
// Weapon overrides
|
||||
[FieldLoader.Ignore] public List<MiniYamlNode> Weapons = new List<MiniYamlNode>();
|
||||
|
||||
// Voices overrides
|
||||
[FieldLoader.Ignore] public List<MiniYamlNode> Voices = new List<MiniYamlNode>();
|
||||
[FieldLoader.Ignore] public List<MiniYamlNode> Notifications = new List<MiniYamlNode>();
|
||||
|
||||
// Binary map data
|
||||
[FieldLoader.Ignore] public byte TileFormat = 1;
|
||||
@@ -76,10 +71,7 @@ namespace OpenRA
|
||||
[FieldLoader.Ignore] public Lazy<TileReference<byte, byte>[,]> MapResources;
|
||||
[FieldLoader.Ignore] public string [,] CustomTerrain;
|
||||
|
||||
public Map()
|
||||
{
|
||||
// Do nothing; not a valid map (editor hack)
|
||||
}
|
||||
public Map() {} /* doesn't really produce a valid map, but enough for loading a mod */
|
||||
|
||||
public static Map FromTileset(string tileset)
|
||||
{
|
||||
@@ -160,6 +152,7 @@ namespace OpenRA
|
||||
Sequences = NodesOrEmpty(yaml, "Sequences");
|
||||
Weapons = NodesOrEmpty(yaml, "Weapons");
|
||||
Voices = NodesOrEmpty(yaml, "Voices");
|
||||
Notifications = NodesOrEmpty(yaml, "Notifications");
|
||||
|
||||
CustomTerrain = new string[MapSize.X, MapSize.Y];
|
||||
|
||||
@@ -186,6 +179,7 @@ namespace OpenRA
|
||||
"Description",
|
||||
"Author",
|
||||
"Tileset",
|
||||
"Difficulties",
|
||||
"MapSize",
|
||||
"Bounds",
|
||||
"UseAsShellmap",
|
||||
@@ -214,6 +208,7 @@ namespace OpenRA
|
||||
root.Add(new MiniYamlNode("Sequences", null, Sequences));
|
||||
root.Add(new MiniYamlNode("Weapons", null, Weapons));
|
||||
root.Add(new MiniYamlNode("Voices", null, Voices));
|
||||
root.Add(new MiniYamlNode("Notifications", null, Notifications));
|
||||
|
||||
var entries = new Dictionary<string, byte[]>();
|
||||
entries.Add("map.bin", SaveBinaryData());
|
||||
@@ -348,7 +343,7 @@ namespace OpenRA
|
||||
return dataStream.ToArray();
|
||||
}
|
||||
|
||||
public bool IsInMap(int2 xy) { return IsInMap(xy.X, xy.Y); }
|
||||
public bool IsInMap(CPos xy) { return IsInMap(xy.X, xy.Y); }
|
||||
public bool IsInMap(int x, int y) { return Bounds.Contains(x,y); }
|
||||
|
||||
static T[,] ResizeArray<T>(T[,] ts, T t, int width, int height)
|
||||
@@ -390,22 +385,24 @@ namespace OpenRA
|
||||
|
||||
public void MakeDefaultPlayers()
|
||||
{
|
||||
Players.Clear();
|
||||
|
||||
var firstRace = OpenRA.Rules.Info["world"].Traits
|
||||
.WithInterface<CountryInfo>().First(c => c.Selectable).Race;
|
||||
|
||||
Players.Add("Neutral", new PlayerReference
|
||||
{
|
||||
Name = "Neutral",
|
||||
Race = firstRace,
|
||||
OwnsWorld = true,
|
||||
NonCombatant = true
|
||||
});
|
||||
if (!Players.ContainsKey("Neutral"))
|
||||
Players.Add("Neutral", new PlayerReference
|
||||
{
|
||||
Name = "Neutral",
|
||||
Race = firstRace,
|
||||
OwnsWorld = true,
|
||||
NonCombatant = true
|
||||
});
|
||||
|
||||
var numSpawns = GetSpawnPoints().Length;
|
||||
for (var index = 0; index < numSpawns; index++)
|
||||
{
|
||||
if (Players.ContainsKey("Multi{0}".F(index)))
|
||||
continue;
|
||||
|
||||
var p = new PlayerReference
|
||||
{
|
||||
Name = "Multi{0}".F(index),
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace OpenRA
|
||||
public ILoadScreen LoadScreen = null;
|
||||
public SheetBuilder SheetBuilder;
|
||||
public SpriteLoader SpriteLoader;
|
||||
public HardwarePalette Palette { get; private set; }
|
||||
|
||||
public ModData( params string[] mods )
|
||||
{
|
||||
@@ -51,13 +50,11 @@ namespace OpenRA
|
||||
|
||||
AvailableMaps = FindMaps(Manifest.Mods);
|
||||
|
||||
Palette = new HardwarePalette();
|
||||
ChromeMetrics.Initialize(Manifest.ChromeMetrics);
|
||||
ChromeProvider.Initialize(Manifest.Chrome);
|
||||
SheetBuilder = new SheetBuilder(TextureChannel.Red);
|
||||
SpriteLoader = new SpriteLoader(new string[] { ".shp" }, SheetBuilder);
|
||||
CursorProvider.Initialize(Manifest.Cursors);
|
||||
Palette.Update(new IPaletteModifier[] { });
|
||||
}
|
||||
|
||||
public Map PrepareMap(string uid)
|
||||
@@ -100,6 +97,7 @@ namespace OpenRA
|
||||
.Concat(mods.SelectMany(p => FindMapsIn("{1}maps{0}{2}{0}".F(Path.DirectorySeparatorChar, Platform.SupportDir, p))));
|
||||
|
||||
var ret = new Dictionary<string, Map>();
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
try
|
||||
@@ -113,6 +111,7 @@ namespace OpenRA
|
||||
Console.WriteLine("Details: {0}", e.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,15 +39,15 @@ namespace OpenRA
|
||||
public readonly Actor Subject;
|
||||
public readonly bool Queued;
|
||||
public Actor TargetActor;
|
||||
public int2 TargetLocation;
|
||||
public CPos TargetLocation;
|
||||
public string TargetString;
|
||||
public int2 ExtraLocation;
|
||||
public CPos ExtraLocation;
|
||||
public bool IsImmediate;
|
||||
|
||||
public Player Player { get { return Subject.Owner; } }
|
||||
|
||||
Order(string orderString, Actor subject,
|
||||
Actor targetActor, int2 targetLocation, string targetString, bool queued, int2 extraLocation)
|
||||
Actor targetActor, CPos targetLocation, string targetString, bool queued, CPos extraLocation)
|
||||
{
|
||||
this.OrderString = orderString;
|
||||
this.Subject = subject;
|
||||
@@ -60,10 +60,10 @@ namespace OpenRA
|
||||
|
||||
// For scripting special powers
|
||||
public Order()
|
||||
: this(null, null, null, int2.Zero, null, false, int2.Zero) { }
|
||||
: this(null, null, null, CPos.Zero, null, false, CPos.Zero) { }
|
||||
|
||||
public Order(string orderString, Actor subject, bool queued)
|
||||
: this(orderString, subject, null, int2.Zero, null, queued, int2.Zero) { }
|
||||
: this(orderString, subject, null, CPos.Zero, null, queued, CPos.Zero) { }
|
||||
|
||||
public Order(string orderstring, Order order)
|
||||
: this(orderstring, order.Subject, order.TargetActor, order.TargetLocation,
|
||||
@@ -98,21 +98,21 @@ namespace OpenRA
|
||||
|
||||
OrderFields fields = 0;
|
||||
if (TargetActor != null) fields |= OrderFields.TargetActor;
|
||||
if (TargetLocation != int2.Zero) fields |= OrderFields.TargetLocation;
|
||||
if (TargetLocation != CPos.Zero) fields |= OrderFields.TargetLocation;
|
||||
if (TargetString != null) fields |= OrderFields.TargetString;
|
||||
if (Queued) fields |= OrderFields.Queued;
|
||||
if (ExtraLocation != int2.Zero) fields |= OrderFields.ExtraLocation;
|
||||
if (ExtraLocation != CPos.Zero) fields |= OrderFields.ExtraLocation;
|
||||
|
||||
w.Write((byte)fields);
|
||||
|
||||
if (TargetActor != null)
|
||||
w.Write(UIntFromActor(TargetActor));
|
||||
if (TargetLocation != int2.Zero)
|
||||
w.Write(TargetLocation);
|
||||
if (TargetLocation != CPos.Zero)
|
||||
w.Write(TargetLocation.ToInt2());
|
||||
if (TargetString != null)
|
||||
w.Write(TargetString);
|
||||
if (ExtraLocation != int2.Zero)
|
||||
w.Write(ExtraLocation);
|
||||
if (ExtraLocation != CPos.Zero)
|
||||
w.Write(ExtraLocation.ToInt2());
|
||||
|
||||
return ret.ToArray();
|
||||
}
|
||||
@@ -130,10 +130,10 @@ namespace OpenRA
|
||||
var flags = (OrderFields)r.ReadByte();
|
||||
|
||||
var targetActorId = flags.HasField(OrderFields.TargetActor) ? r.ReadUInt32() : 0xffffffff;
|
||||
var targetLocation = flags.HasField(OrderFields.TargetLocation) ? r.ReadInt2() : int2.Zero;
|
||||
var targetLocation = (CPos)( flags.HasField(OrderFields.TargetLocation) ? r.ReadInt2() : int2.Zero );
|
||||
var targetString = flags.HasField(OrderFields.TargetString) ? r.ReadString() : null;
|
||||
var queued = flags.HasField(OrderFields.Queued);
|
||||
var extraLocation = flags.HasField(OrderFields.ExtraLocation) ? r.ReadInt2() : int2.Zero;
|
||||
var extraLocation = (CPos)(flags.HasField(OrderFields.ExtraLocation) ? r.ReadInt2() : int2.Zero);
|
||||
|
||||
Actor subject, targetActor;
|
||||
if( !TryGetActorFromUInt( world, subjectId, out subject ) || !TryGetActorFromUInt( world, targetActorId, out targetActor ) )
|
||||
@@ -199,7 +199,18 @@ namespace OpenRA
|
||||
{
|
||||
return new Order("HandshakeResponse", null, false) { IsImmediate = true, TargetString = text };
|
||||
}
|
||||
|
||||
public static Order PauseRequest()
|
||||
{
|
||||
return new Order("PauseRequest", null, false) { IsImmediate = true, TargetString="" }; //TODO: targetbool?
|
||||
}
|
||||
|
||||
public static Order PauseGame()
|
||||
{
|
||||
return new Order("PauseGame", null, false) { IsImmediate = true, TargetString=""}; //TODO: targetbool?
|
||||
}
|
||||
|
||||
|
||||
public static Order Command(string text)
|
||||
{
|
||||
return new Order("Command", null, false) { IsImmediate = true, TargetString = text };
|
||||
@@ -207,17 +218,17 @@ namespace OpenRA
|
||||
|
||||
public static Order StartProduction(Actor subject, string item, int count)
|
||||
{
|
||||
return new Order("StartProduction", subject, false) { TargetLocation = new int2(count, 0), TargetString = item };
|
||||
return new Order("StartProduction", subject, false) { TargetLocation = new CPos(count, 0), TargetString = item };
|
||||
}
|
||||
|
||||
public static Order PauseProduction(Actor subject, string item, bool pause)
|
||||
{
|
||||
return new Order("PauseProduction", subject, false) { TargetLocation = new int2(pause ? 1 : 0, 0), TargetString = item };
|
||||
return new Order("PauseProduction", subject, false) { TargetLocation = new CPos(pause ? 1 : 0, 0), TargetString = item };
|
||||
}
|
||||
|
||||
public static Order CancelProduction(Actor subject, string item, int count)
|
||||
{
|
||||
return new Order("CancelProduction", subject, false) { TargetLocation = new int2(count, 0), TargetString = item };
|
||||
return new Order("CancelProduction", subject, false) { TargetLocation = new CPos(count, 0), TargetString = item };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -36,6 +36,7 @@ namespace OpenRA.Network
|
||||
public int LastTickTime = Environment.TickCount;
|
||||
|
||||
public bool GameStarted { get { return NetFrameNumber != 0; } }
|
||||
public bool GamePaused {get; set;}
|
||||
public IConnection Connection { get; private set; }
|
||||
|
||||
public readonly int SyncHeaderSize = 9;
|
||||
@@ -139,17 +140,17 @@ namespace OpenRA.Network
|
||||
if (index >= orders.Count())
|
||||
OutOfSync(frame);
|
||||
|
||||
throw new InvalidOperationException("Out of sync in frame {0}.\n {1}".F(frame, orders.ElementAt(index).Order.ToString()));
|
||||
throw new InvalidOperationException("Out of sync in frame {0}.\n {1}\n Compare syncreport.log with other players.".F(frame, orders.ElementAt(index).Order.ToString()));
|
||||
}
|
||||
|
||||
void OutOfSync(int frame)
|
||||
{
|
||||
throw new InvalidOperationException("Out of sync in frame {0}.\n".F(frame));
|
||||
throw new InvalidOperationException("Out of sync in frame {0}.\n Compare syncreport.log with other players.".F(frame));
|
||||
}
|
||||
|
||||
void OutOfSync(int frame, string blame)
|
||||
{
|
||||
throw new InvalidOperationException("Out of sync in frame {0}: Blame {1}.\n".F(frame, blame));
|
||||
throw new InvalidOperationException("Out of sync in frame {0}: Blame {1}.\n Compare syncreport.log with other players.".F(frame, blame));
|
||||
}
|
||||
|
||||
public bool IsReadyForNextFrame
|
||||
|
||||
@@ -10,35 +10,26 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
public class ReplayConnection : IConnection
|
||||
{
|
||||
//uint nextFrame = 1;
|
||||
FileStream replayStream;
|
||||
List<byte[]> sync = new List<byte[]>();
|
||||
|
||||
public ReplayConnection( string replayFilename )
|
||||
{
|
||||
replayStream = File.OpenRead( replayFilename );
|
||||
}
|
||||
public ReplayConnection( string replayFilename ) { replayStream = File.OpenRead( replayFilename ); }
|
||||
|
||||
public int LocalClientId
|
||||
{
|
||||
get { return 0; }
|
||||
}
|
||||
|
||||
public ConnectionState ConnectionState
|
||||
{
|
||||
get { return ConnectionState.Connected; }
|
||||
}
|
||||
public int LocalClientId { get { return 0; } }
|
||||
public ConnectionState ConnectionState { get { return ConnectionState.Connected; } }
|
||||
|
||||
// do nothing; ignore locally generated orders
|
||||
public void Send( int frame, List<byte[]> orders ) { }
|
||||
public void SendImmediate( List<byte[]> orders ) { }
|
||||
|
||||
public void SendSync( int frame, byte[] syncData )
|
||||
{
|
||||
var ms = new MemoryStream();
|
||||
@@ -47,8 +38,6 @@ namespace OpenRA.Network
|
||||
sync.Add( ms.ToArray() );
|
||||
}
|
||||
|
||||
List<byte[]> sync = new List<byte[]>();
|
||||
|
||||
public void Receive( Action<int, byte[]> packetFn )
|
||||
{
|
||||
while( sync.Count != 0 )
|
||||
@@ -56,9 +45,11 @@ namespace OpenRA.Network
|
||||
packetFn( LocalClientId, sync[ 0 ] );
|
||||
sync.RemoveAt( 0 );
|
||||
}
|
||||
|
||||
if( replayStream == null ) return;
|
||||
|
||||
var reader = new BinaryReader( replayStream );
|
||||
|
||||
while( replayStream.Position < replayStream.Length )
|
||||
{
|
||||
var client = reader.ReadInt32();
|
||||
@@ -66,56 +57,10 @@ namespace OpenRA.Network
|
||||
var packet = reader.ReadBytes( packetLen );
|
||||
packetFn( client, packet );
|
||||
}
|
||||
|
||||
replayStream = null;
|
||||
}
|
||||
|
||||
public void Dispose() { }
|
||||
}
|
||||
|
||||
class ReplayRecorderConnection : IConnection
|
||||
{
|
||||
IConnection inner;
|
||||
BinaryWriter writer;
|
||||
|
||||
public ReplayRecorderConnection( IConnection inner, FileStream replayFile )
|
||||
{
|
||||
this.inner = inner;
|
||||
this.writer = new BinaryWriter( replayFile );
|
||||
}
|
||||
|
||||
public int LocalClientId { get { return inner.LocalClientId; } }
|
||||
public ConnectionState ConnectionState { get { return inner.ConnectionState; } }
|
||||
|
||||
public void Send( int frame, List<byte[]> orders ) { inner.Send( frame, orders ); }
|
||||
public void SendImmediate( List<byte[]> orders ) { inner.SendImmediate( orders ); }
|
||||
public void SendSync( int frame, byte[] syncData ) { inner.SendSync( frame, syncData ); }
|
||||
|
||||
public void Receive( Action<int, byte[]> packetFn )
|
||||
{
|
||||
inner.Receive( ( client, data ) =>
|
||||
{
|
||||
writer.Write( client );
|
||||
writer.Write( data.Length );
|
||||
writer.Write( data );
|
||||
packetFn( client, data );
|
||||
} );
|
||||
}
|
||||
|
||||
bool disposed;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if( disposed )
|
||||
return;
|
||||
|
||||
writer.Close();
|
||||
inner.Dispose();
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
~ReplayRecorderConnection()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
114
OpenRA.Game/Network/ReplayRecorderConnection.cs
Normal file
114
OpenRA.Game/Network/ReplayRecorderConnection.cs
Normal file
@@ -0,0 +1,114 @@
|
||||
#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.Text;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
class ReplayRecorderConnection : IConnection
|
||||
{
|
||||
IConnection inner;
|
||||
BinaryWriter writer;
|
||||
Func<string> chooseFilename;
|
||||
MemoryStream preStartBuffer = new MemoryStream();
|
||||
|
||||
public ReplayRecorderConnection( IConnection inner, Func<string> chooseFilename )
|
||||
{
|
||||
this.chooseFilename = chooseFilename;
|
||||
this.inner = inner;
|
||||
|
||||
writer = new BinaryWriter(preStartBuffer);
|
||||
}
|
||||
|
||||
void StartSavingReplay(byte[] initialContent)
|
||||
{
|
||||
var filename = chooseFilename();
|
||||
var replaysDirectory = Path.Combine(Platform.SupportDir, "Replays");
|
||||
|
||||
if (!Directory.Exists(replaysDirectory))
|
||||
Directory.CreateDirectory(replaysDirectory);
|
||||
|
||||
string fullFilename;
|
||||
var id = -1;
|
||||
do
|
||||
{
|
||||
fullFilename = Path.Combine(replaysDirectory, id < 0
|
||||
? "{0}.rep".F(filename)
|
||||
: "{0}-{1}.rep".F(filename, id));
|
||||
id++;
|
||||
}
|
||||
while (File.Exists(fullFilename));
|
||||
|
||||
var file = File.Create(fullFilename);
|
||||
file.Write(initialContent);
|
||||
this.writer = new BinaryWriter(file);
|
||||
}
|
||||
|
||||
public int LocalClientId { get { return inner.LocalClientId; } }
|
||||
public ConnectionState ConnectionState { get { return inner.ConnectionState; } }
|
||||
|
||||
public void Send( int frame, List<byte[]> orders ) { inner.Send( frame, orders ); }
|
||||
public void SendImmediate( List<byte[]> orders ) { inner.SendImmediate( orders ); }
|
||||
public void SendSync( int frame, byte[] syncData ) { inner.SendSync( frame, syncData ); }
|
||||
|
||||
public void Receive( Action<int, byte[]> packetFn )
|
||||
{
|
||||
inner.Receive((client, data) =>
|
||||
{
|
||||
if (preStartBuffer != null && IsGameStart(data))
|
||||
{
|
||||
writer.Flush();
|
||||
var preStartData = preStartBuffer.ToArray();
|
||||
preStartBuffer = null;
|
||||
StartSavingReplay(preStartData);
|
||||
}
|
||||
|
||||
writer.Write(client);
|
||||
writer.Write(data.Length);
|
||||
writer.Write(data);
|
||||
packetFn(client, data);
|
||||
} );
|
||||
}
|
||||
|
||||
bool IsGameStart(byte[] data)
|
||||
{
|
||||
if (data.Length == 5 && data[4] == 0xbf)
|
||||
return false;
|
||||
if (data.Length >= 5 && data[4] == 0x65)
|
||||
return false;
|
||||
|
||||
var frame = BitConverter.ToInt32(data, 0);
|
||||
return frame == 0 && data.ToOrderList(null).Any(
|
||||
o => o.OrderString == "StartGame");
|
||||
}
|
||||
|
||||
bool disposed;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if( disposed )
|
||||
return;
|
||||
|
||||
writer.Close();
|
||||
inner.Dispose();
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
~ReplayRecorderConnection()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,12 +37,19 @@ namespace OpenRA.Network
|
||||
return Slots.FirstOrDefault(s => !s.Value.Closed && ClientInSlot(s.Key) == null).Key;
|
||||
}
|
||||
|
||||
public bool IsSinglePlayer
|
||||
{
|
||||
get { return Clients.Count(c => c.Bot == null) == 1; }
|
||||
}
|
||||
|
||||
public enum ClientState { NotReady, Ready, Disconnected = 1000 }
|
||||
|
||||
public class Client
|
||||
{
|
||||
public int Index;
|
||||
public ColorRamp ColorRamp;
|
||||
public ColorRamp PreferredColorRamp; // Color that the client normally uses from settings.yaml.
|
||||
public ColorRamp ColorRamp; // Actual color that the client is using.
|
||||
// Usually the same as PreferredColorRamp but can be different on maps with locked colors.
|
||||
public string Country;
|
||||
public int SpawnPoint;
|
||||
public string Name;
|
||||
@@ -50,7 +57,7 @@ namespace OpenRA.Network
|
||||
public int Team;
|
||||
public string Slot; // slot ID, or null for observer
|
||||
public string Bot; // Bot type, null for real clients
|
||||
|
||||
public bool IsAdmin;
|
||||
public bool IsReady { get { return State == ClientState.Ready; } }
|
||||
}
|
||||
|
||||
@@ -64,17 +71,22 @@ namespace OpenRA.Network
|
||||
public bool LockColor;
|
||||
public bool LockTeam;
|
||||
public bool LockSpawn;
|
||||
public bool Required;
|
||||
}
|
||||
|
||||
public class Global
|
||||
{
|
||||
public string ServerName;
|
||||
public string Map;
|
||||
public string[] Ban;
|
||||
public string[] Mods = { "ra" }; // mod names
|
||||
public int OrderLatency = 3;
|
||||
public int RandomSeed = 0;
|
||||
public bool LockTeams = true; // don't allow team changes after game start.
|
||||
public bool FragileAlliances = false; // Allow diplomatic stance changes after game start.
|
||||
public bool AllowCheats = false;
|
||||
public bool Dedicated;
|
||||
public string Difficulty;
|
||||
public bool Crates = true;
|
||||
}
|
||||
|
||||
public Session(string[] mods)
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
report.Frame = orderManager.NetFrameNumber;
|
||||
report.SyncedRandom = orderManager.world.SharedRandom.Last;
|
||||
report.TotalCount = orderManager.world.SharedRandom.TotalCount;
|
||||
report.Traits.Clear();
|
||||
foreach (var a in orderManager.world.ActorsWithTrait<ISync>())
|
||||
{
|
||||
@@ -58,7 +59,7 @@ namespace OpenRA.Network
|
||||
if (r.Frame == frame)
|
||||
{
|
||||
Log.Write("sync", "Sync for net frame {0} -------------", r.Frame);
|
||||
Log.Write("sync", "SharedRandom: "+r.SyncedRandom);
|
||||
Log.Write("sync", "SharedRandom: {0} (#{1})", r.SyncedRandom, r.TotalCount);
|
||||
Log.Write("sync", "Synced Traits:");
|
||||
foreach (var a in r.Traits)
|
||||
Log.Write("sync", "\t {0} {1} {2} {3} ({4})".F(
|
||||
@@ -77,6 +78,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
public int Frame;
|
||||
public int SyncedRandom;
|
||||
public int TotalCount;
|
||||
public List<TraitReport> Traits = new List<TraitReport>();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
static Player FindPlayerByClient(this World world, Session.Client c)
|
||||
{
|
||||
/* todo: this is still a hack.
|
||||
/* TODO: this is still a hack.
|
||||
* the cases we're trying to avoid are the extra players on the host's client -- Neutral, other MapPlayers,..*/
|
||||
return world.Players.FirstOrDefault(
|
||||
p => (p.ClientIndex == c.Index && p.PlayerReference.Playable));
|
||||
@@ -94,11 +94,28 @@ namespace OpenRA.Network
|
||||
Game.StartGame(orderManager.LobbyInfo.GlobalSettings.Map, false);
|
||||
break;
|
||||
}
|
||||
|
||||
case "PauseGame":
|
||||
{
|
||||
var client = orderManager.LobbyInfo.ClientWithIndex(clientId);
|
||||
|
||||
if(client != null)
|
||||
{
|
||||
orderManager.GamePaused = !orderManager.GamePaused;
|
||||
var pausetext = "The game is {0} by {1}".F( orderManager.GamePaused ? "paused" : "un-paused", client.Name );
|
||||
Game.AddChatLine(Color.White, "", pausetext);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case "HandshakeRequest":
|
||||
{
|
||||
var request = HandshakeRequest.Deserialize(order.TargetString);
|
||||
var localMods = orderManager.LobbyInfo.GlobalSettings.Mods.Select(m => "{0}@{1}".F(m,Mod.AllMods[m].Version)).ToArray();
|
||||
|
||||
// Check if mods match
|
||||
if (localMods.FirstOrDefault().ToString().Split('@')[0] != request.Mods.FirstOrDefault().ToString().Split('@')[0])
|
||||
throw new InvalidOperationException("Server's mod ({0}) and yours ({1}) don't match".F(localMods.FirstOrDefault().ToString().Split('@')[0], request.Mods.FirstOrDefault().ToString().Split('@')[0]));
|
||||
// Check that the map exists on the client
|
||||
if (!Game.modData.AvailableMaps.ContainsKey(request.Map))
|
||||
throw new InvalidOperationException("Missing map {0}".F(request.Map));
|
||||
@@ -106,6 +123,7 @@ namespace OpenRA.Network
|
||||
var info = new Session.Client()
|
||||
{
|
||||
Name = Game.Settings.Player.Name,
|
||||
PreferredColorRamp = Game.Settings.Player.ColorRamp,
|
||||
ColorRamp = Game.Settings.Player.ColorRamp,
|
||||
Country = "random",
|
||||
SpawnPoint = 0,
|
||||
@@ -113,7 +131,6 @@ namespace OpenRA.Network
|
||||
State = Session.ClientState.NotReady
|
||||
};
|
||||
|
||||
var localMods = orderManager.LobbyInfo.GlobalSettings.Mods.Select(m => "{0}@{1}".F(m,Mod.AllMods[m].Version)).ToArray();
|
||||
var response = new HandshakeResponse()
|
||||
{
|
||||
Client = info,
|
||||
@@ -146,7 +163,7 @@ namespace OpenRA.Network
|
||||
|
||||
case "SetStance":
|
||||
{
|
||||
if (Game.orderManager.LobbyInfo.GlobalSettings.LockTeams)
|
||||
if (!Game.orderManager.LobbyInfo.GlobalSettings.FragileAlliances)
|
||||
return;
|
||||
|
||||
var targetPlayer = order.Player.World.Players.FirstOrDefault(p => p.InternalName == order.TargetString);
|
||||
@@ -185,8 +202,7 @@ namespace OpenRA.Network
|
||||
{
|
||||
var oldStance = p.Stances[target];
|
||||
p.Stances[target] = s;
|
||||
if (target == w.LocalPlayer)
|
||||
w.WorldActor.Trait<Shroud>().UpdatePlayerStance(w, p, oldStance, s);
|
||||
target.Shroud.UpdatePlayerStance(w, p, oldStance, s);
|
||||
|
||||
foreach (var nsc in w.ActorsWithTrait<INotifyStanceChanged>())
|
||||
nsc.Trait.StanceChanged(nsc.Actor, p, target, oldStance, s);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
@@ -12,9 +12,12 @@
|
||||
<AssemblyName>OpenRA.Game</AssemblyName>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>2.0</OldToolsVersion>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<ApplicationIcon>OpenRA.ico</ApplicationIcon>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
@@ -27,11 +30,8 @@
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<ApplicationIcon>OpenRA.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -44,6 +44,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Optimize>false</Optimize>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
@@ -55,11 +56,11 @@
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<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" />
|
||||
@@ -79,6 +80,12 @@
|
||||
<Compile Include="ActorInitializer.cs" />
|
||||
<Compile Include="ActorMap.cs" />
|
||||
<Compile Include="ActorReference.cs" />
|
||||
<Compile Include="Graphics\QuadRenderer.cs" />
|
||||
<Compile Include="PSubVec.cs" />
|
||||
<Compile Include="PSubPos.cs" />
|
||||
<Compile Include="PVecInt.cs" />
|
||||
<Compile Include="PVecFloat.cs" />
|
||||
<Compile Include="PPos.cs" />
|
||||
<Compile Include="Download.cs" />
|
||||
<Compile Include="Effects\DelayedAction.cs" />
|
||||
<Compile Include="Effects\FlashTarget.cs" />
|
||||
@@ -88,7 +95,7 @@
|
||||
<Compile Include="GameRules\MusicInfo.cs" />
|
||||
<Compile Include="GameRules\Rules.cs" />
|
||||
<Compile Include="GameRules\Settings.cs" />
|
||||
<Compile Include="GameRules\VoiceInfo.cs" />
|
||||
<Compile Include="GameRules\SoundInfo.cs" />
|
||||
<Compile Include="GameRules\WeaponInfo.cs" />
|
||||
<Compile Include="Graphics\Animation.cs" />
|
||||
<Compile Include="Graphics\AnimationWithOffset.cs" />
|
||||
@@ -115,6 +122,8 @@
|
||||
<Compile Include="Graphics\WorldRenderer.cs" />
|
||||
<Compile Include="Group.cs" />
|
||||
<Compile Include="InputHandler.cs" />
|
||||
<Compile Include="CVec.cs" />
|
||||
<Compile Include="CPos.cs" />
|
||||
<Compile Include="Map.cs" />
|
||||
<Compile Include="ModData.cs" />
|
||||
<Compile Include="Network\Connection.cs" />
|
||||
@@ -143,6 +152,7 @@
|
||||
<Compile Include="Server\Server.cs" />
|
||||
<Compile Include="Server\ServerOrder.cs" />
|
||||
<Compile Include="Server\TraitInterfaces.cs" />
|
||||
<Compile Include="Server\UPnP.cs" />
|
||||
<Compile Include="Sound.cs" />
|
||||
<Compile Include="Support\Arguments.cs" />
|
||||
<Compile Include="Support\PerfHistory.cs" />
|
||||
@@ -151,25 +161,25 @@
|
||||
<Compile Include="TraitDictionary.cs" />
|
||||
<Compile Include="Traits\Activity.cs" />
|
||||
<Compile Include="Traits\Armor.cs" />
|
||||
<Compile Include="Traits\CreatesShroud.cs" />
|
||||
<Compile Include="Traits\DrawLineToTarget.cs" />
|
||||
<Compile Include="Traits\EditorAppearance.cs" />
|
||||
<Compile Include="Traits\EditorTilesetFilter.cs" />
|
||||
<Compile Include="Traits\Health.cs" />
|
||||
<Compile Include="Traits\LintAttributes.cs" />
|
||||
<Compile Include="Traits\Player\DeveloperMode.cs" />
|
||||
<Compile Include="Traits\Player\EvaAlerts.cs" />
|
||||
<Compile Include="Traits\Player\PlayerResources.cs" />
|
||||
<Compile Include="Traits\Render\RenderSimple.cs" />
|
||||
<Compile Include="Traits\RevealsShroud.cs" />
|
||||
<Compile Include="Traits\Selectable.cs" />
|
||||
<Compile Include="Traits\SelectionDecorations.cs" />
|
||||
<Compile Include="Traits\SubcellInit.cs" />
|
||||
<Compile Include="Traits\Target.cs" />
|
||||
<Compile Include="Traits\TraitsInterfaces.cs" />
|
||||
<Compile Include="Traits\Util.cs" />
|
||||
<Compile Include="Traits\ValidateOrder.cs" />
|
||||
<Compile Include="Traits\Waypoint.cs" />
|
||||
<Compile Include="Traits\World\Country.cs" />
|
||||
<Compile Include="Traits\World\Fog.cs" />
|
||||
<Compile Include="Traits\World\PlayerColorPalette.cs" />
|
||||
<Compile Include="Traits\World\ResourceLayer.cs" />
|
||||
<Compile Include="Traits\World\ResourceType.cs" />
|
||||
@@ -187,6 +197,7 @@
|
||||
<Compile Include="Widgets\GridLayout.cs" />
|
||||
<Compile Include="Widgets\ImageWidget.cs" />
|
||||
<Compile Include="Widgets\LabelWidget.cs" />
|
||||
<Compile Include="Widgets\LineGraphWidget.cs" />
|
||||
<Compile Include="Widgets\ListLayout.cs" />
|
||||
<Compile Include="Widgets\MapPreviewWidget.cs" />
|
||||
<Compile Include="Widgets\PasswordFieldWidget.cs" />
|
||||
@@ -206,6 +217,7 @@
|
||||
<Compile Include="Widgets\WorldInteractionControllerWidget.cs" />
|
||||
<Compile Include="World.cs" />
|
||||
<Compile Include="WorldUtils.cs" />
|
||||
<Compile Include="Network\ReplayRecorderConnection.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
@@ -214,6 +226,11 @@
|
||||
</ProjectReference>
|
||||
</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.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
@@ -229,6 +246,11 @@
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="OpenRA.ico" />
|
||||
|
||||
@@ -48,14 +48,14 @@ namespace OpenRA.Orders
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<Order> Order(World world, int2 xy, MouseInput mi)
|
||||
public IEnumerable<Order> Order(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button != expectedButton)
|
||||
world.CancelInputMode();
|
||||
return OrderInner(world, xy, mi);
|
||||
}
|
||||
|
||||
IEnumerable<Order> OrderInner(World world, int2 xy, MouseInput mi)
|
||||
IEnumerable<Order> OrderInner(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
if (mi.Button == expectedButton && world.Map.IsInMap(xy))
|
||||
{
|
||||
@@ -68,6 +68,6 @@ namespace OpenRA.Orders
|
||||
public virtual void Tick(World world) { }
|
||||
public void RenderBeforeWorld(WorldRenderer wr, World world) { }
|
||||
public void RenderAfterWorld(WorldRenderer wr, World world) { }
|
||||
public string GetCursor(World world, int2 xy, MouseInput mi) { return world.Map.IsInMap(xy) ? cursor : "generic-blocked"; }
|
||||
public string GetCursor(World world, CPos xy, MouseInput mi) { return world.Map.IsInMap(xy) ? cursor : "generic-blocked"; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace OpenRA
|
||||
{
|
||||
public interface IOrderGenerator
|
||||
{
|
||||
IEnumerable<Order> Order(World world, int2 xy, MouseInput mi);
|
||||
IEnumerable<Order> Order(World world, CPos xy, MouseInput mi);
|
||||
void Tick(World world);
|
||||
void RenderBeforeWorld(WorldRenderer wr, World world);
|
||||
void RenderAfterWorld(WorldRenderer wr, World world);
|
||||
string GetCursor(World world, int2 xy, MouseInput mi);
|
||||
string GetCursor(World world, CPos xy, MouseInput mi);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -17,15 +17,11 @@ namespace OpenRA.Orders
|
||||
{
|
||||
class UnitOrderGenerator : IOrderGenerator
|
||||
{
|
||||
public IEnumerable<Order> Order( World world, int2 xy, MouseInput mi )
|
||||
public IEnumerable<Order> Order(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
var underCursor = world.FindUnitsAtMouse(mi.Location)
|
||||
.Where(a => a.HasTrait<ITargetable>())
|
||||
.OrderByDescending(
|
||||
a =>
|
||||
a.Info.Traits.Contains<SelectableInfo>()
|
||||
? a.Info.Traits.Get<SelectableInfo>().Priority
|
||||
: int.MinValue)
|
||||
.OrderByDescending(a => a.SelectionPriority())
|
||||
.FirstOrDefault();
|
||||
|
||||
var orders = world.Selection.Actors
|
||||
@@ -45,17 +41,17 @@ namespace OpenRA.Orders
|
||||
yield return CheckSameOrder(o.iot, o.trait.IssueOrder(o.self, o.iot, o.target, mi.Modifiers.HasModifier(Modifiers.Shift)));
|
||||
}
|
||||
|
||||
public void Tick( World world ) { }
|
||||
public void RenderBeforeWorld( WorldRenderer wr, World world ) { }
|
||||
public void RenderAfterWorld( WorldRenderer wr, World world ) { }
|
||||
public void Tick(World world) { }
|
||||
public void RenderBeforeWorld(WorldRenderer wr, World world) { }
|
||||
public void RenderAfterWorld(WorldRenderer wr, World world) { }
|
||||
|
||||
public string GetCursor( World world, int2 xy, MouseInput mi )
|
||||
public string GetCursor(World world, CPos xy, MouseInput mi)
|
||||
{
|
||||
bool useSelect = false;
|
||||
|
||||
var underCursor = world.FindUnitsAtMouse(mi.Location)
|
||||
.Where(a => a.HasTrait<ITargetable>())
|
||||
.OrderByDescending(a => a.Info.Traits.Contains<SelectableInfo>() ? a.Info.Traits.Get<SelectableInfo>().Priority : int.MinValue)
|
||||
.OrderByDescending(a => a.SelectionPriority())
|
||||
.FirstOrDefault();
|
||||
|
||||
if (mi.Modifiers.HasModifier(Modifiers.Shift) || !world.Selection.Actors.Any())
|
||||
@@ -67,12 +63,11 @@ namespace OpenRA.Orders
|
||||
.Where(o => o != null)
|
||||
.ToArray();
|
||||
|
||||
if( orders.Length == 0 ) return (useSelect) ? "select" : "default";
|
||||
|
||||
return orders[0].cursor ?? ((useSelect) ? "select" : "default");
|
||||
var cursorName = orders.Select(o => o.cursor).FirstOrDefault();
|
||||
return cursorName ?? (useSelect ? "select" : "default");
|
||||
}
|
||||
|
||||
static UnitOrderResult OrderForUnit( Actor self, int2 xy, MouseInput mi, Actor underCursor )
|
||||
static UnitOrderResult OrderForUnit(Actor self, CPos xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (self.Owner != self.World.LocalPlayer)
|
||||
return null;
|
||||
@@ -80,35 +75,35 @@ namespace OpenRA.Orders
|
||||
if (self.Destroyed)
|
||||
return null;
|
||||
|
||||
if( mi.Button == MouseButton.Right )
|
||||
if (mi.Button == Game.mouseButtonPreference.Action)
|
||||
{
|
||||
foreach( var o in self.TraitsImplementing<IIssueOrder>()
|
||||
.SelectMany( trait => trait.Orders
|
||||
.Select( x => new { Trait = trait, Order = x } ) )
|
||||
.OrderByDescending( x => x.Order.OrderPriority ) )
|
||||
.SelectMany(trait => trait.Orders
|
||||
.Select(x => new { Trait = trait, Order = x } ))
|
||||
.OrderByDescending(x => x.Order.OrderPriority))
|
||||
{
|
||||
var actorsAt = self.World.ActorMap.GetUnitsAt( xy ).ToList();
|
||||
var actorsAt = self.World.ActorMap.GetUnitsAt(xy).ToList();
|
||||
|
||||
var forceAttack = mi.Modifiers.HasModifier(Modifiers.Ctrl);
|
||||
var forceQueue = mi.Modifiers.HasModifier(Modifiers.Shift);
|
||||
string cursor = null;
|
||||
if( underCursor != null )
|
||||
if (underCursor != null)
|
||||
if (o.Order.CanTargetActor(self, underCursor, forceAttack, forceQueue, ref cursor))
|
||||
return new UnitOrderResult( self, o.Order, o.Trait, cursor, Target.FromActor( underCursor ) );
|
||||
return new UnitOrderResult(self, o.Order, o.Trait, cursor, Target.FromActor(underCursor));
|
||||
if (o.Order.CanTargetLocation(self, xy, actorsAt, forceAttack, forceQueue, ref cursor))
|
||||
return new UnitOrderResult( self, o.Order, o.Trait, cursor, Target.FromCell( xy ) );
|
||||
return new UnitOrderResult(self, o.Order, o.Trait, cursor, Target.FromCell(xy));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
static Order CheckSameOrder( IOrderTargeter iot, Order order )
|
||||
static Order CheckSameOrder(IOrderTargeter iot, Order order)
|
||||
{
|
||||
if( order == null && iot.OrderID != null )
|
||||
Game.Debug( "BUG: in order targeter - decided on {0} but then didn't order", iot.OrderID );
|
||||
else if( iot.OrderID != order.OrderString )
|
||||
Game.Debug( "BUG: in order targeter - decided on {0} but ordered {1}", iot.OrderID, order.OrderString );
|
||||
if (order == null && iot.OrderID != null)
|
||||
Game.Debug("BUG: in order targeter - decided on {0} but then didn't order", iot.OrderID);
|
||||
else if (iot.OrderID != order.OrderString)
|
||||
Game.Debug("BUG: in order targeter - decided on {0} but ordered {1}", iot.OrderID, order.OrderString);
|
||||
return order;
|
||||
}
|
||||
|
||||
@@ -120,7 +115,7 @@ namespace OpenRA.Orders
|
||||
public readonly string cursor;
|
||||
public readonly Target target;
|
||||
|
||||
public UnitOrderResult( Actor self, IOrderTargeter iot, IIssueOrder trait, string cursor, Target target )
|
||||
public UnitOrderResult(Actor self, IOrderTargeter iot, IIssueOrder trait, string cursor, Target target)
|
||||
{
|
||||
this.self = self;
|
||||
this.iot = iot;
|
||||
@@ -130,4 +125,13 @@ namespace OpenRA.Orders
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class SelectableExts
|
||||
{
|
||||
public static int SelectionPriority(this Actor a)
|
||||
{
|
||||
var selectableInfo = a.Info.Traits.GetOrDefault<SelectableInfo>();
|
||||
return selectableInfo != null ? selectableInfo.Priority : int.MinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
90
OpenRA.Game/PPos.cs
Normal file
90
OpenRA.Game/PPos.cs
Normal file
@@ -0,0 +1,90 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Pixel coordinate position in the world (fine).
|
||||
/// </summary>
|
||||
public struct PPos
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public PPos(int x, int y) { X = x; Y = y; }
|
||||
|
||||
public static readonly PPos Zero = new PPos(0, 0);
|
||||
|
||||
public static explicit operator PPos(int2 a) { return new PPos(a.X, a.Y); }
|
||||
|
||||
public static explicit operator PVecInt(PPos a) { return new PVecInt(a.X, a.Y); }
|
||||
public static explicit operator PVecFloat(PPos a) { return new PVecFloat(a.X, a.Y); }
|
||||
|
||||
public static PPos operator +(PPos a, PVecInt b) { return new PPos(a.X + b.X, a.Y + b.Y); }
|
||||
public static PVecInt operator -(PPos a, PPos b) { return new PVecInt(a.X - b.X, a.Y - b.Y); }
|
||||
public static PPos operator -(PPos a, PVecInt b) { return new PPos(a.X - b.X, a.Y - b.Y); }
|
||||
|
||||
public static bool operator ==(PPos me, PPos other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(PPos me, PPos other) { return !(me == other); }
|
||||
|
||||
public static PPos Max(PPos a, PPos b) { return new PPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static PPos Min(PPos a, PPos b) { return new PPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static PPos Lerp(PPos a, PPos b, int mul, int div)
|
||||
{
|
||||
return a + ((PVecInt)(b - a) * mul / div);
|
||||
}
|
||||
|
||||
public static PPos Average(params PPos[] list)
|
||||
{
|
||||
if (list == null || list.Length == 0)
|
||||
throw new ArgumentException("PPos: Cannot calculate average of empty list.");
|
||||
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
foreach(var pos in list)
|
||||
{
|
||||
x += pos.X;
|
||||
y += pos.Y;
|
||||
}
|
||||
|
||||
x /= list.Length;
|
||||
y /= list.Length;
|
||||
|
||||
return new PPos(x,y);
|
||||
}
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
public CPos ToCPos() { return new CPos((int)(1f / Game.CellSize * X), (int)(1f / Game.CellSize * Y)); }
|
||||
public PSubPos ToPSubPos() { return new PSubPos(X * PSubPos.PerPx, Y * PSubPos.PerPx); }
|
||||
|
||||
public PPos Clamp(Rectangle r)
|
||||
{
|
||||
return new PPos(Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
PPos o = (PPos)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
}
|
||||
}
|
||||
73
OpenRA.Game/PSubPos.cs
Normal file
73
OpenRA.Game/PSubPos.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Sub-pixel coordinate position in the world (very fine).
|
||||
/// </summary>
|
||||
public struct PSubPos
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public PSubPos(int x, int y) { X = x; Y = y; }
|
||||
|
||||
public const int PerPx = 1024;
|
||||
|
||||
public static readonly PSubPos Zero = new PSubPos(0, 0);
|
||||
|
||||
public static explicit operator PSubPos(int2 a) { return new PSubPos(a.X, a.Y); }
|
||||
|
||||
public static explicit operator PSubVec(PSubPos a) { return new PSubVec(a.X, a.Y); }
|
||||
public static explicit operator PVecFloat(PSubPos a) { return new PVecFloat(a.X, a.Y); }
|
||||
|
||||
public static PSubPos operator +(PSubPos a, PSubVec b) { return new PSubPos(a.X + b.X, a.Y + b.Y); }
|
||||
public static PSubVec operator -(PSubPos a, PSubPos b) { return new PSubVec(a.X - b.X, a.Y - b.Y); }
|
||||
public static PSubPos operator -(PSubPos a, PSubVec b) { return new PSubPos(a.X - b.X, a.Y - b.Y); }
|
||||
|
||||
public static bool operator ==(PSubPos me, PSubPos other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(PSubPos me, PSubPos other) { return !(me == other); }
|
||||
|
||||
public static PSubPos Max(PSubPos a, PSubPos b) { return new PSubPos(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static PSubPos Min(PSubPos a, PSubPos b) { return new PSubPos(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static PSubPos Lerp(PSubPos a, PSubPos b, int mul, int div)
|
||||
{
|
||||
return a + ((PSubVec)(b - a) * mul / div);
|
||||
}
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
public PPos ToPPos() { return new PPos(X / PerPx, Y / PerPx); }
|
||||
public CPos ToCPos() { return ToPPos().ToCPos(); }
|
||||
|
||||
public PSubPos Clamp(Rectangle r)
|
||||
{
|
||||
return new PSubPos(Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top)));
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
PSubPos o = (PSubPos)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
}
|
||||
}
|
||||
103
OpenRA.Game/PSubVec.cs
Normal file
103
OpenRA.Game/PSubVec.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Sub-pixel coordinate vector (very fine)
|
||||
/// </summary>
|
||||
public struct PSubVec
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public PSubVec(int x, int y) { X = x; Y = y; }
|
||||
public PSubVec(Size p) { X = p.Width; Y = p.Height; }
|
||||
|
||||
public static readonly PSubVec Zero = new PSubVec(0, 0);
|
||||
public static PSubVec OneCell { get { return new PSubVec(Game.CellSize, Game.CellSize); } }
|
||||
|
||||
public static explicit operator PSubVec(int2 a) { return new PSubVec(a.X, a.Y); }
|
||||
public static explicit operator PSubVec(float2 a) { return new PSubVec((int)a.X, (int)a.Y); }
|
||||
|
||||
public static PSubVec FromRadius(int r) { return new PSubVec(r, r); }
|
||||
|
||||
public static PSubVec operator +(PSubVec a, PSubVec b) { return new PSubVec(a.X + b.X, a.Y + b.Y); }
|
||||
public static PSubVec operator -(PSubVec a, PSubVec b) { return new PSubVec(a.X - b.X, a.Y - b.Y); }
|
||||
public static PSubVec operator *(int a, PSubVec b) { return new PSubVec(a * b.X, a * b.Y); }
|
||||
public static PSubVec operator *(PSubVec b, int a) { return new PSubVec(a * b.X, a * b.Y); }
|
||||
public static PSubVec operator /(PSubVec a, int b) { return new PSubVec(a.X / b, a.Y / b); }
|
||||
|
||||
public static PSubVec operator -(PSubVec a) { return new PSubVec(-a.X, -a.Y); }
|
||||
|
||||
public static bool operator ==(PSubVec me, PSubVec other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(PSubVec me, PSubVec other) { return !(me == other); }
|
||||
|
||||
public static PSubVec Max(PSubVec a, PSubVec b) { return new PSubVec(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static PSubVec Min(PSubVec a, PSubVec b) { return new PSubVec(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static int Dot(PSubVec a, PSubVec b) { return a.X * b.X + a.Y * b.Y; }
|
||||
|
||||
public PSubVec Sign() { return new PSubVec(Math.Sign(X), Math.Sign(Y)); }
|
||||
public PSubVec Abs() { return new PSubVec(Math.Abs(X), Math.Abs(Y)); }
|
||||
public int LengthSquared { get { return X * X + Y * Y; } }
|
||||
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
public PVecInt ToPVecInt() { return new PVecInt(X / PSubPos.PerPx, Y / PSubPos.PerPx); }
|
||||
|
||||
public PSubVec Clamp(Rectangle r)
|
||||
{
|
||||
return new PSubVec(
|
||||
Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top))
|
||||
);
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
PSubVec o = (PSubVec)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
}
|
||||
|
||||
public static class PSubVecExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Scales the float2 vector up to a subpixel vector.
|
||||
/// </summary>
|
||||
/// <param name="vec"></param>
|
||||
/// <returns></returns>
|
||||
public static PSubVec ToPSubVec(this float2 vec)
|
||||
{
|
||||
return new PSubVec((int)(vec.X * PSubPos.PerPx), (int)(vec.Y * PSubPos.PerPx));
|
||||
}
|
||||
|
||||
public static PSubVec ToPSubVec(this PVecInt vec)
|
||||
{
|
||||
return new PSubVec((vec.X * PSubPos.PerPx), (vec.Y * PSubPos.PerPx));
|
||||
}
|
||||
|
||||
public static PSubVec ToPSubVec(this PVecFloat vec)
|
||||
{
|
||||
return new PSubVec((int)(vec.X * PSubPos.PerPx), (int)(vec.Y * PSubPos.PerPx));
|
||||
}
|
||||
}
|
||||
}
|
||||
97
OpenRA.Game/PVecFloat.cs
Normal file
97
OpenRA.Game/PVecFloat.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Pixel coordinate vector (fine; float)
|
||||
/// </summary>
|
||||
public struct PVecFloat
|
||||
{
|
||||
public readonly float X, Y;
|
||||
|
||||
public PVecFloat(float x, float y) { X = x; Y = y; }
|
||||
public PVecFloat(Size p) { X = p.Width; Y = p.Height; }
|
||||
|
||||
public static readonly PVecFloat Zero = new PVecFloat(0, 0);
|
||||
|
||||
public static explicit operator PVecInt(PVecFloat a) { return new PVecInt((int)a.X, (int)a.Y); }
|
||||
public static explicit operator PVecFloat(float2 a) { return new PVecFloat(a.X, a.Y); }
|
||||
|
||||
public static PVecFloat operator +(PVecFloat a, PVecFloat b) { return new PVecFloat(a.X + b.X, a.Y + b.Y); }
|
||||
public static PVecFloat operator -(PVecFloat a, PVecFloat b) { return new PVecFloat(a.X - b.X, a.Y - b.Y); }
|
||||
public static PVecFloat operator *(float a, PVecFloat b) { return new PVecFloat(a * b.X, a * b.Y); }
|
||||
public static PVecFloat operator *(PVecFloat b, float a) { return new PVecFloat(a * b.X, a * b.Y); }
|
||||
public static PVecFloat operator /(PVecFloat a, float b) { return new PVecFloat(a.X / b, a.Y / b); }
|
||||
|
||||
public static PVecFloat operator -(PVecFloat a) { return new PVecFloat(-a.X, -a.Y); }
|
||||
|
||||
public static bool operator ==(PVecFloat me, PVecFloat other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(PVecFloat me, PVecFloat other) { return !(me == other); }
|
||||
|
||||
public static PVecFloat Max(PVecFloat a, PVecFloat b) { return new PVecFloat(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static PVecFloat Min(PVecFloat a, PVecFloat b) { return new PVecFloat(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static float Dot(PVecFloat a, PVecFloat b) { return a.X * b.X + a.Y * b.Y; }
|
||||
|
||||
public static PVecFloat FromAngle(float a) { return new PVecFloat((float)Math.Sin(a), (float)Math.Cos(a)); }
|
||||
|
||||
public static PVecFloat Lerp(PVecFloat a, PVecFloat b, float t)
|
||||
{
|
||||
return new PVecFloat(
|
||||
float2.Lerp(a.X, b.X, t),
|
||||
float2.Lerp(a.Y, b.Y, t)
|
||||
);
|
||||
}
|
||||
|
||||
public static PVecFloat Lerp(PVecFloat a, PVecFloat b, PVecFloat t)
|
||||
{
|
||||
return new PVecFloat(
|
||||
float2.Lerp(a.X, b.X, t.X),
|
||||
float2.Lerp(a.Y, b.Y, t.Y)
|
||||
);
|
||||
}
|
||||
|
||||
public PVecFloat Sign() { return new PVecFloat(Math.Sign(X), Math.Sign(Y)); }
|
||||
public PVecFloat Abs() { return new PVecFloat(Math.Abs(X), Math.Abs(Y)); }
|
||||
public PVecFloat Round() { return new PVecFloat((float)Math.Round(X), (float)Math.Round(Y)); }
|
||||
public float LengthSquared { get { return X * X + Y * Y; } }
|
||||
public float Length { get { return (float)Math.Sqrt(LengthSquared); } }
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2((int)X, (int)Y); }
|
||||
|
||||
static float Constrain(float x, float a, float b) { return x < a ? a : x > b ? b : x; }
|
||||
|
||||
public PVecFloat Constrain(PVecFloat min, PVecFloat max)
|
||||
{
|
||||
return new PVecFloat(
|
||||
Constrain(X, min.X, max.X),
|
||||
Constrain(Y, min.Y, max.Y)
|
||||
);
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
PVecFloat o = (PVecFloat)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "({0},{1})".F(X, Y); }
|
||||
}
|
||||
}
|
||||
80
OpenRA.Game/PVecInt.cs
Normal file
80
OpenRA.Game/PVecInt.cs
Normal 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;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
/// <summary>
|
||||
/// Pixel coordinate vector (fine; integer)
|
||||
/// </summary>
|
||||
public struct PVecInt
|
||||
{
|
||||
public readonly int X, Y;
|
||||
|
||||
public PVecInt(int x, int y) { X = x; Y = y; }
|
||||
public PVecInt(Size p) { X = p.Width; Y = p.Height; }
|
||||
|
||||
public static readonly PVecInt Zero = new PVecInt(0, 0);
|
||||
public static PVecInt OneCell { get { return new PVecInt(Game.CellSize, Game.CellSize); } }
|
||||
|
||||
public static implicit operator PVecFloat(PVecInt a) { return new PVecFloat((float)a.X, (float)a.Y); }
|
||||
public static explicit operator PVecInt(int2 a) { return new PVecInt(a.X, a.Y); }
|
||||
|
||||
public static PVecInt FromRadius(int r) { return new PVecInt(r, r); }
|
||||
|
||||
public static PVecInt operator +(PVecInt a, PVecInt b) { return new PVecInt(a.X + b.X, a.Y + b.Y); }
|
||||
public static PVecInt operator -(PVecInt a, PVecInt b) { return new PVecInt(a.X - b.X, a.Y - b.Y); }
|
||||
public static PVecInt operator *(int a, PVecInt b) { return new PVecInt(a * b.X, a * b.Y); }
|
||||
public static PVecInt operator *(PVecInt b, int a) { return new PVecInt(a * b.X, a * b.Y); }
|
||||
public static PVecInt operator /(PVecInt a, int b) { return new PVecInt(a.X / b, a.Y / b); }
|
||||
|
||||
public static PVecInt operator -(PVecInt a) { return new PVecInt(-a.X, -a.Y); }
|
||||
|
||||
public static bool operator ==(PVecInt me, PVecInt other) { return (me.X == other.X && me.Y == other.Y); }
|
||||
public static bool operator !=(PVecInt me, PVecInt other) { return !(me == other); }
|
||||
|
||||
public static PVecInt Max(PVecInt a, PVecInt b) { return new PVecInt(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)); }
|
||||
public static PVecInt Min(PVecInt a, PVecInt b) { return new PVecInt(Math.Min(a.X, b.X), Math.Min(a.Y, b.Y)); }
|
||||
|
||||
public static int Dot(PVecInt a, PVecInt b) { return a.X * b.X + a.Y * b.Y; }
|
||||
|
||||
public PVecInt Sign() { return new PVecInt(Math.Sign(X), Math.Sign(Y)); }
|
||||
public PVecInt Abs() { return new PVecInt(Math.Abs(X), Math.Abs(Y)); }
|
||||
public int LengthSquared { get { return X * X + Y * Y; } }
|
||||
public int Length { get { return (int)Math.Sqrt(LengthSquared); } }
|
||||
|
||||
public float2 ToFloat2() { return new float2(X, Y); }
|
||||
public int2 ToInt2() { return new int2(X, Y); }
|
||||
public CVec ToCVec() { return new CVec(X / Game.CellSize, Y / Game.CellSize); }
|
||||
|
||||
public PVecInt Clamp(Rectangle r)
|
||||
{
|
||||
return new PVecInt(
|
||||
Math.Min(r.Right, Math.Max(X, r.Left)),
|
||||
Math.Min(r.Bottom, Math.Max(Y, r.Top))
|
||||
);
|
||||
}
|
||||
|
||||
public override int GetHashCode() { return X.GetHashCode() ^ Y.GetHashCode(); }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
PVecInt o = (PVecInt)obj;
|
||||
return o == this;
|
||||
}
|
||||
|
||||
public override string ToString() { return "{0},{1}".F(X, Y); }
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA
|
||||
public readonly PlayerReference PlayerReference;
|
||||
public bool IsBot;
|
||||
|
||||
public Shroud Shroud { get { return World.LocalShroud; } }
|
||||
public Shroud Shroud;
|
||||
public World World { get; private set; }
|
||||
|
||||
static CountryInfo ChooseCountry(World world, string name)
|
||||
@@ -68,7 +68,7 @@ namespace OpenRA
|
||||
else
|
||||
{
|
||||
// Map player
|
||||
ClientIndex = 0; // Owned by the host (todo: fix this)
|
||||
ClientIndex = 0; // Owned by the host (TODO: fix this)
|
||||
ColorRamp = pr.ColorRamp;
|
||||
PlayerName = pr.Name;
|
||||
NonCombatant = pr.NonCombatant;
|
||||
@@ -76,7 +76,8 @@ namespace OpenRA
|
||||
Country = ChooseCountry(world, pr.Race);
|
||||
}
|
||||
PlayerActor = world.CreateActor("Player", new TypeDictionary { new OwnerInit(this) });
|
||||
|
||||
Shroud = PlayerActor.Trait<Shroud>();
|
||||
Shroud.Owner = this;
|
||||
// Enable the bot logic on the host
|
||||
IsBot = botType != null;
|
||||
if (IsBot && Game.IsHost)
|
||||
@@ -90,11 +91,6 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public void GiveAdvice(string advice)
|
||||
{
|
||||
Sound.PlayToPlayer(this, advice);
|
||||
}
|
||||
|
||||
public Dictionary<Player, Stance> Stances = new Dictionary<Player, Stance>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA
|
||||
|
||||
if (isClick)
|
||||
{
|
||||
var adjNewSelection = newSelection.Take(1); /* todo: select BEST, not FIRST */
|
||||
var adjNewSelection = newSelection.Take(1); /* TODO: select BEST, not FIRST */
|
||||
actors = (isCombine ? oldSelection.SymmetricDifference(adjNewSelection) : adjNewSelection).ToList();
|
||||
}
|
||||
else
|
||||
@@ -64,7 +64,7 @@ namespace OpenRA
|
||||
|
||||
Cache<int, List<Actor>> controlGroups = new Cache<int, List<Actor>>(_ => new List<Actor>());
|
||||
|
||||
public void DoControlGroup(World world, int group, Modifiers mods)
|
||||
public void DoControlGroup(World world, int group, Modifiers mods, int MultiTapCount)
|
||||
{
|
||||
var addModifier = Platform.CurrentPlatform == PlatformType.OSX ? Modifiers.Meta : Modifiers.Ctrl;
|
||||
if (mods.HasModifier(addModifier))
|
||||
@@ -72,7 +72,8 @@ namespace OpenRA
|
||||
if (actors.Count == 0)
|
||||
return;
|
||||
|
||||
controlGroups[group].Clear();
|
||||
if (!mods.HasModifier(Modifiers.Shift))
|
||||
controlGroups[group].Clear();
|
||||
|
||||
for (var i = 0; i < 10; i++) /* all control groups */
|
||||
controlGroups[i].RemoveAll(a => actors.Contains(a));
|
||||
@@ -81,7 +82,7 @@ namespace OpenRA
|
||||
return;
|
||||
}
|
||||
|
||||
if (mods.HasModifier(Modifiers.Alt))
|
||||
if (mods.HasModifier(Modifiers.Alt) || MultiTapCount >= 2)
|
||||
{
|
||||
Game.viewport.Center(controlGroups[group]);
|
||||
return;
|
||||
|
||||
@@ -44,6 +44,11 @@ namespace OpenRA.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
// NOTE(jsd): Poll the socket first to see if there's anything there.
|
||||
// This avoids the exception with SocketErrorCode == `SocketError.WouldBlock` thrown
|
||||
// from `socket.Receive(rx)`.
|
||||
if (!socket.Poll(0, SelectMode.SelectRead)) break;
|
||||
|
||||
if (0 < (len = socket.Receive(rx)))
|
||||
data.AddRange(rx.Take(len));
|
||||
else
|
||||
@@ -52,11 +57,12 @@ namespace OpenRA.Server
|
||||
server.DropClient(this);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
// NOTE(jsd): This should no longer be needed with the socket.Poll call above.
|
||||
if (e.SocketErrorCode == SocketError.WouldBlock) break;
|
||||
|
||||
server.DropClient(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* 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,
|
||||
@@ -15,13 +15,24 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Net.NetworkInformation;
|
||||
using UPnP;
|
||||
using System.Threading;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Network;
|
||||
|
||||
using XTimer = System.Timers.Timer;
|
||||
|
||||
namespace OpenRA.Server
|
||||
{
|
||||
public enum ServerState : int
|
||||
{
|
||||
WaitingPlayers = 1,
|
||||
GameStarted = 2,
|
||||
ShuttingDown = 3
|
||||
}
|
||||
|
||||
public class Server
|
||||
{
|
||||
// Valid player connections
|
||||
@@ -36,22 +47,42 @@ namespace OpenRA.Server
|
||||
|
||||
TypeDictionary ServerTraits = new TypeDictionary();
|
||||
public Session lobbyInfo;
|
||||
public bool GameStarted = false;
|
||||
|
||||
public readonly IPAddress Ip;
|
||||
public readonly int Port;
|
||||
int randomSeed;
|
||||
public readonly Thirdparty.Random Random = new Thirdparty.Random();
|
||||
|
||||
public ServerSettings Settings;
|
||||
public ModData ModData;
|
||||
public Map Map;
|
||||
XTimer gameTimeout;
|
||||
|
||||
volatile bool shutdown = false;
|
||||
public void Shutdown() { shutdown = true; }
|
||||
protected volatile ServerState pState = new ServerState();
|
||||
public ServerState State
|
||||
{
|
||||
get { return pState; }
|
||||
protected set { pState = value; }
|
||||
}
|
||||
|
||||
public void Shutdown()
|
||||
{
|
||||
State = ServerState.ShuttingDown;
|
||||
}
|
||||
|
||||
public void EndGame()
|
||||
{
|
||||
foreach (var t in ServerTraits.WithInterface<IEndGame>())
|
||||
t.GameEnded(this);
|
||||
if (Settings.AllowUPnP)
|
||||
RemovePortforward();
|
||||
}
|
||||
|
||||
public Server(IPEndPoint endpoint, string[] mods, ServerSettings settings, ModData modData)
|
||||
{
|
||||
Log.AddChannel("server", "server.log");
|
||||
|
||||
pState = ServerState.WaitingPlayers;
|
||||
listener = new TcpListener(endpoint);
|
||||
listener.Start();
|
||||
var localEndpoint = (IPEndPoint)listener.LocalEndpoint;
|
||||
@@ -63,6 +94,44 @@ namespace OpenRA.Server
|
||||
|
||||
randomSeed = (int)DateTime.Now.ToBinary();
|
||||
|
||||
if (Settings.AllowUPnP)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (UPnP.NAT.Discover())
|
||||
{
|
||||
Log.Write("server", "UPnP-enabled router discovered.");
|
||||
Log.Write("server", "Your IP is: {0}", UPnP.NAT.GetExternalIP() );
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Write("server", "No UPnP-enabled router detected.");
|
||||
Settings.AllowUPnP = false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenRA.Log.Write("server", "Can't discover UPnP-enabled routers: {0}", e);
|
||||
Settings.AllowUPnP = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.AllowUPnP)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (UPnP.NAT.ForwardPort(Port, ProtocolType.Tcp, "OpenRA"))
|
||||
Log.Write("server", "Port {0} (TCP) has been forwarded.", Port);
|
||||
else
|
||||
Settings.AllowUPnP = false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenRA.Log.Write("server", "Can not forward ports via UPnP: {0}", e);
|
||||
Settings.AllowUPnP = false;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var trait in modData.Manifest.ServerTraits)
|
||||
ServerTraits.Add( modData.ObjectCreator.CreateObject<ServerTrait>(trait) );
|
||||
|
||||
@@ -70,6 +139,8 @@ namespace OpenRA.Server
|
||||
lobbyInfo.GlobalSettings.RandomSeed = randomSeed;
|
||||
lobbyInfo.GlobalSettings.Map = settings.Map;
|
||||
lobbyInfo.GlobalSettings.ServerName = settings.Name;
|
||||
lobbyInfo.GlobalSettings.Ban = settings.Ban;
|
||||
lobbyInfo.GlobalSettings.Dedicated = settings.Dedicated;
|
||||
|
||||
foreach (var t in ServerTraits.WithInterface<INotifyServerStart>())
|
||||
t.ServerStarted(this);
|
||||
@@ -91,8 +162,11 @@ namespace OpenRA.Server
|
||||
foreach( var c in preConns ) checkRead.Add( c.socket );
|
||||
|
||||
Socket.Select( checkRead, null, null, timeout );
|
||||
if (shutdown)
|
||||
if (State == ServerState.ShuttingDown)
|
||||
{
|
||||
EndGame();
|
||||
break;
|
||||
}
|
||||
|
||||
foreach( Socket s in checkRead )
|
||||
if( s == listener.Server ) AcceptConnection();
|
||||
@@ -101,16 +175,22 @@ namespace OpenRA.Server
|
||||
var p = preConns.SingleOrDefault( c => c.socket == s );
|
||||
if (p != null) p.ReadData( this );
|
||||
}
|
||||
else if (conns.Count > 0) conns.Single( c => c.socket == s ).ReadData( this );
|
||||
else if (conns.Count > 0)
|
||||
{
|
||||
var conn = conns.SingleOrDefault( c => c.socket == s );
|
||||
if (conn != null) conn.ReadData( this );
|
||||
}
|
||||
|
||||
foreach (var t in ServerTraits.WithInterface<ITick>())
|
||||
t.Tick(this);
|
||||
|
||||
if (shutdown)
|
||||
if (State == ServerState.ShuttingDown)
|
||||
{
|
||||
EndGame();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GameStarted = false;
|
||||
foreach (var t in ServerTraits.WithInterface<INotifyServerShutdown>())
|
||||
t.ServerShutdown(this);
|
||||
|
||||
@@ -119,21 +199,30 @@ namespace OpenRA.Server
|
||||
try { listener.Stop(); }
|
||||
catch { }
|
||||
} ) { IsBackground = true }.Start();
|
||||
|
||||
}
|
||||
|
||||
/* lobby rework todo:
|
||||
void RemovePortforward()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (UPnP.NAT.DeleteForwardingRule(Port, ProtocolType.Tcp))
|
||||
Log.Write("server", "Port {0} (TCP) forwarding rules has been removed.", Port);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
OpenRA.Log.Write("server", "Can not remove UPnP portforwarding rules: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
/* lobby rework TODO:
|
||||
* - "teams together" option for team games -- will eliminate most need
|
||||
* for manual spawnpoint choosing.
|
||||
* - 256 max players is a dirty hack
|
||||
*/
|
||||
int nextPlayerIndex = 0;
|
||||
public int ChooseFreePlayerIndex()
|
||||
{
|
||||
for (var i = 0; i < 256; i++)
|
||||
if (conns.All(c => c.PlayerIndex != i) && preConns.All(c => c.PlayerIndex != i)
|
||||
&& lobbyInfo.Clients.All(c => c.Index != i))
|
||||
return i;
|
||||
|
||||
throw new InvalidOperationException("Already got 256 players");
|
||||
return nextPlayerIndex++;
|
||||
}
|
||||
|
||||
void AcceptConnection()
|
||||
@@ -179,7 +268,7 @@ namespace OpenRA.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GameStarted)
|
||||
if (State == ServerState.GameStarted)
|
||||
{
|
||||
Log.Write("server", "Rejected connection from {0}; game is already started.",
|
||||
newConn.socket.RemoteEndPoint);
|
||||
@@ -193,11 +282,12 @@ namespace OpenRA.Server
|
||||
var client = handshake.Client;
|
||||
var mods = handshake.Mods;
|
||||
|
||||
// Check that the client has compatable mods
|
||||
// Check that the client has compatible mods
|
||||
var valid = mods.All( m => m.Contains('@')) && //valid format
|
||||
mods.Count() == Game.CurrentMods.Count() && //same number
|
||||
mods.Select( m => Pair.New(m.Split('@')[0], m.Split('@')[1])).All(kv => Game.CurrentMods.ContainsKey(kv.First) &&
|
||||
(kv.Second == "{DEV_VERSION}" || Game.CurrentMods[kv.First].Version == "{DEV_VERSION}" || kv.Second == Game.CurrentMods[kv.First].Version));
|
||||
|
||||
if (!valid)
|
||||
{
|
||||
Log.Write("server", "Rejected connection from {0}; mods do not match.",
|
||||
@@ -207,6 +297,32 @@ namespace OpenRA.Server
|
||||
DropClient(newConn);
|
||||
return;
|
||||
}
|
||||
|
||||
// Drop DEV_VERSION if it's a Dedicated
|
||||
if ( lobbyInfo.GlobalSettings.Dedicated && mods.Any(m => m.Contains("{DEV_VERSION}")) )
|
||||
{
|
||||
Log.Write("server", "Rejected connection from {0}; DEV_VERSION is not allowed here.",
|
||||
newConn.socket.RemoteEndPoint);
|
||||
|
||||
SendOrderTo(newConn, "ServerError", "DEV_VERSION is not allowed here");
|
||||
DropClient(newConn);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if IP is banned
|
||||
if (lobbyInfo.GlobalSettings.Ban != null)
|
||||
{
|
||||
var remote_addr = ((IPEndPoint)newConn.socket.RemoteEndPoint).Address.ToString();
|
||||
if (lobbyInfo.GlobalSettings.Ban.Contains(remote_addr))
|
||||
{
|
||||
Console.WriteLine("Rejected connection from "+client.Name+"("+newConn.socket.RemoteEndPoint+"); Banned.");
|
||||
Log.Write("server", "Rejected connection from {0}; Banned.",
|
||||
newConn.socket.RemoteEndPoint);
|
||||
SendOrderTo(newConn, "ServerError", "You are banned from the server!");
|
||||
DropClient(newConn);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Promote connection to a valid client
|
||||
preConns.Remove(newConn);
|
||||
@@ -220,7 +336,12 @@ namespace OpenRA.Server
|
||||
SyncClientToPlayerReference(client, Map.Players[client.Slot]);
|
||||
|
||||
lobbyInfo.Clients.Add(client);
|
||||
//Assume that first validated client is server admin
|
||||
if(lobbyInfo.Clients.Where(c1 => c1.Bot == null).Count()==1)
|
||||
client.IsAdmin=true;
|
||||
|
||||
OpenRA.Network.Session.Client clientAdmin = lobbyInfo.Clients.Where(c1 => c1.IsAdmin).Single();
|
||||
|
||||
Log.Write("server", "Client {0}: Accepted connection from {1}",
|
||||
newConn.PlayerIndex, newConn.socket.RemoteEndPoint);
|
||||
|
||||
@@ -229,6 +350,24 @@ namespace OpenRA.Server
|
||||
|
||||
SyncLobbyInfo();
|
||||
SendChat(newConn, "has joined the game.");
|
||||
|
||||
if ( File.Exists("{0}motd_{1}.txt".F(Platform.SupportDir, lobbyInfo.GlobalSettings.Mods[0])) )
|
||||
{
|
||||
var motd = System.IO.File.ReadAllText("{0}motd_{1}.txt".F(Platform.SupportDir, lobbyInfo.GlobalSettings.Mods[0]));
|
||||
SendChatTo(newConn, motd);
|
||||
}
|
||||
|
||||
if ( lobbyInfo.GlobalSettings.Dedicated )
|
||||
{
|
||||
if (client.IsAdmin)
|
||||
SendChatTo(newConn, " You are admin now!");
|
||||
else
|
||||
SendChatTo(newConn, " Current admin is {0}".F(clientAdmin.Name));
|
||||
}
|
||||
|
||||
if (mods.Any(m => m.Contains("{DEV_VERSION}")))
|
||||
SendChat(newConn, "is running a development version, "+
|
||||
"and may cause desync if they have any incompatible changes.");
|
||||
}
|
||||
catch (Exception) { DropClient(newConn); }
|
||||
}
|
||||
@@ -239,6 +378,8 @@ namespace OpenRA.Server
|
||||
return;
|
||||
if (pr.LockColor)
|
||||
c.ColorRamp = pr.ColorRamp;
|
||||
else
|
||||
c.ColorRamp = c.PreferredColorRamp;
|
||||
if (pr.LockRace)
|
||||
c.Country = pr.Race;
|
||||
if (pr.LockSpawn)
|
||||
@@ -328,6 +469,9 @@ namespace OpenRA.Server
|
||||
|
||||
void InterpretServerOrder(Connection conn, ServerOrder so)
|
||||
{
|
||||
var fromClient = GetClient(conn);
|
||||
var fromIndex = fromClient != null ? fromClient.Index : 0;
|
||||
|
||||
switch (so.Name)
|
||||
{
|
||||
case "Command":
|
||||
@@ -343,17 +487,23 @@ namespace OpenRA.Server
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "HandshakeResponse":
|
||||
ValidateClient(conn, so.Data);
|
||||
break;
|
||||
|
||||
case "Chat":
|
||||
case "TeamChat":
|
||||
var fromClient = GetClient(conn);
|
||||
var fromIndex = fromClient != null ? fromClient.Index : 0;
|
||||
|
||||
foreach (var c in conns.Except(conn).ToArray())
|
||||
DispatchOrdersToClient(c, fromIndex, 0, so.Serialize());
|
||||
break;
|
||||
break;
|
||||
|
||||
case "PauseRequest":
|
||||
foreach (var c in conns.ToArray())
|
||||
{ var x = Order.PauseGame();
|
||||
DispatchOrdersToClient(c, fromIndex, 0, x.Serialize());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,16 +520,32 @@ namespace OpenRA.Server
|
||||
{
|
||||
conns.Remove(toDrop);
|
||||
SendChat(toDrop, "Connection Dropped");
|
||||
|
||||
if (GameStarted)
|
||||
|
||||
OpenRA.Network.Session.Client dropClient = lobbyInfo.Clients.Where(c1 => c1.Index == toDrop.PlayerIndex).Single();
|
||||
|
||||
if (State == ServerState.GameStarted)
|
||||
SendDisconnected(toDrop); /* Report disconnection */
|
||||
|
||||
lobbyInfo.Clients.RemoveAll(c => c.Index == toDrop.PlayerIndex);
|
||||
|
||||
// reassign admin if necessary
|
||||
if ( lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin && State == ServerState.WaitingPlayers)
|
||||
{
|
||||
if (lobbyInfo.Clients.Where(c1 => c1.Bot == null).Count() > 0)
|
||||
{
|
||||
// client was not alone on the server but he was admin: set admin to the last connected client
|
||||
OpenRA.Network.Session.Client lastClient = lobbyInfo.Clients.Where(c1 => c1.Bot == null).Last();
|
||||
lastClient.IsAdmin = true;
|
||||
SendChat(toDrop, "Admin left! {0} is a new admin now!".F(lastClient.Name));
|
||||
}
|
||||
}
|
||||
|
||||
DispatchOrders( toDrop, toDrop.MostRecentFrame, new byte[] { 0xbf } );
|
||||
|
||||
if (conns.Count != 0)
|
||||
if (conns.Count != 0 || lobbyInfo.GlobalSettings.Dedicated)
|
||||
SyncLobbyInfo();
|
||||
if ( !lobbyInfo.GlobalSettings.Dedicated && dropClient.IsAdmin )
|
||||
Shutdown();
|
||||
}
|
||||
|
||||
try
|
||||
@@ -391,7 +557,7 @@ namespace OpenRA.Server
|
||||
|
||||
public void SyncLobbyInfo()
|
||||
{
|
||||
if (!GameStarted) /* don't do this while the game is running, it breaks things. */
|
||||
if (State != ServerState.GameStarted) /* don't do this while the game is running, it breaks things. */
|
||||
DispatchOrders(null, 0,
|
||||
new ServerOrder("SyncInfo", lobbyInfo.Serialize()).Serialize());
|
||||
|
||||
@@ -401,13 +567,17 @@ namespace OpenRA.Server
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
GameStarted = true;
|
||||
State = ServerState.GameStarted;
|
||||
listener.Stop();
|
||||
|
||||
Console.WriteLine("Game started");
|
||||
|
||||
foreach( var c in conns )
|
||||
foreach( var d in conns )
|
||||
DispatchOrdersToClient( c, d.PlayerIndex, 0x7FFFFFFF, new byte[] { 0xBF } );
|
||||
|
||||
// Drop any unvalidated clients
|
||||
foreach (var c in preConns)
|
||||
foreach (var c in preConns.ToArray())
|
||||
DropClient(c);
|
||||
|
||||
DispatchOrders(null, 0,
|
||||
@@ -415,6 +585,18 @@ namespace OpenRA.Server
|
||||
|
||||
foreach (var t in ServerTraits.WithInterface<IStartGame>())
|
||||
t.GameStarted(this);
|
||||
|
||||
// Check TimeOut
|
||||
if ( Settings.TimeOut > 10000 )
|
||||
{
|
||||
gameTimeout = new XTimer(Settings.TimeOut);
|
||||
gameTimeout.Elapsed += (_,e) =>
|
||||
{
|
||||
Console.WriteLine("Timeout at {0}!!!", e.SignalTime);
|
||||
Environment.Exit(0);
|
||||
};
|
||||
gameTimeout.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace OpenRA.Server
|
||||
public interface INotifyServerShutdown { void ServerShutdown(Server server); }
|
||||
public interface IStartGame { void GameStarted(Server server); }
|
||||
public interface IClientJoined { void ClientJoined(Server server, Connection conn); }
|
||||
public interface IEndGame { void GameEnded(Server server); }
|
||||
public interface ITick
|
||||
{
|
||||
void Tick(Server server);
|
||||
@@ -28,7 +29,7 @@ namespace OpenRA.Server
|
||||
|
||||
public abstract class ServerTrait {}
|
||||
|
||||
public class DebugServerTrait : ServerTrait, IInterpretCommand, IStartGame, INotifySyncLobbyInfo, INotifyServerStart, INotifyServerShutdown
|
||||
public class DebugServerTrait : ServerTrait, IInterpretCommand, IStartGame, INotifySyncLobbyInfo, INotifyServerStart, INotifyServerShutdown, IEndGame
|
||||
{
|
||||
public bool InterpretCommand(Server server, Connection conn, Session.Client client, string cmd)
|
||||
{
|
||||
@@ -55,5 +56,10 @@ namespace OpenRA.Server
|
||||
{
|
||||
Console.WriteLine("ServerShutdown()");
|
||||
}
|
||||
|
||||
public void GameEnded(Server server)
|
||||
{
|
||||
Console.WriteLine("GameEnded()");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
163
OpenRA.Game/Server/UPnP.cs
Normal file
163
OpenRA.Game/Server/UPnP.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2008-2009 http://www.codeproject.com/Members/Harold-Aptroot
|
||||
* Source: http://www.codeproject.com/Articles/27992/NAT-Traversal-with-UPnP-in-C
|
||||
* This file is licensed under A Public Domain dedication.
|
||||
* For more information, see http://creativecommons.org/licenses/publicdomain/
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net.Sockets;
|
||||
using System.Net;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
|
||||
namespace UPnP
|
||||
{
|
||||
public class NAT
|
||||
{
|
||||
static string _serviceUrl;
|
||||
|
||||
public static bool Discover()
|
||||
{
|
||||
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
|
||||
s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
|
||||
s.ReceiveTimeout = 3000; //3 seconds
|
||||
string req = "M-SEARCH * HTTP/1.1\r\n" +
|
||||
"HOST: 239.255.255.250:1900\r\n" +
|
||||
"ST:upnp:rootdevice\r\n" +
|
||||
"MAN:\"ssdp:discover\"\r\n" +
|
||||
"MX:3\r\n\r\n";
|
||||
byte[] data = Encoding.ASCII.GetBytes(req);
|
||||
IPEndPoint ipe = new IPEndPoint(IPAddress.Broadcast, 1900);
|
||||
byte[] buffer = new byte[0x1000];
|
||||
|
||||
try
|
||||
{
|
||||
s.SendTo(data, ipe);
|
||||
int length = 0;
|
||||
do
|
||||
{
|
||||
length = s.Receive(buffer);
|
||||
|
||||
string resp = Encoding.ASCII.GetString(buffer, 0, length).ToLower();
|
||||
if (resp.Contains("upnp:rootdevice"))
|
||||
{
|
||||
resp = resp.Substring(resp.ToLower().IndexOf("location:") + 9);
|
||||
resp = resp.Substring(0, resp.IndexOf("\r")).Trim();
|
||||
if (!string.IsNullOrEmpty(_serviceUrl = GetServiceUrl(resp)))
|
||||
{
|
||||
s.Close();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} while (length > 0);
|
||||
s.Close();
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
s.Close();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static String GetServiceUrl(string resp)
|
||||
{
|
||||
XmlDocument desc = new XmlDocument();
|
||||
HttpWebRequest r = (HttpWebRequest)WebRequest.Create(resp);
|
||||
r.KeepAlive = false;
|
||||
using (WebResponse wres = r.GetResponse())
|
||||
{
|
||||
using (Stream ress = wres.GetResponseStream())
|
||||
{
|
||||
desc.Load(ress);
|
||||
XmlNamespaceManager nsMgr = new XmlNamespaceManager(desc.NameTable);
|
||||
nsMgr.AddNamespace("tns", "urn:schemas-upnp-org:device-1-0");
|
||||
XmlNode typen = desc.SelectSingleNode("//tns:device/tns:deviceType/text()", nsMgr);
|
||||
if (!typen.Value.Contains("InternetGatewayDevice"))
|
||||
return null;
|
||||
XmlNode node = desc.SelectSingleNode("//tns:service[tns:serviceType=\"urn:schemas-upnp-org:service:WANIPConnection:1\"]/tns:controlURL/text()", nsMgr);
|
||||
if (node == null)
|
||||
return null;
|
||||
Uri respUri = new Uri(resp);
|
||||
Uri combinedUri = new Uri(respUri, node.Value);
|
||||
return combinedUri.AbsoluteUri;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ForwardPort(int port, ProtocolType protocol, string description)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_serviceUrl))
|
||||
throw new Exception("No UPnP service available or Discover() has not been called");
|
||||
string body = String.Format("<u:AddPortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">"+
|
||||
"<NewRemoteHost></NewRemoteHost><NewExternalPort>{0}</NewExternalPort>"+
|
||||
"<NewProtocol>{1}</NewProtocol><NewInternalPort>{0}</NewInternalPort>" +
|
||||
"<NewInternalClient>{2}</NewInternalClient><NewEnabled>1</NewEnabled>" +
|
||||
"<NewPortMappingDescription>{3}</NewPortMappingDescription>"+
|
||||
"<NewLeaseDuration>0</NewLeaseDuration></u:AddPortMapping>",
|
||||
port, protocol.ToString().ToUpper(),Dns.GetHostAddresses(Dns.GetHostName())[0], description);
|
||||
if (SOAPRequest(_serviceUrl, body, "AddPortMapping") != null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool DeleteForwardingRule(int port, ProtocolType protocol)
|
||||
{
|
||||
if (string.IsNullOrEmpty(_serviceUrl))
|
||||
throw new Exception("No UPnP service available or Discover() has not been called");
|
||||
string body = String.Format("<u:DeletePortMapping xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">" +
|
||||
"<NewRemoteHost></NewRemoteHost><NewExternalPort>{0}</NewExternalPort>"+
|
||||
"<NewProtocol>{1}</NewProtocol></u:DeletePortMapping>", port, protocol.ToString().ToUpper() );
|
||||
if (SOAPRequest(_serviceUrl, body, "DeletePortMapping") != null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static IPAddress GetExternalIP()
|
||||
{
|
||||
if (string.IsNullOrEmpty(_serviceUrl))
|
||||
throw new Exception("No UPnP service available or Discover() has not been called");
|
||||
XmlDocument xdoc = SOAPRequest(_serviceUrl, "<u:GetExternalIPAddress xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\">" +
|
||||
"</u:GetExternalIPAddress>", "GetExternalIPAddress");
|
||||
XmlNamespaceManager nsMgr = new XmlNamespaceManager(xdoc.NameTable);
|
||||
nsMgr.AddNamespace("tns", "urn:schemas-upnp-org:device-1-0");
|
||||
string IP = xdoc.SelectSingleNode("//NewExternalIPAddress/text()", nsMgr).Value;
|
||||
return IPAddress.Parse(IP);
|
||||
}
|
||||
|
||||
private static XmlDocument SOAPRequest(string url, string soap, string function)
|
||||
{
|
||||
string body = "<?xml version=\"1.0\"?>" +
|
||||
"<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">" +
|
||||
"<s:Body>" +
|
||||
soap +
|
||||
"</s:Body>" +
|
||||
"</s:Envelope>";
|
||||
HttpWebRequest r = (HttpWebRequest)WebRequest.Create(url);
|
||||
r.KeepAlive = false;
|
||||
r.Method = "POST";
|
||||
byte[] b = Encoding.UTF8.GetBytes(body);
|
||||
r.Headers.Add("SOAPACTION", "\"urn:schemas-upnp-org:service:WANIPConnection:1#" + function + "\"");
|
||||
r.ContentType = "text/xml; charset=\"utf-8\"";
|
||||
r.ContentLength = b.Length;
|
||||
Stream newStream = r.GetRequestStream();
|
||||
newStream.Write(b, 0, b.Length);
|
||||
XmlDocument resp = new XmlDocument();
|
||||
using (WebResponse wres = r.GetResponse())
|
||||
{
|
||||
using (Stream ress = wres.GetResponseStream())
|
||||
{
|
||||
resp.Load(ress);
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,12 @@ namespace OpenRA
|
||||
|
||||
static ISoundSource LoadSound(string filename)
|
||||
{
|
||||
if (!FileSystem.Exists(filename))
|
||||
{
|
||||
Log.Write("debug", "LoadSound, file does not exist: {0}", filename);
|
||||
return null;
|
||||
}
|
||||
|
||||
return LoadSoundRaw(AudLoader.LoadSound(FileSystem.Open(filename)));
|
||||
}
|
||||
|
||||
@@ -37,9 +43,22 @@ namespace OpenRA
|
||||
return soundEngine.AddSoundSourceFromMemory(rawData, 1, 16, 22050);
|
||||
}
|
||||
|
||||
public static void Create()
|
||||
static ISoundEngine CreateEngine(string engine)
|
||||
{
|
||||
soundEngine = new OpenAlSoundEngine();
|
||||
engine = Game.Settings.Server.Dedicated?"Null":engine;
|
||||
switch (engine)
|
||||
{ /* TODO: if someone cares about pluggable crap here, ship this out */
|
||||
case "AL": return new OpenAlSoundEngine();
|
||||
case "Null": return new NullSoundEngine();
|
||||
|
||||
default:
|
||||
throw new InvalidOperationException("Unsupported sound engine: {0}".F (engine));
|
||||
}
|
||||
}
|
||||
|
||||
public static void Create(string engine)
|
||||
{
|
||||
soundEngine = CreateEngine(engine);
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
@@ -52,29 +71,29 @@ namespace OpenRA
|
||||
|
||||
public static void SetListenerPosition(float2 position) { soundEngine.SetListenerPosition(position); }
|
||||
|
||||
static ISound Play(Player player, string name, bool headRelative, float2 pos, float volumeModifier)
|
||||
static ISound Play(Player player, string name, bool headRelative, PPos pos, float volumeModifier)
|
||||
{
|
||||
if (player != null && player != player.World.LocalPlayer)
|
||||
if (String.IsNullOrEmpty(name))
|
||||
return null;
|
||||
if (name == "" || name == null)
|
||||
if (player != null && player != player.World.LocalPlayer)
|
||||
return null;
|
||||
|
||||
return soundEngine.Play2D(sounds[name],
|
||||
false, headRelative, pos,
|
||||
InternalSoundVolume * volumeModifier);
|
||||
false, headRelative, pos.ToFloat2(),
|
||||
InternalSoundVolume * volumeModifier, true);
|
||||
}
|
||||
|
||||
public static ISound Play(string name) { return Play(null, name, true, float2.Zero, 1); }
|
||||
public static ISound Play(string name, float2 pos) { return Play(null, name, false, pos, 1); }
|
||||
public static ISound Play(string name, float volumeModifier) { return Play(null, name, true, float2.Zero, volumeModifier); }
|
||||
public static ISound Play(string name, float2 pos, float volumeModifier) { return Play(null, name, false, pos, volumeModifier); }
|
||||
public static ISound PlayToPlayer(Player player, string name) { return Play( player, name, true, float2.Zero, 1); }
|
||||
public static ISound PlayToPlayer(Player player, string name, float2 pos) { return Play(player, name, false, pos, 1); }
|
||||
public static ISound Play(string name) { return Play(null, name, true, PPos.Zero, 1); }
|
||||
public static ISound Play(string name, PPos pos) { return Play(null, name, false, pos, 1); }
|
||||
public static ISound Play(string name, float volumeModifier) { return Play(null, name, true, PPos.Zero, volumeModifier); }
|
||||
public static ISound Play(string name, PPos pos, float volumeModifier) { return Play(null, name, false, pos, volumeModifier); }
|
||||
public static ISound PlayToPlayer(Player player, string name) { return Play(player, name, true, PPos.Zero, 1); }
|
||||
public static ISound PlayToPlayer(Player player, string name, PPos pos) { return Play(player, name, false, pos, 1); }
|
||||
|
||||
public static void PlayVideo(byte[] raw)
|
||||
{
|
||||
rawSource = LoadSoundRaw(raw);
|
||||
video = soundEngine.Play2D(rawSource, false, true, float2.Zero, InternalSoundVolume);
|
||||
video = soundEngine.Play2D(rawSource, false, true, float2.Zero, InternalSoundVolume, false);
|
||||
}
|
||||
|
||||
public static void PlayVideo()
|
||||
@@ -128,10 +147,12 @@ namespace OpenRA
|
||||
}
|
||||
StopMusic();
|
||||
|
||||
var sound = sounds[m.Filename];
|
||||
if (sound == null) return;
|
||||
|
||||
music = soundEngine.Play2D(sound, false, true, float2.Zero, MusicVolume, false);
|
||||
currentMusic = m;
|
||||
MusicPlaying = true;
|
||||
var sound = sounds[m.Filename];
|
||||
music = soundEngine.Play2D(sound, false, true, float2.Zero, MusicVolume);
|
||||
}
|
||||
|
||||
public static void PlayMusic()
|
||||
@@ -226,7 +247,51 @@ namespace OpenRA
|
||||
get { return (video != null) ? video.SeekPosition : 0; }
|
||||
}
|
||||
|
||||
// Returns true if it played a phrase
|
||||
// Returns true if played successfully
|
||||
public static bool PlayPredefined(Player p, Actor voicedUnit, string type, string definition, string variant, bool attentuateVolume)
|
||||
{
|
||||
if (definition == null) return false;
|
||||
|
||||
if (Rules.Voices == null) return false;
|
||||
if (Rules.Notifications == null) return false;
|
||||
var rules = (voicedUnit != null) ? Rules.Voices[type] : Rules.Notifications[type];
|
||||
if (rules == null) return false;
|
||||
|
||||
var ID = (voicedUnit != null) ? voicedUnit.ActorID : 0;
|
||||
|
||||
var clip = (voicedUnit != null) ? rules.VoicePools.Value[definition].GetNext() : rules.NotificationsPools.Value[definition].GetNext();
|
||||
if (clip == null) return false;
|
||||
|
||||
var suffix = rules.DefaultVariant;
|
||||
var prefix = rules.DefaultPrefix;
|
||||
|
||||
if (voicedUnit != null)
|
||||
{
|
||||
if (!rules.VoicePools.Value.ContainsKey("Attack"))
|
||||
rules.VoicePools.Value.Add("Attack", rules.VoicePools.Value["Move"]);
|
||||
|
||||
if (!rules.VoicePools.Value.ContainsKey("AttackMove"))
|
||||
rules.VoicePools.Value.Add("AttackMove", rules.VoicePools.Value["Move"]);
|
||||
}
|
||||
|
||||
if (variant != null)
|
||||
{
|
||||
if (rules.Variants.ContainsKey(variant) && !rules.DisableVariants.Contains(definition))
|
||||
suffix = rules.Variants[variant][ID % rules.Variants[variant].Length];
|
||||
if (rules.Prefixes.ContainsKey(variant) && !rules.DisablePrefixes.Contains(definition))
|
||||
prefix = rules.Prefixes[variant][ID % rules.Prefixes[variant].Length];
|
||||
}
|
||||
|
||||
var name = prefix + clip + suffix;
|
||||
|
||||
if (!String.IsNullOrEmpty(name) && (p == null || p == p.World.LocalPlayer))
|
||||
soundEngine.Play2D(sounds[name],
|
||||
false, true, float2.Zero,
|
||||
InternalSoundVolume, attentuateVolume);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool PlayVoice(string phrase, Actor voicedUnit, string variant)
|
||||
{
|
||||
if (voicedUnit == null) return false;
|
||||
@@ -236,26 +301,24 @@ namespace OpenRA
|
||||
if (mi == null) return false;
|
||||
if (mi.Voice == null) return false;
|
||||
|
||||
var vi = Rules.Voices[mi.Voice.ToLowerInvariant()];
|
||||
var type = mi.Voice.ToLowerInvariant();
|
||||
|
||||
if (!vi.Pools.Value.ContainsKey(phrase))
|
||||
return false;
|
||||
return PlayPredefined(null, voicedUnit, type, phrase, variant, true);
|
||||
}
|
||||
|
||||
var clip = vi.Pools.Value[phrase].GetNext();
|
||||
if (clip == null)
|
||||
return false;
|
||||
public static bool PlayNotification(Player player, string type, string notification, string variant)
|
||||
{
|
||||
if (type == null) return false;
|
||||
if (notification == null) return false;
|
||||
|
||||
var variantExt = (vi.Variants.ContainsKey(variant) && !vi.DisableVariants.Contains(phrase)) ?
|
||||
vi.Variants[variant][voicedUnit.ActorID % vi.Variants[variant].Length] : vi.DefaultVariant;
|
||||
Play(clip + variantExt);
|
||||
return true;
|
||||
return PlayPredefined(player, null, type.ToLowerInvariant(), notification, variant, false);
|
||||
}
|
||||
}
|
||||
|
||||
interface ISoundEngine
|
||||
{
|
||||
ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate);
|
||||
ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume);
|
||||
ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume, bool attenuateVolume);
|
||||
float Volume { get; set; }
|
||||
void PauseSound(ISound sound, bool paused);
|
||||
void StopSound(ISound sound);
|
||||
@@ -276,8 +339,17 @@ namespace OpenRA
|
||||
|
||||
class OpenAlSoundEngine : ISoundEngine
|
||||
{
|
||||
class PoolSlot
|
||||
{
|
||||
public bool isActive;
|
||||
public int frameStarted;
|
||||
public float2 pos;
|
||||
public bool isRelative;
|
||||
public ISoundSource sound;
|
||||
}
|
||||
|
||||
float volume = 1f;
|
||||
Dictionary<int, bool> sourcePool = new Dictionary<int, bool>();
|
||||
Dictionary<int, PoolSlot> sourcePool = new Dictionary<int, PoolSlot>();
|
||||
const int POOL_SIZE = 32;
|
||||
|
||||
public OpenAlSoundEngine()
|
||||
@@ -301,7 +373,7 @@ namespace OpenRA
|
||||
return;
|
||||
}
|
||||
|
||||
sourcePool.Add(source, false);
|
||||
sourcePool.Add(source, new PoolSlot() { isActive = false });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,9 +381,9 @@ namespace OpenRA
|
||||
{
|
||||
foreach (var kvp in sourcePool)
|
||||
{
|
||||
if (!kvp.Value)
|
||||
if (!kvp.Value.isActive)
|
||||
{
|
||||
sourcePool[kvp.Key] = true;
|
||||
sourcePool[kvp.Key].isActive = true;
|
||||
return kvp.Key;
|
||||
}
|
||||
}
|
||||
@@ -329,9 +401,9 @@ namespace OpenRA
|
||||
return -1;
|
||||
|
||||
foreach (int i in freeSources)
|
||||
sourcePool[i] = false;
|
||||
sourcePool[i].isActive = false;
|
||||
|
||||
sourcePool[freeSources[0]] = true;
|
||||
sourcePool[freeSources[0]].isActive = true;
|
||||
|
||||
return freeSources[0];
|
||||
}
|
||||
@@ -341,10 +413,62 @@ namespace OpenRA
|
||||
return new OpenAlSoundSource(data, channels, sampleBits, sampleRate);
|
||||
}
|
||||
|
||||
public ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume)
|
||||
const int maxInstancesPerFrame = 3;
|
||||
const int groupDistance = 64;
|
||||
const int groupDistanceSqr = groupDistance * groupDistance;
|
||||
|
||||
public ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume, bool attenuateVolume)
|
||||
{
|
||||
if (sound == null)
|
||||
{
|
||||
Log.Write("debug", "Attempt to Play2D a null `ISoundSource`");
|
||||
return null;
|
||||
}
|
||||
|
||||
var world = Game.orderManager.world;
|
||||
int currFrame = world != null ? world.FrameNumber : 0;
|
||||
float atten = 1f;
|
||||
|
||||
// Check if max # of instances-per-location reached:
|
||||
if (attenuateVolume)
|
||||
{
|
||||
int instances = 0, activeCount = 0;
|
||||
foreach (var s in sourcePool.Values)
|
||||
{
|
||||
if (!s.isActive)
|
||||
continue;
|
||||
if (s.isRelative != relative)
|
||||
continue;
|
||||
|
||||
++activeCount;
|
||||
if (s.sound != sound)
|
||||
continue;
|
||||
if (currFrame - s.frameStarted >= 5)
|
||||
continue;
|
||||
|
||||
// Too far away to count?
|
||||
var lensqr = (s.pos - pos).LengthSquared;
|
||||
if (lensqr >= groupDistanceSqr)
|
||||
continue;
|
||||
|
||||
// If we are starting too many instances of the same sound within a short time then stop this one:
|
||||
if (++instances == maxInstancesPerFrame)
|
||||
return null;
|
||||
}
|
||||
|
||||
// Attenuate a little bit based on number of active sounds:
|
||||
atten = 0.66f * ((POOL_SIZE - activeCount * 0.5f) / POOL_SIZE);
|
||||
}
|
||||
|
||||
int source = GetSourceFromPool();
|
||||
return new OpenAlSound(source, (sound as OpenAlSoundSource).buffer, loop, relative, pos, volume);
|
||||
if (source == -1) return null;
|
||||
|
||||
var slot = sourcePool[source];
|
||||
slot.pos = pos;
|
||||
slot.frameStarted = currFrame;
|
||||
slot.sound = sound;
|
||||
slot.isRelative = relative;
|
||||
return new OpenAlSound(source, (sound as OpenAlSoundSource).buffer, loop, relative, pos, volume * atten);
|
||||
}
|
||||
|
||||
public float Volume
|
||||
@@ -355,6 +479,8 @@ namespace OpenRA
|
||||
|
||||
public void PauseSound(ISound sound, bool paused)
|
||||
{
|
||||
if (sound == null) return;
|
||||
|
||||
int key = ((OpenAlSound)sound).source;
|
||||
int state;
|
||||
Al.alGetSourcei(key, Al.AL_SOURCE_STATE, out state);
|
||||
@@ -396,6 +522,8 @@ namespace OpenRA
|
||||
|
||||
public void StopSound(ISound sound)
|
||||
{
|
||||
if (sound == null) return;
|
||||
|
||||
int key = ((OpenAlSound)sound).source;
|
||||
int state;
|
||||
Al.alGetSourcei(key, Al.AL_SOURCE_STATE, out state);
|
||||
@@ -453,15 +581,14 @@ namespace OpenRA
|
||||
if (source == -1) return;
|
||||
this.source = source;
|
||||
Al.alSourcef(source, Al.AL_PITCH, 1f);
|
||||
Al.alSourcef(source, Al.AL_GAIN, 1f);
|
||||
Volume = volume;
|
||||
Al.alSource3f(source, Al.AL_POSITION, pos.X, pos.Y, 0f);
|
||||
Al.alSource3f(source, Al.AL_VELOCITY, 0f, 0f, 0f);
|
||||
Al.alSourcei(source, Al.AL_BUFFER, buffer);
|
||||
Al.alSourcei(source, Al.AL_LOOPING, looping ? Al.AL_TRUE : Al.AL_FALSE);
|
||||
Al.alSourcei(source, Al.AL_SOURCE_RELATIVE, relative ? 1 : 0);
|
||||
Al.alSourcef(source, Al.AL_REFERENCE_DISTANCE, 200);
|
||||
Al.alSourcef(source, Al.AL_MAX_DISTANCE, 1500);
|
||||
Volume = volume;
|
||||
Al.alSourcef(source, Al.AL_REFERENCE_DISTANCE, 160);
|
||||
Al.alSourcef(source, Al.AL_MAX_DISTANCE, 3200 / Game.viewport.Zoom);
|
||||
Al.alSourcePlay(source);
|
||||
}
|
||||
|
||||
@@ -495,4 +622,35 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class NullSoundEngine : ISoundEngine
|
||||
{
|
||||
public ISoundSource AddSoundSourceFromMemory(byte[] data, int channels, int sampleBits, int sampleRate)
|
||||
{
|
||||
return new NullSoundSource();
|
||||
}
|
||||
|
||||
public ISound Play2D(ISoundSource sound, bool loop, bool relative, float2 pos, float volume, bool attenuateVolume)
|
||||
{
|
||||
return new NullSound();
|
||||
}
|
||||
|
||||
public void PauseSound(ISound sound, bool paused) {}
|
||||
public void StopSound(ISound sound) {}
|
||||
public void SetAllSoundsPaused(bool paused) {}
|
||||
public void StopAllSounds() {}
|
||||
public void SetListenerPosition(float2 position) {}
|
||||
public void SetSoundVolume(float volume, ISound music, ISound video) {}
|
||||
|
||||
public float Volume { get; set; }
|
||||
}
|
||||
|
||||
class NullSoundSource : ISoundSource {}
|
||||
|
||||
class NullSound : ISound
|
||||
{
|
||||
public float Volume { get; set; }
|
||||
public float SeekPosition { get { return 0; } }
|
||||
public bool Playing { get { return false; } }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,13 +13,14 @@ using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
[STAThread]
|
||||
static void Main( string[] args )
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// brutal hack
|
||||
Application.CurrentCulture = CultureInfo.InvariantCulture;
|
||||
@@ -32,19 +33,60 @@ namespace OpenRA
|
||||
|
||||
try
|
||||
{
|
||||
Run( args );
|
||||
Run(args);
|
||||
}
|
||||
catch( Exception e )
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.AddChannel("exception", "exception.log");
|
||||
Log.Write("exception", "{0}", e.ToString());
|
||||
throw;
|
||||
var rpt = BuildExceptionReport(e).ToString();
|
||||
Log.Write("exception", "{0}", rpt);
|
||||
Console.Error.WriteLine(rpt);
|
||||
}
|
||||
}
|
||||
|
||||
static void Run( string[] args )
|
||||
static StringBuilder BuildExceptionReport(Exception e)
|
||||
{
|
||||
Game.Initialize( new Arguments(args) );
|
||||
return BuildExceptionReport(e, new StringBuilder(), 0);
|
||||
}
|
||||
|
||||
static void Indent(StringBuilder sb, int d)
|
||||
{
|
||||
sb.Append(new string(' ', d * 2));
|
||||
}
|
||||
|
||||
static StringBuilder BuildExceptionReport(Exception e, StringBuilder sb, int d)
|
||||
{
|
||||
if (e == null) return sb;
|
||||
|
||||
sb.AppendFormat("Exception of type `{0}`: {1}", e.GetType().FullName, e.Message);
|
||||
|
||||
if (e is TypeLoadException)
|
||||
{
|
||||
var tle = (TypeLoadException)e;
|
||||
sb.AppendLine();
|
||||
Indent(sb, d);
|
||||
sb.AppendFormat("TypeName=`{0}`", tle.TypeName);
|
||||
}
|
||||
else // TODO: more exception types
|
||||
{
|
||||
}
|
||||
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
sb.AppendLine();
|
||||
Indent(sb, d); sb.Append("Inner ");
|
||||
BuildExceptionReport(e.InnerException, sb, d + 1);
|
||||
}
|
||||
|
||||
sb.AppendLine();
|
||||
Indent(sb, d); sb.Append(e.StackTrace);
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
static void Run(string[] args)
|
||||
{
|
||||
Game.Initialize(new Arguments(args));
|
||||
GC.Collect();
|
||||
Game.Run();
|
||||
}
|
||||
|
||||
@@ -50,6 +50,36 @@ namespace OpenRA
|
||||
il.EmitCall(OpCodes.Call, ((Func<int2, int>)hash_int2).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(CPos))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<CPos, int>)hash_CPos).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(CVec))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<CVec, int>)hash_CVec).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(PPos))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<PPos, int>)hash_PPos).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(PVecInt))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<PVecInt, int>)hash_PVecInt).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(PSubPos))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<PSubPos, int>)hash_PSubPos).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(PSubVec))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<PSubVec, int>)hash_PSubVec).Method, null);
|
||||
il.Emit(OpCodes.Xor);
|
||||
}
|
||||
else if (type == typeof(TypeDictionary))
|
||||
{
|
||||
il.EmitCall(OpCodes.Call, ((Func<TypeDictionary, int>)hash_tdict).Method, null);
|
||||
@@ -110,6 +140,36 @@ namespace OpenRA
|
||||
return ( ( i2.X * 5 ) ^ ( i2.Y * 3 ) ) / 4;
|
||||
}
|
||||
|
||||
public static int hash_CPos( CPos i2 )
|
||||
{
|
||||
return ( ( i2.X * 5) ^ ( i2.Y * 3 ) ) / 4;
|
||||
}
|
||||
|
||||
public static int hash_CVec( CVec i2 )
|
||||
{
|
||||
return ( ( i2.X * 5) ^ ( i2.Y * 3 ) ) / 4;
|
||||
}
|
||||
|
||||
public static int hash_PPos( PPos i2 )
|
||||
{
|
||||
return ( ( i2.X * 5) ^ ( i2.Y * 3 ) ) / 4;
|
||||
}
|
||||
|
||||
public static int hash_PVecInt( PVecInt i2 )
|
||||
{
|
||||
return ( ( i2.X * 5) ^ ( i2.Y * 3 ) ) / 4;
|
||||
}
|
||||
|
||||
public static int hash_PSubPos(PSubPos i2)
|
||||
{
|
||||
return ((i2.X * 5) ^ (i2.Y * 3)) / 4;
|
||||
}
|
||||
|
||||
public static int hash_PSubVec(PSubVec i2)
|
||||
{
|
||||
return ((i2.X * 5) ^ (i2.Y * 3)) / 4;
|
||||
}
|
||||
|
||||
public static int hash_tdict( TypeDictionary d )
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -54,31 +54,33 @@ namespace OpenRA
|
||||
InnerGet( t ).Add( actor, val );
|
||||
}
|
||||
|
||||
void CheckDestroyed(Actor actor)
|
||||
{
|
||||
if (actor.Destroyed)
|
||||
throw new InvalidOperationException("Attempted to get trait from destroyed object ({0})".F(actor));
|
||||
}
|
||||
|
||||
public bool Contains<T>( Actor actor )
|
||||
{
|
||||
if( actor.Destroyed )
|
||||
throw new InvalidOperationException("Attempted to get trait from destroyed object ({0})".F(actor));
|
||||
CheckDestroyed(actor);
|
||||
return ( (TraitContainer<T>)InnerGet( typeof( T ) ) ).GetMultiple( actor.ActorID ).Count() != 0;
|
||||
}
|
||||
|
||||
public T Get<T>( Actor actor )
|
||||
{
|
||||
if( actor.Destroyed )
|
||||
throw new InvalidOperationException("Attempted to get trait from destroyed object ({0})".F(actor));
|
||||
CheckDestroyed(actor);
|
||||
return ( (TraitContainer<T>)InnerGet( typeof( T ) ) ).Get( actor.ActorID );
|
||||
}
|
||||
|
||||
public T GetOrDefault<T>( Actor actor )
|
||||
{
|
||||
if( actor.Destroyed )
|
||||
throw new InvalidOperationException("Attempted to get trait from destroyed object ({0})".F(actor));
|
||||
CheckDestroyed(actor);
|
||||
return ( (TraitContainer<T>)InnerGet( typeof( T ) ) ).GetOrDefault( actor.ActorID );
|
||||
}
|
||||
|
||||
public IEnumerable<T> WithInterface<T>( Actor actor )
|
||||
{
|
||||
if( actor.Destroyed )
|
||||
throw new InvalidOperationException("Attempted to get trait from destroyed object ({0})".F(actor));
|
||||
CheckDestroyed(actor);
|
||||
return ( (TraitContainer<T>)InnerGet( typeof( T ) ) ).GetMultiple( actor.ActorID );
|
||||
}
|
||||
|
||||
@@ -118,14 +120,10 @@ namespace OpenRA
|
||||
|
||||
public T Get( uint actor )
|
||||
{
|
||||
++queries;
|
||||
var index = actors.BinarySearchMany( actor );
|
||||
if( index >= actors.Count || actors[ index ].ActorID != actor )
|
||||
throw new InvalidOperationException("TraitDictionary does not contain instance of type `{0}`".F(typeof(T)));
|
||||
else if( index + 1 < actors.Count && actors[ index + 1 ].ActorID == actor )
|
||||
throw new InvalidOperationException("TraitDictionary contains multiple instance of type `{0}`".F(typeof(T)));
|
||||
else
|
||||
return traits[ index ];
|
||||
var result = GetOrDefault(actor);
|
||||
if ((object)result == null)
|
||||
throw new InvalidOperationException("Actor does not have trait of type `{0}`".F(typeof(T)));
|
||||
return result;
|
||||
}
|
||||
|
||||
public T GetOrDefault( uint actor )
|
||||
@@ -135,7 +133,7 @@ namespace OpenRA
|
||||
if( index >= actors.Count || actors[ index ].ActorID != actor )
|
||||
return default( T );
|
||||
else if( index + 1 < actors.Count && actors[ index + 1 ].ActorID == actor )
|
||||
throw new InvalidOperationException("TraitDictionary contains multiple instance of type `{0}`".F(typeof(T)));
|
||||
throw new InvalidOperationException("Actor has multiple traits of type `{0}`".F(typeof(T)));
|
||||
else return traits[ index ];
|
||||
}
|
||||
|
||||
|
||||
64
OpenRA.Game/Traits/CreatesShroud.cs
Normal file
64
OpenRA.Game/Traits/CreatesShroud.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
#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;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
public class CreatesShroudInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Range = 0;
|
||||
public object Create(ActorInitializer init) { return new CreatesShroud(this); }
|
||||
}
|
||||
|
||||
public class CreatesShroud : ITick, ISync
|
||||
{
|
||||
CreatesShroudInfo Info;
|
||||
[Sync] CPos previousLocation;
|
||||
Shroud.ActorVisibility v;
|
||||
|
||||
public CreatesShroud(CreatesShroudInfo info)
|
||||
{
|
||||
Info = info;
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
// TODO: don't tick all the time.
|
||||
if(self.Owner == null) return;
|
||||
|
||||
if (previousLocation != self.Location && v != null) {
|
||||
previousLocation = self.Location;
|
||||
|
||||
var shrouds = self.World.ActorsWithTrait<Shroud>().Select(s => s.Actor.Owner.Shroud);
|
||||
foreach (var shroud in shrouds) {
|
||||
shroud.UnhideActor(self, v, Info.Range);
|
||||
}
|
||||
}
|
||||
|
||||
if (!self.TraitsImplementing<IDisable>().Any(d => d.Disabled)) {
|
||||
var shrouds = self.World.ActorsWithTrait<Shroud>().Select(s => s.Actor.Owner.Shroud);
|
||||
foreach (var shroud in shrouds) {
|
||||
shroud.HideActor(self, Info.Range);
|
||||
}
|
||||
}
|
||||
else {
|
||||
var shrouds = self.World.ActorsWithTrait<Shroud>().Select(s => s.Actor.Owner.Shroud);
|
||||
foreach (var shroud in shrouds) {
|
||||
shroud.UnhideActor(self, v, Info.Range);
|
||||
}
|
||||
}
|
||||
|
||||
v = new Shroud.ActorVisibility {
|
||||
vis = Shroud.GetVisOrigins(self).ToArray()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user