Compare commits
461 Commits
Author | SHA1 | Date |
---|---|---|
Rémi Verschelde | 820dd1d001 | |
George Marques | 78883ea57d | |
Juan Linietsky | 9cc9b45948 | |
eska | 828fa9af11 | |
SuperUserNameMan | 8a615b27ad | |
Rémi Verschelde | 5184b215a9 | |
Rémi Verschelde | 7ce99c23dd | |
Rémi Verschelde | af3cf7806e | |
Ariel Manzur | 687248bbf4 | |
Rémi Verschelde | 6d6b14d112 | |
Juan Linietsky | 75cc8dc6b4 | |
Rémi Verschelde | 106199dfa7 | |
Rémi Verschelde | 192688e7eb | |
eska | a9a8bb281d | |
Franklin Sobrinho | 90c8dbb890 | |
Juan Linietsky | 6e7db99614 | |
Juan Linietsky | 3963f89ebd | |
Juan Linietsky | f4a5963ca9 | |
Pawel Kowal | d4cb381ce0 | |
Rémi Verschelde | 2c3511a284 | |
George Marques | 9420a1b6c1 | |
volzhs | 8aeacd935c | |
Ignacio Etcheverry | f9b7baa546 | |
Andreas Haas | 7589307911 | |
Juan Linietsky | 6199efbc7e | |
Juan Linietsky | 801db4c708 | |
Juan Linietsky | 9b90d70ae7 | |
Juan Linietsky | 242ceb1869 | |
Juan Linietsky | de0b7b871b | |
Juan Linietsky | eaca35adfe | |
Juan Linietsky | dffa1da012 | |
Juan Linietsky | a2103bac7c | |
Juan Linietsky | a2d2eb9a63 | |
Rémi Verschelde | 3ce0380ba4 | |
Juan Linietsky | 34e6e284db | |
Juan Linietsky | 302abb1449 | |
Juan Linietsky | c5fd6a3b69 | |
Juan Linietsky | 6813c89021 | |
Ferdinand Thiessen | 406daa8f7f | |
George Marques | 694120210a | |
Juan Linietsky | 9a7c310134 | |
Juan Linietsky | ea7da3bf08 | |
Juan Linietsky | 9592dd3e3b | |
Paulb23 | 9d85bfa00a | |
Pedro J. Estébanez | 5083e18b89 | |
paper-pauper | 3ff466770a | |
volzhs | 584deb807e | |
volzhs | 6116174d49 | |
Rémi Verschelde | 8a451e49e5 | |
Saracen | b0aab53853 | |
Juan Linietsky | 10eedf62b8 | |
Rémi Verschelde | 673ef0cf88 | |
Andreas Haas | f7436c7d16 | |
George Marques | c015341221 | |
Juan Linietsky | 6e49bc8210 | |
volzhs | c2226d1199 | |
George Marques | 7fd9ff70f9 | |
George Marques | 1218d8f2a2 | |
Juan Linietsky | cf300ace96 | |
Rémi Verschelde | 4e1dcd3d0b | |
Paulb23 | 5907bddda5 | |
volzhs | 39cc2cbfb9 | |
Juan Linietsky | 140949e013 | |
Rémi Verschelde | 5b3551a91f | |
George Marques | 2389712638 | |
Rémi Verschelde | 1a3d408f52 | |
Bojidar Marinov | 0ce2f76d5a | |
George Marques | 35c64c1824 | |
George Marques | aa581a067d | |
sunnystormy | 418cd58d47 | |
Juan Linietsky | 0c71eb8a1e | |
Juan Linietsky | 3318860539 | |
Juan Linietsky | d1dbc7fe93 | |
Juan Linietsky | 299b0102f0 | |
Juan Linietsky | fb255a69b6 | |
Juan Linietsky | 1bfaea0d76 | |
Juan Linietsky | ad01fa2248 | |
Juan Linietsky | b457b8ac89 | |
volzhs | 5582d37af9 | |
Juan Linietsky | 8c5577e9e4 | |
Juan Linietsky | 7076e98f40 | |
Juan Linietsky | a71ea0abc6 | |
George Marques | edadb46bd4 | |
J08nY | 86c4bbc031 | |
J08nY | 8d9121f0b0 | |
Mehmet Durgel | c9716ebd00 | |
J08nY | a04be3e44b | |
Juan Linietsky | af41d7bffa | |
J08nY | 61b087dd66 | |
Juan Linietsky | 257d370677 | |
Juan Linietsky | beb2176399 | |
Ignacio Etcheverry | 18cb1f8e44 | |
Dennis Brakhane | a04a78c7f6 | |
Juan Linietsky | 8df46cddcb | |
Juan Linietsky | 775b089548 | |
Juan Linietsky | 7b36595641 | |
J08nY | f5d3d9cc5f | |
J08nY | be4babccba | |
volzhs | 6a1368d24d | |
J08nY | 109e58cf75 | |
George Marques | 0b8cf7946e | |
J08nY | c1e004ffca | |
Juan Linietsky | d662f5aa63 | |
Juan Linietsky | 85c6d1b37d | |
Juan Linietsky | fd4d666289 | |
George Marques | d8f9c95dbd | |
Juan Linietsky | 56c5da8565 | |
Andreas Haas | c2e09a21ac | |
J08nY | d8d926730c | |
Juan Linietsky | da45e32ef1 | |
Juan Linietsky | b075525e84 | |
Juan Linietsky | 6525e0017c | |
Ovnuniarchos | c54744ce4d | |
Juan Linietsky | acc552c447 | |
Juan Linietsky | d411cbe1d9 | |
Juan Linietsky | 2212cc827c | |
Juan Linietsky | cb37d1bb91 | |
Juan Linietsky | 7987147502 | |
Juan Linietsky | c22ac11afb | |
Juan Linietsky | d945dbdd0f | |
Juan Linietsky | b06cf23c1a | |
Juan Linietsky | 51330b29ae | |
Juan Linietsky | 8289760227 | |
Juan Linietsky | dd7e7c94c1 | |
Nuno Donato | 25244e9843 | |
Juan Linietsky | 6a83c87dda | |
Juan Linietsky | 64ac2272ce | |
volzhs | 2998b7c486 | |
Paulb23 | 13d3d217b1 | |
CowThing | a94f6108a9 | |
Paulb23 | 93616e41f9 | |
J08nY | 1475f8d318 | |
Rémi Verschelde | 9bb6a0852b | |
Rémi Verschelde | 66ce012ca6 | |
Rémi Verschelde | 64507f0085 | |
Pawel Kowal | 08c9e566bf | |
Paulb23 | afbc9d550f | |
J08nY | d16375d005 | |
J08nY | 74d0f8b65b | |
Rémi Verschelde | 9791d2ef6d | |
Juan Linietsky | cb94271e9f | |
Juan Linietsky | bb8b57cbae | |
TheoXD | 5a45b295ae | |
Roberto | a39eaf4c66 | |
Roberto | 9ac954e2a4 | |
Pedro J. Estébanez | 73e455c22f | |
Roberto | 840ad26069 | |
Roberto | b18000349e | |
Andreas Haas | 7bff33ea92 | |
Bojidar Marinov | aad9cd3e22 | |
Juan Linietsky | d5bed26e42 | |
volzhs | 356c35954a | |
Rémi Verschelde | ff91f409bf | |
Błażej Szczygieł | 763b29f34e | |
Rémi Verschelde | d412cb65be | |
Rémi Verschelde | da8fb5de7a | |
J08nY | 845a0e2566 | |
marcelofg55 | bed17e98c8 | |
Warlaan | c6ef223498 | |
J08nY | 8a7c4c017f | |
volzhs | f22e13d24e | |
George Marques | 47f8da5409 | |
J08nY | 8ea940e99b | |
Rémi Verschelde | f97cbdec8f | |
Warlaan | fc15a842af | |
George Marques | 6d45fc0717 | |
P-GLEZ | 298be3356f | |
P-GLEZ | 436e968b43 | |
Andreas Haas | 2b06d7e6f7 | |
P-GLEZ | 79e9917367 | |
jmintb | 3efe43fb8b | |
marcelofg55 | 331a0aed71 | |
J08nY | 39773b6b9a | |
CowThing | 566d751e39 | |
Paulb23 | 7928b5fef6 | |
Rémi Verschelde | 8b8a1a0cbb | |
Julian Murgia - StraToN | 5c52f4437a | |
Julian Murgia - StraToN | e8b1744325 | |
Aleksandar Danilovic | 24e5755e72 | |
Rémi Verschelde | 1787ec12be | |
MarianoGNU | c67b1888b5 | |
Paulb23 | 7029c96221 | |
Geequlim | 178168aa8a | |
Paulb23 | 71487793df | |
Paulb23 | 99c948ba56 | |
Ignacio Etcheverry | 211a6d01bc | |
marcelofg55 | 280899ee43 | |
Paulb23 | 652f82dae8 | |
Carter Anderson | 6844b580f6 | |
Daniel J. Ramirez | ef4ac86656 | |
Daniel J. Ramirez | f346733d80 | |
volzhs | bbf08a48df | |
volzhs | 4478f8cfbb | |
Hugo Locurcio | 5ad050be2b | |
anatoly techtonik | a5007d0e7a | |
est31 | 88e512547b | |
est31 | 85018e185a | |
Calinou | 9b03b9e989 | |
Ariel Manzur | 803438d448 | |
marcelofg55 | 4dc2d78d2e | |
Geequlim | c2f48421d1 | |
captainwasabi | 08fa7a0ff1 | |
Bojidar Marinov | bea5135518 | |
Paulb23 | e95eb4b1dc | |
Rémi Verschelde | 01bdfa4d22 | |
Wilhem Barbier | 16d38b199a | |
Rémi Verschelde | 1d85dcb1fa | |
CowThing | c6e2c0f01d | |
Paulb23 | 481c076feb | |
Paulb23 | 86c0438f9d | |
Bojidar Marinov | d7e4fb4365 | |
volzhs | a3979cc928 | |
Daniel J. Ramirez | 1864745e2a | |
Rémi Verschelde | 0a64059937 | |
Błażej Szczygieł | 9acb666320 | |
Rémi Verschelde | 3a1e69f45c | |
Daniel J. Ramirez | 6a85acdffb | |
volzhs | 094a9c3bcc | |
Rémi Verschelde | 5d2a23d99c | |
Rémi Verschelde | 9ed2084b42 | |
Rémi Verschelde | c0df7da2ca | |
Rémi Verschelde | 49bf494eac | |
eska | b8d8ec09ee | |
MattUV | f120514402 | |
Rémi Verschelde | 77573a76d1 | |
Rémi Verschelde | c734a508c3 | |
Rémi Verschelde | d66b04921f | |
Paulb23 | f61f515872 | |
Paulb23 | c5e17d553e | |
marcelofg55 | 2bd6e2402b | |
Mattias Cibien | c575f31d5d | |
Andreas Haas | 6d50ccfd32 | |
Paulb23 | bd51dea8f6 | |
Paulb23 | abc97d3bb4 | |
George Marques | a5e54b83ec | |
Paulb23 | 18782aec61 | |
Alexander Holland | f58cfaf585 | |
Paulb23 | 5d98718c28 | |
Paulb23 | 7ab1c1ea3b | |
Ariel Manzur | f8debd8152 | |
Ariel Manzur | ac06e3d4db | |
Rémi Verschelde | b6be2f503d | |
Daniel J. Ramirez | b224407770 | |
George Marques | 7556391d20 | |
Juan Linietsky | 23c659fc47 | |
George Marques | 4832731477 | |
Ignacio Etcheverry | 19f08eaa5b | |
Ignacio Etcheverry | 975b4d2927 | |
Hinsbart | 913818a246 | |
Daniel J. Ramirez | 4a4999451b | |
George Marques | 4f57e532b8 | |
Aleksandar Danilovic | 3449c81bdb | |
mrezai | 05857a5472 | |
Paulb23 | ec3b50fd65 | |
CowThing | f95918e05a | |
Mattias Cibien | b3404c8c44 | |
Daniel J. Ramirez | 7e077258c5 | |
Daniel J. Ramirez | fb3d10c579 | |
Daniel J. Ramirez | 0b75c39c2b | |
Daniel J. Ramirez | e0a13981fc | |
CowThing | bdbb831261 | |
Ignacio Etcheverry | 97e30f4cd7 | |
CowThing | 78dc8e79c4 | |
Rémi Verschelde | 40681d90e5 | |
Daniel J. Ramirez | fbb8a2170c | |
Daniel J. Ramirez | e8a972197c | |
Bojidar Marinov | 047767b824 | |
Rémi Verschelde | ef2f1ae811 | |
Rémi Verschelde | 7c419032c7 | |
Rémi Verschelde | 9bdcc97e56 | |
Rémi Verschelde | 7f80fce464 | |
Rémi Verschelde | ea9b552e27 | |
Juan Linietsky | 21ab3a030e | |
Juan Linietsky | a14ff27337 | |
Juan Linietsky | d6e30256ad | |
Ariel Manzur | 4bc494ae2e | |
Rémi Verschelde | d49fff6246 | |
Rémi Verschelde | d29087cc53 | |
Rémi Verschelde | 27461a79dc | |
Rémi Verschelde | a86cfc258e | |
Rémi Verschelde | 26c2e0d09d | |
Rémi Verschelde | 0b49d78a3f | |
volzhs | 40b546fb83 | |
Rémi Verschelde | 3c453b7bd2 | |
George Marques | f033763700 | |
Rémi Verschelde | 944ac2500a | |
Geequlim | b4adb0d338 | |
Ariel Manzur | 227604a566 | |
Bojidar Marinov | 70644301dd | |
Paulb23 | 4228505cf0 | |
Rémi Verschelde | 9086a929b2 | |
Geequlim | 5365ae9212 | |
Geequlim | a3fd381a4f | |
Daniel J. Ramirez | d81ffaf2ab | |
Paulb23 | c77a5f910e | |
eska | 91461b588d | |
Hinsbart | 3a3f56689e | |
Daniel Ramirez | 35e05b092c | |
Rémi Verschelde | 238bbb6539 | |
Daniel J. Ramirez | 946ef8d478 | |
Alexander Holland | d3ee8de754 | |
Paulb23 | 517518ae9a | |
Rémi Verschelde | 084ce221d7 | |
Jan Heemstra | e38666b76a | |
Jan Heemstra | 6f76eca883 | |
Julian Murgia - StraToN | d183a5361f | |
Rémi Verschelde | 11aa0d1405 | |
Julian Murgia | 6efe8818a7 | |
Rémi Verschelde | 9023a84a93 | |
Rémi Verschelde | 1bd2145e34 | |
Rémi Verschelde | 382a8250ba | |
Paulb23 | 73296a9a6d | |
Hinsbart | 93b1f60ca2 | |
Bojidar Marinov | 7f4387d21e | |
Bojidar Marinov | c0748bad06 | |
Hinsbart | 94b321822d | |
Bojidar Marinov | c523749662 | |
eska | 0f47311610 | |
Bojidar Marinov | 4c358b7043 | |
eska | 98b30e3aff | |
volzhs | 9f5c6cf950 | |
Zher Huei Lee | 07fc330241 | |
Alex | c712e54b63 | |
Ignacio Etcheverry | 6a2efc48c5 | |
Bojidar Marinov | ff1d370b9f | |
eska | e654184888 | |
mrezai | cabb80ecf4 | |
mrezai | 3efa0f130d | |
Saracen | 47c7b535d2 | |
Hearto Lazor | 5fac497aa2 | |
volzhs | 4bfcd14a6a | |
Ignacio Etcheverry | dbcf969fbf | |
Ignacio Etcheverry | 52bf4a76b2 | |
Marc Gilleron | f32a4dc516 | |
Marc Gilleron | a0b6645858 | |
mrezai | b24c3be564 | |
Saracen | b2b5c495e1 | |
Paulb23 | e367c6cdd8 | |
Paulb23 | b5a438413a | |
Zher Huei Lee | f4ebba513a | |
Ignacio Etcheverry | 40d21117f9 | |
Ignacio Etcheverry | e120e2265b | |
Rémi Verschelde | 8746966194 | |
sanikoyes | 76eeb457d3 | |
sanikoyes | 02afea1e4e | |
Bojidar Marinov | 692878b7f4 | |
Paulb23 | b7f5418f8d | |
Alexander Holland | d4d810faac | |
punto- | 3a390e9b44 | |
Rémi Verschelde | 5d63f4e758 | |
Rémi Verschelde | cbac9a2ca3 | |
Rémi Verschelde | 837d50714a | |
Paulb23 | bb6cfc130b | |
Paulb23 | b3891246e5 | |
Rémi Verschelde | 00566a8592 | |
Bojidar Marinov | 63e33cfdd2 | |
Bojidar Marinov | dea6671d58 | |
Paul Batty | 7c6d2e7062 | |
SaracenOne | eb927383f2 | |
sunnystormy | 5c98674a8b | |
Paulb23 | 4bde902de1 | |
Paulb23 | a5f07d18ec | |
Rémi Verschelde | 71da9a1a23 | |
Luiz Paulo de Vasconcellos | 44daccc861 | |
MSC | 4220ffbd8e | |
MSC | 43c74056b1 | |
Paulb23 | 48438e4f3b | |
Paulb23 | 5f901e2b27 | |
Paulb23 | 22ef9673dd | |
Zher Huei Lee | 5b1aa3a5cd | |
Rémi Verschelde | f06f574735 | |
blubee | aac3b9db5c | |
Rémi Verschelde | 9fdc1279cc | |
Paul Batty | 01471e4c09 | |
Rémi Verschelde | bac8248316 | |
Rémi Verschelde | 69e67d51c7 | |
Rémi Verschelde | c6ccd05fed | |
Paulb23 | 937a96b26b | |
Maxwell Huang-Hobbs | a52b1e866d | |
Josh Grams | fed11a662a | |
Paulb23 | 26f2b7415c | |
Paulb23 | 729dc5da83 | |
sanikoyes | 54625bb771 | |
Paulb23 | 523625a3d1 | |
Rémi Verschelde | 5caf6ad8b9 | |
Ignacio Etcheverry | 7ddc17b18e | |
Ignacio Etcheverry | cf0a586a3e | |
demolitions | 41cc4ffe98 | |
Bojidar Marinov | 0ea354c12a | |
demolitions | 2bc4049b9b | |
Paulb23 | 64a8fe6ad7 | |
sanikoyes | 05c620b7ad | |
Saracen | ca1ca6c7df | |
Paulb23 | 1369b38d85 | |
Paulb23 | 68b7f9d87a | |
Paulb23 | 8a78112e5b | |
Franklin Sobrinho | 41326781d2 | |
Ignacio Etcheverry | cacf7d136f | |
Ignacio Etcheverry | a701c6ff68 | |
Franklin Sobrinho | 812de22194 | |
Franklin Sobrinho | 8de0405032 | |
Franklin Sobrinho | e59c0610ca | |
Paulb23 | 8fd4c78caf | |
Brandon DeRosier | 85820434de | |
Saracen | d0151daa69 | |
Rémi Verschelde | 763b29ed18 | |
Rémi Verschelde | 1d096471dc | |
sanikoyes | 7c44cbee67 | |
Ignacio Etcheverry | d950a13c10 | |
Ignacio Etcheverry | 6ce273b329 | |
Josh Grams | 0635a639e9 | |
Hubert Jarosz | 424a104666 | |
Josh Grams | 830947feaf | |
Josh Grams | ee20365f7c | |
RegalMedia | 0a24f562fb | |
Josh Grams | 60e4cfbcb7 | |
hondres | 656aa0a501 | |
volzhs | 7ad50eaea8 | |
Hubert Jarosz | 83887ae16d | |
hondres | 827f4a895a | |
Paulb23 | da356eca0f | |
Rémi Verschelde | 53aa9cd51a | |
Rémi Verschelde | 706d576f7b | |
Franklin Sobrinho | 226e0a7f4f | |
hondres | c44060bb82 | |
Martin Chuckeles | 4fee5f3915 | |
Franklin Sobrinho | e69c9021b5 | |
Franklin Sobrinho | edb3716da7 | |
Franklin Sobrinho | 1bdd5d24cb | |
Franklin Sobrinho | a1a1c0b9f6 | |
Martin Chuckeles | 450a7a9120 | |
Zher Huei Lee | c850fa7331 | |
hondres | afd75013f9 | |
Martin Chuckeles | 848c7378fd | |
Martin Chuckeles | 4b2fcabb74 | |
Martin Chuckeles | cb7693c533 | |
Stabington | 7fea990b1b | |
volzhs | 95e46e6eac | |
Josh Grams | bea8e1654e | |
Josh Grams | cafcdb015d | |
Rémi Verschelde | 459b914d9c | |
Rémi Verschelde | 9ed3d21d5a | |
hinsbart | 82d06b0027 | |
Ariel Manzur | e0a66b6e56 | |
Bojidar Marinov | 186b82c350 | |
Rémi Verschelde | 1af2e1101d | |
Rémi Verschelde | a55f41e3d9 | |
Rémi Verschelde | 439e29ea95 | |
Rémi Verschelde | f5e8e89f50 | |
Ariel Manzur | f619b05751 | |
Juan Linietsky | aa94ff6dae | |
Krzysztof Jankowski | ee5c250b63 | |
Ariel Manzur | e4d367e7a1 | |
Ariel Manzur | 45a0bbe56e | |
Julian Murgia - StraToN | d86b12a397 | |
hinsbart | f0ba9c7e78 | |
David | 61f17fb1bb | |
Dana Olson | a43af20f31 | |
est31 | 7ba92ae9eb | |
est31 | b05c27a27f | |
Dana Olson | e30cbc3b36 |
|
@ -1,10 +1,9 @@
|
|||
# GoDot auto generated files
|
||||
# Godot auto generated files
|
||||
platform/server/logo.h
|
||||
platform/android/logo.h
|
||||
platform/bb10/logo.h
|
||||
platform/iphone/logo.h
|
||||
platform/javascript/logo.h
|
||||
platform/nacl/logo.h
|
||||
platform/osx/logo.h
|
||||
platform/windows/logo.h
|
||||
platform/x11/logo.h
|
||||
|
@ -19,7 +18,9 @@ drivers/unix/os_unix_global_settings_path.cpp
|
|||
tools/editor/register_exporters.cpp
|
||||
tools/editor/doc_data_compressed.h
|
||||
tools/editor/editor_icons.cpp
|
||||
-fpic
|
||||
tools/editor/builtin_fonts.h
|
||||
tools/editor/certs_compressed.h
|
||||
tools/editor/translations.h
|
||||
.fscache
|
||||
make.bat
|
||||
log.txt
|
||||
|
@ -31,6 +32,7 @@ doc/_build/
|
|||
*.bc
|
||||
|
||||
# Android specific
|
||||
platform/android/java/build.gradle
|
||||
platform/android/java/.gradle
|
||||
platform/android/java/.gradletasknamecache
|
||||
platform/android/java/local.properties
|
||||
|
@ -145,6 +147,8 @@ ipch/
|
|||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
|
|
38
.travis.yml
38
.travis.yml
|
@ -1,7 +1,6 @@
|
|||
language: cpp
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
sudo: false
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
@ -41,12 +40,39 @@ matrix:
|
|||
- compiler: clang
|
||||
env: GODOT_TARGET=x11
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- build-essential
|
||||
- scons
|
||||
- pkg-config
|
||||
- libx11-dev
|
||||
- libxcursor-dev
|
||||
- libasound2-dev
|
||||
- libfreetype6-dev
|
||||
- libgl1-mesa-dev
|
||||
- libglu1-mesa-dev
|
||||
- libssl-dev
|
||||
- libxinerama-dev
|
||||
- libudev-dev
|
||||
|
||||
# For cross-compiling to Windows.
|
||||
- binutils-mingw-w64-i686
|
||||
- binutils-mingw-w64-x86-64
|
||||
- gcc-mingw-w64-i686
|
||||
- gcc-mingw-w64-x86-64
|
||||
- g++-mingw-w64-i686
|
||||
- g++-mingw-w64-x86-64
|
||||
- mingw-w64
|
||||
|
||||
|
||||
before_script:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y scons pkg-config libx11-dev libxcursor-dev build-essential libasound2-dev libfreetype6-dev libgl1-mesa-dev libglu-dev libssl-dev libxinerama-dev libudev-dev; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GODOT_TARGET" = "windows" ]; then sudo apt-get update -qq; sudo apt-get install -y mingw32 mingw-w64; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install scons; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$GODOT_TARGET" = "android" ]; then brew update; brew install android-sdk android-ndk; export ANDROID_HOME=/usr/local/opt/android-sdk; export ANDROID_NDK_ROOT=/usr/local/opt/android-ndk; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$GODOT_TARGET" = "android" ]; then
|
||||
brew update; brew install -v android-sdk;
|
||||
brew install -v android-ndk | grep -v "inflating:" | grep -v "creating:";
|
||||
export ANDROID_HOME=/usr/local/opt/android-sdk; export ANDROID_NDK_ROOT=/usr/local/opt/android-ndk;
|
||||
fi
|
||||
|
||||
script:
|
||||
- scons platform=$GODOT_TARGET CXX=$CXX
|
||||
- scons platform=$GODOT_TARGET CXX=$CXX openssl=builtin
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
![GODOT](/logo.png)
|
||||
|
||||
http://www.godotengine.org
|
||||
https://godotengine.org
|
||||
|
||||
### The Engine
|
||||
|
||||
|
@ -13,17 +13,17 @@ Godot has been developed by Juan Linietsky and Ariel Manzur for several years, a
|
|||
|
||||
### Documentation
|
||||
|
||||
Documentation has been moved to [ReadTheDocs](http://docs.godotengine.org).
|
||||
Documentation is hosted on [ReadTheDocs](http://docs.godotengine.org).
|
||||
|
||||
### Binary Downloads, Community, etc.
|
||||
|
||||
Binary downloads, community, etc. can be found in Godot homepage:
|
||||
|
||||
http://www.godotengine.org
|
||||
https://godotengine.org
|
||||
|
||||
### Compiling from Source
|
||||
|
||||
Compilation instructions for every platform can be found in the Wiki:
|
||||
See docs for compilation instructions for every platform:
|
||||
http://docs.godotengine.org/en/latest/reference/_compiling.html
|
||||
|
||||
[![Build Status](https://travis-ci.org/godotengine/godot.svg?branch=master)](https://travis-ci.org/godotengine/godot)
|
||||
|
|
48
SConstruct
48
SConstruct
|
@ -23,7 +23,7 @@ platform_exporters=[]
|
|||
global_defaults=[]
|
||||
|
||||
for x in glob.glob("platform/*"):
|
||||
if (not os.path.isdir(x)):
|
||||
if (not os.path.isdir(x) or not os.path.exists(x+"/detect.py")):
|
||||
continue
|
||||
tmppath="./"+x
|
||||
|
||||
|
@ -63,9 +63,9 @@ elif (os.name=="nt"):
|
|||
if (os.getenv("VSINSTALLDIR")==None or platform_arg=="android"):
|
||||
custom_tools=['mingw']
|
||||
|
||||
env_base=Environment(tools=custom_tools,ENV = {'PATH' : os.environ['PATH']});
|
||||
|
||||
#env_base=Environment(tools=custom_tools);
|
||||
env_base=Environment(tools=custom_tools);
|
||||
env_base.AppendENVPath('PATH', os.getenv('PATH'))
|
||||
env_base.AppendENVPath('PKG_CONFIG_PATH', os.getenv('PKG_CONFIG_PATH'))
|
||||
env_base.global_defaults=global_defaults
|
||||
env_base.android_maven_repos=[]
|
||||
env_base.android_dependencies=[]
|
||||
|
@ -112,7 +112,8 @@ if profile:
|
|||
|
||||
opts=Variables(customs, ARGUMENTS)
|
||||
opts.Add('target', 'Compile Target (debug/release_debug/release).', "debug")
|
||||
opts.Add('bits', 'Compile Target Bits (default/32/64).', "default")
|
||||
opts.Add('arch', 'Platform dependent architecture (arm/arm64/x86/x64/mips/etc)', "")
|
||||
opts.Add('bits', 'Compile Target Bits (default/32/64/fat).', "default")
|
||||
opts.Add('platform','Platform: '+str(platform_list)+'.',"")
|
||||
opts.Add('p','Platform (same as platform=).',"")
|
||||
opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
|
||||
|
@ -267,10 +268,14 @@ if selected_platform in platform_list:
|
|||
else:
|
||||
suffix+=".debug"
|
||||
|
||||
if (env["bits"]=="32"):
|
||||
if env["arch"] != "":
|
||||
suffix += "."+env["arch"]
|
||||
elif (env["bits"]=="32"):
|
||||
suffix+=".32"
|
||||
elif (env["bits"]=="64"):
|
||||
suffix+=".64"
|
||||
elif (env["bits"]=="fat"):
|
||||
suffix+=".fat"
|
||||
|
||||
suffix+=env.extra_suffix
|
||||
|
||||
|
@ -302,10 +307,10 @@ if selected_platform in platform_list:
|
|||
if (env['musepack']=='yes'):
|
||||
env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']);
|
||||
|
||||
if (env['openssl']!='no'):
|
||||
env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
||||
if (env['openssl']=="builtin"):
|
||||
env.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
||||
#if (env['openssl']!='no'):
|
||||
# env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
||||
# if (env['openssl']=="builtin"):
|
||||
# env.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
||||
|
||||
if (env["builtin_zlib"]=='yes'):
|
||||
env.Append(CPPPATH=['#drivers/builtin_zlib/zlib'])
|
||||
|
@ -389,14 +394,25 @@ if selected_platform in platform_list:
|
|||
AddToVSProject(env.servers_sources)
|
||||
AddToVSProject(env.tool_sources)
|
||||
|
||||
# this env flag won't work, it needs to be set in env_base=Environment(MSVC_VERSION='9.0')
|
||||
# Even then, SCons still seems to ignore it and builds with the latest MSVC...
|
||||
# That said, it's not needed to be set so far but I'm leaving it here so that this comment
|
||||
# has a purpose.
|
||||
#env['MSVS_VERSION']='9.0'
|
||||
env['MSVSBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
|
||||
env['MSVSREBUILDCOM'] = "scons platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes vsproj=true"
|
||||
env['MSVSCLEANCOM'] = "scons --clean platform=" + selected_platform + " target=" + env["target"] + " bits=" + env["bits"] + " tools=yes"
|
||||
|
||||
debug_variants = ['Debug|Win32']+['Debug|x64']
|
||||
release_variants = ['Release|Win32']+['Release|x64']
|
||||
release_debug_variants = ['Release_Debug|Win32']+['Release_Debug|x64']
|
||||
|
||||
# Calls a CMD with /C(lose) and /V(delayed environment variable expansion) options.
|
||||
# And runs vcvarsall bat for the propper arhitecture and scons for propper configuration
|
||||
env['MSVSBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! -j2'
|
||||
env['MSVSREBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) & call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j2'
|
||||
env['MSVSCLEANCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons --clean platform=windows target=$(Configuration) tools=!tools! -j2'
|
||||
|
||||
# This version information (Win32, x64, Debug, Release, Release_Debug seems to be
|
||||
# required for Visual Studio to understand that it needs to generate an NMAKE
|
||||
# project. Do not modify without knowing what you are doing.
|
||||
debug_variants = ['debug|Win32']+['debug|x64']
|
||||
release_variants = ['release|Win32']+['release|x64']
|
||||
release_debug_variants = ['release_debug|Win32']+['release_debug|x64']
|
||||
variants = debug_variants + release_variants + release_debug_variants
|
||||
debug_targets = ['Debug']+['Debug']
|
||||
release_targets = ['Release']+['Release']
|
||||
|
|
|
@ -1307,7 +1307,12 @@ DVector<uint8_t> _File::get_buffer(int p_length) const{
|
|||
|
||||
String _File::get_as_text() const {
|
||||
|
||||
ERR_FAIL_COND_V(!f, String());
|
||||
|
||||
String text;
|
||||
size_t original_pos = f->get_pos();
|
||||
f->seek(0);
|
||||
|
||||
String l = get_line();
|
||||
while(!eof_reached()) {
|
||||
text+=l+"\n";
|
||||
|
@ -1315,6 +1320,8 @@ String _File::get_as_text() const {
|
|||
}
|
||||
text+=l;
|
||||
|
||||
f->seek(original_pos);
|
||||
|
||||
return text;
|
||||
|
||||
|
||||
|
@ -1669,15 +1676,15 @@ void _Directory::_bind_methods() {
|
|||
ObjectTypeDB::bind_method(_MD("get_drive","idx"),&_Directory::get_drive);
|
||||
ObjectTypeDB::bind_method(_MD("change_dir:Error","todir"),&_Directory::change_dir);
|
||||
ObjectTypeDB::bind_method(_MD("get_current_dir"),&_Directory::get_current_dir);
|
||||
ObjectTypeDB::bind_method(_MD("make_dir:Error","name"),&_Directory::make_dir);
|
||||
ObjectTypeDB::bind_method(_MD("make_dir_recursive:Error","name"),&_Directory::make_dir_recursive);
|
||||
ObjectTypeDB::bind_method(_MD("file_exists","name"),&_Directory::file_exists);
|
||||
ObjectTypeDB::bind_method(_MD("dir_exists","name"),&_Directory::dir_exists);
|
||||
ObjectTypeDB::bind_method(_MD("make_dir:Error","path"),&_Directory::make_dir);
|
||||
ObjectTypeDB::bind_method(_MD("make_dir_recursive:Error","path"),&_Directory::make_dir_recursive);
|
||||
ObjectTypeDB::bind_method(_MD("file_exists","path"),&_Directory::file_exists);
|
||||
ObjectTypeDB::bind_method(_MD("dir_exists","path"),&_Directory::dir_exists);
|
||||
// ObjectTypeDB::bind_method(_MD("get_modified_time","file"),&_Directory::get_modified_time);
|
||||
ObjectTypeDB::bind_method(_MD("get_space_left"),&_Directory::get_space_left);
|
||||
ObjectTypeDB::bind_method(_MD("copy:Error","from","to"),&_Directory::copy);
|
||||
ObjectTypeDB::bind_method(_MD("rename:Error","from","to"),&_Directory::rename);
|
||||
ObjectTypeDB::bind_method(_MD("remove:Error","file"),&_Directory::remove);
|
||||
ObjectTypeDB::bind_method(_MD("remove:Error","path"),&_Directory::remove);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -110,6 +110,16 @@ bool Dictionary::has(const Variant& p_key) const {
|
|||
|
||||
return _p->variant_map.has(p_key);
|
||||
}
|
||||
|
||||
bool Dictionary::has_all(const Array& p_keys) const {
|
||||
for (int i=0;i<p_keys.size();i++) {
|
||||
if( !has(p_keys[i]) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Dictionary::erase(const Variant& p_key) {
|
||||
_copy_on_write();
|
||||
_p->variant_map.erase(p_key);
|
||||
|
|
|
@ -69,6 +69,8 @@ public:
|
|||
bool is_shared() const;
|
||||
|
||||
bool has(const Variant& p_key) const;
|
||||
bool has_all(const Array& p_keys) const;
|
||||
|
||||
void erase(const Variant& p_key);
|
||||
|
||||
bool operator==(const Dictionary& p_dictionary) const;
|
||||
|
|
|
@ -92,7 +92,7 @@ Error EventQueue::push_call(uint32_t p_instance_ID, const StringName& p_method,
|
|||
*v=p_arg5;
|
||||
}
|
||||
|
||||
if (buffer_max_used>buffer_end);
|
||||
if (buffer_end > buffer_max_used)
|
||||
buffer_max_used=buffer_end;
|
||||
|
||||
return OK;
|
||||
|
|
|
@ -474,7 +474,6 @@ static _GlobalConstant _global_constants[]={
|
|||
BIND_GLOBAL_CONSTANT( PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS ),
|
||||
|
||||
|
||||
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORAGE ),
|
||||
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_STORAGE ),
|
||||
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR ),
|
||||
BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NETWORK ),
|
||||
|
|
|
@ -901,6 +901,66 @@ static void _generate_po2_mipmap(const uint8_t* p_src, uint8_t* p_dst, uint32_t
|
|||
}
|
||||
|
||||
|
||||
void Image::shrink_x2() {
|
||||
|
||||
ERR_FAIL_COND(format==FORMAT_INDEXED || format==FORMAT_INDEXED_ALPHA);
|
||||
ERR_FAIL_COND( data.size()==0 );
|
||||
|
||||
|
||||
|
||||
if (mipmaps) {
|
||||
|
||||
//just use the lower mipmap as base and copy all
|
||||
DVector<uint8_t> new_img;
|
||||
|
||||
int ofs = get_mipmap_offset(1);
|
||||
|
||||
int new_size = data.size()-ofs;
|
||||
new_img.resize(new_size);
|
||||
|
||||
|
||||
{
|
||||
DVector<uint8_t>::Write w=new_img.write();
|
||||
DVector<uint8_t>::Read r=data.read();
|
||||
|
||||
copymem(w.ptr(),&r[ofs],new_size);
|
||||
}
|
||||
|
||||
mipmaps--;
|
||||
width/=2;
|
||||
height/=2;
|
||||
data=new_img;
|
||||
|
||||
} else {
|
||||
|
||||
DVector<uint8_t> new_img;
|
||||
|
||||
ERR_FAIL_COND( format>=FORMAT_INDEXED );
|
||||
int ps = get_format_pixel_size(format);
|
||||
new_img.resize((width/2)*(height/2)*ps);
|
||||
|
||||
{
|
||||
DVector<uint8_t>::Write w=new_img.write();
|
||||
DVector<uint8_t>::Read r=data.read();
|
||||
|
||||
switch(format) {
|
||||
|
||||
case FORMAT_GRAYSCALE:
|
||||
case FORMAT_INTENSITY: _generate_po2_mipmap<1>(r.ptr(), w.ptr(), width,height); break;
|
||||
case FORMAT_GRAYSCALE_ALPHA: _generate_po2_mipmap<2>(r.ptr(), w.ptr(), width,height); break;
|
||||
case FORMAT_RGB: _generate_po2_mipmap<3>(r.ptr(), w.ptr(), width,height); break;
|
||||
case FORMAT_RGBA: _generate_po2_mipmap<4>(r.ptr(), w.ptr(), width,height); break;
|
||||
default: {}
|
||||
}
|
||||
}
|
||||
|
||||
width/=2;
|
||||
height/=2;
|
||||
data=new_img;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Error Image::generate_mipmaps(int p_mipmaps,bool p_keep_existing) {
|
||||
|
||||
if (!_can_modify(format)) {
|
||||
|
@ -1637,8 +1697,17 @@ Error Image::_decompress_bc() {
|
|||
|
||||
print_line("decompressing bc");
|
||||
|
||||
int wd=width,ht=height;
|
||||
if (wd%4!=0) {
|
||||
wd+=4-(wd%4);
|
||||
}
|
||||
if (ht%4!=0) {
|
||||
ht+=4-(ht%4);
|
||||
}
|
||||
|
||||
|
||||
int mm;
|
||||
int size = _get_dst_image_size(width,height,FORMAT_RGBA,mm,mipmaps);
|
||||
int size = _get_dst_image_size(wd,ht,FORMAT_RGBA,mm,mipmaps);
|
||||
|
||||
DVector<uint8_t> newdata;
|
||||
newdata.resize(size);
|
||||
|
@ -1648,7 +1717,8 @@ Error Image::_decompress_bc() {
|
|||
|
||||
int rofs=0;
|
||||
int wofs=0;
|
||||
int wd=width,ht=height;
|
||||
|
||||
//print_line("width: "+itos(wd)+" height: "+itos(ht));
|
||||
|
||||
for(int i=0;i<=mm;i++) {
|
||||
|
||||
|
@ -1953,6 +2023,11 @@ Error Image::_decompress_bc() {
|
|||
|
||||
data=newdata;
|
||||
format=FORMAT_RGBA;
|
||||
if (wd!=width || ht!=height) {
|
||||
//todo, crop
|
||||
width=wd;
|
||||
height=ht;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
@ -248,6 +248,7 @@ public:
|
|||
void resize_to_po2(bool p_square=false);
|
||||
void resize( int p_width, int p_height, Interpolation p_interpolation=INTERPOLATE_BILINEAR );
|
||||
Image resized( int p_width, int p_height, int p_interpolation=INTERPOLATE_BILINEAR );
|
||||
void shrink_x2();
|
||||
/**
|
||||
* Crop the image to a specific size, if larger, then the image is filled by black
|
||||
*/
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
/*************************************************************************/
|
||||
#include "input_map.h"
|
||||
#include "globals.h"
|
||||
#include "os/keyboard.h"
|
||||
|
||||
InputMap *InputMap::singleton=NULL;
|
||||
|
||||
|
@ -36,6 +37,7 @@ void InputMap::_bind_methods() {
|
|||
ObjectTypeDB::bind_method(_MD("has_action","action"),&InputMap::has_action);
|
||||
ObjectTypeDB::bind_method(_MD("get_action_id","action"),&InputMap::get_action_id);
|
||||
ObjectTypeDB::bind_method(_MD("get_action_from_id","id"),&InputMap::get_action_from_id);
|
||||
ObjectTypeDB::bind_method(_MD("get_actions"),&InputMap::_get_actions);
|
||||
ObjectTypeDB::bind_method(_MD("add_action","action"),&InputMap::add_action);
|
||||
ObjectTypeDB::bind_method(_MD("erase_action","action"),&InputMap::erase_action);
|
||||
|
||||
|
@ -75,6 +77,35 @@ StringName InputMap::get_action_from_id(int p_id) const {
|
|||
return input_id_map[p_id];
|
||||
}
|
||||
|
||||
Array InputMap::_get_actions() {
|
||||
|
||||
Array ret;
|
||||
List<StringName> actions = get_actions();
|
||||
if(actions.empty())
|
||||
return ret;
|
||||
|
||||
for(const List<StringName>::Element *E=actions.front();E;E=E->next()) {
|
||||
|
||||
ret.push_back(E->get());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
List<StringName> InputMap::get_actions() const {
|
||||
|
||||
List<StringName> actions = List<StringName>();
|
||||
if(input_map.empty()){
|
||||
return actions;
|
||||
}
|
||||
|
||||
for (Map<StringName, Action>::Element *E=input_map.front();E;E=E->next()) {
|
||||
actions.push_back(E->key());
|
||||
}
|
||||
|
||||
return actions;
|
||||
}
|
||||
|
||||
List<InputEvent>::Element *InputMap::_find_event(List<InputEvent> &p_list,const InputEvent& p_event) const {
|
||||
|
||||
for (List<InputEvent>::Element *E=p_list.front();E;E=E->next()) {
|
||||
|
@ -106,7 +137,7 @@ List<InputEvent>::Element *InputMap::_find_event(List<InputEvent> &p_list,const
|
|||
} break;
|
||||
case InputEvent::JOYSTICK_MOTION: {
|
||||
|
||||
same=(e.joy_motion.axis==p_event.joy_motion.axis);
|
||||
same=(e.joy_motion.axis==p_event.joy_motion.axis && (e.joy_motion.axis_value < 0) == (p_event.joy_motion.axis_value < 0));
|
||||
|
||||
} break;
|
||||
}
|
||||
|
@ -156,10 +187,7 @@ void InputMap::action_erase_event(const StringName& p_action,const InputEvent& p
|
|||
|
||||
List<InputEvent>::Element *E=_find_event(input_map[p_action].inputs,p_event);
|
||||
if (E)
|
||||
return; //already gots
|
||||
|
||||
input_map[p_action].inputs.erase(E);
|
||||
|
||||
input_map[p_action].inputs.erase(E);
|
||||
}
|
||||
|
||||
|
||||
|
@ -292,6 +320,67 @@ void InputMap::load_from_globals() {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InputMap::load_default() {
|
||||
|
||||
InputEvent key;
|
||||
key.type=InputEvent::KEY;
|
||||
|
||||
add_action("ui_accept");
|
||||
key.key.scancode=KEY_RETURN;
|
||||
action_add_event("ui_accept",key);
|
||||
key.key.scancode=KEY_ENTER;
|
||||
action_add_event("ui_accept",key);
|
||||
key.key.scancode=KEY_SPACE;
|
||||
action_add_event("ui_accept",key);
|
||||
|
||||
add_action("ui_select");
|
||||
key.key.scancode=KEY_SPACE;
|
||||
action_add_event("ui_select",key);
|
||||
|
||||
add_action("ui_cancel");
|
||||
key.key.scancode=KEY_ESCAPE;
|
||||
action_add_event("ui_cancel",key);
|
||||
|
||||
add_action("ui_focus_next");
|
||||
key.key.scancode=KEY_TAB;
|
||||
action_add_event("ui_focus_next",key);
|
||||
|
||||
add_action("ui_focus_prev");
|
||||
key.key.scancode=KEY_TAB;
|
||||
key.key.mod.shift=true;
|
||||
action_add_event("ui_focus_prev",key);
|
||||
key.key.mod.shift=false;
|
||||
|
||||
add_action("ui_left");
|
||||
key.key.scancode=KEY_LEFT;
|
||||
action_add_event("ui_left",key);
|
||||
|
||||
add_action("ui_right");
|
||||
key.key.scancode=KEY_RIGHT;
|
||||
action_add_event("ui_right",key);
|
||||
|
||||
add_action("ui_up");
|
||||
key.key.scancode=KEY_UP;
|
||||
action_add_event("ui_up",key);
|
||||
|
||||
add_action("ui_down");
|
||||
key.key.scancode=KEY_DOWN;
|
||||
action_add_event("ui_down",key);
|
||||
|
||||
|
||||
add_action("ui_page_up");
|
||||
key.key.scancode=KEY_PAGEUP;
|
||||
action_add_event("ui_page_up",key);
|
||||
|
||||
add_action("ui_page_down");
|
||||
key.key.scancode=KEY_PAGEDOWN;
|
||||
action_add_event("ui_page_down",key);
|
||||
|
||||
// set("display/orientation", "landscape");
|
||||
|
||||
|
||||
}
|
||||
|
||||
InputMap::InputMap() {
|
||||
|
|
|
@ -47,6 +47,7 @@ class InputMap : public Object {
|
|||
List<InputEvent>::Element *_find_event(List<InputEvent> &p_list,const InputEvent& p_event) const;
|
||||
|
||||
Array _get_action_list(const StringName& p_action);
|
||||
Array _get_actions();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -59,6 +60,7 @@ public:
|
|||
bool has_action(const StringName& p_action) const;
|
||||
int get_action_id(const StringName& p_action) const;
|
||||
StringName get_action_from_id(int p_id) const;
|
||||
List<StringName> get_actions() const;
|
||||
void add_action(const StringName& p_action);
|
||||
void erase_action(const StringName& p_action);
|
||||
|
||||
|
@ -72,6 +74,7 @@ public:
|
|||
|
||||
|
||||
void load_from_globals();
|
||||
void load_default();
|
||||
|
||||
InputMap();
|
||||
};
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
This is version 2007-Mar-4 of the Info-ZIP license.
|
||||
The definitive version of this document should be available at
|
||||
ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and
|
||||
a copy at http://www.info-zip.org/pub/infozip/license.html.
|
||||
|
||||
|
||||
Copyright (c) 1990-2007 Info-ZIP. All rights reserved.
|
||||
|
||||
For the purposes of this copyright and license, "Info-ZIP" is defined as
|
||||
the following set of individuals:
|
||||
|
||||
Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois,
|
||||
Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth,
|
||||
Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz,
|
||||
David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko,
|
||||
Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs,
|
||||
Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda,
|
||||
Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren,
|
||||
Rich Wales, Mike White.
|
||||
|
||||
This software is provided "as is," without warranty of any kind, express
|
||||
or implied. In no event shall Info-ZIP or its contributors be held liable
|
||||
for any direct, indirect, incidental, special or consequential damages
|
||||
arising out of the use of or inability to use this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the above disclaimer and the following restrictions:
|
||||
|
||||
1. Redistributions of source code (in whole or in part) must retain
|
||||
the above copyright notice, definition, disclaimer, and this list
|
||||
of conditions.
|
||||
|
||||
2. Redistributions in binary form (compiled executables and libraries)
|
||||
must reproduce the above copyright notice, definition, disclaimer,
|
||||
and this list of conditions in documentation and/or other materials
|
||||
provided with the distribution. The sole exception to this condition
|
||||
is redistribution of a standard UnZipSFX binary (including SFXWiz) as
|
||||
part of a self-extracting archive; that is permitted without inclusion
|
||||
of this license, as long as the normal SFX banner has not been removed
|
||||
from the binary or disabled.
|
||||
|
||||
3. Altered versions--including, but not limited to, ports to new operating
|
||||
systems, existing ports with new graphical interfaces, versions with
|
||||
modified or added functionality, and dynamic, shared, or static library
|
||||
versions not from Info-ZIP--must be plainly marked as such and must not
|
||||
be misrepresented as being the original source or, if binaries,
|
||||
compiled from the original source. Such altered versions also must not
|
||||
be misrepresented as being Info-ZIP releases--including, but not
|
||||
limited to, labeling of the altered versions with the names "Info-ZIP"
|
||||
(or any variation thereof, including, but not limited to, different
|
||||
capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the
|
||||
explicit permission of Info-ZIP. Such altered versions are further
|
||||
prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP
|
||||
e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP
|
||||
will provide support for the altered versions.
|
||||
|
||||
4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip,"
|
||||
"UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its
|
||||
own source and binary releases.
|
|
@ -0,0 +1,32 @@
|
|||
Credits
|
||||
|
||||
Gilles Vollant - Original MiniZip author
|
||||
Even Rouault - ZIP64 unzip Support
|
||||
Daniel Borca - BZip Compression method support in unzip
|
||||
Mathias Svensson - ZIP64 zip support
|
||||
Mathias Svensson - BZip Compression method support in zip
|
||||
|
||||
This version has been modified for Godot Engine
|
||||
|
||||
|
||||
License
|
||||
----------------------------------------------------------------------------
|
||||
Condition of use and distribution are the same than zlib :
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
----------------------------------------------------------------------------
|
|
@ -207,7 +207,7 @@ Error ConfigFile::load(const String& p_path) {
|
|||
void ConfigFile::_bind_methods(){
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("set_value","section","key","value"),&ConfigFile::set_value);
|
||||
ObjectTypeDB::bind_method(_MD("get_value","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
|
||||
ObjectTypeDB::bind_method(_MD("get_value:Variant","section","key","default"),&ConfigFile::get_value,DEFVAL(Variant()));
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("has_section","section"),&ConfigFile::has_section);
|
||||
ObjectTypeDB::bind_method(_MD("has_section_key","section","key"),&ConfigFile::has_section_key);
|
||||
|
|
|
@ -81,6 +81,7 @@ void HTTPClient::set_connection(const Ref<StreamPeer>& p_connection){
|
|||
|
||||
close();
|
||||
connection=p_connection;
|
||||
status=STATUS_CONNECTED;
|
||||
|
||||
}
|
||||
|
||||
|
@ -301,6 +302,7 @@ Error HTTPClient::poll(){
|
|||
chunked=false;
|
||||
body_left=0;
|
||||
chunk_left=0;
|
||||
response_str.clear();
|
||||
response_headers.clear();
|
||||
response_num = RESPONSE_OK;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class HTTPClient : public Reference {
|
|||
OBJ_TYPE(HTTPClient,Reference);
|
||||
public:
|
||||
|
||||
enum RespondeCode {
|
||||
enum ResponseCode {
|
||||
|
||||
// 1xx informational
|
||||
RESPONSE_CONTINUE = 100,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
Modifications for Zip64 support
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
Modifications for Zip64 support
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
Changes
|
||||
|
||||
|
|
|
@ -438,8 +438,9 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int *
|
|||
case InputEvent::JOYSTICK_MOTION: {
|
||||
|
||||
ie.joy_motion.axis=decode_uint32(&buf[12]);
|
||||
ie.joy_motion.axis_value=decode_float(&buf[16]);
|
||||
if (r_len)
|
||||
(*r_len)+=4;
|
||||
(*r_len)+=8;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
@ -1154,8 +1155,9 @@ Error encode_variant(const Variant& p_variant, uint8_t *r_buffer, int &r_len) {
|
|||
|
||||
int axis = ie.joy_motion.axis;
|
||||
encode_uint32(axis,&buf[llen]);
|
||||
encode_float(ie.joy_motion.axis_value, &buf[llen+4]);
|
||||
}
|
||||
llen+=4;
|
||||
llen+=8;
|
||||
} break;
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ Error PacketPeer::_get_packet_error() const {
|
|||
|
||||
void PacketPeer::_bind_methods() {
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("get_var"),&PacketPeer::_bnd_get_var);
|
||||
ObjectTypeDB::bind_method(_MD("get_var:Variant"),&PacketPeer::_bnd_get_var);
|
||||
ObjectTypeDB::bind_method(_MD("put_var", "var:Variant"),&PacketPeer::put_var);
|
||||
ObjectTypeDB::bind_method(_MD("get_packet"),&PacketPeer::_get_packet);
|
||||
ObjectTypeDB::bind_method(_MD("put_packet:Error", "buffer"),&PacketPeer::_put_packet);
|
||||
|
|
|
@ -318,7 +318,11 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
|
|||
if (OS::get_singleton()->is_stdout_verbose())
|
||||
print_line("load resource: "+local_path+" (cached)");
|
||||
|
||||
return RES( ResourceCache::get(local_path ) );
|
||||
Ref<Resource> res_cached = ResourceCache::get(local_path);
|
||||
Ref<ResourceInteractiveLoaderDefault> ril = Ref<ResourceInteractiveLoaderDefault>(memnew(ResourceInteractiveLoaderDefault));
|
||||
|
||||
ril->resource = res_cached;
|
||||
return ril;
|
||||
}
|
||||
|
||||
if (OS::get_singleton()->is_stdout_verbose())
|
||||
|
|
|
@ -357,7 +357,6 @@ String StreamPeer::get_string(int p_bytes){
|
|||
String StreamPeer::get_utf8_string(int p_bytes){
|
||||
|
||||
ERR_FAIL_COND_V(p_bytes<0,String());
|
||||
ERR_FAIL_COND_V(p_bytes<0,String());
|
||||
|
||||
Vector<uint8_t> buf;
|
||||
buf.resize(p_bytes);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
Modifications for Zip64 support on both zip and unzip
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
Modifications for Zip64 support on both zip and unzip
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Modifications for Zip64 support
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
Changes
|
||||
Oct-2009 - Mathias Svensson - Remove old C style function prototypes
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
Modifications for Zip64 support
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
For more info read LICENSE-MiniZip.txt
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -39,11 +39,14 @@ static void* zipio_open(void* data, const char* p_fname, int mode) {
|
|||
|
||||
FileAccess *&f = *(FileAccess**)data;
|
||||
|
||||
String fname;
|
||||
fname.parse_utf8(p_fname);
|
||||
|
||||
if (mode & ZLIB_FILEFUNC_MODE_WRITE) {
|
||||
f = FileAccess::open(p_fname,FileAccess::WRITE);
|
||||
f = FileAccess::open(fname,FileAccess::WRITE);
|
||||
} else {
|
||||
|
||||
f = FileAccess::open(p_fname,FileAccess::READ);
|
||||
f = FileAccess::open(fname,FileAccess::READ);
|
||||
}
|
||||
|
||||
if (!f)
|
||||
|
|
|
@ -135,18 +135,20 @@ double Math::rad2deg(double p_y) {
|
|||
|
||||
double Math::round(double p_val) {
|
||||
|
||||
if (p_val>0) {
|
||||
if (p_val>=0) {
|
||||
return ::floor(p_val+0.5);
|
||||
} else {
|
||||
p_val=-p_val;
|
||||
return -::floor(p_val+0.5);
|
||||
}
|
||||
}
|
||||
|
||||
double Math::asin(double p_x) {
|
||||
|
||||
return ::asin(p_x);
|
||||
|
||||
}
|
||||
|
||||
double Math::acos(double p_x) {
|
||||
|
||||
return ::acos(p_x);
|
||||
|
|
|
@ -320,7 +320,7 @@ void MessageQueue::_call_function(Object* p_target, const StringName& p_func, co
|
|||
void MessageQueue::flush() {
|
||||
|
||||
|
||||
if (buffer_max_used<buffer_end); {
|
||||
if (buffer_end > buffer_max_used) {
|
||||
buffer_max_used=buffer_end;
|
||||
//statistics();
|
||||
}
|
||||
|
|
|
@ -284,7 +284,7 @@ Vector<String> FileAccess::get_csv_line(String delim) const {
|
|||
String l;
|
||||
int qc=0;
|
||||
do {
|
||||
l+=get_line();
|
||||
l+=get_line()+"\n";
|
||||
qc=0;
|
||||
for(int i=0;i<l.length();i++) {
|
||||
|
||||
|
@ -295,6 +295,8 @@ Vector<String> FileAccess::get_csv_line(String delim) const {
|
|||
|
||||
} while (qc%2);
|
||||
|
||||
l=l.substr(0, l.length()-1);
|
||||
|
||||
Vector<String> strings;
|
||||
|
||||
bool in_quote=false;
|
||||
|
|
|
@ -199,3 +199,62 @@ uint32_t InputEventKey::get_scancode_with_modifiers() const {
|
|||
return sc;
|
||||
|
||||
}
|
||||
|
||||
InputEvent InputEvent::xform_by(const Matrix32& p_xform) const {
|
||||
|
||||
|
||||
InputEvent ev=*this;
|
||||
|
||||
switch(ev.type) {
|
||||
|
||||
case InputEvent::MOUSE_BUTTON: {
|
||||
|
||||
Vector2 g = p_xform.xform(Vector2(ev.mouse_button.global_x,ev.mouse_button.global_y));
|
||||
Vector2 l = p_xform.xform(Vector2(ev.mouse_button.x,ev.mouse_button.y));
|
||||
ev.mouse_button.x=l.x;
|
||||
ev.mouse_button.y=l.y;
|
||||
ev.mouse_button.global_x=g.x;
|
||||
ev.mouse_button.global_y=g.y;
|
||||
|
||||
} break;
|
||||
case InputEvent::MOUSE_MOTION: {
|
||||
|
||||
Vector2 g = p_xform.xform(Vector2(ev.mouse_motion.global_x,ev.mouse_motion.global_y));
|
||||
Vector2 l = p_xform.xform(Vector2(ev.mouse_motion.x,ev.mouse_motion.y));
|
||||
Vector2 r = p_xform.basis_xform(Vector2(ev.mouse_motion.relative_x,ev.mouse_motion.relative_y));
|
||||
Vector2 s = p_xform.basis_xform(Vector2(ev.mouse_motion.speed_x,ev.mouse_motion.speed_y));
|
||||
ev.mouse_motion.x=l.x;
|
||||
ev.mouse_motion.y=l.y;
|
||||
ev.mouse_motion.global_x=g.x;
|
||||
ev.mouse_motion.global_y=g.y;
|
||||
ev.mouse_motion.relative_x=r.x;
|
||||
ev.mouse_motion.relative_y=r.y;
|
||||
ev.mouse_motion.speed_x=s.x;
|
||||
ev.mouse_motion.speed_y=s.y;
|
||||
|
||||
} break;
|
||||
case InputEvent::SCREEN_TOUCH: {
|
||||
|
||||
|
||||
Vector2 t = p_xform.xform(Vector2(ev.screen_touch.x,ev.screen_touch.y));
|
||||
ev.screen_touch.x=t.x;
|
||||
ev.screen_touch.y=t.y;
|
||||
|
||||
} break;
|
||||
case InputEvent::SCREEN_DRAG: {
|
||||
|
||||
|
||||
Vector2 t = p_xform.xform(Vector2(ev.screen_drag.x,ev.screen_drag.y));
|
||||
Vector2 r = p_xform.basis_xform(Vector2(ev.screen_drag.relative_x,ev.screen_drag.relative_y));
|
||||
Vector2 s = p_xform.basis_xform(Vector2(ev.screen_drag.speed_x,ev.screen_drag.speed_y));
|
||||
ev.screen_drag.x=t.x;
|
||||
ev.screen_drag.y=t.y;
|
||||
ev.screen_drag.relative_x=r.x;
|
||||
ev.screen_drag.relative_y=r.y;
|
||||
ev.screen_drag.speed_x=s.x;
|
||||
ev.screen_drag.speed_y=s.y;
|
||||
} break;
|
||||
}
|
||||
|
||||
return ev;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "typedefs.h"
|
||||
#include "os/copymem.h"
|
||||
#include "ustring.h"
|
||||
|
||||
#include "math_2d.h"
|
||||
/**
|
||||
@author Juan Linietsky <reduzio@gmail.com>
|
||||
*/
|
||||
|
@ -297,6 +297,8 @@ struct InputEvent {
|
|||
bool is_echo() const;
|
||||
void set_as_action(const String& p_action, bool p_pressed);
|
||||
|
||||
|
||||
InputEvent xform_by(const Matrix32& p_xform) const;
|
||||
bool operator==(const InputEvent &p_event) const;
|
||||
operator String() const;
|
||||
InputEvent() { zeromem(this,sizeof(InputEvent)); }
|
||||
|
|
|
@ -211,7 +211,7 @@ void * operator new(size_t p_size,void *p_pointer,size_t check, const char *p_de
|
|||
|
||||
#ifdef DEBUG_MEMORY_ENABLED
|
||||
|
||||
#define memalloc(m_size) Memory::alloc_static(m_size, __FILE__":"__STR(__LINE__)", memalloc.")
|
||||
#define memalloc(m_size) Memory::alloc_static(m_size, __FILE__ ":" __STR(__LINE__) ", memalloc.")
|
||||
#define memrealloc(m_mem,m_size) Memory::realloc_static(m_mem,m_size)
|
||||
#define memfree(m_size) Memory::free_static(m_size)
|
||||
|
||||
|
@ -224,8 +224,7 @@ void * operator new(size_t p_size,void *p_pointer,size_t check, const char *p_de
|
|||
#endif
|
||||
|
||||
#ifdef DEBUG_MEMORY_ENABLED
|
||||
|
||||
#define dynalloc(m_size) Memory::alloc_dynamic(m_size, __FILE__":"__STR(__LINE__)", type: DYNAMIC")
|
||||
#define dynalloc(m_size) Memory::alloc_dynamic(m_size, __FILE__ ":" __STR(__LINE__) ", type: DYNAMIC")
|
||||
#define dynrealloc(m_mem,m_size) m_mem.resize(m_size)
|
||||
|
||||
#else
|
||||
|
@ -248,7 +247,7 @@ _ALWAYS_INLINE_ T *_post_initialize(T *p_obj) {
|
|||
|
||||
#ifdef DEBUG_MEMORY_ENABLED
|
||||
|
||||
#define memnew(m_class) _post_initialize(new(__FILE__":"__STR(__LINE__)", memnew type: "__STR(m_class)) m_class)
|
||||
#define memnew(m_class) _post_initialize(new(__FILE__ ":" __STR(__LINE__) ", memnew type: " __STR(m_class)) m_class)
|
||||
|
||||
#else
|
||||
|
||||
|
@ -291,7 +290,7 @@ void memdelete_allocator(T *p_class) {
|
|||
#define memdelete_notnull(m_v) { if (m_v) memdelete(m_v); }
|
||||
#ifdef DEBUG_MEMORY_ENABLED
|
||||
|
||||
#define memnew_arr( m_class, m_count ) memnew_arr_template<m_class>(m_count,__FILE__":"__STR(__LINE__)", memnew_arr type: "_STR(m_class))
|
||||
#define memnew_arr( m_class, m_count ) memnew_arr_template<m_class>(m_count,__FILE__ ":" __STR(__LINE__) ", memnew_arr type: " _STR(m_class))
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -306,6 +306,15 @@ String OS::get_system_dir(SystemDir p_dir) const {
|
|||
return ".";
|
||||
}
|
||||
|
||||
String OS::get_safe_application_name() const {
|
||||
String an = Globals::get_singleton()->get("application/name");
|
||||
Vector<String> invalid_char = String("\\ / : * ? \" < > |").split(" ");
|
||||
for (int i=0;i<invalid_char.size();i++) {
|
||||
an = an.replace(invalid_char[i],"-");
|
||||
}
|
||||
return an;
|
||||
}
|
||||
|
||||
String OS::get_data_dir() const {
|
||||
|
||||
return ".";
|
||||
|
|
|
@ -319,6 +319,7 @@ public:
|
|||
|
||||
virtual String get_locale() const;
|
||||
|
||||
String get_safe_application_name() const;
|
||||
virtual String get_data_dir() const;
|
||||
virtual String get_resource_dir() const;
|
||||
|
||||
|
|
|
@ -41,7 +41,11 @@
|
|||
#define _MKSTR(m_x) _STR(m_x)
|
||||
#endif
|
||||
// have to include version.h for this to work, include it in the .cpp not the .h
|
||||
#ifdef VERSION_PATCH
|
||||
#define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_PATCH)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION)
|
||||
#else
|
||||
#define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION)
|
||||
#endif // VERSION_PATCH
|
||||
#define VERSION_FULL_NAME _MKSTR(VERSION_NAME)" v" VERSION_MKSTRING
|
||||
|
||||
|
||||
|
@ -154,6 +158,23 @@ inline void __swap_tmpl(T &x, T &y ) {
|
|||
((m_hex>='A' && m_hex<='F')?(10+m_hex-'A'):\
|
||||
((m_hex>='a' && m_hex<='f')?(10+m_hex-'a'):0)))
|
||||
|
||||
// Macro to check whether we are compiled by clang
|
||||
// and we have a specific builtin
|
||||
#if defined(__llvm__) && defined(__has_builtin)
|
||||
#define _llvm_has_builtin(x) __has_builtin(x)
|
||||
#else
|
||||
#define _llvm_has_builtin(x) 0
|
||||
#endif
|
||||
|
||||
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || _llvm_has_builtin(__builtin_mul_overflow)
|
||||
# define _mul_overflow __builtin_mul_overflow
|
||||
#endif
|
||||
|
||||
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || _llvm_has_builtin(__builtin_add_overflow)
|
||||
# define _add_overflow __builtin_add_overflow
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -167,6 +188,19 @@ static _FORCE_INLINE_ unsigned int nearest_power_of_2(unsigned int x) {
|
|||
x |= x >> 4;
|
||||
x |= x >> 8;
|
||||
x |= x >> 16;
|
||||
|
||||
return ++x;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
static _FORCE_INLINE_ T nearest_power_of_2_templated(T x) {
|
||||
|
||||
--x;
|
||||
// If the compiler is smart, it unrolls this loop
|
||||
// If its dumb, this is a bit slow.
|
||||
for (size_t i = 0; i < sizeof(T); i++)
|
||||
x |= x >> (1 << i);
|
||||
|
||||
return ++x;
|
||||
}
|
||||
|
||||
|
|
|
@ -256,13 +256,10 @@ bool String::operator==(const StrRange &p_range) const {
|
|||
return true;
|
||||
|
||||
const CharType *c_str=p_range.c_str;
|
||||
|
||||
int l=length();
|
||||
|
||||
const CharType *dst = p_range.c_str;
|
||||
const CharType *dst = &operator[](0);
|
||||
|
||||
/* Compare char by char */
|
||||
for (int i=0;i<l;i++) {
|
||||
for (int i=0;i<len;i++) {
|
||||
|
||||
if (c_str[i]!=dst[i])
|
||||
return false;
|
||||
|
@ -2867,25 +2864,29 @@ CharType String::ord_at(int p_idx) const {
|
|||
return operator[](p_idx);
|
||||
}
|
||||
|
||||
String String::strip_edges() const {
|
||||
String String::strip_edges(bool left, bool right) const {
|
||||
|
||||
int len=length();
|
||||
int beg=0,end=len;
|
||||
|
||||
for (int i=0;i<length();i++) {
|
||||
if(left) {
|
||||
for (int i=0;i<len;i++) {
|
||||
|
||||
if (operator[](i)<=32)
|
||||
beg++;
|
||||
else
|
||||
break;
|
||||
if (operator[](i)<=32)
|
||||
beg++;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=(int)(length()-1);i>=0;i--) {
|
||||
if(right) {
|
||||
for (int i=(int)(len-1);i>=0;i--) {
|
||||
|
||||
if (operator[](i)<=32)
|
||||
end--;
|
||||
else
|
||||
break;
|
||||
if (operator[](i)<=32)
|
||||
end--;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (beg==0 && end==len)
|
||||
|
@ -3629,13 +3630,14 @@ String String::percent_decode() const {
|
|||
|
||||
CharString pe;
|
||||
|
||||
for(int i=0;i<length();i++) {
|
||||
CharString cs = utf8();
|
||||
for(int i=0;i<cs.length();i++) {
|
||||
|
||||
uint8_t c=operator[](i);
|
||||
uint8_t c = cs[i];
|
||||
if (c=='%' && i<length()-2) {
|
||||
|
||||
uint8_t a = LOWERCASE(operator[](i+1));
|
||||
uint8_t b = LOWERCASE(operator[](i+2));
|
||||
uint8_t a = LOWERCASE(cs[i+1]);
|
||||
uint8_t b = LOWERCASE(cs[i+2]);
|
||||
|
||||
c=0;
|
||||
if (a>='0' && a<='9')
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
|
||||
String left(int p_pos) const;
|
||||
String right(int p_pos) const;
|
||||
String strip_edges() const;
|
||||
String strip_edges(bool left = true, bool right = true) const;
|
||||
String strip_escapes() const;
|
||||
String extension() const;
|
||||
String basename() const;
|
||||
|
|
|
@ -1115,6 +1115,21 @@ void Variant::reference(const Variant& p_variant) {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
void Variant::zero() {
|
||||
switch(type) {
|
||||
case NIL: break;
|
||||
case BOOL: this->_data._bool = false; break;
|
||||
case INT: this->_data._int = 0; break;
|
||||
case REAL: this->_data._real = 0; break;
|
||||
case VECTOR2: *reinterpret_cast<Vector2*>(this->_data._mem) = Vector2(); break;
|
||||
case RECT2: *reinterpret_cast<Rect2*>(this->_data._mem) = Rect2(); break;
|
||||
case VECTOR3: *reinterpret_cast<Vector3*>(this->_data._mem) = Vector3(); break;
|
||||
case PLANE: *reinterpret_cast<Plane*>(this->_data._mem) = Plane(); break;
|
||||
case QUAT: *reinterpret_cast<Quat*>(this->_data._mem) = Quat(); break;
|
||||
case COLOR: *reinterpret_cast<Color*>(this->_data._mem) = Color(); break;
|
||||
default: this->clear(); break;
|
||||
}
|
||||
}
|
||||
void Variant::clear() {
|
||||
|
||||
|
@ -1541,63 +1556,81 @@ Variant::operator String() const {
|
|||
|
||||
return str;
|
||||
} break;
|
||||
case VECTOR3_ARRAY: {
|
||||
case VECTOR2_ARRAY: {
|
||||
|
||||
DVector<Vector3> vec = operator DVector<Vector3>();
|
||||
String str;
|
||||
DVector<Vector2> vec = operator DVector<Vector2>();
|
||||
String str("[");
|
||||
for(int i=0;i<vec.size();i++) {
|
||||
|
||||
if (i>0)
|
||||
str+=", ";
|
||||
str=str+Variant( vec[i] );
|
||||
}
|
||||
str += "]";
|
||||
return str;
|
||||
} break;
|
||||
case VECTOR3_ARRAY: {
|
||||
|
||||
DVector<Vector3> vec = operator DVector<Vector3>();
|
||||
String str("[");
|
||||
for(int i=0;i<vec.size();i++) {
|
||||
|
||||
if (i>0)
|
||||
str+=", ";
|
||||
str=str+Variant( vec[i] );
|
||||
}
|
||||
str += "]";
|
||||
return str;
|
||||
} break;
|
||||
case STRING_ARRAY: {
|
||||
|
||||
DVector<String> vec = operator DVector<String>();
|
||||
String str;
|
||||
String str("[");
|
||||
for(int i=0;i<vec.size();i++) {
|
||||
|
||||
if (i>0)
|
||||
str+=", ";
|
||||
str=str+vec[i];
|
||||
}
|
||||
str += "]";
|
||||
return str;
|
||||
} break;
|
||||
case INT_ARRAY: {
|
||||
|
||||
DVector<int> vec = operator DVector<int>();
|
||||
String str;
|
||||
String str("[");
|
||||
for(int i=0;i<vec.size();i++) {
|
||||
|
||||
if (i>0)
|
||||
str+=", ";
|
||||
str=str+itos(vec[i]);
|
||||
}
|
||||
str += "]";
|
||||
return str;
|
||||
} break;
|
||||
case REAL_ARRAY: {
|
||||
|
||||
DVector<real_t> vec = operator DVector<real_t>();
|
||||
String str;
|
||||
String str("[");
|
||||
for(int i=0;i<vec.size();i++) {
|
||||
|
||||
if (i>0)
|
||||
str+=", ";
|
||||
str=str+rtos(vec[i]);
|
||||
}
|
||||
str += "]";
|
||||
return str;
|
||||
} break;
|
||||
case ARRAY: {
|
||||
|
||||
Array arr = operator Array();
|
||||
String str;
|
||||
String str("[");
|
||||
for (int i=0; i<arr.size(); i++) {
|
||||
if (i)
|
||||
str+=", ";
|
||||
str += String(arr[i]);
|
||||
};
|
||||
str += "]";
|
||||
return str;
|
||||
|
||||
} break;
|
||||
|
@ -3002,9 +3035,9 @@ String Variant::get_call_error_text(Object* p_base, const StringName& p_method,c
|
|||
int errorarg=ce.argument;
|
||||
err_text="Cannot convert argument "+itos(errorarg+1)+" from "+Variant::get_type_name(p_argptrs[errorarg]->get_type())+" to "+Variant::get_type_name(ce.expected)+".";
|
||||
} else if (ce.error==Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
|
||||
err_text="Expected "+itos(ce.argument)+" arguments.";
|
||||
err_text="Method expected "+itos(ce.argument)+" arguments, but called with "+itos(p_argcount)+".";
|
||||
} else if (ce.error==Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
|
||||
err_text="Expected "+itos(ce.argument)+" arguments.";
|
||||
err_text="Method expected "+itos(ce.argument)+" arguments, but called with "+itos(p_argcount)+".";
|
||||
} else if (ce.error==Variant::CallError::CALL_ERROR_INVALID_METHOD) {
|
||||
err_text="Method not found.";
|
||||
} else if (ce.error==Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL) {
|
||||
|
|
|
@ -372,6 +372,8 @@ public:
|
|||
return res;
|
||||
}
|
||||
|
||||
void zero();
|
||||
static void blend(const Variant& a, const Variant& b, float c,Variant &r_dst);
|
||||
static void interpolate(const Variant& a, const Variant& b, float c,Variant &r_dst);
|
||||
|
||||
struct CallError {
|
||||
|
|
|
@ -256,7 +256,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
|
|||
VCALL_LOCALMEM0R(String,to_lower);
|
||||
VCALL_LOCALMEM1R(String,left);
|
||||
VCALL_LOCALMEM1R(String,right);
|
||||
VCALL_LOCALMEM0R(String,strip_edges);
|
||||
VCALL_LOCALMEM2R(String,strip_edges);
|
||||
VCALL_LOCALMEM0R(String,extension);
|
||||
VCALL_LOCALMEM0R(String,basename);
|
||||
VCALL_LOCALMEM1R(String,plus_file);
|
||||
|
@ -440,6 +440,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
|
|||
VCALL_LOCALMEM0R(Dictionary,empty);
|
||||
VCALL_LOCALMEM0(Dictionary,clear);
|
||||
VCALL_LOCALMEM1R(Dictionary,has);
|
||||
VCALL_LOCALMEM1R(Dictionary,has_all);
|
||||
VCALL_LOCALMEM1(Dictionary,erase);
|
||||
VCALL_LOCALMEM0R(Dictionary,hash);
|
||||
VCALL_LOCALMEM0R(Dictionary,keys);
|
||||
|
@ -593,6 +594,7 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
|
|||
VCALL_PTR0R(Image, get_data);
|
||||
VCALL_PTR3(Image, blit_rect);
|
||||
VCALL_PTR1R(Image, converted);
|
||||
VCALL_PTR0(Image, fix_alpha_edges);
|
||||
|
||||
VCALL_PTR0R( AABB, get_area );
|
||||
VCALL_PTR0R( AABB, has_no_area );
|
||||
|
@ -912,10 +914,22 @@ static void _call_##m_type##_##m_method(Variant& r_ret,Variant& p_self,const Var
|
|||
struct ConstantData {
|
||||
|
||||
Map<StringName,int> value;
|
||||
#ifdef DEBUG_ENABLED
|
||||
List<StringName> value_ordered;
|
||||
#endif
|
||||
};
|
||||
|
||||
static ConstantData* constant_data;
|
||||
|
||||
static void add_constant(int p_type, StringName p_constant_name, int p_constant_value) {
|
||||
|
||||
constant_data[p_type].value[p_constant_name] = p_constant_value;
|
||||
#ifdef DEBUG_ENABLED
|
||||
constant_data[p_type].value_ordered.push_back(p_constant_name);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
_VariantCall::TypeFunc* _VariantCall::type_funcs=NULL;
|
||||
|
@ -1199,9 +1213,15 @@ void Variant::get_numeric_constants_for_type(Variant::Type p_type, List<StringNa
|
|||
|
||||
_VariantCall::ConstantData& cd = _VariantCall::constant_data[p_type];
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
for(List<StringName>::Element *E=cd.value_ordered.front();E;E=E->next()) {
|
||||
|
||||
p_constants->push_back(E->get());
|
||||
#else
|
||||
for(Map<StringName,int>::Element *E=cd.value.front();E;E=E->next()) {
|
||||
|
||||
p_constants->push_back(E->key());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1273,11 +1293,11 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
|
||||
ADDFUNC1(STRING,STRING,String,left,INT,"pos",varray());
|
||||
ADDFUNC1(STRING,STRING,String,right,INT,"pos",varray());
|
||||
ADDFUNC0(STRING,STRING,String,strip_edges,varray());
|
||||
ADDFUNC2(STRING,STRING,String,strip_edges,BOOL,"left",BOOL,"right",varray(true,true));
|
||||
ADDFUNC0(STRING,STRING,String,extension,varray());
|
||||
ADDFUNC0(STRING,STRING,String,basename,varray());
|
||||
ADDFUNC1(STRING,STRING,String,plus_file,STRING,"file",varray());
|
||||
ADDFUNC1(STRING,STRING,String,ord_at,INT,"at",varray());
|
||||
ADDFUNC1(STRING,INT,String,ord_at,INT,"at",varray());
|
||||
// ADDFUNC2(STRING,String,erase,INT,INT,varray());
|
||||
ADDFUNC0(STRING,INT,String,hash,varray());
|
||||
ADDFUNC0(STRING,STRING,String,md5_text,varray());
|
||||
|
@ -1408,6 +1428,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
ADDFUNC0(IMAGE, RAW_ARRAY, Image, get_data, varray());
|
||||
ADDFUNC3(IMAGE, NIL, Image, blit_rect, IMAGE, "src", RECT2, "src_rect", VECTOR2, "dest", varray(0));
|
||||
ADDFUNC1(IMAGE, IMAGE, Image, converted, INT, "format", varray(0));
|
||||
ADDFUNC0(IMAGE, NIL, Image, fix_alpha_edges, varray());
|
||||
|
||||
ADDFUNC0(_RID,INT,RID,get_id,varray());
|
||||
|
||||
|
@ -1422,8 +1443,9 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
ADDFUNC0(DICTIONARY,INT,Dictionary,size,varray());
|
||||
ADDFUNC0(DICTIONARY,BOOL,Dictionary,empty,varray());
|
||||
ADDFUNC0(DICTIONARY,NIL,Dictionary,clear,varray());
|
||||
ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"value",varray());
|
||||
ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"value",varray());
|
||||
ADDFUNC1(DICTIONARY,BOOL,Dictionary,has,NIL,"key",varray());
|
||||
ADDFUNC1(DICTIONARY,BOOL,Dictionary,has_all,ARRAY,"keys",varray());
|
||||
ADDFUNC1(DICTIONARY,NIL,Dictionary,erase,NIL,"key",varray());
|
||||
ADDFUNC0(DICTIONARY,INT,Dictionary,hash,varray());
|
||||
ADDFUNC0(DICTIONARY,ARRAY,Dictionary,keys,varray());
|
||||
|
||||
|
@ -1565,10 +1587,10 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
|
||||
ADDFUNC0(INPUT_EVENT,BOOL,InputEvent,is_pressed,varray());
|
||||
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action,STRING,"action",varray());
|
||||
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_pressed,STRING,"is_action_pressed",varray());
|
||||
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_released,STRING,"is_action_released",varray());
|
||||
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_pressed,STRING,"action",varray());
|
||||
ADDFUNC1(INPUT_EVENT,BOOL,InputEvent,is_action_released,STRING,"action",varray());
|
||||
ADDFUNC0(INPUT_EVENT,BOOL,InputEvent,is_echo,varray());
|
||||
ADDFUNC2(INPUT_EVENT,NIL,InputEvent,set_as_action,STRING,"action",BOOL,"pressed",varray());
|
||||
ADDFUNC2(INPUT_EVENT,NIL,InputEvent,set_as_action,STRING,"action",BOOL,"pressed",varray());
|
||||
|
||||
/* REGISTER CONSTRUCTORS */
|
||||
|
||||
|
@ -1587,7 +1609,7 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
_VariantCall::add_constructor(_VariantCall::Plane_init3,Variant::PLANE,"normal",Variant::VECTOR3,"d",Variant::REAL);
|
||||
|
||||
_VariantCall::add_constructor(_VariantCall::Quat_init1,Variant::QUAT,"x",Variant::REAL,"y",Variant::REAL,"z",Variant::REAL,"w",Variant::REAL);
|
||||
_VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL);
|
||||
_VariantCall::add_constructor(_VariantCall::Quat_init2,Variant::QUAT,"axis",Variant::VECTOR3,"angle",Variant::REAL);
|
||||
|
||||
_VariantCall::add_constructor(_VariantCall::Color_init1,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL,"a",Variant::REAL);
|
||||
_VariantCall::add_constructor(_VariantCall::Color_init2,Variant::COLOR,"r",Variant::REAL,"g",Variant::REAL,"b",Variant::REAL);
|
||||
|
@ -1604,51 +1626,54 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl
|
|||
|
||||
/* REGISTER CONSTANTS */
|
||||
|
||||
_VariantCall::constant_data[Variant::VECTOR3].value["AXIS_X"]=Vector3::AXIS_X;
|
||||
_VariantCall::constant_data[Variant::VECTOR3].value["AXIS_Y"]=Vector3::AXIS_Y;
|
||||
_VariantCall::constant_data[Variant::VECTOR3].value["AXIS_Z"]=Vector3::AXIS_Z;
|
||||
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["NONE"]=InputEvent::NONE;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["KEY"]=InputEvent::KEY;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["MOUSE_MOTION"]=InputEvent::MOUSE_MOTION;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["MOUSE_BUTTON"]=InputEvent::MOUSE_BUTTON;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["JOYSTICK_MOTION"]=InputEvent::JOYSTICK_MOTION;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["JOYSTICK_BUTTON"]=InputEvent::JOYSTICK_BUTTON;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["SCREEN_TOUCH"]=InputEvent::SCREEN_TOUCH;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["SCREEN_DRAG"]=InputEvent::SCREEN_DRAG;
|
||||
_VariantCall::constant_data[Variant::INPUT_EVENT].value["ACTION"]=InputEvent::ACTION;
|
||||
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["COMPRESS_BC"]=Image::COMPRESS_BC;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["COMPRESS_PVRTC2"]=Image::COMPRESS_PVRTC2;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["COMPRESS_PVRTC4"]=Image::COMPRESS_PVRTC4;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["COMPRESS_ETC"]=Image::COMPRESS_ETC;
|
||||
_VariantCall::add_constant(Variant::VECTOR3,"AXIS_X",Vector3::AXIS_X);
|
||||
_VariantCall::add_constant(Variant::VECTOR3,"AXIS_Y",Vector3::AXIS_Y);
|
||||
_VariantCall::add_constant(Variant::VECTOR3,"AXIS_Z",Vector3::AXIS_Z);
|
||||
|
||||
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"NONE",InputEvent::NONE);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"KEY",InputEvent::KEY);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"MOUSE_MOTION",InputEvent::MOUSE_MOTION);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"MOUSE_BUTTON",InputEvent::MOUSE_BUTTON);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"JOYSTICK_MOTION",InputEvent::JOYSTICK_MOTION);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"JOYSTICK_BUTTON",InputEvent::JOYSTICK_BUTTON);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"SCREEN_TOUCH",InputEvent::SCREEN_TOUCH);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"SCREEN_DRAG",InputEvent::SCREEN_DRAG);
|
||||
_VariantCall::add_constant(Variant::INPUT_EVENT,"ACTION",InputEvent::ACTION);
|
||||
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_GRAYSCALE"]=Image::FORMAT_GRAYSCALE;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_INTENSITY"]=Image::FORMAT_INTENSITY;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_GRAYSCALE_ALPHA"]=Image::FORMAT_GRAYSCALE_ALPHA;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_RGB"]=Image::FORMAT_RGB;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_RGBA"]=Image::FORMAT_RGBA;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_INDEXED"]=Image::FORMAT_INDEXED;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_INDEXED_ALPHA"]=Image::FORMAT_INDEXED_ALPHA;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_YUV_422"]=Image::FORMAT_YUV_422;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_YUV_444"]=Image::FORMAT_YUV_444;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_BC1"]=Image::FORMAT_BC1;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_BC2"]=Image::FORMAT_BC2;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_BC3"]=Image::FORMAT_BC3;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_BC4"]=Image::FORMAT_BC4;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_BC5"]=Image::FORMAT_BC5;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_PVRTC2"]=Image::FORMAT_PVRTC2;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_PVRTC2_ALPHA"]=Image::FORMAT_PVRTC2_ALPHA;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_PVRTC4"]=Image::FORMAT_PVRTC4;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_PVRTC4_ALPHA"]=Image::FORMAT_PVRTC4_ALPHA;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_ETC"]=Image::FORMAT_ETC;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_ATC"]=Image::FORMAT_ATC;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_ATC_ALPHA_EXPLICIT"]=Image::FORMAT_ATC_ALPHA_EXPLICIT;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_ATC_ALPHA_INTERPOLATED"]=Image::FORMAT_ATC_ALPHA_INTERPOLATED;
|
||||
_VariantCall::constant_data[Variant::IMAGE].value["FORMAT_CUSTOM"]=Image::FORMAT_CUSTOM;
|
||||
|
||||
_VariantCall::add_constant(Variant::IMAGE,"COMPRESS_BC",Image::COMPRESS_BC);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"COMPRESS_PVRTC2",Image::COMPRESS_PVRTC2);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"COMPRESS_PVRTC4",Image::COMPRESS_PVRTC4);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"COMPRESS_ETC",Image::COMPRESS_ETC);
|
||||
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_GRAYSCALE",Image::FORMAT_GRAYSCALE);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_INTENSITY",Image::FORMAT_INTENSITY);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_GRAYSCALE_ALPHA",Image::FORMAT_GRAYSCALE_ALPHA);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_RGB",Image::FORMAT_RGB);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_RGBA",Image::FORMAT_RGBA);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_INDEXED",Image::FORMAT_INDEXED);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_INDEXED_ALPHA",Image::FORMAT_INDEXED_ALPHA);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_YUV_422",Image::FORMAT_YUV_422);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_YUV_444",Image::FORMAT_YUV_444);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_BC1",Image::FORMAT_BC1);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_BC2",Image::FORMAT_BC2);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_BC3",Image::FORMAT_BC3);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_BC4",Image::FORMAT_BC4);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_BC5",Image::FORMAT_BC5);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_PVRTC2",Image::FORMAT_PVRTC2);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_PVRTC2_ALPHA",Image::FORMAT_PVRTC2_ALPHA);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_PVRTC4",Image::FORMAT_PVRTC4);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_PVRTC4_ALPHA",Image::FORMAT_PVRTC4_ALPHA);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_ETC",Image::FORMAT_ETC);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_ATC",Image::FORMAT_ATC);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_ATC_ALPHA_EXPLICIT",Image::FORMAT_ATC_ALPHA_EXPLICIT);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_ATC_ALPHA_INTERPOLATED",Image::FORMAT_ATC_ALPHA_INTERPOLATED);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"FORMAT_CUSTOM",Image::FORMAT_CUSTOM);
|
||||
|
||||
_VariantCall::add_constant(Variant::IMAGE,"INTERPOLATE_NEAREST",Image::INTERPOLATE_NEAREST);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"INTERPOLATE_BILINEAR",Image::INTERPOLATE_BILINEAR);
|
||||
_VariantCall::add_constant(Variant::IMAGE,"INTERPOLATE_CUBIC",Image::INTERPOLATE_CUBIC);
|
||||
}
|
||||
|
||||
void unregister_variant_methods() {
|
||||
|
|
|
@ -1354,7 +1354,7 @@ void Variant::set(const Variant& p_index, const Variant& p_value, bool *r_valid)
|
|||
return;
|
||||
} else if (*str=="r8" ) {
|
||||
valid=true;
|
||||
v->g=float(p_value)/255.0;
|
||||
v->r=float(p_value)/255.0;
|
||||
return;
|
||||
} else if (*str=="g8" ) {
|
||||
valid=true;
|
||||
|
@ -2213,16 +2213,16 @@ Variant Variant::get(const Variant& p_index, bool *r_valid) const {
|
|||
return v->get_v();
|
||||
} else if (*str=="r8") {
|
||||
valid=true;
|
||||
return v->r*255.0;
|
||||
return (int)Math::round(v->r*255.0);
|
||||
} else if (*str=="g8" ) {
|
||||
valid=true;
|
||||
return v->g*255.0;
|
||||
return (int)Math::round(v->g*255.0);
|
||||
} else if (*str=="b8" ) {
|
||||
valid=true;
|
||||
return v->b*255.0;
|
||||
return (int)Math::round(v->b*255.0);
|
||||
} else if (*str=="a8" ) {
|
||||
valid=true;
|
||||
return v->a*255.0;
|
||||
return (int)Math::round(v->a*255.0);
|
||||
}
|
||||
} else if (p_index.get_type()==Variant::INT) {
|
||||
|
||||
|
@ -3431,6 +3431,65 @@ Variant Variant::iter_get(const Variant& r_iter,bool &r_valid) const {
|
|||
|
||||
}
|
||||
|
||||
void Variant::blend(const Variant& a, const Variant& b, float c, Variant &r_dst) {
|
||||
if (a.type!=b.type) {
|
||||
if(a.is_num() && b.is_num()) {
|
||||
real_t va=a;
|
||||
real_t vb=b;
|
||||
r_dst=va + vb * c;
|
||||
} else {
|
||||
r_dst=a;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
switch(a.type) {
|
||||
case NIL: { r_dst=Variant(); } return;
|
||||
case INT:{
|
||||
int va=a._data._int;
|
||||
int vb=b._data._int;
|
||||
r_dst=int(va + vb * c + 0.5);
|
||||
} return;
|
||||
case REAL:{
|
||||
double ra=a._data._real;
|
||||
double rb=b._data._real;
|
||||
r_dst=ra + rb * c;
|
||||
} return;
|
||||
case VECTOR2:{ r_dst=*reinterpret_cast<const Vector2*>(a._data._mem)+*reinterpret_cast<const Vector2*>(b._data._mem)*c; } return;
|
||||
case RECT2:{
|
||||
const Rect2 *ra = reinterpret_cast<const Rect2*>(a._data._mem);
|
||||
const Rect2 *rb = reinterpret_cast<const Rect2*>(b._data._mem);
|
||||
r_dst=Rect2(ra->pos + rb->pos * c, ra->size + rb->size * c);
|
||||
} return;
|
||||
case VECTOR3:{ r_dst=*reinterpret_cast<const Vector3*>(a._data._mem)+*reinterpret_cast<const Vector3*>(b._data._mem)*c; } return;
|
||||
case _AABB:{
|
||||
const AABB *ra = reinterpret_cast<const AABB*>(a._data._mem);
|
||||
const AABB *rb = reinterpret_cast<const AABB*>(b._data._mem);
|
||||
r_dst=AABB(ra->pos + rb->pos * c, ra->size + rb->size * c);
|
||||
} return;
|
||||
case QUAT:{
|
||||
Quat empty_rot;
|
||||
const Quat *qa = reinterpret_cast<const Quat*>(a._data._mem);
|
||||
const Quat *qb = reinterpret_cast<const Quat*>(b._data._mem);
|
||||
r_dst=*qa * empty_rot.slerp(*qb,c);
|
||||
} return;
|
||||
case COLOR:{
|
||||
const Color *ca = reinterpret_cast<const Color*>(a._data._mem);
|
||||
const Color *cb = reinterpret_cast<const Color*>(b._data._mem);
|
||||
float r = ca->r + cb->r * c;
|
||||
float g = ca->g + cb->g * c;
|
||||
float b = ca->b + cb->b * c;
|
||||
float a = ca->a + cb->a * c;
|
||||
r = r > 1.0 ? 1.0 : r;
|
||||
g = g > 1.0 ? 1.0 : g;
|
||||
b = b > 1.0 ? 1.0 : b;
|
||||
a = a > 1.0 ? 1.0 : a;
|
||||
r_dst=Color(r, g, b, a);
|
||||
} return;
|
||||
default:{ r_dst = c<0.5 ? a : b; } return;
|
||||
}
|
||||
}
|
||||
|
||||
void Variant::interpolate(const Variant& a, const Variant& b, float c,Variant &r_dst) {
|
||||
|
||||
if (a.type!=b.type) {
|
||||
|
|
|
@ -1747,7 +1747,20 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r
|
|||
}
|
||||
|
||||
if (c>32) {
|
||||
if (c!='=') {
|
||||
if (c=='"') { //quoted
|
||||
p_stream->saved='"';
|
||||
Token tk;
|
||||
Error err = get_token(p_stream,tk,line,r_err_str);
|
||||
if (err)
|
||||
return err;
|
||||
if (tk.type!=TK_STRING) {
|
||||
r_err_str="Error reading quoted string";
|
||||
return err;
|
||||
}
|
||||
|
||||
what=tk.value;
|
||||
|
||||
} else if (c!='=') {
|
||||
what+=String::chr(c);
|
||||
} else {
|
||||
r_assign=what;
|
||||
|
@ -1789,6 +1802,13 @@ Error VariantParser::parse(Stream *p_stream, Variant& r_ret, String &r_err_str,
|
|||
//////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static String rtosfix(double p_value) {
|
||||
|
||||
if (p_value==0.0)
|
||||
return "0"; //avoid negative zero being written, which may annoy git, svn, etc. for changes when they don't exist.
|
||||
else
|
||||
return rtoss(p_value);
|
||||
}
|
||||
|
||||
Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud,EncodeResourceFunc p_encode_res_func,void* p_encode_res_ud) {
|
||||
|
||||
|
@ -1807,7 +1827,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
} break;
|
||||
case Variant::REAL: {
|
||||
|
||||
String s = rtoss(p_variant.operator real_t());
|
||||
String s = rtosfix(p_variant.operator real_t());
|
||||
if (s.find(".")==-1 && s.find("e")==-1)
|
||||
s+=".0";
|
||||
p_store_string_func(p_store_string_ud, s );
|
||||
|
@ -1822,35 +1842,35 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
case Variant::VECTOR2: {
|
||||
|
||||
Vector2 v = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Vector2( "+rtoss(v.x) +", "+rtoss(v.y)+" )" );
|
||||
p_store_string_func(p_store_string_ud,"Vector2( "+rtosfix(v.x) +", "+rtosfix(v.y)+" )" );
|
||||
} break;
|
||||
case Variant::RECT2: {
|
||||
|
||||
Rect2 aabb = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Rect2( "+rtoss(aabb.pos.x) +", "+rtoss(aabb.pos.y) +", "+rtoss(aabb.size.x) +", "+rtoss(aabb.size.y)+" )" );
|
||||
p_store_string_func(p_store_string_ud,"Rect2( "+rtosfix(aabb.pos.x) +", "+rtosfix(aabb.pos.y) +", "+rtosfix(aabb.size.x) +", "+rtosfix(aabb.size.y)+" )" );
|
||||
|
||||
} break;
|
||||
case Variant::VECTOR3: {
|
||||
|
||||
Vector3 v = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Vector3( "+rtoss(v.x) +", "+rtoss(v.y)+", "+rtoss(v.z)+" )");
|
||||
p_store_string_func(p_store_string_ud,"Vector3( "+rtosfix(v.x) +", "+rtosfix(v.y)+", "+rtosfix(v.z)+" )");
|
||||
} break;
|
||||
case Variant::PLANE: {
|
||||
|
||||
Plane p = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Plane( "+rtoss(p.normal.x) +", "+rtoss(p.normal.y)+", "+rtoss(p.normal.z)+", "+rtoss(p.d)+" )" );
|
||||
p_store_string_func(p_store_string_ud,"Plane( "+rtosfix(p.normal.x) +", "+rtosfix(p.normal.y)+", "+rtosfix(p.normal.z)+", "+rtosfix(p.d)+" )" );
|
||||
|
||||
} break;
|
||||
case Variant::_AABB: {
|
||||
|
||||
AABB aabb = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"AABB( "+rtoss(aabb.pos.x) +", "+rtoss(aabb.pos.y) +", "+rtoss(aabb.pos.z) +", "+rtoss(aabb.size.x) +", "+rtoss(aabb.size.y) +", "+rtoss(aabb.size.z)+" )" );
|
||||
p_store_string_func(p_store_string_ud,"AABB( "+rtosfix(aabb.pos.x) +", "+rtosfix(aabb.pos.y) +", "+rtosfix(aabb.pos.z) +", "+rtosfix(aabb.size.x) +", "+rtosfix(aabb.size.y) +", "+rtosfix(aabb.size.z)+" )" );
|
||||
|
||||
} break;
|
||||
case Variant::QUAT: {
|
||||
|
||||
Quat quat = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Quat( "+rtoss(quat.x)+", "+rtoss(quat.y)+", "+rtoss(quat.z)+", "+rtoss(quat.w)+" )");
|
||||
p_store_string_func(p_store_string_ud,"Quat( "+rtosfix(quat.x)+", "+rtosfix(quat.y)+", "+rtosfix(quat.z)+", "+rtosfix(quat.w)+" )");
|
||||
|
||||
} break;
|
||||
case Variant::MATRIX32: {
|
||||
|
@ -1862,7 +1882,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i!=0 || j!=0)
|
||||
s+=", ";
|
||||
s+=rtoss( m3.elements[i][j] );
|
||||
s+=rtosfix( m3.elements[i][j] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1878,7 +1898,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i!=0 || j!=0)
|
||||
s+=", ";
|
||||
s+=rtoss( m3.elements[i][j] );
|
||||
s+=rtosfix( m3.elements[i][j] );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1895,11 +1915,11 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i!=0 || j!=0)
|
||||
s+=", ";
|
||||
s+=rtoss( m3.elements[i][j] );
|
||||
s+=rtosfix( m3.elements[i][j] );
|
||||
}
|
||||
}
|
||||
|
||||
s=s+", "+rtoss(t.origin.x) +", "+rtoss(t.origin.y)+", "+rtoss(t.origin.z);
|
||||
s=s+", "+rtosfix(t.origin.x) +", "+rtosfix(t.origin.y)+", "+rtosfix(t.origin.z);
|
||||
|
||||
p_store_string_func(p_store_string_ud,s+" )");
|
||||
} break;
|
||||
|
@ -1908,7 +1928,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
case Variant::COLOR: {
|
||||
|
||||
Color c = p_variant;
|
||||
p_store_string_func(p_store_string_ud,"Color( "+rtoss(c.r) +", "+rtoss(c.g)+", "+rtoss(c.b)+", "+rtoss(c.a)+" )");
|
||||
p_store_string_func(p_store_string_ud,"Color( "+rtosfix(c.r) +", "+rtosfix(c.g)+", "+rtosfix(c.b)+", "+rtosfix(c.a)+" )");
|
||||
|
||||
} break;
|
||||
case Variant::IMAGE: {
|
||||
|
@ -2106,7 +2126,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i>0)
|
||||
p_store_string_func(p_store_string_ud,", ");
|
||||
p_store_string_func(p_store_string_ud,rtoss(ptr[i]));
|
||||
p_store_string_func(p_store_string_ud,rtosfix(ptr[i]));
|
||||
}
|
||||
|
||||
p_store_string_func(p_store_string_ud," )");
|
||||
|
@ -2147,7 +2167,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i>0)
|
||||
p_store_string_func(p_store_string_ud,", ");
|
||||
p_store_string_func(p_store_string_ud,rtoss(ptr[i].x)+", "+rtoss(ptr[i].y) );
|
||||
p_store_string_func(p_store_string_ud,rtosfix(ptr[i].x)+", "+rtosfix(ptr[i].y) );
|
||||
}
|
||||
|
||||
p_store_string_func(p_store_string_ud," )");
|
||||
|
@ -2165,7 +2185,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
|
||||
if (i>0)
|
||||
p_store_string_func(p_store_string_ud,", ");
|
||||
p_store_string_func(p_store_string_ud,rtoss(ptr[i].x)+", "+rtoss(ptr[i].y)+", "+rtoss(ptr[i].z) );
|
||||
p_store_string_func(p_store_string_ud,rtosfix(ptr[i].x)+", "+rtosfix(ptr[i].y)+", "+rtosfix(ptr[i].z) );
|
||||
}
|
||||
|
||||
p_store_string_func(p_store_string_ud," )");
|
||||
|
@ -2185,7 +2205,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
|||
if (i>0)
|
||||
p_store_string_func(p_store_string_ud,", ");
|
||||
|
||||
p_store_string_func(p_store_string_ud,rtoss(ptr[i].r)+", "+rtoss(ptr[i].g)+", "+rtoss(ptr[i].b)+", "+rtoss(ptr[i].a) );
|
||||
p_store_string_func(p_store_string_ud,rtosfix(ptr[i].r)+", "+rtosfix(ptr[i].g)+", "+rtosfix(ptr[i].b)+", "+rtosfix(ptr[i].a) );
|
||||
|
||||
}
|
||||
p_store_string_func(p_store_string_ud," )");
|
||||
|
|
|
@ -69,10 +69,26 @@ class Vector {
|
|||
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ int _get_alloc_size(int p_elements) const {
|
||||
_FORCE_INLINE_ size_t _get_alloc_size(size_t p_elements) const {
|
||||
//return nearest_power_of_2_templated(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int));
|
||||
return nearest_power_of_2(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int));
|
||||
}
|
||||
|
||||
return nearest_power_of_2(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int));
|
||||
}
|
||||
_FORCE_INLINE_ bool _get_alloc_size_checked(size_t p_elements, size_t *out) const {
|
||||
#if defined(_add_overflow) && defined(_mul_overflow)
|
||||
size_t o;
|
||||
size_t p;
|
||||
if (_mul_overflow(p_elements, sizeof(T), &o)) return false;
|
||||
if (_add_overflow(o, sizeof(SafeRefCount)+sizeof(int), &p)) return false;
|
||||
*out = nearest_power_of_2(p);
|
||||
return true;
|
||||
#else
|
||||
// Speed is more important than correctness here, do the operations unchecked
|
||||
// and hope the best
|
||||
*out = _get_alloc_size(p_elements);
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void _unref(void *p_data);
|
||||
|
||||
|
@ -257,19 +273,21 @@ Error Vector<T>::resize(int p_size) {
|
|||
// possibly changing size, copy on write
|
||||
_copy_on_write();
|
||||
|
||||
size_t alloc_size;
|
||||
ERR_FAIL_COND_V(!_get_alloc_size_checked(p_size, &alloc_size), ERR_OUT_OF_MEMORY);
|
||||
|
||||
if (p_size>size()) {
|
||||
|
||||
if (size()==0) {
|
||||
// alloc from scratch
|
||||
void* ptr=memalloc(_get_alloc_size(p_size));
|
||||
void* ptr=memalloc(alloc_size);
|
||||
ERR_FAIL_COND_V( !ptr ,ERR_OUT_OF_MEMORY);
|
||||
_ptr=(T*)((uint8_t*)ptr+sizeof(int)+sizeof(SafeRefCount));
|
||||
_get_refcount()->init(); // init refcount
|
||||
*_get_size()=0; // init size (currently, none)
|
||||
|
||||
} else {
|
||||
|
||||
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount),_get_alloc_size(p_size));
|
||||
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount), alloc_size);
|
||||
ERR_FAIL_COND_V( !_ptrnew ,ERR_OUT_OF_MEMORY);
|
||||
_ptr=(T*)((uint8_t*)_ptrnew+sizeof(int)+sizeof(SafeRefCount));
|
||||
}
|
||||
|
@ -293,7 +311,7 @@ Error Vector<T>::resize(int p_size) {
|
|||
t->~T();
|
||||
}
|
||||
|
||||
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount),_get_alloc_size(p_size));
|
||||
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount), alloc_size);
|
||||
ERR_FAIL_COND_V( !_ptrnew ,ERR_OUT_OF_MEMORY);
|
||||
|
||||
_ptr=(T*)((uint8_t*)_ptrnew+sizeof(int)+sizeof(SafeRefCount));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[application]
|
||||
|
||||
name="Area 2D Input Events"
|
||||
main_scene="res://input.scn"
|
||||
main_scene="res://input.tscn"
|
||||
icon="res://icon.png"
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,109 @@
|
|||
[gd_scene load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://input.gd" type="Script" id=1]
|
||||
[ext_resource path="res://box_area.png" type="Texture" id=2]
|
||||
[ext_resource path="res://circle_area.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 64, 64 )
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 64.0
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
[node name="box" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 212, 281 )
|
||||
transform/rot = 35.4081
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="box"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="label" type="Label" parent="box"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="box"]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="circle" type="Area2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 547.877, 286.808 )
|
||||
transform/rot = -40.5985
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 2 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="circle"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="label" type="Label" parent="circle"]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = -43.0
|
||||
margin/top = 71.0
|
||||
margin/right = 43.0
|
||||
margin/bottom = 84.0
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="circle"]
|
||||
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 0.0
|
||||
margin/top = 0.0
|
||||
margin/right = 40.0
|
||||
margin/bottom = 13.0
|
||||
text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,47 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://ball.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ball.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 7.45713
|
||||
|
||||
[node name="bal" type="RigidBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
mode = 0
|
||||
mass = 1.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
gravity_scale = 1.0
|
||||
custom_integrator = false
|
||||
continuous_cd = 0
|
||||
contacts_reported = 0
|
||||
contact_monitor = false
|
||||
sleeping = false
|
||||
can_sleep = true
|
||||
velocity/linear = Vector2( 0, 0 )
|
||||
velocity/angular = 0.0
|
||||
damp_override/linear = -1.0
|
||||
damp_override/angular = -1.0
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="sprite" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 0, 1 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ func _process(delta):
|
|||
timeout -= delta
|
||||
if (timeout < 0):
|
||||
timeout = EMIT_INTERVAL
|
||||
var ball = preload("res://ball.scn").instance()
|
||||
var ball = preload("res://ball.tscn").instance()
|
||||
ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
|
||||
add_child(ball)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,178 @@
|
|||
[gd_scene load_steps=13 format=1]
|
||||
|
||||
[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
|
||||
[ext_resource path="res://circle.png" type="Texture" id=2]
|
||||
[ext_resource path="res://box.png" type="Texture" id=3]
|
||||
[ext_resource path="res://poly.png" type="Texture" id=4]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 28.8504
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
extents = Vector2( 32.1805, 30.0328 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=6]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
|
||||
resource/name = "movethem"
|
||||
length = 4.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/circle:transform/pos")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:transform/pos")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("base/box:transform/rot")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("base/polygon:transform/pos")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
|
||||
resource/name = "toggletrigger"
|
||||
length = 6.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("base/box:trigger")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("base/box:visibility/opacity")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
|
||||
|
||||
[node name="base" type="Node2D"]
|
||||
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="base" type="KinematicBody2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 137, 470 )
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
|
||||
shapes/0/trigger = false
|
||||
shapes/1/shape = SubResource( 2 )
|
||||
shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
|
||||
shapes/1/trigger = false
|
||||
shapes/2/shape = SubResource( 3 )
|
||||
shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/2/trigger = false
|
||||
shapes/3/shape = SubResource( 4 )
|
||||
shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/3/trigger = false
|
||||
shapes/4/shape = SubResource( 5 )
|
||||
shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/4/trigger = false
|
||||
shapes/5/shape = SubResource( 6 )
|
||||
shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
|
||||
shapes/5/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
|
||||
[node name="circle" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 7.91353, -10.6267 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = 0
|
||||
|
||||
[node name="sprite" type="Sprite" parent="base/circle"]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="box" type="CollisionShape2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 193.581, -13.1276 )
|
||||
transform/rot = 13.9217
|
||||
shape = SubResource( 2 )
|
||||
trigger = false
|
||||
_update_shape_index = 1
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/box"]
|
||||
|
||||
texture = ExtResource( 3 )
|
||||
|
||||
[node name="polygon" type="CollisionPolygon2D" parent="base"]
|
||||
|
||||
transform/pos = Vector2( 399.202, -3.9451 )
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
|
||||
shape_range = Vector2( 2, 5 )
|
||||
trigger = false
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="base/polygon"]
|
||||
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="shapemove" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "movethem"
|
||||
|
||||
[node name="triggertoggle" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/movethem = SubResource( 7 )
|
||||
anims/toggletrigger = SubResource( 8 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "toggletrigger"
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 21.0
|
||||
margin/top = 21.0
|
||||
margin/right = 719.0
|
||||
margin/bottom = 73.0
|
||||
text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[application]
|
||||
|
||||
name="Run-Time CollisionShape"
|
||||
main_scene="res://dynamic_colobjs.scn"
|
||||
main_scene="res://dynamic_colobjs.tscn"
|
||||
icon="res://icon.png"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[application]
|
||||
|
||||
name="Fog of War"
|
||||
main_scene="res://fog.scn"
|
||||
main_scene="res://fog.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,51 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://fog.gd" type="Script" id=3]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
|
||||
transform/pos = Vector2( 206, 112 )
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 48, 48 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -589834, 2, -589833, 2, -589832, 2, -589831, 2, -589830, 2, -589829, 2, -589828, 2, -589827, 2, -589826, 2, -589825, 2, -655360, 2, -655359, 2, -655358, 2, -655357, 2, -655356, 2, -655355, 2, -655354, 2, -655353, 2, -655352, 2, -655351, 2, -524298, 2, -524297, 2, -524296, 2, -524295, 2, -524294, 2, -524293, 2, -524292, 2, -524291, 2, -524290, 2, -524289, 2, -589824, 2, -589823, 2, -589822, 2, -589821, 2, -589820, 2, -589819, 2, -589818, 2, -589817, 2, -589816, 2, -589815, 2, -458762, 2, -458761, 2, -458760, 2, -458759, 2, -458758, 2, -458757, 2, -458756, 2, -458755, 2, -458754, 2, -458753, 2, -524288, 2, -524287, 2, -524286, 2, -524285, 2, -524284, 2, -524283, 2, -524282, 2, -524281, 2, -524280, 2, -524279, 2, -393226, 2, -393225, 2, -393224, 2, -393223, 2, -393222, 2, -393221, 2, -393220, 2, -393219, 2, -393218, 2, -393217, 2, -458752, 2, -458751, 2, -458750, 2, -458749, 2, -458748, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 2, -458743, 2, -327690, 2, -327689, 2, -327688, 2, -327687, 2, -327686, 2, -327685, 2, -327684, 2, -327683, 2, -327682, 2, -327681, 2, -393216, 2, -393215, 2, -393214, 2, -393213, 2, -393212, 2, -393211, 2, -393210, 2, -393209, 2, -393208, 2, -393207, 2, -262154, 2, -262153, 2, -262152, 2, -262151, 2, -262150, 2, -262149, 2, -262148, 2, -262147, 2, -262146, 2, -262145, 2, -327680, 2, -327679, 2, -327678, 2, -327677, 2, -327676, 2, -327675, 2, -327674, 2, -327673, 2, -327672, 2, -327671, 2, -196618, 2, -196617, 2, -196616, 2, -196615, 2, -196614, 2, -196613, 2, -196612, 2, -196611, 2, -196610, 2, -196609, 2, -262144, 2, -262143, 2, -262142, 2, -262141, 2, -262140, 2, -262139, 2, -262138, 2, -262137, 2, -262136, 2, -262135, 2, -131082, 2, -131081, 2, -131080, 2, -131079, 2, -131078, 2, -131077, 2, -131076, 2, -131075, 2, -131074, 2, -131073, 2, -196608, 2, -196607, 2, -196606, 2, -196605, 2, -196604, 2, -196603, 2, -196602, 2, -196601, 2, -196600, 2, -196599, 2, -65546, 2, -65545, 2, -65544, 2, -65543, 2, -65542, 2, -65541, 2, -65540, 2, -65539, 2, -65538, 2, -65537, 2, -131072, 2, -131071, 2, -131070, 2, -131069, 2, -131068, 2, -131067, 2, -131066, 2, -131065, 2, -131064, 2, -131063, 2, -10, 2, -9, 2, -8, 2, -7, 2, -6, 2, -5, 2, -4, 2, -3, 2, -2, 2, -1, 2, -65536, 2, -65535, 2, -65534, 2, -65533, 2, -65532, 2, -65531, 2, -65530, 2, -65529, 2, -65528, 2, -65527, 2, 65526, 2, 65527, 2, 65528, 2, 65529, 2, 65530, 2, 65531, 2, 65532, 2, 65533, 2, 65534, 2, 65535, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 131062, 2, 131063, 2, 131064, 2, 131065, 2, 131066, 2, 131067, 2, 131068, 2, 131069, 2, 131070, 2, 131071, 2, 65536, 2, 65537, 2, 65538, 2, 65539, 2, 65540, 2, 65541, 2, 65542, 2, 65543, 2, 65544, 2, 65545, 2, 196598, 2, 196599, 2, 196600, 2, 196601, 2, 196602, 2, 196603, 2, 196604, 2, 196605, 2, 196606, 2, 196607, 2, 131072, 2, 131073, 2, 131074, 2, 131075, 2, 131076, 2, 131077, 2, 131078, 2, 131079, 2, 131080, 2, 131081, 2, 262134, 2, 262135, 2, 262136, 2, 262137, 2, 262138, 2, 262139, 2, 262140, 2, 262141, 2, 262142, 2, 262143, 2, 196608, 2, 196609, 2, 196610, 2, 196611, 2, 196612, 2, 196613, 2, 196614, 2, 196615, 2, 196616, 2, 196617, 2, 327670, 2, 327671, 2, 327672, 2, 327673, 2, 327674, 2, 327675, 2, 327676, 2, 327677, 2, 327678, 2, 327679, 2, 262144, 2, 262145, 2, 262146, 2, 262147, 2, 262148, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 393206, 2, 393207, 2, 393208, 2, 393209, 2, 393210, 2, 393211, 2, 393212, 2, 393213, 2, 393214, 2, 393215, 2, 327680, 2, 327681, 2, 327682, 2, 327683, 2, 327684, 2, 327685, 2, 327686, 2, 327687, 2, 327688, 2, 327689, 2, 458742, 2, 458743, 2, 458744, 2, 458745, 2, 458746, 2, 458747, 2, 458748, 2, 458749, 2, 458750, 2, 458751, 2, 393216, 2, 393217, 2, 393218, 2, 393219, 2, 393220, 2, 393221, 2, 393222, 2, 393223, 2, 393224, 2, 393225, 2, 524278, 2, 524279, 2, 524280, 2, 524281, 2, 524282, 2, 524283, 2, 524284, 2, 524285, 2, 524286, 2, 524287, 2, 458752, 2, 458753, 2, 458754, 2, 458755, 2, 458756, 2, 458757, 2, 458758, 2, 458759, 2, 458760, 2, 458761, 2, 589814, 2, 589815, 2, 589816, 2, 589817, 2, 589818, 2, 589819, 2, 589820, 2, 589821, 2, 589822, 2, 589823, 2, 524288, 2, 524289, 2, 524290, 2, 524291, 2, 524292, 2, 524293, 2, 524294, 2, 524295, 2, 524296, 2, 524297, 2, 655350, 2, 655351, 2, 655352, 2, 655353, 2, 655354, 2, 655355, 2, 655356, 2, 655357, 2, 655358, 2, 655359, 2, 589824, 2, 589825, 2, 589826, 2, 589827, 2, 589828, 2, 589829, 2, 589830, 2, 589831, 2, 589832, 2, 589833, 2 )
|
||||
|
||||
[node name="troll" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
collision/margin = 0.001
|
||||
|
||||
[node name="Fog" type="TileMap" parent="."]
|
||||
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 48, 48 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( )
|
||||
script/script = ExtResource( 3 )
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<resource_file type="TileSet" subresource_count="3" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
|
||||
<ext_resource path="res://floor.png" type="Texture"></ext_resource>
|
||||
<ext_resource path="res://fog.png" type="Texture"></ext_resource>
|
||||
<main_resource>
|
||||
<string name="0/name"> "fog opaque" </string>
|
||||
<resource name="0/texture" resource_type="Texture" path="res://fog.png"> </resource>
|
||||
<vector2 name="0/tex_offset"> -48, -48 </vector2>
|
||||
<vector2 name="0/shape_offset"> 0, 0 </vector2>
|
||||
<rect2 name="0/region"> 0, 0, 144, 144 </rect2>
|
||||
<array name="0/shapes" len="0" shared="false">
|
||||
</array>
|
||||
<string name="1/name"> "fog transparent" </string>
|
||||
<resource name="1/texture" resource_type="Texture" path="res://fog.png"> </resource>
|
||||
<vector2 name="1/tex_offset"> -48, -48 </vector2>
|
||||
<vector2 name="1/shape_offset"> 0, 0 </vector2>
|
||||
<rect2 name="1/region"> 144, 0, 144, 144 </rect2>
|
||||
<array name="1/shapes" len="0" shared="false">
|
||||
</array>
|
||||
<string name="2/name"> "floor" </string>
|
||||
<resource name="2/texture" resource_type="Texture" path="res://floor.png"> </resource>
|
||||
<vector2 name="2/tex_offset"> 0, 0 </vector2>
|
||||
<vector2 name="2/shape_offset"> 0, 0 </vector2>
|
||||
<rect2 name="2/region"> 0, 0, 0, 0 </rect2>
|
||||
<array name="2/shapes" len="0" shared="false">
|
||||
</array>
|
||||
|
||||
</main_resource>
|
||||
</resource_file>
|
Binary file not shown.
|
@ -0,0 +1,32 @@
|
|||
[gd_resource type="TileSet" load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://fog.png" type="Texture" id=1]
|
||||
[ext_resource path="res://floor.png" type="Texture" id=2]
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "fog opaque"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -48, -48 )
|
||||
0/region = Rect2( 0, 0, 144, 144 )
|
||||
0/occluder_offset = Vector2( 0, 0 )
|
||||
0/navigation_offset = Vector2( 0, 0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "fog transparent"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( -48, -48 )
|
||||
1/region = Rect2( 144, 0, 144, 144 )
|
||||
1/occluder_offset = Vector2( 0, 0 )
|
||||
1/navigation_offset = Vector2( 0, 0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "floor"
|
||||
2/texture = ExtResource( 2 )
|
||||
2/tex_offset = Vector2( 0, 0 )
|
||||
2/region = Rect2( 0, 0, 0, 0 )
|
||||
2/occluder_offset = Vector2( 24, 24 )
|
||||
2/navigation_offset = Vector2( 24, 24 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ ]
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://fog.png" type="Texture" id=1]
|
||||
[ext_resource path="res://floor.png" type="Texture" id=2]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="fog opaque" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -48, -48 )
|
||||
region = true
|
||||
region_rect = Rect2( 0, 0, 144, 144 )
|
||||
|
||||
[node name="fog transparent" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 144, 0 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -48, -48 )
|
||||
region = true
|
||||
region_rect = Rect2( 144, 0, 144, 144 )
|
||||
|
||||
[node name="floor" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 264, 24 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 3.24216, 19.453 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,88 @@
|
|||
[gd_scene load_steps=5 format=1]
|
||||
|
||||
[ext_resource path="res://beach_cave.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ocean_beach.png" type="Texture" id=2]
|
||||
[ext_resource path="res://ocean_cave.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="Environment" id=1]
|
||||
|
||||
ambient_light/enabled = false
|
||||
ambient_light/color = Color( 0, 0, 0, 1 )
|
||||
ambient_light/energy = 1.0
|
||||
fxaa/enabled = false
|
||||
background/mode = 5
|
||||
background/color = Color( 0, 0, 0, 1 )
|
||||
background/energy = 1.0
|
||||
background/scale = 1.0
|
||||
background/glow = 0.0
|
||||
background/canvas_max_layer = null
|
||||
glow/enabled = true
|
||||
glow/blur_passes = 3
|
||||
glow/blur_scale = 1.2
|
||||
glow/blur_strength = 1.2
|
||||
glow/blur_blend_mode = 0
|
||||
glow/bloom = 0.0
|
||||
glow/bloom_treshold = 0.5
|
||||
dof_blur/enabled = false
|
||||
dof_blur/blur_passes = 1
|
||||
dof_blur/begin = 100.0
|
||||
dof_blur/range = 10.0
|
||||
hdr/enabled = true
|
||||
hdr/tonemapper = 0.0
|
||||
hdr/exposure = 0.5
|
||||
hdr/white = 1.0
|
||||
hdr/glow_treshold = 0.7
|
||||
hdr/glow_scale = 0.5
|
||||
hdr/min_luminance = 0.3
|
||||
hdr/max_luminance = 8.0
|
||||
hdr/exposure_adj_speed = 2.0
|
||||
fog/enabled = false
|
||||
fog/begin = 100.0
|
||||
fog/begin_color = Color( 0, 0, 0, 1 )
|
||||
fog/end_color = Color( 0, 0, 0, 1 )
|
||||
fog/attenuation = 1.0
|
||||
fog/bg = true
|
||||
bcs/enabled = false
|
||||
bcs/brightness = 1.0
|
||||
bcs/contrast = 1.0
|
||||
bcs/saturation = 1.0
|
||||
srgb/enabled = true
|
||||
|
||||
[node name="hdr" type="Node2D"]
|
||||
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="beach" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
modulate = Color( 2, 2, 2, 1 )
|
||||
|
||||
[node name="cave" type="Sprite" parent="."]
|
||||
|
||||
transform/scale = Vector2( 1.2, 1 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
modulate = Color( 0.233166, 0.221219, 0.23582, 1 )
|
||||
|
||||
[node name="environment" type="WorldEnvironment" parent="."]
|
||||
|
||||
_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
|
||||
environment = SubResource( 1 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 0.0
|
||||
margin/top = 0.0
|
||||
margin/right = 40.0
|
||||
margin/bottom = 13.0
|
||||
custom_colors/font_color = Color( 0.213955, 0.205626, 0.20313, 1 )
|
||||
text = "Drag Left and Right"
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[application]
|
||||
|
||||
name="HDR for 2D"
|
||||
main_scene="res://beach_cave.scn"
|
||||
main_scene="res://beach_cave.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[display]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[application]
|
||||
|
||||
name="Hexagonal Game"
|
||||
main_scene="res://map.scn"
|
||||
main_scene="res://map.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,31 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
|
||||
mode = 0
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 82, 94 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 1
|
||||
cell/tile_origin = 0
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -458747, 1073741831, -393213, 1073741831, -393212, 1073741831, -393211, 6, -393210, 1073741831, -393209, 1073741830, -393208, 1073741830, -393207, 6, -393206, 8, -327679, 1073741831, -327678, 1073741831, -327677, 1073741831, -327676, 1073741830, -327675, 1073741831, -327674, 6, -327673, 6, -327672, 6, -327671, 6, -327670, 6, -327669, 0, -327668, 0, -262143, 1073741831, -262142, 1073741831, -262141, 6, -262140, 6, -262139, 0, -262138, 6, -262137, 1, -262136, 0, -262135, 1, -262134, 1, -262133, 0, -262132, 0, -262131, 0, -196608, 9, -196607, 1073741832, -196606, 1073741830, -196605, 2, -196604, 2, -196603, 1073741845, -196602, 21, -196601, 19, -196600, 1073741826, -196599, 0, -196598, 16, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -196593, 0, -131071, 0, -131070, 1, -131069, 1073741827, -131068, 1073741846, -131067, 20, -131066, 19, -131065, 2, -131064, 0, -131063, 14, -131062, 0, -131061, 0, -131060, 0, -131059, 0, -131058, 0, -131057, 0, -131056, 0, -65534, 1, -65533, 2, -65532, 1073741827, -65531, 1, -65530, 1, -65529, 0, -65528, 10, -65527, 12, -65526, 0, -65525, 0, -65524, 0, -65523, 0, -65522, 0, -65521, 0, -65520, 0, 1, 0, 2, 0, 3, 2, 4, 1073741826, 5, 1, 6, 15, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 65537, 0, 65538, 1, 65539, 1610612749, 65540, 1, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 1610612753, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 1073741848, 65551, 1073741849, 65552, 0, 131073, 0, 131074, 0, 131075, 0, 131076, 0, 131077, 1610612751, 131078, 1610612752, 131079, 1610612752, 131080, 1610612751, 131081, 1610612751, 131082, 0, 131083, 0, 131084, 0, 131085, 0, 131086, 0, 196612, 0, 196613, 1610612751, 196614, 1610612752, 196615, 1610612751, 196616, 1610612751, 196617, 1073741839, 196618, 1073741839, 196619, 0, 196620, 0, 196621, 0, 262150, 0, 262152, 0, 262154, 0, 262156, 0 )
|
||||
|
||||
[node name="troll" parent="." instance=ExtResource( 2 )]
|
||||
|
||||
transform/pos = Vector2( 602.819, -39.2876 )
|
||||
collision/margin = 0.001
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,240 @@
|
|||
[gd_resource type="TileSet" load_steps=27 format=1]
|
||||
|
||||
[ext_resource path="res://WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://WWT-11.png" type="Texture" id=3]
|
||||
[ext_resource path="res://WWT-12.png" type="Texture" id=4]
|
||||
[ext_resource path="res://WWT-13.png" type="Texture" id=5]
|
||||
[ext_resource path="res://WWT-14.png" type="Texture" id=6]
|
||||
[ext_resource path="res://WWT-15.png" type="Texture" id=7]
|
||||
[ext_resource path="res://WWT-16.png" type="Texture" id=8]
|
||||
[ext_resource path="res://WWT-17.png" type="Texture" id=9]
|
||||
[ext_resource path="res://WWT-18.png" type="Texture" id=10]
|
||||
[ext_resource path="res://WWT-19.png" type="Texture" id=11]
|
||||
[ext_resource path="res://WWT-20.png" type="Texture" id=12]
|
||||
[ext_resource path="res://WWT-03.png" type="Texture" id=13]
|
||||
[ext_resource path="res://WWT-21.png" type="Texture" id=14]
|
||||
[ext_resource path="res://WWT-22.png" type="Texture" id=15]
|
||||
[ext_resource path="res://WWT-23.png" type="Texture" id=16]
|
||||
[ext_resource path="res://WWT-24.png" type="Texture" id=17]
|
||||
[ext_resource path="res://WWT-25.png" type="Texture" id=18]
|
||||
[ext_resource path="res://WWT-26.png" type="Texture" id=19]
|
||||
[ext_resource path="res://WWT-04.png" type="Texture" id=20]
|
||||
[ext_resource path="res://WWT-05.png" type="Texture" id=21]
|
||||
[ext_resource path="res://WWT-06.png" type="Texture" id=22]
|
||||
[ext_resource path="res://WWT-07.png" type="Texture" id=23]
|
||||
[ext_resource path="res://WWT-08.png" type="Texture" id=24]
|
||||
[ext_resource path="res://WWT-09.png" type="Texture" id=25]
|
||||
[ext_resource path="res://WWT-10.png" type="Texture" id=26]
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "Tile 1"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -24, -17 )
|
||||
0/region = Rect2( 0, 0, 0, 0 )
|
||||
0/occluder_offset = Vector2( -0, -0 )
|
||||
0/navigation_offset = Vector2( -0, -0 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "Tile 2"
|
||||
1/texture = ExtResource( 2 )
|
||||
1/tex_offset = Vector2( -24, -17 )
|
||||
1/region = Rect2( 0, 0, 0, 0 )
|
||||
1/occluder_offset = Vector2( -0, -0 )
|
||||
1/navigation_offset = Vector2( -0, -0 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "Tile 3"
|
||||
2/texture = ExtResource( 13 )
|
||||
2/tex_offset = Vector2( -24, -17 )
|
||||
2/region = Rect2( 0, 0, 0, 0 )
|
||||
2/occluder_offset = Vector2( -0, -0 )
|
||||
2/navigation_offset = Vector2( -0, -0 )
|
||||
2/shape_offset = Vector2( 0, 0 )
|
||||
2/shapes = [ ]
|
||||
3/name = "Tile 4"
|
||||
3/texture = ExtResource( 20 )
|
||||
3/tex_offset = Vector2( -24, -17 )
|
||||
3/region = Rect2( 0, 0, 0, 0 )
|
||||
3/occluder_offset = Vector2( -0, -0 )
|
||||
3/navigation_offset = Vector2( -0, -0 )
|
||||
3/shape_offset = Vector2( 0, 0 )
|
||||
3/shapes = [ ]
|
||||
4/name = "Tile 5"
|
||||
4/texture = ExtResource( 21 )
|
||||
4/tex_offset = Vector2( -24, -17 )
|
||||
4/region = Rect2( 0, 0, 0, 0 )
|
||||
4/occluder_offset = Vector2( -0, -0 )
|
||||
4/navigation_offset = Vector2( -0, -0 )
|
||||
4/shape_offset = Vector2( 0, 0 )
|
||||
4/shapes = [ ]
|
||||
5/name = "Tile 6"
|
||||
5/texture = ExtResource( 22 )
|
||||
5/tex_offset = Vector2( -24, -17 )
|
||||
5/region = Rect2( 0, 0, 0, 0 )
|
||||
5/occluder_offset = Vector2( -0, -0 )
|
||||
5/navigation_offset = Vector2( -0, -0 )
|
||||
5/shape_offset = Vector2( 0, 0 )
|
||||
5/shapes = [ ]
|
||||
6/name = "Tile 7"
|
||||
6/texture = ExtResource( 23 )
|
||||
6/tex_offset = Vector2( -24, -17 )
|
||||
6/region = Rect2( 0, 0, 0, 0 )
|
||||
6/occluder_offset = Vector2( -0, -0 )
|
||||
6/navigation_offset = Vector2( -0, -0 )
|
||||
6/shape_offset = Vector2( 0, 0 )
|
||||
6/shapes = [ ]
|
||||
7/name = "Tile 8"
|
||||
7/texture = ExtResource( 24 )
|
||||
7/tex_offset = Vector2( -24, -17 )
|
||||
7/region = Rect2( 0, 0, 0, 0 )
|
||||
7/occluder_offset = Vector2( -0, -0 )
|
||||
7/navigation_offset = Vector2( -0, -0 )
|
||||
7/shape_offset = Vector2( 0, 0 )
|
||||
7/shapes = [ ]
|
||||
8/name = "Tile 9"
|
||||
8/texture = ExtResource( 25 )
|
||||
8/tex_offset = Vector2( -24, -17 )
|
||||
8/region = Rect2( 0, 0, 0, 0 )
|
||||
8/occluder_offset = Vector2( -0, -0 )
|
||||
8/navigation_offset = Vector2( -0, -0 )
|
||||
8/shape_offset = Vector2( 0, 0 )
|
||||
8/shapes = [ ]
|
||||
9/name = "Tile 10"
|
||||
9/texture = ExtResource( 26 )
|
||||
9/tex_offset = Vector2( -24, -17 )
|
||||
9/region = Rect2( 0, 0, 0, 0 )
|
||||
9/occluder_offset = Vector2( -0, -0 )
|
||||
9/navigation_offset = Vector2( -0, -0 )
|
||||
9/shape_offset = Vector2( 0, 0 )
|
||||
9/shapes = [ ]
|
||||
10/name = "Tile 11"
|
||||
10/texture = ExtResource( 3 )
|
||||
10/tex_offset = Vector2( -24, -17 )
|
||||
10/region = Rect2( 0, 0, 0, 0 )
|
||||
10/occluder_offset = Vector2( -0, -0 )
|
||||
10/navigation_offset = Vector2( -0, -0 )
|
||||
10/shape_offset = Vector2( 0, 0 )
|
||||
10/shapes = [ ]
|
||||
11/name = "Tile 12"
|
||||
11/texture = ExtResource( 4 )
|
||||
11/tex_offset = Vector2( -24, -17 )
|
||||
11/region = Rect2( 0, 0, 0, 0 )
|
||||
11/occluder_offset = Vector2( -0, -0 )
|
||||
11/navigation_offset = Vector2( -0, -0 )
|
||||
11/shape_offset = Vector2( 0, 0 )
|
||||
11/shapes = [ ]
|
||||
12/name = "Tile 13"
|
||||
12/texture = ExtResource( 5 )
|
||||
12/tex_offset = Vector2( -24, -17 )
|
||||
12/region = Rect2( 0, 0, 0, 0 )
|
||||
12/occluder_offset = Vector2( -0, -0 )
|
||||
12/navigation_offset = Vector2( -0, -0 )
|
||||
12/shape_offset = Vector2( 0, 0 )
|
||||
12/shapes = [ ]
|
||||
13/name = "Tile 14"
|
||||
13/texture = ExtResource( 6 )
|
||||
13/tex_offset = Vector2( -24, -17 )
|
||||
13/region = Rect2( 0, 0, 0, 0 )
|
||||
13/occluder_offset = Vector2( -0, -0 )
|
||||
13/navigation_offset = Vector2( -0, -0 )
|
||||
13/shape_offset = Vector2( 0, 0 )
|
||||
13/shapes = [ ]
|
||||
14/name = "Tile 15"
|
||||
14/texture = ExtResource( 7 )
|
||||
14/tex_offset = Vector2( -24, -17 )
|
||||
14/region = Rect2( 0, 0, 0, 0 )
|
||||
14/occluder_offset = Vector2( -0, -0 )
|
||||
14/navigation_offset = Vector2( -0, -0 )
|
||||
14/shape_offset = Vector2( 0, 0 )
|
||||
14/shapes = [ ]
|
||||
15/name = "Tile 16"
|
||||
15/texture = ExtResource( 8 )
|
||||
15/tex_offset = Vector2( -24, -17 )
|
||||
15/region = Rect2( 0, 0, 0, 0 )
|
||||
15/occluder_offset = Vector2( -0, -0 )
|
||||
15/navigation_offset = Vector2( -0, -0 )
|
||||
15/shape_offset = Vector2( 0, 0 )
|
||||
15/shapes = [ ]
|
||||
16/name = "Tile 17"
|
||||
16/texture = ExtResource( 9 )
|
||||
16/tex_offset = Vector2( -24, -17 )
|
||||
16/region = Rect2( 0, 0, 0, 0 )
|
||||
16/occluder_offset = Vector2( -0, -0 )
|
||||
16/navigation_offset = Vector2( -0, -0 )
|
||||
16/shape_offset = Vector2( 0, 0 )
|
||||
16/shapes = [ ]
|
||||
17/name = "Tile 18"
|
||||
17/texture = ExtResource( 10 )
|
||||
17/tex_offset = Vector2( -24, -17 )
|
||||
17/region = Rect2( 0, 0, 0, 0 )
|
||||
17/occluder_offset = Vector2( -0, -0 )
|
||||
17/navigation_offset = Vector2( -0, -0 )
|
||||
17/shape_offset = Vector2( 0, 0 )
|
||||
17/shapes = [ ]
|
||||
18/name = "Tile 19"
|
||||
18/texture = ExtResource( 11 )
|
||||
18/tex_offset = Vector2( -24, -17 )
|
||||
18/region = Rect2( 0, 0, 0, 0 )
|
||||
18/occluder_offset = Vector2( -0, -0 )
|
||||
18/navigation_offset = Vector2( -0, -0 )
|
||||
18/shape_offset = Vector2( 0, 0 )
|
||||
18/shapes = [ ]
|
||||
19/name = "Tile 20"
|
||||
19/texture = ExtResource( 12 )
|
||||
19/tex_offset = Vector2( -24, -17 )
|
||||
19/region = Rect2( 0, 0, 0, 0 )
|
||||
19/occluder_offset = Vector2( -0, -0 )
|
||||
19/navigation_offset = Vector2( -0, -0 )
|
||||
19/shape_offset = Vector2( 0, 0 )
|
||||
19/shapes = [ ]
|
||||
20/name = "Tile 21"
|
||||
20/texture = ExtResource( 14 )
|
||||
20/tex_offset = Vector2( -24, -17 )
|
||||
20/region = Rect2( 0, 0, 0, 0 )
|
||||
20/occluder_offset = Vector2( -0, -0 )
|
||||
20/navigation_offset = Vector2( -0, -0 )
|
||||
20/shape_offset = Vector2( 0, 0 )
|
||||
20/shapes = [ ]
|
||||
21/name = "Tile 22"
|
||||
21/texture = ExtResource( 15 )
|
||||
21/tex_offset = Vector2( -24, -17 )
|
||||
21/region = Rect2( 0, 0, 0, 0 )
|
||||
21/occluder_offset = Vector2( -0, -0 )
|
||||
21/navigation_offset = Vector2( -0, -0 )
|
||||
21/shape_offset = Vector2( 0, 0 )
|
||||
21/shapes = [ ]
|
||||
22/name = "Tile 23"
|
||||
22/texture = ExtResource( 16 )
|
||||
22/tex_offset = Vector2( -24, -17 )
|
||||
22/region = Rect2( 0, 0, 0, 0 )
|
||||
22/occluder_offset = Vector2( -0, -0 )
|
||||
22/navigation_offset = Vector2( -0, -0 )
|
||||
22/shape_offset = Vector2( 0, 0 )
|
||||
22/shapes = [ ]
|
||||
23/name = "Tile 24"
|
||||
23/texture = ExtResource( 17 )
|
||||
23/tex_offset = Vector2( -24, -17 )
|
||||
23/region = Rect2( 0, 0, 0, 0 )
|
||||
23/occluder_offset = Vector2( -0, -0 )
|
||||
23/navigation_offset = Vector2( -0, -0 )
|
||||
23/shape_offset = Vector2( 0, 0 )
|
||||
23/shapes = [ ]
|
||||
24/name = "Tile 25"
|
||||
24/texture = ExtResource( 18 )
|
||||
24/tex_offset = Vector2( -24, -17 )
|
||||
24/region = Rect2( 0, 0, 0, 0 )
|
||||
24/occluder_offset = Vector2( -0, -0 )
|
||||
24/navigation_offset = Vector2( -0, -0 )
|
||||
24/shape_offset = Vector2( 0, 0 )
|
||||
24/shapes = [ ]
|
||||
25/name = "Tile 26"
|
||||
25/texture = ExtResource( 19 )
|
||||
25/tex_offset = Vector2( -24, -17 )
|
||||
25/region = Rect2( 0, 0, 0, 0 )
|
||||
25/occluder_offset = Vector2( -0, -0 )
|
||||
25/navigation_offset = Vector2( -0, -0 )
|
||||
25/shape_offset = Vector2( 0, 0 )
|
||||
25/shapes = [ ]
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
[gd_scene load_steps=27 format=1]
|
||||
|
||||
[ext_resource path="res://WWT-01.png" type="Texture" id=1]
|
||||
[ext_resource path="res://WWT-02.png" type="Texture" id=2]
|
||||
[ext_resource path="res://WWT-03.png" type="Texture" id=3]
|
||||
[ext_resource path="res://WWT-04.png" type="Texture" id=4]
|
||||
[ext_resource path="res://WWT-05.png" type="Texture" id=5]
|
||||
[ext_resource path="res://WWT-06.png" type="Texture" id=6]
|
||||
[ext_resource path="res://WWT-07.png" type="Texture" id=7]
|
||||
[ext_resource path="res://WWT-08.png" type="Texture" id=8]
|
||||
[ext_resource path="res://WWT-09.png" type="Texture" id=9]
|
||||
[ext_resource path="res://WWT-10.png" type="Texture" id=10]
|
||||
[ext_resource path="res://WWT-11.png" type="Texture" id=11]
|
||||
[ext_resource path="res://WWT-12.png" type="Texture" id=12]
|
||||
[ext_resource path="res://WWT-13.png" type="Texture" id=13]
|
||||
[ext_resource path="res://WWT-14.png" type="Texture" id=14]
|
||||
[ext_resource path="res://WWT-15.png" type="Texture" id=15]
|
||||
[ext_resource path="res://WWT-16.png" type="Texture" id=16]
|
||||
[ext_resource path="res://WWT-17.png" type="Texture" id=17]
|
||||
[ext_resource path="res://WWT-18.png" type="Texture" id=18]
|
||||
[ext_resource path="res://WWT-19.png" type="Texture" id=19]
|
||||
[ext_resource path="res://WWT-20.png" type="Texture" id=20]
|
||||
[ext_resource path="res://WWT-21.png" type="Texture" id=21]
|
||||
[ext_resource path="res://WWT-22.png" type="Texture" id=22]
|
||||
[ext_resource path="res://WWT-23.png" type="Texture" id=23]
|
||||
[ext_resource path="res://WWT-24.png" type="Texture" id=24]
|
||||
[ext_resource path="res://WWT-25.png" type="Texture" id=25]
|
||||
[ext_resource path="res://WWT-26.png" type="Texture" id=26]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="Tile 1" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 1 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 2" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 3" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 3 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 4" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 4 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 5" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 5 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 6" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 6 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 7" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 7 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 8" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 8 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 9" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 9 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 10" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 10 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 11" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 11 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 12" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 12 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 13" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 13 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 14" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 14 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 15" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 15 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 16" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 16 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 17" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 17 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 18" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 18 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 19" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 19 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 20" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 20 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 21" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 21 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 22" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 22 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 23" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 23 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 24" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 24 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 25" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 25 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
[node name="Tile 26" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 96.6174, 42.2665 )
|
||||
texture = ExtResource( 26 )
|
||||
centered = false
|
||||
offset = Vector2( -24, -17 )
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 3.24216, 19.453 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,49 @@
|
|||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=1]
|
||||
[ext_resource path="res://troll.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="dungeon" type="Node2D"]
|
||||
|
||||
[node name="floor" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 128, 64 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = false
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -851956, 0, -851955, 0, -851954, 0, -786420, 1, -786419, 0, -786418, 0, -720884, 0, -720883, 0, -720882, 0, -655348, 1, -655347, 0, -655346, 0, -589812, 1, -589811, 0, -589810, 0, -524276, 0, -524275, 1, -524274, 0, -458740, 0, -458739, 0, -458738, 0, -393210, 0, -393209, 0, -393208, 0, -393207, 0, -393206, 0, -393205, 0, -393204, 0, -393203, 0, -393202, 0, -327674, 0, -327673, 0, -327672, 1, -327671, 1, -327670, 1, -327669, 1, -327668, 1, -327667, 0, -327666, 0, -262138, 0, -262137, 0, -262136, 0, -262135, 0, -262134, 0, -262133, 0, -262132, 0, -262131, 0, -262130, 0, -196602, 0, -196601, 0, -196600, 0, -196599, 0, -196598, 0, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -131066, 0, -131065, 0, -131064, 0, -131063, 0, -65530, 0, -65529, 0, -65528, 0, -65527, 0, 6, 0, 7, 1, 8, 0, 9, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 131078, 0, 131079, 0, 131080, 0, 131081, 0, 196614, 0, 196615, 0, 196616, 0 )
|
||||
|
||||
[node name="walls" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 1 )
|
||||
cell/size = Vector2( 128, 64 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = true
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -917493, 2, -917492, 2, -917491, 2, -917490, 2, -917489, 2, -851957, 2, -851956, 3, -851954, 3, -851953, 2, -786421, 2, -786420, 3, -786418, 3, -786417, 2, -720885, 2, -720881, 2, -655349, 2, -655348, 2, -655346, 3, -655345, 2, -589813, 2, -589809, 2, -524277, 2, -524273, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 536870916, -458743, 536870916, -458742, 2, -458741, 2, -458740, 2, -458738, 2, -458737, 2, -393211, 2, -393209, 3, -393205, 3, -393201, 2, -327675, 4, -327665, 2, -262139, 4, -262134, 3, -262133, 3, -262129, 2, -196603, 2, -196601, 3, -196593, 2, -131067, 2, -131066, 3, -131062, 2, -131061, 2, -131060, 2, -131059, 2, -131058, 2, -131057, 2, -65531, 2, -65530, 2, -65527, 2, -65526, 2, 5, 2, 10, 2, 65541, 2, 65543, 3, 65546, 2, 131077, 2, 131082, 2, 196613, 2, 196618, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 262154, 2 )
|
||||
|
||||
[node name="troll" parent="walls" instance=ExtResource( 2 )]
|
||||
|
||||
transform/pos = Vector2( 299.38, 326.037 )
|
||||
collision/margin = 0.001
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[application]
|
||||
|
||||
name="Isometric Game"
|
||||
main_scene="res://dungeon.scn"
|
||||
main_scene="res://dungeon.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[image_loader]
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,67 @@
|
|||
[gd_resource type="TileSet" load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 28, -6, 4, 10, 12, -22 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 )
|
||||
|
||||
[resource]
|
||||
|
||||
0/name = "base"
|
||||
0/texture = ExtResource( 1 )
|
||||
0/tex_offset = Vector2( -4, 6 )
|
||||
0/region = Rect2( 28, 92, 132, 84 )
|
||||
0/occluder_offset = Vector2( 66, 42 )
|
||||
0/navigation_offset = Vector2( 66, 42 )
|
||||
0/shape_offset = Vector2( 0, 0 )
|
||||
0/shapes = [ ]
|
||||
1/name = "base2"
|
||||
1/texture = ExtResource( 1 )
|
||||
1/tex_offset = Vector2( -4, 6 )
|
||||
1/region = Rect2( 220, 92, 132, 84 )
|
||||
1/occluder_offset = Vector2( 66, 42 )
|
||||
1/navigation_offset = Vector2( 66, 42 )
|
||||
1/shape_offset = Vector2( 0, 0 )
|
||||
1/shapes = [ ]
|
||||
2/name = "wall"
|
||||
2/texture = ExtResource( 1 )
|
||||
2/tex_offset = Vector2( -4, -32 )
|
||||
2/region = Rect2( 28, 220, 132, 136 )
|
||||
2/occluder_offset = Vector2( 66, 68 )
|
||||
2/navigation_offset = Vector2( 66, 68 )
|
||||
2/shape_offset = Vector2( 66, 68 )
|
||||
2/shapes = [ SubResource( 1 ) ]
|
||||
3/name = "column"
|
||||
3/texture = ExtResource( 1 )
|
||||
3/tex_offset = Vector2( -2, -32 )
|
||||
3/region = Rect2( 220, 220, 132, 136 )
|
||||
3/occluder_offset = Vector2( 66, 68 )
|
||||
3/navigation_offset = Vector2( 66, 68 )
|
||||
3/shape_offset = Vector2( 66, 68 )
|
||||
3/shapes = [ SubResource( 2 ), SubResource( 3 ) ]
|
||||
4/name = "door1"
|
||||
4/texture = ExtResource( 1 )
|
||||
4/tex_offset = Vector2( 16, -22 )
|
||||
4/region = Rect2( 24, 408, 132, 136 )
|
||||
4/occluder_offset = Vector2( 66, 68 )
|
||||
4/navigation_offset = Vector2( 66, 68 )
|
||||
4/shape_offset = Vector2( 66, 68 )
|
||||
4/shapes = [ SubResource( 4 ) ]
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
[gd_scene load_steps=6 format=1]
|
||||
|
||||
[ext_resource path="res://isotiles.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 28, -6, 4, 10, 12, -22 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 )
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
[node name="base" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 87.5658, 0.113792 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, 6 )
|
||||
region = true
|
||||
region_rect = Rect2( 28, 92, 132, 84 )
|
||||
|
||||
[node name="base2" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 196, 44 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, 6 )
|
||||
region = true
|
||||
region_rect = Rect2( 220, 92, 132, 84 )
|
||||
|
||||
[node name="wall" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 356, 70 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -4, -32 )
|
||||
region = true
|
||||
region_rect = Rect2( 28, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="wall"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -68, 2, -4, 34, 60, 2, -4, -30 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
[node name="column" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 292, 198 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( -2, -32 )
|
||||
region = true
|
||||
region_rect = Rect2( 220, 220, 132, 136 )
|
||||
|
||||
[node name="StaticBody" type="StaticBody2D" parent="column"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 2 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
shapes/1/shape = SubResource( 3 )
|
||||
shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/1/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="column/StaticBody"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
[node name="door1" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( 85.905, 0.62516 )
|
||||
texture = ExtResource( 1 )
|
||||
offset = Vector2( 16, -22 )
|
||||
region = true
|
||||
region_rect = Rect2( 24, 408, 132, 136 )
|
||||
|
||||
[node name="StaticBody2D" type="StaticBody2D" parent="door1"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 4 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="door1/StaticBody2D"]
|
||||
|
||||
build_mode = 0
|
||||
polygon = Vector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 )
|
||||
shape_range = Vector2( -1, -1 )
|
||||
trigger = false
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,53 @@
|
|||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://troll.gd" type="Script" id=1]
|
||||
[ext_resource path="res://troll.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 16.0
|
||||
|
||||
[node name="troll" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, -0.342697, -0.980721 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.001
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
transform/pos = Vector2( -3.94334, -36.924 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.342697, -0.980721 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
[gd_resource type="CanvasItemMaterial" load_steps=2 format=1]
|
||||
|
||||
[sub_resource type="CanvasItemShader" id=1]
|
||||
|
||||
_code = { "fragment":"//there is no albedo (all shading is normal)\nuniform color col;\nCOLOR=col;\n//sample normal texture\nvec4 ntex = tex(TEXTURE,UV);\n//take the alpha from the normal texture\nCOLOR.a=ntex.a;\n//adjust normalmap from [0..1] to [-1..1]\nntex.rgb = ntex.rgb * vec3(-2,-2,1) - vec3(-1,-1,0);\n//half size of the tile \nvec2 tile_vec=vec2(47,22);\n//rotation to convert the normal to pseudo 3d coordinates\n//this could be optimized\nfloat r = asin(tile_vec.y / tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\n\n//pass the normal\nNORMAL = rot_mat * ntex.rgb;\n\n\n\n\n", "fragment_ofs":0, "light":"//apply the normal as simple diffuse (same as default code)\nvec3 light_normal = normalize(vec3(LIGHT_VEC,-LIGHT_HEIGHT));\nLIGHT=LIGHT_COLOR*COLOR*max(dot(-light_normal,NORMAL),0.0);\n//substract light position to be always aligned to the bottom of the sprite\n//this makes lighting on it look like a billboard\nLIGHT_VEC.y-=VAR1.y;\n", "light_ofs":0, "vertex":"// pass the local sprite coordinates through a varying\n// the red cross in the sprite is the 0,0\nVAR1.xy=SRC_VERTEX;", "vertex_ofs":0 }
|
||||
|
||||
[resource]
|
||||
|
||||
shader/shader = SubResource( 1 )
|
||||
shader/shading_mode = 0
|
||||
shader_param/col = Color( 1, 0.836638, 0.693806, 1 )
|
||||
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,52 @@
|
|||
[gd_scene load_steps=5 format=1]
|
||||
|
||||
[ext_resource path="res://wall_shader.tres" type="CanvasItemMaterial" id=1]
|
||||
[ext_resource path="res://faceColor.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 20.0
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id=2]
|
||||
|
||||
closed = false
|
||||
cull_mode = 0
|
||||
polygon = Vector2Array( -16.1183, 62.9508, 4.32091, 74.9223, 23.3002, 65.2867 )
|
||||
|
||||
[node name="column" type="StaticBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 1.36365, 7.83751 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
constant_linear_velocity = Vector2( 0, 0 )
|
||||
constant_angular_velocity = 0.0
|
||||
friction = 1.0
|
||||
bounce = 0.0
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
material/material = ExtResource( 1 )
|
||||
transform/pos = Vector2( 0.487671, 0.487679 )
|
||||
texture = ExtResource( 2 )
|
||||
offset = Vector2( -4.37984, -50.8523 )
|
||||
region = true
|
||||
region_rect = Rect2( 569, 179, 48, 154 )
|
||||
|
||||
[node name="occluder" type="LightOccluder2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -3.90138, -50.97 )
|
||||
occluder = SubResource( 2 )
|
||||
light_mask = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( 1.36365, 7.83751 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ func _input(event):
|
|||
if (event.type == InputEvent.MOUSE_BUTTON and event.button_index == 1 and event.pressed and shoot_countdown <= 0):
|
||||
var pos = get_canvas_transform().affine_inverse()*event.pos
|
||||
var dir = (pos - get_global_pos()).normalized()
|
||||
var bullet = preload("res://shoot.scn").instance()
|
||||
var bullet = preload("res://shoot.tscn").instance()
|
||||
bullet.advance_dir = dir
|
||||
bullet.set_pos(get_global_pos() + dir*60)
|
||||
get_parent().add_child(bullet)
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,327 @@
|
|||
[gd_scene load_steps=173 format=1]
|
||||
|
||||
[ext_resource path="res://cubio.gd" type="Script" id=1]
|
||||
[ext_resource path="res://character_shader.tres" type="CanvasItemMaterial" id=2]
|
||||
[ext_resource path="res://cubio/idle0001.png" type="Texture" id=3]
|
||||
[ext_resource path="res://cubio/idle0002.png" type="Texture" id=4]
|
||||
[ext_resource path="res://cubio/idle0003.png" type="Texture" id=5]
|
||||
[ext_resource path="res://cubio/idle0004.png" type="Texture" id=6]
|
||||
[ext_resource path="res://cubio/idle0005.png" type="Texture" id=7]
|
||||
[ext_resource path="res://cubio/idle0006.png" type="Texture" id=8]
|
||||
[ext_resource path="res://cubio/idle0007.png" type="Texture" id=9]
|
||||
[ext_resource path="res://cubio/idle0008.png" type="Texture" id=10]
|
||||
[ext_resource path="res://cubio/idle0009.png" type="Texture" id=11]
|
||||
[ext_resource path="res://cubio/idle0010.png" type="Texture" id=12]
|
||||
[ext_resource path="res://cubio/idle0011.png" type="Texture" id=13]
|
||||
[ext_resource path="res://cubio/idle0012.png" type="Texture" id=14]
|
||||
[ext_resource path="res://cubio/idle0013.png" type="Texture" id=15]
|
||||
[ext_resource path="res://cubio/idle0014.png" type="Texture" id=16]
|
||||
[ext_resource path="res://cubio/idle0015.png" type="Texture" id=17]
|
||||
[ext_resource path="res://cubio/idle0016.png" type="Texture" id=18]
|
||||
[ext_resource path="res://cubio/idle0017.png" type="Texture" id=19]
|
||||
[ext_resource path="res://cubio/idle0018.png" type="Texture" id=20]
|
||||
[ext_resource path="res://cubio/idle0019.png" type="Texture" id=21]
|
||||
[ext_resource path="res://cubio/idle0020.png" type="Texture" id=22]
|
||||
[ext_resource path="res://cubio/idle0021.png" type="Texture" id=23]
|
||||
[ext_resource path="res://cubio/idle0022.png" type="Texture" id=24]
|
||||
[ext_resource path="res://cubio/idle0023.png" type="Texture" id=25]
|
||||
[ext_resource path="res://cubio/idle0024.png" type="Texture" id=26]
|
||||
[ext_resource path="res://cubio/idle0025.png" type="Texture" id=27]
|
||||
[ext_resource path="res://cubio/idle0026.png" type="Texture" id=28]
|
||||
[ext_resource path="res://cubio/idle0027.png" type="Texture" id=29]
|
||||
[ext_resource path="res://cubio/idle0028.png" type="Texture" id=30]
|
||||
[ext_resource path="res://cubio/idle0029.png" type="Texture" id=31]
|
||||
[ext_resource path="res://cubio/idle0030.png" type="Texture" id=32]
|
||||
[ext_resource path="res://cubio/idle0031.png" type="Texture" id=33]
|
||||
[ext_resource path="res://cubio/idle0032.png" type="Texture" id=34]
|
||||
[ext_resource path="res://cubio/idle0033.png" type="Texture" id=35]
|
||||
[ext_resource path="res://cubio/idle0034.png" type="Texture" id=36]
|
||||
[ext_resource path="res://cubio/idle0035.png" type="Texture" id=37]
|
||||
[ext_resource path="res://cubio/idle0036.png" type="Texture" id=38]
|
||||
[ext_resource path="res://cubio/idle0037.png" type="Texture" id=39]
|
||||
[ext_resource path="res://cubio/idle0038.png" type="Texture" id=40]
|
||||
[ext_resource path="res://cubio/idle0039.png" type="Texture" id=41]
|
||||
[ext_resource path="res://cubio/idle0040.png" type="Texture" id=42]
|
||||
[ext_resource path="res://cubio/idle0041.png" type="Texture" id=43]
|
||||
[ext_resource path="res://cubio/idle0042.png" type="Texture" id=44]
|
||||
[ext_resource path="res://cubio/idle0043.png" type="Texture" id=45]
|
||||
[ext_resource path="res://cubio/idle0044.png" type="Texture" id=46]
|
||||
[ext_resource path="res://cubio/idle0045.png" type="Texture" id=47]
|
||||
[ext_resource path="res://cubio/idle0046.png" type="Texture" id=48]
|
||||
[ext_resource path="res://cubio/idle0047.png" type="Texture" id=49]
|
||||
[ext_resource path="res://cubio/idle0048.png" type="Texture" id=50]
|
||||
[ext_resource path="res://cubio/idle0049.png" type="Texture" id=51]
|
||||
[ext_resource path="res://cubio/idle0050.png" type="Texture" id=52]
|
||||
[ext_resource path="res://cubio/idle0051.png" type="Texture" id=53]
|
||||
[ext_resource path="res://cubio/idle0052.png" type="Texture" id=54]
|
||||
[ext_resource path="res://cubio/idle0053.png" type="Texture" id=55]
|
||||
[ext_resource path="res://cubio/idle0054.png" type="Texture" id=56]
|
||||
[ext_resource path="res://cubio/idle0055.png" type="Texture" id=57]
|
||||
[ext_resource path="res://cubio/idle0056.png" type="Texture" id=58]
|
||||
[ext_resource path="res://cubio/idle0057.png" type="Texture" id=59]
|
||||
[ext_resource path="res://cubio/idle0058.png" type="Texture" id=60]
|
||||
[ext_resource path="res://cubio/idle0059.png" type="Texture" id=61]
|
||||
[ext_resource path="res://cubio/idle0060.png" type="Texture" id=62]
|
||||
[ext_resource path="res://cubio/norm-b-0001.png" type="Texture" id=63]
|
||||
[ext_resource path="res://cubio/norm-b-0002.png" type="Texture" id=64]
|
||||
[ext_resource path="res://cubio/norm-b-0003.png" type="Texture" id=65]
|
||||
[ext_resource path="res://cubio/norm-b-0004.png" type="Texture" id=66]
|
||||
[ext_resource path="res://cubio/norm-b-0005.png" type="Texture" id=67]
|
||||
[ext_resource path="res://cubio/norm-b-0006.png" type="Texture" id=68]
|
||||
[ext_resource path="res://cubio/norm-b-0007.png" type="Texture" id=69]
|
||||
[ext_resource path="res://cubio/norm-b-0008.png" type="Texture" id=70]
|
||||
[ext_resource path="res://cubio/norm-b-0009.png" type="Texture" id=71]
|
||||
[ext_resource path="res://cubio/norm-b-0010.png" type="Texture" id=72]
|
||||
[ext_resource path="res://cubio/norm-b-0011.png" type="Texture" id=73]
|
||||
[ext_resource path="res://cubio/norm-b-0012.png" type="Texture" id=74]
|
||||
[ext_resource path="res://cubio/norm-b-0013.png" type="Texture" id=75]
|
||||
[ext_resource path="res://cubio/norm-b-0014.png" type="Texture" id=76]
|
||||
[ext_resource path="res://cubio/norm-b-0015.png" type="Texture" id=77]
|
||||
[ext_resource path="res://cubio/norm-b-0016.png" type="Texture" id=78]
|
||||
[ext_resource path="res://cubio/norm-b-0017.png" type="Texture" id=79]
|
||||
[ext_resource path="res://cubio/norm-b-0018.png" type="Texture" id=80]
|
||||
[ext_resource path="res://cubio/norm-b-0019.png" type="Texture" id=81]
|
||||
[ext_resource path="res://cubio/norm-b-0020.png" type="Texture" id=82]
|
||||
[ext_resource path="res://cubio/norm-bl-0001.png" type="Texture" id=83]
|
||||
[ext_resource path="res://cubio/norm-bl-0002.png" type="Texture" id=84]
|
||||
[ext_resource path="res://cubio/norm-bl-0003.png" type="Texture" id=85]
|
||||
[ext_resource path="res://cubio/norm-bl-0004.png" type="Texture" id=86]
|
||||
[ext_resource path="res://cubio/norm-bl-0005.png" type="Texture" id=87]
|
||||
[ext_resource path="res://cubio/norm-bl-0006.png" type="Texture" id=88]
|
||||
[ext_resource path="res://cubio/norm-bl-0007.png" type="Texture" id=89]
|
||||
[ext_resource path="res://cubio/norm-bl-0008.png" type="Texture" id=90]
|
||||
[ext_resource path="res://cubio/norm-bl-0009.png" type="Texture" id=91]
|
||||
[ext_resource path="res://cubio/norm-bl-0010.png" type="Texture" id=92]
|
||||
[ext_resource path="res://cubio/norm-bl-0011.png" type="Texture" id=93]
|
||||
[ext_resource path="res://cubio/norm-bl-0012.png" type="Texture" id=94]
|
||||
[ext_resource path="res://cubio/norm-bl-0013.png" type="Texture" id=95]
|
||||
[ext_resource path="res://cubio/norm-bl-0014.png" type="Texture" id=96]
|
||||
[ext_resource path="res://cubio/norm-bl-0015.png" type="Texture" id=97]
|
||||
[ext_resource path="res://cubio/norm-bl-0016.png" type="Texture" id=98]
|
||||
[ext_resource path="res://cubio/norm-bl-0017.png" type="Texture" id=99]
|
||||
[ext_resource path="res://cubio/norm-bl-0018.png" type="Texture" id=100]
|
||||
[ext_resource path="res://cubio/norm-bl-0019.png" type="Texture" id=101]
|
||||
[ext_resource path="res://cubio/norm-bl-0020.png" type="Texture" id=102]
|
||||
[ext_resource path="res://cubio/norm-l-0001.png" type="Texture" id=103]
|
||||
[ext_resource path="res://cubio/norm-l-0002.png" type="Texture" id=104]
|
||||
[ext_resource path="res://cubio/norm-l-0003.png" type="Texture" id=105]
|
||||
[ext_resource path="res://cubio/norm-l-0004.png" type="Texture" id=106]
|
||||
[ext_resource path="res://cubio/norm-l-0005.png" type="Texture" id=107]
|
||||
[ext_resource path="res://cubio/norm-l-0006.png" type="Texture" id=108]
|
||||
[ext_resource path="res://cubio/norm-l-0007.png" type="Texture" id=109]
|
||||
[ext_resource path="res://cubio/norm-l-0008.png" type="Texture" id=110]
|
||||
[ext_resource path="res://cubio/norm-l-0009.png" type="Texture" id=111]
|
||||
[ext_resource path="res://cubio/norm-l-0010.png" type="Texture" id=112]
|
||||
[ext_resource path="res://cubio/norm-l-0011.png" type="Texture" id=113]
|
||||
[ext_resource path="res://cubio/norm-l-0012.png" type="Texture" id=114]
|
||||
[ext_resource path="res://cubio/norm-l-0013.png" type="Texture" id=115]
|
||||
[ext_resource path="res://cubio/norm-l-0014.png" type="Texture" id=116]
|
||||
[ext_resource path="res://cubio/norm-l-0015.png" type="Texture" id=117]
|
||||
[ext_resource path="res://cubio/norm-l-0016.png" type="Texture" id=118]
|
||||
[ext_resource path="res://cubio/norm-l-0017.png" type="Texture" id=119]
|
||||
[ext_resource path="res://cubio/norm-l-0018.png" type="Texture" id=120]
|
||||
[ext_resource path="res://cubio/norm-l-0019.png" type="Texture" id=121]
|
||||
[ext_resource path="res://cubio/norm-l-0020.png" type="Texture" id=122]
|
||||
[ext_resource path="res://cubio/norm-u-0001.png" type="Texture" id=123]
|
||||
[ext_resource path="res://cubio/norm-u-0002.png" type="Texture" id=124]
|
||||
[ext_resource path="res://cubio/norm-u-0003.png" type="Texture" id=125]
|
||||
[ext_resource path="res://cubio/norm-u-0004.png" type="Texture" id=126]
|
||||
[ext_resource path="res://cubio/norm-u-0005.png" type="Texture" id=127]
|
||||
[ext_resource path="res://cubio/norm-u-0006.png" type="Texture" id=128]
|
||||
[ext_resource path="res://cubio/norm-u-0007.png" type="Texture" id=129]
|
||||
[ext_resource path="res://cubio/norm-u-0008.png" type="Texture" id=130]
|
||||
[ext_resource path="res://cubio/norm-u-0009.png" type="Texture" id=131]
|
||||
[ext_resource path="res://cubio/norm-u-0010.png" type="Texture" id=132]
|
||||
[ext_resource path="res://cubio/norm-u-0011.png" type="Texture" id=133]
|
||||
[ext_resource path="res://cubio/norm-u-0012.png" type="Texture" id=134]
|
||||
[ext_resource path="res://cubio/norm-u-0013.png" type="Texture" id=135]
|
||||
[ext_resource path="res://cubio/norm-u-0014.png" type="Texture" id=136]
|
||||
[ext_resource path="res://cubio/norm-u-0015.png" type="Texture" id=137]
|
||||
[ext_resource path="res://cubio/norm-u-0016.png" type="Texture" id=138]
|
||||
[ext_resource path="res://cubio/norm-u-0017.png" type="Texture" id=139]
|
||||
[ext_resource path="res://cubio/norm-u-0018.png" type="Texture" id=140]
|
||||
[ext_resource path="res://cubio/norm-u-0019.png" type="Texture" id=141]
|
||||
[ext_resource path="res://cubio/norm-u-0020.png" type="Texture" id=142]
|
||||
[ext_resource path="res://cubio/norm-ul-0001.png" type="Texture" id=143]
|
||||
[ext_resource path="res://cubio/norm-ul-0002.png" type="Texture" id=144]
|
||||
[ext_resource path="res://cubio/norm-ul-0003.png" type="Texture" id=145]
|
||||
[ext_resource path="res://cubio/norm-ul-0004.png" type="Texture" id=146]
|
||||
[ext_resource path="res://cubio/norm-ul-0005.png" type="Texture" id=147]
|
||||
[ext_resource path="res://cubio/norm-ul-0006.png" type="Texture" id=148]
|
||||
[ext_resource path="res://cubio/norm-ul-0007.png" type="Texture" id=149]
|
||||
[ext_resource path="res://cubio/norm-ul-0008.png" type="Texture" id=150]
|
||||
[ext_resource path="res://cubio/norm-ul-0009.png" type="Texture" id=151]
|
||||
[ext_resource path="res://cubio/norm-ul-0010.png" type="Texture" id=152]
|
||||
[ext_resource path="res://cubio/norm-ul-0011.png" type="Texture" id=153]
|
||||
[ext_resource path="res://cubio/norm-ul-0012.png" type="Texture" id=154]
|
||||
[ext_resource path="res://cubio/norm-ul-0013.png" type="Texture" id=155]
|
||||
[ext_resource path="res://cubio/norm-ul-0014.png" type="Texture" id=156]
|
||||
[ext_resource path="res://cubio/norm-ul-0015.png" type="Texture" id=157]
|
||||
[ext_resource path="res://cubio/norm-ul-0016.png" type="Texture" id=158]
|
||||
[ext_resource path="res://cubio/norm-ul-0017.png" type="Texture" id=159]
|
||||
[ext_resource path="res://cubio/norm-ul-0018.png" type="Texture" id=160]
|
||||
[ext_resource path="res://cubio/norm-ul-0019.png" type="Texture" id=161]
|
||||
[ext_resource path="res://cubio/norm-ul-0020.png" type="Texture" id=162]
|
||||
[ext_resource path="res://light2.png" type="Texture" id=163]
|
||||
[ext_resource path="res://shadow_blob.png" type="Texture" id=164]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 20.0
|
||||
|
||||
[sub_resource type="SpriteFrames" id=2]
|
||||
|
||||
frames = [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 18 ), ExtResource( 19 ), ExtResource( 20 ), ExtResource( 21 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 24 ), ExtResource( 25 ), ExtResource( 26 ), ExtResource( 27 ), ExtResource( 28 ), ExtResource( 29 ), ExtResource( 30 ), ExtResource( 31 ), ExtResource( 32 ), ExtResource( 33 ), ExtResource( 34 ), ExtResource( 35 ), ExtResource( 36 ), ExtResource( 37 ), ExtResource( 38 ), ExtResource( 39 ), ExtResource( 40 ), ExtResource( 41 ), ExtResource( 42 ), ExtResource( 43 ), ExtResource( 44 ), ExtResource( 45 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 48 ), ExtResource( 49 ), ExtResource( 50 ), ExtResource( 51 ), ExtResource( 52 ), ExtResource( 53 ), ExtResource( 54 ), ExtResource( 55 ), ExtResource( 56 ), ExtResource( 57 ), ExtResource( 58 ), ExtResource( 59 ), ExtResource( 60 ), ExtResource( 61 ), ExtResource( 62 ), ExtResource( 63 ), ExtResource( 64 ), ExtResource( 65 ), ExtResource( 66 ), ExtResource( 67 ), ExtResource( 68 ), ExtResource( 69 ), ExtResource( 70 ), ExtResource( 71 ), ExtResource( 72 ), ExtResource( 73 ), ExtResource( 74 ), ExtResource( 75 ), ExtResource( 76 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 79 ), ExtResource( 80 ), ExtResource( 81 ), ExtResource( 82 ), ExtResource( 83 ), ExtResource( 84 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 88 ), ExtResource( 89 ), ExtResource( 90 ), ExtResource( 91 ), ExtResource( 92 ), ExtResource( 93 ), ExtResource( 94 ), ExtResource( 95 ), ExtResource( 96 ), ExtResource( 97 ), ExtResource( 98 ), ExtResource( 99 ), ExtResource( 100 ), ExtResource( 101 ), ExtResource( 102 ), ExtResource( 103 ), ExtResource( 104 ), ExtResource( 105 ), ExtResource( 106 ), ExtResource( 107 ), ExtResource( 108 ), ExtResource( 109 ), ExtResource( 110 ), ExtResource( 111 ), ExtResource( 112 ), ExtResource( 113 ), ExtResource( 114 ), ExtResource( 115 ), ExtResource( 116 ), ExtResource( 117 ), ExtResource( 118 ), ExtResource( 119 ), ExtResource( 120 ), ExtResource( 121 ), ExtResource( 122 ), ExtResource( 123 ), ExtResource( 124 ), ExtResource( 125 ), ExtResource( 126 ), ExtResource( 127 ), ExtResource( 128 ), ExtResource( 129 ), ExtResource( 130 ), ExtResource( 131 ), ExtResource( 132 ), ExtResource( 133 ), ExtResource( 134 ), ExtResource( 135 ), ExtResource( 136 ), ExtResource( 137 ), ExtResource( 138 ), ExtResource( 139 ), ExtResource( 140 ), ExtResource( 141 ), ExtResource( 142 ), ExtResource( 143 ), ExtResource( 144 ), ExtResource( 145 ), ExtResource( 146 ), ExtResource( 147 ), ExtResource( 148 ), ExtResource( 149 ), ExtResource( 150 ), ExtResource( 151 ), ExtResource( 152 ), ExtResource( 153 ), ExtResource( 154 ), ExtResource( 155 ), ExtResource( 156 ), ExtResource( 157 ), ExtResource( 158 ), ExtResource( 159 ), ExtResource( 160 ), ExtResource( 161 ), ExtResource( 162 ) ]
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
|
||||
resource/name = "bottom"
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79 ] }
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99 ] }
|
||||
|
||||
[sub_resource type="Animation" id=5]
|
||||
|
||||
length = 3.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1, 1.15, 1.2, 1.25, 1.3, 1.35, 1.4, 1.45, 1.5, 1.55, 1.6, 1.65, 1.7, 1.75, 1.8, 1.85, 1.9, 1.95, 2, 2.05, 2.1, 2.15, 2.2, 2.25, 2.3, 2.35, 2.4, 2.45, 2.5, 2.55, 2.6, 2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 55, 56, 57, 58, 59 ] }
|
||||
|
||||
[sub_resource type="Animation" id=6]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ] }
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139 ] }
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
|
||||
length = 0.95
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("frames:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159 ] }
|
||||
|
||||
[node name="cubio" type="KinematicBody2D"]
|
||||
|
||||
visibility/light_mask = 2
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, -0.397217, -9.30363 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="frames" type="AnimatedSprite" parent="."]
|
||||
|
||||
material/material = ExtResource( 2 )
|
||||
frames = SubResource( 2 )
|
||||
frame = 140
|
||||
offset = Vector2( 0.397217, -52.4323 )
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.397217, -9.30363 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="camera" type="Camera2D" parent="."]
|
||||
|
||||
anchor_mode = 1
|
||||
rotating = false
|
||||
current = true
|
||||
zoom = Vector2( 1, 1 )
|
||||
limit/left = -10000000
|
||||
limit/top = -10000000
|
||||
limit/right = 10000000
|
||||
limit/bottom = 10000000
|
||||
drag_margin/h_enabled = true
|
||||
drag_margin/v_enabled = true
|
||||
smoothing/enable = false
|
||||
smoothing/speed = 5.0
|
||||
drag_margin/left = 0.2
|
||||
drag_margin/top = 0.2
|
||||
drag_margin/right = 0.2
|
||||
drag_margin/bottom = 0.2
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/bottom = SubResource( 3 )
|
||||
anims/bottom_left = SubResource( 4 )
|
||||
anims/idle = SubResource( 5 )
|
||||
anims/left = SubResource( 6 )
|
||||
anims/top = SubResource( 7 )
|
||||
anims/top_left = SubResource( 8 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -0.140442, 2.64355 )
|
||||
enabled = true
|
||||
texture = ExtResource( 163 )
|
||||
offset = Vector2( 0, 0 )
|
||||
scale = 8.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 1.0
|
||||
mode = 0
|
||||
range/height = 100.0
|
||||
range/z_min = -1024
|
||||
range/z_max = 1024
|
||||
range/layer_min = 0
|
||||
range/layer_max = 0
|
||||
range/item_mask = 3
|
||||
shadow/enabled = true
|
||||
shadow/color = Color( 0, 0, 0, 0 )
|
||||
shadow/buffer_size = 2048
|
||||
shadow/esm_multiplier = 80.0
|
||||
shadow/item_mask = 1
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
visibility/opacity = 0.3
|
||||
texture = ExtResource( 164 )
|
||||
offset = Vector2( 0, -5.72164 )
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[application]
|
||||
|
||||
name="Isometric 2D + Lighting"
|
||||
main_scene="res://map.scn"
|
||||
main_scene="res://map.tscn"
|
||||
icon="res://icon.png"
|
||||
|
||||
[input]
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="CanvasItemMaterial" load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://faceNormal.png" type="Texture" id=1]
|
||||
|
||||
[sub_resource type="CanvasItemShader" id=1]
|
||||
|
||||
_code = { "fragment":"// just pass the normal\n\nuniform texture normal;\nvec2 ywnormal=tex( normal,UV).wy * vec2(2.0,2.0) - vec2(1.0,1.0);\nNORMAL=vec3(ywnormal,sqrt(1 - (ywnormal.x * ywnormal.x) - (ywnormal.y * ywnormal.y) ));\n\n", "fragment_ofs":0, "light":"//the tile half size in pixels\nvec2 tile_vec=vec2(140,70);\nfloat z_scale = 1.0;\n//compute a 3D postion fot thelight\nvec3 light_3d = vec3(-LIGHT_VEC.x,LIGHT_HEIGHT,LIGHT_VEC.y);\n\n//rotate the normal map to the same coordinates as the pseudo 3d ponit\n//this could be optimized\nfloat r = asin(tile_vec.y/tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\nvec3 n = rot_mat * NORMAL;\nn.y=-n.y;\n\n//compute diffuse light\nfloat dp = max(dot(normalize(n),-normalize(light_3d)),0);\nLIGHT=vec4(vec3(dp),1.0)*COLOR*LIGHT_COLOR;\n", "light_ofs":0, "vertex":"//pass the x1 in local sprite coordinates.\n//the sprite center (small red cross) is 0,0\nVAR1.xy=SRC_VERTEX;", "vertex_ofs":0 }
|
||||
|
||||
[resource]
|
||||
|
||||
shader/shader = SubResource( 1 )
|
||||
shader/shading_mode = 0
|
||||
shader_param/normal = ExtResource( 1 )
|
||||
|
Binary file not shown.
|
@ -0,0 +1,261 @@
|
|||
[gd_scene load_steps=10 format=1]
|
||||
|
||||
[ext_resource path="res://map.gd" type="Script" id=1]
|
||||
[ext_resource path="res://tileset.tres" type="TileSet" id=2]
|
||||
[ext_resource path="res://cubio.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://torch.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://column.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://cubio/idle0001.png" type="Texture" id=6]
|
||||
[ext_resource path="res://light2.png" type="Texture" id=7]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 100.0
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=2]
|
||||
|
||||
shader/shading_mode = 1
|
||||
|
||||
[node name="node" type="Node2D"]
|
||||
|
||||
transform/pos = Vector2( -0.735077, -20.5826 )
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="floor_map" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 2 )
|
||||
cell/size = Vector2( 192, 88 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = true
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -1900531, 0, -1900530, 1, -1900529, 0, -1900528, 0, -1900527, 0, -1834995, 0, -1834994, 0, -1834993, 0, -1834992, 1, -1834991, 0, -1769459, 0, -1769458, 0, -1769457, 0, -1769456, 1, -1769455, 0, -1703923, 0, -1703922, 0, -1703921, 0, -1703920, 0, -1703919, 1, -1638387, 0, -1638386, 0, -1638385, 0, -1638384, 0, -1638383, 0, -1572855, 0, -1572854, 0, -1572853, 0, -1572852, 0, -1572851, 0, -1572850, 0, -1572849, 1, -1572848, 0, -1572847, 0, -1507319, 0, -1507318, 0, -1507317, 0, -1507316, 0, -1507315, 1, -1507314, 1, -1507313, 1, -1507312, 0, -1507311, 0, -1441783, 0, -1441782, 0, -1441781, 0, -1441780, 0, -1441779, 0, -1441778, 0, -1441777, 0, -1441776, 0, -1441775, 0, -1376247, 0, -1376246, 0, -1376245, 0, -1376244, 0, -1310711, 1, -1310710, 0, -1310709, 0, -1310708, 0, -1245175, 0, -1245174, 0, -1245173, 0, -1245172, 0, -1179639, 0, -1179638, 0, -1179637, 1, -1179636, 0, -1114103, 0, -1114102, 0, -1114101, 0, -1114100, 0, -1048567, 0, -1048566, 0, -1048565, 0, -1048564, 0, -983031, 0, -983030, 0, -983029, 0, -983028, 0, -917495, 0, -917494, 1, -917493, 1, -917492, 0, -851959, 0, -851958, 0, -851957, 0, -851956, 0, -786423, 0, -786422, 0, -786421, 0, -786420, 0, -720894, 0, -720893, 0, -720892, 0, -720891, 0, -720890, 0, -720889, 0, -720888, 0, -720887, 0, -720886, 0, -720885, 0, -720884, 0, -720883, 0, -720882, 0, -720881, 0, -655358, 0, -655357, 0, -655356, 0, -655355, 0, -655354, 0, -655353, 0, -655352, 0, -655351, 0, -655350, 0, -655349, 0, -655348, 0, -655347, 0, -655346, 0, -655345, 0, -589822, 0, -589821, 0, -589820, 0, -589819, 0, -589818, 0, -589817, 0, -589816, 0, -589815, 0, -589814, 0, -589813, 0, -589812, 0, -589811, 0, -589810, 0, -589809, 0, -524286, 0, -524285, 0, -524284, 1, -524283, 0, -524282, 0, -524281, 0, -524280, 0, -524279, 1, -524278, 1, -524277, 1, -524276, 1, -524275, 0, -524274, 0, -524273, 0, -458750, 0, -458749, 0, -458748, 1, -458747, 0, -458746, 0, -458745, 0, -458744, 0, -458743, 0, -458742, 0, -458741, 0, -458740, 0, -458739, 0, -458738, 1, -458737, 0, -393214, 0, -393213, 0, -393212, 0, -393211, 0, -393210, 0, -393209, 0, -393208, 0, -393207, 0, -393206, 0, -393205, 0, -393204, 0, -393203, 0, -393202, 0, -393201, 0, -262149, 0, -262148, 0, -262147, 0, -262146, 0, -262145, 0, -327680, 0, -327679, 0, -327678, 0, -327677, 0, -327676, 0, -327675, 0, -196613, 0, -196612, 0, -196611, 0, -196610, 0, -196609, 0, -262144, 0, -262143, 0, -262142, 0, -262141, 0, -262140, 0, -262139, 0, -131077, 0, -131076, 0, -131075, 0, -131074, 0, -131073, 0, -196608, 0, -196607, 0, -196606, 0, -196605, 0, -196604, 0, -196603, 0, -65541, 0, -65540, 0, -65539, 0, -65538, 0, -65537, 0, -131072, 0, -131071, 0, -131070, 0, -131069, 1, -131068, 0, -131067, 0, -5, 0, -4, 0, -3, 0, -2, 0, -1, 0, -65536, 0, -65535, 0, -65534, 0, -65533, 0, -65532, 1, -65531, 0, 65531, 0, 65532, 1, 65533, 0, 65534, 0, 65535, 1, 0, 0, 1, 0, 2, 0, 3, 0, 4, 1, 5, 0, 131067, 0, 131068, 1, 131069, 0, 131070, 0, 131071, 0, 65536, 0, 65537, 0, 65538, 0, 65539, 0, 65540, 0, 65541, 0, 196603, 0, 196604, 0, 196605, 0, 196606, 1, 196607, 0, 131072, 0, 131073, 0, 131074, 0, 131075, 0, 131076, 1, 131077, 0, 262139, 0, 262140, 0, 262141, 0, 262142, 0, 262143, 0, 196608, 0, 196609, 0, 196610, 0, 196611, 0, 196612, 0, 196613, 0, 327676, 0, 327677, 0, 327678, 0, 327679, 0, 262144, 0, 262145, 0, 262146, 0, 262147, 0, 262148, 0, 262149, 0 )
|
||||
|
||||
[node name="wall_map" type="TileMap" parent="."]
|
||||
|
||||
mode = 1
|
||||
tile_set = ExtResource( 2 )
|
||||
cell/size = Vector2( 94, 43 )
|
||||
cell/quadrant_size = 16
|
||||
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
cell/half_offset = 2
|
||||
cell/tile_origin = 1
|
||||
cell/y_sort = true
|
||||
collision/use_kinematic = false
|
||||
collision/friction = 1.0
|
||||
collision/bounce = 0.0
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
occluder/light_mask = 1
|
||||
tile_data = IntArray( -3801060, 5, -3801059, 10, -3801058, 10, -3801057, 10, -3801056, 10, -3801055, 10, -3801054, 10, -3801053, 10, -3801052, 536870916, -3735524, 9, -3735516, 7, -3669988, 9, -3669980, 7, -3604452, 9, -3604444, 7, -3538916, 9, -3538908, 7, -3473380, 9, -3473372, 7, -3407844, 9, -3407836, 7, -3342308, 9, -3342300, 7, -3276772, 9, -3276764, 7, -3211236, 9, -3211228, 7, -3145709, 5, -3145708, 10, -3145707, 10, -3145706, 10, -3145705, 10, -3145704, 10, -3145703, 10, -3145702, 10, -3145701, 10, -3145692, 7, -3080173, 9, -3080156, 7, -3014637, 9, -3014634, 2, -3014620, 7, -2949101, 2, -2949084, 7, -2883565, 9, -2883558, 8, -2883557, 8, -2883556, 8, -2883555, 8, -2883554, 8, -2883553, 8, -2883552, 8, -2883551, 8, -2883550, 8, -2883549, 8, -2883548, 6, -2818029, 9, -2818023, 7, -2752493, 9, -2752487, 7, -2686957, 9, -2686955, 2, -2686951, 7, -2621421, 9, -2621415, 7, -2555885, 9, -2555879, 2, -2490349, 2, -2490343, 7, -2424813, 9, -2424807, 7, -2359277, 9, -2359274, 2, -2359271, 7, -2293741, 9, -2293735, 7, -2228205, 4, -2228199, 7, -2162669, 9, -2162668, 10, -2162667, 536870916, -2162663, 7, -2097133, 8, -2097132, 8, -2097131, 6, -2097127, 7, -2031597, 9, -2031591, 7, -1966061, 9, -1966055, 7, -1900525, 9, -1900519, 7, -1834989, 9, -1834986, 8, -1834985, 8, -1834984, 8, -1834983, 7, -1769453, 9, -1769450, 7, -1769447, 7, -1703917, 9, -1703916, 8, -1703915, 8, -1703914, 8, -1703911, 7, -1638381, 9, -1638375, 7, -1572845, 9, -1572839, 7, -1507309, 9, -1507303, 7, -1441787, 5, -1441786, 10, -1441785, 10, -1441784, 10, -1441783, 10, -1441782, 10, -1441781, 10, -1441780, 10, -1441779, 10, -1441778, 10, -1441777, 10, -1441776, 10, -1441775, 10, -1441774, 10, -1441766, 10, -1441765, 10, -1441764, 10, -1441763, 10, -1441762, 10, -1441761, 536870916, -1376251, 9, -1376225, 7, -1310715, 9, -1310689, 7, -1245179, 9, -1245153, 7, -1179643, 9, -1179617, 7, -1114107, 9, -1114081, 7, -1048571, 9, -1048545, 7, -983035, 9, -983009, 7, -917499, 9, -917473, 7, -851963, 9, -851937, 7, -786427, 9, -786401, 7, -720891, 9, -720884, 8, -720883, 8, -720882, 8, -720881, 8, -720880, 8, -720879, 8, -720878, 8, -720877, 8, -720876, 8, -720875, 8, -720874, 8, -720873, 8, -720872, 8, -720871, 8, -720870, 8, -720869, 8, -720868, 8, -720867, 8, -720866, 8, -720865, 6, -589834, 5, -589833, 10, -589832, 10, -589831, 10, -589830, 10, -589829, 10, -589828, 10, -589827, 10, -589826, 10, -589825, 10, -655360, 10, -655359, 10, -655358, 10, -655357, 10, -655356, 10, -655349, 7, -524298, 9, -589813, 7, -458762, 9, -524277, 7, -393226, 9, -458741, 7, -327690, 9, -393205, 7, -262154, 9, -262150, 5, -262149, 10, -262148, 10, -262147, 10, -262146, 10, -262145, 10, -327680, 10, -327679, 10, -327678, 10, -327677, 10, -327676, 3, -327669, 7, -196618, 9, -196614, 9, -262140, 7, -262133, 7, -131082, 9, -131078, 9, -196604, 7, -196597, 7, -65546, 9, -65542, 9, -131068, 7, -131061, 7, -10, 9, -6, 4, -5, 8, -4, 8, -3, 8, -2, 8, -65535, 8, -65534, 8, -65533, 8, -65532, 6, -65525, 7, 65526, 9, 11, 7, 131062, 9, 65547, 7, 196598, 9, 131083, 7, 262134, 9, 196619, 7, 327670, 9, 262155, 7, 393206, 9, 327691, 7, 458742, 9, 393227, 7, 524278, 4, 524279, 8, 458763, 7, 589816, 9, 524299, 7, 655352, 4, 655353, 8, 655354, 8, 655355, 8, 655356, 8, 655357, 8, 655358, 8, 655359, 8, 589824, 8, 589825, 8, 589826, 8, 589827, 8, 589828, 8, 589829, 8, 589830, 8, 589831, 8, 589832, 8, 589833, 8, 589834, 8, 589835, 6 )
|
||||
__meta__ = { "_editor_collapsed":true }
|
||||
|
||||
[node name="cubio" parent="wall_map" instance=ExtResource( 3 )]
|
||||
|
||||
transform/pos = Vector2( -184.284, 6.7328 )
|
||||
collision/margin = 0.08
|
||||
|
||||
[node name="toch" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( -42.0531, -74.8855 )
|
||||
|
||||
[node name="toch1" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 96.0294, -19.8329 )
|
||||
|
||||
[node name="toch2" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 954.802, -147.456 )
|
||||
|
||||
[node name="toch3" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 1247.08, 42.9454 )
|
||||
|
||||
[node name="toch4" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 1257.11, -167.498 )
|
||||
|
||||
[node name="toch5" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 1632.9, -73.9674 )
|
||||
|
||||
[node name="toch6" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 1566.09, 113.093 )
|
||||
|
||||
[node name="toch7" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 1935.2, 64.6577 )
|
||||
|
||||
[node name="toch8" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 2000.34, 258.399 )
|
||||
|
||||
[node name="toch9" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 3738.07, -328.247 )
|
||||
|
||||
[node name="toch10" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 4034.17, -585.483 )
|
||||
|
||||
[node name="toch11" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 4261.79, -472.595 )
|
||||
|
||||
[node name="toch12" parent="wall_map" instance=ExtResource( 4 )]
|
||||
|
||||
transform/pos = Vector2( 4006.41, -479.998 )
|
||||
|
||||
[node name="column" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( -122.203, 119.689 )
|
||||
|
||||
[node name="column1" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 95.2993, 99.8337 )
|
||||
|
||||
[node name="column2" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 138.619, 246.039 )
|
||||
|
||||
[node name="column3" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 324.534, 82.6862 )
|
||||
|
||||
[node name="column4" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1046.53, -175.429 )
|
||||
|
||||
[node name="column5" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1347.07, -179.039 )
|
||||
|
||||
[node name="column6" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1184.62, -261.166 )
|
||||
|
||||
[node name="column7" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1520.35, -139.329 )
|
||||
|
||||
[node name="column8" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1409.34, 25.8286 )
|
||||
|
||||
[node name="column9" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1804.63, -13.8814 )
|
||||
|
||||
[node name="column10" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 1782.97, 170.229 )
|
||||
|
||||
[node name="column11" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 2223.9, 158.537 )
|
||||
|
||||
[node name="column12" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 3744.95, -480.43 )
|
||||
|
||||
[node name="column13" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 3838.62, -526.042 )
|
||||
|
||||
[node name="column14" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 3937.17, -573.283 )
|
||||
|
||||
[node name="column15" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 4123.69, -474.728 )
|
||||
|
||||
[node name="column16" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 4027.58, -427.487 )
|
||||
|
||||
[node name="column17" parent="wall_map" instance=ExtResource( 5 )]
|
||||
|
||||
transform/pos = Vector2( 3935.54, -377.802 )
|
||||
|
||||
[node name="prince_area" type="Area2D" parent="wall_map"]
|
||||
|
||||
transform/pos = Vector2( 4133.07, -561.046 )
|
||||
input/pickable = true
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, -37.4897 )
|
||||
shapes/0/trigger = false
|
||||
gravity_vec = Vector2( 0, 1 )
|
||||
gravity = 98.0
|
||||
linear_damp = 0.1
|
||||
angular_damp = 1.0
|
||||
|
||||
[node name="prince" type="Sprite" parent="wall_map/prince_area"]
|
||||
|
||||
material/material = SubResource( 2 )
|
||||
texture = ExtResource( 6 )
|
||||
offset = Vector2( -1.10803, -49.8615 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="wall_map/prince_area"]
|
||||
|
||||
transform/pos = Vector2( 0, -37.4897 )
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="Light2D" type="Light2D" parent="."]
|
||||
|
||||
transform/pos = Vector2( -191.788, 32.4743 )
|
||||
enabled = true
|
||||
texture = ExtResource( 7 )
|
||||
offset = Vector2( 0, 0 )
|
||||
scale = 8.0
|
||||
color = Color( 1, 1, 1, 1 )
|
||||
energy = 1.0
|
||||
mode = 0
|
||||
range/height = 60.0
|
||||
range/z_min = -1024
|
||||
range/z_max = 1024
|
||||
range/layer_min = 0
|
||||
range/layer_max = 0
|
||||
range/item_mask = 1
|
||||
shadow/enabled = true
|
||||
shadow/color = Color( 0, 0, 0, 0 )
|
||||
shadow/buffer_size = 2048
|
||||
shadow/esm_multiplier = 80.0
|
||||
shadow/item_mask = 1
|
||||
|
||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||
|
||||
color = Color( 0.361304, 0.36638, 0.384393, 1 )
|
||||
|
||||
[node name="message" type="Label" parent="."]
|
||||
|
||||
visibility/visible = false
|
||||
material/material = SubResource( 2 )
|
||||
focus/ignore_mouse = true
|
||||
focus/stop_mouse = true
|
||||
size_flags/horizontal = 2
|
||||
margin/left = 4067.0
|
||||
margin/top = -597.0
|
||||
margin/right = 4200.0
|
||||
margin/bottom = -571.0
|
||||
text = "Thank You Cubio!\nYou saved The Prince!"
|
||||
align = 1
|
||||
percent_visible = 1.0
|
||||
lines_skipped = 0
|
||||
max_lines_visible = -1
|
||||
|
||||
[connection signal="body_enter" from="wall_map/prince_area" to="." method="_on_prince_area_body_enter"]
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,172 @@
|
|||
[gd_scene load_steps=10 format=1]
|
||||
|
||||
[ext_resource path="res://shoot.gd" type="Script" id=1]
|
||||
[ext_resource path="res://energy.png" type="Texture" id=2]
|
||||
[ext_resource path="res://shoot_halo.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
|
||||
custom_solver_bias = 0.0
|
||||
radius = 10.0
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id=2]
|
||||
|
||||
shader/shading_mode = 0
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
|
||||
length = 1.0
|
||||
loop = false
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("explosion:config/emitting")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.3 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
|
||||
tracks/1/type = "value"
|
||||
tracks/1/path = NodePath("Sprite:visibility/opacity")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/keys = { "cont":true, "times":FloatArray( 0, 0.2 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] }
|
||||
tracks/2/type = "value"
|
||||
tracks/2/path = NodePath("energy1:config/emitting")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] }
|
||||
tracks/3/type = "value"
|
||||
tracks/3/path = NodePath("light:color")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/keys = { "cont":true, "times":FloatArray( 0, 0.5 ), "transitions":FloatArray( 1, 1 ), "values":[ Color( 1, 3, 2, 1 ), Color( 0, 0, 0, 0 ) ] }
|
||||
tracks/4/type = "method"
|
||||
tracks/4/path = NodePath(".")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/keys = { "times":FloatArray( 0.9 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] }
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
|
||||
length = 1.0
|
||||
loop = true
|
||||
step = 0.1
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("Sprite:transform/rot")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 360.0 ] }
|
||||
|
||||
[sub_resource type="ColorRamp" id=5]
|
||||
|
||||
offsets = FloatArray( 0, 1 )
|
||||
colors = ColorArray( 1, 1, 1, 1, 1, 0.617074, 0.704795, 0.0653235 )
|
||||
|
||||
[sub_resource type="ColorRamp" id=6]
|
||||
|
||||
offsets = FloatArray( 0, 1 )
|
||||
colors = ColorArray( 1, 1, 1, 1, 1, 0.617074, 0.704795, 0.0653235 )
|
||||
|
||||
[node name="shoot" type="KinematicBody2D"]
|
||||
|
||||
input/pickable = false
|
||||
shapes/0/shape = SubResource( 1 )
|
||||
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
|
||||
shapes/0/trigger = false
|
||||
collision/layers = 1
|
||||
collision/mask = 1
|
||||
collision/margin = 0.08
|
||||
script/script = ExtResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
material/material = SubResource( 2 )
|
||||
transform/pos = Vector2( -1.46303, -58.521 )
|
||||
texture = ExtResource( 2 )
|
||||
|
||||
[node name="anim" type="AnimationPlayer" parent="."]
|
||||
|
||||
playback/process_mode = 1
|
||||
playback/default_blend_time = 0.0
|
||||
root/root = NodePath("..")
|
||||
anims/explode = SubResource( 3 )
|
||||
anims/spin = SubResource( 4 )
|
||||
playback/active = true
|
||||
playback/speed = 1.0
|
||||
blend_times = [ ]
|
||||
autoplay = ""
|
||||
|
||||
[node name="light" type="Light2D" parent="."]
|
||||
|
||||
enabled = true
|
||||
texture = ExtResource( 3 )
|
||||
offset = Vector2( 0, 0 )
|
||||
scale = 1.0
|
||||
color = Color( 1, 3, 2, 1 )
|
||||
energy = 1.0
|
||||
mode = 0
|
||||
range/height = 80.0
|
||||
range/z_min = -1024
|
||||
range/z_max = 1024
|
||||
range/layer_min = 0
|
||||
range/layer_max = 0
|
||||
range/item_mask = 1
|
||||
shadow/enabled = true
|
||||
shadow/color = Color( 0, 0, 0, 0 )
|
||||
shadow/buffer_size = 2048
|
||||
shadow/esm_multiplier = 80.0
|
||||
shadow/item_mask = 1
|
||||
|
||||
[node name="shape" type="CollisionShape2D" parent="."]
|
||||
|
||||
shape = SubResource( 1 )
|
||||
trigger = false
|
||||
_update_shape_index = -1
|
||||
|
||||
[node name="energy1" type="Particles2D" parent="."]
|
||||
|
||||
visibility/blend_mode = 1
|
||||
transform/pos = Vector2( -1.06581, -61.3015 )
|
||||
config/amount = 32
|
||||
config/lifetime = 0.6
|
||||
config/local_space = false
|
||||
config/texture = ExtResource( 2 )
|
||||
params/direction = 0.0
|
||||
params/spread = 180.0
|
||||
params/linear_velocity = 60.0
|
||||
params/spin_velocity = 0.0
|
||||
params/orbit_velocity = 0.0
|
||||
params/gravity_direction = 0.0
|
||||
params/gravity_strength = 9.8
|
||||
params/radial_accel = 0.0
|
||||
params/tangential_accel = 0.0
|
||||
params/damping = 0.0
|
||||
params/initial_angle = 0.0
|
||||
params/initial_size = 0.8
|
||||
params/final_size = 0.1
|
||||
params/hue_variation = 0.0
|
||||
params/anim_speed_scale = 1.0
|
||||
params/anim_initial_pos = 0.0
|
||||
color/color_ramp = SubResource( 5 )
|
||||
|
||||
[node name="explosion" type="Particles2D" parent="."]
|
||||
|
||||
visibility/blend_mode = 1
|
||||
transform/pos = Vector2( -1.06581, -61.3015 )
|
||||
config/amount = 32
|
||||
config/lifetime = 0.6
|
||||
config/emitting = false
|
||||
config/local_space = false
|
||||
config/explosiveness = 0.1
|
||||
config/texture = ExtResource( 2 )
|
||||
params/direction = 0.0
|
||||
params/spread = 180.0
|
||||
params/linear_velocity = 200.0
|
||||
params/spin_velocity = 0.0
|
||||
params/orbit_velocity = 0.0
|
||||
params/gravity_direction = 0.0
|
||||
params/gravity_strength = 200.0
|
||||
params/radial_accel = 0.0
|
||||
params/tangential_accel = 0.0
|
||||
params/damping = 0.0
|
||||
params/initial_angle = 0.0
|
||||
params/initial_size = 0.8
|
||||
params/final_size = 0.1
|
||||
params/hue_variation = 0.0
|
||||
params/anim_speed_scale = 1.0
|
||||
params/anim_initial_pos = 0.0
|
||||
color/color_ramp = SubResource( 6 )
|
||||
|
||||
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue