mirror of
https://github.com/AndorsTrailRelease/andors-trail.git
synced 2026-01-04 02:25:04 +01:00
Compare commits
1311 Commits
v0.8.2_com
...
master_tmp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d25d7916b0 | ||
|
|
1a43fad4bb | ||
|
|
c5e1806b9f | ||
|
|
dee12635a1 | ||
|
|
5fac187f80 | ||
|
|
4d18951e94 | ||
|
|
48ac678c9c | ||
|
|
3a343b12ee | ||
|
|
1174495f67 | ||
|
|
e0b62484f4 | ||
|
|
a2c41fd470 | ||
|
|
6633bf15e6 | ||
|
|
64644ca5be | ||
|
|
31d83b0f44 | ||
|
|
98ceed6ea6 | ||
|
|
85c71fb49f | ||
|
|
b91388c085 | ||
|
|
6faf448a29 | ||
|
|
d6fe78132a | ||
|
|
7359e55047 | ||
|
|
a5a97bedba | ||
|
|
bcb317d799 | ||
|
|
521358a8b8 | ||
|
|
901bc3ba43 | ||
|
|
3ea543213a | ||
|
|
e54ddf5d6c | ||
|
|
349baa17d3 | ||
|
|
00b84109c8 | ||
|
|
01f2bcc8c6 | ||
|
|
78308b5d98 | ||
|
|
891664c8ff | ||
|
|
07dd3d81ff | ||
|
|
9196b56a3d | ||
|
|
fa70ba8fb6 | ||
|
|
6e4e60a713 | ||
|
|
2caff38db9 | ||
|
|
1b6d1ce5f1 | ||
|
|
8fcd6c73b6 | ||
|
|
b5eb47aff8 | ||
|
|
87ddae5571 | ||
|
|
e06de09e15 | ||
|
|
9ca3833117 | ||
|
|
bd4efa9434 | ||
|
|
c07bbb8ef6 | ||
|
|
503a0725b9 | ||
|
|
2760e081ac | ||
|
|
8e2bea1f35 | ||
|
|
4369a3dfb3 | ||
|
|
a844e05946 | ||
|
|
401b79fcf3 | ||
|
|
0cf139035a | ||
|
|
a332b06266 | ||
|
|
0eb4a1512f | ||
|
|
0ecda7eb62 | ||
|
|
4cacf8de1e | ||
|
|
6086a54f0f | ||
|
|
f376bd3445 | ||
|
|
e722852f93 | ||
|
|
9e9102fdc0 | ||
|
|
491e95e4a1 | ||
|
|
31755b480a | ||
|
|
d89aed8dc5 | ||
|
|
931597abcb | ||
|
|
77ab35da91 | ||
|
|
0684fd8e25 | ||
|
|
97cabf62b8 | ||
|
|
53a1b513fb | ||
|
|
053336faca | ||
|
|
dbe096a8d5 | ||
|
|
f78d1a6d84 | ||
|
|
01d1cb6212 | ||
|
|
c606e7c296 | ||
|
|
5ac2f44d52 | ||
|
|
9b7b79ac9f | ||
|
|
99deee6a14 | ||
|
|
196302ed3e | ||
|
|
f40589a461 | ||
|
|
ef2e01085a | ||
|
|
8f939fd4af | ||
|
|
4a546d9ff1 | ||
|
|
d75c99f7ee | ||
|
|
f10a3d99c5 | ||
|
|
fb23e577e8 | ||
|
|
6861451f8f | ||
|
|
770082a811 | ||
|
|
43cf2b1105 | ||
|
|
88e2a65b5d | ||
|
|
1333610ef0 | ||
|
|
731411cdfa | ||
|
|
10da65860a | ||
|
|
6f637e01b6 | ||
|
|
a356a456d5 | ||
|
|
55f4141157 | ||
|
|
b2a3c926c5 | ||
|
|
e79c26e234 | ||
|
|
cb293885e2 | ||
|
|
92db832044 | ||
|
|
42f20efe3b | ||
|
|
14866a1432 | ||
|
|
7d61704575 | ||
|
|
c8e8d0b7b9 | ||
|
|
dda03b21d7 | ||
|
|
64e8bf3abb | ||
|
|
da671b00cf | ||
|
|
6d918bd3d5 | ||
|
|
dbf4e05d59 | ||
|
|
9224cf8b99 | ||
|
|
00051ec7fe | ||
|
|
44686c6459 | ||
|
|
09f3a7f27e | ||
|
|
51a09a7a99 | ||
|
|
ebdea1e9b1 | ||
|
|
f3d3adac2e | ||
|
|
b55f90efde | ||
|
|
c5e6e09071 | ||
|
|
9895847f8b | ||
|
|
992f265292 | ||
|
|
f4a4a7c124 | ||
|
|
129d037379 | ||
|
|
f0e438044f | ||
|
|
9ef0e56aa8 | ||
|
|
6b74350edf | ||
|
|
5f6e38de30 | ||
|
|
1ee940c40c | ||
|
|
2ca5dd9b31 | ||
|
|
08a4c18c8f | ||
|
|
e4cc3bb89c | ||
|
|
6f56e1fb3d | ||
|
|
c49b63b50e | ||
|
|
0fcb5aa2c6 | ||
|
|
d8c055dbb4 | ||
|
|
280c636823 | ||
|
|
bce6cdb618 | ||
|
|
6a25253698 | ||
|
|
31b15baf90 | ||
|
|
b906e4dd99 | ||
|
|
5022c94a13 | ||
|
|
f6f3c2041b | ||
|
|
5c3bdf40f9 | ||
|
|
db3335513a | ||
|
|
a815562f82 | ||
|
|
36d4cb716e | ||
|
|
2a62f69623 | ||
|
|
6d1ffdedc8 | ||
|
|
7f67ff266c | ||
|
|
5afdbd82bb | ||
|
|
21763301ca | ||
|
|
0268f4e707 | ||
|
|
b66e75027d | ||
|
|
934755cf4e | ||
|
|
148280d29e | ||
|
|
0cc89d6e86 | ||
|
|
395bb7b213 | ||
|
|
af5a992cfc | ||
|
|
c76ae59ae2 | ||
|
|
2a884b7c7c | ||
|
|
3a87e6159b | ||
|
|
6ec5273d21 | ||
|
|
bff5215bb9 | ||
|
|
f609d4132a | ||
|
|
6cc3e428d3 | ||
|
|
28eb643f49 | ||
|
|
b7d9dc08ec | ||
|
|
2ca9a78280 | ||
|
|
2df651f342 | ||
|
|
b16129abfa | ||
|
|
787b739fa3 | ||
|
|
f4d62d1590 | ||
|
|
03ca432a36 | ||
|
|
28804f9034 | ||
|
|
7b276046ed | ||
|
|
c538088760 | ||
|
|
1074bbb09e | ||
|
|
2c503bdf88 | ||
|
|
2f242e6607 | ||
|
|
0cee97e5f6 | ||
|
|
90f12a94a8 | ||
|
|
91fb604806 | ||
|
|
a54df11cc7 | ||
|
|
b8e903af3e | ||
|
|
2c4491c707 | ||
|
|
d13865f599 | ||
|
|
a0bfee0c6a | ||
|
|
69eb9eda25 | ||
|
|
ba3b37a0a3 | ||
|
|
bf13c485bd | ||
|
|
c537e7554a | ||
|
|
7b030434b9 | ||
|
|
03c45bf7f4 | ||
|
|
daed8ccfa7 | ||
|
|
32b19fbb33 | ||
|
|
b1c2a4ef8c | ||
|
|
af3109b9d9 | ||
|
|
130c694c8d | ||
|
|
c6801505c2 | ||
|
|
bac004ae33 | ||
|
|
abb8998117 | ||
|
|
9ca1188baa | ||
|
|
61267a502a | ||
|
|
9dd287f16e | ||
|
|
55989a4d55 | ||
|
|
0b0d433043 | ||
|
|
a6480db012 | ||
|
|
7c5b89766a | ||
|
|
1c8145116f | ||
|
|
fdbf58dfa3 | ||
|
|
8730ebf67a | ||
|
|
4c1e1d68b5 | ||
|
|
e5acb89f1b | ||
|
|
b8c3119481 | ||
|
|
15f3fd1206 | ||
|
|
950310906e | ||
|
|
7853718f29 | ||
|
|
4f2733324f | ||
|
|
7379277b1d | ||
|
|
6387b87ced | ||
|
|
f01c5ff237 | ||
|
|
5843be57c0 | ||
|
|
4a62613375 | ||
|
|
bec17c65e4 | ||
|
|
315e34185a | ||
|
|
5510d88988 | ||
|
|
803e9a33e0 | ||
|
|
b346f32e77 | ||
|
|
585852ecb1 | ||
|
|
6fcc65acd7 | ||
|
|
19c67b23f1 | ||
|
|
bd59044951 | ||
|
|
6255808ed0 | ||
|
|
77476364cc | ||
|
|
25a6f050ef | ||
|
|
990dd40414 | ||
|
|
0d2574d31b | ||
|
|
01dac76b85 | ||
|
|
d9602a5e41 | ||
|
|
5a0a90ca60 | ||
|
|
10284e801f | ||
|
|
a060552907 | ||
|
|
01a2cadcd3 | ||
|
|
d87e584601 | ||
|
|
fdf8a71acb | ||
|
|
9d46fa2583 | ||
|
|
bfeab1abfa | ||
|
|
7c30577374 | ||
|
|
e164e50f93 | ||
|
|
f6d3cd59c0 | ||
|
|
11196ce1d4 | ||
|
|
db0cfd430c | ||
|
|
7353f44265 | ||
|
|
3b19458c3d | ||
|
|
f2d1f8144c | ||
|
|
f39de931c8 | ||
|
|
b1a25b485f | ||
|
|
98830faed4 | ||
|
|
198ab0c927 | ||
|
|
6e8f45b32b | ||
|
|
5d534c9b0a | ||
|
|
15ba35fbb2 | ||
|
|
5258ffebbe | ||
|
|
2733ccdf8a | ||
|
|
52ec176455 | ||
|
|
a24aaeb7e8 | ||
|
|
837dbf8393 | ||
|
|
da97a0857b | ||
|
|
df30d586e2 | ||
|
|
49d7b2fbff | ||
|
|
beec49c9e5 | ||
|
|
3cdc6ae8c1 | ||
|
|
0dcb04e46b | ||
|
|
60fe0f38bf | ||
|
|
0cf8cdd4c1 | ||
|
|
2d7c1ed049 | ||
|
|
49f816be4e | ||
|
|
433230dc19 | ||
|
|
59399e7819 | ||
|
|
8342f05fb4 | ||
|
|
881f556c29 | ||
|
|
09808990ee | ||
|
|
80d54af2a0 | ||
|
|
282fc90f98 | ||
|
|
f093b2d3ac | ||
|
|
87ba301091 | ||
|
|
58eb2066f5 | ||
|
|
e43cead809 | ||
|
|
7f90039de7 | ||
|
|
8bafff9855 | ||
|
|
dc28c9787d | ||
|
|
4bc9e3e2bf | ||
|
|
dd71112dc6 | ||
|
|
29411ae0e8 | ||
|
|
ceb85adcd6 | ||
|
|
960525bb40 | ||
|
|
f9f46e38b4 | ||
|
|
64220c320b | ||
|
|
28262aeedf | ||
|
|
4b5af87739 | ||
|
|
0d901b2472 | ||
|
|
a98c621931 | ||
|
|
83360aebc7 | ||
|
|
f47112c52e | ||
|
|
19bf9b0c3d | ||
|
|
a4f1cb7cfd | ||
|
|
aed7a92340 | ||
|
|
3f6397a2a9 | ||
|
|
326a518630 | ||
|
|
84fa8e5547 | ||
|
|
1d5c1edad9 | ||
|
|
5b0e8d1d25 | ||
|
|
c9b4da0823 | ||
|
|
4c55c5c2a7 | ||
|
|
ced33a4cda | ||
|
|
50606e8424 | ||
|
|
3a75b08962 | ||
|
|
5c0aa7acbb | ||
|
|
845ea0926e | ||
|
|
b89cd7abc0 | ||
|
|
77659f6539 | ||
|
|
48343162f9 | ||
|
|
d1be8b88d4 | ||
|
|
2aeea3aa13 | ||
|
|
f7ff8949c4 | ||
|
|
565b69489a | ||
|
|
d5142d7f0a | ||
|
|
c83dbccdb7 | ||
|
|
d60c6b3aa8 | ||
|
|
c8d30efc63 | ||
|
|
274ae1d826 | ||
|
|
085c66b7a4 | ||
|
|
07ebbbd682 | ||
|
|
8e4f5a6ae7 | ||
|
|
cac8cf9d38 | ||
|
|
4861557cdb | ||
|
|
1f71f60bf9 | ||
|
|
9547e10def | ||
|
|
d51dfec557 | ||
|
|
89f46e67bf | ||
|
|
d180e233c5 | ||
|
|
e0f7318ef3 | ||
|
|
29be76dcd5 | ||
|
|
32a9480fc0 | ||
|
|
e4c14dc6bb | ||
|
|
4ef8e254c3 | ||
|
|
53d1cbc4a9 | ||
|
|
b2c345d052 | ||
|
|
383118f8ef | ||
|
|
8953854bb3 | ||
|
|
d378681461 | ||
|
|
039bbe5308 | ||
|
|
d4a8ab316e | ||
|
|
ffa6a0d7d9 | ||
|
|
8e9ceeb61a | ||
|
|
dccba37195 | ||
|
|
7fc785c0a2 | ||
|
|
c5826dac0c | ||
|
|
a4986a87a3 | ||
|
|
e26b7ae6dd | ||
|
|
190ea5dfe2 | ||
|
|
984892ea85 | ||
|
|
e52177fe5c | ||
|
|
7e24bfc9d1 | ||
|
|
a52c01087e | ||
|
|
a300a8f426 | ||
|
|
ed4ed55854 | ||
|
|
5889f57731 | ||
|
|
44e4de191e | ||
|
|
16f10facc3 | ||
|
|
efa8547c2a | ||
|
|
7037f0574b | ||
|
|
e59108291b | ||
|
|
55c671cc4b | ||
|
|
d8b6530e69 | ||
|
|
5d46a0419b | ||
|
|
d012f79822 | ||
|
|
818883a98a | ||
|
|
79669cb581 | ||
|
|
47f436e288 | ||
|
|
71ac706449 | ||
|
|
128c753057 | ||
|
|
b6a8074657 | ||
|
|
c2a347fb00 | ||
|
|
70709e0bf8 | ||
|
|
16992d9d43 | ||
|
|
aa819d7737 | ||
|
|
790749df12 | ||
|
|
a2cb909b52 | ||
|
|
4058450016 | ||
|
|
6233bad209 | ||
|
|
e52887b074 | ||
|
|
f9f53d18fb | ||
|
|
d4b30ecb15 | ||
|
|
1c0bafba6e | ||
|
|
67fd45ea54 | ||
|
|
12cefe3d84 | ||
|
|
3d24e79b9a | ||
|
|
43bbd1d95c | ||
|
|
2065a29d04 | ||
|
|
c45fae6ab1 | ||
|
|
0d3ee38d0e | ||
|
|
7de1fe0f75 | ||
|
|
f499ee52a9 | ||
|
|
0b9dd43505 | ||
|
|
09a856944d | ||
|
|
ef6e997665 | ||
|
|
f62ab4ca00 | ||
|
|
bd084d6a44 | ||
|
|
0462d8c85d | ||
|
|
b5444303b9 | ||
|
|
5ea73d795d | ||
|
|
5c7d4db3a7 | ||
|
|
d0df9b88e8 | ||
|
|
9adb719b13 | ||
|
|
ba101cf562 | ||
|
|
d6fe5c9fb8 | ||
|
|
cbdc47335c | ||
|
|
1d5c3efd83 | ||
|
|
64f7b3ff26 | ||
|
|
da604679de | ||
|
|
8a057b66a0 | ||
|
|
d3ad383d83 | ||
|
|
ff003eff27 | ||
|
|
56ec8e02b5 | ||
|
|
ca9aba5ec1 | ||
|
|
d88832677f | ||
|
|
570d9da321 | ||
|
|
99f4ab5e6b | ||
|
|
1f1e4302ae | ||
|
|
e8ea1e391c | ||
|
|
1b80638e78 | ||
|
|
b3a5564585 | ||
|
|
675ff6f979 | ||
|
|
995ee74fce | ||
|
|
bf13ac460d | ||
|
|
c4eb2b2d3a | ||
|
|
f1afbb6b1c | ||
|
|
3cf383a0d1 | ||
|
|
39f5100c50 | ||
|
|
21ae554f42 | ||
|
|
f77bb731bf | ||
|
|
e879aeea24 | ||
|
|
aa41356aa7 | ||
|
|
05e51309ba | ||
|
|
82212cbb13 | ||
|
|
42d68399d8 | ||
|
|
19c5957601 | ||
|
|
8a16efa9f6 | ||
|
|
ba6d541682 | ||
|
|
ccc3bc0b0d | ||
|
|
9778aabaed | ||
|
|
d7db07529e | ||
|
|
f7ff05e6e9 | ||
|
|
b1497a3f79 | ||
|
|
8640cf5f28 | ||
|
|
86be492cee | ||
|
|
e105dc68dd | ||
|
|
e17197d518 | ||
|
|
0b2dbe53e3 | ||
|
|
a64c45586f | ||
|
|
106b43b7fd | ||
|
|
e4aa742882 | ||
|
|
a4f67e6feb | ||
|
|
794303eacd | ||
|
|
2b53d200f0 | ||
|
|
d288c23e53 | ||
|
|
1e0ee6fc7f | ||
|
|
86af20dcc4 | ||
|
|
d0eb30ad02 | ||
|
|
d39fb1d6e8 | ||
|
|
c41a40894e | ||
|
|
e5a98bc252 | ||
|
|
45f770dcc1 | ||
|
|
5e79b15320 | ||
|
|
34ab4601e4 | ||
|
|
39303c0381 | ||
|
|
e4a2c925ef | ||
|
|
5e6e233a84 | ||
|
|
4a118451dd | ||
|
|
53de86e4f9 | ||
|
|
4c18ff2615 | ||
|
|
db9821956c | ||
|
|
90da983317 | ||
|
|
342441aa36 | ||
|
|
9250db38be | ||
|
|
8782190bdf | ||
|
|
7d58901811 | ||
|
|
9e885c6d7a | ||
|
|
ef1fc76f3c | ||
|
|
3e8fe3426d | ||
|
|
cb445ec643 | ||
|
|
6609a7b84a | ||
|
|
d6732bbe2e | ||
|
|
2a188aa05d | ||
|
|
bebe59537c | ||
|
|
cb7628c859 | ||
|
|
6cc167d9d4 | ||
|
|
62f5eb00ba | ||
|
|
762fbe5191 | ||
|
|
afe758fddb | ||
|
|
c05d9082f6 | ||
|
|
1f12c08ca3 | ||
|
|
dc6b17b77b | ||
|
|
38d8f205fc | ||
|
|
f6660ec7b0 | ||
|
|
851e9e1b40 | ||
|
|
b890c9b8f8 | ||
|
|
4d3606fe49 | ||
|
|
b51772e207 | ||
|
|
3ccf5eb3e1 | ||
|
|
5a6eb9b0fb | ||
|
|
1c3b3e5841 | ||
|
|
fe5de9c6d7 | ||
|
|
866ee65964 | ||
|
|
1b32b1f9b5 | ||
|
|
5708f1111a | ||
|
|
ae0bbb4b0b | ||
|
|
ada8ed6583 | ||
|
|
a67edc6f2b | ||
|
|
dbf3eda49b | ||
|
|
abee648344 | ||
|
|
4f77bbb69e | ||
|
|
9383efdb9d | ||
|
|
32ab09aa36 | ||
|
|
b81d381fc4 | ||
|
|
4dec9dc7db | ||
|
|
a08bf5ed49 | ||
|
|
321085d3e9 | ||
|
|
98fbdce95e | ||
|
|
5bd15e489b | ||
|
|
5531241ca4 | ||
|
|
3bf9eca3a9 | ||
|
|
90bdb77beb | ||
|
|
73ff117ddd | ||
|
|
0c36d1b045 | ||
|
|
2408171c9d | ||
|
|
35ba477cd4 | ||
|
|
219acf7618 | ||
|
|
b619137ae3 | ||
|
|
1516381ec6 | ||
|
|
40c816b4e9 | ||
|
|
1a0c36e179 | ||
|
|
399cd68643 | ||
|
|
aa5872b022 | ||
|
|
c38357ff7f | ||
|
|
feac4292af | ||
|
|
11a9d15df0 | ||
|
|
879a57e06d | ||
|
|
2b3759151d | ||
|
|
33487fe4c0 | ||
|
|
7004d31aa9 | ||
|
|
b3cbe50138 | ||
|
|
0fd7ef32ad | ||
|
|
aff84a8054 | ||
|
|
c3c74e9e56 | ||
|
|
0113a57311 | ||
|
|
e03cd77f81 | ||
|
|
82be86bffb | ||
|
|
f9cab276fb | ||
|
|
5979cb4773 | ||
|
|
0df8568f37 | ||
|
|
88439ed08b | ||
|
|
5b109cd5b9 | ||
|
|
5ae9d9e009 | ||
|
|
df093ba457 | ||
|
|
57c598227e | ||
|
|
e70580fcb1 | ||
|
|
8a8ad9b82b | ||
|
|
2c395ca5e1 | ||
|
|
51cd079680 | ||
|
|
4c97b65acf | ||
|
|
13134ae67d | ||
|
|
3a446af265 | ||
|
|
ae1f9b6015 | ||
|
|
313514ebe5 | ||
|
|
b0caaeda1e | ||
|
|
c3924e7193 | ||
|
|
5f42305af7 | ||
|
|
9513c8a790 | ||
|
|
9b59b018f1 | ||
|
|
fe7eb87f6d | ||
|
|
e0093c31af | ||
|
|
00beaf68e8 | ||
|
|
2594c9d096 | ||
|
|
23a122c093 | ||
|
|
810a1e810c | ||
|
|
a382008e9b | ||
|
|
bdd383c430 | ||
|
|
2672fa5e89 | ||
|
|
22f46c593e | ||
|
|
698f108262 | ||
|
|
37f71811ba | ||
|
|
1b60247c23 | ||
|
|
193a57de05 | ||
|
|
e8dfb0e658 | ||
|
|
0a2ceea8fa | ||
|
|
6f16729c53 | ||
|
|
26f0e174f6 | ||
|
|
11a1720900 | ||
|
|
9721cca1e4 | ||
|
|
6f20d1a164 | ||
|
|
5dfe12b527 | ||
|
|
bef533556a | ||
|
|
18618d527f | ||
|
|
676b661e9e | ||
|
|
3748668c11 | ||
|
|
caf699874a | ||
|
|
67d214e8e7 | ||
|
|
2a63cb8e70 | ||
|
|
2d5ff980df | ||
|
|
5c8effb45b | ||
|
|
113af685dc | ||
|
|
6008e2d55f | ||
|
|
c451da4300 | ||
|
|
2a8f2a0f26 | ||
|
|
46e396b74b | ||
|
|
93f2e6d563 | ||
|
|
f38920e719 | ||
|
|
b8c07be5bd | ||
|
|
e0aa9f76a6 | ||
|
|
bca41adbf4 | ||
|
|
86eb8775b2 | ||
|
|
7b759fb71d | ||
|
|
241b2d244d | ||
|
|
252b42b1ee | ||
|
|
792b9896b3 | ||
|
|
13021da2d8 | ||
|
|
ee0ff7de44 | ||
|
|
e08ce9950d | ||
|
|
8c65f8cbf1 | ||
|
|
30f4ea1d44 | ||
|
|
5561a8f7a1 | ||
|
|
0d26a532e3 | ||
|
|
6bc57ba54e | ||
|
|
5b5fc4f782 | ||
|
|
d23be31719 | ||
|
|
f4b81760fb | ||
|
|
211c89d6ef | ||
|
|
d8a69fd700 | ||
|
|
1165cf3f98 | ||
|
|
40b04d8bb2 | ||
|
|
ef43997c0d | ||
|
|
75bddf5ab3 | ||
|
|
220e46d9f7 | ||
|
|
07de076b26 | ||
|
|
79d72a1e93 | ||
|
|
adea17d749 | ||
|
|
ad28909118 | ||
|
|
93ed58c12d | ||
|
|
e912e452d8 | ||
|
|
b4c490f648 | ||
|
|
e6ef6728ac | ||
|
|
53744b1897 | ||
|
|
678737441a | ||
|
|
cb1801b486 | ||
|
|
2ffa9f5f0b | ||
|
|
bde0339a80 | ||
|
|
b81ec6883f | ||
|
|
8e8c02b038 | ||
|
|
37f17cddf6 | ||
|
|
5bbe529230 | ||
|
|
856fdfcfba | ||
|
|
e78f16c342 | ||
|
|
2776c33876 | ||
|
|
cc6de21dc1 | ||
|
|
511017a1de | ||
|
|
28ed52b263 | ||
|
|
a63e8ad034 | ||
|
|
bda9556cd1 | ||
|
|
aaae2a3b51 | ||
|
|
3e9032de0d | ||
|
|
b778ed1207 | ||
|
|
439e0fcbd8 | ||
|
|
34416c5548 | ||
|
|
070cb5bafd | ||
|
|
7f50c4f444 | ||
|
|
821ff0982e | ||
|
|
4de87119bc | ||
|
|
73eff8c748 | ||
|
|
15246d5270 | ||
|
|
a0564c05ed | ||
|
|
bea41af484 | ||
|
|
d7948ff076 | ||
|
|
60e9df3141 | ||
|
|
7be2256672 | ||
|
|
af8cc33bff | ||
|
|
64e3009269 | ||
|
|
ff456c2565 | ||
|
|
bc308df775 | ||
|
|
b87a514187 | ||
|
|
b28f4f4c42 | ||
|
|
cee90a077a | ||
|
|
3dcc1028c1 | ||
|
|
beb8ae4a11 | ||
|
|
ac7303a7f2 | ||
|
|
b8a6073e3d | ||
|
|
27909b4b49 | ||
|
|
6cd268b969 | ||
|
|
657297ca4c | ||
|
|
46d26478ca | ||
|
|
16bd9dc17a | ||
|
|
26e9bda24b | ||
|
|
02beb88b3a | ||
|
|
b33fcb0eeb | ||
|
|
94843d2e9e | ||
|
|
e6975c462b | ||
|
|
b13a8179d9 | ||
|
|
63f1d27ae8 | ||
|
|
185b94732f | ||
|
|
5264c23dc5 | ||
|
|
216ae613c6 | ||
|
|
e129245866 | ||
|
|
bdc9d41b90 | ||
|
|
dc80a3bbe9 | ||
|
|
54170d7dd4 | ||
|
|
3b3629c1bb | ||
|
|
8c7ab49812 | ||
|
|
8c3c069f17 | ||
|
|
d491a2db89 | ||
|
|
fcad74852a | ||
|
|
04db185d75 | ||
|
|
eacf4b9ced | ||
|
|
6678fc1c72 | ||
|
|
e7d8a37291 | ||
|
|
591d368667 | ||
|
|
38e136d6f3 | ||
|
|
afe7766cad | ||
|
|
6a1d927190 | ||
|
|
063ce332a8 | ||
|
|
239f03c5ec | ||
|
|
add01e2508 | ||
|
|
a2fb8bb2b9 | ||
|
|
56c57e7dba | ||
|
|
c34c5ecd5e | ||
|
|
14b9d00796 | ||
|
|
457c98cc0d | ||
|
|
bb614278bb | ||
|
|
655d464677 | ||
|
|
1f63ae060f | ||
|
|
b7cc23cb32 | ||
|
|
53b75f1c80 | ||
|
|
429bb7d61d | ||
|
|
8070329915 | ||
|
|
e9138d9cbf | ||
|
|
209cf28224 | ||
|
|
5363d60ece | ||
|
|
5d273f7308 | ||
|
|
000c3e71e2 | ||
|
|
093c75da95 | ||
|
|
979d3c81db | ||
|
|
16c9378da4 | ||
|
|
bf62a3502f | ||
|
|
06d71caa1e | ||
|
|
aab900dc58 | ||
|
|
cdb02a8a7b | ||
|
|
01affa64b3 | ||
|
|
cc34decd0f | ||
|
|
d971825cbd | ||
|
|
cbc4992f10 | ||
|
|
89bac044f1 | ||
|
|
dc933ba225 | ||
|
|
a7ac2ed657 | ||
|
|
8453f0e5f5 | ||
|
|
17f3c75fdf | ||
|
|
4f5952f24c | ||
|
|
2bf6e4c3b7 | ||
|
|
90cb403196 | ||
|
|
d59b686d10 | ||
|
|
346187a80f | ||
|
|
f8b38d88aa | ||
|
|
ad4432a2df | ||
|
|
bf20d0dc6e | ||
|
|
d940229581 | ||
|
|
044c6fa4b1 | ||
|
|
d2b1e67bac | ||
|
|
7bb42e98b6 | ||
|
|
ea80cd11fe | ||
|
|
1f00f4a86c | ||
|
|
12350f3fdb | ||
|
|
c650e4aa75 | ||
|
|
94f81db7ba | ||
|
|
8c80615659 | ||
|
|
bc5e956cb3 | ||
|
|
fab9bdc298 | ||
|
|
1d90db1c1e | ||
|
|
9c3dd2e671 | ||
|
|
711285aab2 | ||
|
|
3d20a43a24 | ||
|
|
c3c491f72c | ||
|
|
489dfd55fb | ||
|
|
b84ffde283 | ||
|
|
5256868327 | ||
|
|
606e90e9bd | ||
|
|
c5b426af13 | ||
|
|
8ee1bf782c | ||
|
|
f4651a9bed | ||
|
|
c7a77f9c99 | ||
|
|
e42d2fcec8 | ||
|
|
2173fda575 | ||
|
|
dccb078060 | ||
|
|
9bc007349f | ||
|
|
435865f250 | ||
|
|
f7e64c5ab9 | ||
|
|
271a28887f | ||
|
|
e3955dac3a | ||
|
|
8971d671fe | ||
|
|
e03bc105b0 | ||
|
|
b5381d5d68 | ||
|
|
40eb5ca761 | ||
|
|
44298bf59d | ||
|
|
aab4771fcc | ||
|
|
b6dfb2eb7d | ||
|
|
1182bd84cd | ||
|
|
664f285e9a | ||
|
|
33717be65d | ||
|
|
eac69a5e67 | ||
|
|
9597363785 | ||
|
|
b7a06e04cb | ||
|
|
8984f35240 | ||
|
|
4a8f784fd5 | ||
|
|
7877fbdca7 | ||
|
|
2c67adcda2 | ||
|
|
1ff1835feb | ||
|
|
6b24efc014 | ||
|
|
894bf9ea8d | ||
|
|
dcbb525fb6 | ||
|
|
689f7820eb | ||
|
|
d47f26d038 | ||
|
|
3c5645156f | ||
|
|
edd79b4e4e | ||
|
|
8a95194465 | ||
|
|
80b55c1717 | ||
|
|
faca85e283 | ||
|
|
40d84d8c78 | ||
|
|
f0988afaa5 | ||
|
|
03b0ec16de | ||
|
|
3a31b3d00c | ||
|
|
50a697c85a | ||
|
|
af77d8e497 | ||
|
|
c6b80f1ff1 | ||
|
|
edbccb62e5 | ||
|
|
24a7578c67 | ||
|
|
200e44ad15 | ||
|
|
ac669f4aaa | ||
|
|
f73d993934 | ||
|
|
15657d08da | ||
|
|
b0829d7195 | ||
|
|
e31cee7fef | ||
|
|
ec2f4d74b2 | ||
|
|
773a9dbbe3 | ||
|
|
0de31eefd2 | ||
|
|
cd764d4c10 | ||
|
|
283418d43a | ||
|
|
e99da003d1 | ||
|
|
fc29346dee | ||
|
|
6ee86d8c56 | ||
|
|
5f91d084ed | ||
|
|
7989c84723 | ||
|
|
e280ad1423 | ||
|
|
35b762e891 | ||
|
|
b40eb7dc66 | ||
|
|
a3b74eb08a | ||
|
|
6b724c5e8d | ||
|
|
a407260c33 | ||
|
|
e0dc8e24b6 | ||
|
|
fcb21a1218 | ||
|
|
c54ade42d9 | ||
|
|
5460d52baf | ||
|
|
84c5242195 | ||
|
|
278e61cf7e | ||
|
|
7537309cd3 | ||
|
|
7dc2bcaa59 | ||
|
|
1e99c026cb | ||
|
|
ae23d99c7f | ||
|
|
a97f3cee64 | ||
|
|
c0e5f77d53 | ||
|
|
7c8e269b09 | ||
|
|
87bdd6036a | ||
|
|
4d222f7b06 | ||
|
|
9b8d0665a1 | ||
|
|
498600c6bd | ||
|
|
b2031e0f50 | ||
|
|
7536d14a34 | ||
|
|
10772abcb4 | ||
|
|
b5996767c1 | ||
|
|
1f7adadf78 | ||
|
|
810bcff78c | ||
|
|
e953d34d17 | ||
|
|
3b5fe2e622 | ||
|
|
9f46492f86 | ||
|
|
f1e69677be | ||
|
|
17e573a7a9 | ||
|
|
4cb6c26363 | ||
|
|
09974c67e4 | ||
|
|
51b0554668 | ||
|
|
3c3610d63c | ||
|
|
468ec1ee83 | ||
|
|
dcb6fcb3a6 | ||
|
|
9c080c4334 | ||
|
|
7b7fefb954 | ||
|
|
616e43ce8f | ||
|
|
318d070e05 | ||
|
|
4a7739a1bf | ||
|
|
e12250509e | ||
|
|
afb025fd91 | ||
|
|
8899cb5ea4 | ||
|
|
c6a7bc8c14 | ||
|
|
f2bb6d547b | ||
|
|
1fdcb23d04 | ||
|
|
131088ad22 | ||
|
|
5d3a51e8f2 | ||
|
|
d1cd8a8cef | ||
|
|
c2757dcbce | ||
|
|
274ef6a44f | ||
|
|
efff180339 | ||
|
|
8fb51c0647 | ||
|
|
7db9cf50ca | ||
|
|
8128707aa4 | ||
|
|
de7740ab14 | ||
|
|
31633be812 | ||
|
|
bcb5d36999 | ||
|
|
7d847dfde5 | ||
|
|
b703e774ae | ||
|
|
f6207be9d4 | ||
|
|
7c87c53421 | ||
|
|
a4ed3688a2 | ||
|
|
6ab8f5f836 | ||
|
|
f9c1724228 | ||
|
|
25c77fdf5e | ||
|
|
3bf9c6ae94 | ||
|
|
0e70b027f5 | ||
|
|
17b17187ff | ||
|
|
dc226ebe5d | ||
|
|
55f5edbb6a | ||
|
|
29d65fbf64 | ||
|
|
f3f35be0bf | ||
|
|
204c8e046c | ||
|
|
1a1710a6c2 | ||
|
|
1a2cc00184 | ||
|
|
b3b3f6ff98 | ||
|
|
7df8b0330c | ||
|
|
528dd2254e | ||
|
|
33fb7c83bf | ||
|
|
50ad382eed | ||
|
|
7d1c7cfd74 | ||
|
|
5b637099a1 | ||
|
|
0d6d725f87 | ||
|
|
a98c5d5416 | ||
|
|
3361973722 | ||
|
|
91bc6568ee | ||
|
|
2e583fbfcf | ||
|
|
50eab6ff38 | ||
|
|
d743550cc7 | ||
|
|
1c0efc8fa4 | ||
|
|
5ff38ea870 | ||
|
|
4c146f7896 | ||
|
|
4e5aa4314e | ||
|
|
5223951db4 | ||
|
|
ddcb355113 | ||
|
|
7a80e15628 | ||
|
|
34dc053011 | ||
|
|
0266449d67 | ||
|
|
ea3afcf99d | ||
|
|
c84418186c | ||
|
|
956990dbd5 | ||
|
|
08f6a2b289 | ||
|
|
741a4c02a0 | ||
|
|
dcff4939f4 | ||
|
|
506ce02697 | ||
|
|
95bd17b371 | ||
|
|
16ef7088a6 | ||
|
|
f70b0c8a41 | ||
|
|
d68d45d7c7 | ||
|
|
7af2844305 | ||
|
|
fd8c5166b6 | ||
|
|
2c931b6cd2 | ||
|
|
210069f8e9 | ||
|
|
2453897d31 | ||
|
|
dc0e758f64 | ||
|
|
ac3bf4a008 | ||
|
|
caf16299e7 | ||
|
|
cfa19ed9d9 | ||
|
|
6e5d82f340 | ||
|
|
98456b99e8 | ||
|
|
45c6e571cb | ||
|
|
e6c5545cd3 | ||
|
|
402c3ae538 | ||
|
|
f6018ab466 | ||
|
|
0ff738c85e | ||
|
|
4876e6696d | ||
|
|
167da0d70f | ||
|
|
2748aded3f | ||
|
|
103434baa0 | ||
|
|
c2da7bcbe2 | ||
|
|
c64cf99d88 | ||
|
|
de59d8de8d | ||
|
|
718886ba3a | ||
|
|
3789f1fd0a | ||
|
|
1e6df02e45 | ||
|
|
886a425aaf | ||
|
|
7e24d50c0c | ||
|
|
8f7d48c297 | ||
|
|
3cc81e2510 | ||
|
|
0f0be1c18e | ||
|
|
5f689e3d6c | ||
|
|
f04d3e40d4 | ||
|
|
68a74e07fa | ||
|
|
199cdbb787 | ||
|
|
375fcb37a2 | ||
|
|
bc1743dedf | ||
|
|
f7771f79c2 | ||
|
|
7ebce6b36b | ||
|
|
b4240eee3a | ||
|
|
514acc2b65 | ||
|
|
48bc854c8a | ||
|
|
07391dc6c7 | ||
|
|
7e905e84b7 | ||
|
|
200a45f0cb | ||
|
|
ebff0554f7 | ||
|
|
e54487d0b0 | ||
|
|
96a6e7ab20 | ||
|
|
95ff8ceb7e | ||
|
|
5aa4308e27 | ||
|
|
aa892be308 | ||
|
|
6971bcf9b5 | ||
|
|
0581e98b55 | ||
|
|
5c2e653cdf | ||
|
|
aa4cd722d2 | ||
|
|
10b2f37ed8 | ||
|
|
d7ae2a7082 | ||
|
|
c246a79726 | ||
|
|
8e4d75705e | ||
|
|
ffdaba2d8c | ||
|
|
97187071af | ||
|
|
dceab6b729 | ||
|
|
7771872947 | ||
|
|
cc123f76d6 | ||
|
|
a6ad03c534 | ||
|
|
45491871e6 | ||
|
|
8988f37896 | ||
|
|
09b4324873 | ||
|
|
a5a2764cb4 | ||
|
|
6de4d0c374 | ||
|
|
48c33d766b | ||
|
|
22493ee0e9 | ||
|
|
8afc3133c6 | ||
|
|
d0cfa29929 | ||
|
|
6a51d462d7 | ||
|
|
4f7cc4942c | ||
|
|
6631e01b64 | ||
|
|
133dffe330 | ||
|
|
6e5d17173f | ||
|
|
7463d15159 | ||
|
|
beff0f1b71 | ||
|
|
867ed36419 | ||
|
|
387c1e126f | ||
|
|
c9d7cda233 | ||
|
|
b75521da59 | ||
|
|
5f9ee8a410 | ||
|
|
296c3b453c | ||
|
|
6e2da63308 | ||
|
|
445cd9fe8e | ||
|
|
a0cc567694 | ||
|
|
70d084fba7 | ||
|
|
5236aa0bf9 | ||
|
|
0eccb511db | ||
|
|
88c17db72b | ||
|
|
098fb95653 | ||
|
|
21d6bb7b7d | ||
|
|
ce91c5c7c8 | ||
|
|
613ab9101e | ||
|
|
3fbc7cf65f | ||
|
|
dc18289d18 | ||
|
|
6473e231e4 | ||
|
|
33a61b7a57 | ||
|
|
c070a39f7c | ||
|
|
995ec0f697 | ||
|
|
6cba6872c9 | ||
|
|
8812f664e7 | ||
|
|
d9113b2dab | ||
|
|
ad0025ba03 | ||
|
|
984aa17cc0 | ||
|
|
4cad05ce6b | ||
|
|
197ab946be | ||
|
|
e4cdbc1840 | ||
|
|
04f00553ae | ||
|
|
0c02902ceb | ||
|
|
aba93fb15b | ||
|
|
1c8330b99a | ||
|
|
a8de7c2860 | ||
|
|
4ca8bbfc12 | ||
|
|
a5c004e4d4 | ||
|
|
e957e409e0 | ||
|
|
70d6340c11 | ||
|
|
bbbb69b175 | ||
|
|
4d5b7d8667 | ||
|
|
43da08f57d | ||
|
|
7b97367bdd | ||
|
|
e6fb647b99 | ||
|
|
5e4d7aba18 | ||
|
|
a96086b9af | ||
|
|
0566cf899c | ||
|
|
c8e87fb3d0 | ||
|
|
0a56a0ba86 | ||
|
|
026ccde2ff | ||
|
|
7813994b81 | ||
|
|
d3b070844f | ||
|
|
7a879f99b1 | ||
|
|
e810cdb3cb | ||
|
|
398be07c31 | ||
|
|
6db4c7bb3c | ||
|
|
c402824641 | ||
|
|
abc020e8f5 | ||
|
|
82caf260ce | ||
|
|
cbcf5ff8ca | ||
|
|
39d07bf8a8 | ||
|
|
93174f0d65 | ||
|
|
6afbeb9a2a | ||
|
|
a7cbd644f3 | ||
|
|
f674aff07c | ||
|
|
07b89a288c | ||
|
|
0264c418ca | ||
|
|
494b9c47cc | ||
|
|
6ff6c6dd6c | ||
|
|
00ab587265 | ||
|
|
67fa480805 | ||
|
|
91db56e7a7 | ||
|
|
36d52bedad | ||
|
|
c36b676720 | ||
|
|
5e0a999249 | ||
|
|
8fff4aff60 | ||
|
|
8c5344ff37 | ||
|
|
91e49b6c4a | ||
|
|
52cfb37b21 | ||
|
|
87886f08bb | ||
|
|
a31d7f9589 | ||
|
|
5600957f32 | ||
|
|
d6840a83c9 | ||
|
|
06fdd39648 | ||
|
|
b5763e7f76 | ||
|
|
75f01f20b9 | ||
|
|
dd366ab69e | ||
|
|
6ab443ec2c | ||
|
|
e0056cbf5c | ||
|
|
9f9397e1f3 | ||
|
|
d5a43cc7e1 | ||
|
|
408d8aa8b8 | ||
|
|
1e663069e8 | ||
|
|
dbcec1a199 | ||
|
|
04b4193548 | ||
|
|
058803184f | ||
|
|
5b5912c5bc | ||
|
|
759e632c07 | ||
|
|
6e311ecb64 | ||
|
|
b480fd9173 | ||
|
|
226459ddb8 | ||
|
|
92de033bc8 | ||
|
|
faf0dd061c | ||
|
|
9eaf9ea2ed | ||
|
|
00c4f77251 | ||
|
|
96ef9eedbb | ||
|
|
a5d94c03e2 | ||
|
|
9d15d380a3 | ||
|
|
bff780c837 | ||
|
|
0c493952c8 | ||
|
|
a1f6e1d29c | ||
|
|
fc71f43755 | ||
|
|
16afcf4886 | ||
|
|
b64a3c2109 | ||
|
|
5c0dc66183 | ||
|
|
3047f653bd | ||
|
|
393a478d13 | ||
|
|
560cb326f9 | ||
|
|
3fe2d7260f | ||
|
|
2cd4bc7ee5 | ||
|
|
19468b591d | ||
|
|
903117d32f | ||
|
|
f5bfc98c62 | ||
|
|
3274feb1e9 | ||
|
|
392b4d8577 | ||
|
|
92e4afde4b | ||
|
|
0c7724fe33 | ||
|
|
ca5be34fc2 | ||
|
|
28c3c7a0ec | ||
|
|
7f39cf1a6f | ||
|
|
365839571a | ||
|
|
5c3a04ca77 | ||
|
|
758a580063 | ||
|
|
ad5dbc9f9d | ||
|
|
4a86680928 | ||
|
|
ece63cf442 | ||
|
|
b487140a1b | ||
|
|
ad72bf8895 | ||
|
|
5919c429d2 | ||
|
|
1f365b170e | ||
|
|
0b6580e7c9 | ||
|
|
6efb2b3860 | ||
|
|
7ae084073f | ||
|
|
36df0b1732 | ||
|
|
b8fb100bd5 | ||
|
|
82b904d176 | ||
|
|
44723978e1 | ||
|
|
7c7b4829f6 | ||
|
|
050b027ff5 | ||
|
|
8fac65e268 | ||
|
|
111aca868c | ||
|
|
2171c16d47 | ||
|
|
acd4d84783 | ||
|
|
cc25cc97f1 | ||
|
|
93ecebc448 | ||
|
|
f5713a3eb2 | ||
|
|
90001bb4d6 | ||
|
|
357cab9b1e | ||
|
|
5ea272f286 | ||
|
|
0c876bd1c5 | ||
|
|
0ac2999694 | ||
|
|
49af3c4b6d | ||
|
|
2a54b31d31 | ||
|
|
64766ce50a | ||
|
|
311accfdd3 | ||
|
|
2b5bf2fa4a | ||
|
|
64342c96d7 | ||
|
|
f8649bb0a5 | ||
|
|
fde6608c26 | ||
|
|
3f339c14a2 | ||
|
|
922db05c4d | ||
|
|
b849de8b66 | ||
|
|
f798b29729 | ||
|
|
e58e7a2588 | ||
|
|
a1ef339831 | ||
|
|
2002d51f6b | ||
|
|
025283b70b | ||
|
|
577b1aa034 | ||
|
|
da637c0cc8 | ||
|
|
d026ff690a | ||
|
|
d14ed56669 | ||
|
|
64cfacb7ff | ||
|
|
98a800e070 | ||
|
|
35219c8e88 | ||
|
|
b636cad347 | ||
|
|
733328cd29 | ||
|
|
36db28f805 | ||
|
|
6d4c1c3c14 | ||
|
|
eadb95f8e8 | ||
|
|
014f67f270 | ||
|
|
cd8657adb4 | ||
|
|
c007fc4d1c | ||
|
|
7e6c864ba3 | ||
|
|
f2da8f767a | ||
|
|
bd856541d6 | ||
|
|
bdde2176d9 | ||
|
|
171893a2c1 | ||
|
|
c6c1d6d03d | ||
|
|
ec8b114782 | ||
|
|
aaecb8ae4a | ||
|
|
4e2e3b370c | ||
|
|
c14f8f84a0 | ||
|
|
13c8012710 | ||
|
|
3806d77b26 | ||
|
|
af94220715 | ||
|
|
af07c47832 | ||
|
|
322007e5ac | ||
|
|
af5cdb9d49 | ||
|
|
3ada8ceaa7 | ||
|
|
68fa0068dc | ||
|
|
7b5fc79375 | ||
|
|
5dfa750227 | ||
|
|
cbe0773310 | ||
|
|
72a19eeb80 | ||
|
|
a993cc5a08 | ||
|
|
83724ba408 | ||
|
|
a4cd8f7460 | ||
|
|
7a52bbb9f3 | ||
|
|
3552ff8a9f | ||
|
|
0e081f3319 | ||
|
|
1d94519e1c | ||
|
|
0bbc6adb4b | ||
|
|
b48ddd4999 | ||
|
|
be8dad981d | ||
|
|
f9708f48a4 | ||
|
|
155b01bdea | ||
|
|
19810b2099 | ||
|
|
c6886f7a3e | ||
|
|
3bea24f9cc | ||
|
|
4b8f5c4908 | ||
|
|
66d9618b1b | ||
|
|
488d6347d0 | ||
|
|
d39d0c9265 | ||
|
|
33fe96dada | ||
|
|
51fd0d0994 | ||
|
|
50833af145 | ||
|
|
ca7c2388aa | ||
|
|
8e7d6adca5 | ||
|
|
17edb96ff8 | ||
|
|
3f3869916c | ||
|
|
1d2fc7ade7 | ||
|
|
aa84e5a73d | ||
|
|
4ecf7d2dda | ||
|
|
dca1cb676c | ||
|
|
9a4f41eac2 | ||
|
|
23012b0d40 | ||
|
|
916134bd9b | ||
|
|
1d6777daae | ||
|
|
4793751ba8 | ||
|
|
185c0eaf7c | ||
|
|
4b50d13149 | ||
|
|
23b58c3e7c | ||
|
|
2d5ebc3b13 | ||
|
|
59e2e3035c | ||
|
|
6d5ddfdbfa | ||
|
|
f8ae18721f | ||
|
|
8e72763314 | ||
|
|
1821fffc3b | ||
|
|
1a3a5842dc |
3
AndorsTrail/.gitignore
vendored
3
AndorsTrail/.gitignore
vendored
@@ -1,6 +1,3 @@
|
||||
# Android ignores
|
||||
app/src/main/res
|
||||
app/src/main/assets
|
||||
gen/
|
||||
bin/
|
||||
target/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
6
AndorsTrail/.idea/compiler.xml
generated
6
AndorsTrail/.idea/compiler.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="11" />
|
||||
</component>
|
||||
</project>
|
||||
20
AndorsTrail/.idea/gradle.xml
generated
20
AndorsTrail/.idea/gradle.xml
generated
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="1.8" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
25
AndorsTrail/.idea/jarRepositories.xml
generated
25
AndorsTrail/.idea/jarRepositories.xml
generated
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="BintrayJCenter" />
|
||||
<option name="name" value="BintrayJCenter" />
|
||||
<option name="url" value="https://jcenter.bintray.com/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Google" />
|
||||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
10
AndorsTrail/.idea/misc.xml
generated
10
AndorsTrail/.idea/misc.xml
generated
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
6
AndorsTrail/.idea/vcs.xml
generated
6
AndorsTrail/.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,13 +1,13 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion "30.0.3"
|
||||
|
||||
compileSdkVersion 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.gpl.rpg.AndorsTrail"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 30
|
||||
targetSdkVersion 34
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -19,34 +19,66 @@ android {
|
||||
debug {
|
||||
manifestPlaceholders icon_name: 'icon_beta', fileproviderPath: 'AndorsTrail.beta2'
|
||||
applicationIdSuffix 'beta2'
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
namespace 'com.gpl.rpg.AndorsTrail'
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res.srcDirs = ['build/gen-res', 'src/main/res']
|
||||
assets.srcDirs = ['build/gen-assets', 'src/main/assets']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:support-v4:28.0.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
}
|
||||
|
||||
task copyRes(type: Copy) {
|
||||
description "Copies the res folder to the modules res folder (& renames .tmx to .xml)"
|
||||
from "${rootDir}/res"
|
||||
into "${projectDir}/src/main/res"
|
||||
into "${projectDir}/build/gen-res"
|
||||
rename "(.*)\\.tmx", "\$1.xml"
|
||||
}
|
||||
|
||||
task copyResValuesIn(type: Copy) {
|
||||
description "Exception Indonesian language code (Old IN was renamed to now ID)"
|
||||
from "${rootDir}/res/values-id/"
|
||||
into "${projectDir}/build/gen-res/values-in/"
|
||||
}
|
||||
|
||||
task copyTranslation(type: Copy) {
|
||||
description("Copies the translation files to the modules translations folder")
|
||||
from "${rootDir}/assets/translation"
|
||||
into "${projectDir}/src/main/assets/translation"
|
||||
into "${projectDir}/build/gen-assets/translation"
|
||||
}
|
||||
|
||||
task cleanup(type: Delete) {
|
||||
description("Deletes the assets/translation and the res folder from the modules folder")
|
||||
delete "${projectDir}/src/main/res", "${projectDir}/src/main/assets/translation"
|
||||
delete "${projectDir}/build/gen-res", "${projectDir}/build/gen-assets/translation"
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
preBuild.dependsOn project.tasks.copyRes
|
||||
preBuild.dependsOn project.tasks.copyTranslation
|
||||
project.tasks.copyRes.dependsOn project.tasks.copyResValuesIn
|
||||
|
||||
mapReleaseSourceSetPaths.dependsOn project.tasks.copyRes
|
||||
generateReleaseResources.dependsOn project.tasks.copyRes
|
||||
|
||||
generateDebugResources.dependsOn project.tasks.copyRes
|
||||
mapDebugSourceSetPaths.dependsOn project.tasks.copyRes
|
||||
mergeDebugResources.dependsOn project.tasks.copyRes
|
||||
extractDeepLinksDebug.dependsOn project.tasks.copyRes
|
||||
mergeReleaseResources.dependsOn project.tasks.copyRes
|
||||
extractDeepLinksRelease.dependsOn project.tasks.copyRes
|
||||
|
||||
generateDebugResources.dependsOn project.tasks.copyTranslation
|
||||
mapDebugSourceSetPaths.dependsOn project.tasks.copyTranslation
|
||||
mergeDebugAssets.dependsOn project.tasks.copyTranslation
|
||||
mergeReleaseAssets.dependsOn project.tasks.copyTranslation
|
||||
extractDeepLinksDebug.dependsOn project.tasks.copyTranslation
|
||||
extractDeepLinksRelease.dependsOn project.tasks.copyTranslation
|
||||
|
||||
clean.dependsOn project.tasks.cleanup
|
||||
}
|
||||
|
||||
@@ -3,15 +3,11 @@
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.gpl.rpg.AndorsTrail"
|
||||
android:versionCode="66"
|
||||
android:versionName="0.8.2"
|
||||
android:versionCode="78"
|
||||
android:versionName="0.8.12"
|
||||
android:installLocation="auto"
|
||||
>
|
||||
<uses-sdk
|
||||
android:minSdkVersion="4"
|
||||
android:targetSdkVersion="30"
|
||||
/>
|
||||
|
||||
|
||||
<supports-screens
|
||||
android:smallScreens="true"
|
||||
android:normalScreens="true"
|
||||
@@ -35,7 +31,8 @@
|
||||
android:hasFragileUserData="true"
|
||||
android:preserveLegacyExternalStorage="true"
|
||||
>
|
||||
<activity
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name="com.gpl.rpg.AndorsTrail.activity.StartScreenActivity"
|
||||
android:clearTaskOnLaunch="true"
|
||||
>
|
||||
@@ -66,7 +63,7 @@
|
||||
<activity android:name="com.gpl.rpg.AndorsTrail.activity.DisplayWorldMapActivity" />
|
||||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:grantUriPermissions="true"
|
||||
android:exported="false">
|
||||
|
||||
@@ -28,11 +28,11 @@ public final class AndorsTrailApplication extends Application {
|
||||
public static final boolean DEVELOPMENT_FASTSPEED = false;
|
||||
public static final boolean DEVELOPMENT_VALIDATEDATA = false;
|
||||
public static final boolean DEVELOPMENT_DEBUGMESSAGES = false;
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.8.2";
|
||||
public static final String CURRENT_VERSION_DISPLAY = "0.8.12";
|
||||
public static final boolean IS_RELEASE_VERSION = !CURRENT_VERSION_DISPLAY.matches(".*[a-d].*");
|
||||
public static final boolean DEVELOPMENT_INCOMPATIBLE_SAVEGAMES = DEVELOPMENT_DEBUGRESOURCES || DEVELOPMENT_DEBUGBUTTONS || DEVELOPMENT_FASTSPEED || !IS_RELEASE_VERSION;
|
||||
public static final int DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION = 999;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 66;
|
||||
public static final int CURRENT_VERSION = DEVELOPMENT_INCOMPATIBLE_SAVEGAMES ? DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION : 78;
|
||||
|
||||
private final AndorsTrailPreferences preferences = new AndorsTrailPreferences();
|
||||
private WorldContext world = new WorldContext();
|
||||
|
||||
@@ -78,7 +78,7 @@ public final class AndorsTrailPreferences {
|
||||
dest.dpadTransparency = Integer.parseInt(prefs.getString("dpadtransparency", Integer.toString(DPAD_TRANSPARENCY_50_PERCENT)));
|
||||
dest.dpadMinimizeable = prefs.getBoolean("dpadMinimizeable", true);
|
||||
dest.optimizedDrawing = prefs.getBoolean("optimized_drawing", false);
|
||||
dest.highQualityFilters = prefs.getBoolean("high_quality_filters", true);
|
||||
dest.highQualityFilters = prefs.getBoolean("high_quality_filters", false);
|
||||
dest.enableUiAnimations = prefs.getBoolean("enableUiAnimations", true);
|
||||
dest.displayOverwriteSavegame = Integer.parseInt(prefs.getString("display_overwrite_savegame", Integer.toString(CONFIRM_OVERWRITE_SAVEGAME_ALWAYS)));
|
||||
dest.quickslotsPosition = Integer.parseInt(prefs.getString("quickslots_placement", Integer.toString(QUICKSLOTS_POSITION_HORIZONTAL_CENTER_BOTTOM)));
|
||||
|
||||
@@ -15,7 +15,7 @@ import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
@@ -46,14 +46,15 @@ import com.gpl.rpg.AndorsTrail.model.item.Loot;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MapObject;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
import com.gpl.rpg.AndorsTrail.view.ItemContainerAdapter;
|
||||
|
||||
public final class Dialogs {
|
||||
|
||||
private static void showDialogAndPause(Dialog d, final ControllerContext context) {
|
||||
private static void showDialogAndPause(CustomDialog d, final ControllerContext context) {
|
||||
showDialogAndPause(d, context, null);
|
||||
}
|
||||
private static void showDialogAndPause(Dialog d, final ControllerContext context, final OnDismissListener onDismiss) {
|
||||
private static void showDialogAndPause(CustomDialog d, final ControllerContext context, final OnDismissListener onDismiss) {
|
||||
context.gameRoundController.pause();
|
||||
CustomDialogFactory.setDismissListener(d, new OnDismissListener() {
|
||||
@Override
|
||||
@@ -65,14 +66,6 @@ public final class Dialogs {
|
||||
CustomDialogFactory.show(d);
|
||||
}
|
||||
|
||||
public static void showKeyArea(final MainActivity currentActivity, final ControllerContext context, String phraseID) {
|
||||
showConversation(currentActivity, context, phraseID, null);
|
||||
}
|
||||
|
||||
public static void showMapSign(final MainActivity currentActivity, final ControllerContext context, String phraseID) {
|
||||
showConversation(currentActivity, context, phraseID, null);
|
||||
}
|
||||
|
||||
public static void showMapScriptMessage(final MainActivity currentActivity, final ControllerContext context, String phraseID) {
|
||||
showConversation(currentActivity, context, phraseID, null, false);
|
||||
}
|
||||
@@ -195,7 +188,7 @@ public final class Dialogs {
|
||||
// itemList.setPadding(20, 0, 20, 20);
|
||||
itemList.setAdapter(new ItemContainerAdapter(mainActivity, world.tileManager, combinedLoot.items, world.model.player));
|
||||
|
||||
final Dialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
mainActivity.getResources().getString(title),
|
||||
mainActivity.getResources().getDrawable(R.drawable.ui_icon_equipment),
|
||||
msg,
|
||||
@@ -249,7 +242,7 @@ public final class Dialogs {
|
||||
}
|
||||
|
||||
public static void showHeroDied(final MainActivity mainActivity, final ControllerContext controllers) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
mainActivity.getResources().getString(R.string.dialog_game_over_title),
|
||||
mainActivity.getResources().getDrawable(R.drawable.ui_icon_combat),
|
||||
mainActivity.getResources().getString(R.string.dialog_game_over_text),
|
||||
@@ -286,7 +279,7 @@ public final class Dialogs {
|
||||
}
|
||||
|
||||
public static void showConfirmRest(final Activity currentActivity, final ControllerContext controllerContext, final MapObject area) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
currentActivity.getResources().getString(R.string.dialog_rest_title),
|
||||
null,
|
||||
currentActivity.getResources().getString(R.string.dialog_rest_confirm_message),
|
||||
@@ -310,7 +303,7 @@ public final class Dialogs {
|
||||
// .setMessage(R.string.dialog_rest_message)
|
||||
// .setNeutralButton(android.R.string.ok, null)
|
||||
// .create();
|
||||
final Dialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
currentActivity.getResources().getString(R.string.dialog_rest_title),
|
||||
null,
|
||||
currentActivity.getResources().getString(R.string.dialog_rest_message),
|
||||
@@ -336,7 +329,7 @@ public final class Dialogs {
|
||||
text += currentActivity.getResources().getString(R.string.dialog_newversion_permission_information);
|
||||
}
|
||||
|
||||
final Dialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(currentActivity,
|
||||
currentActivity.getResources().getString(R.string.dialog_newversion_title),
|
||||
null,
|
||||
text,
|
||||
@@ -371,7 +364,7 @@ public final class Dialogs {
|
||||
}
|
||||
|
||||
if (!world.model.statistics.hasUnlimitedSaves()) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(mainActivity,
|
||||
mainActivity.getResources().getString(R.string.menu_save_switch_character_title),
|
||||
null,
|
||||
mainActivity.getResources().getString(R.string.menu_save_switch_character),
|
||||
@@ -460,7 +453,7 @@ public final class Dialogs {
|
||||
itemList.setAdapter(new ArrayAdapter<String>(context, R.layout.combatlog_row, android.R.id.text1, combatLogMessages));
|
||||
view = itemList;
|
||||
|
||||
final Dialog d = CustomDialogFactory.createDialog(context,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(context,
|
||||
context.getResources().getString(R.string.combat_log_title),
|
||||
context.getResources().getDrawable(R.drawable.ui_icon_combat),
|
||||
null,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.gpl.rpg.AndorsTrail.activity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.gpl.rpg.AndorsTrail.controller.ItemController;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
|
||||
/**
|
||||
* @author ejwessel
|
||||
@@ -206,7 +207,7 @@ public final class BulkSelectionInterface extends AndorsTrailBaseActivity implem
|
||||
// })
|
||||
// .setNegativeButton(android.R.string.no, null)
|
||||
// .show();
|
||||
final Dialog d = CustomDialogFactory.createDialog(v.getContext(),
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(v.getContext(),
|
||||
v.getContext().getResources().getString(R.string.bulkselection_sell_confirmation_title),
|
||||
v.getContext().getResources().getDrawable(android.R.drawable.ic_dialog_info),
|
||||
message,
|
||||
|
||||
@@ -31,6 +31,7 @@ public final class DebugInterface {
|
||||
private DebugButton[] buttons;
|
||||
private List<DebugButton> tpButtons = new ArrayList<DebugButton>();
|
||||
private List<DebugButton> tpButtons2 = new ArrayList<DebugButton>();
|
||||
private List<DebugButton> tpButtons3 = new ArrayList<DebugButton>();
|
||||
|
||||
public DebugInterface(ControllerContext controllers, WorldContext world, MainActivity mainActivity) {
|
||||
this.controllerContext = controllers;
|
||||
@@ -58,6 +59,9 @@ public final class DebugInterface {
|
||||
for (DebugButton b : tpButtons2) {
|
||||
b.b.setVisibility(View.GONE);
|
||||
}
|
||||
for (DebugButton b : tpButtons3) {
|
||||
b.b.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
})
|
||||
,new DebugButton("teleport", new OnClickListener() {
|
||||
@@ -148,6 +152,12 @@ public final class DebugInterface {
|
||||
public void onClick(View arg0) {
|
||||
showToast(mainActivity, "DEBUG: map=" + world.model.currentMaps.map.name , Toast.LENGTH_SHORT);
|
||||
}
|
||||
})
|
||||
,new DebugButton("tim", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
world.model.worldData.tickWorldTime(10);
|
||||
}
|
||||
})
|
||||
}));
|
||||
|
||||
@@ -178,7 +188,7 @@ public final class DebugInterface {
|
||||
,new DebugButton("cr", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "houseatcrossroads4", "down", 0, 0);
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "crossroads", "middle", 0, 0);
|
||||
}
|
||||
})
|
||||
,new DebugButton("lf", new OnClickListener() {
|
||||
@@ -242,11 +252,8 @@ public final class DebugInterface {
|
||||
new DebugButton("teleport", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
for (int i = 0; i < buttons.length; i++) {
|
||||
buttons[i].b.setVisibility(View.VISIBLE);
|
||||
}
|
||||
for (DebugButton tpButton : tpButtons) {
|
||||
tpButton.b.setVisibility(View.GONE);
|
||||
for (DebugButton tpButton : tpButtons3) {
|
||||
tpButton.b.setVisibility(View.VISIBLE);
|
||||
}
|
||||
for (DebugButton tpButton : tpButtons2) {
|
||||
tpButton.b.setVisibility(View.GONE);
|
||||
@@ -277,9 +284,151 @@ public final class DebugInterface {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "sullengard2", "south", 0, 0);
|
||||
}
|
||||
})
|
||||
,new DebugButton("gal", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "galmore_19", "south", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("apl", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "sullengard_apple_farm_east", "house", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("wch", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "lake_shore_road_0", "west", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("la1", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "laerothisland2", "south2", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("la2", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "island3", "cave", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("wx", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "wexlow_village", "north", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("fey", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "guynmart_wood_17", "north", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}));
|
||||
buttonList.addAll(tpButtons2);
|
||||
|
||||
tpButtons3.addAll(Arrays.asList(new DebugButton[] {
|
||||
new DebugButton("teleport", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
for (int i = 0; i < buttons.length; i++) {
|
||||
buttons[i].b.setVisibility(View.VISIBLE);
|
||||
}
|
||||
for (DebugButton tpButton : tpButtons) {
|
||||
tpButton.b.setVisibility(View.GONE);
|
||||
}
|
||||
for (DebugButton tpButton : tpButtons2) {
|
||||
tpButton.b.setVisibility(View.GONE);
|
||||
}
|
||||
for (DebugButton tpButton : tpButtons3) {
|
||||
tpButton.b.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
})
|
||||
,new DebugButton("#1", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "swamp3", "north", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#2", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "beekeeper1", "south", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
,new DebugButton("#3", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "guynmart", "west2", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#4", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "waterway5", "south", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#5", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "island1", "south2", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#6", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "laerothmanor1", "down2", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#7", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "final_cave1", "up", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#8", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "bwmfill3", "north2", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#9", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "island2", "down", 0, 0);
|
||||
}
|
||||
})
|
||||
|
||||
,new DebugButton("#10", new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, "laerothprison3", "south", 2, 0);
|
||||
}
|
||||
})
|
||||
|
||||
}));
|
||||
buttonList.addAll(tpButtons3);
|
||||
|
||||
buttons = buttonList.toArray(new DebugButton[buttonList.size()]);
|
||||
addDebugButtons(buttons);
|
||||
|
||||
@@ -289,6 +438,9 @@ public final class DebugInterface {
|
||||
for (DebugButton b : tpButtons2) {
|
||||
b.b.setVisibility(View.GONE);
|
||||
}
|
||||
for (DebugButton b : tpButtons3) {
|
||||
b.b.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void showToast(Context context, String msg, int duration) {
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTabHost;
|
||||
import androidx.fragment.app.FragmentTabHost;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,12 @@ import com.gpl.rpg.AndorsTrail.savegames.Savegames;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
|
||||
public final class LoadingActivity extends AndorsTrailBaseActivity implements OnResourcesLoadedListener, OnSceneLoadedListener {
|
||||
|
||||
private WorldSetup setup;
|
||||
private Dialog progressDialog;
|
||||
private CustomDialog progressDialog;
|
||||
private CloudsAnimatorView clouds_back, clouds_mid, clouds_front;
|
||||
boolean loaded = false;
|
||||
|
||||
@@ -165,7 +166,7 @@ public final class LoadingActivity extends AndorsTrailBaseActivity implements On
|
||||
}
|
||||
|
||||
private void showLoadingFailedDialog(int messageResourceID) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(this, getResources().getString(R.string.dialog_loading_failed_title), null, getResources().getString(messageResourceID), null, true);
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(this, getResources().getString(R.string.dialog_loading_failed_title), null, getResources().getString(messageResourceID), null, true);
|
||||
CustomDialogFactory.addDismissButton(d, android.R.string.ok);
|
||||
CustomDialogFactory.setDismissListener(d, new OnDismissListener() {
|
||||
@Override
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CombatView;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
import com.gpl.rpg.AndorsTrail.view.DisplayActiveActorConditionIcons;
|
||||
import com.gpl.rpg.AndorsTrail.view.ItemContainerAdapter;
|
||||
import com.gpl.rpg.AndorsTrail.view.MainView;
|
||||
@@ -247,7 +248,7 @@ public final class MainActivity
|
||||
final ItemContainerAdapter inventoryListAdapter = new QuickslotsItemContainerAdapter(lv.getContext(), world.tileManager, world.model.player.inventory.usableItems(), world.model.player, wornTiles);
|
||||
lv.setAdapter(inventoryListAdapter);
|
||||
|
||||
final Dialog d = CustomDialogFactory.createDialog(v.getContext(),
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(v.getContext(),
|
||||
v.getResources().getString(R.string.inventory_assign),
|
||||
v.getResources().getDrawable(R.drawable.ui_icon_equipment),
|
||||
v.getResources().getString(R.string.inventory_selectitem), view, false);
|
||||
@@ -396,12 +397,10 @@ public final class MainActivity
|
||||
|
||||
@Override
|
||||
public void onPlayerSteppedOnMapSignArea(MapObject area) {
|
||||
Dialogs.showMapSign(this, controllers, area.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerSteppedOnKeyArea(MapObject area) {
|
||||
Dialogs.showKeyArea(this, controllers, area.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.gpl.rpg.AndorsTrail.activity;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.FragmentTabHost;
|
||||
import androidx.fragment.app.FragmentTabHost;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -196,7 +196,7 @@ public final class SkillInfoActivity extends AndorsTrailBaseActivity {
|
||||
case armorProficiencyShield: return res.getString(R.string.skill_longdescription_armor_prof_shield, SkillCollection.PER_SKILLPOINT_INCREASE_SHIELD_PROF_DR);
|
||||
case armorProficiencyUnarmored: return res.getString(R.string.skill_longdescription_armor_prof_unarmored, SkillCollection.PER_SKILLPOINT_INCREASE_UNARMORED_BC);
|
||||
case armorProficiencyLight: return res.getString(R.string.skill_longdescription_armor_prof_light, SkillCollection.PER_SKILLPOINT_INCREASE_LIGHT_ARMOR_BC_PERCENT);
|
||||
case armorProficiencyHeavy: return res.getString(R.string.skill_longdescription_armor_prof_heavy, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_BC_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_MOVECOST_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_ATKCOST_PERCENT);
|
||||
case armorProficiencyHeavy: return res.getString(R.string.skill_longdescription_armor_prof_heavy, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_BC_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_MOVECOST_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_ATKCOST_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_USECOST_PERCENT);
|
||||
case fightstyleDualWield: return res.getString(R.string.skill_longdescription_fightstyle_dualwield, SkillCollection.DUALWIELD_EFFICIENCY_LEVEL0, SkillCollection.DUALWIELD_EFFICIENCY_LEVEL1, SkillCollection.DUALWIELD_LEVEL1_OFFHAND_AP_COST_PERCENT, SkillCollection.DUALWIELD_EFFICIENCY_LEVEL2);
|
||||
case fightstyle2hand: return res.getString(R.string.skill_longdescription_fightstyle_2hand, SkillCollection.PER_SKILLPOINT_INCREASE_FIGHTSTYLE_2HAND_DMG_PERCENT);
|
||||
case fightstyleWeaponShield: return res.getString(R.string.skill_longdescription_fightstyle_weapon_shield, SkillCollection.PER_SKILLPOINT_INCREASE_FIGHTSTYLE_WEAPON_AC_PERCENT, SkillCollection.PER_SKILLPOINT_INCREASE_FIGHTSTYLE_SHIELD_BC_PERCENT);
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CloudsAnimatorView;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
@@ -20,8 +21,8 @@ import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager.OnBackStackChangedListener;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager.OnBackStackChangedListener;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewTreeObserver;
|
||||
@@ -114,7 +115,7 @@ public final class StartScreenActivity extends AndorsTrailBaseFragmentActivity i
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (grantResults.length > 0 && grantResults[0] != PackageManager.PERMISSION_GRANTED) {
|
||||
|
||||
final Dialog d = CustomDialogFactory.createDialog(this,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(this,
|
||||
getResources().getString(R.string.dialog_permission_information_title),
|
||||
getResources().getDrawable(android.R.drawable.ic_dialog_info),
|
||||
getResources().getString(R.string.dialog_permission_information),
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.Arrays;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.ArrayList;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.ArrayList;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.HashSet;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@@ -12,7 +12,7 @@ import android.content.SharedPreferences.Editor;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@@ -38,25 +38,26 @@ import com.gpl.rpg.AndorsTrail.util.AndroidStorage;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
|
||||
public class StartScreenActivity_MainMenu extends Fragment {
|
||||
|
||||
private static final int INTENTREQUEST_PREFERENCES = 7;
|
||||
public static final int INTENTREQUEST_LOADGAME = 9;
|
||||
private static final int INTENTREQUEST_PREFERENCES = 7;
|
||||
public static final int INTENTREQUEST_LOADGAME = 9;
|
||||
|
||||
private boolean hasExistingGame = false;
|
||||
private Button startscreen_continue;
|
||||
private Button startscreen_newgame;
|
||||
private Button startscreen_load;
|
||||
private ViewGroup save_preview_holder;
|
||||
private ImageView save_preview_hero_icon;
|
||||
private TextView save_preview_hero_desc;
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
updatePreferences(false);
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
private boolean hasExistingGame = false;
|
||||
private Button startscreen_continue;
|
||||
private Button startscreen_newgame;
|
||||
private Button startscreen_load;
|
||||
private ViewGroup save_preview_holder;
|
||||
private ImageView save_preview_hero_icon;
|
||||
private TextView save_preview_hero_desc;
|
||||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
updatePreferences(false);
|
||||
super.onCreateView(inflater, container, savedInstanceState);
|
||||
|
||||
|
||||
if (container != null) {
|
||||
@@ -64,11 +65,11 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
}
|
||||
|
||||
View root = inflater.inflate(R.layout.startscreen_mainmenu, container, false);
|
||||
|
||||
|
||||
save_preview_holder = (ViewGroup) root.findViewById(R.id.save_preview_holder);
|
||||
save_preview_hero_icon = (ImageView) root.findViewById(R.id.save_preview_hero_icon);
|
||||
save_preview_hero_desc = (TextView) root.findViewById(R.id.save_preview_hero_desc);
|
||||
|
||||
|
||||
|
||||
startscreen_continue = (Button) root.findViewById(R.id.startscreen_continue);
|
||||
startscreen_continue.setOnClickListener(new OnClickListener() {
|
||||
@@ -114,7 +115,7 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(getActivity());
|
||||
if (hasExistingGame && app != null && app.getWorld() != null && app.getWorld().model != null
|
||||
&& app.getWorld().model.statistics != null && !app.getWorld().model.statistics.hasUnlimitedSaves()) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(getActivity(),
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(getActivity(),
|
||||
getString(R.string.startscreen_load_game),
|
||||
getResources().getDrawable(android.R.drawable.ic_delete),
|
||||
getString(R.string.startscreen_load_game_confirm),
|
||||
@@ -134,7 +135,7 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (AndorsTrailApplication.DEVELOPMENT_FORCE_STARTNEWGAME) {
|
||||
if (AndorsTrailApplication.DEVELOPMENT_DEBUGRESOURCES) {
|
||||
@@ -152,14 +153,14 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
checkAndRequestPermissions(getActivity());
|
||||
migrateDataOnDemand(getActivity());
|
||||
}
|
||||
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
|
||||
String playerName;
|
||||
String displayInfo = null;
|
||||
int iconID = TileManager.CHAR_HERO;
|
||||
@@ -189,14 +190,10 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
setCurrentVersionForVersionCheck();
|
||||
checkAndRequestPermissions(getActivity());
|
||||
migrateDataOnDemand(getActivity());
|
||||
boolean hasSavegames = !Savegames.getUsedSavegameSlots(getActivity()).isEmpty();
|
||||
startscreen_load.setEnabled(hasSavegames);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean hasSavegames = !Savegames.getUsedSavegameSlots(getActivity()).isEmpty();
|
||||
startscreen_load.setEnabled(hasSavegames);
|
||||
}
|
||||
|
||||
@TargetApi(29)
|
||||
@@ -204,23 +201,16 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
if (activity.getApplicationContext().checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
|
||||
if (AndroidStorage.shouldMigrateToInternalStorage(activity.getApplicationContext())) {
|
||||
final Dialog d = CustomDialogFactory.createDialog(activity,
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(activity,
|
||||
getString(R.string.startscreen_migration_title),
|
||||
activity.getResources().getDrawable(android.R.drawable.ic_dialog_alert),
|
||||
getString(R.string.startscreen_migration_text),
|
||||
null,
|
||||
true);
|
||||
CustomDialogFactory.addDismissButton(d, android.R.string.ok);
|
||||
d.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface arg0) {
|
||||
boolean hasSavegames = !Savegames.getUsedSavegameSlots(getActivity()).isEmpty();
|
||||
startscreen_load.setEnabled(hasSavegames);
|
||||
}
|
||||
});
|
||||
CustomDialogFactory.show(d);
|
||||
if (!AndroidStorage.migrateToInternalStorage(activity.getApplicationContext())) {
|
||||
final Dialog errorDlg = CustomDialogFactory.createDialog(activity,
|
||||
final CustomDialog errorDlg = CustomDialogFactory.createDialog(activity,
|
||||
getString(R.string.startscreen_migration_title),
|
||||
activity.getResources().getDrawable(android.R.drawable.ic_dialog_alert),
|
||||
getString(R.string.startscreen_migration_failure),
|
||||
@@ -259,13 +249,13 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
super.onAttach(activity);
|
||||
listener = (OnNewGameRequestedListener) activity;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
listener = null;
|
||||
}
|
||||
|
||||
|
||||
private void setButtonState(final String playerName, final String displayInfo, int iconID, boolean isDead) {
|
||||
startscreen_continue.setEnabled(hasExistingGame && !isDead);
|
||||
startscreen_newgame.setEnabled(true);
|
||||
@@ -305,9 +295,9 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
// .create().show();
|
||||
//
|
||||
//
|
||||
final Dialog d = CustomDialogFactory.createDialog(getActivity(),
|
||||
getString(R.string.startscreen_newgame),
|
||||
getResources().getDrawable(android.R.drawable.ic_delete),
|
||||
final CustomDialog d = CustomDialogFactory.createDialog(getActivity(),
|
||||
getString(R.string.startscreen_newgame),
|
||||
getResources().getDrawable(android.R.drawable.ic_delete),
|
||||
getResources().getString(R.string.startscreen_newgame_confirm),
|
||||
null,
|
||||
true);
|
||||
@@ -318,9 +308,9 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
}
|
||||
});
|
||||
CustomDialogFactory.addDismissButton(d, android.R.string.cancel);
|
||||
|
||||
|
||||
CustomDialogFactory.show(d);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static final String versionCheck = "lastversion";
|
||||
@@ -337,64 +327,90 @@ public class StartScreenActivity_MainMenu extends Fragment {
|
||||
e.putInt(versionCheck, AndorsTrailApplication.CURRENT_VERSION);
|
||||
e.commit();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (requestCode) {
|
||||
case INTENTREQUEST_LOADGAME:
|
||||
if (resultCode != Activity.RESULT_OK) break;
|
||||
final int slot = data.getIntExtra("slot", 1);
|
||||
continueGame(false, slot, null);
|
||||
break;
|
||||
case INTENTREQUEST_PREFERENCES:
|
||||
updatePreferences(true);
|
||||
break;
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
switch (requestCode) {
|
||||
case INTENTREQUEST_LOADGAME:
|
||||
boolean unsuccessful = resultCode != Activity.RESULT_OK;
|
||||
if(data == null) break;
|
||||
|
||||
final boolean wasImportOrExport = data.getBooleanExtra("import_export", false);
|
||||
if (wasImportOrExport) {
|
||||
String message = getImportExportMessage(!unsuccessful, data);
|
||||
Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
|
||||
break;
|
||||
}
|
||||
if (unsuccessful) break;
|
||||
final int slot = data.getIntExtra("slot", 1);
|
||||
continueGame(false, slot, null);
|
||||
break;
|
||||
case INTENTREQUEST_PREFERENCES:
|
||||
updatePreferences(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private String getImportExportMessage(boolean successful, Intent data) {
|
||||
String message = "";
|
||||
boolean isImportWorldmap = data.getBooleanExtra("import_worldmap", false);
|
||||
boolean isImportSaves = data.getBooleanExtra("import_savegames", false);
|
||||
boolean isExport = data.getBooleanExtra("export", false);
|
||||
|
||||
if(isImportWorldmap) {
|
||||
message = getString(successful ? R.string.loadsave_import_worldmap_successfull : R.string.loadsave_import_worldmap_unsuccessfull);
|
||||
} else if(isImportSaves) {
|
||||
message = getString(successful ? R.string.loadsave_import_save_successfull : R.string.loadsave_import_save_unsuccessfull);
|
||||
} else if(isExport) {
|
||||
message = getString(successful ? R.string.loadsave_export_successfull : R.string.loadsave_export_unsuccessfull);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
|
||||
private void updatePreferences(boolean alreadyStartedLoadingResources) {
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(getActivity());
|
||||
AndorsTrailPreferences preferences = app.getPreferences();
|
||||
preferences.read(getActivity());
|
||||
if (app.setLocale(getActivity())) {
|
||||
if (alreadyStartedLoadingResources) {
|
||||
// Changing the locale after having loaded the game requires resources to
|
||||
// be re-loaded. Therefore, we just exit here.
|
||||
Toast.makeText(getActivity(), R.string.change_locale_requires_restart, Toast.LENGTH_LONG).show();
|
||||
doFinish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ThemeHelper.changeTheme(preferences.selectedTheme)) {
|
||||
// Changing the theme requires a restart to re-create all activities.
|
||||
Toast.makeText(getActivity(), R.string.change_theme_requires_restart, Toast.LENGTH_LONG).show();
|
||||
doFinish();
|
||||
return;
|
||||
}
|
||||
app.getWorld().tileManager.updatePreferences(preferences);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void doFinish() {
|
||||
//For Lollipop and above
|
||||
((AndorsTrailApplication)getActivity().getApplication()).discardWorld();
|
||||
getActivity().finish();
|
||||
}
|
||||
AndorsTrailApplication app = AndorsTrailApplication.getApplicationFromActivity(getActivity());
|
||||
AndorsTrailPreferences preferences = app.getPreferences();
|
||||
preferences.read(getActivity());
|
||||
if (app.setLocale(getActivity())) {
|
||||
if (alreadyStartedLoadingResources) {
|
||||
// Changing the locale after having loaded the game requires resources to
|
||||
// be re-loaded. Therefore, we just exit here.
|
||||
Toast.makeText(getActivity(), R.string.change_locale_requires_restart, Toast.LENGTH_LONG).show();
|
||||
doFinish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ThemeHelper.changeTheme(preferences.selectedTheme)) {
|
||||
// Changing the theme requires a restart to re-create all activities.
|
||||
Toast.makeText(getActivity(), R.string.change_theme_requires_restart, Toast.LENGTH_LONG).show();
|
||||
doFinish();
|
||||
return;
|
||||
}
|
||||
app.getWorld().tileManager.updatePreferences(preferences);
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private void doFinish() {
|
||||
//For Lollipop and above
|
||||
((AndorsTrailApplication) getActivity().getApplication()).discardWorld();
|
||||
getActivity().finish();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public interface OnNewGameRequestedListener {
|
||||
public void onNewGameRequested();
|
||||
}
|
||||
|
||||
|
||||
private OnNewGameRequestedListener listener = null;
|
||||
|
||||
|
||||
private void createNewGame() {
|
||||
if (listener != null) {
|
||||
listener.onNewGameRequested();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.gpl.rpg.AndorsTrail.activity.fragment;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
|
||||
@@ -76,8 +76,7 @@ public final class ActorStatsController {
|
||||
c.magnitude -= magnitude;
|
||||
actorConditionListeners.onActorConditionMagnitudeChanged(actor, c);
|
||||
} else {
|
||||
actor.conditions.remove(i);
|
||||
actorConditionListeners.onActorConditionRemoved(actor, c);
|
||||
actorConditionsRemove(actor, c, i);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -232,9 +231,9 @@ public final class ActorStatsController {
|
||||
public void removeAllTemporaryConditions(final Actor actor) {
|
||||
for(int i = actor.conditions.size() - 1; i >= 0; --i) {
|
||||
ActorCondition c = actor.conditions.get(i);
|
||||
if (!c.isTemporaryEffect()) continue;
|
||||
actor.conditions.remove(i);
|
||||
actorConditionListeners.onActorConditionRemoved(actor, c);
|
||||
if (c.isTemporaryEffect() || c.isDurationForeverUntilSleep()) {
|
||||
actorConditionsRemove(actor, c, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,8 +241,7 @@ public final class ActorStatsController {
|
||||
for(int i = actor.conditions.size() - 1; i >= 0; --i) {
|
||||
ActorCondition c = actor.conditions.get(i);
|
||||
if (!c.conditionType.conditionTypeID.equals(conditionTypeID)) continue;
|
||||
actor.conditions.remove(i);
|
||||
actorConditionListeners.onActorConditionRemoved(actor, c);
|
||||
actorConditionsRemove(actor, c, i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -406,14 +404,14 @@ public final class ActorStatsController {
|
||||
ActorCondition c = actor.conditions.get(i);
|
||||
if (!c.isTemporaryEffect()) continue;
|
||||
if (c.duration <= 1) {
|
||||
actor.conditions.remove(i);
|
||||
actorConditionListeners.onActorConditionRemoved(actor, c);
|
||||
actorConditionsRemove(actor, c, i);
|
||||
removedAnyConditions = true;
|
||||
} else {
|
||||
c.duration -= 1;
|
||||
actorConditionListeners.onActorConditionDurationChanged(actor, c);
|
||||
}
|
||||
}
|
||||
// Immunities
|
||||
for(int i = actor.immunities.size() - 1; i >= 0; --i) {
|
||||
ActorCondition c = actor.immunities.get(i);
|
||||
if (!c.isTemporaryEffect()) continue;
|
||||
@@ -457,6 +455,50 @@ public final class ActorStatsController {
|
||||
}
|
||||
}
|
||||
|
||||
int actorConditionsRemove(Actor actor, ActorCondition c, int i) {
|
||||
int magnitude = 0; //default: No condition from worn items
|
||||
|
||||
if (actor instanceof Player) {
|
||||
Player player = (Player) actor;
|
||||
magnitude = gotConditionFromWornItem(player, c);
|
||||
if (magnitude > 0) { //condition from worn items?
|
||||
c.magnitude = magnitude; // -> readd condition
|
||||
actorConditionListeners.onActorConditionMagnitudeChanged(actor, c);
|
||||
c.duration = ActorCondition.DURATION_FOREVER;
|
||||
actorConditionListeners.onActorConditionDurationChanged(actor, c);
|
||||
}
|
||||
}
|
||||
if (magnitude == 0) {
|
||||
actor.conditions.remove(i);
|
||||
actorConditionListeners.onActorConditionRemoved(actor, c);
|
||||
}
|
||||
|
||||
return magnitude;
|
||||
}
|
||||
|
||||
int gotConditionFromWornItem(Player player, ActorCondition c) {
|
||||
int magnitude = 0; //Default: No worn item with this condition
|
||||
|
||||
for (Inventory.WearSlot slot : Inventory.WearSlot.values()) {
|
||||
ItemType t = player.inventory.getItemTypeInWearSlot(slot);
|
||||
if (t == null) continue;
|
||||
ItemTraits_OnEquip equipEffects = t.effects_equip;
|
||||
if (equipEffects == null) continue;
|
||||
if (equipEffects.addedConditions == null) continue;
|
||||
for (ActorConditionEffect e : equipEffects.addedConditions) {
|
||||
if (e.conditionType.conditionTypeID.equals(c.conditionType.conditionTypeID)) {
|
||||
if (e.magnitude == ActorCondition.MAGNITUDE_REMOVE_ALL) {
|
||||
return 0; //On an item-based immunity the result is always 0
|
||||
}
|
||||
if (magnitude < e.magnitude) {
|
||||
magnitude = e.magnitude;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return magnitude;
|
||||
}
|
||||
|
||||
public void applyUseEffect(Actor source, Actor target, ItemTraits_OnUse effect) {
|
||||
if (effect == null) return;
|
||||
|
||||
|
||||
@@ -250,7 +250,8 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
if (!loot.hasItemsOrGold()) {
|
||||
world.model.currentMaps.map.removeGroundLoot(loot);
|
||||
} else if (world.model.uiSelections.isInCombat) {
|
||||
killedMonsterBags.add(loot);
|
||||
if(!killedMonsterBags.contains(loot))
|
||||
killedMonsterBags.add(loot);
|
||||
}
|
||||
|
||||
combatActionListeners.onPlayerKilledMonster(killedMonster);
|
||||
@@ -579,6 +580,13 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
private static final int n = 50;
|
||||
private static final int F = 40;
|
||||
private static final float two_divided_by_PI = (float) (2f / Math.PI);
|
||||
/**
|
||||
* @implNote
|
||||
* formula: 50 * (1 + (2 / pi) * atan((attackChance - blockChance - n) / F))
|
||||
* <br/>
|
||||
* n = {@value n}; F = {@value F}
|
||||
* @return [0..100] . 100 == always hit.
|
||||
*/
|
||||
private static int getAttackHitChance(final Actor attacker, final Actor target) {
|
||||
final int c = attacker.getAttackChance() - target.getBlockChance();
|
||||
// (2/pi)*atan(..) will vary from -1 to +1 .
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.gpl.rpg.AndorsTrail.util.ConstRange;
|
||||
import com.gpl.rpg.AndorsTrail.util.Range;
|
||||
|
||||
public final class Constants {
|
||||
public static final int PERCENT_EXP_LOST_WHEN_DIED = 30;
|
||||
public static final int PERCENT_EXP_LOST_WHEN_DIED = 20;
|
||||
public static final int LEVELUP_EFFECT_HEALTH = 5;
|
||||
public static final int LEVELUP_EFFECT_ATK_CH = 5;
|
||||
public static final int LEVELUP_EFFECT_ATK_DMG = 1;
|
||||
@@ -51,6 +51,10 @@ public final class Constants {
|
||||
public static final String CHEAT_DETECTION_FOLDER = "dEAGyGE3YojqXjI3x4x7";
|
||||
public static final String PASSIVE_ACHIEVEMENT_CHECK_PHRASE = "passive_achievement_check";
|
||||
|
||||
public static final String SAVEGAME_FILE_MIME_TYPE = "application/octet-stream";
|
||||
public static final String WORLDMAP_FILE_MIME_TYPE = "image/png";
|
||||
public static final String NO_FILE_EXTENSION_MIME_TYPE = "application/no_file_extension_mime_type";
|
||||
|
||||
public static final Random rnd = new Random();
|
||||
public static int rollValue(final ConstRange r) { return rollValue(r.max, r.current); }
|
||||
public static int rollValue(final ConstRange r, int bias) { return rollValue((r.max + 1) * 100 -1, r.current * 100 + bias)/100; }
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.gpl.rpg.AndorsTrail.model.conversation.Reply;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.Loot;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.LayeredTileMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MapObject;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.quest.QuestLogEntry;
|
||||
@@ -124,6 +125,9 @@ public final class ConversationController {
|
||||
case changeMapFilter:
|
||||
changeMapFilter(res, effect.mapName, effect.effectID);
|
||||
break;
|
||||
case mapchange:
|
||||
mapchange(effect.mapName, effect.effectID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,6 +176,13 @@ public final class ConversationController {
|
||||
}
|
||||
}
|
||||
|
||||
private void mapchange(String mapName, String place) {
|
||||
PredefinedMap map = findMapForScriptEffect(mapName);
|
||||
// controllers.mapController.activateMapObjectGroup(map, mapObjectGroupID);
|
||||
// controllerContext.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, effect.mapName, effect.effectID, 0, 0); //cbcbcb check
|
||||
controllers.movementController.placePlayerAsyncAt(MapObject.MapObjectType.newmap, mapName, place, 0, 0);
|
||||
}
|
||||
|
||||
private void addAlignmentReward(Player player, String faction, int delta) {
|
||||
player.addAlignment(faction, delta);
|
||||
MovementController.refreshMonsterAggressiveness(world.model.currentMaps.map, world.model.player);
|
||||
@@ -311,6 +322,18 @@ public final class ConversationController {
|
||||
case factionScoreEquals:
|
||||
result = player.getAlignment(requirement.requireID) == requirement.value;
|
||||
break;
|
||||
case date:
|
||||
result = world.model.worldData.getDate(requirement.requireID) >= requirement.value;
|
||||
break;
|
||||
case dateEquals:
|
||||
result = world.model.worldData.getDate(requirement.requireID) == requirement.value;
|
||||
break;
|
||||
case time:
|
||||
result = world.model.worldData.getTime(requirement.requireID) >= requirement.value;
|
||||
break;
|
||||
case timeEquals:
|
||||
result = world.model.worldData.getTime(requirement.requireID) == requirement.value;
|
||||
break;
|
||||
default:
|
||||
result = true;
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ public final class MapController {
|
||||
case sign:
|
||||
if (o.id == null || o.id.length() <= 0) return;
|
||||
worldEventListeners.onPlayerSteppedOnMapSignArea(o);
|
||||
runScriptInArea(o);
|
||||
break;
|
||||
case newmap:
|
||||
if (o.map == null || o.place == null) return;
|
||||
@@ -79,7 +80,7 @@ public final class MapController {
|
||||
steppedOnRestArea(o);
|
||||
break;
|
||||
case script:
|
||||
runScriptArea(o);
|
||||
runScriptInArea(o);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -93,7 +94,7 @@ public final class MapController {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void runScriptArea(MapObject o) {
|
||||
private void runScriptInArea(MapObject o) {
|
||||
Resources res = controllers.getResources();
|
||||
mapScriptExecutor.proceedToPhrase(res, o.id, true, true);
|
||||
controllers.mapController.applyCurrentMapReplacements(res, true);
|
||||
@@ -164,6 +165,7 @@ public final class MapController {
|
||||
return true;
|
||||
}
|
||||
worldEventListeners.onPlayerSteppedOnKeyArea(area);
|
||||
runScriptInArea(area);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.gpl.rpg.AndorsTrail.controller;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.context.ControllerContext;
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.controller.listeners.CombatActionListeners;
|
||||
@@ -17,6 +18,7 @@ import com.gpl.rpg.AndorsTrail.model.item.ItemCategory;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemType;
|
||||
import com.gpl.rpg.AndorsTrail.model.item.ItemTypeCollection;
|
||||
import com.gpl.rpg.AndorsTrail.util.ConstRange;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
|
||||
public final class SkillController {
|
||||
private final ControllerContext controllers;
|
||||
@@ -58,6 +60,9 @@ public final class SkillController {
|
||||
|
||||
public static int getDropChanceRollBias(DropItem item, Player player) {
|
||||
if (player == null) return 0;
|
||||
if(item.itemType == null && AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
|
||||
L.log("Item type missing: " + item + " " + player.id);
|
||||
}
|
||||
|
||||
if (ItemTypeCollection.isGoldItemType(item.itemType.id)) {
|
||||
return getRollBias(item, player, SkillID.coinfinder, SkillCollection.PER_SKILLPOINT_INCREASE_COINFINDER_CHANCE_PERCENT);
|
||||
@@ -248,6 +253,7 @@ public final class SkillController {
|
||||
addPercentBlockChance(player, itemType, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_BC_PERCENT * skillLevelHeavyArmor, 0);
|
||||
playerTraits.moveCost -= getPercentage(itemType.effects_equip.stats.increaseMoveCost, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_MOVECOST_PERCENT * skillLevelHeavyArmor, 0);
|
||||
playerTraits.attackCost -= getPercentage(itemType.effects_equip.stats.increaseAttackCost, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_ATKCOST_PERCENT * skillLevelHeavyArmor, 0);
|
||||
playerTraits.useItemCost -= getPercentage(itemType.effects_equip.stats.increaseUseItemCost, SkillCollection.PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_USECOST_PERCENT * skillLevelHeavyArmor, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,14 +21,23 @@ import com.gpl.rpg.AndorsTrail.util.Coord;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
import com.gpl.rpg.AndorsTrail.util.Size;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public final class VisualEffectController {
|
||||
private static final long EFFECT_UPDATE_INTERVAL = 25;
|
||||
private int effectCount = 0;
|
||||
|
||||
private final ControllerContext controllers;
|
||||
private final WorldContext world;
|
||||
private final VisualEffectCollection effectTypes;
|
||||
private final Handler animationHandler = new Handler();
|
||||
private final List<VisualEffectAnimation> activeAnimations = new ArrayList<>();
|
||||
|
||||
public final VisualEffectFrameListeners visualEffectFrameListeners = new VisualEffectFrameListeners();
|
||||
private long getEffectUpdateInterval() {
|
||||
return EFFECT_UPDATE_INTERVAL * controllers.preferences.attackspeed_milliseconds / AndorsTrailPreferences.ATTACKSPEED_DEFAULT_MILLISECONDS;
|
||||
}
|
||||
|
||||
public VisualEffectController(ControllerContext controllers, WorldContext world) {
|
||||
this.controllers = controllers;
|
||||
@@ -38,10 +47,42 @@ public final class VisualEffectController {
|
||||
|
||||
public void startEffect(Coord position, VisualEffectCollection.VisualEffectID effectID, String displayValue, VisualEffectCompletedCallback callback, int callbackValue) {
|
||||
++effectCount;
|
||||
(new VisualEffectAnimation(effectTypes.getVisualEffect(effectID), position, displayValue, callback, callbackValue))
|
||||
.start();
|
||||
VisualEffectAnimation animation = new VisualEffectAnimation(effectTypes.getVisualEffect(effectID), position, displayValue, callback, callbackValue);
|
||||
animation.start();
|
||||
}
|
||||
|
||||
private void startAnimation(VisualEffectAnimation animation) {
|
||||
activeAnimations.add(animation);
|
||||
animation.update();
|
||||
if (activeAnimations.size() == 1) {
|
||||
animationHandler.postDelayed(animationRunnable, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private final Runnable animationRunnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(!activeAnimations.isEmpty()) {
|
||||
long updateInterval = getEffectUpdateInterval();
|
||||
animationHandler.postDelayed(this, updateInterval);
|
||||
|
||||
for (int i = 0; i < activeAnimations.size(); i++) {
|
||||
VisualEffectAnimation animation = activeAnimations.get(i);
|
||||
animation.durationPassed += updateInterval;
|
||||
animation.updateFrame();
|
||||
animation.update();
|
||||
if (controllers.preferences.attackspeed_milliseconds <= 0 || animation.currentFrame >= animation.effect.lastFrame) {
|
||||
animation.onCompleted();
|
||||
activeAnimations.remove(i);
|
||||
effectCount--;
|
||||
i--;
|
||||
}
|
||||
}
|
||||
visualEffectFrameListeners.onNewAnimationFrames(activeAnimations);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private VisualEffectCollection.VisualEffectID enqueuedEffectID = null;
|
||||
private int enqueuedEffectValue = 0;
|
||||
public void enqueueEffect(VisualEffectCollection.VisualEffectID effectID, int displayValue) {
|
||||
@@ -65,10 +106,9 @@ public final class VisualEffectController {
|
||||
.start();
|
||||
}
|
||||
|
||||
public final class SpriteMoveAnimation extends Handler implements Runnable {
|
||||
|
||||
// private static final int millisecondsPerFrame=25;
|
||||
|
||||
public final class SpriteMoveAnimation implements Runnable {
|
||||
private final Handler handler = new Handler();
|
||||
|
||||
private final VisualEffectCompletedCallback callback;
|
||||
private final int callbackValue;
|
||||
|
||||
@@ -82,11 +122,6 @@ public final class VisualEffectController {
|
||||
@Override
|
||||
public void run() {
|
||||
onCompleted();
|
||||
// update();
|
||||
// if (System.currentTimeMillis() - actor.vfxStartTime >= duration) {
|
||||
// } else {
|
||||
// postDelayed(this, millisecondsPerFrame);
|
||||
// }
|
||||
}
|
||||
|
||||
public SpriteMoveAnimation(Coord origin, Coord destination, int duration, Actor actor, PredefinedMap map, VisualEffectCompletedCallback callback, int callbackValue) {
|
||||
@@ -99,11 +134,6 @@ public final class VisualEffectController {
|
||||
this.destination = destination;
|
||||
|
||||
}
|
||||
|
||||
// private void update() {
|
||||
//
|
||||
// visualEffectFrameListeners.onNewSpriteMoveFrame(this);
|
||||
// }
|
||||
|
||||
private void onCompleted() {
|
||||
--effectCount;
|
||||
@@ -111,7 +141,6 @@ public final class VisualEffectController {
|
||||
if (callback != null) callback.onVisualEffectCompleted(callbackValue);
|
||||
visualEffectFrameListeners.onSpriteMoveCompleted(this);
|
||||
}
|
||||
|
||||
|
||||
public void start() {
|
||||
actor.hasVFXRunning = true;
|
||||
@@ -120,12 +149,9 @@ public final class VisualEffectController {
|
||||
visualEffectFrameListeners.onSpriteMoveStarted(this);
|
||||
if (duration == 0 || !controllers.preferences.enableUiAnimations) onCompleted();
|
||||
else {
|
||||
postDelayed(this, duration);
|
||||
handler.postDelayed(this, duration);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static final Paint textPaint = new Paint();
|
||||
@@ -134,41 +160,42 @@ public final class VisualEffectController {
|
||||
textPaint.setAlpha(255);
|
||||
textPaint.setTextAlign(Align.CENTER);
|
||||
}
|
||||
|
||||
public final class VisualEffectAnimation extends Handler implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (currentFrame >= effect.lastFrame) {
|
||||
onCompleted();
|
||||
} else {
|
||||
postDelayed(this, effect.millisecondPerFrame * controllers.preferences.attackspeed_milliseconds / AndorsTrailPreferences.ATTACKSPEED_DEFAULT_MILLISECONDS);
|
||||
update();
|
||||
public final class VisualEffectAnimation {
|
||||
public int tileID;
|
||||
public int textYOffset;
|
||||
public long durationPassed = 0;
|
||||
|
||||
private void updateFrame() {
|
||||
long frameDuration = (long) effect.millisecondPerFrame * controllers.preferences.attackspeed_milliseconds / AndorsTrailPreferences.ATTACKSPEED_DEFAULT_MILLISECONDS;
|
||||
while (frameDuration > 0 && durationPassed > frameDuration) {
|
||||
currentFrame++;
|
||||
durationPassed -= frameDuration;
|
||||
}
|
||||
}
|
||||
|
||||
private void update() {
|
||||
++currentFrame;
|
||||
int frame = currentFrame;
|
||||
|
||||
int tileID = effect.frameIconIDs[frame];
|
||||
int textYOffset = -2 * (frame);
|
||||
if (frame >= beginFadeAtFrame && displayText != null) {
|
||||
textPaint.setAlpha(255 * (effect.lastFrame - frame) / (effect.lastFrame - beginFadeAtFrame));
|
||||
if (currentFrame >= effect.lastFrame) {
|
||||
return;
|
||||
}
|
||||
|
||||
tileID = effect.frameIconIDs[currentFrame];
|
||||
textYOffset = -2 * (currentFrame);
|
||||
|
||||
if (currentFrame >= beginFadeAtFrame && displayText != null) {
|
||||
textPaint.setAlpha(255 * (effect.lastFrame - currentFrame) / (effect.lastFrame - beginFadeAtFrame));
|
||||
}
|
||||
|
||||
area.topLeft.y = position.y - 1;
|
||||
visualEffectFrameListeners.onNewAnimationFrame(this, tileID, textYOffset);
|
||||
}
|
||||
|
||||
private void onCompleted() {
|
||||
--effectCount;
|
||||
visualEffectFrameListeners.onAnimationCompleted(this);
|
||||
if (callback != null) callback.onVisualEffectCompleted(callbackValue);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (!controllers.preferences.enableUiAnimations) onCompleted();
|
||||
else postDelayed(this, 0);
|
||||
else startAnimation(this);
|
||||
}
|
||||
|
||||
private int currentFrame = 0;
|
||||
@@ -197,7 +224,7 @@ public final class VisualEffectController {
|
||||
this.area = new CoordRect(new Coord(position.x - (widthNeededInTiles / 2), position.y - 1), new Size(widthNeededInTiles, 2));
|
||||
this.beginFadeAtFrame = effect.lastFrame / 2;
|
||||
}
|
||||
|
||||
|
||||
public Paint getTextPaint(){
|
||||
return textPaint;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.LayeredTileMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MapLayer;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.TMXMapTranslator;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.NamedWorldMapArea;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.WorldMapSegmentMap;
|
||||
@@ -314,4 +315,32 @@ public final class WorldMapController {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void populateWorldMap(Context context, WorldContext world, Resources res) throws IOException {
|
||||
ensureWorldmapDirectoryExists(context);
|
||||
File dir = getWorldmapDirectory(context);
|
||||
|
||||
File idFile = new File(dir, world.model.player.id);
|
||||
if (idFile.exists()) return;
|
||||
idFile.createNewFile();
|
||||
|
||||
for (PredefinedMap map : world.maps.getAllMaps()) {
|
||||
if (!map.visited) continue;
|
||||
|
||||
String worldMapSegmentName = world.maps.getWorldMapSegmentNameForMap(map.name);
|
||||
if (worldMapSegmentName == null) continue;
|
||||
|
||||
boolean mapFileExists = fileForMapExists(context, map);
|
||||
File worldMapFile = getCombinedWorldMapFile(context, worldMapSegmentName);
|
||||
if (mapFileExists && worldMapFile.exists()) continue;
|
||||
|
||||
LayeredTileMap mapTiles = TMXMapTranslator.readLayeredTileMap(res, world.tileManager.tileCache, map);
|
||||
mapTiles.changeColorFilter(map.currentColorFilter);
|
||||
TileCollection cachedTiles = world.tileManager.loadTilesFor(map, mapTiles, world, res);
|
||||
|
||||
MapRenderer renderer = new MapRenderer(world, map, mapTiles, cachedTiles);
|
||||
updateCachedBitmap(context, map, renderer);
|
||||
updateWorldMapSegment(context, res, world, worldMapSegmentName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import com.gpl.rpg.AndorsTrail.controller.VisualEffectController.SpriteMoveAnima
|
||||
import com.gpl.rpg.AndorsTrail.controller.VisualEffectController.VisualEffectAnimation;
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VisualEffectFrameListener {
|
||||
void onNewAnimationFrame(VisualEffectAnimation animation, int tileID, int textYOffset);
|
||||
void onNewAnimationFrames(List<VisualEffectAnimation> effects);
|
||||
void onAnimationCompleted(VisualEffectAnimation animation);
|
||||
void onSpriteMoveStarted(SpriteMoveAnimation animation);
|
||||
void onNewSpriteMoveFrame(SpriteMoveAnimation animation);
|
||||
|
||||
@@ -5,10 +5,12 @@ import com.gpl.rpg.AndorsTrail.controller.VisualEffectController.VisualEffectAni
|
||||
import com.gpl.rpg.AndorsTrail.util.CoordRect;
|
||||
import com.gpl.rpg.AndorsTrail.util.ListOfListeners;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public final class VisualEffectFrameListeners extends ListOfListeners<VisualEffectFrameListener> implements VisualEffectFrameListener {
|
||||
|
||||
private final Function3<VisualEffectFrameListener, VisualEffectAnimation, Integer, Integer> onNewAnimationFrame = new Function3<VisualEffectFrameListener, VisualEffectAnimation, Integer, Integer>() {
|
||||
@Override public void call(VisualEffectFrameListener listener, VisualEffectAnimation animation, Integer tileID, Integer textYOffset) { listener.onNewAnimationFrame(animation, tileID, textYOffset); }
|
||||
private final Function1<VisualEffectFrameListener, List<VisualEffectAnimation>> onNewAnimationFrames = new Function1<VisualEffectFrameListener, List<VisualEffectAnimation>>() {
|
||||
@Override public void call(VisualEffectFrameListener listener, List<VisualEffectAnimation> effects) { listener.onNewAnimationFrames(effects); }
|
||||
};
|
||||
|
||||
private final Function1<VisualEffectFrameListener, VisualEffectAnimation> onAnimationCompleted = new Function1<VisualEffectFrameListener, VisualEffectAnimation>() {
|
||||
@@ -30,10 +32,10 @@ public final class VisualEffectFrameListeners extends ListOfListeners<VisualEffe
|
||||
private final Function1<VisualEffectFrameListener, CoordRect> onAsyncAreaUpdate = new Function1<VisualEffectFrameListener, CoordRect>() {
|
||||
@Override public void call(VisualEffectFrameListener listener, CoordRect area) { listener.onAsyncAreaUpdate(area); }
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public void onNewAnimationFrame(VisualEffectAnimation animation, int tileID, int textYOffset) {
|
||||
callAllListeners(this.onNewAnimationFrame, animation, tileID, textYOffset);
|
||||
public void onNewAnimationFrames(List<VisualEffectAnimation> effects) {
|
||||
callAllListeners(this.onNewAnimationFrames, effects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public final class WorldData {
|
||||
private long worldTime = 0; // Measured in number of game rounds
|
||||
private final HashMap<String, Long> timers = new HashMap<String, Long>();
|
||||
@@ -36,6 +38,62 @@ public final class WorldData {
|
||||
return v + duration <= worldTime;
|
||||
}
|
||||
|
||||
public int getDate(String format) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
int ret;
|
||||
switch (format) {
|
||||
case "YYYYMMDD":
|
||||
ret = now.get(Calendar.YEAR)*10000 + (now.get(Calendar.MONTH) + 1)*100 + now.get(Calendar.DAY_OF_MONTH);
|
||||
break;
|
||||
case "YYYYMM":
|
||||
ret = now.get(Calendar.YEAR)*100 + (now.get(Calendar.MONTH) + 1);
|
||||
break;
|
||||
case "YYYY":
|
||||
ret = now.get(Calendar.YEAR);
|
||||
break;
|
||||
case "MMDD":
|
||||
ret = (now.get(Calendar.MONTH) + 1)*100 + now.get(Calendar.DAY_OF_MONTH);
|
||||
break;
|
||||
case "MM":
|
||||
ret = (now.get(Calendar.MONTH) + 1);
|
||||
break;
|
||||
case "DD":
|
||||
ret = now.get(Calendar.DAY_OF_MONTH);
|
||||
break;
|
||||
default:
|
||||
ret = 99999999; //never true
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public int getTime(String format) {
|
||||
Calendar now = Calendar.getInstance();
|
||||
int ret;
|
||||
switch (format) {
|
||||
case "HHMMSS":
|
||||
ret = now.get(Calendar.HOUR_OF_DAY)*10000 + now.get(Calendar.MINUTE)*100 + now.get(Calendar.SECOND);
|
||||
break;
|
||||
case "HHMM":
|
||||
ret = now.get(Calendar.HOUR_OF_DAY)*100 + now.get(Calendar.MINUTE);
|
||||
break;
|
||||
case "HH":
|
||||
ret = now.get(Calendar.HOUR_OF_DAY);
|
||||
break;
|
||||
case "MMSS":
|
||||
ret = now.get(Calendar.MINUTE)*100 + now.get(Calendar.SECOND);
|
||||
break;
|
||||
case "MM":
|
||||
ret = now.get(Calendar.MINUTE);
|
||||
break;
|
||||
case "SS":
|
||||
ret = now.get(Calendar.SECOND);
|
||||
break;
|
||||
default:
|
||||
ret = 99999999; //never true
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
|
||||
public WorldData(DataInputStream src, int fileversion) throws IOException {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
public final class ActorCondition {
|
||||
public static final int MAGNITUDE_REMOVE_ALL = -99;
|
||||
public static final int DURATION_FOREVER = 999;
|
||||
public static final int DURATION_FOREVER_UNTIL_SLEEP = 998;
|
||||
public static final int DURATION_NONE = 0;
|
||||
|
||||
public final ActorConditionType conditionType;
|
||||
@@ -27,7 +28,12 @@ public final class ActorCondition {
|
||||
|
||||
public boolean isTemporaryEffect() { return isTemporaryEffect(duration); }
|
||||
public static boolean isTemporaryEffect(int duration) {
|
||||
return duration != DURATION_FOREVER;
|
||||
return ( duration != DURATION_FOREVER && duration != DURATION_FOREVER_UNTIL_SLEEP );
|
||||
}
|
||||
|
||||
public boolean isDurationForeverUntilSleep() { return isDurationForeverUntilSleep(duration); }
|
||||
public static boolean isDurationForeverUntilSleep(int duration) {
|
||||
return ( duration == DURATION_FOREVER_UNTIL_SLEEP );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public final class SkillCollection {
|
||||
public static final int PER_SKILLPOINT_INCREASE_COINFINDER_CHANCE_PERCENT = 30;
|
||||
public static final int PER_SKILLPOINT_INCREASE_MAGICFINDER_CHANCE_PERCENT = 50;
|
||||
public static final int PER_SKILLPOINT_INCREASE_COINFINDER_QUANTITY_PERCENT = 50;
|
||||
public static final int PER_SKILLPOINT_INCREASE_MORE_EXP_PERCENT = 5;
|
||||
public static final int PER_SKILLPOINT_INCREASE_MORE_EXP_PERCENT = 10;
|
||||
public static final int PER_SKILLPOINT_INCREASE_CLEAVE_AP = 3;
|
||||
public static final int PER_SKILLPOINT_INCREASE_EATER_HEALTH = 1;
|
||||
public static final int PER_SKILLPOINT_INCREASE_FORTITUDE_HEALTH = 1;
|
||||
@@ -112,6 +112,7 @@ public final class SkillCollection {
|
||||
public static final int PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_BC_PERCENT = 20;
|
||||
public static final int PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_MOVECOST_PERCENT = 25;
|
||||
public static final int PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_ATKCOST_PERCENT = 25;
|
||||
public static final int PER_SKILLPOINT_INCREASE_HEAVY_ARMOR_USECOST_PERCENT = 25;
|
||||
public static final int PER_SKILLPOINT_INCREASE_FIGHTSTYLE_2HAND_DMG_PERCENT = 30;
|
||||
public static final int PER_SKILLPOINT_INCREASE_SPECIALIZATION_2HAND_DMG_PERCENT = 50;
|
||||
public static final int PER_SKILLPOINT_INCREASE_SPECIALIZATION_2HAND_AC_PERCENT = 20;
|
||||
|
||||
@@ -111,7 +111,7 @@ public final class Player extends Actor {
|
||||
baseTraits.criticalSkill = 0;
|
||||
baseTraits.criticalMultiplier = 1;
|
||||
baseTraits.damagePotential.set(1, 1);
|
||||
baseTraits.blockChance = 0;
|
||||
baseTraits.blockChance = 9;
|
||||
baseTraits.damageResistance = 0;
|
||||
baseTraits.useItemCost = 5;
|
||||
baseTraits.reequipCost = 5;
|
||||
|
||||
@@ -17,7 +17,7 @@ import com.gpl.rpg.AndorsTrail.util.Range;
|
||||
public final class MonsterSpawnArea {
|
||||
public final CoordRect area;
|
||||
public final Range quantity;
|
||||
private final Range spawnChance;
|
||||
private final Range respawnspeed;
|
||||
public final String areaID;
|
||||
public final String[] monsterTypeIDs;
|
||||
public final List<Monster> monsters = new CopyOnWriteArrayList<Monster>();
|
||||
@@ -30,7 +30,7 @@ public final class MonsterSpawnArea {
|
||||
public MonsterSpawnArea(
|
||||
CoordRect area
|
||||
, Range quantity
|
||||
, Range spawnChance
|
||||
, Range respawnspeed
|
||||
, String areaID
|
||||
, String[] monsterTypeIDs
|
||||
, boolean isUnique
|
||||
@@ -40,7 +40,7 @@ public final class MonsterSpawnArea {
|
||||
) {
|
||||
this.area = area;
|
||||
this.quantity = quantity;
|
||||
this.spawnChance = spawnChance;
|
||||
this.respawnspeed = respawnspeed;
|
||||
this.areaID = areaID;
|
||||
this.monsterTypeIDs = monsterTypeIDs;
|
||||
this.isUnique = isUnique;
|
||||
@@ -101,7 +101,7 @@ public final class MonsterSpawnArea {
|
||||
}
|
||||
|
||||
public boolean rollShouldSpawn() {
|
||||
return Constants.rollResult(spawnChance);
|
||||
return Constants.rollResult(respawnspeed);
|
||||
}
|
||||
|
||||
public void removeAllMonsters() {
|
||||
|
||||
@@ -115,7 +115,7 @@ public final class TMXMapTranslator {
|
||||
boolean isActiveForNewGame = true;
|
||||
boolean ignoreAreas = false;
|
||||
int maxQuantity = 1;
|
||||
int spawnChance = 10;
|
||||
int respawnspeed = 10;
|
||||
String spawnGroup = object.name;
|
||||
for (TMXProperty p : object.properties) {
|
||||
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) {
|
||||
@@ -126,8 +126,8 @@ public final class TMXMapTranslator {
|
||||
}
|
||||
if (p.name.equalsIgnoreCase("quantity")) {
|
||||
maxQuantity = Integer.parseInt(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("spawnchance")) {
|
||||
spawnChance = Integer.parseInt(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("respawnspeed")) {
|
||||
respawnspeed = Integer.parseInt(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("active")) {
|
||||
isActiveForNewGame = Boolean.parseBoolean(p.value);
|
||||
} else if (p.name.equalsIgnoreCase("ignoreAreas")) {
|
||||
@@ -155,7 +155,7 @@ public final class TMXMapTranslator {
|
||||
MonsterSpawnArea area = new MonsterSpawnArea(
|
||||
position
|
||||
,new Range(maxQuantity, 0)
|
||||
,new Range(1000, spawnChance)
|
||||
,new Range(1000, respawnspeed)
|
||||
,object.name
|
||||
,monsterTypeIDs
|
||||
,isUnique
|
||||
@@ -405,6 +405,11 @@ public final class TMXMapTranslator {
|
||||
int tileID = tileCache.getTileID(tile.tilesetName, tile.localId);
|
||||
result.tiles[dx][dy] = tileID;
|
||||
usedTileIDs.add(tileID);
|
||||
if(AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA){
|
||||
if(tileID == 0){
|
||||
L.log("Tileid 0 in "+ tile.tilesetName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -21,6 +21,10 @@ public final class Requirement {
|
||||
,random
|
||||
,factionScoreEquals
|
||||
,wearRemove
|
||||
,date
|
||||
,dateEquals
|
||||
,time
|
||||
,timeEquals
|
||||
}
|
||||
|
||||
public final RequirementType requireType;
|
||||
@@ -83,6 +87,10 @@ public final class Requirement {
|
||||
case skillLevel:
|
||||
return requireID != null && value >= 0;
|
||||
case spentGold:
|
||||
case date:
|
||||
case dateEquals:
|
||||
case time:
|
||||
case timeEquals:
|
||||
return value >= 0;
|
||||
case random:
|
||||
return chance != null;
|
||||
|
||||
@@ -18,6 +18,7 @@ public final class ScriptEffect {
|
||||
, deactivateMapObjectGroup
|
||||
, removeQuestProgress
|
||||
, changeMapFilter
|
||||
, mapchange
|
||||
}
|
||||
|
||||
public final ScriptEffectType type;
|
||||
|
||||
@@ -137,7 +137,8 @@ public final class ResourceLoader {
|
||||
final ItemTypeParser itemTypeParser = new ItemTypeParser(loader, world.actorConditionsTypes, world.itemCategories, translationLoader);
|
||||
final TypedArray itemsToLoad = r.obtainTypedArray(itemsResourceId);
|
||||
for (int i = 0; i < itemsToLoad.length(); ++i) {
|
||||
world.itemTypes.initialize(itemTypeParser, readStringFromRaw(r, itemsToLoad, i));
|
||||
String s = readStringFromRaw(r, itemsToLoad, i);
|
||||
world.itemTypes.initialize(itemTypeParser, s);
|
||||
}
|
||||
itemsToLoad.recycle();
|
||||
if (AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES) timingCheckpoint("ItemTypeParser");
|
||||
@@ -250,14 +251,18 @@ public final class ResourceLoader {
|
||||
|
||||
private static void prepareTilesets(DynamicTileLoader loader, int mTileSize) {
|
||||
final Size sz1x1 = new Size(1, 1);
|
||||
final Size sz1x2 = new Size(1, 2);
|
||||
final Size sz2x1 = new Size(2, 1);
|
||||
final Size sz2x2 = new Size(2, 2);
|
||||
final Size sz2x3 = new Size(2, 3);
|
||||
final Size sz3x1 = new Size(3, 1);
|
||||
final Size sz4x1 = new Size(4, 1);
|
||||
final Size sz5x1 = new Size(5, 1);
|
||||
final Size sz6x1 = new Size(6, 1);
|
||||
final Size sz7x1 = new Size(7, 1);
|
||||
final Size sz7x4 = new Size(7, 4);
|
||||
final Size sz8x3 = new Size(8, 3);
|
||||
final Size sz16x8 = new Size(16, 8);
|
||||
final Size sz20x12 = new Size(20, 12);
|
||||
final Size mapTileSize = new Size(16, 8);
|
||||
final Size sz8x8 = new Size(8, 8);
|
||||
@@ -274,83 +279,193 @@ public final class ResourceLoader {
|
||||
loader.prepareTileset(R.drawable.ui_icon_immunity, "ui_icon_immunity", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_dynamic_placeholders, "map_dynamic_placeholders", new Size(10, 2), sz1x1, mTileSize);
|
||||
|
||||
loader.prepareTileset(R.drawable.actorconditions_1, "actorconditions_1", new Size(14, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.actorconditions_2, "actorconditions_2", sz3x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.actorconditions_japozero, "actorconditions_japozero", new Size(16, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.actorconditions_omi1, "actorconditions_omi1", sz2x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.actorconditions_omi2, "actorconditions_omi2", sz5x1, sz1x1, mTileSize);
|
||||
/*INSERT_ACTORCONDITIONS_TILESETS_HERE*/
|
||||
|
||||
loader.prepareTileset(R.drawable.items_armours, "items_armours", new Size(14, 3), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_weapons, "items_weapons", new Size(14, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_jewelry, "items_jewelry", new Size(14, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_consumables, "items_consumables", new Size(14, 5), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_books, "items_books", new Size(11, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc, "items_misc", new Size(14, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc_2, "items_misc_2", sz20x12, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc_3, "items_misc_3", sz20x12, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc_4, "items_misc_4", new Size(20, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc_5, "items_misc_5", new Size(9, 5), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_misc_6, "items_misc_6", new Size(9, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_reterski_1, "items_reterski_1", new Size(3, 10), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_tometik1, "items_tometik1", new Size(6, 10), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_tometik2, "items_tometik2", new Size(10, 10), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_tometik3, "items_tometik3", new Size(8, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_necklaces_1, "items_necklaces_1", new Size(10, 3), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_weapons_2, "items_weapons_2", new Size(7, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_weapons_3, "items_weapons_3", new Size(13, 5), sz1x1, mTileSize);
|
||||
|
||||
loader.prepareTileset(R.drawable.items_armours_2, "items_armours_2", sz7x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_armours_3, "items_armours_3", new Size(10, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_consumables_omi1, "items_consumables_omi1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_feygard1, "items_feygard1", new Size(6, 2), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_g03_package_omi1, "items_g03_package_omi1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_japozero, "items_japozero", new Size(16, 37), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_newb, "items_newb", new Size(32, 27), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_omi2, "items_omi2", new Size(6, 5), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_omgeeky, "items_omgeeky", new Size(10, 3), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_phoenix01, "items_phoenix01", sz16x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_rijackson_1, "items_rijackson_1", new Size(5, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.items_rings_1, "items_rings_1", new Size(10, 3), sz1x1, mTileSize);
|
||||
/*INSERT_ITEMS_TILESETS_HERE*/
|
||||
|
||||
loader.prepareTileset(R.drawable.monsters_armor1, "monsters_armor1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_cyclops, "monsters_cyclops", sz1x1, sz2x3, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_demon1, "monsters_demon1", sz1x1, sz2x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_demon2, "monsters_demon2", sz1x1, sz2x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_dogs, "monsters_dogs", sz7x4, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_eye1, "monsters_eye1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_eye2, "monsters_eye2", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_eye3, "monsters_eye3", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_eye4, "monsters_eye4", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_ghost1, "monsters_ghost1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_hydra1, "monsters_hydra1", sz1x1, sz2x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_insects, "monsters_insects", sz6x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_karvis1, "monsters_karvis1", sz2x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_karvis2, "monsters_karvis2", new Size(9, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_ld1, "monsters_ld1", new Size(20, 12), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_ld2, "monsters_ld2", new Size(20, 12), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_liches, "monsters_liches", new Size(4, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_mage, "monsters_mage", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_mage2, "monsters_mage2", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_man1, "monsters_man1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_men, "monsters_men", new Size(9, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_men2, "monsters_men2", new Size(10, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_misc, "monsters_misc", new Size(13, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_newb_1, "monsters_newb_1", new Size(40, 34), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_newb_2, "monsters_newb_2", new Size(8, 2), sz1x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_newb_3, "monsters_newb_3", new Size(10, 2), sz2x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_newb_4, "monsters_newb_4", new Size(4, 1), sz2x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rats, "monsters_rats", new Size(5, 1), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_redshrike1, "monsters_redshrike1", sz7x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rltiles1, "monsters_rltiles1", new Size(20, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rltiles2, "monsters_rltiles2", new Size(20, 9), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rltiles3, "monsters_rltiles3", new Size(10, 3), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rltiles4, "monsters_rltiles4", new Size(12, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_rogue1, "monsters_rogue1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_skeleton1, "monsters_skeleton1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_skeleton2, "monsters_skeleton2", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_snakes, "monsters_snakes", sz6x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik1, "monsters_tometik1", new Size(10, 9), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik2, "monsters_tometik2", new Size(8, 10), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik3, "monsters_tometik3", new Size(6, 13), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik4, "monsters_tometik4", new Size(6, 13), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik5, "monsters_tometik5", new Size(6, 16), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik6, "monsters_tometik6", new Size(7, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik7, "monsters_tometik7", new Size(8, 11), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik8, "monsters_tometik8", new Size(7, 9), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik9, "monsters_tometik9", new Size(8, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_tometik10, "monsters_tometik10", new Size(6, 13), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_wraiths, "monsters_wraiths", sz3x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_zombie1, "monsters_zombie1", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_zombie2, "monsters_zombie2", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_guynmart, "monsters_guynmart", new Size(8, 2), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_maksiu1, "monsters_maksiu1", new Size(4, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_omi1, "monsters_omi1", sz2x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_omi1_b, "monsters_omi1_b", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_unknown, "monsters_unknown", sz1x1, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_arulirs, "monsters_arulirs", new Size(8, 2), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_fatboy73, "monsters_fatboy73", new Size(20, 12), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_giantbasilisk, "monsters_giantbasilisk", sz1x1, sz2x2, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_gisons, "monsters_gisons", new Size(8, 2), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_bosses_2x2, "monsters_bosses_2x2", sz1x1, sz2x2, mTileSize);
|
||||
|
||||
loader.prepareTileset(R.drawable.map_0, "map_0", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_1, "map_1", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_10, "map_10", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_11, "map_11", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_12, "map_12", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_13, "map_13", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_14, "map_14", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_15, "map_15", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_16, "map_16", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_17, "map_17", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_18, "map_18", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_19, "map_19", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_2, "map_2", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_20, "map_20", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_21, "map_21", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_22, "map_22", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_23, "map_23", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_24, "map_24", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_25, "map_25", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_26, "map_26", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_27, "map_27", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_28, "map_28", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_29, "map_29", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_3, "map_3", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_30, "map_30", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_31, "map_31", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_32, "map_32", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_33, "map_33", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_34, "map_34", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_35, "map_35", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_36, "map_36", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_37, "map_37", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_38, "map_38", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_39, "map_39", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_4, "map_4", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_40, "map_40", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_41, "map_41", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_42, "map_42", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_43, "map_43", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_44, "map_44", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_45, "map_45", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_46, "map_46", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_47, "map_47", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_48, "map_48", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_49, "map_49", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_5, "map_5", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_50, "map_50", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_51, "map_51", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_52, "map_52", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_53, "map_53", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_54, "map_54", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_6, "map_6", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_7, "map_7", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_8, "map_8", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_9, "map_9", sz8x8, sz1x1, mTileSize);
|
||||
|
||||
loader.prepareTileset(R.drawable.obj_0, "obj_0", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_1, "obj_1", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_10, "obj_10", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_11, "obj_11", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_12, "obj_12", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_13, "obj_13", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_14, "obj_14", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_2, "obj_2", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_3, "obj_3", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_4, "obj_4", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_5, "obj_5", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_6, "obj_6", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_7, "obj_7", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_8, "obj_8", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.obj_9, "obj_9", sz8x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_omi2, "monsters_omi2", sz8x3, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_phoenix01, "monsters_phoenix01", sz16x8, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.monsters_cats, "monsters_cats", new Size(10, 2), sz1x1, mTileSize);
|
||||
/*INSERT_NPCS_TILESETS_HERE*/
|
||||
|
||||
loader.prepareTileset(R.drawable.map_bed_1, "map_bed_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_boats_1, "map_boats_1", new Size(16, 9), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_border_1, "map_border_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_bridge_1, "map_bridge_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_bridge_2, "map_bridge_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_brightport, "map_brightport", new Size(16, 7), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_broken_1, "map_broken_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cavewall_1, "map_cavewall_1", new Size(18, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cavewall_2, "map_cavewall_2", new Size(18, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cavewall_3, "map_cavewall_3", new Size(18, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cavewall_4, "map_cavewall_4", new Size(18, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cavewall_5, "map_cavewall_5", new Size(6, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_chair_table_1, "map_chair_table_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_chair_table_2, "map_chair_table_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_crate_1, "map_crate_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_cupboard_1, "map_cupboard_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_curtain_1, "map_curtain_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_entrance_1, "map_entrance_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_entrance_2, "map_entrance_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_entrance_3, "map_entrance_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_fence_1, "map_fence_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_fence_2, "map_fence_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_fence_3, "map_fence_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_fence_4, "map_fence_4", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_1, "map_ground_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_2, "map_ground_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_3, "map_ground_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_4, "map_ground_4", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_5, "map_ground_5", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_6, "map_ground_6", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_7, "map_ground_7", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_8, "map_ground_8", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ground_9, "map_ground_9", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_guynmart, "map_guynmart", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_house_1, "map_house_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_house_2, "map_house_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_indoor_1, "map_indoor_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_indoor_2, "map_indoor_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_kitchen_1, "map_kitchen_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_outdoor_1, "map_outdoor_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_pillar_1, "map_pillar_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_pillar_2, "map_pillar_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_pillar_3, "map_pillar_3", new Size(16, 10), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_plant_1, "map_plant_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_plant_2, "map_plant_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_plant_3, "map_plant_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_plateau, "map_plateau", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_plateau_2, "map_plateau_2", new Size(8, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_ratdom, "map_ratdom", new Size(18, 6), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_rock_1, "map_rock_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_rock_2, "map_rock_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_rock_3, "map_rock_3", new Size(6, 5), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_roof_1, "map_roof_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_roof_2, "map_roof_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_roof_3, "map_roof_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_roof_4, "map_roof_4", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_roof_5, "map_roof_5", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_shop_1, "map_shop_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_sign_ladder_1, "map_sign_ladder_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_sign_ladder_omi2, "map_sign_ladder_omi2", new Size(8, 4), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_table_1, "map_table_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_table_2, "map_table_2", new Size(14, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_temple_1, "map_temple_1", new Size(23, 16), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_trail_1, "map_trail_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_1, "map_transition_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_2, "map_transition_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_3, "map_transition_3", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_4, "map_transition_4", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_5, "map_transition_5", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_transition_6, "map_transition_6", new Size(18, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_tree_1, "map_tree_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_tree_2, "map_tree_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_tree_3, "map_tree_3", new Size(32, 17), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_tree_4, "map_tree_4", new Size(16, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_wall_1, "map_wall_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_wall_2, "map_wall_2", new Size(15, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_wall_3, "map_wall_3", new Size(15, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_wall_4, "map_wall_4", new Size(15, 8), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_window_1, "map_window_1", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_window_2, "map_window_2", mapTileSize, sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.map_items_japozero, "map_items_japozero", new Size(16, 37), sz1x1, mTileSize);
|
||||
/*INSERT_MAP_TILESETS_HERE*/
|
||||
|
||||
loader.prepareTileset(R.drawable.effect_blood4, "effect_blood4", new Size(7, 2), sz1x1, mTileSize);
|
||||
loader.prepareTileset(R.drawable.effect_heal2, "effect_heal2", new Size(8, 2), sz1x1, mTileSize);
|
||||
|
||||
@@ -39,6 +39,12 @@ public final class DropListParser extends JsonCollectionParserFor<DropList> {
|
||||
if (items == null) {
|
||||
L.log("OPTIMIZE: Droplist \"" + droplistID + "\" has no dropped items.");
|
||||
}
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
DropItem item = items[i];
|
||||
if (item.itemType == null) {
|
||||
L.log("Item at index " + i + " in droplist " + droplistID + " was null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Pair<String, DropList>(droplistID, new DropList(items));
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.XmlResourceParser;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MapCollection;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.WorldMapSegment.NamedWorldMapArea;
|
||||
@@ -24,11 +25,13 @@ public final class WorldMapParser {
|
||||
}
|
||||
|
||||
private static void read(XmlResourceParser xrp, final MapCollection maps, final TranslationLoader translationLoader) {
|
||||
String s = "";
|
||||
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) L.log("WorldMapParser:");
|
||||
try {
|
||||
int eventType;
|
||||
while ((eventType = xrp.next()) != XmlResourceParser.END_DOCUMENT) {
|
||||
if (eventType == XmlResourceParser.START_TAG) {
|
||||
String s = xrp.getName();
|
||||
s = xrp.getName();
|
||||
if (s.equals("segment")) {
|
||||
WorldMapSegment segment = parseSegment(xrp, maps, translationLoader);
|
||||
maps.worldMapSegments.put(segment.name, segment);
|
||||
@@ -37,7 +40,7 @@ public final class WorldMapParser {
|
||||
}
|
||||
xrp.close();
|
||||
} catch (Exception e) {
|
||||
L.log("Error reading worldmap: " + e.toString());
|
||||
L.log("Error reading worldmap: " + s + " " + e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,11 +49,13 @@ public final class WorldMapParser {
|
||||
final WorldMapSegment segment = new WorldMapSegment(segmentName);
|
||||
|
||||
final ArrayList<Pair<String, String>> mapsInNamedAreas = new ArrayList<Pair<String,String>>();
|
||||
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) L.log("segment: " + segmentName);
|
||||
XmlResourceParserUtils.readCurrentTagUntilEnd(xrp, new XmlResourceParserUtils.TagHandler() {
|
||||
@Override
|
||||
public void handleTag(XmlResourceParser xrp, String tagName) throws XmlPullParserException, IOException {
|
||||
if (tagName.equals("map")) {
|
||||
String mapName = xrp.getAttributeValue(null, "id");
|
||||
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) L.log(" map: " + mapName);
|
||||
if (maps.findPredefinedMap(mapName) == null) return;
|
||||
Coord mapPosition = new Coord(
|
||||
xrp.getAttributeIntValue(null, "x", -1),
|
||||
@@ -65,6 +70,7 @@ public final class WorldMapParser {
|
||||
String id = xrp.getAttributeValue(null, "id");
|
||||
String name = translationLoader.translateWorldmapLocation(xrp.getAttributeValue(null, "name"));
|
||||
String type = xrp.getAttributeValue(null, "type");
|
||||
if (AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA) L.log(" namedarea: id=" + id + " name=" + name + " type=" + type);
|
||||
segment.namedAreas.put(id, new NamedWorldMapArea(id, name, type));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ import android.graphics.Bitmap;
|
||||
import android.util.SparseArray;
|
||||
import android.util.SparseIntArray;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
import com.gpl.rpg.AndorsTrail.util.LruCache;
|
||||
|
||||
public final class TileCache {
|
||||
@@ -39,7 +41,12 @@ public final class TileCache {
|
||||
tileIDsPerLocalID.put(localID, tileID);
|
||||
}
|
||||
public int getTileID(String tileSetName, int localID) {
|
||||
return tileIDsPerTilesetAndLocalID.get(tileSetName).get(localID);
|
||||
|
||||
SparseIntArray sparseIntArray = tileIDsPerTilesetAndLocalID.get(tileSetName);
|
||||
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES && sparseIntArray == null){
|
||||
L.log("Could not get tile " + tileSetName + " " + localID);
|
||||
}
|
||||
return sparseIntArray.get(localID);
|
||||
}
|
||||
|
||||
private static final class ResourceFileTile {
|
||||
@@ -67,13 +74,19 @@ public final class TileCache {
|
||||
HashMap<ResourceFileTileset, SparseArray<ResourceFileTile>> tilesToLoadPerSourceFile = new HashMap<ResourceFileTileset, SparseArray<ResourceFileTile>>();
|
||||
for(int tileID : iconIDs) {
|
||||
ResourceFileTile tile = resourceTiles[tileID];
|
||||
SparseArray<ResourceFileTile> tiles = tilesToLoadPerSourceFile.get(tile.tileset);
|
||||
if (tiles == null) {
|
||||
tiles = new SparseArray<TileCache.ResourceFileTile>();
|
||||
tilesToLoadPerSourceFile.put(tile.tileset, tiles);
|
||||
if(tile == null && AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
|
||||
L.log("could not find resourceTiles for id: " + tileID);
|
||||
L.log("iconIDs: " + iconIDs);
|
||||
}
|
||||
if(tile != null || AndorsTrailApplication.DEVELOPMENT_VALIDATEDATA){
|
||||
SparseArray<ResourceFileTile> tiles = tilesToLoadPerSourceFile.get(tile.tileset);
|
||||
if (tiles == null) {
|
||||
tiles = new SparseArray<TileCache.ResourceFileTile>();
|
||||
tilesToLoadPerSourceFile.put(tile.tileset, tiles);
|
||||
}
|
||||
tiles.put(tileID, tile);
|
||||
maxTileID = Math.max(maxTileID, tileID);
|
||||
}
|
||||
tiles.put(tileID, tile);
|
||||
maxTileID = Math.max(maxTileID, tileID);
|
||||
}
|
||||
|
||||
boolean hasLoadedTiles = false;
|
||||
|
||||
@@ -18,6 +18,7 @@ import android.os.AsyncTask;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
|
||||
import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
@@ -33,6 +34,7 @@ import com.gpl.rpg.AndorsTrail.model.map.MapObject;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.MonsterSpawnArea;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.PredefinedMap;
|
||||
import com.gpl.rpg.AndorsTrail.model.map.TMXMapTranslator;
|
||||
import com.gpl.rpg.AndorsTrail.util.L;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
|
||||
public final class TileManager {
|
||||
@@ -374,6 +376,10 @@ public final class TileManager {
|
||||
cachedTileIDs = getTileIDsFor(adjacentMap, adjacentMapTiles, world);
|
||||
tileIDsPerMap.put(mapName, cachedTileIDs);
|
||||
}
|
||||
|
||||
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
|
||||
L.log("TileIDsFor " + mapName + "\n" + cachedTileIDs);
|
||||
}
|
||||
dest.addAll(cachedTileIDs);
|
||||
}
|
||||
public void cacheAdjacentMaps(final Resources res, final WorldContext world, final PredefinedMap nextMap) {
|
||||
@@ -391,6 +397,9 @@ public final class TileManager {
|
||||
|
||||
HashSet<Integer> tileIDs = new HashSet<Integer>();
|
||||
for (String mapName : adjacentMapNames) {
|
||||
if(AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES){
|
||||
L.log("addTileIDsFor " + mapName);
|
||||
}
|
||||
addTileIDsFor(tileIDs, mapName, res, world);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.context.ControllerContext;
|
||||
import com.gpl.rpg.AndorsTrail.context.WorldContext;
|
||||
import com.gpl.rpg.AndorsTrail.controller.Constants;
|
||||
import com.gpl.rpg.AndorsTrail.controller.WorldMapController;
|
||||
import com.gpl.rpg.AndorsTrail.model.ModelContainer;
|
||||
import com.gpl.rpg.AndorsTrail.resource.tiles.TileManager;
|
||||
import com.gpl.rpg.AndorsTrail.util.AndroidStorage;
|
||||
@@ -86,7 +87,7 @@ public final class Savegames {
|
||||
|
||||
private static void writeBackup(Context androidContext, byte[] savegame, String playerId) throws IOException {
|
||||
File cheatDetectionFolder = AndroidStorage.getStorageDirectory(androidContext, Constants.CHEAT_DETECTION_FOLDER);
|
||||
if (!cheatDetectionFolder.exists()) cheatDetectionFolder.mkdir();
|
||||
ensureDirExists(cheatDetectionFolder);
|
||||
File backupFile = new File(cheatDetectionFolder, playerId + "X");
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(backupFile);
|
||||
fileOutputStream.write(savegame);
|
||||
@@ -104,7 +105,7 @@ public final class Savegames {
|
||||
}
|
||||
|
||||
FileInputStream fos = getInputFile(androidContext, slot);
|
||||
LoadSavegameResult result = loadWorld(androidContext.getResources(), world, controllers, fos, fh);
|
||||
LoadSavegameResult result = loadWorld(androidContext.getResources(), world, controllers, androidContext, fos, fh);
|
||||
fos.close();
|
||||
if (result == LoadSavegameResult.success && slot != SLOT_QUICKSAVE && !world.model.statistics.hasUnlimitedSaves()) {
|
||||
// save to the quicksave slot before deleting the file
|
||||
@@ -127,34 +128,33 @@ public final class Savegames {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean triedToCheat(Context androidContext, FileHeader fh) throws IOException {
|
||||
long savedVersionToCheck = 0;
|
||||
File cheatDetectionFolder = AndroidStorage.getStorageDirectory(androidContext, Constants.CHEAT_DETECTION_FOLDER);
|
||||
if (!cheatDetectionFolder.exists()) cheatDetectionFolder.mkdir();
|
||||
File cheatDetectionFile = new File(cheatDetectionFolder, fh.playerId);
|
||||
if (cheatDetectionFile.exists()) {
|
||||
FileInputStream fileInputStream = new FileInputStream(cheatDetectionFile);
|
||||
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
|
||||
final CheatDetection cheatDetection = new CheatDetection(dataInputStream);
|
||||
savedVersionToCheck = cheatDetection.savedVersion;
|
||||
dataInputStream.close();
|
||||
fileInputStream.close();
|
||||
}
|
||||
private static boolean triedToCheat(Context androidContext, FileHeader fh) throws IOException {
|
||||
long savedVersionToCheck = 0;
|
||||
File cheatDetectionFolder = AndroidStorage.getStorageDirectory(androidContext, Constants.CHEAT_DETECTION_FOLDER);
|
||||
ensureDirExists(cheatDetectionFolder);
|
||||
File cheatDetectionFile = new File(cheatDetectionFolder, fh.playerId);
|
||||
if (cheatDetectionFile.exists()) {
|
||||
FileInputStream fileInputStream = new FileInputStream(cheatDetectionFile);
|
||||
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
|
||||
final CheatDetection cheatDetection = new CheatDetection(dataInputStream);
|
||||
savedVersionToCheck = cheatDetection.savedVersion;
|
||||
dataInputStream.close();
|
||||
fileInputStream.close();
|
||||
}
|
||||
|
||||
if (savedVersionToCheck == DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (androidContext.getFileStreamPath(fh.playerId).exists()) {
|
||||
FileInputStream fileInputStream = androidContext.openFileInput(fh.playerId);
|
||||
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
|
||||
final CheatDetection cheatDetection = new CheatDetection(dataInputStream);
|
||||
if (cheatDetection.savedVersion == DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED) {
|
||||
savedVersionToCheck = DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED;
|
||||
}
|
||||
else if (cheatDetection.savedVersion > savedVersionToCheck) {
|
||||
savedVersionToCheck = cheatDetection.savedVersion;
|
||||
}
|
||||
if (androidContext.getFileStreamPath(fh.playerId).exists()) {
|
||||
FileInputStream fileInputStream = androidContext.openFileInput(fh.playerId);
|
||||
DataInputStream dataInputStream = new DataInputStream(fileInputStream);
|
||||
final CheatDetection cheatDetection = new CheatDetection(dataInputStream);
|
||||
if (cheatDetection.savedVersion == DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED) {
|
||||
savedVersionToCheck = DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED;
|
||||
} else if (cheatDetection.savedVersion > savedVersionToCheck) {
|
||||
savedVersionToCheck = cheatDetection.savedVersion;
|
||||
}
|
||||
|
||||
if (AndorsTrailApplication.DEVELOPMENT_DEBUGMESSAGES) {
|
||||
L.log("Internal cheatcheck file savedVersion: " + cheatDetection.savedVersion);
|
||||
@@ -167,31 +167,48 @@ public final class Savegames {
|
||||
return (savedVersionToCheck == DENY_LOADING_BECAUSE_GAME_IS_CURRENTLY_PLAYED || fh.savedVersion < savedVersionToCheck);
|
||||
}
|
||||
|
||||
private static FileOutputStream getOutputFile(Context androidContext, int slot) throws IOException {
|
||||
if (slot == SLOT_QUICKSAVE) {
|
||||
return androidContext.openFileOutput(Constants.FILENAME_SAVEGAME_QUICKSAVE, Context.MODE_PRIVATE);
|
||||
} else {
|
||||
ensureSavegameDirectoryExists(androidContext);
|
||||
return new FileOutputStream(getSlotFile(slot, androidContext));
|
||||
}
|
||||
}
|
||||
private static void ensureSavegameDirectoryExists(Context context) {
|
||||
File dir = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
if (!dir.exists()) dir.mkdir();
|
||||
}
|
||||
private static FileInputStream getInputFile(Context androidContext, int slot) throws IOException {
|
||||
if (slot == SLOT_QUICKSAVE) {
|
||||
return androidContext.openFileInput(Constants.FILENAME_SAVEGAME_QUICKSAVE);
|
||||
} else {
|
||||
return new FileInputStream(getSlotFile(slot, androidContext));
|
||||
}
|
||||
}
|
||||
private static FileOutputStream getOutputFile(Context androidContext, int slot) throws IOException {
|
||||
if (slot == SLOT_QUICKSAVE) {
|
||||
return androidContext.openFileOutput(Constants.FILENAME_SAVEGAME_QUICKSAVE, Context.MODE_PRIVATE);
|
||||
} else {
|
||||
ensureSavegameDirectoryExists(androidContext);
|
||||
return new FileOutputStream(getSlotFile(slot, androidContext));
|
||||
}
|
||||
}
|
||||
|
||||
public static File getSlotFile(int slot, Context context) {
|
||||
File root = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
return new File(root, Constants.FILENAME_SAVEGAME_FILENAME_PREFIX + slot);
|
||||
}
|
||||
private static void ensureSavegameDirectoryExists(Context context) {
|
||||
File dir = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
ensureDirExists(dir);
|
||||
}
|
||||
|
||||
public static boolean ensureDirExists(File dir) {
|
||||
if (!dir.exists()) {
|
||||
boolean worked = dir.mkdir();
|
||||
return worked;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static FileInputStream getInputFile(Context androidContext, int slot) throws IOException {
|
||||
if (slot == SLOT_QUICKSAVE) {
|
||||
return androidContext.openFileInput(Constants.FILENAME_SAVEGAME_QUICKSAVE);
|
||||
} else {
|
||||
return new FileInputStream(getSlotFile(slot, androidContext));
|
||||
}
|
||||
}
|
||||
|
||||
public static File getSlotFile(int slot, Context context) {
|
||||
File root = AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
return getSlotFile(slot, root);
|
||||
}
|
||||
|
||||
public static File getSlotFile(int slot, File directory) {
|
||||
return new File(directory, getSlotFileName(slot));
|
||||
}
|
||||
|
||||
public static String getSlotFileName(int slot) {
|
||||
return Constants.FILENAME_SAVEGAME_FILENAME_PREFIX + slot;
|
||||
}
|
||||
|
||||
|
||||
public static void saveWorld(WorldContext world, OutputStream outStream, String displayInfo) throws IOException {
|
||||
@@ -207,13 +224,15 @@ public final class Savegames {
|
||||
dest.close();
|
||||
}
|
||||
|
||||
public static LoadSavegameResult loadWorld(Resources res, WorldContext world, ControllerContext controllers, InputStream inState, FileHeader fh) throws IOException {
|
||||
DataInputStream src = new DataInputStream(inState);
|
||||
final FileHeader header = new FileHeader(src, fh.skipIcon);
|
||||
if (header.fileversion > AndorsTrailApplication.CURRENT_VERSION) return LoadSavegameResult.savegameIsFromAFutureVersion;
|
||||
public static LoadSavegameResult loadWorld(Resources res, WorldContext world, ControllerContext controllers, Context androidContext, InputStream inState, FileHeader fh) throws IOException {
|
||||
DataInputStream src = new DataInputStream(inState);
|
||||
final FileHeader header = new FileHeader(src, fh.skipIcon);
|
||||
if (header.fileversion > AndorsTrailApplication.CURRENT_VERSION)
|
||||
return LoadSavegameResult.savegameIsFromAFutureVersion;
|
||||
|
||||
world.maps.readFromParcel(src, world, controllers, header.fileversion);
|
||||
world.model = new ModelContainer(src, world, controllers, header.fileversion);
|
||||
WorldMapController.populateWorldMap(androidContext, world, controllers.getResources());
|
||||
src.close();
|
||||
|
||||
if (header.fileversion < 45) {
|
||||
@@ -249,15 +268,15 @@ public final class Savegames {
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeCheatCheck(Context androidContext, long savedVersion, String playerId) throws IOException {
|
||||
File cheatDetectionFolder = AndroidStorage.getStorageDirectory(androidContext, Constants.CHEAT_DETECTION_FOLDER);
|
||||
if (!cheatDetectionFolder.exists()) cheatDetectionFolder.mkdir();
|
||||
File cheatDetectionFile = new File(cheatDetectionFolder, playerId);
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(cheatDetectionFile);
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(fileOutputStream);
|
||||
CheatDetection.writeToParcel(dataOutputStream, savedVersion);
|
||||
dataOutputStream.close();
|
||||
fileOutputStream.close();
|
||||
private static void writeCheatCheck(Context androidContext, long savedVersion, String playerId) throws IOException {
|
||||
File cheatDetectionFolder = AndroidStorage.getStorageDirectory(androidContext, Constants.CHEAT_DETECTION_FOLDER);
|
||||
ensureDirExists(cheatDetectionFolder);
|
||||
File cheatDetectionFile = new File(cheatDetectionFolder, playerId);
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(cheatDetectionFile);
|
||||
DataOutputStream dataOutputStream = new DataOutputStream(fileOutputStream);
|
||||
CheatDetection.writeToParcel(dataOutputStream, savedVersion);
|
||||
dataOutputStream.close();
|
||||
fileOutputStream.close();
|
||||
|
||||
fileOutputStream = androidContext.openFileOutput(playerId, Context.MODE_PRIVATE);
|
||||
dataOutputStream = new DataOutputStream(fileOutputStream);
|
||||
@@ -268,26 +287,26 @@ public final class Savegames {
|
||||
|
||||
private static final Pattern savegameFilenamePattern = Pattern.compile(Constants.FILENAME_SAVEGAME_FILENAME_PREFIX + "(\\d+)");
|
||||
|
||||
public static List<Integer> getUsedSavegameSlots(Context context) {
|
||||
try {
|
||||
final List<Integer> result = new ArrayList<Integer>();
|
||||
AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY).listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File f, String filename) {
|
||||
Matcher m = savegameFilenamePattern.matcher(filename);
|
||||
if (m != null && m.matches()) {
|
||||
result.add(Integer.parseInt(m.group(1)));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static List<Integer> getUsedSavegameSlots(Context context) {
|
||||
try {
|
||||
final List<Integer> result = new ArrayList<Integer>();
|
||||
AndroidStorage.getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY).listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File f, String filename) {
|
||||
Matcher m = savegameFilenamePattern.matcher(filename);
|
||||
if (m != null && m.matches()) {
|
||||
result.add(Integer.parseInt(m.group(1)));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
Collections.sort(result);
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
return new ArrayList<Integer>();
|
||||
}
|
||||
}
|
||||
|
||||
private static final class CheatDetection {
|
||||
public final int fileversion;
|
||||
@@ -307,17 +326,16 @@ public final class Savegames {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static final class FileHeader {
|
||||
public final int fileversion;
|
||||
public final String playerName;
|
||||
public final String displayInfo;
|
||||
public final int iconID;
|
||||
public boolean skipIcon = false;
|
||||
public final boolean isDead;
|
||||
public final boolean hasUnlimitedSaves;
|
||||
public final String playerId;
|
||||
public final long savedVersion;
|
||||
public static final class FileHeader {
|
||||
public final int fileversion;
|
||||
public final String playerName;
|
||||
public final String displayInfo;
|
||||
public final int iconID;
|
||||
public boolean skipIcon = false;
|
||||
public final boolean isDead;
|
||||
public final boolean hasUnlimitedSaves;
|
||||
public final String playerId;
|
||||
public final long savedVersion;
|
||||
|
||||
public String describe() {
|
||||
return (fileversion == AndorsTrailApplication.DEVELOPMENT_INCOMPATIBLE_SAVEGAME_VERSION ? "(D) " : "") + playerName + ", " + displayInfo;
|
||||
@@ -326,17 +344,18 @@ public final class Savegames {
|
||||
|
||||
// ====== PARCELABLE ===================================================================
|
||||
|
||||
public FileHeader(DataInputStream src, boolean skipIcon) throws IOException {
|
||||
int fileversion = src.readInt();
|
||||
if (fileversion == 11) fileversion = 5; // Fileversion 5 had no version identifier, but the first byte was 11.
|
||||
this.fileversion = fileversion;
|
||||
if (fileversion >= 14) { // Before fileversion 14 (0.6.7), we had no file header.
|
||||
this.playerName = src.readUTF();
|
||||
this.displayInfo = src.readUTF();
|
||||
} else {
|
||||
this.playerName = null;
|
||||
this.displayInfo = null;
|
||||
}
|
||||
public FileHeader(DataInputStream src, boolean skipIcon) throws IOException {
|
||||
int fileversion = src.readInt();
|
||||
if (fileversion == 11)
|
||||
fileversion = 5; // Fileversion 5 had no version identifier, but the first byte was 11.
|
||||
this.fileversion = fileversion;
|
||||
if (fileversion >= 14) { // Before fileversion 14 (0.6.7), we had no file header.
|
||||
this.playerName = src.readUTF();
|
||||
this.displayInfo = src.readUTF();
|
||||
} else {
|
||||
this.playerName = null;
|
||||
this.displayInfo = null;
|
||||
}
|
||||
|
||||
if (fileversion >= 43) {
|
||||
int id = src.readInt();
|
||||
|
||||
@@ -1,42 +1,58 @@
|
||||
package com.gpl.rpg.AndorsTrail.util;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.controller.Constants;
|
||||
import com.gpl.rpg.AndorsTrail.util.BackgroundWorker.BackgroundWorkerCallback;
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
public final class AndroidStorage {
|
||||
public static File getStorageDirectory(Context context, String name) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
return context.getExternalFilesDir(name);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
File root = Environment.getExternalStorageDirectory();
|
||||
return new File(root, name);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean shouldMigrateToInternalStorage(Context context) {
|
||||
boolean ret = false;
|
||||
File externalSaveGameDirectory = new File(Environment.getExternalStorageDirectory(), Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
File externalSaveGameDirectory = new File(Environment.getExternalStorageDirectory(),
|
||||
Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
File internalSaveGameDirectory = getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY);
|
||||
|
||||
if (externalSaveGameDirectory.exists()
|
||||
&& externalSaveGameDirectory.isDirectory()
|
||||
&& externalSaveGameDirectory.listFiles().length > 0
|
||||
&& (
|
||||
!internalSaveGameDirectory.exists()
|
||||
|| internalSaveGameDirectory.isDirectory() && internalSaveGameDirectory.listFiles().length < 2)
|
||||
) {
|
||||
&& externalSaveGameDirectory.isDirectory()
|
||||
&& externalSaveGameDirectory.listFiles().length > 0
|
||||
&& (!internalSaveGameDirectory.exists()
|
||||
|| internalSaveGameDirectory.isDirectory()
|
||||
&& internalSaveGameDirectory.listFiles().length < 2)) {
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
@@ -45,11 +61,11 @@ public final class AndroidStorage {
|
||||
public static boolean migrateToInternalStorage(Context context) {
|
||||
try {
|
||||
copy(new File(Environment.getExternalStorageDirectory(), Constants.CHEAT_DETECTION_FOLDER),
|
||||
getStorageDirectory(context, Constants.CHEAT_DETECTION_FOLDER));
|
||||
getStorageDirectory(context, Constants.CHEAT_DETECTION_FOLDER));
|
||||
copy(new File(Environment.getExternalStorageDirectory(), Constants.FILENAME_SAVEGAME_DIRECTORY),
|
||||
getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY));
|
||||
getStorageDirectory(context, Constants.FILENAME_SAVEGAME_DIRECTORY));
|
||||
} catch (IOException e) {
|
||||
L.log("Error migrating data: " + e.toString());
|
||||
L.log("Error migrating data: " + e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -76,35 +92,381 @@ public final class AndroidStorage {
|
||||
}
|
||||
}
|
||||
|
||||
private static void copyFile(File source, File target) throws IOException {
|
||||
InputStream in = null;
|
||||
OutputStream out = null;
|
||||
try {
|
||||
in = new FileInputStream(source);
|
||||
out = new FileOutputStream(target);
|
||||
byte[] buf = new byte[1024];
|
||||
int length;
|
||||
while ((length = in.read(buf)) > 0) {
|
||||
out.write(buf, 0, length);
|
||||
public static void copyFile(File source, File target) throws IOException {
|
||||
try (InputStream in = new FileInputStream(source); OutputStream out = new FileOutputStream(target)) {
|
||||
copyStream(in, out);
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyStream(InputStream in, OutputStream out) throws IOException {
|
||||
byte[] buf = new byte[1024];
|
||||
int length;
|
||||
while ((length = in.read(buf)) > 0) {
|
||||
out.write(buf, 0, length);
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
public static void createZipDocumentFileFromFilesAsync(File[] files,
|
||||
Context context,
|
||||
DocumentFile targetDirectory,
|
||||
String fileName,
|
||||
String loadingMessage,
|
||||
Consumer<Boolean> callback) {
|
||||
|
||||
BackgroundWorker<Boolean> worker = new BackgroundWorker<>();
|
||||
CustomDialogFactory.CustomDialog progressDialog = getLoadingDialog(context, loadingMessage);
|
||||
progressDialog.setOnCancelListener(dialog -> worker.cancel());
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
Handler handler = Handler.createAsync(Looper.getMainLooper());
|
||||
|
||||
|
||||
worker.setTask(workerCallback -> {
|
||||
try {
|
||||
workerCallback.onInitialize();
|
||||
|
||||
//region create zip file
|
||||
File zip = File.createTempFile("temp_worldmap", ".zip");
|
||||
try (OutputStream out = new FileOutputStream(zip)) {
|
||||
ZipOutputStream zipOut = new ZipOutputStream(out);
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
File file = files[i];
|
||||
try (FileInputStream fis = new FileInputStream(file)) {
|
||||
workerCallback.onProgress((float) i / files.length);
|
||||
zipOut.putNextEntry(new ZipEntry(file.getName()));
|
||||
copyStream(fis, zipOut);
|
||||
zipOut.closeEntry();
|
||||
}
|
||||
}
|
||||
zipOut.close();
|
||||
}
|
||||
//endregion
|
||||
|
||||
DocumentFile worldmapZip = DocumentFile.fromFile(zip);
|
||||
DocumentFile worldmapTarget = targetDirectory.createFile("application/zip", fileName);
|
||||
if (worldmapTarget != null && worldmapTarget.exists()) {
|
||||
AndroidStorage.copyDocumentFile(worldmapZip, resolver, worldmapTarget);
|
||||
workerCallback.onComplete(true);
|
||||
} else {
|
||||
throw new FileNotFoundException("Could not create File");
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
if (worker.isCancelled()) {
|
||||
workerCallback.onFailure(new CancellationException("Cancelled"));
|
||||
} else {
|
||||
workerCallback.onFailure(e);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
workerCallback.onFailure(e);
|
||||
}
|
||||
} finally {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
});
|
||||
|
||||
worker.setCallback(getDefaultBackgroundWorkerCallback(handler, progressDialog, callback));
|
||||
worker.run();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void unzipToDirectory(File zipFile,
|
||||
File targetDirectory,
|
||||
boolean overwriteNotSkip) throws IOException {
|
||||
|
||||
try (ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile))) {
|
||||
unzipStreamToDirectory(targetDirectory, overwriteNotSkip, zis);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
public static void unzipDocumentFileToDirectoryAsync(DocumentFile zipFile,
|
||||
Context context,
|
||||
File targetDirectory,
|
||||
boolean overwriteNotSkip,
|
||||
String loadingMessage,
|
||||
Consumer<Boolean> callback) {
|
||||
|
||||
BackgroundWorker<Boolean> worker = new BackgroundWorker<>();
|
||||
CustomDialogFactory.CustomDialog progressDialog = getLoadingDialog(context, loadingMessage);
|
||||
progressDialog.setOnCancelListener(dialog -> worker.cancel());
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
Handler handler = Handler.createAsync(Looper.getMainLooper());
|
||||
|
||||
worker.setTask(workerCallback -> {
|
||||
try {
|
||||
workerCallback.onInitialize();
|
||||
workerCallback.onProgress(-1);//set dummy progress since we don't know the
|
||||
// progress of the unzip
|
||||
unzipDocumentFileToDirectory(zipFile, resolver, targetDirectory, overwriteNotSkip);
|
||||
workerCallback.onComplete(true);
|
||||
} catch (IOException e) {
|
||||
workerCallback.onFailure(e);
|
||||
}
|
||||
if (out != null) {
|
||||
out.close();
|
||||
});
|
||||
|
||||
worker.setCallback(getDefaultBackgroundWorkerCallback(handler, progressDialog, callback));
|
||||
worker.run();
|
||||
|
||||
}
|
||||
|
||||
public static void unzipDocumentFileToDirectory(DocumentFile zipFile,
|
||||
ContentResolver resolver,
|
||||
File targetDirectory,
|
||||
boolean overwriteNotSkip) throws IOException {
|
||||
try (ZipInputStream zis = new ZipInputStream(resolver.openInputStream(zipFile.getUri()))) {
|
||||
unzipStreamToDirectory(targetDirectory, overwriteNotSkip, zis);
|
||||
}
|
||||
}
|
||||
|
||||
private static void unzipStreamToDirectory(File targetDirectory,
|
||||
boolean overwriteNotSkip,
|
||||
ZipInputStream zis) throws IOException {
|
||||
ZipEntry entry;
|
||||
while ((entry = zis.getNextEntry()) != null) {
|
||||
File file = new File(targetDirectory, entry.getName());
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
file.mkdirs();
|
||||
} else {
|
||||
file.getParentFile().mkdirs();
|
||||
if (file.exists() && !overwriteNotSkip) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try (FileOutputStream fos = new FileOutputStream(file)) {
|
||||
copyStream(zis, fos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void copyDocumentFileToNewOrExistingFile(DocumentFile sourceFile,
|
||||
ContentResolver resolver,
|
||||
DocumentFile targetFolder) throws IOException {
|
||||
copyDocumentFileToNewOrExistingFile(sourceFile,
|
||||
resolver,
|
||||
targetFolder,
|
||||
Constants.NO_FILE_EXTENSION_MIME_TYPE);
|
||||
}
|
||||
|
||||
|
||||
public static void copyDocumentFileToNewOrExistingFile(DocumentFile sourceFile,
|
||||
ContentResolver resolver,
|
||||
DocumentFile targetFolder,
|
||||
String mimeType) throws IOException {
|
||||
String fileName = sourceFile.getName();
|
||||
DocumentFile file = targetFolder.findFile(fileName);
|
||||
if (file == null) {
|
||||
file = targetFolder.createFile(mimeType, fileName);
|
||||
}
|
||||
if (file == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
AndroidStorage.copyDocumentFile(sourceFile, resolver, file);
|
||||
}
|
||||
|
||||
public static void copyDocumentFile(DocumentFile sourceFile,
|
||||
ContentResolver resolver,
|
||||
DocumentFile targetFile) throws IOException {
|
||||
try (OutputStream outputStream = resolver.openOutputStream(targetFile.getUri());
|
||||
InputStream inputStream = resolver.openInputStream(sourceFile.getUri())) {
|
||||
copyStream(inputStream, outputStream);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getUrlForFile(Context context, File worldmap) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
String applicationId = context.getPackageName();
|
||||
// Uri uri = FileProvider.getUriForFile(context, "com.gpl.rpg.AndorsTrail.fileprovider", worldmap);
|
||||
Uri uri = FileProvider.getUriForFile(context, applicationId + ".fileprovider", worldmap);
|
||||
return uri.toString();
|
||||
} else {
|
||||
return "file://" + worldmap.getAbsolutePath();
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public static Intent getNewOpenDirectoryIntent() {
|
||||
return new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public static Intent getNewSelectMultipleSavegameFilesIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
||||
intent.setType(Constants.SAVEGAME_FILE_MIME_TYPE);
|
||||
return intent;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
|
||||
public static Intent getNewSelectZipIntent() {
|
||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType("application/zip");
|
||||
return intent;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
public static void copyDocumentFilesFromToAsync(DocumentFile[] sources,
|
||||
Context context,
|
||||
DocumentFile[] targets,
|
||||
String loadingMessage,
|
||||
Consumer<Boolean> callback) {
|
||||
if (sources.length != targets.length) {
|
||||
throw new IllegalArgumentException("Both arrays, target & source have to have the same size");
|
||||
}
|
||||
|
||||
BackgroundWorker<Boolean> worker = new BackgroundWorker<>();
|
||||
|
||||
CustomDialogFactory.CustomDialog progressDialog = getLoadingDialog(context, loadingMessage);
|
||||
progressDialog.setOnCancelListener(dialog -> worker.cancel());
|
||||
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
Handler handler = Handler.createAsync(Looper.getMainLooper());
|
||||
|
||||
worker.setTask(workerCallback -> {
|
||||
try {
|
||||
workerCallback.onInitialize();
|
||||
for (int i = 0; i < sources.length; i++) {
|
||||
if (worker.isCancelled()) {
|
||||
workerCallback.onFailure(new CancellationException("Cancelled"));
|
||||
return;
|
||||
}
|
||||
DocumentFile source = sources[i];
|
||||
DocumentFile target = targets[i];
|
||||
|
||||
if (source == null || target == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
copyDocumentFile(source, resolver, target);
|
||||
float progress = i / (float) sources.length;
|
||||
workerCallback.onProgress(progress);
|
||||
}
|
||||
workerCallback.onComplete(true);
|
||||
} catch (NullPointerException e) {
|
||||
if (worker.isCancelled()) {
|
||||
workerCallback.onFailure(new CancellationException("Cancelled"));
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
workerCallback.onFailure(e);
|
||||
}
|
||||
});
|
||||
worker.setCallback(getDefaultBackgroundWorkerCallback(handler, progressDialog, callback));
|
||||
worker.run();
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
public static void copyDocumentFilesToDirAsync(DocumentFile[] files,
|
||||
Context context,
|
||||
DocumentFile targetDirectory,
|
||||
String loadingMessage,
|
||||
Consumer<Boolean> callback) {
|
||||
BackgroundWorker<Boolean> worker = new BackgroundWorker<>();
|
||||
CustomDialogFactory.CustomDialog progressDialog = getLoadingDialog(context, loadingMessage);
|
||||
progressDialog.setOnCancelListener(dialog -> worker.cancel());
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
Handler handler = Handler.createAsync(Looper.getMainLooper());
|
||||
|
||||
worker.setTask(workerCallback -> {
|
||||
try {
|
||||
workerCallback.onInitialize();
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (worker.isCancelled()) {
|
||||
workerCallback.onFailure(new CancellationException("Cancelled"));
|
||||
return;
|
||||
}
|
||||
DocumentFile file = files[i];
|
||||
if (file == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
copyDocumentFileToNewOrExistingFile(file, resolver, targetDirectory);
|
||||
float progress = i / (float) files.length;
|
||||
workerCallback.onProgress(progress);
|
||||
}
|
||||
workerCallback.onComplete(true);
|
||||
} catch (NullPointerException e) {
|
||||
if (worker.isCancelled()) {
|
||||
workerCallback.onFailure(new CancellationException("Cancelled"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
workerCallback.onFailure(e);
|
||||
}
|
||||
});
|
||||
worker.setCallback(getDefaultBackgroundWorkerCallback(handler, progressDialog, callback));
|
||||
worker.run();
|
||||
}
|
||||
|
||||
private static BackgroundWorkerCallback<Boolean> getDefaultBackgroundWorkerCallback(Handler handler,
|
||||
CustomDialogFactory.CustomDialog progressDialog,
|
||||
Consumer<Boolean> callback) {
|
||||
return new BackgroundWorkerCallback<Boolean>() {
|
||||
private int progress = -1;
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
handler.post(() -> {
|
||||
CustomDialogFactory.show(progressDialog);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(float progress) {
|
||||
handler.post(() -> {
|
||||
int intProgress = (int) (progress * 100);
|
||||
if (this.progress == intProgress) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.progress = intProgress;
|
||||
|
||||
if (progress == -1) {
|
||||
CustomDialogFactory.setDesc(progressDialog, null);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomDialogFactory.setDesc(progressDialog, intProgress + "%");
|
||||
});
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onFailure(Exception e) {
|
||||
this.onComplete(false);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
||||
@Override
|
||||
public void onComplete(Boolean result) {
|
||||
handler.post(() -> {
|
||||
progressDialog.dismiss();
|
||||
callback.accept(result);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private static CustomDialogFactory.CustomDialog getLoadingDialog(Context context) {
|
||||
return getLoadingDialog(context, null);
|
||||
}
|
||||
|
||||
private static CustomDialogFactory.CustomDialog getLoadingDialog(Context context, String message) {
|
||||
if (message == null) {
|
||||
message = context.getResources().getString(R.string.dialog_loading_message);
|
||||
}
|
||||
|
||||
CustomDialogFactory.CustomDialog dialog = CustomDialogFactory.createDialog(context,
|
||||
message,
|
||||
context.getResources()
|
||||
.getDrawable(R.drawable.loading_anim),
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
false);
|
||||
CustomDialogFactory.addCancelButton(dialog, android.R.string.no);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.gpl.rpg.AndorsTrail.util;
|
||||
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public final class BackgroundWorker<T> {
|
||||
boolean cancelled = false;
|
||||
worker<T> task;
|
||||
BackgroundWorkerCallback<T> callback;
|
||||
|
||||
public void setTask(worker<T> task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public void setCallback(BackgroundWorkerCallback<T> callback) {
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
cancelled = true;
|
||||
}
|
||||
|
||||
interface worker<T> {
|
||||
void doWork(BackgroundWorkerCallback<T> callback);
|
||||
}
|
||||
|
||||
interface BackgroundWorkerCallback<T> {
|
||||
void onInitialize();
|
||||
|
||||
default void onProgress(float progress) {
|
||||
}
|
||||
|
||||
void onFailure(Exception e);
|
||||
|
||||
void onComplete(T result);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
Executors.newSingleThreadExecutor().execute(() -> {
|
||||
task.doWork(callback);
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,18 @@ public final class CoordRect {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static CoordRect union(CoordRect r1, CoordRect r2) {
|
||||
int left = Math.min(r1.topLeft.x, r2.topLeft.x);
|
||||
int top = Math.min(r1.topLeft.y, r2.topLeft.y);
|
||||
int right = Math.max(r1.topLeft.x + r1.size.width, r2.topLeft.x + r2.size.width);
|
||||
int bottom = Math.max(r1.topLeft.y + r1.size.height, r2.topLeft.y + r2.size.height);
|
||||
|
||||
int width = right - left;
|
||||
int height = bottom - top;
|
||||
|
||||
return new CoordRect(new Coord(left, top), new Size(width, height));
|
||||
}
|
||||
|
||||
/*
|
||||
public static boolean contains(final int x, final int y, final Size size, final Coord p) {
|
||||
if (p.x < x) return false;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.gpl.rpg.AndorsTrail.view;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.AnimationDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@@ -22,25 +22,33 @@ import com.gpl.rpg.AndorsTrail.R;
|
||||
import com.gpl.rpg.AndorsTrail.util.ThemeHelper;
|
||||
|
||||
public class CustomDialogFactory {
|
||||
|
||||
public static class CustomDialog extends Dialog {
|
||||
|
||||
public static class CustomDialog extends android.app.Dialog {
|
||||
public CustomDialog(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
boolean verticalButtons = false;
|
||||
}
|
||||
|
||||
public static CustomDialog createDialog(final Context context, String title, Drawable icon, String desc, View content, boolean hasButtons) {
|
||||
|
||||
public static CustomDialog createDialog(final Context context, String title, Drawable icon,
|
||||
String desc, View content, boolean hasButtons, boolean canDismiss) {
|
||||
return createDialog(context, title, icon, desc, content, hasButtons, canDismiss, false);
|
||||
}
|
||||
|
||||
public static CustomDialog createDialog(final Context context, String title, Drawable icon,
|
||||
String desc, View content, boolean hasButtons) {
|
||||
return createDialog(context, title, icon, desc, content, hasButtons, true);
|
||||
}
|
||||
|
||||
public static CustomDialog createDialog(final Context context, String title, Drawable icon, String desc, View content, boolean hasButtons, final boolean canDismiss) {
|
||||
|
||||
public static CustomDialog createDialog(final Context context, String title, Drawable icon,
|
||||
String desc, View content, boolean hasButtons,
|
||||
final boolean canDismiss, final boolean verticalButtons) {
|
||||
final CustomDialog dialog = new CustomDialog(new ContextThemeWrapper(context, ThemeHelper.getDialogTheme())) {
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
Rect r = new Rect();
|
||||
this.getWindow().getDecorView().findViewById(R.id.dialog_hitrect).getHitRect(r);
|
||||
|
||||
|
||||
if (r.contains((int)event.getX(), (int)event.getY())) {
|
||||
return super.onTouchEvent(event);
|
||||
} else {
|
||||
@@ -51,7 +59,7 @@ public class CustomDialogFactory {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onWindowFocusChanged(boolean hasFocus) {
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
@@ -63,7 +71,8 @@ public class CustomDialogFactory {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
dialog.verticalButtons = verticalButtons;
|
||||
|
||||
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
|
||||
dialog.setContentView(R.layout.custom_dialog_title_icon);
|
||||
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
|
||||
@@ -72,23 +81,37 @@ public class CustomDialogFactory {
|
||||
} else {
|
||||
dialog.getWindow().setFlags(0, WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
}
|
||||
|
||||
|
||||
setTitle(dialog, title, icon);
|
||||
|
||||
|
||||
setDesc(dialog, desc);
|
||||
|
||||
|
||||
setContent(dialog, content);
|
||||
|
||||
ViewGroup buttonsHolder = (ViewGroup) dialog.findViewById(R.id.dialog_button_container);
|
||||
|
||||
ViewGroup buttonsHolder = getButtonContainer(dialog);
|
||||
ViewGroup unusedButtonsHolder = getUnusedButtonContainer(dialog);
|
||||
|
||||
unusedButtonsHolder.setVisibility(View.GONE);
|
||||
if (hasButtons) {
|
||||
buttonsHolder.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
buttonsHolder.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
public static CustomDialog createErrorDialog(final Context context, String title, String description) {
|
||||
final CustomDialog d = createDialog(context,
|
||||
title,
|
||||
context.getResources().getDrawable(android.R.drawable.ic_dialog_alert),
|
||||
description,
|
||||
null,
|
||||
true);
|
||||
CustomDialogFactory.addDismissButton(d, android.R.string.ok);
|
||||
return d;
|
||||
}
|
||||
|
||||
public static CustomDialog setTitle(final CustomDialog dialog, String title, Drawable icon) {
|
||||
TextView titleView = (TextView) dialog.findViewById(R.id.dialog_title);
|
||||
if (title != null || icon != null) {
|
||||
@@ -100,7 +123,7 @@ public class CustomDialogFactory {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
public static CustomDialog setDesc(final CustomDialog dialog, String desc) {
|
||||
TextView descView = (TextView) dialog.findViewById(R.id.dialog_description);
|
||||
ViewGroup descHolder = (ViewGroup) dialog.findViewById(R.id.dialog_description_container);
|
||||
@@ -113,7 +136,7 @@ public class CustomDialogFactory {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
public static CustomDialog setContent(final CustomDialog dialog, View content) {
|
||||
ViewGroup contentHolder = (ViewGroup) dialog.findViewById(R.id.dialog_content_container);
|
||||
if (content != null) {
|
||||
@@ -124,54 +147,101 @@ public class CustomDialogFactory {
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static Dialog addButton(final Dialog dialog, int textId, final OnClickListener listener) {
|
||||
|
||||
Button template = (Button) dialog.findViewById(R.id.dialog_template_button);
|
||||
|
||||
public static CustomDialog addButton(final CustomDialog dialog, String text, final OnClickListener listener) {
|
||||
return addButton(dialog, -1, text, listener);
|
||||
}
|
||||
public static CustomDialog addButton(final CustomDialog dialog, int textId, final OnClickListener listener) {
|
||||
return addButton(dialog, textId, null, listener);
|
||||
}
|
||||
public static CustomDialog addButton(final CustomDialog dialog, int textId, String text, final OnClickListener listener) {
|
||||
Button template = getButtonTemplate(dialog);
|
||||
LayoutParams params = template.getLayoutParams();
|
||||
ViewGroup buttonsHolder = (ViewGroup) dialog.findViewById(R.id.dialog_button_container);
|
||||
|
||||
ViewGroup buttonsHolder = getButtonContainer(dialog);
|
||||
|
||||
Button b = new Button(dialog.getContext());
|
||||
b.setLayoutParams(params);
|
||||
//Old android versions need this "reminder"
|
||||
b.setBackgroundDrawable(ThemeHelper.getThemeDrawable(dialog.getContext(), R.attr.ui_theme_textbutton_drawable));
|
||||
b.setTextColor(ThemeHelper.getThemeColor(dialog.getContext(), R.attr.ui_theme_dialogue_light_color));
|
||||
|
||||
b.setText(textId);
|
||||
|
||||
if(textId != -1) {
|
||||
b.setText(textId);
|
||||
} else {
|
||||
b.setText(text);
|
||||
}
|
||||
|
||||
b.setOnClickListener(new OnClickListener() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
listener.onClick(v);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
buttonsHolder.addView(b, params);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static Dialog addDismissButton(final Dialog dialog, int textId) {
|
||||
|
||||
public static CustomDialog addDismissButton(final CustomDialog dialog, int textId) {
|
||||
return CustomDialogFactory.addButton(dialog, textId, new OnClickListener() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static Dialog setDismissListener(Dialog dialog, OnDismissListener listener) {
|
||||
public static CustomDialog addCancelButton(final CustomDialog dialog, int textId) {
|
||||
return CustomDialogFactory.addButton(dialog, textId, new OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static CustomDialog setDismissListener(CustomDialog dialog, OnDismissListener listener) {
|
||||
dialog.setOnDismissListener(listener);
|
||||
|
||||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static void show(Dialog dialog) {
|
||||
|
||||
|
||||
public static CustomDialog setCancelListener(CustomDialog dialog, OnCancelListener listener) {
|
||||
dialog.setOnCancelListener(listener);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
public static void show(CustomDialog dialog) {
|
||||
|
||||
dialog.findViewById(R.id.dialog_template_button).setVisibility(View.GONE);
|
||||
dialog.findViewById(R.id.dialog_template_button_vertical).setVisibility(View.GONE);
|
||||
dialog.show();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private static ViewGroup getUnusedButtonContainer(CustomDialog dialog) {
|
||||
if (dialog.verticalButtons)
|
||||
return (ViewGroup) dialog.findViewById(R.id.dialog_button_container);
|
||||
else
|
||||
return (ViewGroup) dialog.findViewById(R.id.dialog_button_container_vertical);
|
||||
}
|
||||
|
||||
private static ViewGroup getButtonContainer(CustomDialog dialog) {
|
||||
if (dialog.verticalButtons)
|
||||
return (ViewGroup) dialog.findViewById(R.id.dialog_button_container_vertical);
|
||||
else
|
||||
return (ViewGroup) dialog.findViewById(R.id.dialog_button_container);
|
||||
}
|
||||
|
||||
private static Button getButtonTemplate(CustomDialog dialog) {
|
||||
if (dialog.verticalButtons)
|
||||
return (Button) dialog.findViewById(R.id.dialog_template_button_vertical);
|
||||
else
|
||||
return (Button) dialog.findViewById(R.id.dialog_template_button);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -292,6 +292,8 @@ public final class DisplayActiveActorConditionIcons implements ActorConditionLis
|
||||
}
|
||||
if (condition.duration == ActorCondition.DURATION_FOREVER || condition.duration == ActorCondition.DURATION_NONE) {
|
||||
duration = "\u221e";
|
||||
} else if (condition.duration == ActorCondition.DURATION_FOREVER_UNTIL_SLEEP) {
|
||||
duration = "";
|
||||
} else {
|
||||
duration = Integer.toString(condition.duration);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.gpl.rpg.AndorsTrail.view;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.List;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailPreferences;
|
||||
@@ -158,8 +159,8 @@ public final class MainView extends SurfaceView
|
||||
// this.surfaceSize = new Size(w, h);
|
||||
this.surfaceSize = new Size((int) (getWidth() / scale), (int) (getHeight() / scale));
|
||||
this.screenSizeTileCount = new Size(
|
||||
(int) Math.floor(getWidth() / scaledTileSize)
|
||||
,(int) Math.floor(getHeight() / scaledTileSize)
|
||||
getWidth() / scaledTileSize
|
||||
,getHeight() / scaledTileSize
|
||||
);
|
||||
|
||||
if (sh.getSurfaceFrame().right != surfaceSize.width || sh.getSurfaceFrame().bottom != surfaceSize.height) {
|
||||
@@ -226,28 +227,28 @@ public final class MainView extends SurfaceView
|
||||
if (scrolling && why != RedrawAllDebugReason.MapScrolling) return;
|
||||
if (!scrolling && movingSprites > 0 && why != RedrawAllDebugReason.SpriteMoved) return;
|
||||
}
|
||||
redrawArea_(mapViewArea, null, 0, 0);
|
||||
redrawArea_(mapViewArea, null);
|
||||
}
|
||||
private void redrawTile(final Coord p, RedrawTileDebugReason why) {
|
||||
if (scrolling) return;
|
||||
p1x1.topLeft.set(p);
|
||||
redrawArea_(p1x1, null, 0, 0);
|
||||
redrawArea_(p1x1, null);
|
||||
}
|
||||
private void redrawArea(final CoordRect area, RedrawAreaDebugReason why) {
|
||||
if (scrolling) return;
|
||||
redrawArea_(area, null, 0, 0);
|
||||
redrawArea_(area, null);
|
||||
}
|
||||
private void redrawArea_(CoordRect area, final VisualEffectAnimation effect, int tileID, int textYOffset) {
|
||||
private void redrawArea_(CoordRect area, final List<VisualEffectAnimation> effects) {
|
||||
if (!hasSurface) return;
|
||||
|
||||
|
||||
|
||||
if (!currentMap.intersects(area)) return;
|
||||
if (!mapViewArea.intersects(area)) return;
|
||||
|
||||
if (shouldRedrawEverything()) {
|
||||
area = mapViewArea;
|
||||
}
|
||||
|
||||
|
||||
calculateRedrawRect(area);
|
||||
redrawRect.intersect(redrawClip);
|
||||
Canvas c = null;
|
||||
@@ -263,7 +264,7 @@ public final class MainView extends SurfaceView
|
||||
if (area == mapViewArea) {
|
||||
area = adaptAreaToScrolling(area);
|
||||
}
|
||||
|
||||
|
||||
synchronized (holder) { synchronized (tiles) {
|
||||
int xScroll = 0;
|
||||
int yScroll = 0;
|
||||
@@ -275,32 +276,25 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
c.clipRect(redrawClip);
|
||||
c.translate(screenOffset.x + xScroll, screenOffset.y + yScroll);
|
||||
// c.scale(scale, scale);
|
||||
doDrawRect(c, area);
|
||||
if (effect != null) {
|
||||
drawFromMapPosition(c, area, effect.position, tileID);
|
||||
if (effect.displayText != null) {
|
||||
drawEffectText(c, area, effect, textYOffset, effect.getTextPaint());
|
||||
}
|
||||
}
|
||||
|
||||
// c.drawRect(new Rect(
|
||||
// (area.topLeft.x - mapViewArea.topLeft.x) * tileSize,
|
||||
// (area.topLeft.y - mapViewArea.topLeft.y) * tileSize,
|
||||
// (area.topLeft.x - mapViewArea.topLeft.x + area.size.width) * tileSize - 1,
|
||||
// (area.topLeft.y - mapViewArea.topLeft.y + area.size.height) * tileSize - 1),
|
||||
// redrawHighlight);
|
||||
// if (touchedTile != null) c.drawRect(new Rect(
|
||||
// (touchedTile.x - mapViewArea.topLeft.x) * tileSize,
|
||||
// (touchedTile.y - mapViewArea.topLeft.y) * tileSize,
|
||||
// (touchedTile.x - mapViewArea.topLeft.x + 1) * tileSize - 1,
|
||||
// (touchedTile.y - mapViewArea.topLeft.y + 1) * tileSize - 1),
|
||||
// touchHighlight);
|
||||
renderEffects(c, effects);
|
||||
} }
|
||||
} finally {
|
||||
if (c != null) holder.unlockCanvasAndPost(c);
|
||||
}
|
||||
}
|
||||
|
||||
private void renderEffects(Canvas canvas ,List<VisualEffectAnimation> effects) {
|
||||
if(effects == null) return;
|
||||
for (VisualEffectAnimation effect : effects) {
|
||||
int tileID = effect.tileID;
|
||||
int textYOffset = effect.textYOffset;
|
||||
drawFromMapPosition(canvas, effect.area, effect.position, tileID);
|
||||
if (effect.displayText != null) {
|
||||
drawEffectText(canvas, effect.area, effect, textYOffset, effect.getTextPaint());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isRedrawRectWholeScreen(Rect redrawRect) {
|
||||
// if (redrawRect.width() < mapViewArea.size.width * scaledTileSize) return false;
|
||||
@@ -317,11 +311,21 @@ public final class MainView extends SurfaceView
|
||||
return true;
|
||||
}
|
||||
private final Rect redrawRect = new Rect();
|
||||
private void redrawAreaWithEffect(final VisualEffectAnimation effect, int tileID, int textYOffset) {
|
||||
CoordRect area = effect.area;
|
||||
// if (shouldRedrawEverythingForVisualEffect()) area = mapViewArea;
|
||||
redrawArea_(area, effect, tileID, textYOffset);
|
||||
private void redrawAreaWithEffect(List<VisualEffectAnimation> effects) {
|
||||
CoordRect area = null;
|
||||
for (int i = 0; i < effects.size(); i++) {
|
||||
VisualEffectAnimation effect = effects.get(i);
|
||||
if (area == null) {
|
||||
area = effect.area;
|
||||
} else {
|
||||
area = CoordRect.union(area, effect.area);
|
||||
}
|
||||
}
|
||||
if (area != null) {
|
||||
redrawArea_(area, effects);
|
||||
}
|
||||
}
|
||||
|
||||
private void clearCanvas() {
|
||||
if (!hasSurface) return;
|
||||
Canvas c = null;
|
||||
@@ -794,8 +798,8 @@ public final class MainView extends SurfaceView
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewAnimationFrame(VisualEffectAnimation animation, int tileID, int textYOffset) {
|
||||
redrawAreaWithEffect(animation, tileID, textYOffset);
|
||||
public void onNewAnimationFrames(List<VisualEffectAnimation> effects) {
|
||||
redrawAreaWithEffect(effects);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,13 +9,15 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.view.CustomDialogFactory.CustomDialog;
|
||||
|
||||
/**
|
||||
* Simply instantiate this class, implement abstract methods in an anonymous type, and tada, your Button is a Spinner!
|
||||
*/
|
||||
public abstract class SpinnerEmulator {
|
||||
|
||||
private Button spinnerButton;
|
||||
private Dialog spinnerDialog = null;
|
||||
private CustomDialog spinnerDialog = null;
|
||||
private ListView choicesList;
|
||||
private Context context;
|
||||
|
||||
|
||||
@@ -61,13 +61,9 @@ public final class TraitsInfoView {
|
||||
tv.setText(Integer.toString(attackCost));
|
||||
|
||||
row = (TableRow) group.findViewById(R.id.traitsinfo_attack_chance_row);
|
||||
if (attackChance == 0) {
|
||||
row.setVisibility(View.GONE);
|
||||
} else {
|
||||
row.setVisibility(View.VISIBLE);
|
||||
tv = (TextView) group.findViewById(R.id.traitsinfo_attack_chance);
|
||||
tv.setText(Integer.toString(attackChance));
|
||||
}
|
||||
tv = (TextView) group.findViewById(R.id.traitsinfo_attack_chance);
|
||||
tv.setText(Integer.toString(attackChance));
|
||||
|
||||
|
||||
row = (TableRow) group.findViewById(R.id.traitsinfo_attack_damage_row);
|
||||
if (damagePotential != null && damagePotential.max != 0) {
|
||||
|
||||
Binary file not shown.
81187
AndorsTrail/assets/translation/ar.po
Normal file
81187
AndorsTrail/assets/translation/ar.po
Normal file
File diff suppressed because it is too large
Load Diff
81052
AndorsTrail/assets/translation/az.po
Normal file
81052
AndorsTrail/assets/translation/az.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81053
AndorsTrail/assets/translation/be.po
Normal file
81053
AndorsTrail/assets/translation/be.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81060
AndorsTrail/assets/translation/bg.po
Normal file
81060
AndorsTrail/assets/translation/bg.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81237
AndorsTrail/assets/translation/ca.po
Normal file
81237
AndorsTrail/assets/translation/ca.po
Normal file
File diff suppressed because it is too large
Load Diff
81052
AndorsTrail/assets/translation/ckb.po
Normal file
81052
AndorsTrail/assets/translation/ckb.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
82101
AndorsTrail/assets/translation/cs.po
Normal file
82101
AndorsTrail/assets/translation/cs.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81050
AndorsTrail/assets/translation/da.po
Normal file
81050
AndorsTrail/assets/translation/da.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
82269
AndorsTrail/assets/translation/de.po
Normal file
82269
AndorsTrail/assets/translation/de.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81052
AndorsTrail/assets/translation/de_AT.po
Normal file
81052
AndorsTrail/assets/translation/de_AT.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81166
AndorsTrail/assets/translation/el.po
Normal file
81166
AndorsTrail/assets/translation/el.po
Normal file
File diff suppressed because it is too large
Load Diff
81030
AndorsTrail/assets/translation/english.pot
Normal file
81030
AndorsTrail/assets/translation/english.pot
Normal file
File diff suppressed because it is too large
Load Diff
81052
AndorsTrail/assets/translation/eo.po
Normal file
81052
AndorsTrail/assets/translation/eo.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
82088
AndorsTrail/assets/translation/es.po
Normal file
82088
AndorsTrail/assets/translation/es.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81052
AndorsTrail/assets/translation/es_AR.po
Normal file
81052
AndorsTrail/assets/translation/es_AR.po
Normal file
File diff suppressed because it is too large
Load Diff
81050
AndorsTrail/assets/translation/eu.po
Normal file
81050
AndorsTrail/assets/translation/eu.po
Normal file
File diff suppressed because it is too large
Load Diff
81062
AndorsTrail/assets/translation/fi.po
Normal file
81062
AndorsTrail/assets/translation/fi.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
81088
AndorsTrail/assets/translation/fil.po
Normal file
81088
AndorsTrail/assets/translation/fil.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
82172
AndorsTrail/assets/translation/fr.po
Normal file
82172
AndorsTrail/assets/translation/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
81052
AndorsTrail/assets/translation/fr_AG.po
Normal file
81052
AndorsTrail/assets/translation/fr_AG.po
Normal file
File diff suppressed because it is too large
Load Diff
81062
AndorsTrail/assets/translation/gl.po
Normal file
81062
AndorsTrail/assets/translation/gl.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user