Compare commits
2118 Commits
v0.14.5
...
test-new-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
707bcca368 | ||
|
|
f8f115de10 | ||
|
|
b07c4dc53a | ||
|
|
6eeddba773 | ||
|
|
0cfe4df468 | ||
|
|
eb5c3c3be5 | ||
|
|
a5b9206694 | ||
|
|
375e67bdc4 | ||
|
|
724a576aa3 | ||
|
|
ed47dcb90c | ||
|
|
64b08a5a4d | ||
|
|
baed0153a2 | ||
|
|
46d95b33e4 | ||
|
|
200d270fee | ||
|
|
a8628275a0 | ||
|
|
20a1d2bcc1 | ||
|
|
b887a1f096 | ||
|
|
9bf0e9f28d | ||
|
|
dfc724767b | ||
|
|
f0e66e9dc5 | ||
|
|
0932335f0b | ||
|
|
a9b39e396a | ||
|
|
2e0ceaae72 | ||
|
|
04f38d2eb6 | ||
|
|
fc1ed4dff6 | ||
|
|
f8935d3dd7 | ||
|
|
a86228677f | ||
|
|
79df9f7876 | ||
|
|
12ea2d76be | ||
|
|
485bd72241 | ||
|
|
7240275075 | ||
|
|
29ef9b8d15 | ||
|
|
97f4795d4e | ||
|
|
226e45b24d | ||
|
|
d6ab7e72b2 | ||
|
|
168f44b8b3 | ||
|
|
b73f646a4c | ||
|
|
36cefcc000 | ||
|
|
f901c25c87 | ||
|
|
6d8478b029 | ||
|
|
9bcb040019 | ||
|
|
d977087fc0 | ||
|
|
1a330771d7 | ||
|
|
9c8c9f2106 | ||
|
|
0498beecdf | ||
|
|
8e075adf8f | ||
|
|
60f2a0e647 | ||
|
|
b642f2b5c4 | ||
|
|
2b80f72c6b | ||
|
|
462720881a | ||
|
|
3dda0254a8 | ||
|
|
054a52a445 | ||
|
|
85242d808b | ||
|
|
57241677a9 | ||
|
|
6ccdee2a53 | ||
|
|
a3d2b7b7f3 | ||
|
|
b7b28b4ae3 | ||
|
|
30748200dd | ||
|
|
c9f8240234 | ||
|
|
5c7082e886 | ||
|
|
9a3c889a9d | ||
|
|
f41f58e13f | ||
|
|
e81f25c216 | ||
|
|
36fc681fbf | ||
|
|
87e5e29129 | ||
|
|
b432fdf90a | ||
|
|
6e78a3fedd | ||
|
|
24760801af | ||
|
|
f5e8e0f7a5 | ||
|
|
df089a2f04 | ||
|
|
6600713f4b | ||
|
|
96dad762b2 | ||
|
|
5470387685 | ||
|
|
fa64c868b9 | ||
|
|
2f4a416353 | ||
|
|
3dbafb042c | ||
|
|
97e7b019dd | ||
|
|
28103ad952 | ||
|
|
1826ca6f2f | ||
|
|
db490a6c6c | ||
|
|
421fdef4f9 | ||
|
|
d717ce842d | ||
|
|
f13c9792af | ||
|
|
41e7b8e0f4 | ||
|
|
4bd723a7ee | ||
|
|
66d5bd5490 | ||
|
|
351d0258b2 | ||
|
|
26fb9a7052 | ||
|
|
307fd637fa | ||
|
|
93fb716f89 | ||
|
|
7b41551e2d | ||
|
|
4806af5f7d | ||
|
|
85cb55cdd0 | ||
|
|
27a9697e47 | ||
|
|
7d230cc3b0 | ||
|
|
0db2fffad1 | ||
|
|
2a3296a0e8 | ||
|
|
941b875afa | ||
|
|
99155bb9cf | ||
|
|
0701dd2ad3 | ||
|
|
5570c19e1f | ||
|
|
a728c91476 | ||
|
|
6a43481067 | ||
|
|
29a049fe4e | ||
|
|
b5a9c8e1bb | ||
|
|
bb9a35c161 | ||
|
|
b25a345b42 | ||
|
|
b22b0e0194 | ||
|
|
55cf95f218 | ||
|
|
225ddbcfac | ||
|
|
9377090c7c | ||
|
|
ed002ec2e1 | ||
|
|
e33036d9ec | ||
|
|
ef03e7c009 | ||
|
|
aef4220ac0 | ||
|
|
46223e38cd | ||
|
|
4bafa4bffe | ||
|
|
2b3dd877dd | ||
|
|
0553e5c45e | ||
|
|
4d93374cf6 | ||
|
|
4e421bf9ba | ||
|
|
8b2a9d7c01 | ||
|
|
5a3244d345 | ||
|
|
f1b9d0c5e4 | ||
|
|
6493e0e623 | ||
|
|
e71ba17f9f | ||
|
|
e656363e20 | ||
|
|
0826a748ae | ||
|
|
a595fe99ef | ||
|
|
9dbc7942e3 | ||
|
|
845d8ae32e | ||
|
|
5c524e138c | ||
|
|
86d9265ff9 | ||
|
|
6994a5d6d3 | ||
|
|
e6213b00c1 | ||
|
|
43e2caa30e | ||
|
|
97ca245dfc | ||
|
|
36de1c0751 | ||
|
|
704341fd15 | ||
|
|
22b61bc9c3 | ||
|
|
f4cbbc0a2a | ||
|
|
dc99187b9d | ||
|
|
915598dec4 | ||
|
|
e7b4518d73 | ||
|
|
9603a78e87 | ||
|
|
bd90e051d4 | ||
|
|
26e66b313f | ||
|
|
c534bbd12a | ||
|
|
83b5e217e5 | ||
|
|
c0adf5bf0b | ||
|
|
4ff737a4ac | ||
|
|
5af0706c09 | ||
|
|
4ccee0f1de | ||
|
|
9b752d540e | ||
|
|
e860c7b7ec | ||
|
|
8a1fd9531f | ||
|
|
5fd6e0ee99 | ||
|
|
53b2b81fe0 | ||
|
|
6ccc811b46 | ||
|
|
962a61567a | ||
|
|
58f05e1cec | ||
|
|
6b426790c7 | ||
|
|
d4fc578673 | ||
|
|
51b567b8db | ||
|
|
07b47dee3f | ||
|
|
4431a906b9 | ||
|
|
2bb6852e3e | ||
|
|
1948ed3e16 | ||
|
|
81b5ccae30 | ||
|
|
5543ff0d29 | ||
|
|
cd567e9e98 | ||
|
|
5d86925a8a | ||
|
|
e3db564a4b | ||
|
|
a4293624ab | ||
|
|
367e2dc81a | ||
|
|
9ec33c6eef | ||
|
|
9c9b8d36f2 | ||
|
|
4fc6f335c7 | ||
|
|
d2f4123d08 | ||
|
|
b29d352a1b | ||
|
|
cd5a71cd12 | ||
|
|
cdd68e985d | ||
|
|
8cf4d4280c | ||
|
|
cd29bf8702 | ||
|
|
13d98be051 | ||
|
|
a350ff3182 | ||
|
|
e0360cc7eb | ||
|
|
4249a29b63 | ||
|
|
43b2a0a8c8 | ||
|
|
6d6584f99e | ||
|
|
077c651226 | ||
|
|
3fc872aa76 | ||
|
|
cb0b347a38 | ||
|
|
d08967c688 | ||
|
|
3666c0caa9 | ||
|
|
4ef179fccb | ||
|
|
861f9b3caa | ||
|
|
05292df456 | ||
|
|
9fed692223 | ||
|
|
b1c04c1fea | ||
|
|
bc9adc2cd3 | ||
|
|
cdf149afca | ||
|
|
73145b4e5e | ||
|
|
f8b9f30fd6 | ||
|
|
e6bc567b12 | ||
|
|
fe004a72f0 | ||
|
|
0433fd3d9d | ||
|
|
1c18060570 | ||
|
|
be54c0e641 | ||
|
|
0be2eb9107 | ||
|
|
4859faf1e7 | ||
|
|
c25d40c67d | ||
|
|
b6c37a5c9f | ||
|
|
f6b4c1b109 | ||
|
|
841faeede4 | ||
|
|
e61b9b23a0 | ||
|
|
72a826ef0a | ||
|
|
f070b8f295 | ||
|
|
1646b75520 | ||
|
|
241617e31a | ||
|
|
5de2893e07 | ||
|
|
030e894040 | ||
|
|
e7b9a4ba87 | ||
|
|
617bae67c6 | ||
|
|
64d2d08820 | ||
|
|
037b33c99a | ||
|
|
afa69ce9a4 | ||
|
|
3226c0c831 | ||
|
|
4e759cad4c | ||
|
|
291795928d | ||
|
|
a1315e7f7f | ||
|
|
657bc2b4e0 | ||
|
|
d8b12fc55d | ||
|
|
6d11367ea4 | ||
|
|
eb9e741b4f | ||
|
|
c47546d501 | ||
|
|
11aa178fc1 | ||
|
|
f3a88ef269 | ||
|
|
720dc2131f | ||
|
|
701ef17ae1 | ||
|
|
1a689a5f07 | ||
|
|
ef12ab0cee | ||
|
|
3d26db7a01 | ||
|
|
dd3df9981b | ||
|
|
5d04e83529 | ||
|
|
7ed4626d71 | ||
|
|
ecf5a29a71 | ||
|
|
1a24b346a0 | ||
|
|
72d06c7a02 | ||
|
|
26fde8c694 | ||
|
|
8adeb99be7 | ||
|
|
c92f15156b | ||
|
|
63f69d712b | ||
|
|
55a1bd06f3 | ||
|
|
6a29abf7f0 | ||
|
|
83bdd9f2c4 | ||
|
|
95879827c8 | ||
|
|
2ade518207 | ||
|
|
36c8449e4d | ||
|
|
3c04df69f3 | ||
|
|
1224ee9a67 | ||
|
|
fdd1d4463a | ||
|
|
940ac3736c | ||
|
|
d38897b54d | ||
|
|
90848c6654 | ||
|
|
0220d5aefc | ||
|
|
f42032df07 | ||
|
|
05d7eb60bc | ||
|
|
942416317c | ||
|
|
576de945fb | ||
|
|
8b02084428 | ||
|
|
9f666d69db | ||
|
|
a4c52d9162 | ||
|
|
592b11366e | ||
|
|
07f50b9243 | ||
|
|
ec74d55686 | ||
|
|
4518513e87 | ||
|
|
7df4e2144f | ||
|
|
7f9c9248ce | ||
|
|
9c1db48804 | ||
|
|
0628830f0c | ||
|
|
9436f2f5fb | ||
|
|
c5e1b5617f | ||
|
|
298c417aa3 | ||
|
|
fc74831700 | ||
|
|
d9db55de44 | ||
|
|
3fd205e8c2 | ||
|
|
5cb828fb92 | ||
|
|
5f7a3fd53f | ||
|
|
8e3e598753 | ||
|
|
2a0a0f60f8 | ||
|
|
6b7d1fdf9f | ||
|
|
65199a40f7 | ||
|
|
f9082a8800 | ||
|
|
1670c6e7d6 | ||
|
|
ff2073ed4d | ||
|
|
f14aaac635 | ||
|
|
c709fa622f | ||
|
|
c752556bf3 | ||
|
|
e7d9703fcc | ||
|
|
1ed52a84b0 | ||
|
|
4fdb278751 | ||
|
|
8318803923 | ||
|
|
42de7e3676 | ||
|
|
3efa646ee3 | ||
|
|
b414c2ab42 | ||
|
|
205dea3db7 | ||
|
|
6cac688555 | ||
|
|
09b1b08c1e | ||
|
|
b61a1270e9 | ||
|
|
b85cee7e1f | ||
|
|
8e674e3e29 | ||
|
|
aa2812c874 | ||
|
|
6f282431c4 | ||
|
|
470e54cdd0 | ||
|
|
da3ef1c2a6 | ||
|
|
9efe0e62d5 | ||
|
|
7038f81b46 | ||
|
|
de972a60df | ||
|
|
6a87787d6f | ||
|
|
6dc9a4b507 | ||
|
|
5b7c888d57 | ||
|
|
a1f761b83e | ||
|
|
c40a6bfaa0 | ||
|
|
441c6f7667 | ||
|
|
a07d57cf71 | ||
|
|
a467f972f9 | ||
|
|
3f455ee360 | ||
|
|
7a0b913768 | ||
|
|
a7b240ade8 | ||
|
|
bb64404821 | ||
|
|
caf92eb3c8 | ||
|
|
6a117a0fab | ||
|
|
26682509f7 | ||
|
|
d85d92fb43 | ||
|
|
c412003cb3 | ||
|
|
e39b5dbd51 | ||
|
|
db162ea66f | ||
|
|
f9f9fde368 | ||
|
|
4b221c2eb5 | ||
|
|
ed45bebfa0 | ||
|
|
fa0bc3805f | ||
|
|
7710f0b70f | ||
|
|
0277ddadb5 | ||
|
|
88e23e32f5 | ||
|
|
8ab5b4a17a | ||
|
|
503dfd69ef | ||
|
|
ae61ec26c0 | ||
|
|
00bc24bd50 | ||
|
|
abd15d6307 | ||
|
|
c01ac546d1 | ||
|
|
af77221ba2 | ||
|
|
204f0938d3 | ||
|
|
ad39d1408c | ||
|
|
ed011173f6 | ||
|
|
491fcb5860 | ||
|
|
c2d5537d8d | ||
|
|
7d5037ae87 | ||
|
|
07d7714317 | ||
|
|
2cab97f37d | ||
|
|
d184778c9a | ||
|
|
9fd3b3008d | ||
|
|
71aa35b214 | ||
|
|
4443dc9d3e | ||
|
|
839e357301 | ||
|
|
ac56c5a415 | ||
|
|
36e3343341 | ||
|
|
510f7d7513 | ||
|
|
3128eb38c0 | ||
|
|
14ef654612 | ||
|
|
bc5193f95e | ||
|
|
8cbb4a38bc | ||
|
|
fce08c83ef | ||
|
|
018e99f9e6 | ||
|
|
7fe390b34b | ||
|
|
8c7202c569 | ||
|
|
ab386bb53c | ||
|
|
87c791b8c7 | ||
|
|
00e3e2d19d | ||
|
|
8d7d5c7b04 | ||
|
|
849a18e159 | ||
|
|
a4357d0843 | ||
|
|
e2b4a78b59 | ||
|
|
01387b5488 | ||
|
|
168e2f80b8 | ||
|
|
4f79ef8708 | ||
|
|
16497833df | ||
|
|
cd6a50d5a0 | ||
|
|
4c5a61f2d8 | ||
|
|
1fd8d39970 | ||
|
|
d133d64890 | ||
|
|
b27aa8b60d | ||
|
|
230d67492e | ||
|
|
4f9d5b282c | ||
|
|
a2955e8722 | ||
|
|
df892671d5 | ||
|
|
7fa96eee1a | ||
|
|
a1030906c7 | ||
|
|
e6a9a4f4be | ||
|
|
efa1247596 | ||
|
|
069fcee721 | ||
|
|
66621404f1 | ||
|
|
e09609ea21 | ||
|
|
d02ae67bc0 | ||
|
|
27327d57c4 | ||
|
|
cce93b6df9 | ||
|
|
546104ba5b | ||
|
|
ca5816ba14 | ||
|
|
e5bd16476e | ||
|
|
94431d4c2e | ||
|
|
f98d6892f1 | ||
|
|
1fe436cbe3 | ||
|
|
c5a37a9920 | ||
|
|
eed7e96096 | ||
|
|
a7f36a4162 | ||
|
|
8ba872d45d | ||
|
|
7a55451faa | ||
|
|
372571bd80 | ||
|
|
77120c0b90 | ||
|
|
01d1e44644 | ||
|
|
0ad8cddefe | ||
|
|
ce67253502 | ||
|
|
cb9f2c0617 | ||
|
|
635d9407ed | ||
|
|
0f9f6565f1 | ||
|
|
a45b6ad57e | ||
|
|
a5de06dedb | ||
|
|
fbfbd1ed98 | ||
|
|
8f06b3bd1a | ||
|
|
7e0dbceefc | ||
|
|
7e3db1de17 | ||
|
|
111790fdab | ||
|
|
bec03de7b8 | ||
|
|
f5dfae3a6c | ||
|
|
d3dec2b5f1 | ||
|
|
f083136998 | ||
|
|
cd3d0b370c | ||
|
|
f4c6632941 | ||
|
|
750cb9a669 | ||
|
|
62a198a017 | ||
|
|
5780ba0f3e | ||
|
|
86edeb1e0c | ||
|
|
53b1852f28 | ||
|
|
e3c385693b | ||
|
|
572c0fbfa1 | ||
|
|
bbdf71167a | ||
|
|
2136ccd9a2 | ||
|
|
2131aea575 | ||
|
|
32b21c7d29 | ||
|
|
8f6f6f316f | ||
|
|
66f9ac2791 | ||
|
|
ac0ba90438 | ||
|
|
990659ce91 | ||
|
|
00c602c844 | ||
|
|
9db62ffc39 | ||
|
|
e7c777e502 | ||
|
|
4991e8cea2 | ||
|
|
111d4e991f | ||
|
|
bedfa74a32 | ||
|
|
f6944dc223 | ||
|
|
a34a3051a3 | ||
|
|
0e13883faf | ||
|
|
e8860eda1b | ||
|
|
33ba4820b3 | ||
|
|
5ed0dda8ab | ||
|
|
bd260b2c6f | ||
|
|
aa01ab07f7 | ||
|
|
684cb90a7d | ||
|
|
172101ed55 | ||
|
|
98b5914726 | ||
|
|
d1518e7ba4 | ||
|
|
72d4faa52a | ||
|
|
862dcbf806 | ||
|
|
3db28f5136 | ||
|
|
f9e37f3c6a | ||
|
|
457681e6ec | ||
|
|
904bcf6852 | ||
|
|
e21e57ff84 | ||
|
|
562a69831a | ||
|
|
706a683540 | ||
|
|
8e2aee5e84 | ||
|
|
c009893377 | ||
|
|
3ae128d4c3 | ||
|
|
cb2164c21d | ||
|
|
951b7407fc | ||
|
|
f68facbe0e | ||
|
|
5535366bb1 | ||
|
|
d75b709f23 | ||
|
|
5a1fd0ca4d | ||
|
|
f4b85e0dbb | ||
|
|
c38bceb87e | ||
|
|
2569e8844e | ||
|
|
e42fa8351e | ||
|
|
9582a625ff | ||
|
|
81abb06f7b | ||
|
|
7cfea0eebe | ||
|
|
01c2bfe955 | ||
|
|
70242e6a07 | ||
|
|
c1edba974f | ||
|
|
546b3f230d | ||
|
|
14593eb487 | ||
|
|
838621a3ae | ||
|
|
283d4a5fce | ||
|
|
490cf44132 | ||
|
|
9dcbd86fc3 | ||
|
|
0a15011ec7 | ||
|
|
f7dfe1d869 | ||
|
|
5e9c9cb5fa | ||
|
|
c485c26c93 | ||
|
|
137d9296cd | ||
|
|
11b144da74 | ||
|
|
25ef9d9886 | ||
|
|
0e1e279209 | ||
|
|
a960897a83 | ||
|
|
69ab7849c5 | ||
|
|
bc55c3d892 | ||
|
|
cee1c41c35 | ||
|
|
6c5fe2463e | ||
|
|
880ce376b3 | ||
|
|
5a8b573bb7 | ||
|
|
ab1e750fa4 | ||
|
|
f6f4e1cd1a | ||
|
|
2a9549b106 | ||
|
|
1ed7ee3952 | ||
|
|
a69fc35f5a | ||
|
|
28e83dcf02 | ||
|
|
8c6df74237 | ||
|
|
d86cd6a8c6 | ||
|
|
c40d411d63 | ||
|
|
aca63abf49 | ||
|
|
4733615c4b | ||
|
|
80e5469653 | ||
|
|
4ea2cb18c7 | ||
|
|
840be65198 | ||
|
|
5a568df6cd | ||
|
|
cf57161174 | ||
|
|
7847e72f63 | ||
|
|
00999426b9 | ||
|
|
188da8b6ff | ||
|
|
59182b0ec8 | ||
|
|
6ced935c22 | ||
|
|
ad50475bb6 | ||
|
|
9c40f4918c | ||
|
|
62c802d2c3 | ||
|
|
3294760f6d | ||
|
|
85d72a1ee5 | ||
|
|
e02bb0f23c | ||
|
|
b0465775dc | ||
|
|
bd4b28e052 | ||
|
|
c6c5c849b4 | ||
|
|
cc5c3db1c1 | ||
|
|
f60236f06e | ||
|
|
bd63584207 | ||
|
|
e5fd3f6c9f | ||
|
|
423173413f | ||
|
|
a136d01da5 | ||
|
|
8ab675baf0 | ||
|
|
8d8e537cd4 | ||
|
|
d3b117a23f | ||
|
|
007982c481 | ||
|
|
ff9b0abfc7 | ||
|
|
275e983f55 | ||
|
|
bccb0b9976 | ||
|
|
d5f01537f8 | ||
|
|
6029363af8 | ||
|
|
cde61a57b8 | ||
|
|
2fc1768a7a | ||
|
|
50d73bcc1e | ||
|
|
0f570be7e5 | ||
|
|
658e6f7fdd | ||
|
|
d651932d9a | ||
|
|
6167c9f317 | ||
|
|
33acf06a71 | ||
|
|
9833e759cc | ||
|
|
918bb09d54 | ||
|
|
9a0a396872 | ||
|
|
6c6dc654e6 | ||
|
|
00c0cc3d9e | ||
|
|
0eb0fd3311 | ||
|
|
4e3823616d | ||
|
|
7450bae6d2 | ||
|
|
a2ddaf5341 | ||
|
|
b266a0ae57 | ||
|
|
ac9e649e02 | ||
|
|
506e1a4c1d | ||
|
|
c9d74a4cdf | ||
|
|
0ff2e6e273 | ||
|
|
c4c6ab3130 | ||
|
|
bc5b7638db | ||
|
|
2db147461c | ||
|
|
716c44746b | ||
|
|
0278a3ad47 | ||
|
|
3601047ffb | ||
|
|
8013319c14 | ||
|
|
b4f14bcb5b | ||
|
|
406beab9d6 | ||
|
|
58a8828503 | ||
|
|
fd563b732c | ||
|
|
30093f9db5 | ||
|
|
2f16c54cde | ||
|
|
bca7f2e19b | ||
|
|
2696106f96 | ||
|
|
9f7692f91c | ||
|
|
48b2ff5416 | ||
|
|
81104d7004 | ||
|
|
b56103f247 | ||
|
|
0923cf3acf | ||
|
|
fffb7d0188 | ||
|
|
f02124de0c | ||
|
|
a1a77f291b | ||
|
|
31bb7f62c6 | ||
|
|
bfb5fc3f5e | ||
|
|
ac2e53adc7 | ||
|
|
46e8e161d0 | ||
|
|
68e2255e1b | ||
|
|
222c1b5bba | ||
|
|
59c63da36f | ||
|
|
89fb7a7659 | ||
|
|
ea02bc470a | ||
|
|
361dc576f3 | ||
|
|
395ad907b8 | ||
|
|
bf5cdb1b99 | ||
|
|
45f9c80888 | ||
|
|
b80a72785b | ||
|
|
20ab916f9c | ||
|
|
76bfaa870e | ||
|
|
10ed702c2e | ||
|
|
e236be7a62 | ||
|
|
2fbd183322 | ||
|
|
14df29ce21 | ||
|
|
cb3d9e4862 | ||
|
|
d9a82878bf | ||
|
|
e484bef6df | ||
|
|
c8d358cc64 | ||
|
|
013765d5d2 | ||
|
|
ed2b07d5cf | ||
|
|
8d0780cef4 | ||
|
|
2ba25014c6 | ||
|
|
033a770759 | ||
|
|
b7832c133a | ||
|
|
93af618fa0 | ||
|
|
d4539c3a23 | ||
|
|
3d70a5ac79 | ||
|
|
f40b2f75bd | ||
|
|
46a49050b9 | ||
|
|
fb4fd15687 | ||
|
|
f3e18de45f | ||
|
|
fd3b187d32 | ||
|
|
820b555924 | ||
|
|
f8a0e67a2e | ||
|
|
99e77969ad | ||
|
|
fdb6276869 | ||
|
|
221e252acb | ||
|
|
dea01ffed6 | ||
|
|
166769e7e1 | ||
|
|
86d3314cb2 | ||
|
|
13a08298b7 | ||
|
|
66d2323626 | ||
|
|
cd432e3b3f | ||
|
|
cbf73f5194 | ||
|
|
5cd03f40f6 | ||
|
|
25b5f53f34 | ||
|
|
f9902a6ea5 | ||
|
|
0099bf53cb | ||
|
|
e6a8cf7a10 | ||
|
|
9b6855b424 | ||
|
|
6df8383580 | ||
|
|
b12663f404 | ||
|
|
66d3df0c10 | ||
|
|
a61e74c004 | ||
|
|
3d0a39dd34 | ||
|
|
6f643b8a1b | ||
|
|
d39cc71240 | ||
|
|
501fab147d | ||
|
|
6ee6cd7a1e | ||
|
|
7d5586d9a1 | ||
|
|
db78d713e7 | ||
|
|
ece5dfb799 | ||
|
|
1cb6b82f25 | ||
|
|
b0728650df | ||
|
|
48b4049d90 | ||
|
|
7f8efcdf41 | ||
|
|
dfa356e9d9 | ||
|
|
964537219a | ||
|
|
07eecc860f | ||
|
|
faf25008f9 | ||
|
|
116a3563bb | ||
|
|
6880c88301 | ||
|
|
8590f4c383 | ||
|
|
ff1e034a87 | ||
|
|
b36948cf30 | ||
|
|
c01df71fd4 | ||
|
|
7d90571d50 | ||
|
|
0cc7e121c8 | ||
|
|
060cdbbf51 | ||
|
|
769a654ed6 | ||
|
|
469899e8eb | ||
|
|
024e0df8e1 | ||
|
|
7603829942 | ||
|
|
ad91ac9c93 | ||
|
|
7a22dead81 | ||
|
|
73bc5dd30e | ||
|
|
154157b976 | ||
|
|
c5551a1b64 | ||
|
|
0d292446a2 | ||
|
|
7ba0d0d3a0 | ||
|
|
88bd9216d0 | ||
|
|
d8b728a6b3 | ||
|
|
26acecb8e4 | ||
|
|
b64234a7a3 | ||
|
|
1ca5fd7204 | ||
|
|
6868d53224 | ||
|
|
993866ab5b | ||
|
|
3eddb524d0 | ||
|
|
956316c327 | ||
|
|
88ff734ec7 | ||
|
|
3fb6b34a1e | ||
|
|
81a4429767 | ||
|
|
73bf974b1c | ||
|
|
693fb9f43f | ||
|
|
b3e65aea9f | ||
|
|
bb149f9890 | ||
|
|
26d2c8188d | ||
|
|
051d45edce | ||
|
|
6e35d7683c | ||
|
|
da405793da | ||
|
|
ef9aa8e195 | ||
|
|
7899c3a49f | ||
|
|
3394409183 | ||
|
|
300cf10413 | ||
|
|
8203f75cc9 | ||
|
|
10e0453a54 | ||
|
|
b131c34717 | ||
|
|
94a0f44fc5 | ||
|
|
8a47d7dc0f | ||
|
|
7a18c86927 | ||
|
|
958a296662 | ||
|
|
d932a0a990 | ||
|
|
3060d89ed4 | ||
|
|
54447e187a | ||
|
|
e4d62cc4af | ||
|
|
83a1770bac | ||
|
|
fd9793a42f | ||
|
|
47ba8fe0af | ||
|
|
639df50a31 | ||
|
|
bded1eab15 | ||
|
|
4a06c7b0bb | ||
|
|
08775dcca9 | ||
|
|
011fd8d175 | ||
|
|
f2ef3644aa | ||
|
|
b3a319b336 | ||
|
|
667a39dfd3 | ||
|
|
8f9b9952ea | ||
|
|
444e39ce33 | ||
|
|
74ad038f21 | ||
|
|
00401befca | ||
|
|
f5bffd6f74 | ||
|
|
63ac23a999 | ||
|
|
41e4cacdd8 | ||
|
|
a61e0086e0 | ||
|
|
6f7ebb4cbf | ||
|
|
43db02f97d | ||
|
|
3d4c51c532 | ||
|
|
45718eb41a | ||
|
|
90d51b979a | ||
|
|
6261256dea | ||
|
|
b1a508f209 | ||
|
|
17eedeaf38 | ||
|
|
733919e1df | ||
|
|
7f7eec18bc | ||
|
|
7c70f8c9bc | ||
|
|
9473364fde | ||
|
|
f8fc909fe6 | ||
|
|
d5a42f2316 | ||
|
|
9837330be0 | ||
|
|
c99bc2c38d | ||
|
|
9896918c35 | ||
|
|
0e605c66c4 | ||
|
|
4bf7ef0e25 | ||
|
|
438fef9f26 | ||
|
|
489a00e2d2 | ||
|
|
a1dd5b4188 | ||
|
|
3b5c66d192 | ||
|
|
10df10abfd | ||
|
|
4e0607b09c | ||
|
|
96f8f2cb28 | ||
|
|
4d91b92a33 | ||
|
|
9ad96608cf | ||
|
|
73f4dcd828 | ||
|
|
95cff8b986 | ||
|
|
f2ffdc9e58 | ||
|
|
702abbf7b1 | ||
|
|
cc0076a204 | ||
|
|
3f64d1044b | ||
|
|
28a0dd8b97 | ||
|
|
1787dbde4d | ||
|
|
6c10bff565 | ||
|
|
479fec4c59 | ||
|
|
1533e0fe74 | ||
|
|
242416a25d | ||
|
|
03689c6a0b | ||
|
|
2e9f1c18e5 | ||
|
|
c405cd93be | ||
|
|
99bbff0d34 | ||
|
|
653debbbc2 | ||
|
|
2279eb8e31 | ||
|
|
f475fafbf1 | ||
|
|
52bb86ad78 | ||
|
|
535a590ffd | ||
|
|
b2143557bd | ||
|
|
a6c47f5122 | ||
|
|
fddb2db8c7 | ||
|
|
da58578d33 | ||
|
|
391821bf16 | ||
|
|
7ae314fb2c | ||
|
|
7b141a5eaa | ||
|
|
0b1357c2ee | ||
|
|
417072bf00 | ||
|
|
ff0fa1802d | ||
|
|
07e07e61ee | ||
|
|
4f939d7ea4 | ||
|
|
9fa4b97e5e | ||
|
|
b890813732 | ||
|
|
f9650c565c | ||
|
|
6eca35759f | ||
|
|
c927e58ce4 | ||
|
|
4c7ba04274 | ||
|
|
bb60813323 | ||
|
|
4fc7dd447e | ||
|
|
dc0b39d6b5 | ||
|
|
84058f9833 | ||
|
|
d78fc5bf9c | ||
|
|
d839037c09 | ||
|
|
cfe0ef8864 | ||
|
|
e2d12d766f | ||
|
|
e73647780c | ||
|
|
1de11365c1 | ||
|
|
7ebf8aca5b | ||
|
|
58b8f354e0 | ||
|
|
2bfcc7e0f2 | ||
|
|
a7ddc69679 | ||
|
|
86d1f9470e | ||
|
|
57a233d51b | ||
|
|
a021fcd951 | ||
|
|
3bfa49236e | ||
|
|
0e52416a9b | ||
|
|
a0f8258cad | ||
|
|
a2da057581 | ||
|
|
56cbe4c5b6 | ||
|
|
48c9bd6dfd | ||
|
|
a30b69db4c | ||
|
|
e57ddbb6eb | ||
|
|
f1068eacd8 | ||
|
|
b762741a6e | ||
|
|
1f59aaca43 | ||
|
|
53d4fd8547 | ||
|
|
0eea1ae0c6 | ||
|
|
43a2ca9407 | ||
|
|
30ed4179d6 | ||
|
|
6f715a663a | ||
|
|
1d30623222 | ||
|
|
4db71b4b0d | ||
|
|
fe6d698b74 | ||
|
|
7393b3c716 | ||
|
|
493fcb2f05 | ||
|
|
47c509c0a7 | ||
|
|
c98783d33f | ||
|
|
b71c9d7bf3 | ||
|
|
25ed49f1a6 | ||
|
|
cb0a3314b6 | ||
|
|
3880197d02 | ||
|
|
ec04da06d7 | ||
|
|
4654e9f7c7 | ||
|
|
fc3517584d | ||
|
|
8677e98a24 | ||
|
|
152dc13ded | ||
|
|
76ab6282a9 | ||
|
|
61b264cd70 | ||
|
|
3714fea994 | ||
|
|
e1a820d1f9 | ||
|
|
3f94dadcef | ||
|
|
e67d6ce53c | ||
|
|
13cf53e885 | ||
|
|
f95be0996d | ||
|
|
dbc5a1e45c | ||
|
|
dd30e4b3ec | ||
|
|
9468c0435a | ||
|
|
4be5933dc8 | ||
|
|
fe5ba06328 | ||
|
|
a2f5db8d3c | ||
|
|
b48e65a9d8 | ||
|
|
18471a201f | ||
|
|
1d61a3af8b | ||
|
|
e4f5b8f95c | ||
|
|
d31ab133f4 | ||
|
|
dcc15dd42b | ||
|
|
280f2c0af5 | ||
|
|
890264ef7d | ||
|
|
e9d58a4f74 | ||
|
|
9020798f90 | ||
|
|
7167df10e6 | ||
|
|
8bedd7aa2a | ||
|
|
357e747391 | ||
|
|
8c11721c75 | ||
|
|
da13235c88 | ||
|
|
aababce74c | ||
|
|
a395004027 | ||
|
|
0489394d67 | ||
|
|
4cde774cc2 | ||
|
|
baa2b105d3 | ||
|
|
9667d9ffa8 | ||
|
|
b8b85b569c | ||
|
|
27f2d05c56 | ||
|
|
49e1c0758d | ||
|
|
2299eb0e33 | ||
|
|
b6e17594c6 | ||
|
|
19c2724e8b | ||
|
|
7f4591bcec | ||
|
|
4de7ee4ce0 | ||
|
|
eb6f1718a8 | ||
|
|
36ce09c4f1 | ||
|
|
1994a615c2 | ||
|
|
82b75a5aa9 | ||
|
|
2ec91f58ae | ||
|
|
e9cd7ef5ca | ||
|
|
29aff06b1d | ||
|
|
18f3414f34 | ||
|
|
a7b236d528 | ||
|
|
46fdf03925 | ||
|
|
f67f31baa2 | ||
|
|
1fcbb8ea7d | ||
|
|
60ef682c80 | ||
|
|
c668a22345 | ||
|
|
cb69f011e5 | ||
|
|
176e96fd1f | ||
|
|
43e550b9b2 | ||
|
|
ee139d5ff0 | ||
|
|
5c5ec3e16c | ||
|
|
da82d679ce | ||
|
|
834a08d58d | ||
|
|
395485527e | ||
|
|
8c9fd45fcc | ||
|
|
59356b9f28 | ||
|
|
bb3cc84ca4 | ||
|
|
ac2c708d01 | ||
|
|
57497dbd74 | ||
|
|
827d0cdf5a | ||
|
|
e3539f17bd | ||
|
|
b88580ad9a | ||
|
|
8d8cceaeea | ||
|
|
290c7988b2 | ||
|
|
f97767aff4 | ||
|
|
fae14d4f9b | ||
|
|
699247266e | ||
|
|
5c8b80741f | ||
|
|
e5287d876b | ||
|
|
b3e6e42790 | ||
|
|
fce5b9696f | ||
|
|
f252ed63d5 | ||
|
|
3114d3a27d | ||
|
|
e186bfe80d | ||
|
|
3db2a4b30d | ||
|
|
1c25138eaf | ||
|
|
1807c95c53 | ||
|
|
7ea78ee48a | ||
|
|
5d57feaea5 | ||
|
|
f4583e46bf | ||
|
|
5ed00a67c4 | ||
|
|
0148c539be | ||
|
|
51cdf864be | ||
|
|
bd9ee49255 | ||
|
|
16c377427a | ||
|
|
66dcfa40b0 | ||
|
|
e726ef505f | ||
|
|
a686a2e9d1 | ||
|
|
720ee71f8b | ||
|
|
557cdf6cfb | ||
|
|
6b93675ec1 | ||
|
|
9419c4c639 | ||
|
|
7eb243a18f | ||
|
|
3a2b531d4c | ||
|
|
05068f8df5 | ||
|
|
a6d80667c1 | ||
|
|
a0dccadfd7 | ||
|
|
7992eab16c | ||
|
|
a1c6f720a2 | ||
|
|
a1162f1b0f | ||
|
|
80f21ae2f0 | ||
|
|
fce8623595 | ||
|
|
e82a5c8026 | ||
|
|
517d4cfc82 | ||
|
|
7f7f7e752e | ||
|
|
5963db479e | ||
|
|
96266ab310 | ||
|
|
c7f6b396e0 | ||
|
|
b7ca91f9e2 | ||
|
|
9ec7cdb070 | ||
|
|
3e1220fa0e | ||
|
|
660946215e | ||
|
|
a7b38335c9 | ||
|
|
e4803cc89d | ||
|
|
b104298c7d | ||
|
|
e049375bbc | ||
|
|
f48bd550b7 | ||
|
|
00ec064dc3 | ||
|
|
4c5409aa01 | ||
|
|
6166c87e16 | ||
|
|
159cd74c28 | ||
|
|
60ef83dd34 | ||
|
|
3c02c5957e | ||
|
|
bbef071931 | ||
|
|
726928aadc | ||
|
|
7ad386d28f | ||
|
|
a4c9bdef4a | ||
|
|
a64edc70ed | ||
|
|
f6826432d0 | ||
|
|
f29efa8f60 | ||
|
|
e7bcf489eb | ||
|
|
15d43f6313 | ||
|
|
a7f7374f96 | ||
|
|
de1a1cbe9a | ||
|
|
27a0e8ee3a | ||
|
|
db4f193046 | ||
|
|
118182a6cc | ||
|
|
442b3bd233 | ||
|
|
12c96f321b | ||
|
|
f77d8d5219 | ||
|
|
b7d5a3f9c6 | ||
|
|
b887ca01d0 | ||
|
|
179ff9b10a | ||
|
|
4c18629cd7 | ||
|
|
295e79984f | ||
|
|
8f910f95f4 | ||
|
|
ee55055385 | ||
|
|
674edfc330 | ||
|
|
c33e5029df | ||
|
|
a2f205362a | ||
|
|
3d6771b3d2 | ||
|
|
fe9ff0c337 | ||
|
|
754545cc40 | ||
|
|
aab45b1b14 | ||
|
|
9eaa00e878 | ||
|
|
8520ca44ee | ||
|
|
6b8ac5e939 | ||
|
|
5767acb5bf | ||
|
|
9e3fc97727 | ||
|
|
7817499da7 | ||
|
|
1c43e92577 | ||
|
|
3e4f945d56 | ||
|
|
491c4d25d7 | ||
|
|
2432d57d70 | ||
|
|
9408b592fd | ||
|
|
743f192d85 | ||
|
|
4e47b0acb7 | ||
|
|
43ab4e1e42 | ||
|
|
9b28cdbcd2 | ||
|
|
acb29c33d3 | ||
|
|
e3eee3dc02 | ||
|
|
e3eae25caa | ||
|
|
cc23869128 | ||
|
|
36c11961b6 | ||
|
|
f21dc94979 | ||
|
|
d4ab850e7b | ||
|
|
edf6e075f2 | ||
|
|
92c3b8314d | ||
|
|
33260fc820 | ||
|
|
5b5afec84d | ||
|
|
d818e697e9 | ||
|
|
03edb20265 | ||
|
|
4157062442 | ||
|
|
2f46645149 | ||
|
|
31f4576acd | ||
|
|
e1d85b0a04 | ||
|
|
961cf347da | ||
|
|
02c4655f0d | ||
|
|
b7b94ca900 | ||
|
|
8671b52cbb | ||
|
|
9fe045b916 | ||
|
|
4d2a914719 | ||
|
|
1cfcf03ede | ||
|
|
a81d2e9ccc | ||
|
|
d7cf2c19ab | ||
|
|
42c72349dd | ||
|
|
027a228734 | ||
|
|
543aed0350 | ||
|
|
fa704c5d66 | ||
|
|
ad6adb221c | ||
|
|
5978a80b46 | ||
|
|
8c4f380d73 | ||
|
|
273de18ae3 | ||
|
|
44082fe78e | ||
|
|
9e6295e008 | ||
|
|
eaf4e3d71e | ||
|
|
bd52f1bb3c | ||
|
|
6682355c1b | ||
|
|
f76b08ab27 | ||
|
|
1943a55bcc | ||
|
|
9ec822a095 | ||
|
|
04f67d4052 | ||
|
|
d9251f16db | ||
|
|
f268ed8427 | ||
|
|
58881f8ef5 | ||
|
|
addc68b5f1 | ||
|
|
79368af6ee | ||
|
|
9f64d84c5a | ||
|
|
bafc8abfc0 | ||
|
|
abaa962531 | ||
|
|
8049792dc4 | ||
|
|
7dbd5de980 | ||
|
|
36a965a1c3 | ||
|
|
d382bad8e1 | ||
|
|
186f18f4d2 | ||
|
|
c777fc969a | ||
|
|
1b176ed5ad | ||
|
|
2654c8a614 | ||
|
|
23e3dc465d | ||
|
|
132cb89b90 | ||
|
|
39ca55fd84 | ||
|
|
d457fb0011 | ||
|
|
42620bf739 | ||
|
|
fc8d19756d | ||
|
|
45dce3210a | ||
|
|
9dbb32c982 | ||
|
|
cf84ab5921 | ||
|
|
05d01bbcc5 | ||
|
|
64b8058dc6 | ||
|
|
ba09d9440f | ||
|
|
21fc6505ff | ||
|
|
5a27de7550 | ||
|
|
9c9324e7d9 | ||
|
|
e938621996 | ||
|
|
4cf1f4ba15 | ||
|
|
ce937bd0bb | ||
|
|
3e4963e56c | ||
|
|
adb205d8fa | ||
|
|
c4f6a6823d | ||
|
|
f53a37c496 | ||
|
|
fbc1c6b60a | ||
|
|
6559a405e1 | ||
|
|
45ec45c206 | ||
|
|
a0ff754464 | ||
|
|
a7f0f30af2 | ||
|
|
c48d8f9a45 | ||
|
|
276cbd6aa1 | ||
|
|
6f1ba85869 | ||
|
|
9bba05f26c | ||
|
|
5d75e11679 | ||
|
|
d58a67012d | ||
|
|
7e41b747dd | ||
|
|
4dd23b8e76 | ||
|
|
19403e0ae5 | ||
|
|
2ff87a0655 | ||
|
|
f0b12799b8 | ||
|
|
c81850cb36 | ||
|
|
d7fe8bfeee | ||
|
|
06c5beae7d | ||
|
|
c929ddbe97 | ||
|
|
77b557fb13 | ||
|
|
dbc58e0bc9 | ||
|
|
1bb5e0c056 | ||
|
|
31c03681fa | ||
|
|
742dc43c5d | ||
|
|
a9a241cc41 | ||
|
|
3ffaeed317 | ||
|
|
8950cf9533 | ||
|
|
21bdb374d0 | ||
|
|
3b2ce1e85a | ||
|
|
ffc84334bf | ||
|
|
c37370a50a | ||
|
|
43c8218a14 | ||
|
|
625c859e0d | ||
|
|
2ee2eb4274 | ||
|
|
6262ad637d | ||
|
|
df78225114 | ||
|
|
130de57d1a | ||
|
|
d7aba9bb64 | ||
|
|
77bf9c6f16 | ||
|
|
b44d144b26 | ||
|
|
376a528fac | ||
|
|
6dec156d4d | ||
|
|
372f27b6ac | ||
|
|
d6d2d394bc | ||
|
|
7c326ce0d7 | ||
|
|
1ae26d39c2 | ||
|
|
702d427183 | ||
|
|
432ba338b7 | ||
|
|
c1ce09ac52 | ||
|
|
57982d3c43 | ||
|
|
c168a6c685 | ||
|
|
17479ac08b | ||
|
|
a73819214b | ||
|
|
c5730b31f7 | ||
|
|
4bfebdea13 | ||
|
|
d040754d8c | ||
|
|
7943ebc8f8 | ||
|
|
5ce0b90d9f | ||
|
|
e97d892926 | ||
|
|
3b026ce204 | ||
|
|
d269828924 | ||
|
|
1e1560651a | ||
|
|
782e1ef506 | ||
|
|
3a3c805792 | ||
|
|
51235a61ad | ||
|
|
f493de998c | ||
|
|
72b5acfece | ||
|
|
176ddf6abb | ||
|
|
44c52300e4 | ||
|
|
2eae6cdfda | ||
|
|
0f896d0a4f | ||
|
|
02189c4262 | ||
| d649a0caa1 | |||
| e28894549c | |||
| b3ef90237f | |||
| ebc4e08986 | |||
| 8d74a35f29 | |||
| a37e164c0b | |||
| a71b504589 | |||
|
|
20cd27d7f6 | ||
|
|
ac889dcba9 | ||
|
|
70bbb12285 | ||
|
|
e7e568f67a | ||
|
|
3452ae1d66 | ||
|
|
2ad336b13a | ||
|
|
78b15b78fa | ||
|
|
eb7b637703 | ||
|
|
b083a0801f | ||
|
|
471f1076c4 | ||
|
|
e50fe63e02 | ||
|
|
7682054dea | ||
|
|
1e3c2f039b | ||
|
|
a832e56b42 | ||
|
|
3858cfd9ba | ||
|
|
5b4fd892ff | ||
|
|
4ffa88805c | ||
|
|
2a0b26f2fd | ||
|
|
30308eb308 | ||
|
|
5f8cbe524e | ||
|
|
a2f0142712 | ||
|
|
d2c6529d2a | ||
|
|
b23e32df7f | ||
|
|
a94a0a2f87 | ||
|
|
6fe40e9438 | ||
|
|
d4523e8e1d | ||
|
|
9fadef2a6e | ||
|
|
1970a1b47d | ||
|
|
19d090859c | ||
|
|
7fda77bd1e | ||
|
|
34c14c922c | ||
|
|
0f8a1057dc | ||
|
|
a74faca9cb | ||
|
|
336aa85cf8 | ||
|
|
43710a4c4d | ||
|
|
451cf90939 | ||
|
|
6713f48361 | ||
|
|
f6e3b35482 | ||
|
|
1d7e58d3bf | ||
|
|
b501cd374b | ||
|
|
e6f5723ecc | ||
|
|
998c79d331 | ||
|
|
a21d6e834d | ||
|
|
a4541dd764 | ||
|
|
e788dd543e | ||
|
|
f24fa81d87 | ||
|
|
20fb2a3e92 | ||
|
|
e7f77291e4 | ||
|
|
fa0848c8b2 | ||
|
|
8a740091b3 | ||
|
|
5fa3be5886 | ||
|
|
a9d2f097d8 | ||
|
|
450483acc7 | ||
|
|
43019185a8 | ||
|
|
f537b36662 | ||
|
|
98385b8b56 | ||
|
|
8d44046a90 | ||
|
|
9b1ab459a0 | ||
|
|
f4c0d19734 | ||
|
|
f088bdcf8b | ||
|
|
60600dbe2f | ||
|
|
eb95cc4b47 | ||
|
|
57dfdacffa | ||
|
|
0c839790fe | ||
|
|
1f29916e09 | ||
|
|
310023dc94 | ||
|
|
9448dcefb4 | ||
|
|
167e77ddf2 | ||
|
|
dc586ad82e | ||
|
|
6d331f882f | ||
|
|
b945760c72 | ||
|
|
98aa49c2c3 | ||
|
|
78feab88bf | ||
|
|
6f005d467d | ||
|
|
324011f01b | ||
|
|
0d97d2a02d | ||
|
|
37bec38524 | ||
|
|
847795c0ef | ||
|
|
aa1a5a1550 | ||
|
|
997b3cbecd | ||
|
|
652aced790 | ||
|
|
47af067c03 | ||
|
|
5b31e3eb87 | ||
|
|
0bb4b069e7 | ||
|
|
eded658d38 | ||
|
|
1caeb0ed6b | ||
|
|
611a1f0a04 | ||
|
|
13e58e6f80 | ||
|
|
d6853d381f | ||
|
|
b6cc14fe2f | ||
|
|
9b1f9fa9dd | ||
|
|
cca53b6376 | ||
|
|
1aa991f89f | ||
|
|
7407bbefdf | ||
|
|
40fb835d9c | ||
|
|
e4df92fb54 | ||
|
|
7b9760e376 | ||
|
|
52607545fa | ||
|
|
849756531d | ||
|
|
2e16240fb8 | ||
|
|
181beda455 | ||
|
|
d0f77f4b78 | ||
|
|
dea2f6c8d7 | ||
|
|
615fd414ec | ||
|
|
7296498410 | ||
|
|
554970c036 | ||
|
|
057abe6ba5 | ||
|
|
3b215eb7af | ||
|
|
1abaa0e5c5 | ||
|
|
0c5cb1686e | ||
|
|
21f0aabae0 | ||
|
|
e5458c1ab9 | ||
|
|
a30c0395aa | ||
|
|
0b9006faf3 | ||
|
|
adefb776fe | ||
|
|
ee089b0f31 | ||
|
|
44200458c5 | ||
|
|
5d2d4eae17 | ||
|
|
25f87cae53 | ||
|
|
1e4f11a6ce | ||
|
|
36b9dcaf43 | ||
|
|
ad3aff6a50 | ||
|
|
3bd6da6276 | ||
|
|
3ccc8cdd7b | ||
|
|
501f3a4eec | ||
|
|
cfc6f65da5 | ||
|
|
5853ac1823 | ||
|
|
3057b2a12f | ||
|
|
9ce90b76a4 | ||
|
|
e016a20c21 | ||
|
|
8fb8352c8d | ||
|
|
ed7ecd98c4 | ||
|
|
512c78e192 | ||
|
|
81b3082087 | ||
|
|
6fff929856 | ||
|
|
e636deb08e | ||
|
|
464d5bedda | ||
|
|
9cc70d4212 | ||
|
|
737cdb74bd | ||
|
|
a833139e13 | ||
|
|
4ec9377f78 | ||
|
|
e9e96f287f | ||
|
|
57745f5d0a | ||
|
|
515c2d1f60 | ||
|
|
decbde8d63 | ||
|
|
08c892d4ff | ||
|
|
850a31d172 | ||
|
|
6ae419eeee | ||
|
|
40bae13411 | ||
|
|
61946fe52e | ||
|
|
27cede0fad | ||
|
|
adae63eabb | ||
|
|
3ff5f74af7 | ||
|
|
c3c151b375 | ||
|
|
2163d09c08 | ||
|
|
ea70c2ef9e | ||
|
|
53f949571e | ||
|
|
1d64a6b799 | ||
|
|
84b5790ab2 | ||
|
|
6aa8de3506 | ||
|
|
c1b55139b6 | ||
|
|
670417dc6a | ||
|
|
bd1d1f8ae4 | ||
|
|
29a922e41f | ||
|
|
ac9fd5e618 | ||
|
|
9d6a74680a | ||
|
|
9d52cf27d8 | ||
|
|
35c38387e1 | ||
|
|
908997ddef | ||
|
|
cf0b95e955 | ||
|
|
5bf5d44c96 | ||
|
|
854776dac0 | ||
|
|
6e1ba35ca3 | ||
|
|
a5a41e3b0c | ||
|
|
e78114dd53 | ||
|
|
6174f3709c | ||
|
|
7f1f9b0221 | ||
|
|
0af4e2adb9 | ||
|
|
d5ab596749 | ||
|
|
3d128d4850 | ||
|
|
46aa6fcc48 | ||
|
|
60d1eb4e3c | ||
|
|
4b2c55d90e | ||
|
|
0023c0a4c6 | ||
|
|
0265793a3f | ||
|
|
b99d247ba5 | ||
|
|
bdc1e592a7 | ||
|
|
d3ef7e7f81 | ||
|
|
78dfec15d6 | ||
|
|
7a824e09a3 | ||
|
|
7c58355048 | ||
|
|
89662e7e2c | ||
|
|
718fc750d9 | ||
|
|
9e143fbb73 | ||
|
|
c561181bdf | ||
|
|
b45920109f | ||
|
|
07290fe7ce | ||
|
|
944f57b04a | ||
|
|
4079c6596e | ||
|
|
defe6c4f26 | ||
|
|
ed2a46e059 | ||
|
|
498a0ef7e8 | ||
|
|
06d34d8c55 | ||
|
|
cd670212a2 | ||
|
|
41e58e0bd6 | ||
|
|
b0af47a422 | ||
|
|
ccfb0c72dd | ||
|
|
be1b87a1af | ||
|
|
33ffb80241 | ||
|
|
42b61af93d | ||
|
|
cfdba225e0 | ||
|
|
8c0b3fd31d | ||
|
|
ef88d3e437 | ||
|
|
cbbb04655b | ||
|
|
956b768475 | ||
|
|
51768a5a27 | ||
|
|
4a58967590 | ||
|
|
bc879ee8e2 | ||
|
|
d3046fa588 | ||
|
|
ce8fefe9f8 | ||
|
|
f7369ef4ae | ||
|
|
c0cfb97034 | ||
|
|
c742e9fd31 | ||
|
|
1d1522a9c4 | ||
|
|
a9925b3f15 | ||
|
|
2ea9a58a41 | ||
|
|
9abf7bb45b | ||
|
|
6afaf462f8 | ||
|
|
b1ac913dd8 | ||
|
|
4e5b16c0e2 | ||
|
|
56b2a41eee | ||
|
|
8b32f29c2a | ||
|
|
52ad2e2ddc | ||
|
|
2edd5542f8 | ||
|
|
cb27f145a3 | ||
|
|
44cbe58486 | ||
|
|
1c8844c3c4 | ||
|
|
6c864ea59a | ||
|
|
9818685856 | ||
|
|
51e709acf6 | ||
|
|
f826899f45 | ||
|
|
b3f9aa3d28 | ||
|
|
d9c31f6661 | ||
|
|
2af3f15997 | ||
|
|
701e4bbdbb | ||
|
|
ce8e2597fe | ||
|
|
b185852271 | ||
|
|
7a2ac914df | ||
|
|
a0e3eb21c5 | ||
|
|
c9132b02a4 | ||
|
|
0e81b0f8c8 | ||
|
|
de3bd91d4d | ||
|
|
ad35dab32b | ||
|
|
b650999f96 | ||
|
|
9c2974e4f0 | ||
|
|
00859ee26b | ||
|
|
89218c7529 | ||
|
|
53d94f1f51 | ||
|
|
332700fd64 | ||
|
|
8e1dd048b5 | ||
|
|
e9e6b25276 | ||
|
|
ab6080767b | ||
|
|
87e27e8a4b | ||
|
|
3b56679a32 | ||
|
|
bbf46a0d6d | ||
|
|
8622268445 | ||
|
|
201c20b56f | ||
|
|
835430bf84 | ||
|
|
4db12c500e | ||
|
|
77b9809eaa | ||
|
|
e2f84ee25a | ||
|
|
15f414f43d | ||
|
|
e060d99b02 | ||
|
|
97ca282f8a | ||
|
|
a1980cf766 | ||
|
|
82dc468868 | ||
|
|
5eb162718c | ||
|
|
04b4ac00fc | ||
|
|
345223c159 | ||
|
|
44adb2a018 | ||
|
|
f4ef9a1612 | ||
|
|
9066c6428a | ||
|
|
6c45388172 | ||
|
|
c9265c640a | ||
|
|
5deb724f7d | ||
|
|
fd21edd024 | ||
|
|
b1d5490e1b | ||
|
|
7248af35de | ||
|
|
601049ffe1 | ||
|
|
7ae418c597 | ||
|
|
e29c3af8bb | ||
|
|
23f587165a | ||
|
|
0e0b6db4a5 | ||
|
|
7295179f5d | ||
|
|
03dad89787 | ||
|
|
7b227181f2 | ||
|
|
f3994316e3 | ||
|
|
57792bd230 | ||
|
|
09bdb4e52b | ||
|
|
5ceb59daae | ||
|
|
f3d8c6b98a | ||
|
|
82749e9e19 | ||
|
|
6859d70ca7 | ||
|
|
34cfca88d7 | ||
|
|
5ccda32d63 | ||
|
|
5dfdfb8151 | ||
|
|
23b1692702 | ||
|
|
706fa901e2 | ||
|
|
1c553df53a | ||
|
|
f1416f46fc | ||
|
|
b988de13bb | ||
|
|
f74f7b3814 | ||
|
|
c406059177 | ||
|
|
1dcce5f3b2 | ||
|
|
cb2f011b19 | ||
|
|
70871ee4fd | ||
|
|
2f7647c5ba | ||
|
|
f536173dea | ||
|
|
9488dc61f9 | ||
|
|
6f74595305 | ||
|
|
a1f32ca333 | ||
|
|
45ab91267f | ||
|
|
3472ccc73d | ||
|
|
a9789b1c21 | ||
|
|
20095c01d1 | ||
|
|
653b256253 | ||
|
|
a9a66bf21e | ||
|
|
2fd310baed | ||
|
|
ef94e1bf3a | ||
|
|
fe91265f62 | ||
|
|
b8a9c42a3b | ||
|
|
b0ecb28b48 | ||
|
|
6cb81b461b | ||
|
|
9b44971de8 | ||
|
|
c8908f38fb | ||
|
|
d7c721ae5b | ||
|
|
4d3d00bc58 | ||
|
|
5eaeaaa79f | ||
|
|
d77af59521 | ||
|
|
b5093d19f4 | ||
|
|
ef14e8b38c | ||
|
|
0f3c234ca0 | ||
|
|
563d820fbe | ||
|
|
d15757dcc2 | ||
|
|
9d28505140 | ||
|
|
ce91e75cd2 | ||
|
|
4809d4193e | ||
|
|
9ee310e73f | ||
|
|
1380fa768c | ||
|
|
0ea58e0858 | ||
|
|
d1c1631bae | ||
|
|
ef2b845837 | ||
|
|
e252364c59 | ||
|
|
bc14c6f625 | ||
|
|
bcc1b25023 | ||
|
|
5f609f41a5 | ||
|
|
38589fbebe | ||
|
|
356316aaa3 | ||
|
|
b554409b32 | ||
|
|
076d854f11 | ||
|
|
14852fa3e9 | ||
|
|
42e2823e28 | ||
|
|
535e78a8b3 | ||
|
|
c8480a17e9 | ||
|
|
6989158216 | ||
|
|
7fc3d13c99 | ||
|
|
7ce56b8913 | ||
|
|
a0980138f9 | ||
|
|
16e01e510e | ||
|
|
ee628778cf | ||
|
|
36a30a6318 | ||
|
|
096f162ea6 | ||
|
|
22c213b10f | ||
|
|
ba66610a01 | ||
|
|
ab4a055194 | ||
|
|
2ce2f91414 | ||
|
|
0f1c8c7b2f | ||
|
|
8adcd4b8a9 | ||
|
|
db5a8594fd | ||
|
|
5238d855b4 | ||
|
|
6c2cbe5f20 | ||
|
|
27ce516dd9 | ||
|
|
981479ca5f | ||
|
|
70a41855d1 | ||
|
|
3571ef404c | ||
|
|
86ee26381c | ||
|
|
198b18ec89 | ||
|
|
18ff09befa | ||
|
|
bd48c266b8 | ||
|
|
cf410dfbdd | ||
|
|
4afac2a2fb | ||
|
|
d96f45c3b3 | ||
|
|
e381f66767 | ||
|
|
d0b9cdc503 | ||
|
|
e846222ace | ||
|
|
b3e9b128b6 | ||
|
|
0708d05ec9 | ||
|
|
f4eda19684 | ||
|
|
b0c71e0f6c | ||
|
|
3b675ad8ed | ||
|
|
4c95f6bfbc | ||
|
|
98715e4579 | ||
|
|
89af52b14b | ||
|
|
1b4c1b8d7f | ||
|
|
aea6840263 | ||
|
|
cc33d04f32 | ||
|
|
e75ab93838 | ||
|
|
85f3cb4d19 | ||
|
|
dab880bc82 | ||
|
|
004bb0cfca | ||
|
|
ca0ca8fd98 | ||
|
|
660f027c01 | ||
|
|
a69648274c | ||
|
|
eee820bc73 | ||
|
|
4e9fbf6764 | ||
|
|
f78856c58e | ||
|
|
e5a3b6c6ac | ||
|
|
37a3e36bd5 | ||
|
|
99eeeb915a | ||
|
|
00f6d46f71 | ||
|
|
41660e4074 | ||
|
|
88367fc7a6 | ||
|
|
5361235234 | ||
|
|
82634a32a5 | ||
|
|
cc89c937dc | ||
|
|
e0997f0ecb | ||
|
|
8127a999b3 | ||
|
|
490bebf632 | ||
|
|
82040d0525 | ||
|
|
eee6160565 | ||
|
|
8daae21a76 | ||
|
|
bb722d4a2b | ||
|
|
160be9048c | ||
|
|
46c2ed8332 | ||
|
|
101c8a2994 | ||
|
|
e7bfc8335e | ||
|
|
c17865d777 | ||
|
|
28cf3d878f | ||
|
|
67d6d4a3ee | ||
|
|
369891ba54 | ||
|
|
18ccd00083 | ||
|
|
ce36d5d43c | ||
|
|
0ee460b679 | ||
|
|
e77f415f38 | ||
|
|
6d78bd2b42 | ||
|
|
39d91a513b | ||
|
|
7075d7d5b2 | ||
|
|
17e67c674b | ||
|
|
e90a12418d | ||
|
|
ec4697c45e | ||
|
|
11862e6fba | ||
|
|
0e50c54754 | ||
|
|
90943f207a | ||
|
|
a6c62fb6ed | ||
|
|
cde97fdd3f | ||
|
|
3cfa230d2b | ||
|
|
5b57c84034 | ||
|
|
6bd4895255 | ||
|
|
21834a357d | ||
|
|
a51a95339b | ||
|
|
67f5ed49ec | ||
|
|
4d6bf2fb4b | ||
|
|
80e95f3e27 | ||
|
|
7e68ea5fb6 | ||
|
|
fecfeefb5b | ||
|
|
bca0410e28 | ||
|
|
67aea3b5ce | ||
|
|
94e3f15ee7 | ||
|
|
6519e8445e | ||
|
|
4ae14b6c73 | ||
|
|
4752c5ad2d | ||
|
|
b3f6e29a36 | ||
|
|
e5ea8098df | ||
|
|
83f037b704 | ||
|
|
6428cb39a5 | ||
|
|
1bc19d6cf7 | ||
|
|
0af32f12e3 | ||
|
|
24bd08a1b2 | ||
|
|
53fb02b4db | ||
|
|
a49d71f097 | ||
|
|
c78e2c0fbf | ||
|
|
66c9968932 | ||
|
|
39a5a1e637 | ||
|
|
0b83fd839a | ||
|
|
30399cecaf | ||
|
|
d3170ab219 | ||
|
|
2e5f943b79 | ||
|
|
a9ab373f0b | ||
|
|
bef232376b | ||
|
|
628365cb49 | ||
|
|
f9ed93641c | ||
|
|
0a63bea195 | ||
|
|
ef8bf5fc3e | ||
|
|
b7b630fc81 | ||
|
|
d784c33fe8 | ||
|
|
ec9f8ba46f | ||
|
|
97a351cd92 | ||
|
|
15de6ad437 | ||
|
|
5ef18545f8 | ||
|
|
2cdc62f4a2 | ||
|
|
1757ba149c | ||
|
|
4ae816e9a6 | ||
|
|
918acf2b58 | ||
|
|
77a5774965 | ||
|
|
8185e36839 | ||
|
|
6d937d91d2 | ||
|
|
d2b171427a | ||
|
|
acd3684ad4 | ||
|
|
18170b1793 | ||
|
|
6644e62887 | ||
|
|
94d769c01c | ||
|
|
228f7723e1 | ||
|
|
69b47c66b4 | ||
|
|
77b6e14e7f | ||
|
|
6bae8f1fa4 | ||
|
|
967b56db58 | ||
|
|
330cb313e7 | ||
|
|
83aac737c7 | ||
|
|
cb3ad51357 | ||
|
|
1bb945e9c7 | ||
|
|
e4ff198b27 | ||
|
|
762a2a907e | ||
|
|
cd00b2f1cd | ||
|
|
ec62da93a4 | ||
|
|
6518e581b6 | ||
|
|
1c2c16e50d | ||
|
|
68f105141a | ||
|
|
197dd0f724 | ||
|
|
996a7d5ef4 | ||
|
|
2197af2799 | ||
|
|
2b05efb0ff | ||
|
|
57f67749dc | ||
|
|
25ad789e61 | ||
|
|
59ef90e120 | ||
|
|
8ee2e89cc5 | ||
|
|
d5736a5b08 | ||
|
|
32a7035a90 | ||
|
|
9e61505205 | ||
|
|
51d2f43229 | ||
|
|
454755083c | ||
|
|
0b43a01976 | ||
|
|
4fda9d8ef3 | ||
|
|
34fc38961c | ||
|
|
c55f4d3d62 | ||
|
|
aec53318bf | ||
|
|
7a74b9bbf7 | ||
|
|
94597a7474 | ||
|
|
8996ae40d7 | ||
|
|
00a3320b72 | ||
|
|
e65932b806 | ||
|
|
d981a2ae4d | ||
|
|
855d2164c5 | ||
|
|
16f85bf2ab | ||
|
|
489e6f3027 | ||
|
|
42b7b1c9e4 | ||
|
|
ae03346bb7 | ||
|
|
cf49685406 | ||
|
|
8f92fb5ea5 | ||
|
|
6950be53a0 | ||
|
|
f3ec154cb1 | ||
|
|
c25f2f7cb6 | ||
|
|
6ef7db7ddf | ||
|
|
7f563df71c | ||
|
|
1f1d69d484 | ||
|
|
7079061f22 | ||
|
|
6a30651cc5 | ||
|
|
f183686463 | ||
|
|
d4fd2cd22f | ||
|
|
5adda6adaa | ||
|
|
dc2abfe043 | ||
|
|
4f865374c5 | ||
|
|
a5a7cc6a9b | ||
|
|
9f3550adbc | ||
|
|
fecb292e9b | ||
|
|
a0a959e901 | ||
|
|
23c250d44a | ||
|
|
cd7156d65b | ||
|
|
5c198ab916 | ||
|
|
b07f97097f | ||
|
|
34886ca643 | ||
|
|
276a37361e | ||
|
|
8d37948cec | ||
|
|
e3f312252b | ||
|
|
0f3dd61249 | ||
|
|
58e5118d45 | ||
|
|
6fa4cf17c7 | ||
|
|
3d13c8ff2a | ||
|
|
543e2ba093 | ||
|
|
30297385af | ||
|
|
37fb89bae0 | ||
|
|
798b3acb89 | ||
|
|
57868b700b | ||
|
|
3100f31a62 | ||
|
|
9c4ab537be | ||
|
|
0590de3f14 | ||
|
|
d3bcb19c16 | ||
|
|
ed42ea0b57 | ||
|
|
1133d256ee | ||
|
|
9df16b2999 | ||
|
|
0f6d8ace1c | ||
|
|
60e0222146 | ||
|
|
591fa94632 | ||
|
|
152aa0406e | ||
|
|
fa0dc1f946 | ||
|
|
8f860b21a8 | ||
|
|
2a5105a49e | ||
|
|
0fa9f85a8d | ||
|
|
202117a60e | ||
|
|
35c7935f9c | ||
|
|
d953d623a2 | ||
|
|
4ddccd7211 | ||
|
|
4a2d13c6d7 | ||
|
|
c92b4c1863 | ||
|
|
fb736c5a7a | ||
|
|
9046a0a7c8 | ||
|
|
4173441d3c | ||
|
|
b5c3af05d8 | ||
|
|
6fa9aa30fa | ||
|
|
41ce44fc0e | ||
|
|
59848cd559 | ||
|
|
092c944d27 | ||
|
|
8ec051f523 | ||
|
|
22cc708a65 | ||
|
|
4e577a01ae | ||
|
|
5b43ff8c45 | ||
|
|
d07075ca9c | ||
|
|
cd49507a2b | ||
|
|
00464f1e80 | ||
|
|
6ec902e618 | ||
|
|
30e276b132 | ||
|
|
b8597d1518 | ||
|
|
5543f29e4f | ||
|
|
dc67239382 | ||
|
|
2a571bbb97 | ||
|
|
2824bef04a | ||
|
|
8fc7ebdab7 | ||
|
|
793d6780f3 | ||
|
|
605561148b | ||
|
|
54daef0cd9 | ||
|
|
ac0ff16537 | ||
|
|
e44053446a | ||
|
|
d4fb606c72 | ||
|
|
4cfdd4e58b | ||
|
|
3b82a144ea | ||
|
|
2f06c1b476 | ||
|
|
25b6b2c5ba | ||
|
|
9948505145 | ||
|
|
9d8feab2cc | ||
|
|
bcb5d3eba4 | ||
|
|
d7a10c00ed | ||
|
|
d2593cfb81 | ||
|
|
8101cf89f8 | ||
|
|
8636c6dcd5 | ||
|
|
b9c5599f95 | ||
|
|
93f854e6e4 | ||
|
|
ffc09b0801 | ||
|
|
d246064ded | ||
|
|
468f264545 | ||
|
|
9bec223b09 | ||
|
|
4606bb4d01 | ||
|
|
c8405c8924 | ||
|
|
95a33c0e6c | ||
|
|
ed2ad35dde | ||
|
|
234ae08c76 | ||
|
|
d21506b8d7 | ||
|
|
1fa7bf9c27 | ||
|
|
b50e01e4cf | ||
|
|
7abf9b0d0c | ||
|
|
504c6f46c3 | ||
|
|
78b1dcc949 | ||
|
|
9b0c859593 | ||
|
|
c9a3075d0a | ||
|
|
953b17ee88 | ||
|
|
95bc979da7 | ||
|
|
622b1a5e25 | ||
|
|
0c66ca1bdc | ||
|
|
67323c4d93 | ||
|
|
e2b0069947 | ||
|
|
5697a201ef | ||
|
|
c6115e3417 | ||
|
|
0ad122ce01 | ||
|
|
121e1421d3 | ||
|
|
e674457e6f | ||
|
|
45948b9d94 | ||
|
|
8d0bfce39f | ||
|
|
5eeab94368 | ||
|
|
d415d68762 | ||
|
|
0d4760f819 | ||
|
|
a0e6bda26e | ||
|
|
85e6810f99 | ||
|
|
38326bc3b6 | ||
|
|
3e89edefdb | ||
|
|
554e63925d | ||
|
|
57701c6041 | ||
|
|
57e1213370 | ||
|
|
d1ed97e5b4 | ||
|
|
f293f043d5 | ||
|
|
70408e4a2e | ||
|
|
a04438dbf8 | ||
|
|
0f30a35ae3 | ||
|
|
e56391c347 | ||
|
|
9612085a6a | ||
|
|
5bac3002f8 | ||
|
|
c50d1af806 | ||
|
|
96a07c96ee | ||
|
|
cc1261c285 | ||
|
|
adbb888fe4 | ||
|
|
64122b61fc | ||
|
|
bd4c7880e9 | ||
|
|
53433b33d6 | ||
|
|
ef2346efa0 | ||
|
|
0f61c8db8b | ||
|
|
b67c0b8232 | ||
|
|
e365daba93 | ||
|
|
71a2bfe284 | ||
|
|
dd767aa088 | ||
|
|
2ff66b32fd | ||
|
|
fe2d34b057 | ||
|
|
e3b36c8ad1 | ||
|
|
99ba68fce8 | ||
|
|
91e33495da | ||
|
|
d6699fbaa1 | ||
|
|
08666e8bd2 | ||
|
|
b2b397f3e4 | ||
|
|
8336a6c7a6 | ||
|
|
506989580f | ||
|
|
cd258057fb | ||
|
|
044247dccf | ||
|
|
b3f7c2cb4a | ||
|
|
02508c71a0 | ||
|
|
20f77fe26b | ||
|
|
cd889da4bd | ||
|
|
83c64785ec | ||
|
|
ae260f4908 | ||
|
|
fefa5433fd | ||
|
|
f3eb95df93 | ||
|
|
8571b020b9 | ||
|
|
297ccf4496 | ||
|
|
5e617375e1 | ||
|
|
7307a071ab | ||
|
|
ee4ca51aff | ||
|
|
dd682a4e6a | ||
|
|
8893c7da3e | ||
|
|
364024ca0f | ||
|
|
4bf8eb4c1a | ||
|
|
4cc77e0068 | ||
|
|
bd99556e1e | ||
|
|
93e422e1cc | ||
|
|
cba9464b6f | ||
|
|
d09240944b | ||
|
|
16e7dd71f1 | ||
|
|
ac546e4f8d | ||
|
|
2663e4d629 | ||
|
|
7ff13b286e | ||
|
|
e44964696a | ||
|
|
db53da509d | ||
|
|
de7f1b92f6 | ||
|
|
0886bfe8f9 | ||
|
|
46b3ad8a70 | ||
|
|
b4be31361e | ||
|
|
b11e5e12d3 | ||
|
|
177edbf7d6 | ||
|
|
6a335d9c31 | ||
|
|
152e248a15 | ||
|
|
ed6c6dc793 | ||
|
|
192607f874 | ||
|
|
a2c610e877 | ||
|
|
fa745cca61 | ||
|
|
65a4bd3665 | ||
|
|
29a5556c33 | ||
|
|
5afba67c1d | ||
|
|
9af190529c | ||
|
|
1d36d50fca | ||
|
|
871e042044 | ||
|
|
9a99f5d851 | ||
|
|
c0d97939fa | ||
|
|
58305a9690 | ||
|
|
2e7df49c4f | ||
|
|
e984ce39c3 | ||
|
|
2ce1ca6bf8 | ||
|
|
1c342d0327 | ||
|
|
f68aa26278 | ||
|
|
175d9bd7d7 | ||
|
|
9836bda502 | ||
|
|
a21e7a5e8d | ||
|
|
42f3cd8e31 | ||
|
|
1038e75a64 | ||
|
|
d90f0f3e86 | ||
|
|
18b5efcc0e | ||
|
|
2627e55229 | ||
|
|
d605e5fbb8 | ||
|
|
445b0167fa | ||
|
|
0012788eb1 | ||
|
|
32403078bc | ||
|
|
992e28a036 | ||
|
|
e14307045d | ||
|
|
53b0d1fda3 | ||
|
|
97cfbdb982 | ||
|
|
7369c22401 | ||
|
|
e662ad1dfc | ||
|
|
45ecff616c | ||
|
|
b05a19f036 | ||
|
|
3bca0336fa | ||
|
|
216bb4ea87 | ||
|
|
7017901594 | ||
|
|
72524ab50f | ||
|
|
9adaa3c3d6 | ||
|
|
653628f0b3 | ||
|
|
a4186dbf84 | ||
|
|
74de4c14d3 | ||
|
|
11bb084d70 | ||
|
|
1fae1c9ba6 | ||
|
|
5aa483b445 | ||
|
|
ea4b5ed297 | ||
|
|
a557925a63 | ||
|
|
ac64dd0b67 | ||
|
|
b74cca772b | ||
|
|
f6da1a525c | ||
|
|
5049262846 | ||
|
|
c53e55d703 | ||
|
|
d6801d5be5 | ||
|
|
bd8e55b977 | ||
|
|
f8de8d4f16 | ||
|
|
2eb4818398 | ||
|
|
eda6c0d746 | ||
|
|
7676f32cf2 | ||
|
|
a4f920ae86 | ||
|
|
c21e010159 | ||
|
|
89b87be143 | ||
|
|
5607930540 | ||
|
|
957eb64753 | ||
|
|
d05c38ac58 | ||
|
|
bb30a8e9d1 | ||
|
|
19a3181ffb | ||
|
|
ac411c6dd4 | ||
|
|
c770fc4528 | ||
|
|
29e664ece4 | ||
|
|
d378e1479d | ||
|
|
b58c525a6d | ||
|
|
2de7fb9956 | ||
|
|
6d3ec2a8d2 | ||
|
|
4ac3fea028 | ||
|
|
602c321067 | ||
|
|
e50f1d9f50 | ||
|
|
f48a9c6a33 | ||
|
|
c8db07a8c8 | ||
|
|
1fc4dae61b | ||
|
|
d5ca3113e2 | ||
|
|
66c70eb292 | ||
|
|
fcae6c61e4 | ||
|
|
28576c2c9a | ||
|
|
385d376037 | ||
|
|
1d796c624d | ||
|
|
8b8ec2c175 | ||
|
|
293258b606 | ||
|
|
ef9f9ae04f | ||
|
|
de7922181b | ||
|
|
637d3ee670 | ||
|
|
be769a3617 | ||
|
|
c21a5afb61 | ||
|
|
3f5c9eb9b4 | ||
|
|
74d493199f | ||
|
|
c341cecdbc | ||
|
|
c99a715f30 | ||
|
|
530c87b81e | ||
|
|
3d7584b015 | ||
|
|
87a1424df0 | ||
|
|
355c2cd8a1 | ||
|
|
bc9aaff19a | ||
|
|
cb040a5669 | ||
|
|
4a31485359 | ||
|
|
ad1cffe113 | ||
|
|
e758b03e07 | ||
|
|
e31caaeb65 | ||
|
|
0b885d83af | ||
|
|
7f11ea594e | ||
|
|
76278cf11f | ||
|
|
65eb109cb9 | ||
|
|
3d02bc87ea | ||
|
|
4f278925f4 | ||
|
|
cb16482a61 | ||
|
|
46f118bbb9 | ||
|
|
3a5bff36b2 | ||
|
|
18f2e4ce04 | ||
|
|
1cc5eea3a4 | ||
|
|
20a8470b3c | ||
|
|
e242a89a4b | ||
|
|
9de9048a78 | ||
|
|
311dc3b644 | ||
|
|
e49e4a05bc | ||
|
|
79a7c53581 | ||
|
|
3cdc0d34f3 | ||
|
|
291e458745 | ||
|
|
080efec9e0 | ||
|
|
83444fbe00 | ||
|
|
737fc24e16 | ||
|
|
ae3c8e8548 | ||
|
|
5d1e286645 | ||
|
|
9019350f0c | ||
|
|
306154572e | ||
|
|
ce0a46dc2b |
8
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_1.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: Bug report (bluescreen crash) Bug报告 (蓝屏报错)
|
||||||
|
about: Create a report of problems which made the crash with a bluescreen
|
||||||
|
---
|
||||||
|
Screenshot with crash information (*Image(s) Here*):
|
||||||
|
|
||||||
|
|
||||||
|
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button (*Details Here*)
|
||||||
8
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_2.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
name: Bug report (unintended behaviors) Bug报告 (奇怪的现象)
|
||||||
|
about: Create a report of unintended behaviors
|
||||||
|
---
|
||||||
|
Screenshot with unintended behaviors (*Image(s) Here*):
|
||||||
|
|
||||||
|
|
||||||
|
If you can reproduce it, write the steps here. If you can't, try to describe the exactly time the game crash, like pressing which key or which button (*Details Here*):
|
||||||
4
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_3.md
vendored
Normal file
4
.github/ISSUE_TEMPLATE/ISSUE_TEMPLATE_3.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request 添加新功能
|
||||||
|
about: Suggest an idea that may improve Techmino 提一些有意思的新想法,让Techmino越来越好!
|
||||||
|
---
|
||||||
24
.github/actions/automatic-test/action.yml
vendored
Normal file
24
.github/actions/automatic-test/action.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
name: 'Automatic Test'
|
||||||
|
description: 'Check for obvious errors.'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
with:
|
||||||
|
file-path: Techmino.love
|
||||||
|
- name: Download love
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl -L https://github.com/love2d/love/releases/download/11.3/love-11.3-linux-x86_64.tar.gz | tar xz
|
||||||
|
- name: Prepare PulseAudio
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install pulseaudio pulseaudio-utils pavucontrol alsa-oss alsa-utils -y
|
||||||
|
- name: Run automated test
|
||||||
|
uses: GabrielBB/xvfb-action@v1
|
||||||
|
with:
|
||||||
|
run: |
|
||||||
|
./dest/love Techmino.love --test
|
||||||
102
.github/actions/build-android/action.yml
vendored
Normal file
102
.github/actions/build-android/action.yml
vendored
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
name: 'build Android'
|
||||||
|
description: 'build Android package'
|
||||||
|
inputs:
|
||||||
|
type:
|
||||||
|
required: true
|
||||||
|
apkCode:
|
||||||
|
required: true
|
||||||
|
name:
|
||||||
|
required: true
|
||||||
|
file-path:
|
||||||
|
required: true
|
||||||
|
SIGNING_KEY:
|
||||||
|
required: true
|
||||||
|
KEY_STORE_PASSWORD:
|
||||||
|
required: true
|
||||||
|
ALIAS:
|
||||||
|
required: true
|
||||||
|
KEY_PASSWORD:
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
distribution: 'adopt'
|
||||||
|
java-version: '8'
|
||||||
|
- name: Clone love-android
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git clone --recurse-submodules https://github.com/26F-Studio/love-android -b CI --depth 1 --shallow-submodules
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
with:
|
||||||
|
file-path: love-android/app/src/main/assets/game.love
|
||||||
|
- name: Download ColdClear arm64-v8a
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: android_aarch64
|
||||||
|
dir: ColdClear/arm64-v8a
|
||||||
|
- name: Process ColdClear arm64-v8a
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p love-android/app/libs/arm64-v8a
|
||||||
|
mv ColdClear/arm64-v8a/love-11.3-android/lib/arm64-v8a/libcold_clear.so love-android/app/libs/arm64-v8a
|
||||||
|
mkdir -p libAndroid/arm64-v8a
|
||||||
|
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
|
||||||
|
- name: Download ColdClear armeabi-v7a
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: android_armv7
|
||||||
|
dir: ColdClear/armeabi-v7a
|
||||||
|
- name: Process ColdClear armeabi-v7a
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p love-android/app/libs/armeabi-v7a
|
||||||
|
mv ColdClear/armeabi-v7a/love-11.3-android/lib/armeabi-v7a/libcold_clear.so love-android/app/libs/armeabi-v7a
|
||||||
|
mkdir -p libAndroid/armeabi-v7a
|
||||||
|
mv ColdClear/armeabi-v7a/libs/armeabi-v7a/libCCloader.so libAndroid/armeabi-v7a
|
||||||
|
- name: Pack ColdClear
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
7z a -tzip love-android/app/src/main/assets/game.love libAndroid
|
||||||
|
- name: update Android information
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
if '${{ inputs.type }}' == 'Release':
|
||||||
|
appName = 'Techmino'
|
||||||
|
packageName = 'org.love2d.MrZ.Techmino'
|
||||||
|
edition = 'release'
|
||||||
|
elif '${{ inputs.type }}' == 'Snapshot':
|
||||||
|
appName = 'Techmino_Snapshot'
|
||||||
|
packageName = 'org.love2d.MrZ.Techmino.Snapshot'
|
||||||
|
edition = 'snapshot'
|
||||||
|
with open('./love-android/app/src/main/AndroidManifest.xml', "r+", encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
data = data\
|
||||||
|
.replace('@appName', appName)\
|
||||||
|
.replace('@edition', edition)
|
||||||
|
file.seek(0)
|
||||||
|
file.truncate()
|
||||||
|
file.write(data)
|
||||||
|
with open("./love-android/app/build.gradle", "r+", encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
data = data\
|
||||||
|
.replace('@packageName', packageName)\
|
||||||
|
.replace('@versionCode', '${{ inputs.apkCode }}')\
|
||||||
|
.replace('@versionName', '${{ inputs.name }}')\
|
||||||
|
.replace('@storePassword', '${{ inputs.KEY_STORE_PASSWORD }}')\
|
||||||
|
.replace('@keyAlias', '${{ inputs.ALIAS }}')\
|
||||||
|
.replace('@keyPassword', '${{ inputs.KEY_PASSWORD }}')
|
||||||
|
file.seek(0)
|
||||||
|
file.truncate()
|
||||||
|
file.write(data)
|
||||||
|
- name: Build Techmino
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "${{ inputs.SIGNING_KEY }}" | base64 -d > love-android/app/android.keystore
|
||||||
|
chmod 777 love-android/gradlew
|
||||||
|
cd love-android/
|
||||||
|
./gradlew assembleRelease
|
||||||
|
- name: rename apk
|
||||||
|
shell: bash
|
||||||
|
run: mv love-android/app/build/outputs/apk/release/app-release.apk ${{ inputs.file-path }}
|
||||||
96
.github/actions/build-ios/action.yml
vendored
Normal file
96
.github/actions/build-ios/action.yml
vendored
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
name: 'build iOS'
|
||||||
|
description: 'build iOS package'
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
required: true
|
||||||
|
description: "Version name"
|
||||||
|
type:
|
||||||
|
required: true
|
||||||
|
description: "Build type"
|
||||||
|
APPLE_API_ID:
|
||||||
|
required: true
|
||||||
|
description: "API key ID"
|
||||||
|
APPLE_API_ISSUER:
|
||||||
|
required: true
|
||||||
|
description: "API issuer ID"
|
||||||
|
APPLE_API_KEY:
|
||||||
|
required: true
|
||||||
|
description: "API key content"
|
||||||
|
APPLE_APP_BUILD:
|
||||||
|
required: true
|
||||||
|
description: "Build number"
|
||||||
|
APPLE_APP_CHANGELOG:
|
||||||
|
required: true
|
||||||
|
description: "Changelog"
|
||||||
|
APPLE_APP_ID:
|
||||||
|
required: true
|
||||||
|
description: "AppStore Apple ID"
|
||||||
|
APPLE_APP_IDENTIFIER:
|
||||||
|
required: true
|
||||||
|
description: "Bundle ID"
|
||||||
|
APPLE_APP_PROFILE:
|
||||||
|
required: true
|
||||||
|
description: "Provisioning Profile specifer"
|
||||||
|
APPLE_KEYCHAIN_NAME:
|
||||||
|
required: true
|
||||||
|
description: "Temporary keychain name"
|
||||||
|
APPLE_KEYCHAIN_PWD:
|
||||||
|
required: true
|
||||||
|
description: "Temporary keychain password"
|
||||||
|
FASTLANE_DISCORD_WEBHOOK:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Discord webhook"
|
||||||
|
FASTLANE_ACTION_ID:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Action ID"
|
||||||
|
FASTLANE_MATCH_PWD:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Match description password"
|
||||||
|
FASTLANE_MATCH_TOKEN:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Match Github token"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
- name: Checkout source codes
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: '26F-Studio/Techmino-iOS'
|
||||||
|
path: 'Techmino-iOS'
|
||||||
|
- name: Download CCloader
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: iOS
|
||||||
|
- name: Update source codes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv Techmino.love Techmino-iOS/platform/xcode
|
||||||
|
mv libcold_clear.a Techmino-iOS/platform/xcode
|
||||||
|
mv libCCloader.a Techmino-iOS/platform/xcode
|
||||||
|
- name: Run fastlane
|
||||||
|
uses: maierj/fastlane-action@v2.0.1
|
||||||
|
with:
|
||||||
|
lane: '${{ inputs.type }}'
|
||||||
|
subdirectory: 'Techmino-iOS/platform/xcode'
|
||||||
|
env:
|
||||||
|
ACTION_ID: '${{ inputs.FASTLANE_ACTION_ID }}'
|
||||||
|
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||||
|
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||||
|
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||||
|
APP_BUILD: '${{ inputs.APPLE_APP_BUILD }}'
|
||||||
|
APP_CHANGELOG: '${{ inputs.APPLE_APP_CHANGELOG }}'
|
||||||
|
APP_ID: '${{ inputs.APPLE_APP_ID }}'
|
||||||
|
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||||
|
APP_PROFILE: '${{ inputs.APPLE_APP_PROFILE }}'
|
||||||
|
APP_VERSION: '${{ inputs.name }}'
|
||||||
|
DISCORD_WEBHOOK: '${{ inputs.FASTLANE_DISCORD_WEBHOOK }}'
|
||||||
|
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
|
||||||
|
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Move ipa
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv Techmino-iOS/platform/xcode/Techmino.ipa Techmino.ipa
|
||||||
|
|
||||||
40
.github/actions/build-linux/action.yml
vendored
Normal file
40
.github/actions/build-linux/action.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: 'build Linux'
|
||||||
|
description: 'build Linux package'
|
||||||
|
inputs:
|
||||||
|
file-path:
|
||||||
|
required: false
|
||||||
|
default: Techmino.AppImage
|
||||||
|
icon:
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Download AppImageKit
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl -OL https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
|
||||||
|
- name: Download love
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-x86_64.AppImage
|
||||||
|
chmod 777 love-11.3-x86_64.AppImage
|
||||||
|
./love-11.3-x86_64.AppImage --appimage-extract
|
||||||
|
- name: Download ColdClear
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: linux
|
||||||
|
- name: Pack Techmino
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
rm -rf squashfs-root/love squashfs-root/love.desktop squashfs-root/love.svg squashfs-root/.DirIcon
|
||||||
|
mv .github/build/Linux/love.template squashfs-root/love
|
||||||
|
mv .github/build/Linux/Techmino.desktop.template squashfs-root/Techmino.desktop
|
||||||
|
mv ${{ inputs.icon }} squashfs-root/icon.png
|
||||||
|
cp squashfs-root/icon.png squashfs-root/.DirIcon
|
||||||
|
chmod 777 squashfs-root/love
|
||||||
|
mkdir -p squashfs-root/usr/share/Techmino
|
||||||
|
mv media parts Zframework conf.lua main.lua version.lua legals.md license.txt squashfs-root/usr/share/Techmino
|
||||||
|
mv CCloader.so squashfs-root/usr/share/Techmino
|
||||||
|
mv libcold_clear.so squashfs-root/usr/lib
|
||||||
|
chmod 777 appimagetool-x86_64.AppImage
|
||||||
|
./appimagetool-x86_64.AppImage squashfs-root ${{ inputs.file-path }}
|
||||||
11
.github/actions/build-love/action.yml
vendored
Normal file
11
.github/actions/build-love/action.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: 'build love'
|
||||||
|
description: 'build love file'
|
||||||
|
inputs:
|
||||||
|
file-path:
|
||||||
|
required: true
|
||||||
|
default: Techmino.love
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: 7z a -tzip ${{ inputs.file-path }} media parts Zframework conf.lua main.lua version.lua legals.md license.txt
|
||||||
|
shell: bash
|
||||||
152
.github/actions/build-macos/action.yml
vendored
Normal file
152
.github/actions/build-macos/action.yml
vendored
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
name: 'build Mac OS'
|
||||||
|
description: 'build Mac OS package'
|
||||||
|
inputs:
|
||||||
|
name:
|
||||||
|
required: true
|
||||||
|
description: "Version name"
|
||||||
|
icon:
|
||||||
|
required: true
|
||||||
|
description: "App icons (.icns)"
|
||||||
|
APPLE_API_ID:
|
||||||
|
required: true
|
||||||
|
description: "API key ID"
|
||||||
|
APPLE_API_ISSUER:
|
||||||
|
required: true
|
||||||
|
description: "API issuer ID"
|
||||||
|
APPLE_API_KEY:
|
||||||
|
required: true
|
||||||
|
description: "API key content"
|
||||||
|
APPLE_APP_IDENTIFIER:
|
||||||
|
required: true
|
||||||
|
description: "Bundle ID"
|
||||||
|
APPLE_KEYCHAIN_NAME:
|
||||||
|
required: true
|
||||||
|
description: "Temporary keychain name"
|
||||||
|
APPLE_KEYCHAIN_PWD:
|
||||||
|
required: true
|
||||||
|
description: "Temporary keychain password"
|
||||||
|
FASTLANE_MATCH_PWD:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Match description password"
|
||||||
|
FASTLANE_MATCH_TOKEN:
|
||||||
|
required: true
|
||||||
|
description: "Fastlane Match Github token"
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
- name: Checkout template
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
repository: '26F-Studio/Techmino-macOS'
|
||||||
|
path: 'Techmino-macOS'
|
||||||
|
- name: Download ColdClear
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: macOS
|
||||||
|
- name: Fastlane match
|
||||||
|
uses: maierj/fastlane-action@v2.0.1
|
||||||
|
with:
|
||||||
|
lane: 'get_cert'
|
||||||
|
subdirectory: 'Techmino-macOS'
|
||||||
|
env:
|
||||||
|
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||||
|
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||||
|
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||||
|
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||||
|
KEYCHAIN_NAME: '${{ inputs.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
KEYCHAIN_PWD: '${{ inputs.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
MATCH_PASSWORD: '${{ inputs.FASTLANE_MATCH_PWD }}'
|
||||||
|
MATCH_TOKEN: '${{ inputs.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Modify template
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import datetime
|
||||||
|
from io import open
|
||||||
|
thisYear = str(datetime.datetime.today().year)
|
||||||
|
with open('./.github/build/macOS/info.plist.template', 'r', encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
data = data\
|
||||||
|
.replace('@versionName', '${{ inputs.name }}'[1:])\
|
||||||
|
.replace('@thisYear', thisYear)\
|
||||||
|
.replace('@bundleId', '${{ inputs.APPLE_APP_IDENTIFIER }}')
|
||||||
|
with open('./Techmino-macOS/Techmino.app/Contents/info.plist', 'w+', encoding='utf-8') as file:
|
||||||
|
file.write(data)
|
||||||
|
- name: Pack
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv Techmino.love Techmino-macOS/Techmino.app/Contents/Resources
|
||||||
|
mv CCloader.dylib Techmino-macOS/Techmino.app/Contents/Frameworks
|
||||||
|
mv ${{ inputs.icon }} Techmino-macOS/Techmino.app/Contents/Resources/iconfile.icns
|
||||||
|
|
||||||
|
chmod +x Techmino-macOS/Techmino.app/Contents/Frameworks/CCloader.dylib
|
||||||
|
chmod +x Techmino-macOS/Techmino.app/Contents/MacOS/love
|
||||||
|
- name: Codesign executable
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
|
||||||
|
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
|
||||||
|
|
||||||
|
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
|
||||||
|
|
||||||
|
codesign --timestamp --force --strict --deep -v \
|
||||||
|
--options runtime \
|
||||||
|
-s ${BASH_REMATCH[1]} \
|
||||||
|
--entitlements Techmino-macOS/love.entitlements \
|
||||||
|
Techmino-macOS/Techmino.app
|
||||||
|
- name: Fastlane notarize
|
||||||
|
uses: maierj/fastlane-action@v2.0.1
|
||||||
|
with:
|
||||||
|
lane: 'make_safe'
|
||||||
|
subdirectory: 'Techmino-macOS'
|
||||||
|
env:
|
||||||
|
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||||
|
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||||
|
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||||
|
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||||
|
NOTARIZE_OBJECT: 'Techmino.app'
|
||||||
|
- name: Create DMG file
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
brew install create-dmg
|
||||||
|
create-dmg \
|
||||||
|
--volname "Techmino for MacOS" \
|
||||||
|
--volicon "./.github/build/macOS/Techminodisk.icns" \
|
||||||
|
--window-pos 200 120 \
|
||||||
|
--window-size 800 500 \
|
||||||
|
--icon-size 100 \
|
||||||
|
--icon "Techmino.app" 239 203 \
|
||||||
|
--background ".github/build/macOS/backgroundImage.tiff" \
|
||||||
|
--hide-extension "Techmino.app" \
|
||||||
|
--app-drop-link 565 203 \
|
||||||
|
"Techmino-macOS/Techmino-macOS.dmg" \
|
||||||
|
"Techmino-macOS/Techmino.app/"
|
||||||
|
- name: Codesign DMG
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
security unlock-keychain -p ${{ inputs.TEMP_KEYCHAIN_PASSWORD }} \
|
||||||
|
~/Library/Keychains/${{ inputs.TEMP_KEYCHAIN_USER }}-db
|
||||||
|
|
||||||
|
[[ $(security find-identity) =~ ([0-9A-F]{40}) ]]
|
||||||
|
|
||||||
|
codesign --timestamp --force --strict --deep -v \
|
||||||
|
--options runtime \
|
||||||
|
-s ${BASH_REMATCH[1]} \
|
||||||
|
--entitlements Techmino-macOS/love.entitlements \
|
||||||
|
Techmino-macOS/Techmino-macOS.dmg
|
||||||
|
- name: Fastlane notarize
|
||||||
|
uses: maierj/fastlane-action@v2.0.1
|
||||||
|
with:
|
||||||
|
lane: 'make_safe'
|
||||||
|
subdirectory: 'Techmino-macOS'
|
||||||
|
env:
|
||||||
|
API_ID: '${{ inputs.APPLE_API_ID }}'
|
||||||
|
API_ISSUER: '${{ inputs.APPLE_API_ISSUER }}'
|
||||||
|
API_KEY: '${{ inputs.APPLE_API_KEY }}'
|
||||||
|
APP_IDENTIFIER: '${{ inputs.APPLE_APP_IDENTIFIER }}'
|
||||||
|
NOTARIZE_OBJECT: 'Techmino-macOS.dmg'
|
||||||
|
- name: Finalize
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv Techmino-macOS/Techmino-macOS.dmg Techmino.dmg
|
||||||
|
spctl -a -t open --context context:primary-signature -vv Techmino.dmg
|
||||||
60
.github/actions/build-windows/action.yml
vendored
Normal file
60
.github/actions/build-windows/action.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
name: 'build Windows'
|
||||||
|
description: 'build Windows package'
|
||||||
|
inputs:
|
||||||
|
love-url:
|
||||||
|
required: true
|
||||||
|
love-dir:
|
||||||
|
required: true
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
version:
|
||||||
|
required: true
|
||||||
|
icon:
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Download love
|
||||||
|
uses: ./.github/actions/get-unzip
|
||||||
|
with:
|
||||||
|
url: ${{ inputs.love-url }}
|
||||||
|
- name: move love
|
||||||
|
shell: bash
|
||||||
|
run: mv ${{ inputs.love-dir }} love
|
||||||
|
- name: Download ColdClear
|
||||||
|
uses: ./.github/actions/get-cc
|
||||||
|
with:
|
||||||
|
arch: ${{ inputs.arch }}
|
||||||
|
- name: Download ResourceHacker
|
||||||
|
uses: ./.github/actions/get-unzip
|
||||||
|
with:
|
||||||
|
url: http://www.angusj.com/resourcehacker/resource_hacker.zip
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
- name: update Windows template
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
Version = '${{ inputs.version }}'.replace('V', '')
|
||||||
|
FileVersion = (f"{Version.replace('.', ',')},0")
|
||||||
|
with open('./.github/build/Windows/Techmino.rc.template', 'r', encoding='utf8') as file:
|
||||||
|
data = file.read()
|
||||||
|
data = data\
|
||||||
|
.replace('@FileVersion', FileVersion)\
|
||||||
|
.replace('@Version', Version)
|
||||||
|
with open('Techmino.rc', 'w+', encoding='utf8') as file:
|
||||||
|
file.write(data)
|
||||||
|
- name: Pack Techmino
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
cmd /c copy /b .\love\love.exe + .\Techmino.love .\love\Techmino.exe
|
||||||
|
del .\love\love.exe
|
||||||
|
del .\love\lovec.exe
|
||||||
|
del .\love\game.ico
|
||||||
|
del .\love\love.ico
|
||||||
|
del .\love\changes.txt
|
||||||
|
del .\love\readme.txt
|
||||||
|
move .\cold_clear.dll .\love
|
||||||
|
move .\CCloader.dll .\love
|
||||||
|
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action delete -mask ICONGROUP,,'
|
||||||
|
cmd /c '.\ResourceHacker.exe -open .\Techmino.rc -save .\Techmino.res -action compile'
|
||||||
|
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res "${{ inputs.icon }}" -mask ICONGROUP,1,'
|
||||||
|
cmd /c '.\ResourceHacker.exe -open .\love\Techmino.exe -save .\love\Techmino.exe -action addoverwrite -res ".\Techmino.res" -mask VERSIONINFO,1,'
|
||||||
32
.github/actions/get-cc/action.yml
vendored
Normal file
32
.github/actions/get-cc/action.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: 'get cc'
|
||||||
|
description: 'download cc into specific dir'
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
required: false
|
||||||
|
default:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
dir:
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
repo:
|
||||||
|
required: false
|
||||||
|
default: 26F-Studio/cold_clear_ai_love2d_wrapper
|
||||||
|
temp-file:
|
||||||
|
required: false
|
||||||
|
default: temp.zip
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
echo "::set-output name=tag::"$(if [ -z "${{ inputs.tag }}" ]
|
||||||
|
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
|
||||||
|
else echo ${{ inputs.tag }}
|
||||||
|
fi)
|
||||||
|
id: get-tag
|
||||||
|
shell: bash
|
||||||
|
- uses: ./.github/actions/get-unzip
|
||||||
|
with:
|
||||||
|
url: https://github.com/${{ inputs.repo }}/releases/download/${{ steps.get-tag.outputs.tag }}/${{ inputs.arch }}.zip
|
||||||
|
dir: ${{ inputs.dir }}
|
||||||
|
temp-file: ${{ inputs.temp-file }}
|
||||||
18
.github/actions/get-unzip/action.yml
vendored
Normal file
18
.github/actions/get-unzip/action.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
name: 'get and unzip'
|
||||||
|
description: 'cURL and then 7-zip x'
|
||||||
|
inputs:
|
||||||
|
url:
|
||||||
|
required: true
|
||||||
|
dir:
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
temp-file:
|
||||||
|
required: false
|
||||||
|
default: temp.zip
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: curl -L ${{ inputs.url }} -o ${{ inputs.temp-file }}
|
||||||
|
shell: bash
|
||||||
|
- run: 7z x ${{ inputs.temp-file }} -o${{ inputs.dir }}
|
||||||
|
shell: bash
|
||||||
37
.github/actions/update-version/action.yml
vendored
Normal file
37
.github/actions/update-version/action.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
name: 'update version'
|
||||||
|
description: 'common update logic for snapshot and release'
|
||||||
|
inputs:
|
||||||
|
commit:
|
||||||
|
required: false
|
||||||
|
type:
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- shell: python
|
||||||
|
name: update snapshot saving folder
|
||||||
|
run: |
|
||||||
|
from io import open
|
||||||
|
if '${{ inputs.type }}'.lower() != 'snapshot':
|
||||||
|
exit(0)
|
||||||
|
with open('conf.lua', 'r+', encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
data = data.replace("t.identity='Techmino'--Saving folder", "t.identity='Techmino_Snapshot'--Saving folder")
|
||||||
|
file.seek(0)
|
||||||
|
file.truncate()
|
||||||
|
file.flush()
|
||||||
|
file.write(data)
|
||||||
|
- shell: python
|
||||||
|
run: |
|
||||||
|
from io import open
|
||||||
|
import re
|
||||||
|
with open('version.lua', 'r+', encoding='utf-8') as file:
|
||||||
|
commitHash = '${{ inputs.commit }}'
|
||||||
|
if commitHash != '':
|
||||||
|
commitHash = '@' + commitHash[0:4]
|
||||||
|
data = file.read()
|
||||||
|
data = re.sub('(\d)"', r'\1' + commitHash + '"', data, 1)
|
||||||
|
file.seek(0)
|
||||||
|
file.truncate()
|
||||||
|
file.flush()
|
||||||
|
file.write(data)
|
||||||
8
.github/build/Linux/Techmino.desktop.template
vendored
Normal file
8
.github/build/Linux/Techmino.desktop.template
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Techmino Alpha
|
||||||
|
Comment=Techmino is fun!
|
||||||
|
Exec=wrapper-love %f
|
||||||
|
Type=Application
|
||||||
|
Categories=Game;
|
||||||
|
Terminal=false
|
||||||
|
Icon=icon
|
||||||
BIN
.github/build/Linux/icon.png
vendored
Normal file
BIN
.github/build/Linux/icon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
BIN
.github/build/Linux/icon_snapshot.png
vendored
Normal file
BIN
.github/build/Linux/icon_snapshot.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
5
.github/build/Linux/love.template
vendored
Normal file
5
.github/build/Linux/love.template
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
export LOVE_LAUNCHER_LOCATION="$(dirname "$(which "$0")")"
|
||||||
|
export LD_LIBRARY_PATH="${LOVE_LAUNCHER_LOCATION}/lib/x86_64-linux-gnu:${LOVE_LAUNCHER_LOCATION}/usr/bin:${LOVE_LAUNCHER_LOCATION}/usr/lib:${LOVE_LAUNCHER_LOCATION}/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
|
||||||
|
/sbin/ldconfig -p | grep -q libstdc++ || export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LOVE_LAUNCHER_LOCATION}/libstdc++/"
|
||||||
|
exec ${LOVE_BIN_WRAPPER} "${LOVE_LAUNCHER_LOCATION}/usr/bin/love" "${LOVE_LAUNCHER_LOCATION}/usr/share/Techmino"
|
||||||
23
.github/build/Windows/Techmino.rc.template
vendored
Normal file
23
.github/build/Windows/Techmino.rc.template
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
1 VERSIONINFO
|
||||||
|
FILEVERSION @FileVersion
|
||||||
|
PRODUCTVERSION @FileVersion
|
||||||
|
FILEOS 0x40004
|
||||||
|
FILETYPE 0x1
|
||||||
|
{
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
{
|
||||||
|
BLOCK "040904B0"
|
||||||
|
{
|
||||||
|
VALUE "FileDescription", "Techmino Alpha"
|
||||||
|
VALUE "CompanyName", "26F Studio"
|
||||||
|
VALUE "LegalCopyright", "Copyright @ 26F Studio"
|
||||||
|
VALUE "ProductName", "Techmino"
|
||||||
|
VALUE "ProductVersion", "@Version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
{
|
||||||
|
VALUE "Translation", 0x0409 0x04E4
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
.github/build/Windows/icon.ico
vendored
Normal file
BIN
.github/build/Windows/icon.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
BIN
.github/build/Windows/icon.png
vendored
Normal file
BIN
.github/build/Windows/icon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
.github/build/Windows/icon_snapshot.ico
vendored
Normal file
BIN
.github/build/Windows/icon_snapshot.ico
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
.github/build/macOS/Techminodisk.icns
vendored
Normal file
BIN
.github/build/macOS/Techminodisk.icns
vendored
Normal file
Binary file not shown.
BIN
.github/build/macOS/backgroundImage.tiff
vendored
Normal file
BIN
.github/build/macOS/backgroundImage.tiff
vendored
Normal file
Binary file not shown.
BIN
.github/build/macOS/icon.icns
vendored
Normal file
BIN
.github/build/macOS/icon.icns
vendored
Normal file
Binary file not shown.
BIN
.github/build/macOS/icon_snapshot.icns
vendored
Normal file
BIN
.github/build/macOS/icon_snapshot.icns
vendored
Normal file
Binary file not shown.
56
.github/build/macOS/info.plist.template
vendored
Normal file
56
.github/build/macOS/info.plist.template
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>BuildMachineOSBuild</key>
|
||||||
|
<string>19B88</string>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>love</string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>iconfile</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>@bundleId</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>Techmino</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>@versionName</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>LoVe</string>
|
||||||
|
<key>CFBundleSupportedPlatforms</key>
|
||||||
|
<array>
|
||||||
|
<string>MacOSX</string>
|
||||||
|
</array>
|
||||||
|
<key>DTCompiler</key>
|
||||||
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
||||||
|
<key>DTPlatformBuild</key>
|
||||||
|
<string>11C504</string>
|
||||||
|
<key>DTPlatformVersion</key>
|
||||||
|
<string>GM</string>
|
||||||
|
<key>DTSDKBuild</key>
|
||||||
|
<string>19B90</string>
|
||||||
|
<key>DTSDKName</key>
|
||||||
|
<string>macosx10.15</string>
|
||||||
|
<key>DTXcode</key>
|
||||||
|
<string>1130</string>
|
||||||
|
<key>DTXcodeBuild</key>
|
||||||
|
<string>11C504</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.games</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.7</string>
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string>©2020-@thisYear 26F Studio, GNU LGPLv3.0</string>
|
||||||
|
<key>NSPrincipalClass</key>
|
||||||
|
<string>NSApplication</string>
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@@ -1,38 +0,0 @@
|
|||||||
name: Techmino CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ ci ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ ci ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
- name: Download love
|
|
||||||
run: |
|
|
||||||
curl -LO https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
|
||||||
7z x love-11.3-win64.zip
|
|
||||||
- name: Download ColdClear
|
|
||||||
run: |
|
|
||||||
curl -LO https://github.com/26F-Studio/Techmino/releases/download/coldclear/coldclear.zip
|
|
||||||
7z x coldclear.zip -ocoldclear
|
|
||||||
move coldclear\win64\cold_clear.dll love-11.3-win64
|
|
||||||
move coldclear\win64\CCloader.dll love-11.3-win64
|
|
||||||
- name: Pack Techmino
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
7z a game.zip BGM document image modes parts SFX VOICE Zframework conf.lua font.ttf main.lua
|
|
||||||
move game.zip game.love
|
|
||||||
copy /b love-11.3-win64\love.exe + game.love love-11.3-win64\Techmino.exe
|
|
||||||
del love-11.3-win64\love.exe
|
|
||||||
del love-11.3-win64\lovec.exe
|
|
||||||
- name: Artifact
|
|
||||||
uses: actions/upload-artifact@v1.0.0
|
|
||||||
with:
|
|
||||||
name: Techmino_win64
|
|
||||||
path: love-11.3-win64
|
|
||||||
203
.github/workflows/dev.yml
vendored
Normal file
203
.github/workflows/dev.yml
vendored
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
name: Techmino Develop CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main, ci* ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
get-info:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
name: ${{ steps.actual-get-info.outputs.name }}
|
||||||
|
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||||
|
code: ${{ steps.actual-get-info.outputs.code }}
|
||||||
|
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install lua
|
||||||
|
run: |
|
||||||
|
sudo apt-get install lua5.3 -y
|
||||||
|
- name: Get Version
|
||||||
|
id: actual-get-info
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||||
|
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||||
|
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||||
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
|
automatic-test:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/automatic-test
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-windows
|
||||||
|
with:
|
||||||
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||||
|
love-dir: love-11.3-win64
|
||||||
|
arch: win64
|
||||||
|
version: ${{ needs.get-info.outputs.name }}
|
||||||
|
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||||
|
path: love
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-linux
|
||||||
|
with:
|
||||||
|
icon: .github/build/Linux/icon_snapshot.png
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||||
|
path: Techmino.AppImage
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-android
|
||||||
|
with:
|
||||||
|
type: Snapshot
|
||||||
|
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
file-path: Techmino_Snapshot.apk
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
||||||
|
path: Techmino_Snapshot.apk
|
||||||
|
|
||||||
|
build-android-mini:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- name: remove media
|
||||||
|
run: |
|
||||||
|
rm -rf media/music media/effect media/vocal
|
||||||
|
- uses: ./.github/actions/build-android
|
||||||
|
with:
|
||||||
|
type: Snapshot
|
||||||
|
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
file-path: Techmino_Snapshot_Mini.apk
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android_Mini
|
||||||
|
path: Techmino_Snapshot_Mini.apk
|
||||||
|
|
||||||
|
build-macOS:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-macos
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
icon: .github/build/macOS/icon_snapshot.icns
|
||||||
|
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||||
|
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||||
|
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||||
|
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||||
|
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||||
|
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||||
|
path: Techmino.dmg
|
||||||
|
|
||||||
|
build-iOS:
|
||||||
|
runs-on: macos-latest
|
||||||
|
if: (!startsWith( github.ref , 'refs/heads/ci-')) || startsWith( github.ref , 'refs/heads/ci-ios-')
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-ios
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
type: 'dev'
|
||||||
|
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||||
|
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||||
|
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||||
|
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.2.${{ github.run_number }}.${{ github.run_attempt }}'
|
||||||
|
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
|
||||||
|
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
|
||||||
|
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||||
|
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
|
||||||
|
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
FASTLANE_ACTION_ID: '${{ github.run_id }}'
|
||||||
|
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
|
||||||
|
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||||
|
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_iOS
|
||||||
|
path: Techmino.ipa
|
||||||
|
|
||||||
|
build-love:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-love
|
||||||
|
with:
|
||||||
|
file-path: Techmino.love
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Love
|
||||||
|
path: Techmino.love
|
||||||
28
.github/workflows/getVersion.lua
vendored
Normal file
28
.github/workflows/getVersion.lua
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
local arg=arg[1]
|
||||||
|
if arg=="-apkCode"then
|
||||||
|
local code=require"version".apkCode
|
||||||
|
print(code)
|
||||||
|
elseif arg=="-code"then
|
||||||
|
local str=require"version".code
|
||||||
|
print(str)
|
||||||
|
elseif arg=="-name"then
|
||||||
|
local str=require"version".string
|
||||||
|
print(str)
|
||||||
|
elseif arg=="-release"then
|
||||||
|
local str=require"version".string:gsub("V","",1)
|
||||||
|
print(str)
|
||||||
|
elseif arg=="-updateTitle"then
|
||||||
|
local note=require"parts.updateLog"
|
||||||
|
local p1=note:find("\n%d")+1
|
||||||
|
local p2=note:find("\n",p1)-1
|
||||||
|
note=note:sub(p1,p2)
|
||||||
|
print(note)
|
||||||
|
elseif arg=="-updateNote"then
|
||||||
|
local note=require"parts.updateLog"
|
||||||
|
local p1=note:find("\n",note:find("\n%d")+1)+1
|
||||||
|
local p2=note:find("\n%d",p1+1)
|
||||||
|
note=note:sub(p1,p2-2)
|
||||||
|
:gsub(" ","- ")
|
||||||
|
:gsub(" ","# ")
|
||||||
|
print(note)
|
||||||
|
end
|
||||||
189
.github/workflows/release.yml
vendored
Normal file
189
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,189 @@
|
|||||||
|
name: Techmino Release CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
get-info:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
name: ${{ steps.actual-get-info.outputs.name }}
|
||||||
|
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||||
|
code: ${{ steps.actual-get-info.outputs.code }}
|
||||||
|
release: ${{ steps.actual-get-info.outputs.release }}
|
||||||
|
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
|
||||||
|
updateNote: ${{ steps.actual-get-info.outputs.updateNote }}
|
||||||
|
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install lua
|
||||||
|
run: |
|
||||||
|
sudo apt-get install lua5.3 -y
|
||||||
|
- name: Get Version
|
||||||
|
id: actual-get-info
|
||||||
|
run: |
|
||||||
|
UPDATE_NOTE=$(lua .github/workflows/getVersion.lua -updateNote)
|
||||||
|
UPDATE_NOTE="${UPDATE_NOTE//'%'/'%25'}"
|
||||||
|
UPDATE_NOTE="${UPDATE_NOTE//$'\n'/'%0A'}"
|
||||||
|
UPDATE_NOTE="${UPDATE_NOTE//$'\r'/'%0D'}"
|
||||||
|
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||||
|
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||||
|
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||||
|
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||||
|
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
||||||
|
echo "::set-output name=updateNote::$UPDATE_NOTE"
|
||||||
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
|
build-windows-x64:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-windows
|
||||||
|
with:
|
||||||
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||||
|
love-dir: love-11.3-win64
|
||||||
|
arch: win64
|
||||||
|
version: ${{ needs.get-info.outputs.release }}
|
||||||
|
icon: .\.github\build\Windows\icon.ico
|
||||||
|
- name: Pack Techmino
|
||||||
|
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip .\love
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip
|
||||||
|
|
||||||
|
build-windows-x86:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-windows
|
||||||
|
with:
|
||||||
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
||||||
|
love-dir: love-11.3-win32
|
||||||
|
arch: win32
|
||||||
|
version: ${{ needs.get-info.outputs.release }}
|
||||||
|
icon: .\.github\build\Windows\icon.ico
|
||||||
|
- name: Pack Techmino
|
||||||
|
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip .\love
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-linux
|
||||||
|
with:
|
||||||
|
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
||||||
|
icon: .github/build/Linux/icon.png
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-android
|
||||||
|
with:
|
||||||
|
type: Release
|
||||||
|
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
||||||
|
|
||||||
|
build-macOS:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-macos
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
icon: .github/build/macOS/icon.icns
|
||||||
|
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
||||||
|
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
||||||
|
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
||||||
|
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
||||||
|
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
||||||
|
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
||||||
|
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
||||||
|
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
||||||
|
- name: Pack Techmino
|
||||||
|
run: |
|
||||||
|
mv Techmino.dmg Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
||||||
|
|
||||||
|
build-iOS:
|
||||||
|
runs-on: macos-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
- uses: ./.github/actions/build-ios
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
type: "release"
|
||||||
|
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
||||||
|
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
||||||
|
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
||||||
|
APPLE_APP_BUILD: "${{ needs.get-info.outputs.code }}.0.${{ github.run_number }}.${{ github.run_attempt }}"
|
||||||
|
APPLE_APP_CHANGELOG: "${{ needs.get-info.outputs.updateNote }}"
|
||||||
|
APPLE_APP_ID: "${{ secrets.APPLE_APP_ID }}"
|
||||||
|
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
||||||
|
APPLE_APP_PROFILE: "${{ secrets.APPLE_APP_PROFILE }}"
|
||||||
|
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
||||||
|
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
||||||
|
FASTLANE_ACTION_ID: "${{ github.run_id }}"
|
||||||
|
FASTLANE_DISCORD_WEBHOOK: "${{ secrets.FASTLANE_DISCORD_WEBHOOK }}"
|
||||||
|
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
||||||
|
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
||||||
|
- name: Rename ipa
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mv Techmino.ipa Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
files: Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
||||||
|
|
||||||
|
Add-Release-note:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
|
body: ${{ needs.get-info.outputs.updateNote }}
|
||||||
154
.github/workflows/test.yml
vendored
Normal file
154
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
name: Techmino Test CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'pre*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
get-info:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
name: ${{ steps.actual-get-info.outputs.name }}
|
||||||
|
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||||
|
code: ${{ steps.actual-get-info.outputs.code }}
|
||||||
|
release: ${{ steps.actual-get-info.outputs.release }}
|
||||||
|
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install lua
|
||||||
|
run: |
|
||||||
|
sudo apt-get install lua5.3 -y
|
||||||
|
- name: Get Version
|
||||||
|
id: actual-get-info
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||||
|
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||||
|
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||||
|
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||||
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-windows
|
||||||
|
with:
|
||||||
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||||
|
love-dir: love-11.3-win64
|
||||||
|
arch: win64
|
||||||
|
version: ${{ needs.get-info.outputs.name }}
|
||||||
|
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||||
|
path: love
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-linux
|
||||||
|
with:
|
||||||
|
icon: .github/build/Linux/icon_snapshot.png
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||||
|
path: Techmino.AppImage
|
||||||
|
|
||||||
|
build-android:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-android
|
||||||
|
with:
|
||||||
|
type: Snapshot
|
||||||
|
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
file-path: Techmino_Snapshot.apk
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Android
|
||||||
|
path: Techmino_Snapshot.apk
|
||||||
|
|
||||||
|
build-macOS:
|
||||||
|
runs-on: macos-10.15
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-macos
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
icon: .github/build/macOS/icon_snapshot.icns
|
||||||
|
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||||
|
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||||
|
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||||
|
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||||
|
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||||
|
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_MacOS
|
||||||
|
path: Techmino.dmg
|
||||||
|
|
||||||
|
build-iOS:
|
||||||
|
runs-on: macos-latest
|
||||||
|
needs: get-info
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: ./.github/actions/update-version
|
||||||
|
with:
|
||||||
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
|
type: snapshot
|
||||||
|
- uses: ./.github/actions/build-ios
|
||||||
|
with:
|
||||||
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
|
type: 'test'
|
||||||
|
APPLE_API_ID: '${{ secrets.APPLE_API_ID }}'
|
||||||
|
APPLE_API_ISSUER: '${{ secrets.APPLE_API_ISSUER }}'
|
||||||
|
APPLE_API_KEY: '${{ secrets.APPLE_API_KEY }}'
|
||||||
|
APPLE_APP_BUILD: '${{ needs.get-info.outputs.code }}.1.${{ github.run_number }}.${{ github.run_attempt }}'
|
||||||
|
APPLE_APP_CHANGELOG: '${{ github.event.commits[0].message }}'
|
||||||
|
APPLE_APP_ID: '${{ secrets.APPLE_APP_ID }}'
|
||||||
|
APPLE_APP_IDENTIFIER: '${{ secrets.APPLE_APP_IDENTIFIER }}'
|
||||||
|
APPLE_APP_PROFILE: '${{ secrets.APPLE_APP_PROFILE }}'
|
||||||
|
APPLE_KEYCHAIN_NAME: '${{ secrets.APPLE_KEYCHAIN_NAME }}'
|
||||||
|
APPLE_KEYCHAIN_PWD: '${{ secrets.APPLE_KEYCHAIN_PWD }}'
|
||||||
|
FASTLANE_ACTION_ID: '${{ github.run_id }}'
|
||||||
|
FASTLANE_DISCORD_WEBHOOK: '${{ secrets.FASTLANE_DISCORD_WEBHOOK }}'
|
||||||
|
FASTLANE_MATCH_PWD: '${{ secrets.FASTLANE_MATCH_PWD }}'
|
||||||
|
FASTLANE_MATCH_TOKEN: '${{ secrets.FASTLANE_MATCH_TOKEN }}'
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_iOS
|
||||||
|
path: Techmino.ipa
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,4 +1,8 @@
|
|||||||
.vscode
|
.vscode
|
||||||
libAndroid
|
libAndroid
|
||||||
font.ttf
|
*.ini
|
||||||
note.lua
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
Icon?
|
||||||
|
.Trash
|
||||||
|
.file
|
||||||
|
|||||||
165
LICENSE
165
LICENSE
@@ -1,165 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 29 June 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
|
|
||||||
This version of the GNU Lesser General Public License incorporates
|
|
||||||
the terms and conditions of version 3 of the GNU General Public
|
|
||||||
License, supplemented by the additional permissions listed below.
|
|
||||||
|
|
||||||
0. Additional Definitions.
|
|
||||||
|
|
||||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
||||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
||||||
General Public License.
|
|
||||||
|
|
||||||
"The Library" refers to a covered work governed by this License,
|
|
||||||
other than an Application or a Combined Work as defined below.
|
|
||||||
|
|
||||||
An "Application" is any work that makes use of an interface provided
|
|
||||||
by the Library, but which is not otherwise based on the Library.
|
|
||||||
Defining a subclass of a class defined by the Library is deemed a mode
|
|
||||||
of using an interface provided by the Library.
|
|
||||||
|
|
||||||
A "Combined Work" is a work produced by combining or linking an
|
|
||||||
Application with the Library. The particular version of the Library
|
|
||||||
with which the Combined Work was made is also called the "Linked
|
|
||||||
Version".
|
|
||||||
|
|
||||||
The "Minimal Corresponding Source" for a Combined Work means the
|
|
||||||
Corresponding Source for the Combined Work, excluding any source code
|
|
||||||
for portions of the Combined Work that, considered in isolation, are
|
|
||||||
based on the Application, and not on the Linked Version.
|
|
||||||
|
|
||||||
The "Corresponding Application Code" for a Combined Work means the
|
|
||||||
object code and/or source code for the Application, including any data
|
|
||||||
and utility programs needed for reproducing the Combined Work from the
|
|
||||||
Application, but excluding the System Libraries of the Combined Work.
|
|
||||||
|
|
||||||
1. Exception to Section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
You may convey a covered work under sections 3 and 4 of this License
|
|
||||||
without being bound by section 3 of the GNU GPL.
|
|
||||||
|
|
||||||
2. Conveying Modified Versions.
|
|
||||||
|
|
||||||
If you modify a copy of the Library, and, in your modifications, a
|
|
||||||
facility refers to a function or data to be supplied by an Application
|
|
||||||
that uses the facility (other than as an argument passed when the
|
|
||||||
facility is invoked), then you may convey a copy of the modified
|
|
||||||
version:
|
|
||||||
|
|
||||||
a) under this License, provided that you make a good faith effort to
|
|
||||||
ensure that, in the event an Application does not supply the
|
|
||||||
function or data, the facility still operates, and performs
|
|
||||||
whatever part of its purpose remains meaningful, or
|
|
||||||
|
|
||||||
b) under the GNU GPL, with none of the additional permissions of
|
|
||||||
this License applicable to that copy.
|
|
||||||
|
|
||||||
3. Object Code Incorporating Material from Library Header Files.
|
|
||||||
|
|
||||||
The object code form of an Application may incorporate material from
|
|
||||||
a header file that is part of the Library. You may convey such object
|
|
||||||
code under terms of your choice, provided that, if the incorporated
|
|
||||||
material is not limited to numerical parameters, data structure
|
|
||||||
layouts and accessors, or small macros, inline functions and templates
|
|
||||||
(ten or fewer lines in length), you do both of the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the object code that the
|
|
||||||
Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
4. Combined Works.
|
|
||||||
|
|
||||||
You may convey a Combined Work under terms of your choice that,
|
|
||||||
taken together, effectively do not restrict modification of the
|
|
||||||
portions of the Library contained in the Combined Work and reverse
|
|
||||||
engineering for debugging such modifications, if you also do each of
|
|
||||||
the following:
|
|
||||||
|
|
||||||
a) Give prominent notice with each copy of the Combined Work that
|
|
||||||
the Library is used in it and that the Library and its use are
|
|
||||||
covered by this License.
|
|
||||||
|
|
||||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
||||||
document.
|
|
||||||
|
|
||||||
c) For a Combined Work that displays copyright notices during
|
|
||||||
execution, include the copyright notice for the Library among
|
|
||||||
these notices, as well as a reference directing the user to the
|
|
||||||
copies of the GNU GPL and this license document.
|
|
||||||
|
|
||||||
d) Do one of the following:
|
|
||||||
|
|
||||||
0) Convey the Minimal Corresponding Source under the terms of this
|
|
||||||
License, and the Corresponding Application Code in a form
|
|
||||||
suitable for, and under terms that permit, the user to
|
|
||||||
recombine or relink the Application with a modified version of
|
|
||||||
the Linked Version to produce a modified Combined Work, in the
|
|
||||||
manner specified by section 6 of the GNU GPL for conveying
|
|
||||||
Corresponding Source.
|
|
||||||
|
|
||||||
1) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (a) uses at run time
|
|
||||||
a copy of the Library already present on the user's computer
|
|
||||||
system, and (b) will operate properly with a modified version
|
|
||||||
of the Library that is interface-compatible with the Linked
|
|
||||||
Version.
|
|
||||||
|
|
||||||
e) Provide Installation Information, but only if you would otherwise
|
|
||||||
be required to provide such information under section 6 of the
|
|
||||||
GNU GPL, and only to the extent that such information is
|
|
||||||
necessary to install and execute a modified version of the
|
|
||||||
Combined Work produced by recombining or relinking the
|
|
||||||
Application with a modified version of the Linked Version. (If
|
|
||||||
you use option 4d0, the Installation Information must accompany
|
|
||||||
the Minimal Corresponding Source and Corresponding Application
|
|
||||||
Code. If you use option 4d1, you must provide the Installation
|
|
||||||
Information in the manner specified by section 6 of the GNU GPL
|
|
||||||
for conveying Corresponding Source.)
|
|
||||||
|
|
||||||
5. Combined Libraries.
|
|
||||||
|
|
||||||
You may place library facilities that are a work based on the
|
|
||||||
Library side by side in a single library together with other library
|
|
||||||
facilities that are not Applications and are not covered by this
|
|
||||||
License, and convey such a combined library under terms of your
|
|
||||||
choice, if you do both of the following:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work based
|
|
||||||
on the Library, uncombined with any other library facilities,
|
|
||||||
conveyed under the terms of this License.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library that part of it
|
|
||||||
is a work based on the Library, and explaining where to find the
|
|
||||||
accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
6. Revised Versions of the GNU Lesser General Public License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the GNU Lesser General Public License from time to time. Such new
|
|
||||||
versions will be similar in spirit to the present version, but may
|
|
||||||
differ in detail to address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Library as you received it specifies that a certain numbered version
|
|
||||||
of the GNU Lesser General Public License "or any later version"
|
|
||||||
applies to it, you have the option of following the terms and
|
|
||||||
conditions either of that published version or of any later version
|
|
||||||
published by the Free Software Foundation. If the Library as you
|
|
||||||
received it does not specify a version number of the GNU Lesser
|
|
||||||
General Public License, you may choose any version of the GNU Lesser
|
|
||||||
General Public License ever published by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Library as you received it specifies that a proxy can decide
|
|
||||||
whether future versions of the GNU Lesser General Public License shall
|
|
||||||
apply, that proxy's public statement of acceptance of any version is
|
|
||||||
permanent authorization for you to choose that version for the
|
|
||||||
Library.
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
local printf=love.graphics.printf
|
|
||||||
local draw=love.graphics.draw
|
|
||||||
local aDraw={}
|
|
||||||
function aDraw.str(obj,x,y)printf(obj,x-626,y,1252,"center")end
|
|
||||||
function aDraw.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end
|
|
||||||
function aDraw.simpY(obj,x,y)draw(obj,x,y-obj:getHeight()*.5)end
|
|
||||||
function aDraw.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end
|
|
||||||
function aDraw.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end
|
|
||||||
function aDraw.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end
|
|
||||||
return aDraw
|
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
|
local gc_clear=love.graphics.clear
|
||||||
local BGs={
|
local BGs={
|
||||||
none={
|
none={draw=function()gc_clear(.08,.08,.084)end}
|
||||||
draw=function()
|
|
||||||
love.graphics.clear(.15,.15,.15)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
local BGlist={"none"}
|
local BGlist={'none'}
|
||||||
local BG={
|
local BG={
|
||||||
cur="none",
|
default='none',
|
||||||
default="none",
|
locked=false,
|
||||||
|
cur='none',
|
||||||
init=false,
|
init=false,
|
||||||
resize=false,
|
resize=false,
|
||||||
update=NULL,
|
update=NULL,
|
||||||
@@ -17,6 +15,8 @@ local BG={
|
|||||||
discard=NULL,
|
discard=NULL,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function BG.lock()BG.locked=true end
|
||||||
|
function BG.unlock()BG.locked=false end
|
||||||
function BG.add(name,bg)
|
function BG.add(name,bg)
|
||||||
BGs[name]=bg
|
BGs[name]=bg
|
||||||
BGlist[#BGlist+1]=name
|
BGlist[#BGlist+1]=name
|
||||||
@@ -24,6 +24,9 @@ end
|
|||||||
function BG.getList()
|
function BG.getList()
|
||||||
return BGlist
|
return BGlist
|
||||||
end
|
end
|
||||||
|
function BG.remList(name)
|
||||||
|
table.remove(BGlist,TABLE.find(BGlist,name))
|
||||||
|
end
|
||||||
function BG.send(...)
|
function BG.send(...)
|
||||||
if BG.event then
|
if BG.event then
|
||||||
BG.event(...)
|
BG.event(...)
|
||||||
@@ -32,20 +35,20 @@ end
|
|||||||
function BG.setDefault(bg)
|
function BG.setDefault(bg)
|
||||||
BG.default=bg
|
BG.default=bg
|
||||||
end
|
end
|
||||||
function BG.set(background)
|
function BG.set(name)
|
||||||
if not background then background=BG.default end
|
name=name or BG.default
|
||||||
if not BGs[background]or not SETTING.bg then return end
|
if not BGs[name]or BG.locked then return end
|
||||||
if background~=BG.cur then
|
if name~=BG.cur then
|
||||||
BG.discard()
|
BG.discard()
|
||||||
BG.cur=background
|
BG.cur=name
|
||||||
background=BGs[background]
|
local bg=BGs[name]
|
||||||
|
|
||||||
BG.init= background.init or NULL
|
BG.init= bg.init or NULL
|
||||||
BG.resize= background.resize or NULL
|
BG.resize= bg.resize or NULL
|
||||||
BG.update= background.update or NULL
|
BG.update= bg.update or NULL
|
||||||
BG.draw= background.draw or NULL
|
BG.draw= bg.draw or NULL
|
||||||
BG.event= background.event or NULL
|
BG.event= bg.event or NULL
|
||||||
BG.discard= background.discard or NULL
|
BG.discard=bg.discard or NULL
|
||||||
BG.init()
|
BG.init()
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -1,103 +1,182 @@
|
|||||||
|
local lastLoaded={}
|
||||||
|
local maxLoadedCount=3
|
||||||
|
local nameList={}
|
||||||
|
local SourceObjList={}
|
||||||
|
local volume=1
|
||||||
|
|
||||||
local BGM={
|
local BGM={
|
||||||
default=false,
|
default=false,
|
||||||
getList=function()error("Can't getList before initialized!")end,
|
onChange=NULL,
|
||||||
getCount=function()return 0 end,
|
|
||||||
play=NULL,
|
|
||||||
freshVolume=NULL,
|
|
||||||
stop=NULL,
|
|
||||||
--nowPlay=[str:playing ID]
|
--nowPlay=[str:playing ID]
|
||||||
--playing=[src:playing SRC]
|
--playing=[src:playing SRC]
|
||||||
|
--lastPlayed=[str:lastPlayed ID]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function BGM.getList()return nameList end
|
||||||
|
function BGM.getCount()return #nameList end
|
||||||
|
local function _addFile(name,path)
|
||||||
|
if not SourceObjList[name]then
|
||||||
|
table.insert(nameList,name)
|
||||||
|
SourceObjList[name]={path=path,source=false}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function BGM.load(name,path)
|
||||||
|
if type(name)=='table'then
|
||||||
|
for k,v in next,name do
|
||||||
|
_addFile(k,v)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
_addFile(name,path)
|
||||||
|
end
|
||||||
|
table.sort(nameList)
|
||||||
|
LOG(BGM.getCount().." BGM files added")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function _tryReleaseSources()
|
||||||
|
local n=#lastLoaded
|
||||||
|
while #lastLoaded>maxLoadedCount do
|
||||||
|
local name=lastLoaded[n]
|
||||||
|
if SourceObjList[name].source:isPlaying()then
|
||||||
|
n=n-1
|
||||||
|
if n<=0 then return end
|
||||||
|
else
|
||||||
|
SourceObjList[name].source=SourceObjList[name].source:release()and nil
|
||||||
|
table.remove(lastLoaded,n)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
function BGM.setDefault(bgm)
|
function BGM.setDefault(bgm)
|
||||||
BGM.default=bgm
|
BGM.default=bgm
|
||||||
end
|
end
|
||||||
function BGM.init(list)
|
function BGM.setMaxSources(count)
|
||||||
BGM.init=nil
|
maxLoadedCount=count
|
||||||
local min=math.min
|
_tryReleaseSources()
|
||||||
local Sources={}function BGM.getList()return list end
|
end
|
||||||
|
function BGM.setChange(func)
|
||||||
local count=#list function BGM.getCount()return count end
|
BGM.onChange=func
|
||||||
local function fadeOut(src)
|
end
|
||||||
while true do
|
function BGM.setVol(v)
|
||||||
coroutine.yield()
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
|
||||||
local v=src:getVolume()-.025*SETTING.bgm
|
volume=v
|
||||||
src:setVolume(v>0 and v or 0)
|
|
||||||
if v<=0 then
|
|
||||||
src:stop()
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function fadeIn(src)
|
|
||||||
while true do
|
|
||||||
coroutine.yield()
|
|
||||||
local v=SETTING.bgm
|
|
||||||
v=min(v,src:getVolume()+.025*v)
|
|
||||||
src:setVolume(v)
|
|
||||||
if v>=SETTING.bgm then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function removeCurFadeOut(task,code,src)
|
|
||||||
return task.code==code and task.args[1]==src
|
|
||||||
end
|
|
||||||
local function load(skip)
|
|
||||||
for i=1,count do
|
|
||||||
local file="media/BGM/"..list[i]..".ogg"
|
|
||||||
if love.filesystem.getInfo(file)then
|
|
||||||
Sources[list[i]]=love.audio.newSource(file,"stream")
|
|
||||||
Sources[list[i]]:setLooping(true)
|
|
||||||
Sources[list[i]]:setVolume(0)
|
|
||||||
else
|
|
||||||
LOG.print("No BGM file: "..list[i],5,COLOR.O)
|
|
||||||
end
|
|
||||||
if not skip and i~=count then
|
|
||||||
coroutine.yield()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
BGM.loadOne=nil
|
|
||||||
|
|
||||||
function BGM.play(s)
|
|
||||||
if not s then s=BGM.default end
|
|
||||||
if SETTING.bgm==0 then
|
|
||||||
BGM.nowPlay=s
|
|
||||||
BGM.playing=Sources[s]
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
if s and Sources[s]then
|
|
||||||
if BGM.nowPlay~=s then
|
|
||||||
if BGM.nowPlay then TASK.new(fadeOut,BGM.playing)end
|
|
||||||
TASK.removeTask_iterate(removeCurFadeOut,fadeOut,Sources[s])
|
|
||||||
TASK.removeTask_code(fadeIn)
|
|
||||||
|
|
||||||
TASK.new(fadeIn,Sources[s])
|
|
||||||
BGM.nowPlay=s
|
|
||||||
BGM.playing=Sources[s]
|
|
||||||
BGM.playing:play()
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function BGM.freshVolume()
|
|
||||||
if BGM.playing then
|
if BGM.playing then
|
||||||
local v=SETTING.bgm
|
if volume>0 then
|
||||||
if v>0 then
|
BGM.playing:setVolume(volume)
|
||||||
BGM.playing:setVolume(v)
|
|
||||||
BGM.playing:play()
|
BGM.playing:play()
|
||||||
elseif BGM.nowPlay then
|
elseif BGM.nowPlay then
|
||||||
BGM.playing:pause()
|
BGM.playing:pause()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function BGM.stop()
|
|
||||||
TASK.removeTask_code(fadeIn)
|
|
||||||
if BGM.nowPlay then TASK.new(fadeOut,BGM.playing)end
|
|
||||||
BGM.nowPlay,BGM.playing=nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
BGM.loadOne=coroutine.wrap(load)
|
local function task_fadeOut(src)
|
||||||
function BGM.loadAll()load(true)end
|
while true do
|
||||||
|
coroutine.yield()
|
||||||
|
local v=src:getVolume()-.025*volume
|
||||||
|
src:setVolume(v>0 and v or 0)
|
||||||
|
if v<=0 then
|
||||||
|
src:pause()
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function task_fadeIn(src)
|
||||||
|
while true do
|
||||||
|
coroutine.yield()
|
||||||
|
local v=volume
|
||||||
|
v=math.min(v,src:getVolume()+.025*v)
|
||||||
|
src:setVolume(v)
|
||||||
|
if v>=volume then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function check_curFadeOut(task,code,src)
|
||||||
|
return task.code==code and task.args[1]==src
|
||||||
|
end
|
||||||
|
local function _tryLoad(name)
|
||||||
|
if SourceObjList[name]then
|
||||||
|
if SourceObjList[name].source then
|
||||||
|
return true
|
||||||
|
elseif love.filesystem.getInfo(SourceObjList[name].path)then
|
||||||
|
SourceObjList[name].source=love.audio.newSource(SourceObjList[name].path,'stream')
|
||||||
|
SourceObjList[name].source:setVolume(0)
|
||||||
|
table.insert(lastLoaded,1,name)
|
||||||
|
_tryReleaseSources()
|
||||||
|
return true
|
||||||
|
else
|
||||||
|
LOG("No BGM: "..SourceObjList[name],5)
|
||||||
|
end
|
||||||
|
elseif name then
|
||||||
|
LOG("No BGM: "..name,5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function BGM.play(name,args)
|
||||||
|
name=name or BGM.default
|
||||||
|
args=args or""
|
||||||
|
if not _tryLoad(name)or args:sArg('-preLoad')then return end
|
||||||
|
if volume==0 then
|
||||||
|
BGM.nowPlay=name
|
||||||
|
BGM.playing=SourceObjList[name].source
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if name and SourceObjList[name].source then
|
||||||
|
if BGM.nowPlay~=name then
|
||||||
|
if BGM.nowPlay then
|
||||||
|
if not args:sArg('-sdout')then
|
||||||
|
TASK.new(task_fadeOut,BGM.playing)
|
||||||
|
else
|
||||||
|
BGM.playing:pause()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,SourceObjList[name].source)
|
||||||
|
TASK.removeTask_code(task_fadeIn)
|
||||||
|
|
||||||
|
BGM.nowPlay=name
|
||||||
|
BGM.playing=SourceObjList[name].source
|
||||||
|
if not args:sArg('-sdin')then
|
||||||
|
BGM.playing:setVolume(0)
|
||||||
|
TASK.new(task_fadeIn,BGM.playing)
|
||||||
|
else
|
||||||
|
BGM.playing:setVolume(volume)
|
||||||
|
BGM.playing:play()
|
||||||
|
end
|
||||||
|
SourceObjList[name].source:setLooping(not args:sArg('-noloop'))
|
||||||
|
BGM.lastPlayed=BGM.nowPlay
|
||||||
|
BGM.playing:seek(0)
|
||||||
|
BGM.playing:play()
|
||||||
|
BGM.onChange(name)
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function BGM.seek(t)
|
||||||
|
if BGM.playing then
|
||||||
|
BGM.playing:seek(t)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function BGM.isPlaying()
|
||||||
|
return BGM.playing and BGM.playing:isPlaying()
|
||||||
|
end
|
||||||
|
function BGM.continue()
|
||||||
|
if BGM.lastPlayed then
|
||||||
|
BGM.nowPlay,BGM.playing=BGM.lastPlayed,SourceObjList[BGM.lastPlayed].source
|
||||||
|
TASK.removeTask_iterate(check_curFadeOut,task_fadeOut,SourceObjList[BGM.nowPlay].source)
|
||||||
|
TASK.removeTask_code(task_fadeIn)
|
||||||
|
TASK.new(task_fadeIn,BGM.playing)
|
||||||
|
BGM.playing:play()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function BGM.stop(args)
|
||||||
|
args=args or""
|
||||||
|
TASK.removeTask_code(task_fadeIn)
|
||||||
|
if not args:sArg('-s')then
|
||||||
|
if BGM.nowPlay then
|
||||||
|
TASK.new(task_fadeOut,BGM.playing)
|
||||||
|
end
|
||||||
|
elseif BGM.playing then
|
||||||
|
BGM.playing:pause()
|
||||||
|
end
|
||||||
|
BGM.nowPlay,BGM.playing=nil
|
||||||
end
|
end
|
||||||
return BGM
|
return BGM
|
||||||
@@ -1,66 +1,88 @@
|
|||||||
|
local abs=math.abs
|
||||||
|
local function hsv(h,s,v,a)--Color type, Color amount, Light
|
||||||
|
if s<=0 then return v,v,v,a end
|
||||||
|
h=h*6
|
||||||
|
local c=v*s
|
||||||
|
local x=abs((h-1)%2-1)*c
|
||||||
|
if h<1 then return v,x+v-c,v-c,a
|
||||||
|
elseif h<2 then return x+v-c,v,v-c,a
|
||||||
|
elseif h<3 then return v-c,v,x+v-c,a
|
||||||
|
elseif h<4 then return v-c,x+v-c,v,a
|
||||||
|
elseif h<5 then return x+v-c,v-c,v,a
|
||||||
|
else return v,v-c,x+v-c,a
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local COLOR={
|
local COLOR={
|
||||||
red= {1.0, 0.0, 0.0},
|
hsv=hsv,
|
||||||
fire= {1.0, 0.4, 0.0},
|
|
||||||
orange= {1.0, 0.6, 0.0},
|
|
||||||
yellow= {1.0, 1.0, 0.0},
|
|
||||||
lime= {0.7, 1.0, 0.0},
|
|
||||||
jade= {0.5, 1.0, 0.0},
|
|
||||||
green= {0.0, 1.0, 0.0},
|
|
||||||
aqua= {0.0, 1.0, 0.6},
|
|
||||||
cyan= {0.0, 1.0, 1.0},
|
|
||||||
navy= {0.0, 0.7, 1.0},
|
|
||||||
sea= {0.0, 0.4, 1.0},
|
|
||||||
blue= {0.2, 0.2, 1.0},
|
|
||||||
violet= {0.4, 0.0, 1.0},
|
|
||||||
purple= {0.7, 0.0, 1.0},
|
|
||||||
magenta= {1.0, 0.0, 1.0},
|
|
||||||
wine= {1.0, 0.0, 0.5},
|
|
||||||
|
|
||||||
lRed= {1.0, 0.5, 0.5},
|
red= {hsv(0.00, 0.89, 0.91)},
|
||||||
lFire= {1.0, 0.7, 0.5},
|
fire= {hsv(0.04, 0.93, 0.94)},
|
||||||
lOrange= {1.0, 0.8, 0.3},
|
orange= {hsv(0.09, 0.99, 0.96)},
|
||||||
lYellow= {1.0, 1.0, 0.5},
|
yellow= {hsv(0.15, 0.82, 0.90)},
|
||||||
lLime= {0.8, 1.0, 0.4},
|
lime= {hsv(0.20, 0.89, 0.88)},
|
||||||
lJade= {0.6, 1.0, 0.4},
|
jade= {hsv(0.25, 1.00, 0.82)},
|
||||||
lGreen= {0.5, 1.0, 0.5},
|
green= {hsv(0.33, 1.00, 0.81)},
|
||||||
lAqua= {0.4, 1.0, 0.7},
|
aqua= {hsv(0.47, 1.00, 0.76)},
|
||||||
lCyan= {0.5, 1.0, 1.0},
|
cyan= {hsv(0.53, 1.00, 0.88)},
|
||||||
lNavy= {0.5, 0.8, 1.0},
|
navy= {hsv(0.56, 1.00, 1.00)},
|
||||||
lSea= {0.4, 0.7, 1.0},
|
sea= {hsv(0.61, 1.00, 1.00)},
|
||||||
lBlue= {0.7, 0.7, 1.0},
|
blue= {hsv(0.64, 1.00, 0.95)},
|
||||||
lViolet= {0.7, 0.4, 1.0},
|
violet= {hsv(0.74, 1.00, 0.91)},
|
||||||
lPurple= {0.8, 0.4, 1.0},
|
purple= {hsv(0.80, 1.00, 0.81)},
|
||||||
lMagenta= {1.0, 0.5, 1.0},
|
magenta= {hsv(0.86, 1.00, 0.78)},
|
||||||
lWine= {1.0, 0.4, 0.7},
|
wine= {hsv(0.92, 0.98, 0.91)},
|
||||||
|
|
||||||
dRed= {0.6, 0.0, 0.0},
|
lRed= {hsv(0.00, 0.38, 0.93)},
|
||||||
dFire= {0.6, 0.3, 0.0},
|
lFire= {hsv(0.04, 0.45, 0.91)},
|
||||||
dOrange= {0.6, 0.4, 0.0},
|
lOrange= {hsv(0.10, 0.53, 0.92)},
|
||||||
dYellow= {0.6, 0.6, 0.0},
|
lYellow= {hsv(0.14, 0.61, 0.95)},
|
||||||
dLime= {0.5, 0.6, 0.0},
|
lLime= {hsv(0.20, 0.66, 0.92)},
|
||||||
dJade= {0.3, 0.6, 0.0},
|
lJade= {hsv(0.26, 0.56, 0.90)},
|
||||||
dGreen= {0.0, 0.6, 0.0},
|
lGreen= {hsv(0.34, 0.49, 0.89)},
|
||||||
dAqua= {0.0, 0.6, 0.4},
|
lAqua= {hsv(0.47, 0.59, 0.86)},
|
||||||
dCyan= {0.0, 0.6, 0.6},
|
lCyan= {hsv(0.51, 0.77, 0.88)},
|
||||||
dNavy= {0.0, 0.4, 0.6},
|
lNavy= {hsv(0.54, 0.80, 0.95)},
|
||||||
dSea= {0.0, 0.2, 0.6},
|
lSea= {hsv(0.57, 0.72, 0.97)},
|
||||||
dBlue= {0.1, 0.1, 0.6},
|
lBlue= {hsv(0.64, 0.44, 0.96)},
|
||||||
dViolet= {0.2, 0.0, 0.6},
|
lViolet= {hsv(0.72, 0.47, 0.95)},
|
||||||
dPurple= {0.4, 0.0, 0.6},
|
lPurple= {hsv(0.80, 0.62, 0.89)},
|
||||||
dMagenta= {0.6, 0.0, 0.6},
|
lMagenta= {hsv(0.86, 0.61, 0.89)},
|
||||||
dWine= {0.6, 0.0, 0.3},
|
lWine= {hsv(0.93, 0.57, 0.92)},
|
||||||
|
|
||||||
black= {0.0, 0.0, 0.0},
|
dRed= {hsv(0.00, 0.80, 0.48)},
|
||||||
dGray= {0.3, 0.3, 0.3},
|
dFire= {hsv(0.04, 0.80, 0.34)},
|
||||||
gray= {0.6, 0.6, 0.6},
|
dOrange= {hsv(0.07, 0.80, 0.39)},
|
||||||
lGray= {0.8, 0.8, 0.8},
|
dYellow= {hsv(0.12, 0.80, 0.37)},
|
||||||
white= {1.0, 1.0, 1.0},
|
dLime= {hsv(0.20, 0.80, 0.26)},
|
||||||
|
dJade= {hsv(0.29, 0.80, 0.27)},
|
||||||
|
dGreen= {hsv(0.33, 0.80, 0.26)},
|
||||||
|
dAqua= {hsv(0.46, 0.80, 0.24)},
|
||||||
|
dCyan= {hsv(0.50, 0.80, 0.30)},
|
||||||
|
dNavy= {hsv(0.58, 0.80, 0.42)},
|
||||||
|
dSea= {hsv(0.64, 0.80, 0.40)},
|
||||||
|
dBlue= {hsv(0.67, 0.80, 0.34)},
|
||||||
|
dViolet= {hsv(0.71, 0.80, 0.35)},
|
||||||
|
dPurple= {hsv(0.76, 0.80, 0.32)},
|
||||||
|
dMagenta= {hsv(0.87, 0.80, 0.28)},
|
||||||
|
dWine= {hsv(0.92, 0.80, 0.28)},
|
||||||
|
|
||||||
|
black= {hsv(0.04, 0.04, 0.14)},
|
||||||
|
dGray= {hsv(0.02, 0.05, 0.44)},
|
||||||
|
gray= {hsv(0.02, 0.05, 0.65)},
|
||||||
|
lGray= {hsv(0.02, 0.06, 0.86)},
|
||||||
|
white= {hsv(0.01, 0.02, 0.99)},
|
||||||
|
|
||||||
|
xGray= {hsv(0.00, 0.00, 0.35,.8)},
|
||||||
|
lxGray= {hsv(0.00, 0.00, 0.62,.8)},
|
||||||
|
dxGray= {hsv(0.00, 0.00, 0.16,.8)},
|
||||||
}
|
}
|
||||||
for k,v in next,{
|
for k,v in next,{
|
||||||
R="red",F="fire",O="orange",Y="yellow",L="lime",J="jade",G="green",A="aqua",C="cyan",N="navy",S="sea",B="blue",V="violet",P="purple",M="magenta",W="wine",
|
R='red', F='fire', O='orange', Y='yellow', L='lime', J='jade', G='green', A='aqua', C='cyan', N='navy', S='sea', B='blue', V='violet', P='purple', M='magenta', W='wine',
|
||||||
lR="lRed",lF="lFire",lO="lOrange",lY="lYellow",lL="lLime",lJ="lJade",lG="lGreen",lA="lAqua",lC="lCyan",lN="lNavy",lS="lSea",lB="lBlue",lV="lViolet",lP="lPurple",lM="lMagenta",lW="lWine",
|
lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine',
|
||||||
dR="dRed",dF="dFire",dO="dOrange",dY="dYellow",dL="dLime",dJ="dJade",dG="dGreen",dA="dAqua",dC="dCyan",dN="dNavy",dS="dSea",dB="dBlue",dV="dViolet",dP="dPurple",dM="dMagenta",dW="dWine",
|
dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine',
|
||||||
D="black",dH="dGray",H="gray",lH="lGray",Z="white",
|
D='black',dH='dGray',H='gray',lH='lGray',Z='white',
|
||||||
|
X='xGray',lX='lxGray',dX='dxGray',
|
||||||
--Remain letter: EIKQTUX
|
--Remain letter: EIKQTUX
|
||||||
}do
|
}do
|
||||||
COLOR[k]=COLOR[v]
|
COLOR[k]=COLOR[v]
|
||||||
@@ -72,19 +94,19 @@ end})
|
|||||||
|
|
||||||
do--Random generators
|
do--Random generators
|
||||||
local rnd=math.random
|
local rnd=math.random
|
||||||
local list_norm={"red","fire","orange","yellow","lime","jade","green","aqua","cyan","navy","sea","blue","violet","purple","magenta","wine"}
|
local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'}
|
||||||
local len_list_norm=#list_norm
|
local len_list_norm=#list_norm
|
||||||
function COLOR.random_norm()
|
function COLOR.random_norm()
|
||||||
return COLOR[list_norm[rnd(len_list_norm)]]
|
return COLOR[list_norm[rnd(len_list_norm)]]
|
||||||
end
|
end
|
||||||
|
|
||||||
local list_bright={"lRed","lFire","lOrange","lYellow","lLime","lJade","lGreen","lAqua","lCyan","lNavy","lSea","lBlue","lViolet","lPurple","lMagenta","lWine"}
|
local list_bright={'lRed','lFire','lOrange','lYellow','lLime','lJade','lGreen','lAqua','lCyan','lNavy','lSea','lBlue','lViolet','lPurple','lMagenta','lWine'}
|
||||||
local len_list_bright=#list_bright
|
local len_list_bright=#list_bright
|
||||||
function COLOR.random_bright()
|
function COLOR.random_bright()
|
||||||
return COLOR[list_bright[rnd(len_list_bright)]]
|
return COLOR[list_bright[rnd(len_list_bright)]]
|
||||||
end
|
end
|
||||||
|
|
||||||
local list_dark={"dRed","dFire","dOrange","dYellow","dLime","dJade","dGreen","dAqua","dCyan","dNavy","dSea","dBlue","dViolet","dPurple","dMagenta","dWine"}
|
local list_dark={'dRed','dFire','dOrange','dYellow','dLime','dJade','dGreen','dAqua','dCyan','dNavy','dSea','dBlue','dViolet','dPurple','dMagenta','dWine'}
|
||||||
local len_list_dark=#list_dark
|
local len_list_dark=#list_dark
|
||||||
function COLOR.random_dark()
|
function COLOR.random_dark()
|
||||||
return COLOR[list_dark[rnd(len_list_dark)]]
|
return COLOR[list_dark[rnd(len_list_dark)]]
|
||||||
@@ -93,29 +115,33 @@ end
|
|||||||
|
|
||||||
do--Rainbow generators
|
do--Rainbow generators
|
||||||
local sin=math.sin
|
local sin=math.sin
|
||||||
function COLOR.rainbow(phase)
|
function COLOR.rainbow(phase,a)
|
||||||
return
|
return
|
||||||
sin(phase)*.4+.6,
|
sin(phase)*.4+.6,
|
||||||
sin(phase+2.0944)*.4+.6,
|
sin(phase+2.0944)*.4+.6,
|
||||||
sin(phase-2.0944)*.4+.6
|
sin(phase-2.0944)*.4+.6,
|
||||||
|
a
|
||||||
end
|
end
|
||||||
function COLOR.rainbow_light(phase)
|
function COLOR.rainbow_light(phase,a)
|
||||||
return
|
return
|
||||||
sin(phase)*.2+.7,
|
sin(phase)*.2+.7,
|
||||||
sin(phase+2.0944)*.2+.7,
|
sin(phase+2.0944)*.2+.7,
|
||||||
sin(phase-2.0944)*.2+.7
|
sin(phase-2.0944)*.2+.7,
|
||||||
|
a
|
||||||
end
|
end
|
||||||
function COLOR.rainbow_dark(phase)
|
function COLOR.rainbow_dark(phase,a)
|
||||||
return
|
return
|
||||||
sin(phase)*.2+.4,
|
sin(phase)*.2+.4,
|
||||||
sin(phase+2.0944)*.2+.4,
|
sin(phase+2.0944)*.2+.4,
|
||||||
sin(phase-2.0944)*.2+.4
|
sin(phase-2.0944)*.2+.4,
|
||||||
|
a
|
||||||
end
|
end
|
||||||
function COLOR.rainbow_gray(phase)
|
function COLOR.rainbow_gray(phase,a)
|
||||||
return
|
return
|
||||||
sin(phase)*.16+.5,
|
sin(phase)*.16+.5,
|
||||||
sin(phase+2.0944)*.16+.5,
|
sin(phase+2.0944)*.16+.5,
|
||||||
sin(phase-2.0944)*.16+.5
|
sin(phase-2.0944)*.16+.5,
|
||||||
|
a
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
local gc=love.graphics
|
|
||||||
local cmds={
|
|
||||||
reset="origin",
|
|
||||||
trans="translate",
|
|
||||||
scale="scale",
|
|
||||||
rotat="rotate",
|
|
||||||
clear="clear",
|
|
||||||
|
|
||||||
setCL="setColor",
|
|
||||||
setCM="setColorMask",
|
|
||||||
setLW="setLineWidth",
|
|
||||||
setLS="setLineStyle",
|
|
||||||
setLJ="setLineJoin",
|
|
||||||
|
|
||||||
draw="draw",
|
|
||||||
dLine="line",
|
|
||||||
fRect=function(...)gc.rectangle("fill",...)end,
|
|
||||||
dRect=function(...)gc.rectangle("line",...)end,
|
|
||||||
fCirc=function(...)gc.circle("fill",...)end,
|
|
||||||
dCirc=function(...)gc.circle("line",...)end,
|
|
||||||
fPoly=function(...)gc.polygon("fill",...)end,
|
|
||||||
dPoly=function(...)gc.polygon("line",...)end,
|
|
||||||
|
|
||||||
drArc=function(...)gc.arc("line",...)end,
|
|
||||||
flArc=function(...)gc.arc("fill",...)end,
|
|
||||||
dpArc=function(...)gc.arc("line","pie",...)end,
|
|
||||||
doArc=function(...)gc.arc("line","open",...)end,
|
|
||||||
dcArc=function(...)gc.arc("line","closed",...)end,
|
|
||||||
fpArc=function(...)gc.arc("fill","pie",...)end,
|
|
||||||
foArc=function(...)gc.arc("fill","open",...)end,
|
|
||||||
fcArc=function(...)gc.arc("fill","closed",...)end,
|
|
||||||
}
|
|
||||||
return function(L)
|
|
||||||
gc.push()
|
|
||||||
local canvas=gc.newCanvas(L[1],L[2])
|
|
||||||
gc.setCanvas(canvas)
|
|
||||||
gc.origin()
|
|
||||||
gc.setColor(1,1,1)
|
|
||||||
gc.setLineWidth(1)
|
|
||||||
for i=3,#L do
|
|
||||||
local cmd=cmds[L[i][1]]
|
|
||||||
if type(cmd)=="string"then
|
|
||||||
gc[cmd](unpack(L[i],2))
|
|
||||||
else
|
|
||||||
cmd(unpack(L[i],2))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
gc.setCanvas()
|
|
||||||
gc.pop()
|
|
||||||
return canvas
|
|
||||||
end
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
local find=string.find
|
|
||||||
local tabs={
|
|
||||||
[0]="",
|
|
||||||
"\t",
|
|
||||||
"\t\t",
|
|
||||||
"\t\t\t",
|
|
||||||
"\t\t\t\t",
|
|
||||||
"\t\t\t\t\t",
|
|
||||||
}
|
|
||||||
return function(L,t)
|
|
||||||
local s
|
|
||||||
if t then
|
|
||||||
s="{\n"
|
|
||||||
else
|
|
||||||
s="return{\n"
|
|
||||||
t=1
|
|
||||||
if type(L)~="table"then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local count=1
|
|
||||||
for k,v in next,L do
|
|
||||||
local T=type(k)
|
|
||||||
if T=="number"then
|
|
||||||
if k==count then
|
|
||||||
k=""
|
|
||||||
count=count+1
|
|
||||||
else
|
|
||||||
k="["..k.."]="
|
|
||||||
end
|
|
||||||
elseif T=="string"then
|
|
||||||
if find(k,"[^0-9a-zA-Z_]")then
|
|
||||||
k="[\""..k.."\"]="
|
|
||||||
else
|
|
||||||
k=k.."="
|
|
||||||
end
|
|
||||||
elseif T=="boolean"then k="["..k.."]="
|
|
||||||
else error("Error key type!")
|
|
||||||
end
|
|
||||||
T=type(v)
|
|
||||||
if T=="number"then v=tostring(v)
|
|
||||||
elseif T=="string"then v="\""..v.."\""
|
|
||||||
elseif T=="table"then v=TABLE.dump(v,t+1)
|
|
||||||
elseif T=="boolean"then v=tostring(v)
|
|
||||||
else error("Error data type!")
|
|
||||||
end
|
|
||||||
s=s..tabs[t]..k..v..",\n"
|
|
||||||
end
|
|
||||||
return s..tabs[t-1].."}"
|
|
||||||
end
|
|
||||||
@@ -1,43 +1,67 @@
|
|||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
local FILE={}
|
local FILE={}
|
||||||
function FILE.load(name)
|
function FILE.load(name,args)
|
||||||
|
if not args then args=''end
|
||||||
if fs.getInfo(name)then
|
if fs.getInfo(name)then
|
||||||
local F=fs.newFile(name)
|
local F=fs.newFile(name)
|
||||||
if F:open("r")then
|
assert(F:open'r','open error')
|
||||||
local s=F:read()
|
local s=F:read()F:close()
|
||||||
F:close()
|
local mode=
|
||||||
if s:sub(1,6)=="return"then
|
STRING.sArg(args,'-luaon')and'luaon'or
|
||||||
s=loadstring(s)
|
STRING.sArg(args,'-lua')and'lua'or
|
||||||
if s then
|
STRING.sArg(args,'-json')and'json'or
|
||||||
setfenv(s,{})
|
STRING.sArg(args,'-string')and'string'or
|
||||||
return s()
|
s:sub(1,6)=='return{'and'luaon'or
|
||||||
|
(s:sub(1,1)=='['and s:sub(-1)==']'or s:sub(1,1)=='{'and s:sub(-1)=='}')and'json'or
|
||||||
|
'string'
|
||||||
|
if mode=='luaon'then
|
||||||
|
local func,err_mes=loadstring(s)
|
||||||
|
if func then
|
||||||
|
setfenv(func,{})
|
||||||
|
local res=func()
|
||||||
|
return assert(res,'decode error')
|
||||||
|
else
|
||||||
|
error('decode error: '..err_mes)
|
||||||
end
|
end
|
||||||
elseif s:sub(1,1)=="["or s:sub(1,1)=="{"then
|
elseif mode=='lua'then
|
||||||
|
local func,err_mes=loadstring(s)
|
||||||
|
if func then
|
||||||
|
local res=func()
|
||||||
|
return assert(res,'run error')
|
||||||
|
else
|
||||||
|
error('compile error: '..err_mes)
|
||||||
|
end
|
||||||
|
elseif mode=='json'then
|
||||||
local res=JSON.decode(s)
|
local res=JSON.decode(s)
|
||||||
if res then
|
if res then
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
else
|
error('decode error')
|
||||||
|
elseif mode=='string'then
|
||||||
return s
|
return s
|
||||||
|
else
|
||||||
|
error('unknown mode')
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
LOG.print(name.." "..text.loadError,COLOR.R)
|
error('no file')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function FILE.save(data,name,mode)
|
function FILE.save(data,name,args)
|
||||||
if not mode then mode=""end
|
if not args then args=''end
|
||||||
if type(data)=="table"then
|
if STRING.sArg(args,'-d')and fs.getInfo(name)then
|
||||||
if mode:find("l")then
|
error('duplicate')
|
||||||
|
end
|
||||||
|
|
||||||
|
if type(data)=='table'then
|
||||||
|
if STRING.sArg(args,'-luaon')then
|
||||||
data=TABLE.dump(data)
|
data=TABLE.dump(data)
|
||||||
if not data then
|
if not data then
|
||||||
LOG.print(name.." "..text.saveError.."dump error","error")
|
error('encode error')
|
||||||
return
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
data=JSON.encode(data)
|
data=JSON.encode(data)
|
||||||
if not data then
|
if not data then
|
||||||
LOG.print(name.." "..text.saveError.."json error","error")
|
error('encode error')
|
||||||
return
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -45,16 +69,37 @@ function FILE.save(data,name,mode)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local F=fs.newFile(name)
|
local F=fs.newFile(name)
|
||||||
F:open("w")
|
assert(F:open('w'),'open error')
|
||||||
local success,mes=F:write(data)
|
F:write(data)F:flush()F:close()
|
||||||
F:flush()F:close()
|
end
|
||||||
if success then
|
function FILE.clear(path)
|
||||||
if not mode:find("q")then
|
if fs.getRealDirectory(path)==SAVEDIR and fs.getInfo(path).type=='directory'then
|
||||||
LOG.print(text.saveDone,COLOR.G)
|
for _,name in next,fs.getDirectoryItems(path)do
|
||||||
|
name=path..'/'..name
|
||||||
|
if fs.getRealDirectory(name)==SAVEDIR then
|
||||||
|
local t=fs.getInfo(name).type
|
||||||
|
if t=='file'then
|
||||||
|
fs.remove(name)
|
||||||
end
|
end
|
||||||
else
|
end
|
||||||
LOG.print(text.saveError..(mes or"unknown error"),"error")
|
end
|
||||||
LOG.print(debug.traceback(),"error")
|
end
|
||||||
|
end
|
||||||
|
function FILE.clear_s(path)
|
||||||
|
if path==''or(fs.getRealDirectory(path)==SAVEDIR and fs.getInfo(path).type=='directory')then
|
||||||
|
for _,name in next,fs.getDirectoryItems(path)do
|
||||||
|
name=path..'/'..name
|
||||||
|
if fs.getRealDirectory(name)==SAVEDIR then
|
||||||
|
local t=fs.getInfo(name).type
|
||||||
|
if t=='file'then
|
||||||
|
fs.remove(name)
|
||||||
|
elseif t=='directory'then
|
||||||
|
FILE.clear_s(name)
|
||||||
|
fs.remove(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fs.remove(path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return FILE
|
return FILE
|
||||||
60
Zframework/font.lua
Normal file
60
Zframework/font.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
local gc=love.graphics
|
||||||
|
local set=gc.setFont
|
||||||
|
local fontFiles,fontCache={},{}
|
||||||
|
local defaultFont,defaultFallBack
|
||||||
|
local curFont=false--Current using font object
|
||||||
|
|
||||||
|
local FONT={}
|
||||||
|
function FONT.setDefault(name)defaultFont=name end
|
||||||
|
function FONT.setFallback(name)defaultFallBack=name end
|
||||||
|
function FONT.rawget(s)
|
||||||
|
if not fontCache[s]then
|
||||||
|
fontCache[s]=gc.setNewFont(s,'light',gc.getDPIScale()*SCR.k*2)
|
||||||
|
end
|
||||||
|
return fontCache[s]
|
||||||
|
end
|
||||||
|
function FONT.rawset(s)
|
||||||
|
set(fontCache[s]or FONT.rawget(s))
|
||||||
|
end
|
||||||
|
function FONT.load(fonts)
|
||||||
|
for name,path in next,fonts do
|
||||||
|
assert(love.filesystem.getInfo(path),STRING.repD("Font file $1($2) not exist!",name,path))
|
||||||
|
fontFiles[name]=love.filesystem.newFile(path)
|
||||||
|
fontCache[name]={}
|
||||||
|
end
|
||||||
|
FONT.reset()
|
||||||
|
end
|
||||||
|
function FONT.get(size,name)
|
||||||
|
if not name then name=defaultFont end
|
||||||
|
local f=fontCache[name][size]
|
||||||
|
if not f then
|
||||||
|
f=gc.setNewFont(fontFiles[name],size,'light',gc.getDPIScale()*SCR.k*2)
|
||||||
|
if defaultFallBack and name~=defaultFallBack then
|
||||||
|
f:setFallbacks(FONT.get(size,defaultFallBack))
|
||||||
|
end
|
||||||
|
fontCache[name][size]=f
|
||||||
|
end
|
||||||
|
return f
|
||||||
|
end
|
||||||
|
function FONT.set(size,name)
|
||||||
|
if not name then name=defaultFont end
|
||||||
|
|
||||||
|
local f=fontCache[name][size]
|
||||||
|
if f~=curFont then
|
||||||
|
curFont=f or FONT.get(size,name)
|
||||||
|
set(curFont)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function FONT.reset()
|
||||||
|
for name,cache in next,fontCache do
|
||||||
|
if type(cache)=='table'then
|
||||||
|
for size in next,cache do
|
||||||
|
cache[size]=FONT.get(size,name)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fontCache[name]=FONT.rawget(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return FONT
|
||||||
164
Zframework/gcExtend.lua
Normal file
164
Zframework/gcExtend.lua
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
local gc=love.graphics
|
||||||
|
local setColor,printf,draw=gc.setColor,gc.printf,gc.draw
|
||||||
|
local GC={}
|
||||||
|
function GC.mStr(obj,x,y)printf(obj,x-626,y,1252,'center')end--Printf a string with 'center'
|
||||||
|
function GC.simpX(obj,x,y)draw(obj,x-obj:getWidth()*.5,y)end--Simply draw an obj with x=obj:getWidth()/2
|
||||||
|
function GC.simpY(obj,x,y)draw(obj,x,y-obj:getHeight()*.5)end--Simply draw an obj with y=obj:getWidth()/2
|
||||||
|
function GC.X(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,0)end--Draw an obj with x=obj:getWidth()/2
|
||||||
|
function GC.Y(obj,x,y,a,k)draw(obj,x,y,a,k,nil,0,obj:getHeight()*.5)end--Draw an obj with y=obj:getWidth()/2
|
||||||
|
function GC.draw(obj,x,y,a,k)draw(obj,x,y,a,k,nil,obj:getWidth()*.5,obj:getHeight()*.5)end--Draw an obj with both middle X & Y
|
||||||
|
function GC.outDraw(obj,div,x,y,a,k)
|
||||||
|
local w,h=obj:getWidth()*.5,obj:getHeight()*.5
|
||||||
|
draw(obj,x-div,y-div,a,k,nil,w,h)
|
||||||
|
draw(obj,x-div,y+div,a,k,nil,w,h)
|
||||||
|
draw(obj,x+div,y-div,a,k,nil,w,h)
|
||||||
|
draw(obj,x+div,y+div,a,k,nil,w,h)
|
||||||
|
end
|
||||||
|
function GC.shadedPrint(str,x,y,mode,d,clr1,clr2)
|
||||||
|
local w=1280
|
||||||
|
if mode=='center'then
|
||||||
|
x=x-w*.5
|
||||||
|
elseif mode=='right'then
|
||||||
|
x=x-w
|
||||||
|
end
|
||||||
|
if not d then d=1 end
|
||||||
|
setColor(clr1 or COLOR.D)
|
||||||
|
printf(str,x-d,y-d,w,mode)
|
||||||
|
printf(str,x-d,y+d,w,mode)
|
||||||
|
printf(str,x+d,y-d,w,mode)
|
||||||
|
printf(str,x+d,y+d,w,mode)
|
||||||
|
setColor(clr2 or COLOR.Z)
|
||||||
|
printf(str,x,y,w,mode)
|
||||||
|
end
|
||||||
|
function GC.regularPolygon(mode,x,y,R,segments,r,phase)
|
||||||
|
local X,Y={},{}
|
||||||
|
local ang=phase or 0
|
||||||
|
local angStep=6.283185307179586/segments
|
||||||
|
for i=1,segments do
|
||||||
|
X[i]=x+R*math.cos(ang)
|
||||||
|
Y[i]=y+R*math.sin(ang)
|
||||||
|
ang=ang+angStep
|
||||||
|
end
|
||||||
|
X[segments+1]=x+R*math.cos(ang)
|
||||||
|
Y[segments+1]=y+R*math.sin(ang)
|
||||||
|
local halfAng=6.283185307179586/segments/2
|
||||||
|
local erasedLen=r*math.tan(halfAng)
|
||||||
|
if mode=='line'then
|
||||||
|
erasedLen=erasedLen+1--Fix 1px cover
|
||||||
|
for i=1,segments do
|
||||||
|
--Line
|
||||||
|
local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1]
|
||||||
|
local dir=math.atan2(y2-y1,x2-x1)
|
||||||
|
gc.line(x1+erasedLen*math.cos(dir),y1+erasedLen*math.sin(dir),x2-erasedLen*math.cos(dir),y2-erasedLen*math.sin(dir))
|
||||||
|
|
||||||
|
--Arc
|
||||||
|
ang=ang+angStep
|
||||||
|
local R2=R-r/math.cos(halfAng)
|
||||||
|
local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang)
|
||||||
|
gc.arc('line','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng)
|
||||||
|
end
|
||||||
|
elseif mode=='fill'then
|
||||||
|
local L={}
|
||||||
|
for i=1,segments do
|
||||||
|
--Line
|
||||||
|
local x1,y1,x2,y2=X[i],Y[i],X[i+1],Y[i+1]
|
||||||
|
local dir=math.atan2(y2-y1,x2-x1)
|
||||||
|
table.insert(L,x1+erasedLen*math.cos(dir))
|
||||||
|
table.insert(L,y1+erasedLen*math.sin(dir))
|
||||||
|
table.insert(L,x2-erasedLen*math.cos(dir))
|
||||||
|
table.insert(L,y2-erasedLen*math.sin(dir))
|
||||||
|
|
||||||
|
--Arc
|
||||||
|
ang=ang+angStep
|
||||||
|
local R2=R-r/math.cos(halfAng)
|
||||||
|
local arcCX,arcCY=x+R2*math.cos(ang),y+R2*math.sin(ang)
|
||||||
|
gc.arc('fill','open',arcCX,arcCY,r,ang-halfAng,ang+halfAng)
|
||||||
|
end
|
||||||
|
gc.polygon('fill',L)
|
||||||
|
else
|
||||||
|
error("Draw mode should be 'line' or 'fill'")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
do--function GC.DO(L)
|
||||||
|
local cmds={
|
||||||
|
origin="origin",
|
||||||
|
move="translate",
|
||||||
|
scale="scale",
|
||||||
|
rotate="rotate",
|
||||||
|
shear="shear",
|
||||||
|
clear="clear",
|
||||||
|
|
||||||
|
setCL="setColor",
|
||||||
|
setCM="setColorMask",
|
||||||
|
setLW="setLineWidth",
|
||||||
|
setLS="setLineStyle",
|
||||||
|
setLJ="setLineJoin",
|
||||||
|
|
||||||
|
print="print",
|
||||||
|
rawFT=function(...)FONT.rawset(...)end,
|
||||||
|
setFT=function(...)FONT.set(...)end,
|
||||||
|
mText=GC.mStr,
|
||||||
|
mDraw=GC.draw,
|
||||||
|
mDrawX=GC.X,
|
||||||
|
mDrawY=GC.Y,
|
||||||
|
mOutDraw=GC.outDraw,
|
||||||
|
|
||||||
|
draw="draw",
|
||||||
|
line="line",
|
||||||
|
fRect=function(...)gc.rectangle('fill',...)end,
|
||||||
|
dRect=function(...)gc.rectangle('line',...)end,
|
||||||
|
fCirc=function(...)gc.circle('fill',...)end,
|
||||||
|
dCirc=function(...)gc.circle('line',...)end,
|
||||||
|
fElps=function(...)gc.ellipse('fill',...)end,
|
||||||
|
dElps=function(...)gc.ellipse('line',...)end,
|
||||||
|
fPoly=function(...)gc.polygon('fill',...)end,
|
||||||
|
dPoly=function(...)gc.polygon('line',...)end,
|
||||||
|
|
||||||
|
dPie=function(...)gc.arc('line',...)end,
|
||||||
|
dArc=function(...)gc.arc('line','open',...)end,
|
||||||
|
dBow=function(...)gc.arc('line','closed',...)end,
|
||||||
|
fPie=function(...)gc.arc('fill',...)end,
|
||||||
|
fArc=function(...)gc.arc('fill','open',...)end,
|
||||||
|
fBow=function(...)gc.arc('fill','closed',...)end,
|
||||||
|
|
||||||
|
fRPol=function(...)GC.regularPolygon('fill',...)end,
|
||||||
|
dRPol=function(...)GC.regularPolygon('line',...)end,
|
||||||
|
}
|
||||||
|
local sizeLimit=gc.getSystemLimits().texturesize
|
||||||
|
function GC.DO(L)
|
||||||
|
gc.push()
|
||||||
|
::REPEAT_tryAgain::
|
||||||
|
local success,canvas=pcall(gc.newCanvas,math.min(L[1],sizeLimit),math.min(L[2],sizeLimit))
|
||||||
|
if not success then
|
||||||
|
sizeLimit=math.floor(sizeLimit*.8)
|
||||||
|
goto REPEAT_tryAgain
|
||||||
|
end
|
||||||
|
gc.setCanvas(canvas)
|
||||||
|
gc.origin()
|
||||||
|
gc.clear(1,1,1,0)
|
||||||
|
gc.setColor(1,1,1)
|
||||||
|
gc.setLineWidth(1)
|
||||||
|
for i=3,#L do
|
||||||
|
local cmd=L[i][1]
|
||||||
|
if type(cmd)=='boolean'and cmd then
|
||||||
|
table.remove(L[i],1)
|
||||||
|
cmd=L[i][1]
|
||||||
|
end
|
||||||
|
if type(cmd)=='string'then
|
||||||
|
local func=cmds[cmd]
|
||||||
|
if type(func)=='string'then
|
||||||
|
func=gc[func]
|
||||||
|
end
|
||||||
|
if func then
|
||||||
|
func(unpack(L[i],2))
|
||||||
|
else
|
||||||
|
error("No gc command: "..cmd)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gc.setCanvas()
|
||||||
|
gc.pop()
|
||||||
|
return canvas
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return GC
|
||||||
@@ -1,35 +1,25 @@
|
|||||||
local IMG={
|
local IMG={}
|
||||||
getCount=function()return 0 end,
|
|
||||||
}
|
|
||||||
function IMG.init(list)
|
function IMG.init(list)
|
||||||
IMG.init=nil
|
IMG.init=nil
|
||||||
local count=0
|
|
||||||
for k,v in next,list do
|
setmetatable(IMG,{__index=function(self,name)
|
||||||
count=count+1
|
if type(list[name])=='table'then
|
||||||
IMG[k]=v
|
self[name]={}
|
||||||
|
for i=1,#list[name]do
|
||||||
|
self[name][i]=love.graphics.newImage(list[name][i])
|
||||||
end
|
end
|
||||||
function IMG.getCount()return count end
|
elseif type(list[name])=='string'then
|
||||||
local function load(skip)
|
self[name]=love.graphics.newImage(list[name])
|
||||||
local loaded=0
|
|
||||||
for k,v in next,list do
|
|
||||||
if type(v)=="string"then
|
|
||||||
IMG[k]=love.graphics.newImage("media/image/"..v)
|
|
||||||
else
|
else
|
||||||
for i=1,#v do
|
LOG("No IMG: "..name)
|
||||||
v[i]=love.graphics.newImage("media/image/"..v[i])
|
self[name]=PAPER
|
||||||
end
|
end
|
||||||
IMG[k]=v
|
return self[name]
|
||||||
end
|
end})
|
||||||
loaded=loaded+1
|
|
||||||
if not skip and loaded~=count then
|
function IMG.loadAll()
|
||||||
coroutine.yield()
|
for k in next,list do local _=IMG[k]end
|
||||||
end
|
|
||||||
end
|
|
||||||
IMG.loadOne=nil
|
|
||||||
IMG.loadAll=nil
|
IMG.loadAll=nil
|
||||||
end
|
end
|
||||||
|
|
||||||
IMG.loadOne=coroutine.wrap(load)
|
|
||||||
function IMG.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
return IMG
|
return IMG
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@ local json = {}
|
|||||||
-- Encode
|
-- Encode
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
local encode
|
local _encode
|
||||||
|
|
||||||
local escape_char_map = {
|
local escape_char_map = {
|
||||||
["\\"] = "\\",
|
["\\"] = "\\",
|
||||||
@@ -63,24 +63,24 @@ local function encode_table(val, stack)
|
|||||||
-- Treat as array -- check keys are valid and it is not sparse
|
-- Treat as array -- check keys are valid and it is not sparse
|
||||||
local n = 0
|
local n = 0
|
||||||
for k in pairs(val) do
|
for k in pairs(val) do
|
||||||
if type(k) ~= "number" then
|
if type(k) ~= 'number' then
|
||||||
error("invalid table: mixed or invalid key types")
|
error("invalid table: mixed or invalid key types")
|
||||||
end
|
end
|
||||||
n = n + 1
|
n = n + 1
|
||||||
end
|
end
|
||||||
if n ~= #val then error("invalid table: sparse array") end
|
if n ~= #val then error("invalid table: sparse array") end
|
||||||
-- Encode
|
-- Encode
|
||||||
for _, v in ipairs(val) do ins(res, encode(v, stack)) end
|
for _, v in ipairs(val) do ins(res, _encode(v, stack)) end
|
||||||
stack[val] = nil
|
stack[val] = nil
|
||||||
return "[" .. table.concat(res, ",") .. "]"
|
return "[" .. table.concat(res, ",") .. "]"
|
||||||
|
|
||||||
else
|
else
|
||||||
-- Treat as an object
|
-- Treat as an object
|
||||||
for k, v in pairs(val) do
|
for k, v in pairs(val) do
|
||||||
if type(k) ~= "string" then
|
if type(k) ~= 'string' then
|
||||||
error("invalid table: mixed or invalid key types")
|
error("invalid table: mixed or invalid key types")
|
||||||
end
|
end
|
||||||
ins(res, encode(k, stack) .. ":" .. encode(v, stack))
|
ins(res, _encode(k, stack) .. ":" .. _encode(v, stack))
|
||||||
end
|
end
|
||||||
stack[val] = nil
|
stack[val] = nil
|
||||||
return "{" .. table.concat(res, ",") .. "}"
|
return "{" .. table.concat(res, ",") .. "}"
|
||||||
@@ -100,28 +100,21 @@ local function encode_number(val)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local type_func_map = {
|
local type_func_map = {
|
||||||
["nil"] = encode_nil,
|
['nil'] = encode_nil,
|
||||||
["table"] = encode_table,
|
['table'] = encode_table,
|
||||||
["string"] = encode_string,
|
['string'] = encode_string,
|
||||||
["number"] = encode_number,
|
['number'] = encode_number,
|
||||||
["boolean"] = tostring
|
['boolean'] = tostring
|
||||||
}
|
}
|
||||||
|
|
||||||
encode = function(val, stack)
|
_encode = function(val, stack)
|
||||||
local t = type(val)
|
local t = type(val)
|
||||||
local f = type_func_map[t]
|
local f = type_func_map[t]
|
||||||
if f then return f(val, stack) end
|
if f then return f(val, stack) end
|
||||||
error("unexpected type '" .. t .. "'")
|
error("unexpected type '" .. t .. "'")
|
||||||
end
|
end
|
||||||
|
|
||||||
function json.encode(val)
|
json.encode=_encode
|
||||||
local a,b=pcall(encode,val)
|
|
||||||
if a then
|
|
||||||
return b
|
|
||||||
elseif LOG then
|
|
||||||
LOG.print(text.jsonError..": "..(b or"uknErr"),"warn")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Decode
|
-- Decode
|
||||||
@@ -335,8 +328,8 @@ function parse(str, idx)
|
|||||||
decode_error(str, idx, "unexpected character '" .. chr .. "'")
|
decode_error(str, idx, "unexpected character '" .. chr .. "'")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function decode(str)
|
function json.decode(str)
|
||||||
if type(str) ~= "string" then
|
if type(str) ~= 'string' then
|
||||||
error("expected argument of type string, got " .. type(str))
|
error("expected argument of type string, got " .. type(str))
|
||||||
end
|
end
|
||||||
local res, idx = parse(str, next_char(str, 1, space_chars, true))
|
local res, idx = parse(str, next_char(str, 1, space_chars, true))
|
||||||
@@ -344,12 +337,4 @@ local function decode(str)
|
|||||||
if idx <= #str then decode_error(str, idx, "trailing garbage") end
|
if idx <= #str then decode_error(str, idx, "trailing garbage") end
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
function json.decode(str)
|
|
||||||
local a,b=pcall(decode,str)
|
|
||||||
if a then
|
|
||||||
return b
|
|
||||||
elseif LOG then
|
|
||||||
LOG.print(text.jsonError..": "..(b or"uknErr"),"warn")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return json
|
return json
|
||||||
@@ -1,59 +1,57 @@
|
|||||||
local LANG={}
|
local LANG={}
|
||||||
function LANG.init(langList,publicText)--Attention, calling this will destory all initializing methods, create a LANG.set()!
|
--ONLY FIRST CALL MAKE SENSE
|
||||||
local function langFallback(T0,T)
|
--Create LANG.get() and LANG.addScene()
|
||||||
|
function LANG.init(defaultLang,langList,publicText,pretreatFunc)
|
||||||
|
local function _langFallback(T0,T)
|
||||||
for k,v in next,T0 do
|
for k,v in next,T0 do
|
||||||
if type(v)=="table"and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
|
if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
|
||||||
if not T[k]then T[k]={}end
|
if not T[k]then T[k]={}end
|
||||||
if type(T[k])=="table"then langFallback(v,T[k])end
|
if type(T[k])=='table'then
|
||||||
|
_langFallback(v,T[k])
|
||||||
|
end
|
||||||
elseif not T[k]then
|
elseif not T[k]then
|
||||||
T[k]=v
|
T[k]=v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
|
||||||
|
|
||||||
for i=1,#langList do
|
|
||||||
local L=langList[i]
|
|
||||||
|
|
||||||
--Set public text
|
--Set public text
|
||||||
for key,list in next,publicText do
|
if publicText then
|
||||||
L[key]=list
|
for _,L in next,langList do
|
||||||
end
|
for key,list in next,publicText do L[key]=list end
|
||||||
|
|
||||||
--Fallback to other language, default zh
|
|
||||||
if i>1 then
|
|
||||||
langFallback(langList[L.fallback or 1],L)
|
|
||||||
end
|
|
||||||
|
|
||||||
--Metatable:__call for table:getTip
|
|
||||||
if type(rawget(L,"getTip"))=="table"then
|
|
||||||
setmetatable(L.getTip,tipMeta)
|
|
||||||
end
|
|
||||||
|
|
||||||
--set global name for all back button
|
|
||||||
for _,v in next,L.WidgetText do
|
|
||||||
v.back=L.back
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
LANG.init,LANG.setLangList,LANG.setPublicText=nil
|
--Fallback to default language
|
||||||
|
for name,L in next,langList do
|
||||||
|
if name~=defaultLang then
|
||||||
|
_langFallback(langList[L.fallback or defaultLang],L)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function LANG.set(l)
|
--Custom pretreatment for each language
|
||||||
text=langList[l]
|
if pretreatFunc then
|
||||||
WIDGET.setLang(text.WidgetText)
|
for _,L in next,langList do
|
||||||
for k,v in next,drawableText do
|
pretreatFunc(L)
|
||||||
if text[k]then
|
|
||||||
v:set(text[k])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function LANG.get(l)
|
||||||
|
if not langList[l]then
|
||||||
|
LOG("Wrong language: "..tostring(l))
|
||||||
|
l=defaultLang
|
||||||
|
end
|
||||||
|
return langList[l]
|
||||||
end
|
end
|
||||||
|
|
||||||
function LANG.addScene(name)
|
function LANG.addScene(name)
|
||||||
for i=1,#langList do
|
for _,L in next,langList do
|
||||||
if langList[i].WidgetText and not langList[i].WidgetText[name]then
|
if L.WidgetText and not L.WidgetText[name]then
|
||||||
langList[i].WidgetText[name]={back=langList[i].back}
|
L.WidgetText[name]={}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function LANG.init()end
|
||||||
end
|
end
|
||||||
return LANG
|
return LANG
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
--LIGHT MODULE (Optimized by MrZ, Original on github/love2d community/simple-love-lights)
|
--LIGHT MODULE (Optimized by MrZ, Original on github/LÖVE community/simple-love-lights)
|
||||||
--Heavily based on mattdesl's libGDX implementation:
|
--Heavily based on mattdesl's libGDX implementation:
|
||||||
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
--https://github.com/mattdesl/lwjgl-basics/wiki/2D-Pixel-Perfect-Shadows
|
||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local clear,translate=gc.clear,gc.translate
|
local clear,gc_translate=gc.clear,gc.translate
|
||||||
local setCanvas,setShader=gc.setCanvas,gc.setShader
|
local gc_setCanvas,gc_setShader=gc.setCanvas,gc.setShader
|
||||||
local render=gc.draw
|
local gc_setColor,gc_draw=gc.setColor,gc.draw
|
||||||
|
|
||||||
local shadowMapShader=gc.newShader("Zframework/light/shadowMap.glsl")--Shader for caculating the 1D shadow map.
|
local shadowMapShader=gc.newShader('Zframework/light/shadowMap.glsl')--Shader for caculating the 1D shadow map.
|
||||||
local lightRenderShader=gc.newShader("Zframework/light/lightRender.glsl")--Shader for rendering blurred lights and shadows.
|
local lightRenderShader=gc.newShader('Zframework/light/lightRender.glsl')--Shader for rendering blurred lights and shadows.
|
||||||
local Lights={}--Lightsource objects
|
local Lights={}--Lightsource objects
|
||||||
local function move(L,x,y)
|
local function move(L,x,y)
|
||||||
L.x,L.y=x,y
|
L.x,L.y=x,y
|
||||||
@@ -15,59 +15,57 @@ end
|
|||||||
local function setPow(L,pow)
|
local function setPow(L,pow)
|
||||||
L.size=pow
|
L.size=pow
|
||||||
end
|
end
|
||||||
local function destroy(L)
|
local function drawLight(L)
|
||||||
L.blackCanvas:release()
|
local s=L.size
|
||||||
L.shadowCanvas:release()
|
|
||||||
L.renderCanvas:release()
|
|
||||||
end
|
|
||||||
local function draw(L)
|
|
||||||
--Initialization
|
--Initialization
|
||||||
local r,g,b,a=gc.getColor()
|
gc_setCanvas(L.blackCanvas)clear()
|
||||||
setCanvas(L.blackCanvas)clear()
|
gc_setCanvas(L.shadowCanvas)clear()
|
||||||
setCanvas(L.shadowCanvas)clear()
|
gc_setCanvas(L.renderCanvas)clear()
|
||||||
setCanvas(L.renderCanvas)clear()
|
lightRenderShader:send('xresolution',s)
|
||||||
lightRenderShader:send("xresolution",L.size)
|
shadowMapShader:send('yresolution',s)
|
||||||
shadowMapShader:send("yresolution",L.size)
|
|
||||||
|
|
||||||
--Get up-left of light
|
--Get up-left of light
|
||||||
local X=L.x-L.size*.5
|
local X=L.x-s*.5
|
||||||
local Y=L.y-L.size*.5
|
local Y=L.y-s*.5
|
||||||
|
|
||||||
--Render solid
|
--Render solid
|
||||||
translate(-X,-Y)
|
gc_translate(-X,-Y)
|
||||||
L.blackCanvas:renderTo(L.blackFn)
|
L.blackCanvas:renderTo(L.blackFn)
|
||||||
translate(X,Y)
|
gc_translate(X,Y)
|
||||||
|
|
||||||
--Render shade canvas by solid
|
--Render shade canvas by solid
|
||||||
setShader(shadowMapShader)
|
gc_setShader(shadowMapShader)
|
||||||
setCanvas(L.shadowCanvas)
|
gc_setCanvas(L.shadowCanvas)
|
||||||
render(L.blackCanvas)
|
gc_draw(L.blackCanvas)
|
||||||
|
|
||||||
--Render light canvas by shade
|
--Render light canvas by shade
|
||||||
setShader(lightRenderShader)
|
gc_setShader(lightRenderShader)
|
||||||
setCanvas(L.renderCanvas)
|
gc_setCanvas(L.renderCanvas)
|
||||||
render(L.shadowCanvas,0,0,0,1,L.size)
|
gc_draw(L.shadowCanvas,0,0,0,1,s)
|
||||||
|
|
||||||
--Ready to final render
|
--Ready to final render
|
||||||
setShader()setCanvas()gc.setBlendMode("add")
|
gc_setShader()gc_setCanvas()gc.setBlendMode('add')
|
||||||
|
|
||||||
--Render to screes
|
--Render to screen
|
||||||
gc.setColor(r,g,b,a)
|
gc_draw(L.renderCanvas,X,Y+s,0,1,-1)
|
||||||
render(L.renderCanvas,X,Y+L.size,0,1,-1)
|
|
||||||
|
|
||||||
--Reset
|
--Reset
|
||||||
gc.setBlendMode("alpha")
|
gc.setBlendMode('alpha')
|
||||||
end
|
end
|
||||||
|
|
||||||
local LIGHT={}
|
local LIGHT={}
|
||||||
function LIGHT.draw()
|
function LIGHT.draw()
|
||||||
|
gc_setColor(1,1,1)
|
||||||
for i=1,#Lights do
|
for i=1,#Lights do
|
||||||
draw(Lights[i])
|
drawLight(Lights[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function LIGHT.clear()
|
function LIGHT.clear()
|
||||||
for i=#Lights,1,-1 do
|
for i=1,#Lights do
|
||||||
Lights[i]:destroy()
|
Lights[i].blackCanvas:release()
|
||||||
|
Lights[i].shadowCanvas:release()
|
||||||
|
Lights[i].renderCanvas:release()
|
||||||
Lights[i]=nil
|
Lights[i]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -79,11 +77,10 @@ function LIGHT.add(x,y,radius,solidFunc)
|
|||||||
blackCanvas=gc.newCanvas(radius,radius),--Solid canvas
|
blackCanvas=gc.newCanvas(radius,radius),--Solid canvas
|
||||||
shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas
|
shadowCanvas=gc.newCanvas(radius,1),--1D vis-depth canvas
|
||||||
renderCanvas=gc.newCanvas(radius,radius),--Light canvas
|
renderCanvas=gc.newCanvas(radius,radius),--Light canvas
|
||||||
blackFn=solidFunc,--Solid draw funcion
|
blackFn=solidFunc,--Solid draw function
|
||||||
|
|
||||||
move=move,
|
move=move,
|
||||||
setPow=setPow,
|
setPow=setPow,
|
||||||
destroy=destroy,
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return LIGHT
|
return LIGHT
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
return function(name,libName)
|
|
||||||
if SYSTEM=="Windows"or SYSTEM=="Linux"then
|
|
||||||
local r1,r2,r3=pcall(require,libName[SYSTEM])
|
|
||||||
if r1 and r2 then
|
|
||||||
return r2
|
|
||||||
else
|
|
||||||
LOG.print("Cannot load "..name..": "..(r2 or r3),"warn",COLOR.R)
|
|
||||||
end
|
|
||||||
elseif SYSTEM=="Android"then
|
|
||||||
local fs=love.filesystem
|
|
||||||
local platform={"arm64-v8a","armeabi-v7a"}
|
|
||||||
|
|
||||||
local libFunc=package.loadlib(SAVEDIR.."/lib/"..libName.Android,libName.libFunc)
|
|
||||||
if libFunc then
|
|
||||||
LOG.print(name.." lib loaded","warn",COLOR.G)
|
|
||||||
else
|
|
||||||
for i=1,#platform do
|
|
||||||
local soFile=fs.read("data","libAndroid/"..platform[i].."/"..libName.Android)
|
|
||||||
if soFile then
|
|
||||||
local success,message=fs.write("lib/"..libName.Android,soFile)
|
|
||||||
if success then
|
|
||||||
libFunc,message=package.loadlib(SAVEDIR.."/lib/"..libName.Android,libName.libFunc)
|
|
||||||
if libFunc then
|
|
||||||
LOG.print(name.." lib loaded","warn",COLOR.G)
|
|
||||||
break
|
|
||||||
else
|
|
||||||
LOG.print("Cannot load "..name..": "..message,"warn",COLOR.R)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
LOG.print("Write "..name.."-"..platform[i].." to saving failed: "..message,"warn",COLOR.R)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
LOG.print("Read "..name.."-"..platform[i].." failed","warn",COLOR.R)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not libFunc then
|
|
||||||
LOG.print("Cannot load "..name,"warn",COLOR.R)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return libFunc()
|
|
||||||
else
|
|
||||||
LOG.print("No "..name.." for "..SYSTEM,"warn",COLOR.R)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
@@ -1,70 +1,20 @@
|
|||||||
local gc=love.graphics
|
local ins=table.insert
|
||||||
local int,max,min=math.floor,math.max,math.min
|
|
||||||
local ins,rem=table.insert,table.remove
|
|
||||||
|
|
||||||
local debugMesList={}
|
local logs={os.date("Techmino logs %Y/%m/%d %A")}
|
||||||
local debugMesHistory={
|
|
||||||
"Version: "..VERSION.string,
|
local function log(message)
|
||||||
os.date("Launched at %Y/%m/%d %H:%M"),
|
ins(logs,os.date("[%H:%M:%S] ")..message)
|
||||||
}
|
|
||||||
local LOG={}
|
|
||||||
function LOG.update()
|
|
||||||
if debugMesList[1]then
|
|
||||||
for i=#debugMesList,1,-1 do
|
|
||||||
local M=debugMesList[i]
|
|
||||||
if M.blink>0 then
|
|
||||||
M.blink=M.blink-1
|
|
||||||
else
|
|
||||||
M.time=M.time-1
|
|
||||||
if M.time==0 then
|
|
||||||
rem(debugMesList,i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function LOG.draw()
|
|
||||||
if debugMesList[1]then
|
local LOG=setmetatable({logs=logs},{
|
||||||
local k=SCR.w/SCR.w0
|
__call=function(_,message)
|
||||||
setFont(max(int(4*k)*5,5))
|
print(message)
|
||||||
for i=1,#debugMesList do
|
log(message)
|
||||||
local M=debugMesList[i]
|
|
||||||
local t=M.time
|
|
||||||
gc.setColor(M.r,M.g,M.b,M.blink>0 and int(M.blink/3)%2 or min(t/26,1))
|
|
||||||
gc.print(M.text,10+(20-min(t,20))^1.5/4,25*i*k)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
function LOG.read()
|
||||||
|
return table.concat(logs,"\n")
|
||||||
end
|
end
|
||||||
function LOG.print(text,T,C)--text,type/time,color
|
|
||||||
local time
|
|
||||||
local his
|
|
||||||
if T=="warn"then
|
|
||||||
C=C or COLOR.Y
|
|
||||||
his=true
|
|
||||||
time=180
|
|
||||||
elseif T=="error"then
|
|
||||||
C=C or COLOR.R
|
|
||||||
his=true
|
|
||||||
time=210
|
|
||||||
elseif T=="message"then
|
|
||||||
C=C or COLOR.N
|
|
||||||
his=true
|
|
||||||
elseif type(T)=="number"then
|
|
||||||
C=C or COLOR.Z
|
|
||||||
time=T
|
|
||||||
elseif type(T)=="table"then
|
|
||||||
C=T
|
|
||||||
elseif not C then
|
|
||||||
C=COLOR.Z
|
|
||||||
end
|
|
||||||
if his then
|
|
||||||
ins(debugMesHistory,SCN.cur..": "..tostring(text))
|
|
||||||
end
|
|
||||||
ins(debugMesList,{text=text,r=C[1],g=C[2],b=C[3],blink=30,time=time or 120})
|
|
||||||
end
|
|
||||||
function LOG.copy()
|
|
||||||
local str=table.concat(debugMesHistory,"\n")
|
|
||||||
love.system.setClipboardText(str)
|
|
||||||
LOG.print("Log copied",COLOR.B)
|
|
||||||
end
|
|
||||||
return LOG
|
return LOG
|
||||||
37
Zframework/mathExtend.lua
Normal file
37
Zframework/mathExtend.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
local MATH={}for k,v in next,math do MATH[k]=v end
|
||||||
|
|
||||||
|
local rnd=math.random
|
||||||
|
|
||||||
|
MATH.tau=2*math.pi
|
||||||
|
|
||||||
|
function MATH.sign(a)
|
||||||
|
return a>0 and 1 or a<0 and -1 or 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function MATH.roll(chance)
|
||||||
|
return rnd()<(chance or .5)
|
||||||
|
end
|
||||||
|
|
||||||
|
function MATH.coin(a,b)
|
||||||
|
if rnd()<.5 then
|
||||||
|
return a
|
||||||
|
else
|
||||||
|
return b
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MATH.interval(v,low,high)
|
||||||
|
if v<=low then
|
||||||
|
return low
|
||||||
|
elseif v>=high then
|
||||||
|
return high
|
||||||
|
else
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MATH.expApproach(a,b,k)
|
||||||
|
return b+(a-b)*2.718281828459045^-k
|
||||||
|
end
|
||||||
|
|
||||||
|
return MATH
|
||||||
148
Zframework/message.lua
Normal file
148
Zframework/message.lua
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
local gc=love.graphics
|
||||||
|
local gc_push,gc_pop=gc.push,gc.pop
|
||||||
|
local gc_translate,gc_setColor,gc_draw=gc.translate,gc.setColor,gc.draw
|
||||||
|
|
||||||
|
local ins,rem=table.insert,table.remove
|
||||||
|
local max=math.max
|
||||||
|
|
||||||
|
local mesList={}
|
||||||
|
local mesIcon={
|
||||||
|
check=GC.DO{40,40,
|
||||||
|
{'setLW',10},
|
||||||
|
{'setCL',0,0,0},
|
||||||
|
{'line',4,19,15,30,36,9},
|
||||||
|
{'setLW',6},
|
||||||
|
{'setCL',.7,1,.6},
|
||||||
|
{'line',5,20,15,30,35,10},
|
||||||
|
},
|
||||||
|
info=GC.DO{40,40,
|
||||||
|
{'setCL',.2,.25,.85},
|
||||||
|
{'fCirc',20,20,15},
|
||||||
|
{'setCL',1,1,1},
|
||||||
|
{'setLW',2},
|
||||||
|
{'dCirc',20,20,15},
|
||||||
|
{'fRect',18,11,4,4},
|
||||||
|
{'fRect',18,17,4,12},
|
||||||
|
},
|
||||||
|
broadcast=GC.DO{40,40,
|
||||||
|
{'setCL',1,1,1},
|
||||||
|
{'fRect',2,4,36,26,3},
|
||||||
|
{'fPoly',2,27,2,37,14,25},
|
||||||
|
{'setCL',.5,.5,.5},
|
||||||
|
{'fRect',6,11,4,4,1},{'fRect',14,11,19,4,1},
|
||||||
|
{'fRect',6,19,4,4,1},{'fRect',14,19,19,4,1},
|
||||||
|
},
|
||||||
|
warn=GC.DO{40,40,
|
||||||
|
{'setCL',.95,.83,.4},
|
||||||
|
{'fPoly',20.5,1,0,38,40,38},
|
||||||
|
{'setCL',0,0,0},
|
||||||
|
{'dPoly',20.5,1,0,38,40,38},
|
||||||
|
{'fRect',17,10,7,18,2},
|
||||||
|
{'fRect',17,29,7,7,2},
|
||||||
|
{'setCL',1,1,1},
|
||||||
|
{'fRect',18,11,5,16,2},
|
||||||
|
{'fRect',18,30,5,5,2},
|
||||||
|
},
|
||||||
|
error=GC.DO{40,40,
|
||||||
|
{'setCL',.95,.3,.3},
|
||||||
|
{'fCirc',20,20,19},
|
||||||
|
{'setCL',0,0,0},
|
||||||
|
{'dCirc',20,20,19},
|
||||||
|
{'setLW',6},
|
||||||
|
{'line',10.2,10.2,29.8,29.8},
|
||||||
|
{'line',10.2,29.8,29.8,10.2},
|
||||||
|
{'setLW',4},
|
||||||
|
{'setCL',1,1,1},
|
||||||
|
{'line',11,11,29,29},
|
||||||
|
{'line',11,29,29,11},
|
||||||
|
},
|
||||||
|
music=GC.DO{40,40,
|
||||||
|
{'setLW',2},
|
||||||
|
{'dRect',1,3,38,34,3},
|
||||||
|
{'setLW',4},
|
||||||
|
{'line',21,26,21,10,28,10},
|
||||||
|
{'fElps',17,26,6,5},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
local MES={}
|
||||||
|
local backColors={
|
||||||
|
check={.3,.6,.3,.7},
|
||||||
|
broadcast={.3,.3,.6,.8},
|
||||||
|
warn={.4,.4,.2,.9},
|
||||||
|
error={.4,.2,.2,.9},
|
||||||
|
music={.2,.4,.4,.9},
|
||||||
|
}
|
||||||
|
function MES.new(icon,str,time)
|
||||||
|
local backColor={.5,.5,.5,.7}
|
||||||
|
if type(icon)=='string'then
|
||||||
|
backColor=backColors[icon]or backColor
|
||||||
|
icon=mesIcon[icon]
|
||||||
|
end
|
||||||
|
local t=gc.newText(FONT.get(30),str)
|
||||||
|
local w=math.max(t:getWidth()+(icon and 45 or 5),200)+15
|
||||||
|
local h=math.max(t:getHeight(),46)+2
|
||||||
|
local L={w,h,
|
||||||
|
{'clear',backColor},
|
||||||
|
{'setCL',.7,.7,.7},
|
||||||
|
{'setLW',2},
|
||||||
|
{'dRect',1,1,w-2,h-2},
|
||||||
|
{'setCL',1,1,1},
|
||||||
|
}
|
||||||
|
if icon then
|
||||||
|
ins(L,{'draw',icon,4,4,nil,40/icon:getWidth(),40/icon:getHeight()})
|
||||||
|
end
|
||||||
|
ins(L,{'mDrawY',t,icon and 50 or 10,h/2})
|
||||||
|
|
||||||
|
ins(mesList,{
|
||||||
|
startTime=.5,
|
||||||
|
endTime=.5,
|
||||||
|
time=time or 3,
|
||||||
|
canvas=GC.DO(L),
|
||||||
|
width=w,height=h,
|
||||||
|
scale=h>400 and 1/math.min(h/400,2.6)or 1
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
function MES.update(dt)
|
||||||
|
for i=#mesList,1,-1 do
|
||||||
|
local m=mesList[i]
|
||||||
|
if m.startTime>0 then
|
||||||
|
m.startTime=max(m.startTime-dt,0)
|
||||||
|
elseif m.time>0 then
|
||||||
|
m.time=max(m.time-dt,0)
|
||||||
|
elseif m.endTime>0 then
|
||||||
|
m.endTime=m.endTime-dt
|
||||||
|
else
|
||||||
|
rem(mesList,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MES.draw()
|
||||||
|
gc_push('transform')
|
||||||
|
if #mesList>0 then
|
||||||
|
gc_translate(SCR.safeX,30)
|
||||||
|
for i=1,#mesList do
|
||||||
|
local m=mesList[i]
|
||||||
|
gc_setColor(1,1,1,2*(m.endTime-m.startTime))
|
||||||
|
gc_draw(m.canvas,40-80*(m.endTime+m.startTime),0,nil,m.scale)
|
||||||
|
gc_translate(0,m.height*m.scale+2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gc_pop()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MES.traceback()
|
||||||
|
local mes=
|
||||||
|
debug.traceback('',1)
|
||||||
|
:gsub(': in function',', in')
|
||||||
|
:gsub(':',' ')
|
||||||
|
:gsub('\t','')
|
||||||
|
MES.new('error',mes:sub(
|
||||||
|
mes:find("\n",2)+1,
|
||||||
|
mes:find("\n%[C%], in 'xpcall'")
|
||||||
|
),5)
|
||||||
|
end
|
||||||
|
|
||||||
|
return MES
|
||||||
@@ -11,7 +11,7 @@ local _internal={}-- list of internal profiler functions
|
|||||||
|
|
||||||
local getInfo=debug.getinfo
|
local getInfo=debug.getinfo
|
||||||
function profile.hooker(event,line,info)
|
function profile.hooker(event,line,info)
|
||||||
info=info or getInfo(2,"fnS")
|
info=info or getInfo(2,'fnS')
|
||||||
local f=info.func
|
local f=info.func
|
||||||
if _internal[f]then return end-- ignore the profiler itself
|
if _internal[f]then return end-- ignore the profiler itself
|
||||||
if info.name then _labeled[f]=info.name end-- get the function name if available
|
if info.name then _labeled[f]=info.name end-- get the function name if available
|
||||||
@@ -26,11 +26,11 @@ function profile.hooker(event,line,info)
|
|||||||
_telapsed[f]=_telapsed[f]+dt
|
_telapsed[f]=_telapsed[f]+dt
|
||||||
_tcalled[f]=nil
|
_tcalled[f]=nil
|
||||||
end
|
end
|
||||||
if event=="tail call"then
|
if event=='tail call'then
|
||||||
local prev=getInfo(3,"fnS")
|
local prev=getInfo(3,'fnS')
|
||||||
profile.hooker("return",line,prev)
|
profile.hooker('return',line,prev)
|
||||||
profile.hooker("call",line,info)
|
profile.hooker('call',line,info)
|
||||||
elseif event=="call"then
|
elseif event=='call'then
|
||||||
_tcalled[f]=clock()
|
_tcalled[f]=clock()
|
||||||
else
|
else
|
||||||
_ncalls[f]=_ncalls[f]+1
|
_ncalls[f]=_ncalls[f]+1
|
||||||
@@ -43,7 +43,7 @@ function profile.start()
|
|||||||
jit.off()
|
jit.off()
|
||||||
jit.flush()
|
jit.flush()
|
||||||
end
|
end
|
||||||
debug.sethook(profile.hooker,"cr")
|
debug.sethook(profile.hooker,'cr')
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Stops collecting data.
|
--- Stops collecting data.
|
||||||
@@ -68,7 +68,7 @@ function profile.stop()
|
|||||||
lookup[id]=f
|
lookup[id]=f
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
collectgarbage("collect")
|
collectgarbage()
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Resets all collected data.
|
--- Resets all collected data.
|
||||||
@@ -78,7 +78,7 @@ function profile.reset()
|
|||||||
_telapsed[f]=0
|
_telapsed[f]=0
|
||||||
_tcalled[f]=nil
|
_tcalled[f]=nil
|
||||||
end
|
end
|
||||||
collectgarbage("collect")
|
collectgarbage()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _comp(a,b)
|
local function _comp(a,b)
|
||||||
@@ -132,26 +132,26 @@ function profile.report(n)
|
|||||||
if #out>0 then
|
if #out>0 then
|
||||||
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
|
sz=sz.." | "..table.concat(out," | \n | ").." | \n"
|
||||||
end
|
end
|
||||||
return"\n"..sz..row
|
return "\n"..sz..row
|
||||||
end
|
end
|
||||||
|
|
||||||
local switch=false
|
local switch=false
|
||||||
function profile.switch()
|
function profile.switch()
|
||||||
if switch then
|
|
||||||
profile.stop()
|
|
||||||
love.system.setClipboardText(PROFILE.report())
|
|
||||||
PROFILE.reset()
|
|
||||||
LOG.print("profile report copied!")
|
|
||||||
else
|
|
||||||
PROFILE.start()
|
|
||||||
LOG.print("profile start!")
|
|
||||||
end
|
|
||||||
switch=not switch
|
switch=not switch
|
||||||
|
if not switch then
|
||||||
|
profile.stop()
|
||||||
|
love.system.setClipboardText(profile.report())
|
||||||
|
profile.reset()
|
||||||
|
return false
|
||||||
|
else
|
||||||
|
profile.start()
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- store all internal profiler functions
|
-- store all internal profiler functions
|
||||||
for _,v in next,profile do
|
for _,v in next,profile do
|
||||||
_internal[v]=type(v)=="function"
|
_internal[v]=type(v)=='function'
|
||||||
end
|
end
|
||||||
|
|
||||||
return profile
|
return profile
|
||||||
|
|||||||
33
Zframework/require.lua
Normal file
33
Zframework/require.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
package.cpath=package.cpath..';'..SAVEDIR..'/lib/lib?.so;'..'?.dylib'
|
||||||
|
local loaded={}
|
||||||
|
return function(libName)
|
||||||
|
local require=require
|
||||||
|
if love.system.getOS()=='OS X'then
|
||||||
|
require=package.loadlib(libName..'.dylib','luaopen_'..libName)
|
||||||
|
libname=nil
|
||||||
|
elseif love.system.getOS()=='Android'then
|
||||||
|
if not loaded[libName]then
|
||||||
|
local platform=(function()
|
||||||
|
local p=io.popen('uname -m')
|
||||||
|
local arch=p:read('*a'):lower()
|
||||||
|
p:close()
|
||||||
|
if arch:find('v8')or arch:find('64')then
|
||||||
|
return'arm64-v8a'
|
||||||
|
else
|
||||||
|
return'armeabi-v7a'
|
||||||
|
end
|
||||||
|
end)()
|
||||||
|
love.filesystem.write(
|
||||||
|
'lib/libCCloader.so',
|
||||||
|
love.filesystem.read('data','libAndroid/'..platform..'/libCCloader.so')
|
||||||
|
)
|
||||||
|
loaded[libName]=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local success,res=pcall(require,libName)
|
||||||
|
if success and res then
|
||||||
|
return res
|
||||||
|
else
|
||||||
|
MES.new('error',"Cannot load "..libName..": "..res)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,20 +1,22 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local abs=math.abs
|
local abs=math.abs
|
||||||
local SCR=SCR
|
|
||||||
|
|
||||||
local scenes={}
|
local scenes={}
|
||||||
|
|
||||||
local SCN={
|
local SCN={
|
||||||
cur="NULL",--Current scene name
|
mainTouchID=nil, --First touching ID(userdata)
|
||||||
swapping=false,--If Swapping
|
cur='NULL', --Current scene name
|
||||||
|
swapping=false, --If Swapping
|
||||||
stat={
|
stat={
|
||||||
tar=false, --Swapping target
|
tar=false, --Swapping target
|
||||||
style=false,--Swapping style
|
style=false, --Swapping style
|
||||||
mid=false, --Loading point
|
changeTime=false,--Loading point
|
||||||
time=false, --Full swap time
|
time=false, --Full swap time
|
||||||
draw=false, --Swap draw func
|
draw=false, --Swap draw func
|
||||||
},
|
},
|
||||||
stack={},--Scene stack
|
stack={},--Scene stack
|
||||||
|
prev=false,
|
||||||
|
args={},--Arguments from previous scene
|
||||||
|
|
||||||
scenes=scenes,
|
scenes=scenes,
|
||||||
|
|
||||||
@@ -34,6 +36,9 @@ local SCN={
|
|||||||
keyUp=false,
|
keyUp=false,
|
||||||
gamepadDown=false,
|
gamepadDown=false,
|
||||||
gamepadUp=false,
|
gamepadUp=false,
|
||||||
|
fileDropped=false,
|
||||||
|
directoryDropped=false,
|
||||||
|
resize=false,
|
||||||
socketRead=false,
|
socketRead=false,
|
||||||
}--Scene datas, returned
|
}--Scene datas, returned
|
||||||
|
|
||||||
@@ -44,124 +49,161 @@ function SCN.add(name,scene)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function SCN.swapUpdate()
|
function SCN.swapUpdate(dt)
|
||||||
local S=SCN.stat
|
local S=SCN.stat
|
||||||
S.time=S.time-1
|
S.time=S.time-dt
|
||||||
if S.time==S.mid then
|
if S.time<S.changeTime and S.time+dt>=S.changeTime then
|
||||||
SCN.init(S.tar,SCN.cur)
|
--Scene swapped this frame
|
||||||
collectgarbage()
|
SCN.prev=SCN.cur
|
||||||
--Scene swapped this moment
|
SCN.init(S.tar)
|
||||||
|
SCN.mainTouchID=nil
|
||||||
end
|
end
|
||||||
if S.time==0 then
|
if S.time<0 then
|
||||||
SCN.swapping=false
|
SCN.swapping=false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SCN.init(s,org)
|
function SCN.init(s)
|
||||||
|
love.keyboard.setTextInput(false)
|
||||||
|
|
||||||
local S=scenes[s]
|
local S=scenes[s]
|
||||||
SCN.cur=s
|
SCN.cur=s
|
||||||
|
|
||||||
WIDGET.set(S.widgetList)
|
WIDGET.setScrollHeight(S.widgetScrollHeight)
|
||||||
|
WIDGET.setWidgetList(S.widgetList)
|
||||||
SCN.sceneInit=S.sceneInit
|
SCN.sceneInit=S.sceneInit
|
||||||
SCN.sceneBack=S.sceneBack
|
SCN.sceneBack=S.sceneBack
|
||||||
SCN.update=S.update
|
|
||||||
SCN.draw=S.draw
|
|
||||||
SCN.mouseClick=S.mouseClick
|
|
||||||
SCN.touchClick=S.touchClick
|
|
||||||
SCN.mouseDown=S.mouseDown
|
SCN.mouseDown=S.mouseDown
|
||||||
SCN.mouseMove=S.mouseMove
|
SCN.mouseMove=S.mouseMove
|
||||||
SCN.mouseUp=S.mouseUp
|
SCN.mouseUp=S.mouseUp
|
||||||
|
SCN.mouseClick=S.mouseClick
|
||||||
SCN.wheelMoved=S.wheelMoved
|
SCN.wheelMoved=S.wheelMoved
|
||||||
SCN.touchDown=S.touchDown
|
SCN.touchDown=S.touchDown
|
||||||
SCN.touchUp=S.touchUp
|
SCN.touchUp=S.touchUp
|
||||||
SCN.touchMove=S.touchMove
|
SCN.touchMove=S.touchMove
|
||||||
|
SCN.touchClick=S.touchClick
|
||||||
SCN.keyDown=S.keyDown
|
SCN.keyDown=S.keyDown
|
||||||
SCN.keyUp=S.keyUp
|
SCN.keyUp=S.keyUp
|
||||||
SCN.gamepadDown=S.gamepadDown
|
SCN.gamepadDown=S.gamepadDown
|
||||||
SCN.gamepadUp=S.gamepadUp
|
SCN.gamepadUp=S.gamepadUp
|
||||||
|
SCN.fileDropped=S.fileDropped
|
||||||
|
SCN.directoryDropped=S.directoryDropped
|
||||||
|
SCN.resize=S.resize
|
||||||
SCN.socketRead=S.socketRead
|
SCN.socketRead=S.socketRead
|
||||||
if S.sceneInit then S.sceneInit(org)end
|
SCN.update=S.update
|
||||||
|
SCN.draw=S.draw
|
||||||
|
if S.sceneInit then
|
||||||
|
S.sceneInit()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function SCN.push(tar,style)
|
function SCN.push(tar,style)
|
||||||
if not SCN.swapping then
|
if not SCN.swapping then
|
||||||
local m=#SCN.stack
|
local m=#SCN.stack
|
||||||
SCN.stack[m+1]=tar or SCN.cur
|
SCN.stack[m+1]=tar or SCN.cur
|
||||||
SCN.stack[m+2]=style or"fade"
|
SCN.stack[m+2]=style or'fade'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SCN.pop()
|
function SCN.pop()
|
||||||
local _=SCN.stack
|
local s=SCN.stack
|
||||||
_[#_],_[#_-1]=nil
|
s[#s],s[#s-1]=nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local swap={
|
local swap={
|
||||||
none={1,0,NULL},--swapTime, changeTime, drawFunction
|
none={
|
||||||
flash={8,1,function()gc.clear(1,1,1)end},
|
duration=0,changeTime=0,
|
||||||
fade={30,15,function(t)
|
draw=function()end
|
||||||
t=t>15 and 2-t/15 or t/15
|
},
|
||||||
|
flash={
|
||||||
|
duration=.16,changeTime=.08,
|
||||||
|
draw=function()gc.clear(1,1,1)end
|
||||||
|
},
|
||||||
|
fade={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t>.25 and 2-t*4 or t*4
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
fade_togame={120,20,function(t)
|
},
|
||||||
t=t>20 and(120-t)/100 or t/20
|
fade_togame={
|
||||||
|
duration=2,changeTime=.5,
|
||||||
|
draw=function(t)
|
||||||
|
t=t>.5 and(2-t)/1.5 or t*.5
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
slowFade={180,90,function(t)
|
},
|
||||||
t=t>90 and 2-t/90 or t/90
|
slowFade={
|
||||||
|
duration=3,changeTime=1.5,
|
||||||
|
draw=function(t)
|
||||||
|
t=t>1.5 and (3-t)/1.5 or t/1.5
|
||||||
gc.setColor(0,0,0,t)
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
swipeL={30,15,function(t)
|
},
|
||||||
t=t/30
|
swipeL={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(3-2*t)*2-1
|
t=t*t*(3-2*t)*2-1
|
||||||
gc.rectangle("fill",t*SCR.w,0,SCR.w,SCR.h)
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
swipeR={30,15,function(t)
|
},
|
||||||
t=t/30
|
swipeR={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(2*t-3)*2+1
|
t=t*t*(2*t-3)*2+1
|
||||||
gc.rectangle("fill",t*SCR.w,0,SCR.w,SCR.h)
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
swipeD={30,15,function(t)
|
},
|
||||||
t=t/30
|
swipeD={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
t=t*t*(2*t-3)*2+1
|
t=t*t*(2*t-3)*2+1
|
||||||
gc.rectangle("fill",0,t*SCR.h,SCR.w,SCR.h)
|
gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
|
},
|
||||||
}--Scene swapping animations
|
}--Scene swapping animations
|
||||||
function SCN.swapTo(tar,style)--Parallel scene swapping, cannot back
|
function SCN.swapTo(tar,style,...)--Parallel scene swapping, cannot back
|
||||||
if scenes[tar]then
|
if scenes[tar]then
|
||||||
if not SCN.swapping and tar~=SCN.cur then
|
if not SCN.swapping and tar~=SCN.cur then
|
||||||
if not style then style="fade"end
|
style=style or'fade'
|
||||||
SCN.swapping=true
|
SCN.swapping=true
|
||||||
|
SCN.args={...}
|
||||||
local S=SCN.stat
|
local S=SCN.stat
|
||||||
S.tar,S.style=tar,style
|
S.tar,S.style=tar,style
|
||||||
local s=swap[style]
|
S.time=swap[style].duration
|
||||||
S.time,S.mid,S.draw=s[1],s[2],s[3]
|
S.changeTime=swap[style].changeTime
|
||||||
|
S.draw=swap[style].draw
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
LOG.print("No Scene: "..tar,"warn")
|
MES.new('warn',"No Scene: "..tar)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SCN.go(tar,style)--Normal scene swapping, can back
|
function SCN.go(tar,style,...)--Normal scene swapping, can back
|
||||||
if scenes[tar]then
|
if scenes[tar]then
|
||||||
SCN.push()
|
SCN.push()
|
||||||
SCN.swapTo(tar,style)
|
SCN.swapTo(tar,style,...)
|
||||||
else
|
else
|
||||||
LOG.print("No Scene: "..tar,"warn")
|
MES.new('warn',"No Scene: "..tar)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function SCN.back()
|
function SCN.back(...)
|
||||||
if SCN.swapping then return end
|
if SCN.swapping then return end
|
||||||
|
|
||||||
--Leave scene
|
--Leave scene
|
||||||
if SCN.sceneBack then SCN.sceneBack()end
|
if SCN.sceneBack then
|
||||||
|
SCN.sceneBack()
|
||||||
|
end
|
||||||
|
|
||||||
--Poll&Back to previous Scene
|
--Poll&Back to previous Scene
|
||||||
local m=#SCN.stack
|
local m=#SCN.stack
|
||||||
if m>0 then
|
if m>0 then
|
||||||
SCN.swapTo(SCN.stack[m-1],SCN.stack[m])
|
SCN.swapTo(SCN.stack[m-1],SCN.stack[m],...)
|
||||||
SCN.stack[m],SCN.stack[m-1]=nil
|
SCN.stack[m],SCN.stack[m-1]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -10,7 +10,19 @@ local SCR={
|
|||||||
rad=0, --Radius
|
rad=0, --Radius
|
||||||
k=1, --Scale size
|
k=1, --Scale size
|
||||||
dpi=1, --DPI from gc.getDPIScale()
|
dpi=1, --DPI from gc.getDPIScale()
|
||||||
xOy=love.math.newTransform(),--Screen transformation object
|
|
||||||
|
--Screen transformation objects
|
||||||
|
origin=love.math.newTransform(),
|
||||||
|
xOy=love.math.newTransform(),
|
||||||
|
xOy_m=love.math.newTransform(),
|
||||||
|
xOy_ul=love.math.newTransform(),
|
||||||
|
xOy_u=love.math.newTransform(),
|
||||||
|
xOy_ur=love.math.newTransform(),
|
||||||
|
xOy_l=love.math.newTransform(),
|
||||||
|
xOy_r=love.math.newTransform(),
|
||||||
|
xOy_dl=love.math.newTransform(),
|
||||||
|
xOy_d=love.math.newTransform(),
|
||||||
|
xOy_dr=love.math.newTransform(),
|
||||||
}
|
}
|
||||||
function SCR.setSize(w,h)
|
function SCR.setSize(w,h)
|
||||||
SCR.w0,SCR.h0=w,h
|
SCR.w0,SCR.h0=w,h
|
||||||
@@ -21,15 +33,29 @@ function SCR.resize(w,h)
|
|||||||
SCR.r=h/w
|
SCR.r=h/w
|
||||||
SCR.rad=(w^2+h^2)^.5
|
SCR.rad=(w^2+h^2)^.5
|
||||||
|
|
||||||
|
SCR.x,SCR.y=0,0
|
||||||
if SCR.r>=SCR.h0/SCR.w0 then
|
if SCR.r>=SCR.h0/SCR.w0 then
|
||||||
SCR.k=w/SCR.w0
|
SCR.k=w/SCR.w0
|
||||||
SCR.x,SCR.y=0,(h-w*SCR.h0/SCR.w0)/2
|
SCR.y=(h-SCR.h0*SCR.k)/2
|
||||||
else
|
else
|
||||||
SCR.k=h/SCR.h0
|
SCR.k=h/SCR.h0
|
||||||
SCR.x,SCR.y=(w-h*SCR.w0/SCR.h0)/2,0
|
SCR.x=(w-SCR.w0*SCR.k)/2
|
||||||
end
|
end
|
||||||
|
SCR.cx,SCR.cy=SCR.w/2,SCR.h/2
|
||||||
|
SCR.ex,SCR.ey=SCR.w-SCR.x,SCR.h-SCR.y
|
||||||
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
|
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
|
||||||
SCR.xOy:setTransformation(w/2,h/2,nil,SCR.k,nil,SCR.w0/2,SCR.h0/2)
|
|
||||||
|
SCR.origin:setTransformation(0,0)
|
||||||
|
SCR.xOy:setTransformation(SCR.x,SCR.y,0,SCR.k)
|
||||||
|
SCR.xOy_m:setTransformation(w/2,h/2,0,SCR.k)
|
||||||
|
SCR.xOy_ul:setTransformation(0,0,0,SCR.k)
|
||||||
|
SCR.xOy_u:setTransformation(w/2,0,0,SCR.k)
|
||||||
|
SCR.xOy_ur:setTransformation(w,0,0,SCR.k)
|
||||||
|
SCR.xOy_l:setTransformation(0,h/2,0,SCR.k)
|
||||||
|
SCR.xOy_r:setTransformation(w,h/2,0,SCR.k)
|
||||||
|
SCR.xOy_dl:setTransformation(0,h,0,SCR.k)
|
||||||
|
SCR.xOy_d:setTransformation(w/2,h,0,SCR.k)
|
||||||
|
SCR.xOy_dr:setTransformation(w,h,0,SCR.k)
|
||||||
end
|
end
|
||||||
function SCR.info()
|
function SCR.info()
|
||||||
return{
|
return{
|
||||||
@@ -41,7 +67,7 @@ function SCR.info()
|
|||||||
("W,H : %d, %d"):format(SCR.W,SCR.H),
|
("W,H : %d, %d"):format(SCR.W,SCR.H),
|
||||||
("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY),
|
("safeX,safeY : %d, %d"):format(SCR.safeX,SCR.safeY),
|
||||||
("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH),
|
("safeW,safeH : %d, %d"):format(SCR.safeW,SCR.safeH),
|
||||||
("k,dpi,rad : %d, %d, %.4f"):format(SCR.k,SCR.dpi,SCR.rad),
|
("k,dpi,rad : %.2f, %d, %.2f"):format(SCR.k,SCR.dpi,SCR.rad),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return SCR
|
return SCR
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
local gc=love.graphics
|
|
||||||
local newFont=gc.setNewFont
|
|
||||||
local setNewFont=gc.setFont
|
|
||||||
local fontCache,currentFontSize={}
|
|
||||||
if love.filesystem.getInfo("font.ttf")then
|
|
||||||
local fontData=love.filesystem.newFile("font.ttf")
|
|
||||||
function setFont(s)
|
|
||||||
if s~=currentFontSize then
|
|
||||||
if not fontCache[s]then
|
|
||||||
fontCache[s]=newFont(fontData,s)
|
|
||||||
end
|
|
||||||
setNewFont(fontCache[s])
|
|
||||||
currentFontSize=s
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function getFont(s)
|
|
||||||
if not fontCache[s]then
|
|
||||||
fontCache[s]=newFont(fontData,s)
|
|
||||||
end
|
|
||||||
return fontCache[s]
|
|
||||||
end
|
|
||||||
else
|
|
||||||
function setFont(s)
|
|
||||||
if s~=currentFontSize then
|
|
||||||
if not fontCache[s]then
|
|
||||||
fontCache[s]=newFont(s)
|
|
||||||
end
|
|
||||||
setNewFont(fontCache[s])
|
|
||||||
currentFontSize=s
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function getFont(s)
|
|
||||||
if not fontCache[s]then
|
|
||||||
fontCache[s]=newFont(s)
|
|
||||||
end
|
|
||||||
return fontCache[s]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,33 +1,133 @@
|
|||||||
local SFX={
|
local type,rem=type,table.remove
|
||||||
getCount=function()return 0 end,
|
local int,rnd=math.floor,math.random
|
||||||
fieldPlay=NULL,
|
local interval=MATH.interval
|
||||||
play=NULL,
|
|
||||||
fplay=NULL,
|
local sfxList={}
|
||||||
reset=NULL,
|
local packSetting={}
|
||||||
|
local Sources={}
|
||||||
|
local volume=1
|
||||||
|
local stereo=1
|
||||||
|
|
||||||
|
local noteVal={
|
||||||
|
C=1,c=1,
|
||||||
|
D=3,d=3,
|
||||||
|
E=5,e=5,
|
||||||
|
F=6,f=6,
|
||||||
|
G=8,g=8,
|
||||||
|
A=10,a=10,
|
||||||
|
B=12,b=12,
|
||||||
}
|
}
|
||||||
|
local noteName={'C','C#','D','D#','E','F','F#','G','G#','A','A#','B'}
|
||||||
|
local function _getTuneHeight(tune)
|
||||||
|
local octave=tonumber(tune:sub(-1,-1))
|
||||||
|
if octave then
|
||||||
|
local tuneHeight=noteVal[tune:sub(1,1)]
|
||||||
|
if tuneHeight then
|
||||||
|
tuneHeight=tuneHeight+(octave-1)*12
|
||||||
|
local s=tune:sub(2,2)
|
||||||
|
if s=='s'or s=='#'then
|
||||||
|
tuneHeight=tuneHeight+1
|
||||||
|
elseif s=='f'or s=='b'then
|
||||||
|
tuneHeight=tuneHeight-1
|
||||||
|
end
|
||||||
|
return tuneHeight
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local SFX={}
|
||||||
|
|
||||||
function SFX.init(list)
|
function SFX.init(list)
|
||||||
SFX.init=nil
|
assert(type(list)=='table',"Initialize SFX lib with a list of filenames!")
|
||||||
local rem=table.remove
|
for i=1,#list do table.insert(sfxList,list[i])end
|
||||||
local Sources={}
|
end
|
||||||
|
function SFX.load(path)
|
||||||
local count=#list function SFX.getCount()return count end
|
local c=0
|
||||||
local function load(skip)
|
local missing=0
|
||||||
for i=1,count do
|
for i=1,#sfxList do
|
||||||
local N="media/SFX/"..list[i]..".ogg"
|
local fullPath=path..sfxList[i]..'.ogg'
|
||||||
if love.filesystem.getInfo(N)then
|
if love.filesystem.getInfo(fullPath)then
|
||||||
Sources[list[i]]={love.audio.newSource(N,"static")}
|
if Sources[sfxList[i]]then
|
||||||
|
for j=1,#Sources[sfxList[i]]do
|
||||||
|
Sources[sfxList[i]][j]:release()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Sources[sfxList[i]]={love.audio.newSource(fullPath,'static')}
|
||||||
|
c=c+1
|
||||||
else
|
else
|
||||||
LOG.print("No SFX file: "..N,5,COLOR.O)
|
LOG("No SFX: "..sfxList[i]..'.ogg',.1)
|
||||||
end
|
missing=missing+1
|
||||||
if not skip and i~=count then
|
|
||||||
coroutine.yield()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
SFX.loadOne=nil
|
LOG(c.."/"..#sfxList.." SFX files loaded")
|
||||||
|
LOG(missing.." SFX files missing")
|
||||||
|
if missing>0 then
|
||||||
|
MES.new('info',missing.." SFX files missing")
|
||||||
|
end
|
||||||
|
collectgarbage()
|
||||||
|
end
|
||||||
|
function SFX.loadSample(pack)
|
||||||
|
assert(type(pack)=='table',"Usage: SFX.loadsample([table])")
|
||||||
|
assert(pack.name,"No field: name")
|
||||||
|
assert(pack.path,"No field: path")
|
||||||
|
local num=1
|
||||||
|
while love.filesystem.getInfo(pack.path..'/'..num..'.ogg')do
|
||||||
|
Sources[pack.name..num]={love.audio.newSource(pack.path..'/'..num..'.ogg','static')}
|
||||||
|
num=num+1
|
||||||
|
end
|
||||||
|
local base=(_getTuneHeight(pack.base)or 37)-1
|
||||||
|
local top=base+num-1
|
||||||
|
packSetting[pack.name]={base=base,top=top}
|
||||||
|
LOG((num-1).." "..pack.name.." samples loaded")
|
||||||
|
end
|
||||||
|
|
||||||
function SFX.play(s,vol,pos)
|
function SFX.getCount()
|
||||||
if SETTING.sfx==0 or vol==0 then return end
|
return #sfxList
|
||||||
local S=Sources[s]--Source list
|
end
|
||||||
|
function SFX.setVol(v)
|
||||||
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
|
||||||
|
volume=v
|
||||||
|
end
|
||||||
|
function SFX.setStereo(v)
|
||||||
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong stereo')
|
||||||
|
stereo=v
|
||||||
|
end
|
||||||
|
|
||||||
|
function SFX.getNoteName(note)
|
||||||
|
if note<1 then
|
||||||
|
return'---'
|
||||||
|
else
|
||||||
|
note=note-1
|
||||||
|
local octave=int(note/12)+1
|
||||||
|
return noteName[note%12+1]..octave
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function SFX.playSample(pack,...)--vol-1, sampSet1, vol-2, sampSet2
|
||||||
|
if ... then
|
||||||
|
local arg={...}
|
||||||
|
local vol
|
||||||
|
for i=1,#arg do
|
||||||
|
local a=arg[i]
|
||||||
|
if type(a)=='number'and a<=1 then
|
||||||
|
vol=a
|
||||||
|
else
|
||||||
|
local base=packSetting[pack].base
|
||||||
|
local top=packSetting[pack].top
|
||||||
|
local tune=type(a)=='string'and _getTuneHeight(a)or a--Absolute tune in number
|
||||||
|
local playTune=tune+rnd(-2,2)
|
||||||
|
if playTune<=base then--Too low notes
|
||||||
|
playTune=base+1
|
||||||
|
elseif playTune>top then--Too high notes
|
||||||
|
playTune=top
|
||||||
|
end
|
||||||
|
SFX.play(pack..playTune-base,vol,nil,tune-playTune)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function _play(name,vol,pos,pitch)
|
||||||
|
if volume==0 or vol==0 then return end
|
||||||
|
local S=Sources[name]--Source list
|
||||||
if not S then return end
|
if not S then return end
|
||||||
local n=1
|
local n=1
|
||||||
while S[n]:isPlaying()do
|
while S[n]:isPlaying()do
|
||||||
@@ -41,42 +141,23 @@ function SFX.init(list)
|
|||||||
S=S[n]--AU_SRC
|
S=S[n]--AU_SRC
|
||||||
if S:getChannelCount()==1 then
|
if S:getChannelCount()==1 then
|
||||||
if pos then
|
if pos then
|
||||||
pos=pos*SETTING.stereo
|
pos=interval(pos,-1,1)*stereo
|
||||||
S:setPosition(pos,1-pos^2,0)
|
|
||||||
else
|
|
||||||
S:setPosition(0,0,0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
S:setVolume(((vol or 1)*SETTING.sfx)^1.626)
|
|
||||||
S:play()
|
|
||||||
end
|
|
||||||
function SFX.fplay(s,vol,pos)
|
|
||||||
local S=Sources[s]--Source list
|
|
||||||
if not S then return end
|
|
||||||
local n=1
|
|
||||||
while S[n]:isPlaying()do
|
|
||||||
n=n+1
|
|
||||||
if not S[n]then
|
|
||||||
S[n]=S[1]:clone()
|
|
||||||
S[n]:seek(0)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
S=S[n]--AU_SRC
|
|
||||||
if S:getChannelCount()==1 then
|
|
||||||
if pos then
|
|
||||||
pos=pos*SETTING.stereo
|
|
||||||
S:setPosition(pos,1-pos^2,0)
|
S:setPosition(pos,1-pos^2,0)
|
||||||
else
|
else
|
||||||
S:setPosition(0,0,0)
|
S:setPosition(0,0,0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
S:setVolume(vol^1.626)
|
S:setVolume(vol^1.626)
|
||||||
|
S:setPitch(pitch and 1.0594630943592953^pitch or 1)
|
||||||
S:play()
|
S:play()
|
||||||
end
|
end
|
||||||
function SFX.reset()
|
SFX.fplay=_play--Play sounds without apply module's volume setting
|
||||||
|
function SFX.play(name,vol,pos,pitch)
|
||||||
|
_play(name,(vol or 1)*volume,pos,pitch)
|
||||||
|
end
|
||||||
|
function SFX.reset()
|
||||||
for _,L in next,Sources do
|
for _,L in next,Sources do
|
||||||
if type(L)=="table"then
|
if type(L)=='table'then
|
||||||
for i=#L,1,-1 do
|
for i=#L,1,-1 do
|
||||||
if not L[i]:isPlaying()then
|
if not L[i]:isPlaying()then
|
||||||
rem(L,i)
|
rem(L,i)
|
||||||
@@ -84,10 +165,6 @@ function SFX.init(list)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
SFX.loadOne=coroutine.wrap(load)
|
|
||||||
function SFX.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return SFX
|
return SFX
|
||||||
@@ -1,21 +1,46 @@
|
|||||||
|
local data=love.data
|
||||||
local STRING={}
|
local STRING={}
|
||||||
|
local assert,tostring,tonumber=assert,tostring,tonumber
|
||||||
local int,format=math.floor,string.format
|
local int,format=math.floor,string.format
|
||||||
local find,sub,upper=string.find,string.sub,string.upper
|
local find,sub,gsub,upper=string.find,string.sub,string.gsub,string.upper
|
||||||
|
local char,byte=string.char,string.byte
|
||||||
|
|
||||||
|
--"Replace dollars", replace all $n with ...
|
||||||
|
function STRING.repD(str,...)
|
||||||
|
local l={...}
|
||||||
|
for i=#l,1,-1 do
|
||||||
|
str=gsub(str,'$'..i,l[i])
|
||||||
|
end
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
|
||||||
|
--"Scan arg", scan if str has the arg (format of str is like "-json -q", arg is like "-q")
|
||||||
|
function STRING.sArg(str,switch)
|
||||||
|
if find(str.." ",switch.." ")then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
do--function STRING.shiftChar(c)
|
do--function STRING.shiftChar(c)
|
||||||
local shiftMap={
|
local shiftMap={
|
||||||
["1"]="!",["2"]="@",["3"]="#",["4"]="$",["5"]="%",
|
['1']='!',['2']='@',['3']='#',['4']='$',['5']='%',
|
||||||
["6"]="^",["7"]="&",["8"]="*",["9"]="(",["0"]=")",
|
['6']='^',['7']='&',['8']='*',['9']='(',['0']=')',
|
||||||
["`"]="~",["-"]="_",["="]="+",
|
['`']='~',['-']='_',['=']='+',
|
||||||
["["]="{",["]"]="}",["\\"]="|",
|
['[']='{',[']']='}',['\\']='|',
|
||||||
[";"]=":",["'"]="\"",
|
[';']=':',['\'']='"',
|
||||||
[","]="<",["."]=">",["/"]="?",
|
[',']='<',['.']='>',['/']='?',
|
||||||
}
|
}
|
||||||
function STRING.shiftChar(c)
|
function STRING.shiftChar(c)
|
||||||
return shiftMap[c]or upper(c)
|
return shiftMap[c]or upper(c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function STRING.trim(s)
|
||||||
|
if not s:find("%S")then return""end
|
||||||
|
s=s:sub((s:find("%S"))):reverse()
|
||||||
|
return s:sub((s:find("%S"))):reverse()
|
||||||
|
end
|
||||||
|
|
||||||
function STRING.split(s,sep,regex)
|
function STRING.split(s,sep,regex)
|
||||||
local L={}
|
local L={}
|
||||||
local p1,p2=1--start,target
|
local p1,p2=1--start,target
|
||||||
@@ -46,27 +71,71 @@ function STRING.simpEmailCheck(e)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function STRING.time(s)
|
function STRING.time_simp(t)
|
||||||
if s<60 then
|
return format("%02d:%02d",int(t/60),int(t%60))
|
||||||
return format("%.3f\"",s)
|
end
|
||||||
elseif s<3600 then
|
|
||||||
return format("%d'%05.2f\"",int(s/60),s%60)
|
function STRING.time(t)
|
||||||
|
if t<60 then
|
||||||
|
return format("%.3f\"",t)
|
||||||
|
elseif t<3600 then
|
||||||
|
return format("%d'%05.2f\"",int(t/60),int(t%60*100)/100)
|
||||||
else
|
else
|
||||||
local h=int(s/3600)
|
return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),int(t%60*100)/100)
|
||||||
return format("%d:%.2d'%05.2f\"",h,int(s/60%60),s%60)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
do--function STRING.urlEncode(str)
|
function STRING.UTF8(n)--Simple utf8 coding
|
||||||
local rshift=bit.rshift
|
assert(type(n)=='number',"Wrong type ("..type(n)..")")
|
||||||
local b16={[0]="0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}
|
assert(n>=0 and n<2^31,"Out of range ("..n..")")
|
||||||
function STRING.urlEncode(str)
|
if n<2^7 then return char(n)
|
||||||
local out=""
|
elseif n<2^11 then return char(192+int(n/2^06),128+n%2^6)
|
||||||
for i=1,#str do
|
elseif n<2^16 then return char(224+int(n/2^12),128+int(n/2^06)%2^6,128+n%2^6)
|
||||||
if str:sub(i,i):match("[a-zA-Z0-9]")then
|
elseif n<2^21 then return char(240+int(n/2^18),128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
|
||||||
out=out..str:sub(i,i)
|
elseif n<2^26 then return char(248+int(n/2^24),128+int(n/2^18)%2^6,128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
|
||||||
|
elseif n<2^31 then return char(252+int(n/2^30),128+int(n/2^24)%2^6,128+int(n/2^18)%2^6,128+int(n/2^12)%2^6,128+int(n/2^06)%2^6,128+n%2^6)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
do--function STRING.bigInt(t)
|
||||||
|
local lg=math.log10
|
||||||
|
local units={"","K","M","B","T","Qa","Qt","Sx","Sp","Oc","No"}
|
||||||
|
local preUnits={"","U","D","T","Qa","Qt","Sx","Sp","O","N"}
|
||||||
|
local secUnits={"Dc","Vg","Tg","Qd","Qi","Se","St","Og","Nn","Ce"}--Ce is next-level unit, but DcCe is not used so used here
|
||||||
|
for _,preU in next,preUnits do for _,secU in next,secUnits do table.insert(units,preU..secU)end end
|
||||||
|
function STRING.bigInt(t)
|
||||||
|
if t<1000 then
|
||||||
|
return tostring(t)
|
||||||
|
elseif t~=1e999 then
|
||||||
|
local e=int(lg(t)/3)
|
||||||
|
return(t/10^(e*3))..units[e+1]
|
||||||
else
|
else
|
||||||
local b=str:byte(i)
|
return"INF"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.hexColor(str)--[LOW PERFORMENCE]
|
||||||
|
assert(type(str)=='string')
|
||||||
|
if str:sub(1,1)=="#"then str=str:sub(2)end
|
||||||
|
assert(#str<=8)
|
||||||
|
local r=(tonumber(str:sub(1,2),16)or 0)/255
|
||||||
|
local g=(tonumber(str:sub(3,4),16)or 0)/255
|
||||||
|
local b=(tonumber(str:sub(5,6),16)or 0)/255
|
||||||
|
local a=(tonumber(str:sub(7,8),16)or 255)/255
|
||||||
|
return r,g,b,a
|
||||||
|
end
|
||||||
|
|
||||||
|
do--function STRING.urlEncode(s)
|
||||||
|
local rshift=bit.rshift
|
||||||
|
local b16={[0]='0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}
|
||||||
|
function STRING.urlEncode(s)
|
||||||
|
local out=""
|
||||||
|
for i=1,#s do
|
||||||
|
if s:sub(i,i):match("[a-zA-Z0-9]")then
|
||||||
|
out=out..s:sub(i,i)
|
||||||
|
else
|
||||||
|
local b=s:byte(i)
|
||||||
out=out.."%"..b16[rshift(b,4)]..b16[b%16]
|
out=out.."%"..b16[rshift(b,4)]..b16[b%16]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -74,4 +143,89 @@ do--function STRING.urlEncode(str)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function STRING.vcsEncrypt(text,key)
|
||||||
|
local keyLen=#key
|
||||||
|
local result=""
|
||||||
|
local buffer=""
|
||||||
|
for i=0,#text-1 do
|
||||||
|
buffer=buffer..char((byte(text,i+1)-32+byte(key,i%keyLen+1))%95+32)
|
||||||
|
if #buffer==26 then
|
||||||
|
result=result..buffer
|
||||||
|
buffer=""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result..buffer
|
||||||
|
end
|
||||||
|
function STRING.vcsDecrypt(text,key)
|
||||||
|
local keyLen=#key
|
||||||
|
local result=""
|
||||||
|
local buffer=""
|
||||||
|
for i=0,#text-1 do
|
||||||
|
buffer=buffer..char((byte(text,i+1)-32-byte(key,i%keyLen+1))%95+32)
|
||||||
|
if #buffer==26 then
|
||||||
|
result=result..buffer
|
||||||
|
buffer=""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result..buffer
|
||||||
|
end
|
||||||
|
function STRING.digezt(text)--Not powerful hash, just protect the original text
|
||||||
|
local out={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
||||||
|
local seed=26
|
||||||
|
for i=1,#text do
|
||||||
|
local c=byte(text,i)
|
||||||
|
seed=(seed+c)%26
|
||||||
|
c=c+seed
|
||||||
|
local pos=c*i%16
|
||||||
|
local step=(c+i)%4+1
|
||||||
|
local times=2+(c%6)
|
||||||
|
for _=1,times do
|
||||||
|
out[pos+1]=(out[pos+1]+c)%256
|
||||||
|
pos=(pos+step)%16
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local result=""
|
||||||
|
for i=1,16 do result=result..char(out[i])end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.readLine(str)
|
||||||
|
local p=str:find("\n")
|
||||||
|
if p then
|
||||||
|
return str:sub(1,p-1),str:sub(p+1)
|
||||||
|
else
|
||||||
|
return str,""
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function STRING.readChars(str,n)
|
||||||
|
return sub(str,1,n),sub(str,n+1)
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.packBin(s)
|
||||||
|
return data.encode('string','base64',data.compress('string','zlib',s))
|
||||||
|
end
|
||||||
|
function STRING.unpackBin(str)
|
||||||
|
local res
|
||||||
|
res,str=pcall(data.decode,'string','base64',str)
|
||||||
|
if not res then return end
|
||||||
|
res,str=pcall(data.decompress,'string','zlib',str)
|
||||||
|
if res then return str end
|
||||||
|
end
|
||||||
|
function STRING.packText(s)
|
||||||
|
return data.encode('string','base64',data.compress('string','gzip',s))
|
||||||
|
end
|
||||||
|
function STRING.unpackText(str)
|
||||||
|
local res
|
||||||
|
res,str=pcall(data.decode,'string','base64',str)
|
||||||
|
if not res then return end
|
||||||
|
res,str=pcall(data.decompress,'string','gzip',str)
|
||||||
|
if res then return str end
|
||||||
|
end
|
||||||
|
function STRING.packTable(t)
|
||||||
|
return STRING.packText(JSON.encode(t))
|
||||||
|
end
|
||||||
|
function STRING.unpackTable(t)
|
||||||
|
return JSON.decode(STRING.unpackText(t))
|
||||||
|
end
|
||||||
|
|
||||||
return STRING
|
return STRING
|
||||||
@@ -1,13 +1,15 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local setColor,setWidth=gc.setColor,gc.setLineWidth
|
local gc_setColor,gc_setLineWidth=gc.setColor,gc.setLineWidth
|
||||||
local sin,cos=math.sin,math.cos
|
local gc_draw,gc_line=gc.draw,gc.line
|
||||||
|
local gc_rectangle,gc_circle=gc.rectangle,gc.circle
|
||||||
|
|
||||||
local max,min=math.max,math.min
|
local max,min=math.max,math.min
|
||||||
local rnd=math.random
|
local rnd=math.random
|
||||||
local rem=table.remove
|
local ins,rem=table.insert,table.remove
|
||||||
|
|
||||||
local fx={}
|
local fx={}
|
||||||
|
|
||||||
local function normUpdate(S,dt)
|
local function _normUpdate(S,dt)
|
||||||
S.t=S.t+dt*S.rate
|
S.t=S.t+dt*S.rate
|
||||||
return S.t>1
|
return S.t>1
|
||||||
end
|
end
|
||||||
@@ -26,11 +28,11 @@ function FXupdate.badge(S,dt)
|
|||||||
end
|
end
|
||||||
return S.t>=1
|
return S.t>=1
|
||||||
end
|
end
|
||||||
FXupdate.attack=normUpdate
|
FXupdate.attack=_normUpdate
|
||||||
FXupdate.tap=normUpdate
|
FXupdate.tap=_normUpdate
|
||||||
FXupdate.ripple=normUpdate
|
FXupdate.ripple=_normUpdate
|
||||||
FXupdate.rectRipple=normUpdate
|
FXupdate.rectRipple=_normUpdate
|
||||||
FXupdate.shade=normUpdate
|
FXupdate.shade=_normUpdate
|
||||||
function FXupdate.cell(S,dt)
|
function FXupdate.cell(S,dt)
|
||||||
if S.vx then
|
if S.vx then
|
||||||
S.x=S.x+S.vx*S.rate
|
S.x=S.x+S.vx*S.rate
|
||||||
@@ -43,28 +45,28 @@ function FXupdate.cell(S,dt)
|
|||||||
S.t=S.t+dt*S.rate
|
S.t=S.t+dt*S.rate
|
||||||
return S.t>1
|
return S.t>1
|
||||||
end
|
end
|
||||||
FXupdate.line=normUpdate
|
FXupdate.line=_normUpdate
|
||||||
|
|
||||||
local FXdraw={}
|
local FXdraw={}
|
||||||
function FXdraw.badge(S)
|
function FXdraw.badge(S)
|
||||||
setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6)
|
gc_setColor(1,1,1,S.t<.2 and S.t*.6 or S.t<.8 and 1 or(1-S.t)*.6)
|
||||||
gc.draw(IMG.badgeIcon,S.x,S.y)
|
gc_draw(IMG.badgeIcon,S.x,S.y)
|
||||||
end
|
end
|
||||||
function FXdraw.attack(S)
|
function FXdraw.attack(S)
|
||||||
setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1))
|
gc_setColor(S.r*2,S.g*2,S.b*2,S.a*min(4-S.t*4,1))
|
||||||
|
|
||||||
setWidth(S.wid)
|
gc_setLineWidth(S.wid)
|
||||||
local t1,t2=max(5*S.t-4,0),min(S.t*4,1)
|
local t1,t2=max(5*S.t-4,0),min(S.t*4,1)
|
||||||
gc.line(
|
gc_line(
|
||||||
S.x1*(1-t1)+S.x2*t1,
|
S.x1*(1-t1)+S.x2*t1,
|
||||||
S.y1*(1-t1)+S.y2*t1,
|
S.y1*(1-t1)+S.y2*t1,
|
||||||
S.x1*(1-t2)+S.x2*t2,
|
S.x1*(1-t2)+S.x2*t2,
|
||||||
S.y1*(1-t2)+S.y2*t2
|
S.y1*(1-t2)+S.y2*t2
|
||||||
)
|
)
|
||||||
|
|
||||||
setWidth(S.wid*.6)
|
gc_setLineWidth(S.wid*.6)
|
||||||
t1,t2=max(4*S.t-3,0),min(S.t*5,1)
|
t1,t2=max(4*S.t-3,0),min(S.t*5,1)
|
||||||
gc.line(
|
gc_line(
|
||||||
S.x1*(1-t1)+S.x2*t1,
|
S.x1*(1-t1)+S.x2*t1,
|
||||||
S.y1*(1-t1)+S.y2*t1,
|
S.y1*(1-t1)+S.y2*t1,
|
||||||
S.x1*(1-t2)+S.x2*t2,
|
S.x1*(1-t2)+S.x2*t2,
|
||||||
@@ -73,48 +75,38 @@ function FXdraw.attack(S)
|
|||||||
end
|
end
|
||||||
function FXdraw.tap(S)
|
function FXdraw.tap(S)
|
||||||
local t=S.t
|
local t=S.t
|
||||||
setWidth(2)
|
gc_setColor(1,1,1,(1-t)*.4)
|
||||||
setColor(1,1,1,1-t)
|
gc_circle('fill',S.x,S.y,30*(1-t)^.5)
|
||||||
gc.circle("line",S.x,S.y,t*(2-t)*30)
|
|
||||||
setColor(1,1,1,(1-t)*.5)
|
|
||||||
gc.circle("fill",S.x,S.y,t*30)
|
|
||||||
|
|
||||||
setColor(1,1,1,1-t)
|
|
||||||
for i=1,10 do
|
|
||||||
local p=S.ptc[i]
|
|
||||||
local T=t^.5
|
|
||||||
gc.rectangle("fill",p[1]*(1-T)+p[3]*T-5,p[2]*(1-T)+p[4]*T-5,11,11)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function FXdraw.ripple(S)
|
function FXdraw.ripple(S)
|
||||||
local t=S.t
|
local t=S.t
|
||||||
setWidth(2)
|
gc_setLineWidth(2)
|
||||||
setColor(1,1,1,1-t)
|
gc_setColor(1,1,1,1-t)
|
||||||
gc.circle("line",S.x,S.y,t*(2-t)*S.r)
|
gc_circle('line',S.x,S.y,t*(2-t)*S.r)
|
||||||
end
|
end
|
||||||
function FXdraw.rectRipple(S)
|
function FXdraw.rectRipple(S)
|
||||||
setWidth(6)
|
gc_setLineWidth(6)
|
||||||
setColor(1,1,1,1-S.t)
|
gc_setColor(1,1,1,1-S.t)
|
||||||
local r=(10*S.t)^1.2
|
local r=(10*S.t)^1.2
|
||||||
gc.rectangle("line",S.x-r,S.y-r,S.w+2*r,S.h+2*r)
|
gc_rectangle('line',S.x-r,S.y-r,S.w+2*r,S.h+2*r)
|
||||||
end
|
end
|
||||||
function FXdraw.shade(S)
|
function FXdraw.shade(S)
|
||||||
setColor(S.r,S.g,S.b,1-S.t)
|
gc_setColor(S.r,S.g,S.b,1-S.t)
|
||||||
gc.rectangle("fill",S.x,S.y,S.w,S.h,2)
|
gc_rectangle('fill',S.x,S.y,S.w,S.h,2)
|
||||||
end
|
end
|
||||||
function FXdraw.cell(S)
|
function FXdraw.cell(S)
|
||||||
setColor(1,1,1,1-S.t)
|
gc_setColor(1,1,1,1-S.t)
|
||||||
gc.draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
|
gc_draw(S.image,S.x,S.y,nil,S.size,nil,S.cx,S.cy)
|
||||||
end
|
end
|
||||||
function FXdraw.line(S)
|
function FXdraw.line(S)
|
||||||
setColor(1,1,1,S.a*(1-S.t))
|
gc_setColor(1,1,1,S.a*(1-S.t))
|
||||||
gc.line(S.x1,S.y1,S.x2,S.y2)
|
gc_line(S.x1,S.y1,S.x2,S.y2)
|
||||||
end
|
end
|
||||||
|
|
||||||
local SYSFX={}
|
local SYSFX={}
|
||||||
function SYSFX.update(dt)
|
function SYSFX.update(dt)
|
||||||
for i=#fx,1,-1 do
|
for i=#fx,1,-1 do
|
||||||
if fx[i]:update(dt) then
|
if fx[i]:update(dt)then
|
||||||
rem(fx,i)
|
rem(fx,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -126,17 +118,17 @@ function SYSFX.draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SYSFX.newBadge(x1,y1,x2,y2)
|
function SYSFX.newBadge(x1,y1,x2,y2)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.badge,
|
update=FXupdate.badge,
|
||||||
draw=FXdraw.badge,
|
draw=FXdraw.badge,
|
||||||
t=0,
|
t=0,
|
||||||
x=x1,y=y1,
|
x=x1,y=y1,
|
||||||
x1=x1,y1=y1,
|
x1=x1,y1=y1,
|
||||||
x2=x2,y2=y2,
|
x2=x2,y2=y2,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.attack,
|
update=FXupdate.attack,
|
||||||
draw=FXdraw.attack,
|
draw=FXdraw.attack,
|
||||||
t=0,
|
t=0,
|
||||||
@@ -145,7 +137,7 @@ function SYSFX.newAttack(rate,x1,y1,x2,y2,wid,r,g,b,a)
|
|||||||
x2=x2,y2=y2,--End pos
|
x2=x2,y2=y2,--End pos
|
||||||
wid=wid,--Line width
|
wid=wid,--Line width
|
||||||
r=r,g=g,b=b,a=a,
|
r=r,g=g,b=b,a=a,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newTap(rate,x,y)
|
function SYSFX.newTap(rate,x,y)
|
||||||
local T=
|
local T=
|
||||||
@@ -155,45 +147,39 @@ function SYSFX.newTap(rate,x,y)
|
|||||||
t=0,
|
t=0,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
x=x,y=y,
|
x=x,y=y,
|
||||||
ptc={},
|
|
||||||
}
|
}
|
||||||
for i=1,10 do
|
ins(fx,T)
|
||||||
local d=40+50*rnd()
|
|
||||||
local ang=rnd()*6.2832
|
|
||||||
T.ptc[i]={x,y,x+d*cos(ang),y+d*sin(ang)}
|
|
||||||
end
|
|
||||||
fx[#fx+1]=T
|
|
||||||
end
|
end
|
||||||
function SYSFX.newRipple(rate,x,y,r)
|
function SYSFX.newRipple(rate,x,y,r)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.ripple,
|
update=FXupdate.ripple,
|
||||||
draw=FXdraw.ripple,
|
draw=FXdraw.ripple,
|
||||||
t=0,
|
t=0,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
x=x,y=y,r=r,
|
x=x,y=y,r=r,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newRectRipple(rate,x,y,w,h)
|
function SYSFX.newRectRipple(rate,x,y,w,h)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.rectRipple,
|
update=FXupdate.rectRipple,
|
||||||
draw=FXdraw.rectRipple,
|
draw=FXdraw.rectRipple,
|
||||||
t=0,
|
t=0,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
x=x,y=y,w=w,h=h,
|
x=x,y=y,w=w,h=h,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newShade(rate,x,y,w,h,r,g,b)
|
function SYSFX.newShade(rate,x,y,w,h,r,g,b)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.shade,
|
update=FXupdate.shade,
|
||||||
draw=FXdraw.shade,
|
draw=FXdraw.shade,
|
||||||
t=0,
|
t=0,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
x=x,y=y,w=w,h=h,
|
x=x,y=y,w=w,h=h,
|
||||||
r=r or 1,g=g or 1,b=b or 1,
|
r=r or 1,g=g or 1,b=b or 1,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
|
function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.cell,
|
update=FXupdate.cell,
|
||||||
draw=FXdraw.cell,
|
draw=FXdraw.cell,
|
||||||
t=0,
|
t=0,
|
||||||
@@ -203,10 +189,10 @@ function SYSFX.newCell(rate,image,size,x,y,vx,vy,ax,ay)
|
|||||||
x=x,y=y,
|
x=x,y=y,
|
||||||
vx=vx,vy=vy,
|
vx=vx,vy=vy,
|
||||||
ax=ax,ay=ay,
|
ax=ax,ay=ay,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function SYSFX.newLine(rate,x1,y1,x2,y2,r,g,b,a)
|
function SYSFX.newLine(rate,x1,y1,x2,y2,r,g,b,a)
|
||||||
fx[#fx+1]={
|
ins(fx,{
|
||||||
update=FXupdate.line,
|
update=FXupdate.line,
|
||||||
draw=FXdraw.line,
|
draw=FXdraw.line,
|
||||||
t=0,
|
t=0,
|
||||||
@@ -214,6 +200,6 @@ function SYSFX.newLine(rate,x1,y1,x2,y2,r,g,b,a)
|
|||||||
x1=x1 or 0,y1=y1 or 0,
|
x1=x1 or 0,y1=y1 or 0,
|
||||||
x2=x2 or x1 or 1280,y2=y2 or y1 or 720,
|
x2=x2 or x1 or 1280,y2=y2 or y1 or 720,
|
||||||
r=r or 1,g=g or 1,b=b or 1,a=a or 1,
|
r=r or 1,g=g or 1,b=b or 1,a=a or 1,
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
return SYSFX
|
return SYSFX
|
||||||
@@ -1,59 +1,92 @@
|
|||||||
|
local find=string.find
|
||||||
|
local rem=table.remove
|
||||||
local next,type=next,type
|
local next,type=next,type
|
||||||
local TABLE={}
|
local TABLE={}
|
||||||
|
|
||||||
--Copy [1~#] elements
|
--Get a new filled table
|
||||||
function TABLE.shift(org)
|
function TABLE.new(val,count)
|
||||||
|
local L={}
|
||||||
|
for i=1,count do
|
||||||
|
L[i]=val
|
||||||
|
end
|
||||||
|
return L
|
||||||
|
end
|
||||||
|
|
||||||
|
--Get a copy of [1~#] elements
|
||||||
|
function TABLE.shift(org,depth)
|
||||||
|
if not depth then depth=1e99 end
|
||||||
local L={}
|
local L={}
|
||||||
for i=1,#org do
|
for i=1,#org do
|
||||||
if type(org[i])~="table"then
|
if type(org[i])=='table'and depth>0 then
|
||||||
L[i]=org[i]
|
L[i]=TABLE.shift(org[i],depth-1)
|
||||||
else
|
else
|
||||||
L[i]=TABLE.shift(org[i])
|
L[i]=org[i]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L
|
return L
|
||||||
end
|
end
|
||||||
|
|
||||||
--Copy all elements
|
--Get a full copy of a table, depth = how many layers will be recreate, default to inf
|
||||||
function TABLE.copy(org)
|
function TABLE.copy(org,depth)
|
||||||
|
if not depth then depth=1e99 end
|
||||||
local L={}
|
local L={}
|
||||||
for k,v in next,org do
|
for k,v in next,org do
|
||||||
if type(v)~="table"then
|
if type(v)=='table'and depth>0 then
|
||||||
L[k]=v
|
L[k]=TABLE.copy(v,depth-1)
|
||||||
else
|
else
|
||||||
L[k]=TABLE.copy(v)
|
L[k]=v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L
|
return L
|
||||||
end
|
end
|
||||||
|
|
||||||
--For all things in G if same type in base, push to base
|
--For all things in new, push to old
|
||||||
function TABLE.update(G,base)
|
function TABLE.cover(new,old)
|
||||||
for k,v in next,G do
|
for k,v in next,new do
|
||||||
if type(v)==type(base[k])then
|
old[k]=v
|
||||||
if type(v)=="table"then
|
end
|
||||||
TABLE.update(v,base[k])
|
end
|
||||||
|
|
||||||
|
--For all things in new, push to old
|
||||||
|
function TABLE.coverR(new,old)
|
||||||
|
for k,v in next,new do
|
||||||
|
if type(v)=='table'and type(old[k])=='table'then
|
||||||
|
TABLE.coverR(v,old[k])
|
||||||
else
|
else
|
||||||
base[k]=v
|
old[k]=v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--For all things in new if same type in old, push to old
|
||||||
|
function TABLE.update(new,old)
|
||||||
|
for k,v in next,new do
|
||||||
|
if type(v)==type(old[k])then
|
||||||
|
if type(v)=='table'then
|
||||||
|
TABLE.update(v,old[k])
|
||||||
|
else
|
||||||
|
old[k]=v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--For all things in G if no val in base, push to base
|
--For all things in new if no val in old, push to old
|
||||||
function TABLE.complete(G,base)
|
function TABLE.complete(new,old)
|
||||||
for k,v in next,G do
|
for k,v in next,new do
|
||||||
if base[k]==nil then
|
if type(v)=='table'then
|
||||||
base[k]=v
|
if old[k]==nil then old[k]={}end
|
||||||
elseif type(v)=="table"and type(base[k])=="table"then
|
TABLE.complete(v,old[k])
|
||||||
TABLE.complete(v,base[k])
|
elseif old[k]==nil then
|
||||||
|
old[k]=v
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Remove positive integer index of table
|
--Remove [1~#] of table
|
||||||
function TABLE.cut(G)
|
function TABLE.cut(G)
|
||||||
for i=#G,1,-1 do
|
for i=1,#G do
|
||||||
G[i]=nil
|
G[i]=nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -65,18 +98,71 @@ function TABLE.clear(G)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Remove duplicated value of [1~#]
|
||||||
|
function TABLE.trimDuplicate(org)
|
||||||
|
local cache={}
|
||||||
|
for i=1,#org,-1 do
|
||||||
|
if cache[org[i]]then
|
||||||
|
rem(org,i)
|
||||||
|
else
|
||||||
|
cache[org[i]]=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Discard duplicated value
|
||||||
|
function TABLE.remDuplicate(org)
|
||||||
|
local cache={}
|
||||||
|
for k,v in next,org do
|
||||||
|
if cache[v]then
|
||||||
|
org[k]=nil
|
||||||
|
else
|
||||||
|
cache[v]=true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--Reverse [1~#]
|
||||||
|
function TABLE.reverse(org)
|
||||||
|
local l=#org
|
||||||
|
for i=1,math.floor(l/2)do
|
||||||
|
org[i],org[l+1-i]=org[l+1-i],org[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
--Find value in [1~#]
|
||||||
|
function TABLE.find(t,val)
|
||||||
|
for i=1,#t do if t[i]==val then return i end end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Return next value of [1~#] (by value)
|
||||||
|
function TABLE.next(t,val)
|
||||||
|
for i=1,#t do if t[i]==val then return t[i%#t+1]end end
|
||||||
|
end
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
--Find value in whole table
|
||||||
|
function TABLE.search(t,val)
|
||||||
|
for k,v in next,t do if v==val then return k end end
|
||||||
|
end
|
||||||
|
|
||||||
--Re-index string value of a table
|
--Re-index string value of a table
|
||||||
function TABLE.reIndex(org)
|
function TABLE.reIndex(org)
|
||||||
for k,v in next,org do
|
for k,v in next,org do
|
||||||
if type(v)=="string"then
|
if type(v)=='string'then
|
||||||
org[k]=org[v]
|
org[k]=org[v]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--------------------------
|
||||||
|
|
||||||
--Dump a simple lua table
|
--Dump a simple lua table
|
||||||
do--function TABLE.dump(L,t)
|
do--function TABLE.dump(L,t)
|
||||||
local find=string.find
|
|
||||||
local tabs={
|
local tabs={
|
||||||
[0]="",
|
[0]="",
|
||||||
"\t",
|
"\t",
|
||||||
@@ -85,41 +171,41 @@ do--function TABLE.dump(L,t)
|
|||||||
"\t\t\t\t",
|
"\t\t\t\t",
|
||||||
"\t\t\t\t\t",
|
"\t\t\t\t\t",
|
||||||
}
|
}
|
||||||
function dump(L,t)
|
local function dump(L,t)
|
||||||
local s
|
local s
|
||||||
if t then
|
if t then
|
||||||
s="{\n"
|
s="{\n"
|
||||||
else
|
else
|
||||||
s="return{\n"
|
s="return{\n"
|
||||||
t=1
|
t=1
|
||||||
if type(L)~="table"then
|
if type(L)~='table'then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local count=1
|
local count=1
|
||||||
for k,v in next,L do
|
for k,v in next,L do
|
||||||
local T=type(k)
|
local T=type(k)
|
||||||
if T=="number"then
|
if T=='number'then
|
||||||
if k==count then
|
if k==count then
|
||||||
k=""
|
k=""
|
||||||
count=count+1
|
count=count+1
|
||||||
else
|
else
|
||||||
k="["..k.."]="
|
k="["..k.."]="
|
||||||
end
|
end
|
||||||
elseif T=="string"then
|
elseif T=='string'then
|
||||||
if find(k,"[^0-9a-zA-Z_]")then
|
if find(k,"[^0-9a-zA-Z_]")then
|
||||||
k="[\""..k.."\"]="
|
k="[\""..k.."\"]="
|
||||||
else
|
else
|
||||||
k=k.."="
|
k=k.."="
|
||||||
end
|
end
|
||||||
elseif T=="boolean"then k="["..k.."]="
|
elseif T=='boolean'then k="["..k.."]="
|
||||||
else error("Error key type!")
|
else error("Error key type!")
|
||||||
end
|
end
|
||||||
T=type(v)
|
T=type(v)
|
||||||
if T=="number"then v=tostring(v)
|
if T=='number'then v=tostring(v)
|
||||||
elseif T=="string"then v="\""..v.."\""
|
elseif T=='string'then v="\""..v.."\""
|
||||||
elseif T=="table"then v=dump(v,t+1)
|
elseif T=='table'then v=dump(v,t+1)
|
||||||
elseif T=="boolean"then v=tostring(v)
|
elseif T=='boolean'then v=tostring(v)
|
||||||
else error("Error data type!")
|
else error("Error data type!")
|
||||||
end
|
end
|
||||||
s=s..tabs[t]..k..v..",\n"
|
s=s..tabs[t]..k..v..",\n"
|
||||||
@@ -129,4 +215,41 @@ do--function TABLE.dump(L,t)
|
|||||||
TABLE.dump=dump
|
TABLE.dump=dump
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Dump a simple lua table (no whitespaces)
|
||||||
|
do--function TABLE.dumpDeflate(L,t)
|
||||||
|
local function dump(L)
|
||||||
|
local s="return{"
|
||||||
|
if type(L)~='table'then return end
|
||||||
|
local count=1
|
||||||
|
for k,v in next,L do
|
||||||
|
local T=type(k)
|
||||||
|
if T=='number'then
|
||||||
|
if k==count then
|
||||||
|
k=""
|
||||||
|
count=count+1
|
||||||
|
else
|
||||||
|
k="["..k.."]="
|
||||||
|
end
|
||||||
|
elseif T=='string'then
|
||||||
|
if find(k,"[^0-9a-zA-Z_]")then
|
||||||
|
k="[\""..k.."\"]="
|
||||||
|
else
|
||||||
|
k=k.."="
|
||||||
|
end
|
||||||
|
elseif T=='boolean'then k="["..k.."]="
|
||||||
|
else error("Error key type!")
|
||||||
|
end
|
||||||
|
T=type(v)
|
||||||
|
if T=='number'then v=tostring(v)
|
||||||
|
elseif T=='string'then v="\""..v.."\""
|
||||||
|
elseif T=='table'then v=dump(v)
|
||||||
|
elseif T=='boolean'then v=tostring(v)
|
||||||
|
else error("Error data type!")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return s.."}"
|
||||||
|
end
|
||||||
|
TABLE.dumpDeflate=dump
|
||||||
|
end
|
||||||
|
|
||||||
return TABLE
|
return TABLE
|
||||||
@@ -6,20 +6,25 @@ local TASK={}
|
|||||||
function TASK.getCount()
|
function TASK.getCount()
|
||||||
return #tasks
|
return #tasks
|
||||||
end
|
end
|
||||||
function TASK.update()
|
local trigFrame=0
|
||||||
|
function TASK.update(dt)
|
||||||
|
trigFrame=trigFrame+dt*60
|
||||||
|
while trigFrame>=1 do
|
||||||
for i=#tasks,1,-1 do
|
for i=#tasks,1,-1 do
|
||||||
local T=tasks[i]
|
local T=tasks[i]
|
||||||
if status(T.thread)=="dead"then
|
if status(T.thread)=='dead'then
|
||||||
rem(tasks,i)
|
rem(tasks,i)
|
||||||
else
|
else
|
||||||
assert(resume(T.thread))
|
assert(resume(T.thread))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
trigFrame=trigFrame-1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function TASK.new(code,...)
|
function TASK.new(code,...)
|
||||||
local thread=coroutine.create(code)
|
local thread=coroutine.create(code)
|
||||||
resume(thread,...)
|
assert(resume(thread,...))
|
||||||
if status(thread)~="dead"then
|
if status(thread)~='dead'then
|
||||||
tasks[#tasks+1]={
|
tasks[#tasks+1]={
|
||||||
thread=thread,
|
thread=thread,
|
||||||
code=code,
|
code=code,
|
||||||
|
|||||||
12
Zframework/test.lua
Normal file
12
Zframework/test.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
local TEST={}
|
||||||
|
|
||||||
|
--Wait for the scene swapping animation to finish
|
||||||
|
function TEST.yieldUntilNextScene()
|
||||||
|
while SCN.swapping do YIELD()end
|
||||||
|
end
|
||||||
|
|
||||||
|
function TEST.yieldN(frames)
|
||||||
|
for _=1,frames do YIELD()end
|
||||||
|
end
|
||||||
|
|
||||||
|
return TEST
|
||||||
@@ -1,75 +1,99 @@
|
|||||||
local gc=love.graphics
|
local gc=love.graphics
|
||||||
local gc_getColor,gc_setColor,gc_push,gc_pop,gc_translate,gc_scale,gc_rotate,gc_shear
|
local getColor,setColor=gc.getColor,gc.setColor
|
||||||
=gc.getColor,gc.setColor,gc.push,gc.pop,gc.translate,gc.scale,gc.rotate,gc.shear
|
|
||||||
|
|
||||||
local int,rnd,rem=math.floor,math.random,table.remove
|
local int,rnd=math.floor,math.random
|
||||||
local setFont,mStr=setFont,mStr
|
local ins,rem=table.insert,table.remove
|
||||||
|
local draw=gc.draw
|
||||||
|
|
||||||
local texts={}
|
local texts={}
|
||||||
|
|
||||||
local textFX={}
|
local textFX={}
|
||||||
function textFX.appear(t)
|
function textFX.appear(t)
|
||||||
mStr(t.text,t.x,t.y-t.font*.7)
|
draw(
|
||||||
|
t.text,t.x,t.y,
|
||||||
|
nil,
|
||||||
|
nil,nil,
|
||||||
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.sudden(t)
|
function textFX.sudden(t)
|
||||||
gc_setColor(1,1,1,1-t.c)
|
setColor(1,1,1,1-t.c)
|
||||||
mStr(t.text,t.x,t.y-t.font*.7)
|
draw(
|
||||||
|
t.text,t.x,t.y,
|
||||||
|
nil,
|
||||||
|
nil,nil,
|
||||||
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.fly(t)
|
function textFX.fly(t)
|
||||||
mStr(t.text,t.x+(t.c-.5)^3*300,t.y-t.font*.7)
|
draw(
|
||||||
|
t.text,t.x+(t.c-.5)^3*300,t.y,
|
||||||
|
nil,
|
||||||
|
nil,nil,
|
||||||
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.stretch(t)
|
function textFX.stretch(t)
|
||||||
gc_push("transform")
|
draw(
|
||||||
gc_translate(t.x,t.y)
|
t.text,t.x,t.y,
|
||||||
if t.c<.3 then gc_scale((.3-t.c)*1.6+1,1)end
|
nil,
|
||||||
mStr(t.text,0,-t.font*.7)
|
t.c<.3 and(.3-t.c)*1.6+1 or 1,1,
|
||||||
gc_pop()
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.drive(t)
|
function textFX.drive(t)
|
||||||
gc_push("transform")
|
draw(
|
||||||
gc_translate(t.x,t.y)
|
t.text,t.x,t.y,
|
||||||
if t.c<.3 then gc_shear((.3-t.c)*2,0)end
|
nil,
|
||||||
mStr(t.text,0,-t.font*.7)
|
nil,nil,
|
||||||
gc_pop()
|
t.text:getWidth()*.5,t.text:getHeight()*.5,
|
||||||
|
t.c<.3 and(.3-t.c)*2 or 0,0
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.spin(t)
|
function textFX.spin(t)
|
||||||
gc_push("transform")
|
draw(
|
||||||
gc_translate(t.x,t.y)
|
t.text,t.x,t.y,
|
||||||
if t.c<.3 then
|
t.c<.3 and(.3-t.c)^2*4 or t.c<.8 and 0 or(t.c-.8)^2*-4,
|
||||||
gc_rotate((.3-t.c)^2*4)
|
nil,nil,
|
||||||
elseif t.c>.8 then
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
gc_rotate((t.c-.8)^2*-4)
|
)
|
||||||
end
|
|
||||||
mStr(t.text,0,-t.font*.7)
|
|
||||||
gc_pop()
|
|
||||||
end
|
end
|
||||||
function textFX.flicker(t)
|
function textFX.flicker(t)
|
||||||
local _,_,_,T=gc_getColor()
|
local _,_,_,T=getColor()
|
||||||
gc_setColor(1,1,1,T*(rnd()+.5))
|
setColor(1,1,1,T*(rnd()+.5))
|
||||||
mStr(t.text,t.x,t.y-t.font*.7)
|
draw(
|
||||||
|
t.text,t.x,t.y,
|
||||||
|
nil,
|
||||||
|
nil,nil,
|
||||||
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
function textFX.zoomout(t)
|
function textFX.zoomout(t)
|
||||||
gc_push("transform")
|
draw(
|
||||||
local k=t.c^.5*.1+1
|
t.text,t.x,t.y,
|
||||||
gc_translate(t.x,t.y)
|
nil,
|
||||||
gc_scale(k,k)
|
t.c^.5*.1+1,nil,
|
||||||
mStr(t.text,0,-t.font*.7)
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
gc_pop()
|
)
|
||||||
end
|
end
|
||||||
function textFX.beat(t)
|
function textFX.beat(t)
|
||||||
gc_push("transform")
|
local k=t.c<.3 and 1.3-t.c^2/.3 or 1
|
||||||
gc_translate(t.x,t.y)
|
draw(
|
||||||
if t.c<.3 then
|
t.text,t.x,t.y,
|
||||||
local k=1.3-t.c^2/.3
|
nil,
|
||||||
gc_scale(k,k)
|
k,k,
|
||||||
end
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
mStr(t.text,0,-t.font*.7)
|
)
|
||||||
gc_pop()
|
|
||||||
end
|
end
|
||||||
function textFX.score(t)
|
function textFX.score(t)
|
||||||
local _,_,_,T=gc_getColor()
|
local _,_,_,T=getColor()
|
||||||
gc_setColor(1,1,1,T*.5)
|
setColor(1,1,1,T*.5)
|
||||||
mStr(t.text,t.x,t.y-t.font*.7-t.c^.2*50)
|
draw(
|
||||||
|
t.text,t.x,t.y-0-t.c^.2*50,
|
||||||
|
nil,
|
||||||
|
nil,nil,
|
||||||
|
t.text:getWidth()*.5,t.text:getHeight()*.5
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
local TEXT={}
|
local TEXT={}
|
||||||
@@ -77,34 +101,34 @@ function TEXT.clear()
|
|||||||
texts={}
|
texts={}
|
||||||
end
|
end
|
||||||
function TEXT.show(text,x,y,font,style,spd,stop)
|
function TEXT.show(text,x,y,font,style,spd,stop)
|
||||||
texts[#texts+1]={
|
ins(texts,{
|
||||||
c=0, --Timer
|
c=0, --Timer
|
||||||
text=text, --String
|
text=gc.newText(FONT.get(int(font/5)*5 or 40),text), --String
|
||||||
x=x or 0, --X
|
x=x or 0, --X
|
||||||
y=y or 0, --Y
|
y=y or 0, --Y
|
||||||
font=int(font/5)*5 or 40, --Font
|
spd=(spd or 1), --Timing speed(1=last 1 sec)
|
||||||
spd=(spd or 1)/60, --Timing speed(1=last 1 sec)
|
|
||||||
stop=stop, --Stop time(sustained text)
|
stop=stop, --Stop time(sustained text)
|
||||||
draw=textFX[style or"appear"]or error("unavailable type:"..style), --Draw method
|
draw=assert(textFX[style or'appear'],"no text type:"..style),--Draw method
|
||||||
}
|
})
|
||||||
end
|
end
|
||||||
function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.show(), but only return text object, need manual management
|
function TEXT.getText(text,x,y,font,style,spd,stop)--Another version of TEXT.show(), but only return text object, need manual management
|
||||||
return{
|
return{
|
||||||
c=0,
|
c=0,
|
||||||
text=text,
|
text=gc.newText(FONT.get(int(font/5)*5 or 40),text),
|
||||||
x=x or 0,
|
x=x or 0,
|
||||||
y=y or 0,
|
y=y or 0,
|
||||||
font=int(font/5)*5 or 40,
|
spd=(spd or 1),
|
||||||
spd=(spd or 1)/60,
|
|
||||||
stop=stop,
|
stop=stop,
|
||||||
draw=textFX[style or"appear"]or error("unavailable type:"..style),
|
draw=textFX[style or'appear']or error("unavailable type:"..style),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
function TEXT.update(list)
|
function TEXT.update(dt,list)
|
||||||
if not list then list=texts end
|
if not list then
|
||||||
|
list=texts
|
||||||
|
end
|
||||||
for i=#list,1,-1 do
|
for i=#list,1,-1 do
|
||||||
local t=list[i]
|
local t=list[i]
|
||||||
t.c=t.c+t.spd
|
t.c=t.c+t.spd*dt
|
||||||
if t.stop then
|
if t.stop then
|
||||||
if t.c>t.stop then
|
if t.c>t.stop then
|
||||||
t.c=t.stop
|
t.c=t.stop
|
||||||
@@ -116,12 +140,13 @@ function TEXT.update(list)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function TEXT.draw(list)
|
function TEXT.draw(list)
|
||||||
if not list then list=texts end
|
if not list then
|
||||||
|
list=texts
|
||||||
|
end
|
||||||
for i=1,#list do
|
for i=1,#list do
|
||||||
local t=list[i]
|
local t=list[i]
|
||||||
local p=t.c
|
local p=t.c
|
||||||
gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||||
setFont(t.font)
|
|
||||||
t:draw()
|
t:draw()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,90 +0,0 @@
|
|||||||
local THEME={
|
|
||||||
cur=false,--Current theme
|
|
||||||
}
|
|
||||||
local themeColor={
|
|
||||||
xmas={COLOR.R,COLOR.Z,COLOR.G},
|
|
||||||
sprfes={COLOR.R,COLOR.O,COLOR.Y},
|
|
||||||
}
|
|
||||||
|
|
||||||
function THEME.calculate(Y,M,D)
|
|
||||||
if not Y then Y,M,D=os.date"%Y",os.date"%m",os.date"%d"end
|
|
||||||
--Festival calculate within one statement
|
|
||||||
return
|
|
||||||
--Christmas
|
|
||||||
M=="12"and math.abs(D-25)<4 and
|
|
||||||
"xmas"or
|
|
||||||
|
|
||||||
--Spring festival
|
|
||||||
M<"03"and math.abs((({
|
|
||||||
--Festival days. Jan 26=26, Feb 1=32, etc.
|
|
||||||
24,43,32,22,40,29,49,38,26,45,
|
|
||||||
34,23,41,31,50,39,28,47,36,25,
|
|
||||||
43,32,22,41,29,48,37,26,44,34,
|
|
||||||
23,42,31,50,39,28,46,35,24,43,
|
|
||||||
32,22,41,30,48,37,26,45,33,23,
|
|
||||||
42,32,50,39,28,46,35,24,43,33,
|
|
||||||
21,40,
|
|
||||||
})[Y-2000]or -26)-((M-1)*31+D))<6 and
|
|
||||||
"sprfes"or
|
|
||||||
|
|
||||||
--April fool's day
|
|
||||||
M=="04"and D=="01"and
|
|
||||||
"fool"or
|
|
||||||
|
|
||||||
--Z day (Feb./Mar./Apr./May./June. 26)
|
|
||||||
D=="26"and(
|
|
||||||
M=="1"or M=="2"and"zday1"or
|
|
||||||
M=="3"or M=="4"and"zday2"or
|
|
||||||
M=="5"or M=="6"and"zday3"
|
|
||||||
)or
|
|
||||||
|
|
||||||
"classic"
|
|
||||||
end
|
|
||||||
|
|
||||||
function THEME.set(theme)
|
|
||||||
if theme=="classic"then
|
|
||||||
BG.setDefault("space")
|
|
||||||
BGM.setDefault("blank")
|
|
||||||
elseif theme=="xmas"then
|
|
||||||
BG.setDefault("snow")
|
|
||||||
BGM.setDefault("xmas")
|
|
||||||
LOG.print("==============",COLOR.R)
|
|
||||||
LOG.print("Merry Christmas!",COLOR.Z)
|
|
||||||
LOG.print("==============",COLOR.R)
|
|
||||||
elseif theme=="sprfes"then
|
|
||||||
BG.setDefault("firework")
|
|
||||||
BGM.setDefault("spring festival")
|
|
||||||
LOG.print(" ★☆☆★",COLOR.R)
|
|
||||||
LOG.print("新年快乐!",COLOR.Z)
|
|
||||||
LOG.print(" ★☆☆★",COLOR.R)
|
|
||||||
elseif theme=="zday1"then
|
|
||||||
BG.setDefault("lanterns")
|
|
||||||
BGM.setDefault("empty")
|
|
||||||
elseif theme=="zday2"then
|
|
||||||
BG.setDefault("lanterns")
|
|
||||||
BGM.setDefault("overzero")
|
|
||||||
elseif theme=="zday3"then
|
|
||||||
BG.setDefault("lanterns")
|
|
||||||
BGM.setDefault("vacuum")
|
|
||||||
elseif theme=="fool"then
|
|
||||||
BG.setDefault("blockrain")
|
|
||||||
BGM.setDefault("how feeling")
|
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
|
||||||
THEME.cur=theme
|
|
||||||
BG.set()
|
|
||||||
BGM.play()
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
function THEME.getThemeColor(theme)
|
|
||||||
if not theme then theme=THEME.cur end
|
|
||||||
return themeColor[theme]
|
|
||||||
end
|
|
||||||
|
|
||||||
function THEME.fresh()
|
|
||||||
THEME.set(THEME.calculate(os.date"%Y",os.date"%m",os.date"%d"))
|
|
||||||
end
|
|
||||||
|
|
||||||
return THEME
|
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
local level={0,0,.01,.015,.02,.03,.04,.05,.06,.07}
|
local level={0,0,.01,.016,.023,.03,.04,.05,.06,.07,.08,.09,.12,.15}
|
||||||
local vib=love.system.vibrate
|
local vib=love.system.vibrate
|
||||||
return function(t)
|
return love.system.getOS()=='iOS'and
|
||||||
local L=SETTING.vib
|
function(t)
|
||||||
if L>0 then
|
t=level[t]
|
||||||
vib(level[L+t])
|
if t then vib(t<=.03 and 1 or t<=.09 and 2 or 3)end
|
||||||
|
end
|
||||||
|
or
|
||||||
|
function(t)
|
||||||
|
t=level[t]
|
||||||
|
if t then vib(t)end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
@@ -1,28 +1,40 @@
|
|||||||
|
local rnd=math.random
|
||||||
|
local volume=1
|
||||||
|
local diversion=0
|
||||||
local VOC={
|
local VOC={
|
||||||
getCount=function()return 0 end,
|
getCount=function()return 0 end,
|
||||||
getQueueCount=function()return 0 end,
|
getQueueCount=function()return 0 end,
|
||||||
|
load=function()error("Cannot load before init!")end,
|
||||||
getFreeChannel=NULL,
|
getFreeChannel=NULL,
|
||||||
play=NULL,
|
play=NULL,
|
||||||
update=NULL,
|
update=NULL,
|
||||||
}
|
}
|
||||||
|
function VOC.setDiversion(n)
|
||||||
|
assert(type(n)=='number'and n>0 and n<12,'Wrong div')
|
||||||
|
diversion=n
|
||||||
|
end
|
||||||
|
function VOC.setVol(v)
|
||||||
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
|
||||||
|
volume=v
|
||||||
|
end
|
||||||
function VOC.init(list)
|
function VOC.init(list)
|
||||||
VOC.init=nil
|
VOC.init=nil
|
||||||
local rnd=math.random
|
|
||||||
local rem=table.remove
|
local rem=table.remove
|
||||||
local voiceQueue={free=0}
|
local voiceQueue={free=0}
|
||||||
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
|
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
|
||||||
local Source={}
|
local Source={}
|
||||||
|
|
||||||
local count=#list function VOC.getCount()return count end
|
local count=#list function VOC.getCount()return count end
|
||||||
local function loadVoiceFile(N,vocName)
|
local function _loadVoiceFile(path,N,vocName)
|
||||||
local fileName="media/VOICE/"..SETTING.cv.."/"..vocName..".ogg"
|
local fullPath=path..vocName..'.ogg'
|
||||||
if love.filesystem.getInfo(fileName)then
|
if love.filesystem.getInfo(fullPath)then
|
||||||
bank[vocName]={love.audio.newSource(fileName,"static")}
|
bank[vocName]={love.audio.newSource(fullPath,'stream')}
|
||||||
table.insert(Source[N],vocName)
|
table.insert(Source[N],vocName)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local function getVoice(str)
|
--Load voice with string
|
||||||
|
local function _getVoice(str)
|
||||||
local L=bank[str]
|
local L=bank[str]
|
||||||
local n=1
|
local n=1
|
||||||
while L[n]:isPlaying()do
|
while L[n]:isPlaying()do
|
||||||
@@ -34,26 +46,23 @@ function VOC.init(list)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L[n]
|
return L[n]
|
||||||
--Load voice with string
|
|
||||||
end
|
end
|
||||||
local function load(skip)
|
function VOC.load(path)
|
||||||
for i=1,count do
|
for i=1,count do
|
||||||
Source[list[i]]={}
|
Source[list[i]]={}
|
||||||
|
|
||||||
local n=0
|
local n=0
|
||||||
repeat n=n+1 until not loadVoiceFile(list[i],list[i].."_"..n)
|
repeat n=n+1 until not _loadVoiceFile(path,list[i],list[i]..'_'..n)
|
||||||
|
|
||||||
if n==1 then
|
if n==1 then
|
||||||
if not loadVoiceFile(list[i],list[i])then
|
if not _loadVoiceFile(path,list[i],list[i])then
|
||||||
LOG.print("No VOICE file: "..list[i],5,COLOR.O)
|
LOG("No VOC: "..list[i],.1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not Source[list[i]][1]then Source[list[i]]=nil end
|
if not Source[list[i]][1]then
|
||||||
if not skip and i~=count then
|
Source[list[i]]=nil
|
||||||
coroutine.yield()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
VOC.loadOne=nil
|
|
||||||
|
|
||||||
function VOC.getQueueCount()
|
function VOC.getQueueCount()
|
||||||
return #voiceQueue
|
return #voiceQueue
|
||||||
@@ -68,7 +77,7 @@ function VOC.init(list)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function VOC.play(s,chn)
|
function VOC.play(s,chn)
|
||||||
if SETTING.voc>0 then
|
if volume>0 then
|
||||||
local _=Source[s]
|
local _=Source[s]
|
||||||
if not _ then return end
|
if not _ then return end
|
||||||
if chn then
|
if chn then
|
||||||
@@ -90,14 +99,16 @@ function VOC.init(list)
|
|||||||
rem(voiceQueue,i)
|
rem(voiceQueue,i)
|
||||||
end
|
end
|
||||||
elseif Q.s==1 then--Waiting load source
|
elseif Q.s==1 then--Waiting load source
|
||||||
Q[1]=getVoice(Q[1])
|
Q[1]=_getVoice(Q[1])
|
||||||
Q[1]:setVolume(SETTING.voc)
|
Q[1]:setVolume(volume)
|
||||||
|
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
|
||||||
Q[1]:play()
|
Q[1]:play()
|
||||||
Q.s=Q[2]and 2 or 4
|
Q.s=Q[2]and 2 or 4
|
||||||
elseif Q.s==2 then--Playing 1,ready 2
|
elseif Q.s==2 then--Playing 1,ready 2
|
||||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
Q[2]=getVoice(Q[2])
|
Q[2]=_getVoice(Q[2])
|
||||||
Q[2]:setVolume(SETTING.voc)
|
Q[2]:setVolume(volume)
|
||||||
|
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
|
||||||
Q[2]:play()
|
Q[2]:play()
|
||||||
Q.s=3
|
Q.s=3
|
||||||
end
|
end
|
||||||
@@ -117,8 +128,5 @@ function VOC.init(list)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
VOC.loadOne=coroutine.wrap(load)
|
|
||||||
function VOC.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
return VOC
|
return VOC
|
||||||
@@ -1,229 +1,27 @@
|
|||||||
-- local host="127.0.0.1"
|
local host=
|
||||||
-- local host="192.168.114.102"
|
-- '127.0.0.1'
|
||||||
-- local host="krakens.tpddns.cn"
|
-- '192.168.114.102'
|
||||||
-- local host="hdustea.3322.org"
|
'game.techmino.org'
|
||||||
local host="game.techmino.org"
|
local port='10026'
|
||||||
local port="10026"
|
local path='/tech/socket/v1'
|
||||||
local path="/tech/socket/v1"
|
|
||||||
|
|
||||||
local debug=""--S:send, R:receive, M=mark
|
-- lua + LÖVE threading websocket client
|
||||||
|
|
||||||
local wsThread=[[
|
|
||||||
-- lua + love2d threading websocket client
|
|
||||||
-- Original pure lua ver. by flaribbit and Particle_G
|
-- Original pure lua ver. by flaribbit and Particle_G
|
||||||
-- Threading version by MrZ
|
-- Threading version by MrZ
|
||||||
|
|
||||||
local triggerCHN,sendCHN,readCHN,threadName=...
|
local type=type
|
||||||
|
|
||||||
|
|
||||||
local SOCK=require"socket".tcp()
|
|
||||||
local JSON=require"Zframework.json"
|
|
||||||
|
|
||||||
do--Connect
|
|
||||||
local host=sendCHN:demand()
|
|
||||||
local port=sendCHN:demand()
|
|
||||||
local path=sendCHN:demand()
|
|
||||||
local body=sendCHN:demand()
|
|
||||||
|
|
||||||
SOCK:settimeout(2.6)
|
|
||||||
local res,err=SOCK:connect(host,port)
|
|
||||||
if err then readCHN:push(err)return end
|
|
||||||
|
|
||||||
--WebSocket handshake
|
|
||||||
if not body then body=""end
|
|
||||||
SOCK:send(
|
|
||||||
"GET "..path.." HTTP/1.1\r\n"..
|
|
||||||
"Host: "..host..":"..port.."\r\n"..
|
|
||||||
"Connection: Upgrade\r\n"..
|
|
||||||
"Upgrade: websocket\r\n"..
|
|
||||||
"Content-Type: application/json\r\n"..
|
|
||||||
"Content-Length: "..#body.."\r\n"..
|
|
||||||
"Sec-WebSocket-Version: 13\r\n"..
|
|
||||||
"Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n"..--secKey
|
|
||||||
body
|
|
||||||
)
|
|
||||||
|
|
||||||
--First line of HTTP
|
|
||||||
res,err=SOCK:receive("*l")
|
|
||||||
if not res then readCHN:push(err)return end
|
|
||||||
local code,ctLen
|
|
||||||
code=res:find(" ")
|
|
||||||
code=res:sub(code+1,code+3)
|
|
||||||
|
|
||||||
--Get body length from headers and remove headers
|
|
||||||
repeat
|
|
||||||
res,err=SOCK:receive("*l")
|
|
||||||
if not res then readCHN:push(err)return end
|
|
||||||
if not ctLen and res:find"length"then
|
|
||||||
ctLen=tonumber(res:match"%d+")
|
|
||||||
end
|
|
||||||
until res==""
|
|
||||||
|
|
||||||
--Result
|
|
||||||
if ctLen then
|
|
||||||
if code=="101"then
|
|
||||||
readCHN:push("success")
|
|
||||||
else
|
|
||||||
res,err=SOCK:receive(ctLen)
|
|
||||||
if not res then readCHN:push(err)return end
|
|
||||||
res=JSON.decode(res)
|
|
||||||
readCHN:push((code or"XXX")..":"..(res and res.reason or"Server Error"))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
SOCK:settimeout(0)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local byte=string.byte
|
|
||||||
local band,shl=bit.band,bit.lshift
|
|
||||||
|
|
||||||
local _send do
|
|
||||||
local char=string.char
|
|
||||||
local bor,bxor=bit.bor,bit.bxor
|
|
||||||
local shr=bit.rshift
|
|
||||||
|
|
||||||
local mask_key={1,14,5,14}
|
|
||||||
local mask_str=char(unpack(mask_key))
|
|
||||||
|
|
||||||
function _send(op,message)
|
|
||||||
]]..(debug:find"S"and""or"--")..[[print((">> %s[%d]:%s"):format(threadName,#message,message))
|
|
||||||
--Message type
|
|
||||||
SOCK:send(char(bor(0x80,op)))
|
|
||||||
|
|
||||||
if message then
|
|
||||||
--Length
|
|
||||||
local length=#message
|
|
||||||
if length>65535 then
|
|
||||||
SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff)))
|
|
||||||
elseif length>125 then
|
|
||||||
SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff)))
|
|
||||||
else
|
|
||||||
SOCK:send(char(bor(length,0x80)))
|
|
||||||
end
|
|
||||||
SOCK:send(mask_str)
|
|
||||||
local msgbyte={byte(message,1,length)}
|
|
||||||
for i=1,length do
|
|
||||||
msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1])
|
|
||||||
end
|
|
||||||
return SOCK:send(char(unpack(msgbyte)))
|
|
||||||
else
|
|
||||||
SOCK:send("\128"..mask_str)
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local res,err
|
|
||||||
local op,fin
|
|
||||||
local length
|
|
||||||
local lBuffer=""--Long multi-data buffer
|
|
||||||
local UFF--Un-finished-frame mode
|
|
||||||
local sBuffer=""--Short multi-frame buffer
|
|
||||||
while true do--Running
|
|
||||||
--Send
|
|
||||||
triggerCHN:demand()
|
|
||||||
while sendCHN:getCount()>=2 do
|
|
||||||
local op=sendCHN:pop()
|
|
||||||
local message=sendCHN:pop()
|
|
||||||
_send(op,message)
|
|
||||||
end
|
|
||||||
|
|
||||||
--Read
|
|
||||||
while true do
|
|
||||||
if not UFF then--UNF process
|
|
||||||
--Byte 0-1
|
|
||||||
res,err=SOCK:receive(2)
|
|
||||||
if err then break end
|
|
||||||
|
|
||||||
op=band(byte(res,1),0x0f)
|
|
||||||
fin=band(byte(res,1),0x80)==0x80
|
|
||||||
|
|
||||||
--Calculating data length
|
|
||||||
length=band(byte(res,2),0x7f)
|
|
||||||
if length==126 then
|
|
||||||
res=SOCK:receive(2)
|
|
||||||
length=shl(byte(res,1),8)+byte(res,2)
|
|
||||||
elseif length==127 then
|
|
||||||
local b={byte(SOCK:receive(8),1,8)}
|
|
||||||
length=shl(b[5],24)+shl(b[6],16)+shl(b[7],8)+b[8]
|
|
||||||
end
|
|
||||||
|
|
||||||
if length>0 then
|
|
||||||
--Receive data
|
|
||||||
local s,_,p=SOCK:receive(length)
|
|
||||||
if s then
|
|
||||||
res=s
|
|
||||||
elseif p then--UNF head
|
|
||||||
]]..(debug:find"R"and""or"--")..[[print(("<< %s[%d/%d]:%s"):format(threadName,#p,length,#p<50 and p or p:sub(1,50)))
|
|
||||||
UFF=true
|
|
||||||
sBuffer=sBuffer..p
|
|
||||||
length=length-#p
|
|
||||||
break
|
|
||||||
end
|
|
||||||
else
|
|
||||||
res=""
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local s,e,p=SOCK:receive(length)
|
|
||||||
if s then
|
|
||||||
]]..(debug:find"R"and""or"--")..[[print(("<< %s(%d):%s"):format(threadName,length,#s<50 and s or s:sub(1,50)))
|
|
||||||
sBuffer=sBuffer..s
|
|
||||||
length=length-#s
|
|
||||||
elseif p then
|
|
||||||
]]..(debug:find"R"and""or"--")..[[print(("<< %s(%d):%s"):format(threadName,length,#p<50 and p or p:sub(1,50)))
|
|
||||||
sBuffer=sBuffer..p
|
|
||||||
length=length-#p
|
|
||||||
end
|
|
||||||
if length==0 then
|
|
||||||
res,sBuffer=sBuffer,""
|
|
||||||
UFF=false
|
|
||||||
else
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
]]..(debug:find"R"and""or"--")..[[print(("<< %s[(%d)]:%s"):format(threadName,#res,#res<800 and res or res:sub(1,150).."\n...\n"..res:sub(-150)))
|
|
||||||
|
|
||||||
--React
|
|
||||||
if op==8 then--8=close
|
|
||||||
readCHN:push(op)
|
|
||||||
SOCK:close()
|
|
||||||
if type(res)=="string"then
|
|
||||||
res=JSON.decode(res)
|
|
||||||
readCHN:push(res and res.reason or"WS Error")
|
|
||||||
else
|
|
||||||
readCHN:push("WS Error")
|
|
||||||
end
|
|
||||||
elseif op==0 then--0=continue
|
|
||||||
lBuffer=lBuffer..res
|
|
||||||
if fin then
|
|
||||||
]]..(debug:find"M"and""or"--")..[[print("FIN=1 (c")
|
|
||||||
readCHN:push(lBuffer)
|
|
||||||
lBuffer=""
|
|
||||||
else
|
|
||||||
]]..(debug:find"M"and""or"--")..[[print("FIN=0 (c")
|
|
||||||
end
|
|
||||||
else
|
|
||||||
readCHN:push(op)
|
|
||||||
if fin then
|
|
||||||
]]..(debug:find"M"and""or"--")..[[print("OP: "..op.."\tFIN=1")
|
|
||||||
readCHN:push(res)
|
|
||||||
else
|
|
||||||
]]..(debug:find"M"and""or"--")..[[print("OP: "..op.."\tFIN=0")
|
|
||||||
sBuffer=res
|
|
||||||
]]..(debug:find"M"and""or"--")..[[print("START pack: "..res)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
|
|
||||||
local timer=love.timer.getTime
|
local timer=love.timer.getTime
|
||||||
|
local CHN=love.thread.newChannel()
|
||||||
|
local CHN_getCount,CHN_push,CHN_pop=CHN.getCount,CHN.push,CHN.pop
|
||||||
|
local TRD=love.thread.newThread("\n")
|
||||||
|
local TRD_isRunning=TRD.isRunning
|
||||||
|
|
||||||
local WS={}
|
local WS={}
|
||||||
local wsList=setmetatable({},{
|
local wsList=setmetatable({},{
|
||||||
__index=function(l,k)
|
__index=function(l,k)
|
||||||
local ws={
|
local ws={
|
||||||
real=false,
|
real=false,
|
||||||
status="dead",
|
status='dead',
|
||||||
lastPongTime=timer(),
|
lastPongTime=timer(),
|
||||||
sendTimer=0,
|
sendTimer=0,
|
||||||
alertTimer=0,
|
alertTimer=0,
|
||||||
@@ -234,32 +32,45 @@ local wsList=setmetatable({},{
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
function WS.connect(name,subPath,body)
|
function WS.switchHost(_1,_2,_3)
|
||||||
|
for k in next,wsList do
|
||||||
|
WS.close(k)
|
||||||
|
end
|
||||||
|
host=_1
|
||||||
|
port=_2 or port
|
||||||
|
path=_3 or path
|
||||||
|
end
|
||||||
|
|
||||||
|
function WS.connect(name,subPath,body,timeout)
|
||||||
|
if wsList[name]and wsList[name].thread then
|
||||||
|
wsList[name].thread:release()
|
||||||
|
end
|
||||||
local ws={
|
local ws={
|
||||||
real=true,
|
real=true,
|
||||||
thread=love.thread.newThread(wsThread),
|
thread=love.thread.newThread('Zframework/websocket_thread.lua'),
|
||||||
triggerCHN=love.thread.newChannel(),
|
triggerCHN=love.thread.newChannel(),
|
||||||
sendCHN=love.thread.newChannel(),
|
sendCHN=love.thread.newChannel(),
|
||||||
readCHN=love.thread.newChannel(),
|
readCHN=love.thread.newChannel(),
|
||||||
lastPingTime=0,
|
lastPingTime=0,
|
||||||
lastPongTime=timer(),
|
lastPongTime=timer(),
|
||||||
pingInterval=26,
|
pingInterval=6,
|
||||||
status="connecting",--connecting, running, dead
|
status='connecting',--'connecting', 'running', 'dead'
|
||||||
sendTimer=0,
|
sendTimer=0,
|
||||||
alertTimer=0,
|
alertTimer=0,
|
||||||
pongTimer=0,
|
pongTimer=0,
|
||||||
}
|
}
|
||||||
wsList[name]=ws
|
wsList[name]=ws
|
||||||
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN,name)
|
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN)
|
||||||
ws.sendCHN:push(host)
|
CHN_push(ws.sendCHN,host)
|
||||||
ws.sendCHN:push(port)
|
CHN_push(ws.sendCHN,port)
|
||||||
ws.sendCHN:push(path..subPath)
|
CHN_push(ws.sendCHN,path..subPath)
|
||||||
ws.sendCHN:push(body or"")
|
CHN_push(ws.sendCHN,body or"")
|
||||||
|
CHN_push(ws.sendCHN,timeout or 2.6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.status(name)
|
function WS.status(name)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
return ws.status or"dead"
|
return ws.status or'dead'
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.getTimers(name)
|
function WS.getTimers(name)
|
||||||
@@ -269,12 +80,12 @@ end
|
|||||||
|
|
||||||
function WS.setPingInterval(name,time)
|
function WS.setPingInterval(name,time)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
ws.pingInterval=math.max(time or 1,2.6)
|
ws.pingInterval=math.max(time or 2.6,2.6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.alert(name)
|
function WS.alert(name)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
ws.alertTimer=2
|
ws.alertTimer=2.6
|
||||||
end
|
end
|
||||||
|
|
||||||
local OPcode={
|
local OPcode={
|
||||||
@@ -286,29 +97,37 @@ local OPcode={
|
|||||||
pong=10,
|
pong=10,
|
||||||
}
|
}
|
||||||
local OPname={
|
local OPname={
|
||||||
[0]="continue",
|
[0]='continue',
|
||||||
[1]="text",
|
[1]='text',
|
||||||
[2]="binary",
|
[2]='binary',
|
||||||
[8]="close",
|
[8]='close',
|
||||||
[9]="ping",
|
[9]='ping',
|
||||||
[10]="pong",
|
[10]='pong',
|
||||||
}
|
}
|
||||||
function WS.send(name,message,op)
|
function WS.send(name,message,op)
|
||||||
|
if type(message)=='string'then
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
if ws.real then
|
if ws.real and ws.status=='running'then
|
||||||
ws.sendCHN:push(op and OPcode[op]or 2)--2=binary
|
CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary
|
||||||
ws.sendCHN:push(message)
|
CHN_push(ws.sendCHN,message)
|
||||||
ws.lastPingTime=timer()
|
ws.lastPingTime=timer()
|
||||||
ws.sendTimer=1
|
ws.sendTimer=1
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
MES.new('error',"Attempt to send non-string value!")
|
||||||
|
MES.traceback()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.read(name)
|
function WS.read(name)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
if ws.real and ws.readCHN:getCount()>=2 then
|
if ws.real and ws.status~='connecting'and CHN_getCount(ws.readCHN)>=2 then
|
||||||
local op=ws.readCHN:pop()
|
local op,message=CHN_pop(ws.readCHN),CHN_pop(ws.readCHN)
|
||||||
local message=ws.readCHN:pop()
|
if op==8 then--8=close
|
||||||
if op==8 then ws.status="dead"end--8=close
|
ws.status='dead'
|
||||||
|
elseif op==9 then--9=ping
|
||||||
|
WS.send(name,message or"",'pong')
|
||||||
|
end
|
||||||
ws.lastPongTime=timer()
|
ws.lastPongTime=timer()
|
||||||
ws.pongTimer=1
|
ws.pongTimer=1
|
||||||
return message,OPname[op]or op
|
return message,OPname[op]or op
|
||||||
@@ -318,43 +137,53 @@ end
|
|||||||
function WS.close(name)
|
function WS.close(name)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
if ws.real then
|
if ws.real then
|
||||||
ws.sendCHN:push(8)--close
|
CHN_push(ws.sendCHN,8)--close
|
||||||
ws.sendCHN:push("")
|
CHN_push(ws.sendCHN,"")
|
||||||
ws.status="dead"
|
ws.status='dead'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.update(dt)
|
function WS.update(dt)
|
||||||
local time=timer()
|
local time=timer()
|
||||||
for name,ws in next,wsList do
|
for name,ws in next,wsList do
|
||||||
if ws.real then
|
if ws.real and ws.status~='dead'then
|
||||||
ws.triggerCHN:push(0)
|
if TRD_isRunning(ws.thread)then
|
||||||
if ws.status=="connecting"then
|
if CHN_getCount(ws.triggerCHN)==0 then
|
||||||
local mes=ws.readCHN:pop()
|
CHN_push(ws.triggerCHN,0)
|
||||||
|
end
|
||||||
|
if ws.status=='connecting'then
|
||||||
|
local mes=CHN_pop(ws.readCHN)
|
||||||
if mes then
|
if mes then
|
||||||
if mes=="success"then
|
if mes=='success'then
|
||||||
ws.status="running"
|
ws.status='running'
|
||||||
ws.lastPingTime=time
|
ws.lastPingTime=time
|
||||||
ws.lastPongTime=time
|
ws.lastPongTime=time
|
||||||
ws.pongTimer=1
|
ws.pongTimer=1
|
||||||
else
|
else
|
||||||
ws.status="dead"
|
ws.status='dead'
|
||||||
LOG.print(text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes),"warn")
|
MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif ws.status=="running"then
|
elseif ws.status=='running'then
|
||||||
if time-ws.lastPingTime>ws.pingInterval then
|
if time-ws.lastPingTime>ws.pingInterval then
|
||||||
ws.sendCHN:push(9)
|
WS.send(name,"",'pong')
|
||||||
ws.sendCHN:push("")--ping
|
|
||||||
ws.lastPingTime=time
|
|
||||||
end
|
end
|
||||||
if time-ws.lastPongTime>10+3*ws.pingInterval then
|
if time-ws.lastPongTime>6+2*ws.pingInterval then
|
||||||
WS.close(name)
|
WS.close(name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end
|
if ws.sendTimer>0 then ws.sendTimer=ws.sendTimer-dt end
|
||||||
if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end
|
if ws.pongTimer>0 then ws.pongTimer=ws.pongTimer-dt end
|
||||||
if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end
|
if ws.alertTimer>0 then ws.alertTimer=ws.alertTimer-dt end
|
||||||
|
else
|
||||||
|
ws.status='dead'
|
||||||
|
local err=ws.thread:getError()
|
||||||
|
if err then
|
||||||
|
err=err:sub((err:find(":",(err:find(":")or 0)+1)or 0)+1,(err:find("\n")or 0)-1)
|
||||||
|
MES.new('warn',text.wsClose..err)
|
||||||
|
WS.alert(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
191
Zframework/websocket_thread.lua
Normal file
191
Zframework/websocket_thread.lua
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
local triggerCHN,sendCHN,readCHN=...
|
||||||
|
|
||||||
|
local CHN_demand,CHN_getCount=triggerCHN.demand,triggerCHN.getCount
|
||||||
|
local CHN_push,CHN_pop=triggerCHN.push,triggerCHN.pop
|
||||||
|
|
||||||
|
local SOCK=require'socket'.tcp()
|
||||||
|
local JSON=require'Zframework.json'
|
||||||
|
|
||||||
|
do--Connect
|
||||||
|
local host=CHN_demand(sendCHN)
|
||||||
|
local port=CHN_demand(sendCHN)
|
||||||
|
local path=CHN_demand(sendCHN)
|
||||||
|
local body=CHN_demand(sendCHN)
|
||||||
|
local timeout=CHN_demand(sendCHN)
|
||||||
|
|
||||||
|
SOCK:settimeout(timeout)
|
||||||
|
local res,err=SOCK:connect(host,port)
|
||||||
|
assert(res,err)
|
||||||
|
|
||||||
|
--WebSocket handshake
|
||||||
|
if not body then body=''end
|
||||||
|
SOCK:send(
|
||||||
|
'GET '..path..' HTTP/1.1\r\n'..
|
||||||
|
'Host: '..host..':'..port..'\r\n'..
|
||||||
|
'Connection: Upgrade\r\n'..
|
||||||
|
'Upgrade: websocket\r\n'..
|
||||||
|
'Content-Type: application/json\r\n'..
|
||||||
|
'Content-Length: '..#body..'\r\n'..
|
||||||
|
'Sec-WebSocket-Version: 13\r\n'..
|
||||||
|
'Sec-WebSocket-Key: osT3F7mvlojIvf3/8uIsJQ==\r\n\r\n'..--secKey
|
||||||
|
body
|
||||||
|
)
|
||||||
|
|
||||||
|
--First line of HTTP
|
||||||
|
res,err=SOCK:receive('*l')
|
||||||
|
assert(res,err)
|
||||||
|
local code,ctLen
|
||||||
|
code=res:find(' ')
|
||||||
|
code=res:sub(code+1,code+3)
|
||||||
|
|
||||||
|
--Get body length from headers and remove headers
|
||||||
|
repeat
|
||||||
|
res,err=SOCK:receive('*l')
|
||||||
|
assert(res,err)
|
||||||
|
if not ctLen and res:find('length')then
|
||||||
|
ctLen=tonumber(res:match('%d+'))
|
||||||
|
end
|
||||||
|
until res==''
|
||||||
|
|
||||||
|
--Result
|
||||||
|
if ctLen then
|
||||||
|
if code=='101'then
|
||||||
|
CHN_push(readCHN,'success')
|
||||||
|
else
|
||||||
|
res,err=SOCK:receive(ctLen)
|
||||||
|
res=JSON.decode(assert(res,err))
|
||||||
|
error((code or"XXX")..":"..(res and res.reason or"Server Error"))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
SOCK:settimeout(0)
|
||||||
|
end
|
||||||
|
|
||||||
|
local YIELD=coroutine.yield
|
||||||
|
local byte,char=string.byte,string.char
|
||||||
|
local band,bor,bxor=bit.band,bit.bor,bit.bxor
|
||||||
|
local shl,shr=bit.lshift,bit.rshift
|
||||||
|
|
||||||
|
local mask_key={1,14,5,14}
|
||||||
|
local mask_str=char(unpack(mask_key))
|
||||||
|
local function _send(op,message)
|
||||||
|
--Message type
|
||||||
|
SOCK:send(char(bor(op,0x80)))
|
||||||
|
|
||||||
|
if message then
|
||||||
|
--Length
|
||||||
|
local length=#message
|
||||||
|
if length>65535 then
|
||||||
|
SOCK:send(char(bor(127,0x80),0,0,0,0,band(shr(length,24),0xff),band(shr(length,16),0xff),band(shr(length,8),0xff),band(length,0xff)))
|
||||||
|
elseif length>125 then
|
||||||
|
SOCK:send(char(bor(126,0x80),band(shr(length,8),0xff),band(length,0xff)))
|
||||||
|
else
|
||||||
|
SOCK:send(char(bor(length,0x80)))
|
||||||
|
end
|
||||||
|
local msgbyte={byte(message,1,length)}
|
||||||
|
for i=1,length do
|
||||||
|
msgbyte[i]=bxor(msgbyte[i],mask_key[(i-1)%4+1])
|
||||||
|
end
|
||||||
|
return SOCK:send(mask_str..char(unpack(msgbyte)))
|
||||||
|
else
|
||||||
|
SOCK:send('\128'..mask_str)
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local sendThread=coroutine.wrap(function()
|
||||||
|
while true do
|
||||||
|
while CHN_getCount(sendCHN)>=2 do
|
||||||
|
_send(CHN_pop(sendCHN),CHN_pop(sendCHN))
|
||||||
|
end
|
||||||
|
YIELD()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
local function _receive(sock,len)
|
||||||
|
local buffer=""
|
||||||
|
while true do
|
||||||
|
local r,e,p=sock:receive(len)
|
||||||
|
if r then
|
||||||
|
buffer=buffer..r
|
||||||
|
len=len-#r
|
||||||
|
elseif p then
|
||||||
|
buffer=buffer..p
|
||||||
|
len=len-#p
|
||||||
|
elseif e then
|
||||||
|
return nil,e
|
||||||
|
end
|
||||||
|
if len==0 then
|
||||||
|
return buffer
|
||||||
|
end
|
||||||
|
YIELD()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local readThread=coroutine.wrap(function()
|
||||||
|
local res,err
|
||||||
|
local op,fin
|
||||||
|
local lBuffer=""--Long multi-pack buffer
|
||||||
|
while true do
|
||||||
|
--Byte 0-1
|
||||||
|
res,err=_receive(SOCK,2)
|
||||||
|
assert(res,err)
|
||||||
|
|
||||||
|
op=band(byte(res,1),0x0f)
|
||||||
|
fin=band(byte(res,1),0x80)==0x80
|
||||||
|
|
||||||
|
--Calculating data length
|
||||||
|
local length=band(byte(res,2),0x7f)
|
||||||
|
if length==126 then
|
||||||
|
res,err=_receive(SOCK,2)
|
||||||
|
assert(res,err)
|
||||||
|
length=shl(byte(res,1),8)+byte(res,2)
|
||||||
|
elseif length==127 then
|
||||||
|
local lenData
|
||||||
|
lenData,err=_receive(SOCK,8)
|
||||||
|
assert(res,err)
|
||||||
|
local _,_,_,_,_5,_6,_7,_8=byte(lenData,1,8)
|
||||||
|
length=shl(_5,24)+shl(_6,16)+shl(_7,8)+_8
|
||||||
|
end
|
||||||
|
res,err=_receive(SOCK,length)
|
||||||
|
assert(res,err)
|
||||||
|
|
||||||
|
--React
|
||||||
|
if op==8 then--8=close
|
||||||
|
CHN_push(readCHN,8)--close
|
||||||
|
if type(res)=='string'then
|
||||||
|
CHN_push(readCHN,res:sub(3))--[Warning] 2 bytes close code at start so :sub(3)
|
||||||
|
else
|
||||||
|
CHN_push(readCHN,"WS closed")
|
||||||
|
end
|
||||||
|
return
|
||||||
|
elseif op==0 then--0=continue
|
||||||
|
lBuffer=lBuffer..res
|
||||||
|
if fin then
|
||||||
|
CHN_push(readCHN,lBuffer)
|
||||||
|
lBuffer=""
|
||||||
|
end
|
||||||
|
else
|
||||||
|
CHN_push(readCHN,op)
|
||||||
|
if fin then
|
||||||
|
CHN_push(readCHN,res)
|
||||||
|
lBuffer=""
|
||||||
|
else
|
||||||
|
lBuffer=res
|
||||||
|
end
|
||||||
|
end
|
||||||
|
YIELD()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
local success,err
|
||||||
|
|
||||||
|
while true do--Running
|
||||||
|
CHN_demand(triggerCHN)
|
||||||
|
success,err=pcall(sendThread)
|
||||||
|
if not success or err then break end
|
||||||
|
success,err=pcall(readThread)
|
||||||
|
if not success or err then break end
|
||||||
|
end
|
||||||
|
|
||||||
|
SOCK:close()
|
||||||
|
CHN_push(readCHN,8)--close
|
||||||
|
CHN_push(readCHN,err or"Disconnected")
|
||||||
|
error()
|
||||||
@@ -1,18 +1,19 @@
|
|||||||
local floatWheel=0
|
local love=love
|
||||||
return function(y)
|
local max,min=math.max,math.min
|
||||||
|
local trigDist=0
|
||||||
|
return function(y,key1,key2)
|
||||||
if y>0 then
|
if y>0 then
|
||||||
if floatWheel<0 then floatWheel=0 end
|
trigDist=max(trigDist,0)+y^1.2
|
||||||
floatWheel=floatWheel+y^1.2
|
|
||||||
elseif y<0 then
|
elseif y<0 then
|
||||||
if floatWheel>0 then floatWheel=0 end
|
if trigDist>0 then trigDist=0 end
|
||||||
floatWheel=floatWheel-(-y)^1.2
|
trigDist=min(trigDist,0)-(-y)^1.2
|
||||||
end
|
end
|
||||||
while floatWheel>=1 do
|
while trigDist>=1 do
|
||||||
love.keypressed("up")
|
love.keypressed(key1 or'up')
|
||||||
floatWheel=floatWheel-1
|
trigDist=trigDist-1
|
||||||
end
|
end
|
||||||
while floatWheel<=-1 do
|
while trigDist<=-1 do
|
||||||
love.keypressed("down")
|
love.keypressed(key2 or'down')
|
||||||
floatWheel=floatWheel+1
|
trigDist=trigDist+1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
File diff suppressed because it is too large
Load Diff
13
conf.lua
13
conf.lua
@@ -1,10 +1,5 @@
|
|||||||
VERSION={
|
|
||||||
code=1405,
|
|
||||||
string="Alpha V0.14.5",
|
|
||||||
name="晨 Morn",
|
|
||||||
}
|
|
||||||
function love.conf(t)
|
function love.conf(t)
|
||||||
t.identity="Techmino"--Saving folder
|
t.identity='Techmino'--Saving folder
|
||||||
t.version="11.1"
|
t.version="11.1"
|
||||||
t.gammacorrect=false
|
t.gammacorrect=false
|
||||||
t.appendidentity=true--Search files in source then in save directory
|
t.appendidentity=true--Search files in source then in save directory
|
||||||
@@ -15,16 +10,14 @@ function love.conf(t)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino "..VERSION.string
|
W.title="Techmino "..require"version".string
|
||||||
W.icon="media/image/icon.png"
|
|
||||||
W.width,W.height=1280,720
|
W.width,W.height=1280,720
|
||||||
W.minwidth,W.minheight=640,360
|
W.minwidth,W.minheight=640,360
|
||||||
W.borderless=false
|
W.borderless=false
|
||||||
W.resizable=true
|
W.resizable=true
|
||||||
W.fullscreentype="desktop"--"exclusive"
|
|
||||||
W.fullscreen=false
|
W.fullscreen=false
|
||||||
W.vsync=0--Unlimited FPS
|
W.vsync=0--Unlimited FPS
|
||||||
W.msaa=false--Num of samples to use with multi-sampled antialiasing
|
W.msaa=0--Multi-sampled antialiasing
|
||||||
W.depth=0--Bits/samp of depth buffer
|
W.depth=0--Bits/samp of depth buffer
|
||||||
W.stencil=1--Bits/samp of stencil buffer
|
W.stencil=1--Bits/samp of stencil buffer
|
||||||
W.display=1--Monitor ID
|
W.display=1--Monitor ID
|
||||||
|
|||||||
@@ -1,145 +0,0 @@
|
|||||||
模式文件应当是一个合(语)法的lua程序文件,其必须返回一个table,里面的内容包括:
|
|
||||||
color:
|
|
||||||
必选
|
|
||||||
模式的颜色,用于点击地图图标后显示的提示文本
|
|
||||||
env:
|
|
||||||
必选
|
|
||||||
模式环境变量,决定了关卡的各项属性
|
|
||||||
table值:
|
|
||||||
drop:下落延迟(帧,支持自然数和2的整数次幂)
|
|
||||||
lock:锁定延迟(帧)
|
|
||||||
wait:出块延迟(帧)
|
|
||||||
fall:下落延迟(帧)
|
|
||||||
bone:是否开启骨块模式
|
|
||||||
nextCount:显示next个数
|
|
||||||
nextStartPos:next从第几个开始显示
|
|
||||||
holdCount:hold个数
|
|
||||||
infHold:是否能无限hold
|
|
||||||
ospin=是否能O-spin
|
|
||||||
RS:旋转系统名
|
|
||||||
|
|
||||||
das:DAS
|
|
||||||
arr:ARR
|
|
||||||
sddas:软降DAS
|
|
||||||
sdarr:软降ARR
|
|
||||||
mindas:允许的最小DAS
|
|
||||||
minarr:允许的最小ARR
|
|
||||||
minsdarr:允许的最小软降ARR
|
|
||||||
ihs:提前Hold
|
|
||||||
irs:提前旋转
|
|
||||||
ims:提前移动
|
|
||||||
|
|
||||||
skin:方块颜色,包含25个整数(1~16)的table
|
|
||||||
face:方块朝向,包含25个整数(0~3)的table
|
|
||||||
|
|
||||||
block:是否显示方块
|
|
||||||
ghost:影子透明度(0~1)
|
|
||||||
center:旋转中心透明度(0~1)
|
|
||||||
smooth:是否平滑下落
|
|
||||||
grid:是否显示网格
|
|
||||||
bagLine:是否显示包分界线
|
|
||||||
lockFX:特效等级(0,5)
|
|
||||||
dropFX:特效等级(0,5)
|
|
||||||
moveFX:特效等级(0,5)
|
|
||||||
clearFX:特效等级(0,5)
|
|
||||||
splashFX:特效等级(0,5)
|
|
||||||
shakeFX:特效等级(0,5)
|
|
||||||
atkFX:特效等级(0,5)
|
|
||||||
|
|
||||||
text:是否显示消行文本
|
|
||||||
score:是否显示落块分数
|
|
||||||
warn:是否开启死亡预警
|
|
||||||
highCam:是否开启超屏视野
|
|
||||||
nextPos:是否开启生成预览
|
|
||||||
|
|
||||||
sequence=序列模式,是放一块后对next序列的刷新函数,可以使用默认的几个函数用字符串表示。也可以自己写一个,注意:使用协程技术
|
|
||||||
seqData:序列模式使用的"包"数据(本质是生成序列用的数据,会作为参数传进序列生成函数,不一定是包)
|
|
||||||
mission:包含任务的table,说明暂时略
|
|
||||||
|
|
||||||
life:生命数
|
|
||||||
pushSpeed:上涨速度
|
|
||||||
noTele:是否禁止10个高级按键
|
|
||||||
visible:方块可见性,填写固定的几个字符串
|
|
||||||
freshLimit:锁延刷新次数限制
|
|
||||||
easyFresh:是否使用简单锁延刷新规则
|
|
||||||
|
|
||||||
fkey1:按下功能键1后执行的函数
|
|
||||||
fkey2:按下功能键2后执行的函数
|
|
||||||
keyCancel:包含禁止使用的按键的id们的table,例如{1,2}就是禁止左右移
|
|
||||||
fineKill:是否开启非极简即死
|
|
||||||
b2bKill:是否开启断b2b即死
|
|
||||||
missionKill:是否开启强制任务
|
|
||||||
dropPiece:放一块后要执行的函数,输入玩家对象
|
|
||||||
|
|
||||||
bg:背景,只能填写内置背景的名字
|
|
||||||
bgm:背景音乐名(或者列表随机,例如{"race","push"}),只能用内置音乐库的音乐名
|
|
||||||
noMod:是否禁用mod
|
|
||||||
load:
|
|
||||||
必选
|
|
||||||
模式初始化函数,一般创建一个玩家即可
|
|
||||||
无输入
|
|
||||||
无输出
|
|
||||||
mesDisp:
|
|
||||||
必选
|
|
||||||
模式显示信息,是一个绘图函数,坐标系原点是玩家对象最左上角
|
|
||||||
输入玩家对象
|
|
||||||
无输出
|
|
||||||
|
|
||||||
score:
|
|
||||||
可选(不填就没有分数保存和计算)
|
|
||||||
一局打完后要存储的数据
|
|
||||||
输入玩家对象
|
|
||||||
输出游戏结束瞬间返回一个包含直接决定该模式成绩的数据table(会被强制加上date标签)
|
|
||||||
|
|
||||||
scoreDisp:
|
|
||||||
可选(模式不出现在地图上的时候不用写)
|
|
||||||
是把score()存起来的table转换为字符串显示出来的函数
|
|
||||||
输入一个成绩table
|
|
||||||
输出一个字符串
|
|
||||||
|
|
||||||
comp:
|
|
||||||
可选(没有score函数的时候不用写)
|
|
||||||
是成绩table之间对比并排序的规则
|
|
||||||
输入两个成绩table
|
|
||||||
输出[第一个是不是排在第二个前面]的布尔值(可以类比"小于"运算)
|
|
||||||
|
|
||||||
getRank:
|
|
||||||
可选,模式评级函数
|
|
||||||
是用于评价玩家表现的函数
|
|
||||||
输入玩家对象
|
|
||||||
输出0~5,0表示除了记录到排行榜外什么都不做;1/2/3/4/5表示D/C/B/A/S级,能解锁连接的模式,还会让模式图标在地图上显示不同的颜色
|
|
||||||
|
|
||||||
以下是40行的模式文件内容:
|
|
||||||
//sprint_40l.lua
|
|
||||||
return{--返回一个table,你也可以在之前定义一些常量或者函数什么的
|
|
||||||
color=COLOR.green,--颜色
|
|
||||||
env={--模式环境变量
|
|
||||||
drop=60,lock=60,
|
|
||||||
dropPiece=function(P)if P.stat.row>=40 then P:win("finish")end end,
|
|
||||||
bg="bg2",bgm="race",
|
|
||||||
},
|
|
||||||
load=function()--生成玩家
|
|
||||||
PLY.newPlayer(1)--1是玩家编号,默认用户控制1号玩家
|
|
||||||
end,
|
|
||||||
mesDisp=function(P)--40行模式需要显示的信息
|
|
||||||
setFont(55)
|
|
||||||
local r=40-P.stat.row
|
|
||||||
if r<0 then r=0 end
|
|
||||||
mStr(r,69,265)--把计算出来的剩余行数r显示出来
|
|
||||||
PLY.draw.drawTargetLine(P,r)--使用自带的境界高度线绘制函数
|
|
||||||
end,
|
|
||||||
score=function(P)return{P.stat.time,P.stat.piece}end,--游戏结束时需要保存的本局关键信息
|
|
||||||
scoreDisp=function(D)return STRING.time(D[1]).." "..D[2].." Pieces"end,--把score返回的数据显示出来的方法
|
|
||||||
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,--按照时间排序,时间一样就看块数
|
|
||||||
getRank=function(P)--计算评级
|
|
||||||
if P.stat.row<40 then return end--你总得打完40行对吧,否则直接return空掉,成绩都不记录
|
|
||||||
local T=P.stat.time
|
|
||||||
return
|
|
||||||
T<=26 and 5 or--时间小于等于26秒就是S级要求
|
|
||||||
T<=32.6 and 4 or--A级要求
|
|
||||||
T<=52.6 and 3 or--B级要求
|
|
||||||
T<=92.9 and 2 or--C级要求
|
|
||||||
T<=183 and 1 or--D级要求,解锁别的模式的最低标准
|
|
||||||
0--记录成绩的最低标准
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
以下是Techmino使用/将要使用/未来也许会使用的语音文件, 每一个都可以录任意多条
|
|
||||||
有多个文件的语音在播放时会随机挑选一个播放, 所以组合性的语音大概率不能随意发挥, 不然和其他组合起来可能就会出现奇怪的现象
|
|
||||||
|
|
||||||
例如多个mini语音文件名: mini_1.ogg, mini_2.ogg, ......
|
|
||||||
如果只有一个, "_1"可以省略, 但是多个文件的数字不能跳跃
|
|
||||||
|
|
||||||
要投稿语音包的话如果没有经过后期处理, 建议使用wav格式;
|
|
||||||
如果打算自己导入游戏的话需要降噪+裁剪+调整音量后再转为ogg格式 (不支持别的, 因为ogg音质好体积小)
|
|
||||||
|
|
||||||
目前游戏内正在使用, 必须录制的音频文件名们:
|
|
||||||
single, double, triple, techrash
|
|
||||||
以上直接念就可以,用于普通直接消行
|
|
||||||
|
|
||||||
mini, b2b, b3b
|
|
||||||
以上直接念就可以,用于组合进spin消除
|
|
||||||
|
|
||||||
zspin, sspin, lspin, jspin, tspin, ospin, ispin
|
|
||||||
以上的每一个都要衍生出数条语音,例如zpin的是这五条:
|
|
||||||
z-spin (用于不消行)
|
|
||||||
z-spin single
|
|
||||||
z-spin double
|
|
||||||
z-spin triple
|
|
||||||
z-spin techrash
|
|
||||||
(z-spin pentacrash)
|
|
||||||
(z-spin hexacrash)
|
|
||||||
对于 S L J T O I 每一个都是这样, 五种语音, 加括号的是消5和消6, 一般不用所以可以不录
|
|
||||||
|
|
||||||
另:对于P, Q, F, E, U, V, W, X, R, Y, N, H
|
|
||||||
这些方块也可以有上面那些语音,但由于仅在五连块使用还会显著增加语音包体积, 所以不录也可以
|
|
||||||
|
|
||||||
perfect_clear, half_clear
|
|
||||||
这俩可以直接念也可以略做修改
|
|
||||||
|
|
||||||
win, lose, bye
|
|
||||||
这几个可以自由发挥
|
|
||||||
|
|
||||||
test, happy, doubt, sad, egg
|
|
||||||
第一个是拉语音条预览音量播放的, 剩下的是彩蛋音效(不录也行, 反正一般不会触发)
|
|
||||||
|
|
||||||
welcome_voc
|
|
||||||
进入游戏播放的欢迎语音(类似osu)
|
|
||||||
|
|
||||||
目前没有用到但是将要加入的:
|
|
||||||
split
|
|
||||||
|
|
||||||
未来可能加入的:
|
|
||||||
暂无
|
|
||||||
51
legals.md
Normal file
51
legals.md
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
TECHMINO © 2019-2021 26F Studio. Some rights reserved.
|
||||||
|
|
||||||
|
TECHMINO and "26F Studio" are trademarks of 26F Studio. The TECHMINO game and source code are under a GNU Lesser General Public License Version 3.
|
||||||
|
|
||||||
|
|
||||||
|
"Tetris" is the registered trademark of The Tetris Holding, LLC, licensed to The Tetris Company, Inc. TECHMINO is not a fan game of Tetris. TECHMINO and 26F Studio are not affiliated with Tetris Holding, LLC or The Tetris Company, Inc. in any way.
|
||||||
|
|
||||||
|
|
||||||
|
Powered by LÖVE, © 2006-2021 LÖVE Development Team.
|
||||||
|
|
||||||
|
Lua is free software distributed under the terms of the MIT license. Copyright © 1994-2021 by Lua.org, PUC-Rio.
|
||||||
|
|
||||||
|
SIMPLE LOVE LIGHTS is under a MIT License. Created by Dylan Hunn.
|
||||||
|
|
||||||
|
json.lua is copyrighted by rxi. © 2021 rxi.
|
||||||
|
|
||||||
|
IBM Plex is copyrighted by the International Business Machines Corporation. IBM and IBM Plex are trademarks of IBM Corp, registered in many jurisdictions worldwide. IBM Plex is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
|
||||||
|
|
||||||
|
Source Han Sans is copyrighted by Adobe Inc. Source Han Sans and Adobe are registered trademarks of Adobe Inc. in United States and other countries or regions. Source Han Sans is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
|
||||||
|
|
||||||
|
JetBrains Mono is copyrighted by the JetBrains Mono Project authors. JetBrains Mono is a trademark of JetBrains s.r.o. JetBrains Mono is licensed under the SIL Open Font License, Version 1.1.
|
||||||
|
|
||||||
|
|
||||||
|
"PlayStation", "PS", "PlayStation Family Mark", "PS logo", "DualSense" and "Play Has No Limits" are registered trademarks or trademarks of Sony Interactive Entertainment Inc. "SONY" is a registered trademark of Sony Corporation. © 2021 Sony Interactive Entertainment LLC.
|
||||||
|
|
||||||
|
|
||||||
|
"Windows", the Windows logo, "Xbox", Xbox logo, and "Microsoft" are registered trademarks of Microsoft Corporation in the United States of America and other countries or regions.
|
||||||
|
|
||||||
|
|
||||||
|
The Apple logo, "Apple Inc.," iOS, iPadOS, macOS, iPhone, and Mac are registered trademarks of Apple Inc. in the United States of America and other countries or regions.
|
||||||
|
|
||||||
|
|
||||||
|
"EA" and "Electronic Arts" are registered trademarks of Electronic Arts Inc. © 2021 Electronic Arts Inc.
|
||||||
|
|
||||||
|
SEGA and the SEGA logo are registered trademarks of Sega Corporation. © 2021 Sega Corporation.
|
||||||
|
|
||||||
|
Oculus Quest is a registered trademark of Facebook Technologies, LLC. © Meta Platforms, Inc.
|
||||||
|
|
||||||
|
"Nintendo" is a registered trademarks of Nintendo Co., Ltd. © 2021 Nintendo Co., Ltd.
|
||||||
|
|
||||||
|
N3TWORK is a registered trademark of N3TWORK Inc. © 2021 N3TWORK Inc.
|
||||||
|
|
||||||
|
GoldWave is a registered trademark of GoldWave, Inc.
|
||||||
|
|
||||||
|
Linux is a registered trademark of Linus Torvalds.
|
||||||
|
|
||||||
|
Touhou Project © Team Shanghai Alice 2002-2021.
|
||||||
|
|
||||||
|
All other trademarks, logos, and copyrights are the properties of their respective owners.
|
||||||
165
license.txt
Normal file
165
license.txt
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates
|
||||||
|
the terms and conditions of version 3 of the GNU General Public
|
||||||
|
License, supplemented by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||||
|
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||||
|
General Public License.
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License,
|
||||||
|
other than an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided
|
||||||
|
by the Library, but which is not otherwise based on the Library.
|
||||||
|
Defining a subclass of a class defined by the Library is deemed a mode
|
||||||
|
of using an interface provided by the Library.
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an
|
||||||
|
Application with the Library. The particular version of the Library
|
||||||
|
with which the Combined Work was made is also called the "Linked
|
||||||
|
Version".
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the
|
||||||
|
Corresponding Source for the Combined Work, excluding any source code
|
||||||
|
for portions of the Combined Work that, considered in isolation, are
|
||||||
|
based on the Application, and not on the Linked Version.
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the
|
||||||
|
object code and/or source code for the Application, including any data
|
||||||
|
and utility programs needed for reproducing the Combined Work from the
|
||||||
|
Application, but excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License
|
||||||
|
without being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a
|
||||||
|
facility refers to a function or data to be supplied by an Application
|
||||||
|
that uses the facility (other than as an argument passed when the
|
||||||
|
facility is invoked), then you may convey a copy of the modified
|
||||||
|
version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to
|
||||||
|
ensure that, in the event an Application does not supply the
|
||||||
|
function or data, the facility still operates, and performs
|
||||||
|
whatever part of its purpose remains meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of
|
||||||
|
this License applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from
|
||||||
|
a header file that is part of the Library. You may convey such object
|
||||||
|
code under terms of your choice, provided that, if the incorporated
|
||||||
|
material is not limited to numerical parameters, data structure
|
||||||
|
layouts and accessors, or small macros, inline functions and templates
|
||||||
|
(ten or fewer lines in length), you do both of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the
|
||||||
|
Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that,
|
||||||
|
taken together, effectively do not restrict modification of the
|
||||||
|
portions of the Library contained in the Combined Work and reverse
|
||||||
|
engineering for debugging such modifications, if you also do each of
|
||||||
|
the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that
|
||||||
|
the Library is used in it and that the Library and its use are
|
||||||
|
covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during
|
||||||
|
execution, include the copyright notice for the Library among
|
||||||
|
these notices, as well as a reference directing the user to the
|
||||||
|
copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this
|
||||||
|
License, and the Corresponding Application Code in a form
|
||||||
|
suitable for, and under terms that permit, the user to
|
||||||
|
recombine or relink the Application with a modified version of
|
||||||
|
the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying
|
||||||
|
Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (a) uses at run time
|
||||||
|
a copy of the Library already present on the user's computer
|
||||||
|
system, and (b) will operate properly with a modified version
|
||||||
|
of the Library that is interface-compatible with the Linked
|
||||||
|
Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise
|
||||||
|
be required to provide such information under section 6 of the
|
||||||
|
GNU GPL, and only to the extent that such information is
|
||||||
|
necessary to install and execute a modified version of the
|
||||||
|
Combined Work produced by recombining or relinking the
|
||||||
|
Application with a modified version of the Linked Version. (If
|
||||||
|
you use option 4d0, the Installation Information must accompany
|
||||||
|
the Minimal Corresponding Source and Corresponding Application
|
||||||
|
Code. If you use option 4d1, you must provide the Installation
|
||||||
|
Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
You may place library facilities that are a work based on the
|
||||||
|
Library side by side in a single library together with other library
|
||||||
|
facilities that are not Applications and are not covered by this
|
||||||
|
License, and convey such a combined library under terms of your
|
||||||
|
choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based
|
||||||
|
on the Library, uncombined with any other library facilities,
|
||||||
|
conveyed under the terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it
|
||||||
|
is a work based on the Library, and explaining where to find the
|
||||||
|
accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the GNU Lesser General Public License from time to time. Such new
|
||||||
|
versions will be similar in spirit to the present version, but may
|
||||||
|
differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Library as you received it specifies that a certain numbered version
|
||||||
|
of the GNU Lesser General Public License "or any later version"
|
||||||
|
applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that published version or of any later version
|
||||||
|
published by the Free Software Foundation. If the Library as you
|
||||||
|
received it does not specify a version number of the GNU Lesser
|
||||||
|
General Public License, you may choose any version of the GNU Lesser
|
||||||
|
General Public License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide
|
||||||
|
whether future versions of the GNU Lesser General Public License shall
|
||||||
|
apply, that proxy's public statement of acceptance of any version is
|
||||||
|
permanent authorization for you to choose that version for the
|
||||||
|
Library.
|
||||||
773
main.lua
773
main.lua
@@ -1,333 +1,644 @@
|
|||||||
--[[
|
--[[
|
||||||
______ __ _
|
# ______ __ _ #
|
||||||
/_ __/___ _____ / /_ ____ ___ (_)____ ____
|
# /_ __/___ _____ / /_ ____ ___ (_)____ ____ #
|
||||||
/ / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \
|
# / / / _ \ / ___// __ \ / __ `__ \ / // __ \ / __ \ #
|
||||||
/ / / __// /__ / / / // / / / / // // / / // /_/ /
|
# / / / __// /__ / / / // / / / / // // / / // /_/ / #
|
||||||
/_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/
|
# /_/ \___/ \___//_/ /_//_/ /_/ /_//_//_/ /_/ \____/ #
|
||||||
Techmino is my first "huge project"
|
Techmino is my first "huge project"
|
||||||
optimization is welcomed if you also love tetromino game
|
optimization is welcomed if you also love tetromino stacking game
|
||||||
|
|
||||||
|
Instructions:
|
||||||
|
1. I made a framework called Zframework, *most* code in Zframework are not directly relevant to game;
|
||||||
|
2. "xxx" are texts for reading by player, 'xxx' are string values just used in program;
|
||||||
|
3. Some goto statement are used for better performance. All goto-labes have detailed names so don't be afraid;
|
||||||
|
4. Except "gcinfo" function of lua itself, other "gc" are short for "graphics";
|
||||||
]]--
|
]]--
|
||||||
|
|
||||||
|
|
||||||
--Declaration
|
--Var leak check
|
||||||
goto REM love=require"love"::REM::--Just tell IDE to load love-api, no actual usage
|
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k)print(debug.traceback():match("\n.-\n\t(.-): "))rawset(self,k,v)end})
|
||||||
|
|
||||||
|
--System Global Vars Declaration
|
||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
NONE={}function NULL()end
|
VERSION=require"version"
|
||||||
DBP=print--Use this in temporary code, easy to find and remove
|
|
||||||
TIME=love.timer.getTime
|
TIME=love.timer.getTime
|
||||||
YIELD=coroutine.yield
|
YIELD=coroutine.yield
|
||||||
SYSTEM=love.system.getOS()
|
SYSTEM=love.system.getOS()if SYSTEM=='OS X'then SYSTEM='macOS'end
|
||||||
MOBILE=SYSTEM=="Android"or SYSTEM=="iOS"
|
FNNS=SYSTEM:find'\79\83'--What does FNSF stand for? IDK so don't ask me lol
|
||||||
|
MOBILE=SYSTEM=='Android'or SYSTEM=='iOS'
|
||||||
SAVEDIR=fs.getSaveDirectory()
|
SAVEDIR=fs.getSaveDirectory()
|
||||||
|
|
||||||
--Global Vars & Settings
|
--Global Vars & Settings
|
||||||
LOADED=false
|
SFXPACKS={'chiptune'}
|
||||||
|
VOCPACKS={'miya',--[['mono',]]'xiaoya','miku'}
|
||||||
|
FIRSTLAUNCH=false
|
||||||
DAILYLAUNCH=false
|
DAILYLAUNCH=false
|
||||||
EDITING=""
|
|
||||||
ERRDATA={}
|
|
||||||
|
|
||||||
--System setting
|
--System setting
|
||||||
math.randomseed(os.time()*626)
|
math.randomseed(os.time()*626)
|
||||||
love.setDeprecationOutput(false)
|
love.setDeprecationOutput(false)
|
||||||
love.keyboard.setKeyRepeat(true)
|
love.keyboard.setKeyRepeat(true)
|
||||||
love.keyboard.setTextInput(false)
|
love.keyboard.setTextInput(false)
|
||||||
love.mouse.setVisible(false)
|
if MOBILE then
|
||||||
|
local w,h,f=love.window.getMode()
|
||||||
|
f.resizable=false
|
||||||
|
love.window.setMode(w,h,f)
|
||||||
|
end
|
||||||
|
|
||||||
--Delete all files from too old version
|
local _LOADTIMELIST_={}
|
||||||
function CLEAR(root)
|
local _LOADTIME_=TIME()
|
||||||
for _,name in next,fs.getDirectoryItems(root or"")do
|
|
||||||
if fs.getRealDirectory(name)==SAVEDIR and fs.getInfo(name).type~="directory"then
|
--Load modules
|
||||||
fs.remove(name)
|
Z=require'Zframework'
|
||||||
|
FONT.load{
|
||||||
|
norm='parts/fonts/proportional.ttf',
|
||||||
|
mono='parts/fonts/monospaced.ttf',
|
||||||
|
}
|
||||||
|
FONT.setDefault('norm')
|
||||||
|
FONT.setFallback('norm')
|
||||||
|
|
||||||
|
SCR.setSize(1280,720)--Initialize Screen size
|
||||||
|
BGM.setMaxSources(5)
|
||||||
|
BGM.setChange(function(name)MES.new('music',text.nowPlaying..name,5)end)
|
||||||
|
VOC.setDiversion(.62)
|
||||||
|
|
||||||
|
WIDGET.setOnChange(function()
|
||||||
|
if SCN.cur~='custom_field'then
|
||||||
|
local colorList=THEME.getThemeColor()
|
||||||
|
if not colorList then return end
|
||||||
|
local rnd=math.random
|
||||||
|
for _,W in next,SCN.scenes[SCN.cur].widgetList do
|
||||||
|
if W.color then
|
||||||
|
W.color=colorList[rnd(#colorList)]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end CLEAR()
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
table.insert(_LOADTIMELIST_,("Load Zframework: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
|
--Create shortcuts
|
||||||
|
setFont=FONT.set
|
||||||
|
getFont=FONT.get
|
||||||
|
mStr=GC.mStr
|
||||||
|
mText=GC.simpX
|
||||||
|
mDraw=GC.draw
|
||||||
|
Snd=SFX.playSample
|
||||||
|
string.repD=STRING.repD
|
||||||
|
string.sArg=STRING.sArg
|
||||||
|
string.split=STRING.split
|
||||||
|
|
||||||
|
--Delete all naked files (from too old version)
|
||||||
|
FILE.clear('')
|
||||||
|
|
||||||
--Create directories
|
--Create directories
|
||||||
for _,v in next,{"conf","record","replay","cache","lib"}do
|
for _,v in next,{'conf','record','replay','cache','lib'}do
|
||||||
local info=fs.getInfo(v)
|
local info=fs.getInfo(v)
|
||||||
if not info then
|
if not info then
|
||||||
fs.createDirectory(v)
|
fs.createDirectory(v)
|
||||||
elseif info.type~="directory"then
|
elseif info.type~='directory'then
|
||||||
fs.remove(v)
|
fs.remove(v)
|
||||||
fs.createDirectory(v)
|
fs.createDirectory(v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Load modules
|
CHAR=require'parts.char'
|
||||||
require"Zframework"
|
require'parts.gameTables'
|
||||||
SCR.setSize(1280,720)--Initialize Screen size
|
require'parts.gameFuncs'
|
||||||
|
|
||||||
require"parts.list"
|
--Load shader files from SOURCE ONLY
|
||||||
require"parts.globalTables"
|
SHADER={}
|
||||||
require"parts.gametoolfunc"
|
for _,v in next,fs.getDirectoryItems('parts/shaders')do
|
||||||
|
if isSafeFile('parts/shaders/'..v)then
|
||||||
FREEROW= require"parts.freeRow"
|
local name=v:sub(1,-6)
|
||||||
DATA= require"parts.data"
|
SHADER[name]=love.graphics.newShader('parts/shaders/'..name..'.glsl')
|
||||||
|
end
|
||||||
USERS= require"parts.users"
|
|
||||||
TEXTURE= require"parts.texture"
|
|
||||||
SKIN= require"parts.skin"
|
|
||||||
NET= require"parts.net"
|
|
||||||
VK= require"parts.virtualKey"
|
|
||||||
PLY= require"parts.player"
|
|
||||||
AIFUNC= require"parts.ai"
|
|
||||||
AIBUILDER= require"parts.AITemplate"
|
|
||||||
MODES= require"parts.modes"
|
|
||||||
|
|
||||||
--Initialize field[1]
|
|
||||||
FIELD[1]=DATA.newBoard()
|
|
||||||
|
|
||||||
--First start for phones
|
|
||||||
if not fs.getInfo("conf/settings")and MOBILE then
|
|
||||||
SETTING.VKSwitch=true
|
|
||||||
SETTING.swap=false
|
|
||||||
SETTING.powerInfo=true
|
|
||||||
SETTING.cleanCanvas=true
|
|
||||||
end
|
end
|
||||||
if SETTING.fullscreen then love.window.setFullscreen(true)end
|
|
||||||
|
THEME= require'parts.theme'
|
||||||
|
LINE= require'parts.line'
|
||||||
|
DATA= require'parts.data'
|
||||||
|
|
||||||
|
TEXTURE= require'parts.texture'
|
||||||
|
SKIN= require'parts.skin'
|
||||||
|
USERS= require'parts.users'
|
||||||
|
NET= require'parts.net'
|
||||||
|
VK= require'parts.virtualKey'
|
||||||
|
BOT= require'parts.bot'
|
||||||
|
RSlist= require'parts.RSlist'DSCP=RSlist.TRS.centerPos
|
||||||
|
PLY= require'parts.player'
|
||||||
|
NETPLY= require'parts.netPlayer'
|
||||||
|
MODETREE= require'parts.modeTree'
|
||||||
|
|
||||||
|
setmetatable(TEXTURE,{__index=function(self,k)
|
||||||
|
MES.new('warn',"No texture called: "..k)
|
||||||
|
self[k]=PAPER
|
||||||
|
return self[k]
|
||||||
|
end})
|
||||||
|
|
||||||
|
table.insert(_LOADTIMELIST_,("Load Parts: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
|
--Init Zframework
|
||||||
|
do--Z.setCursor
|
||||||
|
local normImg=GC.DO{16,16,
|
||||||
|
{'fCirc',8,8,4},
|
||||||
|
{'setCL',1,1,1,.7},
|
||||||
|
{'fCirc',8,8,6},
|
||||||
|
}
|
||||||
|
local holdImg=GC.DO{16,16,
|
||||||
|
{'setLW',2},
|
||||||
|
{'dCirc',8,8,7},
|
||||||
|
{'fCirc',8,8,3},
|
||||||
|
}
|
||||||
|
local min,int,abs=math.min,math.floor,math.abs
|
||||||
|
local gc_setColor,gc_draw=love.graphics.setColor,love.graphics.draw
|
||||||
|
local ms=love.mouse
|
||||||
|
Z.setCursor(function(time,x,y)
|
||||||
|
if not SETTING.sysCursor then
|
||||||
|
local R=int((time+1)/2)%7+1
|
||||||
|
_=BLOCK_COLORS[SETTING.skin[R]]
|
||||||
|
gc_setColor(_[1],_[2],_[3],min(abs(1-time%2),.3))
|
||||||
|
_=DSCP[R][0]
|
||||||
|
gc_draw(TEXTURE.miniBlock[R],x,y,time%3.14159265359*4,16,16,_[2]+.5,#BLOCKS[R][0]-_[1]-.5)
|
||||||
|
gc_setColor(1,1,1)
|
||||||
|
gc_draw(ms.isDown(1)and holdImg or normImg,x,y,nil,nil,nil,8,8)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
Z.setOnFnKeys({
|
||||||
|
function()MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!")end,
|
||||||
|
function()MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))end,
|
||||||
|
function()MES.new('error',"挂了")end,
|
||||||
|
function()
|
||||||
|
if GAME.playing and not GAME.net then
|
||||||
|
for _=1,8 do
|
||||||
|
if #PLY_ALIVE>1 then
|
||||||
|
local P=PLY_ALIVE[math.random(2,#PLY_ALIVE)]
|
||||||
|
P.lastRecv=PLAYERS[1]
|
||||||
|
P:lose()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
function()print(WIDGET.getSelected()or"no widget selected")end,
|
||||||
|
function()for k,v in next,_G do print(k,v)end end,
|
||||||
|
function()if love['_openConsole']then love['_openConsole']()end end,
|
||||||
|
})
|
||||||
|
Z.setOnResize(function(w,_)
|
||||||
|
SHADER.warning:send('w',w*SCR.dpi)
|
||||||
|
end)
|
||||||
|
do--Z.setOnFocus
|
||||||
|
local function task_autoSoundOff()
|
||||||
|
while true do
|
||||||
|
coroutine.yield()
|
||||||
|
local v=love.audio.getVolume()
|
||||||
|
love.audio.setVolume(math.max(v-.05,0))
|
||||||
|
if v==0 then return end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local function task_autoSoundOn()
|
||||||
|
while true do
|
||||||
|
coroutine.yield()
|
||||||
|
local v=love.audio.getVolume()
|
||||||
|
if v<SETTING.mainVol then
|
||||||
|
love.audio.setVolume(math.min(v+.05,SETTING.mainVol,1))
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Z.setOnFocus(function(f)
|
||||||
|
if f then
|
||||||
|
love.timer.step()
|
||||||
|
if SETTING.autoMute then
|
||||||
|
TASK.removeTask_code(task_autoSoundOff)
|
||||||
|
TASK.new(task_autoSoundOn)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if SCN.cur=='game'and SETTING.autoPause then
|
||||||
|
pauseGame()
|
||||||
|
end
|
||||||
|
if SETTING.autoMute then
|
||||||
|
TASK.removeTask_code(task_autoSoundOn)
|
||||||
|
TASK.new(task_autoSoundOff)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
Z.setOnQuit(destroyPlayers)
|
||||||
|
|
||||||
|
--Load settings and statistics
|
||||||
|
TABLE.cover (loadFile('conf/user','-canSkip')or{},USER)
|
||||||
|
TABLE.cover (loadFile('conf/unlock','-canSkip')or{},RANKS)
|
||||||
|
TABLE.update(loadFile('conf/settings','-canSkip')or{},SETTING)
|
||||||
|
TABLE.coverR(loadFile('conf/data','-canSkip')or{},STAT)
|
||||||
|
TABLE.cover (loadFile('conf/key','-canSkip')or{},KEY_MAP)
|
||||||
|
TABLE.cover (loadFile('conf/virtualkey','-json -canSkip')or{},VK_ORG)
|
||||||
|
|
||||||
|
--Initialize fields, sequence, missions, gameEnv for cutsom game
|
||||||
|
local fieldData=loadFile('conf/customBoards','-string -canSkip')
|
||||||
|
if fieldData then
|
||||||
|
fieldData=STRING.split(fieldData,"!")
|
||||||
|
for i=1,#fieldData do
|
||||||
|
DATA.pasteBoard(fieldData[i],i)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
FIELD[1]=DATA.newBoard()
|
||||||
|
end
|
||||||
|
local sequenceData=loadFile('conf/customSequence','-string -canSkip')
|
||||||
|
if sequenceData then
|
||||||
|
DATA.pasteSequence(sequenceData)
|
||||||
|
end
|
||||||
|
local missionData=loadFile('conf/customMissions','-string -canSkip')
|
||||||
|
if missionData then
|
||||||
|
DATA.pasteMission(missionData)
|
||||||
|
end
|
||||||
|
local customData=loadFile('conf/customEnv','-canSkip')
|
||||||
|
if customData and customData['version']==VERSION.code then
|
||||||
|
TABLE.complete(customData,CUSTOMENV)
|
||||||
|
end
|
||||||
|
TABLE.complete(require"parts.customEnv0",CUSTOMENV)
|
||||||
|
|
||||||
|
|
||||||
--Initialize image libs
|
--Initialize image libs
|
||||||
IMG.init{
|
IMG.init{
|
||||||
batteryImage="mess/power.png",
|
lock='media/image/mess/lock.png',
|
||||||
lock="mess/lock.png",
|
dialCircle='media/image/mess/dialCircle.png',
|
||||||
dialCircle="mess/dialCircle.png",
|
dialNeedle='media/image/mess/dialNeedle.png',
|
||||||
dialNeedle="mess/dialNeedle.png",
|
lifeIcon='media/image/mess/life.png',
|
||||||
lifeIcon="mess/life.png",
|
badgeIcon='media/image/mess/badge.png',
|
||||||
badgeIcon="mess/badge.png",
|
ctrlSpeedLimit='media/image/mess/ctrlSpeedLimit.png',
|
||||||
spinCenter="mess/spinCenter.png",
|
speedLimit='media/image/mess/speedLimit.png',--Not used, for future C2-mode
|
||||||
ctrlSpeedLimit="mess/ctrlSpeedLimit.png",
|
pay1='media/image/mess/pay1.png',
|
||||||
speedLimit="mess/speedLimit.png",
|
pay2='media/image/mess/pay2.png',
|
||||||
pay1="mess/pay1.png",
|
drought='media/image/mess/drought.png',
|
||||||
pay2="mess/pay2.png",
|
|
||||||
|
|
||||||
nakiCH="characters/naki.png",
|
miyaCH1='media/image/characters/miya1.png',
|
||||||
miyaCH="characters/miya.png",
|
miyaCH2='media/image/characters/miya2.png',
|
||||||
miyaF1="characters/miya_f1.png",
|
miyaCH3='media/image/characters/miya3.png',
|
||||||
miyaF2="characters/miya_f2.png",
|
miyaCH4='media/image/characters/miya4.png',
|
||||||
miyaF3="characters/miya_f3.png",
|
miyaHeart='media/image/characters/miya_heart.png',
|
||||||
miyaF4="characters/miya_f4.png",
|
miyaGlow='media/image/characters/miya_glow.png',
|
||||||
electric="characters/electric.png",
|
monoCH='media/image/characters/mono.png',
|
||||||
hbm="characters/hbm.png",
|
xiaoyaCH='media/image/characters/xiaoya.png',
|
||||||
|
xiaoyaOmino='media/image/characters/xiaoya_Omino.png',
|
||||||
|
mikuCH='media/image/characters/miku.png',
|
||||||
|
electric='media/image/characters/electric.png',
|
||||||
|
hbm='media/image/characters/hbm.png',
|
||||||
|
|
||||||
lanterns={
|
lanterns={
|
||||||
"lanterns/1.png",
|
'media/image/lanterns/1.png',
|
||||||
"lanterns/2.png",
|
'media/image/lanterns/2.png',
|
||||||
"lanterns/3.png",
|
'media/image/lanterns/3.png',
|
||||||
"lanterns/4.png",
|
'media/image/lanterns/4.png',
|
||||||
"lanterns/5.png",
|
'media/image/lanterns/5.png',
|
||||||
"lanterns/6.png",
|
'media/image/lanterns/6.png',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
SKIN.init{
|
SKIN.load{
|
||||||
"crystal_scf",
|
{name="crystal_scf",path='media/image/skin/crystal_scf.png'},
|
||||||
"contrast_mrz",
|
{name="matte_mrz",path='media/image/skin/matte_mrz.png'},
|
||||||
"polkadots_scf",
|
{name="shiny_chno",path='media/image/skin/shiny_chno.png'},
|
||||||
"toy_scf",
|
{name="contrast_mrz",path='media/image/skin/contrast_mrz.png'},
|
||||||
"smooth_mrz",
|
{name="polkadots_scf",path='media/image/skin/polkadots_scf.png'},
|
||||||
"simple_scf",
|
{name="toy_scf",path='media/image/skin/toy_scf.png'},
|
||||||
"glass_scf",
|
{name="smooth_mrz",path='media/image/skin/smooth_mrz.png'},
|
||||||
"penta_scf",
|
{name="simple_scf",path='media/image/skin/simple_scf.png'},
|
||||||
"bubble_scf",
|
{name="glass_scf",path='media/image/skin/glass_scf.png'},
|
||||||
"minoes_scf",
|
{name="penta_scf",path='media/image/skin/penta_scf.png'},
|
||||||
"pure_mrz",
|
{name="bubble_scf",path='media/image/skin/bubble_scf.png'},
|
||||||
"bright_scf",
|
{name="minoes_scf",path='media/image/skin/minoes_scf.png'},
|
||||||
"glow_mrz",
|
{name="pure_mrz",path='media/image/skin/pure_mrz.png'},
|
||||||
"plastic_mrz",
|
{name="bright_scf",path='media/image/skin/bright_scf.png'},
|
||||||
"paper_mrz",
|
{name="glow_mrz",path='media/image/skin/glow_mrz.png'},
|
||||||
"yinyang_scf",
|
{name="plastic_mrz",path='media/image/skin/plastic_mrz.png'},
|
||||||
"cartooncup_earety",
|
{name="paper_mrz",path='media/image/skin/paper_mrz.png'},
|
||||||
"jelly_miya",
|
{name="yinyang_scf",path='media/image/skin/yinyang_scf.png'},
|
||||||
"brick_notypey",
|
{name="cartooncup_earety",path='media/image/skin/cartooncup_earety.png'},
|
||||||
"gem_notypey",
|
{name="jelly_miya",path='media/image/skin/jelly_miya.png'},
|
||||||
"classic",
|
{name="brick_notypey",path='media/image/skin/brick_notypey.png'},
|
||||||
"ball_shaw",
|
{name="gem_notypey",path='media/image/skin/gem_notypey.png'},
|
||||||
"retro_notypey",
|
{name="classic",path='media/image/skin/classic_unknown.png'},
|
||||||
"textbone_mrz",
|
{name="ball_shaw",path='media/image/skin/ball_shaw.png'},
|
||||||
"coloredbone_mrz",
|
{name="retro_notypey",path='media/image/skin/retro_notypey.png'},
|
||||||
"wtf",
|
{name="pixel_chno",path='media/image/skin/pixel_chno.png'},
|
||||||
|
{name="textbone_mrz",path='media/image/skin/textbone_mrz.png'},
|
||||||
|
{name="coloredbone_mrz",path='media/image/skin/coloredbone_mrz.png'},
|
||||||
|
{name="wtf",path='media/image/skin/wtf_mrz.png'},
|
||||||
}
|
}
|
||||||
|
|
||||||
--Initialize sound libs
|
--Initialize sound libs
|
||||||
SFX.init((function()
|
SFX.init((function()--[Warning] Not loading files here, just get the list of sound needed
|
||||||
local L={}
|
local L={}
|
||||||
for _,v in next,fs.getDirectoryItems("media/SFX")do
|
for _,v in next,fs.getDirectoryItems('media/effect/chiptune/')do
|
||||||
if fs.getRealDirectory("media/SFX/"..v)~=SAVEDIR then
|
if isSafeFile('media/effect/chiptune/'..v,"Dangerous file : %SAVE%/media/effect/chiptune/"..v)then
|
||||||
L[#L+1]=v:sub(1,-5)
|
table.insert(L,v:sub(1,-5))
|
||||||
else
|
|
||||||
LOG.print("Dangerous file : %SAVE%/media/SFX/"..v)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L
|
return L
|
||||||
end)())
|
end)())
|
||||||
BGM.init((function()
|
BGM.load((function()
|
||||||
local L={}
|
local L={}
|
||||||
for _,v in next,fs.getDirectoryItems("media/BGM")do
|
for _,v in next,fs.getDirectoryItems('media/music')do
|
||||||
if fs.getRealDirectory("media/BGM/"..v)~=SAVEDIR then
|
if isSafeFile('media/music/'..v,"Dangerous file : %SAVE%/media/music/"..v)then
|
||||||
L[#L+1]=v:sub(1,-5)
|
L[v:sub(1,-5)]='media/music/'..v
|
||||||
else
|
|
||||||
LOG.print("Dangerous file : %SAVE%/media/BGM/"..v)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return L
|
return L
|
||||||
end)())
|
end)())
|
||||||
VOC.init{
|
VOC.init{
|
||||||
"zspin","sspin","lspin","jspin","tspin","ospin","ispin",
|
'zspin','sspin','jspin','lspin','tspin','ospin','ispin','pspin','qspin','fspin','espin','uspin','vspin','wspin','xspin','rspin','yspin','nspin','hspin','cspin',
|
||||||
"single","double","triple","techrash",
|
'single','double','triple','techrash','pentacrash','hexacrash',
|
||||||
"mini","b2b","b3b",
|
'mini','b2b','b3b',
|
||||||
"perfect_clear","half_clear",
|
'perfect_clear','half_clear',
|
||||||
"win","lose","bye",
|
'win','lose','bye',
|
||||||
"test","happy","doubt","sad","egg",
|
'test','happy','doubt',
|
||||||
"welcome_voc",
|
'welcome',
|
||||||
}
|
}
|
||||||
|
|
||||||
--Initialize language lib
|
--Initialize language lib
|
||||||
LANG.init(
|
LANG.init('zh',
|
||||||
{
|
{
|
||||||
require"parts.language.lang_zh",
|
zh=require'parts.language.lang_zh',
|
||||||
require"parts.language.lang_zh2",
|
zh_trad=require'parts.language.lang_zh_trad',
|
||||||
require"parts.language.lang_yygq",
|
zh_full=require'parts.language.lang_zh_full',
|
||||||
require"parts.language.lang_en",
|
en=require'parts.language.lang_en',
|
||||||
require"parts.language.lang_fr",
|
fr=require'parts.language.lang_fr',
|
||||||
require"parts.language.lang_sp",
|
es=require'parts.language.lang_es',
|
||||||
require"parts.language.lang_pt",
|
pt=require'parts.language.lang_pt',
|
||||||
require"parts.language.lang_symbol",
|
id=require'parts.language.lang_id',
|
||||||
|
zh_grass=require'parts.language.lang_zh_grass',
|
||||||
|
zh_yygq=require'parts.language.lang_yygq',
|
||||||
|
symbol=require'parts.language.lang_symbol',
|
||||||
--1. Add language file to LANG folder;
|
--1. Add language file to LANG folder;
|
||||||
--2. Require it;
|
--2. Require it;
|
||||||
--3. Add a button in parts/scenes/setting_lang.lua;
|
--3. Add a button in parts/scenes/lang.lua;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
block={
|
block=BLOCK_NAMES
|
||||||
"Z","S","J","L","T","O","I",
|
|
||||||
"Z5","S5","Q","P","F","E",
|
|
||||||
"T5","U","V","W","X",
|
|
||||||
"J5","L5","R","Y","N","H","I5",
|
|
||||||
"I3","C","I2","O1"
|
|
||||||
},
|
},
|
||||||
}
|
(function()
|
||||||
|
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
||||||
|
return function(L)
|
||||||
|
if type(rawget(L,'getTip'))=='table'then setmetatable(L.getTip,tipMeta)end
|
||||||
|
setmetatable(L,{__index=function(self,k)
|
||||||
|
local mes="No Text ("..SETTING.locale.."): "..k
|
||||||
|
LOG(mes)
|
||||||
|
MES.new('warn',mes)
|
||||||
|
self[k]=CHAR.zChan.thinking
|
||||||
|
return self[k]
|
||||||
|
end})
|
||||||
|
end
|
||||||
|
end)()
|
||||||
)
|
)
|
||||||
|
|
||||||
--Load shader files from SOURCE ONLY
|
table.insert(_LOADTIMELIST_,("Initialize Parts: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
SHADER={}
|
|
||||||
for _,v in next,fs.getDirectoryItems("parts/shaders")do
|
|
||||||
if fs.getRealDirectory("parts/shaders/"..v)~=SAVEDIR then
|
|
||||||
local name=v:sub(1,-6)
|
|
||||||
SHADER[name]=love.graphics.newShader("parts/shaders/"..name..".glsl")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--Load background files from SOURCE ONLY
|
--Load background files from SOURCE ONLY
|
||||||
for _,v in next,fs.getDirectoryItems("parts/backgrounds")do
|
for _,v in next,fs.getDirectoryItems('parts/backgrounds')do
|
||||||
if fs.getRealDirectory("parts/backgrounds/"..v)~=SAVEDIR then
|
if isSafeFile('parts/backgrounds/'..v)and v:sub(-3)=='lua'then
|
||||||
if v:sub(-3)=="lua"then
|
|
||||||
local name=v:sub(1,-5)
|
local name=v:sub(1,-5)
|
||||||
BG.add(name,require("parts.backgrounds."..name))
|
BG.add(name,require('parts.backgrounds.'..name))
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
BG.remList('none')BG.remList('gray')BG.remList('custom')
|
||||||
--Load scene files from SOURCE ONLY
|
--Load scene files from SOURCE ONLY
|
||||||
for _,v in next,fs.getDirectoryItems("parts/scenes")do
|
for _,v in next,fs.getDirectoryItems('parts/scenes')do
|
||||||
if fs.getRealDirectory("parts/scenes/"..v)~=SAVEDIR then
|
if isSafeFile('parts/scenes/'..v)then
|
||||||
local sceneName=v:sub(1,-5)
|
local sceneName=v:sub(1,-5)
|
||||||
SCN.add(sceneName,require("parts.scenes."..sceneName))
|
SCN.add(sceneName,require('parts.scenes.'..sceneName))
|
||||||
LANG.addScene(sceneName)
|
LANG.addScene(sceneName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
LANG.set(SETTING.lang)
|
|
||||||
|
table.insert(_LOADTIMELIST_,("Load Files: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
--Update data
|
--Update data
|
||||||
do
|
do
|
||||||
local needSave
|
local needSave
|
||||||
local autoRestart
|
|
||||||
|
|
||||||
if type(STAT.version)~="number"then
|
if not fs.getInfo('conf/data')then
|
||||||
|
needSave=true
|
||||||
|
end
|
||||||
|
if type(STAT.version)~='number'then
|
||||||
STAT.version=0
|
STAT.version=0
|
||||||
needSave=true
|
needSave=true
|
||||||
end
|
end
|
||||||
if STAT.version<1300 then
|
if STAT.version<1500 then
|
||||||
STAT.frame=math.floor(STAT.time*60)
|
FILE.clear_s('')
|
||||||
STAT.lastPlay="sprint_10l"
|
end
|
||||||
RANKS.sprintFix=nil
|
if STAT.version<1505 then
|
||||||
RANKS.sprintLock=nil
|
fs.remove('record/bigbang.rec')
|
||||||
|
fs.remove('conf/replay')
|
||||||
|
end
|
||||||
|
if STAT.version==1506 then
|
||||||
|
local temp1,temp2
|
||||||
|
if fs.getInfo('record/master_l.rec')then
|
||||||
|
temp1=fs.read('record/master_l.rec')
|
||||||
|
end
|
||||||
|
if fs.getInfo('record/master_u.rec')then
|
||||||
|
temp2=fs.read('record/master_u.rec')
|
||||||
|
end
|
||||||
|
if temp1 then
|
||||||
|
fs.write('record/master_u.rec',temp1)
|
||||||
|
end
|
||||||
|
if temp2 then
|
||||||
|
fs.write('record/master_l.rec',temp2)
|
||||||
|
end
|
||||||
|
RANKS.master_l,RANKS.master_u=RANKS.master_u,RANKS.master_l
|
||||||
|
if RANKS.tsd_u then
|
||||||
|
RANKS.tsd_u=0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if STAT.version==1601 then
|
||||||
|
RANKS.round_e=nil
|
||||||
|
RANKS.round_n=nil
|
||||||
|
RANKS.round_h=nil
|
||||||
|
RANKS.round_l=nil
|
||||||
|
RANKS.round_u=nil
|
||||||
|
fs.remove('record/round_e.rec')
|
||||||
|
fs.remove('record/round_n.rec')
|
||||||
|
fs.remove('record/round_h.rec')
|
||||||
|
fs.remove('record/round_l.rec')
|
||||||
|
fs.remove('record/round_u.rec')
|
||||||
|
end
|
||||||
|
if STAT.version<1700 and SETTING.dascut<5 then
|
||||||
|
SETTING.dascut=SETTING.dascut+1
|
||||||
needSave=true
|
needSave=true
|
||||||
for _,name in next,fs.getDirectoryItems("replay")do
|
|
||||||
fs.remove("replay/"..name)
|
|
||||||
end
|
end
|
||||||
|
if SETTING.vocPack=='mono'then
|
||||||
|
SETTING.vocPack='miya'
|
||||||
end
|
end
|
||||||
if STAT.version<1302 then
|
if RANKS.stack_e then
|
||||||
if RANKS.pctrain_n then RANKS.pctrain_n=0 end
|
RANKS.stack_e=nil
|
||||||
if RANKS.pctrain_l then RANKS.pctrain_l=0 end
|
RANKS.stack_h=nil
|
||||||
fs.remove("conf/settings")
|
RANKS.stack_u=nil
|
||||||
needSave=true
|
fs.remove('record/stack_e.rec')
|
||||||
autoRestart=true
|
fs.remove('record/stack_h.rec')
|
||||||
|
fs.remove('record/stack_u.rec')
|
||||||
end
|
end
|
||||||
if STAT.version<1400 then
|
if RANKS.stack_20l then
|
||||||
fs.remove("conf/user")
|
RANKS.stack_20l=nil
|
||||||
fs.remove("conf/key")
|
RANKS.stack_40l=nil
|
||||||
SETTING.appLock=false
|
RANKS.stack_100l=nil
|
||||||
needSave=true
|
fs.remove('record/stack_20l.rec')
|
||||||
autoRestart=true
|
fs.remove('record/stack_40l.rec')
|
||||||
|
fs.remove('record/stack_100l.rec')
|
||||||
end
|
end
|
||||||
if STAT.version<1405 then
|
if RANKS.rhythm_e then
|
||||||
fs.remove("conf/user")
|
RANKS.rhythm_e=nil
|
||||||
autoRestart=true
|
RANKS.rhythm_h=nil
|
||||||
|
RANKS.rhythm_u=nil
|
||||||
|
fs.remove('record/rhythm_e.rec')
|
||||||
|
fs.remove('record/rhythm_h.rec')
|
||||||
|
fs.remove('record/rhythm_u.rec')
|
||||||
end
|
end
|
||||||
|
if RANKS.bigbang then
|
||||||
for _,v in next,VK_org do
|
RANKS.clearRush,RANKS.bigbang=RANKS.bigbang
|
||||||
if not v.color then
|
fs.remove('record/bigbang.rec')
|
||||||
fs.remove("conf/virtualkey")
|
|
||||||
autoRestart=true
|
|
||||||
break
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if STAT.version~=VERSION.code then
|
if STAT.version~=VERSION.code then
|
||||||
newVersionLaunch=true
|
for k,v in next,MODE_UPDATE_MAP do
|
||||||
STAT.version=VERSION.code
|
if RANKS[k]then
|
||||||
CLEAR("lib")
|
RANKS[v]=RANKS[k]
|
||||||
needSave=true
|
|
||||||
autoRestart=true
|
|
||||||
end
|
|
||||||
|
|
||||||
if RANKS.GM then RANKS.GM=0 end
|
|
||||||
if RANKS.infinite then RANKS.infinite=6 end
|
|
||||||
if RANKS.infinite_dig then RANKS.infinite_dig=6 end
|
|
||||||
for k in next,RANKS do
|
|
||||||
if type(k)=="number"then
|
|
||||||
RANKS[k]=nil
|
RANKS[k]=nil
|
||||||
|
end
|
||||||
|
k='record/'..k
|
||||||
|
if fs.getInfo(k..'.dat')then
|
||||||
|
fs.write('record/'..v..'.rec',fs.read(k..'.dat'))
|
||||||
|
fs.remove(k..'.dat')
|
||||||
|
end
|
||||||
|
if fs.getInfo(k..'.rec')then
|
||||||
|
fs.write('record/'..v..'.rec',fs.read(k..'.rec'))
|
||||||
|
fs.remove(k..'.rec')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
STAT.version=VERSION.code
|
||||||
needSave=true
|
needSave=true
|
||||||
end
|
end
|
||||||
end
|
SETTING.appLock,SETTING.dataSaving,SETTING.swap=nil
|
||||||
local modeTable={attacker_h="attacker_hard",attacker_u="attacker_ultimate",blind_e="blind_easy",blind_h="blind_hard",blind_l="blind_lunatic",blind_n="blind_normal",blind_u="blind_ultimate",c4wtrain_l="c4wtrain_lunatic",c4wtrain_n="c4wtrain_normal",defender_l="defender_lunatic",defender_n="defender_normal",dig_100l="dig_10",dig_10l="dig_100",dig_400l="dig_40",dig_40l="dig_400",dig_h="dig_hard",dig_u="dig_ultimate",drought_l="drought_lunatic",drought_n="drought_normal",marathon_h="marathon_hard",marathon_n="marathon_normal",pc_h="pcchallenge_hard",pc_l="pcchallenge_lunatic",pc_n="pcchallenge_normal",pctrain_l="pctrain_lunatic",pctrain_n="pctrain_normal",round_e="round_1",round_h="round_2",round_l="round_3",round_n="round_4",round_u="round_5",solo_e="solo_1",solo_h="solo_2",solo_l="solo_3",solo_n="solo_4",solo_u="solo_5",sprint_10l="sprint_10",sprint_20l="sprint_20",sprint_40l="sprint_40",sprint_400l="sprint_400",sprint_100l="sprint_100",sprint_1000l="sprint_1000",survivor_e="survivor_easy",survivor_h="survivor_hard",survivor_l="survivor_lunatic",survivor_n="survivor_normal",survivor_u="survivor_ultimate",tech_finesse_f="tech_finesse2",tech_h_plus="tech_hard2",tech_h="tech_hard",tech_l_plus="tech_lunatic2",tech_l="tech_lunatic",tech_n_plus="tech_normal2",tech_n="tech_normal",techmino49_e="techmino49_easy",techmino49_h="techmino49_hard",techmino49_u="techmino49_ultimate",techmino99_e="techmino99_easy",techmino99_h="techmino99_hard",techmino99_u="techmino99_ultimate",tsd_e="tsd_easy",tsd_h="tsd_hard",tsd_u="tsd_ultimate",master_extra="GM"}
|
if not SETTING.VKSkin then SETTING.VKSkin=1 end
|
||||||
for k,v in next,modeTable do
|
for _,v in next,SETTING.skin do if v<1 or v>17 then v=17 end end
|
||||||
if RANKS[v]then
|
if not RSlist[SETTING.RS]then SETTING.RS='TRS'end
|
||||||
RANKS[k]=RANKS[v]
|
if SETTING.ghostType=='greyCell'then SETTING.ghostType='grayCell'end
|
||||||
RANKS[v]=nil
|
if type(SETTING.skinSet)=='number'then SETTING.skinSet='crystal_scf'end
|
||||||
end
|
if not TABLE.find({8,10,13,17,22,29,37,47,62,80,100},SETTING.frameMul)then SETTING.frameMul=100 end
|
||||||
v="record/"..v
|
if SETTING.cv then SETTING.vocPack,SETTING.cv=SETTING.cv end
|
||||||
if fs.getInfo(v..".dat")then
|
if type(SETTING.bg)~='string'then SETTING.bg='on'end
|
||||||
fs.write("record/"..k.."rec",fs.read(v..".dat"))
|
if SETTING.skin[18]==10 then SETTING.skin[18]=4 end
|
||||||
fs.remove(v..".dat")
|
if SETTING.reTime>3 or SETTING.reTime<.5 then SETTING.reTime=2 end
|
||||||
end
|
if RANKS.infinite then RANKS.infinite=0 end
|
||||||
if fs.getInfo(v..".rec")then
|
if RANKS.infinite_dig then RANKS.infinite_dig=0 end
|
||||||
fs.write("record/"..k..".rec",fs.read(v..".rec"))
|
if not RANKS.sprint_10l then RANKS.sprint_10l=0 end
|
||||||
fs.remove(v..".rec")
|
if RANKS.master_l then RANKS.master_n,RANKS.master_l=RANKS.master_l needSave=true end
|
||||||
end
|
if RANKS.master_u then RANKS.master_h,RANKS.master_u=RANKS.master_u needSave=true end
|
||||||
end
|
for _,v in next,VK_ORG do v.color=nil end
|
||||||
if not RANKS.sprint_10l then
|
for name,rank in next,RANKS do
|
||||||
RANKS.sprint_10l=0
|
if type(name)=='number'or type(rank)~='number'then
|
||||||
|
RANKS[name]=nil
|
||||||
needSave=true
|
needSave=true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if needSave then
|
if needSave then
|
||||||
FILE.save(SETTING,"conf/settings","q")
|
saveStats()
|
||||||
FILE.save(RANKS,"conf/unlock","q")
|
saveProgress()
|
||||||
FILE.save(STAT,"conf/data","q")
|
saveSettings()
|
||||||
end
|
love.event.quit('restart')
|
||||||
if autoRestart then
|
|
||||||
love.event.quit("restart")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Var leak check
|
--First start
|
||||||
-- setmetatable(_G,{__newindex=function(self,k,v)print('>>'..k,tostring(v))rawset(self,k,v)end})
|
FIRSTLAUNCH=STAT.run==0
|
||||||
|
if FIRSTLAUNCH and MOBILE then
|
||||||
|
SETTING.VKSwitch=true
|
||||||
|
SETTING.powerInfo=true
|
||||||
|
SETTING.cleanCanvas=true
|
||||||
|
end
|
||||||
|
|
||||||
|
--Apply system setting
|
||||||
|
applySettings()
|
||||||
|
|
||||||
|
--Load replays
|
||||||
|
for _,fileName in next,fs.getDirectoryItems('replay')do
|
||||||
|
if fileName:sub(12,12):match("[a-zA-Z]")then
|
||||||
|
local date,mode,version,player,seed,setting,mod
|
||||||
|
local fileData=fs.read('replay/'..fileName)
|
||||||
|
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||||
|
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode]or mode
|
||||||
|
version,fileData=STRING.readLine(fileData)
|
||||||
|
player, fileData=STRING.readLine(fileData)if player=="Local Player"then player="Stacker"end
|
||||||
|
local success
|
||||||
|
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
||||||
|
if not success then goto BREAK_cannotParse end
|
||||||
|
seed, fileData=STRING.readLine(fileData)
|
||||||
|
setting,fileData=STRING.readLine(fileData)setting=JSON.decode(setting)
|
||||||
|
mod, fileData=STRING.readLine(fileData)mod=JSON.decode(mod)
|
||||||
|
if
|
||||||
|
not setting or
|
||||||
|
not mod or
|
||||||
|
not mode or
|
||||||
|
#mode==0
|
||||||
|
then goto BREAK_cannotParse end
|
||||||
|
|
||||||
|
fs.remove('replay/'..fileName)
|
||||||
|
local newName=fileName:sub(1,10)..fileName:sub(15)
|
||||||
|
fs.write('replay/'..newName,
|
||||||
|
love.data.compress('string','zlib',
|
||||||
|
JSON.encode{
|
||||||
|
date=date,
|
||||||
|
mode=mode,
|
||||||
|
version=version,
|
||||||
|
player=player,
|
||||||
|
seed=seed,
|
||||||
|
setting=setting,
|
||||||
|
mod=mod,
|
||||||
|
}.."\n"..
|
||||||
|
fileData
|
||||||
|
)
|
||||||
|
)
|
||||||
|
fileName=newName
|
||||||
|
end
|
||||||
|
::BREAK_cannotParse::
|
||||||
|
local rep=DATA.parseReplay('replay/'..fileName)
|
||||||
|
table.insert(REPLAY,rep)
|
||||||
|
end
|
||||||
|
table.sort(REPLAY,function(a,b)return a.fileName>b.fileName end)
|
||||||
|
|
||||||
|
table.insert(_LOADTIMELIST_,("Initialize Data: %.3fs"):format(TIME()-_LOADTIME_))
|
||||||
|
|
||||||
|
for i=1,#_LOADTIMELIST_ do LOG(_LOADTIMELIST_[i])end
|
||||||
|
|
||||||
|
--Launch testing task if launch param received
|
||||||
|
if TABLE.find(arg,'--test')then
|
||||||
|
TASK.new(function()
|
||||||
|
while not LOADED do YIELD()end
|
||||||
|
|
||||||
|
LOG("\27[92m\27[1mAutomatic Test Started\27[0m")
|
||||||
|
BGM.setVol(0)SFX.setVol(0)
|
||||||
|
love.keypressed('space')
|
||||||
|
TEST.yieldUntilNextScene()
|
||||||
|
|
||||||
|
for k,mode in next,MODES do
|
||||||
|
if k~='netBattle'then
|
||||||
|
LOG("Scanning mode: "..mode.name)
|
||||||
|
loadGame(mode.name,true)
|
||||||
|
TEST.yieldUntilNextScene()
|
||||||
|
SCN.back()
|
||||||
|
TEST.yieldUntilNextScene()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
LOG("\27[92m\27[1mAutomatic Test Passed :)\27[0m")
|
||||||
|
TEST.yieldN(60)
|
||||||
|
love.event.quit(0)
|
||||||
|
end)
|
||||||
|
TASK.new(function()
|
||||||
|
while true do
|
||||||
|
YIELD()
|
||||||
|
if Z.getErr(1)then break end
|
||||||
|
end
|
||||||
|
LOG("\27[91m\27[1mAutomatic Test Failed :(\27[0m\nThe error message is:\n"..table.concat(Z.getErr(1).mes,"\n").."\27[91m\nAborting\27[0m")
|
||||||
|
TEST.yieldN(60)
|
||||||
|
love.event.quit(1)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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