Compare commits
2587 Commits
v0.13.3+
...
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 | ||
|
|
b9d2a8b283 | ||
|
|
e999a9cb1e | ||
|
|
d111f7fc66 | ||
|
|
fb1970ffc2 | ||
|
|
a96b308c28 | ||
|
|
5af3021d08 | ||
|
|
2e477bdab6 | ||
|
|
05b697debf | ||
|
|
b0064d179c | ||
|
|
48dbed2571 | ||
|
|
7643f19815 | ||
|
|
deca828207 | ||
|
|
754a8f611f | ||
|
|
f12356beb4 | ||
|
|
c9c5092055 | ||
|
|
a541317801 | ||
|
|
c7d15fbd3d | ||
|
|
420abe8240 | ||
|
|
95c9a1d638 | ||
|
|
7971eba517 | ||
|
|
c27e99aa6c | ||
|
|
5b22712058 | ||
|
|
c9109986d1 | ||
|
|
570508beba | ||
|
|
f890f9fdf1 | ||
|
|
94412b9c83 | ||
|
|
fca81dee71 | ||
|
|
9f956f965a | ||
|
|
2400325b22 | ||
|
|
ae3c8e8548 | ||
|
|
0007b2ab07 | ||
|
|
2594d43a53 | ||
|
|
39e6504bb5 | ||
|
|
402f777a90 | ||
|
|
7b0717c392 | ||
|
|
e303a8a300 | ||
|
|
31cb4b1ad9 | ||
|
|
ca746075db | ||
|
|
1676f36b5b | ||
|
|
0a2763e769 | ||
|
|
09d0612aeb | ||
|
|
9b3b0e2086 | ||
|
|
f28ab22ef9 | ||
|
|
935cb44639 | ||
|
|
5579c85bf4 | ||
|
|
ca856cbb35 | ||
|
|
6cee129a68 | ||
|
|
9fa420d6e3 | ||
|
|
ad7130b0d5 | ||
|
|
9f04510c9b | ||
|
|
5058fdf892 | ||
|
|
47043cf105 | ||
|
|
e5b726aa4a | ||
|
|
ae1dd6dfaa | ||
|
|
546d3f9b18 | ||
|
|
81cf35322e | ||
|
|
12afb565c7 | ||
|
|
5826231326 | ||
|
|
b0ac27ad23 | ||
|
|
5d1e286645 | ||
|
|
0baf5dba9f | ||
|
|
9019350f0c | ||
|
|
306154572e | ||
|
|
65da7fdfbd | ||
|
|
f12e4128e6 | ||
|
|
635be949f0 | ||
|
|
129e9d5417 | ||
|
|
f389fa4eb2 | ||
|
|
cb78009e64 | ||
|
|
b79b6ab846 | ||
|
|
026fbc910f | ||
|
|
63d3f02abe | ||
|
|
59a612c6fc | ||
|
|
b382b8b264 | ||
|
|
af0e14daff | ||
|
|
9cdb382d0d | ||
|
|
833d0723f2 | ||
|
|
064fca3b0a | ||
|
|
34a7ab3bf3 | ||
|
|
8aa8e431a7 | ||
|
|
fb838d198a | ||
|
|
532b1f370a | ||
|
|
c26f50d359 | ||
|
|
b723469b43 | ||
|
|
91c240c463 | ||
|
|
6bb589325b | ||
|
|
fbd3f05c63 | ||
|
|
07b3606d42 | ||
|
|
287d5a805d | ||
|
|
444c5e571e | ||
|
|
1bf20a3217 | ||
|
|
214e317804 | ||
|
|
8d0e89faf9 | ||
|
|
ae41e5f2e6 | ||
|
|
798a6c0eb6 | ||
|
|
7ebda3b9ae | ||
|
|
30c5493486 | ||
|
|
b4d27f3d0d | ||
|
|
e44a10de2c | ||
|
|
1baa59162e | ||
|
|
aacb11a22b | ||
|
|
d041b0e993 | ||
|
|
6c44808c19 | ||
|
|
ee28bacf0c | ||
|
|
199d05b910 | ||
|
|
138e59d74f | ||
|
|
dd26376b3b | ||
|
|
9e07ee862c | ||
|
|
9b11399d48 | ||
|
|
baf97a90a1 | ||
|
|
41d85e1f36 | ||
|
|
ce0a46dc2b | ||
|
|
3c39c8a788 | ||
|
|
321d6554e7 | ||
|
|
cc9cf92b27 | ||
|
|
02b4f66b12 | ||
|
|
8889323476 | ||
|
|
df1633f011 | ||
|
|
4e840f3025 | ||
|
|
e44bae66d5 | ||
|
|
4e073d1bb6 | ||
|
|
2fbb295490 | ||
|
|
b72631cd82 | ||
|
|
832c09980a | ||
|
|
ca68a8ef87 | ||
|
|
0645cec207 | ||
|
|
53dde3ec9e | ||
|
|
df5c16e05f | ||
|
|
bb3bb938e8 | ||
|
|
c196a2104e | ||
|
|
c78c596095 | ||
|
|
8d2d0f0b22 | ||
|
|
26d06e8f3a | ||
|
|
59eb8ae7f1 | ||
|
|
7d932016b8 | ||
|
|
998eb56348 | ||
|
|
7837064e80 | ||
|
|
53745c61e5 | ||
|
|
14adcff9dc | ||
|
|
7d67288766 | ||
|
|
d904b126df | ||
|
|
649df9be49 | ||
|
|
4e49c1f80d | ||
|
|
41eda72394 | ||
|
|
8a49398740 | ||
|
|
6fbec2b298 | ||
|
|
15d8bbead9 | ||
|
|
f2d72d70f1 | ||
|
|
0bcfd10a9d | ||
|
|
324b4f1b38 | ||
|
|
27f11db7f4 | ||
|
|
0c734c5351 | ||
|
|
48da6a84a6 | ||
|
|
21cb2657ca | ||
|
|
b7ee5e771e | ||
|
|
4967782464 | ||
|
|
29582469d2 | ||
|
|
18c1c9c69a | ||
|
|
ed3521cc53 | ||
|
|
4795d77e84 | ||
|
|
e0c594c402 | ||
|
|
5f02042124 | ||
|
|
4b09023b21 | ||
|
|
320197198b | ||
|
|
d31423d91e | ||
|
|
23bb6ac486 | ||
|
|
7da178c5ec | ||
|
|
1fe9d2598b | ||
|
|
9f56948f47 | ||
|
|
4e2822eb0a | ||
|
|
54697c44de | ||
|
|
b757055525 | ||
|
|
906211f0f5 | ||
|
|
05808e4587 | ||
|
|
0b685cc9a2 | ||
|
|
a9985fec2c | ||
|
|
315237d0fc | ||
|
|
3015db94be | ||
|
|
6ac3943043 | ||
|
|
c9a7f825de | ||
|
|
27c1925021 | ||
|
|
2332d85434 | ||
|
|
e8650525b2 | ||
|
|
ea882e9611 | ||
|
|
e46a28681d | ||
|
|
48ce3a3d8f | ||
|
|
f7fa8d0758 | ||
|
|
2d1094a8aa | ||
|
|
ff6b7d982b | ||
|
|
4c3219688b | ||
|
|
2b723bd094 | ||
|
|
de53ee09e3 | ||
|
|
745dd5ede0 | ||
|
|
ca267fd565 | ||
|
|
2bdbc4d792 | ||
|
|
bdf1ce640c | ||
|
|
8a1a3b971f | ||
|
|
8a9adb5c98 | ||
|
|
23d6444a54 | ||
|
|
2a098a9445 | ||
|
|
1e22364429 | ||
|
|
c65eff0de8 | ||
|
|
4ea26cfa32 | ||
|
|
f3f63454d3 | ||
|
|
194bd8085f | ||
|
|
52e9dac9ee | ||
|
|
9eafdbf741 | ||
|
|
3901b079d7 | ||
|
|
5529f7588c | ||
|
|
0271b0501b | ||
|
|
32ec6d6be7 | ||
|
|
110c68f1e0 | ||
|
|
e42a0102c2 | ||
|
|
ae8e8825b7 | ||
|
|
c287008fc6 | ||
|
|
c245c076f9 | ||
|
|
c6db6834e9 | ||
|
|
9fdb50d12a | ||
|
|
65faa84351 | ||
|
|
c2cfb709bb | ||
|
|
202559211c | ||
|
|
24e97e10c8 | ||
|
|
677456456d | ||
|
|
708de33603 | ||
|
|
5405244e4b | ||
|
|
9c12048964 | ||
|
|
3b5d21fcd4 | ||
|
|
eb15bec707 | ||
|
|
e9fd74ef5d | ||
|
|
d4a29db051 | ||
|
|
27075d1596 | ||
|
|
56bbd269c9 | ||
|
|
046a41177f | ||
|
|
14302d0106 | ||
|
|
68366bf9a3 | ||
|
|
7e65a81d31 | ||
|
|
5268ad041f | ||
|
|
7d325bd0db | ||
|
|
f6d0dd2d0f | ||
|
|
5fc3dff2d5 | ||
|
|
18461e1e47 | ||
|
|
7add4d358e | ||
|
|
c1dbc494ae | ||
|
|
409b5b8577 | ||
|
|
4548730df2 | ||
|
|
4170965c64 | ||
|
|
1f8895257d | ||
|
|
7286d4ffe0 | ||
|
|
2f2e4f389f | ||
|
|
ad47797467 | ||
|
|
ed66e69e7c | ||
|
|
81fa257915 | ||
|
|
0bd6006d70 | ||
|
|
81a0dd4a5c | ||
|
|
78b7dfcc36 | ||
|
|
5d728573cd | ||
|
|
881769b433 | ||
|
|
dfae6a686c | ||
|
|
5e0d640c2f | ||
|
|
a7133e92d8 | ||
|
|
027e16f676 | ||
|
|
53607f6fe7 | ||
|
|
4a9066b1cb | ||
|
|
23c0c63c6a | ||
|
|
20f031fcb4 | ||
|
|
a1c44bab40 | ||
|
|
38a91ce351 | ||
|
|
0e4f04d091 | ||
|
|
ef64e0f6ef | ||
|
|
1af58efad5 | ||
|
|
e741ac0a98 | ||
|
|
ec63618bea | ||
|
|
0efdb7dc33 | ||
|
|
101636a60a | ||
|
|
306b627ef8 | ||
|
|
d601aad274 | ||
|
|
6b0f60d859 | ||
|
|
7c2ab421e9 | ||
|
|
d37802185b | ||
|
|
d1e074c1ca | ||
|
|
a439d55bf8 | ||
|
|
1ad3acb5a5 | ||
|
|
3001a60ee0 | ||
|
|
aad6dcb269 | ||
|
|
ee02013fa5 | ||
|
|
c0736132b1 | ||
|
|
fa8493fd3e | ||
|
|
209038adb2 | ||
|
|
4dad8500bc | ||
|
|
6cffe74f36 | ||
|
|
0233adc184 | ||
|
|
ccbe7646da | ||
|
|
5d456dda67 | ||
|
|
42f251de21 | ||
|
|
f25c4e1423 | ||
|
|
4222fff2e3 | ||
|
|
35ac6eacbc | ||
|
|
e6becff209 | ||
|
|
d0b797d6bd | ||
|
|
014ae84983 | ||
|
|
2aeb8b5dea | ||
|
|
ad7feed5bf | ||
|
|
411d4dc1b3 | ||
|
|
467eee308f | ||
|
|
b740072209 | ||
|
|
d34627fab6 | ||
|
|
0cc6840506 | ||
|
|
d2d9781cfa | ||
|
|
af710acf9e | ||
|
|
62f3a834dc | ||
|
|
53b68c6e0b | ||
|
|
a195b89a71 | ||
|
|
00d00880ed | ||
|
|
2f8f272894 | ||
|
|
4207d1b03f | ||
|
|
73c5dc56d3 | ||
|
|
8891367791 | ||
|
|
8ca05bbb43 | ||
|
|
0e14db9f0b | ||
|
|
fa7bbd86b9 | ||
|
|
86a696ad15 | ||
|
|
783defbbed | ||
|
|
01f779ef37 | ||
|
|
29af52c72e | ||
|
|
a3ff9dacc8 | ||
|
|
c0155ad275 | ||
|
|
ad20c62c73 | ||
|
|
88281c57cd | ||
|
|
cb82489f33 | ||
|
|
66c16329ac | ||
|
|
c092c099be | ||
|
|
307c2ded5a | ||
|
|
00718b4293 | ||
|
|
7222ddd591 | ||
|
|
85db878943 | ||
|
|
3d33b0938b | ||
|
|
e7d2897582 | ||
|
|
4193c1358b | ||
|
|
9cf3f58dcb | ||
|
|
abb98f88af | ||
|
|
f17c597d7d | ||
|
|
ea78673811 | ||
|
|
9d8478a9c0 | ||
|
|
0113cfb78e | ||
|
|
612850efb6 | ||
|
|
b0eac8af63 | ||
|
|
b4c781b7fd | ||
|
|
b647b44c95 | ||
|
|
6f9a72557d | ||
|
|
86c8a45e01 | ||
|
|
d9dd692fa9 | ||
|
|
d735bcdc8b | ||
|
|
00234fa52a | ||
|
|
1878558392 | ||
|
|
86c45e39f6 | ||
|
|
7cb3797624 | ||
|
|
2473a59858 | ||
|
|
8de29b0a90 | ||
|
|
1f115e6836 | ||
|
|
347729a26e | ||
|
|
fac14772f5 | ||
|
|
1f2652cc5e | ||
|
|
f7ece80bec | ||
|
|
7d5059c6ca | ||
|
|
742e9419be | ||
|
|
053a5a55e6 | ||
|
|
390d2a42b8 | ||
|
|
ea0d699e1b | ||
|
|
d83122731b | ||
|
|
3399c51d25 | ||
|
|
6663915149 | ||
|
|
2fa968a923 | ||
|
|
862e6c3e7b | ||
|
|
65db835cb5 | ||
|
|
9f8b8d2596 | ||
|
|
08d69bf1e7 | ||
|
|
a20fc4d9d1 | ||
|
|
7ff6bdbaf6 | ||
|
|
374f2ab779 | ||
|
|
ac8a41004b | ||
|
|
b3418e8d90 | ||
|
|
078d8bd4e5 | ||
|
|
67912e18d0 | ||
|
|
38c4405c16 | ||
|
|
2cb5b54d33 | ||
|
|
13f1ae7c6f | ||
|
|
55bba313fe | ||
|
|
d168304a6d | ||
|
|
d018b9fba0 | ||
|
|
cf81177ed2 | ||
|
|
1b66ce9aa3 | ||
|
|
0d45d88dbd | ||
|
|
7692556d09 | ||
|
|
c08a13b2d1 | ||
|
|
706e8ef130 | ||
|
|
b326ccaaee | ||
|
|
3c14351a5b | ||
|
|
a59362b687 | ||
|
|
fab019a34c | ||
|
|
36712e5486 | ||
|
|
0e5c519363 | ||
|
|
f1ed03b77a | ||
|
|
76b44307ca | ||
|
|
563b9eeb8c | ||
|
|
90621a1dd9 | ||
|
|
2fb181d391 | ||
|
|
2753fc3505 | ||
|
|
c1765423a6 | ||
|
|
deb104c341 | ||
|
|
e0d844d35e | ||
|
|
eb8f2c4eba | ||
|
|
92afc9d8f0 | ||
|
|
5fd0bb034e | ||
|
|
bea124c33e | ||
|
|
0ffef5a767 | ||
|
|
5000be3263 | ||
|
|
edd903c0df | ||
|
|
90b3dd2c19 | ||
|
|
20cab9001b | ||
|
|
0e0d88d755 | ||
|
|
6aed6a0926 | ||
|
|
e67929857f | ||
|
|
e82c6322a0 | ||
|
|
73a1b860d5 | ||
|
|
d301b99738 | ||
|
|
37a659ab30 | ||
|
|
7bcbb4c5b9 | ||
|
|
f74a421f64 | ||
|
|
5f633efa59 | ||
|
|
d9a9747901 | ||
|
|
756ca31319 | ||
|
|
601591c7db | ||
|
|
0cca8f2c83 | ||
|
|
d5043446d9 | ||
|
|
49dc6f90bc | ||
|
|
d803802b43 | ||
|
|
8e382f104b | ||
|
|
b7f8162f5f | ||
|
|
6230510b2e | ||
|
|
f50c9a6b2d | ||
|
|
4cdafcccd2 | ||
|
|
42015f846f | ||
|
|
17ed24de8a | ||
|
|
03c6cf01de | ||
|
|
7ec1688825 | ||
|
|
210e602057 | ||
|
|
136341feef | ||
|
|
a71ceefc3f | ||
|
|
2cfd373463 | ||
|
|
416534b99c | ||
|
|
78ada2809e | ||
|
|
03a1b5ccd4 | ||
|
|
15a24b40de | ||
|
|
b4111d5ec5 | ||
|
|
5c1807c5f5 | ||
|
|
88f249e301 | ||
|
|
77e9283b95 | ||
|
|
6829ed9308 | ||
|
|
9265026e1e | ||
|
|
68d8ed9df0 | ||
|
|
20da98f597 | ||
|
|
3917bbc61b | ||
|
|
87f8c283d2 | ||
|
|
5beec7ea38 | ||
|
|
782732278e | ||
|
|
a728d4427e | ||
|
|
00c99eb41e | ||
|
|
a3ecfca30b | ||
|
|
4ca9d6979e | ||
|
|
bbeeb40d6a | ||
|
|
e1d52de410 | ||
|
|
459bd9ad31 | ||
|
|
7fd8a23f55 | ||
|
|
d84ec529f8 |
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,55 +1,56 @@
|
|||||||
|
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,
|
||||||
init=false,
|
cur='none',
|
||||||
resize=false,
|
init=false,
|
||||||
update=NULL,
|
resize=false,
|
||||||
draw=BGs.none.draw,
|
update=NULL,
|
||||||
event=false,
|
draw=BGs.none.draw,
|
||||||
discard=NULL,
|
event=false,
|
||||||
|
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
|
||||||
end
|
end
|
||||||
function BG.getList()
|
function BG.getList()
|
||||||
return BGlist
|
return BGlist
|
||||||
|
end
|
||||||
|
function BG.remList(name)
|
||||||
|
table.remove(BGlist,TABLE.find(BGlist,name))
|
||||||
end
|
end
|
||||||
function BG.send(...)
|
function BG.send(...)
|
||||||
if BG.event then
|
if BG.event then
|
||||||
BG.event(...)
|
BG.event(...)
|
||||||
end
|
end
|
||||||
end
|
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]then LOG.print("No BG file: "..background,10,COLOR.orange)end
|
if not BGs[name]or BG.locked then return end
|
||||||
if background==BG.cur or not SETTING.bg then return end
|
if name~=BG.cur then
|
||||||
BG.discard()
|
BG.discard()
|
||||||
BG.cur=background
|
BG.cur=name
|
||||||
background=BGs[background]
|
local bg=BGs[name]
|
||||||
if not background then
|
|
||||||
LOG.print("No BG called"..background,"warn")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
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
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
return BG
|
return BG
|
||||||
|
|||||||
@@ -1,100 +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,
|
--nowPlay=[str:playing ID]
|
||||||
play=NULL,
|
--playing=[src:playing SRC]
|
||||||
freshVolume=NULL,
|
--lastPlayed=[str:lastPlayed ID]
|
||||||
stop=NULL,
|
|
||||||
--nowPlay=[str:playing ID]
|
|
||||||
--playing=[src:playing SRC]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
|
||||||
|
|
||||||
local count=#list function BGM.getCount()return count end
|
|
||||||
local function fadeOut(src)
|
|
||||||
while true do
|
|
||||||
coroutine.yield()
|
|
||||||
local v=src:getVolume()-.025*SETTING.bgm
|
|
||||||
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.orange)
|
|
||||||
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
|
|
||||||
end
|
|
||||||
if s and Sources[s]and 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
|
|
||||||
end
|
|
||||||
function BGM.freshVolume()
|
|
||||||
if BGM.playing then
|
|
||||||
local v=SETTING.bgm
|
|
||||||
if v>0 then
|
|
||||||
BGM.playing:setVolume(v)
|
|
||||||
BGM.playing:play()
|
|
||||||
elseif BGM.nowPlay then
|
|
||||||
BGM.playing:pause()
|
|
||||||
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)
|
|
||||||
function BGM.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
return BGM
|
function BGM.setChange(func)
|
||||||
|
BGM.onChange=func
|
||||||
|
end
|
||||||
|
function BGM.setVol(v)
|
||||||
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
|
||||||
|
volume=v
|
||||||
|
if BGM.playing then
|
||||||
|
if volume>0 then
|
||||||
|
BGM.playing:setVolume(volume)
|
||||||
|
BGM.playing:play()
|
||||||
|
elseif BGM.nowPlay then
|
||||||
|
BGM.playing:pause()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function task_fadeOut(src)
|
||||||
|
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
|
||||||
|
return BGM
|
||||||
|
|||||||
@@ -1,111 +1,148 @@
|
|||||||
|
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},
|
|
||||||
lame= {0.7, 1.0, 0.0},
|
|
||||||
grass= {0.5, 1.0, 0.0},
|
|
||||||
green= {0.0, 1.0, 0.0},
|
|
||||||
water= {0.0, 1.0, 0.6},
|
|
||||||
cyan= {0.0, 1.0, 1.0},
|
|
||||||
sky= {0.0, 0.7, 1.0},
|
|
||||||
sea= {0.0, 0.4, 1.0},
|
|
||||||
blue= {0.2, 0.2, 1.0},
|
|
||||||
purple= {0.4, 0.0, 1.0},
|
|
||||||
grape= {0.7, 0.0, 1.0},
|
|
||||||
magenta= {1.0, 0.0, 1.0},
|
|
||||||
pink= {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)},
|
||||||
lLame= {0.8, 1.0, 0.4},
|
lime= {hsv(0.20, 0.89, 0.88)},
|
||||||
lGrass= {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)},
|
||||||
lWater= {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)},
|
||||||
lSky= {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)},
|
||||||
lPurple= {0.7, 0.4, 1.0},
|
violet= {hsv(0.74, 1.00, 0.91)},
|
||||||
lGrape= {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)},
|
||||||
lPink= {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)},
|
||||||
dLame= {0.5, 0.6, 0.0},
|
lLime= {hsv(0.20, 0.66, 0.92)},
|
||||||
dGrass= {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)},
|
||||||
dWater= {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)},
|
||||||
dSky= {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)},
|
||||||
dPurple= {0.2, 0.0, 0.6},
|
lViolet= {hsv(0.72, 0.47, 0.95)},
|
||||||
dGrape= {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)},
|
||||||
dPink= {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)},
|
||||||
dGrey= {0.3, 0.3, 0.3},
|
dFire= {hsv(0.04, 0.80, 0.34)},
|
||||||
grey= {0.6, 0.6, 0.6},
|
dOrange= {hsv(0.07, 0.80, 0.39)},
|
||||||
lGrey= {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)},
|
||||||
}
|
}
|
||||||
local map={
|
for k,v in next,{
|
||||||
R="red", G="green", B="blue", C="cyan", Y="yellow", M="magenta",
|
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", lG="lGreen",lB="lBlue", lC="lCyan", lY="lYellow", lM="lMagenta",
|
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", dG="dGreen",dB="dBlue", dC="dCyan", dY="dYellow", dM="dMagenta",
|
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',
|
||||||
W="white",
|
D='black',dH='dGray',H='gray',lH='lGray',Z='white',
|
||||||
}for k,v in next,map do COLOR[k]=COLOR[v]end
|
X='xGray',lX='lxGray',dX='dxGray',
|
||||||
|
--Remain letter: EIKQTUX
|
||||||
|
}do
|
||||||
|
COLOR[k]=COLOR[v]
|
||||||
|
end
|
||||||
|
setmetatable(COLOR,{__index=function(_,k)
|
||||||
|
error("No color: "..tostring(k))
|
||||||
|
end})
|
||||||
|
|
||||||
local list_norm={"red","fire","orange","yellow","lame","grass","green","water","cyan","sky","sea","blue","purple","grape","magenta","pink"}
|
|
||||||
local len_list_norm=#list_norm
|
do--Random generators
|
||||||
local rnd=math.random
|
local rnd=math.random
|
||||||
function COLOR.random_norm()
|
local list_norm={'red','fire','orange','yellow','lime','jade','green','aqua','cyan','navy','sea','blue','violet','purple','magenta','wine'}
|
||||||
return COLOR[list_norm[rnd(len_list_norm)]]
|
local len_list_norm=#list_norm
|
||||||
|
function COLOR.random_norm()
|
||||||
|
return COLOR[list_norm[rnd(len_list_norm)]]
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
function COLOR.random_bright()
|
||||||
|
return COLOR[list_bright[rnd(len_list_bright)]]
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
function COLOR.random_dark()
|
||||||
|
return COLOR[list_dark[rnd(len_list_dark)]]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local list_bright={"lRed","lFire","lOrange","lYellow","lLame","lGrass","lGreen","lWater","lCyan","lSky","lSea","lBlue","lPurple","lGrape","lMagenta","lPink"}
|
do--Rainbow generators
|
||||||
local len_list_bright=#list_bright
|
local sin=math.sin
|
||||||
function COLOR.random_bright()
|
function COLOR.rainbow(phase,a)
|
||||||
return COLOR[list_bright[rnd(len_list_bright)]]
|
return
|
||||||
|
sin(phase)*.4+.6,
|
||||||
|
sin(phase+2.0944)*.4+.6,
|
||||||
|
sin(phase-2.0944)*.4+.6,
|
||||||
|
a
|
||||||
|
end
|
||||||
|
function COLOR.rainbow_light(phase,a)
|
||||||
|
return
|
||||||
|
sin(phase)*.2+.7,
|
||||||
|
sin(phase+2.0944)*.2+.7,
|
||||||
|
sin(phase-2.0944)*.2+.7,
|
||||||
|
a
|
||||||
|
end
|
||||||
|
function COLOR.rainbow_dark(phase,a)
|
||||||
|
return
|
||||||
|
sin(phase)*.2+.4,
|
||||||
|
sin(phase+2.0944)*.2+.4,
|
||||||
|
sin(phase-2.0944)*.2+.4,
|
||||||
|
a
|
||||||
|
end
|
||||||
|
function COLOR.rainbow_gray(phase,a)
|
||||||
|
return
|
||||||
|
sin(phase)*.16+.5,
|
||||||
|
sin(phase+2.0944)*.16+.5,
|
||||||
|
sin(phase-2.0944)*.16+.5,
|
||||||
|
a
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local list_dark={"dRed","dFire","dOrange","dYellow","dLame","dGrass","dGreen","dWater","dCyan","dSky","dSea","dBlue","dPurple","dGrape","dMagenta","dPink"}
|
return COLOR
|
||||||
local len_list_dark=#list_dark
|
|
||||||
function COLOR.random_dark()
|
|
||||||
return COLOR[list_dark[rnd(len_list_dark)]]
|
|
||||||
end
|
|
||||||
|
|
||||||
local sin=math.sin
|
|
||||||
function COLOR.rainbow(phase)
|
|
||||||
return
|
|
||||||
sin(phase)*.4+.6,
|
|
||||||
sin(phase+2.0944)*.4+.6,
|
|
||||||
sin(phase-2.0944)*.4+.6
|
|
||||||
end
|
|
||||||
function COLOR.rainbow_light(phase)
|
|
||||||
return
|
|
||||||
sin(phase)*.2+.7,
|
|
||||||
sin(phase+2.0944)*.2+.7,
|
|
||||||
sin(phase-2.0944)*.2+.7
|
|
||||||
end
|
|
||||||
function COLOR.rainbow_dark(phase)
|
|
||||||
return
|
|
||||||
sin(phase)*.2+.4,
|
|
||||||
sin(phase+2.0944)*.2+.4,
|
|
||||||
sin(phase-2.0944)*.2+.4
|
|
||||||
end
|
|
||||||
function COLOR.rainbow_grey(phase)
|
|
||||||
return
|
|
||||||
sin(phase)*.16+.5,
|
|
||||||
sin(phase+2.0944)*.16+.5,
|
|
||||||
sin(phase-2.0944)*.16+.5
|
|
||||||
end
|
|
||||||
|
|
||||||
return COLOR
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
local gc=love.graphics
|
|
||||||
local cmds={
|
|
||||||
move="translate",
|
|
||||||
zoom="scale",
|
|
||||||
rgb="setColor",
|
|
||||||
wid="setLineWidth",
|
|
||||||
line="line",
|
|
||||||
rect="rectangle",
|
|
||||||
circ="circle",
|
|
||||||
poly="polygon",
|
|
||||||
}
|
|
||||||
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
|
|
||||||
gc[cmds[L[i][1]]](unpack(L[i],2))
|
|
||||||
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=DUMPTABLE(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,55 +1,105 @@
|
|||||||
local fs=love.filesystem
|
local fs=love.filesystem
|
||||||
local FILE={}
|
local FILE={}
|
||||||
function FILE.load(name)
|
function FILE.load(name,args)
|
||||||
if fs.getInfo(name)then
|
if not args then args=''end
|
||||||
local F=fs.newFile(name)
|
if fs.getInfo(name)then
|
||||||
if F:open("r")then
|
local F=fs.newFile(name)
|
||||||
local s=F:read()
|
assert(F:open'r','open error')
|
||||||
F:close()
|
local s=F:read()F:close()
|
||||||
if s:sub(1,6)=="return"then
|
local mode=
|
||||||
s=loadstring(s)
|
STRING.sArg(args,'-luaon')and'luaon'or
|
||||||
if s then
|
STRING.sArg(args,'-lua')and'lua'or
|
||||||
setfenv(s,{})
|
STRING.sArg(args,'-json')and'json'or
|
||||||
return s()
|
STRING.sArg(args,'-string')and'string'or
|
||||||
end
|
s:sub(1,6)=='return{'and'luaon'or
|
||||||
else
|
(s:sub(1,1)=='['and s:sub(-1)==']'or s:sub(1,1)=='{'and s:sub(-1)=='}')and'json'or
|
||||||
local res=JSON.decode(s)
|
'string'
|
||||||
if res then
|
if mode=='luaon'then
|
||||||
return res
|
local func,err_mes=loadstring(s)
|
||||||
end
|
if func then
|
||||||
end
|
setfenv(func,{})
|
||||||
end
|
local res=func()
|
||||||
LOG.print(name.." "..text.loadError,COLOR.red)
|
return assert(res,'decode error')
|
||||||
end
|
else
|
||||||
|
error('decode error: '..err_mes)
|
||||||
|
end
|
||||||
|
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)
|
||||||
|
if res then
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
error('decode error')
|
||||||
|
elseif mode=='string'then
|
||||||
|
return s
|
||||||
|
else
|
||||||
|
error('unknown mode')
|
||||||
|
end
|
||||||
|
else
|
||||||
|
error('no file')
|
||||||
|
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
|
||||||
name=name
|
if STRING.sArg(args,'-d')and fs.getInfo(name)then
|
||||||
if mode:find("l")then
|
error('duplicate')
|
||||||
data=DUMPTABLE(data)
|
end
|
||||||
if not data then
|
|
||||||
LOG.print(name.." "..text.saveError.."dump error","error")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
else
|
|
||||||
data=JSON.encode(data)
|
|
||||||
if not data then
|
|
||||||
LOG.print(name.." "..text.saveError.."json error","error")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local F=fs.newFile(name)
|
if type(data)=='table'then
|
||||||
F:open("w")
|
if STRING.sArg(args,'-luaon')then
|
||||||
local success,mes=F:write(data)
|
data=TABLE.dump(data)
|
||||||
F:flush()F:close()
|
if not data then
|
||||||
if success then
|
error('encode error')
|
||||||
if not mode:find("q")then
|
end
|
||||||
LOG.print(text.saveDone,COLOR.green)
|
else
|
||||||
end
|
data=JSON.encode(data)
|
||||||
else
|
if not data then
|
||||||
LOG.print(text.saveError..(mes or"unknown error"),"error")
|
error('encode error')
|
||||||
LOG.print(debug.traceback(),"error")
|
end
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
data=tostring(data)
|
||||||
|
end
|
||||||
|
|
||||||
|
local F=fs.newFile(name)
|
||||||
|
assert(F:open('w'),'open error')
|
||||||
|
F:write(data)F:flush()F:close()
|
||||||
end
|
end
|
||||||
return FILE
|
function FILE.clear(path)
|
||||||
|
if 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)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
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
|
||||||
|
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
|
|
||||||
count=count+1
|
|
||||||
IMG[k]=v
|
|
||||||
end
|
|
||||||
function IMG.getCount()return count end
|
|
||||||
local function load(skip)
|
|
||||||
local loaded=0
|
|
||||||
for k,v in next,list do
|
|
||||||
if type(v)=="string"then
|
|
||||||
IMG[k]=love.graphics.newImage("media/image/"..v)
|
|
||||||
else
|
|
||||||
for i=1,#v do
|
|
||||||
v[i]=love.graphics.newImage("media/image/"..v[i])
|
|
||||||
end
|
|
||||||
IMG[k]=v
|
|
||||||
end
|
|
||||||
loaded=loaded+1
|
|
||||||
if not skip and loaded~=count then
|
|
||||||
coroutine.yield()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
IMG.loadOne=nil
|
|
||||||
IMG.loadAll=nil
|
|
||||||
end
|
|
||||||
|
|
||||||
IMG.loadOne=coroutine.wrap(load)
|
setmetatable(IMG,{__index=function(self,name)
|
||||||
function IMG.loadAll()load(true)end
|
if type(list[name])=='table'then
|
||||||
|
self[name]={}
|
||||||
|
for i=1,#list[name]do
|
||||||
|
self[name][i]=love.graphics.newImage(list[name][i])
|
||||||
|
end
|
||||||
|
elseif type(list[name])=='string'then
|
||||||
|
self[name]=love.graphics.newImage(list[name])
|
||||||
|
else
|
||||||
|
LOG("No IMG: "..name)
|
||||||
|
self[name]=PAPER
|
||||||
|
end
|
||||||
|
return self[name]
|
||||||
|
end})
|
||||||
|
|
||||||
|
function IMG.loadAll()
|
||||||
|
for k in next,list do local _=IMG[k]end
|
||||||
|
IMG.loadAll=nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return IMG
|
return IMG
|
||||||
|
|||||||
1301
Zframework/init.lua
1301
Zframework/init.lua
File diff suppressed because it is too large
Load Diff
@@ -29,99 +29,92 @@ local json = {}
|
|||||||
-- Encode
|
-- Encode
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
local encode
|
local _encode
|
||||||
|
|
||||||
local escape_char_map = {
|
local escape_char_map = {
|
||||||
["\\"] = "\\",
|
["\\"] = "\\",
|
||||||
["\""] = "\"",
|
["\""] = "\"",
|
||||||
["\b"] = "b",
|
["\b"] = "b",
|
||||||
["\f"] = "f",
|
["\f"] = "f",
|
||||||
["\n"] = "n",
|
["\n"] = "n",
|
||||||
["\r"] = "r",
|
["\r"] = "r",
|
||||||
["\t"] = "t"
|
["\t"] = "t"
|
||||||
}
|
}
|
||||||
|
|
||||||
local escape_char_map_inv = {["/"] = "/"}
|
local escape_char_map_inv = {["/"] = "/"}
|
||||||
for k, v in pairs(escape_char_map) do escape_char_map_inv[v] = k end
|
for k, v in pairs(escape_char_map) do escape_char_map_inv[v] = k end
|
||||||
|
|
||||||
local function escape_char(c)
|
local function escape_char(c)
|
||||||
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
|
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function encode_nil() return "null" end
|
local function encode_nil() return "null" end
|
||||||
|
|
||||||
local function encode_table(val, stack)
|
local function encode_table(val, stack)
|
||||||
local res = {}
|
local res = {}
|
||||||
stack = stack or {}
|
stack = stack or {}
|
||||||
|
|
||||||
-- Circular reference?
|
-- Circular reference?
|
||||||
if stack[val] then error("circular reference") end
|
if stack[val] then error("circular reference") end
|
||||||
|
|
||||||
stack[val] = true
|
stack[val] = true
|
||||||
|
|
||||||
if rawget(val, 1) ~= nil or next(val) == nil then
|
if rawget(val, 1) ~= nil or next(val) == nil then
|
||||||
-- 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, ",") .. "}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function encode_string(val)
|
local function encode_string(val)
|
||||||
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
|
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
|
||||||
end
|
end
|
||||||
|
|
||||||
local function encode_number(val)
|
local function encode_number(val)
|
||||||
-- Check for NaN, -inf and inf
|
-- Check for NaN, -inf and inf
|
||||||
if val ~= val or val <= -math.huge or val >= math.huge then
|
if val ~= val or val <= -math.huge or val >= math.huge then
|
||||||
error("unexpected number value '" .. tostring(val) .. "'")
|
error("unexpected number value '" .. tostring(val) .. "'")
|
||||||
end
|
end
|
||||||
return string.format("%.14g", val)
|
return string.format("%.14g", 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
|
||||||
@@ -130,9 +123,9 @@ end
|
|||||||
local parse
|
local parse
|
||||||
|
|
||||||
local function create_set(...)
|
local function create_set(...)
|
||||||
local res = {}
|
local res = {}
|
||||||
for i = 1, select("#", ...) do res[select(i, ...)] = true end
|
for i = 1, select("#", ...) do res[select(i, ...)] = true end
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
|
|
||||||
local space_chars = create_set(" ", "\t", "\r", "\n")
|
local space_chars = create_set(" ", "\t", "\r", "\n")
|
||||||
@@ -143,213 +136,205 @@ local literals = create_set("true", "false", "null")
|
|||||||
local literal_map = {["true"] = true, ["false"] = false, ["null"] = nil}
|
local literal_map = {["true"] = true, ["false"] = false, ["null"] = nil}
|
||||||
|
|
||||||
local function next_char(str, idx, set, negate)
|
local function next_char(str, idx, set, negate)
|
||||||
for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end
|
for i = idx, #str do if set[str:sub(i, i)] ~= negate then return i end end
|
||||||
return #str + 1
|
return #str + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
local function decode_error(str, idx, msg)
|
local function decode_error(str, idx, msg)
|
||||||
local line_count = 1
|
local line_count = 1
|
||||||
local col_count = 1
|
local col_count = 1
|
||||||
for i = 1, idx - 1 do
|
for i = 1, idx - 1 do
|
||||||
col_count = col_count + 1
|
col_count = col_count + 1
|
||||||
if str:sub(i, i) == "\n" then
|
if str:sub(i, i) == "\n" then
|
||||||
line_count = line_count + 1
|
line_count = line_count + 1
|
||||||
col_count = 1
|
col_count = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
error(string.format("%s at line %d col %d", msg, line_count, col_count))
|
error(string.format("%s at line %d col %d", msg, line_count, col_count))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function codepoint_to_utf8(n)
|
local function codepoint_to_utf8(n)
|
||||||
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
|
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
|
||||||
local f = bit.rshift
|
local f = bit.rshift
|
||||||
if n <= 0x7f then
|
if n <= 0x7f then
|
||||||
return char(n)
|
return char(n)
|
||||||
elseif n <= 0x7ff then
|
elseif n <= 0x7ff then
|
||||||
return char(f(n, 6) + 192, n % 64 + 128)
|
return char(f(n, 6) + 192, n % 64 + 128)
|
||||||
elseif n <= 0xffff then
|
elseif n <= 0xffff then
|
||||||
return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128)
|
return char(f(n, 12) + 224, f(n % 4096, 6) + 128, n % 64 + 128)
|
||||||
elseif n <= 0x10ffff then
|
elseif n <= 0x10ffff then
|
||||||
return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128)
|
return char(f(n, 18) + 240, f(n % 262144, 12) + 128, f(n % 4096, 6) + 128, n % 64 + 128)
|
||||||
end
|
end
|
||||||
error(string.format("invalid unicode codepoint '%x'", n))
|
error(string.format("invalid unicode codepoint '%x'", n))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_unicode_escape(s)
|
local function parse_unicode_escape(s)
|
||||||
local n1 = tonumber(s:sub(1, 4), 16)
|
local n1 = tonumber(s:sub(1, 4), 16)
|
||||||
local n2 = tonumber(s:sub(7, 10), 16)
|
local n2 = tonumber(s:sub(7, 10), 16)
|
||||||
-- Surrogate pair?
|
-- Surrogate pair?
|
||||||
if n2 then
|
if n2 then
|
||||||
return
|
return
|
||||||
codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
|
codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
|
||||||
else
|
else
|
||||||
return codepoint_to_utf8(n1)
|
return codepoint_to_utf8(n1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_string(str, i)
|
local function parse_string(str, i)
|
||||||
local res = ""
|
local res = ""
|
||||||
local j = i + 1
|
local j = i + 1
|
||||||
local k = j
|
local k = j
|
||||||
|
|
||||||
while j <= #str do
|
while j <= #str do
|
||||||
local x = str:byte(j)
|
local x = str:byte(j)
|
||||||
|
|
||||||
if x < 32 then
|
if x < 32 then
|
||||||
decode_error(str, j, "control character in string")
|
decode_error(str, j, "control character in string")
|
||||||
|
|
||||||
elseif x == 92 then -- `\`: Escape
|
elseif x == 92 then -- `\`: Escape
|
||||||
res = res .. str:sub(k, j - 1)
|
res = res .. str:sub(k, j - 1)
|
||||||
j = j + 1
|
j = j + 1
|
||||||
local c = str:sub(j, j)
|
local c = str:sub(j, j)
|
||||||
if c == "u" then
|
if c == "u" then
|
||||||
local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or
|
local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1) or
|
||||||
str:match("^%x%x%x%x", j + 1) or
|
str:match("^%x%x%x%x", j + 1) or
|
||||||
decode_error(str, j - 1,
|
decode_error(str, j - 1,
|
||||||
"invalid unicode escape in string")
|
"invalid unicode escape in string")
|
||||||
res = res .. parse_unicode_escape(hex)
|
res = res .. parse_unicode_escape(hex)
|
||||||
j = j + #hex
|
j = j + #hex
|
||||||
else
|
else
|
||||||
if not escape_chars[c] then
|
if not escape_chars[c] then
|
||||||
decode_error(str, j - 1,
|
decode_error(str, j - 1,
|
||||||
"invalid escape char '" .. c .. "' in string")
|
"invalid escape char '" .. c .. "' in string")
|
||||||
end
|
end
|
||||||
res = res .. escape_char_map_inv[c]
|
res = res .. escape_char_map_inv[c]
|
||||||
end
|
end
|
||||||
k = j + 1
|
k = j + 1
|
||||||
|
|
||||||
elseif x == 34 then -- `"`: End of string
|
elseif x == 34 then -- `"`: End of string
|
||||||
res = res .. str:sub(k, j - 1)
|
res = res .. str:sub(k, j - 1)
|
||||||
return res, j + 1
|
return res, j + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
j = j + 1
|
j = j + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
decode_error(str, i, "expected closing quote for string")
|
decode_error(str, i, "expected closing quote for string")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_number(str, i)
|
local function parse_number(str, i)
|
||||||
local x = next_char(str, i, delim_chars)
|
local x = next_char(str, i, delim_chars)
|
||||||
local s = str:sub(i, x - 1)
|
local s = str:sub(i, x - 1)
|
||||||
local n = tonumber(s)
|
local n = tonumber(s)
|
||||||
if not n then decode_error(str, i, "invalid number '" .. s .. "'") end
|
if not n then decode_error(str, i, "invalid number '" .. s .. "'") end
|
||||||
return n, x
|
return n, x
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_literal(str, i)
|
local function parse_literal(str, i)
|
||||||
local x = next_char(str, i, delim_chars)
|
local x = next_char(str, i, delim_chars)
|
||||||
local word = str:sub(i, x - 1)
|
local word = str:sub(i, x - 1)
|
||||||
if not literals[word] then
|
if not literals[word] then
|
||||||
decode_error(str, i, "invalid literal '" .. word .. "'")
|
decode_error(str, i, "invalid literal '" .. word .. "'")
|
||||||
end
|
end
|
||||||
return literal_map[word], x
|
return literal_map[word], x
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_array(str, i)
|
local function parse_array(str, i)
|
||||||
local res = {}
|
local res = {}
|
||||||
local n = 1
|
local n = 1
|
||||||
i = i + 1
|
i = i + 1
|
||||||
while 1 do
|
while 1 do
|
||||||
local x
|
local x
|
||||||
i = next_char(str, i, space_chars, true)
|
i = next_char(str, i, space_chars, true)
|
||||||
-- Empty / end of array?
|
-- Empty / end of array?
|
||||||
if str:sub(i, i) == "]" then
|
if str:sub(i, i) == "]" then
|
||||||
i = i + 1
|
i = i + 1
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
-- Read token
|
-- Read token
|
||||||
x, i = parse(str, i)
|
x, i = parse(str, i)
|
||||||
res[n] = x
|
res[n] = x
|
||||||
n = n + 1
|
n = n + 1
|
||||||
-- Next token
|
-- Next token
|
||||||
i = next_char(str, i, space_chars, true)
|
i = next_char(str, i, space_chars, true)
|
||||||
local chr = str:sub(i, i)
|
local chr = str:sub(i, i)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
if chr == "]" then break end
|
if chr == "]" then break end
|
||||||
if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
|
if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
|
||||||
end
|
end
|
||||||
return res, i
|
return res, i
|
||||||
end
|
end
|
||||||
|
|
||||||
local function parse_object(str, i)
|
local function parse_object(str, i)
|
||||||
local res = {}
|
local res = {}
|
||||||
i = i + 1
|
i = i + 1
|
||||||
while 1 do
|
while 1 do
|
||||||
local key, val
|
local key, val
|
||||||
i = next_char(str, i, space_chars, true)
|
i = next_char(str, i, space_chars, true)
|
||||||
-- Empty / end of object?
|
-- Empty / end of object?
|
||||||
if str:sub(i, i) == "}" then
|
if str:sub(i, i) == "}" then
|
||||||
i = i + 1
|
i = i + 1
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
-- Read key
|
-- Read key
|
||||||
if str:sub(i, i) ~= '"' then
|
if str:sub(i, i) ~= '"' then
|
||||||
decode_error(str, i, "expected string for key")
|
decode_error(str, i, "expected string for key")
|
||||||
end
|
end
|
||||||
key, i = parse(str, i)
|
key, i = parse(str, i)
|
||||||
-- Read ':' delimiter
|
-- Read ':' delimiter
|
||||||
i = next_char(str, i, space_chars, true)
|
i = next_char(str, i, space_chars, true)
|
||||||
if str:sub(i, i) ~= ":" then
|
if str:sub(i, i) ~= ":" then
|
||||||
decode_error(str, i, "expected ':' after key")
|
decode_error(str, i, "expected ':' after key")
|
||||||
end
|
end
|
||||||
i = next_char(str, i + 1, space_chars, true)
|
i = next_char(str, i + 1, space_chars, true)
|
||||||
-- Read value
|
-- Read value
|
||||||
val, i = parse(str, i)
|
val, i = parse(str, i)
|
||||||
-- Set
|
-- Set
|
||||||
res[key] = val
|
res[key] = val
|
||||||
-- Next token
|
-- Next token
|
||||||
i = next_char(str, i, space_chars, true)
|
i = next_char(str, i, space_chars, true)
|
||||||
local chr = str:sub(i, i)
|
local chr = str:sub(i, i)
|
||||||
i = i + 1
|
i = i + 1
|
||||||
if chr == "}" then break end
|
if chr == "}" then break end
|
||||||
if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
|
if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
|
||||||
end
|
end
|
||||||
return res, i
|
return res, i
|
||||||
end
|
end
|
||||||
|
|
||||||
local char_func_map = {
|
local char_func_map = {
|
||||||
['"'] = parse_string,
|
['"'] = parse_string,
|
||||||
["0"] = parse_number,
|
["0"] = parse_number,
|
||||||
["1"] = parse_number,
|
["1"] = parse_number,
|
||||||
["2"] = parse_number,
|
["2"] = parse_number,
|
||||||
["3"] = parse_number,
|
["3"] = parse_number,
|
||||||
["4"] = parse_number,
|
["4"] = parse_number,
|
||||||
["5"] = parse_number,
|
["5"] = parse_number,
|
||||||
["6"] = parse_number,
|
["6"] = parse_number,
|
||||||
["7"] = parse_number,
|
["7"] = parse_number,
|
||||||
["8"] = parse_number,
|
["8"] = parse_number,
|
||||||
["9"] = parse_number,
|
["9"] = parse_number,
|
||||||
["-"] = parse_number,
|
["-"] = parse_number,
|
||||||
["t"] = parse_literal,
|
["t"] = parse_literal,
|
||||||
["f"] = parse_literal,
|
["f"] = parse_literal,
|
||||||
["n"] = parse_literal,
|
["n"] = parse_literal,
|
||||||
["["] = parse_array,
|
["["] = parse_array,
|
||||||
["{"] = parse_object
|
["{"] = parse_object
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse(str, idx)
|
function parse(str, idx)
|
||||||
local chr = str:sub(idx, idx)
|
local chr = str:sub(idx, idx)
|
||||||
local f = char_func_map[chr]
|
local f = char_func_map[chr]
|
||||||
if f then return f(str, idx) end
|
if f then return f(str, idx) end
|
||||||
decode_error(str, idx, "unexpected character '" .. chr .. "'")
|
decode_error(str, idx, "unexpected character '" .. chr .. "'")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function decode(str)
|
|
||||||
if type(str) ~= "string" then
|
|
||||||
error("expected argument of type string, got " .. type(str))
|
|
||||||
end
|
|
||||||
local res, idx = parse(str, next_char(str, 1, space_chars, true))
|
|
||||||
idx = next_char(str, idx, space_chars, true)
|
|
||||||
if idx <= #str then decode_error(str, idx, "trailing garbage") end
|
|
||||||
return res
|
|
||||||
end
|
|
||||||
function json.decode(str)
|
function json.decode(str)
|
||||||
local a,b=pcall(decode,str)
|
if type(str) ~= 'string' then
|
||||||
if a then
|
error("expected argument of type string, got " .. type(str))
|
||||||
return b
|
end
|
||||||
elseif LOG then
|
local res, idx = parse(str, next_char(str, 1, space_chars, true))
|
||||||
LOG.print(text.jsonError..": "..(b or"uknErr"),"warn")
|
idx = next_char(str, idx, space_chars, true)
|
||||||
end
|
if idx <= #str then decode_error(str, idx, "trailing garbage") end
|
||||||
|
return res
|
||||||
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()
|
||||||
for k,v in next,T0 do
|
function LANG.init(defaultLang,langList,publicText,pretreatFunc)
|
||||||
if type(v)=="table"and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
|
local function _langFallback(T0,T)
|
||||||
if not T[k]then T[k]={}end
|
for k,v in next,T0 do
|
||||||
if type(T[k])=="table"then langFallback(v,T[k])end
|
if type(v)=='table'and not v.refuseCopy then--refuseCopy: just copy pointer, not contents
|
||||||
elseif not T[k]then
|
if not T[k]then T[k]={}end
|
||||||
T[k]=v
|
if type(T[k])=='table'then
|
||||||
end
|
_langFallback(v,T[k])
|
||||||
end
|
end
|
||||||
end
|
elseif not T[k]then
|
||||||
local tipMeta={__call=function(L)return L[math.random(#L)]end}
|
T[k]=v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for i=1,#langList do
|
--Set public text
|
||||||
local L=langList[i]
|
if publicText then
|
||||||
|
for _,L in next,langList do
|
||||||
|
for key,list in next,publicText do L[key]=list end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--Set public text
|
--Fallback to default language
|
||||||
for key,list in next,publicText do
|
for name,L in next,langList do
|
||||||
L[key]=list
|
if name~=defaultLang then
|
||||||
end
|
_langFallback(langList[L.fallback or defaultLang],L)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--Fallback to other language, default zh
|
--Custom pretreatment for each language
|
||||||
if i>1 then
|
if pretreatFunc then
|
||||||
langFallback(langList[L.fallback or 1],L)
|
for _,L in next,langList do
|
||||||
end
|
pretreatFunc(L)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--Metatable:__call for table:getTip
|
function LANG.get(l)
|
||||||
if type(rawget(L,"getTip"))=="table"then
|
if not langList[l]then
|
||||||
setmetatable(L.getTip,tipMeta)
|
LOG("Wrong language: "..tostring(l))
|
||||||
end
|
l=defaultLang
|
||||||
|
end
|
||||||
|
return langList[l]
|
||||||
|
end
|
||||||
|
|
||||||
--set global name for all back button
|
function LANG.addScene(name)
|
||||||
for _,v in next,L.WidgetText do
|
for _,L in next,langList do
|
||||||
v.back=L.back
|
if L.WidgetText and not L.WidgetText[name]then
|
||||||
end
|
L.WidgetText[name]={}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
LANG.init,LANG.setLangList,LANG.setPublicText=nil
|
function LANG.init()end
|
||||||
|
|
||||||
function LANG.set(l)
|
|
||||||
text=langList[l]
|
|
||||||
WIDGET.setLang(text.WidgetText)
|
|
||||||
for k,v in next,drawableText do
|
|
||||||
if text[k]then
|
|
||||||
v:set(text[k])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function LANG.addScene(name)
|
|
||||||
for i=1,#langList do
|
|
||||||
if langList[i].WidgetText and not langList[i].WidgetText[name]then
|
|
||||||
langList[i].WidgetText[name]={back=langList[i].back}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return LANG
|
return LANG
|
||||||
|
|||||||
@@ -1,89 +1,86 @@
|
|||||||
--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
|
||||||
end
|
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
|
|
||||||
local r,g,b,a=gc.getColor()
|
|
||||||
setCanvas(L.blackCanvas)clear()
|
|
||||||
setCanvas(L.shadowCanvas)clear()
|
|
||||||
setCanvas(L.renderCanvas)clear()
|
|
||||||
lightRenderShader:send("xresolution",L.size)
|
|
||||||
shadowMapShader:send("yresolution",L.size)
|
|
||||||
|
|
||||||
--Get up-left of light
|
--Initialization
|
||||||
local X=L.x-L.size*.5
|
gc_setCanvas(L.blackCanvas)clear()
|
||||||
local Y=L.y-L.size*.5
|
gc_setCanvas(L.shadowCanvas)clear()
|
||||||
|
gc_setCanvas(L.renderCanvas)clear()
|
||||||
|
lightRenderShader:send('xresolution',s)
|
||||||
|
shadowMapShader:send('yresolution',s)
|
||||||
|
|
||||||
--Render solid
|
--Get up-left of light
|
||||||
translate(-X,-Y)
|
local X=L.x-s*.5
|
||||||
L.blackCanvas:renderTo(L.blackFn)
|
local Y=L.y-s*.5
|
||||||
translate(X,Y)
|
|
||||||
|
|
||||||
--Render shade canvas by solid
|
--Render solid
|
||||||
setShader(shadowMapShader)
|
gc_translate(-X,-Y)
|
||||||
setCanvas(L.shadowCanvas)
|
L.blackCanvas:renderTo(L.blackFn)
|
||||||
render(L.blackCanvas)
|
gc_translate(X,Y)
|
||||||
|
|
||||||
--Render light canvas by shade
|
--Render shade canvas by solid
|
||||||
setShader(lightRenderShader)
|
gc_setShader(shadowMapShader)
|
||||||
setCanvas(L.renderCanvas)
|
gc_setCanvas(L.shadowCanvas)
|
||||||
render(L.shadowCanvas,0,0,0,1,L.size)
|
gc_draw(L.blackCanvas)
|
||||||
|
|
||||||
--Ready to final render
|
--Render light canvas by shade
|
||||||
setShader()setCanvas()gc.setBlendMode("add")
|
gc_setShader(lightRenderShader)
|
||||||
|
gc_setCanvas(L.renderCanvas)
|
||||||
|
gc_draw(L.shadowCanvas,0,0,0,1,s)
|
||||||
|
|
||||||
--Render to screes
|
--Ready to final render
|
||||||
gc.setColor(r,g,b,a)
|
gc_setShader()gc_setCanvas()gc.setBlendMode('add')
|
||||||
render(L.renderCanvas,X,Y+L.size,0,1,-1)
|
|
||||||
|
|
||||||
--Reset
|
--Render to screen
|
||||||
gc.setBlendMode("alpha")
|
gc_draw(L.renderCanvas,X,Y+s,0,1,-1)
|
||||||
|
|
||||||
|
--Reset
|
||||||
|
gc.setBlendMode('alpha')
|
||||||
end
|
end
|
||||||
|
|
||||||
local LIGHT={}
|
local LIGHT={}
|
||||||
function LIGHT.draw()
|
function LIGHT.draw()
|
||||||
for i=1,#Lights do
|
gc_setColor(1,1,1)
|
||||||
draw(Lights[i])
|
for i=1,#Lights do
|
||||||
end
|
drawLight(Lights[i])
|
||||||
|
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]=nil
|
Lights[i].shadowCanvas:release()
|
||||||
end
|
Lights[i].renderCanvas:release()
|
||||||
|
Lights[i]=nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function LIGHT.add(x,y,radius,solidFunc)
|
function LIGHT.add(x,y,radius,solidFunc)
|
||||||
local id=#Lights+1
|
local id=#Lights+1
|
||||||
Lights[id]={
|
Lights[id]={
|
||||||
id=id,
|
id=id,
|
||||||
x=x,y=y,size=radius,
|
x=x,y=y,size=radius,
|
||||||
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
|
||||||
|
|||||||
@@ -2,28 +2,28 @@
|
|||||||
extern float xresolution;
|
extern float xresolution;
|
||||||
// Sample from 1D vis-depth map
|
// Sample from 1D vis-depth map
|
||||||
float samp(vec2 coord,float r,Image u_texture){
|
float samp(vec2 coord,float r,Image u_texture){
|
||||||
return step(r,Texel(u_texture,coord).r);
|
return step(r,Texel(u_texture,coord).r);
|
||||||
}
|
}
|
||||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
|
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
|
||||||
// Cartesian to polar, y of 1D sample is always 0
|
// Cartesian to polar, y of 1D sample is always 0
|
||||||
vec2 norm=tex_coords.st*2.-1.;
|
vec2 norm=tex_coords.st*2.-1.;
|
||||||
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
vec2 tc=vec2((atan(norm.y,norm.x)+PI)/(2.*PI),0.);
|
||||||
float r=length(norm);
|
float r=length(norm);
|
||||||
|
|
||||||
// Enlarge blur parameter by distance, light scattering simulation
|
// Enlarge blur parameter by distance, light scattering simulation
|
||||||
float blur=(1./xresolution)*smoothstep(0.3,1.,r);
|
float blur=(1./xresolution)*smoothstep(0.3,1.,r);
|
||||||
|
|
||||||
// Simple Gaussian blur
|
// Simple Gaussian blur
|
||||||
float sum=// Brightness(0~1)
|
float sum=// Brightness(0~1)
|
||||||
samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1
|
samp(vec2(tc.x-3.*blur,tc.y),r,tex)*0.1
|
||||||
+samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13
|
+samp(vec2(tc.x-2.*blur,tc.y),r,tex)*0.13
|
||||||
+samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17
|
+samp(vec2(tc.x-1.*blur,tc.y),r,tex)*0.17
|
||||||
|
|
||||||
+samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows.
|
+samp(tc,r,tex)*0.2// The center tex coord, which gives us hard shadows.
|
||||||
+samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17
|
+samp(vec2(tc.x+1.*blur,tc.y),r,tex)*0.17
|
||||||
+samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13
|
+samp(vec2(tc.x+2.*blur,tc.y),r,tex)*0.13
|
||||||
+samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1;
|
+samp(vec2(tc.x+3.*blur,tc.y),r,tex)*0.1;
|
||||||
|
|
||||||
// Multiply the distance to get a soft fading
|
// Multiply the distance to get a soft fading
|
||||||
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
return vec4(vec3(1.),sum*smoothstep(1.,0.,r));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
#define PI 3.14
|
#define PI 3.14
|
||||||
extern float yresolution;
|
extern float yresolution;
|
||||||
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
|
vec4 effect(vec4 color,Image tex,vec2 tex_coords,vec2 screen_coords){
|
||||||
// Iterate through the occluder map's y-axis.
|
// Iterate through the occluder map's y-axis.
|
||||||
for(float y=0.;y<yresolution;y++){
|
for(float y=0.;y<yresolution;y++){
|
||||||
// Cartesian to polar
|
// Cartesian to polar
|
||||||
// y/yresolution=distance to light source(0~1)
|
// y/yresolution=distance to light source(0~1)
|
||||||
vec2 norm=vec2(tex_coords.s,y/yresolution)*2.-1.;
|
vec2 norm=vec2(tex_coords.s,y/yresolution)*2.-1.;
|
||||||
float theta=PI*1.5+norm.x*PI;
|
float theta=PI*1.5+norm.x*PI;
|
||||||
float r=(1.+norm.y)*0.5;
|
float r=(1.+norm.y)*0.5;
|
||||||
|
|
||||||
//sample from solid
|
//sample from solid
|
||||||
if(
|
if(
|
||||||
Texel(tex,(
|
Texel(tex,(
|
||||||
vec2(-r*sin(theta),-r*cos(theta))*0.5+0.5// Coord of solid sampling
|
vec2(-r*sin(theta),-r*cos(theta))*0.5+0.5// Coord of solid sampling
|
||||||
)).a>0.1
|
)).a>0.1
|
||||||
)return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent
|
)return vec4(vec3(y/yresolution),1.);// Collision check, alpha>0.1 means transparent
|
||||||
}
|
}
|
||||||
return vec4(1.);// Return max distance 1
|
return vec4(1.);// Return max distance 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +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.red)
|
|
||||||
end
|
|
||||||
elseif SYSTEM=="Android"then
|
|
||||||
local fs=love.filesystem
|
|
||||||
local platform={"arm64-v8a","armeabi-v7a"}
|
|
||||||
local libFunc
|
|
||||||
for i=1,#platform do
|
|
||||||
local soFile,size=fs.read("data","libAndroid/"..platform[i].."/"..libName.Android)
|
|
||||||
if soFile then
|
|
||||||
local success,message=fs.write(libName.Android,soFile,size)
|
|
||||||
if success then
|
|
||||||
libFunc,message=package.loadlib(table.concat({SAVEDIR,libName.Android},"/"),libName.libFunc)
|
|
||||||
if libFunc then
|
|
||||||
LOG.print(name.." lib loaded","warn",COLOR.green)
|
|
||||||
break
|
|
||||||
else
|
|
||||||
LOG.print("Cannot load "..name..": "..message,"warn",COLOR.red)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
LOG.print("Write "..name.."-"..platform[i].." to saving failed: "..message,"warn",COLOR.red)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
LOG.print("Read "..name.."-"..platform[i].." failed","warn",COLOR.red)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not libFunc then
|
|
||||||
LOG.print("Cannot load "..name,"warn",COLOR.red)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
return libFunc()
|
|
||||||
else
|
|
||||||
LOG.print("No "..name.." for "..SYSTEM,"warn",COLOR.red)
|
|
||||||
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_NAME,
|
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]
|
end
|
||||||
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)
|
function LOG.read()
|
||||||
end
|
return table.concat(logs,"\n")
|
||||||
end
|
|
||||||
end
|
end
|
||||||
function LOG.print(text,T,C)--text,type/time,color
|
|
||||||
local time
|
return LOG
|
||||||
local his
|
|
||||||
if T=="warn"then
|
|
||||||
C=C or COLOR.yellow
|
|
||||||
his=true
|
|
||||||
time=180
|
|
||||||
elseif T=="error"then
|
|
||||||
C=C or COLOR.red
|
|
||||||
his=true
|
|
||||||
time=210
|
|
||||||
elseif T=="message"then
|
|
||||||
C=C or COLOR.sky
|
|
||||||
his=true
|
|
||||||
elseif type(T)=="number"then
|
|
||||||
C=C or COLOR.white
|
|
||||||
time=T
|
|
||||||
elseif type(T)=="table"then
|
|
||||||
C=T
|
|
||||||
elseif not C then
|
|
||||||
C=COLOR.white
|
|
||||||
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.blue)
|
|
||||||
end
|
|
||||||
return LOG
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
local printf=love.graphics.printf
|
|
||||||
local draw=love.graphics.draw
|
|
||||||
local mDraw={}
|
|
||||||
function mDraw.str(str,x,y)printf(str,x-626,y,1252,"center")end
|
|
||||||
function mDraw.simpX(str,x,y)draw(str,x-str:getWidth()*.5,y)end
|
|
||||||
function mDraw.simpY(str,x,y)draw(str,x,y-str:getHeight()*.5)end
|
|
||||||
function mDraw.X(str,x,y,a,k)draw(str,x,y,a,k,nil,str:getWidth()*.5,0)end
|
|
||||||
function mDraw.Y(str,x,y,a,k)draw(str,x,y,a,k,nil,0,str:getHeight()*.5)end
|
|
||||||
function mDraw.draw(str,x,y,a,k)draw(str,x,y,a,k,nil,str:getWidth()*.5,str:getHeight()*.5)end
|
|
||||||
return mDraw
|
|
||||||
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
|
||||||
@@ -1,159 +1,157 @@
|
|||||||
local clock = os.clock
|
local clock=os.clock
|
||||||
|
|
||||||
local profile = {}
|
local profile={}
|
||||||
|
|
||||||
local _labeled = {} -- function labels
|
local _labeled={} -- function labels
|
||||||
local _defined = {} -- function definitions
|
local _defined={} -- function definitions
|
||||||
local _tcalled = {} -- time of last call
|
local _tcalled={} -- time of last call
|
||||||
local _telapsed = {}-- total execution time
|
local _telapsed={}-- total execution time
|
||||||
local _ncalls = {} -- number of calls
|
local _ncalls={} -- number of calls
|
||||||
local _internal = {}-- list of internal profiler functions
|
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
|
||||||
-- find the line definition
|
-- find the line definition
|
||||||
if not _defined[f] then
|
if not _defined[f]then
|
||||||
_defined[f] = info.short_src .. ":" .. info.linedefined
|
_defined[f]=info.short_src..":"..info.linedefined
|
||||||
_ncalls[f] = 0
|
_ncalls[f]=0
|
||||||
_telapsed[f] = 0
|
_telapsed[f]=0
|
||||||
end
|
end
|
||||||
if _tcalled[f] then
|
if _tcalled[f]then
|
||||||
local dt = clock() - _tcalled[f]
|
local dt=clock()-_tcalled[f]
|
||||||
_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
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Starts collecting data.
|
--- Starts collecting data.
|
||||||
function profile.start()
|
function profile.start()
|
||||||
if rawget(_G, 'jit') then
|
if jit then
|
||||||
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.
|
||||||
function profile.stop()
|
function profile.stop()
|
||||||
debug.sethook()
|
debug.sethook()
|
||||||
for f in next, _tcalled do
|
for f in next,_tcalled do
|
||||||
local dt = clock() - _tcalled[f]
|
local dt=clock()-_tcalled[f]
|
||||||
_telapsed[f] = _telapsed[f] + dt
|
_telapsed[f]=_telapsed[f]+dt
|
||||||
_tcalled[f] = nil
|
_tcalled[f]=nil
|
||||||
end
|
end
|
||||||
-- merge closures
|
-- merge closures
|
||||||
local lookup = {}
|
local lookup={}
|
||||||
for f, d in next, _defined do
|
for f,d in next,_defined do
|
||||||
local id = (_labeled[f] or '?') .. d
|
local id=(_labeled[f]or"?")..d
|
||||||
local f2 = lookup[id]
|
local f2=lookup[id]
|
||||||
if f2 then
|
if f2 then
|
||||||
_ncalls[f2] = _ncalls[f2] + (_ncalls[f] or 0)
|
_ncalls[f2]=_ncalls[f2]+(_ncalls[f]or 0)
|
||||||
_telapsed[f2] = _telapsed[f2] + (_telapsed[f] or 0)
|
_telapsed[f2]=_telapsed[f2]+(_telapsed[f]or 0)
|
||||||
_defined[f], _labeled[f] = nil, nil
|
_defined[f],_labeled[f]=nil,nil
|
||||||
_ncalls[f], _telapsed[f] = nil, nil
|
_ncalls[f],_telapsed[f]=nil,nil
|
||||||
else
|
else
|
||||||
lookup[id] = f
|
lookup[id]=f
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
collectgarbage('collect')
|
collectgarbage()
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Resets all collected data.
|
--- Resets all collected data.
|
||||||
function profile.reset()
|
function profile.reset()
|
||||||
for f in next, _ncalls do
|
for f in next,_ncalls do
|
||||||
_ncalls[f] = 0
|
_ncalls[f]=0
|
||||||
_telapsed[f] = 0
|
_telapsed[f]=0
|
||||||
_tcalled[f] = nil
|
_tcalled[f]=nil
|
||||||
end
|
end
|
||||||
collectgarbage('collect')
|
collectgarbage()
|
||||||
end
|
end
|
||||||
|
|
||||||
function profile.comp(a, b)
|
local function _comp(a,b)
|
||||||
local dt = _telapsed[b] - _telapsed[a]
|
local dt=_telapsed[b]-_telapsed[a]
|
||||||
return dt == 0 and _ncalls[b] < _ncalls[a] or dt < 0
|
return dt==0 and _ncalls[b]<_ncalls[a]or dt<0
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Iterates all functions that have been called since the profile was started.
|
--- Iterates all functions that have been called since the profile was started.
|
||||||
function profile.query(limit)
|
function profile.query(limit)
|
||||||
local t = {}
|
local t={}
|
||||||
for f, n in next, _ncalls do
|
for f,n in next,_ncalls do
|
||||||
if n > 0 then
|
if n>0 then
|
||||||
t[#t + 1] = f
|
t[#t+1]=f
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(t, profile.comp)
|
table.sort(t,_comp)
|
||||||
if limit then
|
|
||||||
while #t > limit do
|
if limit then while #t>limit do table.remove(t)end end
|
||||||
table.remove(t)
|
|
||||||
end
|
for i,f in ipairs(t)do
|
||||||
end
|
local dt=0
|
||||||
for i, f in ipairs(t) do
|
if _tcalled[f]then
|
||||||
local dt = 0
|
dt=clock()-_tcalled[f]
|
||||||
if _tcalled[f] then
|
end
|
||||||
dt = clock() - _tcalled[f]
|
t[i]={i,_labeled[f]or"?",math.floor((_telapsed[f]+dt)*1e6)/1e6,_ncalls[f],_defined[f]}
|
||||||
end
|
end
|
||||||
t[i] = {i, _labeled[f] or '?', math.floor((_telapsed[f] + dt) * 1e6) / 1e6, _ncalls[f], _defined[f]}
|
return t
|
||||||
end
|
|
||||||
return t
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cols = {3, 20, 8, 6, 32}
|
local cols={3,20,8,6,32}
|
||||||
function profile.report(n)
|
function profile.report(n)
|
||||||
local out = {}
|
local out={}
|
||||||
local report = profile.query(n)
|
local report=profile.query(n)
|
||||||
for i, row in ipairs(report) do
|
for i,row in ipairs(report)do
|
||||||
for j = 1, 5 do
|
for j=1,5 do
|
||||||
local s = tostring(row[j])
|
local s=tostring(row[j])
|
||||||
local l1, l2 = #s, cols[j]
|
local l1,l2=#s,cols[j]
|
||||||
if l1 < l2 then
|
if l1<l2 then
|
||||||
s = s .. (' '):rep(l2 - l1)
|
s=s..(" "):rep(l2-l1)
|
||||||
elseif l1 > l2 then
|
elseif l1>l2 then
|
||||||
s = s:sub(l1 - l2 + 1, l1)
|
s=s:sub(l1-l2+1,l1)
|
||||||
end
|
end
|
||||||
row[j] = s
|
row[j]=s
|
||||||
end
|
end
|
||||||
out[i] = table.concat(row, ' | ')
|
out[i]=table.concat(row," | ")
|
||||||
end
|
end
|
||||||
|
|
||||||
local row = " +-----+----------------------+----------+--------+----------------------------------+ \n"
|
local row=" +-----+----------------------+----------+--------+----------------------------------+ \n"
|
||||||
local col = " | # | Function | Time | Calls | Code | \n"
|
local col=" | # | Function | Time | Calls | Code | \n"
|
||||||
local sz = row .. col .. row
|
local sz=row..col..row
|
||||||
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
|
switch=not switch
|
||||||
profile.stop()
|
if not switch then
|
||||||
love.system.setClipboardText(PROFILE.report())
|
profile.stop()
|
||||||
PROFILE.reset()
|
love.system.setClipboardText(profile.report())
|
||||||
LOG.print("profile report copied!")
|
profile.reset()
|
||||||
else
|
return false
|
||||||
PROFILE.start()
|
else
|
||||||
LOG.print("profile start!")
|
profile.start()
|
||||||
end
|
return true
|
||||||
switch = not switch
|
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,165 +1,210 @@
|
|||||||
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
|
||||||
stat={
|
swapping=false, --If Swapping
|
||||||
tar=false, --Swapping target
|
stat={
|
||||||
style=false,--Swapping style
|
tar=false, --Swapping target
|
||||||
mid=false, --Loading point
|
style=false, --Swapping style
|
||||||
time=false, --Full swap time
|
changeTime=false,--Loading point
|
||||||
draw=false, --Swap draw func
|
time=false, --Full swap time
|
||||||
},
|
draw=false, --Swap draw func
|
||||||
stack={},--Scene stack
|
},
|
||||||
|
stack={},--Scene stack
|
||||||
|
prev=false,
|
||||||
|
args={},--Arguments from previous scene
|
||||||
|
|
||||||
scenes=scenes,
|
scenes=scenes,
|
||||||
|
|
||||||
--Events
|
--Events
|
||||||
update=false,
|
update=false,
|
||||||
draw=false,
|
draw=false,
|
||||||
mouseClick=false,
|
mouseClick=false,
|
||||||
touchClick=false,
|
touchClick=false,
|
||||||
mouseDown=false,
|
mouseDown=false,
|
||||||
mouseMove=false,
|
mouseMove=false,
|
||||||
mouseUp=false,
|
mouseUp=false,
|
||||||
wheelMoved=false,
|
wheelMoved=false,
|
||||||
touchDown=false,
|
touchDown=false,
|
||||||
touchUp=false,
|
touchUp=false,
|
||||||
touchMove=false,
|
touchMove=false,
|
||||||
keyDown=false,
|
keyDown=false,
|
||||||
keyUp=false,
|
keyUp=false,
|
||||||
gamepadDown=false,
|
gamepadDown=false,
|
||||||
gamepadUp=false,
|
gamepadUp=false,
|
||||||
socketRead=false,
|
fileDropped=false,
|
||||||
|
directoryDropped=false,
|
||||||
|
resize=false,
|
||||||
|
socketRead=false,
|
||||||
}--Scene datas, returned
|
}--Scene datas, returned
|
||||||
|
|
||||||
function SCN.add(name,scene)
|
function SCN.add(name,scene)
|
||||||
scenes[name]=scene
|
scenes[name]=scene
|
||||||
if scene.widgetList then
|
if scene.widgetList then
|
||||||
setmetatable(scene.widgetList,WIDGET.indexMeta)
|
setmetatable(scene.widgetList,WIDGET.indexMeta)
|
||||||
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)
|
||||||
end
|
SCN.mainTouchID=nil
|
||||||
if S.time==0 then
|
end
|
||||||
SCN.swapping=false
|
if S.time<0 then
|
||||||
end
|
SCN.swapping=false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function SCN.init(s,org)
|
function SCN.init(s)
|
||||||
local S=scenes[s]
|
love.keyboard.setTextInput(false)
|
||||||
SCN.cur=s
|
|
||||||
|
|
||||||
WIDGET.set(S.widgetList)
|
local S=scenes[s]
|
||||||
SCN.sceneInit=S.sceneInit
|
SCN.cur=s
|
||||||
SCN.sceneBack=S.sceneBack
|
|
||||||
SCN.update=S.update
|
WIDGET.setScrollHeight(S.widgetScrollHeight)
|
||||||
SCN.draw=S.draw
|
WIDGET.setWidgetList(S.widgetList)
|
||||||
SCN.mouseClick=S.mouseClick
|
SCN.sceneInit=S.sceneInit
|
||||||
SCN.touchClick=S.touchClick
|
SCN.sceneBack=S.sceneBack
|
||||||
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.wheelMoved=S.wheelMoved
|
SCN.mouseClick=S.mouseClick
|
||||||
SCN.touchDown=S.touchDown
|
SCN.wheelMoved=S.wheelMoved
|
||||||
SCN.touchUp=S.touchUp
|
SCN.touchDown=S.touchDown
|
||||||
SCN.touchMove=S.touchMove
|
SCN.touchUp=S.touchUp
|
||||||
SCN.keyDown=S.keyDown
|
SCN.touchMove=S.touchMove
|
||||||
SCN.keyUp=S.keyUp
|
SCN.touchClick=S.touchClick
|
||||||
SCN.gamepadDown=S.gamepadDown
|
SCN.keyDown=S.keyDown
|
||||||
SCN.gamepadUp=S.gamepadUp
|
SCN.keyUp=S.keyUp
|
||||||
SCN.socketRead=S.socketRead
|
SCN.gamepadDown=S.gamepadDown
|
||||||
if S.sceneInit then S.sceneInit(org)end
|
SCN.gamepadUp=S.gamepadUp
|
||||||
|
SCN.fileDropped=S.fileDropped
|
||||||
|
SCN.directoryDropped=S.directoryDropped
|
||||||
|
SCN.resize=S.resize
|
||||||
|
SCN.socketRead=S.socketRead
|
||||||
|
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
|
},
|
||||||
gc.setColor(0,0,0,t)
|
flash={
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
duration=.16,changeTime=.08,
|
||||||
end},
|
draw=function()gc.clear(1,1,1)end
|
||||||
fade_togame={120,20,function(t)
|
},
|
||||||
t=t>20 and(120-t)/100 or t/20
|
fade={
|
||||||
gc.setColor(0,0,0,t)
|
duration=.5,changeTime=.25,
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
draw=function(t)
|
||||||
end},
|
t=t>.25 and 2-t*4 or t*4
|
||||||
slowFade={180,90,function(t)
|
gc.setColor(0,0,0,t)
|
||||||
t=t>90 and 2-t/90 or t/90
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
gc.setColor(0,0,0,t)
|
end
|
||||||
gc.rectangle("fill",0,0,SCR.w,SCR.h)
|
},
|
||||||
end},
|
fade_togame={
|
||||||
swipeL={30,15,function(t)
|
duration=2,changeTime=.5,
|
||||||
t=t/30
|
draw=function(t)
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
t=t>.5 and(2-t)/1.5 or t*.5
|
||||||
t=t*t*(3-2*t)*2-1
|
gc.setColor(0,0,0,t)
|
||||||
gc.rectangle("fill",t*SCR.w,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
end},
|
end
|
||||||
swipeR={30,15,function(t)
|
},
|
||||||
t=t/30
|
slowFade={
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
duration=3,changeTime=1.5,
|
||||||
t=t*t*(2*t-3)*2+1
|
draw=function(t)
|
||||||
gc.rectangle("fill",t*SCR.w,0,SCR.w,SCR.h)
|
t=t>1.5 and (3-t)/1.5 or t/1.5
|
||||||
end},
|
gc.setColor(0,0,0,t)
|
||||||
swipeD={30,15,function(t)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
t=t/30
|
end
|
||||||
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
},
|
||||||
t=t*t*(2*t-3)*2+1
|
swipeL={
|
||||||
gc.rectangle("fill",0,t*SCR.h,SCR.w,SCR.h)
|
duration=.5,changeTime=.25,
|
||||||
end},
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
|
t=t*t*(3-2*t)*2-1
|
||||||
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
swipeR={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
|
t=t*t*(2*t-3)*2+1
|
||||||
|
gc.rectangle('fill',t*SCR.w,0,SCR.w,SCR.h)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
swipeD={
|
||||||
|
duration=.5,changeTime=.25,
|
||||||
|
draw=function(t)
|
||||||
|
t=t*2
|
||||||
|
gc.setColor(.1,.1,.1,1-abs(t-.5))
|
||||||
|
t=t*t*(2*t-3)*2+1
|
||||||
|
gc.rectangle('fill',0,t*SCR.h,SCR.w,SCR.h)
|
||||||
|
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
|
||||||
local S=SCN.stat
|
SCN.args={...}
|
||||||
S.tar,S.style=tar,style
|
local S=SCN.stat
|
||||||
S.time,S.mid,S.draw=unpack(swap[style])
|
S.tar,S.style=tar,style
|
||||||
end
|
S.time=swap[style].duration
|
||||||
else
|
S.changeTime=swap[style].changeTime
|
||||||
LOG.print("No Scene: "..tar,"warn")
|
S.draw=swap[style].draw
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
MES.new('warn',"No Scene: "..tar)
|
||||||
|
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(...)
|
||||||
--Leave scene
|
if SCN.swapping then return end
|
||||||
if SCN.sceneBack then SCN.sceneBack()end
|
|
||||||
|
|
||||||
--Poll&Back to previous Scene
|
--Leave scene
|
||||||
local m=#SCN.stack
|
if SCN.sceneBack then
|
||||||
if m>0 then
|
SCN.sceneBack()
|
||||||
SCN.swapTo(SCN.stack[m-1],SCN.stack[m])
|
end
|
||||||
SCN.stack[m],SCN.stack[m-1]=nil
|
|
||||||
end
|
--Poll&Back to previous Scene
|
||||||
|
local m=#SCN.stack
|
||||||
|
if m>0 then
|
||||||
|
SCN.swapTo(SCN.stack[m-1],SCN.stack[m],...)
|
||||||
|
SCN.stack[m],SCN.stack[m-1]=nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return SCN
|
return SCN
|
||||||
|
|||||||
@@ -1,47 +1,73 @@
|
|||||||
local SCR={
|
local SCR={
|
||||||
w0=1280,h0=720, --Default Screen Size
|
w0=1280,h0=720, --Default Screen Size
|
||||||
x=0,y=0, --Up-left Coord on screen
|
x=0,y=0, --Up-left Coord on screen
|
||||||
cx=0,cy=0, --Center Coord on screen (Center X/Y)
|
cx=0,cy=0, --Center Coord on screen (Center X/Y)
|
||||||
ex=0,ey=0, --Down-right Coord on screen (End X/Y)
|
ex=0,ey=0, --Down-right Coord on screen (End X/Y)
|
||||||
w=0,h=0, --Fullscreen w/h for graphic functions
|
w=0,h=0, --Fullscreen w/h for graphic functions
|
||||||
W=0,H=0, --Fullscreen w/h for shader
|
W=0,H=0, --Fullscreen w/h for shader
|
||||||
safeX=0,safeY=0,--Safe area
|
safeX=0,safeY=0,--Safe area
|
||||||
safeW=0,safeH=0,--Safe area
|
safeW=0,safeH=0,--Safe area
|
||||||
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
|
||||||
end
|
end
|
||||||
function SCR.resize(w,h)
|
function SCR.resize(w,h)
|
||||||
SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale()
|
SCR.w,SCR.h,SCR.dpi=w,h,love.graphics.getDPIScale()
|
||||||
SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi
|
SCR.W,SCR.H=SCR.w*SCR.dpi,SCR.h*SCR.dpi
|
||||||
SCR.r=h/w
|
SCR.r=h/w
|
||||||
SCR.rad=(w^2+h^2)^.5
|
SCR.rad=(w^2+h^2)^.5
|
||||||
|
|
||||||
if SCR.r>=SCR.h0/SCR.w0 then
|
SCR.x,SCR.y=0,0
|
||||||
SCR.k=w/SCR.w0
|
if SCR.r>=SCR.h0/SCR.w0 then
|
||||||
SCR.x,SCR.y=0,(h-w*SCR.h0/SCR.w0)/2
|
SCR.k=w/SCR.w0
|
||||||
else
|
SCR.y=(h-SCR.h0*SCR.k)/2
|
||||||
SCR.k=h/SCR.h0
|
else
|
||||||
SCR.x,SCR.y=(w-h*SCR.w0/SCR.h0)/2,0
|
SCR.k=h/SCR.h0
|
||||||
end
|
SCR.x=(w-SCR.w0*SCR.k)/2
|
||||||
SCR.safeX,SCR.safeY,SCR.safeW,SCR.safeH=love.window.getSafeArea()
|
end
|
||||||
SCR.xOy:setTransformation(w/2,h/2,nil,SCR.k,nil,SCR.w0/2,SCR.h0/2)
|
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.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{
|
||||||
("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0),
|
("w0,h0 : %d, %d"):format(SCR.w0,SCR.h0),
|
||||||
("x,y : %d, %d"):format(SCR.x,SCR.y),
|
("x,y : %d, %d"):format(SCR.x,SCR.y),
|
||||||
("cx,cy : %d, %d"):format(SCR.cx,SCR.cy),
|
("cx,cy : %d, %d"):format(SCR.cx,SCR.cy),
|
||||||
("ex,ey : %d, %d"):format(SCR.ex,SCR.ey),
|
("ex,ey : %d, %d"):format(SCR.ex,SCR.ey),
|
||||||
("w,h : %d, %d"):format(SCR.w,SCR.h),
|
("w,h : %d, %d"):format(SCR.w,SCR.h),
|
||||||
("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,96 +1,170 @@
|
|||||||
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,
|
||||||
}
|
}
|
||||||
function SFX.init(list)
|
local noteName={'C','C#','D','D#','E','F','F#','G','G#','A','A#','B'}
|
||||||
SFX.init=nil
|
local function _getTuneHeight(tune)
|
||||||
local rem=table.remove
|
local octave=tonumber(tune:sub(-1,-1))
|
||||||
local Sources={}
|
if octave then
|
||||||
|
local tuneHeight=noteVal[tune:sub(1,1)]
|
||||||
local count=#list function SFX.getCount()return count end
|
if tuneHeight then
|
||||||
local function load(skip)
|
tuneHeight=tuneHeight+(octave-1)*12
|
||||||
for i=1,count do
|
local s=tune:sub(2,2)
|
||||||
local N="media/SFX/"..list[i]..".ogg"
|
if s=='s'or s=='#'then
|
||||||
if love.filesystem.getInfo(N)then
|
tuneHeight=tuneHeight+1
|
||||||
Sources[list[i]]={love.audio.newSource(N,"static")}
|
elseif s=='f'or s=='b'then
|
||||||
else
|
tuneHeight=tuneHeight-1
|
||||||
LOG.print("No SFX file: "..N,5,COLOR.orange)
|
end
|
||||||
end
|
return tuneHeight
|
||||||
if not skip and i~=count then
|
end
|
||||||
coroutine.yield()
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
SFX.loadOne=nil
|
|
||||||
|
|
||||||
function SFX.fieldPlay(s,v,P)
|
|
||||||
SFX.play(s,v,(P.curX+P.cur.sc[2]-5.5)*.15)
|
|
||||||
end
|
|
||||||
function SFX.play(s,vol,pos)
|
|
||||||
if SETTING.sfx==0 or vol==0 then return end
|
|
||||||
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)
|
|
||||||
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)
|
|
||||||
else
|
|
||||||
S:setPosition(0,0,0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
S:setVolume(vol^1.626)
|
|
||||||
S:play()
|
|
||||||
end
|
|
||||||
function SFX.reset()
|
|
||||||
for _,L in next,Sources do
|
|
||||||
if type(L)=="table"then
|
|
||||||
for i=#L,1,-1 do
|
|
||||||
if not L[i]:isPlaying()then
|
|
||||||
rem(L,i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
SFX.loadOne=coroutine.wrap(load)
|
|
||||||
function SFX.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
return SFX
|
|
||||||
|
local SFX={}
|
||||||
|
|
||||||
|
function SFX.init(list)
|
||||||
|
assert(type(list)=='table',"Initialize SFX lib with a list of filenames!")
|
||||||
|
for i=1,#list do table.insert(sfxList,list[i])end
|
||||||
|
end
|
||||||
|
function SFX.load(path)
|
||||||
|
local c=0
|
||||||
|
local missing=0
|
||||||
|
for i=1,#sfxList do
|
||||||
|
local fullPath=path..sfxList[i]..'.ogg'
|
||||||
|
if love.filesystem.getInfo(fullPath)then
|
||||||
|
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
|
||||||
|
LOG("No SFX: "..sfxList[i]..'.ogg',.1)
|
||||||
|
missing=missing+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
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.getCount()
|
||||||
|
return #sfxList
|
||||||
|
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
|
||||||
|
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=interval(pos,-1,1)*stereo
|
||||||
|
S:setPosition(pos,1-pos^2,0)
|
||||||
|
else
|
||||||
|
S:setPosition(0,0,0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
S:setVolume(vol^1.626)
|
||||||
|
S:setPitch(pitch and 1.0594630943592953^pitch or 1)
|
||||||
|
S:play()
|
||||||
|
end
|
||||||
|
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
|
||||||
|
if type(L)=='table'then
|
||||||
|
for i=#L,1,-1 do
|
||||||
|
if not L[i]:isPlaying()then
|
||||||
|
rem(L,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return SFX
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
local find,sub=string.find,string.sub
|
|
||||||
return function(s,sep)
|
|
||||||
local L={}
|
|
||||||
local p1,p2=1--start,target
|
|
||||||
while p1<=#s do
|
|
||||||
p2=find(s,sep,p1)or #s+1
|
|
||||||
L[#L+1]=sub(s,p1,p2-1)
|
|
||||||
p1=p2+#sep
|
|
||||||
end
|
|
||||||
return L
|
|
||||||
end
|
|
||||||
231
Zframework/stringExtend.lua
Normal file
231
Zframework/stringExtend.lua
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
local data=love.data
|
||||||
|
local STRING={}
|
||||||
|
local assert,tostring,tonumber=assert,tostring,tonumber
|
||||||
|
local int,format=math.floor,string.format
|
||||||
|
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)
|
||||||
|
local shiftMap={
|
||||||
|
['1']='!',['2']='@',['3']='#',['4']='$',['5']='%',
|
||||||
|
['6']='^',['7']='&',['8']='*',['9']='(',['0']=')',
|
||||||
|
['`']='~',['-']='_',['=']='+',
|
||||||
|
['[']='{',[']']='}',['\\']='|',
|
||||||
|
[';']=':',['\'']='"',
|
||||||
|
[',']='<',['.']='>',['/']='?',
|
||||||
|
}
|
||||||
|
function STRING.shiftChar(c)
|
||||||
|
return shiftMap[c]or upper(c)
|
||||||
|
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)
|
||||||
|
local L={}
|
||||||
|
local p1,p2=1--start,target
|
||||||
|
if regex then
|
||||||
|
while p1<=#s do
|
||||||
|
p2=find(s,sep,p1)or #s+1
|
||||||
|
L[#L+1]=sub(s,p1,p2-1)
|
||||||
|
p1=p2+#sep
|
||||||
|
end
|
||||||
|
else
|
||||||
|
while p1<=#s do
|
||||||
|
p2=find(s,sep,p1,true)or #s+1
|
||||||
|
L[#L+1]=sub(s,p1,p2-1)
|
||||||
|
p1=p2+#sep
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.simpEmailCheck(e)
|
||||||
|
e=STRING.split(e,"@")
|
||||||
|
if #e~=2 then return false end
|
||||||
|
if e[1]:sub(-1)=="."or e[2]:sub(-1)=="."then return false end
|
||||||
|
local e1,e2=STRING.split(e[1],"."),STRING.split(e[2],".")
|
||||||
|
if #e1*#e2==0 then return false end
|
||||||
|
for _,v in next,e1 do if #v==0 then return false end end
|
||||||
|
for _,v in next,e2 do if #v==0 then return false end end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.time_simp(t)
|
||||||
|
return format("%02d:%02d",int(t/60),int(t%60))
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
return format("%d:%.2d'%05.2f\"",int(t/3600),int(t/60%60),int(t%60*100)/100)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function STRING.UTF8(n)--Simple utf8 coding
|
||||||
|
assert(type(n)=='number',"Wrong type ("..type(n)..")")
|
||||||
|
assert(n>=0 and n<2^31,"Out of range ("..n..")")
|
||||||
|
if n<2^7 then return char(n)
|
||||||
|
elseif n<2^11 then return char(192+int(n/2^06),128+n%2^6)
|
||||||
|
elseif n<2^16 then return char(224+int(n/2^12),128+int(n/2^06)%2^6,128+n%2^6)
|
||||||
|
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)
|
||||||
|
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
|
||||||
|
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]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return out
|
||||||
|
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
|
||||||
@@ -1,205 +1,205 @@
|
|||||||
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 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
|
||||||
|
|
||||||
local FXupdate={}
|
local FXupdate={}
|
||||||
function FXupdate.badge(S,dt)
|
function FXupdate.badge(S,dt)
|
||||||
S.t=S.t+dt
|
S.t=S.t+dt
|
||||||
if S.t<.2 then
|
if S.t<.2 then
|
||||||
S.x,S.y=S.x1-14,S.y1-14
|
S.x,S.y=S.x1-14,S.y1-14
|
||||||
elseif S.t<.8 then
|
elseif S.t<.8 then
|
||||||
local t=((S.t-.2)*1.6667)
|
local t=((S.t-.2)*1.6667)
|
||||||
t=(3-2*t)*t*t
|
t=(3-2*t)*t*t
|
||||||
S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14
|
S.x,S.y=S.x1*(1-t)+S.x2*t-14,S.y1*(1-t)+S.y2*t-14
|
||||||
else
|
else
|
||||||
S.x,S.y=S.x2-14,S.y2-14
|
S.x,S.y=S.x2-14,S.y2-14
|
||||||
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
|
||||||
S.y=S.y+S.vy*S.rate
|
S.y=S.y+S.vy*S.rate
|
||||||
if S.ax then
|
if S.ax then
|
||||||
S.vx=S.vx+S.ax*S.rate
|
S.vx=S.vx+S.ax*S.rate
|
||||||
S.vy=S.vy+S.ay*S.rate
|
S.vy=S.vy+S.ay*S.rate
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
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,
|
||||||
S.y1*(1-t2)+S.y2*t2
|
S.y1*(1-t2)+S.y2*t2
|
||||||
)
|
)
|
||||||
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)*.2)
|
|
||||||
gc.circle("fill",S.x,S.y,(t*(1-t)*2)*30)
|
|
||||||
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
|
||||||
end
|
end
|
||||||
function SYSFX.draw()
|
function SYSFX.draw()
|
||||||
for i=1,#fx do
|
for i=1,#fx do
|
||||||
fx[i]:draw()
|
fx[i]:draw()
|
||||||
end
|
end
|
||||||
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,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
x1=x1,y1=y1,--Start pos
|
x1=x1,y1=y1,--Start pos
|
||||||
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)
|
||||||
fx[#fx+1]={
|
local T=
|
||||||
update=FXupdate.tap,
|
{
|
||||||
draw=FXdraw.tap,
|
update=FXupdate.tap,
|
||||||
t=0,
|
draw=FXdraw.tap,
|
||||||
rate=rate,
|
t=0,
|
||||||
x=x,y=y,
|
rate=rate,
|
||||||
}
|
x=x,y=y,
|
||||||
|
}
|
||||||
|
ins(fx,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,
|
||||||
rate=rate*(.9+rnd()*.2),
|
rate=rate*(.9+rnd()*.2),
|
||||||
image=image,size=size,
|
image=image,size=size,
|
||||||
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
|
cx=image:getWidth()*.5,cy=image:getHeight()*.5,
|
||||||
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,
|
||||||
rate=rate,
|
rate=rate,
|
||||||
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,52 +1,255 @@
|
|||||||
|
local find=string.find
|
||||||
|
local rem=table.remove
|
||||||
local next,type=next,type
|
local next,type=next,type
|
||||||
local TABLE={}
|
local TABLE={}
|
||||||
function TABLE.shift(org)
|
|
||||||
local L={}
|
--Get a new filled table
|
||||||
for i=1,#org do
|
function TABLE.new(val,count)
|
||||||
if type(org[i])~="table"then
|
local L={}
|
||||||
L[i]=org[i]
|
for i=1,count do
|
||||||
else
|
L[i]=val
|
||||||
L[i]=TABLE.shift(org[i])
|
end
|
||||||
end
|
return L
|
||||||
end
|
|
||||||
return L
|
|
||||||
end
|
end
|
||||||
function TABLE.copy(org)
|
|
||||||
local L={}
|
--Get a copy of [1~#] elements
|
||||||
for k,v in next,org do
|
function TABLE.shift(org,depth)
|
||||||
if type(v)~="table"then
|
if not depth then depth=1e99 end
|
||||||
L[k]=v
|
local L={}
|
||||||
else
|
for i=1,#org do
|
||||||
L[k]=TABLE.copy(v)
|
if type(org[i])=='table'and depth>0 then
|
||||||
end
|
L[i]=TABLE.shift(org[i],depth-1)
|
||||||
end
|
else
|
||||||
return L
|
L[i]=org[i]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L
|
||||||
end
|
end
|
||||||
function TABLE.add(G,base)--For all things in G if same type in base, push to base
|
|
||||||
for k,v in next,G do
|
--Get a full copy of a table, depth = how many layers will be recreate, default to inf
|
||||||
if type(v)==type(base[k])then
|
function TABLE.copy(org,depth)
|
||||||
if type(v)=="table"then
|
if not depth then depth=1e99 end
|
||||||
TABLE.add(v,base[k])
|
local L={}
|
||||||
else
|
for k,v in next,org do
|
||||||
base[k]=v
|
if type(v)=='table'and depth>0 then
|
||||||
end
|
L[k]=TABLE.copy(v,depth-1)
|
||||||
end
|
else
|
||||||
end
|
L[k]=v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L
|
||||||
end
|
end
|
||||||
function TABLE.complete(G,base)--For all things in G if no val in base, push to base
|
|
||||||
for k,v in next,G do
|
--For all things in new, push to old
|
||||||
if base[k]==nil then
|
function TABLE.cover(new,old)
|
||||||
base[k]=v
|
for k,v in next,new do
|
||||||
elseif type(v)=="table"and type(base[k])=="table"then
|
old[k]=v
|
||||||
TABLE.complete(v,base[k])
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
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
|
||||||
|
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
|
||||||
|
|
||||||
|
--For all things in new if no val in old, push to old
|
||||||
|
function TABLE.complete(new,old)
|
||||||
|
for k,v in next,new do
|
||||||
|
if type(v)=='table'then
|
||||||
|
if old[k]==nil then old[k]={}end
|
||||||
|
TABLE.complete(v,old[k])
|
||||||
|
elseif old[k]==nil then
|
||||||
|
old[k]=v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Remove [1~#] of table
|
||||||
|
function TABLE.cut(G)
|
||||||
|
for i=1,#G do
|
||||||
|
G[i]=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Clear table
|
||||||
|
function TABLE.clear(G)
|
||||||
|
for k in next,G do
|
||||||
|
G[k]=nil
|
||||||
|
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
|
||||||
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
|
||||||
return TABLE
|
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
--Dump a simple lua table
|
||||||
|
do--function TABLE.dump(L,t)
|
||||||
|
local tabs={
|
||||||
|
[0]="",
|
||||||
|
"\t",
|
||||||
|
"\t\t",
|
||||||
|
"\t\t\t",
|
||||||
|
"\t\t\t\t",
|
||||||
|
"\t\t\t\t\t",
|
||||||
|
}
|
||||||
|
local function dump(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=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
|
||||||
|
TABLE.dump=dump
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,51 +1,56 @@
|
|||||||
local rem=table.remove
|
local rem=table.remove
|
||||||
local ct=coroutine
|
local assert,resume,status=assert,coroutine.resume,coroutine.status
|
||||||
local assert=assert
|
|
||||||
local tasks={}
|
local tasks={}
|
||||||
|
|
||||||
local TASK={}
|
local TASK={}
|
||||||
function TASK.getCount()
|
function TASK.getCount()
|
||||||
return #tasks
|
return #tasks
|
||||||
end
|
end
|
||||||
function TASK.update()
|
local trigFrame=0
|
||||||
for i=#tasks,1,-1 do
|
function TASK.update(dt)
|
||||||
local T=tasks[i]
|
trigFrame=trigFrame+dt*60
|
||||||
assert(ct.resume(T.thread))
|
while trigFrame>=1 do
|
||||||
if ct.status(T.thread)=="dead"then
|
for i=#tasks,1,-1 do
|
||||||
rem(tasks,i)
|
local T=tasks[i]
|
||||||
end
|
if status(T.thread)=='dead'then
|
||||||
end
|
rem(tasks,i)
|
||||||
|
else
|
||||||
|
assert(resume(T.thread))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
trigFrame=trigFrame-1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function TASK.new(code,...)
|
function TASK.new(code,...)
|
||||||
local thread=ct.create(code)
|
local thread=coroutine.create(code)
|
||||||
ct.resume(thread,...)
|
assert(resume(thread,...))
|
||||||
if ct.status(thread)~="dead"then
|
if status(thread)~='dead'then
|
||||||
tasks[#tasks+1]={
|
tasks[#tasks+1]={
|
||||||
thread=thread,
|
thread=thread,
|
||||||
code=code,
|
code=code,
|
||||||
args={...},
|
args={...},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function TASK.removeTask_code(code)
|
function TASK.removeTask_code(code)
|
||||||
for i=#tasks,1,-1 do
|
for i=#tasks,1,-1 do
|
||||||
if tasks[i].code==code then
|
if tasks[i].code==code then
|
||||||
rem(tasks,i)
|
rem(tasks,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function TASK.removeTask_iterate(func,...)
|
function TASK.removeTask_iterate(func,...)
|
||||||
for i=#tasks,1,-1 do
|
for i=#tasks,1,-1 do
|
||||||
if func(tasks[i],...)then
|
if func(tasks[i],...)then
|
||||||
rem(tasks,i)
|
rem(tasks,i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function TASK.clear()
|
function TASK.clear()
|
||||||
local i=#tasks
|
local i=#tasks
|
||||||
while i>0 do
|
while i>0 do
|
||||||
tasks[i]=nil
|
tasks[i]=nil
|
||||||
i=i-1
|
i=i-1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return TASK
|
return TASK
|
||||||
|
|||||||
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,128 +1,153 @@
|
|||||||
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={}
|
||||||
function TEXT.clear()
|
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=assert(textFX[style or'appear'],"no text type:"..style),--Draw method
|
||||||
draw=textFX[style or"appear"]or error("unavailable 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
|
||||||
for i=#list,1,-1 do
|
list=texts
|
||||||
local t=list[i]
|
end
|
||||||
t.c=t.c+t.spd
|
for i=#list,1,-1 do
|
||||||
if t.stop then
|
local t=list[i]
|
||||||
if t.c>t.stop then
|
t.c=t.c+t.spd*dt
|
||||||
t.c=t.stop
|
if t.stop then
|
||||||
end
|
if t.c>t.stop then
|
||||||
end
|
t.c=t.stop
|
||||||
if t.c>1 then
|
end
|
||||||
rem(list,i)
|
end
|
||||||
end
|
if t.c>1 then
|
||||||
end
|
rem(list,i)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
function TEXT.draw(list)
|
function TEXT.draw(list)
|
||||||
if not list then list=texts end
|
if not list then
|
||||||
for i=1,#list do
|
list=texts
|
||||||
local t=list[i]
|
end
|
||||||
local p=t.c
|
for i=1,#list do
|
||||||
gc_setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
local t=list[i]
|
||||||
setFont(t.font)
|
local p=t.c
|
||||||
t:draw()
|
setColor(1,1,1,p<.2 and p*5 or p<.8 and 1 or 5-p*5)
|
||||||
end
|
t:draw()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return TEXT
|
return TEXT
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
local int,format=math.floor,string.format
|
|
||||||
return function(s)
|
|
||||||
if s<60 then
|
|
||||||
return format("%.3fs",s)
|
|
||||||
elseif s<3600 then
|
|
||||||
return format("%d:%.2f",int(s/60),s%60)
|
|
||||||
else
|
|
||||||
local h=int(s/3600)
|
|
||||||
return format("%d:%d:%.2f",h,int(s/60%60),s%60)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
local upper=string.upper
|
|
||||||
local upperList={
|
|
||||||
["1"]="!",["2"]="@",["3"]="#",["4"]="$",["5"]="%",
|
|
||||||
["6"]="^",["7"]="&",["8"]="*",["9"]="(",["0"]=")",
|
|
||||||
["`"]="~",["-"]="_",["="]="+",
|
|
||||||
["["]="{",["]"]="}",["\\"]="|",
|
|
||||||
[";"]=":",["'"]="\"",
|
|
||||||
[","]="<",["."]=">",["/"]="?",
|
|
||||||
}
|
|
||||||
return function(c)
|
|
||||||
return upperList[c]or upper(c)
|
|
||||||
end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
local rshift=bit.rshift
|
|
||||||
local b16={[0]="0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"}
|
|
||||||
return function(str)
|
|
||||||
local out=""
|
|
||||||
for i=1,#str do
|
|
||||||
if str:sub(i,i):match("[a-zA-Z0-9]")then
|
|
||||||
out=out..str:sub(i,i)
|
|
||||||
else
|
|
||||||
local b=str:byte(i)
|
|
||||||
out=out.."%"..b16[rshift(b,4)]..b16[b%16]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return out
|
|
||||||
end
|
|
||||||
@@ -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
|
end
|
||||||
end
|
or
|
||||||
|
function(t)
|
||||||
|
t=level[t]
|
||||||
|
if t then vib(t)end
|
||||||
|
end
|
||||||
@@ -1,124 +1,132 @@
|
|||||||
|
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,
|
||||||
getFreeChannel=NULL,
|
load=function()error("Cannot load before init!")end,
|
||||||
play=NULL,
|
getFreeChannel=NULL,
|
||||||
update=NULL,
|
play=NULL,
|
||||||
|
update=NULL,
|
||||||
}
|
}
|
||||||
function VOC.init(list)
|
function VOC.setDiversion(n)
|
||||||
VOC.init=nil
|
assert(type(n)=='number'and n>0 and n<12,'Wrong div')
|
||||||
local rnd=math.random
|
diversion=n
|
||||||
local rem=table.remove
|
|
||||||
local voiceQueue={free=0}
|
|
||||||
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
|
|
||||||
local Source={}
|
|
||||||
|
|
||||||
local count=#list function VOC.getCount()return count end
|
|
||||||
local function loadVoiceFile(N,vocName)
|
|
||||||
local fileName="media/VOICE/"..SETTING.cv.."/"..vocName..".ogg"
|
|
||||||
if love.filesystem.getInfo(fileName)then
|
|
||||||
bank[vocName]={love.audio.newSource(fileName,"static")}
|
|
||||||
table.insert(Source[N],vocName)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local function getVoice(str)
|
|
||||||
local L=bank[str]
|
|
||||||
local n=1
|
|
||||||
while L[n]:isPlaying()do
|
|
||||||
n=n+1
|
|
||||||
if not L[n]then
|
|
||||||
L[n]=L[1]:clone()
|
|
||||||
L[n]:seek(0)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return L[n]
|
|
||||||
--Load voice with string
|
|
||||||
end
|
|
||||||
local function load(skip)
|
|
||||||
for i=1,count do
|
|
||||||
Source[list[i]]={}
|
|
||||||
|
|
||||||
local n=0
|
|
||||||
repeat n=n+1 until not loadVoiceFile(list[i],list[i].."_"..n)
|
|
||||||
|
|
||||||
if n==1 then
|
|
||||||
if not loadVoiceFile(list[i],list[i])then
|
|
||||||
LOG.print("No VOICE file: "..list[i],5,COLOR.orange)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not Source[list[i]][1]then Source[list[i]]=nil end
|
|
||||||
if not skip and i~=count then
|
|
||||||
coroutine.yield()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
VOC.loadOne=nil
|
|
||||||
|
|
||||||
function VOC.getQueueCount()
|
|
||||||
return #voiceQueue
|
|
||||||
end
|
|
||||||
function VOC.getFreeChannel()
|
|
||||||
local l=#voiceQueue
|
|
||||||
for i=1,l do
|
|
||||||
if #voiceQueue[i]==0 then return i end
|
|
||||||
end
|
|
||||||
voiceQueue[l+1]={s=0}
|
|
||||||
return l+1
|
|
||||||
end
|
|
||||||
|
|
||||||
function VOC.play(s,chn)
|
|
||||||
if SETTING.voc>0 then
|
|
||||||
local _=Source[s]
|
|
||||||
if not _ then return end
|
|
||||||
if chn then
|
|
||||||
local L=voiceQueue[chn]
|
|
||||||
L[#L+1]=_[rnd(#_)]
|
|
||||||
L.s=1
|
|
||||||
--Add to queue[chn]
|
|
||||||
else
|
|
||||||
voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]}
|
|
||||||
--Create new channel & play
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
function VOC.update()
|
|
||||||
for i=#voiceQueue,1,-1 do
|
|
||||||
local Q=voiceQueue[i]
|
|
||||||
if Q.s==0 then--Free channel, auto delete when >3
|
|
||||||
if i>3 then
|
|
||||||
rem(voiceQueue,i)
|
|
||||||
end
|
|
||||||
elseif Q.s==1 then--Waiting load source
|
|
||||||
Q[1]=getVoice(Q[1])
|
|
||||||
Q[1]:setVolume(SETTING.voc)
|
|
||||||
Q[1]:play()
|
|
||||||
Q.s=Q[2]and 2 or 4
|
|
||||||
elseif Q.s==2 then--Playing 1,ready 2
|
|
||||||
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
|
||||||
Q[2]=getVoice(Q[2])
|
|
||||||
Q[2]:setVolume(SETTING.voc)
|
|
||||||
Q[2]:play()
|
|
||||||
Q.s=3
|
|
||||||
end
|
|
||||||
elseif Q.s==3 then--Playing 12 same time
|
|
||||||
if not Q[1]:isPlaying()then
|
|
||||||
for j=1,#Q do
|
|
||||||
Q[j]=Q[j+1]
|
|
||||||
end
|
|
||||||
Q.s=Q[2]and 2 or 4
|
|
||||||
end
|
|
||||||
elseif Q.s==4 then--Playing last
|
|
||||||
if not Q[1].isPlaying(Q[1])then
|
|
||||||
Q[1]=nil
|
|
||||||
Q.s=0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
VOC.loadOne=coroutine.wrap(load)
|
|
||||||
function VOC.loadAll()load(true)end
|
|
||||||
end
|
end
|
||||||
return VOC
|
function VOC.setVol(v)
|
||||||
|
assert(type(v)=='number'and v>=0 and v<=1,'Wrong volume')
|
||||||
|
volume=v
|
||||||
|
end
|
||||||
|
function VOC.init(list)
|
||||||
|
VOC.init=nil
|
||||||
|
local rem=table.remove
|
||||||
|
local voiceQueue={free=0}
|
||||||
|
local bank={}--{vocName1={SRC1s},vocName2={SRC2s},...}
|
||||||
|
local Source={}
|
||||||
|
|
||||||
|
local count=#list function VOC.getCount()return count end
|
||||||
|
local function _loadVoiceFile(path,N,vocName)
|
||||||
|
local fullPath=path..vocName..'.ogg'
|
||||||
|
if love.filesystem.getInfo(fullPath)then
|
||||||
|
bank[vocName]={love.audio.newSource(fullPath,'stream')}
|
||||||
|
table.insert(Source[N],vocName)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--Load voice with string
|
||||||
|
local function _getVoice(str)
|
||||||
|
local L=bank[str]
|
||||||
|
local n=1
|
||||||
|
while L[n]:isPlaying()do
|
||||||
|
n=n+1
|
||||||
|
if not L[n]then
|
||||||
|
L[n]=L[1]:clone()
|
||||||
|
L[n]:seek(0)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return L[n]
|
||||||
|
end
|
||||||
|
function VOC.load(path)
|
||||||
|
for i=1,count do
|
||||||
|
Source[list[i]]={}
|
||||||
|
|
||||||
|
local n=0
|
||||||
|
repeat n=n+1 until not _loadVoiceFile(path,list[i],list[i]..'_'..n)
|
||||||
|
|
||||||
|
if n==1 then
|
||||||
|
if not _loadVoiceFile(path,list[i],list[i])then
|
||||||
|
LOG("No VOC: "..list[i],.1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not Source[list[i]][1]then
|
||||||
|
Source[list[i]]=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function VOC.getQueueCount()
|
||||||
|
return #voiceQueue
|
||||||
|
end
|
||||||
|
function VOC.getFreeChannel()
|
||||||
|
local l=#voiceQueue
|
||||||
|
for i=1,l do
|
||||||
|
if #voiceQueue[i]==0 then return i end
|
||||||
|
end
|
||||||
|
voiceQueue[l+1]={s=0}
|
||||||
|
return l+1
|
||||||
|
end
|
||||||
|
|
||||||
|
function VOC.play(s,chn)
|
||||||
|
if volume>0 then
|
||||||
|
local _=Source[s]
|
||||||
|
if not _ then return end
|
||||||
|
if chn then
|
||||||
|
local L=voiceQueue[chn]
|
||||||
|
L[#L+1]=_[rnd(#_)]
|
||||||
|
L.s=1
|
||||||
|
--Add to queue[chn]
|
||||||
|
else
|
||||||
|
voiceQueue[VOC.getFreeChannel()]={s=1,_[rnd(#_)]}
|
||||||
|
--Create new channel & play
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function VOC.update()
|
||||||
|
for i=#voiceQueue,1,-1 do
|
||||||
|
local Q=voiceQueue[i]
|
||||||
|
if Q.s==0 then--Free channel, auto delete when >3
|
||||||
|
if i>3 then
|
||||||
|
rem(voiceQueue,i)
|
||||||
|
end
|
||||||
|
elseif Q.s==1 then--Waiting load source
|
||||||
|
Q[1]=_getVoice(Q[1])
|
||||||
|
Q[1]:setVolume(volume)
|
||||||
|
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
|
||||||
|
Q[1]:play()
|
||||||
|
Q.s=Q[2]and 2 or 4
|
||||||
|
elseif Q.s==2 then--Playing 1,ready 2
|
||||||
|
if Q[1]:getDuration()-Q[1]:tell()<.08 then
|
||||||
|
Q[2]=_getVoice(Q[2])
|
||||||
|
Q[2]:setVolume(volume)
|
||||||
|
Q[1]:setPitch(1.0594630943592953^(diversion*(rnd()*2-1)))
|
||||||
|
Q[2]:play()
|
||||||
|
Q.s=3
|
||||||
|
end
|
||||||
|
elseif Q.s==3 then--Playing 12 same time
|
||||||
|
if not Q[1]:isPlaying()then
|
||||||
|
for j=1,#Q do
|
||||||
|
Q[j]=Q[j+1]
|
||||||
|
end
|
||||||
|
Q.s=Q[2]and 2 or 4
|
||||||
|
end
|
||||||
|
elseif Q.s==4 then--Playing last
|
||||||
|
if not Q[1].isPlaying(Q[1])then
|
||||||
|
Q[1]=nil
|
||||||
|
Q.s=0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return VOC
|
||||||
|
|||||||
@@ -1,241 +1,191 @@
|
|||||||
local host="hdustea.3322.org"
|
local host=
|
||||||
local port="10026"
|
-- '127.0.0.1'
|
||||||
local path="/tech/socket/v1"
|
-- '192.168.114.102'
|
||||||
|
'game.techmino.org'
|
||||||
|
local port='10026'
|
||||||
|
local path='/tech/socket/v1'
|
||||||
|
|
||||||
local wsThread=[[
|
-- lua + LÖVE threading websocket client
|
||||||
-- lua + love2d threading websocket client
|
-- Original pure lua ver. by flaribbit and Particle_G
|
||||||
-- Original pure lua ver. by flaribbit and Particle_G and MrZ
|
|
||||||
-- Threading version by MrZ
|
-- Threading version by MrZ
|
||||||
|
|
||||||
local triggerCHN,sendCHN,readCHN=...
|
local type=type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 SOCK=require"socket".tcp()
|
|
||||||
local JSON=require"Zframework.json"
|
|
||||||
|
|
||||||
local mask_key={1,14,5,14}
|
|
||||||
local function _send(opcode,message)
|
|
||||||
--Message type
|
|
||||||
SOCK:send(char(bor(0x80,opcode)))
|
|
||||||
|
|
||||||
if not message then
|
|
||||||
SOCK:send(char(0x80,unpack(mask_key)))
|
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
--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(char(unpack(mask_key)))
|
|
||||||
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)))
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 res then
|
|
||||||
--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
|
|
||||||
local l=SOCK:receive("*l")
|
|
||||||
local code=l:find(" "); code=l:sub(code+1,code+3)
|
|
||||||
|
|
||||||
if code=="101"then
|
|
||||||
readCHN:push("success")
|
|
||||||
else
|
|
||||||
local ctLen
|
|
||||||
repeat
|
|
||||||
l=SOCK:receive("*l")
|
|
||||||
if not ctLen and l:find"Length"then
|
|
||||||
ctLen=tonumber(l:match"%d+")
|
|
||||||
end
|
|
||||||
until l==""
|
|
||||||
l=SOCK:receive(ctLen)
|
|
||||||
local reason=JSON.decode(l)
|
|
||||||
if reason then reason=reason.message end
|
|
||||||
readCHN:push(code.."-"..(reason or l))
|
|
||||||
end
|
|
||||||
else
|
|
||||||
readCHN:push(err)
|
|
||||||
end
|
|
||||||
SOCK:settimeout(0)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while true do
|
|
||||||
triggerCHN:demand()
|
|
||||||
while sendCHN:getCount()>=2 do
|
|
||||||
local op=sendCHN:pop()
|
|
||||||
local message=sendCHN:pop()
|
|
||||||
_send(op,message)
|
|
||||||
end
|
|
||||||
|
|
||||||
while true do--Read
|
|
||||||
--Byte 0-1
|
|
||||||
local res,err=SOCK:receive(2)
|
|
||||||
if not res then break end
|
|
||||||
|
|
||||||
local op=band(byte(res,1),0x0f)
|
|
||||||
|
|
||||||
--Calculating data length
|
|
||||||
local 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
|
|
||||||
res=SOCK:receive(8)
|
|
||||||
local b={byte(res,1,8)}
|
|
||||||
length=shl(b[5],32)+shl(b[6],24)+shl(b[7],8)+b[8]
|
|
||||||
end
|
|
||||||
|
|
||||||
--Receive data
|
|
||||||
res=SOCK:receive(length)
|
|
||||||
|
|
||||||
--React
|
|
||||||
readCHN:push(op)
|
|
||||||
if op==8 then--close
|
|
||||||
SOCK:close()
|
|
||||||
if res:sub(1,4)=="HTTP"then
|
|
||||||
local code=res:find(" ")
|
|
||||||
code=res:sub(code+1,code+3)
|
|
||||||
local res=res:sub(res:find("\n\n")+1)
|
|
||||||
reason=JSON.decode(res)if reason then reason=reason.message end
|
|
||||||
readCHN:push(code.."-"..(reason or res))
|
|
||||||
else
|
|
||||||
readCHN:push(string.format("%d-%s",shl(byte(res,1),8)+byte(res,2).."-"..res:sub(3,-3)))
|
|
||||||
end
|
|
||||||
else
|
|
||||||
readCHN:push(res)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
]]
|
|
||||||
|
|
||||||
local timer=love.timer.getTime
|
local timer=love.timer.getTime
|
||||||
local WS={}
|
local CHN=love.thread.newChannel()
|
||||||
local wsList={}
|
local CHN_getCount,CHN_push,CHN_pop=CHN.getCount,CHN.push,CHN.pop
|
||||||
|
local TRD=love.thread.newThread("\n")
|
||||||
|
local TRD_isRunning=TRD.isRunning
|
||||||
|
|
||||||
function WS.connect(name,subPath,body)
|
local WS={}
|
||||||
local ws={
|
local wsList=setmetatable({},{
|
||||||
thread=love.thread.newThread(wsThread),
|
__index=function(l,k)
|
||||||
triggerCHN=love.thread.newChannel(),
|
local ws={
|
||||||
sendCHN=love.thread.newChannel(),
|
real=false,
|
||||||
readCHN=love.thread.newChannel(),
|
status='dead',
|
||||||
lastPingTime=0,
|
lastPongTime=timer(),
|
||||||
lastPongTime=timer(),
|
sendTimer=0,
|
||||||
pingInterval=26,
|
alertTimer=0,
|
||||||
status="connecting",--connecting, running, dead
|
pongTimer=0,
|
||||||
}
|
}
|
||||||
wsList[name]=ws
|
l[k]=ws
|
||||||
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN)
|
return ws
|
||||||
ws.sendCHN:push(host)
|
end
|
||||||
ws.sendCHN:push(port)
|
})
|
||||||
ws.sendCHN:push(path..subPath)
|
|
||||||
ws.sendCHN:push(body or"")
|
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={
|
||||||
|
real=true,
|
||||||
|
thread=love.thread.newThread('Zframework/websocket_thread.lua'),
|
||||||
|
triggerCHN=love.thread.newChannel(),
|
||||||
|
sendCHN=love.thread.newChannel(),
|
||||||
|
readCHN=love.thread.newChannel(),
|
||||||
|
lastPingTime=0,
|
||||||
|
lastPongTime=timer(),
|
||||||
|
pingInterval=6,
|
||||||
|
status='connecting',--'connecting', 'running', 'dead'
|
||||||
|
sendTimer=0,
|
||||||
|
alertTimer=0,
|
||||||
|
pongTimer=0,
|
||||||
|
}
|
||||||
|
wsList[name]=ws
|
||||||
|
ws.thread:start(ws.triggerCHN,ws.sendCHN,ws.readCHN)
|
||||||
|
CHN_push(ws.sendCHN,host)
|
||||||
|
CHN_push(ws.sendCHN,port)
|
||||||
|
CHN_push(ws.sendCHN,path..subPath)
|
||||||
|
CHN_push(ws.sendCHN,body or"")
|
||||||
|
CHN_push(ws.sendCHN,timeout or 2.6)
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.status(name)
|
function WS.status(name)
|
||||||
return wsList[name]and wsList[name].status or"dead"
|
local ws=wsList[name]
|
||||||
|
return ws.status or'dead'
|
||||||
|
end
|
||||||
|
|
||||||
|
function WS.getTimers(name)
|
||||||
|
local ws=wsList[name]
|
||||||
|
return ws.pongTimer,ws.sendTimer,ws.alertTimer
|
||||||
end
|
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
|
||||||
|
|
||||||
|
function WS.alert(name)
|
||||||
|
local ws=wsList[name]
|
||||||
|
ws.alertTimer=2.6
|
||||||
end
|
end
|
||||||
|
|
||||||
local OPcode={
|
local OPcode={
|
||||||
continue=0,
|
continue=0,
|
||||||
text=1,
|
text=1,
|
||||||
binary=2,
|
binary=2,
|
||||||
close=8,
|
close=8,
|
||||||
ping=9,
|
ping=9,
|
||||||
pong=10,
|
pong=10,
|
||||||
|
}
|
||||||
|
local OPname={
|
||||||
|
[0]='continue',
|
||||||
|
[1]='text',
|
||||||
|
[2]='binary',
|
||||||
|
[8]='close',
|
||||||
|
[9]='ping',
|
||||||
|
[10]='pong',
|
||||||
}
|
}
|
||||||
function WS.send(name,message,op)
|
function WS.send(name,message,op)
|
||||||
local ws=wsList[name]
|
if type(message)=='string'then
|
||||||
ws.sendCHN:push(op and OPcode[op]or 2)--2=binary
|
local ws=wsList[name]
|
||||||
ws.sendCHN:push(message)
|
if ws.real and ws.status=='running'then
|
||||||
ws.lastPingTime=timer()
|
CHN_push(ws.sendCHN,op and OPcode[op]or 2)--2=binary
|
||||||
|
CHN_push(ws.sendCHN,message)
|
||||||
|
ws.lastPingTime=timer()
|
||||||
|
ws.sendTimer=1
|
||||||
|
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.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
|
ws.status='dead'
|
||||||
ws.lastPongTime=timer()
|
elseif op==9 then--9=ping
|
||||||
return message,op
|
WS.send(name,message or"",'pong')
|
||||||
end
|
end
|
||||||
|
ws.lastPongTime=timer()
|
||||||
|
ws.pongTimer=1
|
||||||
|
return message,OPname[op]or op
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.close(name)
|
function WS.close(name)
|
||||||
local ws=wsList[name]
|
local ws=wsList[name]
|
||||||
ws.sendCHN:push(8)--close
|
if ws.real then
|
||||||
ws.sendCHN:push("")
|
CHN_push(ws.sendCHN,8)--close
|
||||||
ws.status="dead"
|
CHN_push(ws.sendCHN,"")
|
||||||
|
ws.status='dead'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WS.update()
|
function WS.update(dt)
|
||||||
local time=timer()
|
local time=timer()
|
||||||
for name,ws in next,wsList do
|
for name,ws in next,wsList do
|
||||||
ws.triggerCHN:push(0)
|
if ws.real and ws.status~='dead'then
|
||||||
if ws.status=="connecting"then
|
if TRD_isRunning(ws.thread)then
|
||||||
local mes=ws.readCHN:pop()
|
if CHN_getCount(ws.triggerCHN)==0 then
|
||||||
if mes then
|
CHN_push(ws.triggerCHN,0)
|
||||||
if mes=="success"then
|
end
|
||||||
ws.status="running"
|
if ws.status=='connecting'then
|
||||||
ws.lastPingTime=time
|
local mes=CHN_pop(ws.readCHN)
|
||||||
ws.lastPongTime=time
|
if mes then
|
||||||
else
|
if mes=='success'then
|
||||||
ws.status="dead"
|
ws.status='running'
|
||||||
LOG.print(text.wsFailed,"warn")
|
ws.lastPingTime=time
|
||||||
end
|
ws.lastPongTime=time
|
||||||
end
|
ws.pongTimer=1
|
||||||
elseif time-ws.lastPingTime>ws.pingInterval then
|
else
|
||||||
ws.sendCHN:push(9)
|
ws.status='dead'
|
||||||
ws.sendCHN:push("")--ping
|
MES.new('warn',text.wsFailed..": "..(mes=="timeout"and text.netTimeout or mes))
|
||||||
ws.lastPingTime=time
|
end
|
||||||
end
|
end
|
||||||
if time-ws.lastPongTime>10+3*ws.pingInterval then
|
elseif ws.status=='running'then
|
||||||
WS.close(name)
|
if time-ws.lastPingTime>ws.pingInterval then
|
||||||
end
|
WS.send(name,"",'pong')
|
||||||
end
|
end
|
||||||
|
if time-ws.lastPongTime>6+2*ws.pingInterval then
|
||||||
|
WS.close(name)
|
||||||
|
end
|
||||||
|
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.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
|
||||||
|
|
||||||
return WS
|
return WS
|
||||||
|
|||||||
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
|
||||||
if y>0 then
|
local trigDist=0
|
||||||
if floatWheel<0 then floatWheel=0 end
|
return function(y,key1,key2)
|
||||||
floatWheel=floatWheel+y^1.2
|
if y>0 then
|
||||||
elseif y<0 then
|
trigDist=max(trigDist,0)+y^1.2
|
||||||
if floatWheel>0 then floatWheel=0 end
|
elseif y<0 then
|
||||||
floatWheel=floatWheel-(-y)^1.2
|
if trigDist>0 then trigDist=0 end
|
||||||
end
|
trigDist=min(trigDist,0)-(-y)^1.2
|
||||||
while floatWheel>=1 do
|
end
|
||||||
love.keypressed("up")
|
while trigDist>=1 do
|
||||||
floatWheel=floatWheel-1
|
love.keypressed(key1 or'up')
|
||||||
end
|
trigDist=trigDist-1
|
||||||
while floatWheel<=-1 do
|
end
|
||||||
love.keypressed("down")
|
while trigDist<=-1 do
|
||||||
floatWheel=floatWheel+1
|
love.keypressed(key2 or'down')
|
||||||
end
|
trigDist=trigDist+1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
67
conf.lua
67
conf.lua
@@ -1,39 +1,34 @@
|
|||||||
VERSION_CODE=1303
|
|
||||||
VERSION_NAME="Alpha V0.13.3"
|
|
||||||
love.setDeprecationOutput(false)
|
|
||||||
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
|
||||||
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
|
t.accelerometerjoystick=false--Accelerometer=joystick on ios/android
|
||||||
if t.audio then
|
if t.audio then
|
||||||
t.audio.mic=false
|
t.audio.mic=false
|
||||||
t.audio.mixwithsystem=true
|
t.audio.mixwithsystem=true
|
||||||
end
|
end
|
||||||
|
|
||||||
local W=t.window
|
local W=t.window
|
||||||
W.title="Techmino "..VERSION_NAME
|
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.fullscreen=false
|
||||||
W.fullscreentype="desktop"--"exclusive"
|
W.vsync=0--Unlimited FPS
|
||||||
W.fullscreen=false
|
W.msaa=0--Multi-sampled antialiasing
|
||||||
W.vsync=0--Unlimited FPS
|
W.depth=0--Bits/samp of depth buffer
|
||||||
W.msaa=false--Num of samples to use with multi-sampled antialiasing
|
W.stencil=1--Bits/samp of stencil buffer
|
||||||
W.depth=0--Bits/samp of depth buffer
|
W.display=1--Monitor ID
|
||||||
W.stencil=1--Bits/samp of stencil buffer
|
W.highdpi=true--High-dpi mode for the window on a Retina display
|
||||||
W.display=1--Monitor ID
|
W.x,W.y=nil
|
||||||
W.highdpi=true--High-dpi mode for the window on a Retina display
|
|
||||||
W.x,W.y=nil
|
|
||||||
|
|
||||||
local M=t.modules
|
local M=t.modules
|
||||||
M.window,M.system,M.event,M.thread=true,true,true,true
|
M.window,M.system,M.event,M.thread=true,true,true,true
|
||||||
M.timer,M.math,M.data=true,true,true
|
M.timer,M.math,M.data=true,true,true
|
||||||
M.video,M.audio,M.sound=true,true,true
|
M.video,M.audio,M.sound=true,true,true
|
||||||
M.graphics,M.font,M.image=true,true,true
|
M.graphics,M.font,M.image=true,true,true
|
||||||
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
|
M.mouse,M.touch,M.keyboard,M.joystick=true,true,true,true
|
||||||
M.physics=false
|
M.physics=false
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,147 +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:序列模式,可以使用默认的几个函数用字符串表示,也可以自己写
|
|
||||||
freshMethod=放一块后对next序列的刷新函数,不使用默认sequence的话就要自己写
|
|
||||||
bag:一包的方块(本质是基准序列,不一定是包)
|
|
||||||
mission:包含任务的table,说明暂时略
|
|
||||||
|
|
||||||
life:生命数,
|
|
||||||
pushSpeed:上涨速度
|
|
||||||
noTele:是否禁止10个高级按键,
|
|
||||||
visible:方块可见性,填写固定的几个字符串
|
|
||||||
freshLimit:锁延刷新次数限制
|
|
||||||
easyFresh:是否使用简单锁延刷新规则
|
|
||||||
|
|
||||||
fkey1:按下功能键1后执行的函数
|
|
||||||
fkey2:按下功能键2后执行的函数
|
|
||||||
keyCancel:包含禁止使用的按键的id们的table,例如{1,2}就是禁止左右移
|
|
||||||
fineKill:是否开启非极简即死
|
|
||||||
b2bKill:是否开启断b2b即死
|
|
||||||
missionKill:是否开启强制任务
|
|
||||||
target:目标行数,如果dropPiece使用了默认的几个通用通关函数或者自己有一个目标数字就要写
|
|
||||||
dropPiece:放一块后要执行的函数,输入玩家对象
|
|
||||||
|
|
||||||
bg:背景,只能填写内置背景的名字
|
|
||||||
bgm:背景音乐,只能填写内置音乐库的音乐名
|
|
||||||
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,
|
|
||||||
target=40,dropPiece=PLY.check_lineReach,
|
|
||||||
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 TIMESTR(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.
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
--Just tell IDE to load love-api, no actual usage
|
|
||||||
love=require"love"
|
|
||||||
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