commit ca3722935517326a84b9cdf46244b5d6efe942d5 Author: Paul Brown Date: Mon Aug 25 01:59:20 2025 +0100 Initial upload diff --git a/.editor_settings b/.editor_settings new file mode 100644 index 0000000..bb13be3 --- /dev/null +++ b/.editor_settings @@ -0,0 +1,18 @@ +{ + :workflow { + :recent-files [ + [ + "/main/curses.collection" + :scene + ] + [ + "/main/level2.collection" + :scene + ] + [ + "/main/curse.script" + :code + ] + ] + } +} \ No newline at end of file diff --git a/NEWFONT/NEWFONT.fnt b/NEWFONT/NEWFONT.fnt new file mode 100644 index 0000000..9f82097 --- /dev/null +++ b/NEWFONT/NEWFONT.fnt @@ -0,0 +1,67 @@ +info face="NEWFONT" size=72 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=1,1 +common lineHeight=72 base=56 scaleW=418 scaleH=418 pages=1 packed=0 +page id=0 file="NEWFONT.png" +chars count=63 +char id=32 x=0 y=0 width=0 height=0 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15 +char id=48 x=114 y=69 width=55 height=67 xoffset=6 yoffset=18 xadvance=65 page=0 chnl=15 +char id=49 x=282 y=0 width=41 height=67 xoffset=11 yoffset=18 xadvance=58 page=0 chnl=15 +char id=50 x=324 y=0 width=56 height=67 xoffset=4 yoffset=18 xadvance=64 page=0 chnl=15 +char id=51 x=0 y=69 width=56 height=67 xoffset=3 yoffset=18 xadvance=64 page=0 chnl=15 +char id=52 x=57 y=69 width=56 height=67 xoffset=5 yoffset=18 xadvance=65 page=0 chnl=15 +char id=53 x=0 y=0 width=56 height=68 xoffset=4 yoffset=17 xadvance=64 page=0 chnl=15 +char id=54 x=57 y=0 width=56 height=68 xoffset=5 yoffset=17 xadvance=65 page=0 chnl=15 +char id=55 x=114 y=0 width=55 height=68 xoffset=5 yoffset=17 xadvance=65 page=0 chnl=15 +char id=56 x=170 y=0 width=55 height=68 xoffset=5 yoffset=17 xadvance=65 page=0 chnl=15 +char id=57 x=226 y=0 width=55 height=68 xoffset=4 yoffset=17 xadvance=65 page=0 chnl=15 +char id=65 x=157 y=137 width=36 height=56 xoffset=1 yoffset=11 xadvance=37 page=0 chnl=15 +char id=66 x=235 y=251 width=36 height=55 xoffset=2 yoffset=12 xadvance=37 page=0 chnl=15 +char id=67 x=272 y=251 width=36 height=55 xoffset=3 yoffset=12 xadvance=40 page=0 chnl=15 +char id=68 x=309 y=251 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=69 x=194 y=137 width=36 height=56 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=70 x=346 y=251 width=35 height=55 xoffset=1 yoffset=12 xadvance=36 page=0 chnl=15 +char id=71 x=382 y=251 width=36 height=55 xoffset=1 yoffset=12 xadvance=39 page=0 chnl=15 +char id=72 x=0 y=307 width=35 height=55 xoffset=2 yoffset=12 xadvance=37 page=0 chnl=15 +char id=73 x=0 y=363 width=29 height=55 xoffset=2 yoffset=12 xadvance=33 page=0 chnl=15 +char id=74 x=36 y=307 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=75 x=231 y=137 width=37 height=56 xoffset=2 yoffset=11 xadvance=40 page=0 chnl=15 +char id=76 x=30 y=363 width=36 height=55 xoffset=2 yoffset=12 xadvance=38 page=0 chnl=15 +char id=77 x=73 y=307 width=49 height=55 xoffset=2 yoffset=12 xadvance=52 page=0 chnl=15 +char id=78 x=67 y=363 width=42 height=55 xoffset=1 yoffset=12 xadvance=44 page=0 chnl=15 +char id=79 x=123 y=307 width=35 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=80 x=110 y=363 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=81 x=269 y=137 width=43 height=56 xoffset=2 yoffset=11 xadvance=46 page=0 chnl=15 +char id=82 x=245 y=69 width=36 height=60 xoffset=1 yoffset=12 xadvance=38 page=0 chnl=15 +char id=83 x=313 y=137 width=37 height=56 xoffset=0 yoffset=11 xadvance=38 page=0 chnl=15 +char id=84 x=159 y=307 width=30 height=55 xoffset=0 yoffset=12 xadvance=31 page=0 chnl=15 +char id=85 x=147 y=363 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=86 x=351 y=137 width=37 height=56 xoffset=2 yoffset=11 xadvance=40 page=0 chnl=15 +char id=87 x=190 y=307 width=49 height=55 xoffset=2 yoffset=12 xadvance=52 page=0 chnl=15 +char id=88 x=0 y=194 width=36 height=56 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=89 x=170 y=69 width=37 height=61 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=90 x=184 y=363 width=36 height=55 xoffset=3 yoffset=12 xadvance=41 page=0 chnl=15 +char id=97 x=282 y=68 width=36 height=56 xoffset=1 yoffset=11 xadvance=37 page=0 chnl=15 +char id=98 x=37 y=194 width=36 height=55 xoffset=2 yoffset=12 xadvance=37 page=0 chnl=15 +char id=99 x=74 y=194 width=36 height=55 xoffset=3 yoffset=12 xadvance=40 page=0 chnl=15 +char id=100 x=111 y=194 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=101 x=319 y=68 width=36 height=56 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=102 x=148 y=194 width=35 height=55 xoffset=1 yoffset=12 xadvance=36 page=0 chnl=15 +char id=103 x=184 y=194 width=36 height=55 xoffset=1 yoffset=12 xadvance=39 page=0 chnl=15 +char id=104 x=221 y=194 width=35 height=55 xoffset=2 yoffset=12 xadvance=37 page=0 chnl=15 +char id=105 x=389 y=137 width=29 height=55 xoffset=2 yoffset=12 xadvance=33 page=0 chnl=15 +char id=106 x=257 y=194 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=107 x=356 y=68 width=37 height=56 xoffset=2 yoffset=11 xadvance=40 page=0 chnl=15 +char id=108 x=294 y=194 width=36 height=55 xoffset=2 yoffset=12 xadvance=38 page=0 chnl=15 +char id=109 x=331 y=194 width=49 height=55 xoffset=2 yoffset=12 xadvance=52 page=0 chnl=15 +char id=110 x=0 y=251 width=42 height=55 xoffset=1 yoffset=12 xadvance=44 page=0 chnl=15 +char id=111 x=381 y=194 width=35 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=112 x=43 y=251 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=113 x=0 y=137 width=43 height=56 xoffset=2 yoffset=11 xadvance=46 page=0 chnl=15 +char id=114 x=208 y=69 width=36 height=60 xoffset=1 yoffset=12 xadvance=38 page=0 chnl=15 +char id=115 x=44 y=137 width=37 height=56 xoffset=0 yoffset=11 xadvance=38 page=0 chnl=15 +char id=116 x=80 y=251 width=30 height=55 xoffset=0 yoffset=12 xadvance=31 page=0 chnl=15 +char id=117 x=111 y=251 width=36 height=55 xoffset=2 yoffset=12 xadvance=39 page=0 chnl=15 +char id=118 x=82 y=137 width=37 height=56 xoffset=2 yoffset=11 xadvance=40 page=0 chnl=15 +char id=119 x=148 y=251 width=49 height=55 xoffset=2 yoffset=12 xadvance=52 page=0 chnl=15 +char id=120 x=120 y=137 width=36 height=56 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=121 x=381 y=0 width=37 height=61 xoffset=1 yoffset=11 xadvance=38 page=0 chnl=15 +char id=122 x=198 y=251 width=36 height=55 xoffset=3 yoffset=12 xadvance=41 page=0 chnl=15 diff --git a/NEWFONT/NEWFONT.png b/NEWFONT/NEWFONT.png new file mode 100644 index 0000000..088511f Binary files /dev/null and b/NEWFONT/NEWFONT.png differ diff --git a/build/default/.artifact-map b/build/default/.artifact-map new file mode 100644 index 0000000..887479c --- /dev/null +++ b/build/default/.artifact-map @@ -0,0 +1 @@ +{"/_defold/debugger/start.luac" {:content-hash "5d4d555144b0cd7efb7f531e6e43d11ece19932d", :mtime 1756069652207, :size 197, :etag "ca7e71f081e2d5fb1c79b7f2cfc3c19df09b140f"}, "/_generated_112a8f83.collisionobjectc" {:content-hash "6ca7800a454c8f3c9bcbae845f3c258883e01f7a", :mtime 1756069651368, :size 86, :etag "dfdd7545ddea44faa184bbdf387dbe9453b50ab7"}, "/_generated_13b7565d.goc" {:content-hash "1cf0426bbccd8a28171a06d8853f97f421e89462", :mtime 1756069653536, :size 172, :etag "edd833389567ba761284eccf41b3e54938bdd49c"}, "/_generated_147d693e.spritec" {:content-hash "3cb5cc93ea88defecc4f08b0d2c30dabb722dc1a", :mtime 1756069653538, :size 117, :etag "0f6deece2f12b4b037a5706bb8cd2aa01fbd3a9a"}, "/_generated_150203ba.goc" {:content-hash "b9a74d1e1e7a9e6e287c7b7c7edce15cc9e60ea3", :mtime 1756069653327, :size 41, :etag "fb9d648cd9a6ae61d2b1db7c25e4ebbf8dcbc352"}, "/_generated_156b50cf.spritec" {:content-hash "7360e2a8bfbe6835fcb7db373ede387c0aa789fb", :mtime 1756069652048, :size 121, :etag "ee3406fd1c00808ba31be99b9580bac8402ba499"}, "/_generated_1786b250.collisionobjectc" {:content-hash "3c04ff1c23d64cd51b87f1c203bf0f31808ffde2", :mtime 1756069652157, :size 74, :etag "4e21df5ed6824bff960247241e9f986088cb410d"}, "/_generated_1819ddc6.collisionobjectc" {:content-hash "2f47de25104150cb8d4dd165edbbb47b9cc80224", :mtime 1756069651562, :size 91, :etag "1d03a977f5815d847fa69c1b73ec3f316de59c34"}, "/_generated_1c78a7b5.spritec" {:content-hash "61712fd95fd9d77de677ba78c02053d3b0e31810", :mtime 1756069652520, :size 118, :etag "8ed76677f81fbd66b36bfbef761d03b1e4bb1db8"}, "/_generated_1c88ebb0.collisionobjectc" {:content-hash "0a331270721512084978671d448862624d06fc0b", :mtime 1756069652158, :size 89, :etag "b6ef20518bbeb0dc48b6e7e268f76d7281fe607d"}, "/_generated_25701a4e.goc" {:content-hash "258b2f469039f8cc48142abc8097738e2a4b1b20", :mtime 1756069652018, :size 92, :etag "ac98ccc3e4ac01fe54940a20022827716c888f72"}, "/_generated_274c9e2d.spritec" {:content-hash "b1cc4b63ca8b5d11553537be7c4fef5d10273cdd", :mtime 1756069651890, :size 121, :etag "8935b142231a51d23d5333c59d6e75b4a4090cb2"}, "/_generated_2c02295b.collisionobjectc" {:content-hash "d1e2f8e5d37a4f80d37a70cc209dcf590f8b7646", :mtime 1756069653328, :size 71, :etag "87e62eebaf70d7122a1e1b04bba09cf2f9c83a52"}, "/_generated_2cd5ca37.collisionobjectc" {:content-hash "81ac4ae493fb3838ae6871d478bb3fb213877784", :mtime 1756069652873, :size 63, :etag "f9533d040d8637e264dbf4ac41e72826e7813947"}, "/_generated_2dca475a.collectionfactoryc" {:content-hash "bba4049708851b53b62682710f7f71241b91a467", :mtime 1756069653277, :size 26, :etag "0dd318bd48be61ddb343b93ecca248ce08a4fd4d"}, "/_generated_2f21400d.goc" {:content-hash "ce8dab4655c5334160889d0a1663a088e329b588", :mtime 1756069651829, :size 34, :etag "1baf11149dd2537ec537e1808326a8ead1cacc34"}, "/_generated_3080bded.collisionobjectc" {:content-hash "decda82698dc9181ba031291f81b6c4c6df4f4e8", :mtime 1756069651889, :size 86, :etag "1aae275733eacb3aaa47d378b7f353885bd77828"}, "/_generated_3148ba2.spritec" {:content-hash "4229dfbc73514e608fcaa8d96ba71f2b21994e70", :mtime 1756069651363, :size 113, :etag "f612fa6f56a17ad5d6e5679cb6134c5971f93543"}, "/_generated_32c007e4.goc" {:content-hash "2e3c6166ef6d9af068c02a4b57cd70daca2b92f4", :mtime 1756069651492, :size 726, :etag "7752ef14ff8faabc36b458f806468e7c2882b125"}, "/_generated_37ce6018.goc" {:content-hash "b5f63673c937e3db9ae55948fa4457973119aef8", :mtime 1756069652875, :size 144, :etag "47b547415c00b06f565fac878925758ac9c0bc0d"}, "/_generated_38dfde8c.collectionproxyc" {:content-hash "dc751db96f5573bb09cff4ba43da8ac64a2966ff", :mtime 1756069651828, :size 26, :etag "644005e68e36f168a08e921434abcb24c4ce22eb"}, "/_generated_39618c2.spritec" {:content-hash "de2d67aaa5281abeb475761e18a46e996483bc30", :mtime 1756069651312, :size 125, :etag "d75c557304e543e89f98c6b0f0ac5ec211920e7a"}, "/_generated_3ccd1483.goc" {:content-hash "37776725b25f115a0d936cfa02788f1bba27284f", :mtime 1756069651366, :size 58, :etag "5fe6804b441db859d058fdb923163b11c73b3db9"}, "/_generated_3f6bd3e2.spritec" {:content-hash "dbfacf5842aa78e443f8accdff8d47b7ead6d1a2", :mtime 1756069651364, :size 128, :etag "ed86f1ea8d7b32524dd93867399671ba70e6acdc"}, "/_generated_421f1369.collisionobjectc" {:content-hash "4af96b664b7325cf7c24c3b92330071d62584845", :mtime 1756069651657, :size 124, :etag "8a4f7664ba6a62f9fabf04873a50b7116fe76de4"}, "/_generated_459be146.spritec" {:content-hash "69f0ef05a2a8bc533a643598b74a04d5e8bb5066", :mtime 1756069651559, :size 132, :etag "fcce0cae1392f8208af4e49c0f53ee9d3a254f30"}, "/_generated_46cfa461.spritec" {:content-hash "8cb59ee4a89fdaf1050e6823ee103bbbf080a17e", :mtime 1756069651246, :size 128, :etag "4f2d9e1aff58cb62541a50fabc16f575d1befcc5"}, "/_generated_4ec1a45d.goc" {:content-hash "93ac2014b46de299ad062d3e67420b169d8a6e50", :mtime 1756069653488, :size 151, :etag "9b23fb21001f138cc7a0e3909ff5a1c2f9d94cd7"}, "/_generated_4eefa8ea.glyph_bankc" {:content-hash "7cf37aadce59608f97168f763943c54e9f941445", :mtime 1756069651675, :size 15990, :etag "5c8336bb24099df3691150a5f4875e1f83a7caf9"}, "/_generated_506bc3d2.spritec" {:content-hash "0fda2250b2895440b7b1c24b1b0f2631348b131e", :mtime 1756069652210, :size 118, :etag "9194d1bd79c2bba327808ed54c00c3f42d064028"}, "/_generated_56cd95af.spritec" {:content-hash "130649d145f27be59e242e744aa93b2ed223a6f8", :mtime 1756069652051, :size 117, :etag "4e249566c36c0acff99adefa11b7a31545368cc8"}, "/_generated_57279ae4.goc" {:content-hash "fdab15452753f168047768e4686cd8078dada432", :mtime 1756069651476, :size 2235, :etag "55c86864f6ca4d72e9c6791a5ac97fdebc7c7fec"}, "/_generated_5a8ae5f6.goc" {:content-hash "5256c86d34bb6e99b25994946da9111d08d365e0", :mtime 1756069652567, :size 80, :etag "42031ee00aaae8fcca007e98b393bb6c556902cc"}, "/_generated_5bfc3f92.goc" {:content-hash "8cefa48cc17972acb956d1b6089748816d1253da", :mtime 1756069652209, :size 227, :etag "581baf8ec46cf41d4ac4430dd3903d5759882925"}, "/_generated_6259b259.vpc" {:content-hash "ca3ed4b725aebe88d44d836c9dd09e8318a3571f", :mtime 1756069653146, :size 9334, :etag "390496819fe5c833f2fcd2bd38c1ba46ac19d0ce"}, "/_generated_653569a3.collisionobjectc" {:content-hash "d26f8f79a0b20f9fbe60530b08f7b199c08b9609", :mtime 1756069651367, :size 74, :etag "a981ab1fb1db28820e92f8b7d46594d51d9faa11"}, "/_generated_675f7b5b.collectionproxyc" {:content-hash "db6b789b2ffa1ac19de653071ace700785d3ba63", :mtime 1756069653331, :size 28, :etag "56c4dea540feb4b9e86d539d39daf776b9319062"}, "/_generated_6becee94.fpc" {:content-hash "afd3f85fdd93aad3b22e2fc3a3712d04afaad6fe", :mtime 1756069652512, :size 3600, :etag "94967ec70fe6c68ed1d03d6a472bfb972577fec8"}, "/_generated_6cfdd852.goc" {:content-hash "e896b2a0afcb721fa8287068d472609040df05aa", :mtime 1756069652165, :size 64, :etag "f280c2ec7256622e40a7ca6964e5c1dfbcb731c5"}, "/_generated_6ebe6ef5.collisionobjectc" {:content-hash "bdf4b5648bd06ea0f0f7c1e1f14536142825ae36", :mtime 1756069652519, :size 86, :etag "5066c82531837e71bb55eaf5ffb4b3afa8e8ae55"}, "/_generated_70d2e4a4.goc" {:content-hash "20754dd9c530782602568d9ed6f1d5beeb862507", :mtime 1756069651412, :size 38, :etag "99d29953c7c965b7bd47112c691f39fc0e7b1621"}, "/_generated_7552a8ce.goc" {:content-hash "80138658d580881b3c6f07d1701210d613fc30a5", :mtime 1756069652015, :size 81, :etag "bfc654a93c805ca321d67b8d0e1b8aed6f03518c"}, "/_generated_76a8d57.fpc" {:content-hash "93a05cc0101880ebcd6c189c23fd5bfa7c804a04", :mtime 1756069652872, :size 2789, :etag "c83df007ad7065a4ae5311509d68e5cbb0a47172"}, "/_generated_77f3a7e4.collectionproxyc" {:content-hash "8d517889e5208490b849ca0537bc28ecb98581b0", :mtime 1756069651493, :size 32, :etag "28dbb601c745d5f3e6e10992e653f5139e71cbce"}, "/_generated_7869a6ba.texturec" {:content-hash "1185dd361a4870a2ce19ae11d407c75eaf0ee37f", :mtime 1756068170593, :size 67108913, :etag "7cb49ca3401fa26e66c5bae760f5341464b55769"}, "/_generated_7a01a6f6.spritec" {:content-hash "e6c0419d2db8beb05b7fe27a8ad332872e63d09e", :mtime 1756069652569, :size 121, :etag "bbb5150083ffe44e55af1136c02761c03811b3a2"}, "/_generated_81ccff3b.spritec" {:content-hash "5f6d6e6c2ef7e027022a45ec42dd58f8e573def5", :mtime 1756069653330, :size 132, :etag "ef8018baca62feb5d9f7907869e129b5e5c28432"}, "/_generated_832c2632.goc" {:content-hash "c1ae7523ddbb594562f7f6586239b4c11a805d34", :mtime 1756069652208, :size 204, :etag "f0b2c33fc6043281d2d28ec1f2f50389a4a3b621"}, "/_generated_853e0f02.goc" {:content-hash "4b28e64cda840335a41bdd2b448f1d94a037c17e", :mtime 1756069651314, :size 189, :etag "4cee202fcc8b58afc26368784736e8f721a12cf0"}, "/_generated_85dd2e31.goc" {:content-hash "d18829bd2e1d44cad01df43cf89aa6a2cd8b9ce1", :mtime 1756069652162, :size 63, :etag "0f9c8154c8061cd967bc95e124e078431260b00b"}, "/_generated_868aac31.spritec" {:content-hash "e1bb5aa62b55c0b5e9522b658e741b5817348ffa", :mtime 1756069652159, :size 132, :etag "bf2da1bdbc0745e76fa7285ed61a2c6855444fe0"}, "/_generated_88b5e0.goc" {:content-hash "55109559244b1921184386797cf5e4416ae7f0bd", :mtime 1756069651244, :size 522, :etag "d068e6c3fe8fc86b0d2063a037821b6cf07d6e67"}, "/_generated_8c49a945.spritec" {:content-hash "c998ddd349229b3ba0ae0746af49132d64a75373", :mtime 1756069651495, :size 118, :etag "9fc92fdf78398e84f15a29e40f4b9128162fa2af"}, "/_generated_8cccf77.goc" {:content-hash "de9685921e8bc52b76d5802d1b230b5e0e6563d4", :mtime 1756069652874, :size 508, :etag "1ff80e28185e79f2ed7f52be38acb84726beb289"}, "/_generated_8d3b1587.spritec" {:content-hash "4c77abadda4f00381c1bb0e697f9753157417736", :mtime 1756069651565, :size 112, :etag "3bcc29ae403021a88428dd8a52ec7dd42e9ce949"}, "/_generated_8f0156cf.goc" {:content-hash "37fbc84b70fc075ac18c85a8796260d1a54d9b91", :mtime 1756069652054, :size 60, :etag "e4428922c2880ca14f659d8f0a63989c15f96a96"}, "/_generated_90d13114.collectionfactoryc" {:content-hash "5e189f8a4c8c6a8da3b4dae84cb9daedf443189a", :mtime 1756069652314, :size 26, :etag "9d89326004d2cadf25cbc52e8da00474345c8d6e"}, "/_generated_916c6eb9.collisionobjectc" {:content-hash "3ddf7fb06ab064944397a81d3249e095f57aab84", :mtime 1756069653149, :size 86, :etag "75e50195528d85c8bed1cbe9da288238591716e1"}, "/_generated_92fc14c0.collisionobjectc" {:content-hash "6db1cca81ff7657116ab070e26a5dc5b5254d3cb", :mtime 1756069651168, :size 74, :etag "f98c0dbbf5aad70d5a0f8709daa7dafe88125617"}, "/_generated_9487c559.collisionobjectc" {:content-hash "9326149f57840290801bdb4786c9906145b2e64d", :mtime 1756069653017, :size 78, :etag "e5c5abf0799ab41d63c2629a5aa8d39bd4361986"}, "/_generated_97baffa0.collectionproxyc" {:content-hash "2e24fc1dd191f882090356e89d6a7335dd504e94", :mtime 1756069651245, :size 31, :etag "20fd12ca506e375965328651a284b8b385a2495b"}, "/_generated_992059e2.collisionobjectc" {:content-hash "1621f9ca0363537d68b0f41f3cfbc964058d6ff5", :mtime 1756069651313, :size 86, :etag "281a7cfdd5adf7e99f8a911e88023b14fc2d06c0"}, "/_generated_9dbfe8ba.vpc" {:content-hash "322b3198bdc5cad31b8c931a151735d25e81707f", :mtime 1756069653275, :size 2824, :etag "b917d26c9fe093056d3a4e9b85d51be783cb775c"}, "/_generated_a145ec55.spritec" {:content-hash "fc06412faed2355dd22dd8f693ad9971519420d8", :mtime 1756069652513, :size 122, :etag "4adda8a7e33d61bf991ae2df310fa514e8aaa3c3"}, "/_generated_a1c8e0a2.collectionproxyc" {:content-hash "8ee67ba09d51b32e8427952f5d9be3da64f5a425", :mtime 1756069651310, :size 28, :etag "e0a74fd515f92fadf9bff651f370416c48cb1d0b"}, "/_generated_a1dbda46.collisionobjectc" {:content-hash "3560e1bf911122ad0ae544ff4555c36c33830f8a", :mtime 1756069523129, :size 82, :etag "37be8daf31f7ebc43f394b6bbac071c652fdb10a"}, "/_generated_a35046be.spritec" {:content-hash "7a31f50a58c7829e272dbad5db7720fc13d3e881", :mtime 1756069653539, :size 117, :etag "12b836a760642692b9bde0b802481beaaff777d4"}, "/_generated_a381ebc3.spritec" {:content-hash "1b5f814cf18dd6429d4e4b66a6f8c3b01418f361", :mtime 1756069651411, :size 121, :etag "ab23716b6790f31c9c8b85d1975457e8d11c1474"}, "/_generated_a9bb258.fpc" {:content-hash "88e9db1eba80403176dfd434c0f21c373efc5ef7", :mtime 1756069653013, :size 11307, :etag "e98af6cbdef90e88c6832c4eaf8ca3ba9c49582e"}, "/_generated_ab7f773c.vpc" {:content-hash "743a146b08420a3b1730c75f987039a1839d586f", :mtime 1756069653486, :size 4032, :etag "611577d4a28ab1798ce31aec7f7644e4c61a51b1"}, "/_generated_acca9be.goc" {:content-hash "2db55c35624960249ab9da5cb8ef271a53c96f89", :mtime 1756069523227, :size 60, :etag "7c8c0aa89f2ad1a488d410ad65d273a0293fa124"}, "/_generated_ae7f3601.spritec" {:content-hash "1160aa491f6fe5f21f126ff760753d6ee65c7d68", :mtime 1756069651247, :size 113, :etag "b541cebef35bd1f51cfd7cdc07bf1a34ad8e6465"}, "/_generated_aee2ad18.collisionobjectc" {:content-hash "cdb8970588a19a274fcaef3eb5c101e54dfc1a0f", :mtime 1756069652879, :size 76, :etag "733eddb57527fde3613c0f53f654a3399b5b0c6c"}, "/_generated_b4011556.collectionproxyc" {:content-hash "35555a2c33747e89d4b622f3baacc2528f5e826f", :mtime 1756069652565, :size 26, :etag "961fa56d9034e6fc5c6a16abfdd669c120f0b18d"}, "/_generated_b5bc6ad5.collisionobjectc" {:content-hash "394efd6142c927787d4eed449fb6b461e3f1e91f", :mtime 1756069652517, :size 74, :etag "81889b9917a7b475bd9bba3dc420faa853e0b3cc"}, "/_generated_b7e70d58.collisionobjectc" {:content-hash "fe7787136f09f17b53559722b161409a41e7d5eb", :mtime 1756069652881, :size 175, :etag "7e022030d052b2dbec6cf78e8a2bc93080d2776a"}, "/_generated_b9ab3a4.spritec" {:content-hash "a2fa4ae3755d9d451cee4a28fad78df0ac2855be", :mtime 1756069651487, :size 122, :etag "c1f3d7247d617e767128ebf40d23acc737fb9c41"}, "/_generated_baa33cac.goc" {:content-hash "062be9f204be6091a7a1affcd7b43ea240a76a25", :mtime 1756069651826, :size 69, :etag "68097ff95e642b0dfa9f95e0710c825a3198c70e"}, "/_generated_bb94cd33.goc" {:content-hash "576bb9400277f8a595904b2ef55aeb663f950056", :mtime 1756069652254, :size 61, :etag "be04a6757b51783cd07206aecbee973335b11ff8"}, "/_generated_c1ec087e.collisionobjectc" {:content-hash "af2f50a9bd5fffe030d2bb3ba3d9a42cdef8b465", :mtime 1756069653537, :size 74, :etag "ce1e48a3cd1a5568657f0199c38cbbe52f8da15f"}, "/_generated_cd818c9f.goc" {:content-hash "283573608f7df7d4668d9a36b2e22994a3293c0a", :mtime 1756069653541, :size 104, :etag "b1d0a7027e160ac0911da23dcb8994b922d67b6a"}, "/_generated_cdd302.goc" {:content-hash "da2d98f5c9ea30333d2a372c96fcf348efdfd235", :mtime 1756069651315, :size 31, :etag "c0e7e8d4dcc99fe34ec8078d91dbb414b222bff9"}, "/_generated_cfd1103d.collisionobjectc" {:content-hash "afdd243eb0559f0f3fd5cd75744c61c302ed6d31", :mtime 1756069653487, :size 86, :etag "b174228a5343f146b8932d0f0684b2b8add7e5ec"}, "/_generated_d0dc77f6.goc" {:content-hash "b3f5e9cf281877ad6e72b00caf5b5b54c68cc50f", :mtime 1756069652625, :size 39, :etag "eca18817b16043ca79e1056a579316cf8b4550fe"}, "/_generated_d1edce81.goc" {:content-hash "23c75a35e6eac206c9ff1bb9be6ff98e9ad40fe6", :mtime 1756069651248, :size 34, :etag "9f9de97efb75c8631158870d5120e41abff2663f"}, "/_generated_d51d83c1.goc" {:content-hash "c62e6cdfc99ed1b56029500e0cbc64aa747c28b5", :mtime 1756069651305, :size 227, :etag "b27646a9b8dcb7b68c48eaf0a4c41f778768d786"}, "/_generated_d6745ad6.goc" {:content-hash "679dd957c5562a474efe0d8b031a435a5b134119", :mtime 1756069652568, :size 522, :etag "e7e14050b0c9016ca4bbc7008a5a555226b16054"}, "/_generated_d7421a95.collectionproxyc" {:content-hash "35826ee32781f09dbacb6b5523c769fc1bc87d25", :mtime 1756069652516, :size 29, :etag "50ab0c2f0a137146c0700958086bbc589378c4d4"}, "/_generated_d8598d4e.spritec" {:content-hash "c7cd07c6413f4848ac1d9a639dfa6ced03e7afa0", :mtime 1756069652017, :size 131, :etag "9b4e084171e4853cc0081dd3a6c5ee7b9903522b"}, "/_generated_de1a61f0.goc" {:content-hash "e1fa9cefe90cf8bbc19ac3a19c4704992441b863", :mtime 1756069652156, :size 151, :etag "6bcd0d8f727893de28f7b67d9359c2a4bc2b99e9"}, "/_generated_decc5a8f.goc" {:content-hash "294055f8e1c755d81fb9e99bedde5b4e70a6a170", :mtime 1756069652053, :size 69, :etag "8f6c6183e8e021261e7605ca8d54ddce635a2ed0"}, "/_generated_df7ec0fa.collisionobjectc" {:content-hash "768a3488d45cc44b4e867f59872f2c45cfdb37e9", :mtime 1756069653276, :size 74, :etag "42ff26931725569cd67f7a679ac1814f67efb508"}, "/_generated_e22e7e8e.glyph_bankc" {:content-hash "4edcebdb42eef693a7f85a42e84c48fb90229312", :mtime 1756069652044, :size 40510, :etag "18e868b752bdb73000ec62d3f8cc3d08acce62a2"}, "/_generated_e386f04c.collisionobjectc" {:content-hash "a131627b41771482de72156284ae44f189a46099", :mtime 1756069651825, :size 96, :etag "f90a10be1ec6f2429f86e56df8dc1f7a6acdcc86"}, "/_generated_e38acc60.goc" {:content-hash "065f2441317adbaca0a38ca8bf91504d6d02c165", :mtime 1756069651165, :size 92, :etag "5873bd52b0841cb44ebb7c4e4921739c0420e54f"}, "/_generated_e4cec8f1.collectionproxyc" {:content-hash "1f232cfd248bfbd228b8fde6a167cec34f0115a9", :mtime 1756069652160, :size 30, :etag "59e016dfcd436428b57ebb672d6ded6cff678331"}, "/_generated_ec001155.collisionobjectc" {:content-hash "aceab26b2602db7a7d2eea45a62bb52fd969f12a", :mtime 1756069652514, :size 128, :etag "add4daccd5dc0914190ba9a9cbec4fe7244cce44"}, "/_generated_ee5ded12.spritec" {:content-hash "4990b640c2089fd41bd8aa5d77f06af61553f021", :mtime 1756069652166, :size 128, :etag "b38b46a7e9f9576a38d2021a8b34bc3d59a57971"}, "/_generated_f1aa03f6.goc" {:content-hash "9185bb257ccc44a8f03798a75cbe2d3f91196e9b", :mtime 1756069652624, :size 96, :etag "46536bfc2f5594928c2817d9780535b1ac7ed00c"}, "/_generated_f44833b1.spritec" {:content-hash "1b279fabed89910c4e81bd0ff9af9e9105434ade", :mtime 1756069652164, :size 112, :etag "1b5d508bf6ce3f5d4af95706c80d7f15868350f3"}, "/builtins/fonts/default.fontc" {:content-hash "e091070897d01cc23c8e4eca58f8c5979ea36235", :mtime 1756069651159, :size 83, :etag "b87f6a723a1e98fceef77bed028bf2aced2fd348"}, "/builtins/fonts/font-df.materialc" {:content-hash "4ecbd4bfbad461775995594553b2db783009e711", :mtime 1756069652252, :size 77, :etag "9c952a6d57f5a06cf3291d89fe6f93a7b1176ce1"}, "/builtins/graphics/default.texture_profilesc" {:content-hash "b96972d0a2051bb999d6f616ec49b7c536e6a016", :mtime 1756069651303, :size 72, :etag "90356b31b4c294ab3d50d93fc25be82ae6e5d938"}, "/builtins/input/default.gamepadsc" {:content-hash "25dced749708552bebc9bef6b167542125343efa", :mtime 1756069651555, :size 69502, :etag "81beb7c003d52bd9c6f8c74586037ba9d6ca7675"}, "/builtins/materials/gui.materialc" {:content-hash "1638d666b98304113ece906700bffe8984f707fa", :mtime 1756069651498, :size 76, :etag "61ec970dac0e9d4e4ab3c95fcf3ebdc714ac98b6"}, "/builtins/materials/sprite.materialc" {:content-hash "11da2e144e464cb9427ed62aaecd97a778d8f985", :mtime 1756069651486, :size 150, :etag "defa0dbe5b4906219339521c1c0c0218ca7f1776"}, "/builtins/render/default.display_profilesc" {:content-hash "93ff3d7d83dcdb869e94c2dfedd44e86172cd1a4", :mtime 1756069652566, :size 41, :etag "4187e11a10b0dd0d7f1b34d3ae3c0e9632dc69fd"}, "/builtins/render/default.render_scriptc" {:content-hash "ec626e56dabc9180136b81b63fec2057726b38d1", :mtime 1756069652112, :size 10255, :etag "c1cc0a68ef389c85077c748faf8832ed9806c035"}, "/builtins/render/default.renderc" {:content-hash "8ae6446114d1022ceee7a32699ca68e0baaea56d", :mtime 1756069652052, :size 41, :etag "62fcf66fed9988305fe48996f4d7693b2fac6e49"}, "/builtins/scripts/debugger.luac" {:content-hash "ef562e1fd0c8a6f42e3b229a7a47f48a2c5d9299", :mtime 1756069653534, :size 6596, :etag "bed7ee3fc769daafd2d58fae93cdf564dda737ca"}, "/builtins/scripts/edn.luac" {:content-hash "15e2a49f985697e5c638e7e9342f765111143b95", :mtime 1756069651822, :size 7602, :etag "dd7b69252cb203fd3206ec3a18a2681a13a2e63e"}, "/builtins/scripts/mobdebug.luac" {:content-hash "bc624ba50eb69b994dab5af9c3c8659da3a142f5", :mtime 1756069652755, :size 75291, :etag "2957c27b40deeae2cc5c7977b90ce0d466317ddb"}, "/builtins/scripts/socket.luac" {:content-hash "a3ac5225210a764c54033bad77db7fccefc2d662", :mtime 1756069651888, :size 5078, :etag "aa1650b768906c8058a9b946334748b6f9eb2c39"}, "/game.projectc" {:content-hash "c758e4faf8bb53c6a6692ad023c06a245eb952c0", :mtime 1756069651257, :size 3772, :etag "924ce68f9b8e6d3024e8ff4ed9f1d1092bd5c003"}, "/input/game.input_bindingc" {:content-hash "20593163d70da6a1c60ef0d1876c8883dd461e3f", :mtime 1756069651570, :size 137, :etag "2bd66b5247d4e728ece34d6ec8b8aeff1ec92d40"}, "/main/amulet.collectionc" {:content-hash "91991cc63b89d767ee2ff8dbb7a378e2a9891880", :mtime 1756069651827, :size 57, :etag "7190f1f462268743ccc62a64c8db4a76f907c9c6"}, "/main/amulet.scriptc" {:content-hash "611de452423568ce2c48aed37159ce773498f128", :mtime 1756069651408, :size 1794, :etag "09c2c81246079d29b9de66dd324aa4cb73286e90"}, "/main/banner.scriptc" {:content-hash "4540ba573a43d55d3b4f07e12857f8e84851d251", :mtime 1756069652251, :size 2043, :etag "9e3334500056dad533ba70d2977608447fd0c574"}, "/main/button.gui_scriptc" {:content-hash "5c65cc818b196cbcdba74396f95f69fbd8aee2ea", :mtime 1756069652564, :size 1720, :etag "d1d255aab0331c1e92192b8b0236dad92a52bc01"}, "/main/button.guic" {:content-hash "fd6a571227a3362d97f284bcf0b2291f9dcb941f", :mtime 1756069652253, :size 441, :etag "61da80b2dc3d1283c0821affcfa89cd735a44f40"}, "/main/clouds.scriptc" {:content-hash "82468058f4651b5d6805758522ee9c20f06877fe", :mtime 1756069651655, :size 1794, :etag "4b28339a4bfe209d030e1350ff07f4bc7a4d69ad"}, "/main/curse.scriptc" {:content-hash "e7619ca850e47955da80b35047178c687b700fbd", :mtime 1756069545835, :size 4740, :etag "17574f75e517f9b562763cd0dad6e147217b2418"}, "/main/curses.collectionc" {:content-hash "f2ce376749f34508efb331021458320b3adb6be1", :mtime 1756069652163, :size 53, :etag "b041f3d532880e2bc4bb77313459e853eb3043dc"}, "/main/entername.collectionc" {:content-hash "9bfaaba63f3bd3dee98128b3c29330175eae1144", :mtime 1756069653329, :size 110, :etag "0af22f0e02c3f27ffc139e90d3cf5cfd5d9bede7"}, "/main/entername.gui_scriptc" {:content-hash "1cddc5dcca856f0478529b005c19475de4d336a8", :mtime 1756069652623, :size 1636, :etag "a9d1578bc8840cdd780815f59ef952f2d021cd16"}, "/main/entername.guic" {:content-hash "98e0a026d92784a7e159b7367fb0fd85ad547d5c", :mtime 1756069651891, :size 304, :etag "1811c7f998031772c5939d5280b03e20d8b9edc7"}, "/main/entername.scriptc" {:content-hash "68fb4f0267038010efa12f5ef2e11b3b78a38d80", :mtime 1756069651973, :size 2170, :etag "37ea0acdc048e3942d2dd12e4cf56e8593e44e35"}, "/main/gameover.collectionc" {:content-hash "ffcf90e25879822c84cd1ceba22f37581bfa1c83", :mtime 1756069651409, :size 120, :etag "28268bf9f5c6ad8771368e985592545fdffb2238"}, "/main/gameover.scriptc" {:content-hash "6c5ad30b5522bfe4d7fae3a662081e3623d7656a", :mtime 1756069653326, :size 1333, :etag "d0b2da88c578e74e7e007d0928762ff84cf84594"}, "/main/graphics.a.texturesetc" {:content-hash "47b9a5d5c8b88d492c922d18f2da58f11dfb5ed3", :mtime 1756069651579, :size 13113, :etag "44d66647d155691bc195cf549f8eb052afc2c32a"}, "/main/holdingamulet.scriptc" {:content-hash "67344717cfefbad60023cf00d057bb875b0e6ecd", :mtime 1756069653369, :size 2191, :etag "89f131455e08e6b65fe71badec2d5e13ac64af47"}, "/main/instructions.collectionc" {:content-hash "3e7e56b743f2f790b89b8fa18c0f05fa7c7b57c2", :mtime 1756069653540, :size 63, :etag "73ced7f9888a261a62a54f4fa95b3f0e4b7831e3"}, "/main/instructions.scriptc" {:content-hash "ebd809a8b459a3c03494cfab6693bdc65bb98676", :mtime 1756069651721, :size 1292, :etag "b24a33a573c24d01c01cf6ccf38632fdbbb38364"}, "/main/level1.collectionc" {:content-hash "aeb988d9ecdf0f0e78cd8678a6362d6f58e4d75c", :mtime 1756069652055, :size 481, :etag "1f00248657160ebf07425183f8135bc6ff26e4ed"}, "/main/level1.scriptc" {:content-hash "2e9fc37177570387eda3ec5c60b10312a7f22468", :mtime 1756069651360, :size 4372, :etag "ee7101db7d41c2a8aa48c30d627871678502b05c"}, "/main/level2.collectionc" {:content-hash "4226b13967aa232dad0052c0d8e7f914e16e40d3", :mtime 1756069523223, :size 534, :etag "0e58d5e0ec7f16b18cd7621f3567770de153d44e"}, "/main/level2.scriptc" {:content-hash "d3b7e5804030821cc57db1362934ba0cc16dbb42", :mtime 1756069652155, :size 4347, :etag "1a6f0641e4e4c61aed70717a7d9befd3a262916b"}, "/main/main.collectionc" {:content-hash "bc6bc65b6fdc1ba945c5b78c8843908ae2692b82", :mtime 1756069651306, :size 147, :etag "73c497a36bd63fbd4eb27f7110715b9806351430"}, "/main/main.scriptc" {:content-hash "a2157ded32326162bfe5fa584bd791b836cfc22b", :mtime 1756069651243, :size 5999, :etag "037efd7db71a8cb7658039a3516f351e5553790b"}, "/main/mummy.scriptc" {:content-hash "fb671d9260b0c88429eb87f4ff12dddc47693120", :mtime 1756069652313, :size 2712, :etag "d263e4b8217c2e3d30553ba9466955058b4233c5"}, "/main/newfont.fontc" {:content-hash "68569ecf659972bd6c9b950572bb97049f7109af", :mtime 1756069651158, :size 81, :etag "5956f9bf42a96d796b9d11a936ecafbd59cd0b13"}, "/main/player.scriptc" {:content-hash "576a0b611bab19a9e3121f3bfd9985760c86f562", :mtime 1756069651474, :size 14623, :etag "050b97dc743f0f19be5ed5ace4ad69fd22dff519"}, "/main/score.gui_scriptc" {:content-hash "9dc74c2b6f1e636759d4bf615c850e33f74e7a2d", :mtime 1756069652014, :size 1430, :etag "ffa1e4bd91d2af47c395f3fe231b91101bbb49c5"}, "/main/score.guic" {:content-hash "c9cf7890b16ca57c859bb7baa6c58b24b45a8915", :mtime 1756069653016, :size 310, :etag "02bda9d8b6744d03ec8a3ffc8ca4cde8620b15ae"}, "/main/scoreboard.collectionc" {:content-hash "5cce6ded1e39220dc297d20cc804a609ff439ba9", :mtime 1756069652049, :size 118, :etag "61f7f8ca22d7da3e04dc15f499659c79da33ef29"}, "/main/scoreboard.gui_scriptc" {:content-hash "f0208354f207961484ae910fa9dc8fb0b6bc7c03", :mtime 1756069652372, :size 2481, :etag "3c45119a2006b584807dba6167717fa4e2f6713c"}, "/main/scoreboard.guic" {:content-hash "b8194467f6b6ea459e9aa9854864127d2a01e389", :mtime 1756069651824, :size 1503, :etag "e9546ec0ec48b6e74cddae30a2523d27e244a0f7"}, "/main/scoreboard.scriptc" {:content-hash "aad9685f1383b4d42835e3a230a1c4058102a136", :mtime 1756069651768, :size 1318, :etag "e1b91c6ca95731b61b225e29d6dca816624a9184"}, "/main/settings.collectionc" {:content-hash "070d92faeaf8500cfb01c3819c1c628808357ebf", :mtime 1756069652045, :size 59, :etag "020b1240f00f587710be05a814093fe1e7c2f270"}, "/main/settings.scriptc" {:content-hash "8376e3402c093675bca1a1288c3c75aaa7d8459d", :mtime 1756069651302, :size 1288, :etag "719b111b93c06e79ba300a486072712bc7c38bf3"}, "/main/startscreen.collectionc" {:content-hash "42011ce66618a20d65c9d1da6134a9a03b134e14", :mtime 1756069651558, :size 159, :etag "1b2cf67ea0d3dfbda0c01d97ddf12fb11f737a92"}, "/main/startscreen.gui_scriptc" {:content-hash "7def4652b2194d09e4b8d76925b6aedb30ed4cfb", :mtime 1756069651934, :size 2219, :etag "25579f96a2ab0b9e278d23fdaf268beca01b1455"}, "/main/startscreen.guic" {:content-hash "11d09ea5abb3a5457e050edbdcfb3d74b960b511", :mtime 1756069653015, :size 573, :etag "de38a2e6da26fff49270ce9f4dec44570ec71306"}} \ No newline at end of file diff --git a/build/default/_generated_10ca0db6.goc b/build/default/_generated_10ca0db6.goc new file mode 100644 index 0000000..47ac02b Binary files /dev/null and b/build/default/_generated_10ca0db6.goc differ diff --git a/build/default/_generated_112a8f83.collisionobjectc b/build/default/_generated_112a8f83.collisionobjectc new file mode 100644 index 0000000..d41a67f Binary files /dev/null and b/build/default/_generated_112a8f83.collisionobjectc differ diff --git a/build/default/_generated_13b7565d.goc b/build/default/_generated_13b7565d.goc new file mode 100644 index 0000000..c648042 Binary files /dev/null and b/build/default/_generated_13b7565d.goc differ diff --git a/build/default/_generated_147d693e.spritec b/build/default/_generated_147d693e.spritec new file mode 100644 index 0000000..0da81b5 Binary files /dev/null and b/build/default/_generated_147d693e.spritec differ diff --git a/build/default/_generated_150203ba.goc b/build/default/_generated_150203ba.goc new file mode 100644 index 0000000..da1b0f0 Binary files /dev/null and b/build/default/_generated_150203ba.goc differ diff --git a/build/default/_generated_156b50cf.spritec b/build/default/_generated_156b50cf.spritec new file mode 100644 index 0000000..f8bfd65 Binary files /dev/null and b/build/default/_generated_156b50cf.spritec differ diff --git a/build/default/_generated_1786b250.collisionobjectc b/build/default/_generated_1786b250.collisionobjectc new file mode 100644 index 0000000..6ee1899 Binary files /dev/null and b/build/default/_generated_1786b250.collisionobjectc differ diff --git a/build/default/_generated_1819ddc6.collisionobjectc b/build/default/_generated_1819ddc6.collisionobjectc new file mode 100644 index 0000000..da6bab0 Binary files /dev/null and b/build/default/_generated_1819ddc6.collisionobjectc differ diff --git a/build/default/_generated_1c78a7b5.spritec b/build/default/_generated_1c78a7b5.spritec new file mode 100644 index 0000000..7d4d4cf Binary files /dev/null and b/build/default/_generated_1c78a7b5.spritec differ diff --git a/build/default/_generated_1c88ebb0.collisionobjectc b/build/default/_generated_1c88ebb0.collisionobjectc new file mode 100644 index 0000000..53a4fac Binary files /dev/null and b/build/default/_generated_1c88ebb0.collisionobjectc differ diff --git a/build/default/_generated_25701a4e.goc b/build/default/_generated_25701a4e.goc new file mode 100644 index 0000000..ae7a075 Binary files /dev/null and b/build/default/_generated_25701a4e.goc differ diff --git a/build/default/_generated_274c9e2d.spritec b/build/default/_generated_274c9e2d.spritec new file mode 100644 index 0000000..4226518 Binary files /dev/null and b/build/default/_generated_274c9e2d.spritec differ diff --git a/build/default/_generated_2c02295b.collisionobjectc b/build/default/_generated_2c02295b.collisionobjectc new file mode 100644 index 0000000..8c28ef0 Binary files /dev/null and b/build/default/_generated_2c02295b.collisionobjectc differ diff --git a/build/default/_generated_2cd5ca37.collisionobjectc b/build/default/_generated_2cd5ca37.collisionobjectc new file mode 100644 index 0000000..ef2df90 Binary files /dev/null and b/build/default/_generated_2cd5ca37.collisionobjectc differ diff --git a/build/default/_generated_2dca475a.collectionfactoryc b/build/default/_generated_2dca475a.collectionfactoryc new file mode 100644 index 0000000..9f5bf07 --- /dev/null +++ b/build/default/_generated_2dca475a.collectionfactoryc @@ -0,0 +1,2 @@ + +/main/amulet.collectionc \ No newline at end of file diff --git a/build/default/_generated_2f21400d.goc b/build/default/_generated_2f21400d.goc new file mode 100644 index 0000000..39cbb1a Binary files /dev/null and b/build/default/_generated_2f21400d.goc differ diff --git a/build/default/_generated_2f9fa799.collisionobjectc b/build/default/_generated_2f9fa799.collisionobjectc new file mode 100644 index 0000000..a3ea636 Binary files /dev/null and b/build/default/_generated_2f9fa799.collisionobjectc differ diff --git a/build/default/_generated_3080bded.collisionobjectc b/build/default/_generated_3080bded.collisionobjectc new file mode 100644 index 0000000..f202fe1 Binary files /dev/null and b/build/default/_generated_3080bded.collisionobjectc differ diff --git a/build/default/_generated_3148ba2.spritec b/build/default/_generated_3148ba2.spritec new file mode 100644 index 0000000..ff0aaf0 Binary files /dev/null and b/build/default/_generated_3148ba2.spritec differ diff --git a/build/default/_generated_32c007e4.goc b/build/default/_generated_32c007e4.goc new file mode 100644 index 0000000..3b7a366 Binary files /dev/null and b/build/default/_generated_32c007e4.goc differ diff --git a/build/default/_generated_37ce6018.goc b/build/default/_generated_37ce6018.goc new file mode 100644 index 0000000..c7aece1 Binary files /dev/null and b/build/default/_generated_37ce6018.goc differ diff --git a/build/default/_generated_38dfde8c.collectionproxyc b/build/default/_generated_38dfde8c.collectionproxyc new file mode 100644 index 0000000..c69f646 --- /dev/null +++ b/build/default/_generated_38dfde8c.collectionproxyc @@ -0,0 +1,2 @@ + +/main/level1.collectionc \ No newline at end of file diff --git a/build/default/_generated_39618c2.spritec b/build/default/_generated_39618c2.spritec new file mode 100644 index 0000000..13ebd62 Binary files /dev/null and b/build/default/_generated_39618c2.spritec differ diff --git a/build/default/_generated_3a9645af.collisionobjectc b/build/default/_generated_3a9645af.collisionobjectc new file mode 100644 index 0000000..3aafa92 Binary files /dev/null and b/build/default/_generated_3a9645af.collisionobjectc differ diff --git a/build/default/_generated_3ccd1483.goc b/build/default/_generated_3ccd1483.goc new file mode 100644 index 0000000..cc9b018 Binary files /dev/null and b/build/default/_generated_3ccd1483.goc differ diff --git a/build/default/_generated_3f6bd3e2.spritec b/build/default/_generated_3f6bd3e2.spritec new file mode 100644 index 0000000..9674ea5 Binary files /dev/null and b/build/default/_generated_3f6bd3e2.spritec differ diff --git a/build/default/_generated_421f1369.collisionobjectc b/build/default/_generated_421f1369.collisionobjectc new file mode 100644 index 0000000..4770e74 Binary files /dev/null and b/build/default/_generated_421f1369.collisionobjectc differ diff --git a/build/default/_generated_459be146.spritec b/build/default/_generated_459be146.spritec new file mode 100644 index 0000000..e485e28 Binary files /dev/null and b/build/default/_generated_459be146.spritec differ diff --git a/build/default/_generated_46cfa461.spritec b/build/default/_generated_46cfa461.spritec new file mode 100644 index 0000000..2f1fa52 Binary files /dev/null and b/build/default/_generated_46cfa461.spritec differ diff --git a/build/default/_generated_4ec1a45d.goc b/build/default/_generated_4ec1a45d.goc new file mode 100644 index 0000000..823cedd Binary files /dev/null and b/build/default/_generated_4ec1a45d.goc differ diff --git a/build/default/_generated_506bc3d2.spritec b/build/default/_generated_506bc3d2.spritec new file mode 100644 index 0000000..9831878 Binary files /dev/null and b/build/default/_generated_506bc3d2.spritec differ diff --git a/build/default/_generated_56cd95af.spritec b/build/default/_generated_56cd95af.spritec new file mode 100644 index 0000000..40a197b Binary files /dev/null and b/build/default/_generated_56cd95af.spritec differ diff --git a/build/default/_generated_57279ae4.goc b/build/default/_generated_57279ae4.goc new file mode 100644 index 0000000..77d6c92 Binary files /dev/null and b/build/default/_generated_57279ae4.goc differ diff --git a/build/default/_generated_5a8ae5f6.goc b/build/default/_generated_5a8ae5f6.goc new file mode 100644 index 0000000..e0beb3c Binary files /dev/null and b/build/default/_generated_5a8ae5f6.goc differ diff --git a/build/default/_generated_5bfc3f92.goc b/build/default/_generated_5bfc3f92.goc new file mode 100644 index 0000000..a4eb10c Binary files /dev/null and b/build/default/_generated_5bfc3f92.goc differ diff --git a/build/default/_generated_5cb714.glyph_bankc b/build/default/_generated_5cb714.glyph_bankc new file mode 100644 index 0000000..56aaac2 Binary files /dev/null and b/build/default/_generated_5cb714.glyph_bankc differ diff --git a/build/default/_generated_5ebabaf4.goc b/build/default/_generated_5ebabaf4.goc new file mode 100644 index 0000000..bb96829 Binary files /dev/null and b/build/default/_generated_5ebabaf4.goc differ diff --git a/build/default/_generated_6259b259.vpc b/build/default/_generated_6259b259.vpc new file mode 100644 index 0000000..bfed76e Binary files /dev/null and b/build/default/_generated_6259b259.vpc differ diff --git a/build/default/_generated_653569a3.collisionobjectc b/build/default/_generated_653569a3.collisionobjectc new file mode 100644 index 0000000..b3df6c2 Binary files /dev/null and b/build/default/_generated_653569a3.collisionobjectc differ diff --git a/build/default/_generated_675f7b5b.collectionproxyc b/build/default/_generated_675f7b5b.collectionproxyc new file mode 100644 index 0000000..581fc3f --- /dev/null +++ b/build/default/_generated_675f7b5b.collectionproxyc @@ -0,0 +1,2 @@ + +/main/gameover.collectionc \ No newline at end of file diff --git a/build/default/_generated_6a795dda.collisionobjectc b/build/default/_generated_6a795dda.collisionobjectc new file mode 100644 index 0000000..b084c1e Binary files /dev/null and b/build/default/_generated_6a795dda.collisionobjectc differ diff --git a/build/default/_generated_6becee94.fpc b/build/default/_generated_6becee94.fpc new file mode 100644 index 0000000..6d567c1 Binary files /dev/null and b/build/default/_generated_6becee94.fpc differ diff --git a/build/default/_generated_6cfdd852.goc b/build/default/_generated_6cfdd852.goc new file mode 100644 index 0000000..52895ab Binary files /dev/null and b/build/default/_generated_6cfdd852.goc differ diff --git a/build/default/_generated_6ebe6ef5.collisionobjectc b/build/default/_generated_6ebe6ef5.collisionobjectc new file mode 100644 index 0000000..4da3666 Binary files /dev/null and b/build/default/_generated_6ebe6ef5.collisionobjectc differ diff --git a/build/default/_generated_70d2e4a4.goc b/build/default/_generated_70d2e4a4.goc new file mode 100644 index 0000000..f31103c Binary files /dev/null and b/build/default/_generated_70d2e4a4.goc differ diff --git a/build/default/_generated_7552a8ce.goc b/build/default/_generated_7552a8ce.goc new file mode 100644 index 0000000..55a2d1f Binary files /dev/null and b/build/default/_generated_7552a8ce.goc differ diff --git a/build/default/_generated_76a8d57.fpc b/build/default/_generated_76a8d57.fpc new file mode 100644 index 0000000..26f0139 Binary files /dev/null and b/build/default/_generated_76a8d57.fpc differ diff --git a/build/default/_generated_77f3a7e4.collectionproxyc b/build/default/_generated_77f3a7e4.collectionproxyc new file mode 100644 index 0000000..521b5dd --- /dev/null +++ b/build/default/_generated_77f3a7e4.collectionproxyc @@ -0,0 +1,2 @@ + +/main/instructions.collectionc \ No newline at end of file diff --git a/build/default/_generated_7869a6ba.texturec b/build/default/_generated_7869a6ba.texturec new file mode 100644 index 0000000..4c860b6 Binary files /dev/null and b/build/default/_generated_7869a6ba.texturec differ diff --git a/build/default/_generated_7a01a6f6.spritec b/build/default/_generated_7a01a6f6.spritec new file mode 100644 index 0000000..bbfe9ba Binary files /dev/null and b/build/default/_generated_7a01a6f6.spritec differ diff --git a/build/default/_generated_81ccff3b.spritec b/build/default/_generated_81ccff3b.spritec new file mode 100644 index 0000000..e54e9c8 Binary files /dev/null and b/build/default/_generated_81ccff3b.spritec differ diff --git a/build/default/_generated_832c2632.goc b/build/default/_generated_832c2632.goc new file mode 100644 index 0000000..ccbd225 Binary files /dev/null and b/build/default/_generated_832c2632.goc differ diff --git a/build/default/_generated_835db999.collectionproxyc b/build/default/_generated_835db999.collectionproxyc new file mode 100644 index 0000000..559f102 --- /dev/null +++ b/build/default/_generated_835db999.collectionproxyc @@ -0,0 +1,2 @@ + +/main/level3.collectionc \ No newline at end of file diff --git a/build/default/_generated_853e0f02.goc b/build/default/_generated_853e0f02.goc new file mode 100644 index 0000000..53cfbdf Binary files /dev/null and b/build/default/_generated_853e0f02.goc differ diff --git a/build/default/_generated_85dd2e31.goc b/build/default/_generated_85dd2e31.goc new file mode 100644 index 0000000..a2815eb Binary files /dev/null and b/build/default/_generated_85dd2e31.goc differ diff --git a/build/default/_generated_868aac31.spritec b/build/default/_generated_868aac31.spritec new file mode 100644 index 0000000..6594016 Binary files /dev/null and b/build/default/_generated_868aac31.spritec differ diff --git a/build/default/_generated_88b5e0.goc b/build/default/_generated_88b5e0.goc new file mode 100644 index 0000000..2fd8333 Binary files /dev/null and b/build/default/_generated_88b5e0.goc differ diff --git a/build/default/_generated_8c49a945.spritec b/build/default/_generated_8c49a945.spritec new file mode 100644 index 0000000..2e6b55b Binary files /dev/null and b/build/default/_generated_8c49a945.spritec differ diff --git a/build/default/_generated_8d3b1587.spritec b/build/default/_generated_8d3b1587.spritec new file mode 100644 index 0000000..4e282b1 Binary files /dev/null and b/build/default/_generated_8d3b1587.spritec differ diff --git a/build/default/_generated_8f0156cf.goc b/build/default/_generated_8f0156cf.goc new file mode 100644 index 0000000..0dee357 Binary files /dev/null and b/build/default/_generated_8f0156cf.goc differ diff --git a/build/default/_generated_90d13114.collectionfactoryc b/build/default/_generated_90d13114.collectionfactoryc new file mode 100644 index 0000000..bdf4896 --- /dev/null +++ b/build/default/_generated_90d13114.collectionfactoryc @@ -0,0 +1,2 @@ + +/main/curses.collectionc \ No newline at end of file diff --git a/build/default/_generated_916c6eb9.collisionobjectc b/build/default/_generated_916c6eb9.collisionobjectc new file mode 100644 index 0000000..da5e4e4 Binary files /dev/null and b/build/default/_generated_916c6eb9.collisionobjectc differ diff --git a/build/default/_generated_92fc14c0.collisionobjectc b/build/default/_generated_92fc14c0.collisionobjectc new file mode 100644 index 0000000..ebc2d4b Binary files /dev/null and b/build/default/_generated_92fc14c0.collisionobjectc differ diff --git a/build/default/_generated_9487c559.collisionobjectc b/build/default/_generated_9487c559.collisionobjectc new file mode 100644 index 0000000..992432a Binary files /dev/null and b/build/default/_generated_9487c559.collisionobjectc differ diff --git a/build/default/_generated_97baffa0.collectionproxyc b/build/default/_generated_97baffa0.collectionproxyc new file mode 100644 index 0000000..385ebcb --- /dev/null +++ b/build/default/_generated_97baffa0.collectionproxyc @@ -0,0 +1,2 @@ + +/main/startscreen.collectionc \ No newline at end of file diff --git a/build/default/_generated_992059e2.collisionobjectc b/build/default/_generated_992059e2.collisionobjectc new file mode 100644 index 0000000..94d8946 Binary files /dev/null and b/build/default/_generated_992059e2.collisionobjectc differ diff --git a/build/default/_generated_9dbfe8ba.vpc b/build/default/_generated_9dbfe8ba.vpc new file mode 100644 index 0000000..fd2bbbc Binary files /dev/null and b/build/default/_generated_9dbfe8ba.vpc differ diff --git a/build/default/_generated_a145ec55.spritec b/build/default/_generated_a145ec55.spritec new file mode 100644 index 0000000..1401d12 Binary files /dev/null and b/build/default/_generated_a145ec55.spritec differ diff --git a/build/default/_generated_a1c8e0a2.collectionproxyc b/build/default/_generated_a1c8e0a2.collectionproxyc new file mode 100644 index 0000000..91759e9 --- /dev/null +++ b/build/default/_generated_a1c8e0a2.collectionproxyc @@ -0,0 +1,2 @@ + +/main/settings.collectionc \ No newline at end of file diff --git a/build/default/_generated_a1dbda46.collisionobjectc b/build/default/_generated_a1dbda46.collisionobjectc new file mode 100644 index 0000000..7cea6ee Binary files /dev/null and b/build/default/_generated_a1dbda46.collisionobjectc differ diff --git a/build/default/_generated_a35046be.spritec b/build/default/_generated_a35046be.spritec new file mode 100644 index 0000000..4bdc9a0 Binary files /dev/null and b/build/default/_generated_a35046be.spritec differ diff --git a/build/default/_generated_a381ebc3.spritec b/build/default/_generated_a381ebc3.spritec new file mode 100644 index 0000000..04797ce Binary files /dev/null and b/build/default/_generated_a381ebc3.spritec differ diff --git a/build/default/_generated_a9bb258.fpc b/build/default/_generated_a9bb258.fpc new file mode 100644 index 0000000..af50d3b --- /dev/null +++ b/build/default/_generated_a9bb258.fpc @@ -0,0 +1,224 @@ + +  #version 140 +#ifndef GL_ES +#define lowp +#define mediump +#define highp +#endif + + +out vec4 _DMENGINE_GENERATED_gl_FragColor_0; +in lowp vec2 var_texcoord0; +in lowp vec4 var_face_color; +in lowp vec4 var_outline_color; +in lowp vec4 var_shadow_color; +in lowp vec4 var_sdf_params; +in lowp vec4 var_layer_mask; + +uniform mediump sampler2D texture_sampler; + +void main() +{ + mediump vec4 df_sample = texture(texture_sampler, var_texcoord0); + + mediump float distance = df_sample.x; + mediump float distance_shadow = df_sample.z; + + lowp float sdf_edge = var_sdf_params.x; + lowp float sdf_outline = var_sdf_params.y; + lowp float sdf_smoothing = var_sdf_params.z; + lowp float sdf_shadow = var_sdf_params.w; + + + lowp float sdf_shadow_as_outline = floor(sdf_shadow); + + lowp float sdf_is_single_layer = var_layer_mask.a; + + lowp float face_alpha = smoothstep(sdf_edge - sdf_smoothing, sdf_edge + sdf_smoothing, distance); + lowp float outline_alpha = smoothstep(sdf_outline - sdf_smoothing, sdf_outline + sdf_smoothing, distance); + lowp float shadow_alpha = smoothstep(sdf_shadow - sdf_smoothing, sdf_edge + sdf_smoothing, distance_shadow); + + shadow_alpha = mix(shadow_alpha,outline_alpha,sdf_shadow_as_outline); + + _DMENGINE_GENERATED_gl_FragColor_0 = face_alpha * var_face_color * var_layer_mask.x + + outline_alpha * var_outline_color * var_layer_mask.y * (1.0 - face_alpha * sdf_is_single_layer) + + shadow_alpha * var_shadow_color * var_layer_mask.z * (1.0 - min(1.0,outline_alpha + face_alpha) * sdf_is_single_layer); +} + +  #version 330 +#ifndef GL_ES +#define lowp +#define mediump +#define highp +#endif + + +out vec4 _DMENGINE_GENERATED_gl_FragColor_0; +in lowp vec2 var_texcoord0; +in lowp vec4 var_face_color; +in lowp vec4 var_outline_color; +in lowp vec4 var_shadow_color; +in lowp vec4 var_sdf_params; +in lowp vec4 var_layer_mask; + +uniform mediump sampler2D texture_sampler; + +void main() +{ + mediump vec4 df_sample = texture(texture_sampler, var_texcoord0); + + mediump float distance = df_sample.x; + mediump float distance_shadow = df_sample.z; + + lowp float sdf_edge = var_sdf_params.x; + lowp float sdf_outline = var_sdf_params.y; + lowp float sdf_smoothing = var_sdf_params.z; + lowp float sdf_shadow = var_sdf_params.w; + + + lowp float sdf_shadow_as_outline = floor(sdf_shadow); + + lowp float sdf_is_single_layer = var_layer_mask.a; + + lowp float face_alpha = smoothstep(sdf_edge - sdf_smoothing, sdf_edge + sdf_smoothing, distance); + lowp float outline_alpha = smoothstep(sdf_outline - sdf_smoothing, sdf_outline + sdf_smoothing, distance); + lowp float shadow_alpha = smoothstep(sdf_shadow - sdf_smoothing, sdf_edge + sdf_smoothing, distance_shadow); + + shadow_alpha = mix(shadow_alpha,outline_alpha,sdf_shadow_as_outline); + + _DMENGINE_GENERATED_gl_FragColor_0 = face_alpha * var_face_color * var_layer_mask.x + + outline_alpha * var_outline_color * var_layer_mask.y * (1.0 - face_alpha * sdf_is_single_layer) + + shadow_alpha * var_shadow_color * var_layer_mask.z * (1.0 - min(1.0,outline_alpha + face_alpha) * sdf_is_single_layer); +} + +  #version 300 es +precision mediump float; + +out vec4 _DMENGINE_GENERATED_gl_FragColor_0; +in lowp vec2 var_texcoord0; +in lowp vec4 var_face_color; +in lowp vec4 var_outline_color; +in lowp vec4 var_shadow_color; +in lowp vec4 var_sdf_params; +in lowp vec4 var_layer_mask; + +uniform mediump sampler2D texture_sampler; + +void main() +{ + mediump vec4 df_sample = texture(texture_sampler, var_texcoord0); + + mediump float distance = df_sample.x; + mediump float distance_shadow = df_sample.z; + + lowp float sdf_edge = var_sdf_params.x; + lowp float sdf_outline = var_sdf_params.y; + lowp float sdf_smoothing = var_sdf_params.z; + lowp float sdf_shadow = var_sdf_params.w; + + + lowp float sdf_shadow_as_outline = floor(sdf_shadow); + + lowp float sdf_is_single_layer = var_layer_mask.a; + + lowp float face_alpha = smoothstep(sdf_edge - sdf_smoothing, sdf_edge + sdf_smoothing, distance); + lowp float outline_alpha = smoothstep(sdf_outline - sdf_smoothing, sdf_outline + sdf_smoothing, distance); + lowp float shadow_alpha = smoothstep(sdf_shadow - sdf_smoothing, sdf_edge + sdf_smoothing, distance_shadow); + + shadow_alpha = mix(shadow_alpha,outline_alpha,sdf_shadow_as_outline); + + _DMENGINE_GENERATED_gl_FragColor_0 = face_alpha * var_face_color * var_layer_mask.x + + outline_alpha * var_outline_color * var_layer_mask.y * (1.0 - face_alpha * sdf_is_single_layer) + + shadow_alpha * var_shadow_color * var_layer_mask.z * (1.0 - min(1.0,outline_alpha + face_alpha) * sdf_is_single_layer); +} + +  precision mediump float; +varying lowp vec2 var_texcoord0; +varying lowp vec4 var_face_color; +varying lowp vec4 var_outline_color; +varying lowp vec4 var_shadow_color; +varying lowp vec4 var_sdf_params; +varying lowp vec4 var_layer_mask; + +uniform mediump sampler2D texture_sampler; + +void main() +{ + mediump vec4 df_sample = texture2D(texture_sampler, var_texcoord0); + + mediump float distance = df_sample.x; + mediump float distance_shadow = df_sample.z; + + lowp float sdf_edge = var_sdf_params.x; + lowp float sdf_outline = var_sdf_params.y; + lowp float sdf_smoothing = var_sdf_params.z; + lowp float sdf_shadow = var_sdf_params.w; + + // If there is no blur, the shadow should behave in the same way as the outline. + lowp float sdf_shadow_as_outline = floor(sdf_shadow); + // If this is a single layer font, we must make sure to not mix alpha between layers. + lowp float sdf_is_single_layer = var_layer_mask.a; + + lowp float face_alpha = smoothstep(sdf_edge - sdf_smoothing, sdf_edge + sdf_smoothing, distance); + lowp float outline_alpha = smoothstep(sdf_outline - sdf_smoothing, sdf_outline + sdf_smoothing, distance); + lowp float shadow_alpha = smoothstep(sdf_shadow - sdf_smoothing, sdf_edge + sdf_smoothing, distance_shadow); + + shadow_alpha = mix(shadow_alpha,outline_alpha,sdf_shadow_as_outline); + + gl_FragColor = face_alpha * var_face_color * var_layer_mask.x + + outline_alpha * var_outline_color * var_layer_mask.y * (1.0 - face_alpha * sdf_is_single_layer) + + shadow_alpha * var_shadow_color * var_layer_mask.z * (1.0 - min(1.0,outline_alpha + face_alpha) * sdf_is_single_layer); +} + +  #version 430 + +out vec4 _DMENGINE_GENERATED_gl_FragColor_0; +in lowp vec2 var_texcoord0; +in lowp vec4 var_face_color; +in lowp vec4 var_outline_color; +in lowp vec4 var_shadow_color; +in lowp vec4 var_sdf_params; +in lowp vec4 var_layer_mask; + +uniform mediump sampler2D texture_sampler; + +void main() +{ + mediump vec4 df_sample = texture(texture_sampler, var_texcoord0); + + mediump float distance = df_sample.x; + mediump float distance_shadow = df_sample.z; + + lowp float sdf_edge = var_sdf_params.x; + lowp float sdf_outline = var_sdf_params.y; + lowp float sdf_smoothing = var_sdf_params.z; + lowp float sdf_shadow = var_sdf_params.w; + + + lowp float sdf_shadow_as_outline = floor(sdf_shadow); + + lowp float sdf_is_single_layer = var_layer_mask.a; + + lowp float face_alpha = smoothstep(sdf_edge - sdf_smoothing, sdf_edge + sdf_smoothing, distance); + lowp float outline_alpha = smoothstep(sdf_outline - sdf_smoothing, sdf_outline + sdf_smoothing, distance); + lowp float shadow_alpha = smoothstep(sdf_shadow - sdf_smoothing, sdf_edge + sdf_smoothing, distance_shadow); + + shadow_alpha = mix(shadow_alpha,outline_alpha,sdf_shadow_as_outline); + + _DMENGINE_GENERATED_gl_FragColor_0 = face_alpha * var_face_color * var_layer_mask.x + + outline_alpha * var_outline_color * var_layer_mask.y * (1.0 - face_alpha * sdf_is_single_layer) + + shadow_alpha * var_shadow_color * var_layer_mask.z * (1.0 - min(1.0,outline_alpha + face_alpha) * sdf_is_single_layer); +} + +# | GLSL.std.450 main 3VX_mmain texture_samplervar_texcoord0 var_sdf_params3var_layer_mask V_DMENGINE_GENERATED_gl_FragColor_0Xvar_face_color_var_outline_colormvar_shadow_colorG G !G "GGGGGGGG G G#G'G*G.G1G3G3G5G9G<G>GBGEGGGKGPGTGVGXGXGYGZG\G]G_G_G`GaGcGdGhGiGjGkGmGmGnGoGqGrGuGvGxGyGzG{!  + +  ;  ; ++ ;  !+%+,;3 U;UV;X;_+e?;m6=  =WQQA!" =#"A!& %='&A!) =*)A!- ,=.- 1.A!43,=549#*<#* >19<B'*E'* G1BEK.* P1K< T.PG1=YXZY>A![3=\[]Z\=`_a`GA!b3%=cbdach>5iehjdik]j=nmonTA!p3=qproquG> v%euxv5yexzry{kz>V{8B +texture_sampler랦 + *texture_sampler0랦8@"> + var_texcoord0 * var_texcoord008@"B +var_face_color໫𺙫 X*var_face_color0໫𺙫8@"F +var_outline_colorϲX _*var_outline_color0ϲX8@"D +var_shadow_colorF m*var_shadow_color0F8@"B +var_sdf_params񞯢 *var_sdf_params0񞯢8@"B +var_layer_maskڤʼ 3*var_layer_mask0ڤʼ8@*h +"_DMENGINE_GENERATED_gl_FragColor_0r V*"_DMENGINE_GENERATED_gl_FragColor_00r8@ \ No newline at end of file diff --git a/build/default/_generated_ab7f773c.vpc b/build/default/_generated_ab7f773c.vpc new file mode 100644 index 0000000..cd473cf Binary files /dev/null and b/build/default/_generated_ab7f773c.vpc differ diff --git a/build/default/_generated_acca9be.goc b/build/default/_generated_acca9be.goc new file mode 100644 index 0000000..45e0a26 Binary files /dev/null and b/build/default/_generated_acca9be.goc differ diff --git a/build/default/_generated_ae7f3601.spritec b/build/default/_generated_ae7f3601.spritec new file mode 100644 index 0000000..652eea4 Binary files /dev/null and b/build/default/_generated_ae7f3601.spritec differ diff --git a/build/default/_generated_aee2ad18.collisionobjectc b/build/default/_generated_aee2ad18.collisionobjectc new file mode 100644 index 0000000..e012446 Binary files /dev/null and b/build/default/_generated_aee2ad18.collisionobjectc differ diff --git a/build/default/_generated_b4011556.collectionproxyc b/build/default/_generated_b4011556.collectionproxyc new file mode 100644 index 0000000..079bd3e --- /dev/null +++ b/build/default/_generated_b4011556.collectionproxyc @@ -0,0 +1,2 @@ + +/main/level2.collectionc \ No newline at end of file diff --git a/build/default/_generated_b4074e43.collisionobjectc b/build/default/_generated_b4074e43.collisionobjectc new file mode 100644 index 0000000..b4e31ba Binary files /dev/null and b/build/default/_generated_b4074e43.collisionobjectc differ diff --git a/build/default/_generated_b5bc6ad5.collisionobjectc b/build/default/_generated_b5bc6ad5.collisionobjectc new file mode 100644 index 0000000..f7f3c45 Binary files /dev/null and b/build/default/_generated_b5bc6ad5.collisionobjectc differ diff --git a/build/default/_generated_b7e70d58.collisionobjectc b/build/default/_generated_b7e70d58.collisionobjectc new file mode 100644 index 0000000..605c953 Binary files /dev/null and b/build/default/_generated_b7e70d58.collisionobjectc differ diff --git a/build/default/_generated_b9ab3a4.spritec b/build/default/_generated_b9ab3a4.spritec new file mode 100644 index 0000000..cdbd289 Binary files /dev/null and b/build/default/_generated_b9ab3a4.spritec differ diff --git a/build/default/_generated_baa33cac.goc b/build/default/_generated_baa33cac.goc new file mode 100644 index 0000000..4be6e2d Binary files /dev/null and b/build/default/_generated_baa33cac.goc differ diff --git a/build/default/_generated_bb94cd33.goc b/build/default/_generated_bb94cd33.goc new file mode 100644 index 0000000..0d1e8e7 Binary files /dev/null and b/build/default/_generated_bb94cd33.goc differ diff --git a/build/default/_generated_c1ec087e.collisionobjectc b/build/default/_generated_c1ec087e.collisionobjectc new file mode 100644 index 0000000..7f37bab Binary files /dev/null and b/build/default/_generated_c1ec087e.collisionobjectc differ diff --git a/build/default/_generated_cb972875.goc b/build/default/_generated_cb972875.goc new file mode 100644 index 0000000..7efe4b8 Binary files /dev/null and b/build/default/_generated_cb972875.goc differ diff --git a/build/default/_generated_cd818c9f.goc b/build/default/_generated_cd818c9f.goc new file mode 100644 index 0000000..1596fe0 Binary files /dev/null and b/build/default/_generated_cd818c9f.goc differ diff --git a/build/default/_generated_cdd302.goc b/build/default/_generated_cdd302.goc new file mode 100644 index 0000000..9a6d440 Binary files /dev/null and b/build/default/_generated_cdd302.goc differ diff --git a/build/default/_generated_cfd1103d.collisionobjectc b/build/default/_generated_cfd1103d.collisionobjectc new file mode 100644 index 0000000..b9ae242 Binary files /dev/null and b/build/default/_generated_cfd1103d.collisionobjectc differ diff --git a/build/default/_generated_d0dc77f6.goc b/build/default/_generated_d0dc77f6.goc new file mode 100644 index 0000000..7685919 Binary files /dev/null and b/build/default/_generated_d0dc77f6.goc differ diff --git a/build/default/_generated_d1edce81.goc b/build/default/_generated_d1edce81.goc new file mode 100644 index 0000000..9700369 Binary files /dev/null and b/build/default/_generated_d1edce81.goc differ diff --git a/build/default/_generated_d51d83c1.goc b/build/default/_generated_d51d83c1.goc new file mode 100644 index 0000000..73c7ed5 Binary files /dev/null and b/build/default/_generated_d51d83c1.goc differ diff --git a/build/default/_generated_d6745ad6.goc b/build/default/_generated_d6745ad6.goc new file mode 100644 index 0000000..8eb7373 Binary files /dev/null and b/build/default/_generated_d6745ad6.goc differ diff --git a/build/default/_generated_d7421a95.collectionproxyc b/build/default/_generated_d7421a95.collectionproxyc new file mode 100644 index 0000000..adea81d --- /dev/null +++ b/build/default/_generated_d7421a95.collectionproxyc @@ -0,0 +1,2 @@ + +/main/entername.collectionc \ No newline at end of file diff --git a/build/default/_generated_d8598d4e.spritec b/build/default/_generated_d8598d4e.spritec new file mode 100644 index 0000000..3ef226b Binary files /dev/null and b/build/default/_generated_d8598d4e.spritec differ diff --git a/build/default/_generated_de1a61f0.goc b/build/default/_generated_de1a61f0.goc new file mode 100644 index 0000000..a3eb21a Binary files /dev/null and b/build/default/_generated_de1a61f0.goc differ diff --git a/build/default/_generated_decc5a8f.goc b/build/default/_generated_decc5a8f.goc new file mode 100644 index 0000000..4547961 Binary files /dev/null and b/build/default/_generated_decc5a8f.goc differ diff --git a/build/default/_generated_df7ec0fa.collisionobjectc b/build/default/_generated_df7ec0fa.collisionobjectc new file mode 100644 index 0000000..fd8b8bc Binary files /dev/null and b/build/default/_generated_df7ec0fa.collisionobjectc differ diff --git a/build/default/_generated_e119857b.goc b/build/default/_generated_e119857b.goc new file mode 100644 index 0000000..66fdfa1 Binary files /dev/null and b/build/default/_generated_e119857b.goc differ diff --git a/build/default/_generated_e22e7e8e.glyph_bankc b/build/default/_generated_e22e7e8e.glyph_bankc new file mode 100644 index 0000000..2683e4c Binary files /dev/null and b/build/default/_generated_e22e7e8e.glyph_bankc differ diff --git a/build/default/_generated_e386f04c.collisionobjectc b/build/default/_generated_e386f04c.collisionobjectc new file mode 100644 index 0000000..76e7559 Binary files /dev/null and b/build/default/_generated_e386f04c.collisionobjectc differ diff --git a/build/default/_generated_e38acc60.goc b/build/default/_generated_e38acc60.goc new file mode 100644 index 0000000..66eb6f7 Binary files /dev/null and b/build/default/_generated_e38acc60.goc differ diff --git a/build/default/_generated_e4cec8f1.collectionproxyc b/build/default/_generated_e4cec8f1.collectionproxyc new file mode 100644 index 0000000..9ab8dc7 --- /dev/null +++ b/build/default/_generated_e4cec8f1.collectionproxyc @@ -0,0 +1,2 @@ + +/main/scoreboard.collectionc \ No newline at end of file diff --git a/build/default/_generated_ec001155.collisionobjectc b/build/default/_generated_ec001155.collisionobjectc new file mode 100644 index 0000000..3307e5e Binary files /dev/null and b/build/default/_generated_ec001155.collisionobjectc differ diff --git a/build/default/_generated_ee5ded12.spritec b/build/default/_generated_ee5ded12.spritec new file mode 100644 index 0000000..6d6039b Binary files /dev/null and b/build/default/_generated_ee5ded12.spritec differ diff --git a/build/default/_generated_f1aa03f6.goc b/build/default/_generated_f1aa03f6.goc new file mode 100644 index 0000000..3f9e370 Binary files /dev/null and b/build/default/_generated_f1aa03f6.goc differ diff --git a/build/default/_generated_f44833b1.spritec b/build/default/_generated_f44833b1.spritec new file mode 100644 index 0000000..f80068b Binary files /dev/null and b/build/default/_generated_f44833b1.spritec differ diff --git a/build/default/builtins/fonts/default.fontc b/build/default/builtins/fonts/default.fontc new file mode 100644 index 0000000..4fb4901 Binary files /dev/null and b/build/default/builtins/fonts/default.fontc differ diff --git a/build/default/builtins/fonts/font-df.materialc b/build/default/builtins/fonts/font-df.materialc new file mode 100644 index 0000000..7cda37c --- /dev/null +++ b/build/default/builtins/fonts/font-df.materialc @@ -0,0 +1,3 @@ + +fontgui/_generated_6259b259.vpc"/_generated_a9bb258.fpc2 + view_proj \ No newline at end of file diff --git a/build/default/builtins/graphics/default.texture_profilesc b/build/default/builtins/graphics/default.texture_profilesc new file mode 100644 index 0000000..884591f Binary files /dev/null and b/build/default/builtins/graphics/default.texture_profilesc differ diff --git a/build/default/builtins/input/default.gamepadsc b/build/default/builtins/input/default.gamepadsc new file mode 100644 index 0000000..75c792a Binary files /dev/null and b/build/default/builtins/input/default.gamepadsc differ diff --git a/build/default/builtins/materials/gui.materialc b/build/default/builtins/materials/gui.materialc new file mode 100644 index 0000000..c1e8c4b --- /dev/null +++ b/build/default/builtins/materials/gui.materialc @@ -0,0 +1,3 @@ + +guigui/_generated_ab7f773c.vpc"/_generated_76a8d57.fpc2 + view_proj \ No newline at end of file diff --git a/build/default/builtins/materials/sprite.materialc b/build/default/builtins/materials/sprite.materialc new file mode 100644 index 0000000..1e12ee9 Binary files /dev/null and b/build/default/builtins/materials/sprite.materialc differ diff --git a/build/default/builtins/render/default.display_profilesc b/build/default/builtins/render/default.display_profilesc new file mode 100644 index 0000000..8c0ad85 --- /dev/null +++ b/build/default/builtins/render/default.display_profilesc @@ -0,0 +1,6 @@ + + + Landscape + + +Portrait diff --git a/build/default/builtins/render/default.render_scriptc b/build/default/builtins/render/default.render_scriptc new file mode 100644 index 0000000..ae930ad --- /dev/null +++ b/build/default/builtins/render/default.render_scriptc @@ -0,0 +1,277 @@ + +P +O-- Copyright 2020-2024 The Defold Foundation +-- Copyright 2014-2020 King +-- Copyright 2009-2014 Ragnar Svensson, Christian Murray +-- Licensed under the Defold License version 1.0 (the "License"); you may not use +-- this file except in compliance with the License. +-- +-- You may obtain a copy of the License, together with FAQs at +-- https://www.defold.com/license +-- +-- Unless required by applicable law or agreed to in writing, software distributed +-- under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +-- CONDITIONS OF ANY KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations under the License. + +-- +-- message constants +-- +local MSG_CLEAR_COLOR = hash("clear_color") +local MSG_WINDOW_RESIZED = hash("window_resized") +local MSG_SET_VIEW_PROJ = hash("set_view_projection") +local MSG_SET_CAMERA_PROJ = hash("use_camera_projection") +local MSG_USE_STRETCH_PROJ = hash("use_stretch_projection") +local MSG_USE_FIXED_PROJ = hash("use_fixed_projection") +local MSG_USE_FIXED_FIT_PROJ = hash("use_fixed_fit_projection") + +local DEFAULT_NEAR = -1 +local DEFAULT_FAR = 1 +local DEFAULT_ZOOM = 1 + +-- +-- projection that centers content with maintained aspect ratio and optional zoom +-- +local function get_fixed_projection(camera, state) + camera.zoom = camera.zoom or DEFAULT_ZOOM + local projected_width = state.window_width / camera.zoom + local projected_height = state.window_height / camera.zoom + local left = -(projected_width - state.width) / 2 + local bottom = -(projected_height - state.height) / 2 + local right = left + projected_width + local top = bottom + projected_height + return vmath.matrix4_orthographic(left, right, bottom, top, camera.near, camera.far) +end +-- +-- projection that centers and fits content with maintained aspect ratio +-- +local function get_fixed_fit_projection(camera, state) + camera.zoom = math.min(state.window_width / state.width, state.window_height / state.height) + return get_fixed_projection(camera, state) +end +-- +-- projection that stretches content +-- +local function get_stretch_projection(camera, state) + return vmath.matrix4_orthographic(0, state.width, 0, state.height, camera.near, camera.far) +end +-- +-- projection for gui +-- +local function get_gui_projection(camera, state) + return vmath.matrix4_orthographic(0, state.window_width, 0, state.window_height, camera.near, camera.far) +end + +local function update_clear_color(state, color) + if color then + state.clear_buffers[graphics.BUFFER_TYPE_COLOR0_BIT] = color + end +end + +local function update_camera(camera, state) + if camera.projection_fn then + camera.proj = camera.projection_fn(camera, state) + camera.options.frustum = camera.proj * camera.view + end +end + +local function update_state(state) + state.window_width = render.get_window_width() + state.window_height = render.get_window_height() + state.valid = state.window_width > 0 and state.window_height > 0 + if not state.valid then + return false + end + -- Make sure state updated only once when resize window + if state.window_width == state.prev_window_width and state.window_height == state.prev_window_height then + return true + end + state.prev_window_width = state.window_width + state.prev_window_height = state.window_height + state.width = render.get_width() + state.height = render.get_height() + for _, camera in pairs(state.cameras) do + update_camera(camera, state) + end + return true +end + +local function init_camera(camera, projection_fn, near, far, zoom) + camera.view = vmath.matrix4() + camera.near = near == nil and DEFAULT_NEAR or near + camera.far = far == nil and DEFAULT_FAR or far + camera.zoom = zoom == nil and DEFAULT_ZOOM or zoom + camera.projection_fn = projection_fn +end + +local function create_predicates(...) + local arg = {...} + local predicates = {} + for _, predicate_name in pairs(arg) do + predicates[predicate_name] = render.predicate({predicate_name}) + end + return predicates +end + +local function create_camera(state, name, is_main_camera) + local camera = {} + camera.options = {} + state.cameras[name] = camera + if is_main_camera then + state.main_camera = camera + end + return camera +end + +local function create_state() + local state = {} + local color = vmath.vector4(0, 0, 0, 0) + color.x = sys.get_config_number("render.clear_color_red", 0) + color.y = sys.get_config_number("render.clear_color_green", 0) + color.z = sys.get_config_number("render.clear_color_blue", 0) + color.w = sys.get_config_number("render.clear_color_alpha", 0) + state.clear_buffers = { + [graphics.BUFFER_TYPE_COLOR0_BIT] = color, + [graphics.BUFFER_TYPE_DEPTH_BIT] = 1, + [graphics.BUFFER_TYPE_STENCIL_BIT] = 0 + } + state.cameras = {} + return state +end + +local function set_camera_world(state) + local camera_components = camera.get_cameras() + + -- This will set the last enabled camera from the stack of camera components + if #camera_components > 0 then + for i = #camera_components, 1, -1 do + if camera.get_enabled(camera_components[i]) then + local camera_component = state.cameras.camera_component + camera_component.camera = camera_components[i] + render.set_camera(camera_component.camera, { use_frustum = true }) + -- The frustum will be overridden by the render.set_camera call, + -- so we don't need to return anything here other than an empty table. + return camera_component.options + end + end + end + + -- If no active camera was found, we use the default main "camera world" camera + local camera_world = state.cameras.camera_world + render.set_view(camera_world.view) + render.set_projection(camera_world.proj) + return camera_world.options +end + +local function reset_camera_world(state) + -- unbind the camera if a camera component is used + if state.cameras.camera_component.camera then + state.cameras.camera_component.camera = nil + render.set_camera() + end +end + +function init(self) + self.predicates = create_predicates("tile", "gui", "particle", "model", "debug_text") + + -- default is stretch projection. copy from builtins and change for different projection + -- or send a message to the render script to change projection: + -- msg.post("@render:", "use_stretch_projection", { near = -1, far = 1 }) + -- msg.post("@render:", "use_fixed_projection", { near = -1, far = 1, zoom = 2 }) + -- msg.post("@render:", "use_fixed_fit_projection", { near = -1, far = 1 }) + + local state = create_state() + self.state = state + + local camera_world = create_camera(state, "camera_world", true) + init_camera(camera_world, get_stretch_projection) + local camera_gui = create_camera(state, "camera_gui") + init_camera(camera_gui, get_gui_projection) + -- Create a special camera that wraps camera components (if they exist) + -- It will take precedence over any other camera, and not change from messages + local camera_component = create_camera(state, "camera_component") + update_state(state) +end + +function update(self) + local state = self.state + if not state.valid then + if not update_state(state) then + return + end + end + + local predicates = self.predicates + -- clear screen buffers + -- + -- turn on depth_mask before `render.clear()` to clear it as well + render.set_depth_mask(true) + render.set_stencil_mask(0xff) + render.clear(state.clear_buffers) + + -- setup camera view and projection + -- + local draw_options_world = set_camera_world(state) + render.set_viewport(0, 0, state.window_width, state.window_height) + + -- set states used for all the world predicates + render.set_blend_func(graphics.BLEND_FACTOR_SRC_ALPHA, graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA) + render.enable_state(graphics.STATE_DEPTH_TEST) + + -- render `model` predicate for default 3D material + -- + render.enable_state(graphics.STATE_CULL_FACE) + render.draw(predicates.model, draw_options_world) + render.set_depth_mask(false) + render.disable_state(graphics.STATE_CULL_FACE) + + -- render the other components: sprites, tilemaps, particles etc + -- + render.enable_state(graphics.STATE_BLEND) + render.draw(predicates.tile, draw_options_world) + render.draw(predicates.particle, draw_options_world) + render.disable_state(graphics.STATE_DEPTH_TEST) + + render.draw_debug3d() + + reset_camera_world(state) + + -- render GUI + -- + local camera_gui = state.cameras.camera_gui + render.set_view(camera_gui.view) + render.set_projection(camera_gui.proj) + + render.enable_state(graphics.STATE_STENCIL_TEST) + render.draw(predicates.gui, camera_gui.frustum) + render.draw(predicates.debug_text, camera_gui.frustum) + render.disable_state(graphics.STATE_STENCIL_TEST) + render.disable_state(graphics.STATE_BLEND) +end + +function on_message(self, message_id, message) + local state = self.state + local camera = state.main_camera + + if message_id == MSG_CLEAR_COLOR then + update_clear_color(state, message.color) + elseif message_id == MSG_WINDOW_RESIZED then + update_state(state) + elseif message_id == MSG_SET_VIEW_PROJ then + camera.view = message.view + self.camera_projection = message.projection or vmath.matrix4() + update_camera(camera, state) + elseif message_id == MSG_SET_CAMERA_PROJ then + camera.projection_fn = function() return self.camera_projection end + elseif message_id == MSG_USE_STRETCH_PROJ then + init_camera(camera, get_stretch_projection, message.near, message.far) + update_camera(camera, state) + elseif message_id == MSG_USE_FIXED_PROJ then + init_camera(camera, get_fixed_projection, message.near, message.far, message.zoom) + update_camera(camera, state) + elseif message_id == MSG_USE_FIXED_FIT_PROJ then + init_camera(camera, get_fixed_fit_projection, message.near, message.far) + update_camera(camera, state) + end +end +&@builtins/render/default.render_script" \ No newline at end of file diff --git a/build/default/builtins/render/default.renderc b/build/default/builtins/render/default.renderc new file mode 100644 index 0000000..301df78 --- /dev/null +++ b/build/default/builtins/render/default.renderc @@ -0,0 +1,2 @@ + +'/builtins/render/default.render_scriptc \ No newline at end of file diff --git a/build/default/game.projectc b/build/default/game.projectc new file mode 100644 index 0000000..02b15c6 --- /dev/null +++ b/build/default/game.projectc @@ -0,0 +1,199 @@ +[android] +debuggable = 0 +display_cutout = 1 +extract_native_libs = 1 +iap_provider = GooglePlay +immersive_mode = 0 +input_method = HiddenInputField +manifest = /builtins/manifests/android/AndroidManifest.xml +minimum_sdk_version = 19 +package = com.example.todo +target_sdk_version = 35 +version_code = 1 + +[bootstrap] +main_collection = /main/main.collectionc +render = /builtins/render/default.renderc + +[collection] +max_input_stack_entries = 16 +max_instances = 1024 + +[collection_proxy] +max_count = 16 + +[collectionfactory] +max_count = 128 + +[display] +display_device_info = 0 +display_profiles = /builtins/render/default.display_profilesc +dynamic_orientation = 0 +fullscreen = 0 +height = 694 +high_dpi = 1 +samples = 0 +swap_interval = 1 +update_frequency = 0 +variable_dt = 0 +vsync = 1 +width = 1054 + +[engine] +fixed_update_frequency = 60 +max_time_step = 0.5 +run_while_iconified = 0 + +[factory] +max_count = 128 + +[graphics] +default_texture_mag_filter = linear +default_texture_min_filter = linear +max_characters = 8192 +max_debug_vertices = 10000 +max_draw_calls = 1024 +max_font_batches = 128 +opengl_core_profile_hint = 1 +opengl_version_hint = 33 +texture_profiles = /builtins/graphics/default.texture_profilesc +verify_graphics_calls = 1 + +[gui] +max_animation_count = 1024 +max_count = 64 +max_particle_count = 1024 + +[html5] +archive_location_prefix = archive +cssfile = /builtins/manifests/web/light_theme.css +custom_heap_size = 0 +engine_arguments = --verify-graphics-calls=false +heap_size = 256 +htmlfile = /builtins/manifests/web/engine_template.html +retry_count = 10 +retry_time = 1.0 +scale_mode = fit +set_custom_heap_size = 0 +show_console_banner = 1 +show_fullscreen_button = 1 +show_made_with_defold = 1 +transparent_graphics_context = 0 +wasm_streaming = 0 + +[input] +game_binding = /input/game.input_bindingc +gamepads = /builtins/input/default.gamepadsc +repeat_delay = 0.5 +repeat_interval = 0.2 +use_accelerometer = 1 + +[ios] +bundle_identifier = example.unnamed +default_language = en +infoplist = /builtins/manifests/ios/Info.plist +launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc +localizations = en +pre_renderered_icons = 0 +privacymanifest = /builtins/manifests/ios/PrivacyInfo.xcprivacy + +[label] +max_count = 64 +subpixels = 1 + +[liveupdate] +mount_on_start = 1 +settings = /liveupdate.settings + +[mesh] +max_count = 128 + +[model] +max_count = 128 +split_meshes = 0 + +[network] +http_cache_enabled = 1 +http_thread_count = 4 +http_timeout = 0.0 + +[osx] +bundle_identifier = example.unnamed +bundle_version = 1 +default_language = en +infoplist = /builtins/manifests/osx/Info.plist +localizations = en +privacymanifest = /builtins/manifests/osx/PrivacyInfo.xcprivacy + +[particle_fx] +max_count = 64 +max_emitter_count = 64 +max_particle_buffer_count = 1024 +max_particle_count = 1024 + +[physics] +allow_dynamic_transforms = 1 +contact_impulse_limit = 0.0 +debug = 0 +debug_alpha = 0.9 +debug_scale = 30.0 +gravity_x = 0.0 +gravity_y = -900.0 +gravity_z = 0.0 +max_collision_object_count = 128 +max_collisions = 64 +max_contacts = 128 +max_fixed_timesteps = 2 +ray_cast_limit_2d = 64 +ray_cast_limit_3d = 128 +scale = 1.0 +trigger_overlap_capacity = 16 +type = 2D +use_fixed_timestep = 0 +velocity_threshold = 1.0 +world_count = 4 + +[profiler] +sleep_between_server_updates = 0 +track_cpu = 0 + +[project] +compress_archive = 1 +minimum_log_level = 1 +title = My Project +version = 1.0 +write_log = 0 + +[render] +clear_color_alpha = 1.0 +clear_color_blue = 0.0 +clear_color_green = 0.0 +clear_color_red = 0.0 + +[resource] +http_cache = 0 +max_resources = 1024 + +[script] +shared_state = 1 + +[shader] +output_spirv = 0 + +[sound] +gain = 1.0 +max_component_count = 32 +max_sound_buffers = 32 +max_sound_data = 128 +max_sound_instances = 256 +max_sound_sources = 16 +use_thread = 1 + +[sprite] +max_count = 128 +subpixels = 1 + +[tilemap] +max_count = 16 +max_tile_count = 2048 + diff --git a/build/default/input/game.input_bindingc b/build/default/input/game.input_bindingc new file mode 100644 index 0000000..38ff8ef Binary files /dev/null and b/build/default/input/game.input_bindingc differ diff --git a/build/default/main/amulet.collectionc b/build/default/main/amulet.collectionc new file mode 100644 index 0000000..67e5c6d Binary files /dev/null and b/build/default/main/amulet.collectionc differ diff --git a/build/default/main/amulet.scriptc b/build/default/main/amulet.scriptc new file mode 100644 index 0000000..aee7fba Binary files /dev/null and b/build/default/main/amulet.scriptc differ diff --git a/build/default/main/banner.scriptc b/build/default/main/banner.scriptc new file mode 100644 index 0000000..2661b37 Binary files /dev/null and b/build/default/main/banner.scriptc differ diff --git a/build/default/main/button.gui_scriptc b/build/default/main/button.gui_scriptc new file mode 100644 index 0000000..772f75d Binary files /dev/null and b/build/default/main/button.gui_scriptc differ diff --git a/build/default/main/button.guic b/build/default/main/button.guic new file mode 100644 index 0000000..9a81b3d Binary files /dev/null and b/build/default/main/button.guic differ diff --git a/build/default/main/clouds.scriptc b/build/default/main/clouds.scriptc new file mode 100644 index 0000000..c4e7c56 Binary files /dev/null and b/build/default/main/clouds.scriptc differ diff --git a/build/default/main/curse.scriptc b/build/default/main/curse.scriptc new file mode 100644 index 0000000..52422be Binary files /dev/null and b/build/default/main/curse.scriptc differ diff --git a/build/default/main/curses.collectionc b/build/default/main/curses.collectionc new file mode 100644 index 0000000..20ae0ef Binary files /dev/null and b/build/default/main/curses.collectionc differ diff --git a/build/default/main/entername.collectionc b/build/default/main/entername.collectionc new file mode 100644 index 0000000..d9aad03 Binary files /dev/null and b/build/default/main/entername.collectionc differ diff --git a/build/default/main/entername.gui_scriptc b/build/default/main/entername.gui_scriptc new file mode 100644 index 0000000..b2f04f3 Binary files /dev/null and b/build/default/main/entername.gui_scriptc differ diff --git a/build/default/main/entername.guic b/build/default/main/entername.guic new file mode 100644 index 0000000..55e4d8c Binary files /dev/null and b/build/default/main/entername.guic differ diff --git a/build/default/main/entername.scriptc b/build/default/main/entername.scriptc new file mode 100644 index 0000000..5fb4177 Binary files /dev/null and b/build/default/main/entername.scriptc differ diff --git a/build/default/main/gameover.collectionc b/build/default/main/gameover.collectionc new file mode 100644 index 0000000..3c99e27 Binary files /dev/null and b/build/default/main/gameover.collectionc differ diff --git a/build/default/main/gameover.scriptc b/build/default/main/gameover.scriptc new file mode 100644 index 0000000..f4fd98a Binary files /dev/null and b/build/default/main/gameover.scriptc differ diff --git a/build/default/main/graphics.a.texturesetc b/build/default/main/graphics.a.texturesetc new file mode 100644 index 0000000..ed65532 Binary files /dev/null and b/build/default/main/graphics.a.texturesetc differ diff --git a/build/default/main/holdingamulet.scriptc b/build/default/main/holdingamulet.scriptc new file mode 100644 index 0000000..29d2818 Binary files /dev/null and b/build/default/main/holdingamulet.scriptc differ diff --git a/build/default/main/instructions.collectionc b/build/default/main/instructions.collectionc new file mode 100644 index 0000000..726d41a Binary files /dev/null and b/build/default/main/instructions.collectionc differ diff --git a/build/default/main/instructions.scriptc b/build/default/main/instructions.scriptc new file mode 100644 index 0000000..9dc0920 Binary files /dev/null and b/build/default/main/instructions.scriptc differ diff --git a/build/default/main/level1.collectionc b/build/default/main/level1.collectionc new file mode 100644 index 0000000..6ae57aa Binary files /dev/null and b/build/default/main/level1.collectionc differ diff --git a/build/default/main/level1.scriptc b/build/default/main/level1.scriptc new file mode 100644 index 0000000..d961cf0 Binary files /dev/null and b/build/default/main/level1.scriptc differ diff --git a/build/default/main/level2.collectionc b/build/default/main/level2.collectionc new file mode 100644 index 0000000..9ff24f8 Binary files /dev/null and b/build/default/main/level2.collectionc differ diff --git a/build/default/main/level2.scriptc b/build/default/main/level2.scriptc new file mode 100644 index 0000000..be4771d Binary files /dev/null and b/build/default/main/level2.scriptc differ diff --git a/build/default/main/level3.collectionc b/build/default/main/level3.collectionc new file mode 100644 index 0000000..d06b8a7 Binary files /dev/null and b/build/default/main/level3.collectionc differ diff --git a/build/default/main/main.collectionc b/build/default/main/main.collectionc new file mode 100644 index 0000000..64d409f Binary files /dev/null and b/build/default/main/main.collectionc differ diff --git a/build/default/main/main.scriptc b/build/default/main/main.scriptc new file mode 100644 index 0000000..b67b0a2 Binary files /dev/null and b/build/default/main/main.scriptc differ diff --git a/build/default/main/mummy.scriptc b/build/default/main/mummy.scriptc new file mode 100644 index 0000000..53f8934 Binary files /dev/null and b/build/default/main/mummy.scriptc differ diff --git a/build/default/main/newfont.fontc b/build/default/main/newfont.fontc new file mode 100644 index 0000000..d2f36f4 Binary files /dev/null and b/build/default/main/newfont.fontc differ diff --git a/build/default/main/player.scriptc b/build/default/main/player.scriptc new file mode 100644 index 0000000..703c321 --- /dev/null +++ b/build/default/main/player.scriptc @@ -0,0 +1,440 @@ + +r +rlocal Movement = { + STILL_LEFT = "STILL_LEFT", + STILL_RIGHT = "STILL_RIGHT", + MOVING_LEFT = "MOVING_LEFT", + MOVING_RIGHT = "MOVING_RIGHT", + CLIMBING_UP = "CLIMBING_UP", + CLIMBING_DOWN = "CLIMBING_DOWN", + FALLING = "FALLING", + JUMPING_LEFT = "JUMPING_LEFT", + JUMPING_RIGHT = "JUMPING_RIGHT", + JUMPING_STRAIGHT_UP = "JUMPING_STRAIGHT_UP", + CLIMBING_STILL = "CLIMBING_STILL", +} + +local Actions = { + LEFT_ARROW_PRESS = "LEFT_ARROW_PRESS", + LEFT_ARROW_RELEASE = "LEFT_ARROW_RELEASE", + RIGHT_ARROW_PRESS = "RIGHT_ARROW_PRESS", + RIGHT_ARROW_RELEASE = "RIGHT_ARROW_RELEASE", + UP_ARROW_PRESS = "UP_ARROW_PRESS", + UP_ARROW_RELEASE = "UP_ARROW_RELEASE", + DOWN_ARROW_PRESS = "DOWN_ARROW_PRESS", + DOWN_ARROW_RELEASE = "DOWN_ARROW_RELEASE", + SPACE_BAR_PRESS = "SPACE_BAR_PRESS", + SPACE_BAR_RELEASE = "SPACE_BAR_RELEASE", +} + +-- Transition table: [current_state][input] = next_state +local transitions = { + [Movement.STILL_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.STILL_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.MOVING_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.MOVING_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.CLIMBING_STILL] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_UP] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_DOWN] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, +} + +function init(self) + msg.post(".", "acquire_input_focus") + self.direction = vmath.vector3(0,0,0) + self.speed = 250 + self.gravity = -5000 -- gravity force + self.jump_velocity = 800-- how strong the jump is + self.velocity = vmath.vector3(0, 0, 0) + self.grounded = false + self.jumped = false + self.near_up_ladder = false + self.correction = vmath.vector3() + self.climbing = false + self.is_moving = 0 + + self.left_pressed = false + self.right_pressed = false + self.up_pressed = false + self.down_pressed = false + self.jump_pressed = false + + self.have_amulet = false + self.amulet_timer = 0 + self.regenerating = false + self.regen_timer = 0 + self.blink_on_timer = 0 + self.blink_off_timer = 0 + + self.paused = false + + self.current_movement = Movement.STILL_RIGHT + + go.set_position(vmath.vector3(100,100,0.2)) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +local function handleInput(self, input) + local Transitions = transitions[self.current_movement] + local next_movement = Transitions and Transitions[input] + if next_movement then + --print("Transitioning from", self.current_movement, "to", next_movement, "on input", input) + self.current_movement = next_movement + if next_movement == Movement.MOVING_LEFT then + sprite.play_flipbook("#sprite", hash("run_left")) + msg.post("holding_amulet", "left") + self.direction.x = -1 + self.velocity.y = 0 + end + if next_movement == Movement.MOVING_RIGHT then + sprite.play_flipbook("#sprite", hash("run_right")) + msg.post("holding_amulet", "right") + self.direction.x = 1 + self.velocity.y = 0 + end + if next_movement == Movement.STILL_RIGHT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_right")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.STILL_LEFT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_left")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.CLIMBING_STILL then + sprite.play_flipbook("#sprite", hash("still_climbing")) + self.velocity.y = 0 + self.climbing = true + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + --print("Actions.LEFT_RIGHT_PRESS from climbing_still") + elseif self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + --print("Actions.LEFT_ARROW_PRESS from climbing_still") + end + end + if next_movement == Movement.CLIMBING_UP then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = 150 + self.climbing = true + end + if next_movement == Movement.CLIMBING_DOWN then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = -150 + self.climbing = true + end + else + --print("No transition defined for", input, "in state", self.current_movement) + end +end + +function update(self, dt) + + if not self.paused then + + if self.amulet_timer > 0 then + self.amulet_timer = self.amulet_timer - dt + -- print ("You have " .. self.amulet_timer .. " seconds left of amulet") + if self.amulet_timer < 0 then + self.amulet_timer = 0 + self.have_amulet = false + msg.post("holding_amulet", "disable_sprite") + end + end + + if self.regen_timer > 0 then + self.regen_timer = self.regen_timer - dt + -- print ("You have " .. self.regen_timer .. " seconds left of regeneration") + if self.regen_timer < 0 then + self.regen_timer = 0 + self.regenerating = false + msg.post("#sprite", "enable") + end + if self.regenerating then + if self.blink_on_timer > 0 then + self.blink_on_timer = self.blink_on_timer - dt + msg.post("#sprite", "enable") + elseif self.blink_off_timer > 0 then + self.blink_off_timer = self.blink_off_timer - dt + msg.post("#sprite", "disable") + else + self.blink_on_timer = 0.25 + self.blink_off_timer = 0.25 + end + end + end + + self.correction = vmath.vector3() + + self.velocity.x = self.direction.x * self.speed + local pos = go.get_position() + + pos = pos + self.velocity * dt + if pos.x < 24 then + pos.x = 24 + elseif pos.x > 1030 then + pos.x = 1030 + end + if pos.y < 0 then + pos.y = 100 + end + + local centre = vmath.vector3(pos.x, pos.y - 10, 0) + local platform = pos + vmath.vector3(0, -36, 0) + local ladder_up_left = pos + vmath.vector3(-24, -32, 0) + local ladder_up_right = pos + vmath.vector3(24, -32, 0) + local ladder_down_left = pos + vmath.vector3(-24, -42, 0) + local ladder_down_right = pos + vmath.vector3(24, -42, 0) + + --msg.post("@render:", "draw_line", { start_point = centre, end_point = platform, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_up_left, end_point = ladder_up_right, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_up_right, end_point = ladder_up_left, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_down_left, end_point = ladder_down_right, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_down_right, end_point = ladder_down_left, color = vmath.vector4(1,0,0,1) }) + + local platform_result = physics.raycast(centre, platform, { hash("platform") }) + if platform_result then + local point = platform_result.position - pos + -- msg.post("@render:", "draw_debug_text", { text = "Platform", position = vmath.vector3(20, 400, 0), color = vmath.vector4(1, 0, 0, 1) } ) + -- msg.post("@render:", "draw_debug_text", { text = "X : " .. tostring(point.x), position = vmath.vector3(20, 380, 0), color = vmath.vector4(1, 0, 0, 1) } ) + -- msg.post("@render:", "draw_debug_text", { text = "Y : " .. tostring(point.y), position = vmath.vector3(20, 360, 0), color = vmath.vector4(1, 0, 0, 1) } ) + if not self.climbing then + self.jumped = false + self.speed = 250 + self.grounded = true + self.velocity.y = 0 + if point.y > -36 then + pos.y = pos.y + (point.y + 36) + end + --if self.climbing then + -- self.climbing = false + -- sprite.play_flipbook("#sprite", hash("still_left")) + --end + end + else + self.grounded = false + end + + local ladder_up_result1 = physics.raycast(ladder_up_right, ladder_up_left, { hash("ladder") }) + local ladder_up_result2 = physics.raycast(ladder_up_left, ladder_up_right, { hash("ladder") }) + if ladder_up_result1 then + self.near_up_ladder = true + elseif ladder_up_result2 then + self.near_up_ladder = true + else + self.near_up_ladder = false + end + + local ladder_down_result1 = physics.raycast(ladder_down_right, ladder_down_left, { hash("ladder") }) + local ladder_down_result2 = physics.raycast(ladder_down_left, ladder_down_right, { hash("ladder") }) + if ladder_down_result1 then + self.near_down_ladder = true + elseif ladder_down_result2 then + self.near_down_ladder = true + else + self.near_down_ladder = false + end + + if not (self.near_up_ladder or self.near_down_ladder)then + if self.climbing then + self.climbing = false + if self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + end + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + end + end + end + +-- local debug_vars = { +-- x = pos.x, +-- y = pos.y, +-- x_vel = self.velocity.x, +-- y_vel = self.velocity.y, +-- grounded = self.grounded, +-- near_up_ladder = self.near_up_ladder, +-- near_down_ladder = self.near_down_ladder, +-- jumped = self.jumped, +-- climbing = self.climbing, +-- left_pressed = self.left_pressed, +-- right_pressed = self.right_pressed, +-- up_pressed = self.up_pressed, +-- down_pressed = self.down_pressed, +-- } +-- msg.post("#debug", "set_vars", debug_vars) + + if not self.grounded and not ((self.near_up_ladder or self.near_down_ladder) and self.climbing) then + self.velocity.y = self.velocity.y + self.gravity * dt + end + + go.set_position(pos) + end +end + +function fixed_update(self, dt) + +end + +function on_message(self, message_id, message, sender) + if message_id == hash("contact_point_response") then + if message.group == hash("curse") then + if not self.regenerating then + --print("collision with curse") + msg.post(message.other_id, "dying") + end + end + if message.group == hash("amulet") then + self.have_amulet = true + self.amulet_timer = 5 + msg.post("holding_amulet", "enable_sprite") + --print("collision with amulet") + end + if message.group == hash("mummy") then + msg.post("main:/controller#main", "LevelCompleted") + --print("collision with mummy") + end + end + if message_id == hash("curse_dying_reply") then + if message.dying == false then + msg.post("/holding_amulet#holdingamulet", "disable_sprite") + msg.post("main:/controller#main", "LifeLost") + + --else + self.current_movement = Movement.MOVING_RIGHT + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + go.set_position(vmath.vector3(100,100,0.2)) + self.regenerating = true + self.regen_timer = 3 + --end + end + end + if message_id == hash("pause") then + self.paused = true + end + if message_id == hash("unpause") then + self.paused = false + end +end + +function on_input(self, action_id, action) + if not self.paused then + if action_id == hash("left") then + if action.pressed then + self.left_pressed = true + handleInput(self, Actions.LEFT_ARROW_PRESS) + elseif action.released then + self.left_pressed = false + handleInput(self, Actions.LEFT_ARROW_RELEASE) + end + end + if action_id == hash("right") then + if action.pressed then + self.right_pressed = true + handleInput(self, Actions.RIGHT_ARROW_PRESS) + elseif action.released then + self.right_pressed = false + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + end + end + if action_id == hash("jump") and action.pressed and not self.jumped and not self.climbing then + self.velocity.y = self.jump_velocity + self.speed = 500 + self.jumped = true + end + if action_id == hash("climb_up") then + if action.pressed then + self.up_pressed = true + handleInput(self, Actions.UP_ARROW_PRESS) + elseif action.released then + self.up_pressed = false + handleInput(self, Actions.UP_ARROW_RELEASE) + end + end + if action_id == hash("climb_down") then + if action.pressed then + self.down_pressed = true + handleInput(self, Actions.DOWN_ARROW_PRESS) + elseif action.released then + self.down_pressed = false + handleInput(self, Actions.DOWN_ARROW_RELEASE) + end + end + end +end + +function on_reload(self) +-- Add reload-handling code here +-- Learn more: https://defold.com/manuals/hot-reload/ +-- Remove this function if not needed +end@main/player.script" \ No newline at end of file diff --git a/build/default/main/score.gui_scriptc b/build/default/main/score.gui_scriptc new file mode 100644 index 0000000..4eec7da Binary files /dev/null and b/build/default/main/score.gui_scriptc differ diff --git a/build/default/main/score.guic b/build/default/main/score.guic new file mode 100644 index 0000000..bc87f82 Binary files /dev/null and b/build/default/main/score.guic differ diff --git a/build/default/main/scoreboard.collectionc b/build/default/main/scoreboard.collectionc new file mode 100644 index 0000000..12ead85 Binary files /dev/null and b/build/default/main/scoreboard.collectionc differ diff --git a/build/default/main/scoreboard.gui_scriptc b/build/default/main/scoreboard.gui_scriptc new file mode 100644 index 0000000..e1528c2 Binary files /dev/null and b/build/default/main/scoreboard.gui_scriptc differ diff --git a/build/default/main/scoreboard.guic b/build/default/main/scoreboard.guic new file mode 100644 index 0000000..afc75ad Binary files /dev/null and b/build/default/main/scoreboard.guic differ diff --git a/build/default/main/scoreboard.scriptc b/build/default/main/scoreboard.scriptc new file mode 100644 index 0000000..8d9b030 Binary files /dev/null and b/build/default/main/scoreboard.scriptc differ diff --git a/build/default/main/settings.collectionc b/build/default/main/settings.collectionc new file mode 100644 index 0000000..d703a1b Binary files /dev/null and b/build/default/main/settings.collectionc differ diff --git a/build/default/main/settings.scriptc b/build/default/main/settings.scriptc new file mode 100644 index 0000000..34a52bf Binary files /dev/null and b/build/default/main/settings.scriptc differ diff --git a/build/default/main/startscreen.collectionc b/build/default/main/startscreen.collectionc new file mode 100644 index 0000000..f9fb5bb Binary files /dev/null and b/build/default/main/startscreen.collectionc differ diff --git a/build/default/main/startscreen.gui_scriptc b/build/default/main/startscreen.gui_scriptc new file mode 100644 index 0000000..64ef2f6 Binary files /dev/null and b/build/default/main/startscreen.gui_scriptc differ diff --git a/build/default/main/startscreen.guic b/build/default/main/startscreen.guic new file mode 100644 index 0000000..c2d0b50 Binary files /dev/null and b/build/default/main/startscreen.guic differ diff --git a/build/default_html5/_BobBuildState_ b/build/default_html5/_BobBuildState_ new file mode 100644 index 0000000..f86fb32 Binary files /dev/null and b/build/default_html5/_BobBuildState_ differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/MyProject.wasm b/build/default_html5/__htmlLaunchDir/My Project/MyProject.wasm new file mode 100644 index 0000000..ad23d5c Binary files /dev/null and b/build/default_html5/__htmlLaunchDir/My Project/MyProject.wasm differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/MyProject_wasm.js b/build/default_html5/__htmlLaunchDir/My Project/MyProject_wasm.js new file mode 100644 index 0000000..9753e53 --- /dev/null +++ b/build/default_html5/__htmlLaunchDir/My Project/MyProject_wasm.js @@ -0,0 +1 @@ +function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t.return||t.return()}finally{if(u)throw o}}}}function _defineProperties(e,r){for(var t=0;tr.length)&&(a=r.length);for(var e=0,n=Array(a);e1&&arguments[1]!==undefined?arguments[1]:true;filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return new Promise(function(resolve,reject){fs.readFile(filename,binary?undefined:"utf8",function(err,data){if(err)reject(err);else resolve(binary?data.buffer:data)})})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);if(typeof module!="undefined"){module["exports"]=Module}quit_=function quit_(status,toThrow){process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=function readAsync(url){if(isFileURI(url)){return new Promise(function(resolve,reject){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){resolve(xhr.response);return}reject(xhr.status)};xhr.onerror=reject;xhr.send(null)})}return fetch(url,{credentials:"same-origin"}).then(function(response){if(response.ok){return response.arrayBuffer()}return Promise.reject(new Error(response.status+" : "+response.url))})}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];var wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||33554432;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:2147483648/65536})}updateMemoryViews();var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATEXIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(!Module["noFSInit"]&&!FS.initialized)FS.init();FS.ignorePermissions=false;TTY.init();SOCKFS.root=FS.mount(SOCKFS,{},null);callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}if(!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(x){froundBuffer[0]=x;return froundBuffer[0]}}Math.clz32||(Math.clz32=function(x){var n=32;var y=x>>16;if(y){n-=16;x=y}y=x>>8;if(y){n-=8;x=y}y=x>>4;if(y){n-=4;x=y}y=x>>2;if(y){n-=2;x=y}y=x>>1;if(y)return n-2;return n-x});Math.trunc||(Math.trunc=function(x){return x<0?Math.ceil(x):Math.floor(x)});var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){var _Module$monitorRunDep;runDependencies++;(_Module$monitorRunDep=Module["monitorRunDependencies"])===null||_Module$monitorRunDep===void 0||_Module$monitorRunDep.call(Module,runDependencies)}function removeRunDependency(id){var _Module$monitorRunDep2;runDependencies--;(_Module$monitorRunDep2=Module["monitorRunDependencies"])===null||_Module$monitorRunDep2===void 0||_Module$monitorRunDep2.call(Module,runDependencies);if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){var _Module$onAbort;(_Module$onAbort=Module["onAbort"])===null||_Module$onAbort===void 0||_Module$onAbort.call(Module,what);what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=function isDataURI(filename){return filename.startsWith(dataURIPrefix)};var isFileURI=function isFileURI(filename){return filename.startsWith("file://")};function findWasmBinary(){var f="dmengine.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary){return readAsync(binaryFile).then(function(response){return new Uint8Array(response)},function(){return getBinarySync(binaryFile)})}return Promise.resolve().then(function(){return getBinarySync(binaryFile)})}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(function(binary){return WebAssembly.instantiate(binary,imports)}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: ".concat(reason));abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err("wasm streaming compile failed: ".concat(reason));err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function getWasmImports(){return{a:wasmImports}}function createWasm(){var info=getWasmImports();function receiveInstance(instance,module){wasmExports=instance.exports;wasmTable=wasmExports["$h"];addOnInit(wasmExports["Wh"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err("Module.instantiateWasm callback failed with error: ".concat(e));return false}}if(!wasmBinaryFile)wasmBinaryFile=findWasmBinary();instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult);return{}}var tempDouble;var tempI64;var ASM_CONSTS={705952:function _(){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){console.log("%c %c Made with Defold %c %c https://www.defold.com","background: #fd6623; padding:5px 0; border: 5px;","background: #272c31; color: #fafafa; padding:5px 0;","background: #39a3e4; padding:5px 0;","background: #ffffff; color: #000000; padding:5px 0;")}else{console.log("Made with Defold -=[ https://www.defold.com ]=-")}},706380:function _($0){var jsResult;var isSuccess=1;try{jsResult=eval(UTF8ToString($0))}catch(err){isSuccess=0;jsResult=err}_dmScript_Html5ReportOperationSuccess(isSuccess);jsResult+="";var stringOnWasmHeap=stringToNewUTF8(jsResult);return stringOnWasmHeap},706648:function _(){document.removeEventListener("click",Module.__defold_interaction_listener);document.removeEventListener("keyup",Module.__defold_interaction_listener);document.removeEventListener("touchend",Module.__defold_interaction_listener);Module.__defold_interaction_listener=undefined},706936:function _(){Module.__defold_interaction_listener=function(){_dmScript_RunInteractionCallback()};document.addEventListener("click",Module.__defold_interaction_listener);document.addEventListener("keyup",Module.__defold_interaction_listener);document.addEventListener("touchend",Module.__defold_interaction_listener)},707257:function _($0){Module.printErr(UTF8ToString($0))},707296:function _($0){Module.print(UTF8ToString($0))}};function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit(".concat(status,")");this.status=status}var callRuntimeCallbacks=function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module)}};function getValue(ptr){var type=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"i8";if(type.endsWith("*"))type="*";switch(type){case"i1":return HEAP8[ptr];case"i8":return HEAP8[ptr];case"i16":return HEAP16[ptr>>1];case"i32":return HEAP32[ptr>>2];case"i64":abort("to do getValue(i64) use WASM_BIGINT");case"float":return HEAPF32[ptr>>2];case"double":return HEAPF64[ptr>>3];case"*":return HEAPU32[ptr>>2];default:abort("invalid type for getValue: ".concat(type))}}var noExitRuntime=Module["noExitRuntime"]||true;function setValue(ptr,value){var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"i8";if(type.endsWith("*"))type="*";switch(type){case"i1":HEAP8[ptr]=value;break;case"i8":HEAP8[ptr]=value;break;case"i16":HEAP16[ptr>>1]=value;break;case"i32":HEAP32[ptr>>2]=value;break;case"i64":abort("to do setValue(i64) use WASM_BIGINT");case"float":HEAPF32[ptr>>2]=value;break;case"double":HEAPF64[ptr>>3]=value;break;case"*":HEAPU32[ptr>>2]=value;break;default:abort("invalid type for setValue: ".concat(type))}}var stackRestore=function stackRestore(val){return _emscripten_stack_restore(val)};var stackSave=function stackSave(){return _emscripten_stack_get_current2()};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder:undefined;var UTF8ArrayToString=function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):""};var ___assert_fail=function ___assert_fail(condition,filename,line,func){abort("Assertion failed: ".concat(UTF8ToString(condition),", at: ")+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};var PATH={isAbs:function isAbs(path){return path.charAt(0)==="/"},splitPath:function splitPath(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:function normalize(path){var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:function basename(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function join(){for(var _len=arguments.length,paths=new Array(_len),_key=0;_key<_len;_key++){paths[_key]=arguments[_key]}return PATH.normalize(paths.join("/"))},join2:function join2(l,r){return PATH.normalize(l+"/"+r)}};var initRandomFill=function initRandomFill(){if((typeof crypto==="undefined"?"undefined":_typeof(crypto))=="object"&&typeof crypto["getRandomValues"]=="function"){return function(view){return crypto.getRandomValues(view)}}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return function(view){return crypto_module["randomFillSync"](view)}}var randomBytes=crypto_module["randomBytes"];return function(view){return view.set(randomBytes(view.byteLength)),view}}catch(e){}}abort("initRandomDevice")};var _randomFill=function randomFill(view){return(_randomFill=initRandomFill())(view)};var PATH_FS={resolve:function resolve(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?i<0||arguments.length<=i?undefined:arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:function relative(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=function FS_stdin_getChar(){if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf,0,BUFSIZE)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else{}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open:function open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close:function close(stream){stream.tty.ops.fsync(stream.tty)},fsync:function fsync(stream){stream.tty.ops.fsync(stream.tty)},read:function read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets:function ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz:function ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char:function put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync:function fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var zeroMemory=function zeroMemory(address,size){HEAPU8.fill(0,address,address+size);return address};var alignMemory=function alignMemory(size,alignment){return Math.ceil(size/alignment)*alignment};var mmapAlloc=function mmapAlloc(size){abort()};var MEMFS={ops_table:null,mount:function mount(_mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode:function createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray:function getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage:function expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage:function resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr:function getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr:function setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup:function lookup(parent,name){throw FS.genericErrors[44]},mknod:function mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename:function rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp},unlink:function unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir:function rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir:function readdir(node){var entries=[".",".."];for(var _i2=0,_Object$keys=Object.keys(node.contents);_i2<_Object$keys.length;_i2++){var key=_Object$keys[_i2];entries.push(key)}return entries},symlink:function symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink:function readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read:function read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length1&&arguments[1]!==undefined?arguments[1]:{};path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(function(p){return!!p});var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?"".concat(mount,"/").concat(path):mount+path}path=path?"".concat(node.name,"/").concat(path):node.name;node=node.parent}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode:function lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode:function createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode:function destroyNode(node){FS.hashRemoveNode(node)},isRoot:function isRoot(node){return node===node.parent},isMountpoint:function isMountpoint(node){return!!node.mounted},isFile:function isFile(mode){return(mode&61440)===32768},isDir:function isDir(mode){return(mode&61440)===16384},isLink:function isLink(mode){return(mode&61440)===40960},isChrdev:function isChrdev(mode){return(mode&61440)===8192},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576},isFIFO:function isFIFO(mode){return(mode&61440)===4096},isSocket:function isSocket(mode){return(mode&49152)===49152},flagsToPermissionString:function flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup:function mayLookup(dir){if(!FS.isDir(dir.mode))return 54;var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate:function mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen:function mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd:function nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked:function getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:function getStream(fd){return FS.streams[fd]},createStream:function createStream(stream){var fd=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream:function closeStream(fd){FS.streams[fd]=null},dupStream:function dupStream(origStream){var _stream$stream_ops,_stream$stream_ops$du;var fd=arguments.length>1&&arguments[1]!==undefined?arguments[1]:-1;var stream=FS.createStream(origStream,fd);(_stream$stream_ops=stream.stream_ops)===null||_stream$stream_ops===void 0||(_stream$stream_ops$du=_stream$stream_ops.dup)===null||_stream$stream_ops$du===void 0||_stream$stream_ops$du.call(_stream$stream_ops,stream);return stream},chrdev_stream_ops:{open:function open(stream){var _stream$stream_ops$op,_stream$stream_ops2;var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;(_stream$stream_ops$op=(_stream$stream_ops2=stream.stream_ops).open)===null||_stream$stream_ops$op===void 0||_stream$stream_ops$op.call(_stream$stream_ops2,stream)},llseek:function llseek(){throw new FS.ErrnoError(70)}},major:function major(dev){return dev>>8},minor:function minor(dev){return dev&255},makedev:function makedev(ma,mi){return ma<<8|mi},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:function getDevice(dev){return FS.devices[dev]},getMounts:function getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,_toConsumableArray(m.mounts))}return mounts},syncfs:function syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: ".concat(FS.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"))}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount:function mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount:function unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup:function lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod:function mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create:function create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir:function mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree:function mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'.concat(opts.encoding,'"'))}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile:function writeFile(path,data){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:function cwd(){return FS.currentPath},chdir:function chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories:function createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices:function createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function read(){return 0},write:function write(stream,buffer,offset,length,pos){return length}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=function randomByte(){if(randomLeft===0){randomLeft=_randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories:function createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:function lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return stream.path}}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams:function createStandardStreams(input,output,error){if(input){FS.createDevice("/dev","stdin",input)}else{FS.symlink("/dev/tty","/dev/stdin")}if(output){FS.createDevice("/dev","stdout",null,output)}else{FS.symlink("/dev/tty","/dev/stdout")}if(error){FS.createDevice("/dev","stderr",null,error)}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},staticInit:function staticInit(){[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""});FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={MEMFS:MEMFS,IDBFS:IDBFS}},init:function init(input,output,error){var _input,_output,_error;FS.initialized=true;(_input=input)!==null&&_input!==void 0?_input:input=Module["stdin"];(_output=output)!==null&&_output!==void 0?_output:output=Module["stdout"];(_error=error)!==null&&_error!==void 0?_error:error=Module["stderr"];FS.createStandardStreams(input,output,error)},quit:function quit(){FS.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]}},{key:"setDataGetter",value:function setDataGetter(getter){this.getter=getter}},{key:"cacheLength",value:function cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function doXHR(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true}},{key:"length",get:function get(){if(!this.lengthKnown){this.cacheLength()}return this._length}},{key:"chunkSize",get:function get(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}])}();if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function get(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function(){FS.forceLoadFile(node);return fn.apply(void 0,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync:function doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},getStreamFromFD:function getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream},varargs:undefined,getStr:function getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall__newselect(nfds,readfds,writefds,exceptfds,timeout){try{var total=0;var srcReadLow=readfds?HEAP32[readfds>>2]:0,srcReadHigh=readfds?HEAP32[readfds+4>>2]:0;var srcWriteLow=writefds?HEAP32[writefds>>2]:0,srcWriteHigh=writefds?HEAP32[writefds+4>>2]:0;var srcExceptLow=exceptfds?HEAP32[exceptfds>>2]:0,srcExceptHigh=exceptfds?HEAP32[exceptfds+4>>2]:0;var dstReadLow=0,dstReadHigh=0;var dstWriteLow=0,dstWriteHigh=0;var dstExceptLow=0,dstExceptHigh=0;var allLow=(readfds?HEAP32[readfds>>2]:0)|(writefds?HEAP32[writefds>>2]:0)|(exceptfds?HEAP32[exceptfds>>2]:0);var allHigh=(readfds?HEAP32[readfds+4>>2]:0)|(writefds?HEAP32[writefds+4>>2]:0)|(exceptfds?HEAP32[exceptfds+4>>2]:0);var check=function check(fd,low,high,val){return fd<32?low&val:high&val};for(var fd=0;fd>2]:0,tv_usec=readfds?HEAP32[timeout+4>>2]:0;timeoutInMillis=(tv_sec+tv_usec/1e6)*1e3}flags=stream.stream_ops.poll(stream,timeoutInMillis)}if(flags&1&&check(fd,srcReadLow,srcReadHigh,mask)){fd<32?dstReadLow=dstReadLow|mask:dstReadHigh=dstReadHigh|mask;total++}if(flags&4&&check(fd,srcWriteLow,srcWriteHigh,mask)){fd<32?dstWriteLow=dstWriteLow|mask:dstWriteHigh=dstWriteHigh|mask;total++}if(flags&2&&check(fd,srcExceptLow,srcExceptHigh,mask)){fd<32?dstExceptLow=dstExceptLow|mask:dstExceptHigh=dstExceptHigh|mask;total++}}if(readfds){HEAP32[readfds>>2]=dstReadLow;HEAP32[readfds+4>>2]=dstReadHigh}if(writefds){HEAP32[writefds>>2]=dstWriteLow;HEAP32[writefds+4>>2]=dstWriteHigh}if(exceptfds){HEAP32[exceptfds>>2]=dstExceptLow;HEAP32[exceptfds+4>>2]=dstExceptHigh}return total}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var SOCKFS={mount:function mount(_mount3){Module["websocket"]=Module["websocket"]&&"object"===_typeof(Module["websocket"])?Module["websocket"]:{};Module["websocket"]._callbacks={};Module["websocket"]["on"]=function(event,callback){if("function"===typeof callback){this._callbacks[event]=callback}return this};Module["websocket"].emit=function(event,param){if("function"===typeof this._callbacks[event]){this._callbacks[event].call(this,param)}};return FS.createNode(null,"/",16384|511,0)},createSocket:function createSocket(family,type,protocol){type&=~526336;var streaming=type==1;if(streaming&&protocol&&protocol!=6){throw new FS.ErrnoError(66)}var sock={family:family,type:type,protocol:protocol,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};var name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;var stream=FS.createStream({path:name,node:node,flags:2,seekable:false,stream_ops:SOCKFS.stream_ops});sock.stream=stream;return sock},getSocket:function getSocket(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null}return stream.node.sock},stream_ops:{poll:function poll(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock)},ioctl:function ioctl(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs)},read:function read(stream,buffer,offset,length,position){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){return 0}buffer.set(msg.buffer,offset);return msg.buffer.length},write:function write(stream,buffer,offset,length,position){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length)},close:function close(stream){var sock=stream.node.sock;sock.sock_ops.close(sock)}},nextname:function nextname(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0}return"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer:function createPeer(sock,addr,port){var ws;if(_typeof(addr)=="object"){ws=addr;addr=null;port=null}if(ws){if(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort}else{var result=/ws[s]?:\/\/([^:]+):(\d+)/.exec(ws.url);if(!result){throw new Error("WebSocket URL must be in the format ws(s)://address:port")}addr=result[1];port=parseInt(result[2],10)}}else{try{var runtimeConfig=Module["websocket"]&&"object"===_typeof(Module["websocket"]);var url="ws:#".replace("#","//");if(runtimeConfig){if("string"===typeof Module["websocket"]["url"]){url=Module["websocket"]["url"]}}if(url==="ws://"||url==="wss://"){var parts=addr.split("/");url=url+parts[0]+":"+port+"/"+parts.slice(1).join("/")}var subProtocols="binary";if(runtimeConfig){if("string"===typeof Module["websocket"]["subprotocol"]){subProtocols=Module["websocket"]["subprotocol"]}}var opts=undefined;if(subProtocols!=="null"){subProtocols=subProtocols.replace(/^ +| +$/g,"").split(/ *, */);opts=subProtocols}if(runtimeConfig&&null===Module["websocket"]["subprotocol"]){subProtocols="null";opts=undefined}var WebSocketConstructor;if(ENVIRONMENT_IS_NODE){WebSocketConstructor=require("ws")}else{WebSocketConstructor=WebSocket}ws=new WebSocketConstructor(url,opts);ws.binaryType="arraybuffer"}catch(e){throw new FS.ErrnoError(23)}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);if(sock.type===2&&typeof sock.sport!="undefined"){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(sock.sport&65280)>>8,sock.sport&255]))}return peer},getPeer:function getPeer(sock,addr,port){return sock.peers[addr+":"+port]},addPeer:function addPeer(sock,peer){sock.peers[peer.addr+":"+peer.port]=peer},removePeer:function removePeer(sock,peer){delete sock.peers[peer.addr+":"+peer.port]},handlePeerEvents:function handlePeerEvents(sock,peer){var first=true;var handleOpen=function handleOpen(){Module["websocket"].emit("open",sock.stream.fd);try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift()}}catch(e){peer.socket.close()}};function handleMessage(data){if(typeof data=="string"){var encoder=new TextEncoder;data=encoder.encode(data)}else{assert(data.byteLength!==undefined);if(data.byteLength==0){return}data=new Uint8Array(data)}var wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==="p".charCodeAt(0)&&data[5]==="o".charCodeAt(0)&&data[6]==="r".charCodeAt(0)&&data[7]==="t".charCodeAt(0)){var newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});Module["websocket"].emit("message",sock.stream.fd)}if(ENVIRONMENT_IS_NODE){peer.socket.on("open",handleOpen);peer.socket.on("message",function(data,isBinary){if(!isBinary){return}handleMessage(new Uint8Array(data).buffer)});peer.socket.on("close",function(){Module["websocket"].emit("close",sock.stream.fd)});peer.socket.on("error",function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])})}else{peer.socket.onopen=handleOpen;peer.socket.onclose=function(){Module["websocket"].emit("close",sock.stream.fd)};peer.socket.onmessage=function peer_socket_onmessage(event){handleMessage(event.data)};peer.socket.onerror=function(error){sock.error=14;Module["websocket"].emit("error",[sock.stream.fd,sock.error,"ECONNREFUSED: Connection refused"])}}},poll:function poll(sock){if(sock.type===1&&sock.server){return sock.pending.length?64|1:0}var mask=0;var dest=sock.type===1?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=64|1}if(!dest||dest&&dest.socket.readyState===dest.socket.OPEN){mask|=4}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16}return mask},ioctl:function ioctl(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length}HEAP32[arg>>2]=bytes;return 0;default:return 28}},close:function close(sock){if(sock.server){try{sock.server.close()}catch(e){}sock.server=null}var peers=Object.keys(sock.peers);for(var i=0;i>>0};var jstoi_q=function jstoi_q(str){return parseInt(str)};var inetPton6=function inetPton6(str){var words;var w,offset,z;var valid6regx=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i;var parts=[];if(!valid6regx.test(str)){return null}if(str==="::"){return[0,0,0,0,0,0,0,0]}if(str.startsWith("::")){str=str.replace("::","Z:")}else{str=str.replace("::",":Z:")}if(str.indexOf(".")>0){str=str.replace(new RegExp("[.]","g"),":");words=str.split(":");words[words.length-4]=jstoi_q(words[words.length-4])+jstoi_q(words[words.length-3])*256;words[words.length-3]=jstoi_q(words[words.length-2])+jstoi_q(words[words.length-1])*256;words=words.slice(0,words.length-2)}else{words=str.split(":")}offset=0;z=0;for(w=0;w>2]=16}HEAP16[sa>>1]=family;HEAP32[sa+4>>2]=addr;HEAP16[sa+2>>1]=_htons2(port);break;case 10:addr=inetPton6(addr);zeroMemory(sa,28);if(addrlen){HEAP32[addrlen>>2]=28}HEAP32[sa>>2]=family;HEAP32[sa+8>>2]=addr[0];HEAP32[sa+12>>2]=addr[1];HEAP32[sa+16>>2]=addr[2];HEAP32[sa+20>>2]=addr[3];HEAP16[sa+2>>1]=_htons2(port);break;default:return 5}return 0};var DNS={address_map:{id:1,addrs:{},names:{}},lookup_name:function lookup_name(name){var res=inetPton4(name);if(res!==null){return name}res=inetPton6(name);if(res!==null){return name}var addr;if(DNS.address_map.addrs[name]){addr=DNS.address_map.addrs[name]}else{var id=DNS.address_map.id++;assert(id<65535,"exceeded max address mappings of 65535");addr="172.29."+(id&255)+"."+(id&65280);DNS.address_map.names[addr]=name;DNS.address_map.addrs[name]=addr}return addr},lookup_addr:function lookup_addr(addr){if(DNS.address_map.names[addr]){return DNS.address_map.names[addr]}return null}};function ___syscall_accept4(fd,addr,addrlen,flags,d1,d2){try{var sock=getSocketFromFD(fd);var newsock=sock.sock_ops.accept(sock);if(addr){var errno=writeSockaddr(addr,newsock.family,DNS.lookup_name(newsock.daddr),newsock.dport,addrlen)}return newsock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var inetNtop4=function inetNtop4(addr){return(addr&255)+"."+(addr>>8&255)+"."+(addr>>16&255)+"."+(addr>>24&255)};var inetNtop6=function inetNtop6(ints){var str="";var word=0;var longest=0;var lastzero=0;var zstart=0;var len=0;var i=0;var parts=[ints[0]&65535,ints[0]>>16,ints[1]&65535,ints[1]>>16,ints[2]&65535,ints[2]>>16,ints[3]&65535,ints[3]>>16];var hasipv4=true;var v4part="";for(i=0;i<5;i++){if(parts[i]!==0){hasipv4=false;break}}if(hasipv4){v4part=inetNtop4(parts[6]|parts[7]<<16);if(parts[5]===-1){str="::ffff:";str+=v4part;return str}if(parts[5]===0){str="::";if(v4part==="0.0.0.0")v4part="";if(v4part==="0.0.0.1")v4part="1";str+=v4part;return str}}for(word=0;word<8;word++){if(parts[word]===0){if(word-lastzero>1){len=0}lastzero=word;len++}if(len>longest){longest=len;zstart=word-longest+1}}for(word=0;word<8;word++){if(longest>1){if(parts[word]===0&&word>=zstart&&word>1];var port=_ntohs2(HEAPU16[sa+2>>1]);var addr;switch(family){case 2:if(salen!==16){return{errno:28}}addr=HEAP32[sa+4>>2];addr=inetNtop4(addr);break;case 10:if(salen!==28){return{errno:28}}addr=[HEAP32[sa+8>>2],HEAP32[sa+12>>2],HEAP32[sa+16>>2],HEAP32[sa+20>>2]];addr=inetNtop6(addr);break;default:return{errno:5}}return{family:family,addr:addr,port:port}};var getSocketAddress=function getSocketAddress(addrp,addrlen,allowNull){if(allowNull&&addrp===0)return null;var info=readSockaddr(addrp,addrlen);if(info.errno)throw new FS.ErrnoError(info.errno);info.addr=DNS.lookup_addr(info.addr)||info.addr;return info};function ___syscall_bind(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.bind(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_connect(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var info=getSocketAddress(addr,addrlen);sock.sock_ops.connect(sock,info.addr,info.port);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_dup3(fd,newfd,flags){try{var old=SYSCALLS.getStreamFromFD(fd);if(old.fd===newfd)return-28;if(newfd<0||newfd>=FS.MAX_OPEN_FDS)return-8;var existing=FS.getStream(newfd);if(existing)FS.close(existing);return FS.dupStream(old,newfd).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function syscallGetVarargI(){var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret}var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=syscallGetVarargI();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.dupStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=syscallGetVarargI();stream.flags|=arg;return 0}case 12:{var arg=syscallGetVarargP();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 13:case 14:return 0}return-28}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getpeername(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);if(!sock.daddr){return-53}var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.daddr),sock.dport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getsockname(fd,addr,addrlen,d1,d2,d3){try{var sock=getSocketFromFD(fd);var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(sock.saddr||"0.0.0.0"),sock.sport,addrlen);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_getsockopt(fd,level,optname,optval,optlen,d1){try{var sock=getSocketFromFD(fd);if(level===1){if(optname===4){HEAP32[optval>>2]=sock.error;HEAP32[optlen>>2]=4;sock.error=null;return 0}}return-50}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(op){case 21509:{if(!stream.tty)return-59;return 0}case 21505:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcgets){var termios=stream.tty.ops.ioctl_tcgets(stream);var argp=syscallGetVarargP();HEAP32[argp>>2]=termios.c_iflag||0;HEAP32[argp+4>>2]=termios.c_oflag||0;HEAP32[argp+8>>2]=termios.c_cflag||0;HEAP32[argp+12>>2]=termios.c_lflag||0;for(var i=0;i<32;i++){HEAP8[argp+i+17]=termios.c_cc[i]||0}return 0}return 0}case 21510:case 21511:case 21512:{if(!stream.tty)return-59;return 0}case 21506:case 21507:case 21508:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tcsets){var argp=syscallGetVarargP();var c_iflag=HEAP32[argp>>2];var c_oflag=HEAP32[argp+4>>2];var c_cflag=HEAP32[argp+8>>2];var c_lflag=HEAP32[argp+12>>2];var c_cc=[];for(var i=0;i<32;i++){c_cc.push(HEAP8[argp+i+17])}return stream.tty.ops.ioctl_tcsets(stream.tty,op,{c_iflag:c_iflag,c_oflag:c_oflag,c_cflag:c_cflag,c_lflag:c_lflag,c_cc:c_cc})}return 0}case 21519:{if(!stream.tty)return-59;var argp=syscallGetVarargP();HEAP32[argp>>2]=0;return 0}case 21520:{if(!stream.tty)return-59;return-28}case 21531:{var argp=syscallGetVarargP();return FS.ioctl(stream,op,argp)}case 21523:{if(!stream.tty)return-59;if(stream.tty.ops.ioctl_tiocgwinsz){var winsize=stream.tty.ops.ioctl_tiocgwinsz(stream.tty);var argp=syscallGetVarargP();HEAP16[argp>>1]=winsize[0];HEAP16[argp+2>>1]=winsize[1]}return 0}case 21524:{if(!stream.tty)return-59;return 0}case 21515:{if(!stream.tty)return-59;return 0}default:return-28}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_listen(fd,backlog){try{var sock=getSocketFromFD(fd);sock.sock_ops.listen(sock,backlog);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_mkdirat(dirfd,path,mode){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);path=PATH.normalize(path);if(path[path.length-1]==="/")path=path.substr(0,path.length-1);FS.mkdir(path,mode,0);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?syscallGetVarargI():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_poll(fds,nfds,timeout){try{var nonzero=0;for(var i=0;i>2];var events=HEAP16[pollfd+4>>1];var mask=32;var stream=FS.getStream(fd);if(stream){mask=SYSCALLS.DEFAULT_POLLMASK;if(stream.stream_ops.poll){mask=stream.stream_ops.poll(stream,-1)}}mask&=events|8|16;if(mask)nonzero++;HEAP16[pollfd+6>>1]=mask}return nonzero}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var stringToUTF8=function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)};function ___syscall_readlinkat(dirfd,path,buf,bufsize){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(bufsize<=0)return-28;var ret=FS.readlink(path);var len=Math.min(bufsize,lengthBytesUTF8(ret));var endChar=HEAP8[buf+len];stringToUTF8(ret,buf,bufsize+1);HEAP8[buf+len]=endChar;return len}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_recvfrom(fd,buf,len,flags,addr,addrlen){try{var sock=getSocketFromFD(fd);var msg=sock.sock_ops.recvmsg(sock,len);if(!msg)return 0;if(addr){var errno=writeSockaddr(addr,sock.family,DNS.lookup_name(msg.addr),msg.port,addrlen)}HEAPU8.set(msg.buffer,buf);return msg.buffer.byteLength}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_renameat(olddirfd,oldpath,newdirfd,newpath){try{oldpath=SYSCALLS.getStr(oldpath);newpath=SYSCALLS.getStr(newpath);oldpath=SYSCALLS.calculateAt(olddirfd,oldpath);newpath=SYSCALLS.calculateAt(newdirfd,newpath);FS.rename(oldpath,newpath);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_rmdir(path){try{path=SYSCALLS.getStr(path);FS.rmdir(path);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_sendto(fd,message,length,flags,addr,addr_len){try{var sock=getSocketFromFD(fd);var dest=getSocketAddress(addr,addr_len,true);if(!dest){return FS.write(sock.stream,HEAP8,message,length)}return sock.sock_ops.sendmsg(sock,HEAP8,message,length,dest.addr,dest.port)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_shutdown(fd,how){try{getSocketFromFD(fd);return-52}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_socket(domain,type,protocol){try{var sock=SOCKFS.createSocket(domain,type,protocol);return sock.stream.fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_stat64(path,buf){try{path=SYSCALLS.getStr(path);return SYSCALLS.doStat(FS.stat,path,buf)}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_unlinkat(dirfd,path,flags){try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);if(flags===0){FS.unlink(path)}else if(flags===512){FS.rmdir(path)}else{abort("Invalid flags passed to unlinkat")}return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __abort_js=function __abort_js(){abort("")};var nowIsMonotonic=1;var __emscripten_get_now_is_monotonic=function __emscripten_get_now_is_monotonic(){return nowIsMonotonic};var __emscripten_lookup_name=function __emscripten_lookup_name(name){var nameString=UTF8ToString(name);return inetPton4(DNS.lookup_name(nameString))};var __emscripten_memcpy_js=Uint8Array.prototype.copyWithin?function(dest,src,num){return HEAPU8.copyWithin(dest,src,src+num)}:function(dest,src,num){return HEAPU8.set(HEAPU8.subarray(src,src+num),dest)};var __emscripten_system=function __emscripten_system(command){if(ENVIRONMENT_IS_NODE){if(!command)return 1;var cmdstr=UTF8ToString(command);if(!cmdstr.length)return 0;var cp=require("child_process");var ret=cp.spawnSync(cmdstr,[],{shell:true,stdio:"inherit"});var _W_EXITCODE=function _W_EXITCODE(ret,sig){return ret<<8|sig};if(ret.status===null){var signalToNumber=function signalToNumber(sig){switch(sig){case"SIGHUP":return 1;case"SIGINT":return 2;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15}return 2};return _W_EXITCODE(0,signalToNumber(ret.signal))}return _W_EXITCODE(ret.status,0)}if(!command)return 0;return-52};var __emscripten_throw_longjmp=function __emscripten_throw_longjmp(){throw Infinity};var convertI32PairToI53Checked=function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN};function __gmtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getUTCSeconds();HEAP32[tmPtr+4>>2]=date.getUTCMinutes();HEAP32[tmPtr+8>>2]=date.getUTCHours();HEAP32[tmPtr+12>>2]=date.getUTCDate();HEAP32[tmPtr+16>>2]=date.getUTCMonth();HEAP32[tmPtr+20>>2]=date.getUTCFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getUTCDay();var start=Date.UTC(date.getUTCFullYear(),0,1,0,0,0,0);var yday=(date.getTime()-start)/(1e3*60*60*24)|0;HEAP32[tmPtr+28>>2]=yday}var isLeapYear=function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)};var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=function ydayFromDate(date){var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}var setTempRet0=function setTempRet0(val){return _emscripten_tempret_set(val)};var __mktime_js=function __mktime_js(tmPtr){var ret=function(){var date=new Date(HEAP32[tmPtr+20>>2]+1900,HEAP32[tmPtr+16>>2],HEAP32[tmPtr+12>>2],HEAP32[tmPtr+8>>2],HEAP32[tmPtr+4>>2],HEAP32[tmPtr>>2],0);var dst=HEAP32[tmPtr+32>>2];var guessedOffset=date.getTimezoneOffset();var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dstOffset=Math.min(winterOffset,summerOffset);if(dst<0){HEAP32[tmPtr+32>>2]=Number(summerOffset!=winterOffset&&dstOffset==guessedOffset)}else if(dst>0!=(dstOffset==guessedOffset)){var nonDstOffset=Math.max(winterOffset,summerOffset);var trueOffset=dst>0?dstOffset:nonDstOffset;date.setTime(date.getTime()+(trueOffset-guessedOffset)*6e4)}HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getYear();var timeMs=date.getTime();if(isNaN(timeMs)){return-1}return timeMs/1e3}();return setTempRet0((tempDouble=ret,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),ret>>>0};var __tzset_js=function __tzset_js(timezone,daylight,std_name,dst_name){var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=function extractZone(timezoneOffset){var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return"UTC".concat(sign).concat(hours).concat(minutes)};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);if(summerOffset=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};function _dmScriptHttpRequestAsync(method,url,headers,arg,onload,onerror,onprogress,send_data,send_data_length,timeout){var xhr=new XMLHttpRequest;function listener(){var resp_headers=xhr.getAllResponseHeaders();resp_headers=resp_headers.replace(new RegExp("\r","g"),"");resp_headers+="\n";if(xhr.status!=0){var ab=new Uint8Array(xhr.response);var b=_malloc(ab.length*ab.BYTES_PER_ELEMENT);HEAPU8.set(ab,b);var resp_headers_buffer=stringToNewUTF8(resp_headers);getWasmTableEntry(onload)(arg,xhr.status,b,ab.length,resp_headers_buffer);_free(resp_headers_buffer);_free(b)}else{getWasmTableEntry(onerror)(arg,xhr.status)}}xhr.onload=listener;xhr.onerror=listener;xhr.ontimeout=listener;xhr.onprogress=function(progress_event){if(onprogress!=0){getWasmTableEntry(onprogress)(arg,progress_event.loaded,progress_event.total)}};xhr.open(UTF8ToString(method),UTF8ToString(url),true);xhr.responseType="arraybuffer";if(timeout>0){xhr.timeout=timeout/1e3}var headersArray=UTF8ToString(headers).split("\n");for(var i=0;i0){xhr.send(HEAPU8.subarray(send_data,send_data+send_data_length))}else{xhr.send()}}var DMSYS={_folder:"/data",_cstr:null,GetUserPersistentDataRoot:function GetUserPersistentDataRoot(){if(typeof window!=="undefined")return DMSYS._folder;else return""},PumpMessageQueue:function PumpMessageQueue(){if(typeof window==="undefined"){var uvrun=require("uvrun");uvrun.runOnce()}}};function _dmSysGetApplicationPath(){var path=location.href.substring(0,location.href.lastIndexOf("/"));var buffer=stringToNewUTF8(path);return buffer}function _dmSysGetUserAgent(){var useragent=navigator.userAgent;var buffer=stringToNewUTF8(useragent);return buffer}function _dmSysGetUserPersistentDataRoot(){if(null==DMSYS._cstr){var str=DMSYS.GetUserPersistentDataRoot();DMSYS._cstr=stringToNewUTF8(str)}return DMSYS._cstr}function _dmSysGetUserPreferredLanguage(defaultlang){var jsdefault=UTF8ToString(defaultlang);var preferred=navigator==undefined?jsdefault:navigator.languages?navigator.languages[0]||jsdefault:navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||jsdefault;var buffer=stringToNewUTF8(preferred);return buffer}var JSEvents={removeAllEventListeners:function removeAllEventListeners(){while(JSEvents.eventHandlers.length){JSEvents._removeHandler(JSEvents.eventHandlers.length-1)}JSEvents.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall:function deferCall(targetFunction,precedence,argsList){function arraysHaveEqualContent(arrA,arrB){if(arrA.length!=arrB.length)return false;for(var i in arrA){if(arrA[i]!=arrB[i])return false}return true}var _iterator=_createForOfIteratorHelper(JSEvents.deferredCalls),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var call=_step.value;if(call.targetFunction==targetFunction&&arraysHaveEqualContent(call.argsList,argsList)){return}}}catch(err){_iterator.e(err)}finally{_iterator.f()}JSEvents.deferredCalls.push({targetFunction:targetFunction,precedence:precedence,argsList:argsList});JSEvents.deferredCalls.sort(function(x,y){return x.precedence>2]:ch==105?HEAP32[buf>>2]:HEAPF64[buf>>3]);buf+=wide?8:4}return readEmAsmArgsArray};var runEmAsmFunction=function runEmAsmFunction(code,sigPtr,argbuf){var args=readEmAsmArgs(sigPtr,argbuf);return ASM_CONSTS[code].apply(ASM_CONSTS,_toConsumableArray(args))};var _emscripten_asm_const_int=function _emscripten_asm_const_int(code,sigPtr,argbuf){return runEmAsmFunction(code,sigPtr,argbuf)};var _emscripten_set_main_loop_timing=function _emscripten_set_main_loop_timing(mode,value){Browser.mainLoop.timingMode=mode;Browser.mainLoop.timingValue=value;if(!Browser.mainLoop.func){return 1}if(!Browser.mainLoop.running){Browser.mainLoop.running=true}if(mode==0){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setTimeout(){var timeUntilNextTick=Math.max(0,Browser.mainLoop.tickStartTime+value-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,timeUntilNextTick)};Browser.mainLoop.method="timeout"}else if(mode==1){Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_rAF(){Browser.requestAnimationFrame(Browser.mainLoop.runner)};Browser.mainLoop.method="rAF"}else if(mode==2){if(typeof Browser.setImmediate=="undefined"){if(typeof setImmediate=="undefined"){var setImmediates=[];var emscriptenMainLoopMessageId="setimmediate";var Browser_setImmediate_messageHandler=function Browser_setImmediate_messageHandler(event){if(event.data===emscriptenMainLoopMessageId||event.data.target===emscriptenMainLoopMessageId){event.stopPropagation();setImmediates.shift()()}};addEventListener("message",Browser_setImmediate_messageHandler,true);Browser.setImmediate=function Browser_emulated_setImmediate(func){setImmediates.push(func);if(ENVIRONMENT_IS_WORKER){var _setImmediates,_Module$_setImmediate;(_Module$_setImmediate=Module[_setImmediates="setImmediates"])!==null&&_Module$_setImmediate!==void 0?_Module$_setImmediate:Module[_setImmediates]=[];Module["setImmediates"].push(func);postMessage({target:emscriptenMainLoopMessageId})}else postMessage(emscriptenMainLoopMessageId,"*")}}else{Browser.setImmediate=setImmediate}}Browser.mainLoop.scheduler=function Browser_mainLoop_scheduler_setImmediate(){Browser.setImmediate(Browser.mainLoop.runner)};Browser.mainLoop.method="immediate"}return 0};var _emscripten_get_now;_emscripten_get_now=function _emscripten_get_now(){return performance.now()};var setMainLoop=function setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg,noSetTiming){Browser.mainLoop.func=browserIterationFunc;Browser.mainLoop.arg=arg;var thisMainLoopId=Browser.mainLoop.currentlyRunningMainloop;function checkIsRunning(){if(thisMainLoopId0){var start=Date.now();var blocker=Browser.mainLoop.queue.shift();blocker.func(blocker.arg);if(Browser.mainLoop.remainingBlockers){var remaining=Browser.mainLoop.remainingBlockers;var next=remaining%1==0?remaining-1:Math.floor(remaining);if(blocker.counted){Browser.mainLoop.remainingBlockers=next}else{next=next+.5;Browser.mainLoop.remainingBlockers=(8*remaining+next)/9}}Browser.mainLoop.updateStatus();if(!checkIsRunning())return;setTimeout(Browser.mainLoop.runner,0);return}if(!checkIsRunning())return;Browser.mainLoop.currentFrameNumber=Browser.mainLoop.currentFrameNumber+1|0;if(Browser.mainLoop.timingMode==1&&Browser.mainLoop.timingValue>1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else if(Browser.mainLoop.timingMode==0){Browser.mainLoop.tickStartTime=_emscripten_get_now()}Browser.mainLoop.runIter(browserIterationFunc);if(!checkIsRunning())return;if((typeof SDL==="undefined"?"undefined":_typeof(SDL))=="object")(_SDL$audio=SDL.audio)===null||_SDL$audio===void 0||(_SDL$audio$queueNewAu=_SDL$audio.queueNewAudioData)===null||_SDL$audio$queueNewAu===void 0||_SDL$audio$queueNewAu.call(_SDL$audio);Browser.mainLoop.scheduler()};if(!noSetTiming){if(fps&&fps>0){_emscripten_set_main_loop_timing(0,1e3/fps)}else{_emscripten_set_main_loop_timing(1,1)}Browser.mainLoop.scheduler()}if(simulateInfiniteLoop){throw"unwind"}};var handleException=function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0};var _proc_exit=function _proc_exit(code){EXITSTATUS=code;if(!keepRuntimeAlive()){var _Module$onExit;(_Module$onExit=Module["onExit"])===null||_Module$onExit===void 0||_Module$onExit.call(Module,code);ABORT=true}quit_(code,new ExitStatus(code))};var exitJS=function exitJS(status,implicit){EXITSTATUS=status;_proc_exit(status)};var _exit=exitJS;var maybeExit=function maybeExit(){if(!keepRuntimeAlive()){try{_exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=function callUserCallback(func){if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var _safeSetTimeout=function safeSetTimeout(func,timeout){return setTimeout(function(){callUserCallback(func)},timeout)};var warnOnce=function warnOnce(text){warnOnce.shown||(warnOnce.shown={});if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var Browser={mainLoop:{running:false,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function pause(){Browser.mainLoop.scheduler=null;Browser.mainLoop.currentlyRunningMainloop++},resume:function resume(){Browser.mainLoop.currentlyRunningMainloop++;var timingMode=Browser.mainLoop.timingMode;var timingValue=Browser.mainLoop.timingValue;var func=Browser.mainLoop.func;Browser.mainLoop.func=null;setMainLoop(func,0,false,Browser.mainLoop.arg,true);_emscripten_set_main_loop_timing(timingMode,timingValue);Browser.mainLoop.scheduler()},updateStatus:function updateStatus(){if(Module["setStatus"]){var message=Module["statusMessage"]||"Please wait...";var remaining=Browser.mainLoop.remainingBlockers;var expected=Browser.mainLoop.expectedBlockers;if(remaining){if(remaining=6){var curr=leftchar>>leftbits-6&63;leftbits-=6;ret+=BASE[curr]}}if(leftbits==2){ret+=BASE[(leftchar&3)<<4];ret+=PAD+PAD}else if(leftbits==4){ret+=BASE[(leftchar&15)<<2];ret+=PAD}return ret}audio.src="data:audio/x-"+name.substr(-3)+";base64,"+encode64(byteArray);finish(audio)};audio.src=url;_safeSetTimeout(function(){finish(audio)},1e4)};preloadPlugins.push(audioPlugin);function pointerLockChange(){Browser.pointerLock=document["pointerLockElement"]===Module["canvas"]||document["mozPointerLockElement"]===Module["canvas"]||document["webkitPointerLockElement"]===Module["canvas"]||document["msPointerLockElement"]===Module["canvas"]}var canvas=Module["canvas"];if(canvas){canvas.requestPointerLock=canvas["requestPointerLock"]||canvas["mozRequestPointerLock"]||canvas["webkitRequestPointerLock"]||canvas["msRequestPointerLock"]||function(){};canvas.exitPointerLock=document["exitPointerLock"]||document["mozExitPointerLock"]||document["webkitExitPointerLock"]||document["msExitPointerLock"]||function(){};canvas.exitPointerLock=canvas.exitPointerLock.bind(document);document.addEventListener("pointerlockchange",pointerLockChange,false);document.addEventListener("mozpointerlockchange",pointerLockChange,false);document.addEventListener("webkitpointerlockchange",pointerLockChange,false);document.addEventListener("mspointerlockchange",pointerLockChange,false);if(Module["elementPointerLock"]){canvas.addEventListener("click",function(ev){if(!Browser.pointerLock&&Module["canvas"].requestPointerLock){Module["canvas"].requestPointerLock();ev.preventDefault()}},false)}}},createContext:function createContext(canvas,useWebGL,setInModule,webGLContextAttributes){if(useWebGL&&Module.ctx&&canvas==Module.canvas)return Module.ctx;var ctx;var contextHandle;if(useWebGL){var contextAttributes={antialias:false,alpha:false,majorVersion:typeof WebGL2RenderingContext!="undefined"?2:1};if(webGLContextAttributes){for(var attribute in webGLContextAttributes){contextAttributes[attribute]=webGLContextAttributes[attribute]}}if(typeof GL!="undefined"){contextHandle=GL.createContext(canvas,contextAttributes);if(contextHandle){ctx=GL.getContext(contextHandle).GLctx}}}else{ctx=canvas.getContext("2d")}if(!ctx)return null;if(setInModule){Module.ctx=ctx;if(useWebGL)GL.makeContextCurrent(contextHandle);Browser.useWebGL=useWebGL;Browser.moduleContextCreatedCallbacks.forEach(function(callback){return callback()});Browser.init()}return ctx},fullscreenHandlersInstalled:false,lockPointer:undefined,resizeCanvas:undefined,requestFullscreen:function requestFullscreen(lockPointer,resizeCanvas){Browser.lockPointer=lockPointer;Browser.resizeCanvas=resizeCanvas;if(typeof Browser.lockPointer=="undefined")Browser.lockPointer=true;if(typeof Browser.resizeCanvas=="undefined")Browser.resizeCanvas=false;var canvas=Module["canvas"];function fullscreenChange(){var _Module$onFullScreen,_Module$onFullscreen;Browser.isFullscreen=false;var canvasContainer=canvas.parentNode;if((document["fullscreenElement"]||document["mozFullScreenElement"]||document["msFullscreenElement"]||document["webkitFullscreenElement"]||document["webkitCurrentFullScreenElement"])===canvasContainer){canvas.exitFullscreen=Browser.exitFullscreen;if(Browser.lockPointer)canvas.requestPointerLock();Browser.isFullscreen=true;if(Browser.resizeCanvas){Browser.setFullscreenCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}else{canvasContainer.parentNode.insertBefore(canvas,canvasContainer);canvasContainer.parentNode.removeChild(canvasContainer);if(Browser.resizeCanvas){Browser.setWindowedCanvasSize()}else{Browser.updateCanvasDimensions(canvas)}}(_Module$onFullScreen=Module["onFullScreen"])===null||_Module$onFullScreen===void 0||_Module$onFullScreen.call(Module,Browser.isFullscreen);(_Module$onFullscreen=Module["onFullscreen"])===null||_Module$onFullscreen===void 0||_Module$onFullscreen.call(Module,Browser.isFullscreen)}if(!Browser.fullscreenHandlersInstalled){Browser.fullscreenHandlersInstalled=true;document.addEventListener("fullscreenchange",fullscreenChange,false);document.addEventListener("mozfullscreenchange",fullscreenChange,false);document.addEventListener("webkitfullscreenchange",fullscreenChange,false);document.addEventListener("MSFullscreenChange",fullscreenChange,false)}var canvasContainer=document.createElement("div");canvas.parentNode.insertBefore(canvasContainer,canvas);canvasContainer.appendChild(canvas);canvasContainer.requestFullscreen=canvasContainer["requestFullscreen"]||canvasContainer["mozRequestFullScreen"]||canvasContainer["msRequestFullscreen"]||(canvasContainer["webkitRequestFullscreen"]?function(){return canvasContainer["webkitRequestFullscreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null)||(canvasContainer["webkitRequestFullScreen"]?function(){return canvasContainer["webkitRequestFullScreen"](Element["ALLOW_KEYBOARD_INPUT"])}:null);canvasContainer.requestFullscreen()},exitFullscreen:function exitFullscreen(){if(!Browser.isFullscreen){return false}var CFS=document["exitFullscreen"]||document["cancelFullScreen"]||document["mozCancelFullScreen"]||document["msExitFullscreen"]||document["webkitCancelFullScreen"]||function(){};CFS.apply(document,[]);return true},nextRAF:0,fakeRequestAnimationFrame:function fakeRequestAnimationFrame(func){var now=Date.now();if(Browser.nextRAF===0){Browser.nextRAF=now+1e3/60}else{while(now+2>=Browser.nextRAF){Browser.nextRAF+=1e3/60}}var delay=Math.max(Browser.nextRAF-now,0);setTimeout(func,delay)},requestAnimationFrame:function(_requestAnimationFrame){function requestAnimationFrame(_x){return _requestAnimationFrame.apply(this,arguments)}requestAnimationFrame.toString=function(){return _requestAnimationFrame.toString()};return requestAnimationFrame}(function(func){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(func);return}var RAF=Browser.fakeRequestAnimationFrame;RAF(func)}),safeSetTimeout:function safeSetTimeout(func,timeout){return _safeSetTimeout(func,timeout)},safeRequestAnimationFrame:function safeRequestAnimationFrame(func){return Browser.requestAnimationFrame(function(){callUserCallback(func)})},getMimetype:function getMimetype(name){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[name.substr(name.lastIndexOf(".")+1)]},getUserMedia:function getUserMedia(func){var _window;(_window=window).getUserMedia||(_window.getUserMedia=navigator["getUserMedia"]||navigator["mozGetUserMedia"]);window.getUserMedia(func)},getMovementX:function getMovementX(event){return event["movementX"]||event["mozMovementX"]||event["webkitMovementX"]||0},getMovementY:function getMovementY(event){return event["movementY"]||event["mozMovementY"]||event["webkitMovementY"]||0},getMouseWheelDelta:function getMouseWheelDelta(event){var delta=0;switch(event.type){case"DOMMouseScroll":delta=event.detail/3;break;case"mousewheel":delta=event.wheelDelta/120;break;case"wheel":delta=event.deltaY;switch(event.deltaMode){case 0:delta/=100;break;case 1:delta/=3;break;case 2:delta*=80;break;default:throw"unrecognized mouse wheel delta mode: "+event.deltaMode}break;default:throw"unrecognized mouse wheel event: "+event.type}return delta},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords:function calculateMouseCoords(pageX,pageY){var rect=Module["canvas"].getBoundingClientRect();var cw=Module["canvas"].width;var ch=Module["canvas"].height;var scrollX=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset;var scrollY=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;var adjustedX=pageX-(scrollX+rect.left);var adjustedY=pageY-(scrollY+rect.top);adjustedX=adjustedX*(cw/rect.width);adjustedY=adjustedY*(ch/rect.height);return{x:adjustedX,y:adjustedY}},setMouseCoords:function setMouseCoords(pageX,pageY){var _Browser$calculateMou=Browser.calculateMouseCoords(pageX,pageY),x=_Browser$calculateMou.x,y=_Browser$calculateMou.y;Browser.mouseMovementX=x-Browser.mouseX;Browser.mouseMovementY=y-Browser.mouseY;Browser.mouseX=x;Browser.mouseY=y},calculateMouseEvent:function calculateMouseEvent(event){if(Browser.pointerLock){if(event.type!="mousemove"&&"mozMovementX"in event){Browser.mouseMovementX=Browser.mouseMovementY=0}else{Browser.mouseMovementX=Browser.getMovementX(event);Browser.mouseMovementY=Browser.getMovementY(event)}Browser.mouseX+=Browser.mouseMovementX;Browser.mouseY+=Browser.mouseMovementY}else{if(event.type==="touchstart"||event.type==="touchend"||event.type==="touchmove"){var touch=event.touch;if(touch===undefined){return}var coords=Browser.calculateMouseCoords(touch.pageX,touch.pageY);if(event.type==="touchstart"){Browser.lastTouches[touch.identifier]=coords;Browser.touches[touch.identifier]=coords}else if(event.type==="touchend"||event.type==="touchmove"){var last=Browser.touches[touch.identifier];last||(last=coords);Browser.lastTouches[touch.identifier]=last;Browser.touches[touch.identifier]=coords}return}Browser.setMouseCoords(event.pageX,event.pageY)}},resizeListeners:[],updateResizeListeners:function updateResizeListeners(){var canvas=Module["canvas"];Browser.resizeListeners.forEach(function(listener){return listener(canvas.width,canvas.height)})},setCanvasSize:function setCanvasSize(width,height,noUpdates){var canvas=Module["canvas"];Browser.updateCanvasDimensions(canvas,width,height);if(!noUpdates)Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function setFullscreenCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags|8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},setWindowedCanvasSize:function setWindowedCanvasSize(){if(typeof SDL!="undefined"){var flags=HEAPU32[SDL.screen>>2];flags=flags&~8388608;HEAP32[SDL.screen>>2]=flags}Browser.updateCanvasDimensions(Module["canvas"]);Browser.updateResizeListeners()},updateCanvasDimensions:function updateCanvasDimensions(canvas,wNative,hNative){if(wNative&&hNative){canvas.widthNative=wNative;canvas.heightNative=hNative}else{wNative=canvas.widthNative;hNative=canvas.heightNative}var w=wNative;var h=hNative;if(Module["forcedAspectRatio"]&&Module["forcedAspectRatio"]>0){if(w/h>2]=id}},getSource:function getSource(shader,count,string,length){var source="";for(var i=0;i>2]:undefined;source+=UTF8ToString(HEAPU32[string+i*4>>2],len)}return source},createContext:function createContext(canvas,webGLContextAttributes){function getChromeVersion(){var chromeVersion=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(chromeVersion)return chromeVersion[2]|0}if(!canvas.getContextSafariWebGL2Fixed){var fixedGetContext=function fixedGetContext(ver,attrs){var gl=canvas.getContextSafariWebGL2Fixed(ver,attrs);return ver=="webgl"==gl instanceof WebGLRenderingContext?gl:null};canvas.getContextSafariWebGL2Fixed=canvas.getContext;canvas.getContext=fixedGetContext}var ctx=webGLContextAttributes.majorVersion>1?!(getChromeVersion()<=57)&&canvas.getContext("webgl2",webGLContextAttributes):canvas.getContext("webgl",webGLContextAttributes)||canvas.getContext("experimental-webgl",webGLContextAttributes);if(!ctx)return 0;var handle=GL.registerContext(ctx,webGLContextAttributes);return handle},registerContext:function registerContext(ctx,webGLContextAttributes){var handle=GL.getNewId(GL.contexts);var context={handle:handle,attributes:webGLContextAttributes,version:webGLContextAttributes.majorVersion,GLctx:ctx};if(ctx.canvas)ctx.canvas.GLctxObject=context;GL.contexts[handle]=context;return handle},makeContextCurrent:function makeContextCurrent(contextHandle){var _GL$currentContext;GL.currentContext=GL.contexts[contextHandle];Module.ctx=GLctx=(_GL$currentContext=GL.currentContext)===null||_GL$currentContext===void 0?void 0:_GL$currentContext.GLctx;return!(contextHandle&&!GLctx)},getContext:function getContext(contextHandle){return GL.contexts[contextHandle]},deleteContext:function deleteContext(contextHandle){if(GL.currentContext===GL.contexts[contextHandle]){GL.currentContext=null}if(_typeof(JSEvents)=="object"){JSEvents.removeAllHandlersOnTarget(GL.contexts[contextHandle].GLctx.canvas)}if(GL.contexts[contextHandle]&&GL.contexts[contextHandle].GLctx.canvas){GL.contexts[contextHandle].GLctx.canvas.GLctxObject=undefined}GL.contexts[contextHandle]=null}};var _glActiveTexture=function _glActiveTexture(x0){return GLctx.activeTexture(x0)};var _emscripten_glActiveTexture=_glActiveTexture;var _glAttachShader=function _glAttachShader(program,shader){GLctx.attachShader(GL.programs[program],GL.shaders[shader])};var _emscripten_glAttachShader=_glAttachShader;var _glBeginQuery=function _glBeginQuery(target,id){GLctx.beginQuery(target,GL.queries[id])};var _emscripten_glBeginQuery=_glBeginQuery;var _glBeginQueryEXT=function _glBeginQueryEXT(target,id){GLctx.disjointTimerQueryExt["beginQueryEXT"](target,GL.queries[id])};var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;var _glBeginTransformFeedback=function _glBeginTransformFeedback(x0){return GLctx.beginTransformFeedback(x0)};var _emscripten_glBeginTransformFeedback=_glBeginTransformFeedback;var _glBindAttribLocation=function _glBindAttribLocation(program,index,name){GLctx.bindAttribLocation(GL.programs[program],index,UTF8ToString(name))};var _emscripten_glBindAttribLocation=_glBindAttribLocation;var _glBindBuffer=function _glBindBuffer(target,buffer){if(target==35051){GLctx.currentPixelPackBufferBinding=buffer}else if(target==35052){GLctx.currentPixelUnpackBufferBinding=buffer}GLctx.bindBuffer(target,GL.buffers[buffer])};var _emscripten_glBindBuffer=_glBindBuffer;var _glBindBufferBase=function _glBindBufferBase(target,index,buffer){GLctx.bindBufferBase(target,index,GL.buffers[buffer])};var _emscripten_glBindBufferBase=_glBindBufferBase;var _glBindBufferRange=function _glBindBufferRange(target,index,buffer,offset,ptrsize){GLctx.bindBufferRange(target,index,GL.buffers[buffer],offset,ptrsize)};var _emscripten_glBindBufferRange=_glBindBufferRange;var _glBindFramebuffer=function _glBindFramebuffer(target,framebuffer){GLctx.bindFramebuffer(target,GL.framebuffers[framebuffer])};var _emscripten_glBindFramebuffer=_glBindFramebuffer;var _glBindRenderbuffer=function _glBindRenderbuffer(target,renderbuffer){GLctx.bindRenderbuffer(target,GL.renderbuffers[renderbuffer])};var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;var _glBindSampler=function _glBindSampler(unit,sampler){GLctx.bindSampler(unit,GL.samplers[sampler])};var _emscripten_glBindSampler=_glBindSampler;var _glBindTexture=function _glBindTexture(target,texture){GLctx.bindTexture(target,GL.textures[texture])};var _emscripten_glBindTexture=_glBindTexture;var _glBindTransformFeedback=function _glBindTransformFeedback(target,id){GLctx.bindTransformFeedback(target,GL.transformFeedbacks[id])};var _emscripten_glBindTransformFeedback=_glBindTransformFeedback;var _glBindVertexArray=function _glBindVertexArray(vao){GLctx.bindVertexArray(GL.vaos[vao])};var _emscripten_glBindVertexArray=_glBindVertexArray;var _glBindVertexArrayOES=_glBindVertexArray;var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;var _glBlendColor=function _glBlendColor(x0,x1,x2,x3){return GLctx.blendColor(x0,x1,x2,x3)};var _emscripten_glBlendColor=_glBlendColor;var _glBlendEquation=function _glBlendEquation(x0){return GLctx.blendEquation(x0)};var _emscripten_glBlendEquation=_glBlendEquation;var _glBlendEquationSeparate=function _glBlendEquationSeparate(x0,x1){return GLctx.blendEquationSeparate(x0,x1)};var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;var _glBlendFunc=function _glBlendFunc(x0,x1){return GLctx.blendFunc(x0,x1)};var _emscripten_glBlendFunc=_glBlendFunc;var _glBlendFuncSeparate=function _glBlendFuncSeparate(x0,x1,x2,x3){return GLctx.blendFuncSeparate(x0,x1,x2,x3)};var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;var _glBlitFramebuffer=function _glBlitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9){return GLctx.blitFramebuffer(x0,x1,x2,x3,x4,x5,x6,x7,x8,x9)};var _emscripten_glBlitFramebuffer=_glBlitFramebuffer;var _glBufferData=function _glBufferData(target,size,data,usage){if(GL.currentContext.version>=2){if(data&&size){GLctx.bufferData(target,HEAPU8,usage,data,size)}else{GLctx.bufferData(target,size,usage)}return}GLctx.bufferData(target,data?HEAPU8.subarray(data,data+size):size,usage)};var _emscripten_glBufferData=_glBufferData;var _glBufferSubData=function _glBufferSubData(target,offset,size,data){if(GL.currentContext.version>=2){size&&GLctx.bufferSubData(target,offset,HEAPU8,data,size);return}GLctx.bufferSubData(target,offset,HEAPU8.subarray(data,data+size))};var _emscripten_glBufferSubData=_glBufferSubData;var _glCheckFramebufferStatus=function _glCheckFramebufferStatus(x0){return GLctx.checkFramebufferStatus(x0)};var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;var _glClear=function _glClear(x0){return GLctx.clear(x0)};var _emscripten_glClear=_glClear;var _glClearBufferfi=function _glClearBufferfi(x0,x1,x2,x3){return GLctx.clearBufferfi(x0,x1,x2,x3)};var _emscripten_glClearBufferfi=_glClearBufferfi;var _glClearBufferfv=function _glClearBufferfv(buffer,drawbuffer,value){GLctx.clearBufferfv(buffer,drawbuffer,HEAPF32,value>>2)};var _emscripten_glClearBufferfv=_glClearBufferfv;var _glClearBufferiv=function _glClearBufferiv(buffer,drawbuffer,value){GLctx.clearBufferiv(buffer,drawbuffer,HEAP32,value>>2)};var _emscripten_glClearBufferiv=_glClearBufferiv;var _glClearBufferuiv=function _glClearBufferuiv(buffer,drawbuffer,value){GLctx.clearBufferuiv(buffer,drawbuffer,HEAPU32,value>>2)};var _emscripten_glClearBufferuiv=_glClearBufferuiv;var _glClearColor=function _glClearColor(x0,x1,x2,x3){return GLctx.clearColor(x0,x1,x2,x3)};var _emscripten_glClearColor=_glClearColor;var _glClearDepthf=function _glClearDepthf(x0){return GLctx.clearDepth(x0)};var _emscripten_glClearDepthf=_glClearDepthf;var _glClearStencil=function _glClearStencil(x0){return GLctx.clearStencil(x0)};var _emscripten_glClearStencil=_glClearStencil;var convertI32PairToI53=function convertI32PairToI53(lo,hi){return(lo>>>0)+hi*4294967296};var _glClientWaitSync=function _glClientWaitSync(sync,flags,timeout_low,timeout_high){var timeout=convertI32PairToI53(timeout_low,timeout_high);return GLctx.clientWaitSync(GL.syncs[sync],flags,timeout)};var _emscripten_glClientWaitSync=_glClientWaitSync;var _glColorMask=function _glColorMask(red,green,blue,alpha){GLctx.colorMask(!!red,!!green,!!blue,!!alpha)};var _emscripten_glColorMask=_glColorMask;var _glCompileShader=function _glCompileShader(shader){GLctx.compileShader(GL.shaders[shader])};var _emscripten_glCompileShader=_glCompileShader;var _glCompressedTexImage2D=function _glCompressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,imageSize,data);return}GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,HEAPU8,data,imageSize);return}GLctx.compressedTexImage2D(target,level,internalFormat,width,height,border,data?HEAPU8.subarray(data,data+imageSize):null)};var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;var _glCompressedTexImage3D=function _glCompressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx.compressedTexImage3D(target,level,internalFormat,width,height,depth,border,imageSize,data)}else{GLctx.compressedTexImage3D(target,level,internalFormat,width,height,depth,border,HEAPU8,data,imageSize)}};var _emscripten_glCompressedTexImage3D=_glCompressedTexImage3D;var _glCompressedTexSubImage2D=function _glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding||!imageSize){GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);return}GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,HEAPU8,data,imageSize);return}GLctx.compressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,data?HEAPU8.subarray(data,data+imageSize):null)};var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;var _glCompressedTexSubImage3D=function _glCompressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data){if(GLctx.currentPixelUnpackBufferBinding){GLctx.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,imageSize,data)}else{GLctx.compressedTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,HEAPU8,data,imageSize)}};var _emscripten_glCompressedTexSubImage3D=_glCompressedTexSubImage3D;var _glCopyBufferSubData=function _glCopyBufferSubData(x0,x1,x2,x3,x4){return GLctx.copyBufferSubData(x0,x1,x2,x3,x4)};var _emscripten_glCopyBufferSubData=_glCopyBufferSubData;var _glCopyTexImage2D=function _glCopyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7){return GLctx.copyTexImage2D(x0,x1,x2,x3,x4,x5,x6,x7)};var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;var _glCopyTexSubImage2D=function _glCopyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7){return GLctx.copyTexSubImage2D(x0,x1,x2,x3,x4,x5,x6,x7)};var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;var _glCopyTexSubImage3D=function _glCopyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8){return GLctx.copyTexSubImage3D(x0,x1,x2,x3,x4,x5,x6,x7,x8)};var _emscripten_glCopyTexSubImage3D=_glCopyTexSubImage3D;var _glCreateProgram=function _glCreateProgram(){var id=GL.getNewId(GL.programs);var program=GLctx.createProgram();program.name=id;program.maxUniformLength=program.maxAttributeLength=program.maxUniformBlockNameLength=0;program.uniformIdCounter=1;GL.programs[id]=program;return id};var _emscripten_glCreateProgram=_glCreateProgram;var _glCreateShader=function _glCreateShader(shaderType){var id=GL.getNewId(GL.shaders);GL.shaders[id]=GLctx.createShader(shaderType);return id};var _emscripten_glCreateShader=_glCreateShader;var _glCullFace=function _glCullFace(x0){return GLctx.cullFace(x0)};var _emscripten_glCullFace=_glCullFace;var _glDeleteBuffers=function _glDeleteBuffers(n,buffers){for(var i=0;i>2];var buffer=GL.buffers[id];if(!buffer)continue;GLctx.deleteBuffer(buffer);buffer.name=0;GL.buffers[id]=null;if(id==GLctx.currentPixelPackBufferBinding)GLctx.currentPixelPackBufferBinding=0;if(id==GLctx.currentPixelUnpackBufferBinding)GLctx.currentPixelUnpackBufferBinding=0}};var _emscripten_glDeleteBuffers=_glDeleteBuffers;var _glDeleteFramebuffers=function _glDeleteFramebuffers(n,framebuffers){for(var i=0;i>2];var framebuffer=GL.framebuffers[id];if(!framebuffer)continue;GLctx.deleteFramebuffer(framebuffer);framebuffer.name=0;GL.framebuffers[id]=null}};var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;var _glDeleteProgram=function _glDeleteProgram(id){if(!id)return;var program=GL.programs[id];if(!program){GL.recordError(1281);return}GLctx.deleteProgram(program);program.name=0;GL.programs[id]=null};var _emscripten_glDeleteProgram=_glDeleteProgram;var _glDeleteQueries=function _glDeleteQueries(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx.deleteQuery(query);GL.queries[id]=null}};var _emscripten_glDeleteQueries=_glDeleteQueries;var _glDeleteQueriesEXT=function _glDeleteQueriesEXT(n,ids){for(var i=0;i>2];var query=GL.queries[id];if(!query)continue;GLctx.disjointTimerQueryExt["deleteQueryEXT"](query);GL.queries[id]=null}};var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;var _glDeleteRenderbuffers=function _glDeleteRenderbuffers(n,renderbuffers){for(var i=0;i>2];var renderbuffer=GL.renderbuffers[id];if(!renderbuffer)continue;GLctx.deleteRenderbuffer(renderbuffer);renderbuffer.name=0;GL.renderbuffers[id]=null}};var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;var _glDeleteSamplers=function _glDeleteSamplers(n,samplers){for(var i=0;i>2];var sampler=GL.samplers[id];if(!sampler)continue;GLctx.deleteSampler(sampler);sampler.name=0;GL.samplers[id]=null}};var _emscripten_glDeleteSamplers=_glDeleteSamplers;var _glDeleteShader=function _glDeleteShader(id){if(!id)return;var shader=GL.shaders[id];if(!shader){GL.recordError(1281);return}GLctx.deleteShader(shader);GL.shaders[id]=null};var _emscripten_glDeleteShader=_glDeleteShader;var _glDeleteSync=function _glDeleteSync(id){if(!id)return;var sync=GL.syncs[id];if(!sync){GL.recordError(1281);return}GLctx.deleteSync(sync);sync.name=0;GL.syncs[id]=null};var _emscripten_glDeleteSync=_glDeleteSync;var _glDeleteTextures=function _glDeleteTextures(n,textures){for(var i=0;i>2];var texture=GL.textures[id];if(!texture)continue;GLctx.deleteTexture(texture);texture.name=0;GL.textures[id]=null}};var _emscripten_glDeleteTextures=_glDeleteTextures;var _glDeleteTransformFeedbacks=function _glDeleteTransformFeedbacks(n,ids){for(var i=0;i>2];var transformFeedback=GL.transformFeedbacks[id];if(!transformFeedback)continue;GLctx.deleteTransformFeedback(transformFeedback);transformFeedback.name=0;GL.transformFeedbacks[id]=null}};var _emscripten_glDeleteTransformFeedbacks=_glDeleteTransformFeedbacks;var _glDeleteVertexArrays=function _glDeleteVertexArrays(n,vaos){for(var i=0;i>2];GLctx.deleteVertexArray(GL.vaos[id]);GL.vaos[id]=null}};var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;var _glDeleteVertexArraysOES=_glDeleteVertexArrays;var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;var _glDepthFunc=function _glDepthFunc(x0){return GLctx.depthFunc(x0)};var _emscripten_glDepthFunc=_glDepthFunc;var _glDepthMask=function _glDepthMask(flag){GLctx.depthMask(!!flag)};var _emscripten_glDepthMask=_glDepthMask;var _glDepthRangef=function _glDepthRangef(x0,x1){return GLctx.depthRange(x0,x1)};var _emscripten_glDepthRangef=_glDepthRangef;var _glDetachShader=function _glDetachShader(program,shader){GLctx.detachShader(GL.programs[program],GL.shaders[shader])};var _emscripten_glDetachShader=_glDetachShader;var _glDisable=function _glDisable(x0){return GLctx.disable(x0)};var _emscripten_glDisable=_glDisable;var _glDisableVertexAttribArray=function _glDisableVertexAttribArray(index){GLctx.disableVertexAttribArray(index)};var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;var _glDrawArrays=function _glDrawArrays(mode,first,count){GLctx.drawArrays(mode,first,count)};var _emscripten_glDrawArrays=_glDrawArrays;var _glDrawArraysInstanced=function _glDrawArraysInstanced(mode,first,count,primcount){GLctx.drawArraysInstanced(mode,first,count,primcount)};var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE;var _glDrawArraysInstancedARB=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB;var _glDrawArraysInstancedEXT=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT;var _glDrawArraysInstancedNV=_glDrawArraysInstanced;var _emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV;var tempFixedLengthArray=[];var _glDrawBuffers=function _glDrawBuffers(n,bufs){var bufArray=tempFixedLengthArray[n];for(var i=0;i>2]}GLctx.drawBuffers(bufArray)};var _emscripten_glDrawBuffers=_glDrawBuffers;var _glDrawBuffersEXT=_glDrawBuffers;var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT;var _glDrawBuffersWEBGL=_glDrawBuffers;var _emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;var _glDrawElements=function _glDrawElements(mode,count,type,indices){GLctx.drawElements(mode,count,type,indices)};var _emscripten_glDrawElements=_glDrawElements;var _glDrawElementsInstanced=function _glDrawElementsInstanced(mode,count,type,indices,primcount){GLctx.drawElementsInstanced(mode,count,type,indices,primcount)};var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE;var _glDrawElementsInstancedARB=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB;var _glDrawElementsInstancedEXT=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT;var _glDrawElementsInstancedNV=_glDrawElementsInstanced;var _emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV;var _glDrawRangeElements=function _glDrawRangeElements(mode,start,end,count,type,indices){_glDrawElements(mode,count,type,indices)};var _emscripten_glDrawRangeElements=_glDrawRangeElements;var _glEnable=function _glEnable(x0){return GLctx.enable(x0)};var _emscripten_glEnable=_glEnable;var _glEnableVertexAttribArray=function _glEnableVertexAttribArray(index){GLctx.enableVertexAttribArray(index)};var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;var _glEndQuery=function _glEndQuery(x0){return GLctx.endQuery(x0)};var _emscripten_glEndQuery=_glEndQuery;var _glEndQueryEXT=function _glEndQueryEXT(target){GLctx.disjointTimerQueryExt["endQueryEXT"](target)};var _emscripten_glEndQueryEXT=_glEndQueryEXT;var _glEndTransformFeedback=function _glEndTransformFeedback(){return GLctx.endTransformFeedback()};var _emscripten_glEndTransformFeedback=_glEndTransformFeedback;var _glFenceSync=function _glFenceSync(condition,flags){var sync=GLctx.fenceSync(condition,flags);if(sync){var id=GL.getNewId(GL.syncs);sync.name=id;GL.syncs[id]=sync;return id}return 0};var _emscripten_glFenceSync=_glFenceSync;var _glFinish=function _glFinish(){return GLctx.finish()};var _emscripten_glFinish=_glFinish;var _glFlush=function _glFlush(){return GLctx.flush()};var _emscripten_glFlush=_glFlush;var _glFramebufferRenderbuffer=function _glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer){GLctx.framebufferRenderbuffer(target,attachment,renderbuffertarget,GL.renderbuffers[renderbuffer])};var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;var _glFramebufferTexture2D=function _glFramebufferTexture2D(target,attachment,textarget,texture,level){GLctx.framebufferTexture2D(target,attachment,textarget,GL.textures[texture],level)};var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;var _glFramebufferTextureLayer=function _glFramebufferTextureLayer(target,attachment,texture,level,layer){GLctx.framebufferTextureLayer(target,attachment,GL.textures[texture],level,layer)};var _emscripten_glFramebufferTextureLayer=_glFramebufferTextureLayer;var _glFrontFace=function _glFrontFace(x0){return GLctx.frontFace(x0)};var _emscripten_glFrontFace=_glFrontFace;var _glGenBuffers=function _glGenBuffers(n,buffers){GL.genObject(n,buffers,"createBuffer",GL.buffers)};var _emscripten_glGenBuffers=_glGenBuffers;var _glGenFramebuffers=function _glGenFramebuffers(n,ids){GL.genObject(n,ids,"createFramebuffer",GL.framebuffers)};var _emscripten_glGenFramebuffers=_glGenFramebuffers;var _glGenQueries=function _glGenQueries(n,ids){GL.genObject(n,ids,"createQuery",GL.queries)};var _emscripten_glGenQueries=_glGenQueries;var _glGenQueriesEXT=function _glGenQueriesEXT(n,ids){for(var i=0;i>2]=0;return}var id=GL.getNewId(GL.queries);query.name=id;GL.queries[id]=query;HEAP32[ids+i*4>>2]=id}};var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;var _glGenRenderbuffers=function _glGenRenderbuffers(n,renderbuffers){GL.genObject(n,renderbuffers,"createRenderbuffer",GL.renderbuffers)};var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;var _glGenSamplers=function _glGenSamplers(n,samplers){GL.genObject(n,samplers,"createSampler",GL.samplers)};var _emscripten_glGenSamplers=_glGenSamplers;var _glGenTextures=function _glGenTextures(n,textures){GL.genObject(n,textures,"createTexture",GL.textures)};var _emscripten_glGenTextures=_glGenTextures;var _glGenTransformFeedbacks=function _glGenTransformFeedbacks(n,ids){GL.genObject(n,ids,"createTransformFeedback",GL.transformFeedbacks)};var _emscripten_glGenTransformFeedbacks=_glGenTransformFeedbacks;var _glGenVertexArrays=function _glGenVertexArrays(n,arrays){GL.genObject(n,arrays,"createVertexArray",GL.vaos)};var _emscripten_glGenVertexArrays=_glGenVertexArrays;var _glGenVertexArraysOES=_glGenVertexArrays;var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;var _glGenerateMipmap=function _glGenerateMipmap(x0){return GLctx.generateMipmap(x0)};var _emscripten_glGenerateMipmap=_glGenerateMipmap;var __glGetActiveAttribOrUniform=function __glGetActiveAttribOrUniform(funcName,program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx[funcName](program,index);if(info){var numBytesWrittenExclNull=name&&stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull;if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type}};var _glGetActiveAttrib=function _glGetActiveAttrib(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveAttrib",program,index,bufSize,length,size,type,name)};var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;var _glGetActiveUniform=function _glGetActiveUniform(program,index,bufSize,length,size,type,name){__glGetActiveAttribOrUniform("getActiveUniform",program,index,bufSize,length,size,type,name)};var _emscripten_glGetActiveUniform=_glGetActiveUniform;var _glGetActiveUniformBlockName=function _glGetActiveUniformBlockName(program,uniformBlockIndex,bufSize,length,uniformBlockName){program=GL.programs[program];var result=GLctx.getActiveUniformBlockName(program,uniformBlockIndex);if(!result)return;if(uniformBlockName&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(result,uniformBlockName,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}};var _emscripten_glGetActiveUniformBlockName=_glGetActiveUniformBlockName;var _glGetActiveUniformBlockiv=function _glGetActiveUniformBlockiv(program,uniformBlockIndex,pname,params){if(!params){GL.recordError(1281);return}program=GL.programs[program];if(pname==35393){var name=GLctx.getActiveUniformBlockName(program,uniformBlockIndex);HEAP32[params>>2]=name.length+1;return}var result=GLctx.getActiveUniformBlockParameter(program,uniformBlockIndex,pname);if(result===null)return;if(pname==35395){for(var i=0;i>2]=result[i]}}else{HEAP32[params>>2]=result}};var _emscripten_glGetActiveUniformBlockiv=_glGetActiveUniformBlockiv;var _glGetActiveUniformsiv=function _glGetActiveUniformsiv(program,uniformCount,uniformIndices,pname,params){if(!params){GL.recordError(1281);return}if(uniformCount>0&&uniformIndices==0){GL.recordError(1281);return}program=GL.programs[program];var ids=[];for(var i=0;i>2])}var result=GLctx.getActiveUniforms(program,ids,pname);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}};var _emscripten_glGetActiveUniformsiv=_glGetActiveUniformsiv;var _glGetAttachedShaders=function _glGetAttachedShaders(program,maxCount,count,shaders){var result=GLctx.getAttachedShaders(GL.programs[program]);var len=result.length;if(len>maxCount){len=maxCount}HEAP32[count>>2]=len;for(var i=0;i>2]=id}};var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;var _glGetAttribLocation=function _glGetAttribLocation(program,name){return GLctx.getAttribLocation(GL.programs[program],UTF8ToString(name))};var _emscripten_glGetAttribLocation=_glGetAttribLocation;var writeI53ToI64=function writeI53ToI64(ptr,num){HEAPU32[ptr>>2]=num;var lower=HEAPU32[ptr>>2];HEAPU32[ptr+4>>2]=(num-lower)/4294967296};var getEmscriptenSupportedExtensions=function getEmscriptenSupportedExtensions(ctx){var supportedExtensions=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_float","EXT_conservative_depth","EXT_disjoint_timer_query_webgl2","EXT_texture_norm16","NV_shader_noperspective_interpolation","WEBGL_clip_cull_distance","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw"];return(ctx.getSupportedExtensions()||[]).filter(function(ext){return supportedExtensions.includes(ext)})};var webglGetExtensions=function $webglGetExtensions(){var exts=getEmscriptenSupportedExtensions(GLctx);exts=exts.concat(exts.map(function(e){return"GL_"+e}));return exts};var emscriptenWebGLGet=function emscriptenWebGLGet(name_,p,type){if(!p){GL.recordError(1281);return}var ret=undefined;switch(name_){case 36346:ret=1;break;case 36344:if(type!=0&&type!=1){GL.recordError(1280)}return;case 34814:case 36345:ret=0;break;case 34466:var formats=GLctx.getParameter(34467);ret=formats?formats.length:0;break;case 33309:if(GL.currentContext.version<2){GL.recordError(1282);return}ret=webglGetExtensions().length;break;case 33307:case 33308:if(GL.currentContext.version<2){GL.recordError(1280);return}ret=name_==33307?3:0;break}if(ret===undefined){var result=GLctx.getParameter(name_);switch(_typeof(result)){case"number":ret=result;break;case"boolean":ret=result?1:0;break;case"string":GL.recordError(1280);return;case"object":if(result===null){switch(name_){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:{ret=0;break}default:{GL.recordError(1280);return}}}else if(result instanceof Float32Array||result instanceof Uint32Array||result instanceof Int32Array||result instanceof Array){for(var i=0;i>2]=result[i];break;case 2:HEAPF32[p+i*4>>2]=result[i];break;case 4:HEAP8[p+i]=result[i]?1:0;break}}return}else{try{ret=result.name|0}catch(e){GL.recordError(1280);err("GL_INVALID_ENUM in glGet".concat(type,"v: Unknown object returned from WebGL getParameter(").concat(name_,")! (error: ").concat(e,")"));return}}break;default:GL.recordError(1280);err("GL_INVALID_ENUM in glGet".concat(type,"v: Native code calling glGet").concat(type,"v(").concat(name_,") and it returns ").concat(result," of type ").concat(_typeof(result),"!"));return}}switch(type){case 1:writeI53ToI64(p,ret);break;case 0:HEAP32[p>>2]=ret;break;case 2:HEAPF32[p>>2]=ret;break;case 4:HEAP8[p]=ret?1:0;break}};var _glGetBooleanv=function _glGetBooleanv(name_,p){return emscriptenWebGLGet(name_,p,4)};var _emscripten_glGetBooleanv=_glGetBooleanv;var _glGetBufferParameteri64v=function _glGetBufferParameteri64v(target,value,data){if(!data){GL.recordError(1281);return}writeI53ToI64(data,GLctx.getBufferParameter(target,value))};var _emscripten_glGetBufferParameteri64v=_glGetBufferParameteri64v;var _glGetBufferParameteriv=function _glGetBufferParameteriv(target,value,data){if(!data){GL.recordError(1281);return}HEAP32[data>>2]=GLctx.getBufferParameter(target,value)};var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;var _glGetError=function _glGetError(){var error=GLctx.getError()||GL.lastError;GL.lastError=0;return error};var _emscripten_glGetError=_glGetError;var _glGetFloatv=function _glGetFloatv(name_,p){return emscriptenWebGLGet(name_,p,2)};var _emscripten_glGetFloatv=_glGetFloatv;var _glGetFragDataLocation=function _glGetFragDataLocation(program,name){return GLctx.getFragDataLocation(GL.programs[program],UTF8ToString(name))};var _emscripten_glGetFragDataLocation=_glGetFragDataLocation;var _glGetFramebufferAttachmentParameteriv=function _glGetFramebufferAttachmentParameteriv(target,attachment,pname,params){var result=GLctx.getFramebufferAttachmentParameter(target,attachment,pname);if(result instanceof WebGLRenderbuffer||result instanceof WebGLTexture){result=result.name|0}HEAP32[params>>2]=result};var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;var emscriptenWebGLGetIndexed=function emscriptenWebGLGetIndexed(target,index,data,type){if(!data){GL.recordError(1281);return}var result=GLctx.getIndexedParameter(target,index);var ret;switch(_typeof(result)){case"boolean":ret=result?1:0;break;case"number":ret=result;break;case"object":if(result===null){switch(target){case 35983:case 35368:ret=0;break;default:{GL.recordError(1280);return}}}else if(result instanceof WebGLBuffer){ret=result.name|0}else{GL.recordError(1280);return}break;default:GL.recordError(1280);return}switch(type){case 1:writeI53ToI64(data,ret);break;case 0:HEAP32[data>>2]=ret;break;case 2:HEAPF32[data>>2]=ret;break;case 4:HEAP8[data]=ret?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+type}};var _glGetInteger64i_v=function _glGetInteger64i_v(target,index,data){return emscriptenWebGLGetIndexed(target,index,data,1)};var _emscripten_glGetInteger64i_v=_glGetInteger64i_v;var _glGetInteger64v=function _glGetInteger64v(name_,p){emscriptenWebGLGet(name_,p,1)};var _emscripten_glGetInteger64v=_glGetInteger64v;var _glGetIntegeri_v=function _glGetIntegeri_v(target,index,data){return emscriptenWebGLGetIndexed(target,index,data,0)};var _emscripten_glGetIntegeri_v=_glGetIntegeri_v;var _glGetIntegerv=function _glGetIntegerv(name_,p){return emscriptenWebGLGet(name_,p,0)};var _emscripten_glGetIntegerv=_glGetIntegerv;var _glGetInternalformativ=function _glGetInternalformativ(target,internalformat,pname,bufSize,params){if(bufSize<0){GL.recordError(1281);return}if(!params){GL.recordError(1281);return}var ret=GLctx.getInternalformatParameter(target,internalformat,pname);if(ret===null)return;for(var i=0;i>2]=ret[i]}};var _emscripten_glGetInternalformativ=_glGetInternalformativ;var _glGetProgramBinary=function _glGetProgramBinary(program,bufSize,length,binaryFormat,binary){GL.recordError(1282)};var _emscripten_glGetProgramBinary=_glGetProgramBinary;var _glGetProgramInfoLog=function _glGetProgramInfoLog(program,maxLength,length,infoLog){var log=GLctx.getProgramInfoLog(GL.programs[program]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull};var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;var _glGetProgramiv=function _glGetProgramiv(program,pname,p){if(!p){GL.recordError(1281);return}if(program>=GL.counter){GL.recordError(1281);return}program=GL.programs[program];if(pname==35716){var log=GLctx.getProgramInfoLog(program);if(log===null)log="(unknown error)";HEAP32[p>>2]=log.length+1}else if(pname==35719){if(!program.maxUniformLength){for(var i=0;i>2]=program.maxUniformLength}else if(pname==35722){if(!program.maxAttributeLength){for(var i=0;i>2]=program.maxAttributeLength}else if(pname==35381){if(!program.maxUniformBlockNameLength){for(var i=0;i>2]=program.maxUniformBlockNameLength}else{HEAP32[p>>2]=GLctx.getProgramParameter(program,pname)}};var _emscripten_glGetProgramiv=_glGetProgramiv;var _glGetQueryObjecti64vEXT=function _glGetQueryObjecti64vEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param;if(GL.currentContext.version<2){param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname)}else{param=GLctx.getQueryParameter(query,pname)}var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}writeI53ToI64(params,ret)};var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;var _glGetQueryObjectivEXT=function _glGetQueryObjectivEXT(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.disjointTimerQueryExt["getQueryObjectEXT"](query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret};var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT;var _glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT;var _emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT;var _glGetQueryObjectuiv=function _glGetQueryObjectuiv(id,pname,params){if(!params){GL.recordError(1281);return}var query=GL.queries[id];var param=GLctx.getQueryParameter(query,pname);var ret;if(typeof param=="boolean"){ret=param?1:0}else{ret=param}HEAP32[params>>2]=ret};var _emscripten_glGetQueryObjectuiv=_glGetQueryObjectuiv;var _glGetQueryObjectuivEXT=_glGetQueryObjectivEXT;var _emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;var _glGetQueryiv=function _glGetQueryiv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getQuery(target,pname)};var _emscripten_glGetQueryiv=_glGetQueryiv;var _glGetQueryivEXT=function _glGetQueryivEXT(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.disjointTimerQueryExt["getQueryEXT"](target,pname)};var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;var _glGetRenderbufferParameteriv=function _glGetRenderbufferParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getRenderbufferParameter(target,pname)};var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;var _glGetSamplerParameterfv=function _glGetSamplerParameterfv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getSamplerParameter(GL.samplers[sampler],pname)};var _emscripten_glGetSamplerParameterfv=_glGetSamplerParameterfv;var _glGetSamplerParameteriv=function _glGetSamplerParameteriv(sampler,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getSamplerParameter(GL.samplers[sampler],pname)};var _emscripten_glGetSamplerParameteriv=_glGetSamplerParameteriv;var _glGetShaderInfoLog=function _glGetShaderInfoLog(shader,maxLength,length,infoLog){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var numBytesWrittenExclNull=maxLength>0&&infoLog?stringToUTF8(log,infoLog,maxLength):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull};var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;var _glGetShaderPrecisionFormat=function _glGetShaderPrecisionFormat(shaderType,precisionType,range,precision){var result=GLctx.getShaderPrecisionFormat(shaderType,precisionType);HEAP32[range>>2]=result.rangeMin;HEAP32[range+4>>2]=result.rangeMax;HEAP32[precision>>2]=result.precision};var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;var _glGetShaderSource=function _glGetShaderSource(shader,bufSize,length,source){var result=GLctx.getShaderSource(GL.shaders[shader]);if(!result)return;var numBytesWrittenExclNull=bufSize>0&&source?stringToUTF8(result,source,bufSize):0;if(length)HEAP32[length>>2]=numBytesWrittenExclNull};var _emscripten_glGetShaderSource=_glGetShaderSource;var _glGetShaderiv=function _glGetShaderiv(shader,pname,p){if(!p){GL.recordError(1281);return}if(pname==35716){var log=GLctx.getShaderInfoLog(GL.shaders[shader]);if(log===null)log="(unknown error)";var logLength=log?log.length+1:0;HEAP32[p>>2]=logLength}else if(pname==35720){var source=GLctx.getShaderSource(GL.shaders[shader]);var sourceLength=source?source.length+1:0;HEAP32[p>>2]=sourceLength}else{HEAP32[p>>2]=GLctx.getShaderParameter(GL.shaders[shader],pname)}};var _emscripten_glGetShaderiv=_glGetShaderiv;var stringToNewUTF8=function stringToNewUTF8(str){var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var _glGetString=function _glGetString(name_){var ret=GL.stringCache[name_];if(!ret){switch(name_){case 7939:ret=stringToNewUTF8(webglGetExtensions().join(" "));break;case 7936:case 7937:case 37445:case 37446:var s=GLctx.getParameter(name_);if(!s){GL.recordError(1280)}ret=s?stringToNewUTF8(s):0;break;case 7938:var webGLVersion=GLctx.getParameter(7938);var glVersion="OpenGL ES 2.0 (".concat(webGLVersion,")");if(GL.currentContext.version>=2)glVersion="OpenGL ES 3.0 (".concat(webGLVersion,")");ret=stringToNewUTF8(glVersion);break;case 35724:var glslVersion=GLctx.getParameter(35724);var ver_re=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/;var ver_num=glslVersion.match(ver_re);if(ver_num!==null){if(ver_num[1].length==3)ver_num[1]=ver_num[1]+"0";glslVersion="OpenGL ES GLSL ES ".concat(ver_num[1]," (").concat(glslVersion,")")}ret=stringToNewUTF8(glslVersion);break;default:GL.recordError(1280)}GL.stringCache[name_]=ret}return ret};var _emscripten_glGetString=_glGetString;var _glGetStringi=function _glGetStringi(name,index){if(GL.currentContext.version<2){GL.recordError(1282);return 0}var stringiCache=GL.stringiCache[name];if(stringiCache){if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index]}switch(name){case 7939:var exts=webglGetExtensions().map(stringToNewUTF8);stringiCache=GL.stringiCache[name]=exts;if(index<0||index>=stringiCache.length){GL.recordError(1281);return 0}return stringiCache[index];default:GL.recordError(1280);return 0}};var _emscripten_glGetStringi=_glGetStringi;var _glGetSynciv=function _glGetSynciv(sync,pname,bufSize,length,values){if(bufSize<0){GL.recordError(1281);return}if(!values){GL.recordError(1281);return}var ret=GLctx.getSyncParameter(GL.syncs[sync],pname);if(ret!==null){HEAP32[values>>2]=ret;if(length)HEAP32[length>>2]=1}};var _emscripten_glGetSynciv=_glGetSynciv;var _glGetTexParameterfv=function _glGetTexParameterfv(target,pname,params){if(!params){GL.recordError(1281);return}HEAPF32[params>>2]=GLctx.getTexParameter(target,pname)};var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;var _glGetTexParameteriv=function _glGetTexParameteriv(target,pname,params){if(!params){GL.recordError(1281);return}HEAP32[params>>2]=GLctx.getTexParameter(target,pname)};var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;var _glGetTransformFeedbackVarying=function _glGetTransformFeedbackVarying(program,index,bufSize,length,size,type,name){program=GL.programs[program];var info=GLctx.getTransformFeedbackVarying(program,index);if(!info)return;if(name&&bufSize>0){var numBytesWrittenExclNull=stringToUTF8(info.name,name,bufSize);if(length)HEAP32[length>>2]=numBytesWrittenExclNull}else{if(length)HEAP32[length>>2]=0}if(size)HEAP32[size>>2]=info.size;if(type)HEAP32[type>>2]=info.type};var _emscripten_glGetTransformFeedbackVarying=_glGetTransformFeedbackVarying;var _glGetUniformBlockIndex=function _glGetUniformBlockIndex(program,uniformBlockName){return GLctx.getUniformBlockIndex(GL.programs[program],UTF8ToString(uniformBlockName))};var _emscripten_glGetUniformBlockIndex=_glGetUniformBlockIndex;var _glGetUniformIndices=function _glGetUniformIndices(program,uniformCount,uniformNames,uniformIndices){if(!uniformIndices){GL.recordError(1281);return}if(uniformCount>0&&(uniformNames==0||uniformIndices==0)){GL.recordError(1281);return}program=GL.programs[program];var names=[];for(var i=0;i>2]));var result=GLctx.getUniformIndices(program,names);if(!result)return;var len=result.length;for(var i=0;i>2]=result[i]}};var _emscripten_glGetUniformIndices=_glGetUniformIndices;var webglGetLeftBracePos=function webglGetLeftBracePos(name){return name.slice(-1)=="]"&&name.lastIndexOf("[")};var webglPrepareUniformLocationsBeforeFirstUse=function webglPrepareUniformLocationsBeforeFirstUse(program){var uniformLocsById=program.uniformLocsById,uniformSizeAndIdsByName=program.uniformSizeAndIdsByName,i,j;if(!uniformLocsById){program.uniformLocsById=uniformLocsById={};program.uniformArrayNamesById={};for(i=0;i0?nm.slice(0,lb):nm;var id=program.uniformIdCounter;program.uniformIdCounter+=sz;uniformSizeAndIdsByName[arrayName]=[sz,id];for(j=0;j0){arrayIndex=jstoi_q(name.slice(leftBrace+1))>>>0;uniformBaseName=name.slice(0,leftBrace)}var sizeAndId=program.uniformSizeAndIdsByName[uniformBaseName];if(sizeAndId&&arrayIndex0?"[".concat(webglLoc,"]"):""))}return webglLoc}else{GL.recordError(1282)}};var emscriptenWebGLGetUniform=function emscriptenWebGLGetUniform(program,location,params,type){if(!params){GL.recordError(1281);return}program=GL.programs[program];webglPrepareUniformLocationsBeforeFirstUse(program);var data=GLctx.getUniform(program,webglGetUniformLocation(location));if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break}}}};var _glGetUniformfv=function _glGetUniformfv(program,location,params){emscriptenWebGLGetUniform(program,location,params,2)};var _emscripten_glGetUniformfv=_glGetUniformfv;var _glGetUniformiv=function _glGetUniformiv(program,location,params){emscriptenWebGLGetUniform(program,location,params,0)};var _emscripten_glGetUniformiv=_glGetUniformiv;var _glGetUniformuiv=function _glGetUniformuiv(program,location,params){return emscriptenWebGLGetUniform(program,location,params,0)};var _emscripten_glGetUniformuiv=_glGetUniformuiv;var emscriptenWebGLGetVertexAttrib=function emscriptenWebGLGetVertexAttrib(index,pname,params,type){if(!params){GL.recordError(1281);return}var data=GLctx.getVertexAttrib(index,pname);if(pname==34975){HEAP32[params>>2]=data&&data["name"]}else if(typeof data=="number"||typeof data=="boolean"){switch(type){case 0:HEAP32[params>>2]=data;break;case 2:HEAPF32[params>>2]=data;break;case 5:HEAP32[params>>2]=Math.fround(data);break}}else{for(var i=0;i>2]=data[i];break;case 2:HEAPF32[params+i*4>>2]=data[i];break;case 5:HEAP32[params+i*4>>2]=Math.fround(data[i]);break}}}};var _glGetVertexAttribIiv=function _glGetVertexAttribIiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,0)};var _emscripten_glGetVertexAttribIiv=_glGetVertexAttribIiv;var _glGetVertexAttribIuiv=_glGetVertexAttribIiv;var _emscripten_glGetVertexAttribIuiv=_glGetVertexAttribIuiv;var _glGetVertexAttribPointerv=function _glGetVertexAttribPointerv(index,pname,pointer){if(!pointer){GL.recordError(1281);return}HEAP32[pointer>>2]=GLctx.getVertexAttribOffset(index,pname)};var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;var _glGetVertexAttribfv=function _glGetVertexAttribfv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,2)};var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;var _glGetVertexAttribiv=function _glGetVertexAttribiv(index,pname,params){emscriptenWebGLGetVertexAttrib(index,pname,params,5)};var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;var _glHint=function _glHint(x0,x1){return GLctx.hint(x0,x1)};var _emscripten_glHint=_glHint;var _glInvalidateFramebuffer=function _glInvalidateFramebuffer(target,numAttachments,attachments){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx.invalidateFramebuffer(target,list)};var _emscripten_glInvalidateFramebuffer=_glInvalidateFramebuffer;var _glInvalidateSubFramebuffer=function _glInvalidateSubFramebuffer(target,numAttachments,attachments,x,y,width,height){var list=tempFixedLengthArray[numAttachments];for(var i=0;i>2]}GLctx.invalidateSubFramebuffer(target,list,x,y,width,height)};var _emscripten_glInvalidateSubFramebuffer=_glInvalidateSubFramebuffer;var _glIsBuffer=function _glIsBuffer(buffer){var b=GL.buffers[buffer];if(!b)return 0;return GLctx.isBuffer(b)};var _emscripten_glIsBuffer=_glIsBuffer;var _glIsEnabled=function _glIsEnabled(x0){return GLctx.isEnabled(x0)};var _emscripten_glIsEnabled=_glIsEnabled;var _glIsFramebuffer=function _glIsFramebuffer(framebuffer){var fb=GL.framebuffers[framebuffer];if(!fb)return 0;return GLctx.isFramebuffer(fb)};var _emscripten_glIsFramebuffer=_glIsFramebuffer;var _glIsProgram=function _glIsProgram(program){program=GL.programs[program];if(!program)return 0;return GLctx.isProgram(program)};var _emscripten_glIsProgram=_glIsProgram;var _glIsQuery=function _glIsQuery(id){var query=GL.queries[id];if(!query)return 0;return GLctx.isQuery(query)};var _emscripten_glIsQuery=_glIsQuery;var _glIsQueryEXT=function _glIsQueryEXT(id){var query=GL.queries[id];if(!query)return 0;return GLctx.disjointTimerQueryExt["isQueryEXT"](query)};var _emscripten_glIsQueryEXT=_glIsQueryEXT;var _glIsRenderbuffer=function _glIsRenderbuffer(renderbuffer){var rb=GL.renderbuffers[renderbuffer];if(!rb)return 0;return GLctx.isRenderbuffer(rb)};var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;var _glIsSampler=function _glIsSampler(id){var sampler=GL.samplers[id];if(!sampler)return 0;return GLctx.isSampler(sampler)};var _emscripten_glIsSampler=_glIsSampler;var _glIsShader=function _glIsShader(shader){var s=GL.shaders[shader];if(!s)return 0;return GLctx.isShader(s)};var _emscripten_glIsShader=_glIsShader;var _glIsSync=function _glIsSync(sync){return GLctx.isSync(GL.syncs[sync])};var _emscripten_glIsSync=_glIsSync;var _glIsTexture=function _glIsTexture(id){var texture=GL.textures[id];if(!texture)return 0;return GLctx.isTexture(texture)};var _emscripten_glIsTexture=_glIsTexture;var _glIsTransformFeedback=function _glIsTransformFeedback(id){return GLctx.isTransformFeedback(GL.transformFeedbacks[id])};var _emscripten_glIsTransformFeedback=_glIsTransformFeedback;var _glIsVertexArray=function _glIsVertexArray(array){var vao=GL.vaos[array];if(!vao)return 0;return GLctx.isVertexArray(vao)};var _emscripten_glIsVertexArray=_glIsVertexArray;var _glIsVertexArrayOES=_glIsVertexArray;var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;var _glLineWidth=function _glLineWidth(x0){return GLctx.lineWidth(x0)};var _emscripten_glLineWidth=_glLineWidth;var _glLinkProgram=function _glLinkProgram(program){program=GL.programs[program];GLctx.linkProgram(program);program.uniformLocsById=0;program.uniformSizeAndIdsByName={}};var _emscripten_glLinkProgram=_glLinkProgram;var _glPauseTransformFeedback=function _glPauseTransformFeedback(){return GLctx.pauseTransformFeedback()};var _emscripten_glPauseTransformFeedback=_glPauseTransformFeedback;var _glPixelStorei=function _glPixelStorei(pname,param){if(pname==3317){GL.unpackAlignment=param}else if(pname==3314){GL.unpackRowLength=param}GLctx.pixelStorei(pname,param)};var _emscripten_glPixelStorei=_glPixelStorei;var _glPolygonOffset=function _glPolygonOffset(x0,x1){return GLctx.polygonOffset(x0,x1)};var _emscripten_glPolygonOffset=_glPolygonOffset;var _glProgramBinary=function _glProgramBinary(program,binaryFormat,binary,length){GL.recordError(1280)};var _emscripten_glProgramBinary=_glProgramBinary;var _glProgramParameteri=function _glProgramParameteri(program,pname,value){GL.recordError(1280)};var _emscripten_glProgramParameteri=_glProgramParameteri;var _glQueryCounterEXT=function _glQueryCounterEXT(id,target){GLctx.disjointTimerQueryExt["queryCounterEXT"](GL.queries[id],target)};var _emscripten_glQueryCounterEXT=_glQueryCounterEXT;var _glReadBuffer=function _glReadBuffer(x0){return GLctx.readBuffer(x0)};var _emscripten_glReadBuffer=_glReadBuffer;var computeUnpackAlignedImageSize=function computeUnpackAlignedImageSize(width,height,sizePerPixel){function roundedToNextMultipleOf(x,y){return x+y-1&-y}var plainRowSize=(GL.unpackRowLength||width)*sizePerPixel;var alignedRowSize=roundedToNextMultipleOf(plainRowSize,GL.unpackAlignment);return height*alignedRowSize};var colorChannelsInGlTextureFormat=function colorChannelsInGlTextureFormat(format){var colorChannels={5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4};return colorChannels[format-6402]||1};var heapObjectForWebGLType=function heapObjectForWebGLType(type){type-=5120;if(type==0)return HEAP8;if(type==1)return HEAPU8;if(type==2)return HEAP16;if(type==4)return HEAP32;if(type==6)return HEAPF32;if(type==5||type==28922||type==28520||type==30779||type==30782)return HEAPU32;return HEAPU16};var toTypedArrayIndex=function toTypedArrayIndex(pointer,heap){return pointer>>>31-Math.clz32(heap.BYTES_PER_ELEMENT)};var emscriptenWebGLGetTexPixelData=function emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat){var heap=heapObjectForWebGLType(type);var sizePerPixel=colorChannelsInGlTextureFormat(format)*heap.BYTES_PER_ELEMENT;var bytes=computeUnpackAlignedImageSize(width,height,sizePerPixel);return heap.subarray(toTypedArrayIndex(pixels,heap),toTypedArrayIndex(pixels+bytes,heap))};var _glReadPixels=function _glReadPixels(x,y,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelPackBufferBinding){GLctx.readPixels(x,y,width,height,format,type,pixels);return}var heap=heapObjectForWebGLType(type);var target=toTypedArrayIndex(pixels,heap);GLctx.readPixels(x,y,width,height,format,type,heap,target);return}var pixelData=emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,format);if(!pixelData){GL.recordError(1280);return}GLctx.readPixels(x,y,width,height,format,type,pixelData)};var _emscripten_glReadPixels=_glReadPixels;var _glReleaseShaderCompiler=function _glReleaseShaderCompiler(){};var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;var _glRenderbufferStorage=function _glRenderbufferStorage(x0,x1,x2,x3){return GLctx.renderbufferStorage(x0,x1,x2,x3)};var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;var _glRenderbufferStorageMultisample=function _glRenderbufferStorageMultisample(x0,x1,x2,x3,x4){return GLctx.renderbufferStorageMultisample(x0,x1,x2,x3,x4)};var _emscripten_glRenderbufferStorageMultisample=_glRenderbufferStorageMultisample;var _glResumeTransformFeedback=function _glResumeTransformFeedback(){return GLctx.resumeTransformFeedback()};var _emscripten_glResumeTransformFeedback=_glResumeTransformFeedback;var _glSampleCoverage=function _glSampleCoverage(value,invert){GLctx.sampleCoverage(value,!!invert)};var _emscripten_glSampleCoverage=_glSampleCoverage;var _glSamplerParameterf=function _glSamplerParameterf(sampler,pname,param){GLctx.samplerParameterf(GL.samplers[sampler],pname,param)};var _emscripten_glSamplerParameterf=_glSamplerParameterf;var _glSamplerParameterfv=function _glSamplerParameterfv(sampler,pname,params){var param=HEAPF32[params>>2];GLctx.samplerParameterf(GL.samplers[sampler],pname,param)};var _emscripten_glSamplerParameterfv=_glSamplerParameterfv;var _glSamplerParameteri=function _glSamplerParameteri(sampler,pname,param){GLctx.samplerParameteri(GL.samplers[sampler],pname,param)};var _emscripten_glSamplerParameteri=_glSamplerParameteri;var _glSamplerParameteriv=function _glSamplerParameteriv(sampler,pname,params){var param=HEAP32[params>>2];GLctx.samplerParameteri(GL.samplers[sampler],pname,param)};var _emscripten_glSamplerParameteriv=_glSamplerParameteriv;var _glScissor=function _glScissor(x0,x1,x2,x3){return GLctx.scissor(x0,x1,x2,x3)};var _emscripten_glScissor=_glScissor;var _glShaderBinary=function _glShaderBinary(count,shaders,binaryformat,binary,length){GL.recordError(1280)};var _emscripten_glShaderBinary=_glShaderBinary;var _glShaderSource=function _glShaderSource(shader,count,string,length){var source=GL.getSource(shader,count,string,length);GLctx.shaderSource(GL.shaders[shader],source)};var _emscripten_glShaderSource=_glShaderSource;var _glStencilFunc=function _glStencilFunc(x0,x1,x2){return GLctx.stencilFunc(x0,x1,x2)};var _emscripten_glStencilFunc=_glStencilFunc;var _glStencilFuncSeparate=function _glStencilFuncSeparate(x0,x1,x2,x3){return GLctx.stencilFuncSeparate(x0,x1,x2,x3)};var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;var _glStencilMask=function _glStencilMask(x0){return GLctx.stencilMask(x0)};var _emscripten_glStencilMask=_glStencilMask;var _glStencilMaskSeparate=function _glStencilMaskSeparate(x0,x1){return GLctx.stencilMaskSeparate(x0,x1)};var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;var _glStencilOp=function _glStencilOp(x0,x1,x2){return GLctx.stencilOp(x0,x1,x2)};var _emscripten_glStencilOp=_glStencilOp;var _glStencilOpSeparate=function _glStencilOpSeparate(x0,x1,x2,x3){return GLctx.stencilOpSeparate(x0,x1,x2,x3)};var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;var _glTexImage2D=function _glTexImage2D(target,level,internalFormat,width,height,border,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixels);return}if(pixels){var heap=heapObjectForWebGLType(type);var index=toTypedArrayIndex(pixels,heap);GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,heap,index);return}}var pixelData=pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,internalFormat):null;GLctx.texImage2D(target,level,internalFormat,width,height,border,format,type,pixelData)};var _emscripten_glTexImage2D=_glTexImage2D;var _glTexImage3D=function _glTexImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,heap,toTypedArrayIndex(pixels,heap))}else{GLctx.texImage3D(target,level,internalFormat,width,height,depth,border,format,type,null)}};var _emscripten_glTexImage3D=_glTexImage3D;var _glTexParameterf=function _glTexParameterf(x0,x1,x2){return GLctx.texParameterf(x0,x1,x2)};var _emscripten_glTexParameterf=_glTexParameterf;var _glTexParameterfv=function _glTexParameterfv(target,pname,params){var param=HEAPF32[params>>2];GLctx.texParameterf(target,pname,param)};var _emscripten_glTexParameterfv=_glTexParameterfv;var _glTexParameteri=function _glTexParameteri(x0,x1,x2){return GLctx.texParameteri(x0,x1,x2)};var _emscripten_glTexParameteri=_glTexParameteri;var _glTexParameteriv=function _glTexParameteriv(target,pname,params){var param=HEAP32[params>>2];GLctx.texParameteri(target,pname,param)};var _emscripten_glTexParameteriv=_glTexParameteriv;var _glTexStorage2D=function _glTexStorage2D(x0,x1,x2,x3,x4){return GLctx.texStorage2D(x0,x1,x2,x3,x4)};var _emscripten_glTexStorage2D=_glTexStorage2D;var _glTexStorage3D=function _glTexStorage3D(x0,x1,x2,x3,x4,x5){return GLctx.texStorage3D(x0,x1,x2,x3,x4,x5)};var _emscripten_glTexStorage3D=_glTexStorage3D;var _glTexSubImage2D=function _glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels){if(GL.currentContext.version>=2){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);return}if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,heap,toTypedArrayIndex(pixels,heap));return}}var pixelData=pixels?emscriptenWebGLGetTexPixelData(type,format,width,height,pixels,0):null;GLctx.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixelData)};var _emscripten_glTexSubImage2D=_glTexSubImage2D;var _glTexSubImage3D=function _glTexSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels){if(GLctx.currentPixelUnpackBufferBinding){GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,pixels)}else if(pixels){var heap=heapObjectForWebGLType(type);GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,heap,toTypedArrayIndex(pixels,heap))}else{GLctx.texSubImage3D(target,level,xoffset,yoffset,zoffset,width,height,depth,format,type,null)}};var _emscripten_glTexSubImage3D=_glTexSubImage3D;var _glTransformFeedbackVaryings=function _glTransformFeedbackVaryings(program,count,varyings,bufferMode){program=GL.programs[program];var vars=[];for(var i=0;i>2]));GLctx.transformFeedbackVaryings(program,vars,bufferMode)};var _emscripten_glTransformFeedbackVaryings=_glTransformFeedbackVaryings;var _glUniform1f=function _glUniform1f(location,v0){GLctx.uniform1f(webglGetUniformLocation(location),v0)};var _emscripten_glUniform1f=_glUniform1f;var miniTempWebGLFloatBuffers=[];var _glUniform1fv=function _glUniform1fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform1fv(webglGetUniformLocation(location),HEAPF32,value>>2,count);return}if(count<=288){var view=miniTempWebGLFloatBuffers[count];for(var i=0;i>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1fv(webglGetUniformLocation(location),view)};var _emscripten_glUniform1fv=_glUniform1fv;var _glUniform1i=function _glUniform1i(location,v0){GLctx.uniform1i(webglGetUniformLocation(location),v0)};var _emscripten_glUniform1i=_glUniform1i;var miniTempWebGLIntBuffers=[];var _glUniform1iv=function _glUniform1iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform1iv(webglGetUniformLocation(location),HEAP32,value>>2,count);return}if(count<=288){var view=miniTempWebGLIntBuffers[count];for(var i=0;i>2]}}else{var view=HEAP32.subarray(value>>2,value+count*4>>2)}GLctx.uniform1iv(webglGetUniformLocation(location),view)};var _emscripten_glUniform1iv=_glUniform1iv;var _glUniform1ui=function _glUniform1ui(location,v0){GLctx.uniform1ui(webglGetUniformLocation(location),v0)};var _emscripten_glUniform1ui=_glUniform1ui;var _glUniform1uiv=function _glUniform1uiv(location,count,value){count&&GLctx.uniform1uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count)};var _emscripten_glUniform1uiv=_glUniform1uiv;var _glUniform2f=function _glUniform2f(location,v0,v1){GLctx.uniform2f(webglGetUniformLocation(location),v0,v1)};var _emscripten_glUniform2f=_glUniform2f;var _glUniform2fv=function _glUniform2fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLFloatBuffers[2*count];for(var i=0;i<2*count;i+=2){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2fv(webglGetUniformLocation(location),view)};var _emscripten_glUniform2fv=_glUniform2fv;var _glUniform2i=function _glUniform2i(location,v0,v1){GLctx.uniform2i(webglGetUniformLocation(location),v0,v1)};var _emscripten_glUniform2i=_glUniform2i;var _glUniform2iv=function _glUniform2iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform2iv(webglGetUniformLocation(location),HEAP32,value>>2,count*2);return}if(count<=144){var view=miniTempWebGLIntBuffers[2*count];for(var i=0;i<2*count;i+=2){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*8>>2)}GLctx.uniform2iv(webglGetUniformLocation(location),view)};var _emscripten_glUniform2iv=_glUniform2iv;var _glUniform2ui=function _glUniform2ui(location,v0,v1){GLctx.uniform2ui(webglGetUniformLocation(location),v0,v1)};var _emscripten_glUniform2ui=_glUniform2ui;var _glUniform2uiv=function _glUniform2uiv(location,count,value){count&&GLctx.uniform2uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*2)};var _emscripten_glUniform2uiv=_glUniform2uiv;var _glUniform3f=function _glUniform3f(location,v0,v1,v2){GLctx.uniform3f(webglGetUniformLocation(location),v0,v1,v2)};var _emscripten_glUniform3f=_glUniform3f;var _glUniform3fv=function _glUniform3fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform3fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLFloatBuffers[3*count];for(var i=0;i<3*count;i+=3){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3fv(webglGetUniformLocation(location),view)};var _emscripten_glUniform3fv=_glUniform3fv;var _glUniform3i=function _glUniform3i(location,v0,v1,v2){GLctx.uniform3i(webglGetUniformLocation(location),v0,v1,v2)};var _emscripten_glUniform3i=_glUniform3i;var _glUniform3iv=function _glUniform3iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform3iv(webglGetUniformLocation(location),HEAP32,value>>2,count*3);return}if(count<=96){var view=miniTempWebGLIntBuffers[3*count];for(var i=0;i<3*count;i+=3){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*12>>2)}GLctx.uniform3iv(webglGetUniformLocation(location),view)};var _emscripten_glUniform3iv=_glUniform3iv;var _glUniform3ui=function _glUniform3ui(location,v0,v1,v2){GLctx.uniform3ui(webglGetUniformLocation(location),v0,v1,v2)};var _emscripten_glUniform3ui=_glUniform3ui;var _glUniform3uiv=function _glUniform3uiv(location,count,value){count&&GLctx.uniform3uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*3)};var _emscripten_glUniform3uiv=_glUniform3uiv;var _glUniform4f=function _glUniform4f(location,v0,v1,v2,v3){GLctx.uniform4f(webglGetUniformLocation(location),v0,v1,v2,v3)};var _emscripten_glUniform4f=_glUniform4f;var _glUniform4fv=function _glUniform4fv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform4fv(webglGetUniformLocation(location),HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count];var heap=HEAPF32;value=value>>2;for(var i=0;i<4*count;i+=4){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4fv(webglGetUniformLocation(location),view)};var _emscripten_glUniform4fv=_glUniform4fv;var _glUniform4i=function _glUniform4i(location,v0,v1,v2,v3){GLctx.uniform4i(webglGetUniformLocation(location),v0,v1,v2,v3)};var _emscripten_glUniform4i=_glUniform4i;var _glUniform4iv=function _glUniform4iv(location,count,value){if(GL.currentContext.version>=2){count&&GLctx.uniform4iv(webglGetUniformLocation(location),HEAP32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLIntBuffers[4*count];for(var i=0;i<4*count;i+=4){view[i]=HEAP32[value+4*i>>2];view[i+1]=HEAP32[value+(4*i+4)>>2];view[i+2]=HEAP32[value+(4*i+8)>>2];view[i+3]=HEAP32[value+(4*i+12)>>2]}}else{var view=HEAP32.subarray(value>>2,value+count*16>>2)}GLctx.uniform4iv(webglGetUniformLocation(location),view)};var _emscripten_glUniform4iv=_glUniform4iv;var _glUniform4ui=function _glUniform4ui(location,v0,v1,v2,v3){GLctx.uniform4ui(webglGetUniformLocation(location),v0,v1,v2,v3)};var _emscripten_glUniform4ui=_glUniform4ui;var _glUniform4uiv=function _glUniform4uiv(location,count,value){count&&GLctx.uniform4uiv(webglGetUniformLocation(location),HEAPU32,value>>2,count*4)};var _emscripten_glUniform4uiv=_glUniform4uiv;var _glUniformBlockBinding=function _glUniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding){program=GL.programs[program];GLctx.uniformBlockBinding(program,uniformBlockIndex,uniformBlockBinding)};var _emscripten_glUniformBlockBinding=_glUniformBlockBinding;var _glUniformMatrix2fv=function _glUniformMatrix2fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*4);return}if(count<=72){var view=miniTempWebGLFloatBuffers[4*count];for(var i=0;i<4*count;i+=4){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*16>>2)}GLctx.uniformMatrix2fv(webglGetUniformLocation(location),!!transpose,view)};var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;var _glUniformMatrix2x3fv=function _glUniformMatrix2x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)};var _emscripten_glUniformMatrix2x3fv=_glUniformMatrix2x3fv;var _glUniformMatrix2x4fv=function _glUniformMatrix2x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix2x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)};var _emscripten_glUniformMatrix2x4fv=_glUniformMatrix2x4fv;var _glUniformMatrix3fv=function _glUniformMatrix3fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*9);return}if(count<=32){var view=miniTempWebGLFloatBuffers[9*count];for(var i=0;i<9*count;i+=9){view[i]=HEAPF32[value+4*i>>2];view[i+1]=HEAPF32[value+(4*i+4)>>2];view[i+2]=HEAPF32[value+(4*i+8)>>2];view[i+3]=HEAPF32[value+(4*i+12)>>2];view[i+4]=HEAPF32[value+(4*i+16)>>2];view[i+5]=HEAPF32[value+(4*i+20)>>2];view[i+6]=HEAPF32[value+(4*i+24)>>2];view[i+7]=HEAPF32[value+(4*i+28)>>2];view[i+8]=HEAPF32[value+(4*i+32)>>2]}}else{var view=HEAPF32.subarray(value>>2,value+count*36>>2)}GLctx.uniformMatrix3fv(webglGetUniformLocation(location),!!transpose,view)};var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;var _glUniformMatrix3x2fv=function _glUniformMatrix3x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*6)};var _emscripten_glUniformMatrix3x2fv=_glUniformMatrix3x2fv;var _glUniformMatrix3x4fv=function _glUniformMatrix3x4fv(location,count,transpose,value){count&&GLctx.uniformMatrix3x4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)};var _emscripten_glUniformMatrix3x4fv=_glUniformMatrix3x4fv;var _glUniformMatrix4fv=function _glUniformMatrix4fv(location,count,transpose,value){if(GL.currentContext.version>=2){count&&GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*16);return}if(count<=18){var view=miniTempWebGLFloatBuffers[16*count];var heap=HEAPF32;value=value>>2;for(var i=0;i<16*count;i+=16){var dst=value+i;view[i]=heap[dst];view[i+1]=heap[dst+1];view[i+2]=heap[dst+2];view[i+3]=heap[dst+3];view[i+4]=heap[dst+4];view[i+5]=heap[dst+5];view[i+6]=heap[dst+6];view[i+7]=heap[dst+7];view[i+8]=heap[dst+8];view[i+9]=heap[dst+9];view[i+10]=heap[dst+10];view[i+11]=heap[dst+11];view[i+12]=heap[dst+12];view[i+13]=heap[dst+13];view[i+14]=heap[dst+14];view[i+15]=heap[dst+15]}}else{var view=HEAPF32.subarray(value>>2,value+count*64>>2)}GLctx.uniformMatrix4fv(webglGetUniformLocation(location),!!transpose,view)};var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;var _glUniformMatrix4x2fv=function _glUniformMatrix4x2fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x2fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*8)};var _emscripten_glUniformMatrix4x2fv=_glUniformMatrix4x2fv;var _glUniformMatrix4x3fv=function _glUniformMatrix4x3fv(location,count,transpose,value){count&&GLctx.uniformMatrix4x3fv(webglGetUniformLocation(location),!!transpose,HEAPF32,value>>2,count*12)};var _emscripten_glUniformMatrix4x3fv=_glUniformMatrix4x3fv;var _glUseProgram=function _glUseProgram(program){program=GL.programs[program];GLctx.useProgram(program);GLctx.currentProgram=program};var _emscripten_glUseProgram=_glUseProgram;var _glValidateProgram=function _glValidateProgram(program){GLctx.validateProgram(GL.programs[program])};var _emscripten_glValidateProgram=_glValidateProgram;var _glVertexAttrib1f=function _glVertexAttrib1f(x0,x1){return GLctx.vertexAttrib1f(x0,x1)};var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;var _glVertexAttrib1fv=function _glVertexAttrib1fv(index,v){GLctx.vertexAttrib1f(index,HEAPF32[v>>2])};var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;var _glVertexAttrib2f=function _glVertexAttrib2f(x0,x1,x2){return GLctx.vertexAttrib2f(x0,x1,x2)};var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;var _glVertexAttrib2fv=function _glVertexAttrib2fv(index,v){GLctx.vertexAttrib2f(index,HEAPF32[v>>2],HEAPF32[v+4>>2])};var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;var _glVertexAttrib3f=function _glVertexAttrib3f(x0,x1,x2,x3){return GLctx.vertexAttrib3f(x0,x1,x2,x3)};var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;var _glVertexAttrib3fv=function _glVertexAttrib3fv(index,v){GLctx.vertexAttrib3f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2])};var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;var _glVertexAttrib4f=function _glVertexAttrib4f(x0,x1,x2,x3,x4){return GLctx.vertexAttrib4f(x0,x1,x2,x3,x4)};var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;var _glVertexAttrib4fv=function _glVertexAttrib4fv(index,v){GLctx.vertexAttrib4f(index,HEAPF32[v>>2],HEAPF32[v+4>>2],HEAPF32[v+8>>2],HEAPF32[v+12>>2])};var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;var _glVertexAttribDivisor=function _glVertexAttribDivisor(index,divisor){GLctx.vertexAttribDivisor(index,divisor)};var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;var _glVertexAttribDivisorARB=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB;var _glVertexAttribDivisorEXT=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT;var _glVertexAttribDivisorNV=_glVertexAttribDivisor;var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV;var _glVertexAttribI4i=function _glVertexAttribI4i(x0,x1,x2,x3,x4){return GLctx.vertexAttribI4i(x0,x1,x2,x3,x4)};var _emscripten_glVertexAttribI4i=_glVertexAttribI4i;var _glVertexAttribI4iv=function _glVertexAttribI4iv(index,v){GLctx.vertexAttribI4i(index,HEAP32[v>>2],HEAP32[v+4>>2],HEAP32[v+8>>2],HEAP32[v+12>>2])};var _emscripten_glVertexAttribI4iv=_glVertexAttribI4iv;var _glVertexAttribI4ui=function _glVertexAttribI4ui(x0,x1,x2,x3,x4){return GLctx.vertexAttribI4ui(x0,x1,x2,x3,x4)};var _emscripten_glVertexAttribI4ui=_glVertexAttribI4ui;var _glVertexAttribI4uiv=function _glVertexAttribI4uiv(index,v){GLctx.vertexAttribI4ui(index,HEAPU32[v>>2],HEAPU32[v+4>>2],HEAPU32[v+8>>2],HEAPU32[v+12>>2])};var _emscripten_glVertexAttribI4uiv=_glVertexAttribI4uiv;var _glVertexAttribIPointer=function _glVertexAttribIPointer(index,size,type,stride,ptr){GLctx.vertexAttribIPointer(index,size,type,stride,ptr)};var _emscripten_glVertexAttribIPointer=_glVertexAttribIPointer;var _glVertexAttribPointer=function _glVertexAttribPointer(index,size,type,normalized,stride,ptr){GLctx.vertexAttribPointer(index,size,type,!!normalized,stride,ptr)};var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;var _glViewport=function _glViewport(x0,x1,x2,x3){return GLctx.viewport(x0,x1,x2,x3)};var _emscripten_glViewport=_glViewport;var _glWaitSync=function _glWaitSync(sync,flags,timeout_low,timeout_high){var timeout=convertI32PairToI53(timeout_low,timeout_high);GLctx.waitSync(GL.syncs[sync],flags,timeout)};var _emscripten_glWaitSync=_glWaitSync;var _emscripten_pause_main_loop=function _emscripten_pause_main_loop(){Browser.mainLoop.pause()};var growMemory=function growMemory(size){var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize>>>=0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var _emscripten_set_main_loop_arg=function _emscripten_set_main_loop_arg(func,arg,fps,simulateInfiniteLoop){var browserIterationFunc=function browserIterationFunc(){return getWasmTableEntry(func)(arg)};setMainLoop(browserIterationFunc,fps,simulateInfiniteLoop,arg)};var webgl_enable_ANGLE_instanced_arrays=function webgl_enable_ANGLE_instanced_arrays(ctx){var ext=ctx.getExtension("ANGLE_instanced_arrays");if(ext){ctx["vertexAttribDivisor"]=function(index,divisor){return ext["vertexAttribDivisorANGLE"](index,divisor)};ctx["drawArraysInstanced"]=function(mode,first,count,primcount){return ext["drawArraysInstancedANGLE"](mode,first,count,primcount)};ctx["drawElementsInstanced"]=function(mode,count,type,indices,primcount){return ext["drawElementsInstancedANGLE"](mode,count,type,indices,primcount)};return 1}};var webgl_enable_OES_vertex_array_object=function webgl_enable_OES_vertex_array_object(ctx){var ext=ctx.getExtension("OES_vertex_array_object");if(ext){ctx["createVertexArray"]=function(){return ext["createVertexArrayOES"]()};ctx["deleteVertexArray"]=function(vao){return ext["deleteVertexArrayOES"](vao)};ctx["bindVertexArray"]=function(vao){return ext["bindVertexArrayOES"](vao)};ctx["isVertexArray"]=function(vao){return ext["isVertexArrayOES"](vao)};return 1}};var webgl_enable_WEBGL_draw_buffers=function webgl_enable_WEBGL_draw_buffers(ctx){var ext=ctx.getExtension("WEBGL_draw_buffers");if(ext){ctx["drawBuffers"]=function(n,bufs){return ext["drawBuffersWEBGL"](n,bufs)};return 1}};var webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance=function webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.dibvbi=ctx.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))};var webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance=function webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(ctx){return!!(ctx.mdibvbi=ctx.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))};var webgl_enable_WEBGL_multi_draw=function webgl_enable_WEBGL_multi_draw(ctx){return!!(ctx.multiDrawWebgl=ctx.getExtension("WEBGL_multi_draw"))};var _emscripten_webgl_enable_extension=function _emscripten_webgl_enable_extension(contextHandle,extension){var context=GL.getContext(contextHandle);var extString=UTF8ToString(extension);if(extString.startsWith("GL_"))extString=extString.substr(3);if(extString=="ANGLE_instanced_arrays")webgl_enable_ANGLE_instanced_arrays(GLctx);if(extString=="OES_vertex_array_object")webgl_enable_OES_vertex_array_object(GLctx);if(extString=="WEBGL_draw_buffers")webgl_enable_WEBGL_draw_buffers(GLctx);if(extString=="WEBGL_draw_instanced_base_vertex_base_instance")webgl_enable_WEBGL_draw_instanced_base_vertex_base_instance(GLctx);if(extString=="WEBGL_multi_draw_instanced_base_vertex_base_instance")webgl_enable_WEBGL_multi_draw_instanced_base_vertex_base_instance(GLctx);if(extString=="WEBGL_multi_draw")webgl_enable_WEBGL_multi_draw(GLctx);var ext=context.GLctx.getExtension(extString);return!!ext};var _emscripten_webgl_do_get_current_context=function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0};var _emscripten_webgl_get_current_context=_emscripten_webgl_do_get_current_context;var ENV={};var getExecutableName=function getExecutableName(){return thisProgram||"./this.program"};var getEnvStrings=function getEnvStrings(){if(!getEnvStrings.strings){var lang=((typeof navigator==="undefined"?"undefined":_typeof(navigator))=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push("".concat(x,"=").concat(env[x]))}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=function stringToAscii(str,buffer){for(var i=0;i>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(function(string){return bufSize+=string.length+1});HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var _getaddrinfo=function _getaddrinfo(node,service,hint,out){var addr=0;var port=0;var flags=0;var family=0;var type=0;var proto=0;var ai;function allocaddrinfo(family,type,proto,canon,addr,port){var sa,salen,ai;var errno;salen=family===10?28:16;addr=family===10?inetNtop6(addr):inetNtop4(addr);sa=_malloc(salen);errno=writeSockaddr(sa,family,addr,port);assert(!errno);ai=_malloc(32);HEAP32[ai+4>>2]=family;HEAP32[ai+8>>2]=type;HEAP32[ai+12>>2]=proto;HEAPU32[ai+24>>2]=canon;HEAPU32[ai+20>>2]=sa;if(family===10){HEAP32[ai+16>>2]=28}else{HEAP32[ai+16>>2]=16}HEAP32[ai+28>>2]=0;return ai}if(hint){flags=HEAP32[hint>>2];family=HEAP32[hint+4>>2];type=HEAP32[hint+8>>2];proto=HEAP32[hint+12>>2]}if(type&&!proto){proto=type===2?17:6}if(!type&&proto){type=proto===17?2:1}if(proto===0){proto=6}if(type===0){type=1}if(!node&&!service){return-2}if(flags&~(1|2|4|1024|8|16|32)){return-1}if(hint!==0&&HEAP32[hint>>2]&2&&!node){return-1}if(flags&32){return-2}if(type!==0&&type!==1&&type!==2){return-7}if(family!==0&&family!==2&&family!==10){return-6}if(service){service=UTF8ToString(service);port=parseInt(service,10);if(isNaN(port)){if(flags&1024){return-2}return-8}}if(!node){if(family===0){family=2}if((flags&1)===0){if(family===2){addr=_htonl2(2130706433)}else{addr=[0,0,0,1]}}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0}node=UTF8ToString(node);addr=inetPton4(node);if(addr!==null){if(family===0||family===2){family=2}else if(family===10&&flags&8){addr=[0,0,_htonl2(65535),addr];family=10}else{return-2}}else{addr=inetPton6(node);if(addr!==null){if(family===0||family===10){family=10}else{return-2}}}if(addr!=null){ai=allocaddrinfo(family,type,proto,node,addr,port);HEAPU32[out>>2]=ai;return 0}if(flags&4){return-2}node=DNS.lookup_name(node);addr=inetPton4(node);if(family===0){family=2}else if(family===10){addr=[0,0,_htonl2(65535),addr]}ai=allocaddrinfo(family,type,proto,null,addr,port);HEAPU32[out>>2]=ai;return 0};var _getnameinfo=function _getnameinfo(sa,salen,node,nodelen,serv,servlen,flags){var info=readSockaddr(sa,salen);if(info.errno){return-6}var port=info.port;var addr=info.addr;var overflowed=false;if(node&&nodelen){var lookup;if(flags&1||!(lookup=DNS.lookup_addr(addr))){if(flags&8){return-2}}else{addr=lookup}var numBytesWrittenExclNull=stringToUTF8(addr,node,nodelen);if(numBytesWrittenExclNull+1>=nodelen){overflowed=true}}if(serv&&servlen){port=""+port;var numBytesWrittenExclNull=stringToUTF8(port,serv,servlen);if(numBytesWrittenExclNull+1>=servlen){overflowed=true}}if(overflowed){return-12}return 0};var GLFW={keyFunc:null,charFunc:null,markedTextFunc:null,gamepadFunc:null,mouseButtonFunc:null,mousePosFunc:null,mouseWheelFunc:null,resizeFunc:null,closeFunc:null,refreshFunc:null,focusFunc:null,iconifyFunc:null,touchFunc:null,params:null,initTime:null,wheelPos:0,buttons:0,keys:0,initWindowWidth:640,initWindowHeight:480,windowX:0,windowY:0,windowWidth:0,windowHeight:0,prevWidth:0,prevHeight:0,prevNonFSWidth:0,prevNonFSHeight:0,isFullscreen:false,isPointerLocked:false,dpi:1,mouseTouchId:null,DOMToGLFWKeyCode:function DOMToGLFWKeyCode(keycode,code){switch(keycode){case 8:return 295;case 9:return 293;case 13:return 294;case 27:return 257;case 106:return 313;case 107:return 315;case 109:return 314;case 110:return 316;case 111:return 312;case 112:return 258;case 113:return 259;case 114:return 260;case 115:return 261;case 116:return 262;case 117:return 263;case 118:return 264;case 119:return 265;case 120:return 266;case 121:return 267;case 122:return 268;case 123:return 269;case 37:return 285;case 38:return 283;case 39:return 286;case 40:return 284;case 33:return 298;case 34:return 299;case 36:return 300;case 35:return 301;case 45:return 296;case 16:return 287;case 5:return 287;case 6:return 288;case 17:return 289;case 3:return 289;case 4:return 290;case 18:return 291;case 2:return 291;case 1:return 292;case 96:return 302;case 97:return 303;case 98:return 304;case 99:return 305;case 100:return 306;case 101:return 307;case 102:return 308;case 103:return 309;case 104:return 310;case 105:return 311}switch(code){case"Minus":return 45;case"Period":return 46;case"Comma":return 44;case"Slash":return 47;case"Backslash":return 92;case"IntlRo":return 92;case"IntlYen":return 92;case"IntlBackslash":return 92;case"Backquote":return 96;case"BracketLeft":return 91;case"BracketRight":return 93;case"Equal":return 61;case"Quote":return 39;case"Semicolon":return 59;case"NumpadComma":return 316}return keycode},DOMtoGLFWButton:function DOMtoGLFWButton(button){if(button==1){button=2}else if(button==2){button=1}return button},getUnicodeChar:function getUnicodeChar(value){var output="";if(value>65535){value-=65536;output+=String.fromCharCode(value>>>10&1023|55296);value=56320|value&1023}output+=String.fromCharCode(value);return output},addEventListener:function addEventListener(type,listener,useCapture){if(typeof window!=="undefined"){window.addEventListener(type,listener,useCapture)}},removeEventListener:function removeEventListener(type,listener,useCapture){if(typeof window!=="undefined"){window.removeEventListener(type,listener,useCapture)}},addEventListenerCanvas:function addEventListenerCanvas(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].addEventListener(type,listener,useCapture)}},removeEventListenerCanvas:function removeEventListenerCanvas(type,listener,useCapture){if(typeof Module["canvas"]!=="undefined"){Module["canvas"].removeEventListener(type,listener,useCapture)}},isCanvasActive:function isCanvasActive(event){var res=typeof document.activeElement=="undefined"||document.activeElement==Module["canvas"];if(!res){res=event.target==Module["canvas"]}if(event.target.focus)event.target.focus();return res},onKeyPress:function onKeyPress(event){if(!GLFW.isCanvasActive(event)){return}if(event.charCode){var char=GLFW.getUnicodeChar(event.charCode);if(char!==null&&GLFW.charFunc){getWasmTableEntry(GLFW.charFunc)(event.charCode,1)}}},onKeyChanged:function onKeyChanged(event,status){if(!GLFW.isCanvasActive(event)){return}var key=GLFW.DOMToGLFWKeyCode(event.keyCode,event.code);if(key){GLFW.keys[key]=status;if(GLFW.keyFunc){getWasmTableEntry(GLFW.keyFunc)(key,status)}}},onKeydown:function onKeydown(event){if(!GLFW.isCanvasActive(event)){return}switch(event.keyCode){case 37:case 38:case 39:case 40:case 32:event.preventDefault();event.stopPropagation();default:break}GLFW.onKeyChanged(event,1);if(event.keyCode===32){if(GLFW.charFunc){getWasmTableEntry(GLFW.charFunc)(32,1);event.preventDefault()}}else if(event.keyCode===8||event.keyCode===9||event.keyCode===13){event.preventDefault()}},onKeyup:function onKeyup(event){if(!GLFW.isCanvasActive(event)){return}GLFW.onKeyChanged(event,0)},onMousemove:function onMousemove(event){var lastX=Browser.mouseX;var lastY=Browser.mouseY;Browser.calculateMouseEvent(event);var newX=Browser.mouseX;var newY=Browser.mouseY;if(event.target==Module["canvas"]&&GLFW.mousePosFunc){event.preventDefault();getWasmTableEntry(GLFW.mousePosFunc)(lastX,lastY)}},onMouseButtonChanged:function onMouseButtonChanged(event,status){if(!GLFW.isCanvasActive(event)){return}if(GLFW.mouseButtonFunc==null){return}Browser.calculateMouseEvent(event);if(event.target!=Module["canvas"]){return}if(status==1){try{event.target.setCapture()}catch(e){}}event.preventDefault();var eventButton=GLFW.DOMtoGLFWButton(event["button"]);getWasmTableEntry(GLFW.mouseButtonFunc)(eventButton,status)},fillTouch:function fillTouch(id,x,y,phase){if(GLFW.touchFunc){getWasmTableEntry(GLFW.touchFunc)(id,x,y,phase)}},touchWasFinished:function touchWasFinished(event,phase){if(!GLFW.isCanvasActive(event)){return}for(var i=0;i0}function _glfwGetMouseLocked(){return GLFW.isPointerLocked?1:0}function _glfwGetMousePos(xpos,ypos){setValue(xpos,Browser.mouseX,"i32");setValue(ypos,Browser.mouseY,"i32")}function _glfwGetMouseWheel(){return GLFW.wheelPos}function _glfwGetWindowParam(param){return GLFW.params[param]}function _glfwGetWindowRefreshRate(){return 0}function _glfwGetWindowSize(width,height){setValue(width,Module["canvas"].width,"i32");setValue(height,Module["canvas"].height,"i32")}function _glfwIconifyWindow(){}function _glfwInitJS(){GLFW.initTime=Date.now()/1e3;GLFW.addEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.addEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.addEventListener("keydown",GLFW.onKeydown,true);GLFW.addEventListener("keypress",GLFW.onKeyPress,true);GLFW.addEventListener("keyup",GLFW.onKeyup,true);GLFW.addEventListener("mousemove",GLFW.onMousemove,true);GLFW.addEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.addEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.addEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.addEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.addEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.addEventListenerCanvas("touchcancel",GLFW.onTouchCancel,true);GLFW.addEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.addEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.addEventListenerCanvas("blur",GLFW.onBlur,true);__ATEXIT__.push({func:function func(){GLFW.removeEventListener("gamepadconnected",GLFW.onJoystickConnected,true);GLFW.removeEventListener("gamepaddisconnected",GLFW.onJoystickDisconnected,true);GLFW.removeEventListener("keydown",GLFW.onKeydown,true);GLFW.removeEventListener("keypress",GLFW.onKeyPress,true);GLFW.removeEventListener("keyup",GLFW.onKeyup,true);GLFW.removeEventListener("mousemove",GLFW.onMousemove,true);GLFW.removeEventListener("mousedown",GLFW.onMouseButtonDown,true);GLFW.removeEventListener("mouseup",GLFW.onMouseButtonUp,true);GLFW.removeEventListener("DOMMouseScroll",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListener("mousewheel",GLFW.onMouseWheel,{capture:true,passive:false});GLFW.removeEventListenerCanvas("touchstart",GLFW.onTouchStart,true);GLFW.removeEventListenerCanvas("touchend",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchcancel",GLFW.onTouchEnd,true);GLFW.removeEventListenerCanvas("touchmove",GLFW.onTouchMove,true);GLFW.removeEventListenerCanvas("focus",GLFW.onFocus,true);GLFW.removeEventListenerCanvas("blur",GLFW.onBlur,true);var canvas=Module["canvas"];if(typeof canvas!=="undefined"){Module["canvas"].width=Module["canvas"].height=1}}});GLFW.params=new Array;GLFW.params[196609]=true;GLFW.params[196610]=false;GLFW.params[196611]=true;GLFW.params[196612]=false;GLFW.params[196613]=false;GLFW.params[196614]=true;GLFW.params[131073]=true;GLFW.params[131074]=true;GLFW.params[131075]=false;GLFW.params[131076]=true;GLFW.params[131077]=0;GLFW.params[131078]=0;GLFW.params[131079]=0;GLFW.params[131080]=0;GLFW.params[131081]=0;GLFW.params[131082]=0;GLFW.params[131083]=0;GLFW.params[131084]=0;GLFW.params[131085]=0;GLFW.params[131086]=0;GLFW.params[131087]=0;GLFW.params[131088]=0;GLFW.params[131089]=0;GLFW.params[131090]=0;GLFW.params[131091]=0;GLFW.params[131092]=0;GLFW.params[131093]=0;GLFW.params[131094]=0;GLFW.params[131095]=0;GLFW.params[131096]=0;GLFW.params[327681]=0;GLFW.params[327682]=1;GLFW.params[327683]=2;GLFW.params[131097]=0;GLFW.dpi=1;GLFW.keys=new Array;GLFW.GLFW_PHASE_BEGAN=0;GLFW.GLFW_PHASE_MOVED=1;GLFW.GLFW_PHASE_ENDED=3;GLFW.GLFW_PHASE_CANCELLED=4;return 1}function _glfwOpenWindow(width,height,redbits,greenbits,bluebits,alphabits,depthbits,stencilbits,mode){if(width==0&&height>0){width=4*height/3}if(width>0&&height==0){height=3*width/4}GLFW.params[131077]=redbits;GLFW.params[131078]=greenbits;GLFW.params[131079]=bluebits;GLFW.params[131080]=alphabits;GLFW.params[131081]=depthbits;GLFW.params[131082]=stencilbits;if(mode==65537){GLFW.initWindowWidth=width;GLFW.initWindowHeight=height;GLFW.params[196611]=true}else if(mode==65538){GLFW.requestFullScreen();GLFW.params[196611]=false}else{throw"Invalid glfwOpenWindow mode."}var useWebGL=GLFW.params[131098]>0;if(useWebGL){var contextAttributes={antialias:GLFW.params[131091]>1,depth:GLFW.params[131081]>0,stencil:GLFW.params[131082]>0,alpha:GLFW.params[131080]>0};var iOSVersion=false;try{iOSVersion=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||false}catch(e){}if(iOSVersion&&iOSVersion<15.2){contextAttributes.majorVersion=1}Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes);if(Module.ctx==null){contextAttributes.majorVersion=1;Module.ctx=Browser.createContext(Module["canvas"],true,true,contextAttributes)}}return 1}function _glfwOpenWindowHint(target,hint){GLFW.params[target]=hint;if(target==131097){if(hint!=0){GLFW.dpi=window.devicePixelRatio||1}}}function _glfwPollEvents(){}function _glfwResetKeyboard(){}function _glfwSetCharCallback(cbfun){GLFW.charFunc=cbfun;return 1}function _glfwSetDeviceChangedCallback(cbfun){return 1}function _glfwSetGamepadCallback(cbfun){GLFW.gamepadFunc=cbfun;try{GLFW.refreshJoysticks();return 1}catch(e){GLFW.gamepadFunc=null;return 0}}function _glfwSetMarkedTextCallback(cbfun){GLFW.markedTextFunc=cbfun;return 1}function _glfwSetTouchCallback(cbfun){GLFW.touchFunc=cbfun;return 1}function _glfwSetWindowBackgroundColor(color){}function _glfwSetWindowCloseCallback(cbfun){GLFW.closeFunc=cbfun}function _glfwSetWindowFocusCallback(cbfun){GLFW.focusFunc=cbfun}function _glfwSetWindowIconifyCallback(cbfun){GLFW.iconifyFunc=cbfun}function _glfwSetWindowSize(width,height){Browser.setCanvasSize(width,height);if(GLFW.resizeFunc){getWasmTableEntry(GLFW.resizeFunc)(width,height)}}function _glfwSetWindowSizeCallback(cbfun){GLFW.resizeFunc=cbfun}function _glfwShowKeyboard(show_keyboard){Module["canvas"].contentEditable=show_keyboard?true:false;if(show_keyboard){Module["canvas"].focus()}}function _glfwSwapBuffers(){var width=Module["canvas"].width;var height=Module["canvas"].height;if(GLFW.prevWidth!=width||GLFW.prevHeight!=height){if(GLFW.isFullscreen){width=Math.floor(window.innerWidth*GLFW.dpi);height=Math.floor(window.innerHeight*GLFW.dpi)}GLFW.prevWidth=width;GLFW.prevHeight=height;_glfwSetWindowSize(width,height)}}function _glfwSwapInterval(interval){}function _glfwTerminate(){}var dmRenderer={renderContext:null,renderCallback:null,CONTEXT_LOST_EVENT:0,CONTEXT_RESTORED_EVENT:1,rendererContextEvent:function rendererContextEvent(event_type){if(dmRenderer.renderCallback){getWasmTableEntry(dmRenderer.renderCallback)(dmRenderer.renderContext,event_type)}}};function _setupCallbackJS(context,callback){dmRenderer.renderContext=context;dmRenderer.renderCallback=callback}var stackAlloc=function stackAlloc(sz){return _emscripten_stack_alloc(sz)};var stringToUTF8OnStack=function stringToUTF8OnStack(str){var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var getCFunc=function getCFunc(ident){var func=Module["_"+ident];return func};var writeArrayToMemory=function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)};var ccall=function ccall(ident,returnType,argTypes,args,opts){var toC={string:function string(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},array:function array(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:[];var entryFunction=_main;args.unshift(thisProgram);var argc=args.length;var argv=stackAlloc((argc+1)*4);var argv_ptr=argv;args.forEach(function(arg){HEAPU32[argv_ptr>>2]=stringToUTF8OnStack(arg);argv_ptr+=4});HEAPU32[argv_ptr>>2]=0;try{var ret=entryFunction(argc,argv);exitJS(ret,true);return ret}catch(e){return handleException(e)}}function run(){var args=arguments.length>0&&arguments[0]!==undefined?arguments[0]:arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){var _Module$onRuntimeInit;if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();preMain();(_Module$onRuntimeInit=Module["onRuntimeInitialized"])===null||_Module$onRuntimeInit===void 0||_Module$onRuntimeInit.call(Module);if(shouldRunNow)callMain(args);postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}var shouldRunNow=true;if(Module["noInitialRun"])shouldRunNow=false;run(); diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/archive_files.json b/build/default_html5/__htmlLaunchDir/My Project/archive/archive_files.json new file mode 100644 index 0000000..f494e34 --- /dev/null +++ b/build/default_html5/__htmlLaunchDir/My Project/archive/archive_files.json @@ -0,0 +1 @@ +{"content":[{"name":"game.projectc","size":4150,"pieces":[{"name":"game0.projectc","offset":0}]},{"name":"game.arci","size":11328,"pieces":[{"name":"game0.arci","offset":0}]},{"name":"game.arcd","size":907971,"pieces":[{"name":"game0.arcd","offset":0}]},{"name":"game.dmanifest","size":11511,"pieces":[{"name":"game0.dmanifest","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game0.public.der","offset":0}]}],"total_size":935122} \ No newline at end of file diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arcd b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arcd new file mode 100644 index 0000000..a63dca9 Binary files /dev/null and b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arcd differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arci b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arci new file mode 100644 index 0000000..b0e32c7 Binary files /dev/null and b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.arci differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/game0.dmanifest b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.dmanifest new file mode 100644 index 0000000..48bb977 Binary files /dev/null and b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.dmanifest differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/game0.projectc b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.projectc new file mode 100644 index 0000000..2a81754 --- /dev/null +++ b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.projectc @@ -0,0 +1,213 @@ +[project] +title = My Project +version = 1.0 +write_log = 0 +minimum_log_level = 1 +compress_archive = 1 +publisher = unnamed +developer = unnamed +title_as_file_name = MyProject + +[display] +width = 1054 +height = 694 +high_dpi = 1 +samples = 0 +fullscreen = 0 +update_frequency = 0 +swap_interval = 1 +vsync = 1 +display_profiles = /builtins/render/default.display_profilesc +dynamic_orientation = 0 +display_device_info = 0 + +[render] +clear_color_red = 0 +clear_color_green = 0 +clear_color_blue = 0 +clear_color_alpha = 1 + +[physics] +type = 2D +max_collision_object_count = 128 +use_fixed_timestep = 0 +gravity_y = -900.0 +debug = 0 +debug_alpha = 0.9 +world_count = 4 +gravity_x = 0 +gravity_z = 0 +scale = 1 +allow_dynamic_transforms = 1 +debug_scale = 30 +max_collisions = 64 +max_contacts = 128 +contact_impulse_limit = 0 +ray_cast_limit_2d = 64 +ray_cast_limit_3d = 128 +trigger_overlap_capacity = 16 +velocity_threshold = 1 +max_fixed_timesteps = 2 + +[bootstrap] +main_collection = /main/main.collectionc +render = /builtins/render/default.renderc + +[graphics] +default_texture_min_filter = linear +default_texture_mag_filter = linear +max_draw_calls = 1024 +max_characters = 8192 +max_font_batches = 128 +max_debug_vertices = 10000 +texture_profiles = /builtins/graphics/default.texture_profiles +verify_graphics_calls = 1 +opengl_version_hint = 33 +opengl_core_profile_hint = true +memory_size = 512 + +[shader] +output_spirv = 0 + +[sound] +gain = 1 +max_sound_data = 128 +max_sound_buffers = 32 +max_sound_sources = 16 +max_sound_instances = 256 +max_component_count = 32 +use_thread = 1 + +[resource] +http_cache = 0 +max_resources = 1024 + +[input] +repeat_delay = 0.5 +repeat_interval = 0.2 +gamepads = /builtins/input/default.gamepadsc +game_binding = /input/game.input_bindingc +use_accelerometer = 1 + +[sprite] +max_count = 128 +subpixels = 1 + +[model] +max_count = 128 +split_meshes = 0 + +[mesh] +max_count = 128 + +[gui] +max_count = 64 +max_particlefx_count = 64 +max_particle_count = 1024 +max_animation_count = 1024 + +[collection] +max_instances = 1024 +max_input_stack_entries = 16 + +[collection_proxy] +max_count = 8 + +[collectionfactory] +max_count = 128 + +[factory] +max_count = 128 + +[ios] +launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc +pre_renderered_icons = 0 +bundle_identifier = example.unnamed +bundle_name = +infoplist = /builtins/manifests/ios/Info.plist +privacymanifest = /builtins/manifests/ios/PrivacyInfo.xcprivacy +default_language = en +localizations = en + +[android] +version_code = 1 +minimum_sdk_version = 19 +target_sdk_version = 35 +package = com.example.todo +gcm_sender_id = +manifest = /builtins/manifests/android/AndroidManifest.xml +iap_provider = GooglePlay +input_method = HiddenInputField +immersive_mode = 0 +display_cutout = 1 +debuggable = 0 +proguard = +extract_native_libs = 1 + +[osx] +app_icon = +infoplist = /builtins/manifests/osx/Info.plist +privacymanifest = /builtins/manifests/osx/PrivacyInfo.xcprivacy +bundle_identifier = example.unnamed +bundle_name = +bundle_version = 1 +default_language = en +localizations = en + +[windows] +app_icon = + +[html5] +custom_heap_size = 0 +heap_size = 256 +htmlfile = /builtins/manifests/web/engine_template.html +cssfile = /builtins/manifests/web/light_theme.css +archive_location_prefix = archive +archive_location_suffix = +engine_arguments = --verify-graphics-calls=false +wasm_streaming = 0 +show_fullscreen_button = 1 +show_made_with_defold = 1 +show_console_banner = 1 +scale_mode = fit +transparent_graphics_context = 0 + +[particle_fx] +max_count = 64 +max_emitter_count = 64 +max_particle_count = 1024 + +[network] +http_timeout = 0 +ssl_certificates = +http_thread_count = 4 +http_cache_enabled = 1 + +[library] +include_dirs = + +[script] +shared_state = 1 + +[label] +max_count = 64 +subpixels = 1 + +[profiler] +track_cpu = 0 +sleep_between_server_updates = 0 + +[liveupdate] +settings = /liveupdate.settings +enabled = 1 +mount_on_start = 1 + +[tilemap] +max_count = 16 +max_tile_count = 2048 + +[engine] +run_while_iconified = 0 +fixed_update_frequency = 60 +max_time_step = 0.5 + diff --git a/build/default_html5/__htmlLaunchDir/My Project/archive/game0.public.der b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.public.der new file mode 100644 index 0000000..a372ee0 Binary files /dev/null and b/build/default_html5/__htmlLaunchDir/My Project/archive/game0.public.der differ diff --git a/build/default_html5/__htmlLaunchDir/My Project/dmloader.js b/build/default_html5/__htmlLaunchDir/My Project/dmloader.js new file mode 100644 index 0000000..570fbef --- /dev/null +++ b/build/default_html5/__htmlLaunchDir/My Project/dmloader.js @@ -0,0 +1,1186 @@ +/* +* 'archive_location_filter': +* Filter function that will run for each archive path. +* +* 'unsupported_webgl_callback': +* Function that is called if WebGL is not supported. +* +* 'engine_arguments': +* List of arguments (strings) that will be passed to the engine. +* +* 'custom_heap_size': +* Number of bytes specifying the memory heap size. +* +* 'disable_context_menu': +* Disables the right-click context menu on the canvas element if true. +* +* 'retry_time': +* Pause before retry file loading after error. +* +* 'retry_count': +* How many attempts we do when trying to download a file. +* +* 'can_not_download_file_callback': +* Function that is called if you can't download file after 'retry_count' attempts. +* +* 'exe_name': +* Executable name which used for find right binary to load +* +* 'resize_window_callback': +* Function that is called when resize/orientationchanges/focus events happened +*/ +var CUSTOM_PARAMETERS = { + archive_location_filter: function( path ) { + return ("archive" + path + ""); + }, + engine_arguments: ["--verify-graphics-calls=false","--verify-graphics-calls=false",], + custom_heap_size: 268435456, + full_screen_container: "#canvas-container", + disable_context_menu: true, + retry_time:1.0, + retry_count:10, + unsupported_webgl_callback: function() { + var e = document.getElementById("webgl-not-supported"); + e.style.display = "block"; + }, + resize_window_callback: function() { + var is_iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; + var buttonHeight = 0; + var prevInnerWidth = -1; + var prevInnerHeight = -1; + + buttonHeight = 42; + + + buttonHeight = 42; + + // Hack for iOS when exit from Fullscreen mode + if (is_iOS) { + window.scrollTo(0, 0); + } + + var app_container = document.getElementById('app-container'); + var game_canvas = document.getElementById('canvas'); + var innerWidth = window.innerWidth; + var innerHeight = window.innerHeight - buttonHeight; + if (prevInnerWidth == innerWidth && prevInnerHeight == innerHeight) + { + return; + } + prevInnerWidth = innerWidth; + prevInnerHeight = innerHeight; + var width = 1054; + var height = 694; + var targetRatio = width / height; + var actualRatio = innerWidth / innerHeight; + + + + //Fit + if (actualRatio > targetRatio) { + width = innerHeight * targetRatio; + height = innerHeight; + app_container.style.marginLeft = ((innerWidth - width) / 2) + "px"; + app_container.style.marginTop = "0px"; + } + else { + width = innerWidth; + height = innerWidth / targetRatio; + app_container.style.marginLeft = "0px"; + app_container.style.marginTop = ((innerHeight - height) / 2) + "px"; + } + + + var dpi = 1; + + dpi = window.devicePixelRatio || 1; + + app_container.style.width = width + "px"; + app_container.style.height = height + buttonHeight + "px"; + game_canvas.width = Math.floor(width * dpi); + game_canvas.height = Math.floor(height * dpi); + } +}; + +// file downloader +// wraps XMLHttpRequest and adds retry support and progress updates when the +// content is gzipped (gzipped content doesn't report a computable content length +// on Google Chrome) +var FileLoader = { + options: { + retryCount: 4, + retryInterval: 1000, + }, + // do xhr request with retries + request: function(url, method, responseType, currentAttempt) { + if (typeof method === 'undefined') throw TypeError("No method specified"); + if (typeof method === 'responseType') throw TypeError("No responseType specified"); + if (typeof currentAttempt === 'undefined') currentAttempt = 0; + var obj = { + send: function() { + var onprogress = this.onprogress; + var onload = this.onload; + var onerror = this.onerror; + var onretry = this.onretry; + + var xhr = new XMLHttpRequest(); + xhr._loadedSize = 0; + xhr.open(method, url, true); + xhr.responseType = responseType; + xhr.onprogress = function(event) { + if (onprogress) onprogress(xhr, event, xhr._loadedSize); + xhr._loadedSize = event.loaded; + }; + xhr.onerror = function(event) { + if (currentAttempt == FileLoader.options.retryCount) { + if (onerror) onerror(xhr, event); + return; + } + if (onretry) onretry(xhr, event, xhr._loadedSize, currentAttempt); + xhr._loadedSize = 0; + currentAttempt += 1; + setTimeout(obj.send.bind(obj), FileLoader.options.retryInterval); + }; + xhr.onload = function(event) { + if (onload) onload(xhr, event); + }; + xhr.send(null); + } + }; + return obj; + }, + // Do HTTP HEAD request to get size of resource + // callback will receive size or undefined in case of an error + size: function(url, callback) { + var request = FileLoader.request(url, "HEAD", "text"); + request.onerror = function(xhr, e) { + callback(undefined); + }; + request.onload = function(xhr, e) { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + var total = xhr.getResponseHeader('content-length'); + callback(total); + } else { + callback(undefined); + } + } + }; + request.send(); + }, + // Do HTTP GET request + // onprogress(loadedDelta) + // onerror(error) + // onload(response) + // onretry(loadedSize, currentAttempt) + load: function(url, responseType, onprogress, onerror, onload, onretry) { + var request = FileLoader.request(url, "GET", responseType); + request.onprogress = function(xhr, e, ls) { + var delta = e.loaded - ls; + onprogress(delta); + }; + request.onerror = function(xhr, e) { + onerror("Error loading '" + url + "' (" + e + ")"); + }; + request.onload = function(xhr, e) { + if (xhr.readyState === XMLHttpRequest.DONE) { + if (xhr.status === 200) { + var res = xhr.response; + if (responseType == "json" && typeof res === "string") { + onload(JSON.parse(res)); + } else { + onload(res); + } + } else { + onerror("Error loading '" + url + "' (" + e + ")"); + } + } + }; + request.onretry = function(xhr, event, loadedSize, currentAttempt) { + onretry(loadedSize, currentAttempt); + }; + request.send(); + } +}; + + +var EngineLoader = { + + + wasm_size: 2910089, + + wasmjs_size: 264118, + + asmjs_size: 4000000, + wasm_instantiate_progress: 0, + + stream_wasm: "false" === "true", + + updateWasmInstantiateProgress: function(totalDownloadedSize) { + EngineLoader.wasm_instantiate_progress = totalDownloadedSize * 0.1; + }, + + // load and instantiate .wasm file using XMLHttpRequest + loadAndInstantiateWasmAsync: function(src, imports, successCallback) { + FileLoader.load(src, "arraybuffer", + function(delta) { + ProgressUpdater.updateCurrent(delta); + }, + function(error) { throw error; }, + async function(wasm) { + if (wasm.byteLength != EngineLoader.wasm_size) { + console.warn("Unexpected wasm size: " + wasm.byteLength + ", expected: " + EngineLoader.wasm_size); + } + if (EngineLoader.wasm_sha1) { + const digest = await window.crypto.subtle.digest("SHA-1", wasm); + const sha1 = Array.from(new Uint8Array(digest)).map(b => b.toString(16).padStart(2, '0')).join(''); + if (sha1 != EngineLoader.wasm_sha1) { + console.warn("Unexpected wasm sha1: " + sha1 + ", expected: " + EngineLoader.wasm_sha1); + } + } + var wasmInstantiate = WebAssembly.instantiate(new Uint8Array(wasm), imports).then(function(output) { + successCallback(output.instance); + }).catch(function(e) { + console.log('wasm instantiation failed! ' + e); + throw e; + }); + }, + function(loadedDelta, currentAttempt){ + ProgressUpdater.updateCurrent(-loadedDelta); + }); + }, + + // stream and instantiate .wasm file + streamAndInstantiateWasmAsync: async function(src, imports, successCallback) { + // https://stackoverflow.com/a/69179454 + var fetchFn = fetch; + if (typeof TransformStream === "function" && ReadableStream.prototype.pipeThrough) { + async function fetchWithProgress(path) { + const response = await fetch(path); + if (response.ok) { + const ts = new TransformStream({ + transform (chunk, controller) { + ProgressUpdater.updateCurrent(chunk.byteLength); + controller.enqueue(chunk); + } + }); + + return new Response(response.body.pipeThrough(ts), response); + } else { + return new Response(null, response); + } + } + fetchFn = fetchWithProgress; + } + + WebAssembly.instantiateStreaming(fetchFn(src), imports).then(function(output) { + ProgressUpdater.updateCurrent(EngineLoader.wasm_instantiate_progress); + successCallback(output.instance); + }).catch(function(e) { + console.log('wasm streaming instantiation failed! ' + e); + console.log('Fallback to wasm loading'); + EngineLoader.loadAndInstantiateWasmAsync(src, imports, successCallback); + }); + }, + + // instantiate the .wasm file either by streaming it or first loading and then instantiate it + // https://github.com/emscripten-core/emscripten/blob/main/test/manual_wasm_instantiate.html + loadWasmAsync: function(exeName) { + Module.instantiateWasm = function(imports, successCallback) { + if (EngineLoader.stream_wasm && (typeof WebAssembly.instantiateStreaming === "function")) { + EngineLoader.streamAndInstantiateWasmAsync(exeName + ".wasm", imports, successCallback); + } + else { + EngineLoader.loadAndInstantiateWasmAsync(exeName + ".wasm", imports, successCallback); + } + return {}; // Compiling asynchronously, no exports. + }; + EngineLoader.loadAndRunScriptAsync(exeName + '_wasm.js', EngineLoader.wasmjs_size, EngineLoader.wasmjs_sha1); + }, + + loadAsmJsAsync: function(exeName) { + EngineLoader.loadAndRunScriptAsync(exeName + '_asmjs.js', EngineLoader.asmjs_size, EngineLoader.asmjs_sha1); + }, + + // load and start engine script (asm.js or wasm.js) + loadAndRunScriptAsync: function(src, expectedLength, expectedSHA1) { + FileLoader.load(src, "text", + function(delta) { + ProgressUpdater.updateCurrent(delta); + }, + function(error) { throw error; }, + async function(response) { + if (response.length != expectedLength) { + console.warn("Unexpected JS size: " + response.length + ", expected: " + expectedLength); + } + if (expectedSHA1) { + const digest = await window.crypto.subtle.digest("SHA-1", new TextEncoder().encode(response)); + const sha1 = Array.from(new Uint8Array(digest)).map(b => b.toString(16).padStart(2, '0')).join(''); + if (sha1 != expectedSHA1) { + throw new Error("Unexpected sha1: " + sha1 + ", expected: " + expectedSHA1); + } + } + var tag = document.createElement("script"); + tag.text = response; + document.body.appendChild(tag); + }, + function(loadedDelta, currentAttempt){ + ProgressUpdater.updateCurrent(-loadedDelta); + }); + }, + + // left as entrypoint for backward capability + // start loading archive_files.json + // after receiving it - start loading engine and data concurrently + load: function(appCanvasId, exeName) { + ProgressView.addProgress(Module.setupCanvas(appCanvasId)); + CUSTOM_PARAMETERS['exe_name'] = exeName; + + FileLoader.options.retryCount = CUSTOM_PARAMETERS["retry_count"]; + FileLoader.options.retryInterval = CUSTOM_PARAMETERS["retry_time"] * 1000; + if (typeof CUSTOM_PARAMETERS["can_not_download_file_callback"] === "function") { + GameArchiveLoader.addFileDownloadErrorListener(CUSTOM_PARAMETERS["can_not_download_file_callback"]); + } + // Load and assemble archive + GameArchiveLoader.addFileLoadedListener(Module.onArchiveFileLoaded); + GameArchiveLoader.addArchiveLoadedListener(Module.onArchiveLoaded); + GameArchiveLoader.setFileLocationFilter(CUSTOM_PARAMETERS["archive_location_filter"]); + GameArchiveLoader.loadArchiveDescription('/archive_files.json'); + + // move resize callback setup here to make possible to override callback + // from outside of dmloader.js + if (typeof CUSTOM_PARAMETERS["resize_window_callback"] === "function") { + var callback = CUSTOM_PARAMETERS["resize_window_callback"]; + callback(); + window.addEventListener('resize', callback, false); + window.addEventListener('orientationchange', callback, false); + window.addEventListener('focus', callback, false); + } + } +}; + + +/* ********************************************************************* */ +/* Load and combine game archive data that is split into archives */ +/* ********************************************************************* */ + +var GameArchiveLoader = { + // which files to load + _files: [], + _fileIndex: 0, + // file + // name: intended filepath of built object + // size: expected size of built object. + // data: combined pieces + // downloaded: total bytes downloaded + // pieces: array of name, offset and data objects + // numExpectedFiles: total number of files expected in description + // lastRequestedPiece: index of last data file requested (strictly ascending) + // totalLoadedPieces: counts the number pieces received + + //MAX_CONCURRENT_XHR: 6, // remove comment if throttling of XHR is desired. + + isCompleted: false, // status of process + + _onFileLoadedListeners: [], // signature: name, data. + _onArchiveLoadedListeners:[], // signature: void + _onFileDownloadErrorListeners: [], // signature: name + + _archiveLocationFilter: function(path) { return "split" + path; }, + + cleanUp: function() { + this._files = []; + this._fileIndex = 0; + this.isCompleted = false; + this._onGameArchiveLoaderCompletedListeners = []; + this._onAllTargetsBuiltListeners = []; + this._onFileDownloadErrorListeners = []; + }, + + addListener: function(list, callback) { + if (typeof callback !== 'function') throw TypeError("Invalid callback registration"); + list.push(callback); + }, + notifyListeners: function(list, data) { + for (let i=0; i b.toString(16).padStart(2, '0')).join(''); + if (sha1 != EngineLoader.arc_sha1) { + throw new Error(`Unexpected hash ${sha1} wanted ${EngineLoader.arc_sha1}`); + } + } + } catch (e) { + GameArchiveLoader.notifyFileDownloadError(e.toString()); + return; + } + + var totalSize = json.total_size; + var exeName = CUSTOM_PARAMETERS['exe_name']; + this._files = json.content; + + var isWASMSupported = Module['isWASMSupported']; + if (isWASMSupported) { + EngineLoader.loadWasmAsync(exeName); + totalSize += EngineLoader.wasm_size + EngineLoader.wasmjs_size; + } else { + EngineLoader.loadAsmJsAsync(exeName); + totalSize += EngineLoader.asmjs_size; + } + if (!Module['isDMFSSupported']) { + // we can download in parallel here because we will not rely on FS, otherwise + // we have to wait until after the [w]asm is loaded. + this.downloadContent(); + } + ProgressUpdater.resetCurrent(); + if (isWASMSupported) { + EngineLoader.updateWasmInstantiateProgress(totalSize); + } + ProgressUpdater.setupTotal(totalSize + EngineLoader.wasm_instantiate_progress); + }, + + downloadContent: async function() { + var file = this._files[this._fileIndex]; + + if (Module['isDMFSSupported']) { + const path = `${DMSYS.GetUserPersistentDataRoot()}/${file.name}`; + try { // see if already and stored + const stat = FS.stat(path); + if (stat) { + let matches = (file.size == stat.size); + if (matches && file.sha1) { + const stream = FS.open(path, "r"); + if (stream) { + try { + const mmap = FS.mmap(stream, stat.size, 0, 0x01, 0x01); //PROT_READ, MAP_SHARED + if (mmap) { + const digest = await window.crypto.subtle.digest("SHA-1", mmap); + matches = Array.from(new Uint8Array(digest)).map(b => b.toString(16).padStart(2, '0')).join('') == file.sha1; + } + } catch(e) { } + FS.close(stream); + } else { + matches = false; + } + } + if (matches) { + this.onFileLoaded(file); + return; + } + } + } catch(_e) { } + file.stream = FS.open(path, "w+"); + } + + // how many pieces to download at a time + var limit = file.pieces.length; + if (typeof this.MAX_CONCURRENT_XHR !== 'undefined') { + limit = Math.min(limit, this.MAX_CONCURRENT_XHR); + } + + for (var i=0; i start) { + throw RangeError("Buffer underflow. Start: " + start); + } + if (end > file.data.length) { + throw RangeError("Buffer overflow. End : " + end + ", data length: " + file.data.length); + } + file.data.set(piece.data, piece.offset); + } + }, + + onPieceLoaded: function(file, piece) { + this.addPieceToFile(file, piece); + + ++file.totalLoadedPieces; + // is all pieces of the file loaded? + if (file.totalLoadedPieces == file.pieces.length) { + this.verifyFile(file).then(() => { + if (file.stream !== undefined) { + FS.close(file.stream); + file.stream = undefined; + } + this.onFileLoaded(file); + }).catch((e) => { + console.log('file verification failed! ' + e); + throw e; + }); + } + // continue loading more pieces of the file + // if not all pieces are already in progress + else { + var next = file.lastRequestedPiece + 1; + if (next < file.pieces.length) { + this.downloadPiece(file, next); + } + } + }, + + verifyFile: function(file) { + // verify that we downloaded as much as we were supposed to + var actualSize = 0; + for (var i=0;i 1) { + var pieces = file.pieces; + for (i=0; i start) { + return Promise.reject(new RangeError("Segment underflow in file: " + file.name + ", offset: " + (previous.offset + previous.dataLength) + " , start: " + start)); + } + } + if (pieces.length - 2 > i) { + var next = pieces[i + 1]; + if (end > next.offset) { + return Promise.reject(new RangeError("Segment overflow in file: " + file.name + ", offset: " + next.offset + ", end: " + end)); + } + } + } + } + if (file.sha1) { + let data = file.data; + if (file.stream) { + try { + data = FS.mmap(file.stream, file.size, 0, 0x01, 0x01); //PROT_READ, MAP_SHARED + } catch(e) { } + } + return window.crypto.subtle.digest("SHA-1", data).then((digest) => { + const sha1 = Array.from(new Uint8Array(digest)).map(b => b.toString(16).padStart(2, '0')).join(''); + if (sha1 !== file.sha1) + return Promise.reject(new Error(`Unexpected hash ${sha1} wanted ${file.sha1}`)); + return; + }); + } + return Promise.resolve(); + }, + + onFileLoaded: function(file) { + this.notifyFileLoaded(file); + ++this._fileIndex; + if (this._fileIndex == this._files.length) { + this.onArchiveLoaded(); + } else { + this.downloadContent(); + } + }, + + onArchiveLoaded: function() { + this.isCompleted = true; + this.notifyArchiveLoaded(); + } +}; + +/* ********************************************************************* */ +/* Default splash and progress visualisation */ +/* ********************************************************************* */ + +var ProgressView = { + progress_id: "defold-progress", + bar_id: "defold-progress-bar", + + addProgress : function (canvas) { + /* Insert default progress bar below canvas */ + canvas.insertAdjacentHTML('afterend', '
'); + ProgressView.bar = document.getElementById(ProgressView.bar_id); + ProgressView.progress = document.getElementById(ProgressView.progress_id); + }, + + updateProgress: function(percentage) { + if (ProgressView.bar) { + ProgressView.bar.style.transform = "scaleX(" + Math.min(percentage, 100) / 100 + ")"; + } + }, + + removeProgress: function () { + if (ProgressView.progress.parentElement !== null) { + ProgressView.progress.parentElement.removeChild(ProgressView.progress); + + // Remove any background/splash image that was set in runApp(). + // Workaround for Safari bug DEF-3061. + Module.canvas.style.background = "none"; + } + } +}; + +var ProgressUpdater = { + current: 0, + total: 1, + + listeners: [], + + addListener: function(callback) { + if (typeof callback !== 'function') throw TypeError("Invalid callback registration"); + this.listeners.push(callback); + }, + + notifyListeners: function(percentage) { + for (i=0; i { + var errorObject = Module.prepareErrorObject(errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error); + Module.ccall('JSWriteDump', 'null', ['string'], [JSON.stringify(errorObject.stack)]); + }); + Module._isEngineLoaded = true; + Module.setupCanvas(appCanvasId); + + Module.arguments = CUSTOM_PARAMETERS["engine_arguments"]; + + var fullScreenContainer = CUSTOM_PARAMETERS["full_screen_container"]; + if (typeof fullScreenContainer === "string") { + fullScreenContainer = document.querySelector(fullScreenContainer); + } + Module.fullScreenContainer = fullScreenContainer || Module.canvas; + + if (Module.hasWebGLSupport() || Module.hasWebGPUSupport()) { + Module.canvas.focus(); + + Module.canvas.addEventListener("webglcontextlost", function(event) { + event.preventDefault(); + dmRenderer.rendererContextEvent(dmRenderer.CONTEXT_LOST_EVENT); + }, false); + Module.canvas.addEventListener("webglcontextrestored", function(event) { + dmRenderer.rendererContextEvent(dmRenderer.CONTEXT_RESTORED_EVENT); + }, false); + // Add context menu hide-handler if requested + if (CUSTOM_PARAMETERS["disable_context_menu"]) + { + Module.canvas.oncontextmenu = function(e) { + e.preventDefault(); + }; + } + Module._preloadAndCallMain(); + } else { + // "Unable to start game, WebGL not supported" + ProgressUpdater.complete(); + Module.setStatus = function(text) { + if (text) Module.printErr('[missing WebGL] ' + text); + }; + + if (typeof CUSTOM_PARAMETERS["unsupported_webgl_callback"] === "function") { + CUSTOM_PARAMETERS["unsupported_webgl_callback"](); + } + } + }, + + onArchiveFileLoaded: function(file) { + if (file.data) { + Module._filesToPreload.push({path: file.name, data: file.data}); + } + }, + + onArchiveLoaded: function() { + GameArchiveLoader.cleanUp(); + Module._archiveLoaded = true; + Module._preloadAndCallMain(); + }, + + toggleFullscreen: function(element) { + if (GLFW.isFullscreen) { + GLFW.cancelFullScreen(); + } else { + GLFW.requestFullScreen(element); + } + }, + + preSync: function(done) { + if (Module.persistentStorage != true) { + done(); + return; + } + // Initial persistent sync before main is called + FS.syncfs(true, function(err) { + if (err) { + Module._syncTries += 1; + console.info(`Unable to synchronize mounted file systems (attempt ${Module._syncTries} of ${Module._syncMaxTries}): `, err); + if (Module._syncMaxTries > Module._syncTries) { + Module.preSync(done); + } else { + console.warn("Mounted system wasn't synchronized. Retry count was exceeded."); + Module._syncTries = 0; + Module._syncInitial = true; + done(); + } + } else { + Module._syncTries = 0; + Module._syncInitial = true; + if (done !== undefined) { + done(); + } + } + }); + }, + + preloadAll: function() { + if (Module._preLoadDone) { + return; + } + Module._preLoadDone = true; + for (var i = 0; i < Module._filesToPreload.length; ++i) { + var item = Module._filesToPreload[i]; + FS.createPreloadedFile("", item.path, item.data, true, true); + } + }, + + // Tries to do a MEM->IDB sync + // It will flag that another one is needed if there is already one sync running. + persistentSync: function() { + + if (Module.persistentStorage != true) { + return; + } + // Need to wait for the initial sync to finish since it + // will call close on all its file streams which will trigger + // new persistentSync for each. + if (Module._syncInitial) { + if (Module._syncInProgress) { + Module._syncNeeded = true; + } else { + Module._startSyncFS(); + } + } + }, + + preInit: [function() { + // Mount filesystem on preinit + var dir = DMSYS.GetUserPersistentDataRoot(); + try { + FS.mkdir(dir); + } + catch (error) { + Module.persistentStorage = false; + Module._preloadAndCallMain(); + return; + } + + try { + if (Module['isDMFSSupported']) { + // In DMFS mode we will use that as our mountpoint and make sure that all + // relative paths point into there. + FS.mount(new DMFS(CUSTOM_PARAMETERS['exe_name']), {}, dir); + FS.chdir(dir); + } else { + // If IndexedDB is supported we mount the persistent data root as IDBFS, + // then try to do a IDB->MEM sync before we start the engine to get + // previously saved data before boot. + FS.mount(IDBFS, {}, dir); + } + // Patch FS.close so it will try to sync MEM->IDB + var _close = FS.close; + FS.close = function(stream) { + var r = _close(stream); + Module.persistentSync(); + return r; + }; + } + catch (error) { + Module.persistentStorage = false; + Module._preloadAndCallMain(); + return; + } + + // Sync IDB->MEM before calling main() + Module.preSync(function() { + Module._preloadAndCallMain(); + }); + }], + + preRun: [function() { + /* If archive is loaded, preload all its files */ + if (Module._archiveLoaded) { + Module.preloadAll(); + } + }], + + postRun: [function() { + if (Module._archiveLoaded) { + ProgressView.removeProgress(); + } else if (Module['isDMFSSupported']) { + // kick off the content download now that we have FS access + GameArchiveLoader.downloadContent(); + } + }], + + _preloadAndCallMain: function() { + if (Module._syncInitial || Module.persistentStorage != true) { + // If the archive isn't loaded, + // we will have to wait with calling main. + if (Module._archiveLoaded) { + Module.preloadAll(); + if (Module._isEngineLoaded) { + // "Starting...." + ProgressUpdater.complete(); + Module._callMain(); + } + } + } + }, + + _callMain: function(_, _) { + if (!Module._isMainCalled) { + Module._isMainCalled = true; + ProgressView.removeProgress(); + if (Module.callMain === undefined) { + Module.noInitialRun = false; + } else { + Module.callMain(Module.arguments); + } + } else { + console.warn("Main was called several times!"); + } + }, + // Wrap IDBFS syncfs call with logic to avoid multiple syncs + // running at the same time. + _startSyncFS: function() { + Module._syncInProgress = true; + + if (Module._syncMaxTries > Module._syncTries) { + FS.syncfs(false, function(err) { + Module._syncInProgress = false; + + if (err) { + console.info(`Unable to synchronize mounted file systems (attempt ${Module._syncTries} of ${Module._syncMaxTries}): `, err); + Module._syncTries += 1; + } else { + Module._syncTries = 0; + } + + if (Module._syncNeeded) { + Module._syncNeeded = false; + Module._startSyncFS(); + } + + }); + } else { + console.warn("Mounted system wasn't synchronized. Retry count was exceeded."); + Module._syncTries = 0; + } + }, +}; + +// common engine setup +Module['persistentStorage'] = (typeof window !== 'undefined') && !!(window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB); + +Module['INITIAL_MEMORY'] = CUSTOM_PARAMETERS.custom_heap_size; + +Module['onRuntimeInitialized'] = function() { + Module.runApp("canvas"); +}; + +Module["locateFile"] = function(path, scriptDirectory) +{ + // dmengine*.wasm is hardcoded in the built JS loader for WASM, + // we need to replace it here with the correct project name. + if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") { + path = "MyProject.wasm"; + } + return scriptDirectory + path; +}; + + +window.addEventListener("error", (errorEvent) => { + Module.setStatus('Exception thrown, see JavaScript console'); + Module.setStatus = function(text) { + if (text) Module.printErr('[post-exception status] ' + text); + }; +}); diff --git a/build/default_html5/__htmlLaunchDir/My Project/index.html b/build/default_html5/__htmlLaunchDir/My Project/index.html new file mode 100644 index 0000000..08a8c2b --- /dev/null +++ b/build/default_html5/__htmlLaunchDir/My Project/index.html @@ -0,0 +1,187 @@ + + + + + + + + + + My Project 1.0 + + + + + +
+ + +
+ +
+
+
Fullscreen
+ +
+
+ + + + + + diff --git a/build/default_html5/_generated_10f4e70a027bf2a3.compcount_go b/build/default_html5/_generated_10f4e70a027bf2a3.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_10f4e70a027bf2a3.compcount_go differ diff --git a/build/default_html5/_generated_10f4e70a027bf2a3.go b/build/default_html5/_generated_10f4e70a027bf2a3.go new file mode 100644 index 0000000..fded038 --- /dev/null +++ b/build/default_html5/_generated_10f4e70a027bf2a3.go @@ -0,0 +1,13 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 84.0 + z: 0.1 + } + scale { + x: 0.718486 + } +} diff --git a/build/default_html5/_generated_10f4e70a027bf2a3.goc b/build/default_html5/_generated_10f4e70a027bf2a3.goc new file mode 100644 index 0000000..aade537 Binary files /dev/null and b/build/default_html5/_generated_10f4e70a027bf2a3.goc differ diff --git a/build/default_html5/_generated_12e99f1a6123fc37.compcount_go b/build/default_html5/_generated_12e99f1a6123fc37.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_12e99f1a6123fc37.compcount_go differ diff --git a/build/default_html5/_generated_12e99f1a6123fc37.go b/build/default_html5/_generated_12e99f1a6123fc37.go new file mode 100644 index 0000000..ddf5a68 --- /dev/null +++ b/build/default_html5/_generated_12e99f1a6123fc37.go @@ -0,0 +1,9 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 624.0 + y: 83.0 + } +} diff --git a/build/default_html5/_generated_12e99f1a6123fc37.goc b/build/default_html5/_generated_12e99f1a6123fc37.goc new file mode 100644 index 0000000..da8e15b Binary files /dev/null and b/build/default_html5/_generated_12e99f1a6123fc37.goc differ diff --git a/build/default_html5/_generated_133d8b97d2fa041f.compcount_go b/build/default_html5/_generated_133d8b97d2fa041f.compcount_go new file mode 100644 index 0000000..0c32cbe Binary files /dev/null and b/build/default_html5/_generated_133d8b97d2fa041f.compcount_go differ diff --git a/build/default_html5/_generated_133d8b97d2fa041f.go b/build/default_html5/_generated_133d8b97d2fa041f.go new file mode 100644 index 0000000..7f4ea52 --- /dev/null +++ b/build/default_html5/_generated_133d8b97d2fa041f.go @@ -0,0 +1,30 @@ +components { + id: "player" + component: "/main/player.script" +} +components { + id: "debug" + component: "/main/debug.gui" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n y: -30.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 3.5919755\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nmask: \"curse\"\nmask: \"amulet\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_133d8b97d2fa041f.goc b/build/default_html5/_generated_133d8b97d2fa041f.goc new file mode 100644 index 0000000..7630145 Binary files /dev/null and b/build/default_html5/_generated_133d8b97d2fa041f.goc differ diff --git a/build/default_html5/_generated_151b86e97c5bde8.compcount_go b/build/default_html5/_generated_151b86e97c5bde8.compcount_go new file mode 100644 index 0000000..8c9fc30 Binary files /dev/null and b/build/default_html5/_generated_151b86e97c5bde8.compcount_go differ diff --git a/build/default_html5/_generated_151b86e97c5bde8.go b/build/default_html5/_generated_151b86e97c5bde8.go new file mode 100644 index 0000000..d46d7a6 --- /dev/null +++ b/build/default_html5/_generated_151b86e97c5bde8.go @@ -0,0 +1,19 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_TRIGGER\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 23.418262\n data: 58.742554\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_151b86e97c5bde8.goc b/build/default_html5/_generated_151b86e97c5bde8.goc new file mode 100644 index 0000000..2d4f8a2 Binary files /dev/null and b/build/default_html5/_generated_151b86e97c5bde8.goc differ diff --git a/build/default_html5/_generated_166fc146288e3679.collisionobject b/build/default_html5/_generated_166fc146288e3679.collisionobject new file mode 100644 index 0000000..8550538 --- /dev/null +++ b/build/default_html5/_generated_166fc146288e3679.collisionobject @@ -0,0 +1,21 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "ladder" +mask: "curse" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + } + rotation { + } + index: 0 + count: 3 + } + data: 21.718147 + data: 32.986557 + data: 10.0 +} diff --git a/build/default_html5/_generated_166fc146288e3679.collisionobjectc b/build/default_html5/_generated_166fc146288e3679.collisionobjectc new file mode 100644 index 0000000..9afa6be Binary files /dev/null and b/build/default_html5/_generated_166fc146288e3679.collisionobjectc differ diff --git a/build/default_html5/_generated_1c3e4c1537ae3790.compcount_go b/build/default_html5/_generated_1c3e4c1537ae3790.compcount_go new file mode 100644 index 0000000..3b4635b Binary files /dev/null and b/build/default_html5/_generated_1c3e4c1537ae3790.compcount_go differ diff --git a/build/default_html5/_generated_1c3e4c1537ae3790.go b/build/default_html5/_generated_1c3e4c1537ae3790.go new file mode 100644 index 0000000..b701d48 --- /dev/null +++ b/build/default_html5/_generated_1c3e4c1537ae3790.go @@ -0,0 +1,64 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 727.0\n y: 14.0\n }\n rotation {\n z: 0.010910967\n w: 0.99994045\n }\n index: 0\n count: 3\n }\n data: 333.5412\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 573.0 + y: 16.0 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_1c3e4c1537ae3790.goc b/build/default_html5/_generated_1c3e4c1537ae3790.goc new file mode 100644 index 0000000..f31d480 Binary files /dev/null and b/build/default_html5/_generated_1c3e4c1537ae3790.goc differ diff --git a/build/default_html5/_generated_1c3f159173a976c1.collisionobject b/build/default_html5/_generated_1c3f159173a976c1.collisionobject new file mode 100644 index 0000000..b4b3048 --- /dev/null +++ b/build/default_html5/_generated_1c3f159173a976c1.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_TRIGGER +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 558.0 + y: 83.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 23.418262 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_1c3f159173a976c1.collisionobjectc b/build/default_html5/_generated_1c3f159173a976c1.collisionobjectc new file mode 100644 index 0000000..38c8f62 Binary files /dev/null and b/build/default_html5/_generated_1c3f159173a976c1.collisionobjectc differ diff --git a/build/default_html5/_generated_1e486bdf51c30268.compcount_go b/build/default_html5/_generated_1e486bdf51c30268.compcount_go new file mode 100644 index 0000000..7cafb2e Binary files /dev/null and b/build/default_html5/_generated_1e486bdf51c30268.compcount_go differ diff --git a/build/default_html5/_generated_1e486bdf51c30268.go b/build/default_html5/_generated_1e486bdf51c30268.go new file mode 100644 index 0000000..8082082 --- /dev/null +++ b/build/default_html5/_generated_1e486bdf51c30268.go @@ -0,0 +1,85 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "bottomcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 729.0\n y: 21.0\n }\n rotation {\n z: 0.015301545\n w: 0.9998829\n }\n index: 0\n count: 3\n }\n data: 333.5412\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 574.0 + y: 20.0 + z: 0.1 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "bottomcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 385.0\n y: 138.0\n }\n rotation {\n z: -0.010337459\n w: 0.9999466\n }\n index: 0\n count: 3\n }\n data: 385.85358\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "uprightcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 660.0\n y: 263.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 382.0\n y: 394.0\n }\n rotation {\n z: -0.010337459\n w: 0.9999466\n }\n index: 0\n count: 3\n }\n data: 385.85358\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "uprightcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 662.0\n y: 529.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_1e486bdf51c30268.goc b/build/default_html5/_generated_1e486bdf51c30268.goc new file mode 100644 index 0000000..202897b Binary files /dev/null and b/build/default_html5/_generated_1e486bdf51c30268.goc differ diff --git a/build/default_html5/_generated_1f45b239c9cb670e.collisionobject b/build/default_html5/_generated_1f45b239c9cb670e.collisionobject new file mode 100644 index 0000000..ea509e8 --- /dev/null +++ b/build/default_html5/_generated_1f45b239c9cb670e.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 704.0 + y: 335.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 61.03573 + data: 10.0 +} diff --git a/build/default_html5/_generated_1f45b239c9cb670e.collisionobjectc b/build/default_html5/_generated_1f45b239c9cb670e.collisionobjectc new file mode 100644 index 0000000..818c281 Binary files /dev/null and b/build/default_html5/_generated_1f45b239c9cb670e.collisionobjectc differ diff --git a/build/default_html5/_generated_202a0a44be799b4e.compcount_go b/build/default_html5/_generated_202a0a44be799b4e.compcount_go new file mode 100644 index 0000000..5e85729 Binary files /dev/null and b/build/default_html5/_generated_202a0a44be799b4e.compcount_go differ diff --git a/build/default_html5/_generated_202a0a44be799b4e.go b/build/default_html5/_generated_202a0a44be799b4e.go new file mode 100644 index 0000000..a259dcc --- /dev/null +++ b/build/default_html5/_generated_202a0a44be799b4e.go @@ -0,0 +1,29 @@ +components { + id: "main" + component: "/main/main.script" +} +embedded_components { + id: "level1_proxy" + type: "collectionproxy" + data: "collection: \"/main/level1.collection\"\n" +} +embedded_components { + id: "startscreen_proxy" + type: "collectionproxy" + data: "collection: \"/main/startscreen.collection\"\n" +} +embedded_components { + id: "gameover_proxy" + type: "collectionproxy" + data: "collection: \"/main/gameover.collection\"\n" +} +embedded_components { + id: "scoreboard_proxy" + type: "collectionproxy" + data: "collection: \"/main/scoreboard.collection\"\n" +} +embedded_components { + id: "entername_proxy" + type: "collectionproxy" + data: "collection: \"/main/entername.collection\"\n" +} diff --git a/build/default_html5/_generated_202a0a44be799b4e.goc b/build/default_html5/_generated_202a0a44be799b4e.goc new file mode 100644 index 0000000..ee59ac9 Binary files /dev/null and b/build/default_html5/_generated_202a0a44be799b4e.goc differ diff --git a/build/default_html5/_generated_208a3d262f3539ac.collisionobject b/build/default_html5/_generated_208a3d262f3539ac.collisionobject new file mode 100644 index 0000000..9643392 --- /dev/null +++ b/build/default_html5/_generated_208a3d262f3539ac.collisionobject @@ -0,0 +1,23 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "platform" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + y: -30.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 21.752527 + data: 3.5919755 + data: 10.0 +} +linear_damping: 1.0 +locked_rotation: true diff --git a/build/default_html5/_generated_208a3d262f3539ac.collisionobjectc b/build/default_html5/_generated_208a3d262f3539ac.collisionobjectc new file mode 100644 index 0000000..aef2e16 Binary files /dev/null and b/build/default_html5/_generated_208a3d262f3539ac.collisionobjectc differ diff --git a/build/default_html5/_generated_22962cd041935ac.collisionobject b/build/default_html5/_generated_22962cd041935ac.collisionobject new file mode 100644 index 0000000..9421d66 --- /dev/null +++ b/build/default_html5/_generated_22962cd041935ac.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_DYNAMIC +mass: 1.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "platform" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 365.0 + y: 71.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 21.752527 + data: 32.75525 + data: 10.0 +} +linear_damping: 1.0 +locked_rotation: true diff --git a/build/default_html5/_generated_22962cd041935ac.collisionobjectc b/build/default_html5/_generated_22962cd041935ac.collisionobjectc new file mode 100644 index 0000000..f0390f5 Binary files /dev/null and b/build/default_html5/_generated_22962cd041935ac.collisionobjectc differ diff --git a/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxy b/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxy new file mode 100644 index 0000000..5fb2f99 --- /dev/null +++ b/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxy @@ -0,0 +1 @@ +collection: "/main/startscreen.collection" diff --git a/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxyc b/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxyc new file mode 100644 index 0000000..385ebcb --- /dev/null +++ b/build/default_html5/_generated_22d1fc7ae0bd5bd0.collectionproxyc @@ -0,0 +1,2 @@ + +/main/startscreen.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_233a40178593d72f.sprite b/build/default_html5/_generated_233a40178593d72f.sprite new file mode 100644 index 0000000..fd116a5 --- /dev/null +++ b/build/default_html5/_generated_233a40178593d72f.sprite @@ -0,0 +1,6 @@ +default_animation: "platformsegment" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_233a40178593d72f.spritec b/build/default_html5/_generated_233a40178593d72f.spritec new file mode 100644 index 0000000..f151a21 --- /dev/null +++ b/build/default_html5/_generated_233a40178593d72f.spritec @@ -0,0 +1,2 @@ +platformsegment$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_236997ab845940c.collectionproxy b/build/default_html5/_generated_236997ab845940c.collectionproxy new file mode 100644 index 0000000..a015757 --- /dev/null +++ b/build/default_html5/_generated_236997ab845940c.collectionproxy @@ -0,0 +1 @@ +collection: "/main/instructions.collection" diff --git a/build/default_html5/_generated_236997ab845940c.collectionproxyc b/build/default_html5/_generated_236997ab845940c.collectionproxyc new file mode 100644 index 0000000..521b5dd --- /dev/null +++ b/build/default_html5/_generated_236997ab845940c.collectionproxyc @@ -0,0 +1,2 @@ + +/main/instructions.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_23e083bad8bd8cd8.collisionobject b/build/default_html5/_generated_23e083bad8bd8cd8.collisionobject new file mode 100644 index 0000000..e7e5ab6 --- /dev/null +++ b/build/default_html5/_generated_23e083bad8bd8cd8.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_TRIGGER +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "ladder" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 365.0 + y: 71.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 21.718147 + data: 32.986557 + data: 10.0 +} diff --git a/build/default_html5/_generated_23e083bad8bd8cd8.collisionobjectc b/build/default_html5/_generated_23e083bad8bd8cd8.collisionobjectc new file mode 100644 index 0000000..65b66d3 Binary files /dev/null and b/build/default_html5/_generated_23e083bad8bd8cd8.collisionobjectc differ diff --git a/build/default_html5/_generated_249935d7b5de1d6b.collisionobject b/build/default_html5/_generated_249935d7b5de1d6b.collisionobject new file mode 100644 index 0000000..43f7058 --- /dev/null +++ b/build/default_html5/_generated_249935d7b5de1d6b.collisionobject @@ -0,0 +1,21 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "amulet" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + } + rotation { + } + index: 0 + count: 3 + id: "amulet_collision" + } + data: 16.031746 + data: 16.074074 + data: 10.0 +} diff --git a/build/default_html5/_generated_249935d7b5de1d6b.collisionobjectc b/build/default_html5/_generated_249935d7b5de1d6b.collisionobjectc new file mode 100644 index 0000000..5675407 Binary files /dev/null and b/build/default_html5/_generated_249935d7b5de1d6b.collisionobjectc differ diff --git a/build/default_html5/_generated_26e58a56d65fbab4.compcount_go b/build/default_html5/_generated_26e58a56d65fbab4.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_26e58a56d65fbab4.compcount_go differ diff --git a/build/default_html5/_generated_26e58a56d65fbab4.go b/build/default_html5/_generated_26e58a56d65fbab4.go new file mode 100644 index 0000000..fea0922 --- /dev/null +++ b/build/default_html5/_generated_26e58a56d65fbab4.go @@ -0,0 +1,13 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 84.0 + z: 0.2 + } + scale { + x: 0.718486 + } +} diff --git a/build/default_html5/_generated_26e58a56d65fbab4.goc b/build/default_html5/_generated_26e58a56d65fbab4.goc new file mode 100644 index 0000000..0bfa4fd Binary files /dev/null and b/build/default_html5/_generated_26e58a56d65fbab4.goc differ diff --git a/build/default_html5/_generated_2934fa86a8d15d1f.compcount_go b/build/default_html5/_generated_2934fa86a8d15d1f.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_2934fa86a8d15d1f.compcount_go differ diff --git a/build/default_html5/_generated_2934fa86a8d15d1f.go b/build/default_html5/_generated_2934fa86a8d15d1f.go new file mode 100644 index 0000000..7b9fcde --- /dev/null +++ b/build/default_html5/_generated_2934fa86a8d15d1f.go @@ -0,0 +1,9 @@ +components { + id: "GameOver" + component: "/main/gameover.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"GameOverScreen\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" +} diff --git a/build/default_html5/_generated_2934fa86a8d15d1f.goc b/build/default_html5/_generated_2934fa86a8d15d1f.goc new file mode 100644 index 0000000..754938d Binary files /dev/null and b/build/default_html5/_generated_2934fa86a8d15d1f.goc differ diff --git a/build/default_html5/_generated_29d0035e0c07caf2.collisionobject b/build/default_html5/_generated_29d0035e0c07caf2.collisionobject new file mode 100644 index 0000000..3804acf --- /dev/null +++ b/build/default_html5/_generated_29d0035e0c07caf2.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "ladder" +mask: "curse" +mask: "amulet" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + } + rotation { + } + index: 0 + count: 3 + } + data: 21.718147 + data: 32.986557 + data: 10.0 +} diff --git a/build/default_html5/_generated_29d0035e0c07caf2.collisionobjectc b/build/default_html5/_generated_29d0035e0c07caf2.collisionobjectc new file mode 100644 index 0000000..bcffd5e Binary files /dev/null and b/build/default_html5/_generated_29d0035e0c07caf2.collisionobjectc differ diff --git a/build/default_html5/_generated_2a06d3e471d60658.sprite b/build/default_html5/_generated_2a06d3e471d60658.sprite new file mode 100644 index 0000000..34a7896 --- /dev/null +++ b/build/default_html5/_generated_2a06d3e471d60658.sprite @@ -0,0 +1,10 @@ +default_animation: "UpRightPlatform" +material: "/builtins/materials/sprite.material" +size { + x: 922.0 + y: 88.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_2a06d3e471d60658.spritec b/build/default_html5/_generated_2a06d3e471d60658.spritec new file mode 100644 index 0000000..9ce646b Binary files /dev/null and b/build/default_html5/_generated_2a06d3e471d60658.spritec differ diff --git a/build/default_html5/_generated_2b93f534cd7e864e.compcount_go b/build/default_html5/_generated_2b93f534cd7e864e.compcount_go new file mode 100644 index 0000000..7514798 Binary files /dev/null and b/build/default_html5/_generated_2b93f534cd7e864e.compcount_go differ diff --git a/build/default_html5/_generated_2b93f534cd7e864e.go b/build/default_html5/_generated_2b93f534cd7e864e.go new file mode 100644 index 0000000..7012e3b --- /dev/null +++ b/build/default_html5/_generated_2b93f534cd7e864e.go @@ -0,0 +1,55 @@ +embedded_components { + id: "uprightplatform" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 21.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 655.0\n y: 16.0\n }\n rotation {\n z: 0.010910967\n w: 0.99994045\n }\n index: 0\n count: 3\n }\n data: 394.12912\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_2b93f534cd7e864e.goc b/build/default_html5/_generated_2b93f534cd7e864e.goc new file mode 100644 index 0000000..87206f2 Binary files /dev/null and b/build/default_html5/_generated_2b93f534cd7e864e.goc differ diff --git a/build/default_html5/_generated_2bf9667414e5a2c.compcount_go b/build/default_html5/_generated_2bf9667414e5a2c.compcount_go new file mode 100644 index 0000000..f16b4d2 Binary files /dev/null and b/build/default_html5/_generated_2bf9667414e5a2c.compcount_go differ diff --git a/build/default_html5/_generated_2bf9667414e5a2c.go b/build/default_html5/_generated_2bf9667414e5a2c.go new file mode 100644 index 0000000..fd3f8fe --- /dev/null +++ b/build/default_html5/_generated_2bf9667414e5a2c.go @@ -0,0 +1,5 @@ +embedded_components { + id: "amulet_factory" + type: "collectionfactory" + data: "prototype: \"/main/amulet.collection\"\n" +} diff --git a/build/default_html5/_generated_2bf9667414e5a2c.goc b/build/default_html5/_generated_2bf9667414e5a2c.goc new file mode 100644 index 0000000..8100922 Binary files /dev/null and b/build/default_html5/_generated_2bf9667414e5a2c.goc differ diff --git a/build/default_html5/_generated_2d36d166122f897b.compcount_go b/build/default_html5/_generated_2d36d166122f897b.compcount_go new file mode 100644 index 0000000..f16b4d2 Binary files /dev/null and b/build/default_html5/_generated_2d36d166122f897b.compcount_go differ diff --git a/build/default_html5/_generated_2d36d166122f897b.go b/build/default_html5/_generated_2d36d166122f897b.go new file mode 100644 index 0000000..c9f22f1 --- /dev/null +++ b/build/default_html5/_generated_2d36d166122f897b.go @@ -0,0 +1,5 @@ +embedded_components { + id: "curse_factory" + type: "collectionfactory" + data: "prototype: \"/main/curses.collection\"\n" +} diff --git a/build/default_html5/_generated_2d36d166122f897b.goc b/build/default_html5/_generated_2d36d166122f897b.goc new file mode 100644 index 0000000..e0bd5a1 Binary files /dev/null and b/build/default_html5/_generated_2d36d166122f897b.goc differ diff --git a/build/default_html5/_generated_2f909f707aaee86f.collisionobject b/build/default_html5/_generated_2f909f707aaee86f.collisionobject new file mode 100644 index 0000000..b2a3e28 --- /dev/null +++ b/build/default_html5/_generated_2f909f707aaee86f.collisionobject @@ -0,0 +1,23 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "curse" +mask: "player" +mask: "holding_amulet" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + y: 2.0 + } + rotation { + } + index: 0 + count: 3 + id: "curse_collission" + } + data: 16.666666 + data: 21.43634 + data: 10.0 +} diff --git a/build/default_html5/_generated_2f909f707aaee86f.collisionobjectc b/build/default_html5/_generated_2f909f707aaee86f.collisionobjectc new file mode 100644 index 0000000..72d121a Binary files /dev/null and b/build/default_html5/_generated_2f909f707aaee86f.collisionobjectc differ diff --git a/build/default_html5/_generated_2fb00c67e88c7402.collisionobject b/build/default_html5/_generated_2fb00c67e88c7402.collisionobject new file mode 100644 index 0000000..7195fa8 --- /dev/null +++ b/build/default_html5/_generated_2fb00c67e88c7402.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 558.0 + y: 83.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 23.418262 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_2fb00c67e88c7402.collisionobjectc b/build/default_html5/_generated_2fb00c67e88c7402.collisionobjectc new file mode 100644 index 0000000..4fb1da1 Binary files /dev/null and b/build/default_html5/_generated_2fb00c67e88c7402.collisionobjectc differ diff --git a/build/default_html5/_generated_30893a62d302113a.sprite b/build/default_html5/_generated_30893a62d302113a.sprite new file mode 100644 index 0000000..5dd3c37 --- /dev/null +++ b/build/default_html5/_generated_30893a62d302113a.sprite @@ -0,0 +1,6 @@ +default_animation: "curse" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_30893a62d302113a.spritec b/build/default_html5/_generated_30893a62d302113a.spritec new file mode 100644 index 0000000..d77ed8a --- /dev/null +++ b/build/default_html5/_generated_30893a62d302113a.spritec @@ -0,0 +1,2 @@ +curse$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_30f74a58e53f203e.collisionobject b/build/default_html5/_generated_30f74a58e53f203e.collisionobject new file mode 100644 index 0000000..08033f6 --- /dev/null +++ b/build/default_html5/_generated_30f74a58e53f203e.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 197.0 + y: 6.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 197.94986 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_30f74a58e53f203e.collisionobjectc b/build/default_html5/_generated_30f74a58e53f203e.collisionobjectc new file mode 100644 index 0000000..56bdcd6 Binary files /dev/null and b/build/default_html5/_generated_30f74a58e53f203e.collisionobjectc differ diff --git a/build/default_html5/_generated_30fd11035f86f38f.compcount_go b/build/default_html5/_generated_30fd11035f86f38f.compcount_go new file mode 100644 index 0000000..3b4635b Binary files /dev/null and b/build/default_html5/_generated_30fd11035f86f38f.compcount_go differ diff --git a/build/default_html5/_generated_30fd11035f86f38f.go b/build/default_html5/_generated_30fd11035f86f38f.go new file mode 100644 index 0000000..23a97a9 --- /dev/null +++ b/build/default_html5/_generated_30fd11035f86f38f.go @@ -0,0 +1,64 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 727.0\n y: 14.0\n }\n rotation {\n z: 0.010910967\n w: 0.99994045\n }\n index: 0\n count: 3\n }\n data: 333.5412\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 574.0 + y: 20.0 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_30fd11035f86f38f.goc b/build/default_html5/_generated_30fd11035f86f38f.goc new file mode 100644 index 0000000..32702ac Binary files /dev/null and b/build/default_html5/_generated_30fd11035f86f38f.goc differ diff --git a/build/default_html5/_generated_3684dfa9ce24875d.compcount_go b/build/default_html5/_generated_3684dfa9ce24875d.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_3684dfa9ce24875d.compcount_go differ diff --git a/build/default_html5/_generated_3684dfa9ce24875d.go b/build/default_html5/_generated_3684dfa9ce24875d.go new file mode 100644 index 0000000..670c513 --- /dev/null +++ b/build/default_html5/_generated_3684dfa9ce24875d.go @@ -0,0 +1,14 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"pause\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 344.0 + z: 0.4 + } + scale { + x: 1.3 + y: 1.3 + } +} diff --git a/build/default_html5/_generated_3684dfa9ce24875d.goc b/build/default_html5/_generated_3684dfa9ce24875d.goc new file mode 100644 index 0000000..a4e607d Binary files /dev/null and b/build/default_html5/_generated_3684dfa9ce24875d.goc differ diff --git a/build/default_html5/_generated_37cadf53ba24c93.sprite b/build/default_html5/_generated_37cadf53ba24c93.sprite new file mode 100644 index 0000000..1df407f --- /dev/null +++ b/build/default_html5/_generated_37cadf53ba24c93.sprite @@ -0,0 +1,6 @@ +default_animation: "UpLeftPlatform" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_37cadf53ba24c93.spritec b/build/default_html5/_generated_37cadf53ba24c93.spritec new file mode 100644 index 0000000..a940e15 --- /dev/null +++ b/build/default_html5/_generated_37cadf53ba24c93.spritec @@ -0,0 +1,2 @@ +UpLeftPlatform$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_37e5e96cf070af83.sprite b/build/default_html5/_generated_37e5e96cf070af83.sprite new file mode 100644 index 0000000..5353ba1 --- /dev/null +++ b/build/default_html5/_generated_37e5e96cf070af83.sprite @@ -0,0 +1,6 @@ +default_animation: "settingsscreen" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_37e5e96cf070af83.spritec b/build/default_html5/_generated_37e5e96cf070af83.spritec new file mode 100644 index 0000000..26a61a3 --- /dev/null +++ b/build/default_html5/_generated_37e5e96cf070af83.spritec @@ -0,0 +1,2 @@ +settingsscreen$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_39e905d4029e4f40.compcount_go b/build/default_html5/_generated_39e905d4029e4f40.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_39e905d4029e4f40.compcount_go differ diff --git a/build/default_html5/_generated_39e905d4029e4f40.go b/build/default_html5/_generated_39e905d4029e4f40.go new file mode 100644 index 0000000..dd83897 --- /dev/null +++ b/build/default_html5/_generated_39e905d4029e4f40.go @@ -0,0 +1,23 @@ +components { + id: "player" + component: "/main/player.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 32.75525\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} diff --git a/build/default_html5/_generated_39e905d4029e4f40.goc b/build/default_html5/_generated_39e905d4029e4f40.goc new file mode 100644 index 0000000..0638bfe Binary files /dev/null and b/build/default_html5/_generated_39e905d4029e4f40.goc differ diff --git a/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactory b/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactory new file mode 100644 index 0000000..188918a --- /dev/null +++ b/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactory @@ -0,0 +1 @@ +prototype: "/main/amulet.collection" diff --git a/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactoryc b/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactoryc new file mode 100644 index 0000000..9f5bf07 --- /dev/null +++ b/build/default_html5/_generated_3a25a3fcb5bae71b.collectionfactoryc @@ -0,0 +1,2 @@ + +/main/amulet.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_3ac5dd17e0026e9e.compcount_go b/build/default_html5/_generated_3ac5dd17e0026e9e.compcount_go new file mode 100644 index 0000000..5e619d3 Binary files /dev/null and b/build/default_html5/_generated_3ac5dd17e0026e9e.compcount_go differ diff --git a/build/default_html5/_generated_3ac5dd17e0026e9e.go b/build/default_html5/_generated_3ac5dd17e0026e9e.go new file mode 100644 index 0000000..9a3ceaa --- /dev/null +++ b/build/default_html5/_generated_3ac5dd17e0026e9e.go @@ -0,0 +1,28 @@ +components { + id: "player" + component: "/main/player.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 32.75525\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_3ac5dd17e0026e9e.goc b/build/default_html5/_generated_3ac5dd17e0026e9e.goc new file mode 100644 index 0000000..6d7d8e5 Binary files /dev/null and b/build/default_html5/_generated_3ac5dd17e0026e9e.goc differ diff --git a/build/default_html5/_generated_3d69e7526bf16fb9.collisionobject b/build/default_html5/_generated_3d69e7526bf16fb9.collisionobject new file mode 100644 index 0000000..251f48e --- /dev/null +++ b/build/default_html5/_generated_3d69e7526bf16fb9.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "default" +mask: "default" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 558.0 + y: 83.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 23.418262 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_3d69e7526bf16fb9.collisionobjectc b/build/default_html5/_generated_3d69e7526bf16fb9.collisionobjectc new file mode 100644 index 0000000..46c303c Binary files /dev/null and b/build/default_html5/_generated_3d69e7526bf16fb9.collisionobjectc differ diff --git a/build/default_html5/_generated_419becd5ed4db8b.collectionproxy b/build/default_html5/_generated_419becd5ed4db8b.collectionproxy new file mode 100644 index 0000000..1cbdad3 --- /dev/null +++ b/build/default_html5/_generated_419becd5ed4db8b.collectionproxy @@ -0,0 +1 @@ +collection: "/main/entername.collection" diff --git a/build/default_html5/_generated_419becd5ed4db8b.collectionproxyc b/build/default_html5/_generated_419becd5ed4db8b.collectionproxyc new file mode 100644 index 0000000..adea81d --- /dev/null +++ b/build/default_html5/_generated_419becd5ed4db8b.collectionproxyc @@ -0,0 +1,2 @@ + +/main/entername.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_42b74483bde37f04.sprite b/build/default_html5/_generated_42b74483bde37f04.sprite new file mode 100644 index 0000000..a003847 --- /dev/null +++ b/build/default_html5/_generated_42b74483bde37f04.sprite @@ -0,0 +1,6 @@ +default_animation: "stillmummy" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_42b74483bde37f04.spritec b/build/default_html5/_generated_42b74483bde37f04.spritec new file mode 100644 index 0000000..2dae01b --- /dev/null +++ b/build/default_html5/_generated_42b74483bde37f04.spritec @@ -0,0 +1,3 @@ + +stillmummy$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_4513c25b05eae8e5.compcount_go b/build/default_html5/_generated_4513c25b05eae8e5.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_4513c25b05eae8e5.compcount_go differ diff --git a/build/default_html5/_generated_4513c25b05eae8e5.go b/build/default_html5/_generated_4513c25b05eae8e5.go new file mode 100644 index 0000000..e09e92c --- /dev/null +++ b/build/default_html5/_generated_4513c25b05eae8e5.go @@ -0,0 +1,19 @@ +components { + id: "amulet" + component: "/main/amulet.script" +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"amulet\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n }\n rotation {\n }\n index: 0\n count: 3\n id: \"amulet_collision\"\n }\n data: 16.031746\n data: 16.074074\n data: 10.0\n}\n" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"amulet\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: 0.25 + y: 0.25 + z: 0.25 + } +} diff --git a/build/default_html5/_generated_4513c25b05eae8e5.goc b/build/default_html5/_generated_4513c25b05eae8e5.goc new file mode 100644 index 0000000..330ba45 Binary files /dev/null and b/build/default_html5/_generated_4513c25b05eae8e5.goc differ diff --git a/build/default_html5/_generated_460ccf9dff5105b5.compcount_go b/build/default_html5/_generated_460ccf9dff5105b5.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_460ccf9dff5105b5.compcount_go differ diff --git a/build/default_html5/_generated_460ccf9dff5105b5.go b/build/default_html5/_generated_460ccf9dff5105b5.go new file mode 100644 index 0000000..64d790f --- /dev/null +++ b/build/default_html5/_generated_460ccf9dff5105b5.go @@ -0,0 +1,13 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 84.0 + z: 0.1 + } + scale { + x: 0.718486 + } +} diff --git a/build/default_html5/_generated_460ccf9dff5105b5.goc b/build/default_html5/_generated_460ccf9dff5105b5.goc new file mode 100644 index 0000000..9b57c47 Binary files /dev/null and b/build/default_html5/_generated_460ccf9dff5105b5.goc differ diff --git a/build/default_html5/_generated_46ebff5a2b896dc2.compcount_go b/build/default_html5/_generated_46ebff5a2b896dc2.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_46ebff5a2b896dc2.compcount_go differ diff --git a/build/default_html5/_generated_46ebff5a2b896dc2.go b/build/default_html5/_generated_46ebff5a2b896dc2.go new file mode 100644 index 0000000..7b4470f --- /dev/null +++ b/build/default_html5/_generated_46ebff5a2b896dc2.go @@ -0,0 +1,13 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 84.0 + z: 1.0 + } + scale { + x: 0.718486 + } +} diff --git a/build/default_html5/_generated_46ebff5a2b896dc2.goc b/build/default_html5/_generated_46ebff5a2b896dc2.goc new file mode 100644 index 0000000..76e1b40 Binary files /dev/null and b/build/default_html5/_generated_46ebff5a2b896dc2.goc differ diff --git a/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxy b/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxy new file mode 100644 index 0000000..d7b3492 --- /dev/null +++ b/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxy @@ -0,0 +1 @@ +collection: "/main/level2.collection" diff --git a/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxyc b/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxyc new file mode 100644 index 0000000..079bd3e --- /dev/null +++ b/build/default_html5/_generated_4a222fd82bad3aaf.collectionproxyc @@ -0,0 +1,2 @@ + +/main/level2.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_4bb7689e5f1fe898.compcount_go b/build/default_html5/_generated_4bb7689e5f1fe898.compcount_go new file mode 100644 index 0000000..a69c806 Binary files /dev/null and b/build/default_html5/_generated_4bb7689e5f1fe898.compcount_go differ diff --git a/build/default_html5/_generated_4bb7689e5f1fe898.go b/build/default_html5/_generated_4bb7689e5f1fe898.go new file mode 100644 index 0000000..b0a72c8 --- /dev/null +++ b/build/default_html5/_generated_4bb7689e5f1fe898.go @@ -0,0 +1,4 @@ +components { + id: "entername1" + component: "/main/entername.gui" +} diff --git a/build/default_html5/_generated_4bb7689e5f1fe898.goc b/build/default_html5/_generated_4bb7689e5f1fe898.goc new file mode 100644 index 0000000..7a70509 Binary files /dev/null and b/build/default_html5/_generated_4bb7689e5f1fe898.goc differ diff --git a/build/default_html5/_generated_4f729236e4a67126.sprite b/build/default_html5/_generated_4f729236e4a67126.sprite new file mode 100644 index 0000000..ad4c106 --- /dev/null +++ b/build/default_html5/_generated_4f729236e4a67126.sprite @@ -0,0 +1,6 @@ +default_animation: "startscreen" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_4f729236e4a67126.spritec b/build/default_html5/_generated_4f729236e4a67126.spritec new file mode 100644 index 0000000..678b207 --- /dev/null +++ b/build/default_html5/_generated_4f729236e4a67126.spritec @@ -0,0 +1,2 @@ + startscreen$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_4fe274b8a1f1fb59.sprite b/build/default_html5/_generated_4fe274b8a1f1fb59.sprite new file mode 100644 index 0000000..12f6276 --- /dev/null +++ b/build/default_html5/_generated_4fe274b8a1f1fb59.sprite @@ -0,0 +1,10 @@ +default_animation: "UpLeftPlatform" +material: "/builtins/materials/sprite.material" +size { + x: 896.0 + y: 99.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_4fe274b8a1f1fb59.spritec b/build/default_html5/_generated_4fe274b8a1f1fb59.spritec new file mode 100644 index 0000000..16e72df Binary files /dev/null and b/build/default_html5/_generated_4fe274b8a1f1fb59.spritec differ diff --git a/build/default_html5/_generated_5102cea6a08383c0.compcount_go b/build/default_html5/_generated_5102cea6a08383c0.compcount_go new file mode 100644 index 0000000..b59f2b0 Binary files /dev/null and b/build/default_html5/_generated_5102cea6a08383c0.compcount_go differ diff --git a/build/default_html5/_generated_5102cea6a08383c0.go b/build/default_html5/_generated_5102cea6a08383c0.go new file mode 100644 index 0000000..7fcfcf6 --- /dev/null +++ b/build/default_html5/_generated_5102cea6a08383c0.go @@ -0,0 +1,14 @@ +components { + id: "main" + component: "/main/main.script" +} +embedded_components { + id: "level1_proxy" + type: "collectionproxy" + data: "collection: \"/main/level1.collection\"\n" +} +embedded_components { + id: "startscreen_proxy" + type: "collectionproxy" + data: "collection: \"/main/startscreen.collection\"\n" +} diff --git a/build/default_html5/_generated_5102cea6a08383c0.goc b/build/default_html5/_generated_5102cea6a08383c0.goc new file mode 100644 index 0000000..c899fb4 Binary files /dev/null and b/build/default_html5/_generated_5102cea6a08383c0.goc differ diff --git a/build/default_html5/_generated_53ed630c549fcb87.collectionproxy b/build/default_html5/_generated_53ed630c549fcb87.collectionproxy new file mode 100644 index 0000000..c8b4927 --- /dev/null +++ b/build/default_html5/_generated_53ed630c549fcb87.collectionproxy @@ -0,0 +1 @@ +collection: "/main/gameover.collection" diff --git a/build/default_html5/_generated_53ed630c549fcb87.collectionproxyc b/build/default_html5/_generated_53ed630c549fcb87.collectionproxyc new file mode 100644 index 0000000..581fc3f --- /dev/null +++ b/build/default_html5/_generated_53ed630c549fcb87.collectionproxyc @@ -0,0 +1,2 @@ + +/main/gameover.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_53fc1dd64c3515d2.compcount_go b/build/default_html5/_generated_53fc1dd64c3515d2.compcount_go new file mode 100644 index 0000000..5e619d3 Binary files /dev/null and b/build/default_html5/_generated_53fc1dd64c3515d2.compcount_go differ diff --git a/build/default_html5/_generated_53fc1dd64c3515d2.go b/build/default_html5/_generated_53fc1dd64c3515d2.go new file mode 100644 index 0000000..320ccc2 --- /dev/null +++ b/build/default_html5/_generated_53fc1dd64c3515d2.go @@ -0,0 +1,28 @@ +components { + id: "player2" + component: "/main/player2.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 32.75525\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_53fc1dd64c3515d2.goc b/build/default_html5/_generated_53fc1dd64c3515d2.goc new file mode 100644 index 0000000..7efba5d Binary files /dev/null and b/build/default_html5/_generated_53fc1dd64c3515d2.goc differ diff --git a/build/default_html5/_generated_5491ce3e7b2888a4.compcount_go b/build/default_html5/_generated_5491ce3e7b2888a4.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_5491ce3e7b2888a4.compcount_go differ diff --git a/build/default_html5/_generated_5491ce3e7b2888a4.go b/build/default_html5/_generated_5491ce3e7b2888a4.go new file mode 100644 index 0000000..2c3f4eb --- /dev/null +++ b/build/default_html5/_generated_5491ce3e7b2888a4.go @@ -0,0 +1,9 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"scoreboard\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 447.0 + y: 293.0 + } +} diff --git a/build/default_html5/_generated_5491ce3e7b2888a4.goc b/build/default_html5/_generated_5491ce3e7b2888a4.goc new file mode 100644 index 0000000..8c246e5 Binary files /dev/null and b/build/default_html5/_generated_5491ce3e7b2888a4.goc differ diff --git a/build/default_html5/_generated_54ffa93569eed46a.collectionproxy b/build/default_html5/_generated_54ffa93569eed46a.collectionproxy new file mode 100644 index 0000000..4774dcd --- /dev/null +++ b/build/default_html5/_generated_54ffa93569eed46a.collectionproxy @@ -0,0 +1 @@ +collection: "/main/level1.collection" diff --git a/build/default_html5/_generated_54ffa93569eed46a.collectionproxyc b/build/default_html5/_generated_54ffa93569eed46a.collectionproxyc new file mode 100644 index 0000000..c69f646 --- /dev/null +++ b/build/default_html5/_generated_54ffa93569eed46a.collectionproxyc @@ -0,0 +1,2 @@ + +/main/level1.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_5587b75427539e54.compcount_go b/build/default_html5/_generated_5587b75427539e54.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_5587b75427539e54.compcount_go differ diff --git a/build/default_html5/_generated_5587b75427539e54.go b/build/default_html5/_generated_5587b75427539e54.go new file mode 100644 index 0000000..5eb43b5 --- /dev/null +++ b/build/default_html5/_generated_5587b75427539e54.go @@ -0,0 +1,16 @@ +components { + id: "clouds" + component: "/main/clouds.script" +} +embedded_components { + id: "cloud1" + type: "sprite" + data: "default_animation: \"cloud1\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.4 + } + scale { + x: 1.295998 + y: 1.368312 + } +} diff --git a/build/default_html5/_generated_5587b75427539e54.goc b/build/default_html5/_generated_5587b75427539e54.goc new file mode 100644 index 0000000..d752b37 Binary files /dev/null and b/build/default_html5/_generated_5587b75427539e54.goc differ diff --git a/build/default_html5/_generated_55f69bed468deb50.compcount_go b/build/default_html5/_generated_55f69bed468deb50.compcount_go new file mode 100644 index 0000000..5e619d3 Binary files /dev/null and b/build/default_html5/_generated_55f69bed468deb50.compcount_go differ diff --git a/build/default_html5/_generated_55f69bed468deb50.go b/build/default_html5/_generated_55f69bed468deb50.go new file mode 100644 index 0000000..5053eb9 --- /dev/null +++ b/build/default_html5/_generated_55f69bed468deb50.go @@ -0,0 +1,28 @@ +components { + id: "player" + component: "/main/player.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 32.75525\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_TRIGGER\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_55f69bed468deb50.goc b/build/default_html5/_generated_55f69bed468deb50.goc new file mode 100644 index 0000000..f2a99a6 Binary files /dev/null and b/build/default_html5/_generated_55f69bed468deb50.goc differ diff --git a/build/default_html5/_generated_5613dd9cce4bce94.compcount_go b/build/default_html5/_generated_5613dd9cce4bce94.compcount_go new file mode 100644 index 0000000..5e619d3 Binary files /dev/null and b/build/default_html5/_generated_5613dd9cce4bce94.compcount_go differ diff --git a/build/default_html5/_generated_5613dd9cce4bce94.go b/build/default_html5/_generated_5613dd9cce4bce94.go new file mode 100644 index 0000000..c03927a --- /dev/null +++ b/build/default_html5/_generated_5613dd9cce4bce94.go @@ -0,0 +1,28 @@ +components { + id: "player" + component: "/main/player.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 44.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 5.8068023\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_5613dd9cce4bce94.goc b/build/default_html5/_generated_5613dd9cce4bce94.goc new file mode 100644 index 0000000..6610c87 Binary files /dev/null and b/build/default_html5/_generated_5613dd9cce4bce94.goc differ diff --git a/build/default_html5/_generated_563817c3452b46d7.sprite b/build/default_html5/_generated_563817c3452b46d7.sprite new file mode 100644 index 0000000..28e9509 --- /dev/null +++ b/build/default_html5/_generated_563817c3452b46d7.sprite @@ -0,0 +1,6 @@ +default_animation: "shortladder" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_563817c3452b46d7.spritec b/build/default_html5/_generated_563817c3452b46d7.spritec new file mode 100644 index 0000000..1479c8b --- /dev/null +++ b/build/default_html5/_generated_563817c3452b46d7.spritec @@ -0,0 +1,2 @@ + shortladder$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_594d89f1ad726216.compcount_go b/build/default_html5/_generated_594d89f1ad726216.compcount_go new file mode 100644 index 0000000..8c9fc30 Binary files /dev/null and b/build/default_html5/_generated_594d89f1ad726216.compcount_go differ diff --git a/build/default_html5/_generated_594d89f1ad726216.go b/build/default_html5/_generated_594d89f1ad726216.go new file mode 100644 index 0000000..ecfcb20 --- /dev/null +++ b/build/default_html5/_generated_594d89f1ad726216.go @@ -0,0 +1,19 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 23.418262\n data: 58.742554\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_594d89f1ad726216.goc b/build/default_html5/_generated_594d89f1ad726216.goc new file mode 100644 index 0000000..104ef0e Binary files /dev/null and b/build/default_html5/_generated_594d89f1ad726216.goc differ diff --git a/build/default_html5/_generated_5b192115ecd23fde.compcount_go b/build/default_html5/_generated_5b192115ecd23fde.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_5b192115ecd23fde.compcount_go differ diff --git a/build/default_html5/_generated_5b192115ecd23fde.go b/build/default_html5/_generated_5b192115ecd23fde.go new file mode 100644 index 0000000..b168da5 --- /dev/null +++ b/build/default_html5/_generated_5b192115ecd23fde.go @@ -0,0 +1,9 @@ +embedded_components { + id: "background" + type: "sprite" + data: "default_animation: \"GameBackground\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 344.0 + } +} diff --git a/build/default_html5/_generated_5b192115ecd23fde.goc b/build/default_html5/_generated_5b192115ecd23fde.goc new file mode 100644 index 0000000..dd1a162 Binary files /dev/null and b/build/default_html5/_generated_5b192115ecd23fde.goc differ diff --git a/build/default_html5/_generated_5b8669269d6f71d8.compcount_go b/build/default_html5/_generated_5b8669269d6f71d8.compcount_go new file mode 100644 index 0000000..8bc6baf Binary files /dev/null and b/build/default_html5/_generated_5b8669269d6f71d8.compcount_go differ diff --git a/build/default_html5/_generated_5b8669269d6f71d8.go b/build/default_html5/_generated_5b8669269d6f71d8.go new file mode 100644 index 0000000..90b8d51 --- /dev/null +++ b/build/default_html5/_generated_5b8669269d6f71d8.go @@ -0,0 +1,39 @@ +embedded_components { + id: "life1" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 374.0 + y: 669.0 + } + scale { + x: 0.3 + y: 0.3 + } +} +embedded_components { + id: "life3" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 105.0\n y: 154.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 457.0 + y: 669.0 + } + scale { + x: 0.3 + y: 0.3 + } +} +embedded_components { + id: "life2" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 105.0\n y: 154.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 416.0 + y: 669.0 + } + scale { + x: 0.3 + y: 0.3 + } +} diff --git a/build/default_html5/_generated_5b8669269d6f71d8.goc b/build/default_html5/_generated_5b8669269d6f71d8.goc new file mode 100644 index 0000000..f192cde Binary files /dev/null and b/build/default_html5/_generated_5b8669269d6f71d8.goc differ diff --git a/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobject b/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobject new file mode 100644 index 0000000..e179552 --- /dev/null +++ b/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobject @@ -0,0 +1,20 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "holding_amulet" +mask: "curse" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + } + rotation { + } + index: 0 + count: 3 + } + data: 13.696037 + data: 15.172706 + data: 10.0 +} diff --git a/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobjectc b/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobjectc new file mode 100644 index 0000000..cb3a249 Binary files /dev/null and b/build/default_html5/_generated_5b8c4d26b3ec1189.collisionobjectc differ diff --git a/build/default_html5/_generated_5c679db2e42d62.compcount_go b/build/default_html5/_generated_5c679db2e42d62.compcount_go new file mode 100644 index 0000000..f16b4d2 Binary files /dev/null and b/build/default_html5/_generated_5c679db2e42d62.compcount_go differ diff --git a/build/default_html5/_generated_5c679db2e42d62.go b/build/default_html5/_generated_5c679db2e42d62.go new file mode 100644 index 0000000..f2b2a99 --- /dev/null +++ b/build/default_html5/_generated_5c679db2e42d62.go @@ -0,0 +1,9 @@ +components { + id: "level1" + component: "/main/level1.script" +} +embedded_components { + id: "curse_factory" + type: "collectionfactory" + data: "prototype: \"/main/curses.collection\"\n" +} diff --git a/build/default_html5/_generated_5c679db2e42d62.goc b/build/default_html5/_generated_5c679db2e42d62.goc new file mode 100644 index 0000000..9b148e0 Binary files /dev/null and b/build/default_html5/_generated_5c679db2e42d62.goc differ diff --git a/build/default_html5/_generated_5eb58a211445e4f5.compcount_go b/build/default_html5/_generated_5eb58a211445e4f5.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_5eb58a211445e4f5.compcount_go differ diff --git a/build/default_html5/_generated_5eb58a211445e4f5.go b/build/default_html5/_generated_5eb58a211445e4f5.go new file mode 100644 index 0000000..aa3966c --- /dev/null +++ b/build/default_html5/_generated_5eb58a211445e4f5.go @@ -0,0 +1,13 @@ +components { + id: "settings" + component: "/main/settings.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"settingsscreen\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 345.0 + } +} diff --git a/build/default_html5/_generated_5eb58a211445e4f5.goc b/build/default_html5/_generated_5eb58a211445e4f5.goc new file mode 100644 index 0000000..5ddcae4 Binary files /dev/null and b/build/default_html5/_generated_5eb58a211445e4f5.goc differ diff --git a/build/default_html5/_generated_5f203b457ed5c777.sprite b/build/default_html5/_generated_5f203b457ed5c777.sprite new file mode 100644 index 0000000..6b76523 --- /dev/null +++ b/build/default_html5/_generated_5f203b457ed5c777.sprite @@ -0,0 +1,10 @@ +default_animation: "platformsegment" +material: "/builtins/materials/sprite.material" +size { + x: 780.0 + y: 105.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_5f203b457ed5c777.spritec b/build/default_html5/_generated_5f203b457ed5c777.spritec new file mode 100644 index 0000000..942b065 Binary files /dev/null and b/build/default_html5/_generated_5f203b457ed5c777.spritec differ diff --git a/build/default_html5/_generated_609868fc60af9bf.compcount_go b/build/default_html5/_generated_609868fc60af9bf.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_609868fc60af9bf.compcount_go differ diff --git a/build/default_html5/_generated_609868fc60af9bf.go b/build/default_html5/_generated_609868fc60af9bf.go new file mode 100644 index 0000000..cd736f8 --- /dev/null +++ b/build/default_html5/_generated_609868fc60af9bf.go @@ -0,0 +1,9 @@ +components { + id: "entername" + component: "/main/entername.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"enternamescreen\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" +} diff --git a/build/default_html5/_generated_609868fc60af9bf.goc b/build/default_html5/_generated_609868fc60af9bf.goc new file mode 100644 index 0000000..686dce4 Binary files /dev/null and b/build/default_html5/_generated_609868fc60af9bf.goc differ diff --git a/build/default_html5/_generated_61587772a15a6c13.compcount_go b/build/default_html5/_generated_61587772a15a6c13.compcount_go new file mode 100644 index 0000000..c949177 Binary files /dev/null and b/build/default_html5/_generated_61587772a15a6c13.compcount_go differ diff --git a/build/default_html5/_generated_61587772a15a6c13.go b/build/default_html5/_generated_61587772a15a6c13.go new file mode 100644 index 0000000..6038682 --- /dev/null +++ b/build/default_html5/_generated_61587772a15a6c13.go @@ -0,0 +1,4 @@ +components { + id: "level1" + component: "/main/level1.script" +} diff --git a/build/default_html5/_generated_61587772a15a6c13.goc b/build/default_html5/_generated_61587772a15a6c13.goc new file mode 100644 index 0000000..eae82bb Binary files /dev/null and b/build/default_html5/_generated_61587772a15a6c13.goc differ diff --git a/build/default_html5/_generated_62aeecd8676aa83c.compcount_go b/build/default_html5/_generated_62aeecd8676aa83c.compcount_go new file mode 100644 index 0000000..c949177 Binary files /dev/null and b/build/default_html5/_generated_62aeecd8676aa83c.compcount_go differ diff --git a/build/default_html5/_generated_62aeecd8676aa83c.go b/build/default_html5/_generated_62aeecd8676aa83c.go new file mode 100644 index 0000000..f51402c --- /dev/null +++ b/build/default_html5/_generated_62aeecd8676aa83c.go @@ -0,0 +1,4 @@ +components { + id: "curse" + component: "/main/curse.script" +} diff --git a/build/default_html5/_generated_62aeecd8676aa83c.goc b/build/default_html5/_generated_62aeecd8676aa83c.goc new file mode 100644 index 0000000..4c06afe Binary files /dev/null and b/build/default_html5/_generated_62aeecd8676aa83c.goc differ diff --git a/build/default_html5/_generated_642ae3e1f9421d87.collisionobject b/build/default_html5/_generated_642ae3e1f9421d87.collisionobject new file mode 100644 index 0000000..00578e5 --- /dev/null +++ b/build/default_html5/_generated_642ae3e1f9421d87.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 732.0 + y: 19.0 + } + rotation { + z: 0.015301545 + w: 0.9998829 + } + index: 0 + count: 3 + } + data: 337.67072 + data: 8.483422 + data: 10.0 +} diff --git a/build/default_html5/_generated_642ae3e1f9421d87.collisionobjectc b/build/default_html5/_generated_642ae3e1f9421d87.collisionobjectc new file mode 100644 index 0000000..fee4526 Binary files /dev/null and b/build/default_html5/_generated_642ae3e1f9421d87.collisionobjectc differ diff --git a/build/default_html5/_generated_64670c9755830fee.compcount_go b/build/default_html5/_generated_64670c9755830fee.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_64670c9755830fee.compcount_go differ diff --git a/build/default_html5/_generated_64670c9755830fee.go b/build/default_html5/_generated_64670c9755830fee.go new file mode 100644 index 0000000..da1f63c --- /dev/null +++ b/build/default_html5/_generated_64670c9755830fee.go @@ -0,0 +1,14 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"pause\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: -213.5 + y: 290.0 + z: 0.5 + } + scale { + x: 1.3 + y: 1.3 + } +} diff --git a/build/default_html5/_generated_64670c9755830fee.goc b/build/default_html5/_generated_64670c9755830fee.goc new file mode 100644 index 0000000..57caddf Binary files /dev/null and b/build/default_html5/_generated_64670c9755830fee.goc differ diff --git a/build/default_html5/_generated_6518c49ef90e4eb6.go b/build/default_html5/_generated_6518c49ef90e4eb6.go new file mode 100644 index 0000000..083737e --- /dev/null +++ b/build/default_html5/_generated_6518c49ef90e4eb6.go @@ -0,0 +1,14 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "collectionfactory" + type: "collectionfactory" + data: "prototype: \"\"\n" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" +} diff --git a/build/default_html5/_generated_6692593dc3009538.compcount_go b/build/default_html5/_generated_6692593dc3009538.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_6692593dc3009538.compcount_go differ diff --git a/build/default_html5/_generated_6692593dc3009538.go b/build/default_html5/_generated_6692593dc3009538.go new file mode 100644 index 0000000..e320da1 --- /dev/null +++ b/build/default_html5/_generated_6692593dc3009538.go @@ -0,0 +1,10 @@ +embedded_components { + id: "background" + type: "sprite" + data: "default_animation: \"GameBackground\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 344.0 + z: -1.0 + } +} diff --git a/build/default_html5/_generated_6692593dc3009538.goc b/build/default_html5/_generated_6692593dc3009538.goc new file mode 100644 index 0000000..8495611 Binary files /dev/null and b/build/default_html5/_generated_6692593dc3009538.goc differ diff --git a/build/default_html5/_generated_6ade7a42ff848753.collisionobject b/build/default_html5/_generated_6ade7a42ff848753.collisionobject new file mode 100644 index 0000000..a7b6b62 --- /dev/null +++ b/build/default_html5/_generated_6ade7a42ff848753.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 559.0 + y: 470.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 66.745285 + data: 10.0 +} diff --git a/build/default_html5/_generated_6ade7a42ff848753.collisionobjectc b/build/default_html5/_generated_6ade7a42ff848753.collisionobjectc new file mode 100644 index 0000000..b5a59e6 Binary files /dev/null and b/build/default_html5/_generated_6ade7a42ff848753.collisionobjectc differ diff --git a/build/default_html5/_generated_6b0ffd2bcc6a2984.compcount_go b/build/default_html5/_generated_6b0ffd2bcc6a2984.compcount_go new file mode 100644 index 0000000..83b3534 Binary files /dev/null and b/build/default_html5/_generated_6b0ffd2bcc6a2984.compcount_go differ diff --git a/build/default_html5/_generated_6b0ffd2bcc6a2984.go b/build/default_html5/_generated_6b0ffd2bcc6a2984.go new file mode 100644 index 0000000..38b8c06 --- /dev/null +++ b/build/default_html5/_generated_6b0ffd2bcc6a2984.go @@ -0,0 +1,8 @@ +components { + id: "banner" + component: "/main/banner.script" +} +components { + id: "score" + component: "/main/score.gui" +} diff --git a/build/default_html5/_generated_6b0ffd2bcc6a2984.goc b/build/default_html5/_generated_6b0ffd2bcc6a2984.goc new file mode 100644 index 0000000..2740982 Binary files /dev/null and b/build/default_html5/_generated_6b0ffd2bcc6a2984.goc differ diff --git a/build/default_html5/_generated_6c003f97e53a6f13.collisionobject b/build/default_html5/_generated_6c003f97e53a6f13.collisionobject new file mode 100644 index 0000000..be87262 --- /dev/null +++ b/build/default_html5/_generated_6c003f97e53a6f13.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "curse" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + y: 2.0 + } + rotation { + } + index: 0 + count: 3 + id: "curse_collission" + } + data: 16.666666 + data: 21.43634 + data: 10.0 +} diff --git a/build/default_html5/_generated_6c003f97e53a6f13.collisionobjectc b/build/default_html5/_generated_6c003f97e53a6f13.collisionobjectc new file mode 100644 index 0000000..d298325 Binary files /dev/null and b/build/default_html5/_generated_6c003f97e53a6f13.collisionobjectc differ diff --git a/build/default_html5/_generated_6cd623ed17823e8d.compcount_go b/build/default_html5/_generated_6cd623ed17823e8d.compcount_go new file mode 100644 index 0000000..8c9fc30 Binary files /dev/null and b/build/default_html5/_generated_6cd623ed17823e8d.compcount_go differ diff --git a/build/default_html5/_generated_6cd623ed17823e8d.go b/build/default_html5/_generated_6cd623ed17823e8d.go new file mode 100644 index 0000000..0660ac4 --- /dev/null +++ b/build/default_html5/_generated_6cd623ed17823e8d.go @@ -0,0 +1,19 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_6cd623ed17823e8d.goc b/build/default_html5/_generated_6cd623ed17823e8d.goc new file mode 100644 index 0000000..7119188 Binary files /dev/null and b/build/default_html5/_generated_6cd623ed17823e8d.goc differ diff --git a/build/default_html5/_generated_6d31fd05c983ea1c.compcount_go b/build/default_html5/_generated_6d31fd05c983ea1c.compcount_go new file mode 100644 index 0000000..3b4635b Binary files /dev/null and b/build/default_html5/_generated_6d31fd05c983ea1c.compcount_go differ diff --git a/build/default_html5/_generated_6d31fd05c983ea1c.go b/build/default_html5/_generated_6d31fd05c983ea1c.go new file mode 100644 index 0000000..3d48337 --- /dev/null +++ b/build/default_html5/_generated_6d31fd05c983ea1c.go @@ -0,0 +1,65 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 729.0\n y: 21.0\n }\n rotation {\n z: 0.015301545\n w: 0.9998829\n }\n index: 0\n count: 3\n }\n data: 333.5412\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 574.0 + y: 20.0 + z: 0.1 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_6d31fd05c983ea1c.goc b/build/default_html5/_generated_6d31fd05c983ea1c.goc new file mode 100644 index 0000000..76852cc Binary files /dev/null and b/build/default_html5/_generated_6d31fd05c983ea1c.goc differ diff --git a/build/default_html5/_generated_6e276f5b2cc5145.compcount_go b/build/default_html5/_generated_6e276f5b2cc5145.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_6e276f5b2cc5145.compcount_go differ diff --git a/build/default_html5/_generated_6e276f5b2cc5145.go b/build/default_html5/_generated_6e276f5b2cc5145.go new file mode 100644 index 0000000..a898e4d --- /dev/null +++ b/build/default_html5/_generated_6e276f5b2cc5145.go @@ -0,0 +1,23 @@ +components { + id: "player2.0" + component: "/main/player2.0.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 363.0 + y: 72.0 + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 365.0\n y: 71.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 32.75525\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} diff --git a/build/default_html5/_generated_6e276f5b2cc5145.goc b/build/default_html5/_generated_6e276f5b2cc5145.goc new file mode 100644 index 0000000..9a1112e Binary files /dev/null and b/build/default_html5/_generated_6e276f5b2cc5145.goc differ diff --git a/build/default_html5/_generated_6e6ecca7f4582c8.collisionobject b/build/default_html5/_generated_6e6ecca7f4582c8.collisionobject new file mode 100644 index 0000000..e42edb5 --- /dev/null +++ b/build/default_html5/_generated_6e6ecca7f4582c8.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 729.0 + y: 21.0 + } + rotation { + z: 0.015301545 + w: 0.9998829 + } + index: 0 + count: 3 + } + data: 333.5412 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_6e6ecca7f4582c8.collisionobjectc b/build/default_html5/_generated_6e6ecca7f4582c8.collisionobjectc new file mode 100644 index 0000000..06df116 Binary files /dev/null and b/build/default_html5/_generated_6e6ecca7f4582c8.collisionobjectc differ diff --git a/build/default_html5/_generated_6ef2fcfff156890d.sprite b/build/default_html5/_generated_6ef2fcfff156890d.sprite new file mode 100644 index 0000000..58b934a --- /dev/null +++ b/build/default_html5/_generated_6ef2fcfff156890d.sprite @@ -0,0 +1,6 @@ +default_animation: "GameOverScreen" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_6ef2fcfff156890d.spritec b/build/default_html5/_generated_6ef2fcfff156890d.spritec new file mode 100644 index 0000000..9e96dd9 --- /dev/null +++ b/build/default_html5/_generated_6ef2fcfff156890d.spritec @@ -0,0 +1,2 @@ +GameOverScreen$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_6f8033e5cc4364c3.sprite b/build/default_html5/_generated_6f8033e5cc4364c3.sprite new file mode 100644 index 0000000..5c864f9 --- /dev/null +++ b/build/default_html5/_generated_6f8033e5cc4364c3.sprite @@ -0,0 +1,6 @@ +default_animation: "cursemummy" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_6f8033e5cc4364c3.spritec b/build/default_html5/_generated_6f8033e5cc4364c3.spritec new file mode 100644 index 0000000..c7d5a7c --- /dev/null +++ b/build/default_html5/_generated_6f8033e5cc4364c3.spritec @@ -0,0 +1,3 @@ + +cursemummy$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_70fb67d826115a77.compcount_go b/build/default_html5/_generated_70fb67d826115a77.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_70fb67d826115a77.compcount_go differ diff --git a/build/default_html5/_generated_70fb67d826115a77.go b/build/default_html5/_generated_70fb67d826115a77.go new file mode 100644 index 0000000..ff1c4e4 --- /dev/null +++ b/build/default_html5/_generated_70fb67d826115a77.go @@ -0,0 +1,9 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" +} diff --git a/build/default_html5/_generated_70fb67d826115a77.goc b/build/default_html5/_generated_70fb67d826115a77.goc new file mode 100644 index 0000000..5511a48 Binary files /dev/null and b/build/default_html5/_generated_70fb67d826115a77.goc differ diff --git a/build/default_html5/_generated_729a9337d828d2b8.collisionobject b/build/default_html5/_generated_729a9337d828d2b8.collisionobject new file mode 100644 index 0000000..1427792 --- /dev/null +++ b/build/default_html5/_generated_729a9337d828d2b8.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 387.0 + y: 137.0 + } + rotation { + z: -0.012696929 + w: 0.9999194 + } + index: 0 + count: 3 + } + data: 388.207 + data: 7.6253576 + data: 10.192 +} diff --git a/build/default_html5/_generated_729a9337d828d2b8.collisionobjectc b/build/default_html5/_generated_729a9337d828d2b8.collisionobjectc new file mode 100644 index 0000000..951bc1b Binary files /dev/null and b/build/default_html5/_generated_729a9337d828d2b8.collisionobjectc differ diff --git a/build/default_html5/_generated_757ef6dba824eb56.collisionobject b/build/default_html5/_generated_757ef6dba824eb56.collisionobject new file mode 100644 index 0000000..1772640 --- /dev/null +++ b/build/default_html5/_generated_757ef6dba824eb56.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 610.0 + y: 81.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_757ef6dba824eb56.collisionobjectc b/build/default_html5/_generated_757ef6dba824eb56.collisionobjectc new file mode 100644 index 0000000..b195939 Binary files /dev/null and b/build/default_html5/_generated_757ef6dba824eb56.collisionobjectc differ diff --git a/build/default_html5/_generated_77eb838d8e795443.compcount_go b/build/default_html5/_generated_77eb838d8e795443.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_77eb838d8e795443.compcount_go differ diff --git a/build/default_html5/_generated_77eb838d8e795443.go b/build/default_html5/_generated_77eb838d8e795443.go new file mode 100644 index 0000000..a0c8759 --- /dev/null +++ b/build/default_html5/_generated_77eb838d8e795443.go @@ -0,0 +1,14 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: 0.5 + y: 0.5 + z: 0.5 + } +} diff --git a/build/default_html5/_generated_77eb838d8e795443.goc b/build/default_html5/_generated_77eb838d8e795443.goc new file mode 100644 index 0000000..d09861e Binary files /dev/null and b/build/default_html5/_generated_77eb838d8e795443.goc differ diff --git a/build/default_html5/_generated_7e5931cddf5bf97f.sprite b/build/default_html5/_generated_7e5931cddf5bf97f.sprite new file mode 100644 index 0000000..70835a6 --- /dev/null +++ b/build/default_html5/_generated_7e5931cddf5bf97f.sprite @@ -0,0 +1,6 @@ +default_animation: "amulet" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_7e5931cddf5bf97f.spritec b/build/default_html5/_generated_7e5931cddf5bf97f.spritec new file mode 100644 index 0000000..5527bed --- /dev/null +++ b/build/default_html5/_generated_7e5931cddf5bf97f.spritec @@ -0,0 +1,2 @@ +amulet$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_7ec519e316a19a51.collisionobject b/build/default_html5/_generated_7ec519e316a19a51.collisionobject new file mode 100644 index 0000000..8836ab8 --- /dev/null +++ b/build/default_html5/_generated_7ec519e316a19a51.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "ladder" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 365.0 + y: 71.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 21.718147 + data: 32.986557 + data: 10.0 +} diff --git a/build/default_html5/_generated_7ec519e316a19a51.collisionobjectc b/build/default_html5/_generated_7ec519e316a19a51.collisionobjectc new file mode 100644 index 0000000..1d7fdf6 Binary files /dev/null and b/build/default_html5/_generated_7ec519e316a19a51.collisionobjectc differ diff --git a/build/default_html5/_generated_7f2a758c46bffadf.compcount_go b/build/default_html5/_generated_7f2a758c46bffadf.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_7f2a758c46bffadf.compcount_go differ diff --git a/build/default_html5/_generated_7f2a758c46bffadf.go b/build/default_html5/_generated_7f2a758c46bffadf.go new file mode 100644 index 0000000..fdcb660 --- /dev/null +++ b/build/default_html5/_generated_7f2a758c46bffadf.go @@ -0,0 +1,13 @@ +components { + id: "scoreboard" + component: "/main/scoreboard.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"scoreboard\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 447.0 + y: 293.0 + } +} diff --git a/build/default_html5/_generated_7f2a758c46bffadf.goc b/build/default_html5/_generated_7f2a758c46bffadf.goc new file mode 100644 index 0000000..cc38433 Binary files /dev/null and b/build/default_html5/_generated_7f2a758c46bffadf.goc differ diff --git a/build/default_html5/_generated_7fd116812ffe09cc.collisionobject b/build/default_html5/_generated_7fd116812ffe09cc.collisionobject new file mode 100644 index 0000000..4457dcd --- /dev/null +++ b/build/default_html5/_generated_7fd116812ffe09cc.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 727.0 + y: 14.0 + } + rotation { + z: 0.010910967 + w: 0.99994045 + } + index: 0 + count: 3 + } + data: 333.5412 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_7fd116812ffe09cc.collisionobjectc b/build/default_html5/_generated_7fd116812ffe09cc.collisionobjectc new file mode 100644 index 0000000..6e61d83 Binary files /dev/null and b/build/default_html5/_generated_7fd116812ffe09cc.collisionobjectc differ diff --git a/build/default_html5/_generated_8186a7c23dc35e54.collisionobject b/build/default_html5/_generated_8186a7c23dc35e54.collisionobject new file mode 100644 index 0000000..4139f06 --- /dev/null +++ b/build/default_html5/_generated_8186a7c23dc35e54.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 385.0 + y: 138.0 + } + rotation { + z: -0.010337459 + w: 0.9999466 + } + index: 0 + count: 3 + } + data: 385.85358 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_8186a7c23dc35e54.collisionobjectc b/build/default_html5/_generated_8186a7c23dc35e54.collisionobjectc new file mode 100644 index 0000000..b3f4a75 Binary files /dev/null and b/build/default_html5/_generated_8186a7c23dc35e54.collisionobjectc differ diff --git a/build/default_html5/_generated_82802b4271728094.compcount_go b/build/default_html5/_generated_82802b4271728094.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_82802b4271728094.compcount_go differ diff --git a/build/default_html5/_generated_82802b4271728094.go b/build/default_html5/_generated_82802b4271728094.go new file mode 100644 index 0000000..ab3153e --- /dev/null +++ b/build/default_html5/_generated_82802b4271728094.go @@ -0,0 +1,13 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"startscreen\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 344.0 + } + scale { + x: 0.9915 + y: 0.99 + } +} diff --git a/build/default_html5/_generated_82802b4271728094.goc b/build/default_html5/_generated_82802b4271728094.goc new file mode 100644 index 0000000..eb0f845 Binary files /dev/null and b/build/default_html5/_generated_82802b4271728094.goc differ diff --git a/build/default_html5/_generated_847d82f55e0f5a1c.compcount_go b/build/default_html5/_generated_847d82f55e0f5a1c.compcount_go new file mode 100644 index 0000000..a69c806 Binary files /dev/null and b/build/default_html5/_generated_847d82f55e0f5a1c.compcount_go differ diff --git a/build/default_html5/_generated_847d82f55e0f5a1c.go b/build/default_html5/_generated_847d82f55e0f5a1c.go new file mode 100644 index 0000000..b161b81 --- /dev/null +++ b/build/default_html5/_generated_847d82f55e0f5a1c.go @@ -0,0 +1,4 @@ +components { + id: "scoreboard" + component: "/main/scoreboard.gui" +} diff --git a/build/default_html5/_generated_847d82f55e0f5a1c.goc b/build/default_html5/_generated_847d82f55e0f5a1c.goc new file mode 100644 index 0000000..0bf9005 Binary files /dev/null and b/build/default_html5/_generated_847d82f55e0f5a1c.goc differ diff --git a/build/default_html5/_generated_886a9d5690698724.sprite b/build/default_html5/_generated_886a9d5690698724.sprite new file mode 100644 index 0000000..5c0ca5d --- /dev/null +++ b/build/default_html5/_generated_886a9d5690698724.sprite @@ -0,0 +1,6 @@ +default_animation: "enternamescreen" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_886a9d5690698724.spritec b/build/default_html5/_generated_886a9d5690698724.spritec new file mode 100644 index 0000000..08597e8 --- /dev/null +++ b/build/default_html5/_generated_886a9d5690698724.spritec @@ -0,0 +1,2 @@ +enternamescreen$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_88892236f9607330.sprite b/build/default_html5/_generated_88892236f9607330.sprite new file mode 100644 index 0000000..4b5b2e8 --- /dev/null +++ b/build/default_html5/_generated_88892236f9607330.sprite @@ -0,0 +1,6 @@ +default_animation: "Instructionsscreen" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_88892236f9607330.spritec b/build/default_html5/_generated_88892236f9607330.spritec new file mode 100644 index 0000000..224b3c7 --- /dev/null +++ b/build/default_html5/_generated_88892236f9607330.spritec @@ -0,0 +1,2 @@ +Instructionsscreen$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_8abb136f0699bbb4.compcount_go b/build/default_html5/_generated_8abb136f0699bbb4.compcount_go new file mode 100644 index 0000000..a69c806 Binary files /dev/null and b/build/default_html5/_generated_8abb136f0699bbb4.compcount_go differ diff --git a/build/default_html5/_generated_8abb136f0699bbb4.go b/build/default_html5/_generated_8abb136f0699bbb4.go new file mode 100644 index 0000000..1a66940 --- /dev/null +++ b/build/default_html5/_generated_8abb136f0699bbb4.go @@ -0,0 +1,4 @@ +components { + id: "startscreen" + component: "/main/startscreen.gui" +} diff --git a/build/default_html5/_generated_8abb136f0699bbb4.goc b/build/default_html5/_generated_8abb136f0699bbb4.goc new file mode 100644 index 0000000..0289690 Binary files /dev/null and b/build/default_html5/_generated_8abb136f0699bbb4.goc differ diff --git a/build/default_html5/_generated_8d2ccdcfdf07e83d.sprite b/build/default_html5/_generated_8d2ccdcfdf07e83d.sprite new file mode 100644 index 0000000..e2ccb50 --- /dev/null +++ b/build/default_html5/_generated_8d2ccdcfdf07e83d.sprite @@ -0,0 +1,6 @@ +default_animation: "still_right" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_8d2ccdcfdf07e83d.spritec b/build/default_html5/_generated_8d2ccdcfdf07e83d.spritec new file mode 100644 index 0000000..c423fd7 --- /dev/null +++ b/build/default_html5/_generated_8d2ccdcfdf07e83d.spritec @@ -0,0 +1,2 @@ + still_right$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_8eac6d007cbde53a.collisionobject b/build/default_html5/_generated_8eac6d007cbde53a.collisionobject new file mode 100644 index 0000000..c80e682 --- /dev/null +++ b/build/default_html5/_generated_8eac6d007cbde53a.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_DYNAMIC +mass: 1.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "platform" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 365.0 + y: 44.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 21.752527 + data: 5.8068023 + data: 10.0 +} +linear_damping: 1.0 +locked_rotation: true diff --git a/build/default_html5/_generated_8eac6d007cbde53a.collisionobjectc b/build/default_html5/_generated_8eac6d007cbde53a.collisionobjectc new file mode 100644 index 0000000..63243c4 Binary files /dev/null and b/build/default_html5/_generated_8eac6d007cbde53a.collisionobjectc differ diff --git a/build/default_html5/_generated_8fc8ed98ebf4b283.sprite b/build/default_html5/_generated_8fc8ed98ebf4b283.sprite new file mode 100644 index 0000000..e673222 --- /dev/null +++ b/build/default_html5/_generated_8fc8ed98ebf4b283.sprite @@ -0,0 +1,10 @@ +default_animation: "still_right" +material: "/builtins/materials/sprite.material" +size { + x: 105.0 + y: 154.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_8fc8ed98ebf4b283.spritec b/build/default_html5/_generated_8fc8ed98ebf4b283.spritec new file mode 100644 index 0000000..e3db474 Binary files /dev/null and b/build/default_html5/_generated_8fc8ed98ebf4b283.spritec differ diff --git a/build/default_html5/_generated_91fcd5742a792f52.sprite b/build/default_html5/_generated_91fcd5742a792f52.sprite new file mode 100644 index 0000000..574dfed --- /dev/null +++ b/build/default_html5/_generated_91fcd5742a792f52.sprite @@ -0,0 +1,10 @@ +default_animation: "platformsegment" +material: "/builtins/materials/sprite.material" +size { + x: 420.0 + y: 97.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_91fcd5742a792f52.spritec b/build/default_html5/_generated_91fcd5742a792f52.spritec new file mode 100644 index 0000000..5f452c4 Binary files /dev/null and b/build/default_html5/_generated_91fcd5742a792f52.spritec differ diff --git a/build/default_html5/_generated_925be404a138a630.compcount_go b/build/default_html5/_generated_925be404a138a630.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_925be404a138a630.compcount_go differ diff --git a/build/default_html5/_generated_925be404a138a630.go b/build/default_html5/_generated_925be404a138a630.go new file mode 100644 index 0000000..fc20e1d --- /dev/null +++ b/build/default_html5/_generated_925be404a138a630.go @@ -0,0 +1,18 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 654.0 + y: 408.0 + } + scale { + x: 0.5 + y: 0.5 + z: 0.5 + } +} diff --git a/build/default_html5/_generated_925be404a138a630.goc b/build/default_html5/_generated_925be404a138a630.goc new file mode 100644 index 0000000..e3d0641 Binary files /dev/null and b/build/default_html5/_generated_925be404a138a630.goc differ diff --git a/build/default_html5/_generated_92c7e9ad024da47.sprite b/build/default_html5/_generated_92c7e9ad024da47.sprite new file mode 100644 index 0000000..f64d48e --- /dev/null +++ b/build/default_html5/_generated_92c7e9ad024da47.sprite @@ -0,0 +1,6 @@ +default_animation: "bottomuprightplatform" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_92c7e9ad024da47.spritec b/build/default_html5/_generated_92c7e9ad024da47.spritec new file mode 100644 index 0000000..932c482 --- /dev/null +++ b/build/default_html5/_generated_92c7e9ad024da47.spritec @@ -0,0 +1,2 @@ +bottomuprightplatform$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_959ab0edc2c2fea9.compcount_go b/build/default_html5/_generated_959ab0edc2c2fea9.compcount_go new file mode 100644 index 0000000..5ccb310 Binary files /dev/null and b/build/default_html5/_generated_959ab0edc2c2fea9.compcount_go differ diff --git a/build/default_html5/_generated_959ab0edc2c2fea9.go b/build/default_html5/_generated_959ab0edc2c2fea9.go new file mode 100644 index 0000000..acce2ab --- /dev/null +++ b/build/default_html5/_generated_959ab0edc2c2fea9.go @@ -0,0 +1,24 @@ +components { + id: "mummy" + component: "/main/mummy.script" +} +embedded_components { + id: "still" + type: "sprite" + data: "default_animation: \"stillmummy\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: -0.4 + y: 0.4 + z: 0.4 + } +} +embedded_components { + id: "curse" + type: "sprite" + data: "default_animation: \"cursemummy\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: -0.63 + y: 0.63 + z: 0.63 + } +} diff --git a/build/default_html5/_generated_959ab0edc2c2fea9.goc b/build/default_html5/_generated_959ab0edc2c2fea9.goc new file mode 100644 index 0000000..81c27bc Binary files /dev/null and b/build/default_html5/_generated_959ab0edc2c2fea9.goc differ diff --git a/build/default_html5/_generated_962c878f3a6abbed.compcount_go b/build/default_html5/_generated_962c878f3a6abbed.compcount_go new file mode 100644 index 0000000..a69c806 Binary files /dev/null and b/build/default_html5/_generated_962c878f3a6abbed.compcount_go differ diff --git a/build/default_html5/_generated_962c878f3a6abbed.go b/build/default_html5/_generated_962c878f3a6abbed.go new file mode 100644 index 0000000..75fb514 --- /dev/null +++ b/build/default_html5/_generated_962c878f3a6abbed.go @@ -0,0 +1,4 @@ +components { + id: "button" + component: "/main/button.gui" +} diff --git a/build/default_html5/_generated_962c878f3a6abbed.goc b/build/default_html5/_generated_962c878f3a6abbed.goc new file mode 100644 index 0000000..dea2179 Binary files /dev/null and b/build/default_html5/_generated_962c878f3a6abbed.goc differ diff --git a/build/default_html5/_generated_98bc9cd600800ae1.sprite b/build/default_html5/_generated_98bc9cd600800ae1.sprite new file mode 100644 index 0000000..90c8966 --- /dev/null +++ b/build/default_html5/_generated_98bc9cd600800ae1.sprite @@ -0,0 +1,6 @@ +default_animation: "scoreboard" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_98bc9cd600800ae1.spritec b/build/default_html5/_generated_98bc9cd600800ae1.spritec new file mode 100644 index 0000000..17ccd20 --- /dev/null +++ b/build/default_html5/_generated_98bc9cd600800ae1.spritec @@ -0,0 +1,3 @@ + +scoreboard$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_9a5c9f9eeb04280.compcount_go b/build/default_html5/_generated_9a5c9f9eeb04280.compcount_go new file mode 100644 index 0000000..8c9fc30 Binary files /dev/null and b/build/default_html5/_generated_9a5c9f9eeb04280.compcount_go differ diff --git a/build/default_html5/_generated_9a5c9f9eeb04280.go b/build/default_html5/_generated_9a5c9f9eeb04280.go new file mode 100644 index 0000000..86f176d --- /dev/null +++ b/build/default_html5/_generated_9a5c9f9eeb04280.go @@ -0,0 +1,19 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"default\"\nmask: \"default\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 23.418262\n data: 58.742554\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_9a5c9f9eeb04280.goc b/build/default_html5/_generated_9a5c9f9eeb04280.goc new file mode 100644 index 0000000..90a9556 Binary files /dev/null and b/build/default_html5/_generated_9a5c9f9eeb04280.goc differ diff --git a/build/default_html5/_generated_9b4ffbdff40004c2.sprite b/build/default_html5/_generated_9b4ffbdff40004c2.sprite new file mode 100644 index 0000000..e591132 --- /dev/null +++ b/build/default_html5/_generated_9b4ffbdff40004c2.sprite @@ -0,0 +1,6 @@ +default_animation: "cloud1" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_9b4ffbdff40004c2.spritec b/build/default_html5/_generated_9b4ffbdff40004c2.spritec new file mode 100644 index 0000000..2691b9f --- /dev/null +++ b/build/default_html5/_generated_9b4ffbdff40004c2.spritec @@ -0,0 +1,2 @@ +cloud1$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_9c59903058f0c647.collisionobject b/build/default_html5/_generated_9c59903058f0c647.collisionobject new file mode 100644 index 0000000..153156f --- /dev/null +++ b/build/default_html5/_generated_9c59903058f0c647.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 456.0 + y: 207.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_9c59903058f0c647.collisionobjectc b/build/default_html5/_generated_9c59903058f0c647.collisionobjectc new file mode 100644 index 0000000..7528b4f Binary files /dev/null and b/build/default_html5/_generated_9c59903058f0c647.collisionobjectc differ diff --git a/build/default_html5/_generated_NEWFONT_ab84e69480ecddd3.glyph_bankc b/build/default_html5/_generated_NEWFONT_ab84e69480ecddd3.glyph_bankc new file mode 100644 index 0000000..2683e4c Binary files /dev/null and b/build/default_html5/_generated_NEWFONT_ab84e69480ecddd3.glyph_bankc differ diff --git a/build/default_html5/_generated_a1630cc83cbbc679.compcount_go b/build/default_html5/_generated_a1630cc83cbbc679.compcount_go new file mode 100644 index 0000000..a48693b Binary files /dev/null and b/build/default_html5/_generated_a1630cc83cbbc679.compcount_go differ diff --git a/build/default_html5/_generated_a1630cc83cbbc679.go b/build/default_html5/_generated_a1630cc83cbbc679.go new file mode 100644 index 0000000..e9476c7 --- /dev/null +++ b/build/default_html5/_generated_a1630cc83cbbc679.go @@ -0,0 +1,14 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "collectionfactory" + type: "collectionfactory" + data: "prototype: \"/main/curses.collection\"\n" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" +} diff --git a/build/default_html5/_generated_a1630cc83cbbc679.goc b/build/default_html5/_generated_a1630cc83cbbc679.goc new file mode 100644 index 0000000..457d767 Binary files /dev/null and b/build/default_html5/_generated_a1630cc83cbbc679.goc differ diff --git a/build/default_html5/_generated_a170a90296ce77cc.sprite b/build/default_html5/_generated_a170a90296ce77cc.sprite new file mode 100644 index 0000000..5128f9a --- /dev/null +++ b/build/default_html5/_generated_a170a90296ce77cc.sprite @@ -0,0 +1,6 @@ +default_animation: "GameBackground" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_a170a90296ce77cc.spritec b/build/default_html5/_generated_a170a90296ce77cc.spritec new file mode 100644 index 0000000..84b93d5 --- /dev/null +++ b/build/default_html5/_generated_a170a90296ce77cc.spritec @@ -0,0 +1,2 @@ +GameBackground$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_a31e398a510123c3.compcount_go b/build/default_html5/_generated_a31e398a510123c3.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_a31e398a510123c3.compcount_go differ diff --git a/build/default_html5/_generated_a31e398a510123c3.go b/build/default_html5/_generated_a31e398a510123c3.go new file mode 100644 index 0000000..566c548 --- /dev/null +++ b/build/default_html5/_generated_a31e398a510123c3.go @@ -0,0 +1,21 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.3 + } + scale { + x: 0.2 + y: 0.2 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"curse\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n y: 2.0\n }\n rotation {\n }\n index: 0\n count: 3\n id: \"curse_collission\"\n }\n data: 16.666666\n data: 21.43634\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_a31e398a510123c3.goc b/build/default_html5/_generated_a31e398a510123c3.goc new file mode 100644 index 0000000..7cca368 Binary files /dev/null and b/build/default_html5/_generated_a31e398a510123c3.goc differ diff --git a/build/default_html5/_generated_a4e530385e47c84a.sprite b/build/default_html5/_generated_a4e530385e47c84a.sprite new file mode 100644 index 0000000..e38fa29 --- /dev/null +++ b/build/default_html5/_generated_a4e530385e47c84a.sprite @@ -0,0 +1,6 @@ +default_animation: "UpRightPlatform" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_a4e530385e47c84a.spritec b/build/default_html5/_generated_a4e530385e47c84a.spritec new file mode 100644 index 0000000..c9b7455 --- /dev/null +++ b/build/default_html5/_generated_a4e530385e47c84a.spritec @@ -0,0 +1,2 @@ +UpRightPlatform$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_a8d31d08c99e6e81.compcount_go b/build/default_html5/_generated_a8d31d08c99e6e81.compcount_go new file mode 100644 index 0000000..8c9fc30 Binary files /dev/null and b/build/default_html5/_generated_a8d31d08c99e6e81.compcount_go differ diff --git a/build/default_html5/_generated_a8d31d08c99e6e81.go b/build/default_html5/_generated_a8d31d08c99e6e81.go new file mode 100644 index 0000000..80a720d --- /dev/null +++ b/build/default_html5/_generated_a8d31d08c99e6e81.go @@ -0,0 +1,19 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_DYNAMIC\nmass: 1.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"default\"\nmask: \"default\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 23.418262\n data: 58.742554\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_a8d31d08c99e6e81.goc b/build/default_html5/_generated_a8d31d08c99e6e81.goc new file mode 100644 index 0000000..7cd7771 Binary files /dev/null and b/build/default_html5/_generated_a8d31d08c99e6e81.goc differ diff --git a/build/default_html5/_generated_a9053adfb6ea5f08.collectionfactory b/build/default_html5/_generated_a9053adfb6ea5f08.collectionfactory new file mode 100644 index 0000000..2d62b7e --- /dev/null +++ b/build/default_html5/_generated_a9053adfb6ea5f08.collectionfactory @@ -0,0 +1 @@ +prototype: "" diff --git a/build/default_html5/_generated_ac1c5d4377bcde97.compcount_go b/build/default_html5/_generated_ac1c5d4377bcde97.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_ac1c5d4377bcde97.compcount_go differ diff --git a/build/default_html5/_generated_ac1c5d4377bcde97.go b/build/default_html5/_generated_ac1c5d4377bcde97.go new file mode 100644 index 0000000..52d41ff --- /dev/null +++ b/build/default_html5/_generated_ac1c5d4377bcde97.go @@ -0,0 +1,14 @@ +components { + id: "mummy" + component: "/main/mummy.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"stillmummy\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: -0.4 + y: 0.4 + z: 0.4 + } +} diff --git a/build/default_html5/_generated_ac1c5d4377bcde97.goc b/build/default_html5/_generated_ac1c5d4377bcde97.goc new file mode 100644 index 0000000..c362f84 Binary files /dev/null and b/build/default_html5/_generated_ac1c5d4377bcde97.goc differ diff --git a/build/default_html5/_generated_aeea160ce7553c49.collisionobject b/build/default_html5/_generated_aeea160ce7553c49.collisionobject new file mode 100644 index 0000000..1e5ef50 --- /dev/null +++ b/build/default_html5/_generated_aeea160ce7553c49.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 662.0 + y: 529.0 + } + rotation { + z: 0.013529582 + w: 0.99990845 + } + index: 0 + count: 3 + } + data: 401.32773 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_aeea160ce7553c49.collisionobjectc b/build/default_html5/_generated_aeea160ce7553c49.collisionobjectc new file mode 100644 index 0000000..5710638 Binary files /dev/null and b/build/default_html5/_generated_aeea160ce7553c49.collisionobjectc differ diff --git a/build/default_html5/_generated_b020700d2dea160a.compcount_go b/build/default_html5/_generated_b020700d2dea160a.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_b020700d2dea160a.compcount_go differ diff --git a/build/default_html5/_generated_b020700d2dea160a.go b/build/default_html5/_generated_b020700d2dea160a.go new file mode 100644 index 0000000..760b8fd --- /dev/null +++ b/build/default_html5/_generated_b020700d2dea160a.go @@ -0,0 +1,21 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.3 + } + scale { + x: 0.2 + y: 0.2 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"curse\"\nmask: \"player\"\nmask: \"holding_amulet\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n y: 2.0\n }\n rotation {\n }\n index: 0\n count: 3\n id: \"curse_collission\"\n }\n data: 16.666666\n data: 21.43634\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_b020700d2dea160a.goc b/build/default_html5/_generated_b020700d2dea160a.goc new file mode 100644 index 0000000..3026121 Binary files /dev/null and b/build/default_html5/_generated_b020700d2dea160a.goc differ diff --git a/build/default_html5/_generated_b103c7359689da0b.collectionproxy b/build/default_html5/_generated_b103c7359689da0b.collectionproxy new file mode 100644 index 0000000..7af4291 --- /dev/null +++ b/build/default_html5/_generated_b103c7359689da0b.collectionproxy @@ -0,0 +1 @@ +collection: "/main/scoreboard.collection" diff --git a/build/default_html5/_generated_b103c7359689da0b.collectionproxyc b/build/default_html5/_generated_b103c7359689da0b.collectionproxyc new file mode 100644 index 0000000..9ab8dc7 --- /dev/null +++ b/build/default_html5/_generated_b103c7359689da0b.collectionproxyc @@ -0,0 +1,2 @@ + +/main/scoreboard.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_b2dad5d3deef97e6.compcount_go b/build/default_html5/_generated_b2dad5d3deef97e6.compcount_go new file mode 100644 index 0000000..0c32cbe Binary files /dev/null and b/build/default_html5/_generated_b2dad5d3deef97e6.compcount_go differ diff --git a/build/default_html5/_generated_b2dad5d3deef97e6.go b/build/default_html5/_generated_b2dad5d3deef97e6.go new file mode 100644 index 0000000..acbc8fa --- /dev/null +++ b/build/default_html5/_generated_b2dad5d3deef97e6.go @@ -0,0 +1,30 @@ +components { + id: "player" + component: "/main/player.script" +} +components { + id: "debug" + component: "/main/debug.gui" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n y: -30.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 3.5919755\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_b2dad5d3deef97e6.goc b/build/default_html5/_generated_b2dad5d3deef97e6.goc new file mode 100644 index 0000000..fb706ea Binary files /dev/null and b/build/default_html5/_generated_b2dad5d3deef97e6.goc differ diff --git a/build/default_html5/_generated_bcda36fb55c04451.compcount_go b/build/default_html5/_generated_bcda36fb55c04451.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_bcda36fb55c04451.compcount_go differ diff --git a/build/default_html5/_generated_bcda36fb55c04451.go b/build/default_html5/_generated_bcda36fb55c04451.go new file mode 100644 index 0000000..9b5a28f --- /dev/null +++ b/build/default_html5/_generated_bcda36fb55c04451.go @@ -0,0 +1,14 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: 0.2 + y: 0.2 + z: 0.2 + } +} diff --git a/build/default_html5/_generated_bcda36fb55c04451.goc b/build/default_html5/_generated_bcda36fb55c04451.goc new file mode 100644 index 0000000..6428aed Binary files /dev/null and b/build/default_html5/_generated_bcda36fb55c04451.goc differ diff --git a/build/default_html5/_generated_bd30462052881e40.collectionfactory b/build/default_html5/_generated_bd30462052881e40.collectionfactory new file mode 100644 index 0000000..501ff0d --- /dev/null +++ b/build/default_html5/_generated_bd30462052881e40.collectionfactory @@ -0,0 +1 @@ +prototype: "/main/curses.collection" diff --git a/build/default_html5/_generated_bd30462052881e40.collectionfactoryc b/build/default_html5/_generated_bd30462052881e40.collectionfactoryc new file mode 100644 index 0000000..bdf4896 --- /dev/null +++ b/build/default_html5/_generated_bd30462052881e40.collectionfactoryc @@ -0,0 +1,2 @@ + +/main/curses.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_c1934409c37b404.collisionobject b/build/default_html5/_generated_c1934409c37b404.collisionobject new file mode 100644 index 0000000..a59bf41 --- /dev/null +++ b/build/default_html5/_generated_c1934409c37b404.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 660.0 + y: 263.0 + } + rotation { + z: 0.013529582 + w: 0.99990845 + } + index: 0 + count: 3 + } + data: 401.32773 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_c1934409c37b404.collisionobjectc b/build/default_html5/_generated_c1934409c37b404.collisionobjectc new file mode 100644 index 0000000..9e13dca Binary files /dev/null and b/build/default_html5/_generated_c1934409c37b404.collisionobjectc differ diff --git a/build/default_html5/_generated_c1cb672cb45c32d3.compcount_go b/build/default_html5/_generated_c1cb672cb45c32d3.compcount_go new file mode 100644 index 0000000..b535a9a Binary files /dev/null and b/build/default_html5/_generated_c1cb672cb45c32d3.compcount_go differ diff --git a/build/default_html5/_generated_c1cb672cb45c32d3.go b/build/default_html5/_generated_c1cb672cb45c32d3.go new file mode 100644 index 0000000..56b57bb --- /dev/null +++ b/build/default_html5/_generated_c1cb672cb45c32d3.go @@ -0,0 +1,19 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "collectionfactory" + type: "collectionfactory" + data: "prototype: \"/main/level1.collection\"\n" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: 0.2 + y: 0.2 + z: 0.2 + } +} diff --git a/build/default_html5/_generated_c1cb672cb45c32d3.goc b/build/default_html5/_generated_c1cb672cb45c32d3.goc new file mode 100644 index 0000000..747c24e Binary files /dev/null and b/build/default_html5/_generated_c1cb672cb45c32d3.goc differ diff --git a/build/default_html5/_generated_c9336bb34adb949c.collectionfactory b/build/default_html5/_generated_c9336bb34adb949c.collectionfactory new file mode 100644 index 0000000..2e5e5e1 --- /dev/null +++ b/build/default_html5/_generated_c9336bb34adb949c.collectionfactory @@ -0,0 +1 @@ +prototype: "/main/level1.collection" diff --git a/build/default_html5/_generated_c9336bb34adb949c.collectionfactoryc b/build/default_html5/_generated_c9336bb34adb949c.collectionfactoryc new file mode 100644 index 0000000..c69f646 --- /dev/null +++ b/build/default_html5/_generated_c9336bb34adb949c.collectionfactoryc @@ -0,0 +1,2 @@ + +/main/level1.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_c96b9f40fb3d694c.compcount_go b/build/default_html5/_generated_c96b9f40fb3d694c.compcount_go new file mode 100644 index 0000000..8a9d953 Binary files /dev/null and b/build/default_html5/_generated_c96b9f40fb3d694c.compcount_go differ diff --git a/build/default_html5/_generated_c96b9f40fb3d694c.go b/build/default_html5/_generated_c96b9f40fb3d694c.go new file mode 100644 index 0000000..debea5e --- /dev/null +++ b/build/default_html5/_generated_c96b9f40fb3d694c.go @@ -0,0 +1,76 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 617.0 + y: 85.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 610.0\n y: 81.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 59.53719\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder1" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 464.0 + y: 210.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 456.0\n y: 207.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder2" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 711.0 + y: 340.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} +embedded_components { + id: "collisionobject2" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 704.0\n y: 335.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 61.03573\n data: 10.0\n}\n" +} +embedded_components { + id: "collisionobject3" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 559.0\n y: 470.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 66.745285\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder3" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 470.0 + z: 0.2 + } + scale { + x: 0.727569 + y: 1.127384 + } +} diff --git a/build/default_html5/_generated_c96b9f40fb3d694c.goc b/build/default_html5/_generated_c96b9f40fb3d694c.goc new file mode 100644 index 0000000..90f466c Binary files /dev/null and b/build/default_html5/_generated_c96b9f40fb3d694c.goc differ diff --git a/build/default_html5/_generated_cd0b45a490820513.collisionobject b/build/default_html5/_generated_cd0b45a490820513.collisionobject new file mode 100644 index 0000000..d725e6b --- /dev/null +++ b/build/default_html5/_generated_cd0b45a490820513.collisionobject @@ -0,0 +1,20 @@ +type: COLLISION_OBJECT_TYPE_KINEMATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "player" +mask: "ladder" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + } + rotation { + } + index: 0 + count: 3 + } + data: 21.718147 + data: 32.986557 + data: 10.0 +} diff --git a/build/default_html5/_generated_cd0b45a490820513.collisionobjectc b/build/default_html5/_generated_cd0b45a490820513.collisionobjectc new file mode 100644 index 0000000..76e41ae Binary files /dev/null and b/build/default_html5/_generated_cd0b45a490820513.collisionobjectc differ diff --git a/build/default_html5/_generated_cd84d593a3246da5.collisionobject b/build/default_html5/_generated_cd84d593a3246da5.collisionobject new file mode 100644 index 0000000..ecfed6d --- /dev/null +++ b/build/default_html5/_generated_cd84d593a3246da5.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 558.0 + y: 83.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_cd84d593a3246da5.collisionobjectc b/build/default_html5/_generated_cd84d593a3246da5.collisionobjectc new file mode 100644 index 0000000..aff0508 Binary files /dev/null and b/build/default_html5/_generated_cd84d593a3246da5.collisionobjectc differ diff --git a/build/default_html5/_generated_cdf7cf5f280ae46d.compcount_go b/build/default_html5/_generated_cdf7cf5f280ae46d.compcount_go new file mode 100644 index 0000000..99befd5 Binary files /dev/null and b/build/default_html5/_generated_cdf7cf5f280ae46d.compcount_go differ diff --git a/build/default_html5/_generated_cdf7cf5f280ae46d.go b/build/default_html5/_generated_cdf7cf5f280ae46d.go new file mode 100644 index 0000000..f365014 --- /dev/null +++ b/build/default_html5/_generated_cdf7cf5f280ae46d.go @@ -0,0 +1,22 @@ +components { + id: "holdingamulet" + component: "/main/holdingamulet.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"amulet\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.4 + } + scale { + x: 0.18 + y: 0.18 + z: 1.0E-6 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"holding_amulet\"\nmask: \"curse\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 13.696037\n data: 15.172706\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_cdf7cf5f280ae46d.goc b/build/default_html5/_generated_cdf7cf5f280ae46d.goc new file mode 100644 index 0000000..355c6d3 Binary files /dev/null and b/build/default_html5/_generated_cdf7cf5f280ae46d.goc differ diff --git a/build/default_html5/_generated_d1cac7724c12bd46.compcount_go b/build/default_html5/_generated_d1cac7724c12bd46.compcount_go new file mode 100644 index 0000000..541217d Binary files /dev/null and b/build/default_html5/_generated_d1cac7724c12bd46.compcount_go differ diff --git a/build/default_html5/_generated_d1cac7724c12bd46.go b/build/default_html5/_generated_d1cac7724c12bd46.go new file mode 100644 index 0000000..367c372 --- /dev/null +++ b/build/default_html5/_generated_d1cac7724c12bd46.go @@ -0,0 +1,33 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 565.0 + y: 87.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 558.0\n y: 83.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder1" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 432.0 + y: 210.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} diff --git a/build/default_html5/_generated_d1cac7724c12bd46.goc b/build/default_html5/_generated_d1cac7724c12bd46.goc new file mode 100644 index 0000000..e3cf139 Binary files /dev/null and b/build/default_html5/_generated_d1cac7724c12bd46.goc differ diff --git a/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobject b/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobject new file mode 100644 index 0000000..6cb42a2 --- /dev/null +++ b/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 382.0 + y: 394.0 + } + rotation { + z: -0.010337459 + w: 0.9999466 + } + index: 0 + count: 3 + } + data: 385.85358 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobjectc b/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobjectc new file mode 100644 index 0000000..b759016 Binary files /dev/null and b/build/default_html5/_generated_d34fad42d7fd4dbe.collisionobjectc differ diff --git a/build/default_html5/_generated_d3e1fe6da0f3fa31.compcount_go b/build/default_html5/_generated_d3e1fe6da0f3fa31.compcount_go new file mode 100644 index 0000000..8a9d953 Binary files /dev/null and b/build/default_html5/_generated_d3e1fe6da0f3fa31.compcount_go differ diff --git a/build/default_html5/_generated_d3e1fe6da0f3fa31.go b/build/default_html5/_generated_d3e1fe6da0f3fa31.go new file mode 100644 index 0000000..32b4e31 --- /dev/null +++ b/build/default_html5/_generated_d3e1fe6da0f3fa31.go @@ -0,0 +1,76 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 617.0 + y: 85.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 610.0\n y: 81.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 59.53719\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder1" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 464.0 + y: 210.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 456.0\n y: 207.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder2" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 709.0 + y: 336.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.96056 + } +} +embedded_components { + id: "collisionobject2" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 704.0\n y: 335.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 61.03573\n data: 10.0\n}\n" +} +embedded_components { + id: "collisionobject3" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 559.0\n y: 470.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 66.745285\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder3" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 470.0 + z: 0.2 + } + scale { + x: 0.727569 + y: 1.127384 + } +} diff --git a/build/default_html5/_generated_d3e1fe6da0f3fa31.goc b/build/default_html5/_generated_d3e1fe6da0f3fa31.goc new file mode 100644 index 0000000..da46f62 Binary files /dev/null and b/build/default_html5/_generated_d3e1fe6da0f3fa31.goc differ diff --git a/build/default_html5/_generated_d4bdcfc1926b056e.collisionobject b/build/default_html5/_generated_d4bdcfc1926b056e.collisionobject new file mode 100644 index 0000000..920a5ad --- /dev/null +++ b/build/default_html5/_generated_d4bdcfc1926b056e.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "ladder" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 610.0 + y: 81.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 7.6510553 + data: 59.53719 + data: 10.0 +} diff --git a/build/default_html5/_generated_d4bdcfc1926b056e.collisionobjectc b/build/default_html5/_generated_d4bdcfc1926b056e.collisionobjectc new file mode 100644 index 0000000..5f3bc44 Binary files /dev/null and b/build/default_html5/_generated_d4bdcfc1926b056e.collisionobjectc differ diff --git a/build/default_html5/_generated_d4ec2114f6dfad3d.compcount_go b/build/default_html5/_generated_d4ec2114f6dfad3d.compcount_go new file mode 100644 index 0000000..b96d650 Binary files /dev/null and b/build/default_html5/_generated_d4ec2114f6dfad3d.compcount_go differ diff --git a/build/default_html5/_generated_d4ec2114f6dfad3d.go b/build/default_html5/_generated_d4ec2114f6dfad3d.go new file mode 100644 index 0000000..50b7d7c --- /dev/null +++ b/build/default_html5/_generated_d4ec2114f6dfad3d.go @@ -0,0 +1,44 @@ +components { + id: "main" + component: "/main/main.script" +} +embedded_components { + id: "level1_proxy" + type: "collectionproxy" + data: "collection: \"/main/level1.collection\"\n" +} +embedded_components { + id: "startscreen_proxy" + type: "collectionproxy" + data: "collection: \"/main/startscreen.collection\"\n" +} +embedded_components { + id: "gameover_proxy" + type: "collectionproxy" + data: "collection: \"/main/gameover.collection\"\n" +} +embedded_components { + id: "scoreboard_proxy" + type: "collectionproxy" + data: "collection: \"/main/scoreboard.collection\"\n" +} +embedded_components { + id: "entername_proxy" + type: "collectionproxy" + data: "collection: \"/main/entername.collection\"\n" +} +embedded_components { + id: "instructions_proxy" + type: "collectionproxy" + data: "collection: \"/main/instructions.collection\"\n" +} +embedded_components { + id: "settings_proxy" + type: "collectionproxy" + data: "collection: \"/main/settings.collection\"\n" +} +embedded_components { + id: "level2_proxy" + type: "collectionproxy" + data: "collection: \"/main/level2.collection\"\n" +} diff --git a/build/default_html5/_generated_d4ec2114f6dfad3d.goc b/build/default_html5/_generated_d4ec2114f6dfad3d.goc new file mode 100644 index 0000000..71a09a4 Binary files /dev/null and b/build/default_html5/_generated_d4ec2114f6dfad3d.goc differ diff --git a/build/default_html5/_generated_dc4b2fe2d3370a3b.compcount_go b/build/default_html5/_generated_dc4b2fe2d3370a3b.compcount_go new file mode 100644 index 0000000..7cafb2e Binary files /dev/null and b/build/default_html5/_generated_dc4b2fe2d3370a3b.compcount_go differ diff --git a/build/default_html5/_generated_dc4b2fe2d3370a3b.go b/build/default_html5/_generated_dc4b2fe2d3370a3b.go new file mode 100644 index 0000000..941542c --- /dev/null +++ b/build/default_html5/_generated_dc4b2fe2d3370a3b.go @@ -0,0 +1,85 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "bottomcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 732.0\n y: 19.0\n }\n rotation {\n z: 0.015301545\n w: 0.9998829\n }\n index: 0\n count: 3\n }\n data: 337.67072\n data: 8.483422\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 574.0 + y: 20.0 + z: 0.1 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "bottomcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 386.0\n y: 146.0\n }\n rotation {\n z: -0.012696929\n w: 0.9999194\n }\n index: 0\n count: 3\n }\n data: 388.207\n data: 0.333248\n data: 10.192\n}\n" +} +embedded_components { + id: "uprightcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 660.0\n y: 263.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 382.0\n y: 394.0\n }\n rotation {\n z: -0.010337459\n w: 0.9999466\n }\n index: 0\n count: 3\n }\n data: 385.85358\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "uprightcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 662.0\n y: 529.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_dc4b2fe2d3370a3b.goc b/build/default_html5/_generated_dc4b2fe2d3370a3b.goc new file mode 100644 index 0000000..62d3b41 Binary files /dev/null and b/build/default_html5/_generated_dc4b2fe2d3370a3b.goc differ diff --git a/build/default_html5/_generated_dd2483d8466255d8.collisionobject b/build/default_html5/_generated_dd2483d8466255d8.collisionobject new file mode 100644 index 0000000..2528646 --- /dev/null +++ b/build/default_html5/_generated_dd2483d8466255d8.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 386.0 + y: 146.0 + } + rotation { + z: -0.012696929 + w: 0.9999194 + } + index: 0 + count: 3 + } + data: 388.207 + data: 0.333248 + data: 10.192 +} diff --git a/build/default_html5/_generated_dd2483d8466255d8.collisionobjectc b/build/default_html5/_generated_dd2483d8466255d8.collisionobjectc new file mode 100644 index 0000000..b30b3c1 Binary files /dev/null and b/build/default_html5/_generated_dd2483d8466255d8.collisionobjectc differ diff --git a/build/default_html5/_generated_dd4d3ebc71081ee.compcount_go b/build/default_html5/_generated_dd4d3ebc71081ee.compcount_go new file mode 100644 index 0000000..a48693b Binary files /dev/null and b/build/default_html5/_generated_dd4d3ebc71081ee.compcount_go differ diff --git a/build/default_html5/_generated_dd4d3ebc71081ee.go b/build/default_html5/_generated_dd4d3ebc71081ee.go new file mode 100644 index 0000000..6e0e291 --- /dev/null +++ b/build/default_html5/_generated_dd4d3ebc71081ee.go @@ -0,0 +1,19 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "collectionfactory" + type: "collectionfactory" + data: "prototype: \"/main/curses.collection\"\n" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: 0.2 + y: 0.2 + z: 0.2 + } +} diff --git a/build/default_html5/_generated_dd4d3ebc71081ee.goc b/build/default_html5/_generated_dd4d3ebc71081ee.goc new file mode 100644 index 0000000..d12a8b6 Binary files /dev/null and b/build/default_html5/_generated_dd4d3ebc71081ee.goc differ diff --git a/build/default_html5/_generated_e04e4756888791f1.compcount_go b/build/default_html5/_generated_e04e4756888791f1.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_e04e4756888791f1.compcount_go differ diff --git a/build/default_html5/_generated_e04e4756888791f1.go b/build/default_html5/_generated_e04e4756888791f1.go new file mode 100644 index 0000000..1cd804a --- /dev/null +++ b/build/default_html5/_generated_e04e4756888791f1.go @@ -0,0 +1,16 @@ +components { + id: "instructions" + component: "/main/instructions.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"Instructionsscreen\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 527.5 + y: 344.0 + } + scale { + x: 0.999 + } +} diff --git a/build/default_html5/_generated_e04e4756888791f1.goc b/build/default_html5/_generated_e04e4756888791f1.goc new file mode 100644 index 0000000..3124cae Binary files /dev/null and b/build/default_html5/_generated_e04e4756888791f1.goc differ diff --git a/build/default_html5/_generated_e0d5e57df0e09697.compcount_go b/build/default_html5/_generated_e0d5e57df0e09697.compcount_go new file mode 100644 index 0000000..73e4cac Binary files /dev/null and b/build/default_html5/_generated_e0d5e57df0e09697.compcount_go differ diff --git a/build/default_html5/_generated_e0d5e57df0e09697.go b/build/default_html5/_generated_e0d5e57df0e09697.go new file mode 100644 index 0000000..8bf35c2 --- /dev/null +++ b/build/default_html5/_generated_e0d5e57df0e09697.go @@ -0,0 +1,17 @@ +components { + id: "curse" + component: "/main/curse.script" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"curse\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 654.0 + y: 408.0 + } + scale { + x: 0.5 + y: 0.5 + } +} diff --git a/build/default_html5/_generated_e0d5e57df0e09697.goc b/build/default_html5/_generated_e0d5e57df0e09697.goc new file mode 100644 index 0000000..0f270bc Binary files /dev/null and b/build/default_html5/_generated_e0d5e57df0e09697.goc differ diff --git a/build/default_html5/_generated_e213b0dff31f1f59.sprite b/build/default_html5/_generated_e213b0dff31f1f59.sprite new file mode 100644 index 0000000..7173e2f --- /dev/null +++ b/build/default_html5/_generated_e213b0dff31f1f59.sprite @@ -0,0 +1,10 @@ +default_animation: "shortladder" +material: "/builtins/materials/sprite.material" +size { + x: 93.0 + y: 165.0 +} +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_e213b0dff31f1f59.spritec b/build/default_html5/_generated_e213b0dff31f1f59.spritec new file mode 100644 index 0000000..525c783 Binary files /dev/null and b/build/default_html5/_generated_e213b0dff31f1f59.spritec differ diff --git a/build/default_html5/_generated_e749e268503d904c.compcount_go b/build/default_html5/_generated_e749e268503d904c.compcount_go new file mode 100644 index 0000000..8a9d953 Binary files /dev/null and b/build/default_html5/_generated_e749e268503d904c.compcount_go differ diff --git a/build/default_html5/_generated_e749e268503d904c.go b/build/default_html5/_generated_e749e268503d904c.go new file mode 100644 index 0000000..a39c0b8 --- /dev/null +++ b/build/default_html5/_generated_e749e268503d904c.go @@ -0,0 +1,76 @@ +embedded_components { + id: "ladder" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 617.0 + y: 85.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.958697 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 610.0\n y: 81.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder1" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 464.0 + y: 210.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 456.0\n y: 207.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 58.742554\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder2" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 711.0 + y: 340.0 + z: 0.2 + } + scale { + x: 0.679529 + y: 0.987675 + } +} +embedded_components { + id: "collisionobject2" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 704.0\n y: 335.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 61.03573\n data: 10.0\n}\n" +} +embedded_components { + id: "collisionobject3" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"ladder\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 559.0\n y: 470.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 7.6510553\n data: 66.745285\n data: 10.0\n}\n" +} +embedded_components { + id: "ladder3" + type: "sprite" + data: "default_animation: \"shortladder\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 93.0\n y: 165.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 566.0 + y: 470.0 + z: 0.2 + } + scale { + x: 0.727569 + y: 1.127384 + } +} diff --git a/build/default_html5/_generated_e749e268503d904c.goc b/build/default_html5/_generated_e749e268503d904c.goc new file mode 100644 index 0000000..e023d8f Binary files /dev/null and b/build/default_html5/_generated_e749e268503d904c.goc differ diff --git a/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxy b/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxy new file mode 100644 index 0000000..e9024db --- /dev/null +++ b/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxy @@ -0,0 +1 @@ +collection: "/main/settings.collection" diff --git a/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxyc b/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxyc new file mode 100644 index 0000000..91759e9 --- /dev/null +++ b/build/default_html5/_generated_e8cbfb71fe23eec8.collectionproxyc @@ -0,0 +1,2 @@ + +/main/settings.collectionc \ No newline at end of file diff --git a/build/default_html5/_generated_e95bcc7f18ee0e3c.sprite b/build/default_html5/_generated_e95bcc7f18ee0e3c.sprite new file mode 100644 index 0000000..eb8c3c1 --- /dev/null +++ b/build/default_html5/_generated_e95bcc7f18ee0e3c.sprite @@ -0,0 +1,6 @@ +default_animation: "pause" +material: "/builtins/materials/sprite.material" +textures { + sampler: "texture_sampler" + texture: "/main/graphics.atlas" +} diff --git a/build/default_html5/_generated_e95bcc7f18ee0e3c.spritec b/build/default_html5/_generated_e95bcc7f18ee0e3c.spritec new file mode 100644 index 0000000..3e1b2f7 --- /dev/null +++ b/build/default_html5/_generated_e95bcc7f18ee0e3c.spritec @@ -0,0 +1,2 @@ +pause$/builtins/materials/sprite.materialcZ/ +texture_sampler/main/graphics.a.texturesetc \ No newline at end of file diff --git a/build/default_html5/_generated_eddfcdf4f469af17.compcount_go b/build/default_html5/_generated_eddfcdf4f469af17.compcount_go new file mode 100644 index 0000000..99094f4 Binary files /dev/null and b/build/default_html5/_generated_eddfcdf4f469af17.compcount_go differ diff --git a/build/default_html5/_generated_eddfcdf4f469af17.go b/build/default_html5/_generated_eddfcdf4f469af17.go new file mode 100644 index 0000000..a64eab1 --- /dev/null +++ b/build/default_html5/_generated_eddfcdf4f469af17.go @@ -0,0 +1,10 @@ +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"stillmummy\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + scale { + x: -0.4 + y: 0.4 + z: 0.4 + } +} diff --git a/build/default_html5/_generated_eddfcdf4f469af17.goc b/build/default_html5/_generated_eddfcdf4f469af17.goc new file mode 100644 index 0000000..c604fdb Binary files /dev/null and b/build/default_html5/_generated_eddfcdf4f469af17.goc differ diff --git a/build/default_html5/_generated_f10f63c09589ec9e.collisionobject b/build/default_html5/_generated_f10f63c09589ec9e.collisionobject new file mode 100644 index 0000000..ca096b3 --- /dev/null +++ b/build/default_html5/_generated_f10f63c09589ec9e.collisionobject @@ -0,0 +1,24 @@ +type: COLLISION_OBJECT_TYPE_STATIC +mass: 0.0 +friction: 0.1 +restitution: 0.5 +group: "platform" +mask: "player" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 655.0 + y: 16.0 + } + rotation { + z: 0.010910967 + w: 0.99994045 + } + index: 0 + count: 3 + } + data: 394.12912 + data: 10.0 + data: 10.0 +} diff --git a/build/default_html5/_generated_f10f63c09589ec9e.collisionobjectc b/build/default_html5/_generated_f10f63c09589ec9e.collisionobjectc new file mode 100644 index 0000000..533d024 Binary files /dev/null and b/build/default_html5/_generated_f10f63c09589ec9e.collisionobjectc differ diff --git a/build/default_html5/_generated_f5ca3e644c645477.collisionobject b/build/default_html5/_generated_f5ca3e644c645477.collisionobject new file mode 100644 index 0000000..9bf13fe --- /dev/null +++ b/build/default_html5/_generated_f5ca3e644c645477.collisionobject @@ -0,0 +1,22 @@ +type: COLLISION_OBJECT_TYPE_DYNAMIC +mass: 1.0 +friction: 0.1 +restitution: 0.5 +group: "default" +mask: "default" +embedded_collision_shape { + shapes { + shape_type: TYPE_BOX + position { + x: 558.0 + y: 83.0 + } + rotation { + } + index: 0 + count: 3 + } + data: 23.418262 + data: 58.742554 + data: 10.0 +} diff --git a/build/default_html5/_generated_f5ca3e644c645477.collisionobjectc b/build/default_html5/_generated_f5ca3e644c645477.collisionobjectc new file mode 100644 index 0000000..2193904 Binary files /dev/null and b/build/default_html5/_generated_f5ca3e644c645477.collisionobjectc differ diff --git a/build/default_html5/_generated_f833790c1988ac5f.compcount_go b/build/default_html5/_generated_f833790c1988ac5f.compcount_go new file mode 100644 index 0000000..3b4635b Binary files /dev/null and b/build/default_html5/_generated_f833790c1988ac5f.compcount_go differ diff --git a/build/default_html5/_generated_f833790c1988ac5f.go b/build/default_html5/_generated_f833790c1988ac5f.go new file mode 100644 index 0000000..b5c79ae --- /dev/null +++ b/build/default_html5/_generated_f833790c1988ac5f.go @@ -0,0 +1,65 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 145.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "collisionobject" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 727.0\n y: 14.0\n }\n rotation {\n z: 0.010910967\n w: 0.99994045\n }\n index: 0\n count: 3\n }\n data: 333.5412\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomuprightlatform" + type: "sprite" + data: "default_animation: \"bottomuprightplatform\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 574.0 + y: 20.0 + z: 1.0 + } + scale { + x: 0.223342 + y: 0.223342 + z: 0.223342 + } +} +embedded_components { + id: "collisionobject1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_f833790c1988ac5f.goc b/build/default_html5/_generated_f833790c1988ac5f.goc new file mode 100644 index 0000000..8bafa77 Binary files /dev/null and b/build/default_html5/_generated_f833790c1988ac5f.goc differ diff --git a/build/default_html5/_generated_fa28c6c7c7fddfb1.compcount_go b/build/default_html5/_generated_fa28c6c7c7fddfb1.compcount_go new file mode 100644 index 0000000..d9fb494 Binary files /dev/null and b/build/default_html5/_generated_fa28c6c7c7fddfb1.compcount_go differ diff --git a/build/default_html5/_generated_fa28c6c7c7fddfb1.go b/build/default_html5/_generated_fa28c6c7c7fddfb1.go new file mode 100644 index 0000000..57860c2 --- /dev/null +++ b/build/default_html5/_generated_fa28c6c7c7fddfb1.go @@ -0,0 +1,225 @@ +embedded_components { + id: "uprightplatform1" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 269.0 + z: 0.1 + } +} +embedded_components { + id: "uprightplatform2" + type: "sprite" + data: "default_animation: \"UpRightPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 922.0\n y: 88.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 679.0 + y: 532.0 + z: 0.1 + } +} +embedded_components { + id: "upleftplatform1" + type: "sprite" + data: "default_animation: \"UpLeftPlatform\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 896.0\n y: 99.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 431.0 + y: 399.0 + z: 0.1 + } +} +embedded_components { + id: "bottomcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 732.0\n y: 19.0\n }\n rotation {\n z: 0.015301545\n w: 0.9998829\n }\n index: 0\n count: 3\n }\n data: 337.67072\n data: 8.483422\n data: 10.0\n}\n" +} +embedded_components { + id: "bottomcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 197.0\n y: 6.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 197.94986\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 387.0\n y: 137.0\n }\n rotation {\n z: -0.012696929\n w: 0.9999194\n }\n index: 0\n count: 3\n }\n data: 388.207\n data: 7.6253576\n data: 10.192\n}\n" +} +embedded_components { + id: "uprightcollision" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 660.0\n y: 263.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "upleftcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 382.0\n y: 394.0\n }\n rotation {\n z: -0.010337459\n w: 0.9999466\n }\n index: 0\n count: 3\n }\n data: 385.85358\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "uprightcollision1" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_STATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"platform\"\nmask: \"player\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n x: 662.0\n y: 529.0\n }\n rotation {\n z: 0.013529582\n w: 0.99990845\n }\n index: 0\n count: 3\n }\n data: 401.32773\n data: 10.0\n data: 10.0\n}\n" +} +embedded_components { + id: "flatplatform1" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 67.0 + y: 10.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "flatplatform2" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 200.0 + y: 10.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "bottomupplatform" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 466.0 + y: 12.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "bottomupplatform1" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 780.0\n y: 105.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 599.0 + y: 16.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "bottomupplatform2" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 864.0 + y: 23.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "bottomupplatform3" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 997.0 + y: 27.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} +embedded_components { + id: "2rowplatform" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 709.0 + y: 130.0 + z: 0.4 + } + scale { + x: 0.347 + y: 0.35 + z: 0.36 + } +} +embedded_components { + id: "2rowplatform1" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 581.0 + y: 132.0 + z: 0.2 + } + scale { + x: 0.347 + y: 0.35 + z: 0.36 + } +} +embedded_components { + id: "2rowplatform2" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 323.0 + y: 141.0 + z: 0.4 + } + scale { + x: 0.347 + y: 0.35 + z: 0.36 + } +} +embedded_components { + id: "2rowplatform3" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 195.0 + y: 143.0 + z: 0.2 + } + scale { + x: 0.347 + y: 0.35 + z: 0.36 + } +} +embedded_components { + id: "bottomupplatform4" + type: "sprite" + data: "default_animation: \"platformsegment\"\nmaterial: \"/builtins/materials/sprite.material\"\nsize {\n x: 420.0\n y: 97.0\n}\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + x: 333.0 + y: 10.0 + z: 0.4 + } + scale { + x: 0.36 + y: 0.36 + z: 0.36 + } +} diff --git a/build/default_html5/_generated_fa28c6c7c7fddfb1.goc b/build/default_html5/_generated_fa28c6c7c7fddfb1.goc new file mode 100644 index 0000000..e0b64f2 Binary files /dev/null and b/build/default_html5/_generated_fa28c6c7c7fddfb1.goc differ diff --git a/build/default_html5/_generated_fb3a725d1fd71dd3.compcount_go b/build/default_html5/_generated_fb3a725d1fd71dd3.compcount_go new file mode 100644 index 0000000..0c32cbe Binary files /dev/null and b/build/default_html5/_generated_fb3a725d1fd71dd3.compcount_go differ diff --git a/build/default_html5/_generated_fb3a725d1fd71dd3.go b/build/default_html5/_generated_fb3a725d1fd71dd3.go new file mode 100644 index 0000000..72884d5 --- /dev/null +++ b/build/default_html5/_generated_fb3a725d1fd71dd3.go @@ -0,0 +1,30 @@ +components { + id: "player" + component: "/main/player.script" +} +components { + id: "debug" + component: "/main/debug.gui" +} +embedded_components { + id: "sprite" + type: "sprite" + data: "default_animation: \"still_right\"\nmaterial: \"/builtins/materials/sprite.material\"\ntextures {\n sampler: \"texture_sampler\"\n texture: \"/main/graphics.atlas\"\n}\n" + position { + z: 0.2 + } + scale { + x: 0.5 + y: 0.5 + } +} +embedded_components { + id: "collisionobjectplatform" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"platform\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n y: -30.0\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.752527\n data: 3.5919755\n data: 10.0\n}\nlinear_damping: 1.0\nlocked_rotation: true\n" +} +embedded_components { + id: "collisionobjectladder" + type: "collisionobject" + data: "type: COLLISION_OBJECT_TYPE_KINEMATIC\nmass: 0.0\nfriction: 0.1\nrestitution: 0.5\ngroup: \"player\"\nmask: \"ladder\"\nmask: \"curse\"\nembedded_collision_shape {\n shapes {\n shape_type: TYPE_BOX\n position {\n }\n rotation {\n }\n index: 0\n count: 3\n }\n data: 21.718147\n data: 32.986557\n data: 10.0\n}\n" +} diff --git a/build/default_html5/_generated_fb3a725d1fd71dd3.goc b/build/default_html5/_generated_fb3a725d1fd71dd3.goc new file mode 100644 index 0000000..420df61 Binary files /dev/null and b/build/default_html5/_generated_fb3a725d1fd71dd3.goc differ diff --git a/build/default_html5/_generated_ff5869762c900a5.compcount_go b/build/default_html5/_generated_ff5869762c900a5.compcount_go new file mode 100644 index 0000000..c949177 Binary files /dev/null and b/build/default_html5/_generated_ff5869762c900a5.compcount_go differ diff --git a/build/default_html5/_generated_ff5869762c900a5.go b/build/default_html5/_generated_ff5869762c900a5.go new file mode 100644 index 0000000..619dd85 --- /dev/null +++ b/build/default_html5/_generated_ff5869762c900a5.go @@ -0,0 +1,4 @@ +components { + id: "level2" + component: "/main/level2.script" +} diff --git a/build/default_html5/_generated_ff5869762c900a5.goc b/build/default_html5/_generated_ff5869762c900a5.goc new file mode 100644 index 0000000..9f944d5 Binary files /dev/null and b/build/default_html5/_generated_ff5869762c900a5.goc differ diff --git a/build/default_html5/_generated_gamefont2_502b1c3ff51c7974.glyph_bankc b/build/default_html5/_generated_gamefont2_502b1c3ff51c7974.glyph_bankc new file mode 100644 index 0000000..79f567d Binary files /dev/null and b/build/default_html5/_generated_gamefont2_502b1c3ff51c7974.glyph_bankc differ diff --git a/build/default_html5/_generated_vera_mo_bd_2e9565c19ca35f02.glyph_bankc b/build/default_html5/_generated_vera_mo_bd_2e9565c19ca35f02.glyph_bankc new file mode 100644 index 0000000..16a2f80 Binary files /dev/null and b/build/default_html5/_generated_vera_mo_bd_2e9565c19ca35f02.glyph_bankc differ diff --git a/build/default_html5/builtins/fonts/default.fontc b/build/default_html5/builtins/fonts/default.fontc new file mode 100644 index 0000000..4b460c9 Binary files /dev/null and b/build/default_html5/builtins/fonts/default.fontc differ diff --git a/build/default_html5/builtins/fonts/font-df.fpc b/build/default_html5/builtins/fonts/font-df.fpc new file mode 100644 index 0000000..9aa7407 Binary files /dev/null and b/build/default_html5/builtins/fonts/font-df.fpc differ diff --git a/build/default_html5/builtins/fonts/font-df.materialc b/build/default_html5/builtins/fonts/font-df.materialc new file mode 100644 index 0000000..0d17501 --- /dev/null +++ b/build/default_html5/builtins/fonts/font-df.materialc @@ -0,0 +1,3 @@ + +fontgui/builtins/fonts/font-df.vpc"/builtins/fonts/font-df.fpc2 + view_proj \ No newline at end of file diff --git a/build/default_html5/builtins/fonts/font-df.vpc b/build/default_html5/builtins/fonts/font-df.vpc new file mode 100644 index 0000000..4e00c87 Binary files /dev/null and b/build/default_html5/builtins/fonts/font-df.vpc differ diff --git a/build/default_html5/builtins/input/default.gamepadsc b/build/default_html5/builtins/input/default.gamepadsc new file mode 100644 index 0000000..07909cb Binary files /dev/null and b/build/default_html5/builtins/input/default.gamepadsc differ diff --git a/build/default_html5/builtins/materials/gui.fpc b/build/default_html5/builtins/materials/gui.fpc new file mode 100644 index 0000000..f786106 Binary files /dev/null and b/build/default_html5/builtins/materials/gui.fpc differ diff --git a/build/default_html5/builtins/materials/gui.materialc b/build/default_html5/builtins/materials/gui.materialc new file mode 100644 index 0000000..aa1bfdf Binary files /dev/null and b/build/default_html5/builtins/materials/gui.materialc differ diff --git a/build/default_html5/builtins/materials/gui.vpc b/build/default_html5/builtins/materials/gui.vpc new file mode 100644 index 0000000..16e8e20 Binary files /dev/null and b/build/default_html5/builtins/materials/gui.vpc differ diff --git a/build/default_html5/builtins/materials/sprite.fpc b/build/default_html5/builtins/materials/sprite.fpc new file mode 100644 index 0000000..8e76269 Binary files /dev/null and b/build/default_html5/builtins/materials/sprite.fpc differ diff --git a/build/default_html5/builtins/materials/sprite.materialc b/build/default_html5/builtins/materials/sprite.materialc new file mode 100644 index 0000000..a814657 Binary files /dev/null and b/build/default_html5/builtins/materials/sprite.materialc differ diff --git a/build/default_html5/builtins/materials/sprite.vpc b/build/default_html5/builtins/materials/sprite.vpc new file mode 100644 index 0000000..3e75f8e Binary files /dev/null and b/build/default_html5/builtins/materials/sprite.vpc differ diff --git a/build/default_html5/builtins/render/default.display_profilesc b/build/default_html5/builtins/render/default.display_profilesc new file mode 100644 index 0000000..8c0ad85 --- /dev/null +++ b/build/default_html5/builtins/render/default.display_profilesc @@ -0,0 +1,6 @@ + + + Landscape + + +Portrait diff --git a/build/default_html5/builtins/render/default.render_scriptc b/build/default_html5/builtins/render/default.render_scriptc new file mode 100644 index 0000000..eb42cc7 --- /dev/null +++ b/build/default_html5/builtins/render/default.render_scriptc @@ -0,0 +1,277 @@ + +? +? + + + + + + + + + + + + + + + + +local MSG_CLEAR_COLOR = hash("clear_color") +local MSG_WINDOW_RESIZED = hash("window_resized") +local MSG_SET_VIEW_PROJ = hash("set_view_projection") +local MSG_SET_CAMERA_PROJ = hash("use_camera_projection") +local MSG_USE_STRETCH_PROJ = hash("use_stretch_projection") +local MSG_USE_FIXED_PROJ = hash("use_fixed_projection") +local MSG_USE_FIXED_FIT_PROJ = hash("use_fixed_fit_projection") + +local DEFAULT_NEAR = -1 +local DEFAULT_FAR = 1 +local DEFAULT_ZOOM = 1 + + + + +local function get_fixed_projection(camera, state) + camera.zoom = camera.zoom or DEFAULT_ZOOM + local projected_width = state.window_width / camera.zoom + local projected_height = state.window_height / camera.zoom + local left = -(projected_width - state.width) / 2 + local bottom = -(projected_height - state.height) / 2 + local right = left + projected_width + local top = bottom + projected_height + return vmath.matrix4_orthographic(left, right, bottom, top, camera.near, camera.far) +end + + + +local function get_fixed_fit_projection(camera, state) + camera.zoom = math.min(state.window_width / state.width, state.window_height / state.height) + return get_fixed_projection(camera, state) +end + + + +local function get_stretch_projection(camera, state) + return vmath.matrix4_orthographic(0, state.width, 0, state.height, camera.near, camera.far) +end + + + +local function get_gui_projection(camera, state) + return vmath.matrix4_orthographic(0, state.window_width, 0, state.window_height, camera.near, camera.far) +end + +local function update_clear_color(state, color) + if color then + state.clear_buffers[graphics.BUFFER_TYPE_COLOR0_BIT] = color + end +end + +local function update_camera(camera, state) + if camera.projection_fn then + camera.proj = camera.projection_fn(camera, state) + camera.options.frustum = camera.proj * camera.view + end +end + +local function update_state(state) + state.window_width = render.get_window_width() + state.window_height = render.get_window_height() + state.valid = state.window_width > 0 and state.window_height > 0 + if not state.valid then + return false + end + + if state.window_width == state.prev_window_width and state.window_height == state.prev_window_height then + return true + end + state.prev_window_width = state.window_width + state.prev_window_height = state.window_height + state.width = render.get_width() + state.height = render.get_height() + for _, camera in pairs(state.cameras) do + update_camera(camera, state) + end + return true +end + +local function init_camera(camera, projection_fn, near, far, zoom) + camera.view = vmath.matrix4() + camera.near = near == nil and DEFAULT_NEAR or near + camera.far = far == nil and DEFAULT_FAR or far + camera.zoom = zoom == nil and DEFAULT_ZOOM or zoom + camera.projection_fn = projection_fn +end + +local function create_predicates(...) + local arg = {...} + local predicates = {} + for _, predicate_name in pairs(arg) do + predicates[predicate_name] = render.predicate({predicate_name}) + end + return predicates +end + +local function create_camera(state, name, is_main_camera) + local camera = {} + camera.options = {} + state.cameras[name] = camera + if is_main_camera then + state.main_camera = camera + end + return camera +end + +local function create_state() + local state = {} + local color = vmath.vector4(0, 0, 0, 0) + color.x = sys.get_config_number("render.clear_color_red", 0) + color.y = sys.get_config_number("render.clear_color_green", 0) + color.z = sys.get_config_number("render.clear_color_blue", 0) + color.w = sys.get_config_number("render.clear_color_alpha", 0) + state.clear_buffers = { + [graphics.BUFFER_TYPE_COLOR0_BIT] = color, + [graphics.BUFFER_TYPE_DEPTH_BIT] = 1, + [graphics.BUFFER_TYPE_STENCIL_BIT] = 0 + } + state.cameras = {} + return state +end + +local function set_camera_world(state) + local camera_components = camera.get_cameras() + + + if #camera_components > 0 then + for i = #camera_components, 1, -1 do + if camera.get_enabled(camera_components[i]) then + local camera_component = state.cameras.camera_component + camera_component.camera = camera_components[i] + render.set_camera(camera_component.camera, { use_frustum = true }) + + + return camera_component.options + end + end + end + + + local camera_world = state.cameras.camera_world + render.set_view(camera_world.view) + render.set_projection(camera_world.proj) + return camera_world.options +end + +local function reset_camera_world(state) + + if state.cameras.camera_component.camera then + state.cameras.camera_component.camera = nil + render.set_camera() + end +end + +function init(self) + self.predicates = create_predicates("tile", "gui", "particle", "model", "debug_text") + + + + + + + + local state = create_state() + self.state = state + + local camera_world = create_camera(state, "camera_world", true) + init_camera(camera_world, get_stretch_projection) + local camera_gui = create_camera(state, "camera_gui") + init_camera(camera_gui, get_gui_projection) + + + local camera_component = create_camera(state, "camera_component") + update_state(state) +end + +function update(self) + local state = self.state + if not state.valid then + if not update_state(state) then + return + end + end + + local predicates = self.predicates + + + + render.set_depth_mask(true) + render.set_stencil_mask(0xff) + render.clear(state.clear_buffers) + + + + local draw_options_world = set_camera_world(state) + render.set_viewport(0, 0, state.window_width, state.window_height) + + + render.set_blend_func(graphics.BLEND_FACTOR_SRC_ALPHA, graphics.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA) + render.enable_state(graphics.STATE_DEPTH_TEST) + + + + render.enable_state(graphics.STATE_CULL_FACE) + render.draw(predicates.model, draw_options_world) + render.set_depth_mask(false) + render.disable_state(graphics.STATE_CULL_FACE) + + + + render.enable_state(graphics.STATE_BLEND) + render.draw(predicates.tile, draw_options_world) + render.draw(predicates.particle, draw_options_world) + render.disable_state(graphics.STATE_DEPTH_TEST) + + render.draw_debug3d() + + reset_camera_world(state) + + + + local camera_gui = state.cameras.camera_gui + render.set_view(camera_gui.view) + render.set_projection(camera_gui.proj) + + render.enable_state(graphics.STATE_STENCIL_TEST) + render.draw(predicates.gui, camera_gui.frustum) + render.draw(predicates.debug_text, camera_gui.frustum) + render.disable_state(graphics.STATE_STENCIL_TEST) + render.disable_state(graphics.STATE_BLEND) +end + +function on_message(self, message_id, message) + local state = self.state + local camera = state.main_camera + + if message_id == MSG_CLEAR_COLOR then + update_clear_color(state, message.color) + elseif message_id == MSG_WINDOW_RESIZED then + update_state(state) + elseif message_id == MSG_SET_VIEW_PROJ then + camera.view = message.view + self.camera_projection = message.projection or vmath.matrix4() + update_camera(camera, state) + elseif message_id == MSG_SET_CAMERA_PROJ then + camera.projection_fn = function() return self.camera_projection end + elseif message_id == MSG_USE_STRETCH_PROJ then + init_camera(camera, get_stretch_projection, message.near, message.far) + update_camera(camera, state) + elseif message_id == MSG_USE_FIXED_PROJ then + init_camera(camera, get_fixed_projection, message.near, message.far, message.zoom) + update_camera(camera, state) + elseif message_id == MSG_USE_FIXED_FIT_PROJ then + init_camera(camera, get_fixed_fit_projection, message.near, message.far) + update_camera(camera, state) + end +end +&@builtins/render/default.render_script" \ No newline at end of file diff --git a/build/default_html5/builtins/render/default.renderc b/build/default_html5/builtins/render/default.renderc new file mode 100644 index 0000000..301df78 --- /dev/null +++ b/build/default_html5/builtins/render/default.renderc @@ -0,0 +1,2 @@ + +'/builtins/render/default.render_scriptc \ No newline at end of file diff --git a/build/default_html5/builtins/scripts/debugger.luac b/build/default_html5/builtins/scripts/debugger.luac new file mode 100644 index 0000000..896a052 Binary files /dev/null and b/build/default_html5/builtins/scripts/debugger.luac differ diff --git a/build/default_html5/builtins/scripts/edn.luac b/build/default_html5/builtins/scripts/edn.luac new file mode 100644 index 0000000..50c630b Binary files /dev/null and b/build/default_html5/builtins/scripts/edn.luac differ diff --git a/build/default_html5/builtins/scripts/mobdebug.luac b/build/default_html5/builtins/scripts/mobdebug.luac new file mode 100644 index 0000000..bf05b76 --- /dev/null +++ b/build/default_html5/builtins/scripts/mobdebug.luac @@ -0,0 +1,1868 @@ + +Ž + + + + + + + +local require = require + + + + + + +local os = os or (function(module) + local ok, res = pcall(require, module) + return ok and res or nil +end)("os") + +local mobdebug = { + _NAME = "mobdebug", + _VERSION = "0.70", + _COPYRIGHT = "Paul Kulchenko", + _DESCRIPTION = "Mobile Remote Debugger for the Lua programming language", + port = os and os.getenv and tonumber((os.getenv("MOBDEBUG_PORT"))) or 8172, + checkcount = 200, + yieldtimeout = 0.02, + connecttimeout = 2, +} + +local HOOKMASK = "lcr" +local error = error +local getfenv = getfenv +local setfenv = setfenv +local loadstring = loadstring or load +local pairs = pairs +local setmetatable = setmetatable +local tonumber = tonumber +local unpack = table.unpack or unpack +local rawget = rawget +local gsub, sub, find = string.gsub, string.sub, string.find + + + + + + + + +local genv = _G or _ENV +local jit = rawget(genv, "jit") +local MOAICoroutine = rawget(genv, "MOAICoroutine") + + + + + + + +local metagindex = getmetatable(genv) and getmetatable(genv).__index +local ngx = type(metagindex) == "table" and metagindex.rawget and metagindex:rawget("ngx") or nil +local corocreate = ngx and coroutine._create or coroutine.create +local cororesume = ngx and coroutine._resume or coroutine.resume +local coroyield = ngx and coroutine._yield or coroutine.yield +local corostatus = ngx and coroutine._status or coroutine.status +local corowrap = coroutine.wrap + +if not setfenv then + + + local function findenv(f) + local level = 1 + repeat + local name, value = debug.getupvalue(f, level) + if name == '_ENV' then return level, value end + level = level + 1 + until name == nil + return nil end + getfenv = function (f) return(select(2, findenv(f)) or _G) end + setfenv = function (f, t) + local level = findenv(f) + if level then debug.setupvalue(f, level, t) end + return f end +end + + + + + + + +local win = os and os.getenv and (os.getenv('WINDIR') or (os.getenv('OS') or ''):match('[Ww]indows')) and true or false +local mac = not win and (os and os.getenv and os.getenv('DYLD_LIBRARY_PATH') or not io.open("/proc")) and true or false +local iscasepreserving = win or (mac and io.open('/library') ~= nil) + + + + + +if jit and jit.off then jit.off() end + +local socket = require "builtins.scripts.socket" +local edn = require "builtins.scripts.edn" +local edn_edge_refs_cache = {} +local coro_debugger +local coro_debugee +local coroutines = {}; setmetatable(coroutines, {__mode = "k"}) +local events = { BREAK = 1, WATCH = 2, RESTART = 3, STACK = 4 } +local breakpoints = {} +local watches = {} +local lastsource +local lastfile +local watchescnt = 0 +local abort +local seen_hook = false +local checkcount = 0 +local step_into = false +local step_over = false +local step_level = 0 +local stack_level = 0 +local server +local buf +local outputs = {} +local iobase = {print = print} +local basedir = "" +local deferror = "execution aborted at default debugee" +local debugee = function () + local a = 1 + for _ = 1, 10 do a = a + 1 end + error(deferror) +end +local function q(s) return string.gsub(s, '([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end + +local serpent = (function() +local n, v = "serpent", "0.30" +local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" +local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} +local badtype = {thread = true, userdata = true, cdata = true} +local getmetatable = debug and debug.getmetatable or getmetatable +local pairs = function(t) return next, t end +local keyword, globals, G = {}, {}, (_G or _ENV) +for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', + 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', + 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end +for k,v in pairs(G) do globals[v] = k end +for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do + for k,v in pairs(type(G[g]) == 'table' and G[g] or {}) do globals[v] = g..'.'..k end end + +local function s(t, opts) + local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum + local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge + local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) + local maxlen, metatostring = tonumber(opts.maxlength), opts.metatostring + local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) + local numformat = opts.numformat or "%.17g" + local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 + local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", + + function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return tostring(syms[s]) end)) end + local function safestr(s) return type(s) == "number" and tostring(huge and snum[tostring(s)] or numformat:format(s)) + or type(s) ~= "string" and tostring(s) + or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end + local function comment(s,l) return comm and (l or 0) < comm and ' --[['..select(2, pcall(tostring, s))..']]' or '' end + local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal + and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end + local function safename(path, name) + local n = name == nil and '' or name + local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] + local safe = plain and n or '['..safestr(n)..']' + return (path or '')..(plain and path and '.' or '')..safe, safe end + local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) + local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} + local function padnum(d) return ("%0"..tostring(maxn).."d"):format(tonumber(d)) end + table.sort(k, function(a,b) + + return (k[a] ~= nil and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) + < (k[b] ~= nil and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end + local function val2str(t, name, indent, insref, path, plainindex, level) + local ttype, level, mt = type(t), (level or 0), getmetatable(t) + local spath, sname = safename(path, name) + local tag = plainindex and + ((type(name) == "number") and '' or name..space..'='..space) or + (name ~= nil and sname..space..'='..space or '') + if seen[t] then + sref[#sref+1] = spath..space..'='..space..seen[t] + return tag..'nil'..comment('ref', level) end + + if type(mt) == 'table' then + local to, tr = pcall(function() return mt.__tostring(t) end) + local so, sr = pcall(function() return mt.__serialize(t) end) + if (opts.metatostring ~= false and to or so) then + seen[t] = insref or spath + t = so and sr or tr + ttype = type(t) + end + end + if ttype == "table" then + if level >= maxl then return tag..'{}'..comment('maxlvl', level) end + seen[t] = insref or spath + if next(t) == nil then return tag..'{}'..comment(t, level) end + if maxlen and maxlen < 0 then return tag..'{}'..comment('maxlen', level) end + local maxn, o, out = math.min(#t, maxnum or #t), {}, {} + for key = 1, maxn do o[key] = key end + if not maxnum or #o < maxnum then + local n = #o + for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end + if maxnum and #o > maxnum then o[maxnum+1] = nil end + if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end + local sparse = sparse and #o > maxn + for n, key in ipairs(o) do + local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse + if opts.valignore and opts.valignore[value] + or opts.keyallow and not opts.keyallow[key] + or opts.keyignore and opts.keyignore[key] + or opts.valtypeignore and opts.valtypeignore[type(value)] + or sparse and value == nil then + elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then + if not seen[key] and not globals[key] then + sref[#sref+1] = 'placeholder' + local sname = safename(iname, gensym(key)) + sref[#sref] = val2str(key,sname,indent,sname,iname,true) end + sref[#sref+1] = 'placeholder' + local path = seen[t]..'['..tostring(seen[key] or globals[key] or gensym(key))..']' + sref[#sref] = path..space..'='..space..tostring(seen[value] or val2str(value,nil,indent,path)) + else + out[#out+1] = val2str(value,key,indent,insref,seen[t],plainindex,level+1) + if maxlen then + maxlen = maxlen - #out[#out] + if maxlen < 0 then break end + end + end + end + local prefix = string.rep(indent or '', level) + local head = indent and '{\n'..prefix..indent or '{' + local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) + local tail = indent and "\n"..prefix..'}' or '}' + return (custom and custom(tag,head,body,tail,level) or tag..head..body..tail)..comment(t, level) + elseif badtype[ttype] then + seen[t] = insref or spath + return tag..globerr(t, level) + elseif ttype == 'function' then + seen[t] = insref or spath + if opts.nocode then return tag.."function() --[[..skipped..]] end"..comment(t, level) end + local ok, res = pcall(string.dump, t) + local func = ok and "((loadstring or load)("..safestr(res)..",'@serialized'))"..comment(t, level) + return tag..(func or globerr(t, level)) + else return tag..safestr(t) end + end + local sepr = indent and "\n" or ";"..space + local body = val2str(t, name, indent) + local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' + local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' + return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" +end + +local function deserialize(data, opts) + local env = (opts and opts.safe == false) and G + or setmetatable({}, { + __index = function(t,k) return t end, + __call = function(t,...) error("cannot call functions") end + }) + local f, res = (loadstring or load)('return '..data, nil, nil, env) + if not f then f, res = (loadstring or load)(data, nil, nil, env) end + if not f then return f, res end + if setfenv then setfenv(f, env) end + return pcall(f) +end + +local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end +return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, + load = deserialize, + dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, + line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, + block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } +end)() + +mobdebug.line = serpent.line +mobdebug.dump = serpent.dump +mobdebug.linemap = nil +mobdebug.loadstring = loadstring + +local function removebasedir(path, basedir) + if iscasepreserving then + + + return path:lower():find('^'..q(basedir:lower())) + and path:sub(#basedir+1) or path + else + return string.gsub(path, '^'..q(basedir), '') + end +end + +local function stack(start) + local function vars(f) + local func = debug.getinfo(f, "f").func + local i = 1 + local locals = {} + + while true do + local name, value = debug.getlocal(f, i) + if not name then break end + if string.sub(name, 1, 1) ~= '(' then + locals[name] = {value, select(2,pcall(tostring,value))} + end + i = i + 1 + end + + i = 1 + while true do + local name, value = debug.getlocal(f, -i) + + if not name or name ~= "(*vararg)" then break end + locals[name:gsub("%)$"," "..i..")")] = {value, select(2,pcall(tostring,value))} + i = i + 1 + end + + i = 1 + local ups = {} + while func do + local name, value = debug.getupvalue(func, i) + if not name then break end + ups[name] = {value, select(2,pcall(tostring,value))} + i = i + 1 + end + return locals, ups + end + + local stack = {} + local linemap = mobdebug.linemap + for i = (start or 0), 100 do + local source = debug.getinfo(i, "Snl") + if not source then break end + + local src = source.source + if src:find("[@=]") == 1 then + src = src:sub(2):gsub("\\", "/") + if src:find("%./") == 1 then src = src:sub(3) end + end + + table.insert(stack, { + {source.name, removebasedir(src, basedir), + linemap and linemap(source.linedefined, source.source) or source.linedefined, + linemap and linemap(source.currentline, source.source) or source.currentline, + source.what, source.namewhat, source.short_src}, + vars(i+1)}) + if source.what == 'main' then break end + end + return stack +end + +local function set_breakpoint(file, line, chunk) + if file == '-' and lastfile then file = lastfile + elseif iscasepreserving then file = string.lower(file) end + if not breakpoints[line] then breakpoints[line] = {} end + breakpoints[line][file] = chunk or true + if mobdebug.setbreakpoint_hook then mobdebug.setbreakpoint_hook(line, file) end +end + +local function remove_breakpoint(file, line) + if file == '-' and lastfile then file = lastfile + elseif file == '*' and line == 0 then breakpoints = {} + elseif iscasepreserving then file = string.lower(file) end + if breakpoints[line] then breakpoints[line][file] = nil end + if mobdebug.removebreakpoint_hook then mobdebug.removebreakpoint_hook(line, file) end +end + + +local function get_breakpoint(file, line) + return breakpoints[line] + and breakpoints[line][iscasepreserving and string.lower(file) or file] +end + +local function restore_vars(vars) + if type(vars) ~= 'table' then return end + + + + + + + + local i = 1 + while true do + local name = debug.getlocal(3, i) + if not name then break end + i = i + 1 + end + i = i - 1 + local written_vars = {} + while i > 0 do + local name = debug.getlocal(3, i) + if not written_vars[name] then + if string.sub(name, 1, 1) ~= '(' then + debug.setlocal(3, i, rawget(vars, name)) + end + written_vars[name] = true + end + i = i - 1 + end + + i = 1 + local func = debug.getinfo(3, "f").func + while true do + local name = debug.getupvalue(func, i) + if not name then break end + if not written_vars[name] then + if string.sub(name, 1, 1) ~= '(' then + debug.setupvalue(func, i, rawget(vars, name)) + end + written_vars[name] = true + end + i = i + 1 + end +end + +local function capture_vars(level, thread) + level = (level or 0)+2 + local func = (thread and debug.getinfo(thread, level, "f") or debug.getinfo(level, "f") or {}).func + if not func then return {} end + + local vars = {['...'] = {}} + local i = 1 + while true do + local name, value = debug.getupvalue(func, i) + if not name then break end + if string.sub(name, 1, 1) ~= '(' then vars[name] = value end + i = i + 1 + end + i = 1 + while true do + local name, value + if thread then + name, value = debug.getlocal(thread, level, i) + else + name, value = debug.getlocal(level, i) + end + if not name then break end + if string.sub(name, 1, 1) ~= '(' then vars[name] = value end + i = i + 1 + end + + i = 1 + while true do + local name, value + if thread then + name, value = debug.getlocal(thread, level, -i) + else + name, value = debug.getlocal(level, -i) + end + + if not name or name ~= "(*vararg)" then break end + vars['...'][i] = value + i = i + 1 + end + + + + + + + + setmetatable(vars, { __index = getfenv(func), __newindex = getfenv(func) }) + return vars +end + +local function stack_depth(start_depth) + for i = start_depth, 0, -1 do + if debug.getinfo(i, "l") then return i+1 end + end + return start_depth +end + +local function is_safe(stack_level) + + if stack_level == 3 then return true end + for i = 3, stack_level do + + local info = debug.getinfo(i, "S") + if not info then return true end + if info.what == "C" then return false end + end + return true +end + +local function in_debugger() + local this = debug.getinfo(1, "S").source + + for i = 3, 7 do + local info = debug.getinfo(i, "S") + if not info then return false end + if info.source == this then return true end + end + return false +end + +local function is_pending(peer) + + if not buf and checkcount >= mobdebug.checkcount then + peer:settimeout(0) + buf = peer:receive(1) + peer:settimeout() + checkcount = 0 + end + return buf +end + +local function readnext(peer, num) + peer:settimeout(0) + local res, err, partial = peer:receive(num) + peer:settimeout() + return res or partial or '', err +end + +local function handle_breakpoint(peer) + + + + if not buf or not (buf:sub(1,1) == 'S' or buf:sub(1,1) == 'D') then return end + + + if #buf == 1 then buf = buf .. readnext(peer, 1) end + if buf:sub(2,2) ~= 'E' then return end + + + buf = buf .. readnext(peer, 5-#buf) + if buf ~= 'SETB ' and buf ~= 'DELB ' then return end + + local res, _, partial = peer:receive() + if not res then + if partial then buf = buf .. partial end + return + end + + local _, _, cmd, file, line, condition = (buf..res):find("^([A-Z]+)%s+(.-)%s+(%d+)%s*(.*)$") + if cmd == 'SETB' then set_breakpoint(file, tonumber(line), string.len(condition) > 0 and mobdebug.loadstring("return " .. condition) or nil) + elseif cmd == 'DELB' then remove_breakpoint(file, tonumber(line)) + else + + + + return + end + + buf = nil +end + +local function normalize_path(file) + local n + repeat + file, n = file:gsub("/+%.?/+","/") + until n == 0 + + + + + repeat + file, n = file:gsub("[^/]+/%.%./", "", 1) + until n == 0 + + return (file:gsub("^(/?)%.%./", "%1")) +end + +local function get_filename(file) + + + + + + if find(file, "^[@=]") or not find(file, "[\r\n]") then + file = gsub(gsub(file, "^[@=]", ""), "\\", "/") + + + + + if find(file, "^%.%./") then file = basedir..file end + if find(file, "/%.%.?/") then file = normalize_path(file) end + + + + + if iscasepreserving then file = string.lower(file) end + if find(file, "^%./") then file = sub(file, 3) + else file = gsub(file, "^"..q(basedir), "") end + + file = gsub(file, "\n", ' ') + else + file = mobdebug.line(file) + end + return file +end + +local function get_server_data(file) + if not is_pending(server) then + checkcount = checkcount + 1 + return + end + checkcount = mobdebug.checkcount + if corostatus(coro_debugger) == "suspended" then + local state_vars = capture_vars(3) + local status, res = cororesume(coro_debugger, nil, state_vars, file) + if not status and res then + error(res, 2) + end + + while status and res == 'stack' do + + if vars then restore_vars(vars) end + local st = stack(4) + if st[1] and st[1][1] and st[1][1][2] == "[C]" then + table.remove(st, 1) + end + status, res = cororesume(coro_debugger, events.STACK, st, file, line) + end + handle_breakpoint(server) + end +end + +local function debug_hook(event, line) + + + + + + + + + + + if jit then + + + local coro, main = coroutine.running() + if not coro or main then coro = 'main' end + local disabled = coroutines[coro] == false + or coroutines[coro] == nil and coro ~= (coro_debugee or 'main') + if coro_debugee and disabled or not coro_debugee and (disabled or in_debugger()) + then return end + end + + + if abort and is_safe(stack_level) then error(abort) end + + + + + if not seen_hook and in_debugger() then return end + + if event == "call" then + stack_level = stack_level + 1 + elseif event == "return" or event == "tail return" then + stack_level = stack_level - 1 + if mobdebug.on_return_hook then mobdebug.on_return_hook() end + elseif event == "line" then + if mobdebug.linemap then + local ok, mappedline = pcall(mobdebug.linemap, line, debug.getinfo(2, "S").source) + if ok then line = mappedline end + if not line then return end + end + + + + + + + + if not ( + step_into or step_over or breakpoints[line] or watchescnt > 0 + or is_pending(server) + ) then checkcount = checkcount + 1; return end + + checkcount = mobdebug.checkcount + + + + + + + + + + + + + stack_level = stack_depth(stack_level+1) + + local caller = debug.getinfo(2, "S") + + + local file = lastfile + if (lastsource ~= caller.source) then + lastsource = caller.source + file = get_filename(caller.source) + + + + seen_hook = true + lastfile = file + end + + if is_pending(server) then handle_breakpoint(server) end + + local vars, status, res + if (watchescnt > 0) then + vars = capture_vars(1) + for index, value in pairs(watches) do + setfenv(value, vars) + local ok, fired = pcall(value) + if ok and fired then + status, res = cororesume(coro_debugger, events.WATCH, vars, file, line, index) + break + end + end + end + + + + local no_watch_fired = status == nil + + + + + + + local step = no_watch_fired and + (step_into + + + or (step_over and step_over == (coroutine.running() or 'main') and stack_level <= step_level)) + + local breakpoint = no_watch_fired and not step and get_breakpoint(file, line) + local has_breakpoint + if type(breakpoint) == "function" then + vars = vars or capture_vars(1) + setfenv(breakpoint, vars) + local ok, breakpoint_result = pcall(breakpoint) + has_breakpoint = ok and breakpoint_result + else + has_breakpoint = breakpoint + end + + local getin = step or has_breakpoint or (no_watch_fired and is_pending(server)) + + if getin then + vars = vars or capture_vars(1) + step_into = false + step_over = false + status, res = cororesume(coro_debugger, events.BREAK, vars, file, line) + end + + + while status and res == 'stack' do + + if vars then restore_vars(vars) end + status, res = cororesume(coro_debugger, events.STACK, stack(3), file, line) + end + + + + if status and res and res ~= 'stack' then + if not abort and res == "exit" then mobdebug.onexit(1, true); return end + if not abort and res == "done" then mobdebug.done(); return end + abort = res + + + if is_safe(stack_level) then error(abort) end + elseif not status and res then + error(res, 2) + end + + if vars then restore_vars(vars) end + + + if step_over == true then step_over = coroutine.running() or 'main' end + end +end + +local function stringify_results(params, status, ...) + if not status then return status, ... end + + params = params or {} + if params.nocode == nil then params.nocode = true end + if params.comment == nil then params.comment = 1 end + + local t = {...} + for i,v in pairs(t) do + local ok, res = pcall(mobdebug.line, v, params) + if ok and res ~= nil then + t[i] = res + else + t[i] = ("%q"):format(res):gsub("\010","n"):gsub("\026","\\026") + end + end + + + + return pcall(mobdebug.dump, t, {sparse = false}) +end + +local function isrunning() + return coro_debugger and (corostatus(coro_debugger) == 'suspended' or corostatus(coro_debugger) == 'running') +end + + + + +local function done() + if not (isrunning() and server) then return end + + if not jit then + for co, debugged in pairs(coroutines) do + if debugged then debug.sethook(co) end + end + end + + debug.sethook() + server:close() + + coro_debugger = nil + seen_hook = nil + abort = nil +end + +local function respond_with_edn(val, analyze_params) + local analyze_ok, graph, edge_refs = pcall(edn.analyze, val, analyze_params) + if analyze_ok then + for k, v in pairs(edge_refs) do + edn_edge_refs_cache[k] = v + end + local serialize_ok, edn_string = pcall(edn.serialize, val, graph) + if serialize_ok then + server:send("200 OK " .. tostring(edn_string) .. "\n") + else + server:send("401 Error in Execution " .. tostring(#edn_string) .. "\n") + server:send(edn_string) + end + else + server:send("401 Error in Execution " .. tostring(#graph) .. "\n") + server:send(graph) + end +end + +local function debugger_loop(sev, svars, sfile, sline) + local command + local app, osname + local eval_env = svars or {} + local function emptyWatch () return false end + local loaded = {} + for k in pairs(package.loaded) do loaded[k] = true end + + while true do + local line, err + local wx = rawget(genv, "wx") + if (wx or mobdebug.yield) and server.settimeout then server:settimeout(mobdebug.yieldtimeout) end + while true do + line, err = server:receive() + if not line and err == "timeout" then + + app = app or (wx and wx.wxGetApp and wx.wxGetApp()) + if app then + local win = app:GetTopWindow() + local inloop = app:IsMainLoopRunning() + osname = osname or wx.wxPlatformInfo.Get():GetOperatingSystemFamilyName() + if win and not inloop then + + + if osname == 'Unix' then wx.wxTimer(app):Start(10, true) end + local exitLoop = function() + win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_IDLE) + win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_TIMER) + app:ExitMainLoop() + end + win:Connect(wx.wxEVT_IDLE, exitLoop) + win:Connect(wx.wxEVT_TIMER, exitLoop) + app:MainLoop() + end + elseif mobdebug.yield then mobdebug.yield() + end + elseif not line and err == "closed" then + error("Debugger connection closed", 0) + else + + if buf then line = buf .. line; buf = nil end + break + end + end + if server.settimeout then server:settimeout() end + command = string.sub(line, string.find(line, "^[A-Z]+")) + if mobdebug.command_hook then mobdebug.command_hook(command) end + if command == "SETB" then + local _, file, breakpoint_line, condition = string.match(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*(.*)$") + if file and breakpoint_line and condition then + local chunk = string.len(condition) > 0 and mobdebug.loadstring("return " .. condition) or nil + set_breakpoint(file, tonumber(breakpoint_line), chunk) + server:send("200 OK\n") + else + server:send("400 Bad Request\n") + end + elseif command == "DELB" then + local _, _, _, file, line = string.find(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*$") + if file and line then + remove_breakpoint(file, tonumber(line)) + server:send("200 OK\n") + else + server:send("400 Bad Request\n") + end + elseif command == "EXEC" then + + local params = string.match(line, "--%s*(%b{})%s*$") + local _, _, chunk = string.find(line, "^[A-Z]+%s+(.+)$") + if chunk then + local func, res = mobdebug.loadstring(chunk) + local status + if func then + local pfunc = params and loadstring("return "..params) + params = pfunc and pfunc() + params = (type(params) == "table" and params or {}) + local stack = tonumber(params.stack) + + + local env = stack and coro_debugee and capture_vars(stack-1, coro_debugee) or eval_env + setfenv(func, env) + status, res = stringify_results(params, pcall(func, unpack(env['...'] or {}))) + end + if status then + if mobdebug.onscratch then mobdebug.onscratch(res) end + server:send("200 OK " .. tostring(#res) .. "\n") + server:send(res) + else + + if not res then res = "Unknown error" end + server:send("401 Error in Expression " .. tostring(#res) .. "\n") + server:send(res) + end + else + server:send("400 Bad Request\n") + end + elseif command == "LOAD" then + local _, _, size, name = string.find(line, "^[A-Z]+%s+(%d+)%s+(%S.-)%s*$") + size = tonumber(size) + + if abort == nil then + if size > 0 then server:receive(size) end + if sfile and sline then + server:send("201 Started " .. sfile .. " " .. tostring(sline) .. "\n") + else + server:send("200 OK 0\n") + end + else + + + for k in pairs(package.loaded) do + if not loaded[k] then package.loaded[k] = nil end + end + + if size == 0 and name == '-' then + server:send("200 OK 0\n") + coroyield("load") + else + + local chunk = size == 0 and "" or server:receive(size) + if chunk then + local func, res = mobdebug.loadstring(chunk, "@"..name) + if func then + server:send("200 OK 0\n") + debugee = func + coroyield("load") + else + server:send("401 Error in Expression " .. tostring(#res) .. "\n") + server:send(res) + end + else + server:send("400 Bad Request\n") + end + end + end + elseif command == "SETW" then + local _, _, exp = string.find(line, "^[A-Z]+%s+(.+)%s*$") + if exp then + local func, res = mobdebug.loadstring("return(" .. exp .. ")") + if func then + watchescnt = watchescnt + 1 + local newidx = #watches + 1 + watches[newidx] = func + server:send("200 OK " .. tostring(newidx) .. "\n") + else + server:send("401 Error in Expression " .. tostring(#res) .. "\n") + server:send(res) + end + else + server:send("400 Bad Request\n") + end + elseif command == "DELW" then + local _, _, index = string.find(line, "^[A-Z]+%s+(%d+)%s*$") + index = tonumber(index) + if index > 0 and index <= #watches then + watchescnt = watchescnt - (watches[index] ~= emptyWatch and 1 or 0) + watches[index] = emptyWatch + server:send("200 OK\n") + else + server:send("400 Bad Request\n") + end + elseif command == "RUN" then + edn_edge_refs_cache = {} + server:send("200 OK\n") + + local ev, vars, file, line, idx_watch = coroyield() + eval_env = vars + if ev == events.BREAK then + server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") + elseif ev == events.WATCH then + server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") + elseif ev == events.RESTART then + + else + server:send("401 Error in Execution " .. tostring(#file) .. "\n") + server:send(file) + end + elseif command == "STEP" then + edn_edge_refs_cache = {} + server:send("200 OK\n") + step_into = true + + local ev, vars, file, line, idx_watch = coroyield() + eval_env = vars + if ev == events.BREAK then + server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") + elseif ev == events.WATCH then + server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") + elseif ev == events.RESTART then + + else + server:send("401 Error in Execution " .. tostring(#file) .. "\n") + server:send(file) + end + elseif command == "OVER" or command == "OUT" then + edn_edge_refs_cache = {} + server:send("200 OK\n") + step_over = true + + + + if command == "OUT" then step_level = stack_level - 1 + else step_level = stack_level end + + local ev, vars, file, line, idx_watch = coroyield() + eval_env = vars + if ev == events.BREAK then + server:send("202 Paused " .. file .. " " .. tostring(line) .. "\n") + elseif ev == events.WATCH then + server:send("203 Paused " .. file .. " " .. tostring(line) .. " " .. tostring(idx_watch) .. "\n") + elseif ev == events.RESTART then + + else + server:send("401 Error in Execution " .. tostring(#file) .. "\n") + server:send(file) + end + elseif command == "BASEDIR" then + local _, _, dir = string.find(line, "^[A-Z]+%s+(.+)%s*$") + if dir then + basedir = iscasepreserving and string.lower(dir) or dir + + lastsource = nil + server:send("200 OK\n") + else + server:send("400 Bad Request\n") + end + elseif command == "SUSPEND" then + + elseif command == "DONE" then + edn_edge_refs_cache = {} + coroyield("done") + return + elseif command == "STACK" then + + + + + local vars, ev = {} + if seen_hook then + ev, vars = coroyield("stack") + end + if ev and ev ~= events.STACK then + server:send("401 Error in Execution " .. tostring(#vars) .. "\n") + server:send(vars) + else + local params = string.match(line, "--%s*(%b{})%s*$") + local pfunc = params and loadstring("return "..params) + params = pfunc and pfunc() + params = (type(params) == "table" and params or {}) + if params.nocode == nil then params.nocode = true end + if params.sparse == nil then params.sparse = false end + + if tonumber(params.maxlevel) then params.maxlevel = tonumber(params.maxlevel)+4 end + respond_with_edn(vars, params) + end + elseif command == "REF" then + local ref = string.match(line, "^[A-Z]+%s+(%S+)") + local val = edn_edge_refs_cache[ref] + if val then + local params = string.match(line, "--%s*(%b{})%s*$") + local pfunc = params and loadstring("return "..params) + params = pfunc and pfunc() + params = (type(params) == "table" and params or {}) + respond_with_edn(val, params) + else + server:send("400 Bad Request\n") + end + elseif command == "OUTPUT" then + local _, _, stream, mode = string.find(line, "^[A-Z]+%s+(%w+)%s+([dcr])%s*$") + if stream and mode and stream == "stdout" then + + local default = mode == 'd' + genv.print = default and iobase.print or corowrap(function() + + + + + while true do + local tbl = {coroutine.yield()} + if mode == 'c' then iobase.print(unpack(tbl)) end + for n = 1, #tbl do + tbl[n] = select(2, pcall(mobdebug.line, tbl[n], {nocode = true, comment = false})) end + local file = table.concat(tbl, "\t").."\n" + server:send("204 Output " .. stream .. " " .. tostring(#file) .. "\n" .. file) + end + end) + if not default then genv.print() end + server:send("200 OK\n") + else + server:send("400 Bad Request\n") + end + elseif command == "EXIT" then + server:send("200 OK\n") + coroyield("exit") + else + server:send("400 Bad Request\n") + end + end +end + +local function output(stream, data) + if server then return server:send("204 Output "..stream.." "..tostring(#data).."\n"..data) end +end + +local function connect(controller_host, controller_port) + local sock, err = socket.tcp() + if not sock then return nil, err end + + if sock.settimeout then sock:settimeout(mobdebug.connecttimeout) end + local res, err = sock:connect(controller_host, tostring(controller_port)) + if sock.settimeout then sock:settimeout() end + + if not res then return nil, err end + return sock +end + +local lasthost, lastport + + +local function start(controller_host, controller_port) + + if isrunning() then return end + + lasthost = controller_host or lasthost + lastport = controller_port or lastport + + controller_host = lasthost or "localhost" + controller_port = lastport or mobdebug.port + + local err + server, err = mobdebug.connect(controller_host, controller_port) + if server then + + + + + stack_level = stack_depth(16) + + + + + local function f() return function()end end + if f() ~= f() then + local dtraceback = debug.traceback + debug.traceback = function (...) + if select('#', ...) >= 1 then + local thr, err, lvl = ... + if type(thr) ~= 'thread' then err, lvl = thr, err end + local trace = dtraceback(err, (lvl or 1)+1) + if genv.print == iobase.print then + return trace + else + genv.print(trace) + return + end + end + + + + + local tb = dtraceback("", 2) + + return type(tb) == "string" and tb:gsub("^\n","") or tb + end + end + coro_debugger = corocreate(debugger_loop) + debug.sethook(debug_hook, HOOKMASK) + seen_hook = nil + step_into = true + return true + else + print(("Could not connect to %s:%s: %s") + :format(controller_host, controller_port, err or "unknown error")) + end +end + + +local function listen(port) + + if isrunning() then return end + + local err + local listen_socket, err = socket.bind("*", port or mobdebug.port) + + if err then error(err) end + + print("Listening for debugger on " .. listen_socket:getsockname()) + + server, err = listen_socket:accept() + + print("Debugger connected from " .. server:getsockname()) + + listen_socket:close() + + if server then + + + + + stack_level = stack_depth(16) + + + + + local function f() return function()end end + if f() ~= f() then + local dtraceback = debug.traceback + debug.traceback = function (...) + if select('#', ...) >= 1 then + local thr, err, lvl = ... + if type(thr) ~= 'thread' then err, lvl = thr, err end + local trace = dtraceback(err, (lvl or 1)+1) + if genv.print == iobase.print then + return trace + else + genv.print(trace) + return + end + end + + + + + local tb = dtraceback("", 2) + + return type(tb) == "string" and tb:gsub("^\n","") or tb + end + end + coro_debugger = corocreate(debugger_loop) + debug.sethook(debug_hook, HOOKMASK) + seen_hook = nil + step_into = true + return true + else + print(("Could not connect to %s:%s: %s") + :format(controller_host, controller_port, err or "unknown error")) + end +end + +local function controller(controller_host, controller_port, scratchpad) + + if isrunning() then return end + + lasthost = controller_host or lasthost + lastport = controller_port or lastport + + controller_host = lasthost or "localhost" + controller_port = lastport or mobdebug.port + + local exitonerror = not scratchpad + local err + server, err = mobdebug.connect(controller_host, controller_port) + if server then + local function report(trace, err) + local msg = err .. "\n" .. trace + server:send("401 Error in Execution " .. tostring(#msg) .. "\n") + server:send(msg) + return err + end + + seen_hook = true + coro_debugger = corocreate(debugger_loop) + + while true do + step_into = true + abort = false + if scratchpad then checkcount = mobdebug.checkcount end + + coro_debugee = corocreate(debugee) + debug.sethook(coro_debugee, debug_hook, HOOKMASK) + local status, err = cororesume(coro_debugee, unpack(arg or {})) + + + + if abort then + if tostring(abort) == 'exit' then break end + else + if status then + break + elseif err and not string.find(tostring(err), deferror) then + + + report(debug.traceback(coro_debugee), tostring(err)) + if exitonerror then break end + + if not coro_debugger then break end + + + + + + + + + local status, err = cororesume(coro_debugger, events.RESTART, capture_vars(0)) + if not status or status and err == "exit" then break end + end + end + end + else + print(("Could not connect to %s:%s: %s") + :format(controller_host, controller_port, err or "unknown error")) + return false + end + return true +end + +local function scratchpad(controller_host, controller_port) + return controller(controller_host, controller_port, true) +end + +local function loop(controller_host, controller_port) + return controller(controller_host, controller_port, false) +end + +local function on() + if not (isrunning() and server) then return end + + + + local co, main = coroutine.running() + if main then co = nil end + if co then + coroutines[co] = true + debug.sethook(co, debug_hook, HOOKMASK) + return true + else + if jit then coroutines.main = true end + debug.sethook(debug_hook, HOOKMASK) + return true + end +end + +local function off() + if not (isrunning() and server) then return end + + + + local co, main = coroutine.running() + if main then co = nil end + + + if co then + coroutines[co] = false + if not jit then debug.sethook(co) end + else + if jit then coroutines.main = false end + if not jit then debug.sethook() end + end + + + + if jit then + local remove = true + for _, debugged in pairs(coroutines) do + if debugged then remove = false; break end + end + if remove then debug.sethook() end + end +end + + +local function handle(params, client, options) + + + local verbose = not options or options.verbose ~= nil and options.verbose + local print = verbose and (type(verbose) == "function" and verbose or print) or function() end + local file, line, watch_idx + local _, _, command = string.find(params, "^([a-z]+)") + if command == "run" or command == "step" or command == "out" + or command == "over" or command == "exit" then + client:send(string.upper(command) .. "\n") + client:receive() + while true do + local done = true + local breakpoint = client:receive() + if not breakpoint then + print("Program finished") + return nil, nil, false + end + local _, _, status = string.find(breakpoint, "^(%d+)") + if status == "200" then + + elseif status == "202" then + _, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$") + if file and line then + print("Paused at file " .. file .. " line " .. line) + end + elseif status == "203" then + _, _, file, line, watch_idx = string.find(breakpoint, "^203 Paused%s+(.-)%s+(%d+)%s+(%d+)%s*$") + if file and line and watch_idx then + print("Paused at file " .. file .. " line " .. line .. " (watch expression " .. watch_idx .. ": [" .. watches[watch_idx] .. "])") + end + elseif status == "204" then + local _, _, stream, size = string.find(breakpoint, "^204 Output (%w+) (%d+)$") + if stream and size then + local size = tonumber(size) + local msg = size > 0 and client:receive(size) or "" + print(msg) + if outputs[stream] then outputs[stream](msg) end + + done = false + end + elseif status == "401" then + local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)$") + if size then + local msg = client:receive(tonumber(size)) + print("Error in remote application: " .. msg) + return nil, nil, msg + end + else + print("Unknown error") + return nil, nil, "Debugger error: unexpected response '" .. breakpoint .. "'" + end + if done then break end + end + elseif command == "done" then + client:send(string.upper(command) .. "\n") + + elseif command == "setb" or command == "asetb" then + _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") + if file and line then + + if not file:find('^".*"$') then + file = string.gsub(file, "\\", "/") + file = removebasedir(file, basedir) + end + client:send("SETB " .. file .. " " .. line .. "\n") + if command == "asetb" or client:receive() == "200 OK" then + set_breakpoint(file, line) + else + print("Error: breakpoint not inserted") + end + else + print("Invalid command") + end + elseif command == "setw" then + local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") + if exp then + client:send("SETW " .. exp .. "\n") + local answer = client:receive() + local _, _, watch_idx = string.find(answer, "^200 OK (%d+)%s*$") + if watch_idx then + watches[watch_idx] = exp + print("Inserted watch exp no. " .. watch_idx) + else + local _, _, size = string.find(answer, "^401 Error in Expression (%d+)$") + if size then + local err = client:receive(tonumber(size)):gsub(".-:%d+:%s*","") + print("Error: watch expression not set: " .. err) + else + print("Error: watch expression not set") + end + end + else + print("Invalid command") + end + elseif command == "delb" or command == "adelb" then + _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") + if file and line then + + if not file:find('^".*"$') then + file = string.gsub(file, "\\", "/") + file = removebasedir(file, basedir) + end + client:send("DELB " .. file .. " " .. line .. "\n") + if command == "adelb" or client:receive() == "200 OK" then + remove_breakpoint(file, line) + else + print("Error: breakpoint not removed") + end + else + print("Invalid command") + end + elseif command == "delallb" then + local file, line = "*", 0 + client:send("DELB " .. file .. " " .. tostring(line) .. "\n") + if client:receive() == "200 OK" then + remove_breakpoint(file, line) + else + print("Error: all breakpoints not removed") + end + elseif command == "delw" then + local _, _, index = string.find(params, "^[a-z]+%s+(%d+)%s*$") + if index then + client:send("DELW " .. index .. "\n") + if client:receive() == "200 OK" then + watches[index] = nil + else + print("Error: watch expression not removed") + end + else + print("Invalid command") + end + elseif command == "delallw" then + for index, exp in pairs(watches) do + client:send("DELW " .. index .. "\n") + if client:receive() == "200 OK" then + watches[index] = nil + else + print("Error: watch expression at index " .. index .. " [" .. exp .. "] not removed") + end + end + elseif command == "eval" or command == "exec" + or command == "load" or command == "loadstring" + or command == "reload" then + local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") + if exp or (command == "reload") then + if command == "eval" or command == "exec" then + exp = (exp:gsub("%-%-%[(=*)%[.-%]%1%]", "") + :gsub("%-%-.-\n", " ") + :gsub("\n", " ")) + if command == "eval" then exp = "return " .. exp end + client:send("EXEC " .. exp .. "\n") + elseif command == "reload" then + client:send("LOAD 0 -\n") + elseif command == "loadstring" then + local _, _, _, file, lines = string.find(exp, "^([\"'])(.-)%1%s+(.+)") + if not file then + _, _, file, lines = string.find(exp, "^(%S+)%s+(.+)") + end + client:send("LOAD " .. tostring(#lines) .. " " .. file .. "\n") + client:send(lines) + else + local file = io.open(exp, "r") + if not file and pcall(require, "winapi") then + + + winapi.set_encoding(winapi.CP_UTF8) + local shortp = winapi.short_path(exp) + file = shortp and io.open(shortp, "r") + end + if not file then return nil, nil, "Cannot open file " .. exp end + + local lines = file:read("*all"):gsub("^#!.-\n", "\n") + file:close() + + local file = string.gsub(exp, "\\", "/") + file = removebasedir(file, basedir) + client:send("LOAD " .. tostring(#lines) .. " " .. file .. "\n") + if #lines > 0 then client:send(lines) end + end + while true do + local params, err = client:receive() + if not params then + return nil, nil, "Debugger connection " .. (err or "error") + end + local done = true + local _, _, status, len = string.find(params, "^(%d+).-%s+(%d+)%s*$") + if status == "200" then + len = tonumber(len) + if len > 0 then + local status, res + local str = client:receive(len) + + local func, err = loadstring(str) + if func then + status, res = pcall(func) + if not status then err = res + elseif type(res) ~= "table" then + err = "received "..type(res).." instead of expected 'table'" + end + end + if err then + print("Error in processing results: " .. err) + return nil, nil, "Error in processing results: " .. err + end + print(unpack(res)) + return res[1], res + end + elseif status == "201" then + _, _, file, line = string.find(params, "^201 Started%s+(.-)%s+(%d+)%s*$") + elseif status == "202" or params == "200 OK" then + + + elseif status == "204" then + local _, _, stream, size = string.find(params, "^204 Output (%w+) (%d+)$") + if stream and size then + local size = tonumber(size) + local msg = size > 0 and client:receive(size) or "" + print(msg) + if outputs[stream] then outputs[stream](msg) end + + done = false + end + elseif status == "401" then + len = tonumber(len) + local res = client:receive(len) + print("Error in expression: " .. res) + return nil, nil, res + else + print("Unknown error") + return nil, nil, "Debugger error: unexpected response after EXEC/LOAD '" .. params .. "'" + end + if done then break end + end + else + print("Invalid command") + end + elseif command == "listb" then + for l, v in pairs(breakpoints) do + for f in pairs(v) do + print(f .. ": " .. l) + end + end + elseif command == "listw" then + for i, v in pairs(watches) do + print("Watch exp. " .. i .. ": " .. v) + end + elseif command == "suspend" then + client:send("SUSPEND\n") + elseif command == "stack" then + local opts = string.match(params, "^[a-z]+%s+(.+)$") + client:send("STACK" .. (opts and " "..opts or "") .."\n") + local resp = client:receive() + local _, _, status, res = string.find(resp, "^(%d+)%s+%w+%s+(.+)%s*$") + if status == "200" then + local func, err = loadstring(res) + if func == nil then + print("Error in stack information: " .. err) + return nil, nil, err + end + local ok, stack = pcall(func) + if not ok then + print("Error in stack information: " .. stack) + return nil, nil, stack + end + for _,frame in ipairs(stack) do + print(mobdebug.line(frame[1], {comment = false})) + end + return stack + elseif status == "401" then + local _, _, len = string.find(resp, "%s+(%d+)%s*$") + len = tonumber(len) + local res = len > 0 and client:receive(len) or "Invalid stack information." + print("Error in expression: " .. res) + return nil, nil, res + else + print("Unknown error") + return nil, nil, "Debugger error: unexpected response after STACK" + end + elseif command == "output" then + local _, _, stream, mode = string.find(params, "^[a-z]+%s+(%w+)%s+([dcr])%s*$") + if stream and mode then + client:send("OUTPUT "..stream.." "..mode.."\n") + local resp, err = client:receive() + if not resp then + print("Unknown error: "..err) + return nil, nil, "Debugger connection error: "..err + end + local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") + if status == "200" then + print("Stream "..stream.." redirected") + outputs[stream] = type(options) == 'table' and options.handler or nil + + elseif type(options) == 'table' and options.handler then + outputs[stream] = options.handler + else + print("Unknown error") + return nil, nil, "Debugger error: can't redirect "..stream + end + else + print("Invalid command") + end + elseif command == "basedir" then + local _, _, dir = string.find(params, "^[a-z]+%s+(.+)$") + if dir then + dir = string.gsub(dir, "\\", "/") + if not string.find(dir, "/$") then dir = dir .. "/" end + + local remdir = dir:match("\t(.+)") + if remdir then dir = dir:gsub("/?\t.+", "/") end + basedir = dir + + client:send("BASEDIR "..(remdir or dir).."\n") + local resp, err = client:receive() + if not resp then + print("Unknown error: "..err) + return nil, nil, "Debugger connection error: "..err + end + local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") + if status == "200" then + print("New base directory is " .. basedir) + else + print("Unknown error") + return nil, nil, "Debugger error: unexpected response after BASEDIR" + end + else + print(basedir) + end + elseif command == "help" then + print("setb -- sets a breakpoint") + print("delb -- removes a breakpoint") + print("delallb -- removes all breakpoints") + print("setw -- adds a new watch expression") + print("delw -- removes the watch expression at index") + print("delallw -- removes all watch expressions") + print("run -- runs until next breakpoint") + print("step -- runs until next line, stepping into function calls") + print("over -- runs until next line, stepping over function calls") + print("out -- runs until line after returning from current function") + print("listb -- lists breakpoints") + print("listw -- lists watch expressions") + print("eval -- evaluates expression on the current context and returns its value") + print("exec -- executes statement on the current context") + print("load -- loads a local file for debugging") + print("reload -- restarts the current debugging session") + print("stack -- reports stack trace") + print("output stdout -- capture and redirect io stream (default|copy|redirect)") + print("basedir [] -- sets the base path of the remote application, or shows the current one") + print("done -- stops the debugger and continues application execution") + print("exit -- exits debugger and the application") + else + local _, _, spaces = string.find(params, "^(%s*)$") + if spaces then + return nil, nil, "Empty command" + else + print("Invalid command") + return nil, nil, "Invalid command" + end + end + return file, line +end + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +local cocreate +local function coro() + if cocreate then return end + cocreate = cocreate or coroutine.create + coroutine.create = function(f, ...) + return cocreate(function(...) + mobdebug.on() + return f(...) + end, ...) + end +end + +local moconew +local function moai() + if moconew then return end + moconew = moconew or (MOAICoroutine and MOAICoroutine.new) + if not moconew then return end + MOAICoroutine.new = function(...) + local thread = moconew(...) + + + local mt = thread.run and thread or getmetatable(thread) + local patched = mt.run + mt.run = function(self, f, ...) + return patched(self, function(...) + mobdebug.on() + return f(...) + end, ...) + end + return thread + end +end + + +mobdebug.setbreakpoint = set_breakpoint +mobdebug.removebreakpoint = remove_breakpoint +mobdebug.listen = listen +mobdebug.loop = loop +mobdebug.scratchpad = scratchpad +mobdebug.handle = handle +mobdebug.connect = connect +mobdebug.start = start +mobdebug.on = on +mobdebug.off = off +mobdebug.moai = moai +mobdebug.coro = coro +mobdebug.done = done +mobdebug.pause = function() step_into = true end +mobdebug.yield = nil +mobdebug.output = output +mobdebug.onexit = os and os.exit or done +mobdebug.onscratch = nil +mobdebug.basedir = function(b) if b then basedir = b end return basedir end + +mobdebug.setbreakpoint_hook = nil +mobdebug.removebreakpoint_hook = nil +mobdebug.command_hook = nil +mobdebug.on_return_hook = nil +mobdebug.iscasepreserving = iscasepreserving +mobdebug.get_filename = get_filename +mobdebug.get_server_data = get_server_data + +return mobdebug +@builtins/scripts/mobdebug.luabuiltins.scripts.socketbuiltins.scripts.edn/builtins/scripts/socket.luac/builtins/scripts/edn.luac" \ No newline at end of file diff --git a/build/default_html5/builtins/scripts/socket.luac b/build/default_html5/builtins/scripts/socket.luac new file mode 100644 index 0000000..86c13a5 Binary files /dev/null and b/build/default_html5/builtins/scripts/socket.luac differ diff --git a/build/default_html5/digest_cache b/build/default_html5/digest_cache new file mode 100644 index 0000000..1647d13 Binary files /dev/null and b/build/default_html5/digest_cache differ diff --git a/build/default_html5/game.arcd b/build/default_html5/game.arcd new file mode 100644 index 0000000..a63dca9 Binary files /dev/null and b/build/default_html5/game.arcd differ diff --git a/build/default_html5/game.arci b/build/default_html5/game.arci new file mode 100644 index 0000000..b0e32c7 Binary files /dev/null and b/build/default_html5/game.arci differ diff --git a/build/default_html5/game.dmanifest b/build/default_html5/game.dmanifest new file mode 100644 index 0000000..48bb977 Binary files /dev/null and b/build/default_html5/game.dmanifest differ diff --git a/build/default_html5/game.graph.json b/build/default_html5/game.graph.json new file mode 100644 index 0000000..583ee1d --- /dev/null +++ b/build/default_html5/game.graph.json @@ -0,0 +1,577 @@ +[ { + "path" : "/", + "hexDigest" : null, + "children" : [ "/main/main.collectionc", "/builtins/render/default.renderc", "/input/game.input_bindingc", "/builtins/input/default.gamepadsc", "/builtins/render/default.display_profilesc", "/builtins/scripts/debugger.luac" ] +}, { + "path" : "/main/main.collectionc", + "hexDigest" : "3a35289135146291b944754579b0fe0b91a9510d", + "children" : [ "/_generated_d4ec2114f6dfad3d.goc" ] +}, { + "path" : "/_generated_d4ec2114f6dfad3d.goc", + "hexDigest" : "e1871a68b6ac3eddb9d1f7d9397fafa943744289", + "children" : [ "/main/main.scriptc", "/_generated_54ffa93569eed46a.collectionproxyc", "/_generated_22d1fc7ae0bd5bd0.collectionproxyc", "/_generated_53ed630c549fcb87.collectionproxyc", "/_generated_b103c7359689da0b.collectionproxyc", "/_generated_419becd5ed4db8b.collectionproxyc", "/_generated_236997ab845940c.collectionproxyc", "/_generated_e8cbfb71fe23eec8.collectionproxyc", "/_generated_4a222fd82bad3aaf.collectionproxyc" ] +}, { + "path" : "/main/main.scriptc", + "hexDigest" : "fbd5255a80ea0952f928bff0d5e63e3844da9bc2", + "children" : [ ] +}, { + "path" : "/_generated_54ffa93569eed46a.collectionproxyc", + "hexDigest" : "644005e68e36f168a08e921434abcb24c4ce22eb", + "nodeType" : "CollectionProxy", + "children" : [ "/main/level1.collectionc" ] +}, { + "path" : "/main/level1.collectionc", + "hexDigest" : "23be3338128d23c4d1c604920f96b7897329df99", + "children" : [ "/_generated_2bf9667414e5a2c.goc", "/_generated_5b192115ecd23fde.goc", "/_generated_6b0ffd2bcc6a2984.goc", "/_generated_61587772a15a6c13.goc", "/_generated_2d36d166122f897b.goc", "/_generated_cdf7cf5f280ae46d.goc", "/_generated_d3e1fe6da0f3fa31.goc", "/_generated_5b8669269d6f71d8.goc", "/_generated_959ab0edc2c2fea9.goc", "/_generated_3684dfa9ce24875d.goc", "/_generated_dc4b2fe2d3370a3b.goc", "/_generated_133d8b97d2fa041f.goc" ] +}, { + "path" : "/_generated_2bf9667414e5a2c.goc", + "hexDigest" : "9aed1e3aba62b600fad352054c66b162faa0527b", + "children" : [ "/_generated_3a25a3fcb5bae71b.collectionfactoryc" ] +}, { + "path" : "/_generated_3a25a3fcb5bae71b.collectionfactoryc", + "hexDigest" : "0dd318bd48be61ddb343b93ecca248ce08a4fd4d", + "children" : [ "/main/amulet.collectionc" ] +}, { + "path" : "/main/amulet.collectionc", + "hexDigest" : "463c6d2de9ce85ea844fdbd621367e272c635f50", + "children" : [ "/_generated_4513c25b05eae8e5.goc" ] +}, { + "path" : "/_generated_4513c25b05eae8e5.goc", + "hexDigest" : "f4ffb0b02b5f361b76abbce5764a58a799a89dc8", + "children" : [ "/main/amulet.scriptc", "/_generated_249935d7b5de1d6b.collisionobjectc", "/_generated_7e5931cddf5bf97f.spritec" ] +}, { + "path" : "/main/amulet.scriptc", + "hexDigest" : "cc789438fb90b22c19a2d289eb89617171c124bd", + "children" : [ ] +}, { + "path" : "/_generated_249935d7b5de1d6b.collisionobjectc", + "hexDigest" : "636021469beac5f97b5127dc15489a8e4b24d3a7", + "children" : [ ] +}, { + "path" : "/_generated_7e5931cddf5bf97f.spritec", + "hexDigest" : "7906238f25ef023837fe1d526a60f189373f079f", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/builtins/materials/sprite.materialc", + "hexDigest" : "db13f53b2e820569ae3414fc55947f6c083434b9", + "children" : [ "/builtins/materials/sprite.vpc", "/builtins/materials/sprite.fpc" ] +}, { + "path" : "/builtins/materials/sprite.vpc", + "hexDigest" : "d552818fdef9641f74c54892a2f713b3a6270aef", + "children" : [ ] +}, { + "path" : "/builtins/materials/sprite.fpc", + "hexDigest" : "837f43916a3760a0cd7d887c931b62b4e34ae75e", + "children" : [ ] +}, { + "path" : "/main/graphics.a.texturesetc", + "hexDigest" : "f7d11f42bef2dfdafee162d0be55c5f6ed607622", + "children" : [ "/main/graphics.texturec" ] +}, { + "path" : "/main/graphics.texturec", + "hexDigest" : "b96b52ada95ed0c34493c6544fe0942791315d12", + "children" : [ ] +}, { + "path" : "/_generated_5b192115ecd23fde.goc", + "hexDigest" : "a1fb9ece6643a83a49c9e4b9fa65de3dedcb565d", + "children" : [ "/_generated_a170a90296ce77cc.spritec" ] +}, { + "path" : "/_generated_a170a90296ce77cc.spritec", + "hexDigest" : "a3d0a147c28c1aea606835a2452e842bb658500d", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_6b0ffd2bcc6a2984.goc", + "hexDigest" : "73d311b18b914514a1183684783c514b2a5a3a35", + "children" : [ "/main/banner.scriptc", "/main/score.guic" ] +}, { + "path" : "/main/banner.scriptc", + "hexDigest" : "6f4728c5f4d31ed580a5605c0a2dd46916627330", + "children" : [ ] +}, { + "path" : "/main/score.guic", + "hexDigest" : "1f6e3d4a2833e7ead774b5edc52f0e7b2a4d1712", + "children" : [ "/main/score.gui_scriptc", "/builtins/fonts/default.fontc", "/main/newfont.fontc", "/builtins/materials/gui.materialc", "/builtins/materials/gui.materialc", "/builtins/materials/sprite.materialc" ] +}, { + "path" : "/main/score.gui_scriptc", + "hexDigest" : "2fd15cb730bcbf17e47208bf5301cb528300a71c", + "children" : [ ] +}, { + "path" : "/builtins/fonts/default.fontc", + "hexDigest" : "7ae4c3403a76705341f9ed42c3a172c3d5f81c5b", + "children" : [ "/_generated_vera_mo_bd_2e9565c19ca35f02.glyph_bankc", "/builtins/fonts/font-df.materialc" ] +}, { + "path" : "/_generated_vera_mo_bd_2e9565c19ca35f02.glyph_bankc", + "hexDigest" : "1d7aae875294d8cebee935429d40a13d7be6afd4", + "children" : [ ] +}, { + "path" : "/builtins/fonts/font-df.materialc", + "hexDigest" : "ba7ea0c2a36beb8ab41f1f47873c6f3fc40ed266", + "children" : [ "/builtins/fonts/font-df.vpc", "/builtins/fonts/font-df.fpc" ] +}, { + "path" : "/builtins/fonts/font-df.vpc", + "hexDigest" : "3c1c31a091b84725d2ff6cae89489aa17e5b0a35", + "children" : [ ] +}, { + "path" : "/builtins/fonts/font-df.fpc", + "hexDigest" : "6f63a74ce04d9abe2308f5293cabd4d34c33343a", + "children" : [ ] +}, { + "path" : "/main/newfont.fontc", + "hexDigest" : "8fec44afdca6c2f35892f8418c61090a43899cf3", + "children" : [ "/_generated_NEWFONT_ab84e69480ecddd3.glyph_bankc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/_generated_NEWFONT_ab84e69480ecddd3.glyph_bankc", + "hexDigest" : "d4a4f44d9f5b513aab9467232a81af009fb4f8a7", + "children" : [ ] +}, { + "path" : "/builtins/materials/gui.materialc", + "hexDigest" : "5473f20bbdd848320f75a0d66ccc4dadad84ccf9", + "children" : [ "/builtins/materials/gui.vpc", "/builtins/materials/gui.fpc" ] +}, { + "path" : "/builtins/materials/gui.vpc", + "hexDigest" : "7113ebd2943a4b5eaf64e3e5e62bacd2dffd108a", + "children" : [ ] +}, { + "path" : "/builtins/materials/gui.fpc", + "hexDigest" : "faab7a4198aaaa4543210ce43cfba480a1fe2501", + "children" : [ ] +}, { + "path" : "/_generated_61587772a15a6c13.goc", + "hexDigest" : "082c191207ab579a8d8c63cc3e6b886f60d1bf8e", + "children" : [ "/main/level1.scriptc" ] +}, { + "path" : "/main/level1.scriptc", + "hexDigest" : "f3cc61d13d7950ead909ba60bfec44bb4e5a6f68", + "children" : [ ] +}, { + "path" : "/_generated_2d36d166122f897b.goc", + "hexDigest" : "68954c934f33d3b445d4285b0eafe7990db4570f", + "children" : [ "/_generated_bd30462052881e40.collectionfactoryc" ] +}, { + "path" : "/_generated_bd30462052881e40.collectionfactoryc", + "hexDigest" : "9d89326004d2cadf25cbc52e8da00474345c8d6e", + "children" : [ "/main/curses.collectionc" ] +}, { + "path" : "/main/curses.collectionc", + "hexDigest" : "0c6d62e9b9e98bf365fc0baeab593f8ca626b4a5", + "children" : [ "/_generated_b020700d2dea160a.goc" ] +}, { + "path" : "/_generated_b020700d2dea160a.goc", + "hexDigest" : "989bc8ac338acd7249e98181b98f2d248934f770", + "children" : [ "/main/curse.scriptc", "/_generated_30893a62d302113a.spritec", "/_generated_2f909f707aaee86f.collisionobjectc" ] +}, { + "path" : "/main/curse.scriptc", + "hexDigest" : "cae4037175c8555702b46b4b44698f2352f8e141", + "children" : [ ] +}, { + "path" : "/_generated_30893a62d302113a.spritec", + "hexDigest" : "b8c6b1cda5aee754a6b0fd6b39ea57243c8844f4", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_2f909f707aaee86f.collisionobjectc", + "hexDigest" : "f11cd9900d9a6d6f1c48dd16782904c3fdfe3678", + "children" : [ ] +}, { + "path" : "/_generated_cdf7cf5f280ae46d.goc", + "hexDigest" : "95eebb7a47b7d8d7518e9bb2877f717d46742dd1", + "children" : [ "/main/holdingamulet.scriptc", "/_generated_7e5931cddf5bf97f.spritec", "/_generated_5b8c4d26b3ec1189.collisionobjectc" ] +}, { + "path" : "/main/holdingamulet.scriptc", + "hexDigest" : "ba612963cba75563fc4b06504e09109a43518d1f", + "children" : [ ] +}, { + "path" : "/_generated_5b8c4d26b3ec1189.collisionobjectc", + "hexDigest" : "148709ff222b37fbace6f19d2bf1ee07db42671b", + "children" : [ ] +}, { + "path" : "/_generated_d3e1fe6da0f3fa31.goc", + "hexDigest" : "21a12ad1c111b004494484ee3fc5fee39954b4a5", + "children" : [ "/_generated_563817c3452b46d7.spritec", "/_generated_d4bdcfc1926b056e.collisionobjectc", "/_generated_e213b0dff31f1f59.spritec", "/_generated_9c59903058f0c647.collisionobjectc", "/_generated_e213b0dff31f1f59.spritec", "/_generated_1f45b239c9cb670e.collisionobjectc", "/_generated_6ade7a42ff848753.collisionobjectc", "/_generated_e213b0dff31f1f59.spritec" ] +}, { + "path" : "/_generated_563817c3452b46d7.spritec", + "hexDigest" : "ed7afb8cf869d9dffba3568ac574e623a25c7848", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_d4bdcfc1926b056e.collisionobjectc", + "hexDigest" : "5e7e0b06a21a6f1f65e249a437d1019482dcf1c9", + "children" : [ ] +}, { + "path" : "/_generated_e213b0dff31f1f59.spritec", + "hexDigest" : "6a7c917615d08955076938e2bf8a0a51b55a9032", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_9c59903058f0c647.collisionobjectc", + "hexDigest" : "947b093382e6f1b4222076a0ea0fa7fb2b87f938", + "children" : [ ] +}, { + "path" : "/_generated_1f45b239c9cb670e.collisionobjectc", + "hexDigest" : "cd0cb52ab6a6defb5741bb4efb39566f69bf7287", + "children" : [ ] +}, { + "path" : "/_generated_6ade7a42ff848753.collisionobjectc", + "hexDigest" : "bca927d5ec7debe00f4bdb39eb4880ceb9d6842a", + "children" : [ ] +}, { + "path" : "/_generated_5b8669269d6f71d8.goc", + "hexDigest" : "6d4419338eab77e1ed20185c47343ab2a5e4fddb", + "children" : [ "/_generated_8d2ccdcfdf07e83d.spritec", "/_generated_8fc8ed98ebf4b283.spritec", "/_generated_8fc8ed98ebf4b283.spritec" ] +}, { + "path" : "/_generated_8d2ccdcfdf07e83d.spritec", + "hexDigest" : "d8588e6212370de69e43bfa71f62e8c12fff3261", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_8fc8ed98ebf4b283.spritec", + "hexDigest" : "050ad9ab1fda409fc73cd16aa2226da3a573172a", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_959ab0edc2c2fea9.goc", + "hexDigest" : "024cc3b83192d5e155af3a73c28df75516fad67f", + "children" : [ "/main/mummy.scriptc", "/_generated_42b74483bde37f04.spritec", "/_generated_6f8033e5cc4364c3.spritec" ] +}, { + "path" : "/main/mummy.scriptc", + "hexDigest" : "bb68e83563241c6d6c34f7d85e5b395f4cdd3751", + "children" : [ ] +}, { + "path" : "/_generated_42b74483bde37f04.spritec", + "hexDigest" : "172354a5d6225a53af97a12f9ba2be44bab6d46f", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_6f8033e5cc4364c3.spritec", + "hexDigest" : "84972caa2e5488957732eb2e2322c1a897ea1bb3", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_3684dfa9ce24875d.goc", + "hexDigest" : "f0488a70896342a3b7bef211bd6ba4117c093248", + "children" : [ "/_generated_e95bcc7f18ee0e3c.spritec" ] +}, { + "path" : "/_generated_e95bcc7f18ee0e3c.spritec", + "hexDigest" : "f791ea932fe0972857d7a563593a4b018a05adc0", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_dc4b2fe2d3370a3b.goc", + "hexDigest" : "a189e840fb3535eba472f1567cae9269d723d392", + "children" : [ "/_generated_2a06d3e471d60658.spritec", "/_generated_2a06d3e471d60658.spritec", "/_generated_37cadf53ba24c93.spritec", "/_generated_4fe274b8a1f1fb59.spritec", "/_generated_642ae3e1f9421d87.collisionobjectc", "/_generated_92c7e9ad024da47.spritec", "/_generated_30f74a58e53f203e.collisionobjectc", "/_generated_dd2483d8466255d8.collisionobjectc", "/_generated_c1934409c37b404.collisionobjectc", "/_generated_d34fad42d7fd4dbe.collisionobjectc", "/_generated_aeea160ce7553c49.collisionobjectc" ] +}, { + "path" : "/_generated_2a06d3e471d60658.spritec", + "hexDigest" : "e0365ee247638da23c506492213e0075ca6eebed", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_37cadf53ba24c93.spritec", + "hexDigest" : "0090a51d81808e9a65d409acbd8b820f8a8ca878", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_4fe274b8a1f1fb59.spritec", + "hexDigest" : "8ce526d8de3621d603c24450af0b09ca0c5a0655", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_642ae3e1f9421d87.collisionobjectc", + "hexDigest" : "b42a25c704596532757efe2d10994172e31d2a0b", + "children" : [ ] +}, { + "path" : "/_generated_92c7e9ad024da47.spritec", + "hexDigest" : "c236db33e5ccc64dc4f4a131cd3d8b4a0d0d4233", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_30f74a58e53f203e.collisionobjectc", + "hexDigest" : "72ffc5ee4f174b0704097827aa6664a941aaa98a", + "children" : [ ] +}, { + "path" : "/_generated_dd2483d8466255d8.collisionobjectc", + "hexDigest" : "3fa907d2eb97b00699fa4a00d4feb432127bd6f2", + "children" : [ ] +}, { + "path" : "/_generated_c1934409c37b404.collisionobjectc", + "hexDigest" : "f64f5c985058c7ed1c897bcc3d37c8d73e63d88b", + "children" : [ ] +}, { + "path" : "/_generated_d34fad42d7fd4dbe.collisionobjectc", + "hexDigest" : "83eb959ca435576929b8e28a245ba15cd7dcafb7", + "children" : [ ] +}, { + "path" : "/_generated_aeea160ce7553c49.collisionobjectc", + "hexDigest" : "10e29b8575cce45a59d26fa6fc57af8487994eb2", + "children" : [ ] +}, { + "path" : "/_generated_133d8b97d2fa041f.goc", + "hexDigest" : "55edea8d951d0dfc9e9cce7e9c90acb5fc9ead4e", + "children" : [ "/main/player.scriptc", "/main/debug.guic", "/_generated_8d2ccdcfdf07e83d.spritec", "/_generated_208a3d262f3539ac.collisionobjectc", "/_generated_29d0035e0c07caf2.collisionobjectc" ] +}, { + "path" : "/main/player.scriptc", + "hexDigest" : "8138384fb7c67284b50d65e3387ce896d9fea561", + "children" : [ ] +}, { + "path" : "/main/debug.guic", + "hexDigest" : "924c654b433cb91e6ce49ee6ccf409a11ca1d61a", + "children" : [ "/main/debug.gui_scriptc", "/builtins/fonts/default.fontc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/main/debug.gui_scriptc", + "hexDigest" : "240fe627732dbe20b52c955dc289df512d2bd6d1", + "children" : [ ] +}, { + "path" : "/_generated_208a3d262f3539ac.collisionobjectc", + "hexDigest" : "cda325d4e0ea099ef68cab1990649e31a51136ae", + "children" : [ ] +}, { + "path" : "/_generated_29d0035e0c07caf2.collisionobjectc", + "hexDigest" : "e3ba6a5ddc719045b1c8544d0627eac0cdc8ef2a", + "children" : [ ] +}, { + "path" : "/_generated_22d1fc7ae0bd5bd0.collectionproxyc", + "hexDigest" : "20fd12ca506e375965328651a284b8b385a2495b", + "nodeType" : "CollectionProxy", + "children" : [ "/main/startscreen.collectionc" ] +}, { + "path" : "/main/startscreen.collectionc", + "hexDigest" : "234d326f8cb716d2ef17ab3b34eafbadc9841228", + "children" : [ "/_generated_82802b4271728094.goc", "/_generated_8abb136f0699bbb4.goc", "/_generated_5587b75427539e54.goc" ] +}, { + "path" : "/_generated_82802b4271728094.goc", + "hexDigest" : "eb31c0d2ad6c19af0c3b308f2fe4e71c959b8d0b", + "children" : [ "/_generated_4f729236e4a67126.spritec" ] +}, { + "path" : "/_generated_4f729236e4a67126.spritec", + "hexDigest" : "76478036beaf0d46a3bebc5065714e39e9f444d4", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_8abb136f0699bbb4.goc", + "hexDigest" : "272d3676bf869270858fda0ff36f922ddb4c773e", + "children" : [ "/main/startscreen.guic" ] +}, { + "path" : "/main/startscreen.guic", + "hexDigest" : "f3bc9010dff6f6e93ae21e1be0c03cbbe3c1c0df", + "children" : [ "/main/startscreen.gui_scriptc", "/main/graphics.a.texturesetc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/main/startscreen.gui_scriptc", + "hexDigest" : "610dfbe7ede33baaa4e4a7214b7619c20174cf51", + "children" : [ ] +}, { + "path" : "/_generated_5587b75427539e54.goc", + "hexDigest" : "69c915a4b8e02f09f3f32f160adbe1eb1d495478", + "children" : [ "/main/clouds.scriptc", "/_generated_9b4ffbdff40004c2.spritec" ] +}, { + "path" : "/main/clouds.scriptc", + "hexDigest" : "fde979690045e112e4f2259f6adb096981854e2c", + "children" : [ ] +}, { + "path" : "/_generated_9b4ffbdff40004c2.spritec", + "hexDigest" : "0e39c687549f9222240151a98ab6ab7d243cb15b", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_53ed630c549fcb87.collectionproxyc", + "hexDigest" : "56c4dea540feb4b9e86d539d39daf776b9319062", + "nodeType" : "CollectionProxy", + "children" : [ "/main/gameover.collectionc" ] +}, { + "path" : "/main/gameover.collectionc", + "hexDigest" : "c2d282db6073a3ff138e1e8441a65d8b6c0a6860", + "children" : [ "/_generated_2934fa86a8d15d1f.goc", "/_generated_962c878f3a6abbed.goc" ] +}, { + "path" : "/_generated_2934fa86a8d15d1f.goc", + "hexDigest" : "070d819272134b728029854c6878b2e8cea41641", + "children" : [ "/main/gameover.scriptc", "/_generated_6ef2fcfff156890d.spritec" ] +}, { + "path" : "/main/gameover.scriptc", + "hexDigest" : "9ebb16d52b5cd3e11e446f2e20a3a7c46f2487b2", + "children" : [ ] +}, { + "path" : "/_generated_6ef2fcfff156890d.spritec", + "hexDigest" : "ebf1d4042351668e97c2813a5df8da40112e4d53", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_962c878f3a6abbed.goc", + "hexDigest" : "8830b98f5a714148d32b5671a0554eb0b8dd6dab", + "children" : [ "/main/button.guic" ] +}, { + "path" : "/main/button.guic", + "hexDigest" : "64f24c547bf6bc6d30a4286d878d549254b871c3", + "children" : [ "/main/button.gui_scriptc", "/main/graphics.a.texturesetc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/main/button.gui_scriptc", + "hexDigest" : "146b8574fae10d29aee213e11a061bea812f4b9d", + "children" : [ ] +}, { + "path" : "/_generated_b103c7359689da0b.collectionproxyc", + "hexDigest" : "59e016dfcd436428b57ebb672d6ded6cff678331", + "nodeType" : "CollectionProxy", + "children" : [ "/main/scoreboard.collectionc" ] +}, { + "path" : "/main/scoreboard.collectionc", + "hexDigest" : "65fe610b4432e912548da162e157dc5e7d6fb95c", + "children" : [ "/_generated_7f2a758c46bffadf.goc", "/_generated_847d82f55e0f5a1c.goc" ] +}, { + "path" : "/_generated_7f2a758c46bffadf.goc", + "hexDigest" : "d0412c644c66229c42e66d0b9bc07dd5894753c6", + "children" : [ "/main/scoreboard.scriptc", "/_generated_98bc9cd600800ae1.spritec" ] +}, { + "path" : "/main/scoreboard.scriptc", + "hexDigest" : "e693dc159ca22ff81750be876d5656972897f0dd", + "children" : [ ] +}, { + "path" : "/_generated_98bc9cd600800ae1.spritec", + "hexDigest" : "5df1511f6bfd0a7d3d53381bae537ae1fb56a1b2", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_847d82f55e0f5a1c.goc", + "hexDigest" : "1a0642a8cb4fdf7b8166966e041ba8dfa9823da5", + "children" : [ "/main/scoreboard.guic" ] +}, { + "path" : "/main/scoreboard.guic", + "hexDigest" : "912f2173849f539af88b5c853cc33a93212f669c", + "children" : [ "/main/scoreboard.gui_scriptc", "/builtins/fonts/default.fontc", "/main/newfont.fontc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/main/scoreboard.gui_scriptc", + "hexDigest" : "14b0fe836c57f23d9469dfb869d8b1eb12466a5c", + "children" : [ ] +}, { + "path" : "/_generated_419becd5ed4db8b.collectionproxyc", + "hexDigest" : "50ab0c2f0a137146c0700958086bbc589378c4d4", + "nodeType" : "CollectionProxy", + "children" : [ "/main/entername.collectionc" ] +}, { + "path" : "/main/entername.collectionc", + "hexDigest" : "912795143d7c60c520d169bcc4b92de92cd7f169", + "children" : [ "/_generated_609868fc60af9bf.goc", "/_generated_4bb7689e5f1fe898.goc" ] +}, { + "path" : "/_generated_609868fc60af9bf.goc", + "hexDigest" : "821a8e8878869fa31a2d89690c9a85636568169d", + "children" : [ "/main/entername.scriptc", "/_generated_886a9d5690698724.spritec" ] +}, { + "path" : "/main/entername.scriptc", + "hexDigest" : "b939a916f292567e9283da88d74963fc253cc5da", + "children" : [ ] +}, { + "path" : "/_generated_886a9d5690698724.spritec", + "hexDigest" : "3a144df3fb062374a8aeab08cdeca466daac3e10", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_4bb7689e5f1fe898.goc", + "hexDigest" : "49ae80e6c50bebf3dcdf44c5279c4f81f012105f", + "children" : [ "/main/entername.guic" ] +}, { + "path" : "/main/entername.guic", + "hexDigest" : "79c2dc46e40b115aea7deed93870ce8fc05f0e15", + "children" : [ "/main/entername.gui_scriptc", "/builtins/fonts/default.fontc", "/main/newfont.fontc", "/builtins/materials/gui.materialc" ] +}, { + "path" : "/main/entername.gui_scriptc", + "hexDigest" : "8db57ff3a6575cb96317ed50dc635f900aac6d13", + "children" : [ ] +}, { + "path" : "/_generated_236997ab845940c.collectionproxyc", + "hexDigest" : "28dbb601c745d5f3e6e10992e653f5139e71cbce", + "nodeType" : "CollectionProxy", + "children" : [ "/main/instructions.collectionc" ] +}, { + "path" : "/main/instructions.collectionc", + "hexDigest" : "7829dd061bcd0accac33e4d8b59711e5827e48f9", + "children" : [ "/_generated_e04e4756888791f1.goc" ] +}, { + "path" : "/_generated_e04e4756888791f1.goc", + "hexDigest" : "b77435458dc6a09a24eace6787942fc344e4d572", + "children" : [ "/main/instructions.scriptc", "/_generated_88892236f9607330.spritec" ] +}, { + "path" : "/main/instructions.scriptc", + "hexDigest" : "9ed61df95d4ad8f177d8130b997f02b0535662c7", + "children" : [ ] +}, { + "path" : "/_generated_88892236f9607330.spritec", + "hexDigest" : "bc7332593d8a642c75ac7c76a1f145812159057c", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_e8cbfb71fe23eec8.collectionproxyc", + "hexDigest" : "e0a74fd515f92fadf9bff651f370416c48cb1d0b", + "nodeType" : "CollectionProxy", + "children" : [ "/main/settings.collectionc" ] +}, { + "path" : "/main/settings.collectionc", + "hexDigest" : "b7e6b4ee17092d7e4030edd20656710922d534f9", + "children" : [ "/_generated_5eb58a211445e4f5.goc" ] +}, { + "path" : "/_generated_5eb58a211445e4f5.goc", + "hexDigest" : "9d954162ce099355c9a106bcf39d09433e32ca1d", + "children" : [ "/main/settings.scriptc", "/_generated_37e5e96cf070af83.spritec" ] +}, { + "path" : "/main/settings.scriptc", + "hexDigest" : "845cad0bc1b3c94d7ad52f63b2314afa31d45b0b", + "children" : [ ] +}, { + "path" : "/_generated_37e5e96cf070af83.spritec", + "hexDigest" : "e1671c24b7bce500dc9f11bb1dcedc29980394ac", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_4a222fd82bad3aaf.collectionproxyc", + "hexDigest" : "961fa56d9034e6fc5c6a16abfdd669c120f0b18d", + "nodeType" : "CollectionProxy", + "children" : [ "/main/level2.collectionc" ] +}, { + "path" : "/main/level2.collectionc", + "hexDigest" : "53ea701f2b3823b078a795c8d20cc1ba4c7528e7", + "children" : [ "/_generated_2bf9667414e5a2c.goc", "/_generated_5b192115ecd23fde.goc", "/_generated_6b0ffd2bcc6a2984.goc", "/_generated_ff5869762c900a5.goc", "/_generated_2d36d166122f897b.goc", "/_generated_cdf7cf5f280ae46d.goc", "/_generated_d3e1fe6da0f3fa31.goc", "/_generated_5b8669269d6f71d8.goc", "/_generated_959ab0edc2c2fea9.goc", "/_generated_64670c9755830fee.goc", "/_generated_fa28c6c7c7fddfb1.goc", "/_generated_133d8b97d2fa041f.goc" ] +}, { + "path" : "/_generated_ff5869762c900a5.goc", + "hexDigest" : "8b5e8232dfd4f19db220baa66a601d3910cb1385", + "children" : [ "/main/level2.scriptc" ] +}, { + "path" : "/main/level2.scriptc", + "hexDigest" : "365cd2b4f6c778def2bd00ca172027f12407666c", + "children" : [ ] +}, { + "path" : "/_generated_64670c9755830fee.goc", + "hexDigest" : "4315ece57c23a21657e781f938eb28ced5716f61", + "children" : [ "/_generated_e95bcc7f18ee0e3c.spritec" ] +}, { + "path" : "/_generated_fa28c6c7c7fddfb1.goc", + "hexDigest" : "32d5c72be6fb5dbfea6345709bb1cde38dde7ae9", + "children" : [ "/_generated_2a06d3e471d60658.spritec", "/_generated_2a06d3e471d60658.spritec", "/_generated_4fe274b8a1f1fb59.spritec", "/_generated_642ae3e1f9421d87.collisionobjectc", "/_generated_30f74a58e53f203e.collisionobjectc", "/_generated_729a9337d828d2b8.collisionobjectc", "/_generated_c1934409c37b404.collisionobjectc", "/_generated_d34fad42d7fd4dbe.collisionobjectc", "/_generated_aeea160ce7553c49.collisionobjectc", "/_generated_233a40178593d72f.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_233a40178593d72f.spritec", "/_generated_5f203b457ed5c777.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_233a40178593d72f.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_91fcd5742a792f52.spritec", "/_generated_91fcd5742a792f52.spritec" ] +}, { + "path" : "/_generated_729a9337d828d2b8.collisionobjectc", + "hexDigest" : "598e5afcf0581e01c3c4202f1272ff8f9571fba5", + "children" : [ ] +}, { + "path" : "/_generated_233a40178593d72f.spritec", + "hexDigest" : "3e028a2a5b367437df10241652780e07b7be1b0e", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_91fcd5742a792f52.spritec", + "hexDigest" : "77c16d7e7892d3a63fa3eee45826a73d0381745d", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/_generated_5f203b457ed5c777.spritec", + "hexDigest" : "a3d973eef66b08183f829b483692f3bb7afd8cea", + "children" : [ "/builtins/materials/sprite.materialc", "/main/graphics.a.texturesetc" ] +}, { + "path" : "/builtins/render/default.renderc", + "hexDigest" : "62fcf66fed9988305fe48996f4d7693b2fac6e49", + "children" : [ "/builtins/render/default.render_scriptc" ] +}, { + "path" : "/builtins/render/default.render_scriptc", + "hexDigest" : "826ffac6e8f67df41607ca9fac313635b3795675", + "children" : [ ] +}, { + "path" : "/input/game.input_bindingc", + "hexDigest" : "2bd66b5247d4e728ece34d6ec8b8aeff1ec92d40", + "children" : [ ] +}, { + "path" : "/builtins/input/default.gamepadsc", + "hexDigest" : "794805689d42741d5e934daba7be978b3efaac41", + "children" : [ ] +}, { + "path" : "/builtins/render/default.display_profilesc", + "hexDigest" : "4187e11a10b0dd0d7f1b34d3ae3c0e9632dc69fd", + "children" : [ ] +}, { + "path" : "/builtins/scripts/debugger.luac", + "hexDigest" : "da795e4cf4bca06179060d0ad617ea216073df35", + "children" : [ "/builtins/scripts/edn.luac", "/builtins/scripts/mobdebug.luac" ] +}, { + "path" : "/builtins/scripts/edn.luac", + "hexDigest" : "a257a3d28b4ccbdd0cee82951b03bb85d67fac4a", + "children" : [ ] +}, { + "path" : "/builtins/scripts/mobdebug.luac", + "hexDigest" : "8db838bbd616a8f07ee8c5bedffba7231c4279a1", + "children" : [ "/builtins/scripts/socket.luac", "/builtins/scripts/edn.luac" ] +}, { + "path" : "/builtins/scripts/socket.luac", + "hexDigest" : "57b9b27c9818923274f4f4ff535b4981e635ef05", + "children" : [ ] +} ] \ No newline at end of file diff --git a/build/default_html5/game.projectc b/build/default_html5/game.projectc new file mode 100644 index 0000000..2a81754 --- /dev/null +++ b/build/default_html5/game.projectc @@ -0,0 +1,213 @@ +[project] +title = My Project +version = 1.0 +write_log = 0 +minimum_log_level = 1 +compress_archive = 1 +publisher = unnamed +developer = unnamed +title_as_file_name = MyProject + +[display] +width = 1054 +height = 694 +high_dpi = 1 +samples = 0 +fullscreen = 0 +update_frequency = 0 +swap_interval = 1 +vsync = 1 +display_profiles = /builtins/render/default.display_profilesc +dynamic_orientation = 0 +display_device_info = 0 + +[render] +clear_color_red = 0 +clear_color_green = 0 +clear_color_blue = 0 +clear_color_alpha = 1 + +[physics] +type = 2D +max_collision_object_count = 128 +use_fixed_timestep = 0 +gravity_y = -900.0 +debug = 0 +debug_alpha = 0.9 +world_count = 4 +gravity_x = 0 +gravity_z = 0 +scale = 1 +allow_dynamic_transforms = 1 +debug_scale = 30 +max_collisions = 64 +max_contacts = 128 +contact_impulse_limit = 0 +ray_cast_limit_2d = 64 +ray_cast_limit_3d = 128 +trigger_overlap_capacity = 16 +velocity_threshold = 1 +max_fixed_timesteps = 2 + +[bootstrap] +main_collection = /main/main.collectionc +render = /builtins/render/default.renderc + +[graphics] +default_texture_min_filter = linear +default_texture_mag_filter = linear +max_draw_calls = 1024 +max_characters = 8192 +max_font_batches = 128 +max_debug_vertices = 10000 +texture_profiles = /builtins/graphics/default.texture_profiles +verify_graphics_calls = 1 +opengl_version_hint = 33 +opengl_core_profile_hint = true +memory_size = 512 + +[shader] +output_spirv = 0 + +[sound] +gain = 1 +max_sound_data = 128 +max_sound_buffers = 32 +max_sound_sources = 16 +max_sound_instances = 256 +max_component_count = 32 +use_thread = 1 + +[resource] +http_cache = 0 +max_resources = 1024 + +[input] +repeat_delay = 0.5 +repeat_interval = 0.2 +gamepads = /builtins/input/default.gamepadsc +game_binding = /input/game.input_bindingc +use_accelerometer = 1 + +[sprite] +max_count = 128 +subpixels = 1 + +[model] +max_count = 128 +split_meshes = 0 + +[mesh] +max_count = 128 + +[gui] +max_count = 64 +max_particlefx_count = 64 +max_particle_count = 1024 +max_animation_count = 1024 + +[collection] +max_instances = 1024 +max_input_stack_entries = 16 + +[collection_proxy] +max_count = 8 + +[collectionfactory] +max_count = 128 + +[factory] +max_count = 128 + +[ios] +launch_screen = /builtins/manifests/ios/LaunchScreen.storyboardc +pre_renderered_icons = 0 +bundle_identifier = example.unnamed +bundle_name = +infoplist = /builtins/manifests/ios/Info.plist +privacymanifest = /builtins/manifests/ios/PrivacyInfo.xcprivacy +default_language = en +localizations = en + +[android] +version_code = 1 +minimum_sdk_version = 19 +target_sdk_version = 35 +package = com.example.todo +gcm_sender_id = +manifest = /builtins/manifests/android/AndroidManifest.xml +iap_provider = GooglePlay +input_method = HiddenInputField +immersive_mode = 0 +display_cutout = 1 +debuggable = 0 +proguard = +extract_native_libs = 1 + +[osx] +app_icon = +infoplist = /builtins/manifests/osx/Info.plist +privacymanifest = /builtins/manifests/osx/PrivacyInfo.xcprivacy +bundle_identifier = example.unnamed +bundle_name = +bundle_version = 1 +default_language = en +localizations = en + +[windows] +app_icon = + +[html5] +custom_heap_size = 0 +heap_size = 256 +htmlfile = /builtins/manifests/web/engine_template.html +cssfile = /builtins/manifests/web/light_theme.css +archive_location_prefix = archive +archive_location_suffix = +engine_arguments = --verify-graphics-calls=false +wasm_streaming = 0 +show_fullscreen_button = 1 +show_made_with_defold = 1 +show_console_banner = 1 +scale_mode = fit +transparent_graphics_context = 0 + +[particle_fx] +max_count = 64 +max_emitter_count = 64 +max_particle_count = 1024 + +[network] +http_timeout = 0 +ssl_certificates = +http_thread_count = 4 +http_cache_enabled = 1 + +[library] +include_dirs = + +[script] +shared_state = 1 + +[label] +max_count = 64 +subpixels = 1 + +[profiler] +track_cpu = 0 +sleep_between_server_updates = 0 + +[liveupdate] +settings = /liveupdate.settings +enabled = 1 +mount_on_start = 1 + +[tilemap] +max_count = 16 +max_tile_count = 2048 + +[engine] +run_while_iconified = 0 +fixed_update_frequency = 60 +max_time_step = 0.5 + diff --git a/build/default_html5/game.public.der b/build/default_html5/game.public.der new file mode 100644 index 0000000..a372ee0 Binary files /dev/null and b/build/default_html5/game.public.der differ diff --git a/build/default_html5/input/game.input_bindingc b/build/default_html5/input/game.input_bindingc new file mode 100644 index 0000000..38ff8ef Binary files /dev/null and b/build/default_html5/input/game.input_bindingc differ diff --git a/build/default_html5/liveupdate.game.dmanifest b/build/default_html5/liveupdate.game.dmanifest new file mode 100644 index 0000000..48bb977 Binary files /dev/null and b/build/default_html5/liveupdate.game.dmanifest differ diff --git a/build/default_html5/main/amulet.collectionc b/build/default_html5/main/amulet.collectionc new file mode 100644 index 0000000..cc47d69 Binary files /dev/null and b/build/default_html5/main/amulet.collectionc differ diff --git a/build/default_html5/main/amulet.compcount_col b/build/default_html5/main/amulet.compcount_col new file mode 100644 index 0000000..252223a Binary files /dev/null and b/build/default_html5/main/amulet.compcount_col differ diff --git a/build/default_html5/main/amulet.scriptc b/build/default_html5/main/amulet.scriptc new file mode 100644 index 0000000..35aab09 Binary files /dev/null and b/build/default_html5/main/amulet.scriptc differ diff --git a/build/default_html5/main/banner.scriptc b/build/default_html5/main/banner.scriptc new file mode 100644 index 0000000..12cb5b0 Binary files /dev/null and b/build/default_html5/main/banner.scriptc differ diff --git a/build/default_html5/main/button.gui_scriptc b/build/default_html5/main/button.gui_scriptc new file mode 100644 index 0000000..efebf32 Binary files /dev/null and b/build/default_html5/main/button.gui_scriptc differ diff --git a/build/default_html5/main/button.guic b/build/default_html5/main/button.guic new file mode 100644 index 0000000..9a81b3d Binary files /dev/null and b/build/default_html5/main/button.guic differ diff --git a/build/default_html5/main/clouds.scriptc b/build/default_html5/main/clouds.scriptc new file mode 100644 index 0000000..189f4fe Binary files /dev/null and b/build/default_html5/main/clouds.scriptc differ diff --git a/build/default_html5/main/curse.scriptc b/build/default_html5/main/curse.scriptc new file mode 100644 index 0000000..3b67f99 Binary files /dev/null and b/build/default_html5/main/curse.scriptc differ diff --git a/build/default_html5/main/curses.collectionc b/build/default_html5/main/curses.collectionc new file mode 100644 index 0000000..3d0af38 Binary files /dev/null and b/build/default_html5/main/curses.collectionc differ diff --git a/build/default_html5/main/curses.compcount_col b/build/default_html5/main/curses.compcount_col new file mode 100644 index 0000000..252223a Binary files /dev/null and b/build/default_html5/main/curses.compcount_col differ diff --git a/build/default_html5/main/debug.gui_scriptc b/build/default_html5/main/debug.gui_scriptc new file mode 100644 index 0000000..b3d6c6d Binary files /dev/null and b/build/default_html5/main/debug.gui_scriptc differ diff --git a/build/default_html5/main/debug.guic b/build/default_html5/main/debug.guic new file mode 100644 index 0000000..a59a87e Binary files /dev/null and b/build/default_html5/main/debug.guic differ diff --git a/build/default_html5/main/entername.collectionc b/build/default_html5/main/entername.collectionc new file mode 100644 index 0000000..47b45fd Binary files /dev/null and b/build/default_html5/main/entername.collectionc differ diff --git a/build/default_html5/main/entername.compcount_col b/build/default_html5/main/entername.compcount_col new file mode 100644 index 0000000..f3167f2 Binary files /dev/null and b/build/default_html5/main/entername.compcount_col differ diff --git a/build/default_html5/main/entername.gui_scriptc b/build/default_html5/main/entername.gui_scriptc new file mode 100644 index 0000000..d9e3572 Binary files /dev/null and b/build/default_html5/main/entername.gui_scriptc differ diff --git a/build/default_html5/main/entername.guic b/build/default_html5/main/entername.guic new file mode 100644 index 0000000..55e4d8c Binary files /dev/null and b/build/default_html5/main/entername.guic differ diff --git a/build/default_html5/main/entername.scriptc b/build/default_html5/main/entername.scriptc new file mode 100644 index 0000000..b70c71e Binary files /dev/null and b/build/default_html5/main/entername.scriptc differ diff --git a/build/default_html5/main/gamefont.fontc b/build/default_html5/main/gamefont.fontc new file mode 100644 index 0000000..0457e37 Binary files /dev/null and b/build/default_html5/main/gamefont.fontc differ diff --git a/build/default_html5/main/gameover.collectionc b/build/default_html5/main/gameover.collectionc new file mode 100644 index 0000000..e805767 Binary files /dev/null and b/build/default_html5/main/gameover.collectionc differ diff --git a/build/default_html5/main/gameover.compcount_col b/build/default_html5/main/gameover.compcount_col new file mode 100644 index 0000000..f3167f2 Binary files /dev/null and b/build/default_html5/main/gameover.compcount_col differ diff --git a/build/default_html5/main/gameover.scriptc b/build/default_html5/main/gameover.scriptc new file mode 100644 index 0000000..f977b42 Binary files /dev/null and b/build/default_html5/main/gameover.scriptc differ diff --git a/build/default_html5/main/graphics.a.texturesetc b/build/default_html5/main/graphics.a.texturesetc new file mode 100644 index 0000000..7a942fb Binary files /dev/null and b/build/default_html5/main/graphics.a.texturesetc differ diff --git a/build/default_html5/main/graphics.texturec b/build/default_html5/main/graphics.texturec new file mode 100644 index 0000000..4c860b6 Binary files /dev/null and b/build/default_html5/main/graphics.texturec differ diff --git a/build/default_html5/main/holdingamulet.scriptc b/build/default_html5/main/holdingamulet.scriptc new file mode 100644 index 0000000..38ea402 Binary files /dev/null and b/build/default_html5/main/holdingamulet.scriptc differ diff --git a/build/default_html5/main/instructions.collectionc b/build/default_html5/main/instructions.collectionc new file mode 100644 index 0000000..a161ae2 Binary files /dev/null and b/build/default_html5/main/instructions.collectionc differ diff --git a/build/default_html5/main/instructions.compcount_col b/build/default_html5/main/instructions.compcount_col new file mode 100644 index 0000000..b7a0d1d Binary files /dev/null and b/build/default_html5/main/instructions.compcount_col differ diff --git a/build/default_html5/main/instructions.scriptc b/build/default_html5/main/instructions.scriptc new file mode 100644 index 0000000..1c46ea2 Binary files /dev/null and b/build/default_html5/main/instructions.scriptc differ diff --git a/build/default_html5/main/level1.collectionc b/build/default_html5/main/level1.collectionc new file mode 100644 index 0000000..81d9037 Binary files /dev/null and b/build/default_html5/main/level1.collectionc differ diff --git a/build/default_html5/main/level1.compcount_col b/build/default_html5/main/level1.compcount_col new file mode 100644 index 0000000..aee1951 Binary files /dev/null and b/build/default_html5/main/level1.compcount_col differ diff --git a/build/default_html5/main/level1.scriptc b/build/default_html5/main/level1.scriptc new file mode 100644 index 0000000..36a0a1a Binary files /dev/null and b/build/default_html5/main/level1.scriptc differ diff --git a/build/default_html5/main/level2.collectionc b/build/default_html5/main/level2.collectionc new file mode 100644 index 0000000..a131a59 Binary files /dev/null and b/build/default_html5/main/level2.collectionc differ diff --git a/build/default_html5/main/level2.compcount_col b/build/default_html5/main/level2.compcount_col new file mode 100644 index 0000000..aee1951 Binary files /dev/null and b/build/default_html5/main/level2.compcount_col differ diff --git a/build/default_html5/main/level2.scriptc b/build/default_html5/main/level2.scriptc new file mode 100644 index 0000000..46eb30c Binary files /dev/null and b/build/default_html5/main/level2.scriptc differ diff --git a/build/default_html5/main/main.collectionc b/build/default_html5/main/main.collectionc new file mode 100644 index 0000000..a93c435 Binary files /dev/null and b/build/default_html5/main/main.collectionc differ diff --git a/build/default_html5/main/main.compcount_col b/build/default_html5/main/main.compcount_col new file mode 100644 index 0000000..a6dea10 Binary files /dev/null and b/build/default_html5/main/main.compcount_col differ diff --git a/build/default_html5/main/main.scriptc b/build/default_html5/main/main.scriptc new file mode 100644 index 0000000..3e68190 Binary files /dev/null and b/build/default_html5/main/main.scriptc differ diff --git a/build/default_html5/main/mummy.scriptc b/build/default_html5/main/mummy.scriptc new file mode 100644 index 0000000..106213b Binary files /dev/null and b/build/default_html5/main/mummy.scriptc differ diff --git a/build/default_html5/main/newfont.fontc b/build/default_html5/main/newfont.fontc new file mode 100644 index 0000000..d3c9bc5 Binary files /dev/null and b/build/default_html5/main/newfont.fontc differ diff --git a/build/default_html5/main/player.scriptc b/build/default_html5/main/player.scriptc new file mode 100644 index 0000000..50175cc --- /dev/null +++ b/build/default_html5/main/player.scriptc @@ -0,0 +1,451 @@ + +g +glocal Movement = { + STILL_LEFT = "STILL_LEFT", + STILL_RIGHT = "STILL_RIGHT", + MOVING_LEFT = "MOVING_LEFT", + MOVING_RIGHT = "MOVING_RIGHT", + CLIMBING_UP = "CLIMBING_UP", + CLIMBING_DOWN = "CLIMBING_DOWN", + FALLING = "FALLING", + JUMPING_LEFT = "JUMPING_LEFT", + JUMPING_RIGHT = "JUMPING_RIGHT", + JUMPING_STRAIGHT_UP = "JUMPING_STRAIGHT_UP", + CLIMBING_STILL = "CLIMBING_STILL", +} + +local Actions = { + LEFT_ARROW_PRESS = "LEFT_ARROW_PRESS", + LEFT_ARROW_RELEASE = "LEFT_ARROW_RELEASE", + RIGHT_ARROW_PRESS = "RIGHT_ARROW_PRESS", + RIGHT_ARROW_RELEASE = "RIGHT_ARROW_RELEASE", + UP_ARROW_PRESS = "UP_ARROW_PRESS", + UP_ARROW_RELEASE = "UP_ARROW_RELEASE", + DOWN_ARROW_PRESS = "DOWN_ARROW_PRESS", + DOWN_ARROW_RELEASE = "DOWN_ARROW_RELEASE", + SPACE_BAR_PRESS = "SPACE_BAR_PRESS", + SPACE_BAR_RELEASE = "SPACE_BAR_RELEASE", +} + + +local transitions = { + [Movement.STILL_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.STILL_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.MOVING_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.MOVING_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.CLIMBING_STILL] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_UP] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_DOWN] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, +} + +function init(self) + msg.post(".", "acquire_input_focus") + self.direction = vmath.vector3(0,0,0) + self.speed = 250 + self.gravity = -5000 + self.jump_velocity = 800 + self.velocity = vmath.vector3(0, 0, 0) + self.grounded = false + self.jumped = false + self.near_up_ladder = false + self.correction = vmath.vector3() + self.climbing = false + self.is_moving = 0 + + self.left_pressed = false + self.right_pressed = false + self.up_pressed = false + self.down_pressed = false + self.jump_pressed = false + + self.have_amulet = false + self.amulet_timer = 0 + self.regenerating = false + self.regen_timer = 0 + self.blink_on_timer = 0 + self.blink_off_timer = 0 + self.current_lives = 3 + self.current_score = 000 + + self.paused = false + + self.current_movement = Movement.STILL_RIGHT + + go.set_position(vmath.vector3(100,100,0.2)) + msg.post("/banner#banner", "lives", {lives = self.current_lives}) +end + + + + + + + +local function handleInput(self, input) + local Transitions = transitions[self.current_movement] + local next_movement = Transitions and Transitions[input] + if next_movement then + print("Transitioning from", self.current_movement, "to", next_movement, "on input", input) + self.current_movement = next_movement + if next_movement == Movement.MOVING_LEFT then + sprite.play_flipbook("#sprite", hash("run_left")) + msg.post("holding_amulet", "left") + self.direction.x = -1 + self.velocity.y = 0 + end + if next_movement == Movement.MOVING_RIGHT then + sprite.play_flipbook("#sprite", hash("run_right")) + msg.post("holding_amulet", "right") + self.direction.x = 1 + self.velocity.y = 0 + end + if next_movement == Movement.STILL_RIGHT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_right")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.STILL_LEFT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_left")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.CLIMBING_STILL then + sprite.play_flipbook("#sprite", hash("still_climbing")) + self.velocity.y = 0 + self.climbing = true + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + print("Actions.LEFT_RIGHT_PRESS from climbing_still") + elseif self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + print("Actions.LEFT_ARROW_PRESS from climbing_still") + end + end + if next_movement == Movement.CLIMBING_UP then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = 150 + self.climbing = true + end + if next_movement == Movement.CLIMBING_DOWN then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = -150 + self.climbing = true + end + else + print("No transition defined for", input, "in state", self.current_movement) + end +end + +function update(self, dt) + + if not self.paused then + + if self.amulet_timer > 0 then + self.amulet_timer = self.amulet_timer - dt + + if self.amulet_timer < 0 then + self.amulet_timer = 0 + self.have_amulet = false + msg.post("holding_amulet", "disable_sprite") + end + end + + if self.regen_timer > 0 then + self.regen_timer = self.regen_timer - dt + + if self.regen_timer < 0 then + self.regen_timer = 0 + self.regenerating = false + msg.post("#sprite", "enable") + end + if self.regenerating then + if self.blink_on_timer > 0 then + self.blink_on_timer = self.blink_on_timer - dt + msg.post("#sprite", "enable") + elseif self.blink_off_timer > 0 then + self.blink_off_timer = self.blink_off_timer - dt + msg.post("#sprite", "disable") + else + self.blink_on_timer = 0.25 + self.blink_off_timer = 0.25 + end + end + end + + self.correction = vmath.vector3() + + self.velocity.x = self.direction.x * self.speed + local pos = go.get_position() + + pos = pos + self.velocity * dt + if pos.x < 24 then + pos.x = 24 + elseif pos.x > 1030 then + pos.x = 1030 + end + if pos.y < 0 then + pos.y = 100 + end + + local centre = vmath.vector3(pos.x, pos.y - 10, 0) + local platform = pos + vmath.vector3(0, -36, 0) + local ladder_up_left = pos + vmath.vector3(-24, -32, 0) + local ladder_up_right = pos + vmath.vector3(24, -32, 0) + local ladder_down_left = pos + vmath.vector3(-24, -42, 0) + local ladder_down_right = pos + vmath.vector3(24, -42, 0) + + + + + + + + local platform_result = physics.raycast(centre, platform, { hash("platform") }) + if platform_result then + local point = platform_result.position - pos + + + + if not self.climbing then + self.jumped = false + self.grounded = true + self.velocity.y = 0 + if point.y > -36 then + pos.y = pos.y + (point.y + 36) + end + + + + + end + else + self.grounded = false + end + + local ladder_up_result1 = physics.raycast(ladder_up_right, ladder_up_left, { hash("ladder") }) + local ladder_up_result2 = physics.raycast(ladder_up_left, ladder_up_right, { hash("ladder") }) + if ladder_up_result1 then + self.near_up_ladder = true + elseif ladder_up_result2 then + self.near_up_ladder = true + else + self.near_up_ladder = false + end + + local ladder_down_result1 = physics.raycast(ladder_down_right, ladder_down_left, { hash("ladder") }) + local ladder_down_result2 = physics.raycast(ladder_down_left, ladder_down_right, { hash("ladder") }) + if ladder_down_result1 then + self.near_down_ladder = true + elseif ladder_down_result2 then + self.near_down_ladder = true + else + self.near_down_ladder = false + end + + if not (self.near_up_ladder or self.near_down_ladder)then + if self.climbing then + self.climbing = false + if self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + end + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + end + end + end + + local debug_vars = { + x = pos.x, + y = pos.y, + x_vel = self.velocity.x, + y_vel = self.velocity.y, + grounded = self.grounded, + near_up_ladder = self.near_up_ladder, + near_down_ladder = self.near_down_ladder, + jumped = self.jumped, + climbing = self.climbing, + left_pressed = self.left_pressed, + right_pressed = self.right_pressed, + up_pressed = self.up_pressed, + down_pressed = self.down_pressed, + } + msg.post("#debug", "set_vars", debug_vars) + + local score_vars = { + score = self.current_score, + } + msg.post("/banner#score", "set_scores", score_vars) + + if not self.grounded and not ((self.near_up_ladder or self.near_down_ladder) and self.climbing) then + self.velocity.y = self.velocity.y + self.gravity * dt + end + + go.set_position(pos) + end +end + + + + + +function on_message(self, message_id, message, sender) + if message_id == hash("contact_point_response") then + if message.group == hash("curse") then + if not self.regenerating then + print("collision with curse") + msg.post(message.other_id, "dying") + end + end + if message.group == hash("amulet") then + self.have_amulet = true + self.amulet_timer = 5 + msg.post("holding_amulet", "enable_sprite") + print("collision with amulet") + end + end + if message_id == hash("curse_dying_reply") then + if message.dying == false then + msg.post("/holding_amulet#holdingamulet", "disable_sprite") + self.current_lives = self.current_lives - 1 + msg.post("/banner#banner", "lives", {lives = self.current_lives}) + if self.current_lives == 0 then + local data = { score = self.current_score } + msg.post("main:/controller#main", "NoMoreLives", data) + else + self.current_movement = Movement.MOVING_RIGHT + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + go.set_position(vmath.vector3(100,100,0.2)) + self.regenerating = true + self.regen_timer = 3 + end + end + end + if message_id == hash("add 100 points") then + self.current_score = self.current_score + 100 + print(self.current_score) + end + if message_id == hash("pause") then + self.paused = true + end + if message_id == hash("unpause") then + self.paused = false + end +end + +function on_input(self, action_id, action) + if not self.paused then + if action_id == hash("left") then + if action.pressed then + self.left_pressed = true + handleInput(self, Actions.LEFT_ARROW_PRESS) + elseif action.released then + self.left_pressed = false + handleInput(self, Actions.LEFT_ARROW_RELEASE) + end + end + if action_id == hash("right") then + if action.pressed then + self.right_pressed = true + handleInput(self, Actions.RIGHT_ARROW_PRESS) + elseif action.released then + self.right_pressed = false + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + end + end + if action_id == hash("jump") and action.pressed and not self.jumped and not self.climbing then + self.velocity.y = self.jump_velocity + + print("Is this working?") + self.jumped = true + end + if action_id == hash("climb_up") then + if action.pressed then + self.up_pressed = true + handleInput(self, Actions.UP_ARROW_PRESS) + elseif action.released then + self.up_pressed = false + handleInput(self, Actions.UP_ARROW_RELEASE) + end + end + if action_id == hash("climb_down") then + if action.pressed then + self.down_pressed = true + handleInput(self, Actions.DOWN_ARROW_PRESS) + elseif action.released then + self.down_pressed = false + handleInput(self, Actions.DOWN_ARROW_RELEASE) + end + end + end +end + + + + + +@main/player.script" \ No newline at end of file diff --git a/build/default_html5/main/player2.0.scriptc b/build/default_html5/main/player2.0.scriptc new file mode 100644 index 0000000..5d870e4 Binary files /dev/null and b/build/default_html5/main/player2.0.scriptc differ diff --git a/build/default_html5/main/player2.scriptc b/build/default_html5/main/player2.scriptc new file mode 100644 index 0000000..8a2b8da Binary files /dev/null and b/build/default_html5/main/player2.scriptc differ diff --git a/build/default_html5/main/score.gui_scriptc b/build/default_html5/main/score.gui_scriptc new file mode 100644 index 0000000..69ea23c Binary files /dev/null and b/build/default_html5/main/score.gui_scriptc differ diff --git a/build/default_html5/main/score.guic b/build/default_html5/main/score.guic new file mode 100644 index 0000000..bc87f82 Binary files /dev/null and b/build/default_html5/main/score.guic differ diff --git a/build/default_html5/main/scoreboard.collectionc b/build/default_html5/main/scoreboard.collectionc new file mode 100644 index 0000000..95a8e23 Binary files /dev/null and b/build/default_html5/main/scoreboard.collectionc differ diff --git a/build/default_html5/main/scoreboard.compcount_col b/build/default_html5/main/scoreboard.compcount_col new file mode 100644 index 0000000..f3167f2 Binary files /dev/null and b/build/default_html5/main/scoreboard.compcount_col differ diff --git a/build/default_html5/main/scoreboard.gui_scriptc b/build/default_html5/main/scoreboard.gui_scriptc new file mode 100644 index 0000000..d464589 Binary files /dev/null and b/build/default_html5/main/scoreboard.gui_scriptc differ diff --git a/build/default_html5/main/scoreboard.guic b/build/default_html5/main/scoreboard.guic new file mode 100644 index 0000000..82b950d Binary files /dev/null and b/build/default_html5/main/scoreboard.guic differ diff --git a/build/default_html5/main/scoreboard.scriptc b/build/default_html5/main/scoreboard.scriptc new file mode 100644 index 0000000..9c2fbdb Binary files /dev/null and b/build/default_html5/main/scoreboard.scriptc differ diff --git a/build/default_html5/main/settings.collectionc b/build/default_html5/main/settings.collectionc new file mode 100644 index 0000000..2ef8b02 Binary files /dev/null and b/build/default_html5/main/settings.collectionc differ diff --git a/build/default_html5/main/settings.compcount_col b/build/default_html5/main/settings.compcount_col new file mode 100644 index 0000000..b7a0d1d Binary files /dev/null and b/build/default_html5/main/settings.compcount_col differ diff --git a/build/default_html5/main/settings.scriptc b/build/default_html5/main/settings.scriptc new file mode 100644 index 0000000..39aa26a Binary files /dev/null and b/build/default_html5/main/settings.scriptc differ diff --git a/build/default_html5/main/startscreen.collectionc b/build/default_html5/main/startscreen.collectionc new file mode 100644 index 0000000..f39d3d8 Binary files /dev/null and b/build/default_html5/main/startscreen.collectionc differ diff --git a/build/default_html5/main/startscreen.compcount_col b/build/default_html5/main/startscreen.compcount_col new file mode 100644 index 0000000..313e7fe Binary files /dev/null and b/build/default_html5/main/startscreen.compcount_col differ diff --git a/build/default_html5/main/startscreen.gui_scriptc b/build/default_html5/main/startscreen.gui_scriptc new file mode 100644 index 0000000..36b4d80 Binary files /dev/null and b/build/default_html5/main/startscreen.gui_scriptc differ diff --git a/build/default_html5/main/startscreen.guic b/build/default_html5/main/startscreen.guic new file mode 100644 index 0000000..c2d0b50 Binary files /dev/null and b/build/default_html5/main/startscreen.guic differ diff --git a/build/wasm-web/manifests/builtins/manifests/web/engine_template.html b/build/wasm-web/manifests/builtins/manifests/web/engine_template.html new file mode 100644 index 0000000..08a8c2b --- /dev/null +++ b/build/wasm-web/manifests/builtins/manifests/web/engine_template.html @@ -0,0 +1,187 @@ + + + + + + + + + + My Project 1.0 + + + + + +
+ + +
+ +
+
+
Fullscreen
+ +
+
+ + + + + + diff --git a/game.project b/game.project new file mode 100644 index 0000000..c46769f --- /dev/null +++ b/game.project @@ -0,0 +1,26 @@ +[bootstrap] +main_collection = /main/main.collectionc + +[script] +shared_state = 1 + +[display] +width = 1054 +height = 694 +high_dpi = 1 + +[android] +input_method = HiddenInputField + +[html5] +scale_mode = fit + +[project] +title = My Project + +[physics] +gravity_y = -900.0 + +[collection_proxy] +max_count = 16 + diff --git a/graphics/GameBackground.png b/graphics/GameBackground.png new file mode 100644 index 0000000..3591e6d Binary files /dev/null and b/graphics/GameBackground.png differ diff --git a/graphics/GameOverScreen.png b/graphics/GameOverScreen.png new file mode 100644 index 0000000..af832d9 Binary files /dev/null and b/graphics/GameOverScreen.png differ diff --git a/graphics/Instructionsscreen.png b/graphics/Instructionsscreen.png new file mode 100644 index 0000000..ce1b67d Binary files /dev/null and b/graphics/Instructionsscreen.png differ diff --git a/graphics/MainBackground.png b/graphics/MainBackground.png new file mode 100644 index 0000000..1d0cf92 Binary files /dev/null and b/graphics/MainBackground.png differ diff --git a/graphics/UpLeftPlatform.png b/graphics/UpLeftPlatform.png new file mode 100644 index 0000000..3296588 Binary files /dev/null and b/graphics/UpLeftPlatform.png differ diff --git a/graphics/UpRightPlatform.png b/graphics/UpRightPlatform.png new file mode 100644 index 0000000..c8a12ab Binary files /dev/null and b/graphics/UpRightPlatform.png differ diff --git a/graphics/amulet.png b/graphics/amulet.png new file mode 100644 index 0000000..b316bdc Binary files /dev/null and b/graphics/amulet.png differ diff --git a/graphics/bottomuprightplatform.png b/graphics/bottomuprightplatform.png new file mode 100644 index 0000000..9595169 Binary files /dev/null and b/graphics/bottomuprightplatform.png differ diff --git a/graphics/climbingleft.png b/graphics/climbingleft.png new file mode 100644 index 0000000..ee2f935 Binary files /dev/null and b/graphics/climbingleft.png differ diff --git a/graphics/climbingright.png b/graphics/climbingright.png new file mode 100644 index 0000000..bda32b7 Binary files /dev/null and b/graphics/climbingright.png differ diff --git a/graphics/cloud1.0.png b/graphics/cloud1.0.png new file mode 100644 index 0000000..39e3f1b Binary files /dev/null and b/graphics/cloud1.0.png differ diff --git a/graphics/cloud1.png b/graphics/cloud1.png new file mode 100644 index 0000000..2ad8d73 Binary files /dev/null and b/graphics/cloud1.png differ diff --git a/graphics/cloud2.png b/graphics/cloud2.png new file mode 100644 index 0000000..4d25b80 Binary files /dev/null and b/graphics/cloud2.png differ diff --git a/graphics/cursemummy.png b/graphics/cursemummy.png new file mode 100644 index 0000000..a12dadc Binary files /dev/null and b/graphics/cursemummy.png differ diff --git a/graphics/enternamescreen.png b/graphics/enternamescreen.png new file mode 100644 index 0000000..8bc643d Binary files /dev/null and b/graphics/enternamescreen.png differ diff --git a/graphics/explosion1.png b/graphics/explosion1.png new file mode 100644 index 0000000..e5dd82b Binary files /dev/null and b/graphics/explosion1.png differ diff --git a/graphics/explosion2.png b/graphics/explosion2.png new file mode 100644 index 0000000..cb8dfc9 Binary files /dev/null and b/graphics/explosion2.png differ diff --git a/graphics/explosion3.png b/graphics/explosion3.png new file mode 100644 index 0000000..883a117 Binary files /dev/null and b/graphics/explosion3.png differ diff --git a/graphics/explosion4.png b/graphics/explosion4.png new file mode 100644 index 0000000..ea1e7a3 Binary files /dev/null and b/graphics/explosion4.png differ diff --git a/graphics/explosion5.png b/graphics/explosion5.png new file mode 100644 index 0000000..bff7942 Binary files /dev/null and b/graphics/explosion5.png differ diff --git a/graphics/instructions.png b/graphics/instructions.png new file mode 100644 index 0000000..f0ab98a Binary files /dev/null and b/graphics/instructions.png differ diff --git a/graphics/jumpingleft.png b/graphics/jumpingleft.png new file mode 100644 index 0000000..9047fc7 Binary files /dev/null and b/graphics/jumpingleft.png differ diff --git a/graphics/jumpingright.png b/graphics/jumpingright.png new file mode 100644 index 0000000..327279a Binary files /dev/null and b/graphics/jumpingright.png differ diff --git a/graphics/leftcrossedfeet.png b/graphics/leftcrossedfeet.png new file mode 100644 index 0000000..614521f Binary files /dev/null and b/graphics/leftcrossedfeet.png differ diff --git a/graphics/leftkickback.png b/graphics/leftkickback.png new file mode 100644 index 0000000..11ab614 Binary files /dev/null and b/graphics/leftkickback.png differ diff --git a/graphics/leftmidstep.png b/graphics/leftmidstep.png new file mode 100644 index 0000000..b427542 Binary files /dev/null and b/graphics/leftmidstep.png differ diff --git a/graphics/longladder.png b/graphics/longladder.png new file mode 100644 index 0000000..1965d9c Binary files /dev/null and b/graphics/longladder.png differ diff --git a/graphics/pause.png b/graphics/pause.png new file mode 100644 index 0000000..4ce9c2b Binary files /dev/null and b/graphics/pause.png differ diff --git a/graphics/platformsegment.png b/graphics/platformsegment.png new file mode 100644 index 0000000..a1e2f73 Binary files /dev/null and b/graphics/platformsegment.png differ diff --git a/graphics/platformsegmentdown.png b/graphics/platformsegmentdown.png new file mode 100644 index 0000000..2aff867 Binary files /dev/null and b/graphics/platformsegmentdown.png differ diff --git a/graphics/platformsegmentup.png b/graphics/platformsegmentup.png new file mode 100644 index 0000000..6b26978 Binary files /dev/null and b/graphics/platformsegmentup.png differ diff --git a/graphics/retry.png b/graphics/retry.png new file mode 100644 index 0000000..edb7299 Binary files /dev/null and b/graphics/retry.png differ diff --git a/graphics/rightcrossedfeet.png b/graphics/rightcrossedfeet.png new file mode 100644 index 0000000..c4322b1 Binary files /dev/null and b/graphics/rightcrossedfeet.png differ diff --git a/graphics/rightkickback.png b/graphics/rightkickback.png new file mode 100644 index 0000000..472d17b Binary files /dev/null and b/graphics/rightkickback.png differ diff --git a/graphics/rightmidstep.png b/graphics/rightmidstep.png new file mode 100644 index 0000000..78081ac Binary files /dev/null and b/graphics/rightmidstep.png differ diff --git a/graphics/scoreboard.png b/graphics/scoreboard.png new file mode 100644 index 0000000..e0ad77f Binary files /dev/null and b/graphics/scoreboard.png differ diff --git a/graphics/scoreboardwriting.png b/graphics/scoreboardwriting.png new file mode 100644 index 0000000..4bea3df Binary files /dev/null and b/graphics/scoreboardwriting.png differ diff --git a/graphics/settings.png b/graphics/settings.png new file mode 100644 index 0000000..3c6354f Binary files /dev/null and b/graphics/settings.png differ diff --git a/graphics/settingsscreen.png b/graphics/settingsscreen.png new file mode 100644 index 0000000..2f35b52 Binary files /dev/null and b/graphics/settingsscreen.png differ diff --git a/graphics/shortladder.png b/graphics/shortladder.png new file mode 100644 index 0000000..032e97c Binary files /dev/null and b/graphics/shortladder.png differ diff --git a/graphics/skull1.png b/graphics/skull1.png new file mode 100644 index 0000000..86d05b1 Binary files /dev/null and b/graphics/skull1.png differ diff --git a/graphics/skull2.png b/graphics/skull2.png new file mode 100644 index 0000000..652340d Binary files /dev/null and b/graphics/skull2.png differ diff --git a/graphics/skull3.png b/graphics/skull3.png new file mode 100644 index 0000000..d3c3cc9 Binary files /dev/null and b/graphics/skull3.png differ diff --git a/graphics/startgame.png b/graphics/startgame.png new file mode 100644 index 0000000..c56552a Binary files /dev/null and b/graphics/startgame.png differ diff --git a/graphics/startscreen.png b/graphics/startscreen.png new file mode 100644 index 0000000..2d89704 Binary files /dev/null and b/graphics/startscreen.png differ diff --git a/graphics/stillleft.png b/graphics/stillleft.png new file mode 100644 index 0000000..d770b92 Binary files /dev/null and b/graphics/stillleft.png differ diff --git a/graphics/stillmummy.png b/graphics/stillmummy.png new file mode 100644 index 0000000..6ecd1e8 Binary files /dev/null and b/graphics/stillmummy.png differ diff --git a/graphics/stillright.png b/graphics/stillright.png new file mode 100644 index 0000000..cbc87e7 Binary files /dev/null and b/graphics/stillright.png differ diff --git a/input/game.input_binding b/input/game.input_binding new file mode 100644 index 0000000..8910d50 --- /dev/null +++ b/input/game.input_binding @@ -0,0 +1,48 @@ +key_trigger { + input: KEY_LEFT + action: "left" +} +key_trigger { + input: KEY_RIGHT + action: "right" +} +key_trigger { + input: KEY_SPACE + action: "jump" +} +key_trigger { + input: KEY_UP + action: "climb_up" +} +key_trigger { + input: KEY_DOWN + action: "climb_down" +} +key_trigger { + input: KEY_BACKSPACE + action: "backspace" +} +key_trigger { + input: KEY_ENTER + action: "enter" +} +key_trigger { + input: KEY_ESC + action: "escape" +} +key_trigger { + input: KEY_P + action: "pause" +} +mouse_trigger { + input: MOUSE_BUTTON_1 + action: "touch" +} +mouse_trigger { + input: MOUSE_WHEEL_UP + action: "" +} +text_trigger { + input: TEXT + action: "type" +} diff --git a/main/amulet.collection b/main/amulet.collection new file mode 100644 index 0000000..f4a1b07 --- /dev/null +++ b/main/amulet.collection @@ -0,0 +1,52 @@ +name: "Amulet" +scale_along_z: 0 +embedded_instances { + id: "amulets.go" + data: "components {\n" + " id: \"amulet\"\n" + " component: \"/main/amulet.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"amulet\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " id: \\\"amulet_collision\\\"\\n" + " }\\n" + " data: 16.031746\\n" + " data: 16.074074\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"amulet\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: 0.25\n" + " y: 0.25\n" + " z: 0.25\n" + " }\n" + "}\n" + "" +} diff --git a/main/amulet.script b/main/amulet.script new file mode 100644 index 0000000..e00e44b --- /dev/null +++ b/main/amulet.script @@ -0,0 +1,58 @@ +go.property("creator", msg.url()) + +function init(self) + sprite.play_flipbook("#sprite", hash("amulet")) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + --print ("Amulet removed") +end + +function update(self, dt) + if self.deleted then + return -- skip logic if object is flagged for deletion + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("contact_point_response") then + if message.group == hash("player") then + --print ("Collision with player") + self.deleted = true + msg.post(self.creator, "amulet_deleted") + end + end + if message_id == hash("creator") then + self.creator = message.creator + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/banner.script b/main/banner.script new file mode 100644 index 0000000..609f4c4 --- /dev/null +++ b/main/banner.script @@ -0,0 +1,65 @@ +function init(self) + +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("lives") then + if message.lives == 3 then + msg.post("/lives#life1", "enable") + msg.post("/lives#life2", "enable") + msg.post("/lives#life3", "enable") + elseif message.lives == 2 then + msg.post("/lives#life1", "enable") + msg.post("/lives#life2", "enable") + msg.post("/lives#life3", "disable") + elseif message.lives == 1 then + msg.post("/lives#life1", "enable") + msg.post("/lives#life2", "disable") + msg.post("/lives#life3", "disable") + end + end + if message_id == hash("hide") then + msg.post("/lives#life1", "disable") + msg.post("/lives#life2", "disable") + msg.post("/lives#life3", "disable") + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/button.gui b/main/button.gui new file mode 100644 index 0000000..d687dd9 --- /dev/null +++ b/main/button.gui @@ -0,0 +1,85 @@ +script: "/main/button.gui_script" +textures { + name: "graphics" + texture: "/main/graphics.atlas" +} +nodes { + position { + x: 127.0 + y: 341.0 + z: -1.0 + } + scale { + x: 1.047046 + y: 0.720014 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.902 + z: 0.702 + } + type: TYPE_BOX + id: "button_level1_highlight" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 127.0 + y: 341.0 + z: 1.0 + } + scale { + x: 1.047046 + y: 1.078775 + } + type: TYPE_BOX + texture: "graphics/retry" + id: "button_level1" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 914.0 + y: 345.0 + } + scale { + x: 1.097699 + y: 1.300886 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.902 + z: 0.702 + } + type: TYPE_BOX + id: "button_scoreboard_highlight" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 914.0 + y: 345.0 + } + scale { + x: 1.068427 + y: 1.043011 + } + type: TYPE_BOX + texture: "graphics/scoreboardwriting" + id: "button_scoreboard" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/main/button.gui_script b/main/button.gui_script new file mode 100644 index 0000000..848f0ca --- /dev/null +++ b/main/button.gui_script @@ -0,0 +1,49 @@ +function init(self) + msg.post(".", "acquire_input_focus") + gui.set_alpha(gui.get_node("button_level1_highlight"), 0) + gui.set_alpha(gui.get_node("button_scoreboard_highlight"), 0) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("touch") and action.pressed then + if gui.pick_node(gui.get_node("button_level1"), action.x, action.y) then + msg.post("main:/controller#main", "show level1 screen") + elseif gui.pick_node(gui.get_node("button_scoreboard"), action.x, action.y) then + msg.post("main:/controller#main", "show scoreboard screen") + end + elseif action_id == nil then + --Check if mouse is over the button + if gui.pick_node(gui.get_node("button_level1"), action.x, action.y) then + gui.set_alpha(gui.get_node("button_level1_highlight"), 1) -- Show highlight + else + gui.set_alpha(gui.get_node("button_level1_highlight"), 0) -- Hide highlight + end + if gui.pick_node(gui.get_node("button_scoreboard"), action.x, action.y) then + gui.set_alpha(gui.get_node("button_scoreboard_highlight"), 1) -- Show highlight + else + gui.set_alpha(gui.get_node("button_scoreboard_highlight"), 0) -- Hide highlight + end + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/clouds.script b/main/clouds.script new file mode 100644 index 0000000..45638da --- /dev/null +++ b/main/clouds.script @@ -0,0 +1,56 @@ +local cloud_speed = 50 -- pixels per second + +function init(self) + msg.post(".", "acquire_input_focus") + go.set_position(vmath.vector3(1055+390,542,0)) + sprite.set_constant("#cloud1", "tint", vmath.vector4(1, 1, 1, 0.7)) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + local pos = go.get_position("cloud1") + pos.x = pos.x - cloud_speed * dt + + if pos.x < -390 then -- assuming cloud width is ~64px + pos.x = 1055+390; + end + go.set_position(pos) +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/curse.script b/main/curse.script new file mode 100644 index 0000000..4e54ac0 --- /dev/null +++ b/main/curse.script @@ -0,0 +1,153 @@ +--go.property("creator", msg.url()) + +function init(self) + sprite.play_flipbook("#sprite", hash("curse")) + self.velocity = vmath.vector3(0, 0, 0) + self.direction = vmath.vector3(-1, 0, 0) + self.speed = 250 + self.gravity = -5000 -- gravity force + self.angle = 0 + self.amulet_visible = false + self.testing_amulet = false + self.dying = false + self.dying_timer = 1 + self.paused = false +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + --print ("Curse dead") +end + +function update(self, dt) + if not self.paused then + if self.dying then + self.dying_timer = self.dying_timer - dt + if self.dying_timer < 0 then + -- self.dying = false + msg.post(self.creator, "curse_deleted") + end + end + if self.deleted then + return -- skip logic if object is flagged for deletion + end + + self.velocity.x = self.direction.x * self.speed + local pos = go.get_position() + + pos = pos + self.velocity * dt + if pos.x < 24 or pos.y < 0 then + self.deleted = true + msg.post(self.creator, "curse_deleted") + elseif pos.x > 1030 then + pos.x = 1030 + end + + --msg.post("@render:", "draw_line", { start_point = centre, end_point = platform, color = vmath.vector4(1,0,0,1) }) + + if not self.deleted then + local centre = vmath.vector3(pos.x, pos.y, 0) + local platform = pos + vmath.vector3(0, -20, 0) + + local platform_result = physics.raycast(centre, platform, { hash("platform") }) + if platform_result then + local point = platform_result.position - pos + if platform_result.normal.x <= 0 then + self.direction.x = -1 + else + self.direction.x = 1 + end + --msg.post("@render:", "draw_debug_text", { text = "Platform", position = vmath.vector3(20, 400, 0), color = vmath.vector4(1, 0, 0, 1) } ) + --msg.post("@render:", "draw_debug_text", { text = "X : " .. tostring(point.x), position = vmath.vector3(20, 380, 0), color = vmath.vector4(1, 0, 0, 1) } ) + --msg.post("@render:", "draw_debug_text", { text = "Y : " .. tostring(point.y), position = vmath.vector3(20, 360, 0), color = vmath.vector4(1, 0, 0, 1) } ) + self.grounded = true + self.speed = 250 + self.velocity.y = 0 + if point.y > -20 then + pos.y = pos.y + (point.y + 20) + end + else + self.grounded = false + end + + if not self.grounded then + self.velocity.y = self.velocity.y + self.gravity * dt + end + + go.set_position(pos) + + local angle = math.rad(self.angle) -- convert degrees to radians + local rot = vmath.quat_rotation_z(angle) + go.set_rotation(rot) + self.angle = self.angle + (self.direction.x * -12) + end + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("contact_point_response") then + if message.group == hash("holding_amulet") then + if self.testing_amulet == false then + msg.post("/holding_amulet#holdingamulet", "testing_amulet") + self.testing_amulet = true + end + end + if message.group == hash("curse_jump_pads") then + print("Oh yeah!") + self.velocity.y = 150 + self.speed = 500 + end + end + if message_id == hash("visible") then + self.amulet_visible = true + end + if message_id == hash("testing_amulet_response") then + if message.visible == true then + sprite.play_flipbook("#sprite", hash("explosion")) + self.deleted = true + self.dying = true + msg.post("main:/controller#main", "add 100 points") + end + end + if message_id == hash("dying") then + msg.post(sender, ("curse_dying_reply"), {dying = self.dying}) + end + if message_id == hash("pause") then + self.paused = true + end + if message_id == hash("unpause") then + self.paused = false + end + if message_id == hash("creator") then + self.creator = message.creator + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/curses.collection b/main/curses.collection new file mode 100644 index 0000000..17c5187 --- /dev/null +++ b/main/curses.collection @@ -0,0 +1,57 @@ +name: "curses" +scale_along_z: 0 +embedded_instances { + id: "curses" + data: "components {\n" + " id: \"curse\"\n" + " component: \"/main/curse.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"curse\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.3\n" + " }\n" + " scale {\n" + " x: 0.2\n" + " y: 0.2\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"curse\\\"\\n" + "mask: \\\"player\\\"\\n" + "mask: \\\"holding_amulet\\\"\\n" + "mask: \\\"curse_jump_pads\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " y: 2.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " id: \\\"curse_collission\\\"\\n" + " }\\n" + " data: 16.666666\\n" + " data: 21.43634\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} diff --git a/main/debug.gui b/main/debug.gui new file mode 100644 index 0000000..1d8f47e --- /dev/null +++ b/main/debug.gui @@ -0,0 +1,443 @@ +script: "/main/debug.gui_script" +fonts { + name: "default" + font: "/builtins/fonts/default.font" +} +nodes { + position { + x: 172.0 + y: 662.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "x_pos" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 172.0 + y: 645.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "y_pos" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 151.0 + y: 664.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "X :" + font: "default" + id: "x_static" + inherit_alpha: true +} +nodes { + position { + x: 151.0 + y: 647.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "Y :" + font: "default" + id: "y_static" + inherit_alpha: true +} +nodes { + position { + x: 172.0 + y: 629.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "x_vel" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 172.0 + y: 613.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "y_vel" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 115.0 + y: 631.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "X velocity :" + font: "default" + id: "x_vel_static" + xanchor: XANCHOR_LEFT + inherit_alpha: true +} +nodes { + position { + x: 115.0 + y: 614.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "Y Velocity :" + font: "default" + id: "y_vel_static" + xanchor: XANCHOR_LEFT + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 589.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "grounded :" + font: "default" + id: "grounded_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 537.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "near up ladder :" + font: "default" + id: "near_up_ladder_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 572.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "jumped :" + font: "default" + id: "jumped_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 588.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "grounded" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 536.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "near_up_ladder" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 571.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "jumped" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 554.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "climbing :" + font: "default" + id: "climbing_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 553.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "climbing" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 520.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "near down ladder :" + font: "default" + id: "near_down_ladder_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 519.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "near_down_ladder" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 449.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "down pressed :" + font: "default" + id: "down_pressed_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 448.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "down_pressed" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 496.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "left pressed :" + font: "default" + id: "left_pressed_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 495.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "left_pressed" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 480.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "right pressed :" + font: "default" + id: "right_pressed_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 479.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "right_pressed" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +nodes { + position { + x: 163.0 + y: 464.0 + z: -1.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "up pressed :" + font: "default" + id: "up_pressed_static" + pivot: PIVOT_E + inherit_alpha: true +} +nodes { + position { + x: 171.0 + y: 463.0 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "default" + id: "up_pressed" + xanchor: XANCHOR_LEFT + pivot: PIVOT_W + inherit_alpha: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/main/debug.gui_script b/main/debug.gui_script new file mode 100644 index 0000000..7311857 --- /dev/null +++ b/main/debug.gui_script @@ -0,0 +1,92 @@ +function init(self) + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + gui.set_text(gui.get_node("x_pos"), "--") --self.velocity.x) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("set_vars") then + gui.set_text(gui.get_node("x_pos"), message.x) + gui.set_text(gui.get_node("y_pos"), message.y) + gui.set_text(gui.get_node("x_vel"), message.x_vel) + gui.set_text(gui.get_node("y_vel"), message.y_vel) + if (message.grounded == true) then + gui.set_text(gui.get_node("grounded"), "true") + else + gui.set_text(gui.get_node("grounded"), "false") + end + if (message.near_up_ladder == true) then + gui.set_text(gui.get_node("near_up_ladder"), "true") + else + gui.set_text(gui.get_node("near_up_ladder"), "false") + end + if (message.near_down_ladder == true) then + gui.set_text(gui.get_node("near_down_ladder"), "true") + else + gui.set_text(gui.get_node("near_down_ladder"), "false") + end + if (message.jumped == true) then + gui.set_text(gui.get_node("jumped"),"true") + else + gui.set_text(gui.get_node("jumped"), "false") + end + if (message.climbing == true) then + gui.set_text(gui.get_node("climbing"),"true") + else + gui.set_text(gui.get_node("climbing"), "false") + end + + if (message.left_pressed == true) then + gui.set_text(gui.get_node("left_pressed"),"true") + else + gui.set_text(gui.get_node("left_pressed"), "false") + end + if (message.right_pressed == true) then + gui.set_text(gui.get_node("right_pressed"),"true") + else + gui.set_text(gui.get_node("right_pressed"), "false") + end + if (message.up_pressed == true) then + gui.set_text(gui.get_node("up_pressed"),"true") + else + gui.set_text(gui.get_node("up_pressed"), "false") + end + if (message.down_pressed == true) then + gui.set_text(gui.get_node("down_pressed"),"true") + else + gui.set_text(gui.get_node("down_pressed"), "false") + end + + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/entername.collection b/main/entername.collection new file mode 100644 index 0000000..5ddbe93 --- /dev/null +++ b/main/entername.collection @@ -0,0 +1,29 @@ +name: "entername" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "components {\n" + " id: \"entername\"\n" + " component: \"/main/entername.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"enternamescreen\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "entername_gui" + data: "components {\n" + " id: \"entername1\"\n" + " component: \"/main/entername.gui\"\n" + "}\n" + "" +} diff --git a/main/entername.gui b/main/entername.gui new file mode 100644 index 0000000..5962b23 --- /dev/null +++ b/main/entername.gui @@ -0,0 +1,58 @@ +script: "/main/entername.gui_script" +fonts { + name: "default" + font: "/builtins/fonts/default.font" +} +fonts { + name: "newfont" + font: "/main/newfont.font" +} +nodes { + position { + z: 1.0 + } + scale { + x: 0.7 + y: 0.7 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.412 + y: 0.286 + z: 0.071 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "enter" + inherit_alpha: true +} +nodes { + position { + x: 794.0 + y: 302.0 + z: 1.0 + } + scale { + x: 0.7 + y: 0.7 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.412 + y: 0.286 + z: 0.071 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name" +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/main/entername.gui_script b/main/entername.gui_script new file mode 100644 index 0000000..5d6760a --- /dev/null +++ b/main/entername.gui_script @@ -0,0 +1,50 @@ +function init(self) + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + local node = gui.get_node("enter") + gui.set_position(node, vmath.vector3(450,250,1)) + gui.set_color(gui.get_node("enter"), vmath.vector4(0.4118, 0.2863, 0.0706, 1.0)) + +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("enterthename") then + gui.set_text(gui.get_node("enter"), message.enter) + gui.set_color(gui.get_node("name"), vmath.vector4(0, 1, 0, 1)) + end + if message_id == hash("written_name") then + gui.set_text(gui.get_node("name"), message.name) + gui.set_color(gui.get_node("name"), vmath.vector4(1, 0, 0, 1)) + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/entername.script b/main/entername.script new file mode 100644 index 0000000..327f8ca --- /dev/null +++ b/main/entername.script @@ -0,0 +1,66 @@ +function init(self) + msg.post(".", "acquire_input_focus") + go.set_position(vmath.vector3(527.5,348,0), "background") + + msg.post("/entername_gui#entername1", "enterthename", { enter = "enter your initials:" }) + self.name = "" + msg.post("/entername_gui#entername1", "written_name", { name = self.name }) + self.max_char = 3 +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) +-- if message_id == hash("type") then +-- self.name = self.name + message.text +-- end +-- msg.post("/entername_gui#entername1", "written_name", self.name) +end + +function on_input(self, action_id, action) + if action_id == hash("type") then + if self.max_char > 0 then + self.name = self.name .. action.text + msg.post("/entername_gui#entername1", "written_name", { name = self.name }) + self.max_char = self.max_char - 1 + elseif self.max_char == 0 then + print("no more characters!!!!!") + end + elseif action_id == hash("backspace") and action.repeated then + self.name = string.sub(self.name, 0, string.len(self.name)-1) + msg.post("/entername_gui#entername1", "written_name", { name = self.name }) + self.max_char = self.max_char + 1 + if self.max_char > 3 then + self.max_char = 3 + end + end + if action_id == hash("enter") then + msg.post("main:/controller#main", "save_name", { name = self.name }) + end + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + end +end + + function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/gameover.collection b/main/gameover.collection new file mode 100644 index 0000000..b6bef7f --- /dev/null +++ b/main/gameover.collection @@ -0,0 +1,37 @@ +name: "GameOver" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "components {\n" + " id: \"GameOver\"\n" + " component: \"/main/gameover.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"GameOverScreen\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + "}\n" + "" + scale3 { + x: 1.033 + y: 1.025 + } +} +embedded_instances { + id: "button" + data: "components {\n" + " id: \"button\"\n" + " component: \"/main/button.gui\"\n" + "}\n" + "" + position { + x: -526.0 + y: -344.0 + } +} diff --git a/main/gameover.script b/main/gameover.script new file mode 100644 index 0000000..f5c4bb8 --- /dev/null +++ b/main/gameover.script @@ -0,0 +1,43 @@ +function init(self) + go.set_position(vmath.vector3(527.5,348,1)) + msg.post(".", "acquire_input_focus") +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/graphics.atlas b/main/graphics.atlas new file mode 100644 index 0000000..6498ffb --- /dev/null +++ b/main/graphics.atlas @@ -0,0 +1,214 @@ +images { + image: "/graphics/GameBackground.png" +} +images { + image: "/graphics/UpLeftPlatform.png" +} +images { + image: "/graphics/UpRightPlatform.png" +} +images { + image: "/graphics/bottomuprightplatform.png" +} +images { + image: "/graphics/climbingleft.png" +} +images { + image: "/graphics/climbingright.png" +} +images { + image: "/graphics/jumpingleft.png" +} +images { + image: "/graphics/jumpingright.png" +} +images { + image: "/graphics/longladder.png" +} +images { + image: "/graphics/shortladder.png" +} +images { + image: "/graphics/stillmummy.png" +} +images { + image: "/builtins/graphics/particle_blob.png" +} +images { + image: "/graphics/cursemummy.png" +} +images { + image: "/graphics/amulet.png" +} +images { + image: "/graphics/GameOverScreen.png" +} +images { + image: "/graphics/scoreboard.png" +} +images { + image: "/graphics/retry.png" +} +images { + image: "/graphics/scoreboardwriting.png" +} +images { + image: "/graphics/enternamescreen.png" +} +images { + image: "/graphics/pause.png" +} +images { + image: "/graphics/startscreen.png" +} +images { + image: "/graphics/instructions.png" +} +images { + image: "/graphics/settings.png" +} +images { + image: "/graphics/startgame.png" +} +images { + image: "/graphics/Instructionsscreen.png" +} +images { + image: "/graphics/settingsscreen.png" +} +images { + image: "/graphics/cloud1.0.png" +} +images { + image: "/graphics/platformsegment.png" +} +images { + image: "/graphics/platformsegmentdown.png" +} +images { + image: "/graphics/platformsegmentup.png" +} +animations { + id: "run_left" + images { + image: "/graphics/leftcrossedfeet.png" + } + images { + image: "/graphics/leftmidstep.png" + } + images { + image: "/graphics/leftcrossedfeet.png" + } + images { + image: "/graphics/leftkickback.png" + } + images { + image: "/graphics/leftcrossedfeet.png" + } + playback: PLAYBACK_LOOP_BACKWARD + fps: 15 +} +animations { + id: "still_left" + images { + image: "/graphics/stillleft.png" + } + playback: PLAYBACK_NONE +} +animations { + id: "still_right" + images { + image: "/graphics/stillright.png" + } + playback: PLAYBACK_NONE +} +animations { + id: "run_right" + images { + image: "/graphics/rightcrossedfeet.png" + } + images { + image: "/graphics/rightmidstep.png" + } + images { + image: "/graphics/rightcrossedfeet.png" + } + images { + image: "/graphics/rightkickback.png" + } + images { + image: "/graphics/rightcrossedfeet.png" + } + playback: PLAYBACK_LOOP_FORWARD + fps: 15 +} +animations { + id: "climbing" + images { + image: "/graphics/climbingleft.png" + } + images { + image: "/graphics/climbingright.png" + } + playback: PLAYBACK_LOOP_FORWARD + fps: 10 +} +animations { + id: "still_climbing" + images { + image: "/graphics/climbingleft.png" + } + playback: PLAYBACK_NONE +} +animations { + id: "curse" + images { + image: "/graphics/skull1.png" + } + images { + image: "/graphics/skull2.png" + } + images { + image: "/graphics/skull3.png" + } + images { + image: "/graphics/skull2.png" + } + playback: PLAYBACK_LOOP_FORWARD + fps: 10 +} +animations { + id: "explosion" + images { + image: "/graphics/explosion1.png" + } + images { + image: "/graphics/explosion2.png" + } + images { + image: "/graphics/explosion3.png" + } + images { + image: "/graphics/explosion4.png" + } + images { + image: "/graphics/explosion5.png" + } + playback: PLAYBACK_LOOP_FORWARD + fps: 15 +} +animations { + id: "cloud1" + images { + image: "/graphics/cloud1.png" + } + playback: PLAYBACK_LOOP_PINGPONG +} +animations { + id: "cloud2" + images { + image: "/graphics/cloud2.png" + } + playback: PLAYBACK_LOOP_FORWARD +} +extrude_borders: 2 diff --git a/main/holdingamulet.script b/main/holdingamulet.script new file mode 100644 index 0000000..c5ec3ce --- /dev/null +++ b/main/holdingamulet.script @@ -0,0 +1,70 @@ +function init(self) + msg.post("#sprite", "disable") + self.player_direction = "right" + self.visible = false +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + local player_pos = go.get_position("player") + if self.player_direction == "right" then + local offset = vmath.vector3(30, -8, 0) + go.set_position(player_pos + offset) + elseif self.player_direction == "left" then + local offset = vmath.vector3(-30, -8, 0) + go.set_position(player_pos + offset) + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("enable_sprite") then + msg.post("#sprite", "enable") + self.visible = true + end + if message_id == hash("testing_amulet") then + --print("testing_amulet") + msg.post(sender, "testing_amulet_response", {visible = self.visible}) + end + if message_id == hash("right") then + self.player_direction = "right" + end + if message_id == hash("left") then + self.player_direction = "left" + end + if message_id == hash("disable_sprite") then + msg.post("#sprite", "disable") + self.visible = false + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/instructions.collection b/main/instructions.collection new file mode 100644 index 0000000..c41240e --- /dev/null +++ b/main/instructions.collection @@ -0,0 +1,28 @@ +name: "instructions" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "components {\n" + " id: \"instructions\"\n" + " component: \"/main/instructions.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"Instructionsscreen\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " }\n" + " scale {\n" + " x: 0.999\n" + " }\n" + "}\n" + "" +} diff --git a/main/instructions.script b/main/instructions.script new file mode 100644 index 0000000..b59bb29 --- /dev/null +++ b/main/instructions.script @@ -0,0 +1,42 @@ +function init(self) + msg.post(".", "acquire_input_focus") +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/level1.collection b/main/level1.collection new file mode 100644 index 0000000..c87f68a --- /dev/null +++ b/main/level1.collection @@ -0,0 +1,762 @@ +name: "level1" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "embedded_components {\n" + " id: \"background\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"GameBackground\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " }\n" + "}\n" + "" + position { + x: -1.0 + y: 2.0 + } +} +embedded_instances { + id: "platforms" + data: "embedded_components {\n" + " id: \"uprightplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"UpRightPlatform\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 922.0\\n" + " y: 88.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 679.0\n" + " y: 269.0\n" + " z: 0.1\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"uprightplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"UpRightPlatform\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 922.0\\n" + " y: 88.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 679.0\n" + " y: 532.0\n" + " z: 0.1\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"upleftplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"UpLeftPlatform\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 431.0\n" + " y: 145.0\n" + " z: 0.1\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"upleftplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"UpLeftPlatform\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 896.0\\n" + " y: 99.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 431.0\n" + " y: 399.0\n" + " z: 0.1\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 732.0\\n" + " y: 19.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.015301545\\n" + " w: 0.9998829\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 337.67072\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"bottomuprightlatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"bottomuprightplatform\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 574.0\n" + " y: 20.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.223342\n" + " y: 0.223342\n" + " z: 0.223342\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 197.0\\n" + " y: 6.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 197.94986\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 386.0\\n" + " y: 146.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.012696929\\n" + " w: 0.9999194\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 388.207\\n" + " data: 0.333248\\n" + " data: 10.192\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 660.0\\n" + " y: 263.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 382.0\\n" + " y: 394.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.010337459\\n" + " w: 0.9999466\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 385.85358\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 662.0\\n" + " y: 529.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "player" + data: "components {\n" + " id: \"player\"\n" + " component: \"/main/player.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.5\n" + " y: 0.5\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectplatform\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"platform\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " y: -30.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.752527\\n" + " data: 3.5919755\\n" + " data: 10.0\\n" + "}\\n" + "linear_damping: 1.0\\n" + "locked_rotation: true\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectladder\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"ladder\\\"\\n" + "mask: \\\"curse\\\"\\n" + "mask: \\\"amulet\\\"\\n" + "mask: \\\"mummy\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 2.0\\n" + " y: -17.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.718147\\n" + " data: 16.341084\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" + position { + x: -7.0 + y: 11.0 + } +} +embedded_instances { + id: "ladder" + data: "embedded_components {\n" + " id: \"ladder\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 617.0\n" + " y: 85.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.958697\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 610.0\\n" + " y: 81.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 59.53719\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 464.0\n" + " y: 210.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.987675\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 456.0\\n" + " y: 207.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 58.742554\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 709.0\n" + " y: 336.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.96056\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject2\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 704.0\\n" + " y: 335.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 61.03573\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject3\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 559.0\\n" + " y: 470.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 66.745285\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 566.0\n" + " y: 470.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.727569\n" + " y: 1.127384\n" + " }\n" + "}\n" + "" +} +embedded_instances { + id: "mummy" + data: "components {\n" + " id: \"mummy\"\n" + " component: \"/main/mummy.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"still\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"stillmummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.4\n" + " y: 0.4\n" + " z: 0.4\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"curse\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"cursemummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.63\n" + " y: 0.63\n" + " z: 0.63\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"mummy\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 33.058865\\n" + " data: 48.403397\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" + position { + z: 0.2 + } +} +embedded_instances { + id: "curses" + data: "embedded_components {\n" + " id: \"curse_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/curses.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "amulets" + data: "embedded_components {\n" + " id: \"amulet_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/amulet.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "controller" + data: "components {\n" + " id: \"level1\"\n" + " component: \"/main/level1.script\"\n" + "}\n" + "" +} +embedded_instances { + id: "holding_amulet" + data: "components {\n" + " id: \"holdingamulet\"\n" + " component: \"/main/holdingamulet.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"amulet\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.18\n" + " y: 0.18\n" + " z: 1.0E-6\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"holding_amulet\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 13.696037\\n" + " data: 15.172706\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "pause" + data: "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"pause\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 1.3\n" + " y: 1.3\n" + " }\n" + "}\n" + "" +} diff --git a/main/level1.script b/main/level1.script new file mode 100644 index 0000000..e0fb9ab --- /dev/null +++ b/main/level1.script @@ -0,0 +1,152 @@ +function init(self) + msg.post(".", "acquire_input_focus") + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + self.timer = 0 + self.curse_created = false + self.timeout = 2.0 + self.curse_count = 0 + self.curses = {} + self.amulet_count = 0 + self.amulets = {} + self.mummy_timer = 0 + self.paused = false + + createamulets(self) + msg.post("level1:/pause#sprite", "disable") +end + +function createamulets(self) + + local positions = { + vmath.vector3(800,75,0.3), + vmath.vector3(100,200,0.3), + vmath.vector3(850,325,0.3), + vmath.vector3(400,450,0.3), + vmath.vector3(300,580,0.3), + vmath.vector3(600,600,0.3), + } + + for loop=1,5,1 do + local ids = collectionfactory.create("amulets#amulet_factory", positions[loop], nil) + local amulet_id = ids[hash("/amulets.go")] + table.insert(self.amulets, amulet_id) + local init_table = { creator = msg.url() } + msg.post(amulet_id, "creator", init_table) + end +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + if not self.paused then + self.timer = self.timer + dt + if self.timer >= self.timeout then + self.timer = 0 + self.curse_created = false + end + + self.mummy_timer = self.mummy_timer - dt + if self.mummy_timer < 0 then + sprite.play_flipbook("mummy#still", hash("stillmummy")) + msg.post("mummy#curse", "disable") + msg.post("mummy#still", "enable") + end + + if not self.curse_created then + self.curse_created = true + self.timeout = math.random() * 2 + 2 + self.mummy_timer = 0.5 + sprite.play_flipbook("mummy#curse", hash("cursemummy")) + msg.post("mummy#curse", "enable") + msg.post("mummy#still", "disable") + local ids = collectionfactory.create("curses#curse_factory", vmath.vector3(900,560,0.0), nil) + local curse_id = ids[hash("/curses")] + table.insert(self.curses, curse_id) + + local msg_table = { creator = msg.url() } + msg.post(curse_id, "creator", msg_table) + + self.curse_count = self.curse_count + 1 + end + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("curse_deleted") then + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.curses, i) + break + end + end + self.curse_count = 0 + for _ in pairs(self.curses) do + self.curse_count = self.curse_count + 1 + end + --print ("Curse removed, we now have " .. self.curse_count .. " curses left") + end + if message_id == hash("amulet_deleted") then + for i, id in ipairs(self.amulets) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.amulets, i) + break + end + end + self.amulet_count = 0 + for _ in pairs(self.amulets) do + self.amulet_count = self.amulet_count + 1 + end + --print ("Amulet removed, we now have " .. self.amulet_count .. " amulets left") + end +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + elseif action_id == hash("pause") and action.pressed then + if not self.paused then + self.paused = true + msg.post("level1:/pause#sprite", "enable") + msg.post("level1:/player#player", "pause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "pause") + end + else + self.paused = false + msg.post("level1:/player#player", "unpause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "unpause") + msg.post("level1:/pause#sprite", "disable") + end + end + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/level2.collection b/main/level2.collection new file mode 100644 index 0000000..bf859a7 --- /dev/null +++ b/main/level2.collection @@ -0,0 +1,1304 @@ +name: "level2" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "embedded_components {\n" + " id: \"background\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"GameBackground\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " }\n" + "}\n" + "" + position { + x: -1.0 + y: 2.0 + } +} +embedded_instances { + id: "platforms" + data: "embedded_components {\n" + " id: \"bottomcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 929.0\\n" + " y: 25.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.015301545\\n" + " w: 0.9998829\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 532.0\\n" + " y: 13.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.015301545\\n" + " w: 0.9998829\\n" + " }\\n" + " index: 3\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 118.0\\n" + " y: 9.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 6\\n" + " count: 3\\n" + " }\\n" + " data: 136.38318\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 136.38318\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 150.24452\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 387.0\\n" + " y: 137.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.012696929\\n" + " w: 0.9999194\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 388.207\\n" + " data: 7.6253576\\n" + " data: 10.192\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 660.0\\n" + " y: 263.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 382.0\\n" + " y: 394.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.010337459\\n" + " w: 0.9999466\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 385.85358\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 662.0\\n" + " y: 529.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"flatplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 67.0\n" + " y: 10.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"flatplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 200.0\n" + " y: 10.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 466.0\n" + " y: 12.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 780.0\\n" + " y: 105.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 599.0\n" + " y: 16.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 864.0\n" + " y: 23.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 997.0\n" + " y: 27.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 709.0\n" + " y: 130.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 581.0\n" + " y: 132.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 323.0\n" + " y: 141.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 195.0\n" + " y: 143.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 324.0\n" + " y: 255.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.35\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 591.0\n" + " y: 262.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 721.0\n" + " y: 266.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 988.0\n" + " y: 274.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 710.0\n" + " y: 383.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 452.0\n" + " y: 391.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 322.0\n" + " y: 394.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 64.0\n" + " y: 401.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 326.0\n" + " y: 519.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 456.0\n" + " y: 522.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 724.0\n" + " y: 530.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 857.0\n" + " y: 533.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform4\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 987.0\n" + " y: 537.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"fakeplatform\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 333.0\\n" + " y: 9.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 732.0\\n" + " y: 19.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.0130207725\\n" + " w: 0.99991524\\n" + " }\\n" + " index: 3\\n" + " count: 3\\n" + " }\\n" + " data: 70.13486\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 70.13486\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "player" + data: "components {\n" + " id: \"player\"\n" + " component: \"/main/player.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.5\n" + " y: 0.5\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectplatform\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"platform\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " y: -30.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.752527\\n" + " data: 3.5919755\\n" + " data: 10.0\\n" + "}\\n" + "linear_damping: 1.0\\n" + "locked_rotation: true\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectladder\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"ladder\\\"\\n" + "mask: \\\"curse\\\"\\n" + "mask: \\\"amulet\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 2.0\\n" + " y: -18.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.718147\\n" + " data: 15.609774\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" + position { + x: -7.0 + y: 11.0 + } +} +embedded_instances { + id: "ladder" + data: "embedded_components {\n" + " id: \"ladder\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 617.0\n" + " y: 85.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.958697\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 610.0\\n" + " y: 81.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 59.53719\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 341.0\n" + " y: 209.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.915786\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 333.0\\n" + " y: 207.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 58.742554\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 711.0\n" + " y: 335.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.96056\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject2\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 704.0\\n" + " y: 335.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 61.03573\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject3\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 429.0\\n" + " y: 466.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 66.745285\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 437.0\n" + " y: 469.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.727569\n" + " y: 1.060641\n" + " }\n" + "}\n" + "" +} +embedded_instances { + id: "mummy" + data: "components {\n" + " id: \"mummy\"\n" + " component: \"/main/mummy.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"still\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"stillmummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.4\n" + " y: 0.4\n" + " z: 0.4\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"curse\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"cursemummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.63\n" + " y: 0.63\n" + " z: 0.63\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"mummy\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 33.058865\\n" + " data: 48.403397\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" + position { + z: 0.2 + } +} +embedded_instances { + id: "curses" + data: "embedded_components {\n" + " id: \"curse_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/curses.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "amulets" + data: "embedded_components {\n" + " id: \"amulet_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/amulet.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "controller" + data: "components {\n" + " id: \"level2\"\n" + " component: \"/main/level2.script\"\n" + "}\n" + "" +} +embedded_instances { + id: "holding_amulet" + data: "components {\n" + " id: \"holdingamulet\"\n" + " component: \"/main/holdingamulet.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"amulet\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.18\n" + " y: 0.18\n" + " z: 1.0E-6\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"holding_amulet\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 13.696037\\n" + " data: 15.172706\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "pause" + data: "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"pause\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 518.5\n" + " y: 336.0\n" + " z: 0.5\n" + " }\n" + " scale {\n" + " x: 1.3\n" + " y: 1.3\n" + " }\n" + "}\n" + "" +} +embedded_instances { + id: "curse_jump_pads" + data: "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"curse_jump_pads\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 645.0\\n" + " y: 558.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 10.0\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} diff --git a/main/level2.script b/main/level2.script new file mode 100644 index 0000000..951bc39 --- /dev/null +++ b/main/level2.script @@ -0,0 +1,152 @@ +function init(self) + msg.post(".", "acquire_input_focus") + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + self.timer = 0 + self.curse_created = false + self.timeout = 2.0 + self.curse_count = 0 + self.curses = {} + self.amulet_count = 0 + self.amulets = {} + self.mummy_timer = 0 + self.paused = false + + createamulets(self) + msg.post("level2:/pause#sprite", "disable") +end + +function createamulets(self) + + local positions = { + vmath.vector3(800,75,0.3), + vmath.vector3(100,200,0.3), + vmath.vector3(850,325,0.3), + vmath.vector3(400,450,0.3), + vmath.vector3(300,580,0.3), + vmath.vector3(600,600,0.3), + } + + for loop=1,5,1 do + local ids = collectionfactory.create("amulets#amulet_factory", positions[loop], nil) + local amulet_id = ids[hash("/amulets.go")] + table.insert(self.amulets, amulet_id) + local init_table = { creator = msg.url() } + msg.post(amulet_id, "creator", init_table) + end +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + if not self.paused then + self.timer = self.timer + dt + if self.timer >= self.timeout then + self.timer = 0 + self.curse_created = false + end + + self.mummy_timer = self.mummy_timer - dt + if self.mummy_timer < 0 then + sprite.play_flipbook("mummy#still", hash("stillmummy")) + msg.post("mummy#curse", "disable") + msg.post("mummy#still", "enable") + end + + if not self.curse_created then + self.curse_created = true + self.timeout = math.random() * 2 + 2 + self.mummy_timer = 0.5 + sprite.play_flipbook("mummy#curse", hash("cursemummy")) + msg.post("mummy#curse", "enable") + msg.post("mummy#still", "disable") + local ids = collectionfactory.create("curses#curse_factory", vmath.vector3(900,560,0.0), nil) + local curse_id = ids[hash("/curses")] + table.insert(self.curses, curse_id) + + local msg_table = { creator = msg.url() } + msg.post(curse_id, "creator", msg_table) + + self.curse_count = self.curse_count + 1 + end + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("curse_deleted") then + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.curses, i) + break + end + end + self.curse_count = 0 + for _ in pairs(self.curses) do + self.curse_count = self.curse_count + 1 + end + --print ("Curse removed, we now have " .. self.curse_count .. " curses left") + end + if message_id == hash("amulet_deleted") then + for i, id in ipairs(self.amulets) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.amulets, i) + break + end + end + self.amulet_count = 0 + for _ in pairs(self.amulets) do + self.amulet_count = self.amulet_count + 1 + end + --print ("Amulet removed, we now have " .. self.amulet_count .. " amulets left") + end +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + elseif action_id == hash("pause") and action.pressed then + if not self.paused then + self.paused = true + msg.post("/pause#sprite", "enable") + msg.post("/player#player", "pause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "pause") + end + else + self.paused = false + msg.post("/player#player", "unpause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "unpause") + msg.post("/pause#sprite", "disable") + end + end + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/level3.collection b/main/level3.collection new file mode 100644 index 0000000..302bf28 --- /dev/null +++ b/main/level3.collection @@ -0,0 +1,1283 @@ +name: "level3" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "embedded_components {\n" + " id: \"background\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"GameBackground\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " }\n" + "}\n" + "" + position { + x: -1.0 + y: 2.0 + } +} +embedded_instances { + id: "platforms" + data: "embedded_components {\n" + " id: \"bottomcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 929.0\\n" + " y: 25.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.015301545\\n" + " w: 0.9998829\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 532.0\\n" + " y: 13.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.015301545\\n" + " w: 0.9998829\\n" + " }\\n" + " index: 3\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 118.0\\n" + " y: 9.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 6\\n" + " count: 3\\n" + " }\\n" + " data: 136.38318\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 136.38318\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 150.24452\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 387.0\\n" + " y: 137.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.012696929\\n" + " w: 0.9999194\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 388.207\\n" + " data: 7.6253576\\n" + " data: 10.192\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 660.0\\n" + " y: 263.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"upleftcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 382.0\\n" + " y: 394.0\\n" + " }\\n" + " rotation {\\n" + " z: -0.010337459\\n" + " w: 0.9999466\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 385.85358\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"uprightcollision1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 662.0\\n" + " y: 529.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.013529582\\n" + " w: 0.99990845\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 401.32773\\n" + " data: 10.0\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"flatplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 67.0\n" + " y: 10.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"flatplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 333.0\n" + " y: 12.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 780.0\\n" + " y: 105.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 599.0\n" + " y: 16.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"bottomupplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 864.0\n" + " y: 23.0\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.36\n" + " y: 0.36\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 581.0\n" + " y: 132.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 323.0\n" + " y: 141.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 64.0\n" + " y: 146.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 324.0\n" + " y: 255.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.35\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 591.0\n" + " y: 262.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"3rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 851.0\n" + " y: 267.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 581.0\n" + " y: 388.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 322.0\n" + " y: 394.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 64.0\n" + " y: 401.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 326.0\n" + " y: 519.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 594.0\n" + " y: 527.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 724.0\n" + " y: 530.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 857.0\n" + " y: 533.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"5rowplatform4\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 987.0\n" + " y: 537.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"fakeplatform\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"platform\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 333.0\\n" + " y: 9.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 732.0\\n" + " y: 19.0\\n" + " }\\n" + " rotation {\\n" + " z: 0.0130207725\\n" + " w: 0.99991524\\n" + " }\\n" + " index: 3\\n" + " count: 3\\n" + " }\\n" + " data: 70.13486\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + " data: 70.13486\\n" + " data: 8.483422\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"2rowplatform4\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 839.0\n" + " y: 130.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.347\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"4rowplatform5\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"platformsegment\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 420.0\\n" + " y: 97.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 840.0\n" + " y: 380.0\n" + " z: 0.1\n" + " }\n" + " scale {\n" + " x: 0.35\n" + " y: 0.35\n" + " z: 0.36\n" + " }\n" + "}\n" + "" +} +embedded_instances { + id: "player" + data: "components {\n" + " id: \"player\"\n" + " component: \"/main/player.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.5\n" + " y: 0.5\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectplatform\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"platform\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " y: -30.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.752527\\n" + " data: 3.5919755\\n" + " data: 10.0\\n" + "}\\n" + "linear_damping: 1.0\\n" + "locked_rotation: true\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobjectladder\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"player\\\"\\n" + "mask: \\\"ladder\\\"\\n" + "mask: \\\"curse\\\"\\n" + "mask: \\\"amulet\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 2.0\\n" + " y: -18.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 21.718147\\n" + " data: 15.609774\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" + position { + x: -7.0 + y: 11.0 + } +} +embedded_instances { + id: "ladder" + data: "embedded_components {\n" + " id: \"ladder\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 617.0\n" + " y: 85.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.958697\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 610.0\\n" + " y: 81.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 59.53719\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 341.0\n" + " y: 209.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.915786\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject1\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 333.0\\n" + " y: 207.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 58.742554\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 583.0\n" + " y: 330.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 0.96056\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject2\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 579.0\\n" + " y: 333.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 61.03573\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject3\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 320.0\\n" + " y: 468.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 66.745285\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 327.0\n" + " y: 470.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.727569\n" + " y: 1.060641\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"ladder4\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 848.0\n" + " y: 211.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.679529\n" + " y: 1.137475\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject4\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 836.0\\n" + " y: 462.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 73.68123\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"ladder5\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"shortladder\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 93.0\\n" + " y: 165.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 840.0\n" + " y: 467.0\n" + " z: 0.2\n" + " }\n" + " scale {\n" + " x: 0.700612\n" + " y: 1.2025\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject5\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_STATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"ladder\\\"\\n" + "mask: \\\"player\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " x: 843.0\\n" + " y: 209.0\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 7.6510553\\n" + " data: 73.68123\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "mummy" + data: "components {\n" + " id: \"mummy\"\n" + " component: \"/main/mummy.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"still\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"stillmummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.4\n" + " y: 0.4\n" + " z: 0.4\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"curse\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"cursemummy\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " scale {\n" + " x: -0.63\n" + " y: 0.63\n" + " z: 0.63\n" + " }\n" + "}\n" + "" + position { + z: 0.2 + } +} +embedded_instances { + id: "curses" + data: "embedded_components {\n" + " id: \"curse_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/curses.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "amulets" + data: "embedded_components {\n" + " id: \"amulet_factory\"\n" + " type: \"collectionfactory\"\n" + " data: \"prototype: \\\"/main/amulet.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "controller" + data: "components {\n" + " id: \"level2\"\n" + " component: \"/main/level2.script\"\n" + "}\n" + "" +} +embedded_instances { + id: "holding_amulet" + data: "components {\n" + " id: \"holdingamulet\"\n" + " component: \"/main/holdingamulet.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"amulet\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 0.18\n" + " y: 0.18\n" + " z: 1.0E-6\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"collisionobject\"\n" + " type: \"collisionobject\"\n" + " data: \"type: COLLISION_OBJECT_TYPE_KINEMATIC\\n" + "mass: 0.0\\n" + "friction: 0.1\\n" + "restitution: 0.5\\n" + "group: \\\"holding_amulet\\\"\\n" + "mask: \\\"curse\\\"\\n" + "embedded_collision_shape {\\n" + " shapes {\\n" + " shape_type: TYPE_BOX\\n" + " position {\\n" + " }\\n" + " rotation {\\n" + " }\\n" + " index: 0\\n" + " count: 3\\n" + " }\\n" + " data: 13.696037\\n" + " data: 15.172706\\n" + " data: 10.0\\n" + "}\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "pause" + data: "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"pause\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 499.5\n" + " y: 329.0\n" + " z: 0.5\n" + " }\n" + " scale {\n" + " x: 1.3\n" + " y: 1.3\n" + " }\n" + "}\n" + "" +} diff --git a/main/level3.script b/main/level3.script new file mode 100644 index 0000000..56e8cdb --- /dev/null +++ b/main/level3.script @@ -0,0 +1,152 @@ +function init(self) + msg.post(".", "acquire_input_focus") + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed + self.timer = 0 + self.curse_created = false + self.timeout = 2.0 + self.curse_count = 0 + self.curses = {} + self.amulet_count = 0 + self.amulets = {} + self.mummy_timer = 0 + self.paused = false + + createamulets(self) + msg.post("level3:/pause#sprite", "disable") +end + +function createamulets(self) + + local positions = { + vmath.vector3(800,75,0.3), + vmath.vector3(100,200,0.3), + vmath.vector3(850,325,0.3), + vmath.vector3(400,450,0.3), + vmath.vector3(300,580,0.3), + vmath.vector3(600,600,0.3), + } + + for loop=1,5,1 do + local ids = collectionfactory.create("amulets#amulet_factory", positions[loop], nil) + local amulet_id = ids[hash("/amulets.go")] + table.insert(self.amulets, amulet_id) + local init_table = { creator = msg.url() } + msg.post(amulet_id, "creator", init_table) + end +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + if not self.paused then + self.timer = self.timer + dt + if self.timer >= self.timeout then + self.timer = 0 + self.curse_created = false + end + + self.mummy_timer = self.mummy_timer - dt + if self.mummy_timer < 0 then + sprite.play_flipbook("mummy#still", hash("stillmummy")) + msg.post("mummy#curse", "disable") + msg.post("mummy#still", "enable") + end + + if not self.curse_created then + self.curse_created = true + self.timeout = math.random() * 2 + 2 + self.mummy_timer = 0.5 + sprite.play_flipbook("mummy#curse", hash("cursemummy")) + msg.post("mummy#curse", "enable") + msg.post("mummy#still", "disable") + local ids = collectionfactory.create("curses#curse_factory", vmath.vector3(900,560,0.0), nil) + local curse_id = ids[hash("/curses")] + table.insert(self.curses, curse_id) + + local msg_table = { creator = msg.url() } + msg.post(curse_id, "creator", msg_table) + + self.curse_count = self.curse_count + 1 + end + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("curse_deleted") then + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.curses, i) + break + end + end + self.curse_count = 0 + for _ in pairs(self.curses) do + self.curse_count = self.curse_count + 1 + end + --print ("Curse removed, we now have " .. self.curse_count .. " curses left") + end + if message_id == hash("amulet_deleted") then + for i, id in ipairs(self.amulets) do + local id_url = msg.url(id) + if id_url.path == sender.path then + --print("Matched and removing:", id) + go.delete(id) + table.remove(self.amulets, i) + break + end + end + self.amulet_count = 0 + for _ in pairs(self.amulets) do + self.amulet_count = self.amulet_count + 1 + end + --print ("Amulet removed, we now have " .. self.amulet_count .. " amulets left") + end +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + elseif action_id == hash("pause") and action.pressed then + if not self.paused then + self.paused = true + msg.post("/pause#sprite", "enable") + msg.post("/player#player", "pause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "pause") + end + else + self.paused = false + msg.post("/player#player", "unpause") + for i, id in ipairs(self.curses) do + local id_url = msg.url(id) + msg.post(id_url, "unpause") + msg.post("/pause#sprite", "disable") + end + end + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/main.collection b/main/main.collection new file mode 100644 index 0000000..6d4182c --- /dev/null +++ b/main/main.collection @@ -0,0 +1,150 @@ +name: "main" +scale_along_z: 0 +embedded_instances { + id: "controller" + data: "components {\n" + " id: \"main\"\n" + " component: \"/main/main.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"level1_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/level1.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"startscreen_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/startscreen.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"gameover_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/gameover.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"scoreboard_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/scoreboard.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"entername_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/entername.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"instructions_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/instructions.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"settings_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/settings.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"level2_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/level2.collection\\\"\\n" + "\"\n" + "}\n" + "embedded_components {\n" + " id: \"level3_proxy\"\n" + " type: \"collectionproxy\"\n" + " data: \"collection: \\\"/main/level3.collection\\\"\\n" + "\"\n" + "}\n" + "" +} +embedded_instances { + id: "banner" + children: "lives" + data: "components {\n" + " id: \"banner\"\n" + " component: \"/main/banner.script\"\n" + "}\n" + "components {\n" + " id: \"score\"\n" + " component: \"/main/score.gui\"\n" + "}\n" + "" +} +embedded_instances { + id: "lives" + data: "embedded_components {\n" + " id: \"life1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 105.0\\n" + " y: 154.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 374.0\n" + " y: 669.0\n" + " }\n" + " scale {\n" + " x: 0.3\n" + " y: 0.3\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"life2\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 105.0\\n" + " y: 154.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 416.0\n" + " y: 669.0\n" + " }\n" + " scale {\n" + " x: 0.3\n" + " y: 0.3\n" + " }\n" + "}\n" + "embedded_components {\n" + " id: \"life3\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"still_right\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "size {\\n" + " x: 105.0\\n" + " y: 154.0\\n" + "}\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 457.0\n" + " y: 669.0\n" + " }\n" + " scale {\n" + " x: 0.3\n" + " y: 0.3\n" + " }\n" + "}\n" + "" +} diff --git a/main/main.script b/main/main.script new file mode 100644 index 0000000..5fc36e2 --- /dev/null +++ b/main/main.script @@ -0,0 +1,166 @@ +function init(self) + msg.post(".", "acquire_input_focus") + -- show the title screen when the game is loaded + + msg.post("#startscreen_proxy", "load") +-- msg.post("#level2_proxy", "load") + self.collection_to_load = "" + self.current_collection = "#startscreen_proxy" +-- self.current_collection = "#level2_proxy" + + --msg.post("#level2_proxy", "load") + --self.collection_to_load = "" + --self.current_collection = "#level2_proxy" + + local my_file_path = sys.get_save_file("cursegame", "high_scores") + self.highscore_table = sys.load(my_file_path) + if not next(self.highscore_table) then + for i = 1, 10, 1 do + table.insert(self.highscore_table, {"---", 0}) + end + sys.save(my_file_path, self.highscore_table) + end + -- Validate highy score tables, as nils can can problems + for i = 1, 10, 1 do + if self.highscore_table[i][1] == nil then + self.highscore_table[i][1] = "---" + end + if self.highscore_table[i][2] == nil then + self.highscore_table[i][2] = 0 + end + end + + self.highscore_position = 0 + self.current_lives = 3 + self.current_level = "level1" + self.current_score = 0 + self.hide_banner = true +end + +function final(self) + msg.post(".", "release_input_focus") +end + +function update(self, dt) + if not self.hide_banner then + msg.post("/banner#score", "show") + msg.post("/banner#score", "set_scores", { score = self.current_score }) + msg.post("/banner#banner", "lives", { lives = self.current_lives }) + else + msg.post("/banner#score", "hide") + msg.post("/banner#banner", "hide") + end +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- show the collection once loaded into memory + if message_id == hash("proxy_loaded") then + msg.post(sender, "enable") + -- load the correct collection when a message is received + elseif message_id == hash("show level1 screen") then + -- title screen + msg.post(self.current_collection, "unload") + self.collection_to_load = "#level1_proxy" + self.current_score = 0 + self.current_lives = 3 + self.current_level = "level1" + self.hide_banner = false + --load game over scsreen when character is dead + elseif message_id == hash("NoMoreLives") then + self.hide_banner = true + local show_gameover = true + --print("dead") + for i = 1, 10, 1 do + if self.current_score > self.highscore_table [i][2] then + for j = 9, i, -1 do + self.highscore_table[j+1][1] = self.highscore_table[j][1] + self.highscore_table[j+1][2] = self.highscore_table[j][2] + end + self.highscore_table [i][2] = self.current_score + --self.highscore_table [self.highscore_position][1] = + self.highscore_position = i + local my_file_path = sys.get_save_file("cursegame", "high_scores") + sys.save(my_file_path, self.highscore_table) + msg.post(self.current_collection, "unload") + self.collection_to_load = "#entername_proxy" + show_gameover = false + break + end + end + if show_gameover == true then + msg.post(self.current_collection, "unload") + self.collection_to_load = "#gameover_proxy" + end + elseif message_id == hash("show scoreboard screen") then + msg.post(self.current_collection, "unload") + self.collection_to_load = "#scoreboard_proxy" + elseif message_id == hash("show instructions screen") then + -- instructions screen + msg.post(self.current_collection, "unload") + self.collection_to_load = "#instructions_proxy" + elseif message_id == hash("show settings screen") then + -- settings screen + msg.post(self.current_collection, "unload") + self.collection_to_load = "#settings_proxy" + elseif message_id == hash("escape") then + msg.post(self.current_collection, "unload") + self.collection_to_load = "#startscreen_proxy" + elseif message_id == hash("send_table") then + msg.post("scoreboard:/scoreboard#scoreboard", "highscore_table", { high_scores = self.highscore_table}) + elseif message_id == hash("save_name") then + self.highscore_table[self.highscore_position][1] = message.name + local my_file_path = sys.get_save_file("cursegame", "high_scores") + sys.save(my_file_path, self.highscore_table) + msg.post(self.current_collection, "unload") + self.collection_to_load = "#scoreboard_proxy" + elseif message_id == hash("LevelCompleted") then + if self.current_collection == "#level1_proxy" then + self.current_level = "level2" + msg.post(self.current_collection, "unload") + self.collection_to_load = "#level2_proxy" + elseif self.current_collection == "#level2_proxy" then + self.current_level = "level3" + msg.post(self.current_collection, "unload") + self.collection_to_load = "#level3_proxy" + end + elseif message_id == hash("LifeLost") then + self.current_lives = self.current_lives - 1 + if self.current_lives <= 0 then + msg.post("main:/controller#main", "NoMoreLives") + end + elseif message_id == hash("proxy_unloaded") then + msg.post(self.collection_to_load, "load") + self.current_collection = self.collection_to_load + self.collection_to_load = "" + elseif message_id == hash("add 100 points") then + self.current_score = self.current_score + 100 + --print(self.current_score) + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/mummy.script b/main/mummy.script new file mode 100644 index 0000000..c93ba84 --- /dev/null +++ b/main/mummy.script @@ -0,0 +1,74 @@ +function init(self) + go.set_position(vmath.vector3(950,700,0.2)) + self.velocity = vmath.vector3(0, 0, 0) + self.gravity = -5000 -- gravity force + self.grounded = false +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + local pos = go.get_position() + pos = pos + self.velocity * dt + + local centre = vmath.vector3(pos.x, pos.y, 0) + local platform = pos + vmath.vector3(0, -45, 0) + +-- msg.post("@render:", "draw_line", { start_point = centre, end_point = platform, color = vmath.vector4(1,0,0,1) }) + + local platform_result = physics.raycast(centre, platform, { hash("platform") }) + if platform_result then + local point = platform_result.position - pos + --msg.post("@render:", "draw_debug_text", { text = "Platform", position = vmath.vector3(20, 400, 0), color = vmath.vector4(1, 0, 0, 1) } ) + --msg.post("@render:", "draw_debug_text", { text = "X : " .. tostring(point.x), position = vmath.vector3(20, 380, 0), color = vmath.vector4(1, 0, 0, 1) } ) + --msg.post("@render:", "draw_debug_text", { text = "Y : " .. tostring(point.y), position = vmath.vector3(20, 360, 0), color = vmath.vector4(1, 0, 0, 1) } ) + self.grounded = true + self.velocity.y = 0 + if point.y > -45 then + pos.y = pos.y + (point.y + 45) + end + else + self.grounded = false + end + if not self.grounded then + self.velocity.y = self.velocity.y + self.gravity * dt + end + go.set_position(pos) +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/newfont.font b/main/newfont.font new file mode 100644 index 0000000..c6b6eb6 --- /dev/null +++ b/main/newfont.font @@ -0,0 +1,4 @@ +font: "/NEWFONT/NEWFONT.fnt" +material: "/builtins/materials/gui.material" +size: 15 +characters: " !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" diff --git a/main/player.script b/main/player.script new file mode 100644 index 0000000..3b74ecb --- /dev/null +++ b/main/player.script @@ -0,0 +1,438 @@ +local Movement = { + STILL_LEFT = "STILL_LEFT", + STILL_RIGHT = "STILL_RIGHT", + MOVING_LEFT = "MOVING_LEFT", + MOVING_RIGHT = "MOVING_RIGHT", + CLIMBING_UP = "CLIMBING_UP", + CLIMBING_DOWN = "CLIMBING_DOWN", + FALLING = "FALLING", + JUMPING_LEFT = "JUMPING_LEFT", + JUMPING_RIGHT = "JUMPING_RIGHT", + JUMPING_STRAIGHT_UP = "JUMPING_STRAIGHT_UP", + CLIMBING_STILL = "CLIMBING_STILL", +} + +local Actions = { + LEFT_ARROW_PRESS = "LEFT_ARROW_PRESS", + LEFT_ARROW_RELEASE = "LEFT_ARROW_RELEASE", + RIGHT_ARROW_PRESS = "RIGHT_ARROW_PRESS", + RIGHT_ARROW_RELEASE = "RIGHT_ARROW_RELEASE", + UP_ARROW_PRESS = "UP_ARROW_PRESS", + UP_ARROW_RELEASE = "UP_ARROW_RELEASE", + DOWN_ARROW_PRESS = "DOWN_ARROW_PRESS", + DOWN_ARROW_RELEASE = "DOWN_ARROW_RELEASE", + SPACE_BAR_PRESS = "SPACE_BAR_PRESS", + SPACE_BAR_RELEASE = "SPACE_BAR_RELEASE", +} + +-- Transition table: [current_state][input] = next_state +local transitions = { + [Movement.STILL_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.STILL_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.MOVING_LEFT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.MOVING_RIGHT] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + }, + [Movement.CLIMBING_STILL] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.RIGHT_ARROW_RELEASE] = Movement.STILL_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_UP] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.LEFT_ARROW_RELEASE] = Movement.STILL_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, + [Movement.CLIMBING_DOWN] = { + [Actions.RIGHT_ARROW_PRESS] = Movement.MOVING_RIGHT, + [Actions.LEFT_ARROW_PRESS] = Movement.MOVING_LEFT, + [Actions.UP_ARROW_PRESS] = Movement.CLIMBING_UP, + [Actions.UP_ARROW_RELEASE] = Movement.CLIMBING_STILL, + [Actions.DOWN_ARROW_PRESS] = Movement.CLIMBING_DOWN, + [Actions.DOWN_ARROW_RELEASE] = Movement.CLIMBING_STILL, + }, +} + +function init(self) + msg.post(".", "acquire_input_focus") + self.direction = vmath.vector3(0,0,0) + self.speed = 250 + self.gravity = -5000 -- gravity force + self.jump_velocity = 800-- how strong the jump is + self.velocity = vmath.vector3(0, 0, 0) + self.grounded = false + self.jumped = false + self.near_up_ladder = false + self.correction = vmath.vector3() + self.climbing = false + self.is_moving = 0 + + self.left_pressed = false + self.right_pressed = false + self.up_pressed = false + self.down_pressed = false + self.jump_pressed = false + + self.have_amulet = false + self.amulet_timer = 0 + self.regenerating = false + self.regen_timer = 0 + self.blink_on_timer = 0 + self.blink_off_timer = 0 + + self.paused = false + + self.current_movement = Movement.STILL_RIGHT + + go.set_position(vmath.vector3(100,100,0.2)) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +local function handleInput(self, input) + local Transitions = transitions[self.current_movement] + local next_movement = Transitions and Transitions[input] + if next_movement then + --print("Transitioning from", self.current_movement, "to", next_movement, "on input", input) + self.current_movement = next_movement + if next_movement == Movement.MOVING_LEFT then + sprite.play_flipbook("#sprite", hash("run_left")) + msg.post("holding_amulet", "left") + self.direction.x = -1 + self.velocity.y = 0 + end + if next_movement == Movement.MOVING_RIGHT then + sprite.play_flipbook("#sprite", hash("run_right")) + msg.post("holding_amulet", "right") + self.direction.x = 1 + self.velocity.y = 0 + end + if next_movement == Movement.STILL_RIGHT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_right")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.STILL_LEFT then + if not self.climbing then + sprite.play_flipbook("#sprite", hash("still_left")) + else + next_movement = Movement.CLIMBING_STILL + sprite.play_flipbook("#sprite", hash("still_climbing")) + end + self.direction.x = 0 + end + if next_movement == Movement.CLIMBING_STILL then + sprite.play_flipbook("#sprite", hash("still_climbing")) + self.velocity.y = 0 + self.climbing = true + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + --print("Actions.LEFT_RIGHT_PRESS from climbing_still") + elseif self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + --print("Actions.LEFT_ARROW_PRESS from climbing_still") + end + end + if next_movement == Movement.CLIMBING_UP then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = 150 + self.climbing = true + end + if next_movement == Movement.CLIMBING_DOWN then + sprite.play_flipbook("#sprite", hash("climbing")) + self.direction.x = 0 + self.velocity.y = -150 + self.climbing = true + end + else + --print("No transition defined for", input, "in state", self.current_movement) + end +end + +function update(self, dt) + + if not self.paused then + + if self.amulet_timer > 0 then + self.amulet_timer = self.amulet_timer - dt + -- print ("You have " .. self.amulet_timer .. " seconds left of amulet") + if self.amulet_timer < 0 then + self.amulet_timer = 0 + self.have_amulet = false + msg.post("holding_amulet", "disable_sprite") + end + end + + if self.regen_timer > 0 then + self.regen_timer = self.regen_timer - dt + -- print ("You have " .. self.regen_timer .. " seconds left of regeneration") + if self.regen_timer < 0 then + self.regen_timer = 0 + self.regenerating = false + msg.post("#sprite", "enable") + end + if self.regenerating then + if self.blink_on_timer > 0 then + self.blink_on_timer = self.blink_on_timer - dt + msg.post("#sprite", "enable") + elseif self.blink_off_timer > 0 then + self.blink_off_timer = self.blink_off_timer - dt + msg.post("#sprite", "disable") + else + self.blink_on_timer = 0.25 + self.blink_off_timer = 0.25 + end + end + end + + self.correction = vmath.vector3() + + self.velocity.x = self.direction.x * self.speed + local pos = go.get_position() + + pos = pos + self.velocity * dt + if pos.x < 24 then + pos.x = 24 + elseif pos.x > 1030 then + pos.x = 1030 + end + if pos.y < 0 then + pos.y = 100 + end + + local centre = vmath.vector3(pos.x, pos.y - 10, 0) + local platform = pos + vmath.vector3(0, -36, 0) + local ladder_up_left = pos + vmath.vector3(-24, -32, 0) + local ladder_up_right = pos + vmath.vector3(24, -32, 0) + local ladder_down_left = pos + vmath.vector3(-24, -42, 0) + local ladder_down_right = pos + vmath.vector3(24, -42, 0) + + --msg.post("@render:", "draw_line", { start_point = centre, end_point = platform, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_up_left, end_point = ladder_up_right, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_up_right, end_point = ladder_up_left, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_down_left, end_point = ladder_down_right, color = vmath.vector4(1,0,0,1) }) + --msg.post("@render:", "draw_line", { start_point = ladder_down_right, end_point = ladder_down_left, color = vmath.vector4(1,0,0,1) }) + + local platform_result = physics.raycast(centre, platform, { hash("platform") }) + if platform_result then + local point = platform_result.position - pos + -- msg.post("@render:", "draw_debug_text", { text = "Platform", position = vmath.vector3(20, 400, 0), color = vmath.vector4(1, 0, 0, 1) } ) + -- msg.post("@render:", "draw_debug_text", { text = "X : " .. tostring(point.x), position = vmath.vector3(20, 380, 0), color = vmath.vector4(1, 0, 0, 1) } ) + -- msg.post("@render:", "draw_debug_text", { text = "Y : " .. tostring(point.y), position = vmath.vector3(20, 360, 0), color = vmath.vector4(1, 0, 0, 1) } ) + if not self.climbing then + self.jumped = false + self.speed = 250 + self.grounded = true + self.velocity.y = 0 + if point.y > -36 then + pos.y = pos.y + (point.y + 36) + end + --if self.climbing then + -- self.climbing = false + -- sprite.play_flipbook("#sprite", hash("still_left")) + --end + end + else + self.grounded = false + end + + local ladder_up_result1 = physics.raycast(ladder_up_right, ladder_up_left, { hash("ladder") }) + local ladder_up_result2 = physics.raycast(ladder_up_left, ladder_up_right, { hash("ladder") }) + if ladder_up_result1 then + self.near_up_ladder = true + elseif ladder_up_result2 then + self.near_up_ladder = true + else + self.near_up_ladder = false + end + + local ladder_down_result1 = physics.raycast(ladder_down_right, ladder_down_left, { hash("ladder") }) + local ladder_down_result2 = physics.raycast(ladder_down_left, ladder_down_right, { hash("ladder") }) + if ladder_down_result1 then + self.near_down_ladder = true + elseif ladder_down_result2 then + self.near_down_ladder = true + else + self.near_down_ladder = false + end + + if not (self.near_up_ladder or self.near_down_ladder)then + if self.climbing then + self.climbing = false + if self.left_pressed then + handleInput(self, Actions.LEFT_ARROW_PRESS) + end + if self.right_pressed then + handleInput(self, Actions.RIGHT_ARROW_PRESS) + end + end + end + +-- local debug_vars = { +-- x = pos.x, +-- y = pos.y, +-- x_vel = self.velocity.x, +-- y_vel = self.velocity.y, +-- grounded = self.grounded, +-- near_up_ladder = self.near_up_ladder, +-- near_down_ladder = self.near_down_ladder, +-- jumped = self.jumped, +-- climbing = self.climbing, +-- left_pressed = self.left_pressed, +-- right_pressed = self.right_pressed, +-- up_pressed = self.up_pressed, +-- down_pressed = self.down_pressed, +-- } +-- msg.post("#debug", "set_vars", debug_vars) + + if not self.grounded and not ((self.near_up_ladder or self.near_down_ladder) and self.climbing) then + self.velocity.y = self.velocity.y + self.gravity * dt + end + + go.set_position(pos) + end +end + +function fixed_update(self, dt) + +end + +function on_message(self, message_id, message, sender) + if message_id == hash("contact_point_response") then + if message.group == hash("curse") then + if not self.regenerating then + --print("collision with curse") + msg.post(message.other_id, "dying") + end + end + if message.group == hash("amulet") then + self.have_amulet = true + self.amulet_timer = 5 + msg.post("holding_amulet", "enable_sprite") + --print("collision with amulet") + end + if message.group == hash("mummy") then + msg.post("main:/controller#main", "LevelCompleted") + --print("collision with mummy") + end + end + if message_id == hash("curse_dying_reply") then + if message.dying == false then + msg.post("/holding_amulet#holdingamulet", "disable_sprite") + msg.post("main:/controller#main", "LifeLost") + + --else + self.current_movement = Movement.MOVING_RIGHT + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + go.set_position(vmath.vector3(100,100,0.2)) + self.regenerating = true + self.regen_timer = 3 + --end + end + end + if message_id == hash("pause") then + self.paused = true + end + if message_id == hash("unpause") then + self.paused = false + end +end + +function on_input(self, action_id, action) + if not self.paused then + if action_id == hash("left") then + if action.pressed then + self.left_pressed = true + handleInput(self, Actions.LEFT_ARROW_PRESS) + elseif action.released then + self.left_pressed = false + handleInput(self, Actions.LEFT_ARROW_RELEASE) + end + end + if action_id == hash("right") then + if action.pressed then + self.right_pressed = true + handleInput(self, Actions.RIGHT_ARROW_PRESS) + elseif action.released then + self.right_pressed = false + handleInput(self, Actions.RIGHT_ARROW_RELEASE) + end + end + if action_id == hash("jump") and action.pressed and not self.jumped and not self.climbing then + self.velocity.y = self.jump_velocity + self.speed = 500 + self.jumped = true + end + if action_id == hash("climb_up") then + if action.pressed then + self.up_pressed = true + handleInput(self, Actions.UP_ARROW_PRESS) + elseif action.released then + self.up_pressed = false + handleInput(self, Actions.UP_ARROW_RELEASE) + end + end + if action_id == hash("climb_down") then + if action.pressed then + self.down_pressed = true + handleInput(self, Actions.DOWN_ARROW_PRESS) + elseif action.released then + self.down_pressed = false + handleInput(self, Actions.DOWN_ARROW_RELEASE) + end + end + end +end + +function on_reload(self) +-- Add reload-handling code here +-- Learn more: https://defold.com/manuals/hot-reload/ +-- Remove this function if not needed +end \ No newline at end of file diff --git a/main/score.gui b/main/score.gui new file mode 100644 index 0000000..28b4b44 --- /dev/null +++ b/main/score.gui @@ -0,0 +1,43 @@ +script: "/main/score.gui_script" +fonts { + name: "default" + font: "/builtins/fonts/default.font" +} +fonts { + name: "newfont" + font: "/main/newfont.font" +} +nodes { + position { + x: 583.0 + y: 672.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.502 + z: 0.302 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score" + inherit_alpha: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT +materials { + name: "gui" + material: "/builtins/materials/gui.material" +} +materials { + name: "sprite" + material: "/builtins/materials/sprite.material" +} diff --git a/main/score.gui_script b/main/score.gui_script new file mode 100644 index 0000000..022c6f0 --- /dev/null +++ b/main/score.gui_script @@ -0,0 +1,47 @@ +function init(self) + -- Add initialization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("set_scores") then + gui.set_text(gui.get_node("score"), string.format("%06d", message.score)) + end + if message_id == hash("hide") then + gui.set_enabled(gui.get_node("score"), false) + end + if message_id == hash("show") then + gui.set_enabled(gui.get_node("score"), true) + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/scoreboard.collection b/main/scoreboard.collection new file mode 100644 index 0000000..1ab6ea8 --- /dev/null +++ b/main/scoreboard.collection @@ -0,0 +1,37 @@ +name: "scoreboard" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "components {\n" + " id: \"scoreboard\"\n" + " component: \"/main/scoreboard.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"scoreboard\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 447.0\n" + " y: 293.0\n" + " }\n" + "}\n" + "" + scale3 { + x: 1.18 + y: 1.1877 + } +} +embedded_instances { + id: "scoreboard" + data: "components {\n" + " id: \"scoreboard\"\n" + " component: \"/main/scoreboard.gui\"\n" + "}\n" + "" +} diff --git a/main/scoreboard.gui b/main/scoreboard.gui new file mode 100644 index 0000000..630b7af --- /dev/null +++ b/main/scoreboard.gui @@ -0,0 +1,393 @@ +script: "/main/scoreboard.gui_script" +fonts { + name: "default" + font: "/builtins/fonts/default.font" +} +fonts { + name: "newfont" + font: "/main/newfont.font" +} +nodes { + position { + x: 669.0 + y: 433.0 + z: 1.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score1" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 403.0 + z: 1.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score2" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 373.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score3" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 343.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score4" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 313.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score5" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 283.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score6" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 253.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score7" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 223.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score8" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 193.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score9" + inherit_alpha: true +} +nodes { + position { + x: 669.0 + y: 163.0 + } + scale { + x: 0.4 + y: 0.4 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "score10" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 431.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name1" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 401.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name2" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 371.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name3" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 341.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name4" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 311.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name5" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 281.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name6" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 251.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name7" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 221.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name8" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 191.0 + } + scale { + x: 0.55 + y: 0.55 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name9" + inherit_alpha: true +} +nodes { + position { + x: 423.0 + y: 161.0 + } + scale { + x: 0.55 + y: 0.5 + } + size { + x: 200.0 + y: 100.0 + } + type: TYPE_TEXT + text: "" + font: "newfont" + id: "name10" + inherit_alpha: true +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/main/scoreboard.gui_script b/main/scoreboard.gui_script new file mode 100644 index 0000000..13c5c07 --- /dev/null +++ b/main/scoreboard.gui_script @@ -0,0 +1,59 @@ +function init(self) + msg.post("main:/controller#main", "send_table") +-- gui.set_color(node, vmath.vector4(105, 73, 18, 1)) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + if message_id == hash("highscore_table") then + gui.set_text(gui.get_node("name1"), message.high_scores[1][1]) + gui.set_text(gui.get_node("score1"), message.high_scores[1][2]) + gui.set_text(gui.get_node("name2"), message.high_scores[2][1]) + gui.set_text(gui.get_node("score2"), message.high_scores[2][2]) + gui.set_text(gui.get_node("name3"), message.high_scores[3][1]) + gui.set_text(gui.get_node("score3"), message.high_scores[3][2]) + gui.set_text(gui.get_node("name4"), message.high_scores[4][1]) + gui.set_text(gui.get_node("score4"), message.high_scores[4][2]) + gui.set_text(gui.get_node("name5"), message.high_scores[5][1]) + gui.set_text(gui.get_node("score5"), message.high_scores[5][2]) + gui.set_text(gui.get_node("name6"), message.high_scores[6][1]) + gui.set_text(gui.get_node("score6"), message.high_scores[6][2]) + gui.set_text(gui.get_node("name7"), message.high_scores[7][1]) + gui.set_text(gui.get_node("score7"), message.high_scores[7][2]) + gui.set_text(gui.get_node("name8"), message.high_scores[8][1]) + gui.set_text(gui.get_node("score8"), message.high_scores[8][2]) + gui.set_text(gui.get_node("name9"), message.high_scores[9][1]) + gui.set_text(gui.get_node("score9"), message.high_scores[9][2]) + gui.set_text(gui.get_node("name10"), message.high_scores[10][1]) + gui.set_text(gui.get_node("score10"), message.high_scores[10][2]) + end +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/scoreboard.script b/main/scoreboard.script new file mode 100644 index 0000000..06fb89f --- /dev/null +++ b/main/scoreboard.script @@ -0,0 +1,43 @@ +function init(self) +-- go.set_position(vmath.vector3(527.5,348,1)) + msg.post(".", "acquire_input_focus") +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("escape") then + msg.post("main:/controller#main", "escape") + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/settings.collection b/main/settings.collection new file mode 100644 index 0000000..b50a6d3 --- /dev/null +++ b/main/settings.collection @@ -0,0 +1,25 @@ +name: "settings" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "components {\n" + " id: \"settings\"\n" + " component: \"/main/settings.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"settingsscreen\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 345.0\n" + " }\n" + "}\n" + "" +} diff --git a/main/settings.script b/main/settings.script new file mode 100644 index 0000000..b59bb29 --- /dev/null +++ b/main/settings.script @@ -0,0 +1,42 @@ +function init(self) + msg.post(".", "acquire_input_focus") +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("escape") and action.pressed then + msg.post("main:/controller#main", "escape") + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/startscreen.collection b/main/startscreen.collection new file mode 100644 index 0000000..e853441 --- /dev/null +++ b/main/startscreen.collection @@ -0,0 +1,63 @@ +name: "startscreen" +scale_along_z: 0 +embedded_instances { + id: "background" + data: "embedded_components {\n" + " id: \"sprite\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"startscreen\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " x: 527.5\n" + " y: 344.0\n" + " }\n" + " scale {\n" + " x: 0.9915\n" + " y: 0.99\n" + " }\n" + "}\n" + "" +} +embedded_instances { + id: "buttons" + data: "components {\n" + " id: \"startscreen\"\n" + " component: \"/main/startscreen.gui\"\n" + "}\n" + "" +} +embedded_instances { + id: "cloud1" + data: "components {\n" + " id: \"clouds\"\n" + " component: \"/main/clouds.script\"\n" + "}\n" + "embedded_components {\n" + " id: \"cloud1\"\n" + " type: \"sprite\"\n" + " data: \"default_animation: \\\"cloud1\\\"\\n" + "material: \\\"/builtins/materials/sprite.material\\\"\\n" + "textures {\\n" + " sampler: \\\"texture_sampler\\\"\\n" + " texture: \\\"/main/graphics.atlas\\\"\\n" + "}\\n" + "\"\n" + " position {\n" + " z: 0.4\n" + " }\n" + " scale {\n" + " x: 1.295998\n" + " y: 1.368312\n" + " }\n" + "}\n" + "" + scale3 { + x: 1.226128 + y: 1.169056 + } +} diff --git a/main/startscreen.gui b/main/startscreen.gui new file mode 100644 index 0000000..ee95f94 --- /dev/null +++ b/main/startscreen.gui @@ -0,0 +1,123 @@ +script: "/main/startscreen.gui_script" +textures { + name: "graphics" + texture: "/main/graphics.atlas" +} +nodes { + position { + x: 528.0 + y: 33.0 + } + scale { + x: 1.625657 + y: 0.691281 + z: 1.081804 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.902 + z: 0.702 + } + type: TYPE_BOX + id: "settings_highlight" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 530.0 + y: 239.0 + } + scale { + x: 1.96425 + y: 0.701167 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.902 + z: 0.702 + } + type: TYPE_BOX + id: "startgame_highlight" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 530.0 + y: 239.0 + } + scale { + x: 0.9915 + y: 0.98444 + } + type: TYPE_BOX + texture: "graphics/startgame" + id: "startgame" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 528.0 + y: 135.0 + } + scale { + x: 2.44317 + y: 0.714475 + } + size { + x: 200.0 + y: 100.0 + } + color { + x: 0.902 + y: 0.902 + z: 0.702 + } + type: TYPE_BOX + id: "instructions_highlight" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 528.0 + y: 135.0 + } + scale { + x: 0.9915 + y: 0.98444 + } + type: TYPE_BOX + texture: "graphics/instructions" + id: "instructions" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +nodes { + position { + x: 528.0 + y: 33.0 + } + scale { + x: 0.9915 + y: 0.98444 + z: 1.081804 + } + type: TYPE_BOX + texture: "graphics/settings" + id: "settings" + inherit_alpha: true + size_mode: SIZE_MODE_AUTO +} +material: "/builtins/materials/gui.material" +adjust_reference: ADJUST_REFERENCE_PARENT diff --git a/main/startscreen.gui_script b/main/startscreen.gui_script new file mode 100644 index 0000000..6aebfed --- /dev/null +++ b/main/startscreen.gui_script @@ -0,0 +1,59 @@ +function init(self) + msg.post(".", "acquire_input_focus") + gui.set_alpha(gui.get_node("startgame_highlight"), 0) + gui.set_alpha(gui.get_node("instructions_highlight"), 0) + gui.set_alpha(gui.get_node("settings_highlight"), 0) +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + if action_id == hash("touch") and action.pressed then + if gui.pick_node(gui.get_node("startgame"), action.x, action.y) then + msg.post("main:/controller#main", "show level1 screen") + elseif gui.pick_node(gui.get_node("instructions"), action.x, action.y) then + msg.post("main:/controller#main", "show instructions screen") + elseif gui.pick_node(gui.get_node("settings"), action.x, action.y) then + msg.post("main:/controller#main", "show settings screen") + end + elseif action_id == nil then + --Check if mouse is over the button + if gui.pick_node(gui.get_node("startgame"), action.x, action.y) then + gui.set_alpha(gui.get_node("startgame_highlight"), 1) -- Show highlight + else + gui.set_alpha(gui.get_node("startgame_highlight"), 0) -- Hide highlight + end + if gui.pick_node(gui.get_node("instructions"), action.x, action.y) then + gui.set_alpha(gui.get_node("instructions_highlight"), 1) -- Show highlight + else + gui.set_alpha(gui.get_node("instructions_highlight"), 0) -- Hide highlight + end + if gui.pick_node(gui.get_node("settings"), action.x, action.y) then + gui.set_alpha(gui.get_node("settings_highlight"), 1) -- Show highlight + else + gui.set_alpha(gui.get_node("settings_highlight"), 0) -- Hide highlight + end + end +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/main/startscreen.script b/main/startscreen.script new file mode 100644 index 0000000..2cc4c9f --- /dev/null +++ b/main/startscreen.script @@ -0,0 +1,48 @@ + +function init(self) + msg.post(".", "acquire_input_focus") + +end + +function final(self) + -- Add finalization code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function update(self, dt) + +end + +function fixed_update(self, dt) + -- This function is called if 'Fixed Update Frequency' is enabled in the Engine section of game.project + -- Can be coupled with fixed updates of the physics simulation if 'Use Fixed Timestep' is enabled in + -- Physics section of game.project + -- Add update code here + -- Learn more: https://defold.com/manuals/script/ + -- Remove this function if not needed +end + +function on_message(self, message_id, message, sender) + -- Add message-handling code here + -- Learn more: https://defold.com/manuals/message-passing/ + -- Remove this function if not needed +end + +function on_input(self, action_id, action) + -- Add input-handling code here. The game object this script is attached to + -- must have acquired input focus: + -- + -- msg.post(".", "acquire_input_focus") + -- + -- All mapped input bindings will be received. Mouse and touch input will + -- be received regardless of where on the screen it happened. + -- Learn more: https://defold.com/manuals/input/ + -- Remove this function if not needed +end + +function on_reload(self) + -- Add reload-handling code here + -- Learn more: https://defold.com/manuals/hot-reload/ + -- Remove this function if not needed +end diff --git a/manifest.private.der b/manifest.private.der new file mode 100644 index 0000000..4177f47 Binary files /dev/null and b/manifest.private.der differ diff --git a/manifest.public.der b/manifest.public.der new file mode 100644 index 0000000..a372ee0 Binary files /dev/null and b/manifest.public.der differ